@hawkeyexl/manni 2.3.3 → 2.3.4

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.
@@ -69,7 +69,7 @@ import {
69
69
  withValueAt,
70
70
  writeEncryptionKey,
71
71
  writeFileAtomic
72
- } from "./chunk-SN5CEVX7.js";
72
+ } from "./chunk-LHYFB75E.js";
73
73
 
74
74
  // src/meta/core/reencrypt.ts
75
75
  import { extname } from "node:path";
@@ -476,6 +476,17 @@ async function buildSourceIndex(root, opts) {
476
476
  has: (path) => byPath.has(path)
477
477
  };
478
478
  }
479
+ function isEnoent(error) {
480
+ return typeof error === "object" && error !== null && "code" in error && error.code === "ENOENT";
481
+ }
482
+ async function sourceIndexFor(root, client) {
483
+ try {
484
+ return await buildSourceIndex(root, { gitClient: client });
485
+ } catch (error) {
486
+ if (isEnoent(error)) throw new CiteError(`Root directory not found: ${root}.`);
487
+ throw error;
488
+ }
489
+ }
479
490
  async function readSource(root, index, range, key) {
480
491
  let resolvedPath;
481
492
  if (range.encrypted) {
@@ -2652,17 +2663,6 @@ function joinHits() {
2652
2663
  }
2653
2664
  };
2654
2665
  }
2655
- function isEnoent(error) {
2656
- return typeof error === "object" && error !== null && "code" in error && error.code === "ENOENT";
2657
- }
2658
- async function indexFor(root, client) {
2659
- try {
2660
- return await buildSourceIndex(root, { gitClient: client });
2661
- } catch (error) {
2662
- if (isEnoent(error)) throw new CiteError(`Root directory not found: ${root}.`);
2663
- throw error;
2664
- }
2665
- }
2666
2666
  async function prepareRun(opts, action, verb, requireSources = false) {
2667
2667
  const cwd = resolve3(opts.cwd ?? process.cwd());
2668
2668
  const run3 = await resolveCiteRun({
@@ -2726,7 +2726,7 @@ async function prepareRun(opts, action, verb, requireSources = false) {
2726
2726
  severity: config?.severity,
2727
2727
  gitClient: git
2728
2728
  };
2729
- if (checkSources) pageOptions.sourceIndex = await indexFor(run3.root, git);
2729
+ if (checkSources) pageOptions.sourceIndex = await sourceIndexFor(run3.root, git);
2730
2730
  const sidecars2 = await sidecarsFor(run3);
2731
2731
  const setupFor = (label, content) => {
2732
2732
  const page = sidecars2?.forPage(label, content, forced?.name);
@@ -2971,7 +2971,7 @@ async function runAdd(opts) {
2971
2971
  }
2972
2972
  }
2973
2973
  const client = opts.gitClient ?? gitClient(root);
2974
- const sourceIndex = await buildSourceIndex(root, { gitClient: client });
2974
+ const sourceIndex = await sourceIndexFor(root, client);
2975
2975
  let body = content;
2976
2976
  let markerAt;
2977
2977
  let claimSpan;
@@ -3869,7 +3869,7 @@ function rootFor(flag, cite, file, cwd) {
3869
3869
  function isEnoent3(error) {
3870
3870
  return typeof error === "object" && error !== null && "code" in error && error.code === "ENOENT";
3871
3871
  }
3872
- async function indexFor2(root, client) {
3872
+ async function indexFor(root, client) {
3873
3873
  try {
3874
3874
  return await buildSourceIndex(root, { gitClient: client });
3875
3875
  } catch (error) {
@@ -4065,7 +4065,7 @@ async function runKeyRotate(opts) {
4065
4065
  const sourceIndex = () => {
4066
4066
  if (index === void 0) {
4067
4067
  if (fellBack) opts.onNotice?.(`No git root found; resolving src: paths from ${cwd}`);
4068
- index = indexFor2(root, client);
4068
+ index = indexFor(root, client);
4069
4069
  }
4070
4070
  return index;
4071
4071
  };
@@ -4258,4 +4258,4 @@ export {
4258
4258
  runKeyRotate,
4259
4259
  runKeySet
4260
4260
  };
4261
- //# sourceMappingURL=chunk-2I5U4HXR.js.map
4261
+ //# sourceMappingURL=chunk-THU5EEXC.js.map