@icebreakers/monorepo 4.0.4 → 4.0.6
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 +42 -37
- package/dist/cli.mjs +38 -64
- package/dist/{commands-cbdES8d3.mjs → commands-D-ou6qGx.mjs} +249 -132
- package/dist/{config-itCaAICn.mjs → config-BrLDFwAH.mjs} +13 -22
- package/dist/{create-flow-B-0TbNQ9.mjs → create-flow-OURvJR5T.mjs} +3 -3
- package/dist/{index-DvZrxwOh.d.mts → index-CJ0vJpBt.d.mts} +60 -45
- package/dist/index.d.mts +10 -17
- package/dist/index.mjs +5 -5
- package/dist/{tooling-cxnXmQex.mjs → tooling-D1Bjw6xy.mjs} +63 -37
- package/dist/tooling-entry.d.mts +2 -2
- package/dist/tooling-entry.mjs +1 -1
- package/dist/{types-C8HOgt8c.mjs → types-dLzSmmdf.mjs} +4 -4
- package/package.json +30 -10
- package/bin/mo.js +0 -2
- package/bin/monorepo.js +0 -2
- package/bin/rc.js +0 -2
|
@@ -7,7 +7,7 @@ import { loadConfig } from "c12";
|
|
|
7
7
|
var config_exports = /* @__PURE__ */ __exportAll({
|
|
8
8
|
configExtensions: () => configExtensions,
|
|
9
9
|
defineMonorepoConfig: () => defineMonorepoConfig,
|
|
10
|
-
|
|
10
|
+
getRepoctlConfigCandidates: () => getRepoctlConfigCandidates,
|
|
11
11
|
loadMonorepoConfig: () => loadMonorepoConfig,
|
|
12
12
|
loadMonorepoConfigDetails: () => loadMonorepoConfigDetails,
|
|
13
13
|
resolveCommandConfig: () => resolveCommandConfig,
|
|
@@ -25,45 +25,38 @@ const configExtensions = [
|
|
|
25
25
|
"mjs",
|
|
26
26
|
"cjs"
|
|
27
27
|
];
|
|
28
|
-
function
|
|
29
|
-
return {
|
|
30
|
-
repoctl: configExtensions.map((ext) => path.resolve(cwd, `repoctl.config.${ext}`)),
|
|
31
|
-
monorepo: configExtensions.map((ext) => path.resolve(cwd, `monorepo.config.${ext}`))
|
|
32
|
-
};
|
|
28
|
+
function getRepoctlConfigCandidates(cwd) {
|
|
29
|
+
return configExtensions.map((ext) => path.resolve(cwd, `repoctl.config.${ext}`));
|
|
33
30
|
}
|
|
34
|
-
function findConfigFiles(cwd
|
|
35
|
-
return
|
|
31
|
+
function findConfigFiles(cwd) {
|
|
32
|
+
return getRepoctlConfigCandidates(cwd).filter((file) => fs.existsSync(file));
|
|
36
33
|
}
|
|
37
34
|
/**
|
|
38
35
|
* 基于 c12 的通用配置加载逻辑,支持多种配置文件格式。
|
|
39
36
|
*/
|
|
40
37
|
async function loadConfigInternal(cwd) {
|
|
41
|
-
const repoctlConfigFiles = findConfigFiles(cwd, "repoctl");
|
|
42
|
-
const monorepoConfigFiles = findConfigFiles(cwd, "monorepo");
|
|
43
|
-
if (repoctlConfigFiles.length > 0 && monorepoConfigFiles.length > 0) throw new Error(`Found both repoctl and monorepo config files in ${cwd}. Please keep only one of them. repoctl candidates: ${repoctlConfigFiles.join(", ")}; monorepo candidates: ${monorepoConfigFiles.join(", ")}`);
|
|
44
|
-
const configName = repoctlConfigFiles.length > 0 ? "repoctl" : "monorepo";
|
|
45
38
|
const { config, configFile } = await loadConfig({
|
|
46
|
-
name:
|
|
39
|
+
name: "repoctl",
|
|
47
40
|
cwd,
|
|
48
41
|
rcFile: false,
|
|
49
42
|
defaults: {},
|
|
50
43
|
globalRc: false,
|
|
51
44
|
packageJson: false
|
|
52
45
|
});
|
|
53
|
-
const matchedConfigFile = configFile && fs.existsSync(configFile) ? findConfigFiles(cwd
|
|
46
|
+
const matchedConfigFile = configFile && fs.existsSync(configFile) ? findConfigFiles(cwd).find((file) => path.basename(file).toLowerCase() === path.basename(configFile).toLowerCase()) : void 0;
|
|
54
47
|
return {
|
|
55
48
|
file: matchedConfigFile ? await realpath(matchedConfigFile) : configFile && fs.existsSync(configFile) ? await realpath(configFile) : null,
|
|
56
49
|
config: config ?? {}
|
|
57
50
|
};
|
|
58
51
|
}
|
|
59
52
|
/**
|
|
60
|
-
* 为 `repoctl.config.ts`
|
|
53
|
+
* 为 `repoctl.config.ts` 提供类型提示的辅助函数。
|
|
61
54
|
*
|
|
62
55
|
* 推荐在用户项目中这样写:
|
|
63
56
|
*
|
|
64
57
|
* @example
|
|
65
58
|
* ```ts
|
|
66
|
-
* import { defineMonorepoConfig } from '
|
|
59
|
+
* import { defineMonorepoConfig } from 'repoctl'
|
|
67
60
|
*
|
|
68
61
|
* export default defineMonorepoConfig({
|
|
69
62
|
* tooling: {
|
|
@@ -79,7 +72,6 @@ function defineMonorepoConfig(config) {
|
|
|
79
72
|
}
|
|
80
73
|
/**
|
|
81
74
|
* 加载配置对象和实际命中的配置文件路径,供诊断和脚本集成使用。
|
|
82
|
-
* 优先级为 `repoctl.config.*`,如果两者同时存在则直接报错。
|
|
83
75
|
*
|
|
84
76
|
* @param cwd 配置文件解析起点
|
|
85
77
|
* @returns 配置文件路径和解析后的配置对象;未找到时 file 为 null、config 为空对象
|
|
@@ -90,8 +82,7 @@ async function loadMonorepoConfigDetails(cwd) {
|
|
|
90
82
|
return cache.get(key);
|
|
91
83
|
}
|
|
92
84
|
/**
|
|
93
|
-
* 加载指定目录的 `repoctl.config
|
|
94
|
-
* 优先级为 `repoctl.config.*`,如果两者同时存在则直接报错。
|
|
85
|
+
* 加载指定目录的 `repoctl.config.*`,并在当前进程内做内存缓存。
|
|
95
86
|
*
|
|
96
87
|
* @param cwd 配置文件解析起点
|
|
97
88
|
* @returns 解析后的配置对象;未找到时返回空对象
|
|
@@ -103,7 +94,7 @@ async function loadMonorepoConfig(cwd) {
|
|
|
103
94
|
/**
|
|
104
95
|
* 获取单个命令对应的配置块。
|
|
105
96
|
*
|
|
106
|
-
* @param name 命令名称,对应 `repoctl.config.ts
|
|
97
|
+
* @param name 命令名称,对应 `repoctl.config.ts -> commands.<name>`
|
|
107
98
|
* @param cwd 配置文件解析起点
|
|
108
99
|
* @returns 对应命令配置;未配置时返回空对象
|
|
109
100
|
*/
|
|
@@ -111,7 +102,7 @@ async function resolveCommandConfig(name, cwd) {
|
|
|
111
102
|
return ((await loadMonorepoConfig(cwd)).commands ?? {})[name] ?? {};
|
|
112
103
|
}
|
|
113
104
|
/**
|
|
114
|
-
* 获取 `repoctl.config.ts`
|
|
105
|
+
* 获取 `repoctl.config.ts` 中完整的 `tooling` 配置块。
|
|
115
106
|
*
|
|
116
107
|
* @param cwd 配置文件解析起点
|
|
117
108
|
* @returns `tooling` 配置;未配置时返回空对象
|
|
@@ -120,4 +111,4 @@ async function resolveToolingConfig(cwd) {
|
|
|
120
111
|
return (await loadMonorepoConfig(cwd)).tooling ?? {};
|
|
121
112
|
}
|
|
122
113
|
//#endregion
|
|
123
|
-
export { loadMonorepoConfig as a, resolveToolingConfig as c,
|
|
114
|
+
export { loadMonorepoConfig as a, resolveToolingConfig as c, getRepoctlConfigCandidates as i, config_exports as n, loadMonorepoConfigDetails as o, defineMonorepoConfig as r, resolveCommandConfig as s, configExtensions as t };
|
|
@@ -1,6 +1,6 @@
|
|
|
1
|
-
import { C as resolveCreateNewProjectPlan, b as defaultTemplate, x as getCreateChoices, y as createNewProject } from "./commands-
|
|
2
|
-
import { d as logger, g as fs } from "./types-
|
|
3
|
-
import { s as resolveCommandConfig } from "./config-
|
|
1
|
+
import { C as resolveCreateNewProjectPlan, b as defaultTemplate, x as getCreateChoices, y as createNewProject } from "./commands-D-ou6qGx.mjs";
|
|
2
|
+
import { d as logger, g as fs } from "./types-dLzSmmdf.mjs";
|
|
3
|
+
import { s as resolveCommandConfig } from "./config-BrLDFwAH.mjs";
|
|
4
4
|
import path from "pathe";
|
|
5
5
|
import process from "node:process";
|
|
6
6
|
import { input, select } from "@icebreakers/monorepo-templates";
|
|
@@ -166,7 +166,7 @@ declare function resolveCreateNewProjectPlan(options?: CreateNewProjectOptions):
|
|
|
166
166
|
* 根据模板生成一个新项目目录,并自动补写 `package.json` 常用字段。
|
|
167
167
|
*
|
|
168
168
|
* 默认行为:
|
|
169
|
-
* -
|
|
169
|
+
* - 读取 `repoctl.config.ts -> commands.create`
|
|
170
170
|
* - 模板类型默认回退到 `'tsdown'`
|
|
171
171
|
* - 若目标目录已存在则直接抛错
|
|
172
172
|
* - 若模板包含 `package.json`,会自动写入 `name`、`version` 与 Git 仓库信息
|
|
@@ -240,7 +240,7 @@ interface AiCommandConfig {
|
|
|
240
240
|
tasksFile?: string;
|
|
241
241
|
}
|
|
242
242
|
/**
|
|
243
|
-
* `
|
|
243
|
+
* `repo package create` 命令的配置项。
|
|
244
244
|
*/
|
|
245
245
|
interface CreateCommandConfig extends Partial<Omit<CreateNewProjectOptions, 'cwd'>> {
|
|
246
246
|
/**
|
|
@@ -295,7 +295,7 @@ interface CreateChoiceOption {
|
|
|
295
295
|
disabled?: boolean | string;
|
|
296
296
|
}
|
|
297
297
|
/**
|
|
298
|
-
* `
|
|
298
|
+
* `repo workspace clean` 命令配置,可控制自动选择、排除包等行为。
|
|
299
299
|
*/
|
|
300
300
|
interface CleanCommandConfig {
|
|
301
301
|
/**
|
|
@@ -314,13 +314,13 @@ interface CleanCommandConfig {
|
|
|
314
314
|
*/
|
|
315
315
|
includePrivate?: boolean;
|
|
316
316
|
/**
|
|
317
|
-
* 强制写回的
|
|
317
|
+
* 强制写回的 repoctl 版本。
|
|
318
318
|
* @default 当前依赖版本
|
|
319
319
|
*/
|
|
320
320
|
pinnedVersion?: string;
|
|
321
321
|
}
|
|
322
322
|
/**
|
|
323
|
-
* `
|
|
323
|
+
* `repo workspace upgrade` 命令配置,覆盖脚本、目标文件等能力。
|
|
324
324
|
*/
|
|
325
325
|
interface UpgradeCommandConfig extends Partial<CliOpts> {
|
|
326
326
|
/**
|
|
@@ -345,7 +345,7 @@ interface UpgradeCommandConfig extends Partial<CliOpts> {
|
|
|
345
345
|
skipChangesetMarkdown?: boolean;
|
|
346
346
|
}
|
|
347
347
|
/**
|
|
348
|
-
* `
|
|
348
|
+
* `repo workspace init` / `repo tooling init` 共享配置,用于跳过部分初始化步骤并配置 tooling 默认目标。
|
|
349
349
|
*/
|
|
350
350
|
interface InitCommandConfig {
|
|
351
351
|
/**
|
|
@@ -408,6 +408,7 @@ interface CommitlintToolingConfig extends IcebreakerCommitlintOptions {}
|
|
|
408
408
|
interface EslintToolingConfig extends UserDefinedOptions {
|
|
409
409
|
/**
|
|
410
410
|
* 额外传给 `createEslint(...userConfigs)` 的后续配置项。
|
|
411
|
+
* 在 `defineEslintConfig({ options, configs })` 中也可以放到顶层 `configs`。
|
|
411
412
|
* @default []
|
|
412
413
|
*/
|
|
413
414
|
configs?: UserConfigItem[];
|
|
@@ -423,11 +424,11 @@ interface StylelintToolingConfig extends StylelintConfig {}
|
|
|
423
424
|
*/
|
|
424
425
|
interface LintStagedToolingConfig {
|
|
425
426
|
/**
|
|
426
|
-
* 调用
|
|
427
|
+
* 调用 repo CLI 的基础命令。
|
|
427
428
|
* 通常保持为 `pnpm exec repo`,以便 Husky 与 lint-staged 入口统一。
|
|
428
429
|
* @default 'pnpm exec repo'
|
|
429
430
|
*/
|
|
430
|
-
|
|
431
|
+
repoCommand?: string;
|
|
431
432
|
/**
|
|
432
433
|
* 直接透传完整的 lint-staged 原生配置。
|
|
433
434
|
* 一旦提供,monorepo 默认规则将不再自动注入。
|
|
@@ -587,7 +588,7 @@ interface HuskyToolingConfig {
|
|
|
587
588
|
commitMsgCommand?: string;
|
|
588
589
|
}
|
|
589
590
|
/**
|
|
590
|
-
* `repoctl.config.ts`
|
|
591
|
+
* `repoctl.config.ts` 中 `tooling` 总配置。
|
|
591
592
|
*
|
|
592
593
|
* 每个字段分别映射到对应的配置工厂与验证命令。
|
|
593
594
|
*/
|
|
@@ -620,7 +621,7 @@ interface MonorepoConfig {
|
|
|
620
621
|
};
|
|
621
622
|
/**
|
|
622
623
|
* 按工程化能力分类的可选配置。
|
|
623
|
-
* 这些配置通常会被
|
|
624
|
+
* 这些配置通常会被 `repoctl/tooling` 中的 helper 消费。
|
|
624
625
|
* @default {}
|
|
625
626
|
*/
|
|
626
627
|
tooling?: ToolingConfig;
|
|
@@ -778,10 +779,14 @@ interface MonorepoTsconfig {
|
|
|
778
779
|
interface DefineConfigOptions<TConfig> {
|
|
779
780
|
cwd?: string;
|
|
780
781
|
options?: TConfig;
|
|
782
|
+
}
|
|
783
|
+
interface DefineEslintConfigOptions extends DefineConfigOptions<EslintToolingConfig> {
|
|
781
784
|
/**
|
|
782
|
-
*
|
|
785
|
+
* 额外传给 ESLint flat config 工厂的配置片段。
|
|
786
|
+
*
|
|
787
|
+
* 这等价于 `options.configs`,但更贴近 flat config 的“基础 options + 后续 configs”写法。
|
|
783
788
|
*/
|
|
784
|
-
|
|
789
|
+
configs?: UserConfigItem[];
|
|
785
790
|
}
|
|
786
791
|
/**
|
|
787
792
|
* `createMonorepoLintStagedConfig()` 与 `defineLintStagedConfig()` 的配置项。
|
|
@@ -840,20 +845,16 @@ interface DefineVitestConfigOptions {
|
|
|
840
845
|
interface DefineVitestProjectConfigOptions {
|
|
841
846
|
cwd?: string;
|
|
842
847
|
options?: MonorepoVitestProjectConfigOptions;
|
|
843
|
-
/**
|
|
844
|
-
* @deprecated 使用 `options` 代替,保持与其他 `define*Config()` 包装器一致。
|
|
845
|
-
*/
|
|
846
|
-
config?: MonorepoVitestProjectConfigOptions;
|
|
847
848
|
}
|
|
848
849
|
/**
|
|
849
|
-
* 读取当前工作目录下的 `
|
|
850
|
+
* 读取当前工作目录下的 `repoctl.config.*` 中 `tooling` 配置块。
|
|
850
851
|
*
|
|
851
852
|
* @param cwd 配置文件解析起点。默认使用 `process.cwd()`
|
|
852
853
|
* @returns 标准化后的 tooling 配置;未配置时返回空对象
|
|
853
854
|
*
|
|
854
855
|
* @example
|
|
855
856
|
* ```ts
|
|
856
|
-
* import { loadMonorepoToolingConfig } from '
|
|
857
|
+
* import { loadMonorepoToolingConfig } from 'repoctl/tooling'
|
|
857
858
|
*
|
|
858
859
|
* const tooling = await loadMonorepoToolingConfig()
|
|
859
860
|
* console.log(tooling.vitest?.includeWorkspaceRootConfig)
|
|
@@ -863,7 +864,7 @@ declare function loadMonorepoToolingConfig(cwd?: string): Promise<NonNullable<To
|
|
|
863
864
|
/**
|
|
864
865
|
* 基于 `@icebreakers/commitlint-config` 创建 commitlint 配置。
|
|
865
866
|
*
|
|
866
|
-
* 适合在需要手动传入覆盖项时使用;如果只想读取 `repoctl.config.ts`
|
|
867
|
+
* 适合在需要手动传入覆盖项时使用;如果只想读取 `repoctl.config.ts` 默认值,
|
|
867
868
|
* 优先使用 `defineCommitlintConfig()`。
|
|
868
869
|
*
|
|
869
870
|
* @param options 额外合并到默认 commitlint 配置上的字段
|
|
@@ -871,7 +872,7 @@ declare function loadMonorepoToolingConfig(cwd?: string): Promise<NonNullable<To
|
|
|
871
872
|
*
|
|
872
873
|
* @example
|
|
873
874
|
* ```ts
|
|
874
|
-
* import { createMonorepoCommitlintConfig } from '
|
|
875
|
+
* import { createMonorepoCommitlintConfig } from 'repoctl/tooling'
|
|
875
876
|
*
|
|
876
877
|
* export default createMonorepoCommitlintConfig({
|
|
877
878
|
* rules: {
|
|
@@ -882,14 +883,14 @@ declare function loadMonorepoToolingConfig(cwd?: string): Promise<NonNullable<To
|
|
|
882
883
|
*/
|
|
883
884
|
declare function createMonorepoCommitlintConfig(options?: CommitlintToolingConfig): MonorepoCommitlintConfig;
|
|
884
885
|
/**
|
|
885
|
-
* 从 `repoctl.config.ts`
|
|
886
|
+
* 从 `repoctl.config.ts` 读取 `tooling.commitlint`,并生成 commitlint 配置。
|
|
886
887
|
*
|
|
887
|
-
* @param input `cwd` 用于指定配置文件解析起点,`
|
|
888
|
+
* @param input `cwd` 用于指定配置文件解析起点,`options` 用于追加运行时覆盖项
|
|
888
889
|
* @returns 可直接导出的 commitlint 配置对象
|
|
889
890
|
*
|
|
890
891
|
* @example
|
|
891
892
|
* ```ts
|
|
892
|
-
* import { defineCommitlintConfig } from '
|
|
893
|
+
* import { defineCommitlintConfig } from 'repoctl/tooling'
|
|
893
894
|
*
|
|
894
895
|
* export default await defineCommitlintConfig()
|
|
895
896
|
* ```
|
|
@@ -901,23 +902,37 @@ declare function defineCommitlintConfig(input?: DefineConfigOptions<CommitlintTo
|
|
|
901
902
|
* 默认会追加一个用于忽略 `fixtures` 目录的 glob,除非显式传入其他 `ignores`。
|
|
902
903
|
*
|
|
903
904
|
* @param options 额外 ESLint 配置;`ignores` 默认会忽略 `fixtures` 目录
|
|
905
|
+
* @param extraConfigs 额外追加的 flat config 片段,等价于 `options.configs`
|
|
904
906
|
* @returns 可直接作为 `eslint.config.js` 默认导出的 flat config
|
|
907
|
+
*
|
|
908
|
+
* @example
|
|
909
|
+
* ```js
|
|
910
|
+
* import { createMonorepoEslintConfig } from 'repoctl/tooling'
|
|
911
|
+
*
|
|
912
|
+
* export default createMonorepoEslintConfig(
|
|
913
|
+
* { ignores: ['dist/**'] },
|
|
914
|
+
* { rules: { 'no-console': 'off' } },
|
|
915
|
+
* )
|
|
916
|
+
* ```
|
|
905
917
|
*/
|
|
906
|
-
declare function createMonorepoEslintConfig(options?: EslintToolingConfig): MonorepoEslintConfig;
|
|
918
|
+
declare function createMonorepoEslintConfig(options?: EslintToolingConfig, ...extraConfigs: UserConfigItem[]): MonorepoEslintConfig;
|
|
907
919
|
/**
|
|
908
|
-
* 从 `repoctl.config.ts`
|
|
920
|
+
* 从 `repoctl.config.ts` 读取 `tooling.eslint`,并生成 ESLint 配置。
|
|
909
921
|
*
|
|
910
|
-
* @param input `cwd` 用于指定配置文件解析起点,`
|
|
922
|
+
* @param input `cwd` 用于指定配置文件解析起点,`options` 与 `configs` 用于追加运行时覆盖项
|
|
911
923
|
* @returns 可直接导出的 ESLint flat config
|
|
912
924
|
*
|
|
913
925
|
* @example
|
|
914
926
|
* ```js
|
|
915
|
-
* import { defineEslintConfig } from '
|
|
927
|
+
* import { defineEslintConfig } from 'repoctl/tooling'
|
|
916
928
|
*
|
|
917
|
-
* export default await defineEslintConfig(
|
|
929
|
+
* export default await defineEslintConfig(
|
|
930
|
+
* { ignores: ['dist/**'] },
|
|
931
|
+
* { rules: { 'no-console': 'off' } },
|
|
932
|
+
* )
|
|
918
933
|
* ```
|
|
919
934
|
*/
|
|
920
|
-
declare function defineEslintConfig(input?:
|
|
935
|
+
declare function defineEslintConfig(input?: DefineEslintConfigOptions | EslintToolingConfig, ...configs: UserConfigItem[]): Promise<MonorepoEslintConfig>;
|
|
921
936
|
/**
|
|
922
937
|
* 基于 `@icebreakers/stylelint-config` 创建 Stylelint 配置。
|
|
923
938
|
*
|
|
@@ -926,9 +941,9 @@ declare function defineEslintConfig(input?: DefineConfigOptions<EslintToolingCon
|
|
|
926
941
|
*/
|
|
927
942
|
declare function createMonorepoStylelintConfig(options?: StylelintToolingConfig): MonorepoStylelintConfig;
|
|
928
943
|
/**
|
|
929
|
-
* 从 `repoctl.config.ts`
|
|
944
|
+
* 从 `repoctl.config.ts` 读取 `tooling.stylelint`,并生成 Stylelint 配置。
|
|
930
945
|
*
|
|
931
|
-
* @param input `cwd` 用于指定配置文件解析起点,`
|
|
946
|
+
* @param input `cwd` 用于指定配置文件解析起点,`options` 用于追加运行时覆盖项
|
|
932
947
|
* @returns 可直接导出的 Stylelint 配置对象
|
|
933
948
|
*/
|
|
934
949
|
declare function defineStylelintConfig(input?: DefineConfigOptions<StylelintToolingConfig>): Promise<MonorepoStylelintConfig>;
|
|
@@ -940,9 +955,9 @@ declare function defineStylelintConfig(input?: DefineConfigOptions<StylelintTool
|
|
|
940
955
|
*/
|
|
941
956
|
declare function createMonorepoTsconfig(options?: TsconfigToolingConfig): MonorepoTsconfig;
|
|
942
957
|
/**
|
|
943
|
-
* 从 `repoctl.config.ts`
|
|
958
|
+
* 从 `repoctl.config.ts` 读取 `tooling.tsconfig`,并生成最终的 TypeScript 配置对象。
|
|
944
959
|
*
|
|
945
|
-
* @param input `cwd` 用于指定配置文件解析起点,`
|
|
960
|
+
* @param input `cwd` 用于指定配置文件解析起点,`options` 用于追加运行时覆盖项
|
|
946
961
|
* @returns 可直接写入或导出的 `tsconfig.json` 配置对象
|
|
947
962
|
*/
|
|
948
963
|
declare function defineTsconfigConfig(input?: DefineConfigOptions<TsconfigToolingConfig>): Promise<MonorepoTsconfig>;
|
|
@@ -955,23 +970,23 @@ declare function defineTsconfigConfig(input?: DefineConfigOptions<TsconfigToolin
|
|
|
955
970
|
* - `*.{ts,tsx,mts,cts,vue}` 调用 `pnpm exec repo verify staged-typecheck`
|
|
956
971
|
* - 样式文件运行 `stylelint --fix --allow-empty-input`
|
|
957
972
|
*
|
|
958
|
-
* @param options
|
|
973
|
+
* @param options 可配置 `repoCommand`,默认值为 `pnpm exec repo`
|
|
959
974
|
* @returns 可直接导出的 `lint-staged` 配置对象
|
|
960
975
|
*
|
|
961
976
|
* @example
|
|
962
977
|
* ```js
|
|
963
|
-
* import { createMonorepoLintStagedConfig } from '
|
|
978
|
+
* import { createMonorepoLintStagedConfig } from 'repoctl/tooling'
|
|
964
979
|
*
|
|
965
980
|
* export default createMonorepoLintStagedConfig({
|
|
966
|
-
*
|
|
981
|
+
* repoCommand: 'pnpm exec repo',
|
|
967
982
|
* })
|
|
968
983
|
* ```
|
|
969
984
|
*/
|
|
970
985
|
declare function createMonorepoLintStagedConfig(options?: MonorepoLintStagedConfigOptions): MonorepoLintStagedConfig;
|
|
971
986
|
/**
|
|
972
|
-
* 从 `repoctl.config.ts`
|
|
987
|
+
* 从 `repoctl.config.ts` 读取 `tooling.lintStaged`,并生成 `lint-staged` 配置。
|
|
973
988
|
*
|
|
974
|
-
* @param input `cwd` 用于指定配置文件解析起点,`
|
|
989
|
+
* @param input `cwd` 用于指定配置文件解析起点,`options` 用于追加运行时覆盖项
|
|
975
990
|
* @returns 可直接导出的 `lint-staged` 配置对象
|
|
976
991
|
*/
|
|
977
992
|
declare function defineLintStagedConfig(input?: DefineConfigOptions<MonorepoLintStagedConfigOptions>): Promise<MonorepoLintStagedConfig>;
|
|
@@ -992,7 +1007,7 @@ declare function defineLintStagedConfig(input?: DefineConfigOptions<MonorepoLint
|
|
|
992
1007
|
*
|
|
993
1008
|
* @example
|
|
994
1009
|
* ```ts
|
|
995
|
-
* import { createMonorepoVitestConfig } from '
|
|
1010
|
+
* import { createMonorepoVitestConfig } from 'repoctl/tooling'
|
|
996
1011
|
*
|
|
997
1012
|
* export default {
|
|
998
1013
|
* ...createMonorepoVitestConfig({
|
|
@@ -1004,11 +1019,11 @@ declare function defineLintStagedConfig(input?: DefineConfigOptions<MonorepoLint
|
|
|
1004
1019
|
*/
|
|
1005
1020
|
declare function createMonorepoVitestConfig(options?: MonorepoVitestConfigOptions): MonorepoVitestConfigResult;
|
|
1006
1021
|
/**
|
|
1007
|
-
* 从 `repoctl.config.ts`
|
|
1022
|
+
* 从 `repoctl.config.ts` 读取 `tooling.vitest`,再叠加运行时 `options` 与 `overrides`
|
|
1008
1023
|
* 生成最终 Vitest 配置。
|
|
1009
1024
|
*
|
|
1010
1025
|
* 优先级从低到高:
|
|
1011
|
-
* 1. `repoctl.config.ts
|
|
1026
|
+
* 1. `repoctl.config.ts -> tooling.vitest`
|
|
1012
1027
|
* 2. `options`
|
|
1013
1028
|
* 3. `overrides`
|
|
1014
1029
|
*
|
|
@@ -1019,7 +1034,7 @@ declare function createMonorepoVitestConfig(options?: MonorepoVitestConfigOption
|
|
|
1019
1034
|
*
|
|
1020
1035
|
* @example
|
|
1021
1036
|
* ```ts
|
|
1022
|
-
* import { defineVitestConfig } from '
|
|
1037
|
+
* import { defineVitestConfig } from 'repoctl/tooling'
|
|
1023
1038
|
* import { defineConfig } from 'vitest/config'
|
|
1024
1039
|
*
|
|
1025
1040
|
* export default defineConfig(async () => await defineVitestConfig({
|
|
@@ -1051,11 +1066,11 @@ declare function defineVitestConfig(input?: DefineVitestConfigOptions): Promise<
|
|
|
1051
1066
|
*/
|
|
1052
1067
|
declare function createMonorepoVitestProjectConfig(options?: MonorepoVitestProjectConfigOptions): MonorepoVitestProjectConfigResult;
|
|
1053
1068
|
/**
|
|
1054
|
-
* 从 `repoctl.config.ts`
|
|
1069
|
+
* 从 `repoctl.config.ts` 读取 `tooling.vitestProject`,再叠加运行时 `options`
|
|
1055
1070
|
* 生成单个 package/app 的项目级 Vitest 配置。
|
|
1056
1071
|
*
|
|
1057
1072
|
* 优先级从低到高:
|
|
1058
|
-
* 1. `repoctl.config.ts
|
|
1073
|
+
* 1. `repoctl.config.ts -> tooling.vitestProject`
|
|
1059
1074
|
* 2. `options`
|
|
1060
1075
|
*
|
|
1061
1076
|
* @param input `cwd` 用于配置文件解析起点,`options` 用于追加项目内局部覆盖项
|
|
@@ -1063,4 +1078,4 @@ declare function createMonorepoVitestProjectConfig(options?: MonorepoVitestProje
|
|
|
1063
1078
|
*/
|
|
1064
1079
|
declare function defineVitestProjectConfig(input?: DefineVitestProjectConfigOptions): Promise<MonorepoVitestProjectConfigResult>;
|
|
1065
1080
|
//#endregion
|
|
1066
|
-
export {
|
|
1081
|
+
export { InitCommandConfig as $, loadMonorepoToolingConfig as A, WorkspacePackageWithJsonPath as B, defineCommitlintConfig as C, GenerateAgenticTemplateOptions as Ct, defineTsconfigConfig as D, generateAgenticTemplates as Dt, defineStylelintConfig as E, generateAgenticTemplate as Et, WorkspaceData as F, PackageJsonRepository as G, PackageJsonBugs as H, WorkspacePackage as I, CommitlintToolingConfig as J, AiCommandConfig as K, WorkspacePackageManifest as L, SimpleGit as M, SimpleGitOptions as N, defineVitestConfig as O, loadAgenticTasks as Ot, GetWorkspacePackagesOptions as P, HuskyToolingConfig as Q, WorkspacePackageSummary as R, createMonorepoVitestProjectConfig as S, AgenticTemplateTask as St, defineLintStagedConfig as T, defaultAgenticBaseDir as Tt, PackageJsonExports as U, PackageJson as V, PackageJsonPerson as W, CreateCommandConfig as X, CreateChoiceOption as Y, EslintToolingConfig as Z, createMonorepoEslintConfig as _, getCreateChoices as _t, MonorepoCommitlintConfig as a, TsconfigToolingConfig as at, createMonorepoTsconfig as b, templateMap as bt, MonorepoLintStagedConfigOptions as c, VitestToolingConfig as ct, MonorepoVitestConfigOptions as d, initTooling as dt, LintStagedToolingConfig as et, MonorepoVitestConfigOverrides as f, normalizeInitToolingTargets as ft, createMonorepoCommitlintConfig as g, CreateNewProjectPlan as gt, MonorepoVitestProjectConfigResult as h, CreateNewProjectOptions as ht, DefineVitestProjectConfigOptions as i, ToolingConfig as it, ConfigValues as j, defineVitestProjectConfig as k, CliOpts as kt, MonorepoStylelintConfig as l, init as lt, MonorepoVitestProjectConfigOptions as m, createNewProject as mt, DefineEslintConfigOptions as n, MonorepoConfig as nt, MonorepoEslintConfig as o, UpgradeCommandConfig as ot, MonorepoVitestConfigResult as p, initToolingTargets as pt, CleanCommandConfig as q, DefineVitestConfigOptions as r, StylelintToolingConfig as rt, MonorepoLintStagedConfig as s, VitestProjectToolingConfig as st, DefineConfigOptions as t, MirrorCommandConfig as tt, MonorepoTsconfig as u, initMetadata as ut, createMonorepoLintStagedConfig as v, getTemplateMap as vt, defineEslintConfig as w, createTimestampFolderName as wt, createMonorepoVitestConfig as x, AgenticTemplateFormat as xt, createMonorepoStylelintConfig as y, resolveCreateNewProjectPlan as yt, WorkspacePackageSummaryData as z };
|
package/dist/index.d.mts
CHANGED
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { $ as
|
|
1
|
+
import { $ as InitCommandConfig, A as loadMonorepoToolingConfig, B as WorkspacePackageWithJsonPath, C as defineCommitlintConfig, Ct as GenerateAgenticTemplateOptions, D as defineTsconfigConfig, Dt as generateAgenticTemplates, E as defineStylelintConfig, Et as generateAgenticTemplate, F as WorkspaceData, G as PackageJsonRepository, H as PackageJsonBugs, I as WorkspacePackage, J as CommitlintToolingConfig, K as AiCommandConfig, L as WorkspacePackageManifest, M as SimpleGit, N as SimpleGitOptions, O as defineVitestConfig, Ot as loadAgenticTasks, P as GetWorkspacePackagesOptions, Q as HuskyToolingConfig, R as WorkspacePackageSummary, S as createMonorepoVitestProjectConfig, St as AgenticTemplateTask, T as defineLintStagedConfig, Tt as defaultAgenticBaseDir, U as PackageJsonExports, V as PackageJson, W as PackageJsonPerson, X as CreateCommandConfig, Y as CreateChoiceOption, Z as EslintToolingConfig, _ as createMonorepoEslintConfig, _t as getCreateChoices, a as MonorepoCommitlintConfig, at as TsconfigToolingConfig, b as createMonorepoTsconfig, bt as templateMap, c as MonorepoLintStagedConfigOptions, ct as VitestToolingConfig, d as MonorepoVitestConfigOptions, dt as initTooling, et as LintStagedToolingConfig, f as MonorepoVitestConfigOverrides, ft as normalizeInitToolingTargets, g as createMonorepoCommitlintConfig, gt as CreateNewProjectPlan, h as MonorepoVitestProjectConfigResult, ht as CreateNewProjectOptions, i as DefineVitestProjectConfigOptions, it as ToolingConfig, j as ConfigValues, k as defineVitestProjectConfig, kt as CliOpts, l as MonorepoStylelintConfig, lt as init, m as MonorepoVitestProjectConfigOptions, mt as createNewProject, n as DefineEslintConfigOptions, nt as MonorepoConfig, o as MonorepoEslintConfig, ot as UpgradeCommandConfig, p as MonorepoVitestConfigResult, pt as initToolingTargets, q as CleanCommandConfig, r as DefineVitestConfigOptions, rt as StylelintToolingConfig, s as MonorepoLintStagedConfig, st as VitestProjectToolingConfig, t as DefineConfigOptions, tt as MirrorCommandConfig, u as MonorepoTsconfig, ut as initMetadata, v as createMonorepoLintStagedConfig, vt as getTemplateMap, w as defineEslintConfig, wt as createTimestampFolderName, x as createMonorepoVitestConfig, xt as AgenticTemplateFormat, y as createMonorepoStylelintConfig, yt as resolveCreateNewProjectPlan, z as WorkspacePackageSummaryData } from "./index-CJ0vJpBt.mjs";
|
|
2
2
|
import gitUrlParse from "git-url-parse";
|
|
3
3
|
import * as _$simple_git0 from "simple-git";
|
|
4
4
|
import { mkdtemp, readFile, readdir, stat, writeFile } from "node:fs/promises";
|
|
@@ -109,8 +109,6 @@ interface EnvPaths {
|
|
|
109
109
|
workspaceManifest: EnvPathEntry;
|
|
110
110
|
repoctlConfig: EnvPathEntry;
|
|
111
111
|
repoctlConfigs: EnvPathEntry[];
|
|
112
|
-
legacyConfig: EnvPathEntry;
|
|
113
|
-
legacyConfigs: EnvPathEntry[];
|
|
114
112
|
toolingDir: EnvPathEntry;
|
|
115
113
|
reportsDir: EnvPathEntry;
|
|
116
114
|
doctorReport: EnvPathEntry;
|
|
@@ -358,7 +356,7 @@ declare function getWorkspacePackageSummaries(cwd: string, options?: GetWorkspac
|
|
|
358
356
|
//#endregion
|
|
359
357
|
//#region src/commands/clean.d.ts
|
|
360
358
|
/**
|
|
361
|
-
* 交互式清理被选中的包目录,同时重写根 package.json 中的
|
|
359
|
+
* 交互式清理被选中的包目录,同时重写根 package.json 中的 repoctl 版本。
|
|
362
360
|
*/
|
|
363
361
|
declare function cleanProjects(cwd: string, overrides?: Partial<CleanCommandConfig>): Promise<void>;
|
|
364
362
|
//#endregion
|
|
@@ -391,7 +389,7 @@ declare let version: string;
|
|
|
391
389
|
//#endregion
|
|
392
390
|
//#region src/constants.d.ts
|
|
393
391
|
/**
|
|
394
|
-
* 用户默认看到的 CLI
|
|
392
|
+
* 用户默认看到的 CLI 名称,帮助文案和生成脚本都统一引导到 repo。
|
|
395
393
|
*/
|
|
396
394
|
declare const cliName = "repo";
|
|
397
395
|
/**
|
|
@@ -411,18 +409,15 @@ interface LoadedMonorepoConfig {
|
|
|
411
409
|
config: MonorepoConfig;
|
|
412
410
|
}
|
|
413
411
|
declare const configExtensions: readonly ["ts", "mts", "cts", "js", "mjs", "cjs"];
|
|
414
|
-
declare function
|
|
415
|
-
repoctl: string[];
|
|
416
|
-
monorepo: string[];
|
|
417
|
-
};
|
|
412
|
+
declare function getRepoctlConfigCandidates(cwd: string): string[];
|
|
418
413
|
/**
|
|
419
|
-
* 为 `repoctl.config.ts`
|
|
414
|
+
* 为 `repoctl.config.ts` 提供类型提示的辅助函数。
|
|
420
415
|
*
|
|
421
416
|
* 推荐在用户项目中这样写:
|
|
422
417
|
*
|
|
423
418
|
* @example
|
|
424
419
|
* ```ts
|
|
425
|
-
* import { defineMonorepoConfig } from '
|
|
420
|
+
* import { defineMonorepoConfig } from 'repoctl'
|
|
426
421
|
*
|
|
427
422
|
* export default defineMonorepoConfig({
|
|
428
423
|
* tooling: {
|
|
@@ -436,15 +431,13 @@ declare function getMonorepoConfigCandidates(cwd: string): {
|
|
|
436
431
|
declare function defineMonorepoConfig(config: MonorepoConfig): MonorepoConfig;
|
|
437
432
|
/**
|
|
438
433
|
* 加载配置对象和实际命中的配置文件路径,供诊断和脚本集成使用。
|
|
439
|
-
* 优先级为 `repoctl.config.*`,如果两者同时存在则直接报错。
|
|
440
434
|
*
|
|
441
435
|
* @param cwd 配置文件解析起点
|
|
442
436
|
* @returns 配置文件路径和解析后的配置对象;未找到时 file 为 null、config 为空对象
|
|
443
437
|
*/
|
|
444
438
|
declare function loadMonorepoConfigDetails(cwd: string): Promise<LoadedMonorepoConfig>;
|
|
445
439
|
/**
|
|
446
|
-
* 加载指定目录的 `repoctl.config
|
|
447
|
-
* 优先级为 `repoctl.config.*`,如果两者同时存在则直接报错。
|
|
440
|
+
* 加载指定目录的 `repoctl.config.*`,并在当前进程内做内存缓存。
|
|
448
441
|
*
|
|
449
442
|
* @param cwd 配置文件解析起点
|
|
450
443
|
* @returns 解析后的配置对象;未找到时返回空对象
|
|
@@ -453,13 +446,13 @@ declare function loadMonorepoConfig(cwd: string): Promise<MonorepoConfig>;
|
|
|
453
446
|
/**
|
|
454
447
|
* 获取单个命令对应的配置块。
|
|
455
448
|
*
|
|
456
|
-
* @param name 命令名称,对应 `repoctl.config.ts
|
|
449
|
+
* @param name 命令名称,对应 `repoctl.config.ts -> commands.<name>`
|
|
457
450
|
* @param cwd 配置文件解析起点
|
|
458
451
|
* @returns 对应命令配置;未配置时返回空对象
|
|
459
452
|
*/
|
|
460
453
|
declare function resolveCommandConfig<Name extends keyof NonNullable<MonorepoConfig['commands']>>(name: Name, cwd: string): Promise<NonNullable<MonorepoConfig['commands']>[Name]>;
|
|
461
454
|
/**
|
|
462
|
-
* 获取 `repoctl.config.ts`
|
|
455
|
+
* 获取 `repoctl.config.ts` 中完整的 `tooling` 配置块。
|
|
463
456
|
*
|
|
464
457
|
* @param cwd 配置文件解析起点
|
|
465
458
|
* @returns `tooling` 配置;未配置时返回空对象
|
|
@@ -600,4 +593,4 @@ declare function escapeStringRegexp(str: string): string;
|
|
|
600
593
|
*/
|
|
601
594
|
declare function isMatch(str: string, arr: RegExp[]): boolean;
|
|
602
595
|
//#endregion
|
|
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,
|
|
596
|
+
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, DefineEslintConfigOptions, 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, getRepoctlConfigCandidates, 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 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-
|
|
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-D-ou6qGx.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-
|
|
4
|
-
import { a as loadMonorepoConfig, c as resolveToolingConfig, i as
|
|
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-
|
|
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,
|
|
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-dLzSmmdf.mjs";
|
|
4
|
+
import { a as loadMonorepoConfig, c as resolveToolingConfig, i as getRepoctlConfigCandidates, o as loadMonorepoConfigDetails, r as defineMonorepoConfig, s as resolveCommandConfig, t as configExtensions } from "./config-BrLDFwAH.mjs";
|
|
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-D1Bjw6xy.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, enterPrerelease, escapeStringRegexp, exists, exitPrerelease, generateAgenticTemplate, generateAgenticTemplates, getCreateChoices, getFileHash, getKnownRepoCheckCommands, getRepoctlConfigCandidates, 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 };
|