@icebreakers/monorepo 6.6.4-dev.20261125.1 → 6.6.5
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/{baseline-BS_u59AV.mjs → baseline-Bhu-HPVC.mjs} +1 -1
- package/dist/{catalog-CiaAmiTm.mjs → catalog-Dfok_O1m.mjs} +4 -4
- package/dist/cli.mjs +62 -62
- package/dist/{commands-BpMM79ah.mjs → commands-DCLuAlM6.mjs} +179 -20
- package/dist/{config-CmB-5xZ5.mjs → config-B-U5iBtL.mjs} +3 -3
- package/dist/{create-flow-CpjqS7Vf.mjs → create-flow-CzH0nD6H.mjs} +3 -3
- package/dist/{deps-DWFcbBQu.mjs → deps-DaYx1M8X.mjs} +4 -4
- package/dist/{execute-Bd-yrRBO.mjs → execute-c5yGPSrV.mjs} +2 -2
- package/dist/{execute-CowTATMR.mjs → execute-xycJ6pBM.mjs} +2 -2
- package/dist/{format-C2UJ-Xzb.mjs → format-Dv6pTsm1.mjs} +1 -1
- package/dist/{index-CFxo1hPA.d.mts → index-DYqExDsR.d.mts} +6 -1
- package/dist/index.d.mts +4 -2
- package/dist/index.mjs +9 -9
- package/dist/{inputs-Pn_oLgyr.mjs → inputs-B5M32VD6.mjs} +1 -1
- package/dist/{npm-D3cb3ygy.mjs → npm-sj1q5DRr.mjs} +1 -1
- package/dist/{plan-C4S0SIsH.mjs → plan-CmMfGs1C.mjs} +2 -2
- package/dist/{run-5k6GII0n.mjs → run-DdmfegE1.mjs} +4 -4
- package/dist/{save-LOJWHI5C.mjs → save-C-XDKSVK.mjs} +3 -3
- package/dist/{scan-C6ZqUxK0.mjs → scan-CP-pPwPx.mjs} +2 -2
- package/dist/{template-drift-D3Hwedod.mjs → template-drift-C7CarYKX.mjs} +3 -3
- package/dist/tooling-entry.d.mts +1 -1
- package/dist/tooling-entry.mjs +2 -2
- package/dist/{transaction-Cpnd5xhK.mjs → transaction-D5I0LRYS.mjs} +2 -2
- package/dist/{tsconfig-BSF6chfb.mjs → tsconfig-Cp25nXR7.mjs} +1 -0
- package/dist/{vitest-CgpUDzkr.mjs → vitest-CFxSkgbi.mjs} +1 -1
- package/dist/{workspace-tasks-DucdLmBS.mjs → workspace-tasks-FJOChctJ.mjs} +5 -5
- package/package.json +7 -15
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { at as record, rt as hash } from "./workspace-tasks-
|
|
1
|
+
import { at as record, rt as hash } from "./workspace-tasks-FJOChctJ.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
|
-
import { it as __exportAll } from "./tsconfig-
|
|
2
|
-
import { a as dependencySections, i as rangesOverlap, n as equivalentRanges, r as parseSpecifier, t as scanDependencies } from "./scan-
|
|
3
|
-
import { Lt as clearWorkspaceCache, at as record, rt as hash, st as updateManifest } from "./workspace-tasks-
|
|
4
|
-
import { i as dependencyNextSteps, n as inspectDependencyPlanInputs, o as dependencyReport, r as validateDependencyPlan, t as writeDependencyTransaction } from "./transaction-
|
|
1
|
+
import { it as __exportAll } from "./tsconfig-Cp25nXR7.mjs";
|
|
2
|
+
import { a as dependencySections, i as rangesOverlap, n as equivalentRanges, r as parseSpecifier, t as scanDependencies } from "./scan-CP-pPwPx.mjs";
|
|
3
|
+
import { Lt as clearWorkspaceCache, at as record, rt as hash, st as updateManifest } from "./workspace-tasks-FJOChctJ.mjs";
|
|
4
|
+
import { i as dependencyNextSteps, n as inspectDependencyPlanInputs, o as dependencyReport, r as validateDependencyPlan, t as writeDependencyTransaction } from "./transaction-D5I0LRYS.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 { $ as formatUpgradePlan, A as applyProjectReferencesPlan, At as renderReleasePullRequest, B as installGitHooks, E as releaseSnapshot, Et as validateSnapshotSource, G as planDocsDeployment, H as planInstallSecurityPreset, I as applyOrganizationPresetAssets, J as checkPublicApi, Jt as planUpgrade, K as checkPeerDependencies, L as planOrganizationPresetAssets, M as checkPackages, Mt as createAutoChangesetPlan, N as getMaintenanceWorkflow, Nt as getAutoChangesetWorkflow, O as checkProjectReferences, Ot as parsePublishSummary, P as prepareMaintenanceUpgrade, Q as upgradeMonorepo, S as createReleasePlan, T as formatNightlySummary, Tt as validateSnapshotBuildPlan, U as deployDocs, V as applyInstallSecurityPreset, W as DocsDeploymentError, X as planPublicApiUpdate, Y as applyPublicApiUpdate, Yt as applyUpgradePlan, Z as formatPublicApiReport, _ as createSnapshotBuildPlan, a as planWorkspaceMove, an as resolveTemplateCatalog, at as readReleasePreparationPolicy, b as createSnapshotFreezeRecord, c as applyToolingCapability, d as planTemplateValidation, dn as validateConfigFile, f as getSnapshotWorkflows, g as prepareSnapshot, h as publishPreparedSnapshot, i as applyWorkspaceMovePlan, in as createTemplateCatalog, it as validateReleasePreparation, j as planProjectReferences, jt as applyAutoChangeset, k as syncProjectReferences, kt as resolveReleaseMode, l as planToolingCapability, ln as explainMonorepoConfig, m as snapshotWorkflowDefaults, n as applyWorkspaceRemovalPlan, o as applyWorkspaceArtifactPlan, on as loadTemplateCatalogContext, p as resolveSnapshotWorkflowOptions, r as planWorkspaceRemoval, rn as resolveRemoteTemplateSource, s as planWorkspaceArtifact, u as validateTemplate, un as sanitizeConfigReport, v as verifySnapshotRun, w as releaseNightly, x as verifyPreparedSnapshotConsumer, y as freezeSnapshotSource, yt as releaseBootstrap, zt as initToolingTargets } from "./commands-
|
|
2
|
-
import { I as ConfigValidationError, P as version, S as canonicalDirectory, Z as withLegacyHookConfig, _ as listToolingCapabilities, d as loadMonorepoConfig, f as loadMonorepoConfigDetails, k as cliName, nt as splitConfigPath, p as resolveCommandConfig } from "./tsconfig-
|
|
3
|
-
import { Et as fs$1, J as getWorkspaceGraph, Q as whyWorkspaceDependency, Rt as getWorkspaceData, Z as getWorkspaceImpact, _t as localize, a as inspectWorkspaceOwners, i as planCodeowners, n as locateWorkspace, r as applyCodeownersPlan, t as getWorkspaceTaskCatalog, vt as message, xt as supportedLocales, yt as repoctlLocale } from "./workspace-tasks-
|
|
4
|
-
import { s as resolveCommandValues } from "./scan-
|
|
5
|
-
import { d as logger } from "./execute-
|
|
6
|
-
import { E as checkDependencyAdmission, T as checkWorkspaceBoundaries, f as inspectInstallSecurity } from "./template-drift-
|
|
1
|
+
import { $ as formatUpgradePlan, A as applyProjectReferencesPlan, At as renderReleasePullRequest, B as installGitHooks, E as releaseSnapshot, Et as validateSnapshotSource, G as planDocsDeployment, H as planInstallSecurityPreset, I as applyOrganizationPresetAssets, J as checkPublicApi, Jt as planUpgrade, K as checkPeerDependencies, L as planOrganizationPresetAssets, M as checkPackages, Mt as createAutoChangesetPlan, N as getMaintenanceWorkflow, Nt as getAutoChangesetWorkflow, O as checkProjectReferences, Ot as parsePublishSummary, P as prepareMaintenanceUpgrade, Q as upgradeMonorepo, S as createReleasePlan, T as formatNightlySummary, Tt as validateSnapshotBuildPlan, U as deployDocs, V as applyInstallSecurityPreset, W as DocsDeploymentError, X as planPublicApiUpdate, Y as applyPublicApiUpdate, Yt as applyUpgradePlan, Z as formatPublicApiReport, _ as createSnapshotBuildPlan, a as planWorkspaceMove, an as resolveTemplateCatalog, at as readReleasePreparationPolicy, b as createSnapshotFreezeRecord, c as applyToolingCapability, d as planTemplateValidation, dn as validateConfigFile, f as getSnapshotWorkflows, g as prepareSnapshot, h as publishPreparedSnapshot, i as applyWorkspaceMovePlan, in as createTemplateCatalog, it as validateReleasePreparation, j as planProjectReferences, jt as applyAutoChangeset, k as syncProjectReferences, kt as resolveReleaseMode, l as planToolingCapability, ln as explainMonorepoConfig, m as snapshotWorkflowDefaults, n as applyWorkspaceRemovalPlan, o as applyWorkspaceArtifactPlan, on as loadTemplateCatalogContext, p as resolveSnapshotWorkflowOptions, r as planWorkspaceRemoval, rn as resolveRemoteTemplateSource, s as planWorkspaceArtifact, u as validateTemplate, un as sanitizeConfigReport, v as verifySnapshotRun, w as releaseNightly, x as verifyPreparedSnapshotConsumer, y as freezeSnapshotSource, yt as releaseBootstrap, zt as initToolingTargets } from "./commands-DCLuAlM6.mjs";
|
|
2
|
+
import { I as ConfigValidationError, P as version, S as canonicalDirectory, Z as withLegacyHookConfig, _ as listToolingCapabilities, d as loadMonorepoConfig, f as loadMonorepoConfigDetails, k as cliName, nt as splitConfigPath, p as resolveCommandConfig } from "./tsconfig-Cp25nXR7.mjs";
|
|
3
|
+
import { Et as fs$1, J as getWorkspaceGraph, Q as whyWorkspaceDependency, Rt as getWorkspaceData, Z as getWorkspaceImpact, _t as localize, a as inspectWorkspaceOwners, i as planCodeowners, n as locateWorkspace, r as applyCodeownersPlan, t as getWorkspaceTaskCatalog, vt as message, xt as supportedLocales, yt as repoctlLocale } from "./workspace-tasks-FJOChctJ.mjs";
|
|
4
|
+
import { s as resolveCommandValues } from "./scan-CP-pPwPx.mjs";
|
|
5
|
+
import { d as logger } from "./execute-xycJ6pBM.mjs";
|
|
6
|
+
import { E as checkDependencyAdmission, T as checkWorkspaceBoundaries, f as inspectInstallSecurity } from "./template-drift-C7CarYKX.mjs";
|
|
7
7
|
import { findWorkspaceDir } from "@pnpm/find-workspace-dir";
|
|
8
8
|
import path from "pathe";
|
|
9
9
|
import process from "node:process";
|
|
@@ -56,8 +56,8 @@ function reportCliFailure(error) {
|
|
|
56
56
|
async function handleAiPromptCreate(cwd, opts) {
|
|
57
57
|
const [{ input }, { createTimestampFolderName, defaultAgenticBaseDir, generateAgenticTemplate, generateAgenticTemplates, loadAgenticTasks }, { resolveCommandConfig }] = await Promise.all([
|
|
58
58
|
import("@icebreakers/monorepo-templates"),
|
|
59
|
-
import("./commands-
|
|
60
|
-
import("./tsconfig-
|
|
59
|
+
import("./commands-DCLuAlM6.mjs").then((n) => n.t),
|
|
60
|
+
import("./tsconfig-Cp25nXR7.mjs").then((n) => n.c)
|
|
61
61
|
]);
|
|
62
62
|
const aiConfig = await resolveCommandConfig("ai", cwd);
|
|
63
63
|
const resolved = resolveCommandValues("ai", aiConfig, {
|
|
@@ -244,7 +244,7 @@ function registerConfigCommands(program, cwd) {
|
|
|
244
244
|
if (!report.valid) throw new ConfigValidationError(report.diagnostics);
|
|
245
245
|
await emitConfigInspection(report, opts, cwd, report);
|
|
246
246
|
} else {
|
|
247
|
-
const { inspectMonorepoConfig } = await import("./commands-
|
|
247
|
+
const { inspectMonorepoConfig } = await import("./commands-DCLuAlM6.mjs").then((n) => n.t);
|
|
248
248
|
await emitConfigInspection(await inspectMonorepoConfig(cwd), opts, cwd);
|
|
249
249
|
}
|
|
250
250
|
} catch (error) {
|
|
@@ -295,7 +295,7 @@ const output$2 = (value) => process.stdout.write(`${JSON.stringify(value, null,
|
|
|
295
295
|
function registerCatalogCommands(deps, cwd) {
|
|
296
296
|
const catalog = deps.command("catalog").description(localize("Inspect pnpm catalogs and review coordinated migrations", "巡检 pnpm catalog 并审阅联动迁移"));
|
|
297
297
|
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) => {
|
|
298
|
-
const { checkCatalogs } = await import("./catalog-
|
|
298
|
+
const { checkCatalogs } = await import("./catalog-Dfok_O1m.mjs").then((n) => n.t);
|
|
299
299
|
const report = await checkCatalogs(cwd, options);
|
|
300
300
|
if (options.json) output$2(report);
|
|
301
301
|
else {
|
|
@@ -305,7 +305,7 @@ function registerCatalogCommands(deps, cwd) {
|
|
|
305
305
|
if (report.summary.missing || report.summary.direct) process.exitCode = 1;
|
|
306
306
|
});
|
|
307
307
|
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) => {
|
|
308
|
-
const { planCatalogMigration } = await import("./catalog-
|
|
308
|
+
const { planCatalogMigration } = await import("./catalog-Dfok_O1m.mjs").then((n) => n.t);
|
|
309
309
|
const plan = await planCatalogMigration(cwd, {
|
|
310
310
|
dependency,
|
|
311
311
|
...options
|
|
@@ -317,7 +317,7 @@ function registerCatalogCommands(deps, cwd) {
|
|
|
317
317
|
}
|
|
318
318
|
});
|
|
319
319
|
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) => {
|
|
320
|
-
const { applyCatalogMigrationPlan } = await import("./catalog-
|
|
320
|
+
const { applyCatalogMigrationPlan } = await import("./catalog-Dfok_O1m.mjs").then((n) => n.t);
|
|
321
321
|
const result = await applyCatalogMigrationPlan(cwd, JSON.parse(await readFile(file, "utf8")));
|
|
322
322
|
if (options.json) output$2(result);
|
|
323
323
|
else process.stdout.write(`${result.status}: ${result.changed.join(", ")}\n${result.nextSteps.join("\n")}\n`);
|
|
@@ -342,7 +342,7 @@ function registerDepsCommands(program, cwd) {
|
|
|
342
342
|
registerDependencyAdmission(deps, cwd);
|
|
343
343
|
registerCatalogCommands(deps, cwd);
|
|
344
344
|
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) => {
|
|
345
|
-
const { checkDependencies } = await import("./deps-
|
|
345
|
+
const { checkDependencies } = await import("./deps-DaYx1M8X.mjs").then((n) => n.n);
|
|
346
346
|
const report = await checkDependencies(cwd);
|
|
347
347
|
if (options.json) output$1(report);
|
|
348
348
|
else for (const group of report.groups) {
|
|
@@ -352,7 +352,7 @@ function registerDepsCommands(program, cwd) {
|
|
|
352
352
|
if (report.summary.equivalent + report.summary.compatible + report.summary.conflict > 0) process.exitCode = 1;
|
|
353
353
|
});
|
|
354
354
|
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) => {
|
|
355
|
-
const { planDependencyFix } = await import("./deps-
|
|
355
|
+
const { planDependencyFix } = await import("./deps-DaYx1M8X.mjs").then((n) => n.n);
|
|
356
356
|
const plan = await planDependencyFix(cwd, {
|
|
357
357
|
dependency,
|
|
358
358
|
section: options.section,
|
|
@@ -367,7 +367,7 @@ function registerDepsCommands(program, cwd) {
|
|
|
367
367
|
process.stdout.write(localize("Preview only. Save --json output, review it, then run deps apply <plan.json>.\n", "仅预览。保存并审阅 --json 输出,然后执行 deps apply <plan.json>。\n"));
|
|
368
368
|
});
|
|
369
369
|
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) => {
|
|
370
|
-
const { applyDependencyFixPlan } = await import("./deps-
|
|
370
|
+
const { applyDependencyFixPlan } = await import("./deps-DaYx1M8X.mjs").then((n) => n.n);
|
|
371
371
|
const result = await applyDependencyFixPlan(cwd, JSON.parse(await readFile(file, "utf8")));
|
|
372
372
|
if (options.json) output$1(result);
|
|
373
373
|
else {
|
|
@@ -405,8 +405,8 @@ function registerDocsCommands(program, cwd) {
|
|
|
405
405
|
function registerEnvironmentCheck(command, cwd) {
|
|
406
406
|
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) => {
|
|
407
407
|
if (options.json && options.markdown) throw new Error("--json and --markdown cannot be combined");
|
|
408
|
-
const { checkEnvironmentCache } = await import("./workspace-tasks-
|
|
409
|
-
const { formatEnvironmentCache } = await import("./workspace-tasks-
|
|
408
|
+
const { checkEnvironmentCache } = await import("./workspace-tasks-FJOChctJ.mjs").then((n) => n.F);
|
|
409
|
+
const { formatEnvironmentCache } = await import("./workspace-tasks-FJOChctJ.mjs").then((n) => n.N);
|
|
410
410
|
const report = await checkEnvironmentCache(cwd, {
|
|
411
411
|
...tasks.length ? { tasks } : {},
|
|
412
412
|
...action.getOptionValueSource("frameworkInference") === "cli" ? { frameworkInference: options.frameworkInference } : {}
|
|
@@ -729,23 +729,23 @@ function registerEnvCommands(program, cwd) {
|
|
|
729
729
|
const envCommand = program.command("env").alias("e").description(localize("Environment and support commands", "环境命令"));
|
|
730
730
|
registerEnvironmentCheck(envCommand, cwd);
|
|
731
731
|
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) => {
|
|
732
|
-
const { collectEnvInfo } = await import("./commands-
|
|
732
|
+
const { collectEnvInfo } = await import("./commands-DCLuAlM6.mjs").then((n) => n.t);
|
|
733
733
|
await emitEnvInfo(await collectEnvInfo(cwd), opts, cwd);
|
|
734
734
|
});
|
|
735
735
|
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) => {
|
|
736
|
-
const { collectEnvSnapshot } = await import("./commands-
|
|
736
|
+
const { collectEnvSnapshot } = await import("./commands-DCLuAlM6.mjs").then((n) => n.t);
|
|
737
737
|
await emitEnvSnapshot(await collectEnvSnapshot(cwd), opts, cwd);
|
|
738
738
|
});
|
|
739
739
|
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) => {
|
|
740
|
-
const { collectEnvPaths } = await import("./commands-
|
|
740
|
+
const { collectEnvPaths } = await import("./commands-DCLuAlM6.mjs").then((n) => n.t);
|
|
741
741
|
await emitEnvPaths(await collectEnvPaths(cwd), opts, cwd);
|
|
742
742
|
});
|
|
743
743
|
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) => {
|
|
744
|
-
const { collectEnvSupportBundle } = await import("./commands-
|
|
744
|
+
const { collectEnvSupportBundle } = await import("./commands-DCLuAlM6.mjs").then((n) => n.t);
|
|
745
745
|
await emitEnvSupportBundle(await collectEnvSupportBundle(cwd), opts, cwd);
|
|
746
746
|
});
|
|
747
747
|
envCommand.command("mirror").description(localize("Configure the VS Code binary mirror", "设置 VS Code binary mirror")).alias("m").action(async () => {
|
|
748
|
-
const { setVscodeBinaryMirror } = await import("./commands-
|
|
748
|
+
const { setVscodeBinaryMirror } = await import("./commands-DCLuAlM6.mjs").then((n) => n.t);
|
|
749
749
|
await setVscodeBinaryMirror(cwd);
|
|
750
750
|
logger.success(localize("Environment mirror finished.", "环境镜像完成。"));
|
|
751
751
|
});
|
|
@@ -754,7 +754,7 @@ function registerEnvCommands(program, cwd) {
|
|
|
754
754
|
function registerGenerateCommand(program, cwd) {
|
|
755
755
|
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) => {
|
|
756
756
|
try {
|
|
757
|
-
const { applyGeneratePlan, planGenerate } = await import("./workspace-tasks-
|
|
757
|
+
const { applyGeneratePlan, planGenerate } = await import("./workspace-tasks-FJOChctJ.mjs").then((n) => n.v);
|
|
758
758
|
const extra = options.params ? JSON.parse(options.params) : {};
|
|
759
759
|
if (!extra || typeof extra !== "object" || Array.isArray(extra)) throw new Error("--params must contain a JSON object.");
|
|
760
760
|
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.");
|
|
@@ -852,7 +852,7 @@ function registerPackageCommands(program, cwd) {
|
|
|
852
852
|
registerPackageCheckCommand(packageCommand, cwd);
|
|
853
853
|
registerPublicApiCommands(packageCommand, cwd);
|
|
854
854
|
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) => {
|
|
855
|
-
const { runCreateFlow } = await import("./create-flow-
|
|
855
|
+
const { runCreateFlow } = await import("./create-flow-CzH0nD6H.mjs");
|
|
856
856
|
const result = await runCreateFlow(cwd, inputName, {
|
|
857
857
|
...opts.offline !== void 0 ? { offline: opts.offline } : {},
|
|
858
858
|
...opts.cacheDir ? { cacheDir: opts.cacheDir } : {},
|
|
@@ -1621,7 +1621,7 @@ function registerReleaseCommands(program, cwd) {
|
|
|
1621
1621
|
registerAutoChangeset(releaseCommand, cwd);
|
|
1622
1622
|
releaseCommand.command("ci").description(localize("Prepare, publish, or recover versions in CI", "在 CI 中自动准备、发布和恢复版本")).option("--stage <stage>", "all / plan / verify / prepare / upload / confirm / finalize", "all").option("--mode <mode>", "auto / prepare / publish / publish-unpublished / reconcile / oidc-audit", "auto").option("--package <name>", localize("Exact package for recovery or OIDC audit", "恢复发布或 OIDC 审计精确指定的 package")).option("--version <version>", localize("Version used by publish-unpublished mode", "publish-unpublished 使用的版本")).option("--source-sha <sha>", localize("Recover a prepared release from the selected line history", "从所选发布线的历史提交恢复整批发布")).option("--dry-run", localize("Preview reconcile changes without updating GitHub", "只预览 reconcile 变更,不更新 GitHub")).action(async (opts) => {
|
|
1623
1623
|
await runReleaseAction(async () => {
|
|
1624
|
-
const { releaseCi } = await import("./commands-
|
|
1624
|
+
const { releaseCi } = await import("./commands-DCLuAlM6.mjs").then((n) => n.t);
|
|
1625
1625
|
const mode = resolveReleaseMode(opts);
|
|
1626
1626
|
await releaseCi({
|
|
1627
1627
|
...mode === "oidc-audit" ? { cwd } : await resolveReleaseOptions(cwd),
|
|
@@ -1637,7 +1637,7 @@ function registerReleaseCommands(program, cwd) {
|
|
|
1637
1637
|
});
|
|
1638
1638
|
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) => {
|
|
1639
1639
|
await runReleaseAction(async () => {
|
|
1640
|
-
const { repairReleaseNotes } = await import("./commands-
|
|
1640
|
+
const { repairReleaseNotes } = await import("./commands-DCLuAlM6.mjs").then((n) => n.t);
|
|
1641
1641
|
const result = await repairReleaseNotes({
|
|
1642
1642
|
cwd,
|
|
1643
1643
|
...opts.all ? { all: true } : {},
|
|
@@ -1650,7 +1650,7 @@ function registerReleaseCommands(program, cwd) {
|
|
|
1650
1650
|
});
|
|
1651
1651
|
const stableCommand = releaseCommand.command("stable").description(localize("Run a stable release from the configured release line", "在配置的正式发布线执行发布")).action(async () => {
|
|
1652
1652
|
await runReleaseAction(async () => {
|
|
1653
|
-
const { releaseCi } = await import("./commands-
|
|
1653
|
+
const { releaseCi } = await import("./commands-DCLuAlM6.mjs").then((n) => n.t);
|
|
1654
1654
|
await releaseCi({
|
|
1655
1655
|
...await resolveReleaseOptions(cwd),
|
|
1656
1656
|
mode: "publish"
|
|
@@ -1660,7 +1660,7 @@ function registerReleaseCommands(program, cwd) {
|
|
|
1660
1660
|
});
|
|
1661
1661
|
stableCommand.command("prepare").description(localize("Consume pnpm change intents and prepare a Release PR", "消费 pnpm change intents 并准备 Release PR")).action(async () => {
|
|
1662
1662
|
await runReleaseAction(async () => {
|
|
1663
|
-
const { releaseCi } = await import("./commands-
|
|
1663
|
+
const { releaseCi } = await import("./commands-DCLuAlM6.mjs").then((n) => n.t);
|
|
1664
1664
|
await releaseCi({
|
|
1665
1665
|
...await resolveReleaseOptions(cwd),
|
|
1666
1666
|
mode: "prepare"
|
|
@@ -1670,7 +1670,7 @@ function registerReleaseCommands(program, cwd) {
|
|
|
1670
1670
|
});
|
|
1671
1671
|
stableCommand.command("publish").description(localize("Publish prepared versions from the configured release line", "发布所选发布线已经准备的包版本")).action(async () => {
|
|
1672
1672
|
await runReleaseAction(async () => {
|
|
1673
|
-
const { releaseCi } = await import("./commands-
|
|
1673
|
+
const { releaseCi } = await import("./commands-DCLuAlM6.mjs").then((n) => n.t);
|
|
1674
1674
|
await releaseCi({
|
|
1675
1675
|
...await resolveReleaseOptions(cwd),
|
|
1676
1676
|
mode: "publish"
|
|
@@ -1681,21 +1681,21 @@ function registerReleaseCommands(program, cwd) {
|
|
|
1681
1681
|
const preCommand = releaseCommand.command("pre").description(localize("Run or manage prereleases", "执行或管理 prerelease 发布"));
|
|
1682
1682
|
preCommand.command("publish").alias("run").description(localize("Publish from a configured prerelease branch", "在已配置的预发布分支发布 prerelease")).action(async () => {
|
|
1683
1683
|
await runReleaseAction(async () => {
|
|
1684
|
-
const { releaseCi } = await import("./commands-
|
|
1684
|
+
const { releaseCi } = await import("./commands-DCLuAlM6.mjs").then((n) => n.t);
|
|
1685
1685
|
await releaseCi(await resolveReleaseOptions(cwd));
|
|
1686
1686
|
logger.success(localize("Prerelease finished.", "预发布完成。"));
|
|
1687
1687
|
});
|
|
1688
1688
|
});
|
|
1689
1689
|
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) => {
|
|
1690
1690
|
await runReleaseAction(async () => {
|
|
1691
|
-
const { enterPrerelease } = await import("./commands-
|
|
1691
|
+
const { enterPrerelease } = await import("./commands-DCLuAlM6.mjs").then((n) => n.t);
|
|
1692
1692
|
await enterPrerelease(tag, { cwd });
|
|
1693
1693
|
logger.success(localize(`Entered ${tag} prerelease mode.`, `已进入 ${tag} 预发布模式。`));
|
|
1694
1694
|
});
|
|
1695
1695
|
});
|
|
1696
1696
|
preCommand.command("exit").description(localize("Exit the pnpm prerelease lane", "退出 pnpm prerelease lane")).action(async () => {
|
|
1697
1697
|
await runReleaseAction(async () => {
|
|
1698
|
-
const { exitPrerelease } = await import("./commands-
|
|
1698
|
+
const { exitPrerelease } = await import("./commands-DCLuAlM6.mjs").then((n) => n.t);
|
|
1699
1699
|
const target = await exitPrerelease({ cwd });
|
|
1700
1700
|
logger.success(localize(`Exited prerelease mode. Stable target: ${target.branch}.`, `已退出预发布模式,正式目标分支:${target.branch}。`));
|
|
1701
1701
|
});
|
|
@@ -1711,7 +1711,7 @@ const skillTargets = [
|
|
|
1711
1711
|
];
|
|
1712
1712
|
function registerSkillsCommands(program, cwd) {
|
|
1713
1713
|
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) => {
|
|
1714
|
-
const { syncSkills } = await import("./commands-
|
|
1714
|
+
const { syncSkills } = await import("./commands-DCLuAlM6.mjs").then((n) => n.t);
|
|
1715
1715
|
const selected = /* @__PURE__ */ new Set();
|
|
1716
1716
|
if (opts.all) for (const target of skillTargets) selected.add(target);
|
|
1717
1717
|
else {
|
|
@@ -1745,7 +1745,7 @@ async function emitTemplateReport(value, options) {
|
|
|
1745
1745
|
// src/cli/commands/template-instances/drift.ts
|
|
1746
1746
|
function registerTemplateDriftCommand(templates) {
|
|
1747
1747
|
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) => {
|
|
1748
|
-
const { checkTemplateDrift, formatTemplateDriftReport, hasTemplateDriftIssues } = await import("./template-drift-
|
|
1748
|
+
const { checkTemplateDrift, formatTemplateDriftReport, hasTemplateDriftIssues } = await import("./template-drift-C7CarYKX.mjs").then((n) => n.n);
|
|
1749
1749
|
const merged = {
|
|
1750
1750
|
...command.optsWithGlobals(),
|
|
1751
1751
|
...options
|
|
@@ -1763,7 +1763,7 @@ function registerTemplateDriftCommand(templates) {
|
|
|
1763
1763
|
// src/cli/commands/template-instances/upgrade.ts
|
|
1764
1764
|
function registerTemplateUpgradeCommands(templates) {
|
|
1765
1765
|
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) => {
|
|
1766
|
-
const { planTemplateUpgrade, applyTemplateUpgradePlan } = await import("./workspace-tasks-
|
|
1766
|
+
const { planTemplateUpgrade, applyTemplateUpgradePlan } = await import("./workspace-tasks-FJOChctJ.mjs").then((n) => n.d);
|
|
1767
1767
|
const plan = await planTemplateUpgrade({
|
|
1768
1768
|
cwd: await templateWorkspaceRoot(),
|
|
1769
1769
|
instance,
|
|
@@ -1777,7 +1777,7 @@ function registerTemplateUpgradeCommands(templates) {
|
|
|
1777
1777
|
});
|
|
1778
1778
|
});
|
|
1779
1779
|
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) => {
|
|
1780
|
-
const { recoverTemplateUpgrade } = await import("./workspace-tasks-
|
|
1780
|
+
const { recoverTemplateUpgrade } = await import("./workspace-tasks-FJOChctJ.mjs").then((n) => n.d);
|
|
1781
1781
|
await emitTemplateReport(await recoverTemplateUpgrade(await templateWorkspaceRoot(), instance, options.apply), {
|
|
1782
1782
|
...command.optsWithGlobals(),
|
|
1783
1783
|
...options
|
|
@@ -1789,7 +1789,7 @@ function registerTemplateInstanceCommands(templates) {
|
|
|
1789
1789
|
registerTemplateDriftCommand(templates);
|
|
1790
1790
|
registerTemplateUpgradeCommands(templates);
|
|
1791
1791
|
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) => {
|
|
1792
|
-
const { listTemplateInstances } = await import("./workspace-tasks-
|
|
1792
|
+
const { listTemplateInstances } = await import("./workspace-tasks-FJOChctJ.mjs").then((n) => n.d);
|
|
1793
1793
|
const instances = await listTemplateInstances(await templateWorkspaceRoot());
|
|
1794
1794
|
const selected = target ? instances.filter((item) => item.instance.id === target || item.instance.target === target) : instances;
|
|
1795
1795
|
if (target && !selected.length) throw new Error(`Unknown template instance: ${target}`);
|
|
@@ -1802,7 +1802,7 @@ function registerTemplateInstanceCommands(templates) {
|
|
|
1802
1802
|
});
|
|
1803
1803
|
});
|
|
1804
1804
|
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) => {
|
|
1805
|
-
const { applyTemplateLinkPlan, planTemplateLink } = await import("./workspace-tasks-
|
|
1805
|
+
const { applyTemplateLinkPlan, planTemplateLink } = await import("./workspace-tasks-FJOChctJ.mjs").then((n) => n.d);
|
|
1806
1806
|
const plan = await planTemplateLink({
|
|
1807
1807
|
cwd: await templateWorkspaceRoot(),
|
|
1808
1808
|
target,
|
|
@@ -1822,14 +1822,14 @@ function registerTemplateInstanceCommands(templates) {
|
|
|
1822
1822
|
});
|
|
1823
1823
|
});
|
|
1824
1824
|
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) => {
|
|
1825
|
-
const { relocateTemplateInstance } = await import("./workspace-tasks-
|
|
1825
|
+
const { relocateTemplateInstance } = await import("./workspace-tasks-FJOChctJ.mjs").then((n) => n.d);
|
|
1826
1826
|
await emitTemplateReport(await relocateTemplateInstance(await templateWorkspaceRoot(), instance, target, options.apply), {
|
|
1827
1827
|
...command.optsWithGlobals(),
|
|
1828
1828
|
...options
|
|
1829
1829
|
});
|
|
1830
1830
|
});
|
|
1831
1831
|
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) => {
|
|
1832
|
-
const { rebuildTemplateInstanceBaseline } = await import("./workspace-tasks-
|
|
1832
|
+
const { rebuildTemplateInstanceBaseline } = await import("./workspace-tasks-FJOChctJ.mjs").then((n) => n.d);
|
|
1833
1833
|
await emitTemplateReport({
|
|
1834
1834
|
instance: (await rebuildTemplateInstanceBaseline(await templateWorkspaceRoot(), instance, path.resolve(options.destination), options.original ? "original" : "rendered")).id,
|
|
1835
1835
|
destination: path.resolve(options.destination)
|
|
@@ -2030,7 +2030,7 @@ function registerTemplatesCommands(program) {
|
|
|
2030
2030
|
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) => {
|
|
2031
2031
|
const { isTemplateCategory, suggestTemplateKey, templateCategories } = await import("@icebreakers/monorepo-templates");
|
|
2032
2032
|
if (opts.check) {
|
|
2033
|
-
const { checkTemplates } = await import("./commands-
|
|
2033
|
+
const { checkTemplates } = await import("./commands-DCLuAlM6.mjs").then((n) => n.t);
|
|
2034
2034
|
const report = await checkTemplates();
|
|
2035
2035
|
if (opts.json) await emitTemplateOutput(JSON.stringify(report, null, 2), opts);
|
|
2036
2036
|
else await emitTemplateOutput(formatTemplateHealthReport(report, !opts.out), opts);
|
|
@@ -2151,7 +2151,7 @@ function registerCapabilityCommands(toolingCommand, cwd) {
|
|
|
2151
2151
|
function registerDevContainerCommand(command, cwd) {
|
|
2152
2152
|
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) => {
|
|
2153
2153
|
const options = current.optsWithGlobals();
|
|
2154
|
-
const { applyDevContainerPlan, planDevContainer } = await import("./commands-
|
|
2154
|
+
const { applyDevContainerPlan, planDevContainer } = await import("./commands-DCLuAlM6.mjs").then((n) => n.t);
|
|
2155
2155
|
if (options.apply) {
|
|
2156
2156
|
if (options.nodeVersion || options.dryRun || options.out) throw new Error("--apply cannot be combined with preview or selection options.");
|
|
2157
2157
|
const filename = path.resolve(cwd, options.apply);
|
|
@@ -2211,7 +2211,7 @@ function registerToolingCommands(program, cwd) {
|
|
|
2211
2211
|
registerHooksCommands(toolingCommand, cwd);
|
|
2212
2212
|
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) => {
|
|
2213
2213
|
const normalizedTooling = normalizeToolingTargets(tooling);
|
|
2214
|
-
const { initTooling } = await import("./commands-
|
|
2214
|
+
const { initTooling } = await import("./commands-DCLuAlM6.mjs").then((n) => n.t);
|
|
2215
2215
|
await initTooling(cwd, {
|
|
2216
2216
|
...normalizedTooling ? { targets: normalizedTooling } : {},
|
|
2217
2217
|
...opts.all !== void 0 ? { all: opts.all } : {},
|
|
@@ -2234,8 +2234,8 @@ function registerCacheAnalysis(check, cwd) {
|
|
|
2234
2234
|
const markdown = options.markdown || parent["markdown"] === true;
|
|
2235
2235
|
if (json && markdown) throw new Error("--json and --markdown cannot be combined");
|
|
2236
2236
|
const own = command.opts();
|
|
2237
|
-
const { analyzeTurboRuns } = await import("./workspace-tasks-
|
|
2238
|
-
const { formatTurboAnalysis } = await import("./format-
|
|
2237
|
+
const { analyzeTurboRuns } = await import("./workspace-tasks-FJOChctJ.mjs").then((n) => n.G);
|
|
2238
|
+
const { formatTurboAnalysis } = await import("./format-Dv6pTsm1.mjs");
|
|
2239
2239
|
const result = await analyzeTurboRuns(path.resolve(cwd, current), {
|
|
2240
2240
|
...previous !== void 0 ? { previous: path.resolve(cwd, previous) } : {},
|
|
2241
2241
|
...own.slowest !== void 0 ? { slowest: Number(own.slowest) } : {}
|
|
@@ -2262,7 +2262,7 @@ function registerKnipCheck(check, cwd) {
|
|
|
2262
2262
|
};
|
|
2263
2263
|
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.");
|
|
2264
2264
|
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.");
|
|
2265
|
-
const { getKnipConfigurationSuggestions, planKnipCheck, runKnipCheck, saveKnipBaseline } = await import("./workspace-tasks-
|
|
2265
|
+
const { getKnipConfigurationSuggestions, planKnipCheck, runKnipCheck, saveKnipBaseline } = await import("./workspace-tasks-FJOChctJ.mjs").then((n) => n.L);
|
|
2266
2266
|
if (opts.recommendConfig) {
|
|
2267
2267
|
process.stdout.write(`${JSON.stringify(await getKnipConfigurationSuggestions(cwd), null, 2)}\n`);
|
|
2268
2268
|
return;
|
|
@@ -2414,7 +2414,7 @@ function registerCheckCommand(program, cwd) {
|
|
|
2414
2414
|
...opts.globalInput ? { globalInputs: opts.globalInput } : {}
|
|
2415
2415
|
};
|
|
2416
2416
|
if (opts.matrix) {
|
|
2417
|
-
const { resolveAffectedCheckMatrix } = await import("./commands-
|
|
2417
|
+
const { resolveAffectedCheckMatrix } = await import("./commands-DCLuAlM6.mjs").then((n) => n.t);
|
|
2418
2418
|
const matrix = await resolveAffectedCheckMatrix({
|
|
2419
2419
|
...options,
|
|
2420
2420
|
...opts.shards !== void 0 ? { shards: Number(opts.shards) } : {}
|
|
@@ -2428,19 +2428,19 @@ function registerCheckCommand(program, cwd) {
|
|
|
2428
2428
|
if (opts.dryRun || opts.json || opts.markdown || opts.out) throw new Error("--report cannot be combined with preview options: --dry-run, --json, --markdown, --out");
|
|
2429
2429
|
const format = opts.reportFormat ?? "json";
|
|
2430
2430
|
if (format !== "json" && format !== "markdown") throw new Error("--report-format must be json or markdown");
|
|
2431
|
-
const { runCheckExecution } = await import("./execute-
|
|
2431
|
+
const { runCheckExecution } = await import("./execute-c5yGPSrV.mjs");
|
|
2432
2432
|
await runCheckExecution(options, opts.report, format, opts.redact);
|
|
2433
2433
|
return;
|
|
2434
2434
|
}
|
|
2435
|
-
const { resolveRecommendedCheckPlan, runRecommendedCheck } = await import("./commands-
|
|
2435
|
+
const { resolveRecommendedCheckPlan, runRecommendedCheck } = await import("./commands-DCLuAlM6.mjs").then((n) => n.t);
|
|
2436
2436
|
if (opts.dryRun || opts.json || opts.markdown || opts.out) {
|
|
2437
2437
|
if (opts.affected) {
|
|
2438
|
-
const { resolveAffectedCheckPlan } = await import("./commands-
|
|
2438
|
+
const { resolveAffectedCheckPlan } = await import("./commands-DCLuAlM6.mjs").then((n) => n.t);
|
|
2439
2439
|
await emitCheckPlan(await resolveAffectedCheckPlan(options), opts, cwd);
|
|
2440
2440
|
return;
|
|
2441
2441
|
}
|
|
2442
2442
|
if (opts.full) {
|
|
2443
|
-
const { resolveFullWorkspaceCheckPlan } = await import("./commands-
|
|
2443
|
+
const { resolveFullWorkspaceCheckPlan } = await import("./commands-DCLuAlM6.mjs").then((n) => n.t);
|
|
2444
2444
|
await emitCheckPlan(await resolveFullWorkspaceCheckPlan(cwd), opts, cwd);
|
|
2445
2445
|
return;
|
|
2446
2446
|
}
|
|
@@ -2448,7 +2448,7 @@ function registerCheckCommand(program, cwd) {
|
|
|
2448
2448
|
return;
|
|
2449
2449
|
}
|
|
2450
2450
|
if (opts.affected) {
|
|
2451
|
-
const { runCheckExecution } = await import("./execute-
|
|
2451
|
+
const { runCheckExecution } = await import("./execute-c5yGPSrV.mjs");
|
|
2452
2452
|
await runCheckExecution(options);
|
|
2453
2453
|
return;
|
|
2454
2454
|
}
|
|
@@ -2670,7 +2670,7 @@ async function emitDoctorReport(report, opts, cwd) {
|
|
|
2670
2670
|
}
|
|
2671
2671
|
function registerDoctorCommand(program, cwd) {
|
|
2672
2672
|
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) => {
|
|
2673
|
-
const commands = await import("./commands-
|
|
2673
|
+
const commands = await import("./commands-DCLuAlM6.mjs").then((n) => n.t);
|
|
2674
2674
|
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.");
|
|
2675
2675
|
if (opts.listRules || opts.fix || opts.apply) {
|
|
2676
2676
|
if (opts.markdown || opts.redact) throw new Error("--markdown and --redact apply to diagnostic reports, not rule lists or executable plans.");
|
|
@@ -2737,7 +2737,7 @@ function registerUpgradeCommand(parent, cwd, alias) {
|
|
|
2737
2737
|
// src/cli/commands/top-level.ts
|
|
2738
2738
|
function registerTopLevelCommands(program, cwd) {
|
|
2739
2739
|
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) => {
|
|
2740
|
-
const { init } = await import("./commands-
|
|
2740
|
+
const { init } = await import("./commands-DCLuAlM6.mjs").then((n) => n.t);
|
|
2741
2741
|
const config = await loadMonorepoConfig(cwd);
|
|
2742
2742
|
const { preset } = resolveCommandValues("init", config.commands?.init, { preset: opts.preset }, { entry: "cli" }).values;
|
|
2743
2743
|
await init(cwd, {
|
|
@@ -2750,7 +2750,7 @@ function registerTopLevelCommands(program, cwd) {
|
|
|
2750
2750
|
logger.info(localize("Next: run `pnpm install` and `pnpm build`.", "下一步:运行 `pnpm install` 和 `pnpm build`。"));
|
|
2751
2751
|
});
|
|
2752
2752
|
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) => {
|
|
2753
|
-
const { runCreateFlow } = await import("./create-flow-
|
|
2753
|
+
const { runCreateFlow } = await import("./create-flow-CzH0nD6H.mjs");
|
|
2754
2754
|
const result = await runCreateFlow(cwd, inputName, {
|
|
2755
2755
|
...opts.offline !== void 0 ? { offline: opts.offline } : {},
|
|
2756
2756
|
...opts.cacheDir ? { cacheDir: opts.cacheDir } : {},
|
|
@@ -2772,22 +2772,22 @@ function registerTopLevelCommands(program, cwd) {
|
|
|
2772
2772
|
function registerVerifyCommands(program, cwd) {
|
|
2773
2773
|
const verifyCommand = program.command("verify").alias("v").description(localize("Local verification commands", "本地校验工具集"));
|
|
2774
2774
|
verifyCommand.command("pre-push").description(localize("Run build, test, and tsd checks for pushed changes", "按推送变更范围执行 build/test/tsd 校验")).alias("push").action(async () => {
|
|
2775
|
-
const { verifyPrePush } = await import("./commands-
|
|
2775
|
+
const { verifyPrePush } = await import("./commands-DCLuAlM6.mjs").then((n) => n.t);
|
|
2776
2776
|
await verifyPrePush({ cwd });
|
|
2777
2777
|
});
|
|
2778
2778
|
verifyCommand.command("pre-commit").description(localize("Run Lefthook verification", "执行 Lefthook 校验")).alias("commit").action(async () => {
|
|
2779
|
-
const { verifyPreCommit } = await import("./commands-
|
|
2779
|
+
const { verifyPreCommit } = await import("./commands-DCLuAlM6.mjs").then((n) => n.t);
|
|
2780
2780
|
await verifyPreCommit({ cwd });
|
|
2781
2781
|
});
|
|
2782
2782
|
verifyCommand.command("commit-msg").description(localize("Run commitlint verification", "执行 commitlint 校验")).alias("msg").argument("<edit-file>").action(async (editFile) => {
|
|
2783
|
-
const { verifyCommitMsg } = await import("./commands-
|
|
2783
|
+
const { verifyCommitMsg } = await import("./commands-DCLuAlM6.mjs").then((n) => n.t);
|
|
2784
2784
|
await verifyCommitMsg({
|
|
2785
2785
|
cwd,
|
|
2786
2786
|
editFile
|
|
2787
2787
|
});
|
|
2788
2788
|
});
|
|
2789
2789
|
verifyCommand.command("staged-typecheck").description(localize("Run typecheck in workspaces containing staged files", "按暂存文件所在 workspace 执行 typecheck")).alias("tc").argument("[files...]").action(async (files = []) => {
|
|
2790
|
-
const { verifyStagedTypecheck } = await import("./commands-
|
|
2790
|
+
const { verifyStagedTypecheck } = await import("./commands-DCLuAlM6.mjs").then((n) => n.t);
|
|
2791
2791
|
await verifyStagedTypecheck(files.length ? files : void 0, { cwd });
|
|
2792
2792
|
});
|
|
2793
2793
|
}
|
|
@@ -3142,12 +3142,12 @@ function registerWorkspaceCommands(program, cwd) {
|
|
|
3142
3142
|
registerWorkspaceRemoval(workspaceCommand, cwd);
|
|
3143
3143
|
registerWorkspaceMove(workspaceCommand, cwd);
|
|
3144
3144
|
workspaceCommand.command("init").description(localize("Initialize workspace metadata and repository files", "初始化工作区元信息(README、package.json、pnpm intent、issue template)")).alias("i").action(async () => {
|
|
3145
|
-
const { initMetadata } = await import("./commands-
|
|
3145
|
+
const { initMetadata } = await import("./commands-DCLuAlM6.mjs").then((n) => n.t);
|
|
3146
3146
|
await initMetadata(cwd);
|
|
3147
3147
|
logger.success(localize("Workspace initialization finished.", "Workspace 初始化完成。"));
|
|
3148
3148
|
});
|
|
3149
3149
|
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) => {
|
|
3150
|
-
const { getWorkspacePackageSummaries } = await import("./workspace-tasks-
|
|
3150
|
+
const { getWorkspacePackageSummaries } = await import("./workspace-tasks-FJOChctJ.mjs").then((n) => n.Vt);
|
|
3151
3151
|
await emitWorkspaceList(await getWorkspacePackageSummaries(cwd, {
|
|
3152
3152
|
ignorePrivatePackage: !opts.includePrivate,
|
|
3153
3153
|
ignoreRootPackage: !opts.includeRoot,
|
|
@@ -3155,7 +3155,7 @@ function registerWorkspaceCommands(program, cwd) {
|
|
|
3155
3155
|
}), opts);
|
|
3156
3156
|
});
|
|
3157
3157
|
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) => {
|
|
3158
|
-
const { cleanProjects } = await import("./commands-
|
|
3158
|
+
const { cleanProjects } = await import("./commands-DCLuAlM6.mjs").then((n) => n.t);
|
|
3159
3159
|
await cleanProjects(cwd, normalizeCleanOptions(opts));
|
|
3160
3160
|
});
|
|
3161
3161
|
}
|