@driftsys/markspec 0.10.3 → 0.12.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 +11 -2
- package/esm/ast/normalize.d.ts +4 -5
- package/esm/ast/normalize.d.ts.map +1 -1
- package/esm/ast/normalize.js +6 -37
- package/esm/collect/mod.d.ts +29 -9
- package/esm/collect/mod.d.ts.map +1 -1
- package/esm/collect/mod.js +36 -10
- 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 +18 -13
- package/esm/config/markspec.d.ts +40 -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/discovery/mod.d.ts +24 -8
- package/esm/discovery/mod.d.ts.map +1 -1
- package/esm/discovery/mod.js +57 -21
- package/esm/discovery/projects.d.ts +109 -0
- package/esm/discovery/projects.d.ts.map +1 -0
- package/esm/discovery/projects.js +232 -0
- package/esm/formatter/entry_body.d.ts +86 -0
- package/esm/formatter/entry_body.d.ts.map +1 -0
- package/esm/formatter/entry_body.js +287 -0
- package/esm/formatter/mod.d.ts +13 -9
- package/esm/formatter/mod.d.ts.map +1 -1
- package/esm/formatter/mod.js +126 -50
- package/esm/gates/mod.d.ts +13 -2
- package/esm/gates/mod.d.ts.map +1 -1
- package/esm/gates/mod.js +41 -13
- package/esm/lint/runner.d.ts.map +1 -1
- package/esm/lint/runner.js +7 -5
- 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 +43 -4
- package/esm/lock/edge_drift.d.ts +2 -0
- package/esm/lock/edge_drift.d.ts.map +1 -1
- package/esm/lock/edge_drift.js +4 -0
- 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 +11 -4
- package/esm/lock/mod.d.ts.map +1 -1
- package/esm/lock/mod.js +8 -2
- 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 +23 -11
- package/esm/mod.d.ts.map +1 -1
- package/esm/mod.js +20 -8
- package/esm/model/mod.d.ts +114 -28
- package/esm/model/mod.d.ts.map +1 -1
- package/esm/model/mod.js +76 -13
- package/esm/model/profile.d.ts +13 -0
- package/esm/model/profile.d.ts.map +1 -1
- package/esm/parser/code_regions.d.ts +29 -0
- package/esm/parser/code_regions.d.ts.map +1 -0
- package/esm/parser/code_regions.js +38 -0
- package/esm/parser/markdown.d.ts.map +1 -1
- package/esm/parser/markdown.js +110 -91
- package/esm/parser/mod.d.ts.map +1 -1
- package/esm/parser/mod.js +7 -1
- package/esm/parser/translate.d.ts.map +1 -1
- package/esm/parser/translate.js +5 -0
- 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/refs/mod.d.ts.map +1 -1
- package/esm/refs/mod.js +8 -19
- package/esm/reporter/mod.d.ts +11 -0
- package/esm/reporter/mod.d.ts.map +1 -1
- package/esm/reporter/mod.js +20 -9
- 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/fence.d.ts +20 -29
- package/esm/util/fence.d.ts.map +1 -1
- package/esm/util/fence.js +42 -50
- package/esm/util/modals.d.ts +6 -0
- package/esm/util/modals.d.ts.map +1 -1
- package/esm/util/modals.js +37 -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/body_blocks.d.ts +2 -1
- package/esm/validator/body_blocks.d.ts.map +1 -1
- package/esm/validator/body_blocks.js +80 -2
- 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 +6 -0
- package/esm/validator/corpus.d.ts.map +1 -1
- package/esm/validator/corpus.js +55 -20
- 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 +1 -1
- package/esm/validator/mod.d.ts.map +1 -1
- package/esm/validator/mod.js +29 -16
- package/esm/validator/pipeline.d.ts +11 -1
- package/esm/validator/pipeline.d.ts.map +1 -1
- package/esm/validator/pipeline.js +76 -23
- 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/ast/normalize.d.ts +4 -5
- package/script/ast/normalize.d.ts.map +1 -1
- package/script/ast/normalize.js +5 -36
- package/script/collect/mod.d.ts +29 -9
- package/script/collect/mod.d.ts.map +1 -1
- package/script/collect/mod.js +38 -10
- 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 +16 -11
- package/script/config/markspec.d.ts +40 -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/discovery/mod.d.ts +24 -8
- package/script/discovery/mod.d.ts.map +1 -1
- package/script/discovery/mod.js +56 -20
- package/script/discovery/projects.d.ts +109 -0
- package/script/discovery/projects.d.ts.map +1 -0
- package/script/discovery/projects.js +240 -0
- package/script/formatter/entry_body.d.ts +86 -0
- package/script/formatter/entry_body.d.ts.map +1 -0
- package/script/formatter/entry_body.js +292 -0
- package/script/formatter/mod.d.ts +13 -9
- package/script/formatter/mod.d.ts.map +1 -1
- package/script/formatter/mod.js +124 -48
- package/script/gates/mod.d.ts +13 -2
- package/script/gates/mod.d.ts.map +1 -1
- package/script/gates/mod.js +50 -22
- package/script/lint/runner.d.ts.map +1 -1
- package/script/lint/runner.js +6 -4
- 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 +43 -4
- package/script/lock/edge_drift.d.ts +2 -0
- package/script/lock/edge_drift.d.ts.map +1 -1
- package/script/lock/edge_drift.js +5 -0
- 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 +11 -4
- package/script/lock/mod.d.ts.map +1 -1
- package/script/lock/mod.js +17 -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 +23 -11
- package/script/mod.d.ts.map +1 -1
- package/script/mod.js +55 -7
- package/script/model/mod.d.ts +114 -28
- package/script/model/mod.d.ts.map +1 -1
- package/script/model/mod.js +81 -14
- package/script/model/profile.d.ts +13 -0
- package/script/model/profile.d.ts.map +1 -1
- package/script/parser/code_regions.d.ts +29 -0
- package/script/parser/code_regions.d.ts.map +1 -0
- package/script/parser/code_regions.js +41 -0
- package/script/parser/markdown.d.ts.map +1 -1
- package/script/parser/markdown.js +108 -89
- package/script/parser/mod.d.ts.map +1 -1
- package/script/parser/mod.js +7 -1
- package/script/parser/translate.d.ts.map +1 -1
- package/script/parser/translate.js +5 -0
- 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/refs/mod.d.ts.map +1 -1
- package/script/refs/mod.js +7 -18
- package/script/reporter/mod.d.ts +11 -0
- package/script/reporter/mod.d.ts.map +1 -1
- package/script/reporter/mod.js +19 -8
- 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/fence.d.ts +20 -29
- package/script/util/fence.d.ts.map +1 -1
- package/script/util/fence.js +47 -54
- package/script/util/modals.d.ts +6 -0
- package/script/util/modals.d.ts.map +1 -1
- package/script/util/modals.js +38 -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/body_blocks.d.ts +2 -1
- package/script/validator/body_blocks.d.ts.map +1 -1
- package/script/validator/body_blocks.js +80 -2
- 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 +6 -0
- package/script/validator/corpus.d.ts.map +1 -1
- package/script/validator/corpus.js +55 -19
- 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 +1 -1
- package/script/validator/mod.d.ts.map +1 -1
- package/script/validator/mod.js +29 -15
- package/script/validator/pipeline.d.ts +11 -1
- package/script/validator/pipeline.d.ts.map +1 -1
- package/script/validator/pipeline.js +75 -22
- 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
|
@@ -21,7 +21,8 @@
|
|
|
21
21
|
*
|
|
22
22
|
* @param entry - The entry whose body AST is scanned for captions.
|
|
23
23
|
* @param conventions - The configured position conventions from
|
|
24
|
-
* `
|
|
24
|
+
* `.markspec.yaml` `caption-conventions:` (`ToolConfig.captionConventions`).
|
|
25
|
+
* An empty record means no
|
|
25
26
|
* conventions are set and the function returns immediately.
|
|
26
27
|
*/
|
|
27
28
|
export function validateCaptionConvention(entry, conventions) {
|
|
@@ -14,6 +14,12 @@
|
|
|
14
14
|
* collided tokens (MSL-R014 replaces them).
|
|
15
15
|
*/
|
|
16
16
|
import type { Diagnostic, Entry } from "../model/mod.js";
|
|
17
|
+
/**
|
|
18
|
+
* Attribute corpus findings and replace generic duplicate diagnostics with
|
|
19
|
+
* corpus collisions. Append collisions after attribution so MSL-R014 remains
|
|
20
|
+
* an error even when its location belongs to a read-only corpus.
|
|
21
|
+
*/
|
|
22
|
+
export declare function applyCorpusPostPass(diagnostics: readonly Diagnostic[], allEntries: readonly Entry[]): Diagnostic[];
|
|
17
23
|
/** Result of {@linkcode detectCorpusCollisions}. */
|
|
18
24
|
export interface CorpusCollisionResult {
|
|
19
25
|
readonly diagnostics: readonly Diagnostic[];
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"corpus.d.ts","sourceRoot":"","sources":["../../src/validator/corpus.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;GAcG;AAEH,OAAO,KAAK,EAAE,UAAU,EAAE,KAAK,
|
|
1
|
+
{"version":3,"file":"corpus.d.ts","sourceRoot":"","sources":["../../src/validator/corpus.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;GAcG;AAEH,OAAO,KAAK,EAAE,UAAU,EAAE,KAAK,EAAe,MAAM,iBAAiB,CAAC;AAOtE;;;;GAIG;AACH,wBAAgB,mBAAmB,CACjC,WAAW,EAAE,SAAS,UAAU,EAAE,EAClC,UAAU,EAAE,SAAS,KAAK,EAAE,GAC3B,UAAU,EAAE,CAUd;AA2BD,oDAAoD;AACpD,MAAM,WAAW,qBAAqB;IACpC,QAAQ,CAAC,WAAW,EAAE,SAAS,UAAU,EAAE,CAAC;IAC5C,qEAAqE;IACrE,QAAQ,CAAC,cAAc,EAAE,WAAW,CAAC,MAAM,CAAC,CAAC;CAC9C;AAED,wBAAgB,sBAAsB,CACpC,UAAU,EAAE,SAAS,KAAK,EAAE,GAC3B,qBAAqB,CAsFvB;AAED,wBAAgB,0BAA0B,CACxC,WAAW,EAAE,SAAS,UAAU,EAAE,EAClC,UAAU,EAAE,SAAS,KAAK,EAAE,EAC5B,cAAc,EAAE,WAAW,CAAC,MAAM,CAAC,GAClC,UAAU,EAAE,CAyCd"}
|
package/esm/validator/corpus.js
CHANGED
|
@@ -13,7 +13,34 @@
|
|
|
13
13
|
* delivering profile; generic duplicate codes are suppressed for
|
|
14
14
|
* collided tokens (MSL-R014 replaces them).
|
|
15
15
|
*/
|
|
16
|
-
import { formatEntryOrigin } from "../model/mod.js";
|
|
16
|
+
import { formatEntryOrigin, isCorpusEntry, sameOriginSource, } from "../model/mod.js";
|
|
17
|
+
/**
|
|
18
|
+
* Attribute corpus findings and replace generic duplicate diagnostics with
|
|
19
|
+
* corpus collisions. Append collisions after attribution so MSL-R014 remains
|
|
20
|
+
* an error even when its location belongs to a read-only corpus.
|
|
21
|
+
*/
|
|
22
|
+
export function applyCorpusPostPass(diagnostics, allEntries) {
|
|
23
|
+
const collisions = detectCorpusCollisions(allEntries);
|
|
24
|
+
return [
|
|
25
|
+
...attributeCorpusDiagnostics(diagnostics, allEntries, collisions.collidedTokens),
|
|
26
|
+
...collisions.diagnostics,
|
|
27
|
+
];
|
|
28
|
+
}
|
|
29
|
+
/**
|
|
30
|
+
* Remedy clause for an inter-tier MSL-R014 collision — both owners
|
|
31
|
+
* carry an origin (upstream and/or delivered profile), so the consumer
|
|
32
|
+
* reading the diagnostic can rename NEITHER read-only entry (#771; the
|
|
33
|
+
* #799 review extended this from the upstream↔upstream case to every
|
|
34
|
+
* origin pairing). The remedy names the actions a consumer CAN take.
|
|
35
|
+
* Same-source duplicates never reach this clause (excluded via
|
|
36
|
+
* `sameOriginSource` — that is the delivering author's own bug, kept on
|
|
37
|
+
* the generic duplicate codes), and project↔origin collisions keep the
|
|
38
|
+
* "rename this entry" wording above (the project entry is the
|
|
39
|
+
* consumer's own).
|
|
40
|
+
*/
|
|
41
|
+
const INTER_TIER_REMEDY = "a consumer cannot rename either read-only entry; drop one of the " +
|
|
42
|
+
"colliding sources (a delivered profile in .markspec.yaml, an upstream " +
|
|
43
|
+
"in project.yaml) or coordinate a rename with its author";
|
|
17
44
|
/** Generic duplicate detectors superseded by MSL-R014 for corpus collisions. */
|
|
18
45
|
const GENERIC_DUP_CODES = new Set([
|
|
19
46
|
"MSL-R005",
|
|
@@ -25,7 +52,7 @@ export function detectCorpusCollisions(allEntries) {
|
|
|
25
52
|
const corpusByDisplayId = new Map();
|
|
26
53
|
const corpusById = new Map();
|
|
27
54
|
for (const e of allEntries) {
|
|
28
|
-
if (!e
|
|
55
|
+
if (!isCorpusEntry(e))
|
|
29
56
|
continue;
|
|
30
57
|
if (!corpusByDisplayId.has(e.displayId)) {
|
|
31
58
|
corpusByDisplayId.set(e.displayId, e);
|
|
@@ -39,16 +66,16 @@ export function detectCorpusCollisions(allEntries) {
|
|
|
39
66
|
const diagnostics = [];
|
|
40
67
|
const collided = new Set();
|
|
41
68
|
for (const e of allEntries) {
|
|
42
|
-
if (!e
|
|
69
|
+
if (!isCorpusEntry(e)) {
|
|
43
70
|
const displayOwner = corpusByDisplayId.get(e.displayId);
|
|
44
71
|
if (displayOwner) {
|
|
45
72
|
collided.add(e.displayId);
|
|
46
73
|
diagnostics.push({
|
|
47
74
|
code: "MSL-R014",
|
|
48
75
|
severity: "error",
|
|
49
|
-
message: `display ID '${e.displayId}' is already
|
|
76
|
+
message: `display ID '${e.displayId}' is already provided by ` +
|
|
50
77
|
`${formatEntryOrigin(displayOwner.origin)}; rename this entry — ` +
|
|
51
|
-
`delivered
|
|
78
|
+
`upstream and delivered-corpus entries are read-only`,
|
|
52
79
|
location: e.location,
|
|
53
80
|
});
|
|
54
81
|
}
|
|
@@ -59,9 +86,9 @@ export function detectCorpusCollisions(allEntries) {
|
|
|
59
86
|
diagnostics.push({
|
|
60
87
|
code: "MSL-R014",
|
|
61
88
|
severity: "error",
|
|
62
|
-
message: `Id '${e.id}' is already
|
|
89
|
+
message: `Id '${e.id}' is already provided by ` +
|
|
63
90
|
`${formatEntryOrigin(idOwner.origin)}; rename this entry — ` +
|
|
64
|
-
`delivered
|
|
91
|
+
`upstream and delivered-corpus entries are read-only`,
|
|
65
92
|
location: e.location,
|
|
66
93
|
});
|
|
67
94
|
}
|
|
@@ -75,28 +102,30 @@ export function detectCorpusCollisions(allEntries) {
|
|
|
75
102
|
// violation, and stays on the generic duplicate codes.
|
|
76
103
|
const displayOwner = corpusByDisplayId.get(e.displayId);
|
|
77
104
|
if (displayOwner !== e && displayOwner &&
|
|
78
|
-
displayOwner.origin
|
|
105
|
+
!sameOriginSource(displayOwner.origin, e.origin)) {
|
|
79
106
|
collided.add(e.displayId);
|
|
80
107
|
diagnostics.push({
|
|
81
108
|
code: "MSL-R014",
|
|
82
109
|
severity: "error",
|
|
83
|
-
message: `display ID '${e.displayId}' is
|
|
84
|
-
`${formatEntryOrigin(displayOwner.origin)}
|
|
85
|
-
`
|
|
110
|
+
message: `display ID '${e.displayId}' is provided by both ` +
|
|
111
|
+
`${formatEntryOrigin(displayOwner.origin)} and ` +
|
|
112
|
+
`${formatEntryOrigin(e.origin)} — ` +
|
|
113
|
+
INTER_TIER_REMEDY,
|
|
86
114
|
location: e.location,
|
|
87
115
|
});
|
|
88
116
|
}
|
|
89
117
|
if (e.id) {
|
|
90
118
|
const idOwner = corpusById.get(e.id);
|
|
91
119
|
if (idOwner !== e && idOwner &&
|
|
92
|
-
idOwner.origin
|
|
120
|
+
!sameOriginSource(idOwner.origin, e.origin)) {
|
|
93
121
|
collided.add(e.id);
|
|
94
122
|
diagnostics.push({
|
|
95
123
|
code: "MSL-R014",
|
|
96
124
|
severity: "error",
|
|
97
|
-
message: `Id '${e.id}' is
|
|
98
|
-
`${formatEntryOrigin(idOwner.origin)}
|
|
99
|
-
`
|
|
125
|
+
message: `Id '${e.id}' is provided by both ` +
|
|
126
|
+
`${formatEntryOrigin(idOwner.origin)} and ` +
|
|
127
|
+
`${formatEntryOrigin(e.origin)} — ` +
|
|
128
|
+
INTER_TIER_REMEDY,
|
|
100
129
|
location: e.location,
|
|
101
130
|
});
|
|
102
131
|
}
|
|
@@ -107,8 +136,8 @@ export function detectCorpusCollisions(allEntries) {
|
|
|
107
136
|
export function attributeCorpusDiagnostics(diagnostics, allEntries, collidedTokens) {
|
|
108
137
|
const corpusFiles = new Map();
|
|
109
138
|
for (const e of allEntries) {
|
|
110
|
-
if (e
|
|
111
|
-
corpusFiles.set(e.location.file,
|
|
139
|
+
if (isCorpusEntry(e)) {
|
|
140
|
+
corpusFiles.set(e.location.file, e.origin);
|
|
112
141
|
}
|
|
113
142
|
}
|
|
114
143
|
const out = [];
|
|
@@ -125,12 +154,18 @@ export function attributeCorpusDiagnostics(diagnostics, allEntries, collidedToke
|
|
|
125
154
|
[...collidedTokens].some((t) => d.message.includes(`'${t}'`))) {
|
|
126
155
|
continue;
|
|
127
156
|
}
|
|
128
|
-
const
|
|
129
|
-
if (
|
|
157
|
+
const origin = d.location ? corpusFiles.get(d.location.file) : undefined;
|
|
158
|
+
if (origin !== undefined) {
|
|
159
|
+
// Attribution verb follows the origin tier (#771): "delivered by"
|
|
160
|
+
// is ADR-030 profile-corpus language; a finding located in a
|
|
161
|
+
// hydrated upstream snapshot reads "from upstream" instead.
|
|
162
|
+
const verb = origin.kind === "upstream"
|
|
163
|
+
? "from upstream"
|
|
164
|
+
: "delivered by";
|
|
130
165
|
out.push({
|
|
131
166
|
...d,
|
|
132
167
|
severity: d.severity === "error" ? "warning" : d.severity,
|
|
133
|
-
message:
|
|
168
|
+
message: `${verb} ${formatEntryOrigin(origin)}: ${d.message}`,
|
|
134
169
|
});
|
|
135
170
|
continue;
|
|
136
171
|
}
|
|
@@ -23,10 +23,12 @@ import type { Diagnostic, DisciplineRegistry, DisplayId, Entry } from "../model/
|
|
|
23
23
|
* every entry. Pure function: takes the entries, a lookup map (used by
|
|
24
24
|
* later tasks for channel-4 derivation), and the effective registry.
|
|
25
25
|
*
|
|
26
|
-
* @param entries
|
|
27
|
-
*
|
|
28
|
-
*
|
|
29
|
-
*
|
|
26
|
+
* @param entries Emittable entries to walk — the caller passes the #771
|
|
27
|
+
* partition (upstream entries are exempt emitters, ADR-031 §4.7).
|
|
28
|
+
* @param entriesByDisplayId Lookup map for channel-4 derivation, built from
|
|
29
|
+
* the FULL entry set (upstream included) so Allocated-to targets in
|
|
30
|
+
* upstream entries still resolve. Tasks 5–8 will use this; Task 4
|
|
31
|
+
* ignores it but keeps the parameter to fix the signature now.
|
|
30
32
|
* @param registry Effective discipline registry from Slice 2's
|
|
31
33
|
* `buildEffectiveDisciplineRegistry()`, or `CORE_DISCIPLINE_REGISTRY` in
|
|
32
34
|
* core-only mode.
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"discipline.d.ts","sourceRoot":"","sources":["../../src/validator/discipline.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;;;;;GAkBG;AAEH,OAAO,KAAK,EACV,UAAU,EACV,kBAAkB,EAClB,SAAS,EACT,KAAK,EACN,MAAM,iBAAiB,CAAC;AAmFzB
|
|
1
|
+
{"version":3,"file":"discipline.d.ts","sourceRoot":"","sources":["../../src/validator/discipline.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;;;;;GAkBG;AAEH,OAAO,KAAK,EACV,UAAU,EACV,kBAAkB,EAClB,SAAS,EACT,KAAK,EACN,MAAM,iBAAiB,CAAC;AAmFzB;;;;;;;;;;;;;;GAcG;AACH,wBAAgB,kBAAkB,CAChC,OAAO,EAAE,SAAS,KAAK,EAAE,EACzB,kBAAkB,EAAE,WAAW,CAAC,SAAS,EAAE,KAAK,CAAC,EACjD,QAAQ,EAAE,kBAAkB,GAC3B,UAAU,EAAE,CAuHd"}
|
|
@@ -99,10 +99,12 @@ function channel4Kind(entry, entriesByDisplayId, registry) {
|
|
|
99
99
|
* every entry. Pure function: takes the entries, a lookup map (used by
|
|
100
100
|
* later tasks for channel-4 derivation), and the effective registry.
|
|
101
101
|
*
|
|
102
|
-
* @param entries
|
|
103
|
-
*
|
|
104
|
-
*
|
|
105
|
-
*
|
|
102
|
+
* @param entries Emittable entries to walk — the caller passes the #771
|
|
103
|
+
* partition (upstream entries are exempt emitters, ADR-031 §4.7).
|
|
104
|
+
* @param entriesByDisplayId Lookup map for channel-4 derivation, built from
|
|
105
|
+
* the FULL entry set (upstream included) so Allocated-to targets in
|
|
106
|
+
* upstream entries still resolve. Tasks 5–8 will use this; Task 4
|
|
107
|
+
* ignores it but keeps the parameter to fix the signature now.
|
|
106
108
|
* @param registry Effective discipline registry from Slice 2's
|
|
107
109
|
* `buildEffectiveDisciplineRegistry()`, or `CORE_DISCIPLINE_REGISTRY` in
|
|
108
110
|
* core-only mode.
|
package/esm/validator/mod.d.ts
CHANGED
|
@@ -43,6 +43,6 @@ export { validateValue } from "./value_types.js";
|
|
|
43
43
|
export type { ValueValidator } from "./value_types.js";
|
|
44
44
|
export { normalizeListValues } from "./normalize.js";
|
|
45
45
|
export { effectiveTraceRules, matchesAnyTarget, validateTraceabilityForEntry, } from "./traceability.js";
|
|
46
|
-
export { attributeCorpusDiagnostics, detectCorpusCollisions, } from "./corpus.js";
|
|
46
|
+
export { applyCorpusPostPass, attributeCorpusDiagnostics, detectCorpusCollisions, } from "./corpus.js";
|
|
47
47
|
export type { CorpusCollisionResult } from "./corpus.js";
|
|
48
48
|
//# sourceMappingURL=mod.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"mod.d.ts","sourceRoot":"","sources":["../../src/validator/mod.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;GAcG;AAEH,OAAO,KAAK,EAAE,SAAS,EAAE,UAAU,EAAE,KAAK,EAAE,MAAM,iBAAiB,CAAC;
|
|
1
|
+
{"version":3,"file":"mod.d.ts","sourceRoot":"","sources":["../../src/validator/mod.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;GAcG;AAEH,OAAO,KAAK,EAAE,SAAS,EAAE,UAAU,EAAE,KAAK,EAAE,MAAM,iBAAiB,CAAC;AAsCpE,mCAAmC;AACnC,MAAM,WAAW,cAAc;IAC7B,2CAA2C;IAC3C,QAAQ,CAAC,WAAW,EAAE,SAAS,UAAU,EAAE,CAAC;IAC5C,gDAAgD;IAChD,QAAQ,CAAC,KAAK,EAAE,OAAO,CAAC;CACzB;AAED;;;;;GAKG;AACH,wBAAgB,QAAQ,CAAC,OAAO,EAAE,SAAS,KAAK,EAAE,GAAG,cAAc,CAuBlE;AAibD,wBAAgB,gBAAgB,CAC9B,OAAO,EAAE,SAAS,KAAK,EAAE,GACxB,WAAW,CAAC,MAAM,EAAE,KAAK,CAAC,CAM5B;AAGD,wBAAgB,QAAQ,CACtB,KAAK,EAAE,SAAS,SAAS,EAAE,EAC3B,GAAG,EAAE,MAAM,GACV,SAAS,GAAG,SAAS,CAEvB;AAED,OAAO,EAAE,WAAW,EAAE,wBAAwB,EAAE,MAAM,eAAe,CAAC;AACtE,YAAY,EAAE,eAAe,EAAE,cAAc,EAAE,MAAM,eAAe,CAAC;AAErE,OAAO,EAAE,wBAAwB,EAAE,MAAM,cAAc,CAAC;AACxD,YAAY,EAAE,kBAAkB,EAAE,WAAW,EAAE,MAAM,cAAc,CAAC;AAEpE,OAAO,EAAE,oBAAoB,EAAE,aAAa,EAAE,MAAM,YAAY,CAAC;AACjE,YAAY,EAAE,cAAc,EAAE,mBAAmB,EAAE,MAAM,YAAY,CAAC;AAEtE,OAAO,EAAE,uBAAuB,EAAE,MAAM,cAAc,CAAC;AAEvD,OAAO,EAAE,cAAc,EAAE,0BAA0B,EAAE,MAAM,iBAAiB,CAAC;AAC7E,YAAY,EAAE,kBAAkB,EAAE,MAAM,iBAAiB,CAAC;AAE1D,OAAO,EAAE,aAAa,EAAE,MAAM,kBAAkB,CAAC;AACjD,YAAY,EAAE,cAAc,EAAE,MAAM,kBAAkB,CAAC;AAEvD,OAAO,EAAE,mBAAmB,EAAE,MAAM,gBAAgB,CAAC;AAErD,OAAO,EACL,mBAAmB,EACnB,gBAAgB,EAChB,4BAA4B,GAC7B,MAAM,mBAAmB,CAAC;AAE3B,OAAO,EACL,mBAAmB,EACnB,0BAA0B,EAC1B,sBAAsB,GACvB,MAAM,aAAa,CAAC;AACrB,YAAY,EAAE,qBAAqB,EAAE,MAAM,aAAa,CAAC"}
|
package/esm/validator/mod.js
CHANGED
|
@@ -13,7 +13,7 @@
|
|
|
13
13
|
* constraints, enum vocabularies) are profile-declared and evaluated by
|
|
14
14
|
* a profile-aware validator layer (not in the core).
|
|
15
15
|
*/
|
|
16
|
-
import { attributeSpec, CORE_TYPE_SCOPED_ATTRS, CSV_SPLITTABLE_TYPES, IDENTITY_KEY, ULID_RE, UNIVERSAL_ATTRIBUTE_KEYS, URI_SCHEME_RE, } from "../model/mod.js";
|
|
16
|
+
import { attributeSpec, CORE_TYPE_SCOPED_ATTRS, CSV_SPLITTABLE_TYPES, emittableEntries, IDENTITY_KEY, ULID_RE, UNIVERSAL_ATTRIBUTE_KEYS, URI_SCHEME_RE, } from "../model/mod.js";
|
|
17
17
|
import { HTTP_URL_RE } from "./value_types.js";
|
|
18
18
|
import { validateTypl } from "../typl/mod.js";
|
|
19
19
|
/** Universal attribute keys the core recognizes. */
|
|
@@ -45,21 +45,32 @@ const REFERENCE_SLUG_RE = /^[A-Za-z]([A-Za-z0-9._/-]*[A-Za-z0-9])?$/;
|
|
|
45
45
|
*/
|
|
46
46
|
export function validate(entries) {
|
|
47
47
|
const diagnostics = [];
|
|
48
|
-
|
|
49
|
-
|
|
50
|
-
//
|
|
51
|
-
//
|
|
52
|
-
|
|
48
|
+
// Partition once (#771): upstream entries are read-only graph citizens
|
|
49
|
+
// (ADR-031 §4.7) — emit loops iterate `emittable`; resolution maps
|
|
50
|
+
// (checkReferences) still index the full `entries` list so links TO an
|
|
51
|
+
// upstream entry keep resolving.
|
|
52
|
+
const emittable = emittableEntries(entries);
|
|
53
|
+
checkStructural(emittable, diagnostics);
|
|
54
|
+
checkReferences(emittable, entries, diagnostics);
|
|
55
|
+
// Typl declared-once (TYPL-009), citation resolution (TYPL-010/011), and
|
|
56
|
+
// undefined-typedef-refs (TYPL-005). Per-block diagnostics
|
|
57
|
+
// (TYPL-001/004/006/007/008) already fired during parse via the bridge.
|
|
58
|
+
// Receives the FULL list on purpose: validateTypl applies the partition
|
|
59
|
+
// itself — its typl-inert-upstream working set is the module's own
|
|
60
|
+
// registry-scope contract, not this orchestrator's to enforce.
|
|
53
61
|
const typlResult = validateTypl(entries);
|
|
54
62
|
diagnostics.push(...typlResult.diagnostics);
|
|
55
63
|
const valid = !diagnostics.some((d) => d.severity === "error");
|
|
56
64
|
return { diagnostics, valid };
|
|
57
65
|
}
|
|
58
|
-
/** MSL-R structural checks on individual entries and cross-entry uniqueness.
|
|
59
|
-
|
|
66
|
+
/** MSL-R structural checks on individual entries and cross-entry uniqueness.
|
|
67
|
+
* Receives the pre-partitioned emittable list (#771) — upstream entries never
|
|
68
|
+
* enter these checks or the duplicate maps below (same as before the
|
|
69
|
+
* partition: the maps were built inside the guarded loop). */
|
|
70
|
+
function checkStructural(emittable, diagnostics) {
|
|
60
71
|
const displayIds = new Map();
|
|
61
72
|
const ids = new Map();
|
|
62
|
-
for (const entry of
|
|
73
|
+
for (const entry of emittable) {
|
|
63
74
|
// MSL-R003: exactly one `Id:` attribute per entry.
|
|
64
75
|
// Dual-emit: MSL-I002 (Reference missing Id), MSL-I003 (Authored missing
|
|
65
76
|
// Id), MSL-I004 (multiple Id) — nextgen §4.2 codes alongside legacy.
|
|
@@ -386,11 +397,13 @@ function checkStructural(entries, diagnostics) {
|
|
|
386
397
|
}
|
|
387
398
|
}
|
|
388
399
|
}
|
|
389
|
-
/** Cross-reference integrity checks.
|
|
390
|
-
|
|
400
|
+
/** Cross-reference integrity checks. Emit loops iterate the pre-partitioned
|
|
401
|
+
* `emittable` list (#771 — refs FROM an upstream entry are never checked);
|
|
402
|
+
* the resolution maps index `all` so refs TO an upstream entry resolve. */
|
|
403
|
+
function checkReferences(emittable, all, diagnostics) {
|
|
391
404
|
// Build a display-ID index for cross-reference resolution.
|
|
392
405
|
const byDisplayId = new Map();
|
|
393
|
-
for (const entry of
|
|
406
|
+
for (const entry of all) {
|
|
394
407
|
if (!byDisplayId.has(entry.displayId)) {
|
|
395
408
|
byDisplayId.set(entry.displayId, entry);
|
|
396
409
|
}
|
|
@@ -398,14 +411,14 @@ function checkReferences(entries, diagnostics) {
|
|
|
398
411
|
// Also index by `Id:` value so references may target ULIDs or URIs
|
|
399
412
|
// directly (profile tooling commonly accepts either).
|
|
400
413
|
const byId = new Map();
|
|
401
|
-
for (const entry of
|
|
414
|
+
for (const entry of all) {
|
|
402
415
|
if (entry.id && !byId.has(entry.id)) {
|
|
403
416
|
byId.set(entry.id, entry);
|
|
404
417
|
}
|
|
405
418
|
}
|
|
406
419
|
// MSL-T012: `Supersedes:` — the one baked-in relation. Target must
|
|
407
420
|
// resolve; profile rules check type/shape compatibility separately.
|
|
408
|
-
for (const entry of
|
|
421
|
+
for (const entry of emittable) {
|
|
409
422
|
const supersedes = entry.rawAttributes.find((a) => a.key === "Supersedes");
|
|
410
423
|
if (!supersedes)
|
|
411
424
|
continue;
|
|
@@ -422,7 +435,7 @@ function checkReferences(entries, diagnostics) {
|
|
|
422
435
|
}
|
|
423
436
|
// MSL-T005: `References:` — citations must resolve to a referenced
|
|
424
437
|
// entry. This is a universal relation (citing identified → referenced).
|
|
425
|
-
for (const entry of
|
|
438
|
+
for (const entry of emittable) {
|
|
426
439
|
const citations = entry.rawAttributes.filter((a) => a.key === "References");
|
|
427
440
|
for (const attr of citations) {
|
|
428
441
|
// Citation format: "slug [free-text locator]"; take the first token.
|
|
@@ -474,4 +487,4 @@ export { effectiveScope, validateAttributesForEntry } from "./attributes.js";
|
|
|
474
487
|
export { validateValue } from "./value_types.js";
|
|
475
488
|
export { normalizeListValues } from "./normalize.js";
|
|
476
489
|
export { effectiveTraceRules, matchesAnyTarget, validateTraceabilityForEntry, } from "./traceability.js";
|
|
477
|
-
export { attributeCorpusDiagnostics, detectCorpusCollisions, } from "./corpus.js";
|
|
490
|
+
export { applyCorpusPostPass, attributeCorpusDiagnostics, detectCorpusCollisions, } from "./corpus.js";
|
|
@@ -27,6 +27,15 @@ export interface PipelineOptions {
|
|
|
27
27
|
* Defaults to `true` (full-project scope — emit MSL-L006 normally).
|
|
28
28
|
*/
|
|
29
29
|
readonly projectWide?: boolean;
|
|
30
|
+
/**
|
|
31
|
+
* Declared upstream ids (federated upstream, slice 4) — derived from
|
|
32
|
+
* `project.yaml`'s `dependencies:`/`references:` via `deriveUpstreamId`.
|
|
33
|
+
* When non-empty, Stage 4 fires `MSL-T014` (warning), naming the
|
|
34
|
+
* searched upstream set, instead of `MSL-L006` for an otherwise-
|
|
35
|
+
* unresolved trace target. Defaults to empty — `MSL-L006` unchanged.
|
|
36
|
+
* Scope-gated identically to `MSL-L006` (see `projectWide` above).
|
|
37
|
+
*/
|
|
38
|
+
readonly declaredUpstreamIds?: readonly string[];
|
|
30
39
|
}
|
|
31
40
|
/**
|
|
32
41
|
* Run the validator pipeline.
|
|
@@ -39,7 +48,8 @@ export interface PipelineOptions {
|
|
|
39
48
|
* assignments).
|
|
40
49
|
*
|
|
41
50
|
* @param captionConventions - Optional project-configured caption-position
|
|
42
|
-
* conventions (from
|
|
51
|
+
* conventions (from `.markspec.yaml` `caption-conventions:`, via
|
|
52
|
+
* `ToolConfig.captionConventions`). When supplied
|
|
43
53
|
* and non-empty, MSL-C072 is checked for each entry. Defaults to no
|
|
44
54
|
* conventions (rule inactive).
|
|
45
55
|
* @param opts - Pipeline options. Pass `{ projectWide: false }` when
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"pipeline.d.ts","sourceRoot":"","sources":["../../src/validator/pipeline.ts"],"names":[],"mappings":"AAAA;;;;;;;;GAQG;AAEH,OAAO,KAAK,EACV,kBAAkB,EAClB,UAAU,EACV,gBAAgB,EAChB,KAAK,EACN,MAAM,iBAAiB,CAAC;
|
|
1
|
+
{"version":3,"file":"pipeline.d.ts","sourceRoot":"","sources":["../../src/validator/pipeline.ts"],"names":[],"mappings":"AAAA;;;;;;;;GAQG;AAEH,OAAO,KAAK,EACV,kBAAkB,EAClB,UAAU,EACV,gBAAgB,EAChB,KAAK,EACN,MAAM,iBAAiB,CAAC;AAqCzB,qDAAqD;AACrD,MAAM,WAAW,cAAc;IAC7B,0EAA0E;IAC1E,QAAQ,CAAC,OAAO,EAAE,SAAS,KAAK,EAAE,CAAC;IACnC,QAAQ,CAAC,WAAW,EAAE,SAAS,UAAU,EAAE,CAAC;IAC5C,8DAA8D;IAC9D,QAAQ,CAAC,KAAK,EAAE,OAAO,CAAC;CACzB;AAED,2CAA2C;AAC3C,MAAM,WAAW,eAAe;IAC9B;;;;;;;OAOG;IACH,QAAQ,CAAC,WAAW,CAAC,EAAE,OAAO,CAAC;IAE/B;;;;;;;OAOG;IACH,QAAQ,CAAC,mBAAmB,CAAC,EAAE,SAAS,MAAM,EAAE,CAAC;CAClD;AAED;;;;;;;;;;;;;;;;;GAiBG;AACH,wBAAgB,WAAW,CACzB,OAAO,EAAE,SAAS,KAAK,EAAE,EACzB,OAAO,EAAE,gBAAgB,GAAG,IAAI,EAChC,kBAAkB,GAAE,kBAAuB,EAC3C,IAAI,GAAE,eAAoB,GACzB,cAAc,CA8JhB;AAED;;;;;;;;;GASG;AACH,wBAAgB,wBAAwB,CACtC,WAAW,EAAE,SAAS,UAAU,EAAE,EAClC,OAAO,EAAE,SAAS,KAAK,EAAE,EACzB,OAAO,EAAE,gBAAgB,GAAG,IAAI,GAC/B,SAAS,UAAU,EAAE,CASvB"}
|
|
@@ -7,7 +7,7 @@
|
|
|
7
7
|
* Stage 3 (typed attribute validation — {@linkcode validateAttributesForEntry}),
|
|
8
8
|
* and Stage 4 (traceability rules — {@linkcode validateTraceabilityForEntry}).
|
|
9
9
|
*/
|
|
10
|
-
import { CORE_DISCIPLINE_REGISTRY, makeDisplayId } from "../model/mod.js";
|
|
10
|
+
import { CORE_DISCIPLINE_REGISTRY, emittableEntries, makeDisplayId, } from "../model/mod.js";
|
|
11
11
|
import { validate } from "./mod.js";
|
|
12
12
|
import { classifyEntriesStage, inferTypeFromDisplayIdShape, inferTypeFromLateStageChain, validateCoreTypeAttribute, } from "./types.js";
|
|
13
13
|
import { validateBodyBlocks } from "./body_blocks.js";
|
|
@@ -22,6 +22,16 @@ import { validateFeatureAc } from "./feature_ac.js";
|
|
|
22
22
|
import { validateCaptionConvention } from "./caption_convention.js";
|
|
23
23
|
import { validateDiscipline } from "./discipline.js";
|
|
24
24
|
import { buildEffectiveDisciplineRegistry } from "../profile/discipline_registry.js";
|
|
25
|
+
import { validateUxilFamily } from "./uxil_family.js";
|
|
26
|
+
/** Cross-entry uxil codes suppressed under file-local scope (#727): a
|
|
27
|
+
* subset registry cannot distinguish a dangling reference from an
|
|
28
|
+
* unchecked file — the same false-positive class the MSL-L006 filter
|
|
29
|
+
* guards. Entry-local UXIL codes are unaffected. */
|
|
30
|
+
const FILE_LOCAL_SUPPRESSED_UXIL = new Set([
|
|
31
|
+
"UXIL-016",
|
|
32
|
+
"UXIL-017",
|
|
33
|
+
"UXIL-018",
|
|
34
|
+
]);
|
|
25
35
|
/**
|
|
26
36
|
* Run the validator pipeline.
|
|
27
37
|
*
|
|
@@ -33,7 +43,8 @@ import { buildEffectiveDisciplineRegistry } from "../profile/discipline_registry
|
|
|
33
43
|
* assignments).
|
|
34
44
|
*
|
|
35
45
|
* @param captionConventions - Optional project-configured caption-position
|
|
36
|
-
* conventions (from
|
|
46
|
+
* conventions (from `.markspec.yaml` `caption-conventions:`, via
|
|
47
|
+
* `ToolConfig.captionConventions`). When supplied
|
|
37
48
|
* and non-empty, MSL-C072 is checked for each entry. Defaults to no
|
|
38
49
|
* conventions (rule inactive).
|
|
39
50
|
* @param opts - Pipeline options. Pass `{ projectWide: false }` when
|
|
@@ -41,6 +52,14 @@ import { buildEffectiveDisciplineRegistry } from "../profile/discipline_registry
|
|
|
41
52
|
*/
|
|
42
53
|
export function runPipeline(entries, profile, captionConventions = {}, opts = {}) {
|
|
43
54
|
const diagnostics = [];
|
|
55
|
+
// Partition per orchestrator (#771): emit loops here iterate
|
|
56
|
+
// `emittable` / `finalEmittable`; resolution maps build from the full
|
|
57
|
+
// lists so upstream entries stay live link targets (ADR-031 §4.7).
|
|
58
|
+
// `validate()` (Stage 1) and `validateTypl` derive their own partitions
|
|
59
|
+
// for their standalone callers — the guarantee is convention plus the
|
|
60
|
+
// upstream-silence anchor test, not a distinct type. A new stage added
|
|
61
|
+
// to this pipeline must loop over the emittable list.
|
|
62
|
+
const emittable = emittableEntries(entries);
|
|
44
63
|
// Stage 1 — core hygiene. When a profile is loaded, suppress MSL-R010
|
|
45
64
|
// warnings for attributes the profile actually declares (Stage 3's scope
|
|
46
65
|
// validates them directly — the core-only R010 check would be noise).
|
|
@@ -50,20 +69,20 @@ export function runPipeline(entries, profile, captionConventions = {}, opts = {}
|
|
|
50
69
|
// included) so unknown `Type:` values fail fast regardless of profile.
|
|
51
70
|
// Also covers late-stage display-ID-shape inference (step 8 → MSL-T021)
|
|
52
71
|
// and caption-adjacency rules (§2.6 → MSL-C070).
|
|
53
|
-
for (const entry of
|
|
72
|
+
for (const entry of emittable) {
|
|
54
73
|
diagnostics.push(...validateCoreTypeAttribute(entry, profile));
|
|
55
74
|
diagnostics.push(...inferTypeFromDisplayIdShape(entry));
|
|
56
75
|
diagnostics.push(...validateCaptions(entry));
|
|
57
76
|
diagnostics.push(...validateCaptionConvention(entry, captionConventions));
|
|
58
77
|
diagnostics.push(...validateBodyBlocks(entry));
|
|
59
78
|
diagnostics.push(...validateFeatureAc(entry));
|
|
60
|
-
diagnostics.push(...validatePerTypeAttributes(entry, profile ?? undefined));
|
|
61
79
|
diagnostics.push(...validateModalKeywords(entry));
|
|
62
80
|
}
|
|
63
81
|
// Stage 1.6 — cross-file trace target-type compatibility (MSL-R083).
|
|
64
82
|
// Runs project-wide because targets may live in any entry; needs the
|
|
65
|
-
// whole batch indexed
|
|
66
|
-
|
|
83
|
+
// whole batch indexed (resolution side) while emitting only from the
|
|
84
|
+
// partition.
|
|
85
|
+
diagnostics.push(...validateTraceTargetTypes(emittable, entries));
|
|
67
86
|
// Stage 1.7 — discipline attribute validation (ADR-017 Slice 3).
|
|
68
87
|
// Runs in both core-only and profile modes. In core-only mode the
|
|
69
88
|
// registry is CORE_DISCIPLINE_REGISTRY (kinds: system/software/hardware
|
|
@@ -72,21 +91,29 @@ export function runPipeline(entries, profile, captionConventions = {}, opts = {}
|
|
|
72
91
|
? buildEffectiveDisciplineRegistry(profile)
|
|
73
92
|
: CORE_DISCIPLINE_REGISTRY;
|
|
74
93
|
const entriesByDisplayId = new Map(entries.map((e) => [makeDisplayId(e.displayId), e]));
|
|
75
|
-
diagnostics.push(...validateDiscipline(
|
|
94
|
+
diagnostics.push(...validateDiscipline(emittable, entriesByDisplayId, disciplineRegistry));
|
|
76
95
|
// Stage 2 — classification (only when a profile is loaded).
|
|
96
|
+
// classifyEntriesStage handles upstream itself (pass-through, never
|
|
97
|
+
// re-classified) — it is a transform, not an emit loop; see types.ts.
|
|
77
98
|
let finalEntries = entries;
|
|
78
99
|
if (profile !== null) {
|
|
79
100
|
const stage2 = classifyEntriesStage(entries, profile);
|
|
80
101
|
finalEntries = stage2.entries;
|
|
81
102
|
diagnostics.push(...stage2.diagnostics);
|
|
82
103
|
}
|
|
83
|
-
// Stage 2.4 — late-stage inference warnings (MSL-T021 for steps 5/6)
|
|
84
|
-
//
|
|
85
|
-
//
|
|
86
|
-
//
|
|
87
|
-
//
|
|
88
|
-
|
|
104
|
+
// Stage 2.4 — late-stage inference warnings (MSL-T021 for steps 5/6)
|
|
105
|
+
// and per-type attribute compatibility (MSL-T022 / MSL-T024). Both run
|
|
106
|
+
// after Stage 2 so that a profile-classified `entry.type` (display-ID
|
|
107
|
+
// pattern match, no explicit `Type:`) resolves to its `extends:` core
|
|
108
|
+
// type — run before classification, MSL-T024 fired on every
|
|
109
|
+
// pattern-classified entry carrying `Satisfies:`/`Derived-from:`. In
|
|
110
|
+
// core-only mode `finalEntries === entries` and `entry.type` is always
|
|
111
|
+
// undefined, so this stage produces the same diagnostics regardless of
|
|
112
|
+
// mode. Partitions inline: `finalEmittable` below is derived from the
|
|
113
|
+
// post-normalization generation, which does not exist yet at this point.
|
|
114
|
+
for (const entry of emittableEntries(finalEntries)) {
|
|
89
115
|
diagnostics.push(...inferTypeFromLateStageChain(entry));
|
|
116
|
+
diagnostics.push(...validatePerTypeAttributes(entry, profile ?? undefined));
|
|
90
117
|
}
|
|
91
118
|
// Stage 2.5 — normalize profile-declared list-value attributes. Splits
|
|
92
119
|
// comma-separated values for `id-list`/`tag-list` attributes the core parser
|
|
@@ -94,16 +121,25 @@ export function runPipeline(entries, profile, captionConventions = {}, opts = {}
|
|
|
94
121
|
if (profile !== null) {
|
|
95
122
|
finalEntries = finalEntries.map((e) => normalizeListValues(e, profile));
|
|
96
123
|
}
|
|
97
|
-
//
|
|
124
|
+
// Final generation reached — Stages 2 and 2.5 both produced new Entry
|
|
125
|
+
// objects, so the emit partition for Stages 3/4 is derived here, once.
|
|
126
|
+
const finalEmittable = emittableEntries(finalEntries);
|
|
127
|
+
// Stage 3 — typed attributes (only when a profile is loaded). Upstream
|
|
128
|
+
// entries are validation-exempt (design §4.7) — outside the emit
|
|
129
|
+
// partition, but they remain in `finalEntries` for Stage 4's resolution
|
|
130
|
+
// maps below.
|
|
98
131
|
if (profile !== null) {
|
|
99
|
-
for (const entry of
|
|
132
|
+
for (const entry of finalEmittable) {
|
|
100
133
|
const stage3 = validateAttributesForEntry(entry, profile);
|
|
101
134
|
diagnostics.push(...stage3);
|
|
102
135
|
}
|
|
103
136
|
}
|
|
104
137
|
// Stage 4 — traceability rules (only when a profile is loaded). Builds two
|
|
105
138
|
// indexes: by `entry.id` (ULID) and by `entry.displayId`, so trace values
|
|
106
|
-
// resolve in either form (issue #593).
|
|
139
|
+
// resolve in either form (issue #593). Upstream entries MUST stay in both
|
|
140
|
+
// indexes — a project entry's link targeting an upstream entry must still
|
|
141
|
+
// resolve (design §4.7) — so this map-building loop is never filtered.
|
|
142
|
+
const projectWide = opts.projectWide !== false;
|
|
107
143
|
if (profile !== null) {
|
|
108
144
|
const graph = new Map();
|
|
109
145
|
const byDisplayId = new Map();
|
|
@@ -113,15 +149,32 @@ export function runPipeline(entries, profile, captionConventions = {}, opts = {}
|
|
|
113
149
|
if (!byDisplayId.has(e.displayId))
|
|
114
150
|
byDisplayId.set(e.displayId, e);
|
|
115
151
|
}
|
|
116
|
-
|
|
117
|
-
|
|
118
|
-
|
|
119
|
-
|
|
120
|
-
|
|
121
|
-
//
|
|
122
|
-
|
|
152
|
+
// Upstream entries are validation-exempt emitters (design §4.7): trace
|
|
153
|
+
// rules FROM an upstream entry are never checked. They remain
|
|
154
|
+
// resolution targets via the maps built above.
|
|
155
|
+
for (const entry of finalEmittable) {
|
|
156
|
+
const stage4 = validateTraceabilityForEntry(entry, profile, graph, byDisplayId, opts.declaredUpstreamIds);
|
|
157
|
+
// Suppress MSL-L006 ("link target does not resolve") and its
|
|
158
|
+
// federated-upstream replacement MSL-T014 when running file-locally:
|
|
159
|
+
// the checked subset cannot distinguish a typo from a valid
|
|
160
|
+
// cross-file/upstream target. Only emit when the full entry set is
|
|
161
|
+
// present.
|
|
162
|
+
diagnostics.push(...projectWide
|
|
163
|
+
? stage4
|
|
164
|
+
: stage4.filter((d) => d.code !== "MSL-L006" && d.code !== "MSL-T014"));
|
|
123
165
|
}
|
|
124
166
|
}
|
|
167
|
+
// Stage 5 — uxil diagnostics family (S9 #727). Inert unless some profile
|
|
168
|
+
// tier designates a declaring type (`declares: ux-surface`). Receives the
|
|
169
|
+
// FULL classified list on purpose: the family derives its own #771
|
|
170
|
+
// partition and its own declaring/citing split — registry scope is the
|
|
171
|
+
// module's contract, not this orchestrator's (mirrors validateTypl).
|
|
172
|
+
// File-local scope (projectWide: false) suppresses the cross-entry codes
|
|
173
|
+
// (UXIL-016/017/018) — a subset registry cannot distinguish a dangling
|
|
174
|
+
// reference from an unchecked file, the same false-positive class the
|
|
175
|
+
// MSL-L006 suppression guards (#727 review).
|
|
176
|
+
const uxilDiagnostics = validateUxilFamily(finalEntries, profile);
|
|
177
|
+
diagnostics.push(...(projectWide ? uxilDiagnostics : uxilDiagnostics.filter((d) => !FILE_LOCAL_SUPPRESSED_UXIL.has(d.code))));
|
|
125
178
|
const valid = !diagnostics.some((d) => d.severity === "error");
|
|
126
179
|
return { entries: finalEntries, diagnostics, valid };
|
|
127
180
|
}
|
|
@@ -20,7 +20,14 @@ import type { Diagnostic, Entry } from "../model/mod.js";
|
|
|
20
20
|
*
|
|
21
21
|
* Unresolved targets are silently skipped — they're caught elsewhere
|
|
22
22
|
* (MSL-R080 / MSL-T012 / MSL-T005). Targets without a resolvable core
|
|
23
|
-
* type are also skipped (no compat call to make).
|
|
23
|
+
* type are also skipped (no compat call to make). Upstream TARGETS are
|
|
24
|
+
* exempt from the MSL-R083 type-compat checks (#771) — their type comes
|
|
25
|
+
* from a foreign vocabulary, the target-side twin of #765's MSL-L004 fix.
|
|
26
|
+
*
|
|
27
|
+
* @param emittable The #771 emit partition — trace rules are never
|
|
28
|
+
* checked FROM an upstream entry.
|
|
29
|
+
* @param all The full entry set (upstream included) — resolution maps
|
|
30
|
+
* index it so links TO an upstream entry keep resolving.
|
|
24
31
|
*/
|
|
25
|
-
export declare function validateTraceTargetTypes(
|
|
32
|
+
export declare function validateTraceTargetTypes(emittable: readonly Entry[], all: readonly Entry[]): readonly Diagnostic[];
|
|
26
33
|
//# sourceMappingURL=trace_types.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"trace_types.d.ts","sourceRoot":"","sources":["../../src/validator/trace_types.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;GAYG;AAEH,OAAO,KAAK,EAAE,UAAU,EAAE,KAAK,EAAE,MAAM,iBAAiB,CAAC;
|
|
1
|
+
{"version":3,"file":"trace_types.d.ts","sourceRoot":"","sources":["../../src/validator/trace_types.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;GAYG;AAEH,OAAO,KAAK,EAAE,UAAU,EAAE,KAAK,EAAE,MAAM,iBAAiB,CAAC;AAwFzD;;;;;;;;;;;;;;;;GAgBG;AACH,wBAAgB,wBAAwB,CACtC,SAAS,EAAE,SAAS,KAAK,EAAE,EAC3B,GAAG,EAAE,SAAS,KAAK,EAAE,GACpB,SAAS,UAAU,EAAE,CA8HvB"}
|