@theholocron/cli 5.0.0-alpha.256 → 5.0.0-alpha.257

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.
package/dist/cli.mjs CHANGED
@@ -11288,6 +11288,19 @@ function withAutoPreviewDeployPaths(tasks, gitRoot) {
11288
11288
  };
11289
11289
  });
11290
11290
  }
11291
+ // src/commands/thin-caller-file/thin-caller-file.ts
11292
+ const { workflowHeader: workflowHeader$1 } = createHeader({
11293
+ source: "cli/astromech/src/thin-callers.ts",
11294
+ tool: "holocron repo sync"
11295
+ });
11296
+ /**
11297
+ * The text of a generated thin-caller workflow: the AUTO-GENERATED header, the `# Source package:` marker (see
11298
+ * `resolvePkgRelPath`) and the workflow itself. Both `repo setup` and `repo sync` write their workflows through
11299
+ * this, so the file is the same whichever command wrote it.
11300
+ */
11301
+ function thinCallerFile(pkgRelPath, content) {
11302
+ return `${workflowHeader$1()}# Source package: ${pkgRelPath}\n\n${content}`;
11303
+ }
11291
11304
  // src/commands/workflow-source-marker/workflow-source-marker.ts
11292
11305
  /** `# Source package: <path>` line at the head of a generated thin-caller workflow — see {@link resolvePkgRelPath}. */
11293
11306
  const SOURCE_PACKAGE_MARKER = /^# Source package: (.+)$/m;
@@ -11904,6 +11917,25 @@ async function installEngineeringStructure({ repoRoot }) {
11904
11917
  for (const [path, content] of writes) if (await writeIfAbsent(path, content)) results.push(path.replace(repoRoot + "/", ""));
11905
11918
  return results.length > 0 ? `created: ${results.join(", ")}` : "all files already exist — nothing to write";
11906
11919
  }
11920
+ // src/commands/setup/own-catalog-packages/own-catalog-packages.ts
11921
+ /**
11922
+ * The packages of this workspace that a pnpm catalog also lists: the minimum versions a plugin accepts
11923
+ * as a peer, say. Dependabot reads every catalog entry as an ordinary dependency and would raise it to the
11924
+ * latest release, but such an entry is a compatibility floor that is raised by hand, and the package itself
11925
+ * is linked with `workspace:`. A package from outside the workspace in a catalog is left out, so it keeps
11926
+ * getting updates. Sorted; `[]` when there is no `pnpm-workspace.yaml`.
11927
+ */
11928
+ function ownCatalogPackages(repoRoot) {
11929
+ let yaml;
11930
+ try {
11931
+ yaml = readFileSync(join(repoRoot, "pnpm-workspace.yaml"), "utf8");
11932
+ } catch {
11933
+ return [];
11934
+ }
11935
+ const listed = new Set(Object.values(parseCatalogs(yaml)).flatMap((catalog) => Object.keys(catalog)));
11936
+ const own = discoverWorkspacePackages(repoRoot).flatMap(({ name }) => name && listed.has(name) ? [name] : []);
11937
+ return [...new Set(own)].sort();
11938
+ }
11907
11939
  // src/commands/setup/repo-settings.ts
11908
11940
  const BALANCED_REPO_SETTINGS = {
11909
11941
  allow_squash_merge: true,
@@ -12110,11 +12142,14 @@ async function installSkills({ agent, skills, repoRoot }) {
12110
12142
  }
12111
12143
  }
12112
12144
  }
12113
- if (installed.length > 0 || stale.length > 0 || missing.length > 0 || externalFailed.length > 0) await updateSkillsGitignore(gitignorePath, [
12114
- ...installed,
12115
- ...missing,
12116
- ...externalFailed
12117
- ], symlinkFn);
12145
+ if (installed.length > 0 || stale.length > 0 || missing.length > 0 || externalFailed.length > 0) {
12146
+ const managed = /* @__PURE__ */ new Set([
12147
+ ...installed,
12148
+ ...missing,
12149
+ ...externalFailed
12150
+ ]);
12151
+ await updateSkillsGitignore(gitignorePath, skills.filter((name) => managed.has(name)), symlinkFn);
12152
+ }
12118
12153
  const parts = [`installed ${installed.length}`];
