@icebreakers/monorepo 6.5.4 → 6.6.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 (27) hide show
  1. package/dist/{baseline-CQVDciG4.mjs → baseline-BS_u59AV.mjs} +1 -1
  2. package/dist/{catalog-6_tT0U3p.mjs → catalog-CiaAmiTm.mjs} +4 -4
  3. package/dist/cli.mjs +62 -62
  4. package/dist/{commands-CAyU1yqP.mjs → commands-B1PJUmy-.mjs} +192 -91
  5. package/dist/{config-CT_nsp4o.mjs → config-CmB-5xZ5.mjs} +3 -3
  6. package/dist/{create-flow-BV2NTOIE.mjs → create-flow-DylDl_6a.mjs} +3 -3
  7. package/dist/{deps-CIrWBABk.mjs → deps-DWFcbBQu.mjs} +4 -4
  8. package/dist/{execute-e7SGX_Y0.mjs → execute-Bd-yrRBO.mjs} +2 -2
  9. package/dist/{execute-Y_6G_tEl.mjs → execute-CowTATMR.mjs} +2 -2
  10. package/dist/{format-jsSjadNe.mjs → format-C2UJ-Xzb.mjs} +1 -1
  11. package/dist/{index-C7KR7hT8.d.mts → index-CFxo1hPA.d.mts} +4 -1
  12. package/dist/index.d.mts +2 -2
  13. package/dist/index.mjs +9 -9
  14. package/dist/{inputs-DOUYGoHq.mjs → inputs-Pn_oLgyr.mjs} +1 -1
  15. package/dist/{npm-tUIGIuFQ.mjs → npm-D3cb3ygy.mjs} +1 -1
  16. package/dist/{plan-DC33-_or.mjs → plan-C4S0SIsH.mjs} +2 -2
  17. package/dist/{run-DT6Q-jbq.mjs → run-5k6GII0n.mjs} +4 -4
  18. package/dist/{save-Foea-Ao9.mjs → save-LOJWHI5C.mjs} +3 -3
  19. package/dist/{scan-DA7VmNjC.mjs → scan-C6ZqUxK0.mjs} +9 -2
  20. package/dist/{template-drift-B18bgxT6.mjs → template-drift-D3Hwedod.mjs} +3 -3
  21. package/dist/tooling-entry.d.mts +1 -1
  22. package/dist/tooling-entry.mjs +2 -2
  23. package/dist/{transaction-B4vPaBcK.mjs → transaction-Cpnd5xhK.mjs} +2 -2
  24. package/dist/{tsconfig-DpOi_7HA.mjs → tsconfig-BSF6chfb.mjs} +49 -32
  25. package/dist/{vitest-Dh5Qm_3L.mjs → vitest-CgpUDzkr.mjs} +1 -1
  26. package/dist/{workspace-tasks-Ca1zWNKr.mjs → workspace-tasks-DucdLmBS.mjs} +51 -51
  27. package/package.json +6 -6
@@ -1,4 +1,4 @@
1
- import { I as ConfigValidationError, P as version, f as loadMonorepoConfigDetails, rt as __exportAll, u as getRepoctlConfigCandidates } from "./tsconfig-DpOi_7HA.mjs";
1
+ import { I as ConfigValidationError, P as version, f as loadMonorepoConfigDetails, it as __exportAll, u as getRepoctlConfigCandidates } from "./tsconfig-BSF6chfb.mjs";
2
2
  import { createRequire } from "node:module";
3
3
  import gitUrlParse from "git-url-parse";
4
4
  import { simpleGit } from "simple-git";
@@ -7,7 +7,7 @@ import { readWorkspaceManifest } from "@pnpm/workspace.read-manifest";
7
7
  import path from "pathe";
8
8
  import { findPackages } from "@pnpm/fs.find-packages";
9
9
  import process from "node:process";
10
- import fs, { access, chmod, copyFile, cp, lstat, mkdir, mkdtemp, open, readFile, readdir, realpath, rename, rm, rmdir, stat, unlink, utimes, writeFile } from "node:fs/promises";
10
+ import fs$1, { access, chmod, copyFile, cp, lstat, mkdir, mkdtemp, open, readFile, readdir, realpath, rename, rm, rmdir, stat, unlink, utimes, writeFile } from "node:fs/promises";
11
11
  import { spawnSync } from "node:child_process";
12
12
  import { constants, realpathSync } from "node:fs";
13
13
  import semver from "semver";
