@ariestools/toolchain 9.0.4 → 9.1.1

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.
Files changed (34) hide show
  1. package/dist/actions/build.d.ts.map +1 -1
  2. package/dist/actions/clean.d.ts.map +1 -1
  3. package/dist/actions/compile.d.ts.map +1 -1
  4. package/dist/actions/deplint/checkPackage/checkPackage.d.ts.map +1 -1
  5. package/dist/actions/gitlint.d.ts.map +1 -1
  6. package/dist/actions/gitlintIgnore.d.ts +19 -0
  7. package/dist/actions/gitlintIgnore.d.ts.map +1 -0
  8. package/dist/actions/index.d.ts +1 -0
  9. package/dist/actions/index.d.ts.map +1 -1
  10. package/dist/actions/publint.d.ts.map +1 -1
  11. package/dist/bin/package/build.mjs +405 -402
  12. package/dist/bin/package/build.mjs.map +1 -1
  13. package/dist/bin/package/clean.mjs.map +1 -1
  14. package/dist/bin/package/compile.mjs +382 -379
  15. package/dist/bin/package/compile.mjs.map +1 -1
  16. package/dist/bin/package/publint.mjs +23 -23
  17. package/dist/bin/package/publint.mjs.map +1 -1
  18. package/dist/bin/package/recompile.mjs +382 -379
  19. package/dist/bin/package/recompile.mjs.map +1 -1
  20. package/dist/bin/skills.mjs +336 -141
  21. package/dist/bin/skills.mjs.map +1 -1
  22. package/dist/bin/xy.mjs +155 -52
  23. package/dist/bin/xy.mjs.map +1 -1
  24. package/dist/lib/secure/collectDeclaredDependencies.d.ts.map +1 -1
  25. package/dist/lib/updo/runUpdo.d.ts.map +1 -1
  26. package/dist/pm/PackageManager.d.ts +16 -0
  27. package/dist/pm/PackageManager.d.ts.map +1 -1
  28. package/dist/pm/pnpmPackageManager.d.ts.map +1 -1
  29. package/dist/pm/workspaceDir.d.ts +11 -0
  30. package/dist/pm/workspaceDir.d.ts.map +1 -0
  31. package/dist/pm/workspaces.d.ts.map +1 -1
  32. package/package.json +13 -13
  33. package/templates/gitignore/gitignore/template.gitignore +12 -11
  34. package/templates/gitignore/template.gitignore +12 -11
