@icebreakers/monorepo 6.3.2 → 6.4.0

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 (27) hide show
  1. package/dist/{baseline-DcdCYIZ_.mjs → baseline-BahTYIy-.mjs} +1 -1
  2. package/dist/{catalog-D2AINq9Q.mjs → catalog-CXITrKhb.mjs} +3 -3
  3. package/dist/cli.mjs +118 -65
  4. package/dist/{commands-C-Epftob.mjs → commands-1ApnhvJF.mjs} +9264 -8177
  5. package/dist/{config-Cq6mvrR_.mjs → config-BmK7bacv.mjs} +3 -3
  6. package/dist/{create-flow-CwhV6HGt.mjs → create-flow-B2sFa_5j.mjs} +3 -3
  7. package/dist/{deps-DI4i5rGv.mjs → deps-BbkQSTqk.mjs} +3 -3
  8. package/dist/{execute-CbG7_PX2.mjs → execute-0NGtp4hR.mjs} +2 -2
  9. package/dist/{execute-GGmuyJ7i.mjs → execute-BdnLU2-t.mjs} +2 -2
  10. package/dist/{format-1YqyTR6b.mjs → format-BcU-hzT_.mjs} +1 -1
  11. package/dist/index.d.mts +253 -88
  12. package/dist/index.mjs +10 -10
  13. package/dist/{inputs-JSfXePTy.mjs → inputs-DCMUM9kz.mjs} +1 -1
  14. package/dist/{npm-BKpeG7BG.mjs → npm-DB-0FHcW.mjs} +1 -1
  15. package/dist/{plan-Cw4YMgeP.mjs → plan-C47MSubl.mjs} +1 -1
  16. package/dist/{run-iA8cKHQQ.mjs → run-5IdtzJJR.mjs} +4 -4
  17. package/dist/{save-DT4WOFrK.mjs → save-cKCfFQrh.mjs} +3 -3
  18. package/dist/{scan-uLFN5vFP.mjs → scan-Diyd5MkZ.mjs} +2 -2
  19. package/dist/{template-drift-rhs1O3_F.mjs → template-drift-C8gMh7d5.mjs} +16 -3
  20. package/dist/tooling-entry.mjs +2 -2
  21. package/dist/{transaction-cclHjAvr.mjs → transaction-B33_Cacq.mjs} +2 -2
  22. package/dist/{tsconfig-gjLATvL9.mjs → tsconfig-B32VPzfD.mjs} +1 -1
  23. package/dist/{vitest-Dd3jZFGV.mjs → vitest-HFe4zq1M.mjs} +1 -1
  24. package/dist/{workspace-tasks-bczz1Msx.mjs → workspace-tasks-xyIJwdmH.mjs} +5 -5
  25. package/package.json +2 -2
  26. package/resources/skills/repoctl/SKILL.md +8 -0
  27. package/resources/skills/repoctl/references/commands.md +30 -2
package/dist/cli.mjs CHANGED
@@ -1,9 +1,9 @@
1
- import { Ct as message, Et as supportedLocales, J as getWorkspaceGraph, Q as whyWorkspaceDependency, St as localize, Ut as getWorkspaceData, Z as getWorkspaceImpact, a as inspectWorkspaceOwners, i as planCodeowners, jt as fs$1, n as locateWorkspace, r as applyCodeownersPlan, t as getWorkspaceTaskCatalog, vt as cliName, wt as repoctlLocale } from "./workspace-tasks-bczz1Msx.mjs";
2
- import { d as logger } from "./execute-CbG7_PX2.mjs";
3
- import { $ as planPublicApiUpdate, $t as createTemplateCatalog, B as planOrganizationPresetAssets, C as validateSnapshotBuildPlan, Ct as parsePublishSummary, D as releaseNightly, Dt as createAutoChangesetPlan, Et as applyAutoChangeset, F as checkPackages, G as planInstallSecurityPreset, I as getMaintenanceWorkflow, J as planDocsDeployment, K as deployDocs, L as prepareMaintenanceUpgrade, M as syncProjectReferences, N as applyProjectReferencesPlan, O as formatNightlySummary, Ot as getAutoChangesetWorkflow, P as planProjectReferences, Pt as initToolingTargets, Q as applyPublicApiUpdate, Qt as resolveRemoteTemplateSource, T as createReleasePlan, Tt as renderReleasePullRequest, U as installGitHooks, Ut as planUpgrade, W as applyInstallSecurityPreset, Wt as applyUpgradePlan, Y as checkPeerDependencies, Z as checkPublicApi, _ as createSnapshotBuildPlan, a as planWorkspaceMove, an as sanitizeConfigReport, b as createSnapshotFreezeRecord, c as applyToolingCapability, ct as readReleasePreparationPolicy, d as planTemplateValidation, en as resolveTemplateCatalog, et as formatPublicApiReport, f as getSnapshotWorkflows, g as prepareSnapshot, h as publishPreparedSnapshot, i as applyWorkspaceMovePlan, in as explainMonorepoConfig, j as checkProjectReferences, k as releaseSnapshot, l as planToolingCapability, m as snapshotWorkflowDefaults, n as applyWorkspaceRemovalPlan, nt as formatUpgradePlan, o as applyWorkspaceArtifactPlan, on as validateConfigFile, p as resolveSnapshotWorkflowOptions, q as DocsDeploymentError, r as planWorkspaceRemoval, s as planWorkspaceArtifact, st as validateReleasePreparation, tn as loadTemplateCatalogContext, tt as upgradeMonorepo, u as validateTemplate, v as verifySnapshotRun, w as validateSnapshotSource, wt as resolveReleaseMode, x as verifyPreparedSnapshotConsumer, y as freezeSnapshotSource, z as applyOrganizationPresetAssets } from "./commands-C-Epftob.mjs";
4
- import { N as ConfigValidationError, Q as splitConfigPath, S as canonicalDirectory, _ as listToolingCapabilities, d as loadMonorepoConfig, f as loadMonorepoConfigDetails, j as version, p as resolveCommandConfig, q as withLegacyHookConfig } from "./tsconfig-gjLATvL9.mjs";
5
- import { s as resolveCommandValues } from "./scan-uLFN5vFP.mjs";
6
- import { E as checkDependencyAdmission, T as checkWorkspaceBoundaries, f as inspectInstallSecurity } from "./template-drift-rhs1O3_F.mjs";
1
+ import { Ct as message, Et as supportedLocales, J as getWorkspaceGraph, Q as whyWorkspaceDependency, St as localize, Ut as getWorkspaceData, Z as getWorkspaceImpact, a as inspectWorkspaceOwners, i as planCodeowners, jt as fs$1, n as locateWorkspace, r as applyCodeownersPlan, t as getWorkspaceTaskCatalog, vt as cliName, wt as repoctlLocale } from "./workspace-tasks-xyIJwdmH.mjs";
2
+ import { d as logger } from "./execute-0NGtp4hR.mjs";
3
+ import { $ as formatUpgradePlan, A as applyProjectReferencesPlan, At as renderReleasePullRequest, B as installGitHooks, E as releaseSnapshot, Et as validateSnapshotSource, G as planDocsDeployment, H as planInstallSecurityPreset, I as applyOrganizationPresetAssets, J as checkPublicApi, Jt as planUpgrade, K as checkPeerDependencies, L as planOrganizationPresetAssets, M as checkPackages, Mt as createAutoChangesetPlan, N as getMaintenanceWorkflow, Nt as getAutoChangesetWorkflow, O as checkProjectReferences, Ot as parsePublishSummary, P as prepareMaintenanceUpgrade, Q as upgradeMonorepo, S as createReleasePlan, T as formatNightlySummary, Tt as validateSnapshotBuildPlan, U as deployDocs, V as applyInstallSecurityPreset, W as DocsDeploymentError, X as planPublicApiUpdate, Y as applyPublicApiUpdate, Yt as applyUpgradePlan, Z as formatPublicApiReport, _ as createSnapshotBuildPlan, a as planWorkspaceMove, an as resolveTemplateCatalog, at as readReleasePreparationPolicy, b as createSnapshotFreezeRecord, c as applyToolingCapability, d as planTemplateValidation, dn as validateConfigFile, f as getSnapshotWorkflows, g as prepareSnapshot, h as publishPreparedSnapshot, i as applyWorkspaceMovePlan, in as createTemplateCatalog, it as validateReleasePreparation, j as planProjectReferences, jt as applyAutoChangeset, k as syncProjectReferences, kt as resolveReleaseMode, l as planToolingCapability, ln as explainMonorepoConfig, m as snapshotWorkflowDefaults, n as applyWorkspaceRemovalPlan, o as applyWorkspaceArtifactPlan, on as loadTemplateCatalogContext, p as resolveSnapshotWorkflowOptions, r as planWorkspaceRemoval, rn as resolveRemoteTemplateSource, s as planWorkspaceArtifact, u as validateTemplate, un as sanitizeConfigReport, v as verifySnapshotRun, w as releaseNightly, x as verifyPreparedSnapshotConsumer, y as freezeSnapshotSource, yt as releaseBootstrap, zt as initToolingTargets } from "./commands-1ApnhvJF.mjs";
4
+ import { N as ConfigValidationError, Q as splitConfigPath, S as canonicalDirectory, _ as listToolingCapabilities, d as loadMonorepoConfig, f as loadMonorepoConfigDetails, j as version, p as resolveCommandConfig, q as withLegacyHookConfig } from "./tsconfig-B32VPzfD.mjs";
5
+ import { s as resolveCommandValues } from "./scan-Diyd5MkZ.mjs";
6
+ import { E as checkDependencyAdmission, T as checkWorkspaceBoundaries, f as inspectInstallSecurity } from "./template-drift-C8gMh7d5.mjs";
7
7
  import { findWorkspaceDir } from "@pnpm/find-workspace-dir";