12119
12154
  if (stale.length > 0) parts.push(`pruned: ${stale.join(", ")}`);
12120
12155
  if (externalStale.length > 0) parts.push(`stale: ${externalStale.join(", ")} (run \`holocron skills update\` to refresh)`);
@@ -12178,14 +12213,10 @@ async function updateSkillsGitignore(gitignorePath, skills, symlinkFn) {
12178
12213
  * extensible but pushes the same knowledge into N plugins instead of
12179
12214
  * one central place.
12180
12215
  */
12181
- const { workflowHeader: workflowHeader$1 } = createHeader({
12216
+ const { workflowHeader } = createHeader({
12182
12217
  source: "cli/cli/src/commands/setup/run-setup.ts",
12183
12218
  tool: "holocron repo setup"
12184
12219
  });
12185
- const { workflowHeader: thinCallerHeader } = createHeader({
12186
- source: "cli/astromech/src/thin-callers.ts",
12187
- tool: "holocron repo setup"
12188
- });
12189
12220
  async function runSetup(input) {
12190
12221
  const print = input.print ?? ((line) => console.log(line));
12191
12222
  const logger = getLogger();
@@ -12282,7 +12313,7 @@ async function runSetup(input) {
12282
12313
  const step = content.includes("workflows/preview.yml@main") ? `write workflow ${name} (with preview)` : `write workflow ${name}`;
12283
12314
  steps.push(await runStep("source", step, dryRun, async () => {
12284
12315
  await assertNoPackageCollision(name, setupPkgRelPath, filename, () => source.readWorkflowFile(filename));
12285
- await source.writeWorkflowFile(filename, `${thinCallerHeader()}# Source package: ${setupPkgRelPath}\n\n${content}`);
12316
+ await source.writeWorkflowFile(filename, thinCallerFile(setupPkgRelPath, content));
12286
12317
  }));
12287
12318
  print(formatStep(steps[steps.length - 1]));
12288
12319
  }
@@ -12297,11 +12328,11 @@ async function runSetup(input) {
12297
12328
  if (loader.has("source") && effectivePreset !== "none") {
12298
12329
  const source = loader.get("source");
12299
12330
  steps.push(await runStep("source", "write .github/dependabot.yml", dryRun, async () => {
12300
- await source.writeRepoFile(".github/dependabot.yml", createDependabot());
12331
+ await source.writeRepoFile(".github/dependabot.yml", createDependabot({ ignore: ownCatalogPackages(input.context.repoRoot) }));
12301
12332
  }));
12302
12333
  print(formatStep(steps[steps.length - 1]));
12303
12334
  steps.push(await runStep("source", "write .github/dco.yml", dryRun, async () => {
12304
- await source.writeRepoFile(".github/dco.yml", `${workflowHeader$1()}${dco_default}`);
12335
+ await source.writeRepoFile(".github/dco.yml", `${workflowHeader()}${dco_default}`);
12305
12336
  }));
12306
12337
  print(formatStep(steps[steps.length - 1]));
12307
12338
  }
@@ -13386,10 +13417,6 @@ async function runSyncWiki(input) {
13386
13417
  }
13387
13418
  }
13388
13419
  // src/commands/sync/sync.ts
13389
- const { workflowHeader } = createHeader({
13390
- source: "cli/astromech/src/thin-callers.ts",
13391
- tool: "holocron repo sync"
13392
- });
13393
13420
  const SYNC_STEPS = [
13394
13421
  "labels",
13395
13422
  "properties",
@@ -13712,7 +13739,7 @@ async function runSync(input) {
13712
13739
  const step = `sync workflow ${name}${content.includes("workflows/preview.yml@main") ? " (with preview)" : ""}`;
13713
13740
  steps.push(await runSyncStep("local", step, dryRun, async () => {
13714
13741
  await assertNoPackageCollision(name, pkgRelPath, filename, () => readExistingWorkflowFile(gitRoot, filename));
13715
- await writeWorkflowFile(gitRoot, filename, `${workflowHeader()}# Source package: ${pkgRelPath}\n\n${content}`);
13742
+ await writeWorkflowFile(gitRoot, filename, thinCallerFile(pkgRelPath, content));
13716
13743
  }));
13717
13744
  print(formatSyncStep(steps[steps.length - 1]));
13718
13745
  }