@driftsys/markspec 0.4.0 → 0.6.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 +74 -20
- package/esm/ast/build.d.ts +60 -0
- package/esm/ast/build.d.ts.map +1 -0
- package/esm/ast/build.js +516 -0
- package/esm/ast/equivalence.d.ts +18 -0
- package/esm/ast/equivalence.d.ts.map +1 -0
- package/esm/ast/equivalence.js +56 -0
- package/esm/ast/nodes.d.ts +189 -0
- package/esm/ast/nodes.d.ts.map +1 -0
- package/esm/ast/nodes.js +17 -0
- package/esm/ast/normalize.d.ts +58 -0
- package/esm/ast/normalize.d.ts.map +1 -0
- package/esm/ast/normalize.js +197 -0
- package/esm/ast/render.d.ts +34 -0
- package/esm/ast/render.d.ts.map +1 -0
- package/esm/ast/render.js +215 -0
- package/esm/compiler/constants.d.ts +16 -0
- package/esm/compiler/constants.d.ts.map +1 -0
- package/esm/compiler/constants.js +26 -0
- package/esm/compiler/discipline_classifier.d.ts +55 -0
- package/esm/compiler/discipline_classifier.d.ts.map +1 -0
- package/esm/compiler/discipline_classifier.js +191 -0
- package/esm/compiler/inverses.d.ts +2 -1
- package/esm/compiler/inverses.d.ts.map +1 -1
- package/esm/compiler/inverses.js +33 -14
- package/esm/compiler/manifest.d.ts +59 -0
- package/esm/compiler/manifest.d.ts.map +1 -0
- package/esm/compiler/manifest.js +48 -0
- package/esm/compiler/mod.d.ts +38 -1
- package/esm/compiler/mod.d.ts.map +1 -1
- package/esm/compiler/mod.js +202 -50
- package/esm/compiler/ndjson_writer.d.ts +50 -0
- package/esm/compiler/ndjson_writer.d.ts.map +1 -0
- package/esm/compiler/ndjson_writer.js +73 -0
- package/esm/compiler/schema.d.ts +33 -1
- package/esm/compiler/schema.d.ts.map +1 -1
- package/esm/compiler/schema.js +30 -9
- package/esm/config/markspec.d.ts +5 -0
- package/esm/config/markspec.d.ts.map +1 -1
- package/esm/config/markspec.js +17 -2
- package/esm/config/mod.d.ts.map +1 -1
- package/esm/config/mod.js +54 -0
- package/esm/formatter/mod.d.ts +55 -4
- package/esm/formatter/mod.d.ts.map +1 -1
- package/esm/formatter/mod.js +423 -46
- package/esm/formatter/synth_ulid.d.ts +21 -0
- package/esm/formatter/synth_ulid.d.ts.map +1 -0
- package/esm/formatter/synth_ulid.js +64 -0
- package/esm/lexicons/loader.d.ts +35 -0
- package/esm/lexicons/loader.d.ts.map +1 -0
- package/esm/lexicons/loader.js +51 -0
- package/esm/lexicons/mod.d.ts +13 -0
- package/esm/lexicons/mod.d.ts.map +1 -0
- package/esm/lexicons/mod.js +12 -0
- package/esm/lint/glossary.d.ts +45 -0
- package/esm/lint/glossary.d.ts.map +1 -0
- package/esm/lint/glossary.js +85 -0
- package/esm/lint/mod.d.ts +14 -0
- package/esm/lint/mod.d.ts.map +1 -0
- package/esm/lint/mod.js +9 -0
- package/esm/lint/range_util.d.ts +25 -0
- package/esm/lint/range_util.d.ts.map +1 -0
- package/esm/lint/range_util.js +50 -0
- package/esm/lint/rules/ears.d.ts +39 -0
- package/esm/lint/rules/ears.d.ts.map +1 -0
- package/esm/lint/rules/ears.js +316 -0
- package/esm/lint/rules/incose_sentence.d.ts +46 -0
- package/esm/lint/rules/incose_sentence.d.ts.map +1 -0
- package/esm/lint/rules/incose_sentence.js +417 -0
- package/esm/lint/rules/lexicon.d.ts +24 -0
- package/esm/lint/rules/lexicon.d.ts.map +1 -0
- package/esm/lint/rules/lexicon.js +236 -0
- package/esm/lint/rules/modal_sentence.d.ts +46 -0
- package/esm/lint/rules/modal_sentence.d.ts.map +1 -0
- package/esm/lint/rules/modal_sentence.js +146 -0
- package/esm/lint/rules/passive.d.ts +64 -0
- package/esm/lint/rules/passive.d.ts.map +1 -0
- package/esm/lint/rules/passive.js +282 -0
- package/esm/lint/rules/struct.d.ts +17 -0
- package/esm/lint/rules/struct.d.ts.map +1 -0
- package/esm/lint/rules/struct.js +55 -0
- package/esm/lint/rules/suppression.d.ts +54 -0
- package/esm/lint/rules/suppression.d.ts.map +1 -0
- package/esm/lint/rules/suppression.js +129 -0
- package/esm/lint/rules/xref.d.ts +19 -0
- package/esm/lint/rules/xref.d.ts.map +1 -0
- package/esm/lint/rules/xref.js +248 -0
- package/esm/lint/runner.d.ts +59 -0
- package/esm/lint/runner.d.ts.map +1 -0
- package/esm/lint/runner.js +153 -0
- package/esm/lint/score.d.ts +64 -0
- package/esm/lint/score.d.ts.map +1 -0
- package/esm/lint/score.js +163 -0
- package/esm/lint/segmenter.d.ts +32 -0
- package/esm/lint/segmenter.d.ts.map +1 -0
- package/esm/lint/segmenter.js +79 -0
- package/esm/lint/types.d.ts +31 -0
- package/esm/lint/types.d.ts.map +1 -0
- package/esm/lint/types.js +9 -0
- package/esm/lock/canonical_edges.d.ts +31 -0
- package/esm/lock/canonical_edges.d.ts.map +1 -0
- package/esm/lock/canonical_edges.js +57 -0
- package/esm/lock/check.d.ts +24 -0
- package/esm/lock/check.d.ts.map +1 -0
- package/esm/lock/check.js +127 -0
- package/esm/lock/hash.d.ts +12 -0
- package/esm/lock/hash.d.ts.map +1 -0
- package/esm/lock/hash.js +32 -0
- package/esm/lock/mod.d.ts +19 -0
- package/esm/lock/mod.d.ts.map +1 -0
- package/esm/lock/mod.js +14 -0
- package/esm/lock/model.d.ts +81 -0
- package/esm/lock/model.d.ts.map +1 -0
- package/esm/lock/model.js +7 -0
- package/esm/lock/parser.d.ts +26 -0
- package/esm/lock/parser.d.ts.map +1 -0
- package/esm/lock/parser.js +195 -0
- package/esm/lock/resolve.d.ts +142 -0
- package/esm/lock/resolve.d.ts.map +1 -0
- package/esm/lock/resolve.js +389 -0
- package/esm/lock/serializer.d.ts +14 -0
- package/esm/lock/serializer.d.ts.map +1 -0
- package/esm/lock/serializer.js +104 -0
- package/esm/mod.d.ts +28 -8
- package/esm/mod.d.ts.map +1 -1
- package/esm/mod.js +23 -4
- package/esm/model/attributes.d.ts +6 -0
- package/esm/model/attributes.d.ts.map +1 -1
- package/esm/model/attributes.js +200 -2
- package/esm/model/discipline.d.ts +53 -0
- package/esm/model/discipline.d.ts.map +1 -0
- package/esm/model/discipline.js +50 -0
- package/esm/model/discriminating_attr.d.ts +33 -0
- package/esm/model/discriminating_attr.d.ts.map +1 -0
- package/esm/model/discriminating_attr.js +74 -0
- package/esm/model/mod.d.ts +267 -14
- package/esm/model/mod.d.ts.map +1 -1
- package/esm/model/mod.js +99 -3
- package/esm/model/profile.d.ts +102 -27
- package/esm/model/profile.d.ts.map +1 -1
- package/esm/model/source_introspection.d.ts +26 -0
- package/esm/model/source_introspection.d.ts.map +1 -0
- package/esm/model/source_introspection.js +77 -0
- package/esm/model/type_hierarchy.d.ts +51 -0
- package/esm/model/type_hierarchy.d.ts.map +1 -0
- package/esm/model/type_hierarchy.js +126 -0
- package/esm/model/uri_scheme_map.d.ts +21 -0
- package/esm/model/uri_scheme_map.d.ts.map +1 -0
- package/esm/model/uri_scheme_map.js +66 -0
- package/esm/parser/attributes.d.ts.map +1 -1
- package/esm/parser/attributes.js +10 -16
- package/esm/parser/body_tokens.d.ts +35 -0
- package/esm/parser/body_tokens.d.ts.map +1 -0
- package/esm/parser/body_tokens.js +232 -0
- package/esm/parser/glossary.d.ts +51 -0
- package/esm/parser/glossary.d.ts.map +1 -0
- package/esm/parser/glossary.js +219 -0
- package/esm/parser/grammars.d.ts +5 -3
- package/esm/parser/grammars.d.ts.map +1 -1
- package/esm/parser/grammars.js +12 -4
- package/esm/parser/language_spec.d.ts +55 -0
- package/esm/parser/language_spec.d.ts.map +1 -0
- package/esm/parser/language_spec.js +419 -0
- package/esm/parser/line_map.d.ts +60 -0
- package/esm/parser/line_map.d.ts.map +1 -0
- package/esm/parser/line_map.js +41 -0
- package/esm/parser/markdown.d.ts +9 -0
- package/esm/parser/markdown.d.ts.map +1 -1
- package/esm/parser/markdown.js +317 -25
- package/esm/parser/mod.d.ts +5 -0
- package/esm/parser/mod.d.ts.map +1 -1
- package/esm/parser/mod.js +31 -8
- package/esm/parser/source.d.ts +53 -2
- package/esm/parser/source.d.ts.map +1 -1
- package/esm/parser/source.js +158 -68
- package/esm/parser/translate.d.ts +24 -0
- package/esm/parser/translate.d.ts.map +1 -0
- package/esm/parser/translate.js +99 -0
- package/esm/profile/chain.d.ts +8 -0
- package/esm/profile/chain.d.ts.map +1 -1
- package/esm/profile/chain.js +32 -14
- package/esm/profile/colors.js +1 -1
- package/esm/profile/default_profile.d.ts +25 -0
- package/esm/profile/default_profile.d.ts.map +1 -0
- package/esm/profile/default_profile.js +43 -0
- package/esm/profile/discipline_mode.d.ts +64 -0
- package/esm/profile/discipline_mode.d.ts.map +1 -0
- package/esm/profile/discipline_mode.js +133 -0
- package/esm/profile/discipline_registry.d.ts +41 -0
- package/esm/profile/discipline_registry.d.ts.map +1 -0
- package/esm/profile/discipline_registry.js +67 -0
- package/esm/profile/introspect.d.ts +135 -0
- package/esm/profile/introspect.d.ts.map +1 -0
- package/esm/profile/introspect.js +378 -0
- package/esm/profile/load.d.ts +3 -1
- package/esm/profile/load.d.ts.map +1 -1
- package/esm/profile/load.js +91 -5
- package/esm/profile/manifest.d.ts.map +1 -1
- package/esm/profile/manifest.js +512 -90
- package/esm/profile/merge.d.ts.map +1 -1
- package/esm/profile/merge.js +251 -39
- package/esm/profile/mod.d.ts +4 -4
- package/esm/profile/mod.d.ts.map +1 -1
- package/esm/profile/mod.js +7 -2
- package/esm/reporter/mod.js +4 -4
- package/esm/sync/locked_attributes.d.ts +19 -0
- package/esm/sync/locked_attributes.d.ts.map +1 -0
- package/esm/sync/locked_attributes.js +27 -0
- package/esm/sync/log.d.ts +34 -0
- package/esm/sync/log.d.ts.map +1 -0
- package/esm/sync/log.js +48 -0
- package/esm/sync/mapping.d.ts +66 -0
- package/esm/sync/mapping.d.ts.map +1 -0
- package/esm/sync/mapping.js +165 -0
- package/esm/sync/mod.d.ts +16 -0
- package/esm/sync/mod.d.ts.map +1 -0
- package/esm/sync/mod.js +12 -0
- package/esm/sync/status.d.ts +23 -0
- package/esm/sync/status.d.ts.map +1 -0
- package/esm/sync/status.js +21 -0
- package/esm/typl/ast.d.ts +87 -0
- package/esm/typl/ast.d.ts.map +1 -0
- package/esm/typl/ast.js +21 -0
- package/esm/typl/bridge.d.ts +32 -0
- package/esm/typl/bridge.d.ts.map +1 -0
- package/esm/typl/bridge.js +27 -0
- package/esm/typl/bullet.d.ts +34 -0
- package/esm/typl/bullet.d.ts.map +1 -0
- package/esm/typl/bullet.js +44 -0
- package/esm/typl/diagnostics.d.ts +43 -0
- package/esm/typl/diagnostics.d.ts.map +1 -0
- package/esm/typl/diagnostics.js +61 -0
- package/esm/typl/fence.d.ts +31 -0
- package/esm/typl/fence.d.ts.map +1 -0
- package/esm/typl/fence.js +24 -0
- package/esm/typl/grammar.d.ts +20 -0
- package/esm/typl/grammar.d.ts.map +1 -0
- package/esm/typl/grammar.js +471 -0
- package/esm/typl/inline.d.ts +34 -0
- package/esm/typl/inline.d.ts.map +1 -0
- package/esm/typl/inline.js +48 -0
- package/esm/typl/lexer.d.ts +37 -0
- package/esm/typl/lexer.d.ts.map +1 -0
- package/esm/typl/lexer.js +234 -0
- package/esm/typl/mod.d.ts +23 -0
- package/esm/typl/mod.d.ts.map +1 -0
- package/esm/typl/mod.js +16 -0
- package/esm/typl/registry.d.ts +42 -0
- package/esm/typl/registry.d.ts.map +1 -0
- package/esm/typl/registry.js +26 -0
- package/esm/typl/validator.d.ts +29 -0
- package/esm/typl/validator.d.ts.map +1 -0
- package/esm/typl/validator.js +141 -0
- package/esm/util/fence.d.ts +30 -0
- package/esm/util/fence.d.ts.map +1 -0
- package/esm/util/fence.js +40 -0
- package/esm/util/line_endings.d.ts +33 -0
- package/esm/util/line_endings.d.ts.map +1 -0
- package/esm/util/line_endings.js +53 -0
- package/esm/util/modals.d.ts +29 -0
- package/esm/util/modals.d.ts.map +1 -0
- package/esm/util/modals.js +38 -0
- package/esm/validator/attributes.d.ts +3 -3
- package/esm/validator/attributes.d.ts.map +1 -1
- package/esm/validator/attributes.js +1 -18
- package/esm/validator/body_blocks.d.ts +38 -0
- package/esm/validator/body_blocks.d.ts.map +1 -0
- package/esm/validator/body_blocks.js +218 -0
- package/esm/validator/caption_convention.d.ts +29 -0
- package/esm/validator/caption_convention.d.ts.map +1 -0
- package/esm/validator/caption_convention.js +58 -0
- package/esm/validator/captions.d.ts +22 -0
- package/esm/validator/captions.d.ts.map +1 -0
- package/esm/validator/captions.js +137 -0
- package/esm/validator/component_schemes.d.ts +73 -0
- package/esm/validator/component_schemes.d.ts.map +1 -0
- package/esm/validator/component_schemes.js +375 -0
- package/esm/validator/discipline.d.ts +35 -0
- package/esm/validator/discipline.d.ts.map +1 -0
- package/esm/validator/discipline.js +204 -0
- package/esm/validator/feature_ac.d.ts +28 -0
- package/esm/validator/feature_ac.d.ts.map +1 -0
- package/esm/validator/feature_ac.js +102 -0
- package/esm/validator/listing.d.ts +42 -0
- package/esm/validator/listing.d.ts.map +1 -0
- package/esm/validator/listing.js +295 -0
- package/esm/validator/mod.d.ts +3 -1
- package/esm/validator/mod.d.ts.map +1 -1
- package/esm/validator/mod.js +275 -13
- package/esm/validator/modal_keywords.d.ts +25 -0
- package/esm/validator/modal_keywords.d.ts.map +1 -0
- package/esm/validator/modal_keywords.js +54 -0
- package/esm/validator/pattern.d.ts +15 -8
- package/esm/validator/pattern.d.ts.map +1 -1
- package/esm/validator/pattern.js +42 -19
- package/esm/validator/per_type_attrs.d.ts +29 -0
- package/esm/validator/per_type_attrs.d.ts.map +1 -0
- package/esm/validator/per_type_attrs.js +75 -0
- package/esm/validator/pipeline.d.ts +18 -2
- package/esm/validator/pipeline.d.ts.map +1 -1
- package/esm/validator/pipeline.js +76 -21
- package/esm/validator/trace_types.d.ts +26 -0
- package/esm/validator/trace_types.d.ts.map +1 -0
- package/esm/validator/trace_types.js +232 -0
- package/esm/validator/traceability.d.ts +3 -4
- package/esm/validator/traceability.d.ts.map +1 -1
- package/esm/validator/traceability.js +5 -10
- package/esm/validator/type_resolution.d.ts +67 -0
- package/esm/validator/type_resolution.d.ts.map +1 -0
- package/esm/validator/type_resolution.js +162 -0
- package/esm/validator/types.d.ts +45 -0
- package/esm/validator/types.d.ts.map +1 -1
- package/esm/validator/types.js +128 -16
- package/esm/validator/value_types.d.ts +8 -0
- package/esm/validator/value_types.d.ts.map +1 -1
- package/esm/validator/value_types.js +8 -1
- package/package.json +2 -2
- package/script/ast/build.d.ts +60 -0
- package/script/ast/build.d.ts.map +1 -0
- package/script/ast/build.js +521 -0
- package/script/ast/equivalence.d.ts +18 -0
- package/script/ast/equivalence.d.ts.map +1 -0
- package/script/ast/equivalence.js +59 -0
- package/script/ast/nodes.d.ts +189 -0
- package/script/ast/nodes.d.ts.map +1 -0
- package/script/ast/nodes.js +18 -0
- package/script/ast/normalize.d.ts +58 -0
- package/script/ast/normalize.d.ts.map +1 -0
- package/script/ast/normalize.js +200 -0
- package/script/ast/render.d.ts +34 -0
- package/script/ast/render.d.ts.map +1 -0
- package/script/ast/render.js +218 -0
- package/script/compiler/constants.d.ts +16 -0
- package/script/compiler/constants.d.ts.map +1 -0
- package/script/compiler/constants.js +29 -0
- package/script/compiler/discipline_classifier.d.ts +55 -0
- package/script/compiler/discipline_classifier.d.ts.map +1 -0
- package/script/compiler/discipline_classifier.js +196 -0
- package/script/compiler/inverses.d.ts +2 -1
- package/script/compiler/inverses.d.ts.map +1 -1
- package/script/compiler/inverses.js +33 -14
- package/script/compiler/manifest.d.ts +59 -0
- package/script/compiler/manifest.d.ts.map +1 -0
- package/script/compiler/manifest.js +51 -0
- package/script/compiler/mod.d.ts +38 -1
- package/script/compiler/mod.d.ts.map +1 -1
- package/script/compiler/mod.js +206 -54
- package/script/compiler/ndjson_writer.d.ts +50 -0
- package/script/compiler/ndjson_writer.d.ts.map +1 -0
- package/script/compiler/ndjson_writer.js +78 -0
- package/script/compiler/schema.d.ts +33 -1
- package/script/compiler/schema.d.ts.map +1 -1
- package/script/compiler/schema.js +30 -8
- package/script/config/markspec.d.ts +5 -0
- package/script/config/markspec.d.ts.map +1 -1
- package/script/config/markspec.js +17 -2
- package/script/config/mod.d.ts.map +1 -1
- package/script/config/mod.js +54 -0
- package/script/formatter/mod.d.ts +55 -4
- package/script/formatter/mod.d.ts.map +1 -1
- package/script/formatter/mod.js +426 -46
- package/script/formatter/synth_ulid.d.ts +21 -0
- package/script/formatter/synth_ulid.d.ts.map +1 -0
- package/script/formatter/synth_ulid.js +67 -0
- package/script/lexicons/loader.d.ts +35 -0
- package/script/lexicons/loader.d.ts.map +1 -0
- package/script/lexicons/loader.js +55 -0
- package/script/lexicons/mod.d.ts +13 -0
- package/script/lexicons/mod.d.ts.map +1 -0
- package/script/lexicons/mod.js +17 -0
- package/script/lint/glossary.d.ts +45 -0
- package/script/lint/glossary.d.ts.map +1 -0
- package/script/lint/glossary.js +88 -0
- package/script/lint/mod.d.ts +14 -0
- package/script/lint/mod.d.ts.map +1 -0
- package/script/lint/mod.js +17 -0
- package/script/lint/range_util.d.ts +25 -0
- package/script/lint/range_util.d.ts.map +1 -0
- package/script/lint/range_util.js +53 -0
- package/script/lint/rules/ears.d.ts +39 -0
- package/script/lint/rules/ears.d.ts.map +1 -0
- package/script/lint/rules/ears.js +320 -0
- package/script/lint/rules/incose_sentence.d.ts +46 -0
- package/script/lint/rules/incose_sentence.d.ts.map +1 -0
- package/script/lint/rules/incose_sentence.js +421 -0
- package/script/lint/rules/lexicon.d.ts +24 -0
- package/script/lint/rules/lexicon.d.ts.map +1 -0
- package/script/lint/rules/lexicon.js +240 -0
- package/script/lint/rules/modal_sentence.d.ts +46 -0
- package/script/lint/rules/modal_sentence.d.ts.map +1 -0
- package/script/lint/rules/modal_sentence.js +150 -0
- package/script/lint/rules/passive.d.ts +64 -0
- package/script/lint/rules/passive.d.ts.map +1 -0
- package/script/lint/rules/passive.js +286 -0
- package/script/lint/rules/struct.d.ts +17 -0
- package/script/lint/rules/struct.d.ts.map +1 -0
- package/script/lint/rules/struct.js +59 -0
- package/script/lint/rules/suppression.d.ts +54 -0
- package/script/lint/rules/suppression.d.ts.map +1 -0
- package/script/lint/rules/suppression.js +136 -0
- package/script/lint/rules/xref.d.ts +19 -0
- package/script/lint/rules/xref.d.ts.map +1 -0
- package/script/lint/rules/xref.js +251 -0
- package/script/lint/runner.d.ts +59 -0
- package/script/lint/runner.d.ts.map +1 -0
- package/script/lint/runner.js +157 -0
- package/script/lint/score.d.ts +64 -0
- package/script/lint/score.d.ts.map +1 -0
- package/script/lint/score.js +167 -0
- package/script/lint/segmenter.d.ts +32 -0
- package/script/lint/segmenter.d.ts.map +1 -0
- package/script/lint/segmenter.js +82 -0
- package/script/lint/types.d.ts +31 -0
- package/script/lint/types.d.ts.map +1 -0
- package/script/lint/types.js +10 -0
- package/script/lock/canonical_edges.d.ts +31 -0
- package/script/lock/canonical_edges.d.ts.map +1 -0
- package/script/lock/canonical_edges.js +61 -0
- package/script/lock/check.d.ts +24 -0
- package/script/lock/check.d.ts.map +1 -0
- package/script/lock/check.js +130 -0
- package/script/lock/hash.d.ts +12 -0
- package/script/lock/hash.d.ts.map +1 -0
- package/script/lock/hash.js +36 -0
- package/script/lock/mod.d.ts +19 -0
- package/script/lock/mod.d.ts.map +1 -0
- package/script/lock/mod.js +31 -0
- package/script/lock/model.d.ts +81 -0
- package/script/lock/model.d.ts.map +1 -0
- package/script/lock/model.js +10 -0
- package/script/lock/parser.d.ts +26 -0
- package/script/lock/parser.d.ts.map +1 -0
- package/script/lock/parser.js +198 -0
- package/script/lock/resolve.d.ts +142 -0
- package/script/lock/resolve.d.ts.map +1 -0
- package/script/lock/resolve.js +397 -0
- package/script/lock/serializer.d.ts +14 -0
- package/script/lock/serializer.d.ts.map +1 -0
- package/script/lock/serializer.js +107 -0
- package/script/mod.d.ts +28 -8
- package/script/mod.d.ts.map +1 -1
- package/script/mod.js +129 -32
- package/script/model/attributes.d.ts +6 -0
- package/script/model/attributes.d.ts.map +1 -1
- package/script/model/attributes.js +201 -3
- package/script/model/discipline.d.ts +53 -0
- package/script/model/discipline.d.ts.map +1 -0
- package/script/model/discipline.js +53 -0
- package/script/model/discriminating_attr.d.ts +33 -0
- package/script/model/discriminating_attr.d.ts.map +1 -0
- package/script/model/discriminating_attr.js +77 -0
- package/script/model/mod.d.ts +267 -14
- package/script/model/mod.d.ts.map +1 -1
- package/script/model/mod.js +111 -3
- package/script/model/profile.d.ts +102 -27
- package/script/model/profile.d.ts.map +1 -1
- package/script/model/source_introspection.d.ts +26 -0
- package/script/model/source_introspection.d.ts.map +1 -0
- package/script/model/source_introspection.js +80 -0
- package/script/model/type_hierarchy.d.ts +51 -0
- package/script/model/type_hierarchy.d.ts.map +1 -0
- package/script/model/type_hierarchy.js +130 -0
- package/script/model/uri_scheme_map.d.ts +21 -0
- package/script/model/uri_scheme_map.d.ts.map +1 -0
- package/script/model/uri_scheme_map.js +69 -0
- package/script/parser/attributes.d.ts.map +1 -1
- package/script/parser/attributes.js +10 -16
- package/script/parser/body_tokens.d.ts +35 -0
- package/script/parser/body_tokens.d.ts.map +1 -0
- package/script/parser/body_tokens.js +235 -0
- package/script/parser/glossary.d.ts +51 -0
- package/script/parser/glossary.d.ts.map +1 -0
- package/script/parser/glossary.js +224 -0
- package/script/parser/grammars.d.ts +5 -3
- package/script/parser/grammars.d.ts.map +1 -1
- package/script/parser/grammars.js +15 -8
- package/script/parser/language_spec.d.ts +55 -0
- package/script/parser/language_spec.d.ts.map +1 -0
- package/script/parser/language_spec.js +423 -0
- package/script/parser/line_map.d.ts +60 -0
- package/script/parser/line_map.d.ts.map +1 -0
- package/script/parser/line_map.js +44 -0
- package/script/parser/markdown.d.ts +9 -0
- package/script/parser/markdown.d.ts.map +1 -1
- package/script/parser/markdown.js +315 -23
- package/script/parser/mod.d.ts +5 -0
- package/script/parser/mod.d.ts.map +1 -1
- package/script/parser/mod.js +36 -7
- package/script/parser/source.d.ts +53 -2
- package/script/parser/source.d.ts.map +1 -1
- package/script/parser/source.js +159 -69
- package/script/parser/translate.d.ts +24 -0
- package/script/parser/translate.d.ts.map +1 -0
- package/script/parser/translate.js +102 -0
- package/script/profile/chain.d.ts +8 -0
- package/script/profile/chain.d.ts.map +1 -1
- package/script/profile/chain.js +32 -14
- package/script/profile/colors.js +1 -1
- package/script/profile/default_profile.d.ts +25 -0
- package/script/profile/default_profile.d.ts.map +1 -0
- package/script/profile/default_profile.js +46 -0
- package/script/profile/discipline_mode.d.ts +64 -0
- package/script/profile/discipline_mode.d.ts.map +1 -0
- package/script/profile/discipline_mode.js +138 -0
- package/script/profile/discipline_registry.d.ts +41 -0
- package/script/profile/discipline_registry.d.ts.map +1 -0
- package/script/profile/discipline_registry.js +70 -0
- package/script/profile/introspect.d.ts +135 -0
- package/script/profile/introspect.d.ts.map +1 -0
- package/script/profile/introspect.js +381 -0
- package/script/profile/load.d.ts +3 -1
- package/script/profile/load.d.ts.map +1 -1
- package/script/profile/load.js +91 -5
- package/script/profile/manifest.d.ts.map +1 -1
- package/script/profile/manifest.js +511 -89
- package/script/profile/merge.d.ts.map +1 -1
- package/script/profile/merge.js +251 -39
- package/script/profile/mod.d.ts +4 -4
- package/script/profile/mod.d.ts.map +1 -1
- package/script/profile/mod.js +12 -6
- package/script/reporter/mod.js +4 -4
- package/script/sync/locked_attributes.d.ts +19 -0
- package/script/sync/locked_attributes.d.ts.map +1 -0
- package/script/sync/locked_attributes.js +30 -0
- package/script/sync/log.d.ts +34 -0
- package/script/sync/log.d.ts.map +1 -0
- package/script/sync/log.js +52 -0
- package/script/sync/mapping.d.ts +66 -0
- package/script/sync/mapping.d.ts.map +1 -0
- package/script/sync/mapping.js +169 -0
- package/script/sync/mod.d.ts +16 -0
- package/script/sync/mod.d.ts.map +1 -0
- package/script/sync/mod.js +21 -0
- package/script/sync/status.d.ts +23 -0
- package/script/sync/status.d.ts.map +1 -0
- package/script/sync/status.js +24 -0
- package/script/typl/ast.d.ts +87 -0
- package/script/typl/ast.d.ts.map +1 -0
- package/script/typl/ast.js +24 -0
- package/script/typl/bridge.d.ts +32 -0
- package/script/typl/bridge.d.ts.map +1 -0
- package/script/typl/bridge.js +30 -0
- package/script/typl/bullet.d.ts +34 -0
- package/script/typl/bullet.d.ts.map +1 -0
- package/script/typl/bullet.js +47 -0
- package/script/typl/diagnostics.d.ts +43 -0
- package/script/typl/diagnostics.d.ts.map +1 -0
- package/script/typl/diagnostics.js +65 -0
- package/script/typl/fence.d.ts +31 -0
- package/script/typl/fence.d.ts.map +1 -0
- package/script/typl/fence.js +27 -0
- package/script/typl/grammar.d.ts +20 -0
- package/script/typl/grammar.d.ts.map +1 -0
- package/script/typl/grammar.js +474 -0
- package/script/typl/inline.d.ts +34 -0
- package/script/typl/inline.d.ts.map +1 -0
- package/script/typl/inline.js +51 -0
- package/script/typl/lexer.d.ts +37 -0
- package/script/typl/lexer.d.ts.map +1 -0
- package/script/typl/lexer.js +237 -0
- package/script/typl/mod.d.ts +23 -0
- package/script/typl/mod.d.ts.map +1 -0
- package/script/typl/mod.js +29 -0
- package/script/typl/registry.d.ts +42 -0
- package/script/typl/registry.d.ts.map +1 -0
- package/script/typl/registry.js +29 -0
- package/script/typl/validator.d.ts +29 -0
- package/script/typl/validator.d.ts.map +1 -0
- package/script/typl/validator.js +144 -0
- package/script/util/fence.d.ts +30 -0
- package/script/util/fence.d.ts.map +1 -0
- package/script/util/fence.js +44 -0
- package/script/util/line_endings.d.ts +33 -0
- package/script/util/line_endings.d.ts.map +1 -0
- package/script/util/line_endings.js +58 -0
- package/script/util/modals.d.ts +29 -0
- package/script/util/modals.d.ts.map +1 -0
- package/script/util/modals.js +42 -0
- package/script/validator/attributes.d.ts +3 -3
- package/script/validator/attributes.d.ts.map +1 -1
- package/script/validator/attributes.js +1 -18
- package/script/validator/body_blocks.d.ts +38 -0
- package/script/validator/body_blocks.d.ts.map +1 -0
- package/script/validator/body_blocks.js +221 -0
- package/script/validator/caption_convention.d.ts +29 -0
- package/script/validator/caption_convention.d.ts.map +1 -0
- package/script/validator/caption_convention.js +61 -0
- package/script/validator/captions.d.ts +22 -0
- package/script/validator/captions.d.ts.map +1 -0
- package/script/validator/captions.js +140 -0
- package/script/validator/component_schemes.d.ts +73 -0
- package/script/validator/component_schemes.d.ts.map +1 -0
- package/script/validator/component_schemes.js +384 -0
- package/script/validator/discipline.d.ts +35 -0
- package/script/validator/discipline.d.ts.map +1 -0
- package/script/validator/discipline.js +207 -0
- package/script/validator/feature_ac.d.ts +28 -0
- package/script/validator/feature_ac.d.ts.map +1 -0
- package/script/validator/feature_ac.js +105 -0
- package/script/validator/listing.d.ts +42 -0
- package/script/validator/listing.d.ts.map +1 -0
- package/script/validator/listing.js +298 -0
- package/script/validator/mod.d.ts +3 -1
- package/script/validator/mod.d.ts.map +1 -1
- package/script/validator/mod.js +278 -14
- package/script/validator/modal_keywords.d.ts +25 -0
- package/script/validator/modal_keywords.d.ts.map +1 -0
- package/script/validator/modal_keywords.js +57 -0
- package/script/validator/pattern.d.ts +15 -8
- package/script/validator/pattern.d.ts.map +1 -1
- package/script/validator/pattern.js +42 -19
- package/script/validator/per_type_attrs.d.ts +29 -0
- package/script/validator/per_type_attrs.d.ts.map +1 -0
- package/script/validator/per_type_attrs.js +78 -0
- package/script/validator/pipeline.d.ts +18 -2
- package/script/validator/pipeline.d.ts.map +1 -1
- package/script/validator/pipeline.js +78 -22
- package/script/validator/trace_types.d.ts +26 -0
- package/script/validator/trace_types.d.ts.map +1 -0
- package/script/validator/trace_types.js +235 -0
- package/script/validator/traceability.d.ts +3 -4
- package/script/validator/traceability.d.ts.map +1 -1
- package/script/validator/traceability.js +5 -10
- package/script/validator/type_resolution.d.ts +67 -0
- package/script/validator/type_resolution.d.ts.map +1 -0
- package/script/validator/type_resolution.js +168 -0
- package/script/validator/types.d.ts +45 -0
- package/script/validator/types.d.ts.map +1 -1
- package/script/validator/types.js +131 -16
- package/script/validator/value_types.d.ts +8 -0
- package/script/validator/value_types.d.ts.map +1 -1
- package/script/validator/value_types.js +10 -2
package/esm/lock/hash.js
ADDED
|
@@ -0,0 +1,32 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* @module core/lock/hash
|
|
3
|
+
*
|
|
4
|
+
* sha256:* hashing helpers. Uses Web Crypto (works in both Deno and
|
|
5
|
+
* Node.js). Returns a `sha256:<hex>` string matching the lockfile
|
|
6
|
+
* format convention.
|
|
7
|
+
*/
|
|
8
|
+
const HEX = "0123456789abcdef";
|
|
9
|
+
function toHex(bytes) {
|
|
10
|
+
let out = "";
|
|
11
|
+
for (const b of bytes)
|
|
12
|
+
out += HEX[b >> 4] + HEX[b & 0xf];
|
|
13
|
+
return out;
|
|
14
|
+
}
|
|
15
|
+
/** Hash bytes → `sha256:<hex>` string. */
|
|
16
|
+
export async function sha256Bytes(bytes) {
|
|
17
|
+
// Copy into a fresh ArrayBuffer so the argument satisfies the strict
|
|
18
|
+
// BufferSource overload (Uint8Array<ArrayBufferLike> includes
|
|
19
|
+
// SharedArrayBuffer which Web Crypto does not accept).
|
|
20
|
+
// Slice only the viewed portion — bytes.buffer may be a larger backing store
|
|
21
|
+
// when bytes is a sub-buffer view. The copy also satisfies the strict
|
|
22
|
+
// BufferSource overload (excludes SharedArrayBuffer).
|
|
23
|
+
const plain = bytes.buffer instanceof ArrayBuffer
|
|
24
|
+
? new Uint8Array(bytes.buffer, bytes.byteOffset, bytes.byteLength)
|
|
25
|
+
: new Uint8Array(bytes);
|
|
26
|
+
const buf = await crypto.subtle.digest("SHA-256", plain);
|
|
27
|
+
return "sha256:" + toHex(new Uint8Array(buf));
|
|
28
|
+
}
|
|
29
|
+
/** Hash UTF-8 of a string → `sha256:<hex>` string. */
|
|
30
|
+
export async function sha256String(s) {
|
|
31
|
+
return await sha256Bytes(new TextEncoder().encode(s));
|
|
32
|
+
}
|
|
@@ -0,0 +1,19 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* @module core/lock
|
|
3
|
+
*
|
|
4
|
+
* Lockfile data model, TOML serializer + parser, canonical edge
|
|
5
|
+
* model, upstream resolution, drift detection. The public boundary
|
|
6
|
+
* for both `markspec lock` and `markspec compile --frozen`.
|
|
7
|
+
*/
|
|
8
|
+
export type { BoundEntry, BoundEntryBinding, GeneratedCache, LockedAttributes, Lockfile, LockfileMeta, Upstream, UpstreamProfile, UpstreamReference, UpstreamRegistry, } from "./model.js";
|
|
9
|
+
export { LOCKFILE_SCHEMA_VERSION } from "./model.js";
|
|
10
|
+
export { serializeLockfile } from "./serializer.js";
|
|
11
|
+
export { parseLockfile } from "./parser.js";
|
|
12
|
+
export type { ParseLockfileResult } from "./parser.js";
|
|
13
|
+
export { checkDrift } from "./check.js";
|
|
14
|
+
export { sha256Bytes, sha256String } from "./hash.js";
|
|
15
|
+
export { canonicalEdgeJson, hashCanonicalEdges } from "./canonical_edges.js";
|
|
16
|
+
export type { EdgeQuad } from "./canonical_edges.js";
|
|
17
|
+
export { extractEdgeQuads, resolveBoundEntries, resolveProfileChain, resolveReferences, resolveRegistries, resolveUpstreams, } from "./resolve.js";
|
|
18
|
+
export type { FetchUrl, ReadFile, ResolvedBoundEntry, ResolvedProfile, ResolvedReference, ResolvedRegistry, ResolvedUpstreams, ResolveUpstreamsOptions, } from "./resolve.js";
|
|
19
|
+
//# sourceMappingURL=mod.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"mod.d.ts","sourceRoot":"","sources":["../../src/lock/mod.ts"],"names":[],"mappings":"AAAA;;;;;;GAMG;AAEH,YAAY,EACV,UAAU,EACV,iBAAiB,EACjB,cAAc,EACd,gBAAgB,EAChB,QAAQ,EACR,YAAY,EACZ,QAAQ,EACR,eAAe,EACf,iBAAiB,EACjB,gBAAgB,GACjB,MAAM,YAAY,CAAC;AACpB,OAAO,EAAE,uBAAuB,EAAE,MAAM,YAAY,CAAC;AAErD,OAAO,EAAE,iBAAiB,EAAE,MAAM,iBAAiB,CAAC;AACpD,OAAO,EAAE,aAAa,EAAE,MAAM,aAAa,CAAC;AAC5C,YAAY,EAAE,mBAAmB,EAAE,MAAM,aAAa,CAAC;AAEvD,OAAO,EAAE,UAAU,EAAE,MAAM,YAAY,CAAC;AAExC,OAAO,EAAE,WAAW,EAAE,YAAY,EAAE,MAAM,WAAW,CAAC;AAEtD,OAAO,EAAE,iBAAiB,EAAE,kBAAkB,EAAE,MAAM,sBAAsB,CAAC;AAC7E,YAAY,EAAE,QAAQ,EAAE,MAAM,sBAAsB,CAAC;AAErD,OAAO,EACL,gBAAgB,EAChB,mBAAmB,EACnB,mBAAmB,EACnB,iBAAiB,EACjB,iBAAiB,EACjB,gBAAgB,GACjB,MAAM,cAAc,CAAC;AACtB,YAAY,EACV,QAAQ,EACR,QAAQ,EACR,kBAAkB,EAClB,eAAe,EACf,iBAAiB,EACjB,gBAAgB,EAChB,iBAAiB,EACjB,uBAAuB,GACxB,MAAM,cAAc,CAAC"}
|
package/esm/lock/mod.js
ADDED
|
@@ -0,0 +1,14 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* @module core/lock
|
|
3
|
+
*
|
|
4
|
+
* Lockfile data model, TOML serializer + parser, canonical edge
|
|
5
|
+
* model, upstream resolution, drift detection. The public boundary
|
|
6
|
+
* for both `markspec lock` and `markspec compile --frozen`.
|
|
7
|
+
*/
|
|
8
|
+
export { LOCKFILE_SCHEMA_VERSION } from "./model.js";
|
|
9
|
+
export { serializeLockfile } from "./serializer.js";
|
|
10
|
+
export { parseLockfile } from "./parser.js";
|
|
11
|
+
export { checkDrift } from "./check.js";
|
|
12
|
+
export { sha256Bytes, sha256String } from "./hash.js";
|
|
13
|
+
export { canonicalEdgeJson, hashCanonicalEdges } from "./canonical_edges.js";
|
|
14
|
+
export { extractEdgeQuads, resolveBoundEntries, resolveProfileChain, resolveReferences, resolveRegistries, resolveUpstreams, } from "./resolve.js";
|
|
@@ -0,0 +1,81 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* @module core/lock/model
|
|
3
|
+
*
|
|
4
|
+
* Lockfile data model. Pure types — no I/O, no behaviour.
|
|
5
|
+
*/
|
|
6
|
+
/** A resolved Reference citation. */
|
|
7
|
+
export interface UpstreamReference {
|
|
8
|
+
readonly kind: "reference";
|
|
9
|
+
/** Pandoc-style slug (display ID of the Reference entry). */
|
|
10
|
+
readonly slug: string;
|
|
11
|
+
/** Canonical URI (urn:/doi:/pkg:/isbn:/https: etc.). */
|
|
12
|
+
readonly id: string;
|
|
13
|
+
/** Version segment extracted from the URI, when present. */
|
|
14
|
+
readonly resolved?: string;
|
|
15
|
+
/** sha256:* of fetched bytes; absent when Reference-url was missing. */
|
|
16
|
+
readonly hash?: string;
|
|
17
|
+
/** Fetch URL (from Reference-url); absent when Reference-url was missing. */
|
|
18
|
+
readonly source?: string;
|
|
19
|
+
/** listing-directives §5 scheme (urn / purl etc.), if classified. */
|
|
20
|
+
readonly componentScheme?: string;
|
|
21
|
+
}
|
|
22
|
+
/** A resolved profile chain tier. */
|
|
23
|
+
export interface UpstreamProfile {
|
|
24
|
+
readonly kind: "profile";
|
|
25
|
+
readonly id: string;
|
|
26
|
+
/** Original specifier from .markspec.yaml (e.g. `npm:@org/aspice@^1.2`). */
|
|
27
|
+
readonly specifier: string;
|
|
28
|
+
/** Exact resolved version (e.g. `1.2.4`). */
|
|
29
|
+
readonly resolved: string;
|
|
30
|
+
/** sha256:* of the resolved profile's markspec.yaml bytes. */
|
|
31
|
+
readonly hash: string;
|
|
32
|
+
/** Parent tier id in the extends chain; absent for the chain root. */
|
|
33
|
+
readonly extends?: string;
|
|
34
|
+
}
|
|
35
|
+
/** A resolved federated registry. */
|
|
36
|
+
export interface UpstreamRegistry {
|
|
37
|
+
readonly kind: "registry";
|
|
38
|
+
readonly id: string;
|
|
39
|
+
readonly api: string;
|
|
40
|
+
readonly resolvedManifestHash: string;
|
|
41
|
+
readonly markspecSchema: number;
|
|
42
|
+
}
|
|
43
|
+
/** Discriminated union of upstream kinds. */
|
|
44
|
+
export type Upstream = UpstreamReference | UpstreamProfile | UpstreamRegistry;
|
|
45
|
+
/** A locked attribute on a binding — attribute name → upstream value hash. */
|
|
46
|
+
export type LockedAttributes = ReadonlyMap<string, string>;
|
|
47
|
+
/** One External-id binding within a bound entry. */
|
|
48
|
+
export interface BoundEntryBinding {
|
|
49
|
+
readonly externalId: string;
|
|
50
|
+
readonly system: string;
|
|
51
|
+
readonly direction: "outbound" | "inbound" | "bidirectional";
|
|
52
|
+
readonly lockedAttributes: LockedAttributes;
|
|
53
|
+
}
|
|
54
|
+
/** An entry bound to one or more external systems via External-id. */
|
|
55
|
+
export interface BoundEntry {
|
|
56
|
+
readonly displayId: string;
|
|
57
|
+
readonly ulid: string;
|
|
58
|
+
readonly bindings: readonly BoundEntryBinding[];
|
|
59
|
+
}
|
|
60
|
+
/** Canonical-edge-graph integrity record. */
|
|
61
|
+
export interface GeneratedCache {
|
|
62
|
+
readonly edgesHash: string;
|
|
63
|
+
readonly edgesCount: number;
|
|
64
|
+
}
|
|
65
|
+
/** Lockfile metadata. */
|
|
66
|
+
export interface LockfileMeta {
|
|
67
|
+
readonly markspecSchema: number;
|
|
68
|
+
/** Timestamp the lockfile was written, RFC 3339 UTC (e.g. "2026-05-25T12:00:00Z"). */
|
|
69
|
+
readonly lockedAt: string;
|
|
70
|
+
}
|
|
71
|
+
/** Top-level lockfile model. */
|
|
72
|
+
export interface Lockfile {
|
|
73
|
+
readonly schema: number;
|
|
74
|
+
readonly meta: LockfileMeta;
|
|
75
|
+
readonly upstreams: readonly Upstream[];
|
|
76
|
+
readonly boundEntries: readonly BoundEntry[];
|
|
77
|
+
readonly generatedCache: GeneratedCache;
|
|
78
|
+
}
|
|
79
|
+
/** Current lockfile-format version. */
|
|
80
|
+
export declare const LOCKFILE_SCHEMA_VERSION = 1;
|
|
81
|
+
//# sourceMappingURL=model.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"model.d.ts","sourceRoot":"","sources":["../../src/lock/model.ts"],"names":[],"mappings":"AAAA;;;;GAIG;AAEH,qCAAqC;AACrC,MAAM,WAAW,iBAAiB;IAChC,QAAQ,CAAC,IAAI,EAAE,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
7
|
+
* Diagnostic codes:
|
|
8
|
+
* - MSL-L001 — malformed TOML or missing required field
|
|
9
|
+
* - MSL-L002 — lockfile schema is newer than this binary supports
|
|
10
|
+
* - MSL-L003 — lockfile schema is unrecognised (< 1)
|
|
11
|
+
*/
|
|
12
|
+
import type { Diagnostic } from "../model/mod.js";
|
|
13
|
+
import { type Lockfile } from "./model.js";
|
|
14
|
+
/** Outcome of {@linkcode parseLockfile}. */
|
|
15
|
+
export interface ParseLockfileResult {
|
|
16
|
+
readonly lockfile?: Lockfile;
|
|
17
|
+
readonly diagnostics: readonly Diagnostic[];
|
|
18
|
+
}
|
|
19
|
+
/**
|
|
20
|
+
* Parse a `markspec.lock` document. Returns the model when valid, or a
|
|
21
|
+
* single `MSL-L###` diagnostic when not. Schema-validation errors are
|
|
22
|
+
* always single-shot: parsing stops at the first integrity failure so
|
|
23
|
+
* the caller has a clear repair signal.
|
|
24
|
+
*/
|
|
25
|
+
export declare function parseLockfile(toml: string): ParseLockfileResult;
|
|
26
|
+
//# sourceMappingURL=parser.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"parser.d.ts","sourceRoot":"","sources":["../../src/lock/parser.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;GAUG;AAGH,OAAO,KAAK,EAAE,UAAU,EAAE,MAAM,iBAAiB,CAAC;AAClD,OAAO,EAGL,KAAK,QAAQ,EAGd,MAAM,YAAY,CAAC;AAEpB,4CAA4C;AAC5C,MAAM,WAAW,mBAAmB;IAClC,QAAQ,CAAC,QAAQ,CAAC,EAAE,QAAQ,CAAC;IAC7B,QAAQ,CAAC,WAAW,EAAE,SAAS,UAAU,EAAE,CAAC;CAC7C;AAED;;;;;GAKG;AACH,wBAAgB,aAAa,CAAC,IAAI,EAAE,MAAM,GAAG,mBAAmB,CA+L/D"}
|
|
@@ -0,0 +1,195 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* @module core/lock/parser
|
|
3
|
+
*
|
|
4
|
+
* TOML → Lockfile. Uses @std/toml for low-level parse; layers schema
|
|
5
|
+
* validation + diagnostic emission on top.
|
|
6
|
+
*
|
|
7
|
+
* Diagnostic codes:
|
|
8
|
+
* - MSL-L001 — malformed TOML or missing required field
|
|
9
|
+
* - MSL-L002 — lockfile schema is newer than this binary supports
|
|
10
|
+
* - MSL-L003 — lockfile schema is unrecognised (< 1)
|
|
11
|
+
*/
|
|
12
|
+
import { parse as parseToml } from "@std/toml";
|
|
13
|
+
import { LOCKFILE_SCHEMA_VERSION, } from "./model.js";
|
|
14
|
+
/**
|
|
15
|
+
* Parse a `markspec.lock` document. Returns the model when valid, or a
|
|
16
|
+
* single `MSL-L###` diagnostic when not. Schema-validation errors are
|
|
17
|
+
* always single-shot: parsing stops at the first integrity failure so
|
|
18
|
+
* the caller has a clear repair signal.
|
|
19
|
+
*/
|
|
20
|
+
export function parseLockfile(toml) {
|
|
21
|
+
let raw;
|
|
22
|
+
try {
|
|
23
|
+
raw = parseToml(toml);
|
|
24
|
+
}
|
|
25
|
+
catch (e) {
|
|
26
|
+
return diag("MSL-L001", `Malformed markspec.lock: ${e.message}`);
|
|
27
|
+
}
|
|
28
|
+
const schema = raw.schema;
|
|
29
|
+
if (typeof schema !== "number") {
|
|
30
|
+
return diag("MSL-L001", "Missing or invalid `schema` field");
|
|
31
|
+
}
|
|
32
|
+
if (schema > LOCKFILE_SCHEMA_VERSION) {
|
|
33
|
+
return diag("MSL-L002", `Lockfile schema ${schema} is newer than this binary understands ` +
|
|
34
|
+
`(max ${LOCKFILE_SCHEMA_VERSION}). Upgrade markspec or delete ` +
|
|
35
|
+
`markspec.lock + relock.`);
|
|
36
|
+
}
|
|
37
|
+
if (schema < 1) {
|
|
38
|
+
return diag("MSL-L003", `Lockfile schema ${schema} is unrecognised.`);
|
|
39
|
+
}
|
|
40
|
+
const meta = raw.meta;
|
|
41
|
+
const lockedAt = meta?.["locked-at"];
|
|
42
|
+
if (!meta || typeof lockedAt !== "string") {
|
|
43
|
+
return diag("MSL-L001", "Missing [meta] table or `locked-at` field");
|
|
44
|
+
}
|
|
45
|
+
const markspecSchema = meta["markspec-schema"];
|
|
46
|
+
if (typeof markspecSchema !== "number") {
|
|
47
|
+
return diag("MSL-L001", "Missing [meta].markspec-schema");
|
|
48
|
+
}
|
|
49
|
+
const upstreams = [];
|
|
50
|
+
const upstreamRoot = raw.upstream;
|
|
51
|
+
if (upstreamRoot) {
|
|
52
|
+
const refs = upstreamRoot.reference ?? [];
|
|
53
|
+
for (let i = 0; i < refs.length; i++) {
|
|
54
|
+
const r = refs[i];
|
|
55
|
+
const slug = requireString(r, "slug");
|
|
56
|
+
const id = requireString(r, "id");
|
|
57
|
+
if (slug === undefined || id === undefined) {
|
|
58
|
+
return diag("MSL-L001", `[[upstream.reference]] entry ${i}: missing required field 'slug' or 'id'`);
|
|
59
|
+
}
|
|
60
|
+
upstreams.push({
|
|
61
|
+
kind: "reference",
|
|
62
|
+
slug,
|
|
63
|
+
id,
|
|
64
|
+
resolved: r.resolved,
|
|
65
|
+
hash: r.hash,
|
|
66
|
+
source: r.source,
|
|
67
|
+
componentScheme: r["component-scheme"],
|
|
68
|
+
});
|
|
69
|
+
}
|
|
70
|
+
const profs = upstreamRoot.profile ?? [];
|
|
71
|
+
for (let i = 0; i < profs.length; i++) {
|
|
72
|
+
const p = profs[i];
|
|
73
|
+
const id = requireString(p, "id");
|
|
74
|
+
const specifier = requireString(p, "specifier");
|
|
75
|
+
const resolved = requireString(p, "resolved");
|
|
76
|
+
const hash = requireString(p, "hash");
|
|
77
|
+
if (id === undefined || specifier === undefined || resolved === undefined ||
|
|
78
|
+
hash === undefined) {
|
|
79
|
+
return diag("MSL-L001", `[[upstream.profile]] entry ${i}: missing required field 'id', 'specifier', 'resolved', or 'hash'`);
|
|
80
|
+
}
|
|
81
|
+
upstreams.push({
|
|
82
|
+
kind: "profile",
|
|
83
|
+
id,
|
|
84
|
+
specifier,
|
|
85
|
+
resolved,
|
|
86
|
+
hash,
|
|
87
|
+
extends: p.extends,
|
|
88
|
+
});
|
|
89
|
+
}
|
|
90
|
+
const regs = upstreamRoot.registry ?? [];
|
|
91
|
+
for (let i = 0; i < regs.length; i++) {
|
|
92
|
+
const reg = regs[i];
|
|
93
|
+
const id = requireString(reg, "id");
|
|
94
|
+
const api = requireString(reg, "api");
|
|
95
|
+
const resolvedManifestHash = requireString(reg, "resolved-manifest-hash");
|
|
96
|
+
const markspecSchemaN = requireNumber(reg, "markspec-schema");
|
|
97
|
+
if (id === undefined || api === undefined ||
|
|
98
|
+
resolvedManifestHash === undefined || markspecSchemaN === undefined) {
|
|
99
|
+
return diag("MSL-L001", `[[upstream.registry]] entry ${i}: missing required field 'id', 'api', 'resolved-manifest-hash', or 'markspec-schema'`);
|
|
100
|
+
}
|
|
101
|
+
upstreams.push({
|
|
102
|
+
kind: "registry",
|
|
103
|
+
id,
|
|
104
|
+
api,
|
|
105
|
+
resolvedManifestHash,
|
|
106
|
+
markspecSchema: markspecSchemaN,
|
|
107
|
+
});
|
|
108
|
+
}
|
|
109
|
+
}
|
|
110
|
+
const boundEntries = [];
|
|
111
|
+
const rawBoundEntries = raw["bound-entry"] ?? [];
|
|
112
|
+
for (let i = 0; i < rawBoundEntries.length; i++) {
|
|
113
|
+
const be = rawBoundEntries[i];
|
|
114
|
+
const displayId = requireString(be, "display-id");
|
|
115
|
+
const ulid = requireString(be, "ulid");
|
|
116
|
+
if (displayId === undefined || ulid === undefined) {
|
|
117
|
+
return diag("MSL-L001", `[[bound-entry]] entry ${i}: missing required field 'display-id' or 'ulid'`);
|
|
118
|
+
}
|
|
119
|
+
const bindings = [];
|
|
120
|
+
const rawBindings = be.binding ??
|
|
121
|
+
[];
|
|
122
|
+
for (let j = 0; j < rawBindings.length; j++) {
|
|
123
|
+
const b = rawBindings[j];
|
|
124
|
+
const externalId = requireString(b, "external-id");
|
|
125
|
+
const system = requireString(b, "system");
|
|
126
|
+
const direction = requireString(b, "direction");
|
|
127
|
+
if (externalId === undefined || system === undefined ||
|
|
128
|
+
direction === undefined) {
|
|
129
|
+
return diag("MSL-L001", `[[bound-entry.binding]] entry ${i}/${j}: missing required field 'external-id', 'system', or 'direction'`);
|
|
130
|
+
}
|
|
131
|
+
const validDirections = new Set(["outbound", "inbound", "bidirectional"]);
|
|
132
|
+
if (!validDirections.has(direction)) {
|
|
133
|
+
return diag("MSL-L001", `[[bound-entry.binding]] entry ${i}/${j}: invalid direction '${direction}' (expected outbound/inbound/bidirectional)`);
|
|
134
|
+
}
|
|
135
|
+
const lockedRaw = b["locked-attributes"] ?? {};
|
|
136
|
+
bindings.push({
|
|
137
|
+
externalId,
|
|
138
|
+
system,
|
|
139
|
+
direction: direction,
|
|
140
|
+
lockedAttributes: new Map(Object.entries(lockedRaw)),
|
|
141
|
+
});
|
|
142
|
+
}
|
|
143
|
+
boundEntries.push({
|
|
144
|
+
displayId,
|
|
145
|
+
ulid,
|
|
146
|
+
bindings,
|
|
147
|
+
});
|
|
148
|
+
}
|
|
149
|
+
const cache = raw["generated-cache"];
|
|
150
|
+
if (!cache) {
|
|
151
|
+
return diag("MSL-L001", "Missing [generated-cache] table");
|
|
152
|
+
}
|
|
153
|
+
const edgesHash = requireString(cache, "edges-hash");
|
|
154
|
+
const edgesCount = requireNumber(cache, "edges-count");
|
|
155
|
+
if (edgesHash === undefined || edgesCount === undefined) {
|
|
156
|
+
return diag("MSL-L001", "[generated-cache]: missing or wrong-typed 'edges-hash' or 'edges-count'");
|
|
157
|
+
}
|
|
158
|
+
const lockfile = {
|
|
159
|
+
schema,
|
|
160
|
+
meta: { markspecSchema, lockedAt },
|
|
161
|
+
upstreams,
|
|
162
|
+
boundEntries,
|
|
163
|
+
generatedCache: { edgesHash, edgesCount },
|
|
164
|
+
};
|
|
165
|
+
return { lockfile, diagnostics: [] };
|
|
166
|
+
}
|
|
167
|
+
/** Build a single-diagnostic failure result with no parsed lockfile. */
|
|
168
|
+
function diag(code, message) {
|
|
169
|
+
return {
|
|
170
|
+
diagnostics: [{
|
|
171
|
+
code,
|
|
172
|
+
severity: "error",
|
|
173
|
+
message,
|
|
174
|
+
location: undefined,
|
|
175
|
+
}],
|
|
176
|
+
};
|
|
177
|
+
}
|
|
178
|
+
/**
|
|
179
|
+
* Read a required string field from a TOML record. Returns the string when
|
|
180
|
+
* present and well-typed, or `undefined` to signal the caller should emit a
|
|
181
|
+
* diagnostic.
|
|
182
|
+
*/
|
|
183
|
+
function requireString(source, key) {
|
|
184
|
+
const v = source[key];
|
|
185
|
+
return typeof v === "string" ? v : undefined;
|
|
186
|
+
}
|
|
187
|
+
/**
|
|
188
|
+
* Read a required number field from a TOML record. Returns the number when
|
|
189
|
+
* present and well-typed, or `undefined` to signal the caller should emit a
|
|
190
|
+
* diagnostic.
|
|
191
|
+
*/
|
|
192
|
+
function requireNumber(source, key) {
|
|
193
|
+
const v = source[key];
|
|
194
|
+
return typeof v === "number" ? v : undefined;
|
|
195
|
+
}
|
|
@@ -0,0 +1,142 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* @module core/lock/resolve
|
|
3
|
+
*
|
|
4
|
+
* Shared upstream-resolution layer. Both `markspec lock` and
|
|
5
|
+
* `markspec compile` call {@linkcode resolveUpstreams}. All
|
|
6
|
+
* world-touching operations (HTTP fetch, clock) flow through
|
|
7
|
+
* callbacks so unit tests inject deterministic stubs.
|
|
8
|
+
*
|
|
9
|
+
* Implementation arrives in Tasks 15–18; this file ships the type
|
|
10
|
+
* surface and a stub.
|
|
11
|
+
*/
|
|
12
|
+
import type { Diagnostic, Entry, ProfileChain, ProjectConfig } from "../model/mod.js";
|
|
13
|
+
import type { Mapping } from "../sync/mod.js";
|
|
14
|
+
import type { BoundEntry, UpstreamProfile, UpstreamReference, UpstreamRegistry } from "./model.js";
|
|
15
|
+
import { type EdgeQuad } from "./canonical_edges.js";
|
|
16
|
+
/**
|
|
17
|
+
* Callback to fetch a URL. Returns the bytes on success, or an
|
|
18
|
+
* `{ error }` object on failure. Never throws — every recoverable
|
|
19
|
+
* problem flows back as an error so the resolver can attach a
|
|
20
|
+
* diagnostic instead of bubbling an exception.
|
|
21
|
+
*/
|
|
22
|
+
export type FetchUrl = (url: string) => Promise<Uint8Array | {
|
|
23
|
+
error: string;
|
|
24
|
+
}>;
|
|
25
|
+
/**
|
|
26
|
+
* Callback to read a local file by absolute path. Returns the bytes on
|
|
27
|
+
* success, or `{ error }` on failure. Used by `resolveProfileChain` to
|
|
28
|
+
* hash on-disk profile manifests; isolated to a callback so the resolver
|
|
29
|
+
* stays runtime-agnostic.
|
|
30
|
+
*/
|
|
31
|
+
export type ReadFile = (path: string) => Promise<Uint8Array | {
|
|
32
|
+
error: string;
|
|
33
|
+
}>;
|
|
34
|
+
/** Inputs to {@linkcode resolveUpstreams}. */
|
|
35
|
+
export interface ResolveUpstreamsOptions {
|
|
36
|
+
readonly entries: readonly Entry[];
|
|
37
|
+
/**
|
|
38
|
+
* Profile chain to lock. Pass `[]` when no profile is active —
|
|
39
|
+
* tighter than making the chain optional, since downstream
|
|
40
|
+
* code can always iterate `profileChain` without a null check.
|
|
41
|
+
*/
|
|
42
|
+
readonly profileChain: ProfileChain | readonly never[];
|
|
43
|
+
readonly config: ProjectConfig;
|
|
44
|
+
readonly mappings: readonly Mapping[];
|
|
45
|
+
readonly fetchUrl: FetchUrl;
|
|
46
|
+
readonly readFile: ReadFile;
|
|
47
|
+
/** Injectable clock for deterministic tests. Defaults to `() => new Date()`. */
|
|
48
|
+
readonly now?: () => Date;
|
|
49
|
+
}
|
|
50
|
+
/** A Reference citation that resolved to bytes or identity-only. */
|
|
51
|
+
export interface ResolvedReference {
|
|
52
|
+
readonly upstream: UpstreamReference;
|
|
53
|
+
readonly diagnostics: readonly Diagnostic[];
|
|
54
|
+
}
|
|
55
|
+
/** A profile chain tier that resolved. */
|
|
56
|
+
export interface ResolvedProfile {
|
|
57
|
+
readonly upstream: UpstreamProfile;
|
|
58
|
+
readonly diagnostics: readonly Diagnostic[];
|
|
59
|
+
}
|
|
60
|
+
/** A federated registry that resolved. */
|
|
61
|
+
export interface ResolvedRegistry {
|
|
62
|
+
readonly upstream: UpstreamRegistry;
|
|
63
|
+
readonly diagnostics: readonly Diagnostic[];
|
|
64
|
+
}
|
|
65
|
+
/** A bound entry's locked-attribute snapshot. */
|
|
66
|
+
export interface ResolvedBoundEntry {
|
|
67
|
+
readonly boundEntry: BoundEntry;
|
|
68
|
+
readonly diagnostics: readonly Diagnostic[];
|
|
69
|
+
}
|
|
70
|
+
/** Full resolved-upstreams payload — input to lockfile serialization. */
|
|
71
|
+
export interface ResolvedUpstreams {
|
|
72
|
+
readonly references: readonly ResolvedReference[];
|
|
73
|
+
readonly profiles: readonly ResolvedProfile[];
|
|
74
|
+
readonly registries: readonly ResolvedRegistry[];
|
|
75
|
+
readonly boundEntries: readonly ResolvedBoundEntry[];
|
|
76
|
+
/** sha256:* of the canonical edge serialization. */
|
|
77
|
+
readonly canonicalEdgeHash: string;
|
|
78
|
+
readonly canonicalEdgeCount: number;
|
|
79
|
+
/** Wall-clock timestamp the lockfile was resolved. */
|
|
80
|
+
readonly lockedAt: string;
|
|
81
|
+
/** Aggregate diagnostics — empty when every upstream resolved cleanly. */
|
|
82
|
+
readonly diagnostics: readonly Diagnostic[];
|
|
83
|
+
}
|
|
84
|
+
/**
|
|
85
|
+
* Resolve every Reference entry to an upstream record. Deduplicates by
|
|
86
|
+
* display ID (first occurrence wins). When `Reference-url:` is set, the
|
|
87
|
+
* bytes are fetched and `sha256:*`-hashed; otherwise an MSL-L010 info
|
|
88
|
+
* diagnostic is attached and the upstream is identity-only. Fetch
|
|
89
|
+
* failures attach MSL-L101 and degrade to identity-only.
|
|
90
|
+
*/
|
|
91
|
+
export declare function resolveReferences(entries: readonly Entry[], fetchUrl: FetchUrl): Promise<ResolvedReference[]>;
|
|
92
|
+
/**
|
|
93
|
+
* Project an entry list to canonical edge quads. Walks the eleven core
|
|
94
|
+
* trace-link attributes (Satisfies, Derived-from, Verified-by, …) and
|
|
95
|
+
* emits one quad per resolved target ID, splitting CSV values on `,`
|
|
96
|
+
* or whitespace. Every quad is provenance `"local"` — externally
|
|
97
|
+
* sourced edges are folded in later (post-MVP).
|
|
98
|
+
*/
|
|
99
|
+
export declare function extractEdgeQuads(entries: readonly Entry[]): EdgeQuad[];
|
|
100
|
+
/**
|
|
101
|
+
* Resolve every upstream the lockfile needs: References, profile chain
|
|
102
|
+
* tiers, federated registries, and bound entries. Computes the
|
|
103
|
+
* canonical edge hash from the same entry set. Returns the aggregate
|
|
104
|
+
* `ResolvedUpstreams` payload ready for {@link serializeLockfile}.
|
|
105
|
+
*
|
|
106
|
+
* The four sub-resolvers run sequentially (not concurrently) because
|
|
107
|
+
* (a) the callbacks they share — `fetchUrl`, `readFile` — may themselves
|
|
108
|
+
* serialize work, and (b) the diagnostics output is easier to reason
|
|
109
|
+
* about with a deterministic order. Wrap inside `Promise.all` only when
|
|
110
|
+
* profiling shows a clear win.
|
|
111
|
+
*/
|
|
112
|
+
export declare function resolveUpstreams(opts: ResolveUpstreamsOptions): Promise<ResolvedUpstreams>;
|
|
113
|
+
/**
|
|
114
|
+
* Resolve every profile chain tier into an upstream record. Each tier's
|
|
115
|
+
* `markspec.yaml` is read from `tier.sourcePath` via `readFile` and
|
|
116
|
+
* `sha256:*`-hashed; a read failure attaches MSL-L102 and degrades the
|
|
117
|
+
* tier's hash to `sha256:0` (identity-only).
|
|
118
|
+
*
|
|
119
|
+
* The `extends` chain is reconstructed from list order: tiers are
|
|
120
|
+
* already root-parent → leaf-child, so each tier's `extends` points to
|
|
121
|
+
* the previous tier's id. The root tier has `extends: undefined`.
|
|
122
|
+
*/
|
|
123
|
+
export declare function resolveProfileChain(chain: ProfileChain | readonly never[], readFile: ReadFile): Promise<ResolvedProfile[]>;
|
|
124
|
+
/**
|
|
125
|
+
* Resolve federated parent registries (and the fallback, when not already
|
|
126
|
+
* listed). Each URL's `<url>/manifest` is fetched; the body is parsed
|
|
127
|
+
* loosely for `markspec-schema` (defaults to 1 on parse failure).
|
|
128
|
+
*/
|
|
129
|
+
export declare function resolveRegistries(config: ProjectConfig, fetchUrl: FetchUrl): Promise<ResolvedRegistry[]>;
|
|
130
|
+
/**
|
|
131
|
+
* Resolve every entry carrying `External-id:` attributes into a
|
|
132
|
+
* `ResolvedBoundEntry`. For each External-id, look up the mapping by
|
|
133
|
+
* scheme prefix, compute the locked-attribute set, and snapshot each
|
|
134
|
+
* local value as `sha256:*` of UTF-8 bytes.
|
|
135
|
+
*
|
|
136
|
+
* Unknown scheme → MSL-S021 error, that binding skipped. Entries with
|
|
137
|
+
* zero External-id attributes are silently dropped (no upstream lock
|
|
138
|
+
* needed). Multi-value attributes are joined with `\n` before hashing
|
|
139
|
+
* so a single locked-attribute hash captures the full attribute state.
|
|
140
|
+
*/
|
|
141
|
+
export declare function resolveBoundEntries(entries: readonly Entry[], mappings: readonly Mapping[]): Promise<ResolvedBoundEntry[]>;
|
|
142
|
+
//# sourceMappingURL=resolve.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"resolve.d.ts","sourceRoot":"","sources":["../../src/lock/resolve.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;GAUG;AAEH,OAAO,KAAK,EACV,UAAU,EACV,KAAK,EACL,YAAY,EAEZ,aAAa,EACd,MAAM,iBAAiB,CAAC;AACzB,OAAO,KAAK,EAAE,OAAO,EAAE,MAAM,gBAAgB,CAAC;AAE9C,OAAO,KAAK,EACV,UAAU,EAEV,eAAe,EACf,iBAAiB,EACjB,gBAAgB,EACjB,MAAM,YAAY,CAAC;AAEpB,OAAO,EAAE,KAAK,QAAQ,EAAsB,MAAM,sBAAsB,CAAC;AAEzE;;;;;GAKG;AACH,MAAM,MAAM,QAAQ,GAAG,CACrB,GAAG,EAAE,MAAM,KACR,OAAO,CAAC,UAAU,GAAG;IAAE,KAAK,EAAE,MAAM,CAAA;CAAE,CAAC,CAAC;AAE7C;;;;;GAKG;AACH,MAAM,MAAM,QAAQ,GAAG,CACrB,IAAI,EAA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