8
8
  import path from "pathe";
9
9
  import process from "node:process";
@@ -22,7 +22,11 @@ function registerConfigPreflight(program, cwd) {
22
22
  if (action.name() === "templates" && action.parent === program) return;
23
23
  const snapshot = action.name() === "snapshot" ? action : action.parent;
24
24
  if (snapshot?.name() === "snapshot" && snapshot.parent?.name() === "release" && snapshot.parent.parent === program) return;
25
- if (["auto-changeset", "validate-preparation"].includes(action.name()) && action.parent?.name() === "release" && action.parent.parent === program) return;
25
+ if ([
26
+ "auto-changeset",
27
+ "validate-preparation",
28
+ "bootstrap"
29
+ ].includes(action.name()) && action.parent?.name() === "release" && action.parent.parent === program) return;
26
30
  if (action.name() === "install" && action.parent?.name() === "hooks" && action.parent.parent?.name() === "tooling" && action.parent.parent.parent === program) return;
27
31
  if (action.name() === "ci" && action.parent?.name() === "release" && action.parent.parent === program && resolveReleaseMode(action.opts()) === "oidc-audit") return;
28
32
  let command = action;
@@ -53,8 +57,8 @@ function reportCliFailure(error) {
53
57
  async function handleAiPromptCreate(cwd, opts) {
54
58
  const [{ input }, { createTimestampFolderName, defaultAgenticBaseDir, generateAgenticTemplate, generateAgenticTemplates, loadAgenticTasks }, { resolveCommandConfig }] = await Promise.all([
55
59
  import("@icebreakers/monorepo-templates"),
56
- import("./commands-C-Epftob.mjs").then((n) => n.t),
57
- import("./tsconfig-gjLATvL9.mjs").then((n) => n.c)
60
+ import("./commands-1ApnhvJF.mjs").then((n) => n.t),
61
+ import("./tsconfig-B32VPzfD.mjs").then((n) => n.c)
58
62
  ]);
59
63
  const aiConfig = await resolveCommandConfig("ai", cwd);
60
64
  const resolved = resolveCommandValues("ai", aiConfig, {
@@ -243,7 +247,7 @@ function registerConfigCommands(program, cwd) {
243
247
  if (!report.valid) throw new ConfigValidationError(report.diagnostics);
244
248
  await emitConfigInspection(report, opts, cwd, report);
245
249
  } else {
246
- const { inspectMonorepoConfig } = await import("./commands-C-Epftob.mjs").then((n) => n.t);
250
+ const { inspectMonorepoConfig } = await import("./commands-1ApnhvJF.mjs").then((n) => n.t);
247
251
  await emitConfigInspection(await inspectMonorepoConfig(cwd), opts, cwd);
248
252
  }
249
253
  } catch (error) {
@@ -296,7 +300,7 @@ const output$2 = (value) => process.stdout.write(`${JSON.stringify(value, null,
296
300
  function registerCatalogCommands(deps, cwd) {
297
301
  const catalog = deps.command("catalog").description(localize("Inspect pnpm catalogs and review coordinated migrations", "巡检 pnpm catalog 并审阅联动迁移"));
298
302
  catalog.command("check").description(localize("Inspect references, usage and direct-version bypasses without writing", "只读巡检引用、使用情况和直接版本绕过")).option("--catalog <name>", localize("Catalog policy for direct declarations and migration candidates", "直接声明与迁移候选所采用的 catalog 策略"), "default").option("--json", localize("Output a versioned catalog report", "输出有版本结构的 catalog 报告")).action(async (options) => {
299
- const { checkCatalogs } = await import("./catalog-D2AINq9Q.mjs").then((n) => n.t);
303
+ const { checkCatalogs } = await import("./catalog-CXITrKhb.mjs").then((n) => n.t);
300
304
  const report = await checkCatalogs(cwd, options);
301
305
  if (options.json) output$2(report);
302
306
  else {
@@ -306,7 +310,7 @@ function registerCatalogCommands(deps, cwd) {
306
310
  if (report.summary.missing || report.summary.direct) process.exitCode = 1;
307
311
  });
308
312
  catalog.command("plan").description(localize("Preview catalog YAML and consumer manifest changes without writing", "只读预览 catalog YAML 与消费者清单的联动变更")).argument("<dependency>", localize("Dependency to migrate", "待迁移依赖")).requiredOption("--section <section>", localize("Dependency section; peer ranges remain unchanged", "依赖分区;peer 范围保留原样")).option("--catalog <name>", localize("Default or named catalog", "默认或命名 catalog"), "default").option("--group <name>", localize("Configured dependency version group", "已配置的依赖版本组"), "default").option("--to <specifier>", localize("Explicit common subrange for non-equivalent declarations", "不等价声明的明确共同子范围")).option("--dry-run", localize("Preview only (the default)", "仅预览(默认行为)")).option("--json", localize("Output a reviewed plan for catalog apply", "输出可审阅并交给 catalog apply 的计划")).action(async (dependency, options) => {
309
- const { planCatalogMigration } = await import("./catalog-D2AINq9Q.mjs").then((n) => n.t);
313
+ const { planCatalogMigration } = await import("./catalog-CXITrKhb.mjs").then((n) => n.t);
310
314
  const plan = await planCatalogMigration(cwd, {
311
315
  dependency,
312
316
  ...options
@@ -318,7 +322,7 @@ function registerCatalogCommands(deps, cwd) {
318
322
  }
319
323
  });
320
324
  catalog.command("apply").description(localize("Apply a reviewed catalog migration with conflict checks and rollback", "应用已审阅的 catalog 迁移,检查冲突并支持失败恢复")).argument("<plan>", localize("Reviewed JSON plan", "已审阅的 JSON 计划")).option("--json", localize("Output the apply result as JSON", "以 JSON 输出应用结果")).action(async (file, options) => {
321
- const { applyCatalogMigrationPlan } = await import("./catalog-D2AINq9Q.mjs").then((n) => n.t);
325
+ const { applyCatalogMigrationPlan } = await import("./catalog-CXITrKhb.mjs").then((n) => n.t);
322
326
  const result = await applyCatalogMigrationPlan(cwd, JSON.parse(await readFile(file, "utf8")));
323
327
  if (options.json) output$2(result);
324
328
  else process.stdout.write(`${result.status}: ${result.changed.join(", ")}\n${result.nextSteps.join("\n")}\n`);
@@ -345,7 +349,7 @@ function registerDepsCommands(program, cwd) {
345
349
  registerDependencyAdmission(deps, cwd);
346
350
  registerCatalogCommands(deps, cwd);
347
351
  deps.command("check").description(localize("Check dependency consistency without writing or accessing registries", "只读检查依赖版本一致性,不访问 registry")).option("--json", localize("Output the dependency report as JSON", "以 JSON 输出依赖报告")).action(async (options) => {
348
- const { checkDependencies } = await import("./deps-DI4i5rGv.mjs").then((n) => n.n);
352
+ const { checkDependencies } = await import("./deps-BbkQSTqk.mjs").then((n) => n.n);
349
353
  const report = await checkDependencies(cwd);
350
354
  if (options.json) output$1(report);
351
355
  else for (const group of report.groups) {
@@ -355,7 +359,7 @@ function registerDepsCommands(program, cwd) {
355
359
  if (report.summary.equivalent + report.summary.compatible + report.summary.conflict > 0) process.exitCode = 1;
356
360
  });
357
361
  deps.command("plan").alias("fix").description(localize("Preview an explicit dependency fix; always read-only", "预览显式依赖修复;始终只读")).argument("<dependency>", localize("Dependency name", "依赖名称")).requiredOption("--section <section>", localize("dependencies, devDependencies, peerDependencies or optionalDependencies", "依赖分区:dependencies、devDependencies、peerDependencies 或 optionalDependencies")).requiredOption("--to <specifier>", localize("Explicit target semver range or same-source npm alias", "明确的目标 semver 范围或同源 npm alias")).option("--group <name>", localize("Configured version group", "配置中的版本分组"), "default").option("--dry-run", localize("Preview only (already the default)", "仅预览(默认行为)")).option("--json", localize("Output a serializable plan for deps apply", "输出可交给 deps apply 的 JSON 计划")).action(async (dependency, options) => {
358
- const { planDependencyFix } = await import("./deps-DI4i5rGv.mjs").then((n) => n.n);
362
+ const { planDependencyFix } = await import("./deps-BbkQSTqk.mjs").then((n) => n.n);
359
363
  const plan = await planDependencyFix(cwd, {
360
364
  dependency,
361
365
  section: options.section,
@@ -370,7 +374,7 @@ function registerDepsCommands(program, cwd) {
370
374
  process.stdout.write(localize("Preview only. Save --json output, review it, then run deps apply <plan.json>.\n", "仅预览。保存并审阅 --json 输出,然后执行 deps apply <plan.json>。\n"));
371
375
  });
372
376
  deps.command("apply").description(localize("Apply a reviewed dependency plan with conflict checks and rollback", "应用已审阅的依赖计划,检查冲突并支持失败回滚")).argument("<plan>", localize("JSON plan file", "JSON 计划文件")).option("--json", localize("Output the result as JSON", "以 JSON 输出结果")).action(async (file, options) => {
373
- const { applyDependencyFixPlan } = await import("./deps-DI4i5rGv.mjs").then((n) => n.n);
377
+ const { applyDependencyFixPlan } = await import("./deps-BbkQSTqk.mjs").then((n) => n.n);
374
378
  const result = await applyDependencyFixPlan(cwd, JSON.parse(await readFile(file, "utf8")));
375
379
  if (options.json) output$1(result);
376
380
  else {
@@ -410,8 +414,8 @@ function registerDocsCommands(program, cwd) {
410
414
  function registerEnvironmentCheck(command, cwd) {
411
415
  command.command("check [tasks...]").description(localize("Check static environment references against Turbo cache declarations", "检查静态环境变量引用与 Turbo 缓存声明")).option("--json", localize("Output structured findings", "输出结构化诊断")).option("--markdown", localize("Output Markdown to stdout", "向标准输出写入 Markdown")).option("--strict", localize("Fail on warnings as well as errors", "警告也返回失败码")).option("--no-framework-inference", localize("Disable framework prefix assumptions", "不采用框架变量前缀推断")).option("--dry-run", localize("Read-only check (always enabled)", "只读检查(始终启用)")).action(async (tasks, options, action) => {
412
416
  if (options.json && options.markdown) throw new Error("--json and --markdown cannot be combined");
413
- const { checkEnvironmentCache } = await import("./workspace-tasks-bczz1Msx.mjs").then((n) => n.F);
414
- const { formatEnvironmentCache } = await import("./workspace-tasks-bczz1Msx.mjs").then((n) => n.N);
417
+ const { checkEnvironmentCache } = await import("./workspace-tasks-xyIJwdmH.mjs").then((n) => n.F);
418
+ const { formatEnvironmentCache } = await import("./workspace-tasks-xyIJwdmH.mjs").then((n) => n.N);
415
419
  const report = await checkEnvironmentCache(cwd, {
416
420
  ...tasks.length ? { tasks } : {},
417
421
  ...action.getOptionValueSource("frameworkInference") === "cli" ? { frameworkInference: options.frameworkInference } : {}
@@ -737,23 +741,23 @@ function registerEnvCommands(program, cwd) {
737
741
  const envCommand = program.command("env").alias("e").description(localize("Environment and support commands", "环境命令"));
738
742
  registerEnvironmentCheck(envCommand, cwd);
739
743
  envCommand.command("info").description(localize("Show environment information for the current repository", "输出当前仓库环境信息")).alias("i").option("--json", localize("Output JSON for scripts", "输出 JSON,方便脚本消费")).option("--markdown", localize("Output Markdown", "输出 Markdown,方便粘贴到 issue 或 PR")).option("--out <file>", localize("Write output to a file", "把当前输出写入文件")).option("--redact", localize("Redact workspace, cwd, and home paths", "脱敏 workspace/cwd/home 绝对路径后再输出")).action(async (opts) => {
740
- const { collectEnvInfo } = await import("./commands-C-Epftob.mjs").then((n) => n.t);
744
+ const { collectEnvInfo } = await import("./commands-1ApnhvJF.mjs").then((n) => n.t);
741
745
  await emitEnvInfo(await collectEnvInfo(cwd), opts, cwd);
742
746
  });
743
747
  envCommand.command("snapshot").description(localize("Create a support snapshot with environment, doctor, and check data", "输出排障快照,包含环境、doctor 和 check 计划")).alias("s").option("--json", localize("Output JSON for scripts", "输出 JSON,方便脚本消费")).option("--markdown", localize("Output Markdown", "输出 Markdown,方便粘贴到 issue 或 PR")).option("--out <file>", localize("Write output to a file", "把当前输出写入文件")).option("--redact", localize("Redact workspace, cwd, and home paths", "脱敏 workspace/cwd/home 绝对路径后再输出")).option("--strict", localize("Fail when doctor reports a failure or warning", "输出快照后,如果 doctor 有 fail 或 warn 则返回失败码")).action(async (opts) => {
744
- const { collectEnvSnapshot } = await import("./commands-C-Epftob.mjs").then((n) => n.t);
748
+ const { collectEnvSnapshot } = await import("./commands-1ApnhvJF.mjs").then((n) => n.t);
745
749
  await emitEnvSnapshot(await collectEnvSnapshot(cwd), opts, cwd);
746
750
  });
747
751
  envCommand.command("paths").description(localize("Show important repository and report paths", "输出当前仓库关键路径和报告建议位置")).alias("p").option("--json", localize("Output JSON for scripts", "输出 JSON,方便脚本消费")).option("--markdown", localize("Output Markdown", "输出 Markdown,方便粘贴到 issue 或 PR")).option("--out <file>", localize("Write output to a file", "把当前输出写入文件")).option("--redact", localize("Redact workspace, cwd, and home paths", "脱敏 workspace/cwd/home 绝对路径后再输出")).action(async (opts) => {
748
- const { collectEnvPaths } = await import("./commands-C-Epftob.mjs").then((n) => n.t);
752
+ const { collectEnvPaths } = await import("./commands-1ApnhvJF.mjs").then((n) => n.t);
749
753
  await emitEnvPaths(await collectEnvPaths(cwd), opts, cwd);
750
754
  });
751
755
  envCommand.command("support").description(localize("Create a complete support bundle", "输出完整排障包,包含环境、路径、配置、doctor 和 check 计划")).alias("b").option("--json", localize("Output JSON for scripts", "输出 JSON,方便脚本消费")).option("--markdown", localize("Output Markdown", "输出 Markdown,方便粘贴到 issue 或 PR")).option("--out <file>", localize("Write output to a file", "把当前输出写入文件")).option("--redact", localize("Redact workspace, cwd, and home paths", "脱敏 workspace/cwd/home 绝对路径后再输出")).option("--strict", localize("Fail when doctor reports a failure or warning", "输出排障包后,如果 doctor 有 fail 或 warn 则返回失败码")).action(async (opts) => {
752
- const { collectEnvSupportBundle } = await import("./commands-C-Epftob.mjs").then((n) => n.t);
756
+ const { collectEnvSupportBundle } = await import("./commands-1ApnhvJF.mjs").then((n) => n.t);
753
757
  await emitEnvSupportBundle(await collectEnvSupportBundle(cwd), opts, cwd);
754
758
  });
755
759
  envCommand.command("mirror").description(localize("Configure the VS Code binary mirror", "设置 VS Code binary mirror")).alias("m").action(async () => {
756
- const { setVscodeBinaryMirror } = await import("./commands-C-Epftob.mjs").then((n) => n.t);
760
+ const { setVscodeBinaryMirror } = await import("./commands-1ApnhvJF.mjs").then((n) => n.t);
757
761
  await setVscodeBinaryMirror(cwd);
758
762
  logger.success(localize("Environment mirror finished.", "环境镜像完成。"));
759
763
  });
@@ -763,7 +767,7 @@ function registerEnvCommands(program, cwd) {
763
767
  function registerGenerateCommand(program, cwd) {
764
768
  program.command("generate").alias("g").description(localize("Generate a component or route inside an existing package", "在已有包内生成组件或路由")).argument("<generator>", "vue-component, react-component, hono-route").argument("<name>", localize("Kebab-case component or route name", "kebab-case 组件或路由名称")).requiredOption("--package <name-or-path>", localize("Exact workspace package name or relative directory", "精确 workspace 包名或相对目录")).option("--directory <path>", localize("Package-relative source directory", "包内源文件相对目录")).option("--barrel <path>", localize("TypeScript export barrel, used with --export", "配合 --export 使用的 TypeScript 导出文件")).option("--export", localize("Add a named export to src/index.ts or --barrel", "向 src/index.ts 或 --barrel 添加具名导出")).option("--params <json>", localize("Additional typed generator parameters as JSON", "JSON 格式的类型化生成参数")).option("--dry-run", localize("Preview all generated changes without writing", "预览全部生成变更,不写入文件")).option("--json", localize("Print a JSON preview without writing", "以 JSON 输出预览,不写入文件")).action(async (generator, name, options) => {
765
769
  try {
766
- const { applyGeneratePlan, planGenerate } = await import("./workspace-tasks-bczz1Msx.mjs").then((n) => n.v);
770
+ const { applyGeneratePlan, planGenerate } = await import("./workspace-tasks-xyIJwdmH.mjs").then((n) => n.v);
767
771
  const extra = options.params ? JSON.parse(options.params) : {};
768
772
  if (!extra || typeof extra !== "object" || Array.isArray(extra)) throw new Error("--params must contain a JSON object.");
769
773
  if (Object.hasOwn(extra, "name") || options.export !== void 0 && Object.hasOwn(extra, "export")) throw new Error("Do not supply the same generator parameter through multiple inputs.");
@@ -865,7 +869,7 @@ function registerPackageCommands(program, cwd) {
865
869
  registerPackageCheckCommand(packageCommand, cwd);
866
870
  registerPublicApiCommands(packageCommand, cwd);
867
871
  packageCommand.command("create").description(localize("Create a new workspace package", "创建一个新的子包")).alias("new").argument("[name]").option("--offline", localize("Use only verified cached remote assets", "只使用通过校验的远程资产缓存")).option("--data <file>", localize("Read typed template parameters from a JSON file", "从 JSON 文件读取类型化模板参数")).option("--cache-dir <directory>", localize("Template asset cache directory", "模板资产缓存目录")).option("-t, --template <template>", localize("Use a template key without prompting", "直接使用指定模板,跳过模板选择")).option("--dry-run", localize("Preview without writing files", "预览将要创建的目录与 package 信息,不写入文件")).option("--json", localize("Output JSON; implies --dry-run", "以 JSON 输出创建预览,隐含 --dry-run")).option("--out <file>", localize("Write the preview to a file; implies --dry-run", "把创建预览写入文件,隐含 --dry-run")).action(async (inputName, opts) => {
868
- const { runCreateFlow } = await import("./create-flow-CwhV6HGt.mjs");
872
+ const { runCreateFlow } = await import("./create-flow-B2sFa_5j.mjs");
869
873
  const result = await runCreateFlow(cwd, inputName, {
870
874
  ...opts.offline !== void 0 ? { offline: opts.offline } : {},
871
875
  ...opts.cacheDir ? { cacheDir: opts.cacheDir } : {},
@@ -962,6 +966,54 @@ function registerAutoChangeset(release, cwd) {
962
966
  });
963
967
  }
964
968
  //#endregion
969
+ //#region src/cli/commands/release/bootstrap.ts
970
+ function runNumber(value, label) {
971
+ if (value === void 0) return;
972
+ const result = Number(value);
973
+ if (!/^[1-9]\d*$/.test(value) || !Number.isSafeInteger(result)) throw new Error(`${label} must be a positive safe integer`);
974
+ return result;
975
+ }
976
+ function registerBootstrap(release, cwd) {
977
+ release.command("bootstrap").description(localize("Prepare, publish or verify one npm bootstrap prerelease", "准备、发布或核验单个 npm bootstrap 预发布版本")).option("--stage <stage>", "prepare / publish / verify", "prepare").requiredOption("--package <name>", localize("Exact public workspace package", "精确指定公开 workspace 包")).requiredOption("--version <version>", localize("Explicit prerelease version", "显式指定预发布版本")).option("--tag <tag>", localize("Non-latest dist-tag", "非 latest 的 dist-tag"), "alpha").option("--dry-run", localize("Inspect without building or publishing", "只检查,不构建或发布")).option("--verify-run-id <id>", localize("Verify an existing run without publishing", "只核验既有运行,不再次发布")).option("--run-id <id>", localize("Prepared artifact run ID", "准备产物的运行编号")).option("--run-attempt <number>", localize("Prepared artifact run attempt", "准备产物的运行次数")).option("--output <directory>", localize("Safe report and artifact directory", "安全报告与产物目录")).option("--out <file>", localize("Also save the JSON report to a file", "额外保存 JSON 报告文件")).option("--json", localize("Output a versioned JSON report", "输出有版本结构的 JSON 报告")).action(async (options) => {
978
+ try {
979
+ if (![
980
+ "prepare",
981
+ "publish",
982
+ "verify"
983
+ ].includes(options.stage)) throw new Error("Bootstrap stage must be prepare, publish or verify");
984
+ const verifyRunId = runNumber(options.verifyRunId, "Verification run ID");
985
+ const runId = runNumber(options.runId, "Prepared run ID");
986
+ const runAttempt = runNumber(options.runAttempt, "Prepared run attempt");
987
+ const report = await releaseBootstrap({
988
+ cwd,
989
+ packageName: options.package,
990
+ version: options.version,
991
+ tag: options.tag,
992
+ stage: verifyRunId ? "verify" : options.stage,
993
+ ...verifyRunId ? { verifyRunId } : {},
994
+ ...runId ? { runId } : {},
995
+ ...runAttempt ? { runAttempt } : {},
996
+ ...options.output ? { outputDirectory: options.output } : {},
997
+ ...options.dryRun ? { dryRun: true } : {},
998
+ ...options.json ? { quiet: true } : {}
999
+ });
1000
+ if (options.out) {
1001
+ const reportPath = path$1.resolve(cwd, options.out);
1002
+ await mkdir(path$1.dirname(reportPath), { recursive: true });
1003
+ await writeFile(reportPath, `${JSON.stringify(report, null, 2)}\n`);
1004
+ }
1005
+ process.stdout.write(`${options.json ? JSON.stringify(report, null, 2) : `Bootstrap ${report.status}: ${options.package}@${options.version} (${options.tag})`}\n`);
1006
+ if (report.status === "failed") {
1007
+ if (!options.json && report.error) process.stderr.write(`${report.error}\n`);
1008
+ process.exitCode = 1;
1009
+ }
1010
+ } catch (error) {
1011
+ process.stderr.write(`${error instanceof Error ? error.message : String(error)}\n`);
1012
+ process.exitCode = 1;
1013
+ }
1014
+ });
1015
+ }
1016
+ //#endregion
965
1017
  //#region src/cli/commands/release/nightly.ts
966
1018
  function registerNightly(release, cwd) {
967
1019
  release.command("nightly").description(localize("Prepare or publish nightly packages from the default branch in GitHub Actions", "在 GitHub Actions 中从默认分支准备或发布 nightly 包")).option("--publish", localize("Upload verified packages using the configured nightly provider", "使用配置的 nightly 后端上传已验证的包")).option("--dry-run", localize("Only inspect the source, packages and publication state", "只检查源码、候选包和发布状态")).option("--output <directory>", localize("Artifact directory outside the checkout", "源码仓库以外的产物目录")).option("--json", localize("Output a versioned JSON report", "输出有版本结构的 JSON 报告")).action(async (options) => {
@@ -1598,20 +1650,21 @@ async function resolveReleaseOptions(cwd) {
1598
1650
  function registerReleaseCommands(program, cwd) {
1599
1651
  const releaseCommand = program.command("release").description(localize("Release and pnpm versioning commands", "发布与 pnpm versioning 工具集"));
1600
1652
  registerReleasePlan(releaseCommand, cwd);
1653
+ registerBootstrap(releaseCommand, cwd);
1601
1654
  registerSnapshot(releaseCommand, cwd);
1602
1655
  registerNightly(releaseCommand, cwd);
1603
1656
  registerNpmMirror(releaseCommand, cwd);
1604
1657
  registerReleasePreparationValidation(releaseCommand, cwd);
1605
1658
  registerAutoChangeset(releaseCommand, cwd);
1606
- releaseCommand.command("ci").description(localize("Prepare, publish, or recover versions in CI", "在 CI 中自动准备、发布和恢复版本")).option("--stage <stage>", "all / plan / verify / prepare / upload / confirm / finalize", "all").option("--mode <mode>", "auto / prepare / publish / publish-unpublished / reconcile / oidc-audit", "auto").option("--package <name>", localize("Package used by publish-unpublished mode", "publish-unpublished 使用的 package")).option("--version <version>", localize("Version used by publish-unpublished mode", "publish-unpublished 使用的版本")).option("--source-sha <sha>", localize("Recover a prepared release from the selected line history", "从所选发布线的历史提交恢复整批发布")).option("--dry-run", localize("Preview reconcile changes without updating GitHub", "只预览 reconcile 变更,不更新 GitHub")).action(async (opts) => {
1659
+ releaseCommand.command("ci").description(localize("Prepare, publish, or recover versions in CI", "在 CI 中自动准备、发布和恢复版本")).option("--stage <stage>", "all / plan / verify / prepare / upload / confirm / finalize", "all").option("--mode <mode>", "auto / prepare / publish / publish-unpublished / reconcile / oidc-audit", "auto").option("--package <name>", localize("Exact package for recovery or OIDC audit", "恢复发布或 OIDC 审计精确指定的 package")).option("--version <version>", localize("Version used by publish-unpublished mode", "publish-unpublished 使用的版本")).option("--source-sha <sha>", localize("Recover a prepared release from the selected line history", "从所选发布线的历史提交恢复整批发布")).option("--dry-run", localize("Preview reconcile changes without updating GitHub", "只预览 reconcile 变更,不更新 GitHub")).action(async (opts) => {
1607
1660
  await runReleaseAction(async () => {
1608
- const { releaseCi } = await import("./commands-C-Epftob.mjs").then((n) => n.t);
1661
+ const { releaseCi } = await import("./commands-1ApnhvJF.mjs").then((n) => n.t);
1609
1662
  const mode = resolveReleaseMode(opts);
1610
1663
  await releaseCi({
1611
1664
  ...mode === "oidc-audit" ? { cwd } : await resolveReleaseOptions(cwd),
1612
1665
  ...opts.stage ? { stage: opts.stage } : {},
1613
1666
  ...opts.mode ? { mode: opts.mode } : {},
1614
- ...opts.package ? { packageName: opts.package } : {},
1667
+ ...opts.package !== void 0 ? { packageName: opts.package } : {},
1615
1668
  ...opts.version ? { packageVersion: opts.version } : {},
1616
1669
  ...opts.sourceSha ? { sourceSha: opts.sourceSha } : {},
1617
1670
  ...opts.dryRun ? { dryRun: true } : {}
@@ -1621,7 +1674,7 @@ function registerReleaseCommands(program, cwd) {
1621
1674
  });
1622
1675
  releaseCommand.command("notes").description(localize("Manage GitHub Release notes", "维护 GitHub Release 正文")).command("repair").description(localize("Rebuild GitHub Release notes from the changelog for each release tag", "按每个发布 tag 对应的 changelog 重建 GitHub Release 正文")).option("--all", localize("Repair every recognized GitHub Release", "修复所有可识别的 GitHub Release")).option("--tag <package@version>", localize("Repair only the specified package@version", "只修复指定 package@version")).option("--dry-run", localize("Generate and summarize without updating GitHub Releases", "只生成并统计,不更新 GitHub Release")).option("--create-missing", localize("Create a missing GitHub Release after validating the published package and tag", "核验已发布 package 和 tag 后补建缺失的 GitHub Release")).action(async (opts) => {
1623
1676
  await runReleaseAction(async () => {
1624
- const { repairReleaseNotes } = await import("./commands-C-Epftob.mjs").then((n) => n.t);
1677
+ const { repairReleaseNotes } = await import("./commands-1ApnhvJF.mjs").then((n) => n.t);
1625
1678
  const result = await repairReleaseNotes({
1626
1679
  cwd,
1627
1680
  ...opts.all ? { all: true } : {},
@@ -1634,7 +1687,7 @@ function registerReleaseCommands(program, cwd) {
1634
1687
  });
1635
1688
  const stableCommand = releaseCommand.command("stable").description(localize("Run a stable release from the configured release line", "在配置的正式发布线执行发布")).action(async () => {
1636
1689
  await runReleaseAction(async () => {
1637
- const { releaseCi } = await import("./commands-C-Epftob.mjs").then((n) => n.t);
1690
+ const { releaseCi } = await import("./commands-1ApnhvJF.mjs").then((n) => n.t);
1638
1691
  await releaseCi({
1639
1692
  ...await resolveReleaseOptions(cwd),
1640
1693
  mode: "publish"
@@ -1644,7 +1697,7 @@ function registerReleaseCommands(program, cwd) {
1644
1697
  });
1645
1698
  stableCommand.command("prepare").description(localize("Consume pnpm change intents and prepare a Release PR", "消费 pnpm change intents 并准备 Release PR")).action(async () => {
1646
1699
  await runReleaseAction(async () => {
1647
- const { releaseCi } = await import("./commands-C-Epftob.mjs").then((n) => n.t);
1700
+ const { releaseCi } = await import("./commands-1ApnhvJF.mjs").then((n) => n.t);
1648
1701
  await releaseCi({
1649
1702
  ...await resolveReleaseOptions(cwd),
1650
1703
  mode: "prepare"
@@ -1654,7 +1707,7 @@ function registerReleaseCommands(program, cwd) {
1654
1707
  });
1655
1708
  stableCommand.command("publish").description(localize("Publish prepared versions from the configured release line", "发布所选发布线已经准备的包版本")).action(async () => {
1656
1709
  await runReleaseAction(async () => {
1657
- const { releaseCi } = await import("./commands-C-Epftob.mjs").then((n) => n.t);
1710
+ const { releaseCi } = await import("./commands-1ApnhvJF.mjs").then((n) => n.t);
1658
1711
  await releaseCi({
1659
1712
  ...await resolveReleaseOptions(cwd),
1660
1713
  mode: "publish"
@@ -1665,21 +1718,21 @@ function registerReleaseCommands(program, cwd) {
1665
1718
  const preCommand = releaseCommand.command("pre").description(localize("Run or manage prereleases", "执行或管理 prerelease 发布"));
1666
1719
  preCommand.command("publish").alias("run").description(localize("Publish from a configured prerelease branch", "在已配置的预发布分支发布 prerelease")).action(async () => {
1667
1720
  await runReleaseAction(async () => {
1668
- const { releaseCi } = await import("./commands-C-Epftob.mjs").then((n) => n.t);
1721
+ const { releaseCi } = await import("./commands-1ApnhvJF.mjs").then((n) => n.t);
1669
1722
  await releaseCi(await resolveReleaseOptions(cwd));
1670
1723
  logger.success(localize("Prerelease finished.", "预发布完成。"));
1671
1724
  });
1672
1725
  });
1673
1726
  preCommand.command("enter").description(localize("Enter a pnpm prerelease lane", "进入 pnpm prerelease lane")).argument("<tag>", localize("Configured pnpm prerelease lane", "已配置的 pnpm 预发布 lane")).action(async (tag) => {
1674
1727
  await runReleaseAction(async () => {
1675
- const { enterPrerelease } = await import("./commands-C-Epftob.mjs").then((n) => n.t);
1728
+ const { enterPrerelease } = await import("./commands-1ApnhvJF.mjs").then((n) => n.t);
1676
1729
  await enterPrerelease(tag, { cwd });
1677
1730
  logger.success(localize(`Entered ${tag} prerelease mode.`, `已进入 ${tag} 预发布模式。`));
1678
1731
  });
1679
1732
  });
1680
1733
  preCommand.command("exit").description(localize("Exit the pnpm prerelease lane", "退出 pnpm prerelease lane")).action(async () => {
1681
1734
  await runReleaseAction(async () => {
1682
- const { exitPrerelease } = await import("./commands-C-Epftob.mjs").then((n) => n.t);
1735
+ const { exitPrerelease } = await import("./commands-1ApnhvJF.mjs").then((n) => n.t);
1683
1736
  const target = await exitPrerelease({ cwd });
1684
1737
  logger.success(localize(`Exited prerelease mode. Stable target: ${target.branch}.`, `已退出预发布模式,正式目标分支:${target.branch}。`));
1685
1738
  });
@@ -1696,7 +1749,7 @@ const skillTargets = [
1696
1749
  ];
1697
1750
  function registerSkillsCommands(program, cwd) {
1698
1751
  program.command("skills").alias("sk").description(localize("AI skill commands", "技能工具集")).command("sync").description(localize("Synchronize the repoctl skill to global agent directories", "同步 resources/skills/repoctl 到全局目录")).alias("s").option("--codex", localize("Synchronize to ~/.codex/skills", "同步到 ~/.codex/skills")).option("--claude", localize("Synchronize to ~/.claude/skills", "同步到 ~/.claude/skills")).option("--cursor", localize("Synchronize to ~/.cursor/skills", "同步到 ~/.cursor/skills")).option("--agents", localize("Synchronize to ~/.agents/skills", "同步到 ~/.agents/skills")).option("--grok", localize("Synchronize to ~/.grok/skills", "同步到 ~/.grok/skills")).option("--all", localize("Synchronize every target", "同步全部目标")).action(async (opts) => {
1699
- const { syncSkills } = await import("./commands-C-Epftob.mjs").then((n) => n.t);
1752
+ const { syncSkills } = await import("./commands-1ApnhvJF.mjs").then((n) => n.t);
1700
1753
  const selected = /* @__PURE__ */ new Set();
1701
1754
  if (opts.all) for (const target of skillTargets) selected.add(target);
1702
1755
  else {
@@ -1732,7 +1785,7 @@ async function emitTemplateReport(value, options) {
1732
1785
  //#region src/cli/commands/template-instances/drift.ts
1733
1786
  function registerTemplateDriftCommand(templates) {
1734
1787
  templates.command("drift").description(localize("Inspect template versions and managed file drift without changing assets", "只读诊断模板版本、基线和受管文件漂移")).option("--source-dir <directory>", localize("Compare with metadata from an extracted template package", "与已解压模板包的真实版本元数据比较")).option("--remote", localize("Explicitly query the public npm latest dist-tag", "显式查询公共 npm 仓库的 latest 版本")).option("--strict", localize("Fail on active warnings, including unavailable evidence", "存在有效告警或证据不可用时失败")).option("--json", localize("Output structured JSON", "输出结构化 JSON")).option("--markdown", localize("Output a Markdown report (default)", "输出 Markdown 报告(默认)")).option("--out <file>", localize("Write only the report to this file", "仅将诊断报告写入指定文件")).action(async (options, command) => {
1735
- const { checkTemplateDrift, formatTemplateDriftReport, hasTemplateDriftIssues } = await import("./template-drift-rhs1O3_F.mjs").then((n) => n.n);
1788
+ const { checkTemplateDrift, formatTemplateDriftReport, hasTemplateDriftIssues } = await import("./template-drift-C8gMh7d5.mjs").then((n) => n.n);
1736
1789
  const merged = {
1737
1790
  ...command.optsWithGlobals(),
1738
1791
  ...options
@@ -1751,7 +1804,7 @@ function registerTemplateDriftCommand(templates) {
1751
1804
  //#region src/cli/commands/template-instances/upgrade.ts
1752
1805
  function registerTemplateUpgradeCommands(templates) {
1753
1806
  templates.command("upgrade").description(localize("Preview a selected template instance upgrade, preserving business changes", "预览所选模板实例的增量升级,保留业务修改")).argument("<instance>", localize("Registered instance ID or target path", "已登记实例 ID 或目标路径")).requiredOption("--source-version <version>", localize("Exact target template package version", "目标模板包的精确版本")).option("--source-dir <directory>", localize("Read an extracted target template package", "只读使用已解压的目标模板包")).option("--exclude <paths...>", localize("Keep these relative files or directories unmanaged in future upgrades", "将这些相对文件或目录持久标记为不受管")).option("--apply", localize("Apply a conflict-free instance upgrade", "应用无冲突的实例升级")).option("--json", localize("Output structured JSON", "输出结构化 JSON")).option("--out <file>", localize("Write the report to a file", "将报告写入文件")).action(async (instance, options, command) => {
1754
- const { planTemplateUpgrade, applyTemplateUpgradePlan } = await import("./workspace-tasks-bczz1Msx.mjs").then((n) => n.d);
1807
+ const { planTemplateUpgrade, applyTemplateUpgradePlan } = await import("./workspace-tasks-xyIJwdmH.mjs").then((n) => n.d);
1755
1808
  const plan = await planTemplateUpgrade({
1756
1809
  cwd: await templateWorkspaceRoot(),
1757
1810
  instance,
@@ -1765,7 +1818,7 @@ function registerTemplateUpgradeCommands(templates) {
1765
1818
  });
1766
1819
  });
1767
1820
  templates.command("recover-upgrade").description(localize("Inspect or restore an interrupted instance upgrade", "检查或恢复中断的实例升级")).argument("<instance>", localize("Registered instance ID or target path", "已登记实例 ID 或目标路径")).option("--apply", localize("Restore the recorded instance and changed files", "恢复记录中的实例信息及受影响文件")).option("--json", localize("Output structured JSON", "输出结构化 JSON")).option("--out <file>", localize("Write the report to a file", "将报告写入文件")).action(async (instance, options, command) => {
1768
- const { recoverTemplateUpgrade } = await import("./workspace-tasks-bczz1Msx.mjs").then((n) => n.d);
1821
+ const { recoverTemplateUpgrade } = await import("./workspace-tasks-xyIJwdmH.mjs").then((n) => n.d);
1769
1822
  await emitTemplateReport(await recoverTemplateUpgrade(await templateWorkspaceRoot(), instance, options.apply), {
1770
1823
  ...command.optsWithGlobals(),
1771
1824
  ...options
@@ -1778,7 +1831,7 @@ function registerTemplateInstanceCommands(templates) {
1778
1831
  registerTemplateDriftCommand(templates);
1779
1832
  registerTemplateUpgradeCommands(templates);
1780
1833
  templates.command("instances").description(localize("Inspect registered template instances without changing files", "只读查询已登记模板实例")).argument("[target]", localize("Instance ID or workspace-relative target", "实例 ID 或相对工作区路径")).option("--json", localize("Output structured JSON", "输出结构化 JSON")).option("--out <file>", localize("Write the report to a file", "将报告写入文件")).action(async (target, options, command) => {
1781
- const { listTemplateInstances } = await import("./workspace-tasks-bczz1Msx.mjs").then((n) => n.d);
1834
+ const { listTemplateInstances } = await import("./workspace-tasks-xyIJwdmH.mjs").then((n) => n.d);
1782
1835
  const instances = await listTemplateInstances(await templateWorkspaceRoot());
1783
1836
  const selected = target ? instances.filter((item) => item.instance.id === target || item.instance.target === target) : instances;
1784
1837
  if (target && !selected.length) throw new Error(`Unknown template instance: ${target}`);
@@ -1791,7 +1844,7 @@ function registerTemplateInstanceCommands(templates) {
1791
1844
  });
1792
1845
  });
1793
1846
  templates.command("link").description(localize("Preview an explicit historical template association; --apply writes metadata only", "预览历史模板关联;--apply 仅写登记信息")).argument("<target>", localize("Existing workspace-relative project path", "存量项目相对工作区路径")).requiredOption("--template <key>", localize("Stable template key", "稳定模板标识")).requiredOption("--source-version <version>", localize("Exact historical template package version", "模板包的精确历史版本")).option("--source-dir <directory>", localize("Read an extracted historical template package without executing it", "只读使用已解压的历史模板包,不执行其脚本")).option("--profile <profile>", localize("workspace-copy-v1 or repo-new-v1", "workspace-copy-v1 或 repo-new-v1"), "repo-new-v1").option("--package-name <name>", localize("Historical generated package name", "历史生成包名")).option("--rename-json", localize("Historical output used package.mock.json", "历史生成时使用了 package.mock.json")).option("--unverified", localize("Explicitly allow metadata-only association when the source is unavailable", "来源不可用时显式允许未验证关联")).option("--apply", localize("Apply the reviewed association without changing project files", "应用关联,不改写项目文件")).option("--json", localize("Output the plan as JSON", "以 JSON 输出计划")).option("--out <file>", localize("Write the plan or result to a file", "将计划或结果写入文件")).action(async (target, options, command) => {
1794
- const { applyTemplateLinkPlan, planTemplateLink } = await import("./workspace-tasks-bczz1Msx.mjs").then((n) => n.d);
1847
+ const { applyTemplateLinkPlan, planTemplateLink } = await import("./workspace-tasks-xyIJwdmH.mjs").then((n) => n.d);
1795
1848
  const plan = await planTemplateLink({
1796
1849
  cwd: await templateWorkspaceRoot(),
1797
1850
  target,
@@ -1811,14 +1864,14 @@ function registerTemplateInstanceCommands(templates) {
1811
1864
  });
1812
1865
  });
1813
1866
  templates.command("relocate").description(localize("Associate a missing instance with an identical destination, without moving files", "显式关联已移动且可验证的实例,不移动业务文件")).argument("<instance>", localize("Registered instance ID or old path", "已登记实例 ID 或旧路径")).argument("<target>", localize("New workspace-relative path", "新相对工作区路径")).option("--apply", localize("Update the registered path", "更新登记路径")).option("--json", localize("Output JSON", "输出 JSON")).option("--out <file>", localize("Write the report to a file", "将报告写入文件")).action(async (instance, target, options, command) => {
1814
- const { relocateTemplateInstance } = await import("./workspace-tasks-bczz1Msx.mjs").then((n) => n.d);
1867
+ const { relocateTemplateInstance } = await import("./workspace-tasks-xyIJwdmH.mjs").then((n) => n.d);
1815
1868
  await emitTemplateReport(await relocateTemplateInstance(await templateWorkspaceRoot(), instance, target, options.apply), {
1816
1869
  ...command.optsWithGlobals(),
1817
1870
  ...options
1818
1871
  });
1819
1872
  });
1820
1873
  templates.command("rebuild-baseline").description(localize("Reconstruct a retained baseline into a new isolated directory", "在新的隔离目录中重建留存基线")).argument("<instance>", localize("Instance ID or target", "实例 ID 或目标路径")).requiredOption("--destination <directory>", localize("A directory that does not exist", "尚不存在的目录")).option("--original", localize("Reconstruct the original template before repoctl transformations", "重建 repoctl 处理前的原始模板")).action(async (instance, options) => {
1821
- const { rebuildTemplateInstanceBaseline } = await import("./workspace-tasks-bczz1Msx.mjs").then((n) => n.d);
1874
+ const { rebuildTemplateInstanceBaseline } = await import("./workspace-tasks-xyIJwdmH.mjs").then((n) => n.d);
1822
1875
  await emitTemplateReport({
1823
1876
  instance: (await rebuildTemplateInstanceBaseline(await templateWorkspaceRoot(), instance, path.resolve(options.destination), options.original ? "original" : "rendered")).id,
1824
1877
  destination: path.resolve(options.destination)
@@ -2023,7 +2076,7 @@ function registerTemplatesCommands(program) {
2023
2076
  const templates = program.command("templates").alias("tpl").description(localize("List built-in and configured templates", "列出内置与自定义模板")).argument("[key]", localize("Show details for a template key", "查看指定模板详情")).option("-c, --category <category>", localize("Filter by library, app, service, docs, or tool", "按模板分类过滤:library / app / service / docs / tool")).option("--check", localize("Check template configuration, metadata and directories", "检查模板配置、元数据、目录和临时文件")).option("--json", localize("Output JSON for scripts", "输出 JSON,方便脚本消费")).option("--markdown", localize("Output Markdown for documentation", "输出 Markdown,方便同步文档")).option("--out <file>", localize("Write output to a file", "把当前输出写入文件")).action(async (key, opts) => {
2024
2077
  const { isTemplateCategory, suggestTemplateKey, templateCategories } = await import("@icebreakers/monorepo-templates");
2025
2078
  if (opts.check) {
2026
- const { checkTemplates } = await import("./commands-C-Epftob.mjs").then((n) => n.t);
2079
+ const { checkTemplates } = await import("./commands-1ApnhvJF.mjs").then((n) => n.t);
2027
2080
  const report = await checkTemplates();
2028
2081
  if (opts.json) await emitTemplateOutput(JSON.stringify(report, null, 2), opts);
2029
2082
  else await emitTemplateOutput(formatTemplateHealthReport(report, !opts.out), opts);
@@ -2147,7 +2200,7 @@ function registerCapabilityCommands(toolingCommand, cwd) {
2147
2200
  function registerDevContainerCommand(command, cwd) {
2148
2201
  command.command("devcontainer").description(localize("Preview a pnpm Dev Container preset, or apply a reviewed plan", "预览 pnpm Dev Container 预设,或应用已审查的计划")).option("--node-version <version>", localize("Choose an exact Node version allowed by engines.node", "选择 engines.node 允许的精确 Node 版本")).option("--apply <plan>", localize("Apply a saved JSON plan without starting containers", "应用已保存的 JSON 计划,不启动容器")).option("--dry-run", localize("Preview only (the default)", "只读预览(默认行为)")).option("--json", localize("Output JSON with generated files and diffs", "输出包含生成文件与差异的 JSON")).option("--out <file>", localize("Save the JSON preview to a new file", "将 JSON 预览保存到一个新文件")).action(async (_options, current) => {
2149
2202
  const options = current.optsWithGlobals();
2150
- const { applyDevContainerPlan, planDevContainer } = await import("./commands-C-Epftob.mjs").then((n) => n.t);
2203
+ const { applyDevContainerPlan, planDevContainer } = await import("./commands-1ApnhvJF.mjs").then((n) => n.t);
2151
2204
  if (options.apply) {
2152
2205
  if (options.nodeVersion || options.dryRun || options.out) throw new Error("--apply cannot be combined with preview or selection options.");
2153
2206
  const filename = path.resolve(cwd, options.apply);
@@ -2210,7 +2263,7 @@ function registerToolingCommands(program, cwd) {
2210
2263
  registerHooksCommands(toolingCommand, cwd);
2211
2264
  toolingCommand.command("init").description(localize(`Generate tooling configuration (${initToolingTargets.join(", ")})`, `生成 tooling 配置(可选值:${initToolingTargets.join(", ")})`)).alias("i").argument("[tooling...]").option("-a, --all", localize("Generate every tooling configuration", "生成全部 tooling 配置")).option("-f, --force", localize("Overwrite existing tooling configuration files", "覆盖已存在的 tooling 配置文件")).action(async (tooling = [], opts) => {
2212
2265
  const normalizedTooling = normalizeToolingTargets(tooling);
2213
- const { initTooling } = await import("./commands-C-Epftob.mjs").then((n) => n.t);
2266
+ const { initTooling } = await import("./commands-1ApnhvJF.mjs").then((n) => n.t);
2214
2267
  await initTooling(cwd, {
2215
2268
  ...normalizedTooling ? { targets: normalizedTooling } : {},
2216
2269
  ...opts.all !== void 0 ? { all: opts.all } : {},
@@ -2234,8 +2287,8 @@ function registerCacheAnalysis(check, cwd) {
2234
2287
  const markdown = options.markdown || parent["markdown"] === true;
2235
2288
  if (json && markdown) throw new Error("--json and --markdown cannot be combined");
2236
2289
  const own = command.opts();
2237
- const { analyzeTurboRuns } = await import("./workspace-tasks-bczz1Msx.mjs").then((n) => n.G);
2238
- const { formatTurboAnalysis } = await import("./format-1YqyTR6b.mjs");
2290
+ const { analyzeTurboRuns } = await import("./workspace-tasks-xyIJwdmH.mjs").then((n) => n.G);
2291
+ const { formatTurboAnalysis } = await import("./format-BcU-hzT_.mjs");
2239
2292
  const result = await analyzeTurboRuns(path.resolve(cwd, current), {
2240
2293
  ...previous !== void 0 ? { previous: path.resolve(cwd, previous) } : {},
2241
2294
  ...own.slowest !== void 0 ? { slowest: Number(own.slowest) } : {}
@@ -2263,7 +2316,7 @@ function registerKnipCheck(check, cwd) {
2263
2316
  };
2264
2317
  if (opts.saveBaseline && (opts.baseline || opts.newOnly || opts.dryRun || opts.recommendConfig)) throw new Error("--save-baseline cannot be combined with --baseline, --new-only, --dry-run or --recommend-config.");
2265
2318
  if (opts.recommendConfig && (opts.config || opts.baseline || opts.newOnly || opts.timeout || opts.production || opts.strict)) throw new Error("--recommend-config only provides native configuration suggestions; it cannot run or compare an analysis.");
2266
- const { getKnipConfigurationSuggestions, planKnipCheck, runKnipCheck, saveKnipBaseline } = await import("./workspace-tasks-bczz1Msx.mjs").then((n) => n.L);
2319
+ const { getKnipConfigurationSuggestions, planKnipCheck, runKnipCheck, saveKnipBaseline } = await import("./workspace-tasks-xyIJwdmH.mjs").then((n) => n.L);
2267
2320
  if (opts.recommendConfig) {
2268
2321
  process.stdout.write(`${JSON.stringify(await getKnipConfigurationSuggestions(cwd), null, 2)}\n`);
2269
2322
  return;
@@ -2418,7 +2471,7 @@ function registerCheckCommand(program, cwd) {
2418
2471
  ...opts.globalInput ? { globalInputs: opts.globalInput } : {}
2419
2472
  };
2420
2473
  if (opts.matrix) {
2421
- const { resolveAffectedCheckMatrix } = await import("./commands-C-Epftob.mjs").then((n) => n.t);
2474
+ const { resolveAffectedCheckMatrix } = await import("./commands-1ApnhvJF.mjs").then((n) => n.t);
2422
2475
  const matrix = await resolveAffectedCheckMatrix({
2423
2476
  ...options,
2424
2477
  ...opts.shards !== void 0 ? { shards: Number(opts.shards) } : {}
@@ -2432,19 +2485,19 @@ function registerCheckCommand(program, cwd) {
2432
2485
  if (opts.dryRun || opts.json || opts.markdown || opts.out) throw new Error("--report cannot be combined with preview options: --dry-run, --json, --markdown, --out");
2433
2486
  const format = opts.reportFormat ?? "json";
2434
2487
  if (format !== "json" && format !== "markdown") throw new Error("--report-format must be json or markdown");
2435
- const { runCheckExecution } = await import("./execute-GGmuyJ7i.mjs");
2488
+ const { runCheckExecution } = await import("./execute-BdnLU2-t.mjs");
2436
2489
  await runCheckExecution(options, opts.report, format, opts.redact);
2437
2490
  return;
2438
2491
  }
2439
- const { resolveRecommendedCheckPlan, runRecommendedCheck } = await import("./commands-C-Epftob.mjs").then((n) => n.t);
2492
+ const { resolveRecommendedCheckPlan, runRecommendedCheck } = await import("./commands-1ApnhvJF.mjs").then((n) => n.t);
2440
2493
  if (opts.dryRun || opts.json || opts.markdown || opts.out) {
2441
2494
  if (opts.affected) {
2442
- const { resolveAffectedCheckPlan } = await import("./commands-C-Epftob.mjs").then((n) => n.t);
2495
+ const { resolveAffectedCheckPlan } = await import("./commands-1ApnhvJF.mjs").then((n) => n.t);
2443
2496
  await emitCheckPlan(await resolveAffectedCheckPlan(options), opts, cwd);
2444
2497
  return;
2445
2498
  }
2446
2499
  if (opts.full) {
2447
- const { resolveFullWorkspaceCheckPlan } = await import("./commands-C-Epftob.mjs").then((n) => n.t);
2500
+ const { resolveFullWorkspaceCheckPlan } = await import("./commands-1ApnhvJF.mjs").then((n) => n.t);
2448
2501
  await emitCheckPlan(await resolveFullWorkspaceCheckPlan(cwd), opts, cwd);
2449
2502
  return;
2450
2503
  }
@@ -2452,7 +2505,7 @@ function registerCheckCommand(program, cwd) {
2452
2505
  return;
2453
2506
  }
2454
2507
  if (opts.affected) {
2455
- const { runCheckExecution } = await import("./execute-GGmuyJ7i.mjs");
2508
+ const { runCheckExecution } = await import("./execute-BdnLU2-t.mjs");
2456
2509
  await runCheckExecution(options);
2457
2510
  return;
2458
2511
  }
@@ -2681,7 +2734,7 @@ async function emitDoctorReport(report, opts, cwd) {
2681
2734
  }
2682
2735
  function registerDoctorCommand(program, cwd) {
2683
2736
  registerInstallSecurityCommand(program.command("doctor").description(localize("Diagnose whether the current repository is ready to use", "诊断当前仓库是否适合直接开始使用")).option("--json", localize("Output JSON for CI or scripts", "输出 JSON 报告,方便 CI 或脚本消费")).option("--markdown", localize("Output Markdown for an issue or pull request", "输出 Markdown 报告,方便粘贴到 issue 或 PR")).option("--out <file>", localize("Write the diagnostic report to a file", "把诊断报告写入文件")).option("--redact", localize("Redact workspace, cwd, and home paths", "脱敏 workspace/cwd/home 绝对路径后再输出")).option("--strict", localize("Treat warnings as failures", "把 warning 也视为失败,适合 CI 门禁")).option("--rules <ids>", localize("Select exact check IDs, separated by commas", "选择精确检查 ID,以逗号分隔")).option("--list-rules", localize("List all available check IDs", "列出全部可用检查 ID")).option("--fix", localize("Preview safe fixes without writing", "预览安全修复,不写入文件")).option("--apply <plan>", localize("Apply a reviewed doctor fix JSON plan", "应用已审核的 doctor 修复 JSON 计划")).action(async (opts) => {
2684
- const commands = await import("./commands-C-Epftob.mjs").then((n) => n.t);
2737
+ const commands = await import("./commands-1ApnhvJF.mjs").then((n) => n.t);
2685
2738
  if (opts.fix && opts.apply || opts.apply && opts.rules !== void 0 || opts.listRules && (opts.fix || opts.apply || opts.rules !== void 0)) throw new Error("Use one of --list-rules, --fix, or --apply; --apply cannot change the reviewed rule selection.");
2686
2739
  if (opts.listRules || opts.fix || opts.apply) {
2687
2740
  if (opts.markdown || opts.redact) throw new Error("--markdown and --redact apply to diagnostic reports, not rule lists or executable plans.");
@@ -2750,7 +2803,7 @@ function registerUpgradeCommand(parent, cwd, alias) {
2750
2803
  //#region src/cli/commands/top-level.ts
2751
2804
  function registerTopLevelCommands(program, cwd) {
2752
2805
  program.command("init").description(localize("Initialize the current workspace with recommended configuration", "初始化当前 workspace,并生成推荐配置")).option("--preset <preset>", localize("Initialization preset: minimal or standard", "初始化预设:minimal / standard")).option("-f, --force", localize("Overwrite existing tooling configuration files", "覆盖已存在的 tooling 配置文件")).option("--overwrite", localize("Overwrite existing managed files", "覆盖受管的已存在文件")).option("-y, --yes", localize("Use defaults without prompting; suitable for CI", "使用默认值跳过所有交互,适合 CI")).action(async (opts) => {
2753
- const { init } = await import("./commands-C-Epftob.mjs").then((n) => n.t);
2806
+ const { init } = await import("./commands-1ApnhvJF.mjs").then((n) => n.t);
2754
2807
  const config = await loadMonorepoConfig(cwd);
2755
2808
  const { preset } = resolveCommandValues("init", config.commands?.init, { preset: opts.preset }, { entry: "cli" }).values;
2756
2809
  await init(cwd, {
@@ -2763,7 +2816,7 @@ function registerTopLevelCommands(program, cwd) {
2763
2816
  logger.info(localize("Next: run `pnpm install` and `pnpm build`.", "下一步:运行 `pnpm install` 和 `pnpm build`。"));
2764
2817
  });
2765
2818
  program.command("new").description(localize("Create a new package or application", "创建新的 package / app")).argument("[name]").option("--offline", localize("Use only verified cached remote assets", "只使用通过校验的远程资产缓存")).option("--data <file>", localize("Read typed template parameters from a JSON file", "从 JSON 文件读取类型化模板参数")).option("--cache-dir <directory>", localize("Template asset cache directory", "模板资产缓存目录")).option("-t, --template <template>", localize("Use a template key without prompting", "直接使用指定模板,跳过模板选择")).option("--dry-run", localize("Preview directories and package metadata without writing", "预览将要创建的目录与 package 信息,不写入文件")).option("--json", localize("Output the creation preview as JSON; implies --dry-run", "以 JSON 输出创建预览,隐含 --dry-run")).option("--out <file>", localize("Write the creation preview to a file; implies --dry-run", "把创建预览写入文件,隐含 --dry-run")).action(async (inputName, opts) => {
2766
- const { runCreateFlow } = await import("./create-flow-CwhV6HGt.mjs");
2819
+ const { runCreateFlow } = await import("./create-flow-B2sFa_5j.mjs");
2767
2820
  const result = await runCreateFlow(cwd, inputName, {
2768
2821
  ...opts.offline !== void 0 ? { offline: opts.offline } : {},
2769
2822
  ...opts.cacheDir ? { cacheDir: opts.cacheDir } : {},
@@ -2786,22 +2839,22 @@ function registerTopLevelCommands(program, cwd) {
2786
2839
  function registerVerifyCommands(program, cwd) {
2787
2840
  const verifyCommand = program.command("verify").alias("v").description(localize("Local verification commands", "本地校验工具集"));
2788
2841
  verifyCommand.command("pre-push").description(localize("Run build, test, and tsd checks for pushed changes", "按推送变更范围执行 build/test/tsd 校验")).alias("push").action(async () => {
2789
- const { verifyPrePush } = await import("./commands-C-Epftob.mjs").then((n) => n.t);
2842
+ const { verifyPrePush } = await import("./commands-1ApnhvJF.mjs").then((n) => n.t);
2790
2843
  await verifyPrePush({ cwd });
2791
2844
  });
2792
2845
  verifyCommand.command("pre-commit").description(localize("Run Lefthook verification", "执行 Lefthook 校验")).alias("commit").action(async () => {
2793
- const { verifyPreCommit } = await import("./commands-C-Epftob.mjs").then((n) => n.t);
2846
+ const { verifyPreCommit } = await import("./commands-1ApnhvJF.mjs").then((n) => n.t);
2794
2847
  await verifyPreCommit({ cwd });
2795
2848
  });
2796
2849
  verifyCommand.command("commit-msg").description(localize("Run commitlint verification", "执行 commitlint 校验")).alias("msg").argument("<edit-file>").action(async (editFile) => {
2797
- const { verifyCommitMsg } = await import("./commands-C-Epftob.mjs").then((n) => n.t);
2850
+ const { verifyCommitMsg } = await import("./commands-1ApnhvJF.mjs").then((n) => n.t);
2798
2851
  await verifyCommitMsg({
2799
2852
  cwd,
2800
2853
  editFile
2801
2854
  });
2802
2855
  });
2803
2856
  verifyCommand.command("staged-typecheck").description(localize("Run typecheck in workspaces containing staged files", "按暂存文件所在 workspace 执行 typecheck")).alias("tc").argument("[files...]").action(async (files = []) => {
2804
- const { verifyStagedTypecheck } = await import("./commands-C-Epftob.mjs").then((n) => n.t);
2857
+ const { verifyStagedTypecheck } = await import("./commands-1ApnhvJF.mjs").then((n) => n.t);
2805
2858
  verifyStagedTypecheck(files.length ? files : void 0, { cwd });
2806
2859
  });
2807
2860
  }
@@ -3165,12 +3218,12 @@ function registerWorkspaceCommands(program, cwd) {
3165
3218
  registerWorkspaceRemoval(workspaceCommand, cwd);
3166
3219
  registerWorkspaceMove(workspaceCommand, cwd);
3167
3220
  workspaceCommand.command("init").description(localize("Initialize workspace metadata and repository files", "初始化工作区元信息(README、package.json、pnpm intent、issue template)")).alias("i").action(async () => {
3168
- const { initMetadata } = await import("./commands-C-Epftob.mjs").then((n) => n.t);
3221
+ const { initMetadata } = await import("./commands-1ApnhvJF.mjs").then((n) => n.t);
3169
3222
  await initMetadata(cwd);
3170
3223
  logger.success(localize("Workspace initialization finished.", "Workspace 初始化完成。"));
3171
3224
  });
3172
3225
  workspaceCommand.command("list").description(localize("List workspace packages", "列出 workspace 包")).alias("ls").option("--json", localize("Output JSON", "输出 JSON")).option("--markdown", localize("Output Markdown", "输出 Markdown,方便粘贴到 issue 或 PR")).option("--redact", localize("Redact workspace, cwd, and home paths", "脱敏 workspace/cwd/home 绝对路径后再输出")).option("--include-private", localize("Include private packages", "包含 private 包")).option("--include-root", localize("Include the workspace root package", "包含 workspace 根包")).option("-p, --pattern <glob>", localize("Append a workspace glob; repeatable", "追加自定义 workspace glob,可重复"), collectValues).option("--out <file>", localize("Write the package list to a file", "把当前列表输出写入文件")).action(async (opts) => {
3173
- const { getWorkspacePackageSummaries } = await import("./workspace-tasks-bczz1Msx.mjs").then((n) => n.Kt);
3226
+ const { getWorkspacePackageSummaries } = await import("./workspace-tasks-xyIJwdmH.mjs").then((n) => n.Kt);
3174
3227
  await emitWorkspaceList(await getWorkspacePackageSummaries(cwd, {
3175
3228
  ignorePrivatePackage: !opts.includePrivate,
3176
3229
  ignoreRootPackage: !opts.includeRoot,
@@ -3178,7 +3231,7 @@ function registerWorkspaceCommands(program, cwd) {
3178
3231
  }), opts);
3179
3232
  });
3180
3233
  workspaceCommand.command("clean").description(localize("Remove selected workspace packages", "清除选中的包")).alias("rm").option("-y, --yes", localize("Select all eligible workspace packages without prompting", "跳过交互并选择所有符合条件的工作区包")).option("--dry-run", localize("Preview directory deletions and metadata changes without writing", "预览目录删除和元数据变更,不写入文件")).option("--include-private", localize("Include private packages", "包含 private 包")).option("--pinned-version <version>", localize("Override the repoctl version written to the root package", "覆盖写入的 repoctl 版本")).action(async (opts) => {
3181
- const { cleanProjects } = await import("./commands-C-Epftob.mjs").then((n) => n.t);
3234
+ const { cleanProjects } = await import("./commands-1ApnhvJF.mjs").then((n) => n.t);
3182
3235
  await cleanProjects(cwd, normalizeCleanOptions(opts));
3183
3236
  });
3184
3237
  }