package/dist/bin/xy.mjs CHANGED
@@ -4642,10 +4642,12 @@ function findWorkspaceRoot(startDir) {
4642
4642
  function workspaceFromPackageJsonMatch(match, cwd, seen) {
4643
4643
  const name = readJsonFile$1(match)?.name;
4644
4644
  if (name === void 0 || name.length === 0) return void 0;
4645
- const location = PATH.relative(cwd, PATH.dirname(match)) || ".";
4645
+ const dir = PATH.dirname(match);
4646
+ const location = PATH.relative(cwd, dir) || ".";
4646
4647
  if (seen.has(location)) return void 0;
4647
4648
  seen.add(location);
4648
4649
  return {
4650
+ dir: PATH.resolve(dir),
4649
4651
  location,
4650
4652
  name
4651
4653
  };
@@ -4810,7 +4812,7 @@ function hasReactDependency(packageJsonPath) {
4810
4812
  }
4811
4813
  }
4812
4814
  function hasWorkspaceReact(workspace) {
4813
- return hasReactDependency(PATH.join(workspace.location, "package.json"));
4815
+ return hasReactDependency(PATH.join(workspace.dir, "package.json"));
4814
4816
  }
4815
4817
  function isReactInMonorepo(cwd, isVerbose) {
4816
4818
  if (hasReactDependency(PATH.resolve(cwd, "package.json"))) {
@@ -5029,6 +5031,7 @@ var PnpmPackageManager = class {
5029
5031
  if (Array.isArray(parsed)) return parsed.map((pkg) => {
5030
5032
  const rel = PATH.relative(cwd, pkg.path);
5031
5033
  return {
5034
+ dir: PATH.resolve(cwd, pkg.path),
5032
5035
  location: rel === "" ? "." : rel,
5033
5036
  name: pkg.name
5034
5037
  };
@@ -19399,6 +19402,7 @@ function collectSecurePackageTargets(cwd, workspaces) {
19399
19402
  const rootName = readPackageJson$10(PATH.resolve(cwd, "package.json"))?.name;
19400
19403
  if (rootName !== void 0 && rootName.length > 0) {
19401
19404
  targets.push({
19405
+ dir: PATH.resolve(cwd),
19402
19406
  location: ".",
19403
19407
  name: rootName
19404
19408
  });
@@ -19408,6 +19412,7 @@ function collectSecurePackageTargets(cwd, workspaces) {
19408
19412
  const normalizedLocation = workspace.location || ".";
19409
19413
  if (seenLocations.has(normalizedLocation)) continue;
19410
19414
  targets.push({
19415
+ dir: workspace.dir,
19411
19416
  location: normalizedLocation,
19412
19417
  name: workspace.name
19413
19418
  });
@@ -20527,13 +20532,13 @@ async function fetchAllRegistryInfo(packageNames, options = {}) {
20527
20532
  return await fetchAllRegistryInfoDirect(packageNames, options);
20528
20533
  }
20529
20534
  //#endregion
20530
- //#region ../../node_modules/.pnpm/@inquirer+core@11.2.1_@types+node@26.2.0/node_modules/@inquirer/core/dist/lib/key.js
20535
+ //#region ../../node_modules/.pnpm/@inquirer+core@12.0.0_@types+node@26.2.0/node_modules/@inquirer/core/dist/lib/key.js
20531
20536
  const isUpKey = (key, keybindings = []) => key.name === "up" || keybindings.includes("vim") && key.name === "k" || keybindings.includes("emacs") && key.ctrl && key.name === "p";
20532
20537
  const isDownKey = (key, keybindings = []) => key.name === "down" || keybindings.includes("vim") && key.name === "j" || keybindings.includes("emacs") && key.ctrl && key.name === "n";
20533
20538
  const isSpaceKey = (key) => key.name === "space";
20534
20539
  const isEnterKey = (key) => key.name === "enter" || key.name === "return";
20535
20540
  //#endregion
20536
- //#region ../../node_modules/.pnpm/@inquirer+core@11.2.1_@types+node@26.2.0/node_modules/@inquirer/core/dist/lib/errors.js
20541
+ //#region ../../node_modules/.pnpm/@inquirer+core@12.0.0_@types+node@26.2.0/node_modules/@inquirer/core/dist/lib/errors.js
20537
20542
  var AbortPromptError = class extends Error {
20538
20543
  name = "AbortPromptError";
20539
20544
  message = "Prompt was aborted";
@@ -20556,7 +20561,7 @@ var ValidationError = class extends Error {
20556
20561
  name = "ValidationError";
20557
20562
  };
20558
20563
  //#endregion
20559
- //#region ../../node_modules/.pnpm/@inquirer+core@11.2.1_@types+node@26.2.0/node_modules/@inquirer/core/dist/lib/hook-engine.js
20564
+ //#region ../../node_modules/.pnpm/@inquirer+core@12.0.0_@types+node@26.2.0/node_modules/@inquirer/core/dist/lib/hook-engine.js
20560
20565
  const hookStorage = new AsyncLocalStorage();
20561
20566
  function createStore(rl) {
20562
20567
  return {
@@ -20652,15 +20657,20 @@ const effectScheduler = {
20652
20657
  }
20653
20658
  };
20654
20659
  //#endregion
20655
- //#region ../../node_modules/.pnpm/@inquirer+core@11.2.1_@types+node@26.2.0/node_modules/@inquirer/core/dist/lib/use-state.js
20660
+ //#region ../../node_modules/.pnpm/@inquirer+core@12.0.0_@types+node@26.2.0/node_modules/@inquirer/core/dist/lib/use-state.js
20656
20661
  function isFactory(value) {
20657
20662
  return typeof value === "function";
20658
20663
  }
20664
+ function isReducer(value) {
20665
+ return typeof value === "function";
20666
+ }
20659
20667
  function useState(defaultValue) {
20660
20668
  return withPointer((pointer) => {
20661
20669
  const setState = AsyncResource.bind(function setState(newValue) {
20662
- if (pointer.get() !== newValue) {
20663
- pointer.set(newValue);
20670
+ const currentValue = pointer.get();
20671
+ const nextValue = isReducer(newValue) ? newValue(currentValue) : newValue;
20672
+ if (!Object.is(currentValue, nextValue)) {
20673
+ pointer.set(nextValue);
20664
20674
  handleChange();
20665
20675
  }
20666
20676
  });
@@ -20671,7 +20681,7 @@ function useState(defaultValue) {
20671
20681
  });
20672
20682
  }
20673
20683
  //#endregion
20674
- //#region ../../node_modules/.pnpm/@inquirer+core@11.2.1_@types+node@26.2.0/node_modules/@inquirer/core/dist/lib/use-effect.js
20684
+ //#region ../../node_modules/.pnpm/@inquirer+core@12.0.0_@types+node@26.2.0/node_modules/@inquirer/core/dist/lib/use-effect.js
20675
20685
  function useEffect(cb, depArray) {
20676
20686
  withPointer((pointer) => {
20677
20687
  const oldDeps = pointer.get();
@@ -20680,12 +20690,12 @@ function useEffect(cb, depArray) {
20680
20690
  });
20681
20691
  }
20682
20692
  //#endregion
20683
- //#region ../../node_modules/.pnpm/@inquirer+core@11.2.1_@types+node@26.2.0/node_modules/@inquirer/core/dist/lib/use-ref.js
20693
+ //#region ../../node_modules/.pnpm/@inquirer+core@12.0.0_@types+node@26.2.0/node_modules/@inquirer/core/dist/lib/use-ref.js
20684
20694
  function useRef(val) {
20685
20695
  return useState({ current: val })[0];
20686
20696
  }
20687
20697
  //#endregion
20688
- //#region ../../node_modules/.pnpm/@inquirer+core@11.2.1_@types+node@26.2.0/node_modules/@inquirer/core/dist/lib/use-keypress.js
20698
+ //#region ../../node_modules/.pnpm/@inquirer+core@12.0.0_@types+node@26.2.0/node_modules/@inquirer/core/dist/lib/use-keypress.js
20689
20699
  function useKeypress(userHandler) {
20690
20700
  const signal = useRef(userHandler);
20691
20701
  signal.current = userHandler;
@@ -21013,7 +21023,7 @@ function wrapAnsi$1(string, columns, options) {
21013
21023
  return String(string).normalize().split(CRLF_OR_LF).map((line) => exec$2(line, columns, options)).join("\n");
21014
21024
  }
21015
21025
  //#endregion
21016
- //#region ../../node_modules/.pnpm/@inquirer+core@11.2.1_@types+node@26.2.0/node_modules/@inquirer/core/dist/lib/utils.js
21026
+ //#region ../../node_modules/.pnpm/@inquirer+core@12.0.0_@types+node@26.2.0/node_modules/@inquirer/core/dist/lib/utils.js
21017
21027
  var import_cli_width = /* @__PURE__ */ __toESM(require_cli_width(), 1);
21018
21028
  /**
21019
21029
  * Force line returns at specific width. This function is ANSI code friendly and it'll
@@ -21353,7 +21363,7 @@ const eraseLine = "\x1B[2K";
21353
21363
  /** Erase the specified number of lines above the cursor */
21354
21364
  const eraseLines = (lines) => lines > 0 ? (eraseLine + cursorUp(1)).repeat(lines - 1) + "\x1B[2K\x1B[G" : "";
21355
21365
  //#endregion
21356
- //#region ../../node_modules/.pnpm/@inquirer+core@11.2.1_@types+node@26.2.0/node_modules/@inquirer/core/dist/lib/screen-manager.js
21366
+ //#region ../../node_modules/.pnpm/@inquirer+core@12.0.0_@types+node@26.2.0/node_modules/@inquirer/core/dist/lib/screen-manager.js
21357
21367
  const height = (content) => content.split("\n").length;
21358
21368
  const lastLine = (content) => content.split("\n").pop() ?? "";
21359
21369
  var ScreenManager = class {
@@ -21410,7 +21420,7 @@ var ScreenManager = class {
21410
21420
  }
21411
21421
  };
21412
21422
  //#endregion
21413
- //#region ../../node_modules/.pnpm/@inquirer+core@11.2.1_@types+node@26.2.0/node_modules/@inquirer/core/dist/lib/promise-polyfill.js
21423
+ //#region ../../node_modules/.pnpm/@inquirer+core@12.0.0_@types+node@26.2.0/node_modules/@inquirer/core/dist/lib/promise-polyfill.js
21414
21424
  var PromisePolyfill = class extends Promise {
21415
21425
  static withResolver() {
21416
21426
  let resolve;
@@ -21426,7 +21436,7 @@ var PromisePolyfill = class extends Promise {
21426
21436
  }
21427
21437
  };
21428
21438
  //#endregion
21429
- //#region ../../node_modules/.pnpm/@inquirer+core@11.2.1_@types+node@26.2.0/node_modules/@inquirer/core/dist/lib/create-prompt.js
21439
+ //#region ../../node_modules/.pnpm/@inquirer+core@12.0.0_@types+node@26.2.0/node_modules/@inquirer/core/dist/lib/create-prompt.js
21430
21440
  var import_lib = /* @__PURE__ */ __toESM(require_lib(), 1);
21431
21441
  const nativeSetImmediate = globalThis.setImmediate;
21432
21442
  function getCallSites() {
@@ -22050,6 +22060,7 @@ function listWorkspacesFromFs(cwd) {
22050
22060
  if (existsSync(rootPath)) try {
22051
22061
  const root = JSON.parse(readFileSync(rootPath, "utf8"));
22052
22062
  if (root.name != null && root.name.length > 0 && workspaces.every((ws) => ws.location !== ".")) workspaces.unshift({
22063
+ dir: PATH.dirname(rootPath),
22053
22064
  location: ".",
22054
22065
  name: root.name
22055
22066
  });
@@ -25873,6 +25884,7 @@ function readRootWorkspace(rootDir) {
25873
25884
  const packageJson = JSON.parse(readFileSync(packageJsonPath, "utf8"));
25874
25885
  if (packageJson.name == null || packageJson.name.length === 0) return void 0;
25875
25886
  return {
25887
+ dir: PATH.resolve(rootDir),
25876
25888
  listed: false,
25877
25889
  location: ".",
25878
25890
  name: packageJson.name,
@@ -30194,16 +30206,16 @@ function buildWorkspaceContext(workspace, options = {}) {
30194
30206
  hasRuntimeRoots: runtimeRoots.length > 0,
30195
30207
  location: workspace.location,
30196
30208
  name: workspace.name,
30197
- tsconfigExtends: getExtendsFromTsconfigs(workspace.location),
30198
- tsconfigPaths: getPathsFromTsconfigs(workspace.location),
30199
- tsconfigTypes: getTypesFromTsconfigs(workspace.location),
30209
+ tsconfigExtends: getExtendsFromTsconfigs(workspace.dir),
30210
+ tsconfigPaths: getPathsFromTsconfigs(workspace.dir),
30211
+ tsconfigTypes: getTypesFromTsconfigs(workspace.dir),
30200
30212
  useSourceFallback: packageClassification.facets.runtimeEntry !== "none"
30201
30213
  });
30202
30214
  recordPhase(phases, "importsMs", importsStarted);
30203
- const packageJsonPath = `${workspace.location}/package.json`;
30215
+ const packageJsonPath = `${workspace.dir}/package.json`;
30204
30216
  const packageParams = getDependenciesFromPackageJson(packageJsonPath);
30205
30217
  const peerForwarding = resolvePeerForwardingPolicy(options.classifier, options.apiExposureConfig, sourceParams);
30206
- const requiredTransitivePeers = getRequiredNonOptionalTransitivePeers(workspace.location, packageParams);
30218
+ const requiredTransitivePeers = getRequiredNonOptionalTransitivePeers(workspace.dir, packageParams);
30207
30219
  const runtimeRootedRequired = new Set([...getRuntimeRootedNonOptionalTransitivePeers(workspace.location, packageParams)].filter((peer) => isPeerForwarded(peerForwarding, peer)));
30208
30220
  return {
30209
30221
  classifierMode: options.classifier ?? "legacy",
@@ -32183,12 +32195,12 @@ function failedSemanticResult(pkg, output, timeMs) {
32183
32195
  }
32184
32196
  async function lintSemanticPackage({ analyze, configOverride, fix, gitignore, gitignorePath, profile, rulePlan, sharedCache, verbose, workspace }) {
32185
32197
  const started = performance$1.now();
32186
- const programResult = createWorkspaceProgramInProcess(workspace.location, sharedCache);
32198
+ const programResult = createWorkspaceProgramInProcess(workspace.dir, sharedCache);
32187
32199
  if (programResult.kind === "skipped") return failedSemanticResult(workspace.name, `Shared typecheck [${workspace.name}] requires ${PATH.join(workspace.location, "tsconfig.json")}\n`, Math.round(performance$1.now() - started));
32188
32200
  if (programResult.kind === "error") return failedSemanticResult(workspace.name, programResult.formatted, Math.round(performance$1.now() - started));
32189
32201
  const lintFiles = programResult.rootNames.filter((fileName) => scriptExtensionPattern.test(fileName));
32190
32202
  if (lintFiles.length === 0) return emptySemanticResult(workspace.name);
32191
- const base = await baseSharedTypecheckConfigs(workspace.location, configOverride, gitignorePath);
32203
+ const base = await baseSharedTypecheckConfigs(workspace.dir, configOverride, gitignorePath);
32192
32204
  const disabledRules = Object.fromEntries([...rulePlan.activeRuleNames].filter((ruleName) => !rulePlan.typeCheckedRuleNames.has(ruleName)).map((ruleName) => [ruleName, "off"]));
32193
32205
  const semanticConfig = {
32194
32206
  files: sharedTypecheckScriptPatterns,
@@ -35276,7 +35288,7 @@ var init_main = __esmMin((() => {
35276
35288
  exec$1 = x;
35277
35289
  }));
35278
35290
  //#endregion
35279
- //#region ../../node_modules/.pnpm/@publint+pack@0.1.6/node_modules/@publint/pack/src/node/utils.js
35291
+ //#region ../../node_modules/.pnpm/@publint+pack@0.1.7/node_modules/@publint/pack/src/node/utils.js
35280
35292
  /**
35281
35293
  * @param {string} packageManager
35282
35294
  * @returns {string[]}
@@ -35299,7 +35311,7 @@ async function getTempPackDir() {
35299
35311
  }
35300
35312
  var init_utils$2 = __esmMin((() => {}));
35301
35313
  //#endregion
35302
- //#region ../../node_modules/.pnpm/@publint+pack@0.1.6/node_modules/@publint/pack/src/node/pack.js
35314
+ //#region ../../node_modules/.pnpm/@publint+pack@0.1.7/node_modules/@publint/pack/src/node/pack.js
35303
35315
  /** @type {import('../index.d.ts').pack} */
35304
35316
  async function pack(dir, opts) {
35305
35317
  const packageManager = opts?.packageManager ?? "npm";
@@ -35337,7 +35349,7 @@ var init_pack = __esmMin((() => {
35337
35349
  init_utils$2();
35338
35350
  }));
35339
35351
  //#endregion
35340
- //#region ../../node_modules/.pnpm/@publint+pack@0.1.6/node_modules/@publint/pack/src/node/pack-as-json.js
35352
+ //#region ../../node_modules/.pnpm/@publint+pack@0.1.7/node_modules/@publint/pack/src/node/pack-as-json.js
35341
35353
  /** @type {import('../index.d.ts').packAsJson} */
35342
35354
  async function packAsJson(dir, opts) {
35343
35355
  const packageManager = opts?.packageManager ?? "npm";
@@ -35396,7 +35408,7 @@ var init_pack_as_json = __esmMin((() => {
35396
35408
  init_utils$2();
35397
35409
  }));
35398
35410
  //#endregion
35399
- //#region ../../node_modules/.pnpm/@publint+pack@0.1.6/node_modules/@publint/pack/src/shared/buffer-stream.js
35411
+ //#region ../../node_modules/.pnpm/@publint+pack@0.1.7/node_modules/@publint/pack/src/shared/buffer-stream.js
35400
35412
  /**
35401
35413
  * @param {ReadableStream<Uint8Array>} readableStream
35402
35414
  * @returns {Promise<ArrayBuffer>}
@@ -35406,7 +35418,7 @@ async function readableStreamToArrayBuffer(readableStream) {
35406
35418
  }
35407
35419
  var init_buffer_stream = __esmMin((() => {}));
35408
35420
  //#endregion
35409
- //#region ../../node_modules/.pnpm/@publint+pack@0.1.6/node_modules/@publint/pack/src/shared/parse-tar.js
35421
+ //#region ../../node_modules/.pnpm/@publint+pack@0.1.7/node_modules/@publint/pack/src/shared/parse-tar.js
35410
35422
  /**
35411
35423
  * @param {ArrayBuffer} buffer
35412
35424
  * @returns {import('../index.d.ts').TarballFile[]}
@@ -35416,11 +35428,11 @@ function parseTar(buffer) {
35416
35428
  /** @type {import('../index.d.ts').TarballFile[]} */
35417
35429
  const files = [];
35418
35430
  let offset = 0;
35419
- while (offset < buffer.byteLength) {
35420
- const type = read(buffer, decoder, offset + 156, 1);
35421
- if (type === "\0") break;
35431
+ while (offset + 512 <= buffer.byteLength) {
35422
35432
  const size = parseInt(read(buffer, decoder, offset + 124, 12), 8);
35423
- if (type === "0") {
35433
+ if (Number.isNaN(size)) break;
35434
+ const type = read(buffer, decoder, offset + 156, 1);
35435
+ if (type === "0" || type === "\0") {
35424
35436
  const name = read(buffer, decoder, offset, 100).split("\0", 1)[0];
35425
35437
  const data = new Uint8Array(buffer, offset + 512, size);
35426
35438
  files.push({
@@ -35450,7 +35462,7 @@ function getFilesRootDir(files) {
35450
35462
  }
35451
35463
  var init_parse_tar = __esmMin((() => {}));
35452
35464
  //#endregion
35453
- //#region ../../node_modules/.pnpm/@publint+pack@0.1.6/node_modules/@publint/pack/src/node/unpack.js
35465
+ //#region ../../node_modules/.pnpm/@publint+pack@0.1.7/node_modules/@publint/pack/src/node/unpack.js
35454
35466
  /** @type {import('../index.d.ts').unpack} */
35455
35467
  async function unpack(tarball) {
35456
35468
  /** @type {ArrayBuffer} */
@@ -35471,7 +35483,7 @@ var init_unpack = __esmMin((() => {
35471
35483
  init_parse_tar();
35472
35484
  }));
35473
35485
  //#endregion
35474
- //#region ../../node_modules/.pnpm/@publint+pack@0.1.6/node_modules/@publint/pack/src/node/pack-as-list.js
35486
+ //#region ../../node_modules/.pnpm/@publint+pack@0.1.7/node_modules/@publint/pack/src/node/pack-as-list.js
35475
35487
  /** @type {import('../index.d.ts').packAsList} */
35476
35488
  async function packAsList(dir, opts) {
35477
35489
  const packageManager = opts?.packageManager ?? "npm";
@@ -35555,7 +35567,7 @@ var init_pack_as_list = __esmMin((() => {
35555
35567
  init_utils$2();
35556
35568
  }));
35557
35569
  //#endregion
35558
- //#region ../../node_modules/.pnpm/@publint+pack@0.1.6/node_modules/@publint/pack/src/node/get-pack-directory.js
35570
+ //#region ../../node_modules/.pnpm/@publint+pack@0.1.7/node_modules/@publint/pack/src/node/get-pack-directory.js
35559
35571
  /** @type {import('../index.d.ts').getPackDirectory} */
35560
35572
  async function getPackDirectory(dir, packageManager) {
35561
35573
  if (packageManager === "pnpm") try {
@@ -35567,7 +35579,7 @@ async function getPackDirectory(dir, packageManager) {
35567
35579
  }
35568
35580
  var init_get_pack_directory = __esmMin((() => {}));
35569
35581
  //#endregion
35570
- //#region ../../node_modules/.pnpm/@publint+pack@0.1.6/node_modules/@publint/pack/src/shared/constants.js
35582
+ //#region ../../node_modules/.pnpm/@publint+pack@0.1.7/node_modules/@publint/pack/src/shared/constants.js
35571
35583
  var supportedPackageManagers;
35572
35584
  var init_constants$2 = __esmMin((() => {
35573
35585
  supportedPackageManagers = [
@@ -35578,7 +35590,7 @@ var init_constants$2 = __esmMin((() => {
35578
35590
  ];
35579
35591
  }));
35580
35592
  //#endregion
35581
- //#region ../../node_modules/.pnpm/@publint+pack@0.1.6/node_modules/@publint/pack/src/index-node.js
35593
+ //#region ../../node_modules/.pnpm/@publint+pack@0.1.7/node_modules/@publint/pack/src/index-node.js
35582
35594
  var init_index_node$1 = __esmMin((() => {
35583
35595
  init_pack();
35584
35596
  init_pack_as_list();
@@ -35588,7 +35600,7 @@ var init_index_node$1 = __esmMin((() => {
35588
35600
  init_constants$2();
35589
35601
  }));
35590
35602
  //#endregion
35591
- //#region ../../node_modules/.pnpm/publint@0.3.23/node_modules/publint/src/node/vfs-node.js
35603
+ //#region ../../node_modules/.pnpm/publint@0.3.24/node_modules/publint/src/node/vfs-node.js
35592
35604
  /**
35593
35605
  * Creates a node-compatible Vfs object
35594
35606
  * @returns {import('../shared/core.js').Vfs}
@@ -35627,7 +35639,7 @@ function createNodeVfs() {
35627
35639
  }
35628
35640
  var init_vfs_node = __esmMin((() => {}));
35629
35641
  //#endregion
35630
- //#region ../../node_modules/.pnpm/publint@0.3.23/node_modules/publint/src/shared/constants.js
35642
+ //#region ../../node_modules/.pnpm/publint@0.3.24/node_modules/publint/src/shared/constants.js
35631
35643
  var lintableFileExtensions, invalidJsxExtensions, knownBrowserishConditions, commonInternalPaths, commonInternalTestFileRegex, licenseFiles;
35632
35644
  var init_constants$1 = __esmMin((() => {
35633
35645
  lintableFileExtensions = [
@@ -35688,7 +35700,7 @@ var init_constants$1 = __esmMin((() => {
35688
35700
  ];
35689
35701
  }));
35690
35702
  //#endregion
35691
- //#region ../../node_modules/.pnpm/publint@0.3.23/node_modules/publint/src/shared/utils.js
35703
+ //#region ../../node_modules/.pnpm/publint@0.3.24/node_modules/publint/src/shared/utils.js
35692
35704
  /**
35693
35705
  * @param {string} code
35694
35706
  */
@@ -36104,7 +36116,7 @@ var init_utils$1 = __esmMin((() => {
36104
36116
  DTS_RE = /\.d\.[mc]?ts$/;
36105
36117
  }));
36106
36118
  //#endregion
36107
- //#region ../../node_modules/.pnpm/publint@0.3.23/node_modules/publint/src/shared/core.js
36119
+ //#region ../../node_modules/.pnpm/publint@0.3.24/node_modules/publint/src/shared/core.js
36108
36120
  /**
36109
36121
  * @typedef Vfs
36110
36122
  * @property {(path: string) => Promise<string>} readFile
@@ -36462,7 +36474,7 @@ async function core({ pkgDir, vfs, level, strict, _packedFiles }) {
36462
36474
  path: ["repository"],
36463
36475
  type: "warning"
36464
36476
  });
36465
- } else if (typeof repository === "object" && repository.url && repository.type === "git") {
36477
+ } else if (typeof repository === "object" && repository.url && (repository.type === "git" || repository.type == null)) {
36466
36478
  if (!isGitUrl(repository.url)) messages.push({
36467
36479
  code: "INVALID_REPOSITORY_VALUE",
36468
36480
  args: { type: "invalid-git-url" },
@@ -36980,7 +36992,7 @@ var init_core = __esmMin((() => {
36980
36992
  init_utils$1();
36981
36993
  }));
36982
36994
  //#endregion
36983
- //#region ../../node_modules/.pnpm/publint@0.3.23/node_modules/publint/src/shared/vfs-tarball.js
36995
+ //#region ../../node_modules/.pnpm/publint@0.3.24/node_modules/publint/src/shared/vfs-tarball.js
36984
36996
  /**
36985
36997
  * @param {import("../index.d.ts").PackFile[]} files
36986
36998
  * @return {import("./core.js").Vfs}
@@ -37204,7 +37216,7 @@ var init_detect = __esmMin((() => {
37204
37216
  init_constants();
37205
37217
  }));
37206
37218
  //#endregion
37207
- //#region ../../node_modules/.pnpm/publint@0.3.23/node_modules/publint/src/index-node.js
37219
+ //#region ../../node_modules/.pnpm/publint@0.3.24/node_modules/publint/src/index-node.js
37208
37220
  var index_node_exports = /* @__PURE__ */ __exportAll({ publint: () => publint$1 });
37209
37221
  /**
37210
37222
  * @typedef {T extends string ? T : never} ExtractStringLiteral
@@ -37356,7 +37368,7 @@ var require_picocolors = /* @__PURE__ */ __commonJSMin(((exports, module) => {
37356
37368
  module.exports.createColors = createColors;
37357
37369
  }));
37358
37370
  //#endregion
37359
- //#region ../../node_modules/.pnpm/publint@0.3.23/node_modules/publint/src/shared/message.js
37371
+ //#region ../../node_modules/.pnpm/publint@0.3.24/node_modules/publint/src/shared/message.js
37360
37372
  /** @type {import('../utils.d.ts').formatMessage} */
37361
37373
  function formatMessage(m, pkg, opts = {}) {
37362
37374
  const h = getHighlighter(opts.color);
@@ -37525,7 +37537,7 @@ var init_message = __esmMin((() => {
37525
37537
  EMPTY_MSG = "<empty>";
37526
37538
  }));
37527
37539
  //#endregion
37528
- //#region ../../node_modules/.pnpm/publint@0.3.23/node_modules/publint/src/utils.js
37540
+ //#region ../../node_modules/.pnpm/publint@0.3.24/node_modules/publint/src/utils.js
37529
37541
  var utils_exports = /* @__PURE__ */ __exportAll({
37530
37542
  formatMessage: () => formatMessage,
37531
37543
  formatMessagePath: () => formatMessagePath,
@@ -38265,7 +38277,7 @@ const publintSingle = async ({ cliExclude, cliInclude, fix, pack, pkg, verbose }
38265
38277
  ruleLevels: resolvedRules,
38266
38278
  shouldFix: fix,
38267
38279
  shouldPack,
38268
- pkgDir: workspace.location,
38280
+ pkgDir: workspace.dir,
38269
38281
  verbose
38270
38282
  });
38271
38283
  logPublintSummary(1, result.errors, result.warnings, performance.now() - start);
@@ -38292,7 +38304,7 @@ async function runWorkspacePublint({ cliExclude, cliInclude, fix, pack, verbose,
38292
38304
  ruleLevels: resolvedRules,
38293
38305
  shouldFix: fix,
38294
38306
  shouldPack,
38295
- pkgDir: ws.location,
38307
+ pkgDir: ws.dir,
38296
38308
  verbose
38297
38309
  });
38298
38310
  captured = {
@@ -38435,7 +38447,8 @@ function selectedWorkspaces(workspaces, names) {
38435
38447
  return workspaces.filter((workspace) => selected.has(workspace.name));
38436
38448
  }
38437
38449
  function listedWorkspaces(workspaces) {
38438
- return workspaces.filter((workspace) => workspace.listed !== false).map(({ location, name }) => ({
38450
+ return workspaces.filter((workspace) => workspace.listed !== false).map(({ dir, location, name }) => ({
38451
+ dir,
38439
38452
  location,
38440
38453
  name
38441
38454
  }));
@@ -38579,6 +38592,7 @@ function readPackageJson$2(packagePath) {
38579
38592
  function rootWorkspace(rootDir) {
38580
38593
  const name = readPackageJson$2(rootDir)?.name ?? packageName();
38581
38594
  return name != null && name.length > 0 ? {
38595
+ dir: PATH.resolve(rootDir),
38582
38596
  location: ".",
38583
38597
  name
38584
38598
  } : void 0;
@@ -41000,7 +41014,7 @@ const dead = async (options = {}) => {
41000
41014
  //#endregion
41001
41015
  //#region src/actions/deploy.ts
41002
41016
  const privatePackageExcludeList = () => {
41003
- return getPackageManager().listWorkspaces().map((workspace) => [workspace, JSON.parse(readFileSync(`${workspace.location}/package.json`, { encoding: "utf8" }))]).filter(([_, pkg]) => pkg.private ?? false).map(([workspace]) => workspace).map((workspace) => `--exclude ${workspace.name}`);
41017
+ return getPackageManager().listWorkspaces().map((workspace) => [workspace, JSON.parse(readFileSync(`${workspace.dir}/package.json`, { encoding: "utf8" }))]).filter(([_, pkg]) => pkg.private ?? false).map(([workspace]) => workspace).map((workspace) => `--exclude ${workspace.name}`);
41004
41018
  };
41005
41019
  function deploy(level = "patch") {
41006
41020
  const excludeList = privatePackageExcludeList();
@@ -41431,6 +41445,81 @@ function gitignore() {
41431
41445
  }
41432
41446
  }
41433
41447
  //#endregion
41448
+ //#region src/actions/gitlintIgnore.ts
41449
+ /** The canonical entry that denies the toolchain cache at every depth. */
41450
+ const TOOLCHAIN_CACHE_IGNORE_ENTRY = "**/.xy/cache/";
41451
+ const TOOLCHAIN_CACHE_IGNORE_COMMENT = "# XY toolchain cache (never .xy/work, which is tracked)";
41452
+ /**
41453
+ * Entries that deny `.xy/cache` in every package rather than only at the root.
41454
+ *
41455
+ * `.xy/cache` is deliberately absent. A Git ignore pattern containing an
41456
+ * interior slash is anchored to the directory of the ignore file, so that entry
41457
+ * denies the root cache and misses every per-package one — which is the exact
41458
+ * gap this rule exists to close. `.xy` on its own has no interior slash, so it
41459
+ * matches at any depth and does cover the cache, at the cost of also hiding the
41460
+ * tracked `.xy/work` store.
41461
+ */
41462
+ const NestedCacheCoveringEntries = /* @__PURE__ */ new Set([
41463
+ ".xy",
41464
+ "**/.xy",
41465
+ "**/.xy/cache"
41466
+ ]);
41467
+ /** Root-anchored entries this rule replaces rather than duplicates. */
41468
+ const SupersededCacheEntries = /* @__PURE__ */ new Set([".xy/cache", "/.xy/cache"]);
41469
+ function significantEntry(line) {
41470
+ const trimmed = line.trim();
41471
+ if (trimmed.length === 0 || trimmed.startsWith("#")) return void 0;
41472
+ return trimmed.endsWith("/") ? trimmed.slice(0, -1) : trimmed;
41473
+ }
41474
+ /**
41475
+ * Whether the ignore file denies the toolchain cache in every package.
41476
+ *
41477
+ * The toolchain writes `<packageRoot>/.xy/cache` for each package it compiles,
41478
+ * so a root-only rule leaves every package's cache committable.
41479
+ */
41480
+ function coversNestedToolchainCache(content) {
41481
+ return content.split("\n").some((line) => {
41482
+ const entry = significantEntry(line);
41483
+ return entry !== void 0 && NestedCacheCoveringEntries.has(entry);
41484
+ });
41485
+ }
41486
+ /**
41487
+ * Add the canonical entry, replacing a superseded root-anchored one in place
41488
+ * so the file gains coverage without gaining a redundant line.
41489
+ */
41490
+ function applyToolchainCacheEntry(content) {
41491
+ if (coversNestedToolchainCache(content)) return content;
41492
+ const lines = content.split("\n");
41493
+ const supersededIndex = lines.findIndex((line) => {
41494
+ const entry = significantEntry(line);
41495
+ return entry !== void 0 && SupersededCacheEntries.has(entry);
41496
+ });
41497
+ if (supersededIndex !== -1) {
41498
+ lines[supersededIndex] = TOOLCHAIN_CACHE_IGNORE_ENTRY;
41499
+ return lines.join("\n");
41500
+ }
41501
+ const body = content.length === 0 || content.endsWith("\n") ? content : `${content}\n`;
41502
+ return `${body}${body.length === 0 || body.endsWith("\n\n") ? "" : "\n"}${TOOLCHAIN_CACHE_IGNORE_COMMENT}\n${TOOLCHAIN_CACHE_IGNORE_ENTRY}\n`;
41503
+ }
41504
+ function ignorePath(rootDir) {
41505
+ return PATH.join(rootDir, ".gitignore");
41506
+ }
41507
+ function readIgnoreFile(rootDir) {
41508
+ const path = ignorePath(rootDir);
41509
+ return existsSync(path) ? readFileSync(path, "utf8") : "";
41510
+ }
41511
+ function hasNestedToolchainCacheEntry(rootDir) {
41512
+ return coversNestedToolchainCache(readIgnoreFile(rootDir));
41513
+ }
41514
+ /** Returns true when the file was changed. */
41515
+ function writeToolchainCacheEntry(rootDir) {
41516
+ const content = readIgnoreFile(rootDir);
41517
+ const updated = applyToolchainCacheEntry(content);
41518
+ if (updated === content) return false;
41519
+ writeFileSync(ignorePath(rootDir), updated, "utf8");
41520
+ return true;
41521
+ }
41522
+ //#endregion
41434
41523
  //#region src/actions/ruleRunner.ts
41435
41524
  const RULE_LEVELS = /* @__PURE__ */ new Set([
41436
41525
  "error",
@@ -41606,6 +41695,20 @@ const GITLINT_RULES = [
41606
41695
  description: "core.eol must be lf",
41607
41696
  fixable: true,
41608
41697
  id: "git.eol"
41698
+ },
41699
+ {
41700
+ check: (_context, { fix }) => {
41701
+ if (hasNestedToolchainCacheEntry(INIT_CWD())) return {};
41702
+ if (fix) {
41703
+ writeToolchainCacheEntry(INIT_CWD());
41704
+ return { fixedCount: 1 };
41705
+ }
41706
+ return { diagnostics: [{ message: `.gitignore does not deny the toolchain cache in every package; add "${TOOLCHAIN_CACHE_IGNORE_ENTRY}" [run xy git lint --fix]` }] };
41707
+ },
41708
+ defaultLevel: "warn",
41709
+ description: "The .xy/cache toolchain cache is ignored in every package, not only at the repository root",
41710
+ fixable: true,
41711
+ id: "git.ignore-toolchain-cache"
41609
41712
  }
41610
41713
  ];
41611
41714
  function logGitlintDiagnostic(diagnostic) {
@@ -42928,7 +43031,7 @@ function collectUsedReleaseAgeScopePrefixes(cwd, workspaces) {
42928
43031
  for (const workspace of workspaces) {
42929
43032
  addKnownScopesUsedByPackageName(used, workspace.name);
42930
43033
  if (workspace.location === ".") continue;
42931
- scanPackageJson(workspace.location);
43034
+ scanPackageJson(workspace.dir);
42932
43035
  }
42933
43036
  return used;
42934
43037
  }
@@ -45533,7 +45636,7 @@ async function loadCommandConfig$1(commandName, pkg) {
45533
45636
  if (pkg !== void 0 && pkg.length > 0) {
45534
45637
  const workspace = getPackageManager().findWorkspace(pkg);
45535
45638
  if (workspace === void 0) throw new Error(`Workspace not found: ${pkg}`);
45536
- return loadWorkspaceCommandConfig(workspace.location, commandName);
45639
+ return loadWorkspaceCommandConfig(workspace.dir, commandName);
45537
45640
  }
45538
45641
  return loadWorkspaceCommandConfig(process.cwd(), commandName);
45539
45642
  }
@@ -53369,7 +53472,7 @@ async function loadCommandConfig(commandName, pkg) {
53369
53472
  if (pkg !== void 0 && pkg.length > 0) {
53370
53473
  const workspace = getPackageManager().findWorkspace(pkg);
53371
53474
  if (workspace === void 0) throw new Error(`Workspace not found: ${pkg}`);
53372
- return loadWorkspaceCommandConfig(workspace.location, commandName);
53475
+ return loadWorkspaceCommandConfig(workspace.dir, commandName);
53373
53476
  }
53374
53477
  return loadWorkspaceCommandConfig(process.cwd(), commandName);
53375
53478
  }