@@ -320,7 +320,7 @@ function isIgnorableFsError(error) {
320
320
  const code = error.code;
321
321
  return code === "ENOENT" || code === "EBUSY" || code === "EEXIST";
322
322
  }
323
- const fs$2 = {
323
+ const fs = {
324
324
  copy,
325
325
  ensureDir,
326
326
  ensureFile,
@@ -942,7 +942,7 @@ async function rewriteTemplateRootReferences(targetDir, workspaceDir) {
942
942
  return;
943
943
  }
944
944
  if (!entry.isFile() || !rootReferenceExtensions.has(path.extname(entry.name))) return;
945
- const originalContent = await fs$2.readFile(entryPath, "utf8");
945
+ const originalContent = await fs.readFile(entryPath, "utf8");
946
946
  let nextContent = migrateLegacyToolingReferences(originalContent, "repoctl/tooling");
947
947
  for (const replacement of rootReferenceReplacements) {
948
948
  if (!nextContent.includes(replacement.from)) continue;
@@ -950,7 +950,7 @@ async function rewriteTemplateRootReferences(targetDir, workspaceDir) {
950
950
  const rewrittenSpecifier = normalizeRelativeSpecifier(path.dirname(entryPath), targetPath);
951
951
  nextContent = nextContent.replaceAll(replacement.from, rewrittenSpecifier);
952
952
  }
953
- if (nextContent !== originalContent) await fs$2.writeFile(entryPath, nextContent, "utf8");
953
+ if (nextContent !== originalContent) await fs.writeFile(entryPath, nextContent, "utf8");
954
954
  }));
955
955
  }
956
956
  /** Rewrite engineering references before inserting user data, which must retain its exact bytes. */
@@ -978,10 +978,10 @@ function rewriteTemplateSnapshotReferences(snapshot, targetDir, workspaceDir) {
978
978
  }
