@driftsys/markspec 0.10.3 → 0.11.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/README.md +2 -2
- package/esm/compiler/deserialize.d.ts +49 -0
- package/esm/compiler/deserialize.d.ts.map +1 -0
- package/esm/compiler/deserialize.js +139 -0
- package/esm/compiler/manifest.d.ts +3 -0
- package/esm/compiler/manifest.d.ts.map +1 -1
- package/esm/compiler/manifest.js +9 -3
- package/esm/compiler/mod.d.ts.map +1 -1
- package/esm/compiler/mod.js +16 -7
- package/esm/config/markspec.d.ts +38 -1
- package/esm/config/markspec.d.ts.map +1 -1
- package/esm/config/markspec.js +127 -2
- package/esm/config/mod.d.ts.map +1 -1
- package/esm/config/mod.js +143 -147
- package/esm/decl/duplicates.d.ts +29 -0
- package/esm/decl/duplicates.d.ts.map +1 -0
- package/esm/decl/duplicates.js +28 -0
- package/esm/decl/mod.d.ts +4 -2
- package/esm/decl/mod.d.ts.map +1 -1
- package/esm/decl/mod.js +2 -1
- package/esm/decl/surfaces.d.ts +29 -7
- package/esm/decl/surfaces.d.ts.map +1 -1
- package/esm/decl/surfaces.js +31 -18
- package/esm/gates/mod.d.ts +13 -2
- package/esm/gates/mod.d.ts.map +1 -1
- package/esm/gates/mod.js +38 -11
- package/esm/lint/runner.d.ts.map +1 -1
- package/esm/lint/runner.js +3 -1
- package/esm/lock/acquire_compile.d.ts +31 -0
- package/esm/lock/acquire_compile.d.ts.map +1 -0
- package/esm/lock/acquire_compile.js +83 -0
- package/esm/lock/cache_check.d.ts +28 -0
- package/esm/lock/cache_check.d.ts.map +1 -0
- package/esm/lock/cache_check.js +51 -0
- package/esm/lock/check.d.ts +14 -3
- package/esm/lock/check.d.ts.map +1 -1
- package/esm/lock/check.js +41 -3
- package/esm/lock/git_intent.d.ts +46 -0
- package/esm/lock/git_intent.d.ts.map +1 -0
- package/esm/lock/git_intent.js +111 -0
- package/esm/lock/mod.d.ts +10 -3
- package/esm/lock/mod.d.ts.map +1 -1
- package/esm/lock/mod.js +7 -1
- package/esm/lock/model.d.ts +24 -1
- package/esm/lock/model.d.ts.map +1 -1
- package/esm/lock/parser.d.ts.map +1 -1
- package/esm/lock/parser.js +32 -0
- package/esm/lock/pin_assurance.d.ts +20 -0
- package/esm/lock/pin_assurance.d.ts.map +1 -0
- package/esm/lock/pin_assurance.js +34 -0
- package/esm/lock/resolve.d.ts +8 -17
- package/esm/lock/resolve.d.ts.map +1 -1
- package/esm/lock/resolve.js +7 -67
- package/esm/lock/serializer.d.ts.map +1 -1
- package/esm/lock/serializer.js +23 -0
- package/esm/lock/upstream_common.d.ts +29 -0
- package/esm/lock/upstream_common.d.ts.map +1 -0
- package/esm/lock/upstream_common.js +38 -0
- package/esm/lock/upstream_deps.d.ts +63 -0
- package/esm/lock/upstream_deps.d.ts.map +1 -0
- package/esm/lock/upstream_deps.js +172 -0
- package/esm/lock/upstream_refs.d.ts +69 -0
- package/esm/lock/upstream_refs.d.ts.map +1 -0
- package/esm/lock/upstream_refs.js +238 -0
- package/esm/mod.d.ts +16 -8
- package/esm/mod.d.ts.map +1 -1
- package/esm/mod.js +15 -5
- package/esm/model/mod.d.ts +93 -28
- package/esm/model/mod.d.ts.map +1 -1
- package/esm/model/mod.js +66 -13
- package/esm/model/profile.d.ts +13 -0
- package/esm/model/profile.d.ts.map +1 -1
- package/esm/parser/markdown.d.ts.map +1 -1
- package/esm/parser/markdown.js +7 -51
- package/esm/profile/manifest.d.ts.map +1 -1
- package/esm/profile/manifest.js +20 -3
- package/esm/profile/merge.js +7 -0
- package/esm/reporter/mod.d.ts +11 -0
- package/esm/reporter/mod.d.ts.map +1 -1
- package/esm/reporter/mod.js +19 -8
- package/esm/typl/assemble.d.ts +53 -0
- package/esm/typl/assemble.d.ts.map +1 -0
- package/esm/typl/assemble.js +238 -0
- package/esm/typl/ast.d.ts +7 -1
- package/esm/typl/ast.d.ts.map +1 -1
- package/esm/typl/ast.js +3 -0
- package/esm/typl/bullet.d.ts +9 -7
- package/esm/typl/bullet.d.ts.map +1 -1
- package/esm/typl/bullet.js +6 -4
- package/esm/typl/citations.d.ts +27 -0
- package/esm/typl/citations.d.ts.map +1 -0
- package/esm/typl/citations.js +16 -0
- package/esm/typl/diagnostics.d.ts +2 -2
- package/esm/typl/diagnostics.d.ts.map +1 -1
- package/esm/typl/diagnostics.js +18 -0
- package/esm/typl/grammar.d.ts.map +1 -1
- package/esm/typl/grammar.js +6 -0
- package/esm/typl/lexer.d.ts.map +1 -1
- package/esm/typl/lexer.js +25 -4
- package/esm/typl/mod.d.ts +8 -2
- package/esm/typl/mod.d.ts.map +1 -1
- package/esm/typl/mod.js +5 -1
- package/esm/typl/recognize.js +2 -2
- package/esm/typl/registry.d.ts +1 -1
- package/esm/typl/resolve.d.ts +31 -0
- package/esm/typl/resolve.d.ts.map +1 -0
- package/esm/typl/resolve.js +27 -0
- package/esm/typl/table.d.ts +52 -0
- package/esm/typl/table.d.ts.map +1 -0
- package/esm/typl/table.js +69 -0
- package/esm/typl/validator.d.ts +24 -5
- package/esm/typl/validator.d.ts.map +1 -1
- package/esm/typl/validator.js +55 -75
- package/esm/upstream/mod.d.ts +45 -0
- package/esm/upstream/mod.d.ts.map +1 -0
- package/esm/upstream/mod.js +98 -0
- package/esm/upstream/project.d.ts +33 -0
- package/esm/upstream/project.d.ts.map +1 -0
- package/esm/upstream/project.js +38 -0
- package/esm/upstream/refs.d.ts +23 -0
- package/esm/upstream/refs.d.ts.map +1 -0
- package/esm/upstream/refs.js +71 -0
- package/esm/util/paths.d.ts +14 -0
- package/esm/util/paths.d.ts.map +1 -0
- package/esm/util/paths.js +22 -0
- package/esm/uxil/assemble.d.ts +38 -0
- package/esm/uxil/assemble.d.ts.map +1 -0
- package/esm/uxil/assemble.js +268 -0
- package/esm/uxil/ast.d.ts +63 -0
- package/esm/uxil/ast.d.ts.map +1 -0
- package/esm/uxil/ast.js +9 -0
- package/esm/uxil/citations.d.ts +27 -0
- package/esm/uxil/citations.d.ts.map +1 -0
- package/esm/uxil/citations.js +25 -0
- package/esm/uxil/diagnostics.d.ts +39 -0
- package/esm/uxil/diagnostics.d.ts.map +1 -0
- package/esm/uxil/diagnostics.js +135 -0
- package/esm/uxil/grammar.d.ts +72 -0
- package/esm/uxil/grammar.d.ts.map +1 -0
- package/esm/uxil/grammar.js +505 -0
- package/esm/uxil/lexer.d.ts +23 -0
- package/esm/uxil/lexer.d.ts.map +1 -0
- package/esm/uxil/lexer.js +58 -0
- package/esm/uxil/mod.d.ts +32 -0
- package/esm/uxil/mod.d.ts.map +1 -0
- package/esm/uxil/mod.js +11 -0
- package/esm/uxil/projection.d.ts +40 -0
- package/esm/uxil/projection.d.ts.map +1 -0
- package/esm/uxil/projection.js +41 -0
- package/esm/uxil/recognize.d.ts +16 -0
- package/esm/uxil/recognize.d.ts.map +1 -0
- package/esm/uxil/recognize.js +28 -0
- package/esm/uxil/registry.d.ts +37 -0
- package/esm/uxil/registry.d.ts.map +1 -0
- package/esm/uxil/registry.js +29 -0
- package/esm/uxil/surfaces.d.ts +36 -0
- package/esm/uxil/surfaces.d.ts.map +1 -0
- package/esm/uxil/surfaces.js +34 -0
- package/esm/uxil/validator.d.ts +36 -0
- package/esm/uxil/validator.d.ts.map +1 -0
- package/esm/uxil/validator.js +139 -0
- package/esm/uxil/vocab.d.ts +33 -0
- package/esm/uxil/vocab.d.ts.map +1 -0
- package/esm/uxil/vocab.js +36 -0
- package/esm/validator/caption_convention.d.ts +2 -1
- package/esm/validator/caption_convention.d.ts.map +1 -1
- package/esm/validator/caption_convention.js +2 -1
- package/esm/validator/corpus.d.ts.map +1 -1
- package/esm/validator/corpus.js +40 -17
- package/esm/validator/discipline.d.ts +6 -4
- package/esm/validator/discipline.d.ts.map +1 -1
- package/esm/validator/discipline.js +6 -4
- package/esm/validator/mod.d.ts.map +1 -1
- package/esm/validator/mod.js +28 -15
- package/esm/validator/pipeline.d.ts +11 -1
- package/esm/validator/pipeline.d.ts.map +1 -1
- package/esm/validator/pipeline.js +68 -18
- package/esm/validator/trace_types.d.ts +9 -2
- package/esm/validator/trace_types.d.ts.map +1 -1
- package/esm/validator/trace_types.js +21 -5
- package/esm/validator/traceability.d.ts +15 -3
- package/esm/validator/traceability.d.ts.map +1 -1
- package/esm/validator/traceability.js +39 -4
- package/esm/validator/types.d.ts.map +1 -1
- package/esm/validator/types.js +11 -1
- package/esm/validator/uxil_family.d.ts +43 -0
- package/esm/validator/uxil_family.d.ts.map +1 -0
- package/esm/validator/uxil_family.js +52 -0
- package/package.json +1 -1
- package/script/compiler/deserialize.d.ts +49 -0
- package/script/compiler/deserialize.d.ts.map +1 -0
- package/script/compiler/deserialize.js +144 -0
- package/script/compiler/manifest.d.ts +3 -0
- package/script/compiler/manifest.d.ts.map +1 -1
- package/script/compiler/manifest.js +10 -3
- package/script/compiler/mod.d.ts.map +1 -1
- package/script/compiler/mod.js +15 -6
- package/script/config/markspec.d.ts +38 -1
- package/script/config/markspec.d.ts.map +1 -1
- package/script/config/markspec.js +129 -3
- package/script/config/mod.d.ts.map +1 -1
- package/script/config/mod.js +143 -147
- package/script/decl/duplicates.d.ts +29 -0
- package/script/decl/duplicates.d.ts.map +1 -0
- package/script/decl/duplicates.js +31 -0
- package/script/decl/mod.d.ts +4 -2
- package/script/decl/mod.d.ts.map +1 -1
- package/script/decl/mod.js +4 -2
- package/script/decl/surfaces.d.ts +29 -7
- package/script/decl/surfaces.d.ts.map +1 -1
- package/script/decl/surfaces.js +32 -19
- package/script/gates/mod.d.ts +13 -2
- package/script/gates/mod.d.ts.map +1 -1
- package/script/gates/mod.js +37 -10
- package/script/lint/runner.d.ts.map +1 -1
- package/script/lint/runner.js +3 -1
- package/script/lock/acquire_compile.d.ts +31 -0
- package/script/lock/acquire_compile.d.ts.map +1 -0
- package/script/lock/acquire_compile.js +86 -0
- package/script/lock/cache_check.d.ts +28 -0
- package/script/lock/cache_check.d.ts.map +1 -0
- package/script/lock/cache_check.js +54 -0
- package/script/lock/check.d.ts +14 -3
- package/script/lock/check.d.ts.map +1 -1
- package/script/lock/check.js +41 -3
- package/script/lock/git_intent.d.ts +46 -0
- package/script/lock/git_intent.d.ts.map +1 -0
- package/script/lock/git_intent.js +115 -0
- package/script/lock/mod.d.ts +10 -3
- package/script/lock/mod.d.ts.map +1 -1
- package/script/lock/mod.js +16 -2
- package/script/lock/model.d.ts +24 -1
- package/script/lock/model.d.ts.map +1 -1
- package/script/lock/parser.d.ts.map +1 -1
- package/script/lock/parser.js +32 -0
- package/script/lock/pin_assurance.d.ts +20 -0
- package/script/lock/pin_assurance.d.ts.map +1 -0
- package/script/lock/pin_assurance.js +37 -0
- package/script/lock/resolve.d.ts +8 -17
- package/script/lock/resolve.d.ts.map +1 -1
- package/script/lock/resolve.js +7 -68
- package/script/lock/serializer.d.ts.map +1 -1
- package/script/lock/serializer.js +23 -0
- package/script/lock/upstream_common.d.ts +29 -0
- package/script/lock/upstream_common.d.ts.map +1 -0
- package/script/lock/upstream_common.js +42 -0
- package/script/lock/upstream_deps.d.ts +63 -0
- package/script/lock/upstream_deps.d.ts.map +1 -0
- package/script/lock/upstream_deps.js +175 -0
- package/script/lock/upstream_refs.d.ts +69 -0
- package/script/lock/upstream_refs.d.ts.map +1 -0
- package/script/lock/upstream_refs.js +244 -0
- package/script/mod.d.ts +16 -8
- package/script/mod.d.ts.map +1 -1
- package/script/mod.js +40 -7
- package/script/model/mod.d.ts +93 -28
- package/script/model/mod.d.ts.map +1 -1
- package/script/model/mod.js +70 -14
- package/script/model/profile.d.ts +13 -0
- package/script/model/profile.d.ts.map +1 -1
- package/script/parser/markdown.d.ts.map +1 -1
- package/script/parser/markdown.js +6 -50
- package/script/profile/manifest.d.ts.map +1 -1
- package/script/profile/manifest.js +20 -3
- package/script/profile/merge.js +7 -0
- package/script/reporter/mod.d.ts +11 -0
- package/script/reporter/mod.d.ts.map +1 -1
- package/script/reporter/mod.js +18 -7
- package/script/typl/assemble.d.ts +53 -0
- package/script/typl/assemble.d.ts.map +1 -0
- package/script/typl/assemble.js +241 -0
- package/script/typl/ast.d.ts +7 -1
- package/script/typl/ast.d.ts.map +1 -1
- package/script/typl/ast.js +3 -0
- package/script/typl/bullet.d.ts +9 -7
- package/script/typl/bullet.d.ts.map +1 -1
- package/script/typl/bullet.js +6 -4
- package/script/typl/citations.d.ts +27 -0
- package/script/typl/citations.d.ts.map +1 -0
- package/script/typl/citations.js +20 -0
- package/script/typl/diagnostics.d.ts +2 -2
- package/script/typl/diagnostics.d.ts.map +1 -1
- package/script/typl/diagnostics.js +18 -0
- package/script/typl/grammar.d.ts.map +1 -1
- package/script/typl/grammar.js +6 -0
- package/script/typl/lexer.d.ts.map +1 -1
- package/script/typl/lexer.js +25 -4
- package/script/typl/mod.d.ts +8 -2
- package/script/typl/mod.d.ts.map +1 -1
- package/script/typl/mod.js +14 -2
- package/script/typl/recognize.js +2 -2
- package/script/typl/registry.d.ts +1 -1
- package/script/typl/resolve.d.ts +31 -0
- package/script/typl/resolve.d.ts.map +1 -0
- package/script/typl/resolve.js +33 -0
- package/script/typl/table.d.ts +52 -0
- package/script/typl/table.d.ts.map +1 -0
- package/script/typl/table.js +75 -0
- package/script/typl/validator.d.ts +24 -5
- package/script/typl/validator.d.ts.map +1 -1
- package/script/typl/validator.js +55 -75
- package/script/upstream/mod.d.ts +45 -0
- package/script/upstream/mod.d.ts.map +1 -0
- package/script/upstream/mod.js +101 -0
- package/script/upstream/project.d.ts +33 -0
- package/script/upstream/project.d.ts.map +1 -0
- package/script/upstream/project.js +41 -0
- package/script/upstream/refs.d.ts +23 -0
- package/script/upstream/refs.d.ts.map +1 -0
- package/script/upstream/refs.js +74 -0
- package/script/util/paths.d.ts +14 -0
- package/script/util/paths.d.ts.map +1 -0
- package/script/util/paths.js +25 -0
- package/script/uxil/assemble.d.ts +38 -0
- package/script/uxil/assemble.d.ts.map +1 -0
- package/script/uxil/assemble.js +272 -0
- package/script/uxil/ast.d.ts +63 -0
- package/script/uxil/ast.d.ts.map +1 -0
- package/script/uxil/ast.js +10 -0
- package/script/uxil/citations.d.ts +27 -0
- package/script/uxil/citations.d.ts.map +1 -0
- package/script/uxil/citations.js +29 -0
- package/script/uxil/diagnostics.d.ts +39 -0
- package/script/uxil/diagnostics.d.ts.map +1 -0
- package/script/uxil/diagnostics.js +140 -0
- package/script/uxil/grammar.d.ts +72 -0
- package/script/uxil/grammar.d.ts.map +1 -0
- package/script/uxil/grammar.js +511 -0
- package/script/uxil/lexer.d.ts +23 -0
- package/script/uxil/lexer.d.ts.map +1 -0
- package/script/uxil/lexer.js +61 -0
- package/script/uxil/mod.d.ts +32 -0
- package/script/uxil/mod.d.ts.map +1 -0
- package/script/uxil/mod.js +37 -0
- package/script/uxil/projection.d.ts +40 -0
- package/script/uxil/projection.d.ts.map +1 -0
- package/script/uxil/projection.js +44 -0
- package/script/uxil/recognize.d.ts +16 -0
- package/script/uxil/recognize.d.ts.map +1 -0
- package/script/uxil/recognize.js +31 -0
- package/script/uxil/registry.d.ts +37 -0
- package/script/uxil/registry.d.ts.map +1 -0
- package/script/uxil/registry.js +32 -0
- package/script/uxil/surfaces.d.ts +36 -0
- package/script/uxil/surfaces.d.ts.map +1 -0
- package/script/uxil/surfaces.js +39 -0
- package/script/uxil/validator.d.ts +36 -0
- package/script/uxil/validator.d.ts.map +1 -0
- package/script/uxil/validator.js +142 -0
- package/script/uxil/vocab.d.ts +33 -0
- package/script/uxil/vocab.d.ts.map +1 -0
- package/script/uxil/vocab.js +41 -0
- package/script/validator/caption_convention.d.ts +2 -1
- package/script/validator/caption_convention.d.ts.map +1 -1
- package/script/validator/caption_convention.js +2 -1
- package/script/validator/corpus.d.ts.map +1 -1
- package/script/validator/corpus.js +39 -16
- package/script/validator/discipline.d.ts +6 -4
- package/script/validator/discipline.d.ts.map +1 -1
- package/script/validator/discipline.js +6 -4
- package/script/validator/mod.d.ts.map +1 -1
- package/script/validator/mod.js +27 -14
- package/script/validator/pipeline.d.ts +11 -1
- package/script/validator/pipeline.d.ts.map +1 -1
- package/script/validator/pipeline.js +67 -17
- package/script/validator/trace_types.d.ts +9 -2
- package/script/validator/trace_types.d.ts.map +1 -1
- package/script/validator/trace_types.js +20 -4
- package/script/validator/traceability.d.ts +15 -3
- package/script/validator/traceability.d.ts.map +1 -1
- package/script/validator/traceability.js +38 -3
- package/script/validator/types.d.ts.map +1 -1
- package/script/validator/types.js +10 -0
- package/script/validator/uxil_family.d.ts +43 -0
- package/script/validator/uxil_family.d.ts.map +1 -0
- package/script/validator/uxil_family.js +56 -0
package/esm/gates/mod.js
CHANGED
|
@@ -20,7 +20,7 @@
|
|
|
20
20
|
import { format } from "../formatter/mod.js";
|
|
21
21
|
import { parseFile } from "../parser/mod.js";
|
|
22
22
|
import { buildRefIndex, canonicalizeRefs } from "../refs/mod.js";
|
|
23
|
-
import { detectOfflineEdgeDrift, } from "../lock/mod.js";
|
|
23
|
+
import { detectOfflineEdgeDrift, verifyUpstreamCache, } from "../lock/mod.js";
|
|
24
24
|
import { runLint } from "../lint/mod.js";
|
|
25
25
|
/**
|
|
26
26
|
* Format-drift gate — the `MSL-F010` (formatter drift) and `MSL-F011`
|
|
@@ -50,7 +50,8 @@ export async function fmtDriftGate(mdContents, entries, ledger, formatMarkdownPr
|
|
|
50
50
|
// Building the heal index over the full set (including corpus) would flag an
|
|
51
51
|
// MSL-F011 drift that `fmt` can never fix — a permanently red gate for any
|
|
52
52
|
// consumer using a delivered corpus. Filter to `!e.origin`, mirroring
|
|
53
|
-
// lockfileDriftGate
|
|
53
|
+
// lockfileDriftGate — deliberately BROADER than the validators'
|
|
54
|
+
// `emittableEntries` (upstream-only, #771); do not "unify" it.
|
|
54
55
|
const refIndex = buildRefIndex(entries.filter((e) => !e.origin));
|
|
55
56
|
for (const [filePath, content] of mdContents) {
|
|
56
57
|
const formatted = format(content, {
|
|
@@ -93,25 +94,51 @@ export async function fmtDriftGate(mdContents, entries, ledger, formatMarkdownPr
|
|
|
93
94
|
* re-lock. The gate therefore filters to project-owned entries (`!e.origin`),
|
|
94
95
|
* mirroring `markspec lock`.
|
|
95
96
|
*
|
|
97
|
+
* Also carries the MSL-L212 offline cache-drift case (Task 9): when `cache`
|
|
98
|
+
* is supplied and the lockfile parsed, every snapshot-carrying upstream row
|
|
99
|
+
* is verified against its on-disk cache under `cache.cacheRoot` and any
|
|
100
|
+
* cache-drift diagnostics are appended to the edge-drift result. Offline by
|
|
101
|
+
* design, like the edge-drift check — no network fetch.
|
|
102
|
+
*
|
|
96
103
|
* @param lockParse The parsed `markspec.lock` (already read from disk).
|
|
97
104
|
* @param lockPath Absolute path to `markspec.lock`, used as the diagnostic
|
|
98
105
|
* location so JSON consumers that group by `location.file` keep the finding.
|
|
99
106
|
* @param entries The full parsed entry set; corpus entries are filtered out.
|
|
107
|
+
* @param cache Optional upstream cache-verification inputs. Omitted →
|
|
108
|
+
* backward-compatible with callers that only want the edge-drift case.
|
|
100
109
|
*/
|
|
101
|
-
export async function lockfileDriftGate(lockParse, lockPath, entries) {
|
|
110
|
+
export async function lockfileDriftGate(lockParse, lockPath, entries, cache) {
|
|
102
111
|
if (!lockParse.lockfile) {
|
|
103
112
|
return [...lockParse.diagnostics];
|
|
104
113
|
}
|
|
114
|
+
// `!e.origin` (project-owned only) — deliberately BROADER than the
|
|
115
|
+
// validators' `emittableEntries` partition (upstream-only, #771): the
|
|
116
|
+
// edge ledger records only edges the project authors.
|
|
105
117
|
const projectEntries = entries.filter((e) => !e.origin);
|
|
106
118
|
const drift = await detectOfflineEdgeDrift(projectEntries, lockParse.lockfile.generatedCache);
|
|
107
|
-
|
|
108
|
-
|
|
109
|
-
|
|
110
|
-
|
|
111
|
-
|
|
112
|
-
|
|
113
|
-
|
|
114
|
-
|
|
119
|
+
const diagnostics = drift.drifted
|
|
120
|
+
? [{
|
|
121
|
+
code: "MSL-L212",
|
|
122
|
+
severity: "error",
|
|
123
|
+
message: `traceability edges drifted from markspec.lock: locked ${drift.lockedCount} edge(s), current ${drift.currentCount} — run \`markspec lock\` to refresh. (After upgrading MarkSpec this can also fire once because traceability inputs now include source-file doc comments; re-running \`markspec lock\` clears it.)`,
|
|
124
|
+
location: { file: lockPath, line: 1, column: 1 },
|
|
125
|
+
}]
|
|
126
|
+
: [];
|
|
127
|
+
if (cache !== undefined) {
|
|
128
|
+
const cacheDiags = await verifyUpstreamCache(lockParse.lockfile.upstreams, cache.cacheRoot, cache.readFile);
|
|
129
|
+
// verifyUpstreamCache is a reusable, lockfile-path-agnostic probe and
|
|
130
|
+
// emits `location: undefined` (see cache_check.ts). Stamp the same
|
|
131
|
+
// lockfile location the sibling edge-drift MSL-L212 above uses, so both
|
|
132
|
+
// findings from the same `markspec.lock` group under one file for a
|
|
133
|
+
// JSON consumer keyed on `location.file`.
|
|
134
|
+
for (const d of cacheDiags) {
|
|
135
|
+
diagnostics.push({
|
|
136
|
+
...d,
|
|
137
|
+
location: { file: lockPath, line: 1, column: 1 },
|
|
138
|
+
});
|
|
139
|
+
}
|
|
140
|
+
}
|
|
141
|
+
return diagnostics;
|
|
115
142
|
}
|
|
116
143
|
/**
|
|
117
144
|
* Prose-lint gate — the advisory `MSL-Q` prose-analysis findings, projected to
|
package/esm/lint/runner.d.ts.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"runner.d.ts","sourceRoot":"","sources":["../../src/lint/runner.ts"],"names":[],"mappings":"AAAA;;;;;;;GAOG;AAEH,OAAO,KAAK,EAAE,gBAAgB,EAAE,KAAK,EAAE,MAAM,iBAAiB,CAAC;AAG/D,OAAO,KAAK,EAAE,cAAc,EAAE,MAAM,YAAY,CAAC;AAUjD,OAAO,KAAK,EAAE,UAAU,EAAiB,MAAM,eAAe,CAAC;AAY/D,OAAO,KAAK,EAAE,WAAW,EAAE,MAAM,YAAY,CAAC;AAgB9C;;;;;;;;;;;;GAYG;AACH,wBAAgB,YAAY,CAC1B,KAAK,EAAE,KAAK,EACZ,OAAO,CAAC,EAAE,gBAAgB,GACzB,OAAO,CAKT;AAMD,MAAM,WAAW,WAAW;IAC1B,QAAQ,CAAC,OAAO,EAAE,SAAS,KAAK,EAAE,CAAC;IACnC;;;;;OAKG;IACH,QAAQ,CAAC,OAAO,CAAC,EAAE,gBAAgB,CAAC;IACpC,6EAA6E;IAC7E,QAAQ,CAAC,gBAAgB,CAAC,EAAE,WAAW,CAAC,MAAM,CAAC,CAAC;IAChD,yEAAyE;IACzE,QAAQ,CAAC,iBAAiB,CAAC,EAAE,SAAS,MAAM,EAAE,CAAC;IAC/C,mDAAmD;IACnD,QAAQ,CAAC,QAAQ,CAAC,EAAE,UAAU,CAAC;CAChC;AAED,MAAM,WAAW,UAAU;IACzB,QAAQ,CAAC,WAAW,EAAE,SAAS,cAAc,EAAE,CAAC;IAChD,QAAQ,CAAC,KAAK,EAAE,WAAW,CAAC;CAC7B;AAoBD;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;GAiCG;AACH,wBAAsB,OAAO,CAAC,OAAO,EAAE,WAAW,GAAG,OAAO,CAAC,UAAU,CAAC,
|
|
1
|
+
{"version":3,"file":"runner.d.ts","sourceRoot":"","sources":["../../src/lint/runner.ts"],"names":[],"mappings":"AAAA;;;;;;;GAOG;AAEH,OAAO,KAAK,EAAE,gBAAgB,EAAE,KAAK,EAAE,MAAM,iBAAiB,CAAC;AAG/D,OAAO,KAAK,EAAE,cAAc,EAAE,MAAM,YAAY,CAAC;AAUjD,OAAO,KAAK,EAAE,UAAU,EAAiB,MAAM,eAAe,CAAC;AAY/D,OAAO,KAAK,EAAE,WAAW,EAAE,MAAM,YAAY,CAAC;AAgB9C;;;;;;;;;;;;GAYG;AACH,wBAAgB,YAAY,CAC1B,KAAK,EAAE,KAAK,EACZ,OAAO,CAAC,EAAE,gBAAgB,GACzB,OAAO,CAKT;AAMD,MAAM,WAAW,WAAW;IAC1B,QAAQ,CAAC,OAAO,EAAE,SAAS,KAAK,EAAE,CAAC;IACnC;;;;;OAKG;IACH,QAAQ,CAAC,OAAO,CAAC,EAAE,gBAAgB,CAAC;IACpC,6EAA6E;IAC7E,QAAQ,CAAC,gBAAgB,CAAC,EAAE,WAAW,CAAC,MAAM,CAAC,CAAC;IAChD,yEAAyE;IACzE,QAAQ,CAAC,iBAAiB,CAAC,EAAE,SAAS,MAAM,EAAE,CAAC;IAC/C,mDAAmD;IACnD,QAAQ,CAAC,QAAQ,CAAC,EAAE,UAAU,CAAC;CAChC;AAED,MAAM,WAAW,UAAU;IACzB,QAAQ,CAAC,WAAW,EAAE,SAAS,cAAc,EAAE,CAAC;IAChD,QAAQ,CAAC,KAAK,EAAE,WAAW,CAAC;CAC7B;AAoBD;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;GAiCG;AACH,wBAAsB,OAAO,CAAC,OAAO,EAAE,WAAW,GAAG,OAAO,CAAC,UAAU,CAAC,CA4FvE"}
|
package/esm/lint/runner.js
CHANGED
|
@@ -116,7 +116,9 @@ export async function runLint(options) {
|
|
|
116
116
|
// Steps 1–9: collect diagnostics keyed by entry. Delivered-corpus entries
|
|
117
117
|
// (`entry.origin`) are excluded from rule execution — a consumer cannot fix
|
|
118
118
|
// upstream prose (ADR-030 §D4) — even though they contribute to the indexes
|
|
119
|
-
// above.
|
|
119
|
+
// above. Deliberately BROADER than the validators' `emittableEntries`
|
|
120
|
+
// partition (upstream-only, #771): profile corpus stays structurally
|
|
121
|
+
// validated but is never prose-linted — do not "unify" this filter.
|
|
120
122
|
const inScopeDiags = new Map();
|
|
121
123
|
for (const entry of entries) {
|
|
122
124
|
if (entry.origin)
|
|
@@ -0,0 +1,31 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* @module core/lock/acquire_compile
|
|
3
|
+
*
|
|
4
|
+
* Deterministic in-process compile of an acquired dependency tree
|
|
5
|
+
* (design §4.3). Produces the same `manifest.json` + `compiled.json` layout
|
|
6
|
+
* a published `references:` site serves, so `loadUpstreamCorpus` /
|
|
7
|
+
* `probeCacheSnapshot` read a dependency snapshot identically to a reference
|
|
8
|
+
* snapshot. The output is byte-reproducible from (tree, markspec version):
|
|
9
|
+
* files are compiled in sorted, tree-relative order with no stat/git IO, so
|
|
10
|
+
* `entry.location.file`, `properties.file.path`, and entry ordering are all
|
|
11
|
+
* stable. Pure — every file touch flows through {@linkcode AcquireCompileIO}.
|
|
12
|
+
*/
|
|
13
|
+
import { type ManifestJson } from "../compiler/manifest.js";
|
|
14
|
+
import { type DiscoveryIO } from "../discovery/mod.js";
|
|
15
|
+
export interface AcquireCompileIO {
|
|
16
|
+
/** Config/profile reader — returns text or undefined (core `ReadFile`). */
|
|
17
|
+
readonly readFile: (path: string) => Promise<string | undefined>;
|
|
18
|
+
/** Throwing reader compile() consumes (`(path) => Promise<string>`). */
|
|
19
|
+
readonly readText: (path: string) => Promise<string>;
|
|
20
|
+
/** Discovery seam (`{ readDir, readFile }`) — same as `denoDiscoveryIO()`. */
|
|
21
|
+
readonly discovery: DiscoveryIO;
|
|
22
|
+
}
|
|
23
|
+
export interface CompiledSnapshot {
|
|
24
|
+
readonly manifestJson: ManifestJson;
|
|
25
|
+
readonly compiledBytes: Uint8Array;
|
|
26
|
+
readonly snapshot: string;
|
|
27
|
+
}
|
|
28
|
+
export declare function compileAcquiredTree(treeRoot: string, io: AcquireCompileIO, release: string): Promise<CompiledSnapshot | {
|
|
29
|
+
error: string;
|
|
30
|
+
}>;
|
|
31
|
+
//# sourceMappingURL=acquire_compile.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"acquire_compile.d.ts","sourceRoot":"","sources":["../../src/lock/acquire_compile.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;GAWG;AAIH,OAAO,EAAiB,KAAK,YAAY,EAAE,MAAM,yBAAyB,CAAC;AAK3E,OAAO,EAAiB,KAAK,WAAW,EAAE,MAAM,qBAAqB,CAAC;AAGtE,MAAM,WAAW,gBAAgB;IAC/B,2EAA2E;IAC3E,QAAQ,CAAC,QAAQ,EAAE,CAAC,IAAI,EAAE,MAAM,KAAK,OAAO,CAAC,MAAM,GAAG,SAAS,CAAC,CAAC;IACjE,wEAAwE;IACxE,QAAQ,CAAC,QAAQ,EAAE,CAAC,IAAI,EAAE,MAAM,KAAK,OAAO,CAAC,MAAM,CAAC,CAAC;IACrD,8EAA8E;IAC9E,QAAQ,CAAC,SAAS,EAAE,WAAW,CAAC;CACjC;AAED,MAAM,WAAW,gBAAgB;IAC/B,QAAQ,CAAC,YAAY,EAAE,YAAY,CAAC;IACpC,QAAQ,CAAC,aAAa,EAAE,UAAU,CAAC;IACnC,QAAQ,CAAC,QAAQ,EAAE,MAAM,CAAC;CAC3B;AAED,wBAAsB,mBAAmB,CACvC,QAAQ,EAAE,MAAM,EAChB,EAAE,EAAE,gBAAgB,EACpB,OAAO,EAAE,MAAM,GACd,OAAO,CAAC,gBAAgB,GAAG;IAAE,KAAK,EAAE,MAAM,CAAA;CAAE,CAAC,CA0E/C"}
|
|
@@ -0,0 +1,83 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* @module core/lock/acquire_compile
|
|
3
|
+
*
|
|
4
|
+
* Deterministic in-process compile of an acquired dependency tree
|
|
5
|
+
* (design §4.3). Produces the same `manifest.json` + `compiled.json` layout
|
|
6
|
+
* a published `references:` site serves, so `loadUpstreamCorpus` /
|
|
7
|
+
* `probeCacheSnapshot` read a dependency snapshot identically to a reference
|
|
8
|
+
* snapshot. The output is byte-reproducible from (tree, markspec version):
|
|
9
|
+
* files are compiled in sorted, tree-relative order with no stat/git IO, so
|
|
10
|
+
* `entry.location.file`, `properties.file.path`, and entry ordering are all
|
|
11
|
+
* stable. Pure — every file touch flows through {@linkcode AcquireCompileIO}.
|
|
12
|
+
*/
|
|
13
|
+
import { join, relative } from "@std/path";
|
|
14
|
+
import { compile } from "../compiler/mod.js";
|
|
15
|
+
import { buildManifest } from "../compiler/manifest.js";
|
|
16
|
+
import { serializeCompileResult } from "../compiler/schema.js";
|
|
17
|
+
import { loadConfig } from "../config/mod.js";
|
|
18
|
+
import { loadToolConfig } from "../config/markspec.js";
|
|
19
|
+
import { loadProfileForCommand } from "../profile/load.js";
|
|
20
|
+
import { discoverFiles } from "../discovery/mod.js";
|
|
21
|
+
import { sha256Bytes } from "./hash.js";
|
|
22
|
+
export async function compileAcquiredTree(treeRoot, io, release) {
|
|
23
|
+
// Memoize by path: loadConfig, loadProfileForCommand, and loadToolConfig
|
|
24
|
+
// each walk + read the same project.yaml/.markspec.yaml, so cache the
|
|
25
|
+
// in-flight promise per path to read each file exactly once per acquired
|
|
26
|
+
// tree. The tree is immutable (just fetched at a fixed sha), so a
|
|
27
|
+
// per-call cache is sound and deterministic.
|
|
28
|
+
const readCache = new Map();
|
|
29
|
+
const readFile = (path) => {
|
|
30
|
+
let pending = readCache.get(path);
|
|
31
|
+
if (pending === undefined) {
|
|
32
|
+
pending = io.readFile(path);
|
|
33
|
+
readCache.set(path, pending);
|
|
34
|
+
}
|
|
35
|
+
return pending;
|
|
36
|
+
};
|
|
37
|
+
const configResult = await loadConfig(treeRoot, readFile);
|
|
38
|
+
if (!configResult) {
|
|
39
|
+
return { error: "dependency tree has no discoverable project.yaml" };
|
|
40
|
+
}
|
|
41
|
+
const profileResult = await loadProfileForCommand(treeRoot, readFile);
|
|
42
|
+
const profile = profileResult.chain?.effective;
|
|
43
|
+
const toolConfig = await loadToolConfig(treeRoot, readFile);
|
|
44
|
+
// Discover → relativize → normalize to POSIX separators → sort. The
|
|
45
|
+
// `\\`→`/` normalization is load-bearing for cross-machine determinism:
|
|
46
|
+
// `relative()` yields OS-native separators, so a Windows host would emit
|
|
47
|
+
// `docs\reqs.md` while POSIX emits `docs/reqs.md`, giving two different
|
|
48
|
+
// `location.file`/`properties.file.path` values → two different snapshot
|
|
49
|
+
// hashes for the same source → spurious MSL-L212 drift between a Windows
|
|
50
|
+
// and a macOS/Linux developer sharing one lockfile. Normalizing before
|
|
51
|
+
// the sort also makes the entry order (hence JSON key order) identical
|
|
52
|
+
// on every platform.
|
|
53
|
+
const abs = [];
|
|
54
|
+
for await (const f of discoverFiles(treeRoot, io.discovery, {
|
|
55
|
+
exclude: toolConfig.config.exclude,
|
|
56
|
+
})) {
|
|
57
|
+
abs.push(f);
|
|
58
|
+
}
|
|
59
|
+
const rel = abs
|
|
60
|
+
.map((p) => relative(treeRoot, p).replaceAll("\\", "/"))
|
|
61
|
+
.sort();
|
|
62
|
+
// Compile with a root-resolving reader and NO stat/git callbacks →
|
|
63
|
+
// deterministic properties (no mtime, no contributors, relative path).
|
|
64
|
+
const result = await compile(rel, {
|
|
65
|
+
readFile: (r) => io.readText(join(treeRoot, r)),
|
|
66
|
+
profile,
|
|
67
|
+
});
|
|
68
|
+
// `root` is cosmetic here — manifest.json is not hashed (only compiled.json
|
|
69
|
+
// is) and lives in the gitignored cache; pass "." so no temp path leaks.
|
|
70
|
+
const manifestJson = buildManifest(result, configResult.config, ".", profile, release, false);
|
|
71
|
+
// Compact (no whitespace) rather than the CLI's pretty-printed form —
|
|
72
|
+
// this cache file is machine-read only (loadUpstreamCorpus /
|
|
73
|
+
// probeCacheSnapshot JSON.parse it), and compact output keeps
|
|
74
|
+
// `entry.location.file`'s tree-relative path adjacent to its `"file":`
|
|
75
|
+
// key with no formatting-introduced variance to reason about.
|
|
76
|
+
const compiled = serializeCompileResult(result);
|
|
77
|
+
const compiledBytes = new TextEncoder().encode(JSON.stringify(compiled));
|
|
78
|
+
return {
|
|
79
|
+
manifestJson,
|
|
80
|
+
compiledBytes,
|
|
81
|
+
snapshot: await sha256Bytes(compiledBytes),
|
|
82
|
+
};
|
|
83
|
+
}
|
|
@@ -0,0 +1,28 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* @module core/lock/cache_check
|
|
3
|
+
*
|
|
4
|
+
* Offline upstream cache-integrity check — the MSL-L212 cache-drift case
|
|
5
|
+
* (Task 9). For every locked upstream row that carries a `snapshot` hash
|
|
6
|
+
* (a federated registry or git-repository dependency), verify its cache
|
|
7
|
+
* under `<cacheRoot>/<id>/` is still present and hash-intact.
|
|
8
|
+
*
|
|
9
|
+
* Reuses {@linkcode probeCacheSnapshot} — the exact probe
|
|
10
|
+
* `resolveProjectReferences`'s keep/restore flow already uses
|
|
11
|
+
* (`upstream_refs.ts`, Task 5) — so `markspec check` and `markspec lock`
|
|
12
|
+
* never disagree on what "cache intact" means. Rows without a `snapshot`
|
|
13
|
+
* (legacy registry rows predating this field, or upstream kinds that never
|
|
14
|
+
* carry one — reference, profile) are skipped: there is nothing to verify
|
|
15
|
+
* offline.
|
|
16
|
+
*
|
|
17
|
+
* Pure module: file access only via the injected {@linkcode ReadFile}.
|
|
18
|
+
*/
|
|
19
|
+
import type { Diagnostic } from "../model/mod.js";
|
|
20
|
+
import type { Upstream } from "./model.js";
|
|
21
|
+
import type { ReadFile } from "./resolve.js";
|
|
22
|
+
/**
|
|
23
|
+
* Verify every snapshot-carrying upstream row's cache under `cacheRoot`.
|
|
24
|
+
* One `MSL-L212` diagnostic per row whose cache is missing or whose
|
|
25
|
+
* entries-file hash no longer matches the locked `snapshot`.
|
|
26
|
+
*/
|
|
27
|
+
export declare function verifyUpstreamCache(upstreams: readonly Upstream[], cacheRoot: string, readFile: ReadFile): Promise<Diagnostic[]>;
|
|
28
|
+
//# sourceMappingURL=cache_check.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"cache_check.d.ts","sourceRoot":"","sources":["../../src/lock/cache_check.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;;;;GAiBG;AAGH,OAAO,KAAK,EAAE,UAAU,EAAE,MAAM,iBAAiB,CAAC;AAClD,OAAO,KAAK,EAAE,QAAQ,EAAE,MAAM,YAAY,CAAC;AAC3C,OAAO,KAAK,EAAE,QAAQ,EAAE,MAAM,cAAc,CAAC;AAa7C;;;;GAIG;AACH,wBAAsB,mBAAmB,CACvC,SAAS,EAAE,SAAS,QAAQ,EAAE,EAC9B,SAAS,EAAE,MAAM,EACjB,QAAQ,EAAE,QAAQ,GACjB,OAAO,CAAC,UAAU,EAAE,CAAC,CAevB"}
|
|
@@ -0,0 +1,51 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* @module core/lock/cache_check
|
|
3
|
+
*
|
|
4
|
+
* Offline upstream cache-integrity check — the MSL-L212 cache-drift case
|
|
5
|
+
* (Task 9). For every locked upstream row that carries a `snapshot` hash
|
|
6
|
+
* (a federated registry or git-repository dependency), verify its cache
|
|
7
|
+
* under `<cacheRoot>/<id>/` is still present and hash-intact.
|
|
8
|
+
*
|
|
9
|
+
* Reuses {@linkcode probeCacheSnapshot} — the exact probe
|
|
10
|
+
* `resolveProjectReferences`'s keep/restore flow already uses
|
|
11
|
+
* (`upstream_refs.ts`, Task 5) — so `markspec check` and `markspec lock`
|
|
12
|
+
* never disagree on what "cache intact" means. Rows without a `snapshot`
|
|
13
|
+
* (legacy registry rows predating this field, or upstream kinds that never
|
|
14
|
+
* carry one — reference, profile) are skipped: there is nothing to verify
|
|
15
|
+
* offline.
|
|
16
|
+
*
|
|
17
|
+
* Pure module: file access only via the injected {@linkcode ReadFile}.
|
|
18
|
+
*/
|
|
19
|
+
import { join } from "@std/path";
|
|
20
|
+
import { probeCacheSnapshot } from "./upstream_refs.js";
|
|
21
|
+
function cacheDriftDiagnostic(id) {
|
|
22
|
+
return {
|
|
23
|
+
code: "MSL-L212",
|
|
24
|
+
severity: "error",
|
|
25
|
+
message: `upstream '${id}' cache snapshot is missing or does not match markspec.lock — run 'markspec lock'`,
|
|
26
|
+
location: undefined,
|
|
27
|
+
};
|
|
28
|
+
}
|
|
29
|
+
/**
|
|
30
|
+
* Verify every snapshot-carrying upstream row's cache under `cacheRoot`.
|
|
31
|
+
* One `MSL-L212` diagnostic per row whose cache is missing or whose
|
|
32
|
+
* entries-file hash no longer matches the locked `snapshot`.
|
|
33
|
+
*/
|
|
34
|
+
export async function verifyUpstreamCache(upstreams, cacheRoot, readFile) {
|
|
35
|
+
const diagnostics = [];
|
|
36
|
+
for (const upstream of upstreams) {
|
|
37
|
+
if (upstream.kind !== "registry" && upstream.kind !== "dependency") {
|
|
38
|
+
continue; // references/profiles never carry a cache snapshot
|
|
39
|
+
}
|
|
40
|
+
if (upstream.snapshot === undefined)
|
|
41
|
+
continue; // legacy row — skip
|
|
42
|
+
// join() at construction (#771): a template concat would mix the
|
|
43
|
+
// platform separator with a literal `/` — the Windows drift class
|
|
44
|
+
// that bit slices 2 and 4. Writer and reader must agree byte-for-byte.
|
|
45
|
+
const dir = join(cacheRoot, upstream.id);
|
|
46
|
+
const intact = await probeCacheSnapshot(dir, upstream.snapshot, readFile);
|
|
47
|
+
if (!intact)
|
|
48
|
+
diagnostics.push(cacheDriftDiagnostic(upstream.id));
|
|
49
|
+
}
|
|
50
|
+
return diagnostics;
|
|
51
|
+
}
|
package/esm/lock/check.d.ts
CHANGED
|
@@ -6,11 +6,18 @@
|
|
|
6
6
|
* category. Pure function — no I/O.
|
|
7
7
|
*
|
|
8
8
|
* Drift categories:
|
|
9
|
-
* - MSL-L202 — upstream in resolved but missing from lockfile
|
|
10
|
-
*
|
|
9
|
+
* - MSL-L202 — upstream in resolved but missing from lockfile (also:
|
|
10
|
+
* a declared reference with no lockfile registry row)
|
|
11
|
+
* - MSL-L203 — upstream in lockfile but missing from resolved (also:
|
|
12
|
+
* a locked registry row no longer declared in project.yaml)
|
|
11
13
|
* - MSL-L210 — hash mismatch (same identity, different bytes)
|
|
12
14
|
* - MSL-L211 — profile resolved-version drift (npm range now resolves a different exact version)
|
|
13
15
|
* - MSL-L212 — canonical edge hash drift (traceability graph changed)
|
|
16
|
+
*
|
|
17
|
+
* Federated registry rows (org `references:`) are checked by pure
|
|
18
|
+
* id-presence against `declaredReferenceIds` — no hash comparison.
|
|
19
|
+
* Content integrity for those rows is the offline cache gate (a later
|
|
20
|
+
* task), not this online-vs-lockfile comparison.
|
|
14
21
|
*/
|
|
15
22
|
import type { Diagnostic } from "../model/mod.js";
|
|
16
23
|
import type { Lockfile } from "./model.js";
|
|
@@ -19,6 +26,10 @@ import type { ResolvedUpstreams } from "./resolve.js";
|
|
|
19
26
|
* Compare locked vs resolved upstreams; return one diagnostic per drift
|
|
20
27
|
* case. An empty result means the lockfile is in sync with the current
|
|
21
28
|
* project state.
|
|
29
|
+
*
|
|
30
|
+
* @param declaredReferenceIds - Upstream ids derived from
|
|
31
|
+
* `config.references` (via `deriveUpstreamId`) — the id-presence
|
|
32
|
+
* comparison set for federated registry rows.
|
|
22
33
|
*/
|
|
23
|
-
export declare function checkDrift(locked: Lockfile, resolved: ResolvedUpstreams): Diagnostic[];
|
|
34
|
+
export declare function checkDrift(locked: Lockfile, resolved: ResolvedUpstreams, declaredReferenceIds: readonly string[]): Diagnostic[];
|
|
24
35
|
//# sourceMappingURL=check.d.ts.map
|
package/esm/lock/check.d.ts.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"check.d.ts","sourceRoot":"","sources":["../../src/lock/check.ts"],"names":[],"mappings":"AAAA
|
|
1
|
+
{"version":3,"file":"check.d.ts","sourceRoot":"","sources":["../../src/lock/check.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;;;;;;;GAoBG;AAEH,OAAO,KAAK,EAAE,UAAU,EAAE,MAAM,iBAAiB,CAAC;AAClD,OAAO,KAAK,EACV,QAAQ,EAIT,MAAM,YAAY,CAAC;AACpB,OAAO,KAAK,EAAE,iBAAiB,EAAE,MAAM,cAAc,CAAC;AAEtD;;;;;;;;GAQG;AACH,wBAAgB,UAAU,CACxB,MAAM,EAAE,QAAQ,EAChB,QAAQ,EAAE,iBAAiB,EAC3B,oBAAoB,EAAE,SAAS,MAAM,EAAE,GACtC,UAAU,EAAE,CA0Jd"}
|
package/esm/lock/check.js
CHANGED
|
@@ -6,18 +6,29 @@
|
|
|
6
6
|
* category. Pure function — no I/O.
|
|
7
7
|
*
|
|
8
8
|
* Drift categories:
|
|
9
|
-
* - MSL-L202 — upstream in resolved but missing from lockfile
|
|
10
|
-
*
|
|
9
|
+
* - MSL-L202 — upstream in resolved but missing from lockfile (also:
|
|
10
|
+
* a declared reference with no lockfile registry row)
|
|
11
|
+
* - MSL-L203 — upstream in lockfile but missing from resolved (also:
|
|
12
|
+
* a locked registry row no longer declared in project.yaml)
|
|
11
13
|
* - MSL-L210 — hash mismatch (same identity, different bytes)
|
|
12
14
|
* - MSL-L211 — profile resolved-version drift (npm range now resolves a different exact version)
|
|
13
15
|
* - MSL-L212 — canonical edge hash drift (traceability graph changed)
|
|
16
|
+
*
|
|
17
|
+
* Federated registry rows (org `references:`) are checked by pure
|
|
18
|
+
* id-presence against `declaredReferenceIds` — no hash comparison.
|
|
19
|
+
* Content integrity for those rows is the offline cache gate (a later
|
|
20
|
+
* task), not this online-vs-lockfile comparison.
|
|
14
21
|
*/
|
|
15
22
|
/**
|
|
16
23
|
* Compare locked vs resolved upstreams; return one diagnostic per drift
|
|
17
24
|
* case. An empty result means the lockfile is in sync with the current
|
|
18
25
|
* project state.
|
|
26
|
+
*
|
|
27
|
+
* @param declaredReferenceIds - Upstream ids derived from
|
|
28
|
+
* `config.references` (via `deriveUpstreamId`) — the id-presence
|
|
29
|
+
* comparison set for federated registry rows.
|
|
19
30
|
*/
|
|
20
|
-
export function checkDrift(locked, resolved) {
|
|
31
|
+
export function checkDrift(locked, resolved, declaredReferenceIds) {
|
|
21
32
|
const diags = [];
|
|
22
33
|
// -------------------------------------------------------------------------
|
|
23
34
|
// References — match by slug.
|
|
@@ -113,6 +124,33 @@ export function checkDrift(locked, resolved) {
|
|
|
113
124
|
}
|
|
114
125
|
}
|
|
115
126
|
// -------------------------------------------------------------------------
|
|
127
|
+
// Federated registries — pure id-presence against declared references.
|
|
128
|
+
// No hash comparison: content integrity is the offline cache gate.
|
|
129
|
+
// -------------------------------------------------------------------------
|
|
130
|
+
const lockedRegistries = locked.upstreams.filter((u) => u.kind === "registry");
|
|
131
|
+
const lockedRegistryIds = new Set(lockedRegistries.map((r) => r.id));
|
|
132
|
+
for (const id of declaredReferenceIds) {
|
|
133
|
+
if (!lockedRegistryIds.has(id)) {
|
|
134
|
+
diags.push({
|
|
135
|
+
code: "MSL-L202",
|
|
136
|
+
severity: "error",
|
|
137
|
+
message: `declared reference '${id}' has no lockfile row — run 'markspec lock'`,
|
|
138
|
+
location: undefined,
|
|
139
|
+
});
|
|
140
|
+
}
|
|
141
|
+
}
|
|
142
|
+
const declaredRegistryIds = new Set(declaredReferenceIds);
|
|
143
|
+
for (const row of lockedRegistries) {
|
|
144
|
+
if (!declaredRegistryIds.has(row.id)) {
|
|
145
|
+
diags.push({
|
|
146
|
+
code: "MSL-L203",
|
|
147
|
+
severity: "error",
|
|
148
|
+
message: `locked reference '${row.id}' is no longer declared in project.yaml — run 'markspec lock'`,
|
|
149
|
+
location: undefined,
|
|
150
|
+
});
|
|
151
|
+
}
|
|
152
|
+
}
|
|
153
|
+
// -------------------------------------------------------------------------
|
|
116
154
|
// Canonical edge hash — single comparison, MSL-L212 on mismatch.
|
|
117
155
|
// -------------------------------------------------------------------------
|
|
118
156
|
if (locked.generatedCache.edgesHash !== resolved.canonicalEdgeHash) {
|
|
@@ -0,0 +1,46 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* @module core/lock/git_intent
|
|
3
|
+
*
|
|
4
|
+
* Pure git-intent resolution for federated dependencies (design §4.3).
|
|
5
|
+
* Parses `git ls-remote --symref` output into a {@linkcode RefList} and
|
|
6
|
+
* resolves a declared version intent (`auto` | `<tag>` | `<branch>` |
|
|
7
|
+
* `<sha>`) to an exact commit + a resolution-kind label. No I/O — the CLI
|
|
8
|
+
* runs git and hands the raw stdout in; unit tests feed fixture strings.
|
|
9
|
+
*/
|
|
10
|
+
export interface GitRef {
|
|
11
|
+
readonly name: string;
|
|
12
|
+
readonly kind: "tag" | "branch";
|
|
13
|
+
readonly sha: string;
|
|
14
|
+
}
|
|
15
|
+
export interface RefList {
|
|
16
|
+
readonly refs: readonly GitRef[];
|
|
17
|
+
readonly headSha?: string;
|
|
18
|
+
readonly defaultBranch?: string;
|
|
19
|
+
}
|
|
20
|
+
export interface ResolvedIntent {
|
|
21
|
+
readonly sha: string;
|
|
22
|
+
readonly resolved: string;
|
|
23
|
+
}
|
|
24
|
+
/**
|
|
25
|
+
* Parse `git ls-remote --symref <url>` output. Peeled annotated-tag lines
|
|
26
|
+
* (`refs/tags/x^{}`) override the tag-object sha with the underlying commit
|
|
27
|
+
* — that commit is what a checkout resolves to and what we pin.
|
|
28
|
+
*/
|
|
29
|
+
export declare function parseLsRemote(stdout: string): RefList;
|
|
30
|
+
/**
|
|
31
|
+
* Resolve a declared intent to an exact `{ sha, resolved }`.
|
|
32
|
+
*
|
|
33
|
+
* - `auto` → highest valid-semver tag (leading `v` tolerated); if none, the
|
|
34
|
+
* default-branch head.
|
|
35
|
+
* - a name matching a tag → `tag:<name>` (tag wins if a branch shares the name).
|
|
36
|
+
* - a name matching a branch → `branch:<name>`.
|
|
37
|
+
* - a 40-hex string (any case) → normalized to lowercase → `sha:<sha>` (the
|
|
38
|
+
* acquire step validates it). Lowercasing keeps the pin byte-identical
|
|
39
|
+
* regardless of the case a developer typed, so two lockfiles never differ
|
|
40
|
+
* on sha case alone.
|
|
41
|
+
* - otherwise → `{ error }`.
|
|
42
|
+
*/
|
|
43
|
+
export declare function resolveIntent(intent: string, refs: RefList): ResolvedIntent | {
|
|
44
|
+
error: string;
|
|
45
|
+
};
|
|
46
|
+
//# sourceMappingURL=git_intent.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"git_intent.d.ts","sourceRoot":"","sources":["../../src/lock/git_intent.ts"],"names":[],"mappings":"AAAA;;;;;;;;GAQG;AAIH,MAAM,WAAW,MAAM;IACrB,QAAQ,CAAC,IAAI,EAAE,MAAM,CAAC;IACtB,QAAQ,CAAC,IAAI,EAAE,KAAK,GAAG,QAAQ,CAAC;IAChC,QAAQ,CAAC,GAAG,EAAE,MAAM,CAAC;CACtB;AAED,MAAM,WAAW,OAAO;IACtB,QAAQ,CAAC,IAAI,EAAE,SAAS,MAAM,EAAE,CAAC;IACjC,QAAQ,CAAC,OAAO,CAAC,EAAE,MAAM,CAAC;IAC1B,QAAQ,CAAC,aAAa,CAAC,EAAE,MAAM,CAAC;CACjC;AAED,MAAM,WAAW,cAAc;IAC7B,QAAQ,CAAC,GAAG,EAAE,MAAM,CAAC;IACrB,QAAQ,CAAC,QAAQ,EAAE,MAAM,CAAC;CAC3B;AAQD;;;;GAIG;AACH,wBAAgB,aAAa,CAAC,MAAM,EAAE,MAAM,GAAG,OAAO,CA0CrD;AAED;;;;;;;;;;;;GAYG;AACH,wBAAgB,aAAa,CAC3B,MAAM,EAAE,MAAM,EACd,IAAI,EAAE,OAAO,GACZ,cAAc,GAAG;IAAE,KAAK,EAAE,MAAM,CAAA;CAAE,CAiCpC"}
|
|
@@ -0,0 +1,111 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* @module core/lock/git_intent
|
|
3
|
+
*
|
|
4
|
+
* Pure git-intent resolution for federated dependencies (design §4.3).
|
|
5
|
+
* Parses `git ls-remote --symref` output into a {@linkcode RefList} and
|
|
6
|
+
* resolves a declared version intent (`auto` | `<tag>` | `<branch>` |
|
|
7
|
+
* `<sha>`) to an exact commit + a resolution-kind label. No I/O — the CLI
|
|
8
|
+
* runs git and hands the raw stdout in; unit tests feed fixture strings.
|
|
9
|
+
*/
|
|
10
|
+
import { compare, tryParse } from "@std/semver";
|
|
11
|
+
const SHA_RE = /^[0-9a-fA-F]{40}$/;
|
|
12
|
+
/** Strip a single leading `v`/`V` so `v2.1.0` parses as semver. */
|
|
13
|
+
function semverText(tag) {
|
|
14
|
+
return /^[vV]/.test(tag) ? tag.slice(1) : tag;
|
|
15
|
+
}
|
|
16
|
+
/**
|
|
17
|
+
* Parse `git ls-remote --symref <url>` output. Peeled annotated-tag lines
|
|
18
|
+
* (`refs/tags/x^{}`) override the tag-object sha with the underlying commit
|
|
19
|
+
* — that commit is what a checkout resolves to and what we pin.
|
|
20
|
+
*/
|
|
21
|
+
export function parseLsRemote(stdout) {
|
|
22
|
+
const branches = new Map();
|
|
23
|
+
const tags = new Map();
|
|
24
|
+
let headSha;
|
|
25
|
+
let defaultBranch;
|
|
26
|
+
for (const raw of stdout.split("\n")) {
|
|
27
|
+
const line = raw.trimEnd();
|
|
28
|
+
if (line.length === 0)
|
|
29
|
+
continue;
|
|
30
|
+
if (line.startsWith("ref: ")) {
|
|
31
|
+
// `ref: refs/heads/main\tHEAD` — the symref for HEAD.
|
|
32
|
+
const m = line.match(/^ref:\s+refs\/heads\/(\S+)\s+HEAD$/);
|
|
33
|
+
if (m)
|
|
34
|
+
defaultBranch = m[1];
|
|
35
|
+
continue;
|
|
36
|
+
}
|
|
37
|
+
const tab = line.indexOf("\t");
|
|
38
|
+
if (tab < 0)
|
|
39
|
+
continue;
|
|
40
|
+
const sha = line.slice(0, tab);
|
|
41
|
+
const ref = line.slice(tab + 1);
|
|
42
|
+
if (ref === "HEAD") {
|
|
43
|
+
headSha = sha;
|
|
44
|
+
}
|
|
45
|
+
else if (ref.startsWith("refs/heads/")) {
|
|
46
|
+
branches.set(ref.slice("refs/heads/".length), sha);
|
|
47
|
+
}
|
|
48
|
+
else if (ref.startsWith("refs/tags/")) {
|
|
49
|
+
const rest = ref.slice("refs/tags/".length);
|
|
50
|
+
const peeled = rest.endsWith("^{}");
|
|
51
|
+
const name = peeled ? rest.slice(0, -3) : rest;
|
|
52
|
+
// A peeled line always wins; a bare tag line only sets the sha if no
|
|
53
|
+
// peeled sha was recorded yet.
|
|
54
|
+
if (peeled || !tags.has(name))
|
|
55
|
+
tags.set(name, sha);
|
|
56
|
+
}
|
|
57
|
+
}
|
|
58
|
+
const refs = [
|
|
59
|
+
...[...branches].map(([name, sha]) => ({
|
|
60
|
+
name,
|
|
61
|
+
kind: "branch",
|
|
62
|
+
sha,
|
|
63
|
+
})),
|
|
64
|
+
...[...tags].map(([name, sha]) => ({ name, kind: "tag", sha })),
|
|
65
|
+
];
|
|
66
|
+
return { refs, headSha, defaultBranch };
|
|
67
|
+
}
|
|
68
|
+
/**
|
|
69
|
+
* Resolve a declared intent to an exact `{ sha, resolved }`.
|
|
70
|
+
*
|
|
71
|
+
* - `auto` → highest valid-semver tag (leading `v` tolerated); if none, the
|
|
72
|
+
* default-branch head.
|
|
73
|
+
* - a name matching a tag → `tag:<name>` (tag wins if a branch shares the name).
|
|
74
|
+
* - a name matching a branch → `branch:<name>`.
|
|
75
|
+
* - a 40-hex string (any case) → normalized to lowercase → `sha:<sha>` (the
|
|
76
|
+
* acquire step validates it). Lowercasing keeps the pin byte-identical
|
|
77
|
+
* regardless of the case a developer typed, so two lockfiles never differ
|
|
78
|
+
* on sha case alone.
|
|
79
|
+
* - otherwise → `{ error }`.
|
|
80
|
+
*/
|
|
81
|
+
export function resolveIntent(intent, refs) {
|
|
82
|
+
if (intent === "auto") {
|
|
83
|
+
const semverTags = refs.refs
|
|
84
|
+
.filter((r) => r.kind === "tag")
|
|
85
|
+
.map((r) => ({ r, v: tryParse(semverText(r.name)) }))
|
|
86
|
+
.filter((x) => x.v !== undefined)
|
|
87
|
+
.sort((a, b) => compare(b.v, a.v));
|
|
88
|
+
if (semverTags.length > 0) {
|
|
89
|
+
const top = semverTags[0].r;
|
|
90
|
+
return { sha: top.sha, resolved: `tag:${top.name}` };
|
|
91
|
+
}
|
|
92
|
+
if (refs.headSha !== undefined) {
|
|
93
|
+
return {
|
|
94
|
+
sha: refs.headSha,
|
|
95
|
+
resolved: `branch:${refs.defaultBranch ?? "HEAD"}`,
|
|
96
|
+
};
|
|
97
|
+
}
|
|
98
|
+
return { error: "intent 'auto': remote has no tags and no HEAD" };
|
|
99
|
+
}
|
|
100
|
+
const tag = refs.refs.find((r) => r.kind === "tag" && r.name === intent);
|
|
101
|
+
if (tag)
|
|
102
|
+
return { sha: tag.sha, resolved: `tag:${tag.name}` };
|
|
103
|
+
const branch = refs.refs.find((r) => r.kind === "branch" && r.name === intent);
|
|
104
|
+
if (branch)
|
|
105
|
+
return { sha: branch.sha, resolved: `branch:${branch.name}` };
|
|
106
|
+
if (SHA_RE.test(intent)) {
|
|
107
|
+
const sha = intent.toLowerCase();
|
|
108
|
+
return { sha, resolved: `sha:${sha}` };
|
|
109
|
+
}
|
|
110
|
+
return { error: `intent '${intent}' matched no tag or branch on the remote` };
|
|
111
|
+
}
|
package/esm/lock/mod.d.ts
CHANGED
|
@@ -5,11 +5,12 @@
|
|
|
5
5
|
* model, upstream resolution, drift detection. The public boundary
|
|
6
6
|
* for both `markspec lock` and `markspec compile --frozen`.
|
|
7
7
|
*/
|
|
8
|
-
export type { BoundEntry, BoundEntryBinding, GeneratedCache, LockedAttributes, LockEdge, Lockfile, LockfileMeta, LockfileToolchain, Upstream, UpstreamProfile, UpstreamReference, UpstreamRegistry, } from "./model.js";
|
|
8
|
+
export type { BoundEntry, BoundEntryBinding, GeneratedCache, LockedAttributes, LockEdge, Lockfile, LockfileMeta, LockfileToolchain, Upstream, UpstreamDependency, UpstreamProfile, UpstreamReference, UpstreamRegistry, } from "./model.js";
|
|
9
9
|
export { LOCKFILE_SCHEMA_VERSION } from "./model.js";
|
|
10
10
|
export { serializeLockfile } from "./serializer.js";
|
|
11
11
|
export { parseLockfile } from "./parser.js";
|
|
12
12
|
export type { ParseLockfileResult } from "./parser.js";
|
|
13
|
+
export { dependencyPinAssurance } from "./pin_assurance.js";
|
|
13
14
|
export { isBelowFloor } from "./compare.js";
|
|
14
15
|
export { checkDrift } from "./check.js";
|
|
15
16
|
export { sha256Bytes, sha256String } from "./hash.js";
|
|
@@ -17,6 +18,12 @@ export { canonicalEdgeJson, hashCanonicalEdges } from "./canonical_edges.js";
|
|
|
17
18
|
export type { EdgeQuad } from "./canonical_edges.js";
|
|
18
19
|
export { detectOfflineEdgeDrift } from "./edge_drift.js";
|
|
19
20
|
export type { OfflineEdgeDrift } from "./edge_drift.js";
|
|
20
|
-
export {
|
|
21
|
-
export
|
|
21
|
+
export { verifyUpstreamCache } from "./cache_check.js";
|
|
22
|
+
export { extractEdgeLedger, extractEdgeQuads, resolveBoundEntries, resolveProfileChain, resolveReferences, resolveUpstreams, } from "./resolve.js";
|
|
23
|
+
export type { FetchUrl, ReadFile, ResolvedBoundEntry, ResolvedProfile, ResolvedReference, ResolvedUpstreams, ResolveUpstreamsOptions, } from "./resolve.js";
|
|
24
|
+
export { deriveUpstreamId, resolveProjectReferences, upstreamCacheRoot, } from "./upstream_refs.js";
|
|
25
|
+
export type { ResolveProjectReferencesOptions, ResolveProjectReferencesResult, UpstreamRefsIO, } from "./upstream_refs.js";
|
|
26
|
+
export { type GitIO, resolveProjectDependencies, type ResolveProjectDependenciesOptions, type ResolveProjectDependenciesResult, type UpstreamDepsIO, } from "./upstream_deps.js";
|
|
27
|
+
export { type AcquireCompileIO, compileAcquiredTree, type CompiledSnapshot, } from "./acquire_compile.js";
|
|
28
|
+
export { type GitRef, parseLsRemote, type RefList, type ResolvedIntent, resolveIntent, } from "./git_intent.js";
|
|
22
29
|
//# sourceMappingURL=mod.d.ts.map
|
package/esm/lock/mod.d.ts.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"mod.d.ts","sourceRoot":"","sources":["../../src/lock/mod.ts"],"names":[],"mappings":"AAAA;;;;;;GAMG;AAEH,YAAY,EACV,UAAU,EACV,iBAAiB,EACjB,cAAc,EACd,gBAAgB,EAChB,QAAQ,EACR,QAAQ,EACR,YAAY,EACZ,iBAAiB,EACjB,QAAQ,EACR,eAAe,EACf,iBAAiB,EACjB,gBAAgB,GACjB,MAAM,YAAY,CAAC;AACpB,OAAO,EAAE,uBAAuB,EAAE,MAAM,YAAY,CAAC;AAErD,OAAO,EAAE,iBAAiB,EAAE,MAAM,iBAAiB,CAAC;AACpD,OAAO,EAAE,aAAa,EAAE,MAAM,aAAa,CAAC;AAC5C,YAAY,EAAE,mBAAmB,EAAE,MAAM,aAAa,CAAC;AAEvD,OAAO,EAAE,YAAY,EAAE,MAAM,cAAc,CAAC;AAE5C,OAAO,EAAE,UAAU,EAAE,MAAM,YAAY,CAAC;AAExC,OAAO,EAAE,WAAW,EAAE,YAAY,EAAE,MAAM,WAAW,CAAC;AAEtD,OAAO,EAAE,iBAAiB,EAAE,kBAAkB,EAAE,MAAM,sBAAsB,CAAC;AAC7E,YAAY,EAAE,QAAQ,EAAE,MAAM,sBAAsB,CAAC;AAErD,OAAO,EAAE,sBAAsB,EAAE,MAAM,iBAAiB,CAAC;AACzD,YAAY,EAAE,gBAAgB,EAAE,MAAM,iBAAiB,CAAC;AAExD,OAAO,EACL,iBAAiB,EACjB,gBAAgB,EAChB,mBAAmB,EACnB,mBAAmB,EACnB,iBAAiB,EACjB,
|
|
1
|
+
{"version":3,"file":"mod.d.ts","sourceRoot":"","sources":["../../src/lock/mod.ts"],"names":[],"mappings":"AAAA;;;;;;GAMG;AAEH,YAAY,EACV,UAAU,EACV,iBAAiB,EACjB,cAAc,EACd,gBAAgB,EAChB,QAAQ,EACR,QAAQ,EACR,YAAY,EACZ,iBAAiB,EACjB,QAAQ,EACR,kBAAkB,EAClB,eAAe,EACf,iBAAiB,EACjB,gBAAgB,GACjB,MAAM,YAAY,CAAC;AACpB,OAAO,EAAE,uBAAuB,EAAE,MAAM,YAAY,CAAC;AAErD,OAAO,EAAE,iBAAiB,EAAE,MAAM,iBAAiB,CAAC;AACpD,OAAO,EAAE,aAAa,EAAE,MAAM,aAAa,CAAC;AAC5C,YAAY,EAAE,mBAAmB,EAAE,MAAM,aAAa,CAAC;AAEvD,OAAO,EAAE,sBAAsB,EAAE,MAAM,oBAAoB,CAAC;AAE5D,OAAO,EAAE,YAAY,EAAE,MAAM,cAAc,CAAC;AAE5C,OAAO,EAAE,UAAU,EAAE,MAAM,YAAY,CAAC;AAExC,OAAO,EAAE,WAAW,EAAE,YAAY,EAAE,MAAM,WAAW,CAAC;AAEtD,OAAO,EAAE,iBAAiB,EAAE,kBAAkB,EAAE,MAAM,sBAAsB,CAAC;AAC7E,YAAY,EAAE,QAAQ,EAAE,MAAM,sBAAsB,CAAC;AAErD,OAAO,EAAE,sBAAsB,EAAE,MAAM,iBAAiB,CAAC;AACzD,YAAY,EAAE,gBAAgB,EAAE,MAAM,iBAAiB,CAAC;AAExD,OAAO,EAAE,mBAAmB,EAAE,MAAM,kBAAkB,CAAC;AAEvD,OAAO,EACL,iBAAiB,EACjB,gBAAgB,EAChB,mBAAmB,EACnB,mBAAmB,EACnB,iBAAiB,EACjB,gBAAgB,GACjB,MAAM,cAAc,CAAC;AACtB,YAAY,EACV,QAAQ,EACR,QAAQ,EACR,kBAAkB,EAClB,eAAe,EACf,iBAAiB,EACjB,iBAAiB,EACjB,uBAAuB,GACxB,MAAM,cAAc,CAAC;AAEtB,OAAO,EACL,gBAAgB,EAChB,wBAAwB,EACxB,iBAAiB,GAClB,MAAM,oBAAoB,CAAC;AAC5B,YAAY,EACV,+BAA+B,EAC/B,8BAA8B,EAC9B,cAAc,GACf,MAAM,oBAAoB,CAAC;AAE5B,OAAO,EACL,KAAK,KAAK,EACV,0BAA0B,EAC1B,KAAK,iCAAiC,EACtC,KAAK,gCAAgC,EACrC,KAAK,cAAc,GACpB,MAAM,oBAAoB,CAAC;AAC5B,OAAO,EACL,KAAK,gBAAgB,EACrB,mBAAmB,EACnB,KAAK,gBAAgB,GACtB,MAAM,sBAAsB,CAAC;AAC9B,OAAO,EACL,KAAK,MAAM,EACX,aAAa,EACb,KAAK,OAAO,EACZ,KAAK,cAAc,EACnB,aAAa,GACd,MAAM,iBAAiB,CAAC"}
|
package/esm/lock/mod.js
CHANGED
|
@@ -8,9 +8,15 @@
|
|
|
8
8
|
export { LOCKFILE_SCHEMA_VERSION } from "./model.js";
|
|
9
9
|
export { serializeLockfile } from "./serializer.js";
|
|
10
10
|
export { parseLockfile } from "./parser.js";
|
|
11
|
+
export { dependencyPinAssurance } from "./pin_assurance.js";
|
|
11
12
|
export { isBelowFloor } from "./compare.js";
|
|
12
13
|
export { checkDrift } from "./check.js";
|
|
13
14
|
export { sha256Bytes, sha256String } from "./hash.js";
|
|
14
15
|
export { canonicalEdgeJson, hashCanonicalEdges } from "./canonical_edges.js";
|
|
15
16
|
export { detectOfflineEdgeDrift } from "./edge_drift.js";
|
|
16
|
-
export {
|
|
17
|
+
export { verifyUpstreamCache } from "./cache_check.js";
|
|
18
|
+
export { extractEdgeLedger, extractEdgeQuads, resolveBoundEntries, resolveProfileChain, resolveReferences, resolveUpstreams, } from "./resolve.js";
|
|
19
|
+
export { deriveUpstreamId, resolveProjectReferences, upstreamCacheRoot, } from "./upstream_refs.js";
|
|
20
|
+
export { resolveProjectDependencies, } from "./upstream_deps.js";
|
|
21
|
+
export { compileAcquiredTree, } from "./acquire_compile.js";
|
|
22
|
+
export { parseLsRemote, resolveIntent, } from "./git_intent.js";
|