@icebreakers/monorepo 6.4.0 → 6.4.2
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/{baseline-BahTYIy-.mjs → baseline-C7AzTpzx.mjs} +3 -5
- package/dist/{bundle-B9vRch4R.mjs → bundle-BT26jZsH.mjs} +1 -2
- package/dist/{catalog-CXITrKhb.mjs → catalog-CgAeI6ht.mjs} +11 -18
- package/dist/cli.mjs +141 -220
- package/dist/{commands-1ApnhvJF.mjs → commands-DkveHqwW.mjs} +371 -725
- package/dist/{config-BmK7bacv.mjs → config-BRw2Aj0M.mjs} +4 -5
- package/dist/{create-flow-B2sFa_5j.mjs → create-flow-Caa-flvY.mjs} +6 -9
- package/dist/{deps-BbkQSTqk.mjs → deps-4G3KWbLQ.mjs} +6 -8
- package/dist/docs-context-entry.d.mts +0 -4
- package/dist/docs-context-entry.mjs +2 -4
- package/dist/{execute-0NGtp4hR.mjs → execute-Cp_mqcRD.mjs} +12 -22
- package/dist/{execute-BdnLU2-t.mjs → execute-Cyp4-qZ-.mjs} +4 -6
- package/dist/{format-BcU-hzT_.mjs → format-u-vrkLOi.mjs} +2 -3
- package/dist/{index-BBYRSLAi.d.mts → index-CyUOTGW4.d.mts} +1 -85
- package/dist/index.d.mts +1 -343
- package/dist/index.mjs +11 -13
- package/dist/{inputs-DCMUM9kz.mjs → inputs-D9UKdDxG.mjs} +2 -3
- package/dist/{npm-DB-0FHcW.mjs → npm-BQ46TTzM.mjs} +2 -3
- package/dist/{plan-C47MSubl.mjs → plan-ChKB4Poy.mjs} +2 -3
- package/dist/{rolldown-runtime-8H4AJuhK.mjs → rolldown-runtime-BJohB4LM.mjs} +1 -2
- package/dist/{run-5IdtzJJR.mjs → run-BidBMxiB.mjs} +6 -8
- package/dist/{save-cKCfFQrh.mjs → save-CCITDy0e.mjs} +4 -5
- package/dist/{scan-Diyd5MkZ.mjs → scan-CE1y2g7H.mjs} +7 -12
- package/dist/{template-drift-C8gMh7d5.mjs → template-drift-HhrxfJbO.mjs} +60 -113
- package/dist/tooling-entry.d.mts +1 -1
- package/dist/tooling-entry.mjs +2 -2
- package/dist/{transaction-B33_Cacq.mjs → transaction-CnUuLnSv.mjs} +6 -10
- package/dist/{tsconfig-B32VPzfD.mjs → tsconfig-73z0Y3Nr.mjs} +39 -66
- package/dist/{vitest-HFe4zq1M.mjs → vitest-BE1YjbqG.mjs} +6 -9
- package/dist/{workspace-tasks-xyIJwdmH.mjs → workspace-tasks-MQ7IXpVF.mjs} +78 -157
- package/package.json +13 -13
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { t as __exportAll } from "./rolldown-runtime-
|
|
1
|
+
import { t as __exportAll } from "./rolldown-runtime-BJohB4LM.mjs";
|
|
2
2
|
import { createRequire } from "node:module";
|
|
3
3
|
import { findWorkspaceDir } from "@pnpm/find-workspace-dir";
|
|
4
4
|
import path, { normalize } from "pathe";
|
|
@@ -14,7 +14,7 @@ import { createHash } from "node:crypto";
|
|
|
14
14
|
import path$1 from "node:path";
|
|
15
15
|
import { fileURLToPath } from "node:url";
|
|
16
16
|
import { parse as parse$1 } from "comment-json";
|
|
17
|
-
|
|
17
|
+
// src/core/config/context.ts
|
|
18
18
|
/** Workspace-wide commands always consume root policy, even when invoked in a package. */
|
|
19
19
|
async function commandConfigDirectory(name, cwd) {
|
|
20
20
|
return [
|
|
@@ -24,8 +24,7 @@ async function commandConfigDirectory(name, cwd) {
|
|
|
24
24
|
"env"
|
|
25
25
|
].includes(name) ? await findWorkspaceDir(cwd) ?? cwd : cwd;
|
|
26
26
|
}
|
|
27
|
-
|
|
28
|
-
//#region src/core/config/paths.ts
|
|
27
|
+
// src/core/config/paths.ts
|
|
29
28
|
/** Dot paths escape literal dots and backslashes in dynamic map keys. */
|
|
30
29
|
function appendConfigPath(prefix, key) {
|
|
31
30
|
const escaped = key.replaceAll("\\", "\\\\").replaceAll(".", "\\.");
|
|
@@ -42,8 +41,7 @@ function splitConfigPath(field) {
|
|
|
42
41
|
else parts[parts.length - 1] += character;
|
|
43
42
|
return parts;
|
|
44
43
|
}
|
|
45
|
-
|
|
46
|
-
//#region src/core/config/validation/schema.ts
|
|
44
|
+
// src/core/config/validation/schema.ts
|
|
47
45
|
const string = {
|
|
48
46
|
expected: "string",
|
|
49
47
|
accepts: (value) => typeof value === "string"
|
|
@@ -147,8 +145,7 @@ function validateSchema(value, schema, path, diagnostics, ancestors = /* @__PURE
|
|
|
147
145
|
});
|
|
148
146
|
}
|
|
149
147
|
}
|
|
150
|
-
|
|
151
|
-
//#region src/core/config/docs-targets.ts
|
|
148
|
+
// src/core/config/docs-targets.ts
|
|
152
149
|
/** Switching provider replaces its identity contract; same-provider objects retain normal preset merging. */
|
|
153
150
|
function replaceDocsTarget(field, current, next) {
|
|
154
151
|
const parts = splitConfigPath(field);
|
|
@@ -167,14 +164,12 @@ const mergeProjectValues = createDefu((object, key, value, namespace) => {
|
|
|
167
164
|
function mergeProjectConfig(...sources) {
|
|
168
165
|
return mergeProjectValues({}, ...sources.map((source) => source ?? {}));
|
|
169
166
|
}
|
|
170
|
-
|
|
171
|
-
//#region src/core/config/legacy-hooks.ts
|
|
167
|
+
// src/core/config/legacy-hooks.ts
|
|
172
168
|
const compatibility = new AsyncLocalStorage();
|
|
173
169
|
/** Only upgrade and diagnosis may read removed hook fields, to preserve custom setups. */
|
|
174
170
|
const legacyHookConfigEnabled = () => compatibility.getStore() === true;
|
|
175
171
|
const withLegacyHookConfig = (read) => compatibility.run(true, read);
|
|
176
|
-
|
|
177
|
-
//#region src/core/config/refresh.ts
|
|
172
|
+
// src/core/config/refresh.ts
|
|
178
173
|
/** Keep C12's resolution and merging while bypassing native ESM's immutable cache. */
|
|
179
174
|
function freshConfigLoading(files) {
|
|
180
175
|
return {
|
|
@@ -185,7 +180,7 @@ function freshConfigLoading(files) {
|
|
|
185
180
|
},
|
|
186
181
|
resolve(_source, { jiti }) {
|
|
187
182
|
if (jiti) jiti.import = async (filename, options) => {
|
|
188
|
-
const { bundleConfig } = await import("./bundle-
|
|
183
|
+
const { bundleConfig } = await import("./bundle-BT26jZsH.mjs");
|
|
189
184
|
const bundled = await bundleConfig(filename);
|
|
190
185
|
for (const file of bundled.files) files.add(file);
|
|
191
186
|
const loaded = await jiti.evalModule(bundled.code, {
|
|
@@ -198,8 +193,7 @@ function freshConfigLoading(files) {
|
|
|
198
193
|
}
|
|
199
194
|
};
|
|
200
195
|
}
|
|
201
|
-
|
|
202
|
-
//#region src/core/presets/reference.ts
|
|
196
|
+
// src/core/presets/reference.ts
|
|
203
197
|
const presetPackageName = {
|
|
204
198
|
expected: "npm package name",
|
|
205
199
|
accepts: (value) => typeof value === "string" && validatePackageName(value).validForNewPackages
|
|
@@ -212,8 +206,7 @@ const presetReferencesSchema = array(object({
|
|
|
212
206
|
packageName: presetPackageName,
|
|
213
207
|
version: presetVersion
|
|
214
208
|
}, ["packageName", "version"]));
|
|
215
|
-
|
|
216
|
-
//#region src/core/nightly/config.ts
|
|
209
|
+
// src/core/nightly/config.ts
|
|
217
210
|
const defaultNightlyQualityTimeoutMs = 27e5;
|
|
218
211
|
const months = [
|
|
219
212
|
"JAN",
|
|
@@ -271,8 +264,7 @@ function resolveNightlyConfig(config = {}) {
|
|
|
271
264
|
...config.qualityTimeoutMs === void 0 ? {} : { qualityTimeoutMs: config.qualityTimeoutMs }
|
|
272
265
|
};
|
|
273
266
|
}
|
|
274
|
-
|
|
275
|
-
//#region src/core/config/validation/docs.ts
|
|
267
|
+
// src/core/config/validation/docs.ts
|
|
276
268
|
const milliseconds = (maximum) => ({
|
|
277
269
|
expected: `integer milliseconds from 1 to ${maximum}`,
|
|
278
270
|
accepts: (value) => typeof value === "number" && Number.isSafeInteger(value) && value >= 1 && value <= maximum
|
|
@@ -319,8 +311,7 @@ const docsSchema = object({ sites: record(object({
|
|
|
319
311
|
"stable",
|
|
320
312
|
"patchPaths"
|
|
321
313
|
])) });
|
|
322
|
-
|
|
323
|
-
//#region src/core/config/validation/upgrade.ts
|
|
314
|
+
// src/core/config/validation/upgrade.ts
|
|
324
315
|
function isUpgradeExpiry(value) {
|
|
325
316
|
return typeof value === "string" && /^\d{4}-\d{2}-\d{2}$/.test(value) && !Number.isNaN(Date.parse(value)) && new Date(value).toISOString().slice(0, 10) === value;
|
|
326
317
|
}
|
|
@@ -348,8 +339,7 @@ const upgradeKeepSchema = array(object({
|
|
|
348
339
|
"upstreamHash",
|
|
349
340
|
"localHash"
|
|
350
341
|
]));
|
|
351
|
-
|
|
352
|
-
//#region src/core/config/validation/commands.ts
|
|
342
|
+
// src/core/config/validation/commands.ts
|
|
353
343
|
const dependencyTypes = array(choices("dependencies", "devDependencies", "peerDependencies", "optionalDependencies"));
|
|
354
344
|
const toolingTargets = array(choices("commitlint", "eslint", "stylelint", "lefthook", "tsconfig", "vitest"));
|
|
355
345
|
const remote = union({
|
|
@@ -544,8 +534,7 @@ const commandSchemas = {
|
|
|
544
534
|
keep: upgradeKeepSchema
|
|
545
535
|
})
|
|
546
536
|
};
|
|
547
|
-
|
|
548
|
-
//#region src/core/config/validation/admission.ts
|
|
537
|
+
// src/core/config/validation/admission.ts
|
|
549
538
|
const admissionSchema = object({
|
|
550
539
|
rules: array(object({
|
|
551
540
|
id: nonempty,
|
|
@@ -597,8 +586,7 @@ const installationSecuritySchema = object({
|
|
|
597
586
|
"reason"
|
|
598
587
|
]))
|
|
599
588
|
});
|
|
600
|
-
|
|
601
|
-
//#region src/core/template-source/request.ts
|
|
589
|
+
// src/core/template-source/request.ts
|
|
602
590
|
function gitRef(value) {
|
|
603
591
|
return Boolean(value) && value !== "@" && !/[\s\p{Cc}]/u.test(value) && ![
|
|
604
592
|
"~",
|
|
@@ -676,8 +664,7 @@ function normalizeTemplateSourceRequest(source, templatePath) {
|
|
|
676
664
|
function sourceRequestKey(request) {
|
|
677
665
|
return createHash("sha256").update(JSON.stringify(request)).digest("hex");
|
|
678
666
|
}
|
|
679
|
-
|
|
680
|
-
//#region src/core/config/validation/template-sources.ts
|
|
667
|
+
// src/core/config/validation/template-sources.ts
|
|
681
668
|
function validateTemplateSources(config, diagnostics) {
|
|
682
669
|
const commands = config["commands"];
|
|
683
670
|
const templates = (isRecord(commands) && isRecord(commands["create"]) ? commands["create"] : void 0)?.["templateMap"];
|
|
@@ -760,8 +747,7 @@ const toolingSchema = object({
|
|
|
760
747
|
environment: string
|
|
761
748
|
})
|
|
762
749
|
});
|
|
763
|
-
|
|
764
|
-
//#region src/core/config/validation/index.ts
|
|
750
|
+
// src/core/config/validation/index.ts
|
|
765
751
|
const selector = object({
|
|
766
752
|
packages: names,
|
|
767
753
|
paths: names,
|
|
@@ -850,8 +836,7 @@ function assertMonorepoConfig(value) {
|
|
|
850
836
|
const diagnostics = validateMonorepoConfig(value);
|
|
851
837
|
if (diagnostics.length) throw new ConfigValidationError(diagnostics);
|
|
852
838
|
}
|
|
853
|
-
|
|
854
|
-
//#region src/core/config/loading.ts
|
|
839
|
+
// src/core/config/loading.ts
|
|
855
840
|
/** Check original exports before C12 merging can discard nulls or unknown empty values. */
|
|
856
841
|
function validatedConfigLoading(files, refresh) {
|
|
857
842
|
const fresh = refresh ? freshConfigLoading(files) : void 0;
|
|
@@ -883,8 +868,7 @@ function validatedConfigLoading(files, refresh) {
|
|
|
883
868
|
}
|
|
884
869
|
};
|
|
885
870
|
}
|
|
886
|
-
|
|
887
|
-
//#region src/core/config/merge.ts
|
|
871
|
+
// src/core/config/merge.ts
|
|
888
872
|
/** Preset boundaries merge objects and replace arrays, without changing C12's project merge. */
|
|
889
873
|
function mergeConfigValues(layers, replaceObject) {
|
|
890
874
|
const values = {};
|
|
@@ -928,10 +912,9 @@ function mergeConfigValues(layers, replaceObject) {
|
|
|
928
912
|
sources
|
|
929
913
|
};
|
|
930
914
|
}
|
|
931
|
-
|
|
932
|
-
//#region package.json
|
|
915
|
+
// package.json
|
|
933
916
|
var name = "@icebreakers/monorepo";
|
|
934
|
-
var version = "6.4.
|
|
917
|
+
var version = "6.4.2";
|
|
935
918
|
var engines = { "node": "^22.23.4 || ^24.22.1 || >=26.12.1" };
|
|
936
919
|
var package_default = {
|
|
937
920
|
name,
|
|
@@ -1009,7 +992,7 @@ var package_default = {
|
|
|
1009
992
|
peerDependencies: {
|
|
1010
993
|
"@commitlint/cli": "catalog:",
|
|
1011
994
|
"eslint": "^9.0.0 || ^10.0.0",
|
|
1012
|
-
"stylelint": "
|
|
995
|
+
"stylelint": "^17.16.0 || ^18.0.0",
|
|
1013
996
|
"typescript": "^5.0.0 || ^6.0.0"
|
|
1014
997
|
},
|
|
1015
998
|
peerDependenciesMeta: {
|
|
@@ -1020,17 +1003,17 @@ var package_default = {
|
|
|
1020
1003
|
},
|
|
1021
1004
|
dependencies: {
|
|
1022
1005
|
"@arethetypeswrong/core": "0.18.5",
|
|
1023
|
-
"@babel/parser": "^
|
|
1006
|
+
"@babel/parser": "^8.0.10",
|
|
1024
1007
|
"@icebreakers/commitlint-config": "workspace:*",
|
|
1025
1008
|
"@icebreakers/eslint-config": "workspace:*",
|
|
1026
1009
|
"@icebreakers/monorepo-templates": "workspace:*",
|
|
1027
1010
|
"@icebreakers/stylelint-config": "workspace:*",
|
|
1028
|
-
"@npmcli/config": "
|
|
1011
|
+
"@npmcli/config": "11.2.0",
|
|
1029
1012
|
"@pnpm/find-workspace-dir": "^1000.1.5",
|
|
1030
1013
|
"@pnpm/fs.find-packages": "^1000.0.24",
|
|
1031
|
-
"@pnpm/types": "^1102.1.
|
|
1014
|
+
"@pnpm/types": "^1102.1.3",
|
|
1032
1015
|
"@pnpm/workspace.read-manifest": "^1000.3.1",
|
|
1033
|
-
"@types/node": "
|
|
1016
|
+
"@types/node": "26.6.6",
|
|
1034
1017
|
"c12": "^3.3.4",
|
|
1035
1018
|
"commander": "catalog:",
|
|
1036
1019
|
"comment-json": "catalog:",
|
|
@@ -1043,8 +1026,8 @@ var package_default = {
|
|
|
1043
1026
|
"klaw": "^4.1.0",
|
|
1044
1027
|
"micromatch": "^4.0.8",
|
|
1045
1028
|
"node-diff3": "~3.2.1",
|
|
1046
|
-
"p-queue": "^
|
|
1047
|
-
"pacote": "
|
|
1029
|
+
"p-queue": "^10.0.0",
|
|
1030
|
+
"pacote": "22.0.1",
|
|
1048
1031
|
"pathe": "^2.0.3",
|
|
1049
1032
|
"picocolors": "^1.1.1",
|
|
1050
1033
|
"pkg-pr-new": "0.0.91",
|
|
@@ -1059,7 +1042,7 @@ var package_default = {
|
|
|
1059
1042
|
"yauzl": "3.4.0"
|
|
1060
1043
|
},
|
|
1061
1044
|
devDependencies: {
|
|
1062
|
-
"@microsoft/api-extractor": "7.
|
|
1045
|
+
"@microsoft/api-extractor": "7.60.1",
|
|
1063
1046
|
"@types/cross-spawn": "^6.0.6",
|
|
1064
1047
|
"@types/klaw": "^3.0.8",
|
|
1065
1048
|
"@types/micromatch": "^4.0.10",
|
|
@@ -1070,15 +1053,14 @@ var package_default = {
|
|
|
1070
1053
|
"@types/yauzl": "3.4.0",
|
|
1071
1054
|
"ci-info": "^4.4.0",
|
|
1072
1055
|
"fdir": "^6.5.0",
|
|
1073
|
-
"knip": "6.
|
|
1056
|
+
"knip": "6.44.1"
|
|
1074
1057
|
},
|
|
1075
1058
|
publishConfig: {
|
|
1076
1059
|
"access": "public",
|
|
1077
1060
|
"registry": "https://registry.npmjs.org"
|
|
1078
1061
|
}
|
|
1079
1062
|
};
|
|
1080
|
-
|
|
1081
|
-
//#region src/core/file-transaction/paths.ts
|
|
1063
|
+
// src/core/file-transaction/paths.ts
|
|
1082
1064
|
function hash(content) {
|
|
1083
1065
|
return createHash("sha256").update(content).digest("hex");
|
|
1084
1066
|
}
|
|
@@ -1140,8 +1122,7 @@ async function readOptional(root, relative, owned) {
|
|
|
1140
1122
|
async function readOptionalSource(root, relative) {
|
|
1141
1123
|
return readOptionalPath(await checkedPath(root, relative, void 0, true));
|
|
1142
1124
|
}
|
|
1143
|
-
|
|
1144
|
-
//#region src/core/presets/files.ts
|
|
1125
|
+
// src/core/presets/files.ts
|
|
1145
1126
|
const presetManifestName = "repoctl.preset.json";
|
|
1146
1127
|
const hashPresetFile = (content) => createHash("sha256").update(content).digest("hex");
|
|
1147
1128
|
/** Portable relative paths; preset declarations cannot escape their package or target root. */
|
|
@@ -1198,8 +1179,7 @@ async function installedPresetDirectory(packageName, fromDirectory) {
|
|
|
1198
1179
|
}
|
|
1199
1180
|
return null;
|
|
1200
1181
|
}
|
|
1201
|
-
|
|
1202
|
-
//#region src/commands/tooling-capabilities/registry.ts
|
|
1182
|
+
// src/commands/tooling-capabilities/registry.ts
|
|
1203
1183
|
const capabilities = [{
|
|
1204
1184
|
id: "playwright",
|
|
1205
1185
|
version: 1,
|
|
@@ -1219,8 +1199,7 @@ const capabilities = [{
|
|
|
1219
1199
|
function listToolingCapabilities() {
|
|
1220
1200
|
return structuredClone(capabilities);
|
|
1221
1201
|
}
|
|
1222
|
-
|
|
1223
|
-
//#region src/core/presets/assets.ts
|
|
1202
|
+
// src/core/presets/assets.ts
|
|
1224
1203
|
const rootAssets = /* @__PURE__ */ new Set([
|
|
1225
1204
|
".editorconfig",
|
|
1226
1205
|
".gitattributes",
|
|
@@ -1248,8 +1227,7 @@ function presetAssetTarget(value) {
|
|
|
1248
1227
|
if (rootAssets.has(target) || /^\.github\/(?:workflows\/[^/]+\.ya?ml|ISSUE_TEMPLATE\/[^/]+\.(?:ya?ml|md)|PULL_REQUEST_TEMPLATE\.md)$/u.test(target) || /^\.vscode\/(?:settings|extensions|tasks)\.json$/u.test(target) || /^scripts\/.+\.(?:[cm]?js|ts|sh)$/u.test(target) && !target.split("/").some((part) => part === "node_modules" || part === ".git")) return target;
|
|
1249
1228
|
throw new Error("Preset assets must target supported root tooling files, GitHub/VS Code configuration, or engineering scripts.");
|
|
1250
1229
|
}
|
|
1251
|
-
|
|
1252
|
-
//#region src/core/presets/manifest.ts
|
|
1230
|
+
// src/core/presets/manifest.ts
|
|
1253
1231
|
const templateValue = commandSchemas.create.fields["templateMap"].values;
|
|
1254
1232
|
const schema = object({
|
|
1255
1233
|
schemaVersion: {
|
|
@@ -1307,8 +1285,7 @@ function parseOrganizationPresetManifest(value) {
|
|
|
1307
1285
|
}
|
|
1308
1286
|
return manifest;
|
|
1309
1287
|
}
|
|
1310
|
-
|
|
1311
|
-
//#region src/core/presets/load.ts
|
|
1288
|
+
// src/core/presets/load.ts
|
|
1312
1289
|
/** Read installed data only: no importing package entrypoints, download, cache write or lifecycle execution. */
|
|
1313
1290
|
async function resolveOrganizationPresets(cwd, references) {
|
|
1314
1291
|
const result = {
|
|
@@ -1453,8 +1430,7 @@ async function resolveOrganizationPresets(cwd, references) {
|
|
|
1453
1430
|
})).sort((left, right) => left.path.localeCompare(right.path));
|
|
1454
1431
|
return result;
|
|
1455
1432
|
}
|
|
1456
|
-
|
|
1457
|
-
//#region src/core/config.ts
|
|
1433
|
+
// src/core/config.ts
|
|
1458
1434
|
var config_exports = /* @__PURE__ */ __exportAll({
|
|
1459
1435
|
configExtensions: () => configExtensions,
|
|
1460
1436
|
defineMonorepoConfig: () => defineMonorepoConfig,
|
|
@@ -1616,8 +1592,7 @@ async function resolveCommandConfig(name, cwd) {
|
|
|
1616
1592
|
async function resolveToolingConfig(cwd) {
|
|
1617
1593
|
return (await loadMonorepoConfig(cwd)).tooling ?? {};
|
|
1618
1594
|
}
|
|
1619
|
-
|
|
1620
|
-
//#region src/tooling/shared.ts
|
|
1595
|
+
// src/tooling/shared.ts
|
|
1621
1596
|
/**
|
|
1622
1597
|
* 读取当前工作目录下的 `repoctl.config.*` 中 `tooling` 配置块。
|
|
1623
1598
|
*
|
|
@@ -1648,8 +1623,7 @@ function isDefineConfigWrapper(input) {
|
|
|
1648
1623
|
if (input === null || typeof input !== "object" || Array.isArray(input)) return false;
|
|
1649
1624
|
return "cwd" in input || "options" in input;
|
|
1650
1625
|
}
|
|
1651
|
-
|
|
1652
|
-
//#region src/tooling/tsconfig.ts
|
|
1626
|
+
// src/tooling/tsconfig.ts
|
|
1653
1627
|
const monorepoTsconfigPath = fileURLToPath(import.meta.resolve("@icebreakers/monorepo/tsconfig"));
|
|
1654
1628
|
function mergeTsconfig(base, override) {
|
|
1655
1629
|
if (!override) return base;
|
|
@@ -1685,5 +1659,4 @@ async function defineTsconfigConfig(input = {}) {
|
|
|
1685
1659
|
const resolved = resolveConfigInput(input);
|
|
1686
1660
|
return createMonorepoTsconfig(mergeTsconfig(await loadToolingSection("tsconfig", resolved.cwd) ?? {}, resolved.options));
|
|
1687
1661
|
}
|
|
1688
|
-
//#endregion
|
|
1689
1662
|
export { commandConfigDirectory as $, package_default as A, templateSourcePath as B, checkedFile as C, relativeFile as D, readOptionalSource as E, validateMonorepoConfig as F, presetPackageName as G, isUpgradeExpiry as H, normalizeTemplateRemoteSource as I, replaceDocsTarget as J, presetVersion as K, normalizeTemplateSourceRequest as L, mergeConfigValues as M, ConfigValidationError as N, engines as O, assertMonorepoConfig as P, splitConfigPath as Q, registryUrl as R, canonicalDirectory as S, readOptional as T, defaultNightlyQualityTimeoutMs as U, commandSchemas as V, resolveNightlyConfig as W, validateSchema as X, isRecord as Y, appendConfigPath as Z, listToolingCapabilities as _, loadToolingSection as a, presetRelativePath as b, config_exports as c, loadMonorepoConfig as d, loadMonorepoConfigDetails as f, presetAssetTarget as g, resolveOrganizationPresets as h, loadMonorepoToolingConfig as i, version as j, name as k, defineMonorepoConfig as l, resolveToolingConfig as m, defineTsconfigConfig as n, resolveConfigInput as o, resolveCommandConfig as p, withLegacyHookConfig as q, isDefineConfigWrapper as r, configExtensions as s, createMonorepoTsconfig as t, getRepoctlConfigCandidates as u, installedPresetDirectory as v, hash as w, readPresetFile as x, parsePresetJson as y, sourceRequestKey as z };
|
|
@@ -1,12 +1,11 @@
|
|
|
1
|
-
import { a as loadToolingSection, o as resolveConfigInput, r as isDefineConfigWrapper } from "./tsconfig-
|
|
1
|
+
import { a as loadToolingSection, o as resolveConfigInput, r as isDefineConfigWrapper } from "./tsconfig-73z0Y3Nr.mjs";
|
|
2
2
|
import { createRequire } from "node:module";
|
|
3
3
|
import process from "node:process";
|
|
4
4
|
import fs from "node:fs";
|
|
5
5
|
import path from "node:path";
|
|
6
6
|
import YAML from "yaml";
|
|
7
7
|
import { icebreaker } from "@icebreakers/commitlint-config";
|
|
8
|
-
|
|
9
|
-
//#region src/tooling/linters.ts
|
|
8
|
+
// src/tooling/linters.ts
|
|
10
9
|
const require = createRequire(import.meta.url);
|
|
11
10
|
function resolveEslintOptions(options = {}, configs = []) {
|
|
12
11
|
const { configs: inlineConfigs = [], ...rest } = options;
|
|
@@ -113,7 +112,8 @@ async function defineEslintConfig(input = {}, ...configs) {
|
|
|
113
112
|
* @returns 可直接作为 `stylelint.config.js` 默认导出的配置对象
|
|
114
113
|
*/
|
|
115
114
|
function createMonorepoStylelintConfig(options = {}) {
|
|
116
|
-
|
|
115
|
+
const { icebreaker: createStylelint } = require("@icebreakers/stylelint-config");
|
|
116
|
+
return createStylelint(options);
|
|
117
117
|
}
|
|
118
118
|
/**
|
|
119
119
|
* 从 `repoctl.config.ts` 读取 `tooling.stylelint`,并生成 Stylelint 配置。
|
|
@@ -128,8 +128,7 @@ async function defineStylelintConfig(input = {}) {
|
|
|
128
128
|
...resolved.options
|
|
129
129
|
});
|
|
130
130
|
}
|
|
131
|
-
|
|
132
|
-
//#region src/tooling/vitest/discovery.ts
|
|
131
|
+
// src/tooling/vitest/discovery.ts
|
|
133
132
|
const defaultProjectRoots = ["packages", "apps"];
|
|
134
133
|
const defaultConfigCandidates = [
|
|
135
134
|
"vitest.config.ts",
|
|
@@ -191,8 +190,7 @@ function findConfig(basePath, configCandidates) {
|
|
|
191
190
|
}
|
|
192
191
|
return null;
|
|
193
192
|
}
|
|
194
|
-
|
|
195
|
-
//#region src/tooling/vitest/index.ts
|
|
193
|
+
// src/tooling/vitest/index.ts
|
|
196
194
|
/**
|
|
197
195
|
* 创建 monorepo 根级 Vitest 配置。
|
|
198
196
|
*
|
|
@@ -338,5 +336,4 @@ async function defineVitestProjectConfig(input = {}) {
|
|
|
338
336
|
...input.options
|
|
339
337
|
});
|
|
340
338
|
}
|
|
341
|
-
//#endregion
|
|
342
339
|
export { createMonorepoCommitlintConfig as a, defineCommitlintConfig as c, defineVitestProjectConfig as i, defineEslintConfig as l, createMonorepoVitestProjectConfig as n, createMonorepoEslintConfig as o, defineVitestConfig as r, createMonorepoStylelintConfig as s, createMonorepoVitestConfig as t, defineStylelintConfig as u };
|