979
979
  async function renderCreateNewProject(plan, gitMetadata = true) {
980
980
  if (plan.snapshot) {
981
- for (const directory of plan.snapshot.directories) await fs$2.ensureDir(path.join(plan.targetDir, directory));
981
+ for (const directory of plan.snapshot.directories) await fs.ensureDir(path.join(plan.targetDir, directory));
982
982
  for (const file of plan.snapshot.files.filter((file) => file.path !== "package.json")) {
983
983
  const target = path.join(plan.targetDir, file.path.replace(/(^|\/)gitignore$/u, "$1.gitignore"));
984
- await fs$2.outputFile(target, Buffer.from(file.content, "base64"));
984
+ await fs.outputFile(target, Buffer.from(file.content, "base64"));
985
985
  await chmod(target, file.executable ? 493 : 420);
986
986
  }
987
987
  } else await scaffoldTemplate({
@@ -992,12 +992,12 @@ async function renderCreateNewProject(plan, gitMetadata = true) {
992
992
  if (!plan.snapshot) await rewriteTemplateRootReferences(plan.targetDir, plan.cwd);
993
993
  if (plan.hasPackageJson) {
994
994
  const parameterPackage = plan.snapshot?.files.find((file) => file.path === "package.json");
995
- const sourceJson = parameterPackage ? JSON.parse(Buffer.from(parameterPackage.content, "base64").toString("utf8")) : await fs$2.readJson(path.resolve(plan.sourceDir, "package.json"));
995
+ const sourceJson = parameterPackage ? JSON.parse(Buffer.from(parameterPackage.content, "base64").toString("utf8")) : await fs.readJson(path.resolve(plan.sourceDir, "package.json"));
996
996
  sanitizeTemplatePackageJson(sourceJson);
997
997
  setByPath(sourceJson, "version", "0.0.0");
998
998
  setByPath(sourceJson, "name", plan.packageName);
999
999
  if (gitMetadata) await applyGitMetadata(sourceJson, plan.metadataCwd ?? plan.cwd, plan.metadataTarget ?? plan.targetDir);
1000
- await fs$2.outputJson(path.resolve(plan.targetDir, plan.packageJsonFileName), sourceJson, { spaces: 2 });
1000
+ await fs.outputJson(path.resolve(plan.targetDir, plan.packageJsonFileName), sourceJson, { spaces: 2 });
1001
1001
  }
1002
1002
  }
1003
1003
  // src/commands/deps/files.ts
@@ -1528,7 +1528,7 @@ function criticalPath(summary) {
1528
1528
  reason: "complete",
1529
1529
  taskIds: chain.reverse(),
1530
1530
  durationMs: distance.get(longest.id),
1531
- observedSpanMs: tasks.reduce((latest, task) => Math.max(latest, task.end), 0) - tasks.reduce((earliest, task) => Math.min(earliest, task.start), Infinity)
1531
+ observedSpanMs: tasks.reduce((latest, task) => Math.max(latest, task.end), 0) - tasks.reduce((earliest, task) => Math.min(earliest, task.start), 1e400)
1532
1532
  };
1533
1533
  }
1534
1534
  // src/commands/check/cache/evidence.ts
@@ -1920,16 +1920,16 @@ var knip_exports = /* @__PURE__ */ __exportAll({
1920
1920
  saveKnipBaseline: () => saveKnipBaseline
1921
1921
  });
1922
1922
  async function planKnipCheck(cwd, options = {}) {
1923
- return (await import("./plan-DC33-_or.mjs")).planKnipCheck(cwd, options);
1923
+ return (await import("./plan-C4S0SIsH.mjs")).planKnipCheck(cwd, options);
1924
1924
  }
1925
1925
  async function runKnipCheck(cwd, options = {}) {
1926
- return (await import("./run-DT6Q-jbq.mjs")).runKnipCheck(cwd, options);
1926
+ return (await import("./run-5k6GII0n.mjs")).runKnipCheck(cwd, options);
1927
1927
  }
1928
1928
  async function getKnipConfigurationSuggestions(cwd) {
1929
- return (await import("./config-CT_nsp4o.mjs")).getKnipConfigurationSuggestions(cwd);
1929
+ return (await import("./config-CmB-5xZ5.mjs")).getKnipConfigurationSuggestions(cwd);
1930
1930
  }
1931
1931
  async function saveKnipBaseline(cwd, report, file) {
1932
- return (await import("./save-Foea-Ao9.mjs")).saveKnipBaseline(cwd, report, file);
1932
+ return (await import("./save-LOJWHI5C.mjs")).saveKnipBaseline(cwd, report, file);
1933
1933
  }
1934
1934
  // src/commands/env-cache/config.ts
1935
1935
  const arrays = [
@@ -2678,7 +2678,7 @@ async function generatorFile(root, relative) {
2678
2678
  }
2679
2679
  // src/commands/project-references/files.ts
2680
2680
  const ownershipFile = ".repoctl/typescript-references.json";
2681
- const compare$1 = (a, b) => a < b ? -1 : a > b ? 1 : 0;
2681
+ const compare = (a, b) => a < b ? -1 : a > b ? 1 : 0;
2682
2682
  function relativeFile(value, glob = false) {
2683
2683
  if (typeof value !== "string" || !value || value.includes("\\") || value.includes("\0") || path.isAbsolute(value) || /^[a-z]:/i.test(value) || value.split("/").some((part) => !part || part === "." || part === "..") || !glob && /[*?[\]{}!]/.test(value)) throw new Error(`Expected a canonical workspace-relative ${glob ? "pattern" : "file"}: ${String(value)}`);
2684
2684
  return value;
@@ -3198,13 +3198,13 @@ async function renderHistoricalTemplate(options) {
3198
3198
  return;
3199
3199
  }
3200
3200
  const sourceDir = await safeInstancePath(sourcePackageDir, `templates/${definition.source}`);
3201
- if (!await fs$2.pathExists(sourceDir)) return;
3201
+ if (!await fs.pathExists(sourceDir)) return;
3202
3202
  const original = await prepareTemplateInstanceSource(sourceDir, sourcePackageDir);
3203
3203
  let retainedParameters;
3204
3204
  const isolated = await mkdtemp(path.join(tmpdir(), "repoctl-template-baseline-"));
3205
3205
  try {
3206
3206
  const targetDir = path.join(isolated, options.target);
3207
- await fs$2.ensureDir(targetDir);
3207
+ await fs.ensureDir(targetDir);
3208
3208
  if (options.profile === "workspace-copy-v1") await scaffoldTemplate({
3209
3209
  sourceDir,
3210
3210
  targetDir
@@ -3248,7 +3248,7 @@ async function renderHistoricalTemplate(options) {
3248
3248
  cwd: isolated,
3249
3249
  sourceDir,
3250
3250
  targetDir,
3251
- hasPackageJson: await fs$2.pathExists(path.join(sourceDir, "package.json")),
3251
+ hasPackageJson: await fs.pathExists(path.join(sourceDir, "package.json")),
3252
3252
  packageName: options.parameters?.packageName ?? path.basename(options.target),
3253
3253
  packageJsonFileName: renameJson ? "package.mock.json" : "package.json",
3254
3254
  ...snapshot ? { snapshot } : {}
@@ -3303,14 +3303,14 @@ function normalizeOptions(input) {
3303
3303
  async function prepareLink(input) {
3304
3304
  const options = normalizeOptions(input);
3305
3305
  const safeTarget = await safeInstancePath(options.cwd, options.target);
3306
- options.target = instanceRelativePath(await fs.realpath(options.cwd), await fs.realpath(safeTarget));
3307
- const registry = await loadTemplateInstanceRegistry(options.cwd);
3306
+ options.target = instanceRelativePath(await fs$1.realpath(options.cwd), await fs$1.realpath(safeTarget));
3307
+ const registry = await loadTemplateInstanceRegistry$1(options.cwd);
3308
3308
  const target = await captureTemplateSnapshot(await safeInstancePath(options.cwd, options.target));
3309
3309
  const existing = registry.instances.find((item) => item.target === options.target);
3310
3310
  let draft;
3311
3311
  if (!options.sourceDir && existing?.template === options.template && existing.source.version === options.version && existing.generator.profile === options.profile && JSON.stringify(existing.parameters) === JSON.stringify(options.parameters) && existing.baseline.status === "available") {
3312
- const original = await loadTemplateBaseline(options.cwd, existing.baseline.original);
3313
- const rendered = await loadTemplateBaseline(options.cwd, existing.baseline.rendered);
3312
+ const original = await loadTemplateBaseline$1(options.cwd, existing.baseline.original);
3313
+ const rendered = await loadTemplateBaseline$1(options.cwd, existing.baseline.rendered);
3314
3314
  draft = {
3315
3315
  instance: existing,
3316
3316
  snapshots: {
@@ -3417,7 +3417,7 @@ async function applyTemplateLinkPlan(plan) {
3417
3417
  // src/commands/template-instances/upgrade/current.ts
3418
3418
  /** Inspect only template-owned candidates; unrelated and explicitly unmanaged business data is not a template snapshot. */
3419
3419
  async function captureUpgradeTarget(root, paths, excluded = []) {
3420
- if (!(await fs.stat(root)).isDirectory()) throw new Error("A template upgrade target must be an existing directory.");
3420
+ if (!(await fs$1.stat(root)).isDirectory()) throw new Error("A template upgrade target must be an existing directory.");
3421
3421
  const snapshot = {
3422
3422
  schemaVersion: 1,
3423
3423
  files: [],
@@ -3436,14 +3436,14 @@ async function captureUpgradeTarget(root, paths, excluded = []) {
3436
3436
  if (excluded.some((prefix) => relative === prefix || relative.startsWith(`${prefix}/`))) continue;
3437
3437
  try {
3438
3438
  const filename = await safeInstancePath(root, relative);
3439
- const stat = await fs.lstat(filename);
3439
+ const stat = await fs$1.lstat(filename);
3440
3440
  if (stat.isDirectory()) snapshot.directories.push(relative);
3441
3441
  else if (stat.isFile()) {
3442
3442
  bytes += stat.size;
3443
3443
  if (bytes > 33554432) throw new Error("Template-managed upgrade candidates exceed the supported snapshot size. Exclude business-owned paths explicitly.");
3444
3444
  snapshot.files.push({
3445
3445
  path: relative,
3446
- content: (await fs.readFile(filename)).toString("base64"),
3446
+ content: (await fs$1.readFile(filename)).toString("base64"),
3447
3447
  executable: (stat.mode & 73) !== 0
3448
3448
  });
3449
3449
  } else throw new Error(`Unsupported template upgrade file: ${relative}`);
@@ -3568,12 +3568,12 @@ async function renderTemplateUpgradeSource(options, instance, previous) {
3568
3568
  async function readUpgradeFileState(root, relative) {
3569
3569
  const filename = await safeInstancePath(root, relative);
3570
3570
  try {
3571
- const stat = await fs.lstat(filename);
3571
+ const stat = await fs$1.lstat(filename);
3572
3572
  if (!stat.isFile() && !stat.isDirectory()) throw new Error(`Unsupported template upgrade path: ${relative}`);
3573
3573
  return {
3574
3574
  entry: stat.isDirectory() ? { kind: "directory" } : {
3575
3575
  kind: "file",
3576
- content: (await fs.readFile(filename)).toString("base64"),
3576
+ content: (await fs$1.readFile(filename)).toString("base64"),
3577
3577
  executable: (stat.mode & 73) !== 0
3578
3578
  },
3579
3579
  mode: stat.mode & 511,
@@ -3627,7 +3627,7 @@ async function loadTemplateUpgradeJournal(cwd, instanceId) {
3627
3627
  const filename = await safeInstancePath(cwd, templateUpgradeJournalPath(instanceId));
3628
3628
  let content;
3629
3629
  try {
3630
- content = await fs.readFile(filename, "utf8");
3630
+ content = await fs$1.readFile(filename, "utf8");
3631
3631
  } catch (error) {
3632
3632
  if (error.code === "ENOENT") return;
3633
3633
  throw error;
@@ -3680,11 +3680,11 @@ async function createTemplateUpgradeJournal(plan, before) {
3680
3680
  digest: upgradeDigest(body)
3681
3681
  };
3682
3682
  const filename = await safeInstancePath(plan.options.cwd, templateUpgradeJournalPath(before.id));
3683
- await fs.mkdir(path.dirname(filename), { recursive: true });
3683
+ await fs$1.mkdir(path.dirname(filename), { recursive: true });
3684
3684
  const temporary = `${filename}.${journal.token}.tmp`;
3685
3685
  let owned = false;
3686
3686
  try {
3687
- const handle = await fs.open(temporary, "wx", 384);
3687
+ const handle = await fs$1.open(temporary, "wx", 384);
3688
3688
  owned = true;
3689
3689
  try {
3690
3690
  await handle.writeFile(`${JSON.stringify(journal)}\n`);
@@ -3692,9 +3692,9 @@ async function createTemplateUpgradeJournal(plan, before) {
3692
3692
  } finally {
3693
3693
  await handle.close();
3694
3694
  }
3695
- await fs.link(temporary, filename);
3695
+ await fs$1.link(temporary, filename);
3696
3696
  } finally {
3697
- if (owned) await fs.rm(temporary, { force: true });
3697
+ if (owned) await fs$1.rm(temporary, { force: true });
3698
3698
  }
3699
3699
  return journal;
3700
3700
  }
@@ -3702,7 +3702,7 @@ async function removeTemplateUpgradeJournal(cwd, journal) {
3702
3702
  const current = await loadTemplateUpgradeJournal(cwd, journal.instanceId);
3703
3703
  if (!current) return;
3704
3704
  if (current.token !== journal.token || current.digest !== journal.digest) throw new Error("The template recovery record was replaced; preserve it for its owning operation.");
3705
- await fs.unlink(await safeInstancePath(cwd, templateUpgradeJournalPath(journal.instanceId)));
3705
+ await fs$1.unlink(await safeInstancePath(cwd, templateUpgradeJournalPath(journal.instanceId)));
3706
3706
  }
3707
3707
  // src/commands/template-instances/upgrade/plan.ts
3708
3708
  function nextInstance(previous, draft, excludedPaths) {
@@ -3723,15 +3723,15 @@ function nextInstance(previous, draft, excludedPaths) {
3723
3723
  }
3724
3724
  async function prepareTemplateUpgrade(input) {
3725
3725
  if (!isExactTemplateVersion(input.version)) throw new Error("Template upgrades require an exact target package version; floating tags and ranges are not supported.");
3726
- const cwd = await fs.realpath(path.resolve(input.cwd));
3727
- const registry = await loadTemplateInstanceRegistry(cwd);
3726
+ const cwd = await fs$1.realpath(path.resolve(input.cwd));
3727
+ const registry = await loadTemplateInstanceRegistry$1(cwd);
3728
3728
  const instance = registry.instances.find((item) => item.id === input.instance) ?? registry.instances.find((item) => item.target === instanceRelativePath(cwd, path.resolve(cwd, input.instance)));
3729
3729
  if (!instance) throw new Error(`Unknown template instance: ${input.instance}`);
3730
3730
  if (instance.source.kind === "remote") throw new Error("This upgrade command accepts built-in template package versions. Remote source identity and retained baselines are preserved; remote npm/Git upgrades are not supported yet.");
3731
3731
  if (await loadTemplateUpgradeJournal(cwd, instance.id)) throw new Error(`This instance has a pending template upgrade. Inspect templates recover-upgrade ${instance.id} before starting another upgrade.`);
3732
3732
  if (instance.baseline.status !== "available") throw new Error("This instance has no reliable historical baseline. Verify its historical source before upgrading.");
3733
- const original = await loadTemplateBaseline(cwd, instance.baseline.original);
3734
- const baseline = await loadTemplateBaseline(cwd, instance.baseline.rendered);
3733
+ const original = await loadTemplateBaseline$1(cwd, instance.baseline.original);
3734
+ const baseline = await loadTemplateBaseline$1(cwd, instance.baseline.rendered);
3735
3735
  const excludedPaths = normalizeTemplateExclusions([...instance.excludedPaths ?? [], ...input.exclude ?? []]);
3736
3736
  const options = {
3737
3737
  cwd,
@@ -3803,33 +3803,33 @@ async function removeTemporary(root, operation, token) {
3803
3803
  const current = await readUpgradeFileState(root, relative);
3804
3804
  if (!current) return;
3805
3805
  if (!stateMatches(current, operation.after)) throw new Error(`Unexpected contents in template transaction temporary file: ${relative}`);
3806
- await fs.unlink(await safeInstancePath(root, relative));
3806
+ await fs$1.unlink(await safeInstancePath(root, relative));
3807
3807
  }
3808
3808
  async function applyUpgradeOperation(root, operation, token) {
3809
3809
  const target = await safeInstancePath(root, operation.path);
3810
3810
  if (!stateMatches(await readUpgradeFileState(root, operation.path), operation.before)) throw new Error(`Concurrent template instance change: ${operation.path}`);
3811
3811
  if (operation.after?.entry.kind === "directory") {
3812
3812
  if (operation.before) throw new Error(`Directory replacement is not automatic: ${operation.path}`);
3813
- await fs.mkdir(target, { mode: operation.after.mode });
3813
+ await fs$1.mkdir(target, { mode: operation.after.mode });
3814
3814
  return;
3815
3815
  }
3816
3816
  if (!operation.after) {
3817
- if (operation.before?.entry.kind === "directory") await fs.rmdir(target);
3818
- else await fs.unlink(target);
3817
+ if (operation.before?.entry.kind === "directory") await fs$1.rmdir(target);
3818
+ else await fs$1.unlink(target);
3819
3819
  return;
3820
3820
  }
3821
3821
  const temporary = await safeInstancePath(root, temporaryPath(operation, token));
3822
- await fs.writeFile(temporary, Buffer.from(operation.after.entry.content, "base64"), {
3822
+ await fs$1.writeFile(temporary, Buffer.from(operation.after.entry.content, "base64"), {
3823
3823
  flag: "wx",
3824
3824
  mode: operation.after.mode
3825
3825
  });
3826
- await fs.chmod(temporary, operation.after.mode);
3826
+ await fs$1.chmod(temporary, operation.after.mode);
3827
3827
  if (!stateMatches(await readUpgradeFileState(root, operation.path), operation.before)) throw new Error(`Concurrent template instance change: ${operation.path}`);
3828
3828
  if (operation.before === null) {
3829
- await fs.link(temporary, target);
3830
- await fs.unlink(temporary);
3831
- } else await fs.rename(temporary, target);
3832
- await fs.utimes(target, operation.after.atimeMs / 1e3, operation.after.mtimeMs / 1e3);
3829
+ await fs$1.link(temporary, target);
3830
+ await fs$1.unlink(temporary);
3831
+ } else await fs$1.rename(temporary, target);
3832
+ await fs$1.utimes(target, operation.after.atimeMs / 1e3, operation.after.mtimeMs / 1e3);
3833
3833
  }
3834
3834
  async function restoreUpgradeOperations(root, operations, token) {
3835
3835
  const failures = [];
@@ -3871,7 +3871,7 @@ async function applyTemplateUpgradePlan(plan) {
3871
3871
  let journal;
3872
3872
  await replaceTemplateInstance(cwd, current.previous, current.draft, {
3873
3873
  apply: async () => {
3874
- if (upgradeDigest(await loadTemplateInstanceRegistry(cwd)) !== current.plan.registryDigest || snapshotDigest(await captureUpgradeTarget(root, current.plan.changes.map((item) => item.path), current.plan.options.exclude)) !== current.plan.targetDigest) throw new Error("Template upgrade plan became stale before the registry lock was acquired; preview again.");
3874
+ if (upgradeDigest(await loadTemplateInstanceRegistry$1(cwd)) !== current.plan.registryDigest || snapshotDigest(await captureUpgradeTarget(root, current.plan.changes.map((item) => item.path), current.plan.options.exclude)) !== current.plan.targetDigest) throw new Error("Template upgrade plan became stale before the registry lock was acquired; preview again.");
3875
3875
  journal = await createTemplateUpgradeJournal(current.plan, current.previous);
3876
3876
  for (const operation of journal.operations) await applyUpgradeOperation(root, operation, journal.token);
3877
3877
  },
@@ -3905,8 +3905,8 @@ async function applyTemplateUpgradePlan(plan) {
3905
3905
  // src/commands/template-instances/upgrade/recover.ts
3906
3906
  /** Inspect or restore one interrupted operation, retaining every concurrent business edit. */
3907
3907
  async function recoverTemplateUpgrade(cwd, selector, apply = false) {
3908
- cwd = await fs.realpath(path.resolve(cwd));
3909
- const registry = await loadTemplateInstanceRegistry(cwd);
3908
+ cwd = await fs$1.realpath(path.resolve(cwd));
3909
+ const registry = await loadTemplateInstanceRegistry$1(cwd);
3910
3910
  const instance = registry.instances.find((item) => item.id === selector) ?? registry.instances.find((item) => item.target === instanceRelativePath(cwd, path.resolve(cwd, selector)));
3911
3911
  if (!instance) throw new Error(`Unknown template instance: ${selector}`);
3912
3912
  const journal = await loadTemplateUpgradeJournal(cwd, instance.id);
@@ -4340,4 +4340,4 @@ async function locateWorkspace(cwd, query) {
4340
4340
  candidates
4341
4341
  };
4342
4342
  }
4343
- export { WorkspaceGraphQueryError as $, referenceTarget as A, outputJson as At, saveKnipBaseline as B, getWorkspacePackages as Bt, loadCompiler as C, ensureDir as Ct, ownershipFile as D, isIgnorableFsError as Dt, exists as E, fs$2 as Et, env_cache_exports as F, writeJSON as Ft, cache_exports as G, signalExitCode as H, findWorkspacePackages as Ht, getKnipConfigurationSuggestions as I, writeJson as It, getWorkspaceGraph as J, mergeText as K, knip_exports as L, clearWorkspaceCache as Lt, formatEnvironmentCache as M, readJSON as Mt, format_exports as N, readJson as Nt, readText as O, outputFile as Ot, checkEnvironmentCache as P, remove as Pt, whyWorkspaceDependency as Q, planKnipCheck as R, getWorkspaceData as Rt, configReader as S, copy as St, compare$1 as T, exists$1 as Tt, stopCheckProcessTree as U, GitClient as Ut, executeCheckTask as V, workspace_exports as Vt, analyzeTurboRuns as W, filterWorkspaceGraph as X, parseDependencyReference as Y, getWorkspaceImpact as Z, planTemplateLink as _, localize as _t, inspectWorkspaceOwners as a, record$2 as at, planGenerate as b, resolveRepoctlLocale as bt, loadTemplateInstanceRegistry$1 as c, renderCreateNewProject as ct, template_instances_exports as d, migrateLegacyToolingReferences as dt, compareGraphValues as et, recoverTemplateUpgrade as f, setByPath as ft, applyTemplateLinkPlan as g, validateCleanTargets as gt, loadTemplateUpgradeJournal as h, isWithin as ht, planCodeowners as i, readInput as it, relativeFile as j, pathExists as jt, referencePath as k, outputJSON as kt, rebuildTemplateInstanceBaseline as l, rewriteTemplateSnapshotReferences as lt, planTemplateUpgrade as m, assertSafePath as mt, locateWorkspace as n, workspaceDependencyTypes as nt, listTemplateInstances as o, safeFile as ot, applyTemplateUpgradePlan as p, stageFileTransaction as pt, withOperationLock as q, applyCodeownersPlan as r, hash as rt, loadTemplateBaseline$1 as s, updateManifest as st, getWorkspaceTaskCatalog as t, resolveWorkspaceGraphNode as tt, relocateTemplateInstance as u, hasLegacyToolingReference as ut, generate_exports as v, message as vt, validateGraph as w, ensureFile as wt, generators as x, supportedLocales as xt, applyGeneratePlan as y, repoctlLocale as yt, runKnipCheck as z, getWorkspacePackageSummaries as zt };
4343
+ export { WorkspaceGraphQueryError as $, referenceTarget as A, outputJson as At, saveKnipBaseline as B, getWorkspacePackages as Bt, loadCompiler as C, ensureDir as Ct, ownershipFile as D, isIgnorableFsError as Dt, exists as E, fs as Et, env_cache_exports as F, writeJSON as Ft, cache_exports as G, signalExitCode as H, findWorkspacePackages as Ht, getKnipConfigurationSuggestions as I, writeJson as It, getWorkspaceGraph as J, mergeText as K, knip_exports as L, clearWorkspaceCache as Lt, formatEnvironmentCache as M, readJSON as Mt, format_exports as N, readJson as Nt, readText as O, outputFile as Ot, checkEnvironmentCache as P, remove as Pt, whyWorkspaceDependency as Q, planKnipCheck as R, getWorkspaceData as Rt, configReader as S, copy as St, compare as T, exists$1 as Tt, stopCheckProcessTree as U, GitClient as Ut, executeCheckTask as V, workspace_exports as Vt, analyzeTurboRuns as W, filterWorkspaceGraph as X, parseDependencyReference as Y, getWorkspaceImpact as Z, planTemplateLink as _, localize as _t, inspectWorkspaceOwners as a, record$2 as at, planGenerate as b, resolveRepoctlLocale as bt, loadTemplateInstanceRegistry as c, renderCreateNewProject as ct, template_instances_exports as d, migrateLegacyToolingReferences as dt, compareGraphValues as et, recoverTemplateUpgrade as f, setByPath as ft, applyTemplateLinkPlan as g, validateCleanTargets as gt, loadTemplateUpgradeJournal as h, isWithin as ht, planCodeowners as i, readInput as it, relativeFile as j, pathExists as jt, referencePath as k, outputJSON as kt, rebuildTemplateInstanceBaseline as l, rewriteTemplateSnapshotReferences as lt, planTemplateUpgrade as m, assertSafePath as mt, locateWorkspace as n, workspaceDependencyTypes as nt, listTemplateInstances as o, safeFile as ot, applyTemplateUpgradePlan as p, stageFileTransaction as pt, withOperationLock as q, applyCodeownersPlan as r, hash as rt, loadTemplateBaseline as s, updateManifest as st, getWorkspaceTaskCatalog as t, resolveWorkspaceGraphNode as tt, relocateTemplateInstance as u, hasLegacyToolingReference as ut, generate_exports as v, message as vt, validateGraph as w, ensureFile as wt, generators as x, supportedLocales as xt, applyGeneratePlan as y, repoctlLocale as yt, runKnipCheck as z, getWorkspacePackageSummaries as zt };
package/package.json CHANGED
@@ -1,7 +1,7 @@
1
1
  {
2
2
  "name": "@icebreakers/monorepo",
3
3
  "type": "module",
4
- "version": "6.5.4",
4
+ "version": "6.6.1",
5
5
  "description": "Core engine and programmatic APIs for repoctl",
6
6
  "author": "ice breaker <hi@sonofmagic.top>",
7
7
  "license": "MIT",
@@ -88,10 +88,10 @@
88
88
  },
89
89
  "dependencies": {
90
90
  "@arethetypeswrong/core": "0.18.5",
91
- "@babel/parser": "^8.1.0",
91
+ "@babel/parser": "^8.1.2",
92
92
  "@icebreakers/commitlint-config": "4.1.6",
93
- "@icebreakers/eslint-config": "8.0.17",
94
- "@icebreakers/monorepo-templates": "3.2.4",
93
+ "@icebreakers/eslint-config": "8.0.18",
94
+ "@icebreakers/monorepo-templates": "3.2.5",
95
95
  "@icebreakers/stylelint-config": "6.0.3",
96
96
  "@npmcli/config": "11.2.0",
97
97
  "@pnpm/find-workspace-dir": "^1000.1.5",
@@ -120,7 +120,7 @@
120
120
  "publint": "0.3.25",
121
121
  "semver": "^7.8.6",
122
122
  "simple-git": "^4.0.2",
123
- "tar": "7.5.22",
123
+ "tar": "7.5.23",
124
124
  "tinyglobby": "^0.2.17",
125
125
  "validate-npm-package-name": "^8.0.0",
126
126
  "vitest": "^5.1.0",
@@ -140,7 +140,7 @@
140
140
  "@vitest/coverage-v8": "~5.1.0",
141
141
  "ci-info": "^4.5.0",
142
142
  "fdir": "^6.5.0",
143
- "knip": "6.44.2",
143
+ "knip": "6.45.1",
144
144
  "lefthook": "2.2.2",
145
145
  "typescript": "~6.0.3"
146
146
  },