@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
|
* - Inline HTML — remains inside `ParagraphNode.content.text` (remark
|
|
22
22
|
* does not extract inline HTML nodes into block-level nodes); each
|
|
23
23
|
* paragraph's text is scanned line-by-line using the same regex
|
|
24
|
-
* approach as the old walkProseLines path
|
|
24
|
+
* approach as the old walkProseLines path (with inline code spans
|
|
25
|
+
* masked out first — they are literal text, never HTML), bounded to prose-only
|
|
25
26
|
* nodes (code/feature/math blocks are automatically excluded because
|
|
26
27
|
* the builder does not emit prose-bearing nodes for verbatim content).
|
|
27
28
|
*
|
|
@@ -41,6 +42,15 @@ const directives_js_1 = require("../parser/directives.js");
|
|
|
41
42
|
const HTML_TAG_RE = /<\/?[A-Za-z][A-Za-z0-9]*(\s[^>]*)?\/?>/;
|
|
42
43
|
/** Any HTML comment, `<!--…-->`. */
|
|
43
44
|
const HTML_COMMENT_RE = /<!--[\s\S]*?-->/;
|
|
45
|
+
/**
|
|
46
|
+
* A CommonMark raw HTML open or closing tag (§6.6) anchored at the scan
|
|
47
|
+
* position. Stricter than {@linkcode HTML_TAG_RE} on purpose: it decides
|
|
48
|
+
* code-span precedence, so `` a<b and `c>` `` must not read as a tag
|
|
49
|
+
* (a backtick cannot start an attribute name) and hide the code span.
|
|
50
|
+
*/
|
|
51
|
+
const HTML_TAG_AT_RE = /^(?:<[A-Za-z][A-Za-z0-9-]*(?:\s+[A-Za-z_:][\w.:-]*(?:\s*=\s*(?:[^\s"'=<>`]+|'[^']*'|"[^"]*"))?)*\s*\/?>|<\/[A-Za-z][A-Za-z0-9-]*\s*>)/;
|
|
52
|
+
/** {@linkcode HTML_COMMENT_RE} anchored at the scan position. */
|
|
53
|
+
const HTML_COMMENT_AT_RE = new RegExp(`^${HTML_COMMENT_RE.source}`);
|
|
44
54
|
/**
|
|
45
55
|
* Return `true` when `line` contains raw HTML the body model forbids:
|
|
46
56
|
* any tag, or any comment that isn't a standalone markspec directive.
|
|
@@ -73,6 +83,74 @@ const RAW_HTML_DIAG = {
|
|
|
73
83
|
severity: "error",
|
|
74
84
|
summary: "raw HTML inside entry body — only `<!-- markspec:* -->` directive comments are permitted (spec §2.4.1)",
|
|
75
85
|
};
|
|
86
|
+
/**
|
|
87
|
+
* Blank out every CommonMark code span in `text` (delimiters included),
|
|
88
|
+
* keeping newlines so line offsets are preserved. A code span is literal
|
|
89
|
+
* text, never HTML (CommonMark §6.1), so `` `tool --root <ws>` `` must
|
|
90
|
+
* not reach the tag regex.
|
|
91
|
+
*
|
|
92
|
+
* Follows the CommonMark rules the regex scan would otherwise ignore:
|
|
93
|
+
* a backslash-escaped backtick does not open a span; an opening run of N
|
|
94
|
+
* backticks closes only at the next run of exactly N; an unmatched run
|
|
95
|
+
* is literal. Raw HTML and code spans bind left-to-right, so a tag that
|
|
96
|
+
* starts before a backtick run is skipped intact and still flagged.
|
|
97
|
+
*/
|
|
98
|
+
function maskCodeSpans(text) {
|
|
99
|
+
const blank = (s) => s.replace(/[^\n]/g, " ");
|
|
100
|
+
let out = "";
|
|
101
|
+
let i = 0;
|
|
102
|
+
while (i < text.length) {
|
|
103
|
+
const ch = text[i];
|
|
104
|
+
if (ch === "\\" && i + 1 < text.length) {
|
|
105
|
+
out += text.slice(i, i + 2);
|
|
106
|
+
i += 2;
|
|
107
|
+
continue;
|
|
108
|
+
}
|
|
109
|
+
if (ch === "<") {
|
|
110
|
+
const rest = text.slice(i);
|
|
111
|
+
const tag = HTML_TAG_AT_RE.exec(rest) ?? HTML_COMMENT_AT_RE.exec(rest);
|
|
112
|
+
if (tag) {
|
|
113
|
+
out += tag[0];
|
|
114
|
+
i += tag[0].length;
|
|
115
|
+
continue;
|
|
116
|
+
}
|
|
117
|
+
}
|
|
118
|
+
if (ch !== "`") {
|
|
119
|
+
out += ch;
|
|
120
|
+
i++;
|
|
121
|
+
continue;
|
|
122
|
+
}
|
|
123
|
+
let runEnd = i;
|
|
124
|
+
while (runEnd < text.length && text[runEnd] === "`")
|
|
125
|
+
runEnd++;
|
|
126
|
+
const runLength = runEnd - i;
|
|
127
|
+
let close = -1;
|
|
128
|
+
let j = runEnd;
|
|
129
|
+
while (j < text.length) {
|
|
130
|
+
if (text[j] !== "`") {
|
|
131
|
+
j++;
|
|
132
|
+
continue;
|
|
133
|
+
}
|
|
134
|
+
let k = j;
|
|
135
|
+
while (k < text.length && text[k] === "`")
|
|
136
|
+
k++;
|
|
137
|
+
if (k - j === runLength) {
|
|
138
|
+
close = k;
|
|
139
|
+
break;
|
|
140
|
+
}
|
|
141
|
+
j = k;
|
|
142
|
+
}
|
|
143
|
+
if (close < 0) {
|
|
144
|
+
// Unmatched opener — the backticks are literal text.
|
|
145
|
+
out += text.slice(i, runEnd);
|
|
146
|
+
i = runEnd;
|
|
147
|
+
continue;
|
|
148
|
+
}
|
|
149
|
+
out += blank(text.slice(i, close));
|
|
150
|
+
i = close;
|
|
151
|
+
}
|
|
152
|
+
return out;
|
|
153
|
+
}
|
|
76
154
|
/**
|
|
77
155
|
* Scan `text` line-by-line for forbidden inline HTML, starting at
|
|
78
156
|
* `startLine` (1-based body-relative). Returns one `{ diag, bodyLine }`
|
|
@@ -86,7 +164,7 @@ const RAW_HTML_DIAG = {
|
|
|
86
164
|
*/
|
|
87
165
|
function htmlViolations(text, startLine) {
|
|
88
166
|
const out = [];
|
|
89
|
-
const lines = text.split("\n");
|
|
167
|
+
const lines = maskCodeSpans(text).split("\n");
|
|
90
168
|
for (let li = 0; li < lines.length; li++) {
|
|
91
169
|
const line = lines[li];
|
|
92
170
|
if (line.trim() === "")
|
|
@@ -22,7 +22,8 @@ import type { CaptionConventions, Diagnostic, Entry } from "../model/mod.js";
|
|
|
22
22
|
*
|
|
23
23
|
* @param entry - The entry whose body AST is scanned for captions.
|
|
24
24
|
* @param conventions - The configured position conventions from
|
|
25
|
-
* `
|
|
25
|
+
* `.markspec.yaml` `caption-conventions:` (`ToolConfig.captionConventions`).
|
|
26
|
+
* An empty record means no
|
|
26
27
|
* conventions are set and the function returns immediately.
|
|
27
28
|
*/
|
|
28
29
|
export declare function validateCaptionConvention(entry: Entry, conventions: CaptionConventions): readonly Diagnostic[];
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"caption_convention.d.ts","sourceRoot":"","sources":["../../src/validator/caption_convention.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;;;;GAiBG;AAEH,OAAO,KAAK,EAAE,kBAAkB,EAAE,UAAU,EAAE,KAAK,EAAE,MAAM,iBAAiB,CAAC;AAE7E
|
|
1
|
+
{"version":3,"file":"caption_convention.d.ts","sourceRoot":"","sources":["../../src/validator/caption_convention.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;;;;GAiBG;AAEH,OAAO,KAAK,EAAE,kBAAkB,EAAE,UAAU,EAAE,KAAK,EAAE,MAAM,iBAAiB,CAAC;AAE7E;;;;;;;;GAQG;AACH,wBAAgB,yBAAyB,CACvC,KAAK,EAAE,KAAK,EACZ,WAAW,EAAE,kBAAkB,GAC9B,SAAS,UAAU,EAAE,CAmCvB"}
|
|
@@ -24,7 +24,8 @@ exports.validateCaptionConvention = validateCaptionConvention;
|
|
|
24
24
|
*
|
|
25
25
|
* @param entry - The entry whose body AST is scanned for captions.
|
|
26
26
|
* @param conventions - The configured position conventions from
|
|
27
|
-
* `
|
|
27
|
+
* `.markspec.yaml` `caption-conventions:` (`ToolConfig.captionConventions`).
|
|
28
|
+
* An empty record means no
|
|
28
29
|
* conventions are set and the function returns immediately.
|
|
29
30
|
*/
|
|
30
31
|
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"}
|
|
@@ -15,9 +15,37 @@
|
|
|
15
15
|
* collided tokens (MSL-R014 replaces them).
|
|
16
16
|
*/
|
|
17
17
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
18
|
+
exports.applyCorpusPostPass = applyCorpusPostPass;
|
|
18
19
|
exports.detectCorpusCollisions = detectCorpusCollisions;
|
|
19
20
|
exports.attributeCorpusDiagnostics = attributeCorpusDiagnostics;
|
|
20
21
|
const mod_js_1 = require("../model/mod.js");
|
|
22
|
+
/**
|
|
23
|
+
* Attribute corpus findings and replace generic duplicate diagnostics with
|
|
24
|
+
* corpus collisions. Append collisions after attribution so MSL-R014 remains
|
|
25
|
+
* an error even when its location belongs to a read-only corpus.
|
|
26
|
+
*/
|
|
27
|
+
function applyCorpusPostPass(diagnostics, allEntries) {
|
|
28
|
+
const collisions = detectCorpusCollisions(allEntries);
|
|
29
|
+
return [
|
|
30
|
+
...attributeCorpusDiagnostics(diagnostics, allEntries, collisions.collidedTokens),
|
|
31
|
+
...collisions.diagnostics,
|
|
32
|
+
];
|
|
33
|
+
}
|
|
34
|
+
/**
|
|
35
|
+
* Remedy clause for an inter-tier MSL-R014 collision — both owners
|
|
36
|
+
* carry an origin (upstream and/or delivered profile), so the consumer
|
|
37
|
+
* reading the diagnostic can rename NEITHER read-only entry (#771; the
|
|
38
|
+
* #799 review extended this from the upstream↔upstream case to every
|
|
39
|
+
* origin pairing). The remedy names the actions a consumer CAN take.
|
|
40
|
+
* Same-source duplicates never reach this clause (excluded via
|
|
41
|
+
* `sameOriginSource` — that is the delivering author's own bug, kept on
|
|
42
|
+
* the generic duplicate codes), and project↔origin collisions keep the
|
|
43
|
+
* "rename this entry" wording above (the project entry is the
|
|
44
|
+
* consumer's own).
|
|
45
|
+
*/
|
|
46
|
+
const INTER_TIER_REMEDY = "a consumer cannot rename either read-only entry; drop one of the " +
|
|
47
|
+
"colliding sources (a delivered profile in .markspec.yaml, an upstream " +
|
|
48
|
+
"in project.yaml) or coordinate a rename with its author";
|
|
21
49
|
/** Generic duplicate detectors superseded by MSL-R014 for corpus collisions. */
|
|
22
50
|
const GENERIC_DUP_CODES = new Set([
|
|
23
51
|
"MSL-R005",
|
|
@@ -29,7 +57,7 @@ function detectCorpusCollisions(allEntries) {
|
|
|
29
57
|
const corpusByDisplayId = new Map();
|
|
30
58
|
const corpusById = new Map();
|
|
31
59
|
for (const e of allEntries) {
|
|
32
|
-
if (!
|
|
60
|
+
if (!(0, mod_js_1.isCorpusEntry)(e))
|
|
33
61
|
continue;
|
|
34
62
|
if (!corpusByDisplayId.has(e.displayId)) {
|
|
35
63
|
corpusByDisplayId.set(e.displayId, e);
|
|
@@ -43,16 +71,16 @@ function detectCorpusCollisions(allEntries) {
|
|
|
43
71
|
const diagnostics = [];
|
|
44
72
|
const collided = new Set();
|
|
45
73
|
for (const e of allEntries) {
|
|
46
|
-
if (!
|
|
74
|
+
if (!(0, mod_js_1.isCorpusEntry)(e)) {
|
|
47
75
|
const displayOwner = corpusByDisplayId.get(e.displayId);
|
|
48
76
|
if (displayOwner) {
|
|
49
77
|
collided.add(e.displayId);
|
|
50
78
|
diagnostics.push({
|
|
51
79
|
code: "MSL-R014",
|
|
52
80
|
severity: "error",
|
|
53
|
-
message: `display ID '${e.displayId}' is already
|
|
81
|
+
message: `display ID '${e.displayId}' is already provided by ` +
|
|
54
82
|
`${(0, mod_js_1.formatEntryOrigin)(displayOwner.origin)}; rename this entry — ` +
|
|
55
|
-
`delivered
|
|
83
|
+
`upstream and delivered-corpus entries are read-only`,
|
|
56
84
|
location: e.location,
|
|
57
85
|
});
|
|
58
86
|
}
|
|
@@ -63,9 +91,9 @@ function detectCorpusCollisions(allEntries) {
|
|
|
63
91
|
diagnostics.push({
|
|
64
92
|
code: "MSL-R014",
|
|
65
93
|
severity: "error",
|
|
66
|
-
message: `Id '${e.id}' is already
|
|
94
|
+
message: `Id '${e.id}' is already provided by ` +
|
|
67
95
|
`${(0, mod_js_1.formatEntryOrigin)(idOwner.origin)}; rename this entry — ` +
|
|
68
|
-
`delivered
|
|
96
|
+
`upstream and delivered-corpus entries are read-only`,
|
|
69
97
|
location: e.location,
|
|
70
98
|
});
|
|
71
99
|
}
|
|
@@ -79,28 +107,30 @@ function detectCorpusCollisions(allEntries) {
|
|
|
79
107
|
// violation, and stays on the generic duplicate codes.
|
|
80
108
|
const displayOwner = corpusByDisplayId.get(e.displayId);
|
|
81
109
|
if (displayOwner !== e && displayOwner &&
|
|
82
|
-
displayOwner.origin
|
|
110
|
+
!(0, mod_js_1.sameOriginSource)(displayOwner.origin, e.origin)) {
|
|
83
111
|
collided.add(e.displayId);
|
|
84
112
|
diagnostics.push({
|
|
85
113
|
code: "MSL-R014",
|
|
86
114
|
severity: "error",
|
|
87
|
-
message: `display ID '${e.displayId}' is
|
|
88
|
-
`${(0, mod_js_1.formatEntryOrigin)(displayOwner.origin)}
|
|
89
|
-
`
|
|
115
|
+
message: `display ID '${e.displayId}' is provided by both ` +
|
|
116
|
+
`${(0, mod_js_1.formatEntryOrigin)(displayOwner.origin)} and ` +
|
|
117
|
+
`${(0, mod_js_1.formatEntryOrigin)(e.origin)} — ` +
|
|
118
|
+
INTER_TIER_REMEDY,
|
|
90
119
|
location: e.location,
|
|
91
120
|
});
|
|
92
121
|
}
|
|
93
122
|
if (e.id) {
|
|
94
123
|
const idOwner = corpusById.get(e.id);
|
|
95
124
|
if (idOwner !== e && idOwner &&
|
|
96
|
-
idOwner.origin
|
|
125
|
+
!(0, mod_js_1.sameOriginSource)(idOwner.origin, e.origin)) {
|
|
97
126
|
collided.add(e.id);
|
|
98
127
|
diagnostics.push({
|
|
99
128
|
code: "MSL-R014",
|
|
100
129
|
severity: "error",
|
|
101
|
-
message: `Id '${e.id}' is
|
|
102
|
-
`${(0, mod_js_1.formatEntryOrigin)(idOwner.origin)}
|
|
103
|
-
`
|
|
130
|
+
message: `Id '${e.id}' is provided by both ` +
|
|
131
|
+
`${(0, mod_js_1.formatEntryOrigin)(idOwner.origin)} and ` +
|
|
132
|
+
`${(0, mod_js_1.formatEntryOrigin)(e.origin)} — ` +
|
|
133
|
+
INTER_TIER_REMEDY,
|
|
104
134
|
location: e.location,
|
|
105
135
|
});
|
|
106
136
|
}
|
|
@@ -111,8 +141,8 @@ function detectCorpusCollisions(allEntries) {
|
|
|
111
141
|
function attributeCorpusDiagnostics(diagnostics, allEntries, collidedTokens) {
|
|
112
142
|
const corpusFiles = new Map();
|
|
113
143
|
for (const e of allEntries) {
|
|
114
|
-
if (
|
|
115
|
-
corpusFiles.set(e.location.file,
|
|
144
|
+
if ((0, mod_js_1.isCorpusEntry)(e)) {
|
|
145
|
+
corpusFiles.set(e.location.file, e.origin);
|
|
116
146
|
}
|
|
117
147
|
}
|
|
118
148
|
const out = [];
|
|
@@ -129,12 +159,18 @@ function attributeCorpusDiagnostics(diagnostics, allEntries, collidedTokens) {
|
|
|
129
159
|
[...collidedTokens].some((t) => d.message.includes(`'${t}'`))) {
|
|
130
160
|
continue;
|
|
131
161
|
}
|
|
132
|
-
const
|
|
133
|
-
if (
|
|
162
|
+
const origin = d.location ? corpusFiles.get(d.location.file) : undefined;
|
|
163
|
+
if (origin !== undefined) {
|
|
164
|
+
// Attribution verb follows the origin tier (#771): "delivered by"
|
|
165
|
+
// is ADR-030 profile-corpus language; a finding located in a
|
|
166
|
+
// hydrated upstream snapshot reads "from upstream" instead.
|
|
167
|
+
const verb = origin.kind === "upstream"
|
|
168
|
+
? "from upstream"
|
|
169
|
+
: "delivered by";
|
|
134
170
|
out.push({
|
|
135
171
|
...d,
|
|
136
172
|
severity: d.severity === "error" ? "warning" : d.severity,
|
|
137
|
-
message:
|
|
173
|
+
message: `${verb} ${(0, mod_js_1.formatEntryOrigin)(origin)}: ${d.message}`,
|
|
138
174
|
});
|
|
139
175
|
continue;
|
|
140
176
|
}
|
|
@@ -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"}
|
|
@@ -102,10 +102,12 @@ function channel4Kind(entry, entriesByDisplayId, registry) {
|
|
|
102
102
|
* every entry. Pure function: takes the entries, a lookup map (used by
|
|
103
103
|
* later tasks for channel-4 derivation), and the effective registry.
|
|
104
104
|
*
|
|
105
|
-
* @param entries
|
|
106
|
-
*
|
|
107
|
-
*
|
|
108
|
-
*
|
|
105
|
+
* @param entries Emittable entries to walk — the caller passes the #771
|
|
106
|
+
* partition (upstream entries are exempt emitters, ADR-031 §4.7).
|
|
107
|
+
* @param entriesByDisplayId Lookup map for channel-4 derivation, built from
|
|
108
|
+
* the FULL entry set (upstream included) so Allocated-to targets in
|
|
109
|
+
* upstream entries still resolve. Tasks 5–8 will use this; Task 4
|
|
110
|
+
* ignores it but keeps the parameter to fix the signature now.
|
|
109
111
|
* @param registry Effective discipline registry from Slice 2's
|
|
110
112
|
* `buildEffectiveDisciplineRegistry()`, or `CORE_DISCIPLINE_REGISTRY` in
|
|
111
113
|
* core-only mode.
|
|
@@ -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/script/validator/mod.js
CHANGED
|
@@ -15,7 +15,7 @@
|
|
|
15
15
|
* a profile-aware validator layer (not in the core).
|
|
16
16
|
*/
|
|
17
17
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
18
|
-
exports.detectCorpusCollisions = exports.attributeCorpusDiagnostics = exports.validateTraceabilityForEntry = exports.matchesAnyTarget = exports.effectiveTraceRules = exports.normalizeListValues = exports.validateValue = exports.validateAttributesForEntry = exports.effectiveScope = exports.compileDisplayIdPattern = exports.classifyEntry = exports.classifyEntriesStage = exports.validateListingDocuments = exports.suppressDeclaredAttrR010 = exports.runPipeline = void 0;
|
|
18
|
+
exports.detectCorpusCollisions = exports.attributeCorpusDiagnostics = exports.applyCorpusPostPass = exports.validateTraceabilityForEntry = exports.matchesAnyTarget = exports.effectiveTraceRules = exports.normalizeListValues = exports.validateValue = exports.validateAttributesForEntry = exports.effectiveScope = exports.compileDisplayIdPattern = exports.classifyEntry = exports.classifyEntriesStage = exports.validateListingDocuments = exports.suppressDeclaredAttrR010 = exports.runPipeline = void 0;
|
|
19
19
|
exports.validate = validate;
|
|
20
20
|
exports.indexByDisplayId = indexByDisplayId;
|
|
21
21
|
exports.findAttr = findAttr;
|
|
@@ -51,21 +51,32 @@ const REFERENCE_SLUG_RE = /^[A-Za-z]([A-Za-z0-9._/-]*[A-Za-z0-9])?$/;
|
|
|
51
51
|
*/
|
|
52
52
|
function validate(entries) {
|
|
53
53
|
const diagnostics = [];
|
|
54
|
-
|
|
55
|
-
|
|
56
|
-
//
|
|
57
|
-
//
|
|
58
|
-
|
|
54
|
+
// Partition once (#771): upstream entries are read-only graph citizens
|
|
55
|
+
// (ADR-031 §4.7) — emit loops iterate `emittable`; resolution maps
|
|
56
|
+
// (checkReferences) still index the full `entries` list so links TO an
|
|
57
|
+
// upstream entry keep resolving.
|
|
58
|
+
const emittable = (0, mod_js_1.emittableEntries)(entries);
|
|
59
|
+
checkStructural(emittable, diagnostics);
|
|
60
|
+
checkReferences(emittable, entries, diagnostics);
|
|
61
|
+
// Typl declared-once (TYPL-009), citation resolution (TYPL-010/011), and
|
|
62
|
+
// undefined-typedef-refs (TYPL-005). Per-block diagnostics
|
|
63
|
+
// (TYPL-001/004/006/007/008) already fired during parse via the bridge.
|
|
64
|
+
// Receives the FULL list on purpose: validateTypl applies the partition
|
|
65
|
+
// itself — its typl-inert-upstream working set is the module's own
|
|
66
|
+
// registry-scope contract, not this orchestrator's to enforce.
|
|
59
67
|
const typlResult = (0, mod_js_2.validateTypl)(entries);
|
|
60
68
|
diagnostics.push(...typlResult.diagnostics);
|
|
61
69
|
const valid = !diagnostics.some((d) => d.severity === "error");
|
|
62
70
|
return { diagnostics, valid };
|
|
63
71
|
}
|
|
64
|
-
/** MSL-R structural checks on individual entries and cross-entry uniqueness.
|
|
65
|
-
|
|
72
|
+
/** MSL-R structural checks on individual entries and cross-entry uniqueness.
|
|
73
|
+
* Receives the pre-partitioned emittable list (#771) — upstream entries never
|
|
74
|
+
* enter these checks or the duplicate maps below (same as before the
|
|
75
|
+
* partition: the maps were built inside the guarded loop). */
|
|
76
|
+
function checkStructural(emittable, diagnostics) {
|
|
66
77
|
const displayIds = new Map();
|
|
67
78
|
const ids = new Map();
|
|
68
|
-
for (const entry of
|
|
79
|
+
for (const entry of emittable) {
|
|
69
80
|
// MSL-R003: exactly one `Id:` attribute per entry.
|
|
70
81
|
// Dual-emit: MSL-I002 (Reference missing Id), MSL-I003 (Authored missing
|
|
71
82
|
// Id), MSL-I004 (multiple Id) — nextgen §4.2 codes alongside legacy.
|
|
@@ -392,11 +403,13 @@ function checkStructural(entries, diagnostics) {
|
|
|
392
403
|
}
|
|
393
404
|
}
|
|
394
405
|
}
|
|
395
|
-
/** Cross-reference integrity checks.
|
|
396
|
-
|
|
406
|
+
/** Cross-reference integrity checks. Emit loops iterate the pre-partitioned
|
|
407
|
+
* `emittable` list (#771 — refs FROM an upstream entry are never checked);
|
|
408
|
+
* the resolution maps index `all` so refs TO an upstream entry resolve. */
|
|
409
|
+
function checkReferences(emittable, all, diagnostics) {
|
|
397
410
|
// Build a display-ID index for cross-reference resolution.
|
|
398
411
|
const byDisplayId = new Map();
|
|
399
|
-
for (const entry of
|
|
412
|
+
for (const entry of all) {
|
|
400
413
|
if (!byDisplayId.has(entry.displayId)) {
|
|
401
414
|
byDisplayId.set(entry.displayId, entry);
|
|
402
415
|
}
|
|
@@ -404,14 +417,14 @@ function checkReferences(entries, diagnostics) {
|
|
|
404
417
|
// Also index by `Id:` value so references may target ULIDs or URIs
|
|
405
418
|
// directly (profile tooling commonly accepts either).
|
|
406
419
|
const byId = new Map();
|
|
407
|
-
for (const entry of
|
|
420
|
+
for (const entry of all) {
|
|
408
421
|
if (entry.id && !byId.has(entry.id)) {
|
|
409
422
|
byId.set(entry.id, entry);
|
|
410
423
|
}
|
|
411
424
|
}
|
|
412
425
|
// MSL-T012: `Supersedes:` — the one baked-in relation. Target must
|
|
413
426
|
// resolve; profile rules check type/shape compatibility separately.
|
|
414
|
-
for (const entry of
|
|
427
|
+
for (const entry of emittable) {
|
|
415
428
|
const supersedes = entry.rawAttributes.find((a) => a.key === "Supersedes");
|
|
416
429
|
if (!supersedes)
|
|
417
430
|
continue;
|
|
@@ -428,7 +441,7 @@ function checkReferences(entries, diagnostics) {
|
|
|
428
441
|
}
|
|
429
442
|
// MSL-T005: `References:` — citations must resolve to a referenced
|
|
430
443
|
// entry. This is a universal relation (citing identified → referenced).
|
|
431
|
-
for (const entry of
|
|
444
|
+
for (const entry of emittable) {
|
|
432
445
|
const citations = entry.rawAttributes.filter((a) => a.key === "References");
|
|
433
446
|
for (const attr of citations) {
|
|
434
447
|
// Citation format: "slug [free-text locator]"; take the first token.
|
|
@@ -494,5 +507,6 @@ Object.defineProperty(exports, "effectiveTraceRules", { enumerable: true, get: f
|
|
|
494
507
|
Object.defineProperty(exports, "matchesAnyTarget", { enumerable: true, get: function () { return traceability_js_1.matchesAnyTarget; } });
|
|
495
508
|
Object.defineProperty(exports, "validateTraceabilityForEntry", { enumerable: true, get: function () { return traceability_js_1.validateTraceabilityForEntry; } });
|
|
496
509
|
var corpus_js_1 = require("./corpus.js");
|
|
510
|
+
Object.defineProperty(exports, "applyCorpusPostPass", { enumerable: true, get: function () { return corpus_js_1.applyCorpusPostPass; } });
|
|
497
511
|
Object.defineProperty(exports, "attributeCorpusDiagnostics", { enumerable: true, get: function () { return corpus_js_1.attributeCorpusDiagnostics; } });
|
|
498
512
|
Object.defineProperty(exports, "detectCorpusCollisions", { enumerable: true, get: function () { return corpus_js_1.detectCorpusCollisions; } });
|
|
@@ -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"}
|