@icebreakers/monorepo 5.0.3 → 5.1.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.
- package/dist/cli.mjs +75 -38
- package/dist/{commands-KNarzvFs.mjs → commands-DwvtvWjz.mjs} +1260 -96
- package/dist/{create-flow-D2KdMg-m.mjs → create-flow-D-_VjRtz.mjs} +2 -2
- package/dist/{index-Ltm2Ry5E.d.mts → index-cBqxgIwY.d.mts} +7 -2
- package/dist/index.d.mts +177 -13
- package/dist/index.mjs +3 -3
- package/dist/tooling-entry.d.mts +1 -1
- package/dist/{types-DYEKpMcN.mjs → types-CLzhRYdV.mjs} +4 -4
- package/package.json +6 -6
- package/resources/skills/icebreakers-monorepo-cli/references/commands.md +21 -1
- package/resources/skills/icebreakers-monorepo-cli/references/config.md +1 -1
package/dist/cli.mjs
CHANGED
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { d as logger, g as fs, r as cliName, t as initToolingTargets, u as version } from "./types-
|
|
1
|
+
import { d as logger, g as fs, r as cliName, t as initToolingTargets, u as version } from "./types-CLzhRYdV.mjs";
|
|
2
2
|
import path from "pathe";
|
|
3
3
|
import process from "node:process";
|
|
4
4
|
import os from "node:os";
|
|
@@ -8,7 +8,7 @@ import { Command } from "commander";
|
|
|
8
8
|
async function handleAiPromptCreate(cwd, opts) {
|
|
9
9
|
const [{ input }, { createTimestampFolderName, defaultAgenticBaseDir, generateAgenticTemplate, generateAgenticTemplates, loadAgenticTasks }, { resolveCommandConfig }] = await Promise.all([
|
|
10
10
|
import("@icebreakers/monorepo-templates"),
|
|
11
|
-
import("./commands-
|
|
11
|
+
import("./commands-DwvtvWjz.mjs").then((n) => n.t),
|
|
12
12
|
import("./config-p842Knhq.mjs").then((n) => n.n)
|
|
13
13
|
]);
|
|
14
14
|
const aiConfig = await resolveCommandConfig("ai", cwd);
|
|
@@ -123,7 +123,7 @@ async function emitConfigInspection(inspection, opts, cwd) {
|
|
|
123
123
|
}
|
|
124
124
|
function registerConfigCommands(program, cwd) {
|
|
125
125
|
program.command("config").alias("cfg").description("配置命令").command("inspect").description("输出当前 repoctl 配置文件和已解析配置").alias("i").option("--json", "输出 JSON,方便脚本消费").option("--markdown", "输出 Markdown,方便粘贴到 issue 或 PR").option("--out <file>", "把当前输出写入文件").option("--redact", "脱敏 cwd/configDir/home 绝对路径后再输出").action(async (opts) => {
|
|
126
|
-
const { inspectMonorepoConfig } = await import("./commands-
|
|
126
|
+
const { inspectMonorepoConfig } = await import("./commands-DwvtvWjz.mjs").then((n) => n.t);
|
|
127
127
|
await emitConfigInspection(await inspectMonorepoConfig(cwd), opts, cwd);
|
|
128
128
|
});
|
|
129
129
|
}
|
|
@@ -443,23 +443,23 @@ async function emitEnvSupportBundle(bundle, opts, cwd) {
|
|
|
443
443
|
function registerEnvCommands(program, cwd) {
|
|
444
444
|
const envCommand = program.command("env").alias("e").description("环境命令");
|
|
445
445
|
envCommand.command("info").description("输出当前仓库环境信息").alias("i").option("--json", "输出 JSON,方便脚本消费").option("--markdown", "输出 Markdown,方便粘贴到 issue 或 PR").option("--out <file>", "把当前输出写入文件").option("--redact", "脱敏 workspace/cwd/home 绝对路径后再输出").action(async (opts) => {
|
|
446
|
-
const { collectEnvInfo } = await import("./commands-
|
|
446
|
+
const { collectEnvInfo } = await import("./commands-DwvtvWjz.mjs").then((n) => n.t);
|
|
447
447
|
await emitEnvInfo(await collectEnvInfo(cwd), opts, cwd);
|
|
448
448
|
});
|
|
449
449
|
envCommand.command("snapshot").description("输出排障快照,包含环境、doctor 和 check 计划").alias("s").option("--json", "输出 JSON,方便脚本消费").option("--markdown", "输出 Markdown,方便粘贴到 issue 或 PR").option("--out <file>", "把当前输出写入文件").option("--redact", "脱敏 workspace/cwd/home 绝对路径后再输出").option("--strict", "输出快照后,如果 doctor 有 fail 或 warn 则返回失败码").action(async (opts) => {
|
|
450
|
-
const { collectEnvSnapshot } = await import("./commands-
|
|
450
|
+
const { collectEnvSnapshot } = await import("./commands-DwvtvWjz.mjs").then((n) => n.t);
|
|
451
451
|
await emitEnvSnapshot(await collectEnvSnapshot(cwd), opts, cwd);
|
|
452
452
|
});
|
|
453
453
|
envCommand.command("paths").description("输出当前仓库关键路径和报告建议位置").alias("p").option("--json", "输出 JSON,方便脚本消费").option("--markdown", "输出 Markdown,方便粘贴到 issue 或 PR").option("--out <file>", "把当前输出写入文件").option("--redact", "脱敏 workspace/cwd/home 绝对路径后再输出").action(async (opts) => {
|
|
454
|
-
const { collectEnvPaths } = await import("./commands-
|
|
454
|
+
const { collectEnvPaths } = await import("./commands-DwvtvWjz.mjs").then((n) => n.t);
|
|
455
455
|
await emitEnvPaths(await collectEnvPaths(cwd), opts, cwd);
|
|
456
456
|
});
|
|
457
457
|
envCommand.command("support").description("输出完整排障包,包含环境、路径、配置、doctor 和 check 计划").alias("b").option("--json", "输出 JSON,方便脚本消费").option("--markdown", "输出 Markdown,方便粘贴到 issue 或 PR").option("--out <file>", "把当前输出写入文件").option("--redact", "脱敏 workspace/cwd/home 绝对路径后再输出").option("--strict", "输出排障包后,如果 doctor 有 fail 或 warn 则返回失败码").action(async (opts) => {
|
|
458
|
-
const { collectEnvSupportBundle } = await import("./commands-
|
|
458
|
+
const { collectEnvSupportBundle } = await import("./commands-DwvtvWjz.mjs").then((n) => n.t);
|
|
459
459
|
await emitEnvSupportBundle(await collectEnvSupportBundle(cwd), opts, cwd);
|
|
460
460
|
});
|
|
461
461
|
envCommand.command("mirror").description("设置 VS Code binary mirror").alias("m").action(async () => {
|
|
462
|
-
const { setVscodeBinaryMirror } = await import("./commands-
|
|
462
|
+
const { setVscodeBinaryMirror } = await import("./commands-DwvtvWjz.mjs").then((n) => n.t);
|
|
463
463
|
await setVscodeBinaryMirror(cwd);
|
|
464
464
|
logger.success("env mirror finished!");
|
|
465
465
|
});
|
|
@@ -468,7 +468,7 @@ function registerEnvCommands(program, cwd) {
|
|
|
468
468
|
//#region src/cli/commands/package.ts
|
|
469
469
|
function registerPackageCommands(program, cwd) {
|
|
470
470
|
program.command("package").alias("pkg").description("子包命令").command("create").description("创建一个新的子包").alias("new").argument("[name]").option("-t, --template <template>", "直接使用指定模板,跳过模板选择").option("--dry-run", "预览将要创建的目录与 package 信息,不写入文件").option("--json", "以 JSON 输出创建预览,隐含 --dry-run").option("--out <file>", "把创建预览写入文件,隐含 --dry-run").action(async (inputName, opts) => {
|
|
471
|
-
const { runCreateFlow } = await import("./create-flow-
|
|
471
|
+
const { runCreateFlow } = await import("./create-flow-D-_VjRtz.mjs");
|
|
472
472
|
const result = await runCreateFlow(cwd, inputName, {
|
|
473
473
|
...opts.template !== void 0 ? { template: opts.template } : {},
|
|
474
474
|
...opts.dryRun || opts.json || opts.out ? { dryRun: true } : {},
|
|
@@ -490,33 +490,70 @@ async function runReleaseAction(action) {
|
|
|
490
490
|
}
|
|
491
491
|
}
|
|
492
492
|
function registerReleaseCommands(program, cwd) {
|
|
493
|
-
const releaseCommand = program.command("release").description("发布与
|
|
494
|
-
releaseCommand.command("
|
|
493
|
+
const releaseCommand = program.command("release").description("发布与 pnpm versioning 工具集");
|
|
494
|
+
releaseCommand.command("ci").description("在 CI 中自动准备、发布和恢复版本").option("--mode <mode>", "auto / prepare / publish / publish-unpublished", "auto").option("--package <name>", "publish-unpublished 使用的 package").option("--version <version>", "publish-unpublished 使用的版本").action(async (opts) => {
|
|
495
495
|
await runReleaseAction(async () => {
|
|
496
|
-
const {
|
|
496
|
+
const { releaseCi } = await import("./commands-DwvtvWjz.mjs").then((n) => n.t);
|
|
497
|
+
await releaseCi({
|
|
498
|
+
cwd,
|
|
499
|
+
...opts.mode ? { mode: opts.mode } : {},
|
|
500
|
+
...opts.package ? { packageName: opts.package } : {},
|
|
501
|
+
...opts.version ? { packageVersion: opts.version } : {}
|
|
502
|
+
});
|
|
503
|
+
});
|
|
504
|
+
});
|
|
505
|
+
releaseCommand.command("notes").description("维护 GitHub Release 正文").command("repair").description("按每个发布 tag 对应的 changelog 重建 GitHub Release 正文").option("--all", "修复所有可识别的 GitHub Release").option("--tag <package@version>", "只修复指定 package@version").option("--dry-run", "只生成并统计,不更新 GitHub Release").action(async (opts) => {
|
|
506
|
+
await runReleaseAction(async () => {
|
|
507
|
+
const { repairReleaseNotes } = await import("./commands-DwvtvWjz.mjs").then((n) => n.t);
|
|
508
|
+
const result = await repairReleaseNotes({
|
|
509
|
+
cwd,
|
|
510
|
+
...opts.all ? { all: true } : {},
|
|
511
|
+
...opts.tag ? { tag: opts.tag } : {},
|
|
512
|
+
...opts.dryRun ? { dryRun: true } : {}
|
|
513
|
+
});
|
|
514
|
+
logger.success(`release notes repaired: ${result.repaired.length}; skipped: ${result.skipped.length}`);
|
|
515
|
+
});
|
|
516
|
+
});
|
|
517
|
+
const stableCommand = releaseCommand.command("stable").description("在 main 分支执行正式发布").action(async () => {
|
|
518
|
+
await runReleaseAction(async () => {
|
|
519
|
+
const { releaseStable } = await import("./commands-DwvtvWjz.mjs").then((n) => n.t);
|
|
497
520
|
await releaseStable({ cwd });
|
|
498
521
|
logger.success("stable release finished!");
|
|
499
522
|
});
|
|
500
523
|
});
|
|
524
|
+
stableCommand.command("prepare").description("消费 pnpm change intents 并准备 Release PR").action(async () => {
|
|
525
|
+
await runReleaseAction(async () => {
|
|
526
|
+
const { prepareStable } = await import("./commands-DwvtvWjz.mjs").then((n) => n.t);
|
|
527
|
+
await prepareStable({ cwd });
|
|
528
|
+
logger.success("stable release preparation finished!");
|
|
529
|
+
});
|
|
530
|
+
});
|
|
531
|
+
stableCommand.command("publish").description("发布 main 分支上尚未发布的包").action(async () => {
|
|
532
|
+
await runReleaseAction(async () => {
|
|
533
|
+
const { publishStable } = await import("./commands-DwvtvWjz.mjs").then((n) => n.t);
|
|
534
|
+
await publishStable({ cwd });
|
|
535
|
+
logger.success("stable package publish finished!");
|
|
536
|
+
});
|
|
537
|
+
});
|
|
501
538
|
const preCommand = releaseCommand.command("pre").description("执行或管理 prerelease 发布");
|
|
502
539
|
preCommand.command("publish").alias("run").description("在 alpha/beta/rc/next 分支发布 prerelease").action(async () => {
|
|
503
540
|
await runReleaseAction(async () => {
|
|
504
|
-
const { releasePrerelease } = await import("./commands-
|
|
541
|
+
const { releasePrerelease } = await import("./commands-DwvtvWjz.mjs").then((n) => n.t);
|
|
505
542
|
await releasePrerelease({ cwd });
|
|
506
543
|
logger.success("prerelease finished!");
|
|
507
544
|
});
|
|
508
545
|
});
|
|
509
|
-
preCommand.command("enter").description("进入
|
|
546
|
+
preCommand.command("enter").description("进入 pnpm prerelease lane").argument("<tag>", "alpha / beta / rc / next").action(async (tag) => {
|
|
510
547
|
await runReleaseAction(async () => {
|
|
511
|
-
const { enterPrerelease } = await import("./commands-
|
|
512
|
-
enterPrerelease(tag, { cwd });
|
|
548
|
+
const { enterPrerelease } = await import("./commands-DwvtvWjz.mjs").then((n) => n.t);
|
|
549
|
+
await enterPrerelease(tag, { cwd });
|
|
513
550
|
logger.success(`entered ${tag} prerelease mode!`);
|
|
514
551
|
});
|
|
515
552
|
});
|
|
516
|
-
preCommand.command("exit").description("退出
|
|
553
|
+
preCommand.command("exit").description("退出 pnpm prerelease lane").action(async () => {
|
|
517
554
|
await runReleaseAction(async () => {
|
|
518
|
-
const { exitPrerelease } = await import("./commands-
|
|
519
|
-
exitPrerelease({ cwd });
|
|
555
|
+
const { exitPrerelease } = await import("./commands-DwvtvWjz.mjs").then((n) => n.t);
|
|
556
|
+
await exitPrerelease({ cwd });
|
|
520
557
|
logger.success("exited prerelease mode!");
|
|
521
558
|
});
|
|
522
559
|
});
|
|
@@ -526,7 +563,7 @@ function registerReleaseCommands(program, cwd) {
|
|
|
526
563
|
const skillTargets = ["codex", "claude"];
|
|
527
564
|
function registerSkillsCommands(program, cwd) {
|
|
528
565
|
program.command("skills").alias("sk").description("技能工具集").command("sync").description("同步 resources/skills/icebreakers-monorepo-cli 到全局目录").alias("s").option("--codex", "同步到 ~/.codex/skills").option("--claude", "同步到 ~/.claude/skills").option("--all", "同步全部目标").action(async (opts) => {
|
|
529
|
-
const { syncSkills } = await import("./commands-
|
|
566
|
+
const { syncSkills } = await import("./commands-DwvtvWjz.mjs").then((n) => n.t);
|
|
530
567
|
const selected = /* @__PURE__ */ new Set();
|
|
531
568
|
if (opts.all) for (const target of skillTargets) selected.add(target);
|
|
532
569
|
else {
|
|
@@ -646,7 +683,7 @@ function registerTemplatesCommands(program) {
|
|
|
646
683
|
program.command("templates").alias("tpl").description("列出可用的内置模板").argument("[key]", "查看指定模板详情").option("-c, --category <category>", "按模板分类过滤:library / app / service / docs / tool").option("--check", "检查内置模板元数据、目录和临时文件").option("--json", "输出 JSON,方便脚本消费").option("--markdown", "输出 Markdown,方便同步文档").option("--out <file>", "把当前输出写入文件").action(async (key, opts) => {
|
|
647
684
|
const { getTemplateChoice, getTemplateChoices, isTemplateCategory, suggestTemplateKey, templateCategories } = await import("@icebreakers/monorepo-templates");
|
|
648
685
|
if (opts.check) {
|
|
649
|
-
const { checkTemplates } = await import("./commands-
|
|
686
|
+
const { checkTemplates } = await import("./commands-DwvtvWjz.mjs").then((n) => n.t);
|
|
650
687
|
const report = await checkTemplates();
|
|
651
688
|
if (opts.json) await emitTemplateOutput(JSON.stringify(report, null, 2), opts);
|
|
652
689
|
else await emitTemplateOutput(formatTemplateHealthReport(report, !opts.out), opts);
|
|
@@ -725,7 +762,7 @@ function normalizeToolingTargets(tooling) {
|
|
|
725
762
|
function registerToolingCommands(program, cwd) {
|
|
726
763
|
program.command("tooling").alias("tg").description("工程化配置命令").command("init").description(`生成 tooling 配置(可选值:${initToolingTargets.join(", ")})`).alias("i").argument("[tooling...]").option("-a, --all", "生成全部 tooling 配置").option("-f, --force", "覆盖已存在的 tooling 配置文件").action(async (tooling = [], opts) => {
|
|
727
764
|
const normalizedTooling = normalizeToolingTargets(tooling);
|
|
728
|
-
const { initTooling } = await import("./commands-
|
|
765
|
+
const { initTooling } = await import("./commands-DwvtvWjz.mjs").then((n) => n.t);
|
|
729
766
|
await initTooling(cwd, {
|
|
730
767
|
...normalizedTooling ? { targets: normalizedTooling } : {},
|
|
731
768
|
...opts.all !== void 0 ? { all: opts.all } : {},
|
|
@@ -896,7 +933,7 @@ async function emitCheckPlan(plan, opts, cwd) {
|
|
|
896
933
|
}
|
|
897
934
|
function registerTopLevelCommands(program, cwd) {
|
|
898
935
|
program.command("init").description("初始化当前 workspace,并生成推荐配置").option("--preset <preset>", "初始化预设:minimal / standard", "standard").option("-f, --force", "覆盖已存在的 tooling 配置文件").option("--overwrite", "覆盖 setup 管理的已存在文件").option("-y, --yes", "使用默认值跳过所有交互,适合 CI").action(async (opts) => {
|
|
899
|
-
const { init } = await import("./commands-
|
|
936
|
+
const { init } = await import("./commands-DwvtvWjz.mjs").then((n) => n.t);
|
|
900
937
|
await init(cwd, {
|
|
901
938
|
...opts.preset !== void 0 ? { preset: opts.preset } : {},
|
|
902
939
|
...opts.force !== void 0 ? { force: opts.force } : {},
|
|
@@ -907,7 +944,7 @@ function registerTopLevelCommands(program, cwd) {
|
|
|
907
944
|
logger.info("next: run `pnpm install` and `pnpm build`");
|
|
908
945
|
});
|
|
909
946
|
program.command("new").description("创建新的 package / app").argument("[name]").option("-t, --template <template>", "直接使用指定模板,跳过模板选择").option("--dry-run", "预览将要创建的目录与 package 信息,不写入文件").option("--json", "以 JSON 输出创建预览,隐含 --dry-run").option("--out <file>", "把创建预览写入文件,隐含 --dry-run").action(async (inputName, opts) => {
|
|
910
|
-
const { runCreateFlow } = await import("./create-flow-
|
|
947
|
+
const { runCreateFlow } = await import("./create-flow-D-_VjRtz.mjs");
|
|
911
948
|
const result = await runCreateFlow(cwd, inputName, {
|
|
912
949
|
...opts.template !== void 0 ? { template: opts.template } : {},
|
|
913
950
|
...opts.dryRun || opts.json || opts.out ? { dryRun: true } : {},
|
|
@@ -925,10 +962,10 @@ function registerTopLevelCommands(program, cwd) {
|
|
|
925
962
|
...opts.staged !== void 0 ? { staged: opts.staged } : {},
|
|
926
963
|
...opts.editFile !== void 0 ? { editFile: opts.editFile } : {}
|
|
927
964
|
};
|
|
928
|
-
const { resolveRecommendedCheckPlan, runRecommendedCheck } = await import("./commands-
|
|
965
|
+
const { resolveRecommendedCheckPlan, runRecommendedCheck } = await import("./commands-DwvtvWjz.mjs").then((n) => n.t);
|
|
929
966
|
if (opts.dryRun || opts.json || opts.markdown || opts.out) {
|
|
930
967
|
if (opts.full) {
|
|
931
|
-
const { resolveFullWorkspaceCheckPlan } = await import("./commands-
|
|
968
|
+
const { resolveFullWorkspaceCheckPlan } = await import("./commands-DwvtvWjz.mjs").then((n) => n.t);
|
|
932
969
|
await emitCheckPlan(await resolveFullWorkspaceCheckPlan(cwd), opts, cwd);
|
|
933
970
|
return;
|
|
934
971
|
}
|
|
@@ -939,7 +976,7 @@ function registerTopLevelCommands(program, cwd) {
|
|
|
939
976
|
logger.success("check finished!");
|
|
940
977
|
});
|
|
941
978
|
program.command("doctor").description("诊断当前仓库是否适合直接开始使用").option("--json", "输出 JSON 报告,方便 CI 或脚本消费").option("--markdown", "输出 Markdown 报告,方便粘贴到 issue 或 PR").option("--out <file>", "把诊断报告写入文件").option("--redact", "脱敏 workspace/cwd/home 绝对路径后再输出").option("--strict", "把 warning 也视为失败,适合 CI 门禁").action(async (opts) => {
|
|
942
|
-
const { runDoctor } = await import("./commands-
|
|
979
|
+
const { runDoctor } = await import("./commands-DwvtvWjz.mjs").then((n) => n.t);
|
|
943
980
|
const report = await runDoctor(cwd);
|
|
944
981
|
await emitDoctorReport(report, opts, cwd);
|
|
945
982
|
if (opts.out || opts.json || opts.markdown) {
|
|
@@ -961,8 +998,8 @@ function registerTopLevelCommands(program, cwd) {
|
|
|
961
998
|
}
|
|
962
999
|
logger.success("doctor finished!");
|
|
963
1000
|
});
|
|
964
|
-
program.command("upgrade").description("同步仓库标准资产与脚本").option("-i,--interactive").option("-c,--core", "仅同步核心配置,跳过 GitHub 相关资产").option("--outDir <dir>", "Output directory").option("-s,--skip-overwrite", "skip overwrite").option("-y, --yes", "跳过交互并覆盖 drifted 标准资产").option("--overwrite", "覆盖 drifted 标准资产").option("--no-overwrite", "不覆盖 drifted 标准资产").action(async (opts) => {
|
|
965
|
-
const { upgradeMonorepo } = await import("./commands-
|
|
1001
|
+
program.command("upgrade").description("同步仓库标准资产与脚本").option("-i,--interactive").option("-c,--core", "仅同步核心配置,跳过 GitHub 相关资产").option("--outDir <dir>", "Output directory").option("-s,--skip-overwrite", "skip overwrite").option("-y, --yes", "跳过交互并覆盖 drifted 标准资产").option("--overwrite", "覆盖 drifted 标准资产").option("--no-overwrite", "不覆盖 drifted 标准资产").option("--overwrite-release", "覆盖未标记的自定义 release workflow").action(async (opts) => {
|
|
1002
|
+
const { upgradeMonorepo } = await import("./commands-DwvtvWjz.mjs").then((n) => n.t);
|
|
966
1003
|
await upgradeMonorepo(normalizeCliOpts(cwd, opts));
|
|
967
1004
|
logger.success("upgrade finished!");
|
|
968
1005
|
});
|
|
@@ -972,22 +1009,22 @@ function registerTopLevelCommands(program, cwd) {
|
|
|
972
1009
|
function registerVerifyCommands(program, cwd) {
|
|
973
1010
|
const verifyCommand = program.command("verify").alias("v").description("本地校验工具集");
|
|
974
1011
|
verifyCommand.command("pre-push").description("按推送变更范围执行 build/test/tsd 校验").alias("push").action(async () => {
|
|
975
|
-
const { verifyPrePush } = await import("./commands-
|
|
1012
|
+
const { verifyPrePush } = await import("./commands-DwvtvWjz.mjs").then((n) => n.t);
|
|
976
1013
|
await verifyPrePush({ cwd });
|
|
977
1014
|
});
|
|
978
1015
|
verifyCommand.command("pre-commit").description("执行 lint-staged 校验").alias("commit").action(async () => {
|
|
979
|
-
const { verifyPreCommit } = await import("./commands-
|
|
1016
|
+
const { verifyPreCommit } = await import("./commands-DwvtvWjz.mjs").then((n) => n.t);
|
|
980
1017
|
await verifyPreCommit({ cwd });
|
|
981
1018
|
});
|
|
982
1019
|
verifyCommand.command("commit-msg").description("执行 commitlint 校验").alias("msg").argument("<edit-file>").action(async (editFile) => {
|
|
983
|
-
const { verifyCommitMsg } = await import("./commands-
|
|
1020
|
+
const { verifyCommitMsg } = await import("./commands-DwvtvWjz.mjs").then((n) => n.t);
|
|
984
1021
|
await verifyCommitMsg({
|
|
985
1022
|
cwd,
|
|
986
1023
|
editFile
|
|
987
1024
|
});
|
|
988
1025
|
});
|
|
989
1026
|
verifyCommand.command("staged-typecheck").description("按暂存文件所在 workspace 执行 typecheck").alias("tc").argument("[files...]").action(async (files = []) => {
|
|
990
|
-
const { verifyStagedTypecheck } = await import("./commands-
|
|
1027
|
+
const { verifyStagedTypecheck } = await import("./commands-DwvtvWjz.mjs").then((n) => n.t);
|
|
991
1028
|
verifyStagedTypecheck(files, { cwd });
|
|
992
1029
|
});
|
|
993
1030
|
}
|
|
@@ -1065,13 +1102,13 @@ async function emitWorkspaceList(result, opts) {
|
|
|
1065
1102
|
}
|
|
1066
1103
|
function registerWorkspaceCommands(program, cwd) {
|
|
1067
1104
|
const workspaceCommand = program.command("workspace").alias("ws").description("工作区命令");
|
|
1068
|
-
workspaceCommand.command("upgrade").description("升级/同步 monorepo 相关包").alias("up").option("-i,--interactive").option("-c,--core", "仅同步核心配置,跳过 GitHub 相关资产").option("--outDir <dir>", "Output directory").option("-s,--skip-overwrite", "skip overwrite").option("-y, --yes", "跳过交互并覆盖 drifted 标准资产").option("--overwrite", "覆盖 drifted 标准资产").option("--no-overwrite", "不覆盖 drifted 标准资产").action(async (opts) => {
|
|
1069
|
-
const { upgradeMonorepo } = await import("./commands-
|
|
1105
|
+
workspaceCommand.command("upgrade").description("升级/同步 monorepo 相关包").alias("up").option("-i,--interactive").option("-c,--core", "仅同步核心配置,跳过 GitHub 相关资产").option("--outDir <dir>", "Output directory").option("-s,--skip-overwrite", "skip overwrite").option("-y, --yes", "跳过交互并覆盖 drifted 标准资产").option("--overwrite", "覆盖 drifted 标准资产").option("--no-overwrite", "不覆盖 drifted 标准资产").option("--overwrite-release", "覆盖未标记的自定义 release workflow").action(async (opts) => {
|
|
1106
|
+
const { upgradeMonorepo } = await import("./commands-DwvtvWjz.mjs").then((n) => n.t);
|
|
1070
1107
|
await upgradeMonorepo(normalizeCliOpts(cwd, opts));
|
|
1071
1108
|
logger.success("workspace upgrade finished!");
|
|
1072
1109
|
});
|
|
1073
|
-
workspaceCommand.command("init").description("初始化工作区元信息(README、package.json、
|
|
1074
|
-
const { initMetadata } = await import("./commands-
|
|
1110
|
+
workspaceCommand.command("init").description("初始化工作区元信息(README、package.json、pnpm intent、issue template)").alias("i").action(async () => {
|
|
1111
|
+
const { initMetadata } = await import("./commands-DwvtvWjz.mjs").then((n) => n.t);
|
|
1075
1112
|
await initMetadata(cwd);
|
|
1076
1113
|
logger.success("workspace init finished!");
|
|
1077
1114
|
});
|
|
@@ -1084,7 +1121,7 @@ function registerWorkspaceCommands(program, cwd) {
|
|
|
1084
1121
|
}), opts);
|
|
1085
1122
|
});
|
|
1086
1123
|
workspaceCommand.command("clean").description("清除选中的包").alias("rm").option("-y, --yes", "跳过交互直接清理(等价 autoConfirm)").option("--include-private", "包含 private 包").option("--pinned-version <version>", "覆盖写入的 repoctl 版本").action(async (opts) => {
|
|
1087
|
-
const { cleanProjects } = await import("./commands-
|
|
1124
|
+
const { cleanProjects } = await import("./commands-DwvtvWjz.mjs").then((n) => n.t);
|
|
1088
1125
|
await cleanProjects(cwd, normalizeCleanOptions(opts));
|
|
1089
1126
|
logger.success("workspace clean finished!");
|
|
1090
1127
|
});
|