@icebreakers/monorepo 5.8.0 → 5.8.1

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-Cx3VuGue.mjs → baseline-Cnw2O2JV.mjs} +1 -1
  2. package/dist/{catalog-BKW8udNq.mjs → catalog-DWrBLClC.mjs} +3 -3
  3. package/dist/cli.mjs +62 -62
  4. package/dist/{commands-C1KOgvKa.mjs → commands-CayOzFY-.mjs} +56 -18
  5. package/dist/{config-ITi4Uywg.mjs → config-BfvlEAis.mjs} +3 -3
  6. package/dist/{create-flow-C_ar-XrN.mjs → create-flow-CmbddTMr.mjs} +3 -3
  7. package/dist/{deps-_M128Hqi.mjs → deps-C-9vium9.mjs} +3 -3
  8. package/dist/{execute-DTrS4Jqx.mjs → execute-DT-DjHFK.mjs} +2 -2
  9. package/dist/{execute-CNGJsU9v.mjs → execute-NrC2ym6M.mjs} +2 -2
  10. package/dist/{format-Dxe0grKF.mjs → format-4H_J7wGG.mjs} +1 -1
  11. package/dist/{index-CoCTFWZJ.d.mts → index-D61zjikU.d.mts} +2 -2
  12. package/dist/index.d.mts +1 -1
  13. package/dist/index.mjs +9 -9
  14. package/dist/{inputs-DkBp5uc7.mjs → inputs-hoTJICnb.mjs} +1 -1
  15. package/dist/{npm-BttWVZSI.mjs → npm-CjOsZ7tH.mjs} +1 -1
  16. package/dist/{plan-DkRsq9Oj.mjs → plan-BA_10vfL.mjs} +1 -1
  17. package/dist/{run-BHsnON3k.mjs → run-ohOkzTLN.mjs} +4 -4
  18. package/dist/{save-DTVXKc6k.mjs → save-HSOp4zHC.mjs} +3 -3
  19. package/dist/{scan-uUmUqFA6.mjs → scan-gJt1WqW4.mjs} +2 -3
  20. package/dist/{template-drift-Bhvs_DPa.mjs → template-drift-D8CpRENe.mjs} +3 -3
  21. package/dist/tooling-entry.d.mts +1 -1
  22. package/dist/tooling-entry.mjs +2 -2
  23. package/dist/{transaction-ut5-TLoD.mjs → transaction-CkjiAvNJ.mjs} +2 -2
  24. package/dist/{tsconfig-DtgBJ7Vi.mjs → tsconfig-01vm_d3r.mjs} +2 -2
  25. package/dist/{vitest-DkD49zO4.mjs → vitest-WPpMJqzw.mjs} +10 -8
  26. package/dist/{workspace-tasks-PcOR82ko.mjs → workspace-tasks-BPSq4jjn.mjs} +17 -7
  27. package/package.json +3 -3
@@ -1,4 +1,4 @@
1
- import { at as record, rt as hash } from "./workspace-tasks-PcOR82ko.mjs";
1
+ import { at as record, rt as hash } from "./workspace-tasks-BPSq4jjn.mjs";
2
2
  import path from "pathe";
3
3
  import { readFile, stat } from "node:fs/promises";
4
4
  import { isDeepStrictEqual } from "node:util";
@@ -1,7 +1,7 @@
1
1
  import { t as __exportAll } from "./rolldown-runtime-8H4AJuhK.mjs";
2
- import { Ht as clearWorkspaceCache, at as record, rt as hash, st as updateManifest } from "./workspace-tasks-PcOR82ko.mjs";
3
- import { a as dependencySections, i as rangesOverlap, n as equivalentRanges, r as parseSpecifier, t as scanDependencies } from "./scan-uUmUqFA6.mjs";
4
- import { i as dependencyNextSteps, n as inspectDependencyPlanInputs, o as dependencyReport, r as validateDependencyPlan, t as writeDependencyTransaction } from "./transaction-ut5-TLoD.mjs";
2
+ import { Ht as clearWorkspaceCache, at as record, rt as hash, st as updateManifest } from "./workspace-tasks-BPSq4jjn.mjs";
3
+ import { a as dependencySections, i as rangesOverlap, n as equivalentRanges, r as parseSpecifier, t as scanDependencies } from "./scan-gJt1WqW4.mjs";
4
+ import { i as dependencyNextSteps, n as inspectDependencyPlanInputs, o as dependencyReport, r as validateDependencyPlan, t as writeDependencyTransaction } from "./transaction-CkjiAvNJ.mjs";
5
5
  import { satisfies, subset, valid, validRange } from "semver";
6
6
  import YAML, { isAlias, isMap } from "yaml";
