@icebreakers/monorepo 5.5.10 → 5.7.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/README.md +2 -0
- package/dist/baseline-DPfotf4y.mjs +146 -0
- package/dist/bundle-B9vRch4R.mjs +49 -0
- package/dist/catalog-CDEyc1uA.mjs +299 -0
- package/dist/cli.mjs +1487 -156
- package/dist/commands-TS8ABFdP.mjs +13820 -0
- package/dist/config-C38c_Q8L.mjs +66 -0
- package/dist/{create-flow-C811m80z.mjs → create-flow-CCr2hfSY.mjs} +103 -40
- package/dist/deps-CUdI2DaB.mjs +47 -0
- package/dist/execute-PX1hT0qv.mjs +68 -0
- package/dist/execute-Vi4qHe-D.mjs +663 -0
- package/dist/format-DZ7L34rf.mjs +28 -0
- package/dist/index-CoCTFWZJ.d.mts +2150 -0
- package/dist/index.d.mts +1741 -111
- package/dist/index.mjs +60 -6
- package/dist/inputs-_xIVONmB.mjs +50 -0
- package/dist/npm-B25nrSyz.mjs +82 -0
- package/dist/plan-B5aE_WNF.mjs +75 -0
- package/dist/run-Lu7y1bNf.mjs +165 -0
- package/dist/save-CdCf630Z.mjs +79 -0
- package/dist/scan-4nboHNXP.mjs +293 -0
- package/dist/template-drift-BBhnrHY1.mjs +2740 -0
- package/dist/tooling-entry.d.mts +1 -1
- package/dist/tooling-entry.mjs +2 -1
- package/dist/transaction-DAhY8EpG.mjs +168 -0
- package/dist/tsconfig-CGntrzBM.mjs +1483 -0
- package/dist/{tooling-BfXlmCi-.mjs → vitest-DkGh4Ygo.mjs} +108 -167
- package/dist/workspace-tasks-CnB8kkS0.mjs +4435 -0
- package/package.json +25 -7
- package/resources/api-report/runner.cjs +76 -0
- package/resources/devcontainer/setup.mjs +36 -0
- package/resources/knip/reporter.mjs +46 -0
- package/resources/maintenance/migration-lanes.mjs +141 -0
- package/resources/maintenance/migration-lock.mjs +119 -0
- package/resources/maintenance/migrations.mjs +215 -0
- package/resources/maintenance/presets.mjs +130 -0
- package/resources/maintenance/validate.mjs +233 -0
- package/resources/maintenance/workflow.yml +151 -0
- package/resources/skills/repoctl/SKILL.md +4 -2
- package/resources/skills/repoctl/references/commands.md +224 -13
- package/resources/skills/repoctl/references/config.md +70 -6
- package/resources/skills/repoctl/references/dependencies.md +37 -0
- package/resources/skills/repoctl/references/knip.md +34 -0
- package/resources/skills/repoctl/references/templates.md +26 -2
- package/dist/commands-CIzCAxyY.mjs +0 -5672
- package/dist/config-p842Knhq.mjs +0 -114
- package/dist/index-DDQKKYet.d.mts +0 -1025
- package/dist/types-m8JLwKzl.mjs +0 -499
- package/dist/workspace-MCKewElu.mjs +0 -123
package/dist/config-p842Knhq.mjs
DELETED
|
@@ -1,114 +0,0 @@
|
|
|
1
|
-
import { t as __exportAll } from "./rolldown-runtime-8H4AJuhK.mjs";
|
|
2
|
-
import path from "pathe";
|
|
3
|
-
import { realpath } from "node:fs/promises";
|
|
4
|
-
import fs from "node:fs";
|
|
5
|
-
import { loadConfig } from "c12";
|
|
6
|
-
//#region src/core/config.ts
|
|
7
|
-
var config_exports = /* @__PURE__ */ __exportAll({
|
|
8
|
-
configExtensions: () => configExtensions,
|
|
9
|
-
defineMonorepoConfig: () => defineMonorepoConfig,
|
|
10
|
-
getRepoctlConfigCandidates: () => getRepoctlConfigCandidates,
|
|
11
|
-
loadMonorepoConfig: () => loadMonorepoConfig,
|
|
12
|
-
loadMonorepoConfigDetails: () => loadMonorepoConfigDetails,
|
|
13
|
-
resolveCommandConfig: () => resolveCommandConfig,
|
|
14
|
-
resolveToolingConfig: () => resolveToolingConfig
|
|
15
|
-
});
|
|
16
|
-
/**
|
|
17
|
-
* 简单的内存缓存,避免同一次命令中重复走磁盘加载配置。
|
|
18
|
-
*/
|
|
19
|
-
const cache = /* @__PURE__ */ new Map();
|
|
20
|
-
const configExtensions = [
|
|
21
|
-
"ts",
|
|
22
|
-
"mts",
|
|
23
|
-
"cts",
|
|
24
|
-
"js",
|
|
25
|
-
"mjs",
|
|
26
|
-
"cjs"
|
|
27
|
-
];
|
|
28
|
-
function getRepoctlConfigCandidates(cwd) {
|
|
29
|
-
return configExtensions.map((ext) => path.resolve(cwd, `repoctl.config.${ext}`));
|
|
30
|
-
}
|
|
31
|
-
function findConfigFiles(cwd) {
|
|
32
|
-
return getRepoctlConfigCandidates(cwd).filter((file) => fs.existsSync(file));
|
|
33
|
-
}
|
|
34
|
-
/**
|
|
35
|
-
* 基于 c12 的通用配置加载逻辑,支持多种配置文件格式。
|
|
36
|
-
*/
|
|
37
|
-
async function loadConfigInternal(cwd) {
|
|
38
|
-
const { config, configFile } = await loadConfig({
|
|
39
|
-
name: "repoctl",
|
|
40
|
-
cwd,
|
|
41
|
-
rcFile: false,
|
|
42
|
-
defaults: {},
|
|
43
|
-
globalRc: false,
|
|
44
|
-
packageJson: false
|
|
45
|
-
});
|
|
46
|
-
const matchedConfigFile = configFile && fs.existsSync(configFile) ? findConfigFiles(cwd).find((file) => path.basename(file).toLowerCase() === path.basename(configFile).toLowerCase()) : void 0;
|
|
47
|
-
return {
|
|
48
|
-
file: matchedConfigFile ? await realpath(matchedConfigFile) : configFile && fs.existsSync(configFile) ? await realpath(configFile) : null,
|
|
49
|
-
config: config ?? {}
|
|
50
|
-
};
|
|
51
|
-
}
|
|
52
|
-
/**
|
|
53
|
-
* 为 `repoctl.config.ts` 提供类型提示的辅助函数。
|
|
54
|
-
*
|
|
55
|
-
* 推荐在用户项目中这样写:
|
|
56
|
-
*
|
|
57
|
-
* @example
|
|
58
|
-
* ```ts
|
|
59
|
-
* import { defineMonorepoConfig } from 'repoctl'
|
|
60
|
-
*
|
|
61
|
-
* export default defineMonorepoConfig({
|
|
62
|
-
* tooling: {
|
|
63
|
-
* vitest: {
|
|
64
|
-
* includeWorkspaceRootConfig: false,
|
|
65
|
-
* },
|
|
66
|
-
* },
|
|
67
|
-
* })
|
|
68
|
-
* ```
|
|
69
|
-
*/
|
|
70
|
-
function defineMonorepoConfig(config) {
|
|
71
|
-
return config;
|
|
72
|
-
}
|
|
73
|
-
/**
|
|
74
|
-
* 加载配置对象和实际命中的配置文件路径,供诊断和脚本集成使用。
|
|
75
|
-
*
|
|
76
|
-
* @param cwd 配置文件解析起点
|
|
77
|
-
* @returns 配置文件路径和解析后的配置对象;未找到时 file 为 null、config 为空对象
|
|
78
|
-
*/
|
|
79
|
-
async function loadMonorepoConfigDetails(cwd) {
|
|
80
|
-
const key = path.resolve(cwd);
|
|
81
|
-
if (!cache.has(key)) cache.set(key, loadConfigInternal(key));
|
|
82
|
-
return cache.get(key);
|
|
83
|
-
}
|
|
84
|
-
/**
|
|
85
|
-
* 加载指定目录的 `repoctl.config.*`,并在当前进程内做内存缓存。
|
|
86
|
-
*
|
|
87
|
-
* @param cwd 配置文件解析起点
|
|
88
|
-
* @returns 解析后的配置对象;未找到时返回空对象
|
|
89
|
-
*/
|
|
90
|
-
async function loadMonorepoConfig(cwd) {
|
|
91
|
-
const { config } = await loadMonorepoConfigDetails(cwd);
|
|
92
|
-
return config;
|
|
93
|
-
}
|
|
94
|
-
/**
|
|
95
|
-
* 获取单个命令对应的配置块。
|
|
96
|
-
*
|
|
97
|
-
* @param name 命令名称,对应 `repoctl.config.ts -> commands.<name>`
|
|
98
|
-
* @param cwd 配置文件解析起点
|
|
99
|
-
* @returns 对应命令配置;未配置时返回空对象
|
|
100
|
-
*/
|
|
101
|
-
async function resolveCommandConfig(name, cwd) {
|
|
102
|
-
return ((await loadMonorepoConfig(cwd)).commands ?? {})[name] ?? {};
|
|
103
|
-
}
|
|
104
|
-
/**
|
|
105
|
-
* 获取 `repoctl.config.ts` 中完整的 `tooling` 配置块。
|
|
106
|
-
*
|
|
107
|
-
* @param cwd 配置文件解析起点
|
|
108
|
-
* @returns `tooling` 配置;未配置时返回空对象
|
|
109
|
-
*/
|
|
110
|
-
async function resolveToolingConfig(cwd) {
|
|
111
|
-
return (await loadMonorepoConfig(cwd)).tooling ?? {};
|
|
112
|
-
}
|
|
113
|
-
//#endregion
|
|
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 };
|