@hawkeyexl/manni 2.8.2 → 2.8.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.
package/dist/cli.js CHANGED
@@ -7,7 +7,7 @@ import {
7
7
  readStdin,
8
8
  reportConfig,
9
9
  splitList
10
- } from "./chunk-7UBCWTCO.js";
10
+ } from "./chunk-3QRJR6LM.js";
11
11
  import {
12
12
  CiteError,
13
13
  KeyError,
@@ -40,7 +40,7 @@ import {
40
40
  shortPin,
41
41
  shortSrc,
42
42
  spellSource
43
- } from "./chunk-WCNU53MJ.js";
43
+ } from "./chunk-HZ2KWOOO.js";
44
44
  import {
45
45
  COMMON_FORMAT_LIST,
46
46
  FAMILY_CONFIG_NAMES,
@@ -80,7 +80,7 @@ import {
80
80
  splitPageArgument,
81
81
  terminalConfirm,
82
82
  valeConfigPath
83
- } from "./chunk-KEW557TN.js";
83
+ } from "./chunk-XHH5OSQQ.js";
84
84
 
85
85
  // src/cli.ts
86
86
  import { Command as Command5 } from "commander";
package/dist/docmeta.js CHANGED
@@ -1,10 +1,10 @@
1
1
  #!/usr/bin/env node
2
2
  import {
3
3
  buildProgram
4
- } from "./chunk-7UBCWTCO.js";
4
+ } from "./chunk-3QRJR6LM.js";
5
5
  import {
6
6
  runIfMain
7
- } from "./chunk-KEW557TN.js";
7
+ } from "./chunk-XHH5OSQQ.js";
8
8
 
9
9
  // src/docmeta.ts
10
10
  runIfMain(import.meta.url, () => buildProgram().name("docmeta"));
