@driftsys/markspec 0.3.0 → 0.5.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/esm/ast/build.d.ts +70 -0
- package/esm/ast/build.d.ts.map +1 -0
- package/esm/ast/build.js +605 -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 +221 -0
- package/esm/ast/nodes.d.ts.map +1 -0
- package/esm/ast/nodes.js +12 -0
- package/esm/ast/normalize.d.ts +67 -0
- package/esm/ast/normalize.d.ts.map +1 -0
- package/esm/ast/normalize.js +255 -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/inverses.d.ts +2 -8
- package/esm/compiler/inverses.d.ts.map +1 -1
- package/esm/compiler/inverses.js +50 -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 +9 -1
- package/esm/compiler/mod.d.ts.map +1 -1
- package/esm/compiler/mod.js +21 -2
- 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 +18 -1
- package/esm/compiler/schema.d.ts.map +1 -1
- package/esm/compiler/schema.js +18 -9
- package/esm/config/mod.d.ts.map +1 -1
- package/esm/config/mod.js +54 -0
- package/esm/formatter/mod.d.ts +56 -6
- package/esm/formatter/mod.d.ts.map +1 -1
- package/esm/formatter/mod.js +372 -41
- 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/lint/mod.d.ts +10 -0
- package/esm/lint/mod.d.ts.map +1 -0
- package/esm/lint/mod.js +7 -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/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 +19 -0
- package/esm/lint/rules/suppression.d.ts.map +1 -0
- package/esm/lint/rules/suppression.js +75 -0
- package/esm/lint/runner.d.ts +39 -0
- package/esm/lint/runner.d.ts.map +1 -0
- package/esm/lint/runner.js +112 -0
- package/esm/lint/types.d.ts +19 -0
- package/esm/lint/types.d.ts.map +1 -0
- package/esm/lint/types.js +9 -0
- package/esm/mod.d.ts +21 -8
- package/esm/mod.d.ts.map +1 -1
- package/esm/mod.js +16 -5
- package/esm/model/attributes.d.ts.map +1 -1
- package/esm/model/attributes.js +163 -2
- 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 +100 -3
- package/esm/model/mod.d.ts.map +1 -1
- package/esm/model/mod.js +58 -2
- package/esm/model/palette.d.ts +18 -0
- package/esm/model/palette.d.ts.map +1 -0
- package/esm/model/palette.js +23 -0
- package/esm/model/profile.d.ts +33 -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 +9 -6
- package/esm/parser/entity_refs.d.ts +53 -0
- package/esm/parser/entity_refs.d.ts.map +1 -0
- package/esm/parser/entity_refs.js +151 -0
- package/esm/parser/glossary.d.ts +43 -0
- package/esm/parser/glossary.d.ts.map +1 -0
- package/esm/parser/glossary.js +217 -0
- package/esm/parser/markdown.d.ts +10 -3
- package/esm/parser/markdown.d.ts.map +1 -1
- package/esm/parser/markdown.js +241 -11
- package/esm/parser/mod.d.ts +1 -0
- package/esm/parser/mod.d.ts.map +1 -1
- package/esm/parser/mod.js +4 -3
- package/esm/parser/source.d.ts +20 -0
- package/esm/parser/source.d.ts.map +1 -1
- package/esm/parser/source.js +4 -4
- package/esm/profile/chain.js +3 -13
- package/esm/profile/colors.d.ts +26 -0
- package/esm/profile/colors.d.ts.map +1 -0
- package/esm/profile/colors.js +46 -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.map +1 -1
- package/esm/profile/load.js +67 -0
- package/esm/profile/manifest.d.ts.map +1 -1
- package/esm/profile/manifest.js +278 -104
- package/esm/profile/merge.js +139 -39
- package/esm/profile/mod.d.ts +3 -4
- package/esm/profile/mod.d.ts.map +1 -1
- package/esm/profile/mod.js +6 -2
- package/esm/reporter/mod.js +4 -4
- 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/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/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 +2 -0
- package/esm/validator/mod.d.ts.map +1 -1
- package/esm/validator/mod.js +253 -12
- package/esm/validator/modal_keywords.d.ts +23 -0
- package/esm/validator/modal_keywords.d.ts.map +1 -0
- package/esm/validator/modal_keywords.js +137 -0
- 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 +7 -2
- package/esm/validator/pipeline.d.ts.map +1 -1
- package/esm/validator/pipeline.js +40 -7
- 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 +140 -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 +1 -1
- package/script/ast/build.d.ts +70 -0
- package/script/ast/build.d.ts.map +1 -0
- package/script/ast/build.js +610 -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 +221 -0
- package/script/ast/nodes.d.ts.map +1 -0
- package/script/ast/nodes.js +13 -0
- package/script/ast/normalize.d.ts +67 -0
- package/script/ast/normalize.d.ts.map +1 -0
- package/script/ast/normalize.js +258 -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/inverses.d.ts +2 -8
- package/script/compiler/inverses.d.ts.map +1 -1
- package/script/compiler/inverses.js +50 -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 +9 -1
- package/script/compiler/mod.d.ts.map +1 -1
- package/script/compiler/mod.js +21 -2
- 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 +18 -1
- package/script/compiler/schema.d.ts.map +1 -1
- package/script/compiler/schema.js +18 -8
- package/script/config/mod.d.ts.map +1 -1
- package/script/config/mod.js +54 -0
- package/script/formatter/mod.d.ts +56 -6
- package/script/formatter/mod.d.ts.map +1 -1
- package/script/formatter/mod.js +375 -41
- 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/lint/mod.d.ts +10 -0
- package/script/lint/mod.d.ts.map +1 -0
- package/script/lint/mod.js +12 -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/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 +19 -0
- package/script/lint/rules/suppression.d.ts.map +1 -0
- package/script/lint/rules/suppression.js +80 -0
- package/script/lint/runner.d.ts +39 -0
- package/script/lint/runner.d.ts.map +1 -0
- package/script/lint/runner.js +116 -0
- package/script/lint/types.d.ts +19 -0
- package/script/lint/types.d.ts.map +1 -0
- package/script/lint/types.js +10 -0
- package/script/mod.d.ts +21 -8
- package/script/mod.d.ts.map +1 -1
- package/script/mod.js +58 -32
- package/script/model/attributes.d.ts.map +1 -1
- package/script/model/attributes.js +163 -2
- 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 +100 -3
- package/script/model/mod.d.ts.map +1 -1
- package/script/model/mod.js +67 -3
- package/script/model/palette.d.ts +18 -0
- package/script/model/palette.d.ts.map +1 -0
- package/script/model/palette.js +26 -0
- package/script/model/profile.d.ts +33 -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 +9 -6
- package/script/parser/entity_refs.d.ts +53 -0
- package/script/parser/entity_refs.d.ts.map +1 -0
- package/script/parser/entity_refs.js +155 -0
- package/script/parser/glossary.d.ts +43 -0
- package/script/parser/glossary.d.ts.map +1 -0
- package/script/parser/glossary.js +221 -0
- package/script/parser/markdown.d.ts +10 -3
- package/script/parser/markdown.d.ts.map +1 -1
- package/script/parser/markdown.js +240 -10
- package/script/parser/mod.d.ts +1 -0
- package/script/parser/mod.d.ts.map +1 -1
- package/script/parser/mod.js +8 -4
- package/script/parser/source.d.ts +20 -0
- package/script/parser/source.d.ts.map +1 -1
- package/script/parser/source.js +4 -1
- package/script/profile/chain.js +3 -13
- package/script/profile/colors.d.ts +26 -0
- package/script/profile/colors.d.ts.map +1 -0
- package/script/profile/colors.js +49 -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.map +1 -1
- package/script/profile/load.js +67 -0
- package/script/profile/manifest.d.ts.map +1 -1
- package/script/profile/manifest.js +280 -106
- package/script/profile/merge.js +139 -39
- package/script/profile/mod.d.ts +3 -4
- package/script/profile/mod.d.ts.map +1 -1
- package/script/profile/mod.js +9 -6
- package/script/reporter/mod.js +4 -4
- 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/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/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 +2 -0
- package/script/validator/mod.d.ts.map +1 -1
- package/script/validator/mod.js +256 -14
- package/script/validator/modal_keywords.d.ts +23 -0
- package/script/validator/modal_keywords.d.ts.map +1 -0
- package/script/validator/modal_keywords.js +140 -0
- 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 +7 -2
- package/script/validator/pipeline.d.ts.map +1 -1
- package/script/validator/pipeline.js +39 -6
- 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 +146 -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/script/mod.d.ts.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"mod.d.ts","sourceRoot":"","sources":["../src/mod.ts"],"names":[],"mappings":"AAAA;;;;;;;;GAQG;AACH,OAAO,qBAAqB,CAAC;AAG7B,eAAO,MAAM,OAAO,UAAU,CAAC;
|
|
1
|
+
{"version":3,"file":"mod.d.ts","sourceRoot":"","sources":["../src/mod.ts"],"names":[],"mappings":"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"}
|
package/script/mod.js
CHANGED
|
@@ -1,6 +1,7 @@
|
|
|
1
1
|
"use strict";
|
|
2
2
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
-
exports.
|
|
3
|
+
exports.validateTraceabilityForEntry = exports.validateListingDocuments = exports.validateAttributesForEntry = exports.validate = exports.runPipeline = exports.normalizeListValues = exports.matchesAnyTarget = exports.effectiveTraceRules = exports.effectiveScope = exports.compileDisplayIdPattern = exports.classifyEntry = exports.classifyEntriesStage = exports.format = exports.parseSource = exports.parseFile = exports.parse = exports.loadGrammar = exports.isSupportedExtension = exports.detectInlineRefs = exports.detectDirectives = exports.detectCaptions = exports.buildProfileIntrospection = exports.resolveLocalSpecifier = exports.resolveGitSpecifier = exports.resolveEntryColor = exports.parseManifest = exports.mergeChain = exports.loadProfileForCommand = exports.loadChain = exports.ensureCacheGitignored = exports.defaultRunGit = exports.defaultAppendFile = exports.computeCacheLocation = exports.computeCacheKey = exports.readMarkspecYaml = exports.parseMarkspecYaml = exports.MARKSPEC_YAML_FILENAME = exports.addProfileSpecifier = exports.parseProjectConfig = exports.loadConfig = exports.discoverProjectRoot = exports.render = exports.normalizeBodyAst = exports.astEquivalent = exports.REFHUB_URL = exports.PALETTE_HUES = exports.DEFAULT_PROJECT_CONFIG = exports.ConfigError = exports.CORE_SCHEMA_VERSION = exports.VERSION = void 0;
|
|
4
|
+
exports.runLint = exports.isProseScope = exports.report = exports.indexToJson = exports.buildEntriesNdjson = exports.buildEdgesNdjson = exports.buildManifest = exports.serializeCompileResult = exports.generateInverses = exports.compile = exports.validateValue = void 0;
|
|
4
5
|
/**
|
|
5
6
|
* @module core
|
|
6
7
|
*
|
|
@@ -11,18 +12,29 @@ exports.report = exports.serializeCompileResult = exports.generateInverses = exp
|
|
|
11
12
|
* from core/mod.ts, never from internal paths.
|
|
12
13
|
*/
|
|
13
14
|
require("./_dnt.polyfills.js");
|
|
14
|
-
exports.VERSION = "0.0
|
|
15
|
+
exports.VERSION = "0.5.0";
|
|
16
|
+
exports.CORE_SCHEMA_VERSION = 1;
|
|
15
17
|
// Model types
|
|
16
18
|
var mod_js_1 = require("./model/mod.js");
|
|
17
19
|
Object.defineProperty(exports, "ConfigError", { enumerable: true, get: function () { return mod_js_1.ConfigError; } });
|
|
18
20
|
Object.defineProperty(exports, "DEFAULT_PROJECT_CONFIG", { enumerable: true, get: function () { return mod_js_1.DEFAULT_PROJECT_CONFIG; } });
|
|
21
|
+
Object.defineProperty(exports, "PALETTE_HUES", { enumerable: true, get: function () { return mod_js_1.PALETTE_HUES; } });
|
|
19
22
|
Object.defineProperty(exports, "REFHUB_URL", { enumerable: true, get: function () { return mod_js_1.REFHUB_URL; } });
|
|
23
|
+
// AST (canonical body-AST — spec docs/specs/markspec-core-data-model.md §2)
|
|
24
|
+
// SourceRange is body-relative (no `file`); use SourceLocation for file-absolute positions.
|
|
25
|
+
var equivalence_js_1 = require("./ast/equivalence.js");
|
|
26
|
+
Object.defineProperty(exports, "astEquivalent", { enumerable: true, get: function () { return equivalence_js_1.astEquivalent; } });
|
|
27
|
+
var normalize_js_1 = require("./ast/normalize.js");
|
|
28
|
+
Object.defineProperty(exports, "normalizeBodyAst", { enumerable: true, get: function () { return normalize_js_1.normalizeBodyAst; } });
|
|
29
|
+
var render_js_1 = require("./ast/render.js");
|
|
30
|
+
Object.defineProperty(exports, "render", { enumerable: true, get: function () { return render_js_1.render; } });
|
|
20
31
|
// Config
|
|
21
32
|
var mod_js_2 = require("./config/mod.js");
|
|
22
33
|
Object.defineProperty(exports, "discoverProjectRoot", { enumerable: true, get: function () { return mod_js_2.discoverProjectRoot; } });
|
|
23
34
|
Object.defineProperty(exports, "loadConfig", { enumerable: true, get: function () { return mod_js_2.loadConfig; } });
|
|
24
35
|
Object.defineProperty(exports, "parseProjectConfig", { enumerable: true, get: function () { return mod_js_2.parseProjectConfig; } });
|
|
25
36
|
var markspec_js_1 = require("./config/markspec.js");
|
|
37
|
+
Object.defineProperty(exports, "addProfileSpecifier", { enumerable: true, get: function () { return markspec_js_1.addProfileSpecifier; } });
|
|
26
38
|
Object.defineProperty(exports, "MARKSPEC_YAML_FILENAME", { enumerable: true, get: function () { return markspec_js_1.MARKSPEC_YAML_FILENAME; } });
|
|
27
39
|
Object.defineProperty(exports, "parseMarkspecYaml", { enumerable: true, get: function () { return markspec_js_1.parseMarkspecYaml; } });
|
|
28
40
|
Object.defineProperty(exports, "readMarkspecYaml", { enumerable: true, get: function () { return markspec_js_1.readMarkspecYaml; } });
|
|
@@ -37,40 +49,54 @@ Object.defineProperty(exports, "loadChain", { enumerable: true, get: function ()
|
|
|
37
49
|
Object.defineProperty(exports, "loadProfileForCommand", { enumerable: true, get: function () { return mod_js_3.loadProfileForCommand; } });
|
|
38
50
|
Object.defineProperty(exports, "mergeChain", { enumerable: true, get: function () { return mod_js_3.mergeChain; } });
|
|
39
51
|
Object.defineProperty(exports, "parseManifest", { enumerable: true, get: function () { return mod_js_3.parseManifest; } });
|
|
52
|
+
Object.defineProperty(exports, "resolveEntryColor", { enumerable: true, get: function () { return mod_js_3.resolveEntryColor; } });
|
|
40
53
|
Object.defineProperty(exports, "resolveGitSpecifier", { enumerable: true, get: function () { return mod_js_3.resolveGitSpecifier; } });
|
|
41
54
|
Object.defineProperty(exports, "resolveLocalSpecifier", { enumerable: true, get: function () { return mod_js_3.resolveLocalSpecifier; } });
|
|
55
|
+
var mod_js_4 = require("./profile/mod.js");
|
|
56
|
+
Object.defineProperty(exports, "buildProfileIntrospection", { enumerable: true, get: function () { return mod_js_4.buildProfileIntrospection; } });
|
|
42
57
|
// Parser
|
|
43
|
-
var
|
|
44
|
-
Object.defineProperty(exports, "detectCaptions", { enumerable: true, get: function () { return
|
|
45
|
-
Object.defineProperty(exports, "detectDirectives", { enumerable: true, get: function () { return
|
|
46
|
-
Object.defineProperty(exports, "detectInlineRefs", { enumerable: true, get: function () { return
|
|
47
|
-
Object.defineProperty(exports, "isSupportedExtension", { enumerable: true, get: function () { return
|
|
48
|
-
Object.defineProperty(exports, "loadGrammar", { enumerable: true, get: function () { return
|
|
49
|
-
Object.defineProperty(exports, "parse", { enumerable: true, get: function () { return
|
|
50
|
-
Object.defineProperty(exports, "parseFile", { enumerable: true, get: function () { return
|
|
51
|
-
Object.defineProperty(exports, "parseSource", { enumerable: true, get: function () { return
|
|
58
|
+
var mod_js_5 = require("./parser/mod.js");
|
|
59
|
+
Object.defineProperty(exports, "detectCaptions", { enumerable: true, get: function () { return mod_js_5.detectCaptions; } });
|
|
60
|
+
Object.defineProperty(exports, "detectDirectives", { enumerable: true, get: function () { return mod_js_5.detectDirectives; } });
|
|
61
|
+
Object.defineProperty(exports, "detectInlineRefs", { enumerable: true, get: function () { return mod_js_5.detectInlineRefs; } });
|
|
62
|
+
Object.defineProperty(exports, "isSupportedExtension", { enumerable: true, get: function () { return mod_js_5.isSupportedExtension; } });
|
|
63
|
+
Object.defineProperty(exports, "loadGrammar", { enumerable: true, get: function () { return mod_js_5.loadGrammar; } });
|
|
64
|
+
Object.defineProperty(exports, "parse", { enumerable: true, get: function () { return mod_js_5.parse; } });
|
|
65
|
+
Object.defineProperty(exports, "parseFile", { enumerable: true, get: function () { return mod_js_5.parseFile; } });
|
|
66
|
+
Object.defineProperty(exports, "parseSource", { enumerable: true, get: function () { return mod_js_5.parseSource; } });
|
|
52
67
|
// Formatter
|
|
53
|
-
var
|
|
54
|
-
Object.defineProperty(exports, "format", { enumerable: true, get: function () { return
|
|
68
|
+
var mod_js_6 = require("./formatter/mod.js");
|
|
69
|
+
Object.defineProperty(exports, "format", { enumerable: true, get: function () { return mod_js_6.format; } });
|
|
55
70
|
// Validator
|
|
56
|
-
var
|
|
57
|
-
Object.defineProperty(exports, "classifyEntriesStage", { enumerable: true, get: function () { return
|
|
58
|
-
Object.defineProperty(exports, "classifyEntry", { enumerable: true, get: function () { return
|
|
59
|
-
Object.defineProperty(exports, "compileDisplayIdPattern", { enumerable: true, get: function () { return
|
|
60
|
-
Object.defineProperty(exports, "effectiveScope", { enumerable: true, get: function () { return
|
|
61
|
-
Object.defineProperty(exports, "effectiveTraceRules", { enumerable: true, get: function () { return
|
|
62
|
-
Object.defineProperty(exports, "matchesAnyTarget", { enumerable: true, get: function () { return
|
|
63
|
-
Object.defineProperty(exports, "normalizeListValues", { enumerable: true, get: function () { return
|
|
64
|
-
Object.defineProperty(exports, "runPipeline", { enumerable: true, get: function () { return
|
|
65
|
-
Object.defineProperty(exports, "validate", { enumerable: true, get: function () { return
|
|
66
|
-
Object.defineProperty(exports, "validateAttributesForEntry", { enumerable: true, get: function () { return
|
|
67
|
-
Object.defineProperty(exports, "
|
|
68
|
-
Object.defineProperty(exports, "
|
|
71
|
+
var mod_js_7 = require("./validator/mod.js");
|
|
72
|
+
Object.defineProperty(exports, "classifyEntriesStage", { enumerable: true, get: function () { return mod_js_7.classifyEntriesStage; } });
|
|
73
|
+
Object.defineProperty(exports, "classifyEntry", { enumerable: true, get: function () { return mod_js_7.classifyEntry; } });
|
|
74
|
+
Object.defineProperty(exports, "compileDisplayIdPattern", { enumerable: true, get: function () { return mod_js_7.compileDisplayIdPattern; } });
|
|
75
|
+
Object.defineProperty(exports, "effectiveScope", { enumerable: true, get: function () { return mod_js_7.effectiveScope; } });
|
|
76
|
+
Object.defineProperty(exports, "effectiveTraceRules", { enumerable: true, get: function () { return mod_js_7.effectiveTraceRules; } });
|
|
77
|
+
Object.defineProperty(exports, "matchesAnyTarget", { enumerable: true, get: function () { return mod_js_7.matchesAnyTarget; } });
|
|
78
|
+
Object.defineProperty(exports, "normalizeListValues", { enumerable: true, get: function () { return mod_js_7.normalizeListValues; } });
|
|
79
|
+
Object.defineProperty(exports, "runPipeline", { enumerable: true, get: function () { return mod_js_7.runPipeline; } });
|
|
80
|
+
Object.defineProperty(exports, "validate", { enumerable: true, get: function () { return mod_js_7.validate; } });
|
|
81
|
+
Object.defineProperty(exports, "validateAttributesForEntry", { enumerable: true, get: function () { return mod_js_7.validateAttributesForEntry; } });
|
|
82
|
+
Object.defineProperty(exports, "validateListingDocuments", { enumerable: true, get: function () { return mod_js_7.validateListingDocuments; } });
|
|
83
|
+
Object.defineProperty(exports, "validateTraceabilityForEntry", { enumerable: true, get: function () { return mod_js_7.validateTraceabilityForEntry; } });
|
|
84
|
+
Object.defineProperty(exports, "validateValue", { enumerable: true, get: function () { return mod_js_7.validateValue; } });
|
|
69
85
|
// Compiler
|
|
70
|
-
var
|
|
71
|
-
Object.defineProperty(exports, "compile", { enumerable: true, get: function () { return
|
|
72
|
-
Object.defineProperty(exports, "generateInverses", { enumerable: true, get: function () { return
|
|
73
|
-
Object.defineProperty(exports, "serializeCompileResult", { enumerable: true, get: function () { return
|
|
86
|
+
var mod_js_8 = require("./compiler/mod.js");
|
|
87
|
+
Object.defineProperty(exports, "compile", { enumerable: true, get: function () { return mod_js_8.compile; } });
|
|
88
|
+
Object.defineProperty(exports, "generateInverses", { enumerable: true, get: function () { return mod_js_8.generateInverses; } });
|
|
89
|
+
Object.defineProperty(exports, "serializeCompileResult", { enumerable: true, get: function () { return mod_js_8.serializeCompileResult; } });
|
|
90
|
+
var manifest_js_1 = require("./compiler/manifest.js");
|
|
91
|
+
Object.defineProperty(exports, "buildManifest", { enumerable: true, get: function () { return manifest_js_1.buildManifest; } });
|
|
92
|
+
var ndjson_writer_js_1 = require("./compiler/ndjson_writer.js");
|
|
93
|
+
Object.defineProperty(exports, "buildEdgesNdjson", { enumerable: true, get: function () { return ndjson_writer_js_1.buildEdgesNdjson; } });
|
|
94
|
+
Object.defineProperty(exports, "buildEntriesNdjson", { enumerable: true, get: function () { return ndjson_writer_js_1.buildEntriesNdjson; } });
|
|
95
|
+
Object.defineProperty(exports, "indexToJson", { enumerable: true, get: function () { return ndjson_writer_js_1.indexToJson; } });
|
|
74
96
|
// Reporter
|
|
75
|
-
var
|
|
76
|
-
Object.defineProperty(exports, "report", { enumerable: true, get: function () { return
|
|
97
|
+
var mod_js_9 = require("./reporter/mod.js");
|
|
98
|
+
Object.defineProperty(exports, "report", { enumerable: true, get: function () { return mod_js_9.report; } });
|
|
99
|
+
// Lint (prose-analysis)
|
|
100
|
+
var mod_js_10 = require("./lint/mod.js");
|
|
101
|
+
Object.defineProperty(exports, "isProseScope", { enumerable: true, get: function () { return mod_js_10.isProseScope; } });
|
|
102
|
+
Object.defineProperty(exports, "runLint", { enumerable: true, get: function () { return mod_js_10.runLint; } });
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"attributes.d.ts","sourceRoot":"","sources":["../../src/model/attributes.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;GAUG;AAEH,OAAO,KAAK,EAAE,eAAe,EAAE,kBAAkB,EAAE,UAAU,EAAE,MAAM,UAAU,CAAC;AAMhF,oDAAoD;AACpD,MAAM,WAAW,aAAa;IAC5B,uDAAuD;IACvD,QAAQ,CAAC,GAAG,EAAE,MAAM,CAAC;IACrB,0CAA0C;IAC1C,QAAQ,CAAC,IAAI,EAAE,kBAAkB,CAAC;IAClC,0CAA0C;IAC1C,QAAQ,CAAC,MAAM,EAAE,eAAe,CAAC;IACjC;;;OAGG;IACH,QAAQ,CAAC,MAAM,EAAE,SAAS,UAAU,EAAE,CAAC;IACvC,yCAAyC;IACzC,QAAQ,CAAC,QAAQ,EAAE,OAAO,CAAC;IAC3B,sDAAsD;IACtD,QAAQ,CAAC,UAAU,CAAC,EAAE,SAAS,MAAM,EAAE,CAAC;CACzC;AAgBD;;;;;;;;;;GAUG;AACH,eAAO,MAAM,iBAAiB,EAAE,SAAS,aAAa,
|
|
1
|
+
{"version":3,"file":"attributes.d.ts","sourceRoot":"","sources":["../../src/model/attributes.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;GAUG;AAEH,OAAO,KAAK,EAAE,eAAe,EAAE,kBAAkB,EAAE,UAAU,EAAE,MAAM,UAAU,CAAC;AAMhF,oDAAoD;AACpD,MAAM,WAAW,aAAa;IAC5B,uDAAuD;IACvD,QAAQ,CAAC,GAAG,EAAE,MAAM,CAAC;IACrB,0CAA0C;IAC1C,QAAQ,CAAC,IAAI,EAAE,kBAAkB,CAAC;IAClC,0CAA0C;IAC1C,QAAQ,CAAC,MAAM,EAAE,eAAe,CAAC;IACjC;;;OAGG;IACH,QAAQ,CAAC,MAAM,EAAE,SAAS,UAAU,EAAE,CAAC;IACvC,yCAAyC;IACzC,QAAQ,CAAC,QAAQ,EAAE,OAAO,CAAC;IAC3B,sDAAsD;IACtD,QAAQ,CAAC,UAAU,CAAC,EAAE,SAAS,MAAM,EAAE,CAAC;CACzC;AAgBD;;;;;;;;;;GAUG;AACH,eAAO,MAAM,iBAAiB,EAAE,SAAS,aAAa,EA0NrD,CAAC;AAEF,+DAA+D;AAC/D,eAAO,MAAM,wBAAwB,EAAE,SAAS,MAAM,EAC5B,CAAC;AAU3B,+DAA+D;AAC/D,wBAAgB,aAAa,CAAC,GAAG,EAAE,MAAM,GAAG,aAAa,GAAG,SAAS,CAEpE"}
|
|
@@ -17,13 +17,13 @@ exports.attributeSpec = attributeSpec;
|
|
|
17
17
|
// Universal attribute catalog
|
|
18
18
|
// ---------------------------------------------------------------------------
|
|
19
19
|
/** Both shapes. */
|
|
20
|
-
const BOTH_SHAPES = ["
|
|
20
|
+
const BOTH_SHAPES = ["Authored", "Reference"];
|
|
21
21
|
/**
|
|
22
22
|
* Shapes that carry `References:` — identified entries only. A referenced
|
|
23
23
|
* entry does not itself cite other referenced entries via `References:`
|
|
24
24
|
* (the replacement relation is expressed via universal `Supersedes:`).
|
|
25
25
|
*/
|
|
26
|
-
const CITING_SHAPES = ["
|
|
26
|
+
const CITING_SHAPES = ["Authored"];
|
|
27
27
|
/**
|
|
28
28
|
* Full catalog of core built-in attributes.
|
|
29
29
|
*
|
|
@@ -44,6 +44,49 @@ exports.ATTRIBUTE_CATALOG = [
|
|
|
44
44
|
shapes: BOTH_SHAPES,
|
|
45
45
|
required: true,
|
|
46
46
|
},
|
|
47
|
+
// Universal classification (spec §1.3 / §1.4) — apply to every entry.
|
|
48
|
+
// `Type` carries the information-layer classification; `Source` and
|
|
49
|
+
// `Origin` are universal authoring metadata (SSoT pointer, synthesis
|
|
50
|
+
// flag). They live in the catalogue so validators / formatters can
|
|
51
|
+
// look them up without per-call special-casing.
|
|
52
|
+
{
|
|
53
|
+
key: "Type",
|
|
54
|
+
type: "enum",
|
|
55
|
+
origin: "authored",
|
|
56
|
+
shapes: BOTH_SHAPES,
|
|
57
|
+
required: false,
|
|
58
|
+
},
|
|
59
|
+
{
|
|
60
|
+
key: "Source",
|
|
61
|
+
type: "path-or-id",
|
|
62
|
+
origin: "authored",
|
|
63
|
+
shapes: BOTH_SHAPES,
|
|
64
|
+
required: false,
|
|
65
|
+
},
|
|
66
|
+
{
|
|
67
|
+
key: "Origin",
|
|
68
|
+
type: "enum",
|
|
69
|
+
origin: "authored",
|
|
70
|
+
shapes: BOTH_SHAPES,
|
|
71
|
+
required: false,
|
|
72
|
+
enumValues: ["authored", "synthesized"],
|
|
73
|
+
},
|
|
74
|
+
// Reference-shape navigation (spec §1.5) — promoted from the RefHub
|
|
75
|
+
// profile to core in PR #277.
|
|
76
|
+
{
|
|
77
|
+
key: "Reference-url",
|
|
78
|
+
type: "url",
|
|
79
|
+
origin: "authored",
|
|
80
|
+
shapes: ["Reference"],
|
|
81
|
+
required: false,
|
|
82
|
+
},
|
|
83
|
+
{
|
|
84
|
+
key: "Reference-document",
|
|
85
|
+
type: "text",
|
|
86
|
+
origin: "authored",
|
|
87
|
+
shapes: ["Reference"],
|
|
88
|
+
required: false,
|
|
89
|
+
},
|
|
47
90
|
// Universal — apply to every entry
|
|
48
91
|
{
|
|
49
92
|
key: "Labels",
|
|
@@ -87,6 +130,124 @@ exports.ATTRIBUTE_CATALOG = [
|
|
|
87
130
|
shapes: BOTH_SHAPES,
|
|
88
131
|
required: false,
|
|
89
132
|
},
|
|
133
|
+
// Generated inverses from ADR-003 §Part 3. These are NEVER authored
|
|
134
|
+
// in source; the compiler computes them from authored relations at
|
|
135
|
+
// build time. MSL-A030 catches anyone who tries to write them
|
|
136
|
+
// manually.
|
|
137
|
+
{
|
|
138
|
+
key: "Derives",
|
|
139
|
+
type: "id-list",
|
|
140
|
+
origin: "generated",
|
|
141
|
+
shapes: BOTH_SHAPES,
|
|
142
|
+
required: false,
|
|
143
|
+
},
|
|
144
|
+
{
|
|
145
|
+
key: "Satisfied-by",
|
|
146
|
+
type: "id-list",
|
|
147
|
+
origin: "generated",
|
|
148
|
+
shapes: BOTH_SHAPES,
|
|
149
|
+
required: false,
|
|
150
|
+
},
|
|
151
|
+
{
|
|
152
|
+
key: "Realized-by",
|
|
153
|
+
type: "id-list",
|
|
154
|
+
origin: "generated",
|
|
155
|
+
shapes: BOTH_SHAPES,
|
|
156
|
+
required: false,
|
|
157
|
+
},
|
|
158
|
+
{
|
|
159
|
+
key: "Verified-by",
|
|
160
|
+
type: "id-list",
|
|
161
|
+
origin: "generated",
|
|
162
|
+
shapes: BOTH_SHAPES,
|
|
163
|
+
required: false,
|
|
164
|
+
},
|
|
165
|
+
{
|
|
166
|
+
key: "Tested-by",
|
|
167
|
+
type: "id-list",
|
|
168
|
+
origin: "generated",
|
|
169
|
+
shapes: BOTH_SHAPES,
|
|
170
|
+
required: false,
|
|
171
|
+
},
|
|
172
|
+
{
|
|
173
|
+
key: "Allocated",
|
|
174
|
+
type: "id-list",
|
|
175
|
+
origin: "generated",
|
|
176
|
+
shapes: BOTH_SHAPES,
|
|
177
|
+
required: false,
|
|
178
|
+
},
|
|
179
|
+
{
|
|
180
|
+
key: "Contains",
|
|
181
|
+
type: "id-list",
|
|
182
|
+
origin: "generated",
|
|
183
|
+
shapes: BOTH_SHAPES,
|
|
184
|
+
required: false,
|
|
185
|
+
},
|
|
186
|
+
{
|
|
187
|
+
key: "Provided-by",
|
|
188
|
+
type: "id-list",
|
|
189
|
+
origin: "generated",
|
|
190
|
+
shapes: BOTH_SHAPES,
|
|
191
|
+
required: false,
|
|
192
|
+
},
|
|
193
|
+
{
|
|
194
|
+
key: "Required-by",
|
|
195
|
+
type: "id-list",
|
|
196
|
+
origin: "generated",
|
|
197
|
+
shapes: BOTH_SHAPES,
|
|
198
|
+
required: false,
|
|
199
|
+
},
|
|
200
|
+
{
|
|
201
|
+
key: "Used-by",
|
|
202
|
+
type: "id-list",
|
|
203
|
+
origin: "generated",
|
|
204
|
+
shapes: BOTH_SHAPES,
|
|
205
|
+
required: false,
|
|
206
|
+
},
|
|
207
|
+
{
|
|
208
|
+
key: "Caused",
|
|
209
|
+
type: "id-list",
|
|
210
|
+
origin: "generated",
|
|
211
|
+
shapes: BOTH_SHAPES,
|
|
212
|
+
required: false,
|
|
213
|
+
},
|
|
214
|
+
{
|
|
215
|
+
key: "Affected-by",
|
|
216
|
+
type: "id-list",
|
|
217
|
+
origin: "generated",
|
|
218
|
+
shapes: BOTH_SHAPES,
|
|
219
|
+
required: false,
|
|
220
|
+
},
|
|
221
|
+
{
|
|
222
|
+
key: "Mitigates",
|
|
223
|
+
type: "id-list",
|
|
224
|
+
origin: "generated",
|
|
225
|
+
shapes: BOTH_SHAPES,
|
|
226
|
+
required: false,
|
|
227
|
+
},
|
|
228
|
+
{
|
|
229
|
+
key: "Cited-by",
|
|
230
|
+
type: "id-list",
|
|
231
|
+
origin: "generated",
|
|
232
|
+
shapes: BOTH_SHAPES,
|
|
233
|
+
required: false,
|
|
234
|
+
},
|
|
235
|
+
// Prose-analysis suppression (spec §MSL-Q900/Q901). Authored on any entry
|
|
236
|
+
// to silence specific lint rule codes; requires a companion Rationale:.
|
|
237
|
+
{
|
|
238
|
+
key: "Markspec-disable",
|
|
239
|
+
type: "text",
|
|
240
|
+
origin: "authored",
|
|
241
|
+
shapes: BOTH_SHAPES,
|
|
242
|
+
required: false,
|
|
243
|
+
},
|
|
244
|
+
{
|
|
245
|
+
key: "Rationale",
|
|
246
|
+
type: "text",
|
|
247
|
+
origin: "authored",
|
|
248
|
+
shapes: BOTH_SHAPES,
|
|
249
|
+
required: false,
|
|
250
|
+
},
|
|
90
251
|
];
|
|
91
252
|
/** Canonical Title-Case attribute keys the core recognizes. */
|
|
92
253
|
exports.UNIVERSAL_ATTRIBUTE_KEYS = exports.ATTRIBUTE_CATALOG
|
|
@@ -0,0 +1,33 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* @module core/model/discriminating_attr
|
|
3
|
+
*
|
|
4
|
+
* Spec §1.3.1 step 6 — discriminating-attribute introspection.
|
|
5
|
+
*
|
|
6
|
+
* The presence of a type-specific attribute key on an entry whose core
|
|
7
|
+
* type is otherwise unresolved infers that type. Only attribute keys
|
|
8
|
+
* **uniquely owned** by a single concrete core type are listed here; keys
|
|
9
|
+
* shared between siblings (e.g., `Caused-by` between Record and Risk, or
|
|
10
|
+
* `Manufacturer` between HardwareComponent and HardwareUnit) are not
|
|
11
|
+
* discriminating and intentionally absent.
|
|
12
|
+
*
|
|
13
|
+
* Owner mapping is derived from spec §1.6 “Per-abstract-type and
|
|
14
|
+
* per-concrete-type attributes” (ADR-003 §Part 2 catalogue).
|
|
15
|
+
*
|
|
16
|
+
* `Source:` could in principle also discriminate to `SoftwareUnit`, but
|
|
17
|
+
* step 3 introspection already runs ahead of step 6 and would have
|
|
18
|
+
* matched filename/extension first — listing it here would only fire
|
|
19
|
+
* when the filename pattern misses, which is fine to support.
|
|
20
|
+
*/
|
|
21
|
+
/**
|
|
22
|
+
* Infer a core type from the first discriminating attribute key present
|
|
23
|
+
* on the entry. `attributeKeys` is the source-order list of attribute
|
|
24
|
+
* keys (TitleCase-Hyphenated form, as parsed). Returns `undefined` when
|
|
25
|
+
* no discriminating key is found.
|
|
26
|
+
*
|
|
27
|
+
* Source order matters: if an entry mistakenly carries discriminators
|
|
28
|
+
* for two different types (e.g., `Verifies:` and `Schema-language:`),
|
|
29
|
+
* the first one in source order wins for step-6 purposes. The MSL-T022
|
|
30
|
+
* pass then flags the second one as incompatible.
|
|
31
|
+
*/
|
|
32
|
+
export declare function inferTypeFromDiscriminatingAttr(attributeKeys: readonly string[]): string | undefined;
|
|
33
|
+
//# sourceMappingURL=discriminating_attr.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"discriminating_attr.d.ts","sourceRoot":"","sources":["../../src/model/discriminating_attr.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;;;;;;GAmBG;AAsCH;;;;;;;;;;GAUG;AACH,wBAAgB,+BAA+B,CAC7C,aAAa,EAAE,SAAS,MAAM,EAAE,GAC/B,MAAM,GAAG,SAAS,CAMpB"}
|
|
@@ -0,0 +1,77 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
/**
|
|
3
|
+
* @module core/model/discriminating_attr
|
|
4
|
+
*
|
|
5
|
+
* Spec §1.3.1 step 6 — discriminating-attribute introspection.
|
|
6
|
+
*
|
|
7
|
+
* The presence of a type-specific attribute key on an entry whose core
|
|
8
|
+
* type is otherwise unresolved infers that type. Only attribute keys
|
|
9
|
+
* **uniquely owned** by a single concrete core type are listed here; keys
|
|
10
|
+
* shared between siblings (e.g., `Caused-by` between Record and Risk, or
|
|
11
|
+
* `Manufacturer` between HardwareComponent and HardwareUnit) are not
|
|
12
|
+
* discriminating and intentionally absent.
|
|
13
|
+
*
|
|
14
|
+
* Owner mapping is derived from spec §1.6 “Per-abstract-type and
|
|
15
|
+
* per-concrete-type attributes” (ADR-003 §Part 2 catalogue).
|
|
16
|
+
*
|
|
17
|
+
* `Source:` could in principle also discriminate to `SoftwareUnit`, but
|
|
18
|
+
* step 3 introspection already runs ahead of step 6 and would have
|
|
19
|
+
* matched filename/extension first — listing it here would only fire
|
|
20
|
+
* when the filename pattern misses, which is fine to support.
|
|
21
|
+
*/
|
|
22
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
23
|
+
exports.inferTypeFromDiscriminatingAttr = inferTypeFromDiscriminatingAttr;
|
|
24
|
+
/**
|
|
25
|
+
* Map from discriminating attribute key → unique-owner core type. Each
|
|
26
|
+
* key here appears in exactly one concrete type's attribute list per
|
|
27
|
+
* §1.6, so its presence is sufficient to infer that type.
|
|
28
|
+
*/
|
|
29
|
+
const DISCRIMINATING_ATTRIBUTES = new Map([
|
|
30
|
+
// Test
|
|
31
|
+
["Verifies", "Test"],
|
|
32
|
+
["Tests", "Test"],
|
|
33
|
+
// Contract
|
|
34
|
+
["Schema-language", "Contract"],
|
|
35
|
+
// Record
|
|
36
|
+
["Affects", "Record"],
|
|
37
|
+
// Risk
|
|
38
|
+
["Mitigated-by", "Risk"],
|
|
39
|
+
// SoftwareComponent
|
|
40
|
+
["License", "SoftwareComponent"],
|
|
41
|
+
["Build-manifest", "SoftwareComponent"],
|
|
42
|
+
["Package-manager", "SoftwareComponent"],
|
|
43
|
+
// HardwareInterface
|
|
44
|
+
["Bus-protocol", "HardwareInterface"],
|
|
45
|
+
["Connector-type", "HardwareInterface"],
|
|
46
|
+
["Voltage-level", "HardwareInterface"],
|
|
47
|
+
["Signal-direction", "HardwareInterface"],
|
|
48
|
+
// SoftwareUnit
|
|
49
|
+
["Source", "SoftwareUnit"],
|
|
50
|
+
["Symbol", "SoftwareUnit"],
|
|
51
|
+
["Language", "SoftwareUnit"],
|
|
52
|
+
// HardwareUnit
|
|
53
|
+
["Footprint", "HardwareUnit"],
|
|
54
|
+
["Value", "HardwareUnit"],
|
|
55
|
+
// Definition
|
|
56
|
+
["Aliases", "Definition"],
|
|
57
|
+
["See-also", "Definition"],
|
|
58
|
+
]);
|
|
59
|
+
/**
|
|
60
|
+
* Infer a core type from the first discriminating attribute key present
|
|
61
|
+
* on the entry. `attributeKeys` is the source-order list of attribute
|
|
62
|
+
* keys (TitleCase-Hyphenated form, as parsed). Returns `undefined` when
|
|
63
|
+
* no discriminating key is found.
|
|
64
|
+
*
|
|
65
|
+
* Source order matters: if an entry mistakenly carries discriminators
|
|
66
|
+
* for two different types (e.g., `Verifies:` and `Schema-language:`),
|
|
67
|
+
* the first one in source order wins for step-6 purposes. The MSL-T022
|
|
68
|
+
* pass then flags the second one as incompatible.
|
|
69
|
+
*/
|
|
70
|
+
function inferTypeFromDiscriminatingAttr(attributeKeys) {
|
|
71
|
+
for (const key of attributeKeys) {
|
|
72
|
+
const type = DISCRIMINATING_ATTRIBUTES.get(key);
|
|
73
|
+
if (type !== undefined)
|
|
74
|
+
return type;
|
|
75
|
+
}
|
|
76
|
+
return undefined;
|
|
77
|
+
}
|
package/script/model/mod.d.ts
CHANGED
|
@@ -3,8 +3,16 @@
|
|
|
3
3
|
*
|
|
4
4
|
* MarkSpec document model — AST types, ID types, and project configuration.
|
|
5
5
|
*/
|
|
6
|
+
import type { BodyBlock } from "../ast/nodes.js";
|
|
6
7
|
export { ATTRIBUTE_CATALOG, attributeSpec, UNIVERSAL_ATTRIBUTE_KEYS, } from "./attributes.js";
|
|
7
8
|
export type { AttributeSpec } from "./attributes.js";
|
|
9
|
+
export { COLOR_NAME_RE, PALETTE_HUES } from "./palette.js";
|
|
10
|
+
export type { PaletteHue } from "./palette.js";
|
|
11
|
+
export { attributesForType, CORE_TYPE_HIERARCHY, CORE_TYPE_SCOPED_ATTRS, } from "./type_hierarchy.js";
|
|
12
|
+
export type { CoreTypeDef } from "./type_hierarchy.js";
|
|
13
|
+
export { inferTypeFromUriScheme } from "./uri_scheme_map.js";
|
|
14
|
+
export { inferTypeFromSource } from "./source_introspection.js";
|
|
15
|
+
export { inferTypeFromDiscriminatingAttr } from "./discriminating_attr.js";
|
|
8
16
|
/**
|
|
9
17
|
* Human-readable entry identifier from the `[...]` bracket marker.
|
|
10
18
|
*
|
|
@@ -33,6 +41,28 @@ export interface SourceLocation {
|
|
|
33
41
|
/** 1-based column number of the entry start. */
|
|
34
42
|
readonly column: number;
|
|
35
43
|
}
|
|
44
|
+
/**
|
|
45
|
+
* Core abstract item types. Always valid as `Type:` values regardless of
|
|
46
|
+
* which profile is loaded (core-only mode included). Convention: TitleCase.
|
|
47
|
+
*
|
|
48
|
+
* - `Item` is the abstract root and serves as the bottom fallback in the
|
|
49
|
+
* type-resolution chain (§1.3.1 step 8).
|
|
50
|
+
* - `Specification`, `Component`, `Unit` are abstract+concrete parents:
|
|
51
|
+
* instantiable as direct fallbacks when no concrete subtype fits, and
|
|
52
|
+
* roots for both core concrete subtypes and profile-declared extensions.
|
|
53
|
+
*/
|
|
54
|
+
export declare const CORE_ABSTRACT_TYPES: readonly ["Item", "Specification", "Component", "Unit"];
|
|
55
|
+
/**
|
|
56
|
+
* Core concrete item types (ADR-003 §Part 1). Twelve subtypes plus three
|
|
57
|
+
* abstract+concrete parents from {@linkcode CORE_ABSTRACT_TYPES} make up
|
|
58
|
+
* the "15 concrete instantiable types" the spec describes.
|
|
59
|
+
*/
|
|
60
|
+
export declare const CORE_CONCRETE_TYPES: readonly ["Requirement", "Test", "Contract", "Record", "Risk", "SoftwareComponent", "HardwareComponent", "SoftwareInterface", "HardwareInterface", "SoftwareUnit", "HardwareUnit", "Definition"];
|
|
61
|
+
/**
|
|
62
|
+
* All core type names. Accepted as `Type:` values in core-only mode and
|
|
63
|
+
* when any profile is loaded. Profile-declared types extend this set.
|
|
64
|
+
*/
|
|
65
|
+
export declare const CORE_TYPES: ReadonlySet<string>;
|
|
36
66
|
/** A single `Key: Value` pair from an attribute block. */
|
|
37
67
|
export interface Attribute {
|
|
38
68
|
/** Attribute name (e.g., `Id`, `Satisfies`, `Labels`). */
|
|
@@ -71,7 +101,7 @@ export type EntrySource = "markdown" | "doc-comment";
|
|
|
71
101
|
* (`requirement`, `test`, `unit`, `standard`, `dependency`, …) are declared
|
|
72
102
|
* by the active profile, not by the core.
|
|
73
103
|
*/
|
|
74
|
-
export type EntryShape = "
|
|
104
|
+
export type EntryShape = "Authored" | "Reference";
|
|
75
105
|
/** Core-reserved identity attribute name. */
|
|
76
106
|
export declare const IDENTITY_KEY: "Id";
|
|
77
107
|
/** Regex matching a bare ULID (identified-entry `Id:` value). */
|
|
@@ -128,6 +158,8 @@ export interface EntryProperties {
|
|
|
128
158
|
readonly path: string;
|
|
129
159
|
readonly line?: number;
|
|
130
160
|
readonly column?: number;
|
|
161
|
+
/** ISO 8601 last-modified timestamp from the filesystem. */
|
|
162
|
+
readonly mtime?: string;
|
|
131
163
|
};
|
|
132
164
|
/** Version-control observations. */
|
|
133
165
|
readonly git?: {
|
|
@@ -179,6 +211,8 @@ export interface Entry {
|
|
|
179
211
|
readonly title: string;
|
|
180
212
|
/** Body content (paragraphs, alerts, code blocks) between title and attributes. */
|
|
181
213
|
readonly body: string;
|
|
214
|
+
/** Canonical body AST (PR 2: additive, not yet consumed). */
|
|
215
|
+
readonly bodyAst?: readonly BodyBlock[];
|
|
182
216
|
/**
|
|
183
217
|
* Source-order raw attribute array. Used by the formatter for round-trip
|
|
184
218
|
* fidelity (preserving key casing, line order, and trailing backslashes).
|
|
@@ -208,7 +242,7 @@ export interface Entry {
|
|
|
208
242
|
* matches (e.g., free-form display ID with no `type:` attribute).
|
|
209
243
|
*/
|
|
210
244
|
readonly type?: string;
|
|
211
|
-
/** Entry shape — `
|
|
245
|
+
/** Entry shape — `Authored` or `Reference`. */
|
|
212
246
|
readonly shape: EntryShape;
|
|
213
247
|
/** Where the entry was found. */
|
|
214
248
|
readonly location: SourceLocation;
|
|
@@ -219,6 +253,12 @@ export interface Entry {
|
|
|
219
253
|
* source-adapter provenance).
|
|
220
254
|
*/
|
|
221
255
|
readonly properties?: EntryProperties;
|
|
256
|
+
/**
|
|
257
|
+
* Inline `$Identifier` entity references discovered in the entry body
|
|
258
|
+
* prose (spec §2.5.2). Empty when the body contains no references.
|
|
259
|
+
* Resolution into the project's entity registry happens downstream.
|
|
260
|
+
*/
|
|
261
|
+
readonly entityRefs?: readonly EntityRef[];
|
|
222
262
|
}
|
|
223
263
|
/** Severity level for diagnostics. */
|
|
224
264
|
export type Severity = "error" | "warning" | "info";
|
|
@@ -235,6 +275,29 @@ export interface Diagnostic {
|
|
|
235
275
|
}
|
|
236
276
|
/** Default RefHub URL used as implicit fallback for parent registries. */
|
|
237
277
|
export declare const REFHUB_URL = "https://driftsys.github.io/refhub";
|
|
278
|
+
/**
|
|
279
|
+
* Caption-position convention for a specific caption keyword.
|
|
280
|
+
* `"above"` — caption must appear above its block.
|
|
281
|
+
* `"below"` — caption must appear below its block.
|
|
282
|
+
*/
|
|
283
|
+
export type CaptionPosition = "above" | "below";
|
|
284
|
+
/**
|
|
285
|
+
* Per-keyword caption-position conventions.
|
|
286
|
+
*
|
|
287
|
+
* Keys are caption keywords (e.g. `"Figure"`, `"Table"`, `"Listing"`,
|
|
288
|
+
* `"Feature"`, `"Equation"`, `"List"`). A missing key means no
|
|
289
|
+
* convention is configured for that keyword — MSL-C072 is inactive for
|
|
290
|
+
* unconfigured keywords.
|
|
291
|
+
*
|
|
292
|
+
* Authored in `project.yaml` under `caption-conventions:`:
|
|
293
|
+
*
|
|
294
|
+
* ```yaml
|
|
295
|
+
* caption-conventions:
|
|
296
|
+
* Figure: below
|
|
297
|
+
* Table: above
|
|
298
|
+
* ```
|
|
299
|
+
*/
|
|
300
|
+
export type CaptionConventions = Readonly<Partial<Record<string, CaptionPosition>>>;
|
|
238
301
|
/** MarkSpec project configuration from `project.yaml`. */
|
|
239
302
|
export interface ProjectConfig {
|
|
240
303
|
/** Project name (e.g., `io.driftsys.markspec`). */
|
|
@@ -247,6 +310,13 @@ export interface ProjectConfig {
|
|
|
247
310
|
readonly parents: readonly string[];
|
|
248
311
|
/** Fallback registry URL when parents don't resolve a reference. */
|
|
249
312
|
readonly parentFallback: string;
|
|
313
|
+
/**
|
|
314
|
+
* Per-keyword caption-position conventions (spec §4.7 MSL-C072).
|
|
315
|
+
* When a key is present, the validator emits MSL-C072 if a caption
|
|
316
|
+
* of that keyword appears on the wrong side of its block. An empty
|
|
317
|
+
* or absent map means all keywords are unconstrained.
|
|
318
|
+
*/
|
|
319
|
+
readonly captionConventions: CaptionConventions;
|
|
250
320
|
}
|
|
251
321
|
/** Default configuration used when no `project.yaml` is found. */
|
|
252
322
|
export declare const DEFAULT_PROJECT_CONFIG: ProjectConfig;
|
|
@@ -292,6 +362,31 @@ export interface InlineRef {
|
|
|
292
362
|
readonly refId: string;
|
|
293
363
|
readonly location: SourceLocation;
|
|
294
364
|
}
|
|
365
|
+
/**
|
|
366
|
+
* Case convention of a `$Identifier` token (spec §2.5.2). The convention
|
|
367
|
+
* determines which entity domain the reference resolves into.
|
|
368
|
+
*/
|
|
369
|
+
export type EntityRefConvention = "type" | "instance" | "constant";
|
|
370
|
+
/**
|
|
371
|
+
* An inline `$Identifier` token found in entry body prose (spec §2.5.2).
|
|
372
|
+
*
|
|
373
|
+
* `ident` carries the leading `$`. `convention` is derived from the
|
|
374
|
+
* identifier's case shape:
|
|
375
|
+
*
|
|
376
|
+
* - `type` — PascalCase (`$BrakeController`).
|
|
377
|
+
* - `instance` — camelCase (`$rawPressure`).
|
|
378
|
+
* - `constant` — SCREAMING_SNAKE (`$DEBOUNCE_WINDOW`). Requires at
|
|
379
|
+
* least one underscore or digit to distinguish from a single-segment
|
|
380
|
+
* PascalCase identifier like `$ASIL`.
|
|
381
|
+
*
|
|
382
|
+
* Resolution to an entity in the project's RIDL types / code symbols /
|
|
383
|
+
* constants registry is performed by the validator's marker pass.
|
|
384
|
+
*/
|
|
385
|
+
export interface EntityRef {
|
|
386
|
+
readonly ident: string;
|
|
387
|
+
readonly convention: EntityRefConvention;
|
|
388
|
+
readonly location: SourceLocation;
|
|
389
|
+
}
|
|
295
390
|
/**
|
|
296
391
|
* Kind of directional link between entries — relation name lifted from the
|
|
297
392
|
* source attribute.
|
|
@@ -308,6 +403,8 @@ export interface Link {
|
|
|
308
403
|
readonly to: DisplayId;
|
|
309
404
|
readonly kind: LinkKind;
|
|
310
405
|
readonly location: SourceLocation;
|
|
406
|
+
/** How this link was produced. Absent means authored (default). */
|
|
407
|
+
readonly origin?: "authored" | "generated";
|
|
311
408
|
}
|
|
312
409
|
/**
|
|
313
410
|
* Document-level attributes authored in YAML front matter.
|
|
@@ -376,6 +473,6 @@ export interface Document {
|
|
|
376
473
|
/** Observed document properties. */
|
|
377
474
|
readonly properties: DocumentProperties;
|
|
378
475
|
}
|
|
379
|
-
export type { AttrDecl, Cardinality, DocTypeDef, EffectiveProfile,
|
|
476
|
+
export type { AttrDecl, Cardinality, DocTypeDef, EffectiveProfile, EffectiveTypeDef, EnforcementMode, InverseDecl, LabelConcern, LabelConcernKind, LabelValue, LoadedProfile, ProfileChain, ProfileConvention, ProfileId, ProfileManifest, ProfileSpecifier, ProvenancedMap, ProvenancedMapEntry, ProvenancedValue, TargetMatcher, TraceRule, TypeDef, ValueType, } from "./profile.js";
|
|
380
477
|
export { LIST_VALUE_TYPES, VALUE_TYPES } from "./profile.js";
|
|
381
478
|
//# sourceMappingURL=mod.d.ts.map
|