@icebreakers/monorepo 5.0.2 → 5.1.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/README.md +1 -0
- package/dist/cli.d.mts +1 -1
- package/dist/cli.mjs +64 -38
- package/dist/{commands-CLoncxyA.mjs → commands-BD9u8I6D.mjs} +1104 -105
- package/dist/{create-flow-co0NSyuc.mjs → create-flow-D_SecUxo.mjs} +2 -2
- package/dist/{index-DKfWpvBF.d.mts → index-cBqxgIwY.d.mts} +8 -2
- package/dist/index.d.mts +152 -13
- package/dist/index.mjs +4 -4
- package/dist/{tooling-auYlGr3v.mjs → tooling-Bn3XOfO0.mjs} +6 -0
- package/dist/tooling-entry.d.mts +1 -1
- package/dist/tooling-entry.mjs +1 -1
- package/dist/{types-BXMAv9aF.mjs → types-S6igCe0w.mjs} +8 -8
- package/package.json +10 -10
- package/resources/skills/icebreakers-monorepo-cli/references/commands.md +21 -1
- package/resources/skills/icebreakers-monorepo-cli/references/config.md +1 -1
package/README.md
CHANGED
|
@@ -128,6 +128,7 @@ export default defineMonorepoConfig({
|
|
|
128
128
|
- `pre-commit` 只检查 staged 文件
|
|
129
129
|
- 样式文件会执行 `stylelint --fix --allow-empty-input`
|
|
130
130
|
- `js`、`jsx`、`mjs`、`ts`、`tsx`、`mts`、`cts`、`vue` 文件会执行 `eslint --fix`
|
|
131
|
+
- `**/package.json` 改动会按所在 workspace 继续执行 `typecheck`
|
|
131
132
|
- `ts` / `tsx` / `mts` / `cts` / `vue` staged 文件会按最近的 workspace 执行 `typecheck`
|
|
132
133
|
- Vue workspace 的 `typecheck` 通常是 `vue-tsc -b`
|
|
133
134
|
- 纯 TypeScript workspace 的 `typecheck` 通常是 `tsc -p tsconfig.json`
|
package/dist/cli.d.mts
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
export {
|
|
1
|
+
export {}
|
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-S6igCe0w.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-BD9u8I6D.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-BD9u8I6D.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-BD9u8I6D.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-BD9u8I6D.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-BD9u8I6D.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-BD9u8I6D.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-BD9u8I6D.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_SecUxo.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,59 @@ 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-BD9u8I6D.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
|
+
logger.success("release CI finished!");
|
|
504
|
+
});
|
|
505
|
+
});
|
|
506
|
+
const stableCommand = releaseCommand.command("stable").description("在 main 分支执行正式发布").action(async () => {
|
|
507
|
+
await runReleaseAction(async () => {
|
|
508
|
+
const { releaseStable } = await import("./commands-BD9u8I6D.mjs").then((n) => n.t);
|
|
497
509
|
await releaseStable({ cwd });
|
|
498
510
|
logger.success("stable release finished!");
|
|
499
511
|
});
|
|
500
512
|
});
|
|
513
|
+
stableCommand.command("prepare").description("消费 pnpm change intents 并准备 Release PR").action(async () => {
|
|
514
|
+
await runReleaseAction(async () => {
|
|
515
|
+
const { prepareStable } = await import("./commands-BD9u8I6D.mjs").then((n) => n.t);
|
|
516
|
+
await prepareStable({ cwd });
|
|
517
|
+
logger.success("stable release preparation finished!");
|
|
518
|
+
});
|
|
519
|
+
});
|
|
520
|
+
stableCommand.command("publish").description("发布 main 分支上尚未发布的包").action(async () => {
|
|
521
|
+
await runReleaseAction(async () => {
|
|
522
|
+
const { publishStable } = await import("./commands-BD9u8I6D.mjs").then((n) => n.t);
|
|
523
|
+
await publishStable({ cwd });
|
|
524
|
+
logger.success("stable package publish finished!");
|
|
525
|
+
});
|
|
526
|
+
});
|
|
501
527
|
const preCommand = releaseCommand.command("pre").description("执行或管理 prerelease 发布");
|
|
502
528
|
preCommand.command("publish").alias("run").description("在 alpha/beta/rc/next 分支发布 prerelease").action(async () => {
|
|
503
529
|
await runReleaseAction(async () => {
|
|
504
|
-
const { releasePrerelease } = await import("./commands-
|
|
530
|
+
const { releasePrerelease } = await import("./commands-BD9u8I6D.mjs").then((n) => n.t);
|
|
505
531
|
await releasePrerelease({ cwd });
|
|
506
532
|
logger.success("prerelease finished!");
|
|
507
533
|
});
|
|
508
534
|
});
|
|
509
|
-
preCommand.command("enter").description("进入
|
|
535
|
+
preCommand.command("enter").description("进入 pnpm prerelease lane").argument("<tag>", "alpha / beta / rc / next").action(async (tag) => {
|
|
510
536
|
await runReleaseAction(async () => {
|
|
511
|
-
const { enterPrerelease } = await import("./commands-
|
|
512
|
-
enterPrerelease(tag, { cwd });
|
|
537
|
+
const { enterPrerelease } = await import("./commands-BD9u8I6D.mjs").then((n) => n.t);
|
|
538
|
+
await enterPrerelease(tag, { cwd });
|
|
513
539
|
logger.success(`entered ${tag} prerelease mode!`);
|
|
514
540
|
});
|
|
515
541
|
});
|
|
516
|
-
preCommand.command("exit").description("退出
|
|
542
|
+
preCommand.command("exit").description("退出 pnpm prerelease lane").action(async () => {
|
|
517
543
|
await runReleaseAction(async () => {
|
|
518
|
-
const { exitPrerelease } = await import("./commands-
|
|
519
|
-
exitPrerelease({ cwd });
|
|
544
|
+
const { exitPrerelease } = await import("./commands-BD9u8I6D.mjs").then((n) => n.t);
|
|
545
|
+
await exitPrerelease({ cwd });
|
|
520
546
|
logger.success("exited prerelease mode!");
|
|
521
547
|
});
|
|
522
548
|
});
|
|
@@ -526,7 +552,7 @@ function registerReleaseCommands(program, cwd) {
|
|
|
526
552
|
const skillTargets = ["codex", "claude"];
|
|
527
553
|
function registerSkillsCommands(program, cwd) {
|
|
528
554
|
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-
|
|
555
|
+
const { syncSkills } = await import("./commands-BD9u8I6D.mjs").then((n) => n.t);
|
|
530
556
|
const selected = /* @__PURE__ */ new Set();
|
|
531
557
|
if (opts.all) for (const target of skillTargets) selected.add(target);
|
|
532
558
|
else {
|
|
@@ -646,7 +672,7 @@ function registerTemplatesCommands(program) {
|
|
|
646
672
|
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
673
|
const { getTemplateChoice, getTemplateChoices, isTemplateCategory, suggestTemplateKey, templateCategories } = await import("@icebreakers/monorepo-templates");
|
|
648
674
|
if (opts.check) {
|
|
649
|
-
const { checkTemplates } = await import("./commands-
|
|
675
|
+
const { checkTemplates } = await import("./commands-BD9u8I6D.mjs").then((n) => n.t);
|
|
650
676
|
const report = await checkTemplates();
|
|
651
677
|
if (opts.json) await emitTemplateOutput(JSON.stringify(report, null, 2), opts);
|
|
652
678
|
else await emitTemplateOutput(formatTemplateHealthReport(report, !opts.out), opts);
|
|
@@ -725,7 +751,7 @@ function normalizeToolingTargets(tooling) {
|
|
|
725
751
|
function registerToolingCommands(program, cwd) {
|
|
726
752
|
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
753
|
const normalizedTooling = normalizeToolingTargets(tooling);
|
|
728
|
-
const { initTooling } = await import("./commands-
|
|
754
|
+
const { initTooling } = await import("./commands-BD9u8I6D.mjs").then((n) => n.t);
|
|
729
755
|
await initTooling(cwd, {
|
|
730
756
|
...normalizedTooling ? { targets: normalizedTooling } : {},
|
|
731
757
|
...opts.all !== void 0 ? { all: opts.all } : {},
|
|
@@ -896,7 +922,7 @@ async function emitCheckPlan(plan, opts, cwd) {
|
|
|
896
922
|
}
|
|
897
923
|
function registerTopLevelCommands(program, cwd) {
|
|
898
924
|
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-
|
|
925
|
+
const { init } = await import("./commands-BD9u8I6D.mjs").then((n) => n.t);
|
|
900
926
|
await init(cwd, {
|
|
901
927
|
...opts.preset !== void 0 ? { preset: opts.preset } : {},
|
|
902
928
|
...opts.force !== void 0 ? { force: opts.force } : {},
|
|
@@ -907,7 +933,7 @@ function registerTopLevelCommands(program, cwd) {
|
|
|
907
933
|
logger.info("next: run `pnpm install` and `pnpm build`");
|
|
908
934
|
});
|
|
909
935
|
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-
|
|
936
|
+
const { runCreateFlow } = await import("./create-flow-D_SecUxo.mjs");
|
|
911
937
|
const result = await runCreateFlow(cwd, inputName, {
|
|
912
938
|
...opts.template !== void 0 ? { template: opts.template } : {},
|
|
913
939
|
...opts.dryRun || opts.json || opts.out ? { dryRun: true } : {},
|
|
@@ -925,10 +951,10 @@ function registerTopLevelCommands(program, cwd) {
|
|
|
925
951
|
...opts.staged !== void 0 ? { staged: opts.staged } : {},
|
|
926
952
|
...opts.editFile !== void 0 ? { editFile: opts.editFile } : {}
|
|
927
953
|
};
|
|
928
|
-
const { resolveRecommendedCheckPlan, runRecommendedCheck } = await import("./commands-
|
|
954
|
+
const { resolveRecommendedCheckPlan, runRecommendedCheck } = await import("./commands-BD9u8I6D.mjs").then((n) => n.t);
|
|
929
955
|
if (opts.dryRun || opts.json || opts.markdown || opts.out) {
|
|
930
956
|
if (opts.full) {
|
|
931
|
-
const { resolveFullWorkspaceCheckPlan } = await import("./commands-
|
|
957
|
+
const { resolveFullWorkspaceCheckPlan } = await import("./commands-BD9u8I6D.mjs").then((n) => n.t);
|
|
932
958
|
await emitCheckPlan(await resolveFullWorkspaceCheckPlan(cwd), opts, cwd);
|
|
933
959
|
return;
|
|
934
960
|
}
|
|
@@ -939,7 +965,7 @@ function registerTopLevelCommands(program, cwd) {
|
|
|
939
965
|
logger.success("check finished!");
|
|
940
966
|
});
|
|
941
967
|
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-
|
|
968
|
+
const { runDoctor } = await import("./commands-BD9u8I6D.mjs").then((n) => n.t);
|
|
943
969
|
const report = await runDoctor(cwd);
|
|
944
970
|
await emitDoctorReport(report, opts, cwd);
|
|
945
971
|
if (opts.out || opts.json || opts.markdown) {
|
|
@@ -961,8 +987,8 @@ function registerTopLevelCommands(program, cwd) {
|
|
|
961
987
|
}
|
|
962
988
|
logger.success("doctor finished!");
|
|
963
989
|
});
|
|
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-
|
|
990
|
+
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) => {
|
|
991
|
+
const { upgradeMonorepo } = await import("./commands-BD9u8I6D.mjs").then((n) => n.t);
|
|
966
992
|
await upgradeMonorepo(normalizeCliOpts(cwd, opts));
|
|
967
993
|
logger.success("upgrade finished!");
|
|
968
994
|
});
|
|
@@ -972,22 +998,22 @@ function registerTopLevelCommands(program, cwd) {
|
|
|
972
998
|
function registerVerifyCommands(program, cwd) {
|
|
973
999
|
const verifyCommand = program.command("verify").alias("v").description("本地校验工具集");
|
|
974
1000
|
verifyCommand.command("pre-push").description("按推送变更范围执行 build/test/tsd 校验").alias("push").action(async () => {
|
|
975
|
-
const { verifyPrePush } = await import("./commands-
|
|
1001
|
+
const { verifyPrePush } = await import("./commands-BD9u8I6D.mjs").then((n) => n.t);
|
|
976
1002
|
await verifyPrePush({ cwd });
|
|
977
1003
|
});
|
|
978
1004
|
verifyCommand.command("pre-commit").description("执行 lint-staged 校验").alias("commit").action(async () => {
|
|
979
|
-
const { verifyPreCommit } = await import("./commands-
|
|
1005
|
+
const { verifyPreCommit } = await import("./commands-BD9u8I6D.mjs").then((n) => n.t);
|
|
980
1006
|
await verifyPreCommit({ cwd });
|
|
981
1007
|
});
|
|
982
1008
|
verifyCommand.command("commit-msg").description("执行 commitlint 校验").alias("msg").argument("<edit-file>").action(async (editFile) => {
|
|
983
|
-
const { verifyCommitMsg } = await import("./commands-
|
|
1009
|
+
const { verifyCommitMsg } = await import("./commands-BD9u8I6D.mjs").then((n) => n.t);
|
|
984
1010
|
await verifyCommitMsg({
|
|
985
1011
|
cwd,
|
|
986
1012
|
editFile
|
|
987
1013
|
});
|
|
988
1014
|
});
|
|
989
1015
|
verifyCommand.command("staged-typecheck").description("按暂存文件所在 workspace 执行 typecheck").alias("tc").argument("[files...]").action(async (files = []) => {
|
|
990
|
-
const { verifyStagedTypecheck } = await import("./commands-
|
|
1016
|
+
const { verifyStagedTypecheck } = await import("./commands-BD9u8I6D.mjs").then((n) => n.t);
|
|
991
1017
|
verifyStagedTypecheck(files, { cwd });
|
|
992
1018
|
});
|
|
993
1019
|
}
|
|
@@ -1065,13 +1091,13 @@ async function emitWorkspaceList(result, opts) {
|
|
|
1065
1091
|
}
|
|
1066
1092
|
function registerWorkspaceCommands(program, cwd) {
|
|
1067
1093
|
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-
|
|
1094
|
+
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) => {
|
|
1095
|
+
const { upgradeMonorepo } = await import("./commands-BD9u8I6D.mjs").then((n) => n.t);
|
|
1070
1096
|
await upgradeMonorepo(normalizeCliOpts(cwd, opts));
|
|
1071
1097
|
logger.success("workspace upgrade finished!");
|
|
1072
1098
|
});
|
|
1073
|
-
workspaceCommand.command("init").description("初始化工作区元信息(README、package.json、
|
|
1074
|
-
const { initMetadata } = await import("./commands-
|
|
1099
|
+
workspaceCommand.command("init").description("初始化工作区元信息(README、package.json、pnpm intent、issue template)").alias("i").action(async () => {
|
|
1100
|
+
const { initMetadata } = await import("./commands-BD9u8I6D.mjs").then((n) => n.t);
|
|
1075
1101
|
await initMetadata(cwd);
|
|
1076
1102
|
logger.success("workspace init finished!");
|
|
1077
1103
|
});
|
|
@@ -1084,7 +1110,7 @@ function registerWorkspaceCommands(program, cwd) {
|
|
|
1084
1110
|
}), opts);
|
|
1085
1111
|
});
|
|
1086
1112
|
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-
|
|
1113
|
+
const { cleanProjects } = await import("./commands-BD9u8I6D.mjs").then((n) => n.t);
|
|
1088
1114
|
await cleanProjects(cwd, normalizeCleanOptions(opts));
|
|
1089
1115
|
logger.success("workspace clean finished!");
|
|
1090
1116
|
});
|