@theholocron/cli 2.0.0-alpha.37 → 2.0.0-alpha.39

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (2) hide show
  1. package/dist/cli.mjs +22 -15
  2. package/package.json +1 -1
package/dist/cli.mjs CHANGED
@@ -1988,13 +1988,13 @@ function reusableHeader(source) {
1988
1988
  ``
1989
1989
  ].join("\n");
1990
1990
  }
1991
- function thinCallerHeader() {
1991
+ function thinCallerHeader(forPrimary = false) {
1992
1992
  return [
1993
- `# AUTO-GENERATED — do not edit in theholocron/.github directly.`,
1993
+ forPrimary ? `# AUTO-GENERATED — do not edit in theholocron/.github directly.` : `# AUTO-GENERATED — do not edit directly.`,
1994
1994
  `# Source: theholocron/holocron · packages/cli/src/commands/setup-workflows.ts`,
1995
1995
  `# Synced: ${(/* @__PURE__ */ new Date()).toISOString()}`,
1996
1996
  `# Tool: holocron sync-github`,
1997
- `# Changes: edit setup-workflows.ts in theholocron/holocron and push.`,
1997
+ `# Changes: edit source in theholocron/holocron and push to alpha or main.`,
1998
1998
  ``
1999
1999
  ].join("\n");
2000
2000
  }
@@ -2005,23 +2005,30 @@ function buildBatch(repo, allowedWorkflows) {
2005
2005
  path: `.github/actions/${name}.yml`,
2006
2006
  content: reusableHeader(`packages/cli/src/templates/index.ts`) + content
2007
2007
  });
2008
- for (const [name, content] of Object.entries(REUSABLE_WORKFLOWS)) {
2009
- if (allowedWorkflows && !allowedWorkflows.has(name)) continue;
2010
- files.push({
2008
+ if (isPrimaryGithubRepo) {
2009
+ for (const [name, content] of Object.entries(REUSABLE_WORKFLOWS)) files.push({
2011
2010
  path: `.github/workflows/${name}.yml`,
2012
2011
  content: reusableHeader(`packages/cli/src/templates/index.ts`) + content
2013
2012
  });
2014
- }
2015
- if (isPrimaryGithubRepo) for (const [name, content] of Object.entries(WORKFLOW_TEMPLATES)) {
2013
+ for (const [name, content] of Object.entries(WORKFLOW_TEMPLATES)) {
2014
+ files.push({
2015
+ path: `workflow-templates/${name}.yml`,
2016
+ content: thinCallerHeader(true) + content
2017
+ });
2018
+ const props = WORKFLOW_TEMPLATE_PROPERTIES[name];
2019
+ if (props) files.push({
2020
+ path: `workflow-templates/${name}.properties.json`,
2021
+ content: props
2022
+ });
2023
+ }
2024
+ } else for (const name of Object.keys(REUSABLE_WORKFLOWS)) {
2025
+ if (allowedWorkflows && !allowedWorkflows.has(name)) continue;
2026
+ const content = generateThinCallerContent(name);
2027
+ if (!content) continue;
2016
2028
  files.push({
2017
- path: `workflow-templates/${name}.yml`,
2029
+ path: `.github/workflows/${name}.yml`,
2018
2030
  content: thinCallerHeader() + content
2019
2031
  });
2020
- const props = WORKFLOW_TEMPLATE_PROPERTIES[name];
2021
- if (props) files.push({
2022
- path: `workflow-templates/${name}.properties.json`,
2023
- content: props
2024
- });
2025
2032
  }
2026
2033
  return files;
2027
2034
  }
@@ -2246,7 +2253,7 @@ async function runSyncGithub(input) {
2246
2253
  method: "POST",
2247
2254
  headers,
2248
2255
  body: JSON.stringify({
2249
- title: message,
2256
+ title: message.split("\n")[0],
2250
2257
  head: branch,
2251
2258
  base: "main",
2252
2259
  body: "Auto-generated by `holocron sync-github`. Review and merge to apply template updates."
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@theholocron/cli",
3
- "version": "2.0.0-alpha.37",
3
+ "version": "2.0.0-alpha.39",
4
4
  "description": "The Holocron CLI — a pluggable, capability-based orchestrator for spinning up and operating software projects.",
5
5
  "homepage": "https://github.com/theholocron/holocron/tree/main/packages/cli#readme",
6
6
  "bugs": "https://github.com/theholocron/holocron/issues",