@ariestools/toolchain 8.6.12 → 8.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/dist/actions/api-exposure/config.d.ts.map +1 -1
- package/dist/actions/deplint/packageJsonEditor.d.ts +1 -1
- package/dist/actions/deplint/ruleConfig.d.ts.map +1 -1
- package/dist/actions/deplint/types.d.ts +1 -1
- package/dist/actions/gitlint.d.ts +2 -0
- package/dist/actions/gitlint.d.ts.map +1 -1
- package/dist/actions/lintlint.d.ts +31 -0
- package/dist/actions/lintlint.d.ts.map +1 -1
- package/dist/actions/node-lint.d.ts +7 -0
- package/dist/actions/node-lint.d.ts.map +1 -1
- package/dist/actions/package/compile/MonolithConfig.d.ts +23 -4
- package/dist/actions/package/compile/MonolithConfig.d.ts.map +1 -1
- package/dist/actions/package/compile/PublintConfig.d.ts +4 -2
- package/dist/actions/package/compile/PublintConfig.d.ts.map +1 -1
- package/dist/actions/package/compile/XyConfig.d.ts +18 -6
- package/dist/actions/package/compile/XyConfig.d.ts.map +1 -1
- package/dist/actions/package/compile/index.d.ts +1 -0
- package/dist/actions/package/compile/index.d.ts.map +1 -1
- package/dist/actions/package/compile/monolithCompileEntries.d.ts +8 -6
- package/dist/actions/package/compile/monolithCompileEntries.d.ts.map +1 -1
- package/dist/actions/package/compile/monolithCompileLayout.d.ts +2 -0
- package/dist/actions/package/compile/monolithCompileLayout.d.ts.map +1 -1
- package/dist/actions/package/compile/monolithReexport.d.ts +45 -0
- package/dist/actions/package/compile/monolithReexport.d.ts.map +1 -0
- package/dist/actions/package/compile/packageCompileMonolith.d.ts.map +1 -1
- package/dist/actions/package/publintRules.d.ts +4 -1
- package/dist/actions/package/publintRules.d.ts.map +1 -1
- package/dist/actions/package-lint.d.ts.map +1 -1
- package/dist/actions/packman/lint.d.ts +14 -0
- package/dist/actions/packman/lint.d.ts.map +1 -1
- package/dist/actions/ruleCatalog.d.ts +4 -2
- package/dist/actions/ruleCatalog.d.ts.map +1 -1
- package/dist/actions/ruleRunner.d.ts +4 -1
- package/dist/actions/ruleRunner.d.ts.map +1 -1
- package/dist/actions/skills/lint.d.ts +13 -0
- package/dist/actions/skills/lint.d.ts.map +1 -1
- package/dist/bin/package/build.mjs +412 -55
- package/dist/bin/package/build.mjs.map +1 -1
- package/dist/bin/package/compile.mjs +249 -21
- package/dist/bin/package/compile.mjs.map +1 -1
- package/dist/bin/package/publint.mjs +163 -34
- package/dist/bin/package/publint.mjs.map +1 -1
- package/dist/bin/package/recompile.mjs +249 -21
- package/dist/bin/package/recompile.mjs.map +1 -1
- package/dist/bin/package/sync-layout.mjs +47 -7
- package/dist/bin/package/sync-layout.mjs.map +1 -1
- package/dist/bin/xy.mjs +6942 -621
- package/dist/bin/xy.mjs.map +1 -1
- package/dist/lib/index.d.ts +1 -0
- package/dist/lib/index.d.ts.map +1 -1
- package/dist/lib/loadConfig.d.ts +1 -0
- package/dist/lib/loadConfig.d.ts.map +1 -1
- package/dist/lib/ruleCommandRegistry.d.ts +100 -0
- package/dist/lib/ruleCommandRegistry.d.ts.map +1 -0
- package/dist/xy/common/gitCommand.d.ts +3 -0
- package/dist/xy/common/gitCommand.d.ts.map +1 -0
- package/dist/xy/common/gitlintCommand.d.ts +2 -0
- package/dist/xy/common/gitlintCommand.d.ts.map +1 -1
- package/dist/xy/common/index.d.ts.map +1 -1
- package/dist/xy/deprecatedCommand.d.ts +2 -0
- package/dist/xy/deprecatedCommand.d.ts.map +1 -0
- package/dist/xy/lint/index.d.ts.map +1 -1
- package/dist/xy/lint/lint/index.d.ts.map +1 -1
- package/dist/xy/lint/lint/runCommand.d.ts.map +1 -1
- package/dist/xy/lint/lintlintCommand.d.ts +2 -0
- package/dist/xy/lint/lintlintCommand.d.ts.map +1 -1
- package/dist/xy/lint/nodeCommand.d.ts +3 -0
- package/dist/xy/lint/nodeCommand.d.ts.map +1 -0
- package/dist/xy/lint/nodeLintCommand.d.ts +2 -0
- package/dist/xy/lint/nodeLintCommand.d.ts.map +1 -1
- package/dist/xy/lint/publintCommand.d.ts.map +1 -1
- package/dist/xy/lint/relintCommand.d.ts.map +1 -1
- package/dist/xy/lint/republintCommand.d.ts.map +1 -1
- package/package.json +5 -4
|
@@ -5328,6 +5328,46 @@ const loadConfig = async (params) => {
|
|
|
5328
5328
|
return deepMerge(configState.config, params ?? {});
|
|
5329
5329
|
};
|
|
5330
5330
|
//#endregion
|
|
5331
|
+
//#region src/actions/package/compile/monolithReexport.ts
|
|
5332
|
+
function normalizeReexportTargets(value) {
|
|
5333
|
+
if (value === void 0) return [];
|
|
5334
|
+
return Array.isArray(value) ? value : [value];
|
|
5335
|
+
}
|
|
5336
|
+
/** Configured `reexport` targets for a module, if any. */
|
|
5337
|
+
function moduleReexportTargets(mod) {
|
|
5338
|
+
return normalizeReexportTargets(mod.reexport);
|
|
5339
|
+
}
|
|
5340
|
+
function moduleHasReexport(mod) {
|
|
5341
|
+
return moduleReexportTargets(mod).length > 0;
|
|
5342
|
+
}
|
|
5343
|
+
/**
|
|
5344
|
+
* Master-barrel re-export targets for a module: explicit `barrelFrom`, else
|
|
5345
|
+
* `reexport`, else `#<name>`.
|
|
5346
|
+
*/
|
|
5347
|
+
function moduleBarrelTargets(mod) {
|
|
5348
|
+
const fromBarrel = normalizeReexportTargets(mod.barrelFrom);
|
|
5349
|
+
if (fromBarrel.length > 0) return fromBarrel;
|
|
5350
|
+
const fromReexport = moduleReexportTargets(mod);
|
|
5351
|
+
if (fromReexport.length > 0) return fromReexport;
|
|
5352
|
+
return [`#${mod.name}`];
|
|
5353
|
+
}
|
|
5354
|
+
/**
|
|
5355
|
+
* Subpath shim re-export targets: explicit `shimFrom`, else `reexport`, else
|
|
5356
|
+
* `#<name>`.
|
|
5357
|
+
*/
|
|
5358
|
+
function moduleShimTargets(mod) {
|
|
5359
|
+
const fromShim = normalizeReexportTargets(mod.shimFrom);
|
|
5360
|
+
if (fromShim.length > 0) return fromShim;
|
|
5361
|
+
const fromReexport = moduleReexportTargets(mod);
|
|
5362
|
+
if (fromReexport.length > 0) return fromReexport;
|
|
5363
|
+
return [`#${mod.name}`];
|
|
5364
|
+
}
|
|
5365
|
+
/** Builds a pure star-reexport TypeScript (or mjs) source body (no header). */
|
|
5366
|
+
function buildStarReexportLines(targets, options = {}) {
|
|
5367
|
+
const semi = options.semi === false ? "" : ";";
|
|
5368
|
+
return `${targets.map((target) => `export * from '${target}'${semi}`).join("\n")}\n`;
|
|
5369
|
+
}
|
|
5370
|
+
//#endregion
|
|
5331
5371
|
//#region src/actions/package/compile/monolithCompileLayout.ts
|
|
5332
5372
|
/**
|
|
5333
5373
|
* Layout generation for `compile.mode: 'monolith'` — a 1:1 port of the
|
|
@@ -5393,10 +5433,7 @@ function buildIndexTs(modules, config) {
|
|
|
5393
5433
|
const hasConditional = Object.keys(config.conditionalImports ?? {}).length > 0;
|
|
5394
5434
|
const barrelModules = modules.filter((mod) => mod.barrel ?? false).toSorted((a, b) => a.name.localeCompare(b.name));
|
|
5395
5435
|
const lines = (config.barrelImports ?? []).map((spec) => `export * from '${spec}'`);
|
|
5396
|
-
for (const mod of barrelModules) {
|
|
5397
|
-
const target = mod.barrelFrom ?? `#${mod.name}`;
|
|
5398
|
-
lines.push(`export * from '${target}'`);
|
|
5399
|
-
}
|
|
5436
|
+
for (const mod of barrelModules) for (const target of moduleBarrelTargets(mod)) lines.push(`export * from '${target}'`);
|
|
5400
5437
|
return `${GENERATED_HEADER}${hasConditional ? "/* eslint-disable @typescript-eslint/ban-ts-comment -- conditional package imports */\n// @ts-nocheck\n" : ""}${lines.join("\n")}
|
|
5401
5438
|
`;
|
|
5402
5439
|
}
|
|
@@ -5406,9 +5443,11 @@ function buildModelTs(modules) {
|
|
|
5406
5443
|
`;
|
|
5407
5444
|
}
|
|
5408
5445
|
function buildModuleShim(mod) {
|
|
5409
|
-
|
|
5410
|
-
|
|
5411
|
-
|
|
5446
|
+
return `${GENERATED_HEADER}${buildStarReexportLines(moduleShimTargets(mod), { semi: false })}`;
|
|
5447
|
+
}
|
|
5448
|
+
/** Generated module body for facade modules with `reexport` targets. */
|
|
5449
|
+
function buildModuleReexportIndex(mod) {
|
|
5450
|
+
return `${GENERATED_HEADER}${buildStarReexportLines(moduleReexportTargets(mod), { semi: false })}`;
|
|
5412
5451
|
}
|
|
5413
5452
|
function buildModelShim(mod) {
|
|
5414
5453
|
return `${GENERATED_HEADER}export type * from '#${mod.name}/model'
|
|
@@ -5463,6 +5502,7 @@ function syncMonolithLayout(packageDir, config, options = {}) {
|
|
|
5463
5502
|
if (!(config.index?.custom ?? false)) writeOrCheck(PATH.join(packageDir, "src/index.ts"), buildIndexTs(modules, config));
|
|
5464
5503
|
if (monolithHasModelBarrel(config)) writeOrCheck(PATH.join(packageDir, "src/model.ts"), buildModelTs(modules));
|
|
5465
5504
|
for (const mod of modules) {
|
|
5505
|
+
if (moduleHasReexport(mod)) writeOrCheck(PATH.join(packageDir, "src", "modules", mod.name, "index.ts"), buildModuleReexportIndex(mod));
|
|
5466
5506
|
if (!(mod.export ?? false)) continue;
|
|
5467
5507
|
writeOrCheck(PATH.join(packageDir, `src/${mod.name}.ts`), buildModuleShim(mod));
|
|
5468
5508
|
if (mod.model ?? false) writeOrCheck(PATH.join(packageDir, `src/${mod.name}.model.ts`), buildModelShim(mod));
|