7
7
  import { isDeepStrictEqual } from "node:util";
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, 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-PcOR82ko.mjs";
2
- import { f as logger } from "./execute-CNGJsU9v.mjs";
3
- import { At as resolveTemplateCatalog, C as applyOrganizationPresetAssets, D as applyInstallSecurityPreset, F as upgradeMonorepo, Ft as sanitizeConfigReport, I as formatUpgradePlan, It as validateConfigFile, M as applyPublicApiUpdate, N as planPublicApiUpdate, O as planInstallSecurityPreset, Ot as resolveRemoteTemplateSource, P as formatPublicApiReport, Pt as explainMonorepoConfig, _ as applyProjectReferencesPlan, a as planWorkspaceMove, b as getMaintenanceWorkflow, bt as applyUpgradePlan, c as applyToolingCapability, d as planTemplateValidation, f as releaseSnapshot, g as syncProjectReferences, h as checkProjectReferences, i as applyWorkspaceMovePlan, j as checkPublicApi, jt as loadTemplateCatalogContext, k as checkPeerDependencies, kt as createTemplateCatalog, l as planToolingCapability, lt as initToolingTargets, m as createReleasePlan, n as applyWorkspaceRemovalPlan, nt as resolveReleaseMode, o as applyWorkspaceArtifactPlan, r as planWorkspaceRemoval, rt as renderReleasePullRequest, s as planWorkspaceArtifact, u as validateTemplate, v as planProjectReferences, vt as planUpgrade, w as planOrganizationPresetAssets, x as prepareMaintenanceUpgrade, y as checkPackages } from "./commands-C1KOgvKa.mjs";
4
- import { S as canonicalDirectory, W as splitConfigPath, _ as listToolingCapabilities, d as loadMonorepoConfig, f as loadMonorepoConfigDetails, j as ConfigValidationError, k as version, p as resolveCommandConfig } from "./tsconfig-DtgBJ7Vi.mjs";
5
- import { s as resolveCommandValues } from "./scan-uUmUqFA6.mjs";
6
- import { S as checkDependencyAdmission, f as inspectInstallSecurity, x as checkWorkspaceBoundaries } from "./template-drift-Bhvs_DPa.mjs";
1
+ import { Ct as message, Et as supportedLocales, J as getWorkspaceGraph, Q as whyWorkspaceDependency, St as localize, 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-BPSq4jjn.mjs";
2
+ import { f as logger } from "./execute-NrC2ym6M.mjs";
3
+ import { At as resolveTemplateCatalog, C as applyOrganizationPresetAssets, D as applyInstallSecurityPreset, F as upgradeMonorepo, Ft as sanitizeConfigReport, I as formatUpgradePlan, It as validateConfigFile, M as applyPublicApiUpdate, N as planPublicApiUpdate, O as planInstallSecurityPreset, Ot as resolveRemoteTemplateSource, P as formatPublicApiReport, Pt as explainMonorepoConfig, _ as applyProjectReferencesPlan, a as planWorkspaceMove, b as getMaintenanceWorkflow, bt as applyUpgradePlan, c as applyToolingCapability, d as planTemplateValidation, f as releaseSnapshot, g as syncProjectReferences, h as checkProjectReferences, i as applyWorkspaceMovePlan, j as checkPublicApi, jt as loadTemplateCatalogContext, k as checkPeerDependencies, kt as createTemplateCatalog, l as planToolingCapability, lt as initToolingTargets, m as createReleasePlan, n as applyWorkspaceRemovalPlan, nt as resolveReleaseMode, o as applyWorkspaceArtifactPlan, r as planWorkspaceRemoval, rt as renderReleasePullRequest, s as planWorkspaceArtifact, u as validateTemplate, v as planProjectReferences, vt as planUpgrade, w as planOrganizationPresetAssets, x as prepareMaintenanceUpgrade, y as checkPackages } from "./commands-CayOzFY-.mjs";
4
+ import { S as canonicalDirectory, W as splitConfigPath, _ as listToolingCapabilities, d as loadMonorepoConfig, f as loadMonorepoConfigDetails, j as ConfigValidationError, k as version, p as resolveCommandConfig } from "./tsconfig-01vm_d3r.mjs";
5
+ import { s as resolveCommandValues } from "./scan-gJt1WqW4.mjs";
6
+ import { S as checkDependencyAdmission, f as inspectInstallSecurity, x as checkWorkspaceBoundaries } from "./template-drift-D8CpRENe.mjs";
7
7
  import { findWorkspaceDir } from "@pnpm/find-workspace-dir";
8
8
  import path from "pathe";
9
9
  import process from "node:process";
@@ -44,8 +44,8 @@ function reportCliFailure(error) {
44
44
  async function handleAiPromptCreate(cwd, opts) {
45
45
  const [{ input }, { createTimestampFolderName, defaultAgenticBaseDir, generateAgenticTemplate, generateAgenticTemplates, loadAgenticTasks }, { resolveCommandConfig }] = await Promise.all([
46
46
  import("@icebreakers/monorepo-templates"),
47
- import("./commands-C1KOgvKa.mjs").then((n) => n.t),
48
- import("./tsconfig-DtgBJ7Vi.mjs").then((n) => n.c)
47
+ import("./commands-CayOzFY-.mjs").then((n) => n.t),
48
+ import("./tsconfig-01vm_d3r.mjs").then((n) => n.c)
49
49
  ]);
50
50
  const aiConfig = await resolveCommandConfig("ai", cwd);
51
51
  const resolved = resolveCommandValues("ai", aiConfig, {
@@ -234,7 +234,7 @@ function registerConfigCommands(program, cwd) {
234
234
  if (!report.valid) throw new ConfigValidationError(report.diagnostics);
235
235
  await emitConfigInspection(report, opts, cwd, report);
236
236
  } else {
237
- const { inspectMonorepoConfig } = await import("./commands-C1KOgvKa.mjs").then((n) => n.t);
237
+ const { inspectMonorepoConfig } = await import("./commands-CayOzFY-.mjs").then((n) => n.t);
238
238
  await emitConfigInspection(await inspectMonorepoConfig(cwd), opts, cwd);
239
239
  }
240
240
  } catch (error) {
@@ -287,7 +287,7 @@ const output$2 = (value) => process.stdout.write(`${JSON.stringify(value, null,
287
287
  function registerCatalogCommands(deps, cwd) {
288
288
  const catalog = deps.command("catalog").description(localize("Inspect pnpm catalogs and review coordinated migrations", "巡检 pnpm catalog 并审阅联动迁移"));
289
289
  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) => {
290
- const { checkCatalogs } = await import("./catalog-BKW8udNq.mjs").then((n) => n.t);
290
+ const { checkCatalogs } = await import("./catalog-DWrBLClC.mjs").then((n) => n.t);
291
291
  const report = await checkCatalogs(cwd, options);
292
292
  if (options.json) output$2(report);
293
293
  else {
@@ -297,7 +297,7 @@ function registerCatalogCommands(deps, cwd) {
297
297
  if (report.summary.missing || report.summary.direct) process.exitCode = 1;
298
298
  });
299
299
  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) => {
300
- const { planCatalogMigration } = await import("./catalog-BKW8udNq.mjs").then((n) => n.t);
300
+ const { planCatalogMigration } = await import("./catalog-DWrBLClC.mjs").then((n) => n.t);
301
301
  const plan = await planCatalogMigration(cwd, {
302
302
  dependency,
303
303
  ...options
@@ -309,7 +309,7 @@ function registerCatalogCommands(deps, cwd) {
309
309
  }
310
310
  });
311
311
  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) => {
312
- const { applyCatalogMigrationPlan } = await import("./catalog-BKW8udNq.mjs").then((n) => n.t);
312
+ const { applyCatalogMigrationPlan } = await import("./catalog-DWrBLClC.mjs").then((n) => n.t);
313
313
  const result = await applyCatalogMigrationPlan(cwd, JSON.parse(await readFile(file, "utf8")));
314
314
  if (options.json) output$2(result);
315
315
  else process.stdout.write(`${result.status}: ${result.changed.join(", ")}\n${result.nextSteps.join("\n")}\n`);
@@ -336,7 +336,7 @@ function registerDepsCommands(program, cwd) {
336
336
  registerDependencyAdmission(deps, cwd);
337
337
  registerCatalogCommands(deps, cwd);
338
338
  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) => {
339
- const { checkDependencies } = await import("./deps-_M128Hqi.mjs").then((n) => n.n);
339
+ const { checkDependencies } = await import("./deps-C-9vium9.mjs").then((n) => n.n);
340
340
  const report = await checkDependencies(cwd);
341
341
  if (options.json) output$1(report);
342
342
  else for (const group of report.groups) {
@@ -346,7 +346,7 @@ function registerDepsCommands(program, cwd) {
346
346
  if (report.summary.equivalent + report.summary.compatible + report.summary.conflict > 0) process.exitCode = 1;
347
347
  });
348
348
  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) => {
349
- const { planDependencyFix } = await import("./deps-_M128Hqi.mjs").then((n) => n.n);
349
+ const { planDependencyFix } = await import("./deps-C-9vium9.mjs").then((n) => n.n);
350
350
  const plan = await planDependencyFix(cwd, {
351
351
  dependency,
352
352
  section: options.section,
@@ -361,7 +361,7 @@ function registerDepsCommands(program, cwd) {
361
361
  process.stdout.write(localize("Preview only. Save --json output, review it, then run deps apply <plan.json>.\n", "仅预览。保存并审阅 --json 输出,然后执行 deps apply <plan.json>。\n"));
362
362
  });
363
363
  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) => {
364
- const { applyDependencyFixPlan } = await import("./deps-_M128Hqi.mjs").then((n) => n.n);
364
+ const { applyDependencyFixPlan } = await import("./deps-C-9vium9.mjs").then((n) => n.n);
365
365
  const result = await applyDependencyFixPlan(cwd, JSON.parse(await readFile(file, "utf8")));
366
366
  if (options.json) output$1(result);
367
367
  else {
@@ -375,8 +375,8 @@ function registerDepsCommands(program, cwd) {
375
375
  function registerEnvironmentCheck(command, cwd) {
376
376
  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) => {
377
377
  if (options.json && options.markdown) throw new Error("--json and --markdown cannot be combined");
378
- const { checkEnvironmentCache } = await import("./workspace-tasks-PcOR82ko.mjs").then((n) => n.F);
379
- const { formatEnvironmentCache } = await import("./workspace-tasks-PcOR82ko.mjs").then((n) => n.N);
378
+ const { checkEnvironmentCache } = await import("./workspace-tasks-BPSq4jjn.mjs").then((n) => n.F);
379
+ const { formatEnvironmentCache } = await import("./workspace-tasks-BPSq4jjn.mjs").then((n) => n.N);
380
380
  const report = await checkEnvironmentCache(cwd, {
381
381
  ...tasks.length ? { tasks } : {},
382
382
  ...action.getOptionValueSource("frameworkInference") === "cli" ? { frameworkInference: options.frameworkInference } : {}
@@ -702,23 +702,23 @@ function registerEnvCommands(program, cwd) {
702
702
  const envCommand = program.command("env").alias("e").description(localize("Environment and support commands", "环境命令"));
703
703
  registerEnvironmentCheck(envCommand, cwd);
704
704
  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) => {
705
- const { collectEnvInfo } = await import("./commands-C1KOgvKa.mjs").then((n) => n.t);
705
+ const { collectEnvInfo } = await import("./commands-CayOzFY-.mjs").then((n) => n.t);
706
706
  await emitEnvInfo(await collectEnvInfo(cwd), opts, cwd);
707
707
  });
708
708
  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) => {
709
- const { collectEnvSnapshot } = await import("./commands-C1KOgvKa.mjs").then((n) => n.t);
709
+ const { collectEnvSnapshot } = await import("./commands-CayOzFY-.mjs").then((n) => n.t);
710
710
  await emitEnvSnapshot(await collectEnvSnapshot(cwd), opts, cwd);
711
711
  });
712
712
  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) => {
713
- const { collectEnvPaths } = await import("./commands-C1KOgvKa.mjs").then((n) => n.t);
713
+ const { collectEnvPaths } = await import("./commands-CayOzFY-.mjs").then((n) => n.t);
714
714
  await emitEnvPaths(await collectEnvPaths(cwd), opts, cwd);
715
715
  });
716
716
  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) => {
717
- const { collectEnvSupportBundle } = await import("./commands-C1KOgvKa.mjs").then((n) => n.t);
717
+ const { collectEnvSupportBundle } = await import("./commands-CayOzFY-.mjs").then((n) => n.t);
718
718
  await emitEnvSupportBundle(await collectEnvSupportBundle(cwd), opts, cwd);
719
719
  });
720
720
  envCommand.command("mirror").description(localize("Configure the VS Code binary mirror", "设置 VS Code binary mirror")).alias("m").action(async () => {
721
- const { setVscodeBinaryMirror } = await import("./commands-C1KOgvKa.mjs").then((n) => n.t);
721
+ const { setVscodeBinaryMirror } = await import("./commands-CayOzFY-.mjs").then((n) => n.t);
722
722
  await setVscodeBinaryMirror(cwd);
723
723
  logger.success(localize("Environment mirror finished.", "环境镜像完成。"));
724
724
  });
@@ -728,7 +728,7 @@ function registerEnvCommands(program, cwd) {
728
728
  function registerGenerateCommand(program, cwd) {
729
729
  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) => {
730
730
  try {
731
- const { applyGeneratePlan, planGenerate } = await import("./workspace-tasks-PcOR82ko.mjs").then((n) => n.v);
731
+ const { applyGeneratePlan, planGenerate } = await import("./workspace-tasks-BPSq4jjn.mjs").then((n) => n.v);
732
732
  const extra = options.params ? JSON.parse(options.params) : {};
733
733
  if (!extra || typeof extra !== "object" || Array.isArray(extra)) throw new Error("--params must contain a JSON object.");
734
734
  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.");
@@ -830,7 +830,7 @@ function registerPackageCommands(program, cwd) {
830
830
  registerPackageCheckCommand(packageCommand, cwd);
831
831
  registerPublicApiCommands(packageCommand, cwd);
832
832
  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) => {
833
- const { runCreateFlow } = await import("./create-flow-C_ar-XrN.mjs");
833
+ const { runCreateFlow } = await import("./create-flow-CmbddTMr.mjs");
834
834
  const result = await runCreateFlow(cwd, inputName, {
835
835
  ...opts.offline !== void 0 ? { offline: opts.offline } : {},
836
836
  ...opts.cacheDir ? { cacheDir: opts.cacheDir } : {},
@@ -983,7 +983,7 @@ function registerReleaseCommands(program, cwd) {
983
983
  registerSnapshot(releaseCommand, cwd);
984
984
  releaseCommand.command("ci").description(localize("Prepare, publish, or recover versions in CI", "在 CI 中自动准备、发布和恢复版本")).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) => {
985
985
  await runReleaseAction(async () => {
986
- const { releaseCi } = await import("./commands-C1KOgvKa.mjs").then((n) => n.t);
986
+ const { releaseCi } = await import("./commands-CayOzFY-.mjs").then((n) => n.t);
987
987
  const mode = resolveReleaseMode(opts);
988
988
  await releaseCi({
989
989
  ...mode === "oidc-audit" ? { cwd } : await resolveReleaseOptions(cwd),
@@ -998,7 +998,7 @@ function registerReleaseCommands(program, cwd) {
998
998
  });
999
999
  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) => {
1000
1000
  await runReleaseAction(async () => {
1001
- const { repairReleaseNotes } = await import("./commands-C1KOgvKa.mjs").then((n) => n.t);
1001
+ const { repairReleaseNotes } = await import("./commands-CayOzFY-.mjs").then((n) => n.t);
1002
1002
  const result = await repairReleaseNotes({
1003
1003
  cwd,
1004
1004
  ...opts.all ? { all: true } : {},
@@ -1011,7 +1011,7 @@ function registerReleaseCommands(program, cwd) {
1011
1011
  });
1012
1012
  const stableCommand = releaseCommand.command("stable").description(localize("Run a stable release from the configured release line", "在配置的正式发布线执行发布")).action(async () => {
1013
1013
  await runReleaseAction(async () => {
1014
- const { releaseCi } = await import("./commands-C1KOgvKa.mjs").then((n) => n.t);
1014
+ const { releaseCi } = await import("./commands-CayOzFY-.mjs").then((n) => n.t);
1015
1015
  await releaseCi({
1016
1016
  ...await resolveReleaseOptions(cwd),
1017
1017
  mode: "publish"
@@ -1021,7 +1021,7 @@ function registerReleaseCommands(program, cwd) {
1021
1021
  });
1022
1022
  stableCommand.command("prepare").description(localize("Consume pnpm change intents and prepare a Release PR", "消费 pnpm change intents 并准备 Release PR")).action(async () => {
1023
1023
  await runReleaseAction(async () => {
1024
- const { releaseCi } = await import("./commands-C1KOgvKa.mjs").then((n) => n.t);
1024
+ const { releaseCi } = await import("./commands-CayOzFY-.mjs").then((n) => n.t);
1025
1025
  await releaseCi({
1026
1026
  ...await resolveReleaseOptions(cwd),
1027
1027
  mode: "prepare"
@@ -1031,7 +1031,7 @@ function registerReleaseCommands(program, cwd) {
1031
1031
  });
1032
1032
  stableCommand.command("publish").description(localize("Publish prepared versions from the configured release line", "发布所选发布线已经准备的包版本")).action(async () => {
1033
1033
  await runReleaseAction(async () => {
1034
- const { releaseCi } = await import("./commands-C1KOgvKa.mjs").then((n) => n.t);
1034
+ const { releaseCi } = await import("./commands-CayOzFY-.mjs").then((n) => n.t);
1035
1035
  await releaseCi({
1036
1036
  ...await resolveReleaseOptions(cwd),
1037
1037
  mode: "publish"
@@ -1042,21 +1042,21 @@ function registerReleaseCommands(program, cwd) {
1042
1042
  const preCommand = releaseCommand.command("pre").description(localize("Run or manage prereleases", "执行或管理 prerelease 发布"));
1043
1043
  preCommand.command("publish").alias("run").description(localize("Publish from a configured prerelease branch", "在已配置的预发布分支发布 prerelease")).action(async () => {
1044
1044
  await runReleaseAction(async () => {
1045
- const { releaseCi } = await import("./commands-C1KOgvKa.mjs").then((n) => n.t);
1045
+ const { releaseCi } = await import("./commands-CayOzFY-.mjs").then((n) => n.t);
1046
1046
  await releaseCi(await resolveReleaseOptions(cwd));
1047
1047
  logger.success(localize("Prerelease finished.", "预发布完成。"));
1048
1048
  });
1049
1049
  });
1050
1050
  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) => {
1051
1051
  await runReleaseAction(async () => {
1052
- const { enterPrerelease } = await import("./commands-C1KOgvKa.mjs").then((n) => n.t);
1052
+ const { enterPrerelease } = await import("./commands-CayOzFY-.mjs").then((n) => n.t);
1053
1053
  await enterPrerelease(tag, { cwd });
1054
1054
  logger.success(localize(`Entered ${tag} prerelease mode.`, `已进入 ${tag} 预发布模式。`));
1055
1055
  });
1056
1056
  });
1057
1057
  preCommand.command("exit").description(localize("Exit the pnpm prerelease lane", "退出 pnpm prerelease lane")).action(async () => {
1058
1058
  await runReleaseAction(async () => {
1059
- const { exitPrerelease } = await import("./commands-C1KOgvKa.mjs").then((n) => n.t);
1059
+ const { exitPrerelease } = await import("./commands-CayOzFY-.mjs").then((n) => n.t);
1060
1060
  const target = await exitPrerelease({ cwd });
1061
1061
  logger.success(localize(`Exited prerelease mode. Stable target: ${target.branch}.`, `已退出预发布模式,正式目标分支:${target.branch}。`));
1062
1062
  });
@@ -1073,7 +1073,7 @@ const skillTargets = [
1073
1073
  ];
1074
1074
  function registerSkillsCommands(program, cwd) {
1075
1075
  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) => {
1076
- const { syncSkills } = await import("./commands-C1KOgvKa.mjs").then((n) => n.t);
1076
+ const { syncSkills } = await import("./commands-CayOzFY-.mjs").then((n) => n.t);
1077
1077
  const selected = /* @__PURE__ */ new Set();
1078
1078
  if (opts.all) for (const target of skillTargets) selected.add(target);
1079
1079
  else {
@@ -1109,7 +1109,7 @@ async function emitTemplateReport(value, options) {
1109
1109
  //#region src/cli/commands/template-instances/drift.ts
1110
1110
  function registerTemplateDriftCommand(templates) {
1111
1111
  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) => {
1112
- const { checkTemplateDrift, formatTemplateDriftReport, hasTemplateDriftIssues } = await import("./template-drift-Bhvs_DPa.mjs").then((n) => n.n);
1112
+ const { checkTemplateDrift, formatTemplateDriftReport, hasTemplateDriftIssues } = await import("./template-drift-D8CpRENe.mjs").then((n) => n.n);
1113
1113
  const merged = {
1114
1114
  ...command.optsWithGlobals(),
1115
1115
  ...options
@@ -1128,7 +1128,7 @@ function registerTemplateDriftCommand(templates) {
1128
1128
  //#region src/cli/commands/template-instances/upgrade.ts
1129
1129
  function registerTemplateUpgradeCommands(templates) {
1130
1130
  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) => {
1131
- const { planTemplateUpgrade, applyTemplateUpgradePlan } = await import("./workspace-tasks-PcOR82ko.mjs").then((n) => n.d);
1131
+ const { planTemplateUpgrade, applyTemplateUpgradePlan } = await import("./workspace-tasks-BPSq4jjn.mjs").then((n) => n.d);
1132
1132
  const plan = await planTemplateUpgrade({
1133
1133
  cwd: await templateWorkspaceRoot(),
1134
1134
  instance,
@@ -1142,7 +1142,7 @@ function registerTemplateUpgradeCommands(templates) {
1142
1142
  });
1143
1143
  });
1144
1144
  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) => {
1145
- const { recoverTemplateUpgrade } = await import("./workspace-tasks-PcOR82ko.mjs").then((n) => n.d);
1145
+ const { recoverTemplateUpgrade } = await import("./workspace-tasks-BPSq4jjn.mjs").then((n) => n.d);
1146
1146
  await emitTemplateReport(await recoverTemplateUpgrade(await templateWorkspaceRoot(), instance, options.apply), {
1147
1147
  ...command.optsWithGlobals(),
1148
1148
  ...options
@@ -1155,7 +1155,7 @@ function registerTemplateInstanceCommands(templates) {
1155
1155
  registerTemplateDriftCommand(templates);
1156
1156
  registerTemplateUpgradeCommands(templates);
1157
1157
  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) => {
1158
- const { listTemplateInstances } = await import("./workspace-tasks-PcOR82ko.mjs").then((n) => n.d);
1158
+ const { listTemplateInstances } = await import("./workspace-tasks-BPSq4jjn.mjs").then((n) => n.d);
1159
1159
  const instances = await listTemplateInstances(await templateWorkspaceRoot());
1160
1160
  const selected = target ? instances.filter((item) => item.instance.id === target || item.instance.target === target) : instances;
1161
1161
  if (target && !selected.length) throw new Error(`Unknown template instance: ${target}`);
@@ -1168,7 +1168,7 @@ function registerTemplateInstanceCommands(templates) {
1168
1168
  });
1169
1169
  });
1170
1170
  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) => {
1171
- const { applyTemplateLinkPlan, planTemplateLink } = await import("./workspace-tasks-PcOR82ko.mjs").then((n) => n.d);
1171
+ const { applyTemplateLinkPlan, planTemplateLink } = await import("./workspace-tasks-BPSq4jjn.mjs").then((n) => n.d);
1172
1172
  const plan = await planTemplateLink({
1173
1173
  cwd: await templateWorkspaceRoot(),
1174
1174
  target,
@@ -1188,14 +1188,14 @@ function registerTemplateInstanceCommands(templates) {
1188
1188
  });
1189
1189
  });
1190
1190
  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) => {
1191
- const { relocateTemplateInstance } = await import("./workspace-tasks-PcOR82ko.mjs").then((n) => n.d);
1191
+ const { relocateTemplateInstance } = await import("./workspace-tasks-BPSq4jjn.mjs").then((n) => n.d);
1192
1192
  await emitTemplateReport(await relocateTemplateInstance(await templateWorkspaceRoot(), instance, target, options.apply), {
1193
1193
  ...command.optsWithGlobals(),
1194
1194
  ...options
1195
1195
  });
1196
1196
  });
1197
1197
  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) => {
1198
- const { rebuildTemplateInstanceBaseline } = await import("./workspace-tasks-PcOR82ko.mjs").then((n) => n.d);
1198
+ const { rebuildTemplateInstanceBaseline } = await import("./workspace-tasks-BPSq4jjn.mjs").then((n) => n.d);
1199
1199
  await emitTemplateReport({
1200
1200
  instance: (await rebuildTemplateInstanceBaseline(await templateWorkspaceRoot(), instance, path.resolve(options.destination), options.original ? "original" : "rendered")).id,
1201
1201
  destination: path.resolve(options.destination)
@@ -1400,7 +1400,7 @@ function registerTemplatesCommands(program) {
1400
1400
  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) => {
1401
1401
  const { isTemplateCategory, suggestTemplateKey, templateCategories } = await import("@icebreakers/monorepo-templates");
1402
1402
  if (opts.check) {
1403
- const { checkTemplates } = await import("./commands-C1KOgvKa.mjs").then((n) => n.t);
1403
+ const { checkTemplates } = await import("./commands-CayOzFY-.mjs").then((n) => n.t);
1404
1404
  const report = await checkTemplates();
1405
1405
  if (opts.json) await emitTemplateOutput(JSON.stringify(report, null, 2), opts);
1406
1406
  else await emitTemplateOutput(formatTemplateHealthReport(report, !opts.out), opts);
@@ -1524,7 +1524,7 @@ function registerCapabilityCommands(toolingCommand, cwd) {
1524
1524
  function registerDevContainerCommand(command, cwd) {
1525
1525
  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) => {
1526
1526
  const options = current.optsWithGlobals();
1527
- const { applyDevContainerPlan, planDevContainer } = await import("./commands-C1KOgvKa.mjs").then((n) => n.t);
1527
+ const { applyDevContainerPlan, planDevContainer } = await import("./commands-CayOzFY-.mjs").then((n) => n.t);
1528
1528
  if (options.apply) {
1529
1529
  if (options.nodeVersion || options.dryRun || options.out) throw new Error("--apply cannot be combined with preview or selection options.");
1530
1530
  const filename = path.resolve(cwd, options.apply);
@@ -1576,7 +1576,7 @@ function registerToolingCommands(program, cwd) {
1576
1576
  registerDevContainerCommand(toolingCommand, cwd);
1577
1577
  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) => {
1578
1578
  const normalizedTooling = normalizeToolingTargets(tooling);
1579
- const { initTooling } = await import("./commands-C1KOgvKa.mjs").then((n) => n.t);
1579
+ const { initTooling } = await import("./commands-CayOzFY-.mjs").then((n) => n.t);
1580
1580
  await initTooling(cwd, {
1581
1581
  ...normalizedTooling ? { targets: normalizedTooling } : {},
1582
1582
  ...opts.all !== void 0 ? { all: opts.all } : {},
@@ -1600,8 +1600,8 @@ function registerCacheAnalysis(check, cwd) {
1600
1600
  const markdown = options.markdown || parent["markdown"] === true;
1601
1601
  if (json && markdown) throw new Error("--json and --markdown cannot be combined");
1602
1602
  const own = command.opts();
1603
- const { analyzeTurboRuns } = await import("./workspace-tasks-PcOR82ko.mjs").then((n) => n.G);
1604
- const { formatTurboAnalysis } = await import("./format-Dxe0grKF.mjs");
1603
+ const { analyzeTurboRuns } = await import("./workspace-tasks-BPSq4jjn.mjs").then((n) => n.G);
1604
+ const { formatTurboAnalysis } = await import("./format-4H_J7wGG.mjs");
1605
1605
  const result = await analyzeTurboRuns(path.resolve(cwd, current), {
1606
1606
  ...previous !== void 0 ? { previous: path.resolve(cwd, previous) } : {},
1607
1607
  ...own.slowest !== void 0 ? { slowest: Number(own.slowest) } : {}
@@ -1629,7 +1629,7 @@ function registerKnipCheck(check, cwd) {
1629
1629
  };
1630
1630
  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.");
1631
1631
  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.");
1632
- const { getKnipConfigurationSuggestions, planKnipCheck, runKnipCheck, saveKnipBaseline } = await import("./workspace-tasks-PcOR82ko.mjs").then((n) => n.L);
1632
+ const { getKnipConfigurationSuggestions, planKnipCheck, runKnipCheck, saveKnipBaseline } = await import("./workspace-tasks-BPSq4jjn.mjs").then((n) => n.L);
1633
1633
  if (opts.recommendConfig) {
1634
1634
  process.stdout.write(`${JSON.stringify(await getKnipConfigurationSuggestions(cwd), null, 2)}\n`);
1635
1635
  return;
@@ -1784,7 +1784,7 @@ function registerCheckCommand(program, cwd) {
1784
1784
  ...opts.globalInput ? { globalInputs: opts.globalInput } : {}
1785
1785
  };
1786
1786
  if (opts.matrix) {
1787
- const { resolveAffectedCheckMatrix } = await import("./commands-C1KOgvKa.mjs").then((n) => n.t);
1787
+ const { resolveAffectedCheckMatrix } = await import("./commands-CayOzFY-.mjs").then((n) => n.t);
1788
1788
  const matrix = await resolveAffectedCheckMatrix({
1789
1789
  ...options,
1790
1790
  ...opts.shards !== void 0 ? { shards: Number(opts.shards) } : {}
@@ -1798,19 +1798,19 @@ function registerCheckCommand(program, cwd) {
1798
1798
  if (opts.dryRun || opts.json || opts.markdown || opts.out) throw new Error("--report cannot be combined with preview options: --dry-run, --json, --markdown, --out");
1799
1799
  const format = opts.reportFormat ?? "json";
1800
1800
  if (format !== "json" && format !== "markdown") throw new Error("--report-format must be json or markdown");
1801
- const { runCheckExecution } = await import("./execute-DTrS4Jqx.mjs");
1801
+ const { runCheckExecution } = await import("./execute-DT-DjHFK.mjs");
1802
1802
  await runCheckExecution(options, opts.report, format, opts.redact);
1803
1803
  return;
1804
1804
  }
1805
- const { resolveRecommendedCheckPlan, runRecommendedCheck } = await import("./commands-C1KOgvKa.mjs").then((n) => n.t);
1805
+ const { resolveRecommendedCheckPlan, runRecommendedCheck } = await import("./commands-CayOzFY-.mjs").then((n) => n.t);
1806
1806
  if (opts.dryRun || opts.json || opts.markdown || opts.out) {
1807
1807
  if (opts.affected) {
1808
- const { resolveAffectedCheckPlan } = await import("./commands-C1KOgvKa.mjs").then((n) => n.t);
1808
+ const { resolveAffectedCheckPlan } = await import("./commands-CayOzFY-.mjs").then((n) => n.t);
1809
1809
  await emitCheckPlan(await resolveAffectedCheckPlan(options), opts, cwd);
1810
1810
  return;
1811
1811
  }
1812
1812
  if (opts.full) {
1813
- const { resolveFullWorkspaceCheckPlan } = await import("./commands-C1KOgvKa.mjs").then((n) => n.t);
1813
+ const { resolveFullWorkspaceCheckPlan } = await import("./commands-CayOzFY-.mjs").then((n) => n.t);
1814
1814
  await emitCheckPlan(await resolveFullWorkspaceCheckPlan(cwd), opts, cwd);
1815
1815
  return;
1816
1816
  }
@@ -1818,7 +1818,7 @@ function registerCheckCommand(program, cwd) {
1818
1818
  return;
1819
1819
  }
1820
1820
  if (opts.affected) {
1821
- const { runCheckExecution } = await import("./execute-DTrS4Jqx.mjs");
1821
+ const { runCheckExecution } = await import("./execute-DT-DjHFK.mjs");
1822
1822
  await runCheckExecution(options);
1823
1823
  return;
1824
1824
  }
@@ -1984,7 +1984,7 @@ async function emitDoctorReport(report, opts, cwd) {
1984
1984
  }
1985
1985
  function registerDoctorCommand(program, cwd) {
1986
1986
  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) => {
1987
- const commands = await import("./commands-C1KOgvKa.mjs").then((n) => n.t);
1987
+ const commands = await import("./commands-CayOzFY-.mjs").then((n) => n.t);
1988
1988
  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.");
1989
1989
  if (opts.listRules || opts.fix || opts.apply) {
1990
1990
  if (opts.markdown || opts.redact) throw new Error("--markdown and --redact apply to diagnostic reports, not rule lists or executable plans.");
@@ -2053,7 +2053,7 @@ function registerUpgradeCommand(parent, cwd, alias) {
2053
2053
  //#region src/cli/commands/top-level.ts
2054
2054
  function registerTopLevelCommands(program, cwd) {
2055
2055
  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) => {
2056
- const { init } = await import("./commands-C1KOgvKa.mjs").then((n) => n.t);
2056
+ const { init } = await import("./commands-CayOzFY-.mjs").then((n) => n.t);
2057
2057
  const config = await loadMonorepoConfig(cwd);
2058
2058
  const { preset } = resolveCommandValues("init", config.commands?.init, { preset: opts.preset }, { entry: "cli" }).values;
2059
2059
  await init(cwd, {
@@ -2066,7 +2066,7 @@ function registerTopLevelCommands(program, cwd) {
2066
2066
  logger.info(localize("Next: run `pnpm install` and `pnpm build`.", "下一步:运行 `pnpm install` 和 `pnpm build`。"));
2067
2067
  });
2068
2068
  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) => {
2069
- const { runCreateFlow } = await import("./create-flow-C_ar-XrN.mjs");
2069
+ const { runCreateFlow } = await import("./create-flow-CmbddTMr.mjs");
2070
2070
  const result = await runCreateFlow(cwd, inputName, {
2071
2071
  ...opts.offline !== void 0 ? { offline: opts.offline } : {},
2072
2072
  ...opts.cacheDir ? { cacheDir: opts.cacheDir } : {},
@@ -2089,22 +2089,22 @@ function registerTopLevelCommands(program, cwd) {
2089
2089
  function registerVerifyCommands(program, cwd) {
2090
2090
  const verifyCommand = program.command("verify").alias("v").description(localize("Local verification commands", "本地校验工具集"));
2091
2091
  verifyCommand.command("pre-push").description(localize("Run build, test, and tsd checks for pushed changes", "按推送变更范围执行 build/test/tsd 校验")).alias("push").action(async () => {
2092
- const { verifyPrePush } = await import("./commands-C1KOgvKa.mjs").then((n) => n.t);
2092
+ const { verifyPrePush } = await import("./commands-CayOzFY-.mjs").then((n) => n.t);
2093
2093
  await verifyPrePush({ cwd });
2094
2094
  });
2095
2095
  verifyCommand.command("pre-commit").description(localize("Run lint-staged verification", "执行 lint-staged 校验")).alias("commit").action(async () => {
2096
- const { verifyPreCommit } = await import("./commands-C1KOgvKa.mjs").then((n) => n.t);
2096
+ const { verifyPreCommit } = await import("./commands-CayOzFY-.mjs").then((n) => n.t);
2097
2097
  await verifyPreCommit({ cwd });
2098
2098
  });
2099
2099
  verifyCommand.command("commit-msg").description(localize("Run commitlint verification", "执行 commitlint 校验")).alias("msg").argument("<edit-file>").action(async (editFile) => {
2100
- const { verifyCommitMsg } = await import("./commands-C1KOgvKa.mjs").then((n) => n.t);
2100
+ const { verifyCommitMsg } = await import("./commands-CayOzFY-.mjs").then((n) => n.t);
2101
2101
  await verifyCommitMsg({
2102
2102
  cwd,
2103
2103
  editFile
2104
2104
  });
2105
2105
  });
2106
2106
  verifyCommand.command("staged-typecheck").description(localize("Run typecheck in workspaces containing staged files", "按暂存文件所在 workspace 执行 typecheck")).alias("tc").argument("[files...]").action(async (files = []) => {
2107
- const { verifyStagedTypecheck } = await import("./commands-C1KOgvKa.mjs").then((n) => n.t);
2107
+ const { verifyStagedTypecheck } = await import("./commands-CayOzFY-.mjs").then((n) => n.t);
2108
2108
  verifyStagedTypecheck(files, { cwd });
2109
2109
  });
2110
2110
  }
@@ -2468,12 +2468,12 @@ function registerWorkspaceCommands(program, cwd) {
2468
2468
  registerWorkspaceRemoval(workspaceCommand, cwd);
2469
2469
  registerWorkspaceMove(workspaceCommand, cwd);
2470
2470
  workspaceCommand.command("init").description(localize("Initialize workspace metadata and repository files", "初始化工作区元信息(README、package.json、pnpm intent、issue template)")).alias("i").action(async () => {
2471
- const { initMetadata } = await import("./commands-C1KOgvKa.mjs").then((n) => n.t);
2471
+ const { initMetadata } = await import("./commands-CayOzFY-.mjs").then((n) => n.t);
2472
2472
  await initMetadata(cwd);
2473
2473
  logger.success(localize("Workspace initialization finished.", "Workspace 初始化完成。"));
2474
2474
  });
2475
2475
  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) => {
2476
- const { getWorkspacePackageSummaries } = await import("./workspace-tasks-PcOR82ko.mjs").then((n) => n.Kt);
2476
+ const { getWorkspacePackageSummaries } = await import("./workspace-tasks-BPSq4jjn.mjs").then((n) => n.Kt);
2477
2477
  await emitWorkspaceList(await getWorkspacePackageSummaries(cwd, {
2478
2478
  ignorePrivatePackage: !opts.includePrivate,
2479
2479
  ignoreRootPackage: !opts.includeRoot,
@@ -2481,7 +2481,7 @@ function registerWorkspaceCommands(program, cwd) {
2481
2481
  }), opts);
2482
2482
  });
2483
2483
  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) => {
2484
- const { cleanProjects } = await import("./commands-C1KOgvKa.mjs").then((n) => n.t);
2484
+ const { cleanProjects } = await import("./commands-CayOzFY-.mjs").then((n) => n.t);
2485
2485
  await cleanProjects(cwd, normalizeCleanOptions(opts));
2486
2486
  });
2487
2487
  }
@@ -1,15 +1,14 @@
1
1
  import { t as __exportAll } from "./rolldown-runtime-8H4AJuhK.mjs";
2
- import { A as referenceTarget, B as saveKnipBaseline, C as loadCompiler, D as ownershipFile, E as exists$1, Gt as getWorkspacePackages, Ht as clearWorkspaceCache, I as getKnipConfigurationSuggestions, J as getWorkspaceGraph, K as mergeText, M as formatEnvironmentCache, O as readText, P as checkEnvironmentCache, R as planKnipCheck, S as configReader, St as localize, T as compare$1, Tt as resolveRepoctlLocale, Ut as getWorkspaceData, W as analyzeTurboRuns, Wt as getWorkspacePackageSummaries, Z as getWorkspaceImpact, _ as planTemplateLink, _t as assetsDir$1, at as record$3, b as planGenerate, c as loadTemplateInstanceRegistry$1, ct as renderCreateNewProject, dt as migrateLegacyToolingReferences, et as compareGraphValues, f as recoverTemplateUpgrade, ft as setByPath, g as applyTemplateLinkPlan, gt as validateCleanTargets, h as loadTemplateUpgradeJournal, ht as isWithin, it as readInput, j as relativeFile, jt as fs$2, k as referencePath, l as rebuildTemplateInstanceBaseline, lt as rewriteTemplateSnapshotReferences, m as planTemplateUpgrade, mt as assertSafePath, nt as workspaceDependencyTypes, o as listTemplateInstances, ot as safeFile, p as applyTemplateUpgradePlan, pt as stageFileTransaction, q as withOperationLock, qt as GitClient, rt as hash$1, s as loadTemplateBaseline$1, tt as resolveWorkspaceGraphNode, u as relocateTemplateInstance, w as validateGraph, x as generators, xt as templatesDir, y as applyGeneratePlan, yt as packageDir$1, z as runKnipCheck } from "./workspace-tasks-PcOR82ko.mjs";
3
- import { a as resolveFullWorkspaceCheckPlan, c as verifyCommitMsg, d as runPnpmCommand, f as logger, i as getKnownRepoCheckCommands, l as verifyPreCommit, n as resolveAffectedCheckContext, o as resolveRecommendedCheckPlan, r as resolveAffectedCheckPlan, s as runRecommendedCheck, t as runCheckWithReport, u as verifyStagedTypecheck } from "./execute-CNGJsU9v.mjs";
4
- import { B as presetPackageName, C as checkedFile, E as relativeFile$1, F as normalizeTemplateSourceRequest, G as commandConfigDirectory, L as sourceRequestKey, O as package_default$1, P as normalizeTemplateRemoteSource, R as templateSourcePath, S as canonicalDirectory, T as readOptional$1, U as appendConfigPath, V as presetVersion, _ as listToolingCapabilities, b as presetRelativePath, d as loadMonorepoConfig, f as loadMonorepoConfigDetails, g as presetAssetTarget, j as ConfigValidationError, k as version$2, n as defineTsconfigConfig, p as resolveCommandConfig, u as getRepoctlConfigCandidates, v as installedPresetDirectory, w as hash$2, x as readPresetFile, y as parsePresetJson } from "./tsconfig-DtgBJ7Vi.mjs";
5
- import { c as selectCommandOverrides, i as rangesOverlap, l as chinaMirrorsEnvs, r as parseSpecifier, s as resolveCommandValues } from "./scan-uUmUqFA6.mjs";
6
- import { A as record$4, C as baselineDirectory, D as parseBaseline, E as isRootAsset, F as toWorkspaceAssetPath, M as summarizeChecks, O as templatePackage, S as checkDependencyAdmission, T as encodeBaseline, a as applyDoctorSuppressions, b as parseWorkspaceLockfile, c as collectSelectedDoctorChecks, d as recommendedRepoScripts, f as inspectInstallSecurity, g as isLegacyReleaseWorkflow, h as supportedVersion, i as hasTemplateDriftIssues, j as getWorkspacePatterns, k as getAssetTargets, l as getDoctorRuleIds, m as settingState, o as validateDoctorSuppressions, p as readSecuritySources, r as formatTemplateDriftReport, s as validateDoctorConfiguration, t as checkTemplateDrift, u as selectDoctorRules, v as inspectPnpmRuntime, w as baselinePath, y as lockfileRecord } from "./template-drift-Bhvs_DPa.mjs";
7
- import { t as writeDependencyTransaction } from "./transaction-ut5-TLoD.mjs";
8
- import { i as applyDependencyFixPlan, r as planDependencyFix, t as checkDependencies } from "./deps-_M128Hqi.mjs";
9
- import { i as applyCatalogMigrationPlan, n as checkCatalogs, r as planCatalogMigration } from "./catalog-BKW8udNq.mjs";
2
+ import { A as referenceTarget, B as saveKnipBaseline, C as loadCompiler, D as ownershipFile, E as exists$1, Gt as getWorkspacePackages, Ht as clearWorkspaceCache, I as getKnipConfigurationSuggestions, J as getWorkspaceGraph, Jt as GitClient, K as mergeText, M as formatEnvironmentCache, O as readText, P as checkEnvironmentCache, R as planKnipCheck, S as configReader, St as localize, T as compare$1, Tt as resolveRepoctlLocale, Ut as getWorkspaceData, W as analyzeTurboRuns, Wt as getWorkspacePackageSummaries, Z as getWorkspaceImpact, _ as planTemplateLink, _t as assetsDir$1, at as record$3, b as planGenerate, c as loadTemplateInstanceRegistry$1, ct as renderCreateNewProject, dt as migrateLegacyToolingReferences, et as compareGraphValues, f as recoverTemplateUpgrade, ft as setByPath, g as applyTemplateLinkPlan, gt as validateCleanTargets, h as loadTemplateUpgradeJournal, ht as isWithin, it as readInput, j as relativeFile, jt as fs$2, k as referencePath, l as rebuildTemplateInstanceBaseline, lt as rewriteTemplateSnapshotReferences, m as planTemplateUpgrade, mt as assertSafePath, nt as workspaceDependencyTypes, o as listTemplateInstances, ot as safeFile, p as applyTemplateUpgradePlan, pt as stageFileTransaction, q as withOperationLock, qt as findWorkspacePackages, rt as hash$1, s as loadTemplateBaseline$1, tt as resolveWorkspaceGraphNode, u as relocateTemplateInstance, w as validateGraph, x as generators, xt as templatesDir, y as applyGeneratePlan, yt as packageDir$1, z as runKnipCheck } from "./workspace-tasks-BPSq4jjn.mjs";
3
+ import { a as resolveFullWorkspaceCheckPlan, c as verifyCommitMsg, d as runPnpmCommand, f as logger, i as getKnownRepoCheckCommands, l as verifyPreCommit, n as resolveAffectedCheckContext, o as resolveRecommendedCheckPlan, r as resolveAffectedCheckPlan, s as runRecommendedCheck, t as runCheckWithReport, u as verifyStagedTypecheck } from "./execute-NrC2ym6M.mjs";
4
+ import { B as presetPackageName, C as checkedFile, E as relativeFile$1, F as normalizeTemplateSourceRequest, G as commandConfigDirectory, L as sourceRequestKey, O as package_default$1, P as normalizeTemplateRemoteSource, R as templateSourcePath, S as canonicalDirectory, T as readOptional$1, U as appendConfigPath, V as presetVersion, _ as listToolingCapabilities, b as presetRelativePath, d as loadMonorepoConfig, f as loadMonorepoConfigDetails, g as presetAssetTarget, j as ConfigValidationError, k as version$2, n as defineTsconfigConfig, p as resolveCommandConfig, u as getRepoctlConfigCandidates, v as installedPresetDirectory, w as hash$2, x as readPresetFile, y as parsePresetJson } from "./tsconfig-01vm_d3r.mjs";
5
+ import { c as selectCommandOverrides, i as rangesOverlap, l as chinaMirrorsEnvs, r as parseSpecifier, s as resolveCommandValues } from "./scan-gJt1WqW4.mjs";
6
+ import { A as record$4, C as baselineDirectory, D as parseBaseline, E as isRootAsset, F as toWorkspaceAssetPath, M as summarizeChecks, O as templatePackage, S as checkDependencyAdmission, T as encodeBaseline, a as applyDoctorSuppressions, b as parseWorkspaceLockfile, c as collectSelectedDoctorChecks, d as recommendedRepoScripts, f as inspectInstallSecurity, g as isLegacyReleaseWorkflow, h as supportedVersion, i as hasTemplateDriftIssues, j as getWorkspacePatterns, k as getAssetTargets, l as getDoctorRuleIds, m as settingState, o as validateDoctorSuppressions, p as readSecuritySources, r as formatTemplateDriftReport, s as validateDoctorConfiguration, t as checkTemplateDrift, u as selectDoctorRules, v as inspectPnpmRuntime, w as baselinePath, y as lockfileRecord } from "./template-drift-D8CpRENe.mjs";
7
+ import { t as writeDependencyTransaction } from "./transaction-CkjiAvNJ.mjs";
8
+ import { i as applyDependencyFixPlan, r as planDependencyFix, t as checkDependencies } from "./deps-C-9vium9.mjs";
9
+ import { i as applyCatalogMigrationPlan, n as checkCatalogs, r as planCatalogMigration } from "./catalog-DWrBLClC.mjs";
10
10
  import { createRequire, isBuiltin } from "node:module";
11
11
  import { findWorkspaceDir } from "@pnpm/find-workspace-dir";
12
- import { findWorkspacePackages } from "@pnpm/workspace.find-packages";
13
12
  import { readWorkspaceManifest } from "@pnpm/workspace.read-manifest";
14
13
  import path, { normalize } from "pathe";
15
14
  import process from "node:process";
@@ -1459,7 +1458,7 @@ async function downloadGitTemplate(source, directory, timeout) {
1459
1458
  async function resolveRemoteTemplateSource(source, templatePath = ".", options = {}) {
1460
1459
  const request = normalizeTemplateSourceRequest(source, templatePath);
1461
1460
  const cwd = path$1.resolve(options.cwd ?? process.cwd());
1462
- const npm = request.source.kind === "npm" ? await import("./npm-BttWVZSI.mjs") : void 0;
1461
+ const npm = request.source.kind === "npm" ? await import("./npm-CjOsZ7tH.mjs") : void 0;
1463
1462
  const configuration = request.source.kind === "npm" ? await npm.npmTemplateConfiguration(request.source, cwd) : void 0;
1464
1463
  if (request.source.kind === "npm") request.source.registry = configuration.registry;
1465
1464
  const cacheDir = path$1.resolve(cwd, options.cacheDir ?? path$1.join(process.env["XDG_CACHE_HOME"] ?? path$1.join(homedir(), ".cache"), "repoctl", "template-sources-v1"));
@@ -3631,7 +3630,7 @@ var package_default = {
3631
3630
  type: "module",
3632
3631
  version: "0.0.0",
3633
3632
  "private": true,
3634
- packageManager: "pnpm@12.9.1",
3633
+ packageManager: "pnpm@12.10.1",
3635
3634
  description: "Source workspace for repoctl and Icebreaker's shared development packages",
3636
3635
  author: "ice breaker <hi@sonofmagic.top>",
3637
3636
  license: "MIT",
@@ -3737,7 +3736,7 @@ var package_default = {
3737
3736
  "lint-staged": "^17.6.0",
3738
3737
  "make-fetch-happen": "15.0.6",
3739
3738
  "only-allow": "^1.2.2",
3740
- "playwright": "^1.63.0",
3739
+ "playwright": "^1.64.0",
3741
3740
  "repoctl": "workspace:*",
3742
3741
  "stylelint": "^17.16.0",
3743
3742
  "tailwindcss": "^4.3.3",
@@ -4987,7 +4986,11 @@ async function readReleaseState(request, key) {
4987
4986
  throw error;
4988
4987
  }
4989
4988
  }
4990
- async function writeReleaseState(request, key, state, revision) {
4989
+ function transient(error) {
4990
+ if (!error || typeof error !== "object" || !("status" in error) || typeof error.status !== "number") return false;
4991
+ return error.status === 0 || error.status === 429 || error.status >= 500;
4992
+ }
4993
+ async function writeReleaseState(request, key, state, revision, options = {}) {
4991
4994
  if (!revision) try {
4992
4995
  await request("GET", `/git/ref/heads/${branch}`);
4993
4996
  } catch (error) {
@@ -5002,7 +5005,11 @@ async function writeReleaseState(request, key, state, revision) {
5002
5005
  }
5003
5006
  }
5004
5007
  const content = JSON.stringify(state);
5005
- try {
5008
+ const attempts = Math.max(1, options.retryAttempts ?? 3);
5009
+ const delay = Math.max(0, options.retryDelay ?? 1e3);
5010
+ const sleep = options.sleep ?? ((milliseconds) => new Promise((resolve) => setTimeout(resolve, milliseconds)));
5011
+ let error;
5012
+ for (let attempt = 1; attempt <= attempts; attempt += 1) try {
5006
5013
  const { data } = await request("PUT", statePath(key), {
5007
5014
  message: "chore(release): checkpoint release lifecycle [skip ci]",
5008
5015
  branch,
@@ -5011,11 +5018,14 @@ async function writeReleaseState(request, key, state, revision) {
5011
5018
  });
5012
5019
  if (!data?.content.sha) throw new ReleaseCommandError("GitHub returned no release checkpoint revision");
5013
5020
  return data.content.sha;
5014
- } catch (error) {
5021
+ } catch (caught) {
5022
+ error = caught;
5015
5023
  const recovered = await readReleaseState(request, key);
5016
5024
  if (recovered && JSON.stringify(recovered.state) === content) return recovered.revision;
5017
- throw new ReleaseCommandError(`Release checkpoint write failed or another publisher advanced it; retry after the other run finishes. ${error instanceof Error ? error.message : String(error)}`);
5025
+ if (recovered?.revision !== revision || !transient(caught) || attempt === attempts) break;
5026
+ await sleep(delay * 2 ** (attempt - 1));
5018
5027
  }
5028
+ throw new ReleaseCommandError(`Release checkpoint write failed or another publisher advanced it; retry after the other run finishes. ${error instanceof Error ? error.message : String(error)}`);
5019
5029
  }
5020
5030
  //#endregion
5021
5031
  //#region src/commands/release/github/tags.ts
@@ -5151,7 +5161,11 @@ var GitHubClient = class {
5151
5161
  return readReleaseState(this.getRequest(), key);
5152
5162
  }
5153
5163
  async writeReleaseState(key, state, revision) {
5154
- return writeReleaseState(this.getRequest(), key, state, revision);
5164
+ return writeReleaseState(this.getRequest(), key, state, revision, {
5165
+ retryAttempts: this.retryAttempts,
5166
+ retryDelay: this.retryDelay,
5167
+ sleep: this.sleep
5168
+ });
5155
5169
  }
5156
5170
  async ensurePullRequest(options) {
5157
5171
  const [owner] = this.getRepository().split("/");
@@ -6306,7 +6320,7 @@ async function assertPreviousReleaseComplete(options, distTag = "latest") {
6306
6320
  if (repository && github?.readReleaseState) for (const group of [candidates, ...cohorts.values()]) {
6307
6321
  const key = releaseStateKey(repository, distTag, group);
6308
6322
  const checkpoint = await github.readReleaseState(key);
6309
- if (checkpoint && (!checkpoint.state.complete || checkpoint.state.schemaVersion !== 1)) group.forEach((pkg) => unfinished.add(packageKey(pkg)));
6323
+ if (checkpoint && (!checkpoint.state.complete || checkpoint.state.schemaVersion !== 1)) (checkpoint.state.schemaVersion === 1 ? checkpoint.state.packages : group).forEach((pkg) => unfinished.add(packageKey(pkg)));
6310
6324
  }
6311
6325
  const blocked = [];
6312
6326
  const rule = options.config?.branches ? await resolveReleaseBranch(options) : void 0;
@@ -6554,6 +6568,26 @@ async function readSourceCandidates(options, source) {
6554
6568
  return candidates;
6555
6569
  }
6556
6570
  //#endregion
6571
+ //#region src/commands/release/recovery/environment.ts
6572
+ /** Resolve pnpm from the historical checkout for installs and nested lifecycle scripts. */
6573
+ async function sourcePackageManagerEnvironment(options, root) {
6574
+ const directory = path$1.join(root, "package-manager");
6575
+ await mkdir(directory);
6576
+ run("corepack", [
6577
+ "enable",
6578
+ "--install-directory",
6579
+ directory,
6580
+ "pnpm"
6581
+ ], options);
6582
+ const env = { ...getReleaseEnv(options) };
6583
+ const pathKey = Object.keys(env).find((key) => key.toLowerCase() === "path") ?? "PATH";
6584
+ env[pathKey] = `${directory}${path$1.delimiter}${env[pathKey] ?? ""}`;
6585
+ env["COREPACK_ENABLE_PROJECT_SPEC"] = "1";
6586
+ env["COREPACK_ENABLE_STRICT"] = "1";
6587
+ env["COREPACK_ENABLE_AUTO_PIN"] = "0";
6588
+ return env;
6589
+ }
6590
+ //#endregion
6557
6591
  //#region src/commands/release/recovery/source.ts
6558
6592
  /** Run current tooling against the original source, never today's package contents. */
6559
6593
  async function recoverSource(options, source) {
@@ -6624,6 +6658,10 @@ async function recoverSource(options, source) {
6624
6658
  }
6625
6659
  }
6626
6660
  if (!(options.dryRun ?? env["REPO_RELEASE_DRY_RUN"] === "true")) {
6661
+ recovery = {
6662
+ ...recovery,
6663
+ env: await sourcePackageManagerEnvironment(recovery, root)
6664
+ };
6627
6665
  run("pnpm", ["install", "--frozen-lockfile"], recovery);
6628
6666
  const config = await resolveCommandConfig("release", cwd);
6629
6667
  recovery = {
@@ -1,6 +1,6 @@
1
- import { Ht as clearWorkspaceCache, Wt as getWorkspacePackageSummaries, rt as hash } from "./workspace-tasks-PcOR82ko.mjs";
2
- import { t as knipConfigurationInputs } from "./inputs-DkBp5uc7.mjs";
3
- import { knipRoot } from "./plan-DkRsq9Oj.mjs";
1
+ import { Ht as clearWorkspaceCache, Wt as getWorkspacePackageSummaries, rt as hash } from "./workspace-tasks-BPSq4jjn.mjs";
2
+ import { t as knipConfigurationInputs } from "./inputs-hoTJICnb.mjs";
3
+ import { knipRoot } from "./plan-BA_10vfL.mjs";
4
4
  //#region src/commands/check/knip/config.ts
5
5
  /** Return native settings for manual merging; existing Knip config always remains authoritative. */
6
6
  async function getKnipConfigurationSuggestions(cwd) {
@@ -1,6 +1,6 @@
1
- import { St as localize, jt as fs$1 } from "./workspace-tasks-PcOR82ko.mjs";
2
- import { f as logger } from "./execute-CNGJsU9v.mjs";
3
- import { Ct as defaultTemplate, St as createNewProject, jt as loadTemplateCatalogContext, kt as createTemplateCatalog, wt as resolveCreateNewProjectPlan } from "./commands-C1KOgvKa.mjs";
1
+ import { St as localize, jt as fs$1 } from "./workspace-tasks-BPSq4jjn.mjs";
2
+ import { f as logger } from "./execute-NrC2ym6M.mjs";
3
+ import { Ct as defaultTemplate, St as createNewProject, jt as loadTemplateCatalogContext, kt as createTemplateCatalog, wt as resolveCreateNewProjectPlan } from "./commands-CayOzFY-.mjs";
4
4
  import path from "pathe";
5
5
  import process from "node:process";
6
6
  import { readFile } from "node:fs/promises";
@@ -1,7 +1,7 @@
1
1
  import { t as __exportAll } from "./rolldown-runtime-8H4AJuhK.mjs";
2
- import { Ht as clearWorkspaceCache, St as localize } from "./workspace-tasks-PcOR82ko.mjs";
3
- import { t as scanDependencies } from "./scan-uUmUqFA6.mjs";
4
- import { a as prepareDependencyFix, i as dependencyNextSteps, n as inspectDependencyPlanInputs, o as dependencyReport, r as validateDependencyPlan, t as writeDependencyTransaction } from "./transaction-ut5-TLoD.mjs";
2
+ import { Ht as clearWorkspaceCache, St as localize } from "./workspace-tasks-BPSq4jjn.mjs";
3
+ import { t as scanDependencies } from "./scan-gJt1WqW4.mjs";
4
+ import { a as prepareDependencyFix, i as dependencyNextSteps, n as inspectDependencyPlanInputs, o as dependencyReport, r as validateDependencyPlan, t as writeDependencyTransaction } from "./transaction-CkjiAvNJ.mjs";
5
5
  import { isDeepStrictEqual } from "node:util";
6
6
  //#region src/commands/deps/apply.ts
7
7
  async function applyDependencyFixPlan(cwd, plan) {
@@ -1,5 +1,5 @@
1
- import { St as localize, jt as fs } from "./workspace-tasks-PcOR82ko.mjs";
2
- import { f as logger, t as runCheckWithReport } from "./execute-CNGJsU9v.mjs";
1
+ import { St as localize, jt as fs } from "./workspace-tasks-BPSq4jjn.mjs";
2
+ import { f as logger, t as runCheckWithReport } from "./execute-NrC2ym6M.mjs";
3
3
  import { t as formatAffectedCheckPlan } from "./cli.mjs";
4
4
  import path from "pathe";
5
5
  import process from "node:process";
@@ -1,5 +1,5 @@
1
- import { H as signalExitCode, J as getWorkspaceGraph, St as localize, V as executeCheckTask, Z as getWorkspaceImpact, jt as fs$1, tt as resolveWorkspaceGraphNode } from "./workspace-tasks-PcOR82ko.mjs";
2
- import { d as loadMonorepoConfig, m as resolveToolingConfig } from "./tsconfig-DtgBJ7Vi.mjs";
1
+ import { H as signalExitCode, J as getWorkspaceGraph, St as localize, V as executeCheckTask, Z as getWorkspaceImpact, jt as fs$1, tt as resolveWorkspaceGraphNode } from "./workspace-tasks-BPSq4jjn.mjs";
2
+ import { d as loadMonorepoConfig, m as resolveToolingConfig } from "./tsconfig-01vm_d3r.mjs";
3
3
  import process from "node:process";
4
4
  import { createConsola } from "consola";
5
5
  import { execFileSync, spawnSync } from "node:child_process";
@@ -1,4 +1,4 @@
1
- import { St as localize } from "./workspace-tasks-PcOR82ko.mjs";
1
+ import { St as localize } from "./workspace-tasks-BPSq4jjn.mjs";
2
2
  //#region src/commands/check/cache/format.ts
3
3
  function label(value, markdown) {
4
4
  return markdown ? value.replace(/[\\`*_{}[\]()#+.!|<>~-]/gu, "\\$&") : value;
@@ -1,10 +1,10 @@
1
1
  import { ConfigValues, SimpleGit, SimpleGitOptions } from "simple-git";
2
2
  import { ResolvedTemplateParameters, ResolvedTemplateRemoteSource, TemplateCategory, TemplateChoice, TemplateDefinition, TemplateInstanceMovePlan, TemplateParameterPrompt, TemplateParameterRender, TemplateParameterValues, TemplateRemoteSource } from "@icebreakers/monorepo-templates";
3
3
  import { IcebreakerCommitlintConfig, IcebreakerCommitlintOptions } from "@icebreakers/commitlint-config";
4
- import { IcebreakerEslintConfig, UserConfigItem, UserDefinedOptions } from "@icebreakers/eslint-config";
5
4
  import { IcebreakerStylelintConfig, StylelintConfig } from "@icebreakers/stylelint-config";
6
- import { ViteUserConfig } from "vitest/config";
5
+ import { IcebreakerEslintConfig, UserConfigItem, UserDefinedOptions } from "@icebreakers/eslint-config";
7
6
  import { Configuration } from "lint-staged";
7
+ import { ViteUserConfig } from "vitest/config";
8
8
  //#region src/types/dependencies.d.ts
9
9
  type DependencySection = 'dependencies' | 'devDependencies' | 'peerDependencies' | 'optionalDependencies';
10
10
  /** An intentional version cohort, selected by exact workspace-relative directories. */
package/dist/index.d.mts CHANGED
@@ -1,4 +1,4 @@
1
- import { $ as ReleaseBranchRule, $n as TemplateCatalogDiagnostic, $t as WorkspacePackage, A as MonorepoVitestProjectConfigResult, An as AdmissionDeclaration, Ar as DependencyReport, At as PublicApiReport, B as WorkspaceRemovalFile, Bn as CreateNewProjectPlan, Bt as WorkspaceBoundarySelector, C as MonorepoLintStagedConfigOptions, Cn as DoctorReport, Cr as DependencyConsistencyGroup, Ct as ProjectReferencesPlan, D as MonorepoVitestConfigOverrides, Dn as DoctorCommandConfig, Dr as DependencyGroupStatus, Dt as PublicApiEntryReport, E as MonorepoVitestConfigOptions, En as DoctorSuppressionReport, Er as DependencyFixPlan, Et as PublicApiEntryConfig, F as WorkspaceMovePlan, Fn as DependencyAdmissionReport, Ft as WorkspaceBoundariesConfig, G as CreateChoiceOption, Gn as TemplateSourceRequest, Gt as WorkspaceGraphFilter, H as WorkspaceRemovalPlan, Hn as resolveRemoteTemplateSource, Ht as WorkspaceGraph, I as WorkspaceMoveResult, In as DependencyAdmissionRule, It as WorkspaceBoundariesReport, J as MirrorCommandConfig, Jn as templateMap, Jt as WorkspaceImpactOptions, K as CreateCommandConfig, Kn as getCreateChoices, Kt as WorkspaceGraphNode, L as WorkspaceMoveReview, Ln as applyCreateNewProjectPlan, Lt as WorkspaceBoundaryException, M as SimpleGit, Mn as DependencyAdmissionException, Mr as DependencyVersionGroup, Mt as PublicApiUpdateResult, N as SimpleGitOptions, Nn as DependencyAdmissionFinding, Nt as CleanCommandConfig, O as MonorepoVitestConfigResult, On as DoctorOptions, Or as DependencyOccurrence, Ot as PublicApiOptions, P as WorkspaceMoveOptions, Pn as DependencyAdmissionOptions, Pt as BoundarySeverity, Q as ReleaseCommandConfig, Qn as TemplateCatalog, Qt as WorkspaceData, R as WorkspaceRemovalBlocker, Rn as createNewProject, Rt as WorkspaceBoundaryFinding, S as MonorepoLintStagedConfig, Sn as DoctorCheck, Sr as DependencyApplyResult, St as ProjectReferencesOperation, T as MonorepoTsconfig, Tn as DoctorSummary, Tr as DependencyFixOptions, Tt as PublicApiDiagnostic, U as WorkspaceRemovalResult, Un as ResolvedTemplateSource, Ut as WorkspaceGraphDiagnostic, V as WorkspaceRemovalOptions, Vn as resolveCreateNewProjectPlan, Vt as WorkspaceDependencyType, W as AiCommandConfig, Wn as TemplateSourceOptions, Wt as WorkspaceGraphEdge, X as UpgradeCommandConfig, Xn as CreateTemplateDefinition, Xt as WorkspaceWhyResult, Y as MonorepoConfig, Yn as resolveTemplateCatalog, Yt as WorkspaceImpactResult, Z as ReleaseAfterPublishHookConfig, Zn as ResolveTemplateCatalogOptions, Zt as GetWorkspacePackagesOptions, _ as DefineEslintConfigOptions, _n as InstallSecurityExpectations, _r as generateAgenticTemplate, _t as VitestToolingConfig, a as createMonorepoTsconfig, an as CodeownersDiagnostic, ar as OrganizationPresetDiagnostic, at as EnvCacheReport, b as MonorepoCommitlintConfig, bn as InstallSecurityReport, br as CliOpts, bt as ProjectReferencesConfig, c as createMonorepoCommitlintConfig, cn as CodeownersReport, cr as OrganizationPresetReference, ct as EnvCacheVariable, d as defineCommitlintConfig, dn as initMetadata, dr as OrganizationPresetTemplate, dt as HuskyToolingConfig, en as WorkspacePackageManifest, er as TemplateCatalogEntry, et as ReleaseBranchesConfig, f as defineEslintConfig, fn as initTooling, fr as AgenticTemplateFormat, ft as LintStagedToolingConfig, g as DefineConfigOptions, gn as InstallPolicyKey, gr as defaultAgenticBaseDir, gt as VitestProjectToolingConfig, h as defineLintStagedConfig, hn as InstallBuildDecision, hr as createTimestampFolderName, ht as TsconfigToolingConfig, i as defineVitestProjectConfig, in as CodeownersConfig, ir as OrganizationPresetAsset, it as EnvCacheOptions, j as ConfigValues, jn as DependencyAdmissionConfig, jr as DependencySection, jt as PublicApiUpdatePlan, k as MonorepoVitestProjectConfigOptions, kn as DoctorSuppression, kr as DependencyProtocol, kt as PublicApiPackageConfig, l as createMonorepoEslintConfig, ln as WorkspaceOwnership, lr as OrganizationPresetResolution, lt as CommitlintToolingConfig, m as createMonorepoLintStagedConfig, mn as initToolingTargets, mr as GenerateAgenticTemplateOptions, mt as ToolingConfig, n as createMonorepoVitestProjectConfig, nn as WorkspacePackageSummaryData, nr as ConfigSourceLayer, nt as EnvCacheEvidence, o as defineTsconfigConfig, on as CodeownersOptions, or as OrganizationPresetLayer, ot as EnvCacheSuppression, p as defineStylelintConfig, pn as normalizeInitToolingTargets, pr as AgenticTemplateTask, pt as StylelintToolingConfig, q as InitCommandConfig, qn as getTemplateMap, qt as WorkspaceGraphOptions, r as defineVitestConfig, rn as WorkspacePackageWithJsonPath, rr as ConfigValueSource, rt as EnvCacheFinding, s as loadMonorepoToolingConfig, sn as CodeownersPlan, sr as OrganizationPresetManifest, st as EnvCacheTask, t as createMonorepoVitestConfig, tn as WorkspacePackageSummary, tr as ConfigDiagnostic, tt as EnvCacheConfig, u as createMonorepoStylelintConfig, un as init, ur as OrganizationPresetSource, ut as EslintToolingConfig, v as DefineVitestConfigOptions, vn as InstallSecurityOptions, vr as generateAgenticTemplates, vt as ProjectReferencesApplyResult, w as MonorepoStylelintConfig, wn as DoctorStatus, wr as DependencyFileChange, wt as PublicApiConfig, x as MonorepoEslintConfig, xn as InstallSecuritySetting, xr as DependenciesCommandConfig, xt as ProjectReferencesDiagnostic, y as DefineVitestProjectConfigOptions, yn as InstallSecurityPresetPlan, yr as loadAgenticTasks, yt as ProjectReferencesCheck, z as WorkspaceRemovalEntry, zn as CreateNewProjectOptions, zt as WorkspaceBoundaryRule } from "./index-CoCTFWZJ.mjs";
1
+ import { $ as ReleaseBranchRule, $n as TemplateCatalogDiagnostic, $t as WorkspacePackage, A as MonorepoVitestProjectConfigResult, An as AdmissionDeclaration, Ar as DependencyReport, At as PublicApiReport, B as WorkspaceRemovalFile, Bn as CreateNewProjectPlan, Bt as WorkspaceBoundarySelector, C as MonorepoLintStagedConfigOptions, Cn as DoctorReport, Cr as DependencyConsistencyGroup, Ct as ProjectReferencesPlan, D as MonorepoVitestConfigOverrides, Dn as DoctorCommandConfig, Dr as DependencyGroupStatus, Dt as PublicApiEntryReport, E as MonorepoVitestConfigOptions, En as DoctorSuppressionReport, Er as DependencyFixPlan, Et as PublicApiEntryConfig, F as WorkspaceMovePlan, Fn as DependencyAdmissionReport, Ft as WorkspaceBoundariesConfig, G as CreateChoiceOption, Gn as TemplateSourceRequest, Gt as WorkspaceGraphFilter, H as WorkspaceRemovalPlan, Hn as resolveRemoteTemplateSource, Ht as WorkspaceGraph, I as WorkspaceMoveResult, In as DependencyAdmissionRule, It as WorkspaceBoundariesReport, J as MirrorCommandConfig, Jn as templateMap, Jt as WorkspaceImpactOptions, K as CreateCommandConfig, Kn as getCreateChoices, Kt as WorkspaceGraphNode, L as WorkspaceMoveReview, Ln as applyCreateNewProjectPlan, Lt as WorkspaceBoundaryException, M as SimpleGit, Mn as DependencyAdmissionException, Mr as DependencyVersionGroup, Mt as PublicApiUpdateResult, N as SimpleGitOptions, Nn as DependencyAdmissionFinding, Nt as CleanCommandConfig, O as MonorepoVitestConfigResult, On as DoctorOptions, Or as DependencyOccurrence, Ot as PublicApiOptions, P as WorkspaceMoveOptions, Pn as DependencyAdmissionOptions, Pt as BoundarySeverity, Q as ReleaseCommandConfig, Qn as TemplateCatalog, Qt as WorkspaceData, R as WorkspaceRemovalBlocker, Rn as createNewProject, Rt as WorkspaceBoundaryFinding, S as MonorepoLintStagedConfig, Sn as DoctorCheck, Sr as DependencyApplyResult, St as ProjectReferencesOperation, T as MonorepoTsconfig, Tn as DoctorSummary, Tr as DependencyFixOptions, Tt as PublicApiDiagnostic, U as WorkspaceRemovalResult, Un as ResolvedTemplateSource, Ut as WorkspaceGraphDiagnostic, V as WorkspaceRemovalOptions, Vn as resolveCreateNewProjectPlan, Vt as WorkspaceDependencyType, W as AiCommandConfig, Wn as TemplateSourceOptions, Wt as WorkspaceGraphEdge, X as UpgradeCommandConfig, Xn as CreateTemplateDefinition, Xt as WorkspaceWhyResult, Y as MonorepoConfig, Yn as resolveTemplateCatalog, Yt as WorkspaceImpactResult, Z as ReleaseAfterPublishHookConfig, Zn as ResolveTemplateCatalogOptions, Zt as GetWorkspacePackagesOptions, _ as DefineEslintConfigOptions, _n as InstallSecurityExpectations, _r as generateAgenticTemplate, _t as VitestToolingConfig, a as createMonorepoTsconfig, an as CodeownersDiagnostic, ar as OrganizationPresetDiagnostic, at as EnvCacheReport, b as MonorepoCommitlintConfig, bn as InstallSecurityReport, br as CliOpts, bt as ProjectReferencesConfig, c as createMonorepoCommitlintConfig, cn as CodeownersReport, cr as OrganizationPresetReference, ct as EnvCacheVariable, d as defineCommitlintConfig, dn as initMetadata, dr as OrganizationPresetTemplate, dt as HuskyToolingConfig, en as WorkspacePackageManifest, er as TemplateCatalogEntry, et as ReleaseBranchesConfig, f as defineEslintConfig, fn as initTooling, fr as AgenticTemplateFormat, ft as LintStagedToolingConfig, g as DefineConfigOptions, gn as InstallPolicyKey, gr as defaultAgenticBaseDir, gt as VitestProjectToolingConfig, h as defineLintStagedConfig, hn as InstallBuildDecision, hr as createTimestampFolderName, ht as TsconfigToolingConfig, i as defineVitestProjectConfig, in as CodeownersConfig, ir as OrganizationPresetAsset, it as EnvCacheOptions, j as ConfigValues, jn as DependencyAdmissionConfig, jr as DependencySection, jt as PublicApiUpdatePlan, k as MonorepoVitestProjectConfigOptions, kn as DoctorSuppression, kr as DependencyProtocol, kt as PublicApiPackageConfig, l as createMonorepoEslintConfig, ln as WorkspaceOwnership, lr as OrganizationPresetResolution, lt as CommitlintToolingConfig, m as createMonorepoLintStagedConfig, mn as initToolingTargets, mr as GenerateAgenticTemplateOptions, mt as ToolingConfig, n as createMonorepoVitestProjectConfig, nn as WorkspacePackageSummaryData, nr as ConfigSourceLayer, nt as EnvCacheEvidence, o as defineTsconfigConfig, on as CodeownersOptions, or as OrganizationPresetLayer, ot as EnvCacheSuppression, p as defineStylelintConfig, pn as normalizeInitToolingTargets, pr as AgenticTemplateTask, pt as StylelintToolingConfig, q as InitCommandConfig, qn as getTemplateMap, qt as WorkspaceGraphOptions, r as defineVitestConfig, rn as WorkspacePackageWithJsonPath, rr as ConfigValueSource, rt as EnvCacheFinding, s as loadMonorepoToolingConfig, sn as CodeownersPlan, sr as OrganizationPresetManifest, st as EnvCacheTask, t as createMonorepoVitestConfig, tn as WorkspacePackageSummary, tr as ConfigDiagnostic, tt as EnvCacheConfig, u as createMonorepoStylelintConfig, un as init, ur as OrganizationPresetSource, ut as EslintToolingConfig, v as DefineVitestConfigOptions, vn as InstallSecurityOptions, vr as generateAgenticTemplates, vt as ProjectReferencesApplyResult, w as MonorepoStylelintConfig, wn as DoctorStatus, wr as DependencyFileChange, wt as PublicApiConfig, x as MonorepoEslintConfig, xn as InstallSecuritySetting, xr as DependenciesCommandConfig, xt as ProjectReferencesDiagnostic, y as DefineVitestProjectConfigOptions, yn as InstallSecurityPresetPlan, yr as loadAgenticTasks, yt as ProjectReferencesCheck, z as WorkspaceRemovalEntry, zn as CreateNewProjectOptions, zt as WorkspaceBoundaryRule } from "./index-D61zjikU.mjs";
2
2
  import gitUrlParse from "git-url-parse";
3
3
  import { mkdtemp, readFile, readdir, stat, writeFile } from "node:fs/promises";
4
4
  import { execFileSync, spawnSync } from "node:child_process";
package/dist/index.mjs CHANGED
@@ -1,12 +1,12 @@
1
- import { $ as WorkspaceGraphQueryError, At as exists, B as saveKnipBaseline, Bt as writeJSON, Dt as copy, Ft as outputJson, Gt as getWorkspacePackages, Ht as clearWorkspaceCache, I as getKnipConfigurationSuggestions, It as pathExists, J as getWorkspaceGraph, Lt as readJSON, M as formatEnvironmentCache, Mt as isIgnorableFsError, Nt as outputFile, Ot as ensureDir, P as checkEnvironmentCache, Pt as outputJSON, Q as whyWorkspaceDependency, R as planKnipCheck, Rt as readJson, Ut as getWorkspaceData, Vt as writeJson, W as analyzeTurboRuns, Wt as getWorkspacePackageSummaries, X as filterWorkspaceGraph, Z as getWorkspaceImpact, _ as planTemplateLink, _t as assetsDir, a as inspectWorkspaceOwners, b as planGenerate, bt as rootDir, c as loadTemplateInstanceRegistry, f as recoverTemplateUpgrade, ft as setByPath, g as applyTemplateLinkPlan, i as planCodeowners, kt as ensureFile, l as rebuildTemplateInstanceBaseline, m as planTemplateUpgrade, n as locateWorkspace, o as listTemplateInstances, p as applyTemplateUpgradePlan, qt as GitClient, r as applyCodeownersPlan, s as loadTemplateBaseline, t as getWorkspaceTaskCatalog, tt as resolveWorkspaceGraphNode, u as relocateTemplateInstance, vt as cliName, x as generators, xt as templatesDir, y as applyGeneratePlan, yt as packageDir, z as runKnipCheck, zt as remove } from "./workspace-tasks-PcOR82ko.mjs";
2
- import { a as resolveFullWorkspaceCheckPlan, c as verifyCommitMsg, f as logger, i as getKnownRepoCheckCommands, l as verifyPreCommit, o as resolveRecommendedCheckPlan, r as resolveAffectedCheckPlan, s as runRecommendedCheck, t as runCheckWithReport, u as verifyStagedTypecheck } from "./execute-CNGJsU9v.mjs";
3
- import { $ as GitHubClient, A as resolveAffectedCheckMatrix, At as resolveTemplateCatalog, B as syncSkills, Bt as defaultAgenticBaseDir, C as applyOrganizationPresetAssets, D as applyInstallSecurityPreset, Dt as templateMap, E as planDevContainer, Et as getTemplateMap, F as upgradeMonorepo, Ft as sanitizeConfigReport, G as prepareStable, H as createReleasePullRequest, Ht as generateAgenticTemplates, I as formatUpgradePlan, It as validateConfigFile, J as reconcileRelease, K as publishStable, L as checkTemplates, Lt as cleanProjects, M as applyPublicApiUpdate, Mt as updateIssueTemplateConfig, N as planPublicApiUpdate, Nt as inspectMonorepoConfig, O as planInstallSecurityPreset, Ot as resolveRemoteTemplateSource, P as formatPublicApiReport, Pt as explainMonorepoConfig, Q as auditReleaseOidc, R as getSkillTargetPaths, Rt as verifyPrePush, S as detectMaintenanceVersionChange, St as createNewProject, T as applyDevContainerPlan, Tt as getCreateChoices, U as recoverUnpublished, Ut as loadAgenticTasks, V as repairReleaseNotes, Vt as generateAgenticTemplate, W as releaseCi, X as exitPrerelease, Y as enterPrerelease, Z as releasePrerelease, _ as applyProjectReferencesPlan, _t as planDoctorFix, a as planWorkspaceMove, at as init, b as getMaintenanceWorkflow, bt as applyUpgradePlan, c as applyToolingCapability, ct as normalizeInitToolingTargets, d as planTemplateValidation, dt as collectEnvInfo, et as GitHubApiError, f as releaseSnapshot, ft as collectEnvPaths, g as syncProjectReferences, gt as applyDoctorFixPlan, h as checkProjectReferences, ht as runDoctor, i as applyWorkspaceMovePlan, it as setVscodeBinaryMirror, j as checkPublicApi, k as checkPeerDependencies, l as planToolingCapability, lt as initToolingTargets, m as createReleasePlan, mt as collectEnvSupportBundle, n as applyWorkspaceRemovalPlan, o as applyWorkspaceArtifactPlan, ot as initMetadata, p as createSnapshotPlan, pt as collectEnvSnapshot, q as releaseStable, r as planWorkspaceRemoval, s as planWorkspaceArtifact, st as initTooling, tt as parsePublishSummary, u as validateTemplate, ut as createContext, v as planProjectReferences, vt as planUpgrade, w as planOrganizationPresetAssets, wt as resolveCreateNewProjectPlan, x as prepareMaintenanceUpgrade, xt as applyCreateNewProjectPlan, y as checkPackages, yt as resolveReleaseBranches, z as skillTargets, zt as createTimestampFolderName } from "./commands-C1KOgvKa.mjs";
4
- import { D as name, M as assertMonorepoConfig, N as validateMonorepoConfig, _ as listToolingCapabilities, d as loadMonorepoConfig, f as loadMonorepoConfigDetails, h as resolveOrganizationPresets, i as loadMonorepoToolingConfig, j as ConfigValidationError, k as version, l as defineMonorepoConfig, m as resolveToolingConfig, n as defineTsconfigConfig, p as resolveCommandConfig, s as configExtensions, t as createMonorepoTsconfig, u as getRepoctlConfigCandidates } from "./tsconfig-DtgBJ7Vi.mjs";
5
- import { c as selectCommandOverrides, s as resolveCommandValues } from "./scan-uUmUqFA6.mjs";
6
- import { F as toWorkspaceAssetPath, I as toWorkspaceGitignorePath, N as isGitignoreFile, P as toPublishGitignorePath, S as checkDependencyAdmission, f as inspectInstallSecurity, i as hasTemplateDriftIssues, l as getDoctorRuleIds, r as formatTemplateDriftReport, t as checkTemplateDrift, x as checkWorkspaceBoundaries } from "./template-drift-Bhvs_DPa.mjs";
7
- import { a as createMonorepoCommitlintConfig, c as defineCommitlintConfig, d as createMonorepoLintStagedConfig, f as defineLintStagedConfig, i as defineVitestProjectConfig, l as defineEslintConfig, n as createMonorepoVitestProjectConfig, o as createMonorepoEslintConfig, r as defineVitestConfig, s as createMonorepoStylelintConfig, t as createMonorepoVitestConfig, u as defineStylelintConfig } from "./vitest-DkD49zO4.mjs";
8
- import { i as applyDependencyFixPlan, r as planDependencyFix, t as checkDependencies } from "./deps-_M128Hqi.mjs";
9
- import { i as applyCatalogMigrationPlan, n as checkCatalogs, r as planCatalogMigration } from "./catalog-BKW8udNq.mjs";
1
+ import { $ as WorkspaceGraphQueryError, At as exists, B as saveKnipBaseline, Bt as writeJSON, Dt as copy, Ft as outputJson, Gt as getWorkspacePackages, Ht as clearWorkspaceCache, I as getKnipConfigurationSuggestions, It as pathExists, J as getWorkspaceGraph, Jt as GitClient, Lt as readJSON, M as formatEnvironmentCache, Mt as isIgnorableFsError, Nt as outputFile, Ot as ensureDir, P as checkEnvironmentCache, Pt as outputJSON, Q as whyWorkspaceDependency, R as planKnipCheck, Rt as readJson, Ut as getWorkspaceData, Vt as writeJson, W as analyzeTurboRuns, Wt as getWorkspacePackageSummaries, X as filterWorkspaceGraph, Z as getWorkspaceImpact, _ as planTemplateLink, _t as assetsDir, a as inspectWorkspaceOwners, b as planGenerate, bt as rootDir, c as loadTemplateInstanceRegistry, f as recoverTemplateUpgrade, ft as setByPath, g as applyTemplateLinkPlan, i as planCodeowners, kt as ensureFile, l as rebuildTemplateInstanceBaseline, m as planTemplateUpgrade, n as locateWorkspace, o as listTemplateInstances, p as applyTemplateUpgradePlan, r as applyCodeownersPlan, s as loadTemplateBaseline, t as getWorkspaceTaskCatalog, tt as resolveWorkspaceGraphNode, u as relocateTemplateInstance, vt as cliName, x as generators, xt as templatesDir, y as applyGeneratePlan, yt as packageDir, z as runKnipCheck, zt as remove } from "./workspace-tasks-BPSq4jjn.mjs";
2
+ import { a as resolveFullWorkspaceCheckPlan, c as verifyCommitMsg, f as logger, i as getKnownRepoCheckCommands, l as verifyPreCommit, o as resolveRecommendedCheckPlan, r as resolveAffectedCheckPlan, s as runRecommendedCheck, t as runCheckWithReport, u as verifyStagedTypecheck } from "./execute-NrC2ym6M.mjs";
3
+ import { $ as GitHubClient, A as resolveAffectedCheckMatrix, At as resolveTemplateCatalog, B as syncSkills, Bt as defaultAgenticBaseDir, C as applyOrganizationPresetAssets, D as applyInstallSecurityPreset, Dt as templateMap, E as planDevContainer, Et as getTemplateMap, F as upgradeMonorepo, Ft as sanitizeConfigReport, G as prepareStable, H as createReleasePullRequest, Ht as generateAgenticTemplates, I as formatUpgradePlan, It as validateConfigFile, J as reconcileRelease, K as publishStable, L as checkTemplates, Lt as cleanProjects, M as applyPublicApiUpdate, Mt as updateIssueTemplateConfig, N as planPublicApiUpdate, Nt as inspectMonorepoConfig, O as planInstallSecurityPreset, Ot as resolveRemoteTemplateSource, P as formatPublicApiReport, Pt as explainMonorepoConfig, Q as auditReleaseOidc, R as getSkillTargetPaths, Rt as verifyPrePush, S as detectMaintenanceVersionChange, St as createNewProject, T as applyDevContainerPlan, Tt as getCreateChoices, U as recoverUnpublished, Ut as loadAgenticTasks, V as repairReleaseNotes, Vt as generateAgenticTemplate, W as releaseCi, X as exitPrerelease, Y as enterPrerelease, Z as releasePrerelease, _ as applyProjectReferencesPlan, _t as planDoctorFix, a as planWorkspaceMove, at as init, b as getMaintenanceWorkflow, bt as applyUpgradePlan, c as applyToolingCapability, ct as normalizeInitToolingTargets, d as planTemplateValidation, dt as collectEnvInfo, et as GitHubApiError, f as releaseSnapshot, ft as collectEnvPaths, g as syncProjectReferences, gt as applyDoctorFixPlan, h as checkProjectReferences, ht as runDoctor, i as applyWorkspaceMovePlan, it as setVscodeBinaryMirror, j as checkPublicApi, k as checkPeerDependencies, l as planToolingCapability, lt as initToolingTargets, m as createReleasePlan, mt as collectEnvSupportBundle, n as applyWorkspaceRemovalPlan, o as applyWorkspaceArtifactPlan, ot as initMetadata, p as createSnapshotPlan, pt as collectEnvSnapshot, q as releaseStable, r as planWorkspaceRemoval, s as planWorkspaceArtifact, st as initTooling, tt as parsePublishSummary, u as validateTemplate, ut as createContext, v as planProjectReferences, vt as planUpgrade, w as planOrganizationPresetAssets, wt as resolveCreateNewProjectPlan, x as prepareMaintenanceUpgrade, xt as applyCreateNewProjectPlan, y as checkPackages, yt as resolveReleaseBranches, z as skillTargets, zt as createTimestampFolderName } from "./commands-CayOzFY-.mjs";
4
+ import { D as name, M as assertMonorepoConfig, N as validateMonorepoConfig, _ as listToolingCapabilities, d as loadMonorepoConfig, f as loadMonorepoConfigDetails, h as resolveOrganizationPresets, i as loadMonorepoToolingConfig, j as ConfigValidationError, k as version, l as defineMonorepoConfig, m as resolveToolingConfig, n as defineTsconfigConfig, p as resolveCommandConfig, s as configExtensions, t as createMonorepoTsconfig, u as getRepoctlConfigCandidates } from "./tsconfig-01vm_d3r.mjs";
5
+ import { c as selectCommandOverrides, s as resolveCommandValues } from "./scan-gJt1WqW4.mjs";
6
+ import { F as toWorkspaceAssetPath, I as toWorkspaceGitignorePath, N as isGitignoreFile, P as toPublishGitignorePath, S as checkDependencyAdmission, f as inspectInstallSecurity, i as hasTemplateDriftIssues, l as getDoctorRuleIds, r as formatTemplateDriftReport, t as checkTemplateDrift, x as checkWorkspaceBoundaries } from "./template-drift-D8CpRENe.mjs";
7
+ import { a as createMonorepoCommitlintConfig, c as defineCommitlintConfig, d as createMonorepoLintStagedConfig, f as defineLintStagedConfig, i as defineVitestProjectConfig, l as defineEslintConfig, n as createMonorepoVitestProjectConfig, o as createMonorepoEslintConfig, r as defineVitestConfig, s as createMonorepoStylelintConfig, t as createMonorepoVitestConfig, u as defineStylelintConfig } from "./vitest-WPpMJqzw.mjs";
8
+ import { i as applyDependencyFixPlan, r as planDependencyFix, t as checkDependencies } from "./deps-C-9vium9.mjs";
9
+ import { i as applyCatalogMigrationPlan, n as checkCatalogs, r as planCatalogMigration } from "./catalog-DWrBLClC.mjs";
10
10
  import crypto from "node:crypto";
11
11
  import { Buffer } from "node:buffer";
12
12
  //#region src/utils/hash.ts
@@ -1,4 +1,4 @@
1
- import { at as record, rt as hash } from "./workspace-tasks-PcOR82ko.mjs";
1
+ import { at as record, rt as hash } from "./workspace-tasks-BPSq4jjn.mjs";
2
2
  import path from "pathe";
3
3
  import { lstat, readFile } from "node:fs/promises";
4
4
  import YAML from "yaml";
@@ -1,4 +1,4 @@
1
- import { I as registryUrl } from "./tsconfig-DtgBJ7Vi.mjs";
1
+ import { I as registryUrl } from "./tsconfig-01vm_d3r.mjs";
2
2
  import { createRequire } from "node:module";
3
3
  import { createWriteStream } from "node:fs";
4
4
  import path from "node:path";
@@ -1,4 +1,4 @@
1
- import { at as record, yt as packageDir } from "./workspace-tasks-PcOR82ko.mjs";
1
+ import { at as record, yt as packageDir } from "./workspace-tasks-BPSq4jjn.mjs";
2
2
  import { findWorkspaceDir } from "@pnpm/find-workspace-dir";
3
3
  import path from "pathe";
4
4
  import process from "node:process";
@@ -1,7 +1,7 @@
1
- import { U as stopCheckProcessTree } from "./workspace-tasks-PcOR82ko.mjs";
2
- import { t as knipConfigurationInputs } from "./inputs-DkBp5uc7.mjs";
3
- import { planKnipCheck } from "./plan-DkRsq9Oj.mjs";
4
- import { i as summarizeKnip, r as parseKnipOutput, t as compareKnipBaseline } from "./baseline-Cx3VuGue.mjs";
1
+ import { U as stopCheckProcessTree } from "./workspace-tasks-BPSq4jjn.mjs";
2
+ import { t as knipConfigurationInputs } from "./inputs-hoTJICnb.mjs";
3
+ import { planKnipCheck } from "./plan-BA_10vfL.mjs";
4
+ import { i as summarizeKnip, r as parseKnipOutput, t as compareKnipBaseline } from "./baseline-Cnw2O2JV.mjs";
5
5
  import process from "node:process";
6
6
  import { spawn } from "node:child_process";
7
7
  import { Buffer } from "node:buffer";
@@ -1,6 +1,6 @@
1
- import { ht as isWithin, mt as assertSafePath, ot as safeFile } from "./workspace-tasks-PcOR82ko.mjs";
2
- import { knipRoot } from "./plan-DkRsq9Oj.mjs";
3
- import { n as validateKnipBaseline } from "./baseline-Cx3VuGue.mjs";
1
+ import { ht as isWithin, mt as assertSafePath, ot as safeFile } from "./workspace-tasks-BPSq4jjn.mjs";
2
+ import { knipRoot } from "./plan-BA_10vfL.mjs";
3
+ import { n as validateKnipBaseline } from "./baseline-Cnw2O2JV.mjs";
4
4
  import path from "pathe";
5
5
  import { link, lstat, open, readFile, rename, unlink } from "node:fs/promises";
6
6
  import { randomUUID } from "node:crypto";
@@ -1,7 +1,6 @@
1
- import { St as localize, at as record, it as readInput, rt as hash } from "./workspace-tasks-PcOR82ko.mjs";
2
- import { A as mergeConfigValues, H as validateSchema, M as assertMonorepoConfig, f as loadMonorepoConfigDetails, j as ConfigValidationError, u as getRepoctlConfigCandidates, z as commandSchemas } from "./tsconfig-DtgBJ7Vi.mjs";
1
+ import { St as localize, at as record, it as readInput, qt as findWorkspacePackages, rt as hash } from "./workspace-tasks-BPSq4jjn.mjs";
2
+ import { A as mergeConfigValues, H as validateSchema, M as assertMonorepoConfig, f as loadMonorepoConfigDetails, j as ConfigValidationError, u as getRepoctlConfigCandidates, z as commandSchemas } from "./tsconfig-01vm_d3r.mjs";
3
3
  import { findWorkspaceDir } from "@pnpm/find-workspace-dir";
4
- import { findWorkspacePackages } from "@pnpm/workspace.find-packages";
5
4
  import path from "pathe";
6
5
  import { access, realpath } from "node:fs/promises";
7
6
  import { Range, minVersion, satisfies, subset, validRange } from "semver";
@@ -1,7 +1,7 @@
1
1
  import { t as __exportAll } from "./rolldown-runtime-8H4AJuhK.mjs";
2
- import { J as getWorkspaceGraph, St as localize, Y as parseDependencyReference, at as record$3, jt as fs$2, nt as workspaceDependencyTypes, rt as hash, ut as hasLegacyToolingReference } from "./workspace-tasks-PcOR82ko.mjs";
3
- import { E as relativeFile, T as readOptional, f as loadMonorepoConfigDetails, j as ConfigValidationError, w as hash$1 } from "./tsconfig-DtgBJ7Vi.mjs";
4
- import { a as dependencySections, i as rangesOverlap, r as parseSpecifier, t as scanDependencies } from "./scan-uUmUqFA6.mjs";
2
+ import { J as getWorkspaceGraph, St as localize, Y as parseDependencyReference, at as record$3, jt as fs$2, nt as workspaceDependencyTypes, rt as hash, ut as hasLegacyToolingReference } from "./workspace-tasks-BPSq4jjn.mjs";
3
+ import { E as relativeFile, T as readOptional, f as loadMonorepoConfigDetails, j as ConfigValidationError, w as hash$1 } from "./tsconfig-01vm_d3r.mjs";
4
+ import { a as dependencySections, i as rangesOverlap, r as parseSpecifier, t as scanDependencies } from "./scan-gJt1WqW4.mjs";
5
5
  import { findWorkspaceDir } from "@pnpm/find-workspace-dir";
6
6
  import path from "pathe";
7
7
  import process from "node:process";
@@ -1,2 +1,2 @@
1
- import { A as MonorepoVitestProjectConfigResult, C as MonorepoLintStagedConfigOptions, D as MonorepoVitestConfigOverrides, E as MonorepoVitestConfigOptions, O as MonorepoVitestConfigResult, S as MonorepoLintStagedConfig, T as MonorepoTsconfig, _ as DefineEslintConfigOptions, a as createMonorepoTsconfig, b as MonorepoCommitlintConfig, c as createMonorepoCommitlintConfig, d as defineCommitlintConfig, f as defineEslintConfig, g as DefineConfigOptions, h as defineLintStagedConfig, i as defineVitestProjectConfig, k as MonorepoVitestProjectConfigOptions, l as createMonorepoEslintConfig, m as createMonorepoLintStagedConfig, n as createMonorepoVitestProjectConfig, o as defineTsconfigConfig, p as defineStylelintConfig, r as defineVitestConfig, s as loadMonorepoToolingConfig, t as createMonorepoVitestConfig, u as createMonorepoStylelintConfig, v as DefineVitestConfigOptions, w as MonorepoStylelintConfig, x as MonorepoEslintConfig, y as DefineVitestProjectConfigOptions } from "./index-CoCTFWZJ.mjs";
1
+ import { A as MonorepoVitestProjectConfigResult, C as MonorepoLintStagedConfigOptions, D as MonorepoVitestConfigOverrides, E as MonorepoVitestConfigOptions, O as MonorepoVitestConfigResult, S as MonorepoLintStagedConfig, T as MonorepoTsconfig, _ as DefineEslintConfigOptions, a as createMonorepoTsconfig, b as MonorepoCommitlintConfig, c as createMonorepoCommitlintConfig, d as defineCommitlintConfig, f as defineEslintConfig, g as DefineConfigOptions, h as defineLintStagedConfig, i as defineVitestProjectConfig, k as MonorepoVitestProjectConfigOptions, l as createMonorepoEslintConfig, m as createMonorepoLintStagedConfig, n as createMonorepoVitestProjectConfig, o as defineTsconfigConfig, p as defineStylelintConfig, r as defineVitestConfig, s as loadMonorepoToolingConfig, t as createMonorepoVitestConfig, u as createMonorepoStylelintConfig, v as DefineVitestConfigOptions, w as MonorepoStylelintConfig, x as MonorepoEslintConfig, y as DefineVitestProjectConfigOptions } from "./index-D61zjikU.mjs";
2
2
  export { DefineConfigOptions, DefineEslintConfigOptions, DefineVitestConfigOptions, DefineVitestProjectConfigOptions, MonorepoCommitlintConfig, MonorepoEslintConfig, MonorepoLintStagedConfig, MonorepoLintStagedConfigOptions, MonorepoStylelintConfig, MonorepoTsconfig, MonorepoVitestConfigOptions, MonorepoVitestConfigOverrides, MonorepoVitestConfigResult, MonorepoVitestProjectConfigOptions, MonorepoVitestProjectConfigResult, createMonorepoCommitlintConfig, createMonorepoEslintConfig, createMonorepoLintStagedConfig, createMonorepoStylelintConfig, createMonorepoTsconfig, createMonorepoVitestConfig, createMonorepoVitestProjectConfig, defineCommitlintConfig, defineEslintConfig, defineLintStagedConfig, defineStylelintConfig, defineTsconfigConfig, defineVitestConfig, defineVitestProjectConfig, loadMonorepoToolingConfig };
@@ -1,3 +1,3 @@
1
- import { i as loadMonorepoToolingConfig, n as defineTsconfigConfig, t as createMonorepoTsconfig } from "./tsconfig-DtgBJ7Vi.mjs";
2
- import { a as createMonorepoCommitlintConfig, c as defineCommitlintConfig, d as createMonorepoLintStagedConfig, f as defineLintStagedConfig, i as defineVitestProjectConfig, l as defineEslintConfig, n as createMonorepoVitestProjectConfig, o as createMonorepoEslintConfig, r as defineVitestConfig, s as createMonorepoStylelintConfig, t as createMonorepoVitestConfig, u as defineStylelintConfig } from "./vitest-DkD49zO4.mjs";
1
+ import { i as loadMonorepoToolingConfig, n as defineTsconfigConfig, t as createMonorepoTsconfig } from "./tsconfig-01vm_d3r.mjs";
2
+ import { a as createMonorepoCommitlintConfig, c as defineCommitlintConfig, d as createMonorepoLintStagedConfig, f as defineLintStagedConfig, i as defineVitestProjectConfig, l as defineEslintConfig, n as createMonorepoVitestProjectConfig, o as createMonorepoEslintConfig, r as defineVitestConfig, s as createMonorepoStylelintConfig, t as createMonorepoVitestConfig, u as defineStylelintConfig } from "./vitest-WPpMJqzw.mjs";
3
3
  export { createMonorepoCommitlintConfig, createMonorepoEslintConfig, createMonorepoLintStagedConfig, createMonorepoStylelintConfig, createMonorepoTsconfig, createMonorepoVitestConfig, createMonorepoVitestProjectConfig, defineCommitlintConfig, defineEslintConfig, defineLintStagedConfig, defineStylelintConfig, defineTsconfigConfig, defineVitestConfig, defineVitestProjectConfig, loadMonorepoToolingConfig };
@@ -1,5 +1,5 @@
1
- import { St as localize, at as record, ot as safeFile, pt as stageFileTransaction, rt as hash, st as updateManifest } from "./workspace-tasks-PcOR82ko.mjs";
2
- import { a as dependencySections, i as rangesOverlap, n as equivalentRanges, o as matchGroup, r as parseSpecifier } from "./scan-uUmUqFA6.mjs";
1
+ import { St as localize, at as record, ot as safeFile, pt as stageFileTransaction, rt as hash, st as updateManifest } from "./workspace-tasks-BPSq4jjn.mjs";
2
+ import { a as dependencySections, i as rangesOverlap, n as equivalentRanges, o as matchGroup, r as parseSpecifier } from "./scan-gJt1WqW4.mjs";
3
3
  import { isDeepStrictEqual } from "node:util";
4
4
  //#region src/commands/deps/report.ts
5
5
  function classify(group) {
@@ -746,7 +746,7 @@ function mergeConfigValues(layers) {
746
746
  //#endregion
747
747
  //#region package.json
748
748
  var name = "@icebreakers/monorepo";
749
- var version = "5.8.0";
749
+ var version = "5.8.1";
750
750
  var package_default = {
751
751
  name,
752
752
  type: "module",
@@ -832,10 +832,10 @@ var package_default = {
832
832
  "@icebreakers/stylelint-config": "workspace:*",
833
833
  "@npmcli/config": "10.14.0",
834
834
  "@pnpm/find-workspace-dir": "^1000.1.5",
835
+ "@pnpm/fs.find-packages": "^1000.0.24",
835
836
  "@pnpm/logger": "^1100.0.0",
836
837
  "@pnpm/types": "^1102.1.1",
837
838
  "@pnpm/worker": "^1100.4.8",
838
- "@pnpm/workspace.find-packages": "^1000.0.65",
839
839
  "@pnpm/workspace.read-manifest": "^1000.3.1",
840
840
  "c12": "^3.3.4",
841
841
  "commander": "catalog:",
@@ -1,12 +1,11 @@
1
- import { a as loadToolingSection, o as resolveConfigInput, r as isDefineConfigWrapper } from "./tsconfig-DtgBJ7Vi.mjs";
1
+ import { a as loadToolingSection, o as resolveConfigInput, r as isDefineConfigWrapper } from "./tsconfig-01vm_d3r.mjs";
2
+ import { createRequire } from "node:module";
2
3
  import process from "node:process";
3
4
  import fs from "node:fs";
4
5
  import path from "node:path";
5
6
  import YAML from "yaml";
6
7
  import { icebreaker } from "@icebreakers/commitlint-config";
7
- import { icebreaker as icebreaker$1 } from "@icebreakers/eslint-config";
8
- import { icebreaker as icebreaker$2 } from "@icebreakers/stylelint-config";
9
- import { mergeConfig } from "vitest/config";
8
+ import { icebreaker as icebreaker$1 } from "@icebreakers/stylelint-config";
10
9
  //#region src/tooling/lint-staged.ts
11
10
  function escapeForShell(value) {
12
11
  return `'${value.replaceAll("'", "'\\''")}'`;
@@ -64,6 +63,7 @@ async function defineLintStagedConfig(input = {}) {
64
63
  }
65
64
  //#endregion
66
65
  //#region src/tooling/linters.ts
66
+ const require = createRequire(import.meta.url);
67
67
  function resolveEslintOptions(options = {}, configs = []) {
68
68
  const { configs: inlineConfigs = [], ...rest } = options;
69
69
  return {
@@ -135,7 +135,8 @@ async function defineCommitlintConfig(input = {}) {
135
135
  */
136
136
  function createMonorepoEslintConfig(options = {}, ...extraConfigs) {
137
137
  const { configs: resolvedConfigs = [], ...rest } = resolveEslintOptions(options, extraConfigs);
138
- return icebreaker$1(rest, ...resolvedConfigs);
138
+ const { icebreaker: createEslint } = require("@icebreakers/eslint-config");
139
+ return createEslint(rest, ...resolvedConfigs);
139
140
  }
140
141
  /**
141
142
  * 从 `repoctl.config.ts` 读取 `tooling.eslint`,并生成 ESLint 配置。
@@ -168,7 +169,7 @@ async function defineEslintConfig(input = {}, ...configs) {
168
169
  * @returns 可直接作为 `stylelint.config.js` 默认导出的配置对象
169
170
  */
170
171
  function createMonorepoStylelintConfig(options = {}) {
171
- return icebreaker$2(options);
172
+ return icebreaker$1(options);
172
173
  }
173
174
  /**
174
175
  * 从 `repoctl.config.ts` 读取 `tooling.stylelint`,并生成 Stylelint 配置。
@@ -297,7 +298,8 @@ function createMonorepoVitestConfig(options = {}) {
297
298
  forceRerunTriggers: ["**/{vitest,vite}.config.*/**"]
298
299
  } };
299
300
  }
300
- function mergeMonorepoVitestConfig(base, overrides = {}) {
301
+ async function mergeMonorepoVitestConfig(base, overrides = {}) {
302
+ const { mergeConfig } = await import("vitest/config");
301
303
  const merged = mergeConfig(base, overrides);
302
304
  if (!merged.test) return merged;
303
305
  const coverageExclude = merged.test.coverage?.exclude;
@@ -353,7 +355,7 @@ async function defineVitestConfig(input = {}) {
353
355
  return mergeMonorepoVitestConfig(createMonorepoVitestConfig({
354
356
  ...toolingBaseOptions,
355
357
  ...options
356
- }), mergeMonorepoVitestConfig(toolingOverrides, overrides));
358
+ }), await mergeMonorepoVitestConfig(toolingOverrides, overrides));
357
359
  }
358
360
  /**
359
361
  * 创建项目级 Vitest 配置。
@@ -1,12 +1,12 @@
1
1
  import { t as __exportAll } from "./rolldown-runtime-8H4AJuhK.mjs";
2
- import { f as loadMonorepoConfigDetails, j as ConfigValidationError, k as version, u as getRepoctlConfigCandidates } from "./tsconfig-DtgBJ7Vi.mjs";
2
+ import { f as loadMonorepoConfigDetails, j as ConfigValidationError, k as version, u as getRepoctlConfigCandidates } from "./tsconfig-01vm_d3r.mjs";
3
3
  import { createRequire } from "node:module";
4
4
  import gitUrlParse from "git-url-parse";
5
5
  import { simpleGit } from "simple-git";
6
6
  import { findWorkspaceDir } from "@pnpm/find-workspace-dir";
7
- import { findWorkspacePackages } from "@pnpm/workspace.find-packages";
8
7
  import { readWorkspaceManifest } from "@pnpm/workspace.read-manifest";
9
8
  import path from "pathe";
9
+ import { findPackages } from "@pnpm/fs.find-packages";
10
10
  import process from "node:process";
11
11
  import fs, { access, chmod, copyFile, cp, lstat, mkdir, mkdtemp, open, readFile, readdir, realpath, rename, rm, rmdir, stat, unlink, utimes, writeFile } from "node:fs/promises";
12
12
  import { spawnSync } from "node:child_process";
@@ -95,6 +95,16 @@ var GitClient = class {
95
95
  }
96
96
  };
97
97
  //#endregion
98
+ //#region src/core/workspace/discovery.ts
99
+ /** Discover manifests, including foreign-platform packages, without installing them. */
100
+ async function findWorkspacePackages(root, options = {}) {
101
+ return (await findPackages(root, {
102
+ ...options,
103
+ ignore: ["**/node_modules/**", "**/bower_components/**"],
104
+ includeRoot: true
105
+ })).sort((left, right) => left.rootDir < right.rootDir ? -1 : left.rootDir > right.rootDir ? 1 : 0);
106
+ }
107
+ //#endregion
98
108
  //#region src/core/workspace.ts
99
109
  var workspace_exports = /* @__PURE__ */ __exportAll({
100
110
  clearWorkspaceCache: () => clearWorkspaceCache,
@@ -1977,16 +1987,16 @@ var knip_exports = /* @__PURE__ */ __exportAll({
1977
1987
  saveKnipBaseline: () => saveKnipBaseline
1978
1988
  });
1979
1989
  async function planKnipCheck(cwd, options = {}) {
1980
- return (await import("./plan-DkRsq9Oj.mjs")).planKnipCheck(cwd, options);
1990
+ return (await import("./plan-BA_10vfL.mjs")).planKnipCheck(cwd, options);
1981
1991
  }
1982
1992
  async function runKnipCheck(cwd, options = {}) {
1983
- return (await import("./run-BHsnON3k.mjs")).runKnipCheck(cwd, options);
1993
+ return (await import("./run-ohOkzTLN.mjs")).runKnipCheck(cwd, options);
1984
1994
  }
1985
1995
  async function getKnipConfigurationSuggestions(cwd) {
1986
- return (await import("./config-ITi4Uywg.mjs")).getKnipConfigurationSuggestions(cwd);
1996
+ return (await import("./config-BfvlEAis.mjs")).getKnipConfigurationSuggestions(cwd);
1987
1997
  }
1988
1998
  async function saveKnipBaseline(cwd, report, file) {
1989
- return (await import("./save-DTVXKc6k.mjs")).saveKnipBaseline(cwd, report, file);
1999
+ return (await import("./save-HSOp4zHC.mjs")).saveKnipBaseline(cwd, report, file);
1990
2000
  }
1991
2001
  //#endregion
1992
2002
  //#region src/commands/env-cache/config.ts
@@ -4432,4 +4442,4 @@ async function locateWorkspace(cwd, query) {
4432
4442
  };
4433
4443
  }
4434
4444
  //#endregion
4435
- export { WorkspaceGraphQueryError as $, referenceTarget as A, exists$1 as At, saveKnipBaseline as B, writeJSON as Bt, loadCompiler as C, message as Ct, ownershipFile as D, copy as Dt, exists as E, supportedLocales as Et, env_cache_exports as F, outputJson as Ft, cache_exports as G, getWorkspacePackages as Gt, signalExitCode as H, clearWorkspaceCache as Ht, getKnipConfigurationSuggestions as I, pathExists as It, getWorkspaceGraph as J, mergeText as K, workspace_exports as Kt, knip_exports as L, readJSON as Lt, formatEnvironmentCache as M, isIgnorableFsError as Mt, format_exports as N, outputFile as Nt, readText as O, ensureDir as Ot, checkEnvironmentCache as P, outputJSON as Pt, whyWorkspaceDependency as Q, planKnipCheck as R, readJson as Rt, configReader as S, localize as St, compare$1 as T, resolveRepoctlLocale as Tt, stopCheckProcessTree as U, getWorkspaceData as Ut, executeCheckTask as V, writeJson as Vt, analyzeTurboRuns as W, getWorkspacePackageSummaries as Wt, filterWorkspaceGraph as X, parseDependencyReference as Y, getWorkspaceImpact as Z, planTemplateLink as _, assetsDir$1 as _t, inspectWorkspaceOwners as a, record$2 as at, planGenerate as b, rootDir as bt, loadTemplateInstanceRegistry$1 as c, renderCreateNewProject as ct, template_instances_exports as d, migrateLegacyToolingReferences as dt, compareGraphValues as et, recoverTemplateUpgrade as f, setByPath as ft, applyTemplateLinkPlan as g, validateCleanTargets as gt, loadTemplateUpgradeJournal as h, isWithin as ht, planCodeowners as i, readInput as it, relativeFile as j, fs$2 as jt, referencePath as k, ensureFile as kt, rebuildTemplateInstanceBaseline as l, rewriteTemplateSnapshotReferences as lt, planTemplateUpgrade as m, assertSafePath as mt, locateWorkspace as n, workspaceDependencyTypes as nt, listTemplateInstances as o, safeFile as ot, applyTemplateUpgradePlan as p, stageFileTransaction as pt, withOperationLock as q, GitClient as qt, applyCodeownersPlan as r, hash as rt, loadTemplateBaseline$1 as s, updateManifest as st, getWorkspaceTaskCatalog as t, resolveWorkspaceGraphNode as tt, relocateTemplateInstance as u, hasLegacyToolingReference as ut, generate_exports as v, cliName as vt, validateGraph as w, repoctlLocale as wt, generators as x, templatesDir as xt, applyGeneratePlan as y, packageDir$1 as yt, runKnipCheck as z, remove as zt };
4445
+ export { WorkspaceGraphQueryError as $, referenceTarget as A, exists$1 as At, saveKnipBaseline as B, writeJSON as Bt, loadCompiler as C, message as Ct, ownershipFile as D, copy as Dt, exists as E, supportedLocales as Et, env_cache_exports as F, outputJson as Ft, cache_exports as G, getWorkspacePackages as Gt, signalExitCode as H, clearWorkspaceCache as Ht, getKnipConfigurationSuggestions as I, pathExists as It, getWorkspaceGraph as J, GitClient as Jt, mergeText as K, workspace_exports as Kt, knip_exports as L, readJSON as Lt, formatEnvironmentCache as M, isIgnorableFsError as Mt, format_exports as N, outputFile as Nt, readText as O, ensureDir as Ot, checkEnvironmentCache as P, outputJSON as Pt, whyWorkspaceDependency as Q, planKnipCheck as R, readJson as Rt, configReader as S, localize as St, compare$1 as T, resolveRepoctlLocale as Tt, stopCheckProcessTree as U, getWorkspaceData as Ut, executeCheckTask as V, writeJson as Vt, analyzeTurboRuns as W, getWorkspacePackageSummaries as Wt, filterWorkspaceGraph as X, parseDependencyReference as Y, getWorkspaceImpact as Z, planTemplateLink as _, assetsDir$1 as _t, inspectWorkspaceOwners as a, record$2 as at, planGenerate as b, rootDir as bt, loadTemplateInstanceRegistry$1 as c, renderCreateNewProject as ct, template_instances_exports as d, migrateLegacyToolingReferences as dt, compareGraphValues as et, recoverTemplateUpgrade as f, setByPath as ft, applyTemplateLinkPlan as g, validateCleanTargets as gt, loadTemplateUpgradeJournal as h, isWithin as ht, planCodeowners as i, readInput as it, relativeFile as j, fs$2 as jt, referencePath as k, ensureFile as kt, rebuildTemplateInstanceBaseline as l, rewriteTemplateSnapshotReferences as lt, planTemplateUpgrade as m, assertSafePath as mt, locateWorkspace as n, workspaceDependencyTypes as nt, listTemplateInstances as o, safeFile as ot, applyTemplateUpgradePlan as p, stageFileTransaction as pt, withOperationLock as q, findWorkspacePackages as qt, applyCodeownersPlan as r, hash as rt, loadTemplateBaseline$1 as s, updateManifest as st, getWorkspaceTaskCatalog as t, resolveWorkspaceGraphNode as tt, relocateTemplateInstance as u, hasLegacyToolingReference as ut, generate_exports as v, cliName as vt, validateGraph as w, repoctlLocale as wt, generators as x, templatesDir as xt, applyGeneratePlan as y, packageDir$1 as yt, runKnipCheck as z, remove as zt };
package/package.json CHANGED
@@ -1,7 +1,7 @@
1
1
  {
2
2
  "name": "@icebreakers/monorepo",
3
3
  "type": "module",
4
- "version": "5.8.0",
4
+ "version": "5.8.1",
5
5
  "description": "Core engine and programmatic APIs for repoctl",
6
6
  "author": "ice breaker <hi@sonofmagic.top>",
7
7
  "license": "MIT",
@@ -80,14 +80,14 @@
80
80
  "@babel/parser": "^7.29.9",
81
81
  "@icebreakers/commitlint-config": "4.1.2",
82
82
  "@icebreakers/eslint-config": "8.0.8",
83
- "@icebreakers/monorepo-templates": "2.3.0",
83
+ "@icebreakers/monorepo-templates": "2.3.1",
84
84
  "@icebreakers/stylelint-config": "5.1.3",
85
85
  "@npmcli/config": "10.14.0",
86
86
  "@pnpm/find-workspace-dir": "^1000.1.5",
87
+ "@pnpm/fs.find-packages": "^1000.0.24",
87
88
  "@pnpm/logger": "^1100.0.0",
88
89
  "@pnpm/types": "^1102.1.1",
89
90
  "@pnpm/worker": "^1100.4.8",
90
- "@pnpm/workspace.find-packages": "^1000.0.65",
91
91
  "@pnpm/workspace.read-manifest": "^1000.3.1",
92
92
  "c12": "^3.3.4",
93
93
  "commander": "^15.0.0",