package/dist/index.d.ts CHANGED
@@ -3425,7 +3425,17 @@ declare function applyFrontmatter(content: string, patch: MetadataPatch, options
3425
3425
  * target is locked — on Windows that is a real and recoverable situation, and
3426
3426
  * refusing to write at all would be worse than a non-atomic write.
3427
3427
  */
3428
- declare function writeFileAtomic(path: string,
3428
+ declare function writeFileAtomic(
3429
+ /**
3430
+ * Absolute, or relative to the process's current directory. The manifest
3431
+ * cache is keyed on absolute paths, and the invalidation in the `finally`
3432
+ * below resolves `path` against that same implicit directory — so a caller
3433
+ * that resolved its own path against some other base would invalidate a key
3434
+ * no cache holds, and the stale parse would survive the write. That miss is
3435
+ * silent, which is why the requirement is stated here rather than left to be
3436
+ * discovered.
3437
+ */
3438
+ path: string,
3429
3439
  /**
3430
3440
  * A `Uint8Array` writes byte-for-byte. `schemas vendor` needs that: the
3431
3441
  * integrity pin it records is taken over exactly what the server sent, and a
@@ -4541,10 +4551,20 @@ declare function claimLine(claim: ClaimEnd): number | undefined;
4541
4551
  * bare pin, or a marker with no drift check on its sentence.
4542
4552
  */
4543
4553
  declare function claimEnd(page: PageCitations, entry: PageCitation, lines: readonly string[], misplaced?: MisplacedMarker): ClaimEnd | null;
4544
- /** What `update --accept` re-pins over: the paragraph or fenced block at a line. */
4554
+ /**
4555
+ * What `update --accept` re-pins over: the paragraph, whole fenced block, or
4556
+ * lines inside a fenced block at a line.
4557
+ *
4558
+ * The three kinds are not interchangeable. `"block"` covers a fence, its
4559
+ * content and its closing fence, which is the only shape a `quote: true`
4560
+ * entry may hold. `"fenced-lines"` covers content lines inside a block and
4561
+ * neither fence, which is what a claim minted over part of a code sample
4562
+ * holds. `"paragraph"` covers prose, and table rows too, since `ClaimUnit`
4563
+ * draws no line between them.
4564
+ */
4545
4565
  interface ClaimUnit {
4546
4566
  lines: PageLines;
4547
- kind: "paragraph" | "block";
4567
+ kind: "paragraph" | "block" | "fenced-lines";
4548
4568
  text: string[];
4549
4569
  }
4550
4570
  /**
@@ -4552,13 +4572,13 @@ interface ClaimUnit {
4552
4572
  * different repair, so `update --accept` names which it hit rather than
4553
4573
  * leaving the entry skipped with no reason.
4554
4574
  */
4555
- type NoUnit = "outside" | "blank" | "fenced" | "marker" | "not-a-paragraph" | "table-short" | "table-rule";
4575
+ type NoUnit = "outside" | "blank" | "fence-crossed" | "marker" | "not-a-paragraph" | "table-short" | "table-rule";
4556
4576
  /**
4557
- * The paragraph, fenced block or table rows at a file line. Undefined when the
4558
- * line holds no claim at all: it is blank, outside the body, inside a fenced
4559
- * block rather than opening one, another entry's marker, or a table rule.
4560
- * Those are the claims `update --accept` skips, and `noUnitAt` says which of
4561
- * them it is.
4577
+ * The paragraph, fenced block, fenced lines or table rows at a file line.
4578
+ * Undefined when the line holds no claim at all: it is blank, outside the
4579
+ * body, another entry's marker, a table rule, or a line whose claim runs out
4580
+ * of the fenced block it starts in. Those are the claims `update --accept`
4581
+ * skips, and `noUnitAt` says which of them it is.
4562
4582
  *
4563
4583
  * A paragraph runs from this line to its end, not from the paragraph's own
4564
4584
  * first line. The line asked about is the claim's first line, and re-pinning
@@ -4979,41 +4999,61 @@ interface SplicedManifest {
4979
4999
  */
4980
5000
  declare function spliceManifestValue(text: string, options: SpliceManifestOptions): SplicedManifest;
4981
5001
 
4982
- /** One edit this run made, replayable onto bytes read later. */
4983
- type ManifestOp = {
4984
- kind: "splice";
4985
- entry: string;
4986
- join: string;
4987
- file: string;
4988
- value: unknown[];
4989
- } | {
4990
- kind: "remove";
5002
+ /** One entry's one key: what an edit rewrites, and what a conflict is about. */
5003
+ interface ManifestKey {
5004
+ /** The entry, as the manifest spells it. */
4991
5005
  entry: string;
5006
+ /** The key of that entry the edit rewrites. */
5007
+ key: string;
5008
+ /** How entry keys are compared; `path` normalizes separators. */
4992
5009
  join: string;
5010
+ }
5011
+ /** One edit a run made, replayable onto bytes read later. */
5012
+ interface ManifestOp$1 extends ManifestKey {
5013
+ /** The manifest as the run names it in its own messages. */
4993
5014
  file: string;
4994
- };
4995
- /** An entry this run rewrote, and what it held before the run touched it. */
4996
- interface EntryBase {
4997
- entry: string;
4998
- join: string;
4999
- /** The entry's `citations` as they were read, encoded for comparison. */
5015
+ }
5016
+ /** An entry's key this run rewrote, and what it held before the run did. */
5017
+ interface KeyBase extends ManifestKey {
5018
+ /** The value as it was read, encoded so absence cannot collide. */
5000
5019
  value: string;
5001
5020
  }
5002
5021
  /** One manifest held for the length of a run: its text before, and now. */
5003
- interface HeldManifest {
5022
+ interface HeldManifest$1<Op extends ManifestOp$1> {
5004
5023
  /** Absolute path, the write target. */
5005
5024
  path: string;
5006
5025
  /** The manifest as the run reports it. */
5007
5026
  file: string;
5008
- /** The bytes as they were read. */
5027
+ /** The bytes the run's edits were computed from. */
5009
5028
  before: string;
5010
5029
  /** The bytes as the run has rewritten them. */
5011
5030
  text: string;
5012
5031
  /** Every edit this run made, in order, for a replay onto newer bytes. */
5013
- ops: ManifestOp[];
5014
- /** Each entry this run rewrote, keyed as the manifest keys it. */
5015
- bases: Map<string, EntryBase>;
5032
+ ops: Op[];
5033
+ /** Each entry key this run rewrote, and what it held first. */
5034
+ bases: Map<string, KeyBase>;
5016
5035
  }
5036
+ /** What a caller may substitute when it writes the manifests it held. */
5037
+ interface CommitIo$1<Change> {
5038
+ /** The byte writer; an atomic write unless a test says otherwise. */
5039
+ write?: (path: string, text: string) => Promise<void>;
5040
+ /** The compare-and-swap re-read, for a test counting the retries. */
5041
+ read?: (path: string) => Promise<string>;
5042
+ /** Called after each manifest lands, in write order. */
5043
+ after?: (change: Change) => void;
5044
+ /** Called when one manifest fails to land; must throw. */
5045
+ onError?: (change: Change, error: unknown) => Promise<never>;
5046
+ }
5047
+
5048
+ /** One edit this run made, replayable onto bytes read later. */
5049
+ type ManifestOp = ManifestOp$1 & ({
5050
+ kind: "splice";
5051
+ value: unknown[];
5052
+ } | {
5053
+ kind: "remove";
5054
+ });
5055
+ /** One manifest held for the length of a run: its text before, and now. */
5056
+ type HeldManifest = HeldManifest$1<ManifestOp>;
5017
5057
  /** One manifest this run rewrote, as `changed()` and `commit()` report it. */
5018
5058
  interface ManifestChange {
5019
5059
  path: string;
@@ -5028,19 +5068,7 @@ interface ManifestChange {
5028
5068
  diff: string;
5029
5069
  }
5030
5070
  /** What `commit()` does with each manifest it settles. */
5031
- interface CommitIo {
5032
- /** The byte writer; `writeFileAtomic` unless a test says otherwise. */
5033
- write?: (path: string, text: string) => Promise<void>;
5034
- /**
5035
- * The compare-and-swap re-read, for a test counting the retries. It is that
5036
- * loop's read alone, not a general hook: `hold()` reads the file itself.
5037
- */
5038
- read?: (path: string) => Promise<string>;
5039
- /** Called after each manifest lands, in write order. */
5040
- after?: (change: ManifestChange) => void;
5041
- /** Called when one manifest fails to land; must throw. */
5042
- onError?: (change: ManifestChange, error: unknown) => Promise<never>;
5043
- }
5071
+ type CommitIo = CommitIo$1<ManifestChange>;
5044
5072
  /** Every manifest one run writes, read once and spliced in memory. */
5045
5073
  declare class ManifestSet {
5046
5074
  private readonly held;
package/dist/index.js CHANGED
@@ -5,7 +5,7 @@ import {
5
5
  reencryptMetadata,
6
6
  runKeyRotate,
7
7
  runKeySet
8
- } from "./chunk-WCNU53MJ.js";
8
+ } from "./chunk-HZ2KWOOO.js";
9
9
  import {
10
10
  BinMissing,
11
11
  COMMON_FORMATS,
@@ -127,7 +127,7 @@ import {
127
127
  valueOf,
128
128
  vendorFileName,
129
129
  writeFileAtomic
130
- } from "./chunk-KEW557TN.js";
130
+ } from "./chunk-XHH5OSQQ.js";
131
131
 
132
132
  // src/key/index.ts
133
133
  var key_exports = {};
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@hawkeyexl/manni",
3
- "version": "2.8.2",
3
+ "version": "2.8.4",
4
4
  "description": "One command line for documentation that is meant to be checked. `manni meta` validates the presence and format of document metadata (Markdown frontmatter and more) against JSON Schema, built for CI. Formerly docmeta.",
5
5
  "type": "module",
6
6
  "bin": {