@icebreakers/monorepo 4.0.2 → 4.0.3
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 +71 -28
- package/dist/{commands-DMDl__jL.mjs → commands-R38YllMo.mjs} +146 -9
- package/dist/{create-flow-D0_9kaqA.mjs → create-flow-B4hEIkS_.mjs} +2 -2
- package/dist/index.d.mts +12 -1
- package/dist/index.mjs +3 -3
- package/dist/{types-C8ml9Ztb.mjs → types-DsSOTneQ.mjs} +2 -2
- package/package.json +3 -3
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-DsSOTneQ.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-R38YllMo.mjs").then((n) => n.t),
|
|
12
12
|
import("./config-itCaAICn.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-R38YllMo.mjs").then((n) => n.t);
|
|
127
127
|
await emitConfigInspection(await inspectMonorepoConfig(cwd), opts, cwd);
|
|
128
128
|
});
|
|
129
129
|
}
|
|
@@ -445,23 +445,23 @@ async function emitEnvSupportBundle(bundle, opts, cwd) {
|
|
|
445
445
|
function registerEnvCommands(program, cwd) {
|
|
446
446
|
const envCommand = program.command("env").alias("e").description("环境命令");
|
|
447
447
|
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) => {
|
|
448
|
-
const { collectEnvInfo } = await import("./commands-
|
|
448
|
+
const { collectEnvInfo } = await import("./commands-R38YllMo.mjs").then((n) => n.t);
|
|
449
449
|
await emitEnvInfo(await collectEnvInfo(cwd), opts, cwd);
|
|
450
450
|
});
|
|
451
451
|
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) => {
|
|
452
|
-
const { collectEnvSnapshot } = await import("./commands-
|
|
452
|
+
const { collectEnvSnapshot } = await import("./commands-R38YllMo.mjs").then((n) => n.t);
|
|
453
453
|
await emitEnvSnapshot(await collectEnvSnapshot(cwd), opts, cwd);
|
|
454
454
|
});
|
|
455
455
|
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) => {
|
|
456
|
-
const { collectEnvPaths } = await import("./commands-
|
|
456
|
+
const { collectEnvPaths } = await import("./commands-R38YllMo.mjs").then((n) => n.t);
|
|
457
457
|
await emitEnvPaths(await collectEnvPaths(cwd), opts, cwd);
|
|
458
458
|
});
|
|
459
459
|
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) => {
|
|
460
|
-
const { collectEnvSupportBundle } = await import("./commands-
|
|
460
|
+
const { collectEnvSupportBundle } = await import("./commands-R38YllMo.mjs").then((n) => n.t);
|
|
461
461
|
await emitEnvSupportBundle(await collectEnvSupportBundle(cwd), opts, cwd);
|
|
462
462
|
});
|
|
463
463
|
envCommand.command("mirror").description("设置 VS Code binary mirror").alias("m").action(async () => {
|
|
464
|
-
const { setVscodeBinaryMirror } = await import("./commands-
|
|
464
|
+
const { setVscodeBinaryMirror } = await import("./commands-R38YllMo.mjs").then((n) => n.t);
|
|
465
465
|
await setVscodeBinaryMirror(cwd);
|
|
466
466
|
logger.success("env mirror finished!");
|
|
467
467
|
});
|
|
@@ -470,7 +470,7 @@ function registerEnvCommands(program, cwd) {
|
|
|
470
470
|
//#region src/cli/commands/package.ts
|
|
471
471
|
function registerPackageCommands(program, cwd) {
|
|
472
472
|
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) => {
|
|
473
|
-
const { runCreateFlow } = await import("./create-flow-
|
|
473
|
+
const { runCreateFlow } = await import("./create-flow-B4hEIkS_.mjs");
|
|
474
474
|
const result = await runCreateFlow(cwd, inputName, {
|
|
475
475
|
...opts.template !== void 0 ? { template: opts.template } : {},
|
|
476
476
|
...opts.dryRun || opts.json || opts.out ? { dryRun: true } : {},
|
|
@@ -482,11 +482,53 @@ function registerPackageCommands(program, cwd) {
|
|
|
482
482
|
});
|
|
483
483
|
}
|
|
484
484
|
//#endregion
|
|
485
|
+
//#region src/cli/commands/release.ts
|
|
486
|
+
async function runReleaseAction(action) {
|
|
487
|
+
try {
|
|
488
|
+
await action();
|
|
489
|
+
} catch (error) {
|
|
490
|
+
logger.error(error instanceof Error ? error.message : String(error));
|
|
491
|
+
process.exitCode = 1;
|
|
492
|
+
}
|
|
493
|
+
}
|
|
494
|
+
function registerReleaseCommands(program, cwd) {
|
|
495
|
+
const releaseCommand = program.command("release").description("发布与 Changesets prerelease 工具集");
|
|
496
|
+
releaseCommand.command("stable").description("在 main 分支执行正式发布").action(async () => {
|
|
497
|
+
await runReleaseAction(async () => {
|
|
498
|
+
const { releaseStable } = await import("./commands-R38YllMo.mjs").then((n) => n.t);
|
|
499
|
+
await releaseStable({ cwd });
|
|
500
|
+
logger.success("stable release finished!");
|
|
501
|
+
});
|
|
502
|
+
});
|
|
503
|
+
const preCommand = releaseCommand.command("pre").description("执行或管理 prerelease 发布");
|
|
504
|
+
preCommand.command("publish").alias("run").description("在 alpha/beta/rc/next 分支发布 prerelease").action(async () => {
|
|
505
|
+
await runReleaseAction(async () => {
|
|
506
|
+
const { releasePrerelease } = await import("./commands-R38YllMo.mjs").then((n) => n.t);
|
|
507
|
+
await releasePrerelease({ cwd });
|
|
508
|
+
logger.success("prerelease finished!");
|
|
509
|
+
});
|
|
510
|
+
});
|
|
511
|
+
preCommand.command("enter").description("进入 Changesets prerelease 模式").argument("<tag>", "alpha / beta / rc / next").action(async (tag) => {
|
|
512
|
+
await runReleaseAction(async () => {
|
|
513
|
+
const { enterPrerelease } = await import("./commands-R38YllMo.mjs").then((n) => n.t);
|
|
514
|
+
enterPrerelease(tag, { cwd });
|
|
515
|
+
logger.success(`entered ${tag} prerelease mode!`);
|
|
516
|
+
});
|
|
517
|
+
});
|
|
518
|
+
preCommand.command("exit").description("退出 Changesets prerelease 模式").action(async () => {
|
|
519
|
+
await runReleaseAction(async () => {
|
|
520
|
+
const { exitPrerelease } = await import("./commands-R38YllMo.mjs").then((n) => n.t);
|
|
521
|
+
exitPrerelease({ cwd });
|
|
522
|
+
logger.success("exited prerelease mode!");
|
|
523
|
+
});
|
|
524
|
+
});
|
|
525
|
+
}
|
|
526
|
+
//#endregion
|
|
485
527
|
//#region src/cli/commands/skills.ts
|
|
486
528
|
const skillTargets = ["codex", "claude"];
|
|
487
529
|
function registerSkillsCommands(program, cwd) {
|
|
488
530
|
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) => {
|
|
489
|
-
const { syncSkills } = await import("./commands-
|
|
531
|
+
const { syncSkills } = await import("./commands-R38YllMo.mjs").then((n) => n.t);
|
|
490
532
|
const selected = /* @__PURE__ */ new Set();
|
|
491
533
|
if (opts.all) for (const target of skillTargets) selected.add(target);
|
|
492
534
|
else {
|
|
@@ -606,7 +648,7 @@ function registerTemplatesCommands(program) {
|
|
|
606
648
|
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) => {
|
|
607
649
|
const { getTemplateChoice, getTemplateChoices, isTemplateCategory, suggestTemplateKey, templateCategories } = await import("@icebreakers/monorepo-templates");
|
|
608
650
|
if (opts.check) {
|
|
609
|
-
const { checkTemplates } = await import("./commands-
|
|
651
|
+
const { checkTemplates } = await import("./commands-R38YllMo.mjs").then((n) => n.t);
|
|
610
652
|
const report = await checkTemplates();
|
|
611
653
|
if (opts.json) await emitTemplateOutput(JSON.stringify(report, null, 2), opts);
|
|
612
654
|
else await emitTemplateOutput(formatTemplateHealthReport(report, !opts.out), opts);
|
|
@@ -685,7 +727,7 @@ function normalizeToolingTargets(tooling) {
|
|
|
685
727
|
function registerToolingCommands(program, cwd) {
|
|
686
728
|
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) => {
|
|
687
729
|
const normalizedTooling = normalizeToolingTargets(tooling);
|
|
688
|
-
const { initTooling } = await import("./commands-
|
|
730
|
+
const { initTooling } = await import("./commands-R38YllMo.mjs").then((n) => n.t);
|
|
689
731
|
await initTooling(cwd, {
|
|
690
732
|
...normalizedTooling ? { targets: normalizedTooling } : {},
|
|
691
733
|
...opts.all !== void 0 ? { all: opts.all } : {},
|
|
@@ -856,7 +898,7 @@ async function emitCheckPlan(plan, opts, cwd) {
|
|
|
856
898
|
}
|
|
857
899
|
function registerTopLevelCommands(program, cwd) {
|
|
858
900
|
program.command("init").description("初始化当前 workspace,并生成推荐配置").alias("setup").option("--preset <preset>", "初始化预设:minimal / standard", "standard").option("-f, --force", "覆盖已存在的 tooling 配置文件").option("--overwrite", "覆盖 setup 管理的已存在文件").option("-y, --yes", "使用默认值跳过所有交互,适合 CI").action(async (opts) => {
|
|
859
|
-
const { init } = await import("./commands-
|
|
901
|
+
const { init } = await import("./commands-R38YllMo.mjs").then((n) => n.t);
|
|
860
902
|
await init(cwd, {
|
|
861
903
|
...opts.preset !== void 0 ? { preset: opts.preset } : {},
|
|
862
904
|
...opts.force !== void 0 ? { force: opts.force } : {},
|
|
@@ -867,7 +909,7 @@ function registerTopLevelCommands(program, cwd) {
|
|
|
867
909
|
logger.info("next: run `pnpm install` and `pnpm build`");
|
|
868
910
|
});
|
|
869
911
|
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) => {
|
|
870
|
-
const { runCreateFlow } = await import("./create-flow-
|
|
912
|
+
const { runCreateFlow } = await import("./create-flow-B4hEIkS_.mjs");
|
|
871
913
|
const result = await runCreateFlow(cwd, inputName, {
|
|
872
914
|
...opts.template !== void 0 ? { template: opts.template } : {},
|
|
873
915
|
...opts.dryRun || opts.json || opts.out ? { dryRun: true } : {},
|
|
@@ -885,10 +927,10 @@ function registerTopLevelCommands(program, cwd) {
|
|
|
885
927
|
...opts.staged !== void 0 ? { staged: opts.staged } : {},
|
|
886
928
|
...opts.editFile !== void 0 ? { editFile: opts.editFile } : {}
|
|
887
929
|
};
|
|
888
|
-
const { resolveRecommendedCheckPlan, runRecommendedCheck } = await import("./commands-
|
|
930
|
+
const { resolveRecommendedCheckPlan, runRecommendedCheck } = await import("./commands-R38YllMo.mjs").then((n) => n.t);
|
|
889
931
|
if (opts.dryRun || opts.json || opts.markdown || opts.out) {
|
|
890
932
|
if (opts.full) {
|
|
891
|
-
const { resolveFullWorkspaceCheckPlan } = await import("./commands-
|
|
933
|
+
const { resolveFullWorkspaceCheckPlan } = await import("./commands-R38YllMo.mjs").then((n) => n.t);
|
|
892
934
|
await emitCheckPlan(await resolveFullWorkspaceCheckPlan(cwd), opts, cwd);
|
|
893
935
|
return;
|
|
894
936
|
}
|
|
@@ -899,7 +941,7 @@ function registerTopLevelCommands(program, cwd) {
|
|
|
899
941
|
logger.success("check finished!");
|
|
900
942
|
});
|
|
901
943
|
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) => {
|
|
902
|
-
const { runDoctor } = await import("./commands-
|
|
944
|
+
const { runDoctor } = await import("./commands-R38YllMo.mjs").then((n) => n.t);
|
|
903
945
|
const report = await runDoctor(cwd);
|
|
904
946
|
await emitDoctorReport(report, opts, cwd);
|
|
905
947
|
if (opts.out || opts.json || opts.markdown) {
|
|
@@ -922,22 +964,22 @@ function registerTopLevelCommands(program, cwd) {
|
|
|
922
964
|
logger.success("doctor finished!");
|
|
923
965
|
});
|
|
924
966
|
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) => {
|
|
925
|
-
const { upgradeMonorepo } = await import("./commands-
|
|
967
|
+
const { upgradeMonorepo } = await import("./commands-R38YllMo.mjs").then((n) => n.t);
|
|
926
968
|
await upgradeMonorepo(normalizeCliOpts(cwd, opts));
|
|
927
969
|
logger.success("upgrade finished!");
|
|
928
970
|
});
|
|
929
971
|
program.command("sync").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) => {
|
|
930
|
-
const { upgradeMonorepo } = await import("./commands-
|
|
972
|
+
const { upgradeMonorepo } = await import("./commands-R38YllMo.mjs").then((n) => n.t);
|
|
931
973
|
await upgradeMonorepo(normalizeCliOpts(cwd, opts));
|
|
932
974
|
logger.success("sync finished!");
|
|
933
975
|
});
|
|
934
976
|
program.command("clean").description("兼容入口:清理选中的 workspace 包").option("-y, --yes", "跳过交互直接清理(等价 autoConfirm)").option("--include-private", "包含 private 包").option("--pinned-version <version>", "覆盖写入的 @icebreakers/monorepo 版本").action(async (opts) => {
|
|
935
|
-
const { cleanProjects } = await import("./commands-
|
|
977
|
+
const { cleanProjects } = await import("./commands-R38YllMo.mjs").then((n) => n.t);
|
|
936
978
|
await cleanProjects(cwd, normalizeCleanOptions(opts));
|
|
937
979
|
logger.success("clean finished!");
|
|
938
980
|
});
|
|
939
981
|
program.command("mirror").description("兼容入口:设置 VS Code binary mirror").action(async () => {
|
|
940
|
-
const { setVscodeBinaryMirror } = await import("./commands-
|
|
982
|
+
const { setVscodeBinaryMirror } = await import("./commands-R38YllMo.mjs").then((n) => n.t);
|
|
941
983
|
await setVscodeBinaryMirror(cwd);
|
|
942
984
|
logger.success("mirror finished!");
|
|
943
985
|
});
|
|
@@ -947,22 +989,22 @@ function registerTopLevelCommands(program, cwd) {
|
|
|
947
989
|
function registerVerifyCommands(program, cwd) {
|
|
948
990
|
const verifyCommand = program.command("verify").alias("v").description("本地校验工具集");
|
|
949
991
|
verifyCommand.command("pre-push").description("按推送变更范围执行 build/test/tsd 校验").alias("push").action(async () => {
|
|
950
|
-
const { verifyPrePush } = await import("./commands-
|
|
992
|
+
const { verifyPrePush } = await import("./commands-R38YllMo.mjs").then((n) => n.t);
|
|
951
993
|
await verifyPrePush({ cwd });
|
|
952
994
|
});
|
|
953
995
|
verifyCommand.command("pre-commit").description("执行 lint-staged 校验").alias("commit").action(async () => {
|
|
954
|
-
const { verifyPreCommit } = await import("./commands-
|
|
996
|
+
const { verifyPreCommit } = await import("./commands-R38YllMo.mjs").then((n) => n.t);
|
|
955
997
|
await verifyPreCommit({ cwd });
|
|
956
998
|
});
|
|
957
999
|
verifyCommand.command("commit-msg").description("执行 commitlint 校验").alias("msg").argument("<edit-file>").action(async (editFile) => {
|
|
958
|
-
const { verifyCommitMsg } = await import("./commands-
|
|
1000
|
+
const { verifyCommitMsg } = await import("./commands-R38YllMo.mjs").then((n) => n.t);
|
|
959
1001
|
await verifyCommitMsg({
|
|
960
1002
|
cwd,
|
|
961
1003
|
editFile
|
|
962
1004
|
});
|
|
963
1005
|
});
|
|
964
1006
|
verifyCommand.command("staged-typecheck").description("按暂存文件所在 workspace 执行 typecheck").alias("tc").argument("[files...]").action(async (files = []) => {
|
|
965
|
-
const { verifyStagedTypecheck } = await import("./commands-
|
|
1007
|
+
const { verifyStagedTypecheck } = await import("./commands-R38YllMo.mjs").then((n) => n.t);
|
|
966
1008
|
verifyStagedTypecheck(files, { cwd });
|
|
967
1009
|
});
|
|
968
1010
|
}
|
|
@@ -1041,12 +1083,12 @@ async function emitWorkspaceList(result, opts) {
|
|
|
1041
1083
|
function registerWorkspaceCommands(program, cwd) {
|
|
1042
1084
|
const workspaceCommand = program.command("workspace").alias("ws").description("工作区命令");
|
|
1043
1085
|
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) => {
|
|
1044
|
-
const { upgradeMonorepo } = await import("./commands-
|
|
1086
|
+
const { upgradeMonorepo } = await import("./commands-R38YllMo.mjs").then((n) => n.t);
|
|
1045
1087
|
await upgradeMonorepo(normalizeCliOpts(cwd, opts));
|
|
1046
1088
|
logger.success("workspace upgrade finished!");
|
|
1047
1089
|
});
|
|
1048
1090
|
workspaceCommand.command("init").description("初始化工作区元信息(README、package.json、changeset、issue template)").alias("i").action(async () => {
|
|
1049
|
-
const { initMetadata } = await import("./commands-
|
|
1091
|
+
const { initMetadata } = await import("./commands-R38YllMo.mjs").then((n) => n.t);
|
|
1050
1092
|
await initMetadata(cwd);
|
|
1051
1093
|
logger.success("workspace init finished!");
|
|
1052
1094
|
});
|
|
@@ -1059,7 +1101,7 @@ function registerWorkspaceCommands(program, cwd) {
|
|
|
1059
1101
|
}), opts);
|
|
1060
1102
|
});
|
|
1061
1103
|
workspaceCommand.command("clean").description("清除选中的包").alias("rm").option("-y, --yes", "跳过交互直接清理(等价 autoConfirm)").option("--include-private", "包含 private 包").option("--pinned-version <version>", "覆盖写入的 @icebreakers/monorepo 版本").action(async (opts) => {
|
|
1062
|
-
const { cleanProjects } = await import("./commands-
|
|
1104
|
+
const { cleanProjects } = await import("./commands-R38YllMo.mjs").then((n) => n.t);
|
|
1063
1105
|
await cleanProjects(cwd, normalizeCleanOptions(opts));
|
|
1064
1106
|
logger.success("workspace clean finished!");
|
|
1065
1107
|
});
|
|
@@ -1075,6 +1117,7 @@ registerWorkspaceCommands(program, cwd);
|
|
|
1075
1117
|
registerToolingCommands(program, cwd);
|
|
1076
1118
|
registerEnvCommands(program, cwd);
|
|
1077
1119
|
registerConfigCommands(program, cwd);
|
|
1120
|
+
registerReleaseCommands(program, cwd);
|
|
1078
1121
|
registerSkillsCommands(program, cwd);
|
|
1079
1122
|
registerVerifyCommands(program, cwd);
|
|
1080
1123
|
registerAiCommands(program, cwd);
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import { t as __exportAll } from "./rolldown-runtime-twds-ZHy.mjs";
|
|
2
2
|
import { i as getWorkspacePackages, n as getWorkspaceData, r as getWorkspacePackageSummaries } from "./workspace-BVfGk4Av.mjs";
|
|
3
|
-
import { _ as isIgnorableFsError, c as devDependencies$1, d as logger, g as fs$1, i as packageDir, l as name$1, n as assetsDir, o as templatesDir, s as dependencies, t as initToolingTargets, u as version$1 } from "./types-
|
|
3
|
+
import { _ as isIgnorableFsError, c as devDependencies$1, d as logger, g as fs$1, i as packageDir, l as name$1, n as assetsDir, o as templatesDir, s as dependencies, t as initToolingTargets, u as version$1 } from "./types-DsSOTneQ.mjs";
|
|
4
4
|
import { a as loadMonorepoConfig, c as resolveToolingConfig, i as getMonorepoConfigCandidates, o as loadMonorepoConfigDetails, s as resolveCommandConfig } from "./config-itCaAICn.mjs";
|
|
5
5
|
import { f as defineTsconfigConfig } from "./tooling-cxnXmQex.mjs";
|
|
6
6
|
import gitUrlParse from "git-url-parse";
|
|
@@ -8,7 +8,7 @@ import { simpleGit } from "simple-git";
|
|
|
8
8
|
import { findWorkspaceDir } from "@pnpm/find-workspace-dir";
|
|
9
9
|
import path from "pathe";
|
|
10
10
|
import process from "node:process";
|
|
11
|
-
import { readdir } from "node:fs/promises";
|
|
11
|
+
import { readFile, readdir } from "node:fs/promises";
|
|
12
12
|
import { execFileSync, spawnSync } from "node:child_process";
|
|
13
13
|
import fs from "node:fs";
|
|
14
14
|
import path$1 from "node:path";
|
|
@@ -172,6 +172,7 @@ const whitespacePattern = /\s+/;
|
|
|
172
172
|
const gitDirName = ".git";
|
|
173
173
|
const defaultWorkspaceOrder = [
|
|
174
174
|
"packages/create-icebreaker",
|
|
175
|
+
"packages/create-repoctl",
|
|
175
176
|
"packages/monorepo",
|
|
176
177
|
"packages/monorepo-templates",
|
|
177
178
|
"packages/repoctl",
|
|
@@ -1619,7 +1620,7 @@ const packageDependencies = {
|
|
|
1619
1620
|
type: "module",
|
|
1620
1621
|
version: "0.0.0",
|
|
1621
1622
|
"private": true,
|
|
1622
|
-
packageManager: "pnpm@10.33.
|
|
1623
|
+
packageManager: "pnpm@10.33.4",
|
|
1623
1624
|
author: "ice breaker <hi@sonofmagic.top>",
|
|
1624
1625
|
repository: {
|
|
1625
1626
|
"type": "git",
|
|
@@ -1641,7 +1642,8 @@ const packageDependencies = {
|
|
|
1641
1642
|
"format": "eslint . --fix",
|
|
1642
1643
|
"validate": "pnpm run build && pnpm run lint && pnpm run typecheck && pnpm run tsd && pnpm run test",
|
|
1643
1644
|
"release": "changeset",
|
|
1644
|
-
"publish-packages": "
|
|
1645
|
+
"publish-packages": "repo release stable",
|
|
1646
|
+
"release:pre": "repo release pre publish",
|
|
1645
1647
|
"------": "--------------",
|
|
1646
1648
|
"preinstall": "npx only-allow pnpm",
|
|
1647
1649
|
"prepare": "husky",
|
|
@@ -1656,10 +1658,11 @@ const packageDependencies = {
|
|
|
1656
1658
|
"clean:repo": "repo clean",
|
|
1657
1659
|
"mirror": "repo mirror",
|
|
1658
1660
|
"------simple": "--------------",
|
|
1659
|
-
"pr:alpha": "
|
|
1660
|
-
"pr:beta": "
|
|
1661
|
-
"pr:rc": "
|
|
1662
|
-
"pr:
|
|
1661
|
+
"pr:alpha": "repo release pre enter alpha",
|
|
1662
|
+
"pr:beta": "repo release pre enter beta",
|
|
1663
|
+
"pr:rc": "repo release pre enter rc",
|
|
1664
|
+
"pr:next": "repo release pre enter next",
|
|
1665
|
+
"pr:exit": "repo release pre exit",
|
|
1663
1666
|
"--------": "----------------",
|
|
1664
1667
|
"script:init": "repo init",
|
|
1665
1668
|
"script:sync": "repo sync",
|
|
@@ -2001,6 +2004,136 @@ async function setVscodeBinaryMirror(cwd) {
|
|
|
2001
2004
|
await fs$1.writeFile(targetJsonPath, `${stringify(json, void 0, 2)}\n`, "utf8");
|
|
2002
2005
|
}
|
|
2003
2006
|
//#endregion
|
|
2007
|
+
//#region src/commands/release.ts
|
|
2008
|
+
const prereleaseBranches = new Set([
|
|
2009
|
+
"alpha",
|
|
2010
|
+
"beta",
|
|
2011
|
+
"rc",
|
|
2012
|
+
"next"
|
|
2013
|
+
]);
|
|
2014
|
+
var ReleaseCommandError = class extends Error {
|
|
2015
|
+
constructor(message, exitCode = 1) {
|
|
2016
|
+
super(message);
|
|
2017
|
+
this.exitCode = exitCode;
|
|
2018
|
+
this.name = "ReleaseCommandError";
|
|
2019
|
+
}
|
|
2020
|
+
};
|
|
2021
|
+
function run(command, args, options) {
|
|
2022
|
+
const result = (options.spawn ?? spawnSync)(command, args, {
|
|
2023
|
+
cwd: options.cwd,
|
|
2024
|
+
encoding: "utf8",
|
|
2025
|
+
shell: false,
|
|
2026
|
+
stdio: "inherit"
|
|
2027
|
+
});
|
|
2028
|
+
if (result.status !== 0) throw new ReleaseCommandError(`command failed: ${command} ${args.join(" ")}`, result.status ?? 1);
|
|
2029
|
+
}
|
|
2030
|
+
function capture(command, args, options) {
|
|
2031
|
+
const result = (options.spawn ?? spawnSync)(command, args, {
|
|
2032
|
+
cwd: options.cwd,
|
|
2033
|
+
encoding: "utf8",
|
|
2034
|
+
shell: false,
|
|
2035
|
+
stdio: [
|
|
2036
|
+
"ignore",
|
|
2037
|
+
"pipe",
|
|
2038
|
+
"inherit"
|
|
2039
|
+
]
|
|
2040
|
+
});
|
|
2041
|
+
if (result.status !== 0) throw new ReleaseCommandError(`command failed: ${command} ${args.join(" ")}`, result.status ?? 1);
|
|
2042
|
+
return result.stdout?.toString().trim() ?? "";
|
|
2043
|
+
}
|
|
2044
|
+
async function readPreState(cwd) {
|
|
2045
|
+
try {
|
|
2046
|
+
const content = await readFile(path.join(cwd, ".changeset/pre.json"), "utf8");
|
|
2047
|
+
return JSON.parse(content);
|
|
2048
|
+
} catch {
|
|
2049
|
+
return null;
|
|
2050
|
+
}
|
|
2051
|
+
}
|
|
2052
|
+
function resolveBranch(options) {
|
|
2053
|
+
return options.branch?.trim() || process.env["GITHUB_REF_NAME"]?.trim() || capture("git", [
|
|
2054
|
+
"rev-parse",
|
|
2055
|
+
"--abbrev-ref",
|
|
2056
|
+
"HEAD"
|
|
2057
|
+
], options);
|
|
2058
|
+
}
|
|
2059
|
+
async function releaseStable(options) {
|
|
2060
|
+
const branch = resolveBranch(options);
|
|
2061
|
+
if (branch !== "main") throw new ReleaseCommandError(`repo release stable is only allowed on main, got ${branch}`);
|
|
2062
|
+
if ((await readPreState(options.cwd))?.mode === "pre") throw new ReleaseCommandError("stable releases must not run while Changesets prerelease mode is active");
|
|
2063
|
+
run("pnpm", ["run", "build"], options);
|
|
2064
|
+
run("pnpm", ["run", "lint"], options);
|
|
2065
|
+
run("pnpm", ["run", "test"], options);
|
|
2066
|
+
run("pnpm", [
|
|
2067
|
+
"exec",
|
|
2068
|
+
"changeset",
|
|
2069
|
+
"version"
|
|
2070
|
+
], options);
|
|
2071
|
+
run("pnpm", [
|
|
2072
|
+
"exec",
|
|
2073
|
+
"changeset",
|
|
2074
|
+
"publish"
|
|
2075
|
+
], options);
|
|
2076
|
+
}
|
|
2077
|
+
async function releasePrerelease(options) {
|
|
2078
|
+
const branch = resolveBranch(options);
|
|
2079
|
+
if (!prereleaseBranches.has(branch)) throw new ReleaseCommandError(`repo release pre is only allowed on alpha, beta, rc, or next branches, got ${branch}`);
|
|
2080
|
+
const preState = await readPreState(options.cwd);
|
|
2081
|
+
if (preState?.mode !== "pre" || preState.tag !== branch) throw new ReleaseCommandError([`prerelease branch ${branch} must already be in Changesets pre mode with matching tag`, `Run \`repo release pre enter ${branch}\`, commit the resulting .changeset/pre.json, and push again.`].join("\n"));
|
|
2082
|
+
run("pnpm", ["run", "build"], options);
|
|
2083
|
+
run("pnpm", ["run", "lint"], options);
|
|
2084
|
+
run("pnpm", ["run", "test"], options);
|
|
2085
|
+
run("pnpm", [
|
|
2086
|
+
"exec",
|
|
2087
|
+
"changeset",
|
|
2088
|
+
"version"
|
|
2089
|
+
], options);
|
|
2090
|
+
if (!((options.spawn ?? spawnSync)("git", [
|
|
2091
|
+
"diff",
|
|
2092
|
+
"--quiet",
|
|
2093
|
+
"--exit-code"
|
|
2094
|
+
], {
|
|
2095
|
+
cwd: options.cwd,
|
|
2096
|
+
encoding: "utf8",
|
|
2097
|
+
shell: false,
|
|
2098
|
+
stdio: "ignore"
|
|
2099
|
+
}).status !== 0)) return;
|
|
2100
|
+
run("git", ["add", "-A"], options);
|
|
2101
|
+
run("git", [
|
|
2102
|
+
"commit",
|
|
2103
|
+
"-m",
|
|
2104
|
+
`chore(release): ${branch} [skip ci]`
|
|
2105
|
+
], options);
|
|
2106
|
+
run("pnpm", [
|
|
2107
|
+
"exec",
|
|
2108
|
+
"changeset",
|
|
2109
|
+
"publish"
|
|
2110
|
+
], options);
|
|
2111
|
+
run("git", [
|
|
2112
|
+
"push",
|
|
2113
|
+
"--follow-tags",
|
|
2114
|
+
"origin",
|
|
2115
|
+
`HEAD:${branch}`
|
|
2116
|
+
], options);
|
|
2117
|
+
}
|
|
2118
|
+
function enterPrerelease(tag, options) {
|
|
2119
|
+
if (!prereleaseBranches.has(tag)) throw new ReleaseCommandError(`unknown prerelease tag ${tag}; expected alpha, beta, rc, or next`);
|
|
2120
|
+
run("pnpm", [
|
|
2121
|
+
"exec",
|
|
2122
|
+
"changeset",
|
|
2123
|
+
"pre",
|
|
2124
|
+
"enter",
|
|
2125
|
+
tag
|
|
2126
|
+
], options);
|
|
2127
|
+
}
|
|
2128
|
+
function exitPrerelease(options) {
|
|
2129
|
+
run("pnpm", [
|
|
2130
|
+
"exec",
|
|
2131
|
+
"changeset",
|
|
2132
|
+
"pre",
|
|
2133
|
+
"exit"
|
|
2134
|
+
], options);
|
|
2135
|
+
}
|
|
2136
|
+
//#endregion
|
|
2004
2137
|
//#region src/commands/templates.ts
|
|
2005
2138
|
async function collectFiles(rootDir) {
|
|
2006
2139
|
const files = [];
|
|
@@ -2710,6 +2843,8 @@ var commands_exports = /* @__PURE__ */ __exportAll({
|
|
|
2710
2843
|
createNewProject: () => createNewProject,
|
|
2711
2844
|
createTimestampFolderName: () => createTimestampFolderName,
|
|
2712
2845
|
defaultAgenticBaseDir: () => defaultAgenticBaseDir,
|
|
2846
|
+
enterPrerelease: () => enterPrerelease,
|
|
2847
|
+
exitPrerelease: () => exitPrerelease,
|
|
2713
2848
|
generateAgenticTemplate: () => generateAgenticTemplate,
|
|
2714
2849
|
generateAgenticTemplates: () => generateAgenticTemplates,
|
|
2715
2850
|
getCreateChoices: () => getCreateChoices,
|
|
@@ -2725,6 +2860,8 @@ var commands_exports = /* @__PURE__ */ __exportAll({
|
|
|
2725
2860
|
inspectMonorepoConfig: () => inspectMonorepoConfig,
|
|
2726
2861
|
loadAgenticTasks: () => loadAgenticTasks,
|
|
2727
2862
|
normalizeInitToolingTargets: () => normalizeInitToolingTargets,
|
|
2863
|
+
releasePrerelease: () => releasePrerelease,
|
|
2864
|
+
releaseStable: () => releaseStable,
|
|
2728
2865
|
resolveCreateNewProjectPlan: () => resolveCreateNewProjectPlan,
|
|
2729
2866
|
resolveFullWorkspaceCheckPlan: () => resolveFullWorkspaceCheckPlan,
|
|
2730
2867
|
resolveRecommendedCheckPlan: () => resolveRecommendedCheckPlan,
|
|
@@ -2741,4 +2878,4 @@ var commands_exports = /* @__PURE__ */ __exportAll({
|
|
|
2741
2878
|
verifyStagedTypecheck: () => verifyStagedTypecheck
|
|
2742
2879
|
});
|
|
2743
2880
|
//#endregion
|
|
2744
|
-
export {
|
|
2881
|
+
export { escapeStringRegexp as A, resolveFullWorkspaceCheckPlan as B, resolveCreateNewProjectPlan as C, getSkillTargetPaths as D, cleanProjects as E, isGitignoreFile as F, verifyPrePush as G, runRecommendedCheck as H, toPublishGitignorePath as I, defaultAgenticBaseDir as J, verifyStagedTypecheck as K, toWorkspaceGitignorePath as L, setByPath as M, getFileHash as N, skillTargets as O, isFileChanged as P, GitClient as Q, updateIssueTemplateConfig as R, getTemplateMap as S, inspectMonorepoConfig as T, verifyCommitMsg as U, resolveRecommendedCheckPlan as V, verifyPreCommit as W, generateAgenticTemplates as X, generateAgenticTemplate as Y, loadAgenticTasks as Z, collectEnvSupportBundle as _, exitPrerelease as a, defaultTemplate as b, setVscodeBinaryMirror as c, initTooling as d, normalizeInitToolingTargets as f, collectEnvSnapshot as g, collectEnvPaths as h, enterPrerelease as i, isMatch as j, syncSkills as k, init as l, collectEnvInfo as m, upgradeMonorepo as n, releasePrerelease as o, createContext as p, createTimestampFolderName as q, checkTemplates as r, releaseStable as s, commands_exports as t, initMetadata as u, runDoctor as v, templateMap as w, getCreateChoices as x, createNewProject as y, getKnownRepoCheckCommands as z };
|
|
@@ -1,5 +1,5 @@
|
|
|
1
|
-
import {
|
|
2
|
-
import { d as logger, g as fs } from "./types-
|
|
1
|
+
import { C as resolveCreateNewProjectPlan, b as defaultTemplate, x as getCreateChoices, y as createNewProject } from "./commands-R38YllMo.mjs";
|
|
2
|
+
import { d as logger, g as fs } from "./types-DsSOTneQ.mjs";
|
|
3
3
|
import { s as resolveCommandConfig } from "./config-itCaAICn.mjs";
|
|
4
4
|
import path from "pathe";
|
|
5
5
|
import process from "node:process";
|
package/dist/index.d.mts
CHANGED
|
@@ -368,6 +368,17 @@ declare function cleanProjects(cwd: string, overrides?: Partial<CleanCommandConf
|
|
|
368
368
|
*/
|
|
369
369
|
declare function setVscodeBinaryMirror(cwd: string): Promise<void>;
|
|
370
370
|
//#endregion
|
|
371
|
+
//#region src/commands/release.d.ts
|
|
372
|
+
interface ReleaseOptions {
|
|
373
|
+
cwd: string;
|
|
374
|
+
branch?: string;
|
|
375
|
+
spawn?: typeof spawnSync;
|
|
376
|
+
}
|
|
377
|
+
declare function releaseStable(options: ReleaseOptions): Promise<void>;
|
|
378
|
+
declare function releasePrerelease(options: ReleaseOptions): Promise<void>;
|
|
379
|
+
declare function enterPrerelease(tag: string, options: ReleaseOptions): void;
|
|
380
|
+
declare function exitPrerelease(options: ReleaseOptions): void;
|
|
381
|
+
//#endregion
|
|
371
382
|
//#region src/commands/upgrade/index.d.ts
|
|
372
383
|
/**
|
|
373
384
|
* 将 assets 目录的模版文件同步到工程中,实现一键升级脚手架能力。
|
|
@@ -589,4 +600,4 @@ declare function escapeStringRegexp(str: string): string;
|
|
|
589
600
|
*/
|
|
590
601
|
declare function isMatch(str: string, arr: RegExp[]): boolean;
|
|
591
602
|
//#endregion
|
|
592
|
-
export { type AgenticTemplateFormat, type AgenticTemplateTask, type AiCommandConfig, type CheckTemplatesOptions, type CleanCommandConfig, type CliOpts, type CommitMsgVerifyOptions, type CommitlintToolingConfig, type ConfigInspection, ConfigValues, Context, type CreateChoiceOption, type CreateCommandConfig, type CreateNewProjectOptions, type CreateNewProjectPlan, DefineConfigOptions, DefineVitestConfigOptions, DefineVitestProjectConfigOptions, type DoctorCheck, type DoctorReport, type DoctorStatus, type DoctorSummary, type EnvInfo, type EnvPathEntry, type EnvPaths, type EnvSnapshot, type EnvSupportBundle, type EslintToolingConfig, type GenerateAgenticTemplateOptions, type GetWorkspacePackagesOptions, GitClient, type HuskyToolingConfig, type InitCommandConfig, JsonWriteOptions, type LintStagedToolingConfig, LoadedMonorepoConfig, type MirrorCommandConfig, MonorepoCommitlintConfig, type MonorepoConfig, MonorepoEslintConfig, MonorepoLintStagedConfig, MonorepoLintStagedConfigOptions, MonorepoStylelintConfig, MonorepoTsconfig, MonorepoVitestConfigOptions, MonorepoVitestConfigOverrides, MonorepoVitestConfigResult, MonorepoVitestProjectConfigOptions, MonorepoVitestProjectConfigResult, PackageJson, PackageJsonBugs, PackageJsonExports, PackageJsonPerson, PackageJsonRepository, type PreCommitVerifyOptions, type PrePushVerifyOptions, type RecommendedCheckMode, type RecommendedCheckOptions, type RecommendedCheckPlan, type RecommendedCheckPlanCommand, SimpleGit, SimpleGitOptions, type SkillTarget, type StagedTypecheckOptions, type StylelintToolingConfig, type SyncSkillsOptions, type TemplateHealthCheck, type TemplateHealthReport, type TemplateHealthStatus, type TemplateHealthSummary, type ToolingConfig, TsconfigToolingConfig, type UpgradeCommandConfig, type VerifyCommandOptions, type VitestProjectToolingConfig, type VitestToolingConfig, WorkspaceData, WorkspacePackage, WorkspacePackageManifest, WorkspacePackageSummary, WorkspacePackageSummaryData, WorkspacePackageWithJsonPath, assetsDir, checkTemplates, cleanProjects, clearWorkspaceCache, cliName, collectEnvInfo, collectEnvPaths, collectEnvSnapshot, collectEnvSupportBundle, configExtensions, copy, createContext, createMonorepoCommitlintConfig, createMonorepoEslintConfig, createMonorepoLintStagedConfig, createMonorepoStylelintConfig, createMonorepoTsconfig, createMonorepoVitestConfig, createMonorepoVitestProjectConfig, createNewProject, createTimestampFolderName, defaultAgenticBaseDir, defineCommitlintConfig, defineEslintConfig, defineLintStagedConfig, defineMonorepoConfig, defineStylelintConfig, defineTsconfigConfig, defineVitestConfig, defineVitestProjectConfig, ensureDir, ensureFile, escapeStringRegexp, exists, generateAgenticTemplate, generateAgenticTemplates, getCreateChoices, getFileHash, getKnownRepoCheckCommands, getMonorepoConfigCandidates, getSkillTargetPaths, getTemplateMap, getWorkspaceData, getWorkspacePackageSummaries, getWorkspacePackages, init, initMetadata, initTooling, initToolingTargets, inspectMonorepoConfig, isFileChanged, isGitignoreFile, isIgnorableFsError, isMatch, loadAgenticTasks, loadMonorepoConfig, loadMonorepoConfigDetails, loadMonorepoToolingConfig, logger, normalizeInitToolingTargets, outputFile, outputJSON, outputJson, packageDir, name as packageName, pathExists, readJSON, readJson, remove, resolveCommandConfig, resolveCreateNewProjectPlan, resolveFullWorkspaceCheckPlan, resolveRecommendedCheckPlan, resolveToolingConfig, rootDir, runDoctor, runRecommendedCheck, setByPath, setVscodeBinaryMirror, skillTargets, syncSkills, templateMap, templatesDir, toPublishGitignorePath, toWorkspaceGitignorePath, updateIssueTemplateConfig, upgradeMonorepo, verifyCommitMsg, verifyPreCommit, verifyPrePush, verifyStagedTypecheck, version, writeJSON, writeJson };
|
|
603
|
+
export { type AgenticTemplateFormat, type AgenticTemplateTask, type AiCommandConfig, type CheckTemplatesOptions, type CleanCommandConfig, type CliOpts, type CommitMsgVerifyOptions, type CommitlintToolingConfig, type ConfigInspection, ConfigValues, Context, type CreateChoiceOption, type CreateCommandConfig, type CreateNewProjectOptions, type CreateNewProjectPlan, DefineConfigOptions, DefineVitestConfigOptions, DefineVitestProjectConfigOptions, type DoctorCheck, type DoctorReport, type DoctorStatus, type DoctorSummary, type EnvInfo, type EnvPathEntry, type EnvPaths, type EnvSnapshot, type EnvSupportBundle, type EslintToolingConfig, type GenerateAgenticTemplateOptions, type GetWorkspacePackagesOptions, GitClient, type HuskyToolingConfig, type InitCommandConfig, JsonWriteOptions, type LintStagedToolingConfig, LoadedMonorepoConfig, type MirrorCommandConfig, MonorepoCommitlintConfig, type MonorepoConfig, MonorepoEslintConfig, MonorepoLintStagedConfig, MonorepoLintStagedConfigOptions, MonorepoStylelintConfig, MonorepoTsconfig, MonorepoVitestConfigOptions, MonorepoVitestConfigOverrides, MonorepoVitestConfigResult, MonorepoVitestProjectConfigOptions, MonorepoVitestProjectConfigResult, PackageJson, PackageJsonBugs, PackageJsonExports, PackageJsonPerson, PackageJsonRepository, type PreCommitVerifyOptions, type PrePushVerifyOptions, type RecommendedCheckMode, type RecommendedCheckOptions, type RecommendedCheckPlan, type RecommendedCheckPlanCommand, SimpleGit, SimpleGitOptions, type SkillTarget, type StagedTypecheckOptions, type StylelintToolingConfig, type SyncSkillsOptions, type TemplateHealthCheck, type TemplateHealthReport, type TemplateHealthStatus, type TemplateHealthSummary, type ToolingConfig, TsconfigToolingConfig, type UpgradeCommandConfig, type VerifyCommandOptions, type VitestProjectToolingConfig, type VitestToolingConfig, WorkspaceData, WorkspacePackage, WorkspacePackageManifest, WorkspacePackageSummary, WorkspacePackageSummaryData, WorkspacePackageWithJsonPath, assetsDir, checkTemplates, cleanProjects, clearWorkspaceCache, cliName, collectEnvInfo, collectEnvPaths, collectEnvSnapshot, collectEnvSupportBundle, configExtensions, copy, createContext, createMonorepoCommitlintConfig, createMonorepoEslintConfig, createMonorepoLintStagedConfig, createMonorepoStylelintConfig, createMonorepoTsconfig, createMonorepoVitestConfig, createMonorepoVitestProjectConfig, createNewProject, createTimestampFolderName, defaultAgenticBaseDir, defineCommitlintConfig, defineEslintConfig, defineLintStagedConfig, defineMonorepoConfig, defineStylelintConfig, defineTsconfigConfig, defineVitestConfig, defineVitestProjectConfig, ensureDir, ensureFile, enterPrerelease, escapeStringRegexp, exists, exitPrerelease, generateAgenticTemplate, generateAgenticTemplates, getCreateChoices, getFileHash, getKnownRepoCheckCommands, getMonorepoConfigCandidates, getSkillTargetPaths, getTemplateMap, getWorkspaceData, getWorkspacePackageSummaries, getWorkspacePackages, init, initMetadata, initTooling, initToolingTargets, inspectMonorepoConfig, isFileChanged, isGitignoreFile, isIgnorableFsError, isMatch, loadAgenticTasks, loadMonorepoConfig, loadMonorepoConfigDetails, loadMonorepoToolingConfig, logger, normalizeInitToolingTargets, outputFile, outputJSON, outputJson, packageDir, name as packageName, pathExists, readJSON, readJson, releasePrerelease, releaseStable, remove, resolveCommandConfig, resolveCreateNewProjectPlan, resolveFullWorkspaceCheckPlan, resolveRecommendedCheckPlan, resolveToolingConfig, rootDir, runDoctor, runRecommendedCheck, setByPath, setVscodeBinaryMirror, skillTargets, syncSkills, templateMap, templatesDir, toPublishGitignorePath, toWorkspaceGitignorePath, updateIssueTemplateConfig, upgradeMonorepo, verifyCommitMsg, verifyPreCommit, verifyPrePush, verifyStagedTypecheck, version, writeJSON, writeJson };
|
package/dist/index.mjs
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
|
-
import { A as
|
|
1
|
+
import { A as escapeStringRegexp, B as resolveFullWorkspaceCheckPlan, C as resolveCreateNewProjectPlan, D as getSkillTargetPaths, E as cleanProjects, F as isGitignoreFile, G as verifyPrePush, H as runRecommendedCheck, I as toPublishGitignorePath, J as defaultAgenticBaseDir, K as verifyStagedTypecheck, L as toWorkspaceGitignorePath, M as setByPath, N as getFileHash, O as skillTargets, P as isFileChanged, Q as GitClient, R as updateIssueTemplateConfig, S as getTemplateMap, T as inspectMonorepoConfig, U as verifyCommitMsg, V as resolveRecommendedCheckPlan, W as verifyPreCommit, X as generateAgenticTemplates, Y as generateAgenticTemplate, Z as loadAgenticTasks, _ as collectEnvSupportBundle, a as exitPrerelease, c as setVscodeBinaryMirror, d as initTooling, f as normalizeInitToolingTargets, g as collectEnvSnapshot, h as collectEnvPaths, i as enterPrerelease, j as isMatch, k as syncSkills, l as init, m as collectEnvInfo, n as upgradeMonorepo, o as releasePrerelease, p as createContext, q as createTimestampFolderName, r as checkTemplates, s as releaseStable, u as initMetadata, v as runDoctor, w as templateMap, x as getCreateChoices, y as createNewProject, z as getKnownRepoCheckCommands } from "./commands-R38YllMo.mjs";
|
|
2
2
|
import { i as getWorkspacePackages, n as getWorkspaceData, r as getWorkspacePackageSummaries, t as clearWorkspaceCache } from "./workspace-BVfGk4Av.mjs";
|
|
3
|
-
import { C as readJson, E as writeJson, S as readJSON, T as writeJSON, _ as isIgnorableFsError, a as rootDir, b as outputJson, d as logger, f as copy, h as exists, i as packageDir, l as name, m as ensureFile, n as assetsDir, o as templatesDir, p as ensureDir, r as cliName, t as initToolingTargets, u as version, v as outputFile, w as remove, x as pathExists, y as outputJSON } from "./types-
|
|
3
|
+
import { C as readJson, E as writeJson, S as readJSON, T as writeJSON, _ as isIgnorableFsError, a as rootDir, b as outputJson, d as logger, f as copy, h as exists, i as packageDir, l as name, m as ensureFile, n as assetsDir, o as templatesDir, p as ensureDir, r as cliName, t as initToolingTargets, u as version, v as outputFile, w as remove, x as pathExists, y as outputJSON } from "./types-DsSOTneQ.mjs";
|
|
4
4
|
import { a as loadMonorepoConfig, c as resolveToolingConfig, i as getMonorepoConfigCandidates, o as loadMonorepoConfigDetails, r as defineMonorepoConfig, s as resolveCommandConfig, t as configExtensions } from "./config-itCaAICn.mjs";
|
|
5
5
|
import { a as createMonorepoTsconfig, c as defineCommitlintConfig, d as defineStylelintConfig, f as defineTsconfigConfig, h as loadMonorepoToolingConfig, i as createMonorepoStylelintConfig, l as defineEslintConfig, m as defineVitestProjectConfig, n as createMonorepoEslintConfig, o as createMonorepoVitestConfig, p as defineVitestConfig, r as createMonorepoLintStagedConfig, s as createMonorepoVitestProjectConfig, t as createMonorepoCommitlintConfig, u as defineLintStagedConfig } from "./tooling-cxnXmQex.mjs";
|
|
6
|
-
export { GitClient, assetsDir, checkTemplates, cleanProjects, clearWorkspaceCache, cliName, collectEnvInfo, collectEnvPaths, collectEnvSnapshot, collectEnvSupportBundle, configExtensions, copy, createContext, createMonorepoCommitlintConfig, createMonorepoEslintConfig, createMonorepoLintStagedConfig, createMonorepoStylelintConfig, createMonorepoTsconfig, createMonorepoVitestConfig, createMonorepoVitestProjectConfig, createNewProject, createTimestampFolderName, defaultAgenticBaseDir, defineCommitlintConfig, defineEslintConfig, defineLintStagedConfig, defineMonorepoConfig, defineStylelintConfig, defineTsconfigConfig, defineVitestConfig, defineVitestProjectConfig, ensureDir, ensureFile, escapeStringRegexp, exists, generateAgenticTemplate, generateAgenticTemplates, getCreateChoices, getFileHash, getKnownRepoCheckCommands, getMonorepoConfigCandidates, getSkillTargetPaths, getTemplateMap, getWorkspaceData, getWorkspacePackageSummaries, getWorkspacePackages, init, initMetadata, initTooling, initToolingTargets, inspectMonorepoConfig, isFileChanged, isGitignoreFile, isIgnorableFsError, isMatch, loadAgenticTasks, loadMonorepoConfig, loadMonorepoConfigDetails, loadMonorepoToolingConfig, logger, normalizeInitToolingTargets, outputFile, outputJSON, outputJson, packageDir, name as packageName, pathExists, readJSON, readJson, remove, resolveCommandConfig, resolveCreateNewProjectPlan, resolveFullWorkspaceCheckPlan, resolveRecommendedCheckPlan, resolveToolingConfig, rootDir, runDoctor, runRecommendedCheck, setByPath, setVscodeBinaryMirror, skillTargets, syncSkills, templateMap, templatesDir, toPublishGitignorePath, toWorkspaceGitignorePath, updateIssueTemplateConfig, upgradeMonorepo, verifyCommitMsg, verifyPreCommit, verifyPrePush, verifyStagedTypecheck, version, writeJSON, writeJson };
|
|
6
|
+
export { GitClient, assetsDir, checkTemplates, cleanProjects, clearWorkspaceCache, cliName, collectEnvInfo, collectEnvPaths, collectEnvSnapshot, collectEnvSupportBundle, configExtensions, copy, createContext, createMonorepoCommitlintConfig, createMonorepoEslintConfig, createMonorepoLintStagedConfig, createMonorepoStylelintConfig, createMonorepoTsconfig, createMonorepoVitestConfig, createMonorepoVitestProjectConfig, createNewProject, createTimestampFolderName, defaultAgenticBaseDir, defineCommitlintConfig, defineEslintConfig, defineLintStagedConfig, defineMonorepoConfig, defineStylelintConfig, defineTsconfigConfig, defineVitestConfig, defineVitestProjectConfig, ensureDir, ensureFile, enterPrerelease, escapeStringRegexp, exists, exitPrerelease, generateAgenticTemplate, generateAgenticTemplates, getCreateChoices, getFileHash, getKnownRepoCheckCommands, getMonorepoConfigCandidates, getSkillTargetPaths, getTemplateMap, getWorkspaceData, getWorkspacePackageSummaries, getWorkspacePackages, init, initMetadata, initTooling, initToolingTargets, inspectMonorepoConfig, isFileChanged, isGitignoreFile, isIgnorableFsError, isMatch, loadAgenticTasks, loadMonorepoConfig, loadMonorepoConfigDetails, loadMonorepoToolingConfig, logger, normalizeInitToolingTargets, outputFile, outputJSON, outputJson, packageDir, name as packageName, pathExists, readJSON, readJson, releasePrerelease, releaseStable, remove, resolveCommandConfig, resolveCreateNewProjectPlan, resolveFullWorkspaceCheckPlan, resolveRecommendedCheckPlan, resolveToolingConfig, rootDir, runDoctor, runRecommendedCheck, setByPath, setVscodeBinaryMirror, skillTargets, syncSkills, templateMap, templatesDir, toPublishGitignorePath, toWorkspaceGitignorePath, updateIssueTemplateConfig, upgradeMonorepo, verifyCommitMsg, verifyPreCommit, verifyPrePush, verifyStagedTypecheck, version, writeJSON, writeJson };
|
|
@@ -142,7 +142,7 @@ const logger = createConsola();
|
|
|
142
142
|
//#endregion
|
|
143
143
|
//#region package.json
|
|
144
144
|
var name = "@icebreakers/monorepo";
|
|
145
|
-
var version = "4.0.
|
|
145
|
+
var version = "4.0.3";
|
|
146
146
|
var dependencies = {
|
|
147
147
|
"@icebreakers/commitlint-config": "^2.0.0",
|
|
148
148
|
"@icebreakers/eslint-config": "^4.0.10",
|
|
@@ -151,7 +151,7 @@ var dependencies = {
|
|
|
151
151
|
"@pnpm/find-workspace-dir": "^1000.1.5",
|
|
152
152
|
"@pnpm/logger": "^1100.0.0",
|
|
153
153
|
"@pnpm/types": "^1101.0.0",
|
|
154
|
-
"@pnpm/worker": "^1100.1.
|
|
154
|
+
"@pnpm/worker": "^1100.1.2",
|
|
155
155
|
"@pnpm/workspace.find-packages": "^1000.0.65",
|
|
156
156
|
"@pnpm/workspace.read-manifest": "^1000.3.1",
|
|
157
157
|
"c12": "^3.3.4",
|
package/package.json
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@icebreakers/monorepo",
|
|
3
3
|
"type": "module",
|
|
4
|
-
"version": "4.0.
|
|
4
|
+
"version": "4.0.3",
|
|
5
5
|
"description": "Core engine and compatibility package behind the repoctl monorepo CLI",
|
|
6
6
|
"author": "ice breaker <hi@sonofmagic.top>",
|
|
7
7
|
"license": "MIT",
|
|
@@ -65,7 +65,7 @@
|
|
|
65
65
|
"@pnpm/find-workspace-dir": "^1000.1.5",
|
|
66
66
|
"@pnpm/logger": "^1100.0.0",
|
|
67
67
|
"@pnpm/types": "^1101.0.0",
|
|
68
|
-
"@pnpm/worker": "^1100.1.
|
|
68
|
+
"@pnpm/worker": "^1100.1.2",
|
|
69
69
|
"@pnpm/workspace.find-packages": "^1000.0.65",
|
|
70
70
|
"@pnpm/workspace.read-manifest": "^1000.3.1",
|
|
71
71
|
"c12": "^3.3.4",
|
|
@@ -82,7 +82,7 @@
|
|
|
82
82
|
"simple-git": "^3.36.0",
|
|
83
83
|
"vitest": "~4.1.5",
|
|
84
84
|
"yaml": "^2.8.4",
|
|
85
|
-
"@icebreakers/monorepo-templates": "1.0.
|
|
85
|
+
"@icebreakers/monorepo-templates": "1.0.3"
|
|
86
86
|
},
|
|
87
87
|
"devDependencies": {
|
|
88
88
|
"@types/klaw": "^3.0.7",
|