@driftsys/markspec 0.6.1 → 0.6.2
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/lint/mod.d.ts +2 -0
- package/esm/lint/mod.d.ts.map +1 -1
- package/esm/lint/mod.js +1 -0
- package/esm/lint/rules/xref.d.ts +32 -5
- package/esm/lint/rules/xref.d.ts.map +1 -1
- package/esm/lint/rules/xref.js +40 -0
- package/esm/lint/runner.d.ts.map +1 -1
- package/esm/lint/runner.js +6 -2
- package/esm/lint/score_text.d.ts +67 -0
- package/esm/lint/score_text.d.ts.map +1 -0
- package/esm/lint/score_text.js +74 -0
- package/esm/lock/compare.d.ts +34 -0
- package/esm/lock/compare.d.ts.map +1 -0
- package/esm/lock/compare.js +64 -0
- package/esm/lock/mod.d.ts +2 -1
- package/esm/lock/mod.d.ts.map +1 -1
- package/esm/lock/mod.js +1 -0
- package/esm/lock/model.d.ts +13 -0
- package/esm/lock/model.d.ts.map +1 -1
- package/esm/lock/parser.d.ts +3 -0
- package/esm/lock/parser.d.ts.map +1 -1
- package/esm/lock/parser.js +37 -1
- package/esm/lock/serializer.d.ts.map +1 -1
- package/esm/lock/serializer.js +4 -0
- package/esm/mod.d.ts +7 -3
- package/esm/mod.d.ts.map +1 -1
- package/esm/mod.js +6 -2
- package/esm/profile/display_id.d.ts +60 -0
- package/esm/profile/display_id.d.ts.map +1 -0
- package/esm/profile/display_id.js +80 -0
- package/esm/profile/mod.d.ts +3 -0
- package/esm/profile/mod.d.ts.map +1 -1
- package/esm/profile/mod.js +2 -0
- package/esm/profile/trace_targets.d.ts +43 -0
- package/esm/profile/trace_targets.d.ts.map +1 -0
- package/esm/profile/trace_targets.js +74 -0
- package/esm/self_upgrade/compare.d.ts +19 -0
- package/esm/self_upgrade/compare.d.ts.map +1 -0
- package/esm/self_upgrade/compare.js +35 -0
- package/esm/self_upgrade/manifest.d.ts +21 -0
- package/esm/self_upgrade/manifest.d.ts.map +1 -0
- package/esm/self_upgrade/manifest.js +27 -0
- package/esm/self_upgrade/mod.d.ts +12 -0
- package/esm/self_upgrade/mod.d.ts.map +1 -0
- package/esm/self_upgrade/mod.js +11 -0
- package/esm/self_upgrade/pm_detect.d.ts +27 -0
- package/esm/self_upgrade/pm_detect.d.ts.map +1 -0
- package/esm/self_upgrade/pm_detect.js +55 -0
- package/esm/self_upgrade/target.d.ts +25 -0
- package/esm/self_upgrade/target.d.ts.map +1 -0
- package/esm/self_upgrade/target.js +34 -0
- package/package.json +1 -1
- package/script/lint/mod.d.ts +2 -0
- package/script/lint/mod.d.ts.map +1 -1
- package/script/lint/mod.js +3 -1
- package/script/lint/rules/xref.d.ts +32 -5
- package/script/lint/rules/xref.d.ts.map +1 -1
- package/script/lint/rules/xref.js +42 -0
- package/script/lint/runner.d.ts.map +1 -1
- package/script/lint/runner.js +5 -1
- package/script/lint/score_text.d.ts +67 -0
- package/script/lint/score_text.d.ts.map +1 -0
- package/script/lint/score_text.js +77 -0
- package/script/lock/compare.d.ts +34 -0
- package/script/lock/compare.d.ts.map +1 -0
- package/script/lock/compare.js +67 -0
- package/script/lock/mod.d.ts +2 -1
- package/script/lock/mod.d.ts.map +1 -1
- package/script/lock/mod.js +3 -1
- package/script/lock/model.d.ts +13 -0
- package/script/lock/model.d.ts.map +1 -1
- package/script/lock/parser.d.ts +3 -0
- package/script/lock/parser.d.ts.map +1 -1
- package/script/lock/parser.js +37 -1
- package/script/lock/serializer.d.ts.map +1 -1
- package/script/lock/serializer.js +4 -0
- package/script/mod.d.ts +7 -3
- package/script/mod.d.ts.map +1 -1
- package/script/mod.js +82 -63
- package/script/profile/display_id.d.ts +60 -0
- package/script/profile/display_id.d.ts.map +1 -0
- package/script/profile/display_id.js +86 -0
- package/script/profile/mod.d.ts +3 -0
- package/script/profile/mod.d.ts.map +1 -1
- package/script/profile/mod.js +10 -1
- package/script/profile/trace_targets.d.ts +43 -0
- package/script/profile/trace_targets.d.ts.map +1 -0
- package/script/profile/trace_targets.js +79 -0
- package/script/self_upgrade/compare.d.ts +19 -0
- package/script/self_upgrade/compare.d.ts.map +1 -0
- package/script/self_upgrade/compare.js +38 -0
- package/script/self_upgrade/manifest.d.ts +21 -0
- package/script/self_upgrade/manifest.d.ts.map +1 -0
- package/script/self_upgrade/manifest.js +31 -0
- package/script/self_upgrade/mod.d.ts +12 -0
- package/script/self_upgrade/mod.d.ts.map +1 -0
- package/script/self_upgrade/mod.js +20 -0
- package/script/self_upgrade/pm_detect.d.ts +27 -0
- package/script/self_upgrade/pm_detect.d.ts.map +1 -0
- package/script/self_upgrade/pm_detect.js +58 -0
- package/script/self_upgrade/target.d.ts +25 -0
- package/script/self_upgrade/target.d.ts.map +1 -0
- package/script/self_upgrade/target.js +38 -0
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;AAC/B,eAAO,MAAM,mBAAmB,IAAI,CAAC;AAGrC,OAAO,EACL,WAAW,EACX,wBAAwB,EACxB,UAAU,EACV,sBAAsB,EACtB,gBAAgB,EAChB,aAAa,EACb,QAAQ,EACR,gBAAgB,EAChB,YAAY,EACZ,UAAU,GACX,MAAM,gBAAgB,CAAC;AACxB,YAAY,EACV,SAAS,EACT,SAAS,EACT,aAAa,EACb,OAAO,EACP,kBAAkB,EAClB,eAAe,EACf,gBAAgB,EAChB,UAAU,EACV,SAAS,EACT,UAAU,EACV,kBAAkB,EAClB,SAAS,EACT,WAAW,EACX,gBAAgB,EAChB,gBAAgB,EAChB,mBAAmB,EACnB,KAAK,EACL,UAAU,EACV,WAAW,EACX,aAAa,EACb,SAAS,EACT,QAAQ,EACR,YAAY,EACZ,gBAAgB,EAChB,UAAU,EACV,IAAI,EACJ,QAAQ,EACR,aAAa,EACb,SAAS,EACT,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ACvB,QAAQ,EACR,eAAe,EACf,iBAAiB,EACjB,gBAAgB,GACjB,MAAM,eAAe,CAAC;AAGvB,OAAO,EACL,sBAAsB,EACtB,aAAa,EACb,qBAAqB,EACrB,YAAY,EACZ,YAAY,EACZ,gBAAgB,GACjB,MAAM,eAAe,CAAC;AACvB,YAAY,EACV,gBAAgB,EAChB,gBAAgB,EAChB,cAAc,EACd,SAAS,IAAI,aAAa,EAC1B,OAAO,EACP,kBAAkB,EAClB,WAAW,EACX,YAAY,GACb,MAAM,eAAe,CAAC"}
|
|
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;AAC/B,eAAO,MAAM,mBAAmB,IAAI,CAAC;AAGrC,OAAO,EACL,WAAW,EACX,wBAAwB,EACxB,UAAU,EACV,sBAAsB,EACtB,gBAAgB,EAChB,aAAa,EACb,QAAQ,EACR,gBAAgB,EAChB,YAAY,EACZ,UAAU,GACX,MAAM,gBAAgB,CAAC;AACxB,YAAY,EACV,SAAS,EACT,SAAS,EACT,aAAa,EACb,OAAO,EACP,kBAAkB,EAClB,eAAe,EACf,gBAAgB,EAChB,UAAU,EACV,SAAS,EACT,UAAU,EACV,kBAAkB,EAClB,SAAS,EACT,WAAW,EACX,gBAAgB,EAChB,gBAAgB,EAChB,mBAAmB,EACnB,KAAK,EACL,UAAU,EACV,WAAW,EACX,aAAa,EACb,SAAS,EACT,QAAQ,EACR,YAAY,EACZ,gBAAgB,EAChB,UAAU,EACV,IAAI,EACJ,QAAQ,EACR,aAAa,EACb,SAAS,EACT,UAAU,EACV,YAAY,EACZ,iBAAiB,EACjB,aAAa,EACb,cAAc,EACd,mBAAmB,EACnB,gBAAgB,EAChB,QAAQ,EACR,cAAc,EACd,IAAI,GACL,MAAM,gBAAgB,CAAC;AAIxB,OAAO,EAAE,aAAa,EAAE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EACxB,kBAAkB,EAClB,eAAe,EACf,iBAAiB,EACjB,gBAAgB,EAChB,iBAAiB,EACjB,uBAAuB,EACvB,QAAQ,EACR,eAAe,EACf,iBAAiB,EACjB,gBAAgB,GACjB,MAAM,eAAe,CAAC;AAGvB,OAAO,EACL,sBAAsB,EACtB,aAAa,EACb,qBAAqB,EACrB,YAAY,EACZ,YAAY,EACZ,gBAAgB,GACjB,MAAM,eAAe,CAAC;AACvB,YAAY,EACV,gBAAgB,EAChB,gBAAgB,EAChB,cAAc,EACd,SAAS,IAAI,aAAa,EAC1B,OAAO,EACP,kBAAkB,EAClB,WAAW,EACX,YAAY,GACb,MAAM,eAAe,CAAC;AAGvB,OAAO,EACL,KAAK,IAAI,IAAI,eAAe,EAC5B,mBAAmB,EACnB,KAAK,cAAc,IAAI,yBAAyB,EAChD,eAAe,EACf,KAAK,UAAU,EACf,YAAY,EACZ,KAAK,aAAa,EAClB,KAAK,EAAE,IAAI,aAAa,EACxB,eAAe,EACf,KAAK,QAAQ,IAAI,mBAAmB,EACpC,iBAAiB,EACjB,KAAK,aAAa,EAClB,aAAa,EACb,KAAK,MAAM,IAAI,iBAAiB,GACjC,MAAM,uBAAuB,CAAC"}
|
package/script/mod.js
CHANGED
|
@@ -33,8 +33,9 @@ var __importStar = (this && this.__importStar) || (function () {
|
|
|
33
33
|
};
|
|
34
34
|
})();
|
|
35
35
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
36
|
-
exports.
|
|
37
|
-
exports.
|
|
36
|
+
exports.loadGrammar = exports.isSupportedExtension = exports.detectInlineRefs = exports.detectDirectives = exports.detectCaptions = exports.buildProfileIntrospection = exports.targetsForRelation = exports.filterEntriesByTraceTargets = exports.entryMatchesTargets = exports.parseDisplayIdPattern = exports.padDisplayIdNumber = exports.highestDisplayIdNumber = exports.formatDisplayId = exports.resolveDisciplineMode = exports.inferDisciplineMode = exports.buildEffectiveDisciplineRegistry = 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.MIXED_DISCIPLINE = exports.makeUlid = exports.makeDisplayId = exports.KNOWN_LINK_KINDS = exports.DEFAULT_PROJECT_CONFIG = exports.CORE_KINDS = exports.CORE_DISCIPLINE_REGISTRY = exports.ConfigError = exports.CORE_SCHEMA_VERSION = exports.VERSION = void 0;
|
|
37
|
+
exports.parseLogLine = exports.inferLockedAttributes = exports.encodeLogLine = exports.aggregateStatusByState = exports.sha256String = exports.sha256Bytes = exports.serializeLockfile = exports.resolveUpstreams = exports.resolveRegistries = exports.resolveReferences = exports.resolveProfileChain = exports.resolveBoundEntries = exports.parseLockfile = exports.LOCKFILE_SCHEMA_VERSION = exports.isBelowFloor = exports.hashCanonicalEdges = exports.extractEdgeQuads = exports.checkDrift = exports.canonicalEdgeJson = exports.typl = exports.runLint = exports.isProseScope = exports.computeScoreRollup = exports.ANTI_PATTERN_NOTE = exports.report = exports.indexToJson = exports.buildEntriesNdjson = exports.buildEdgesNdjson = exports.buildManifest = exports.serializeCompileResult = exports.generateInverses = exports.compile = exports.validateValue = exports.validateTraceabilityForEntry = exports.validateListingDocuments = exports.validateAttributesForEntry = exports.validate = exports.suppressDeclaredAttrR010 = exports.runPipeline = exports.normalizeListValues = exports.matchesAnyTarget = exports.effectiveTraceRules = exports.effectiveScope = exports.compileDisplayIdPattern = exports.classifyEntry = exports.classifyEntriesStage = exports.format = exports.parseSource = exports.parseFile = exports.parse = void 0;
|
|
38
|
+
exports.releaseAssets = exports.platformFromBuild = exports.parseSha256Line = exports.detectTarget = exports.compareVersions = exports.classifyInstallPath = exports.validateMappings = exports.parseMapping = void 0;
|
|
38
39
|
/**
|
|
39
40
|
* @module core
|
|
40
41
|
*
|
|
@@ -45,7 +46,7 @@ exports.validateMappings = exports.parseMapping = exports.parseLogLine = exports
|
|
|
45
46
|
* from core/mod.ts, never from internal paths.
|
|
46
47
|
*/
|
|
47
48
|
require("./_dnt.polyfills.js");
|
|
48
|
-
exports.VERSION = "0.6.
|
|
49
|
+
exports.VERSION = "0.6.2";
|
|
49
50
|
exports.CORE_SCHEMA_VERSION = 1;
|
|
50
51
|
// Model types
|
|
51
52
|
var mod_js_1 = require("./model/mod.js");
|
|
@@ -98,41 +99,50 @@ Object.defineProperty(exports, "inferDisciplineMode", { enumerable: true, get: f
|
|
|
98
99
|
Object.defineProperty(exports, "resolveDisciplineMode", { enumerable: true, get: function () { return mod_js_5.resolveDisciplineMode; } });
|
|
99
100
|
// DisciplineMode type already re-exported via Task 2.
|
|
100
101
|
var mod_js_6 = require("./profile/mod.js");
|
|
101
|
-
Object.defineProperty(exports, "
|
|
102
|
+
Object.defineProperty(exports, "formatDisplayId", { enumerable: true, get: function () { return mod_js_6.formatDisplayId; } });
|
|
103
|
+
Object.defineProperty(exports, "highestDisplayIdNumber", { enumerable: true, get: function () { return mod_js_6.highestDisplayIdNumber; } });
|
|
104
|
+
Object.defineProperty(exports, "padDisplayIdNumber", { enumerable: true, get: function () { return mod_js_6.padDisplayIdNumber; } });
|
|
105
|
+
Object.defineProperty(exports, "parseDisplayIdPattern", { enumerable: true, get: function () { return mod_js_6.parseDisplayIdPattern; } });
|
|
106
|
+
var mod_js_7 = require("./profile/mod.js");
|
|
107
|
+
Object.defineProperty(exports, "entryMatchesTargets", { enumerable: true, get: function () { return mod_js_7.entryMatchesTargets; } });
|
|
108
|
+
Object.defineProperty(exports, "filterEntriesByTraceTargets", { enumerable: true, get: function () { return mod_js_7.filterEntriesByTraceTargets; } });
|
|
109
|
+
Object.defineProperty(exports, "targetsForRelation", { enumerable: true, get: function () { return mod_js_7.targetsForRelation; } });
|
|
110
|
+
var mod_js_8 = require("./profile/mod.js");
|
|
111
|
+
Object.defineProperty(exports, "buildProfileIntrospection", { enumerable: true, get: function () { return mod_js_8.buildProfileIntrospection; } });
|
|
102
112
|
// Parser
|
|
103
|
-
var
|
|
104
|
-
Object.defineProperty(exports, "detectCaptions", { enumerable: true, get: function () { return
|
|
105
|
-
Object.defineProperty(exports, "detectDirectives", { enumerable: true, get: function () { return
|
|
106
|
-
Object.defineProperty(exports, "detectInlineRefs", { enumerable: true, get: function () { return
|
|
107
|
-
Object.defineProperty(exports, "isSupportedExtension", { enumerable: true, get: function () { return
|
|
108
|
-
Object.defineProperty(exports, "loadGrammar", { enumerable: true, get: function () { return
|
|
109
|
-
Object.defineProperty(exports, "parse", { enumerable: true, get: function () { return
|
|
110
|
-
Object.defineProperty(exports, "parseFile", { enumerable: true, get: function () { return
|
|
111
|
-
Object.defineProperty(exports, "parseSource", { enumerable: true, get: function () { return
|
|
113
|
+
var mod_js_9 = require("./parser/mod.js");
|
|
114
|
+
Object.defineProperty(exports, "detectCaptions", { enumerable: true, get: function () { return mod_js_9.detectCaptions; } });
|
|
115
|
+
Object.defineProperty(exports, "detectDirectives", { enumerable: true, get: function () { return mod_js_9.detectDirectives; } });
|
|
116
|
+
Object.defineProperty(exports, "detectInlineRefs", { enumerable: true, get: function () { return mod_js_9.detectInlineRefs; } });
|
|
117
|
+
Object.defineProperty(exports, "isSupportedExtension", { enumerable: true, get: function () { return mod_js_9.isSupportedExtension; } });
|
|
118
|
+
Object.defineProperty(exports, "loadGrammar", { enumerable: true, get: function () { return mod_js_9.loadGrammar; } });
|
|
119
|
+
Object.defineProperty(exports, "parse", { enumerable: true, get: function () { return mod_js_9.parse; } });
|
|
120
|
+
Object.defineProperty(exports, "parseFile", { enumerable: true, get: function () { return mod_js_9.parseFile; } });
|
|
121
|
+
Object.defineProperty(exports, "parseSource", { enumerable: true, get: function () { return mod_js_9.parseSource; } });
|
|
112
122
|
// Formatter
|
|
113
|
-
var
|
|
114
|
-
Object.defineProperty(exports, "format", { enumerable: true, get: function () { return
|
|
123
|
+
var mod_js_10 = require("./formatter/mod.js");
|
|
124
|
+
Object.defineProperty(exports, "format", { enumerable: true, get: function () { return mod_js_10.format; } });
|
|
115
125
|
// Validator
|
|
116
|
-
var
|
|
117
|
-
Object.defineProperty(exports, "classifyEntriesStage", { enumerable: true, get: function () { return
|
|
118
|
-
Object.defineProperty(exports, "classifyEntry", { enumerable: true, get: function () { return
|
|
119
|
-
Object.defineProperty(exports, "compileDisplayIdPattern", { enumerable: true, get: function () { return
|
|
120
|
-
Object.defineProperty(exports, "effectiveScope", { enumerable: true, get: function () { return
|
|
121
|
-
Object.defineProperty(exports, "effectiveTraceRules", { enumerable: true, get: function () { return
|
|
122
|
-
Object.defineProperty(exports, "matchesAnyTarget", { enumerable: true, get: function () { return
|
|
123
|
-
Object.defineProperty(exports, "normalizeListValues", { enumerable: true, get: function () { return
|
|
124
|
-
Object.defineProperty(exports, "runPipeline", { enumerable: true, get: function () { return
|
|
125
|
-
Object.defineProperty(exports, "suppressDeclaredAttrR010", { enumerable: true, get: function () { return
|
|
126
|
-
Object.defineProperty(exports, "validate", { enumerable: true, get: function () { return
|
|
127
|
-
Object.defineProperty(exports, "validateAttributesForEntry", { enumerable: true, get: function () { return
|
|
128
|
-
Object.defineProperty(exports, "validateListingDocuments", { enumerable: true, get: function () { return
|
|
129
|
-
Object.defineProperty(exports, "validateTraceabilityForEntry", { enumerable: true, get: function () { return
|
|
130
|
-
Object.defineProperty(exports, "validateValue", { enumerable: true, get: function () { return
|
|
126
|
+
var mod_js_11 = require("./validator/mod.js");
|
|
127
|
+
Object.defineProperty(exports, "classifyEntriesStage", { enumerable: true, get: function () { return mod_js_11.classifyEntriesStage; } });
|
|
128
|
+
Object.defineProperty(exports, "classifyEntry", { enumerable: true, get: function () { return mod_js_11.classifyEntry; } });
|
|
129
|
+
Object.defineProperty(exports, "compileDisplayIdPattern", { enumerable: true, get: function () { return mod_js_11.compileDisplayIdPattern; } });
|
|
130
|
+
Object.defineProperty(exports, "effectiveScope", { enumerable: true, get: function () { return mod_js_11.effectiveScope; } });
|
|
131
|
+
Object.defineProperty(exports, "effectiveTraceRules", { enumerable: true, get: function () { return mod_js_11.effectiveTraceRules; } });
|
|
132
|
+
Object.defineProperty(exports, "matchesAnyTarget", { enumerable: true, get: function () { return mod_js_11.matchesAnyTarget; } });
|
|
133
|
+
Object.defineProperty(exports, "normalizeListValues", { enumerable: true, get: function () { return mod_js_11.normalizeListValues; } });
|
|
134
|
+
Object.defineProperty(exports, "runPipeline", { enumerable: true, get: function () { return mod_js_11.runPipeline; } });
|
|
135
|
+
Object.defineProperty(exports, "suppressDeclaredAttrR010", { enumerable: true, get: function () { return mod_js_11.suppressDeclaredAttrR010; } });
|
|
136
|
+
Object.defineProperty(exports, "validate", { enumerable: true, get: function () { return mod_js_11.validate; } });
|
|
137
|
+
Object.defineProperty(exports, "validateAttributesForEntry", { enumerable: true, get: function () { return mod_js_11.validateAttributesForEntry; } });
|
|
138
|
+
Object.defineProperty(exports, "validateListingDocuments", { enumerable: true, get: function () { return mod_js_11.validateListingDocuments; } });
|
|
139
|
+
Object.defineProperty(exports, "validateTraceabilityForEntry", { enumerable: true, get: function () { return mod_js_11.validateTraceabilityForEntry; } });
|
|
140
|
+
Object.defineProperty(exports, "validateValue", { enumerable: true, get: function () { return mod_js_11.validateValue; } });
|
|
131
141
|
// Compiler
|
|
132
|
-
var
|
|
133
|
-
Object.defineProperty(exports, "compile", { enumerable: true, get: function () { return
|
|
134
|
-
Object.defineProperty(exports, "generateInverses", { enumerable: true, get: function () { return
|
|
135
|
-
Object.defineProperty(exports, "serializeCompileResult", { enumerable: true, get: function () { return
|
|
142
|
+
var mod_js_12 = require("./compiler/mod.js");
|
|
143
|
+
Object.defineProperty(exports, "compile", { enumerable: true, get: function () { return mod_js_12.compile; } });
|
|
144
|
+
Object.defineProperty(exports, "generateInverses", { enumerable: true, get: function () { return mod_js_12.generateInverses; } });
|
|
145
|
+
Object.defineProperty(exports, "serializeCompileResult", { enumerable: true, get: function () { return mod_js_12.serializeCompileResult; } });
|
|
136
146
|
var manifest_js_1 = require("./compiler/manifest.js");
|
|
137
147
|
Object.defineProperty(exports, "buildManifest", { enumerable: true, get: function () { return manifest_js_1.buildManifest; } });
|
|
138
148
|
var ndjson_writer_js_1 = require("./compiler/ndjson_writer.js");
|
|
@@ -140,36 +150,45 @@ Object.defineProperty(exports, "buildEdgesNdjson", { enumerable: true, get: func
|
|
|
140
150
|
Object.defineProperty(exports, "buildEntriesNdjson", { enumerable: true, get: function () { return ndjson_writer_js_1.buildEntriesNdjson; } });
|
|
141
151
|
Object.defineProperty(exports, "indexToJson", { enumerable: true, get: function () { return ndjson_writer_js_1.indexToJson; } });
|
|
142
152
|
// Reporter
|
|
143
|
-
var
|
|
144
|
-
Object.defineProperty(exports, "report", { enumerable: true, get: function () { return
|
|
153
|
+
var mod_js_13 = require("./reporter/mod.js");
|
|
154
|
+
Object.defineProperty(exports, "report", { enumerable: true, get: function () { return mod_js_13.report; } });
|
|
145
155
|
// Lint (prose-analysis)
|
|
146
|
-
var
|
|
147
|
-
Object.defineProperty(exports, "ANTI_PATTERN_NOTE", { enumerable: true, get: function () { return
|
|
148
|
-
Object.defineProperty(exports, "computeScoreRollup", { enumerable: true, get: function () { return
|
|
149
|
-
Object.defineProperty(exports, "isProseScope", { enumerable: true, get: function () { return
|
|
150
|
-
Object.defineProperty(exports, "runLint", { enumerable: true, get: function () { return
|
|
156
|
+
var mod_js_14 = require("./lint/mod.js");
|
|
157
|
+
Object.defineProperty(exports, "ANTI_PATTERN_NOTE", { enumerable: true, get: function () { return mod_js_14.ANTI_PATTERN_NOTE; } });
|
|
158
|
+
Object.defineProperty(exports, "computeScoreRollup", { enumerable: true, get: function () { return mod_js_14.computeScoreRollup; } });
|
|
159
|
+
Object.defineProperty(exports, "isProseScope", { enumerable: true, get: function () { return mod_js_14.isProseScope; } });
|
|
160
|
+
Object.defineProperty(exports, "runLint", { enumerable: true, get: function () { return mod_js_14.runLint; } });
|
|
151
161
|
exports.typl = __importStar(require("./typl/mod.js"));
|
|
152
162
|
// ── Lockfile (ADR-022) ───────────────────────────────────────────────────
|
|
153
|
-
var
|
|
154
|
-
Object.defineProperty(exports, "canonicalEdgeJson", { enumerable: true, get: function () { return
|
|
155
|
-
Object.defineProperty(exports, "checkDrift", { enumerable: true, get: function () { return
|
|
156
|
-
Object.defineProperty(exports, "extractEdgeQuads", { enumerable: true, get: function () { return
|
|
157
|
-
Object.defineProperty(exports, "hashCanonicalEdges", { enumerable: true, get: function () { return
|
|
158
|
-
Object.defineProperty(exports, "
|
|
159
|
-
Object.defineProperty(exports, "
|
|
160
|
-
Object.defineProperty(exports, "
|
|
161
|
-
Object.defineProperty(exports, "
|
|
162
|
-
Object.defineProperty(exports, "
|
|
163
|
-
Object.defineProperty(exports, "
|
|
164
|
-
Object.defineProperty(exports, "
|
|
165
|
-
Object.defineProperty(exports, "
|
|
166
|
-
Object.defineProperty(exports, "
|
|
167
|
-
Object.defineProperty(exports, "
|
|
163
|
+
var mod_js_15 = require("./lock/mod.js");
|
|
164
|
+
Object.defineProperty(exports, "canonicalEdgeJson", { enumerable: true, get: function () { return mod_js_15.canonicalEdgeJson; } });
|
|
165
|
+
Object.defineProperty(exports, "checkDrift", { enumerable: true, get: function () { return mod_js_15.checkDrift; } });
|
|
166
|
+
Object.defineProperty(exports, "extractEdgeQuads", { enumerable: true, get: function () { return mod_js_15.extractEdgeQuads; } });
|
|
167
|
+
Object.defineProperty(exports, "hashCanonicalEdges", { enumerable: true, get: function () { return mod_js_15.hashCanonicalEdges; } });
|
|
168
|
+
Object.defineProperty(exports, "isBelowFloor", { enumerable: true, get: function () { return mod_js_15.isBelowFloor; } });
|
|
169
|
+
Object.defineProperty(exports, "LOCKFILE_SCHEMA_VERSION", { enumerable: true, get: function () { return mod_js_15.LOCKFILE_SCHEMA_VERSION; } });
|
|
170
|
+
Object.defineProperty(exports, "parseLockfile", { enumerable: true, get: function () { return mod_js_15.parseLockfile; } });
|
|
171
|
+
Object.defineProperty(exports, "resolveBoundEntries", { enumerable: true, get: function () { return mod_js_15.resolveBoundEntries; } });
|
|
172
|
+
Object.defineProperty(exports, "resolveProfileChain", { enumerable: true, get: function () { return mod_js_15.resolveProfileChain; } });
|
|
173
|
+
Object.defineProperty(exports, "resolveReferences", { enumerable: true, get: function () { return mod_js_15.resolveReferences; } });
|
|
174
|
+
Object.defineProperty(exports, "resolveRegistries", { enumerable: true, get: function () { return mod_js_15.resolveRegistries; } });
|
|
175
|
+
Object.defineProperty(exports, "resolveUpstreams", { enumerable: true, get: function () { return mod_js_15.resolveUpstreams; } });
|
|
176
|
+
Object.defineProperty(exports, "serializeLockfile", { enumerable: true, get: function () { return mod_js_15.serializeLockfile; } });
|
|
177
|
+
Object.defineProperty(exports, "sha256Bytes", { enumerable: true, get: function () { return mod_js_15.sha256Bytes; } });
|
|
178
|
+
Object.defineProperty(exports, "sha256String", { enumerable: true, get: function () { return mod_js_15.sha256String; } });
|
|
168
179
|
// ── External sync model (ADR-022) ────────────────────────────────────────
|
|
169
|
-
var
|
|
170
|
-
Object.defineProperty(exports, "aggregateStatusByState", { enumerable: true, get: function () { return
|
|
171
|
-
Object.defineProperty(exports, "encodeLogLine", { enumerable: true, get: function () { return
|
|
172
|
-
Object.defineProperty(exports, "inferLockedAttributes", { enumerable: true, get: function () { return
|
|
173
|
-
Object.defineProperty(exports, "parseLogLine", { enumerable: true, get: function () { return
|
|
174
|
-
Object.defineProperty(exports, "parseMapping", { enumerable: true, get: function () { return
|
|
175
|
-
Object.defineProperty(exports, "validateMappings", { enumerable: true, get: function () { return
|
|
180
|
+
var mod_js_16 = require("./sync/mod.js");
|
|
181
|
+
Object.defineProperty(exports, "aggregateStatusByState", { enumerable: true, get: function () { return mod_js_16.aggregateStatusByState; } });
|
|
182
|
+
Object.defineProperty(exports, "encodeLogLine", { enumerable: true, get: function () { return mod_js_16.encodeLogLine; } });
|
|
183
|
+
Object.defineProperty(exports, "inferLockedAttributes", { enumerable: true, get: function () { return mod_js_16.inferLockedAttributes; } });
|
|
184
|
+
Object.defineProperty(exports, "parseLogLine", { enumerable: true, get: function () { return mod_js_16.parseLogLine; } });
|
|
185
|
+
Object.defineProperty(exports, "parseMapping", { enumerable: true, get: function () { return mod_js_16.parseMapping; } });
|
|
186
|
+
Object.defineProperty(exports, "validateMappings", { enumerable: true, get: function () { return mod_js_16.validateMappings; } });
|
|
187
|
+
// ── Self-upgrade ─────────────────────────────────────────────────────────
|
|
188
|
+
var mod_js_17 = require("./self_upgrade/mod.js");
|
|
189
|
+
Object.defineProperty(exports, "classifyInstallPath", { enumerable: true, get: function () { return mod_js_17.classifyInstallPath; } });
|
|
190
|
+
Object.defineProperty(exports, "compareVersions", { enumerable: true, get: function () { return mod_js_17.compareVersions; } });
|
|
191
|
+
Object.defineProperty(exports, "detectTarget", { enumerable: true, get: function () { return mod_js_17.detectTarget; } });
|
|
192
|
+
Object.defineProperty(exports, "parseSha256Line", { enumerable: true, get: function () { return mod_js_17.parseSha256Line; } });
|
|
193
|
+
Object.defineProperty(exports, "platformFromBuild", { enumerable: true, get: function () { return mod_js_17.platformFromBuild; } });
|
|
194
|
+
Object.defineProperty(exports, "releaseAssets", { enumerable: true, get: function () { return mod_js_17.releaseAssets; } });
|
|
@@ -0,0 +1,60 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* @module core/profile/display_id
|
|
3
|
+
*
|
|
4
|
+
* Shared parser for the `display-id-pattern` template used by profile
|
|
5
|
+
* type declarations. Patterns look like:
|
|
6
|
+
*
|
|
7
|
+
* STK_{n:4d}
|
|
8
|
+
* STK_AEB_{n:04d}
|
|
9
|
+
* REQ-{n:03d}-draft
|
|
10
|
+
*
|
|
11
|
+
* The `{n:Nd}` placeholder (with optional leading zero in the Nd
|
|
12
|
+
* form) names the sequential number slot. The text before the
|
|
13
|
+
* placeholder becomes the literal prefix; the text after becomes the
|
|
14
|
+
* literal suffix.
|
|
15
|
+
*
|
|
16
|
+
* Note: the `{scope}` placeholder documented in the profile schema
|
|
17
|
+
* is NOT substituted here — callers handle that separately. For
|
|
18
|
+
* patterns containing `{scope}`, the literal text `{scope}` ends up
|
|
19
|
+
* in `prefix` (or `suffix`) and must be replaced upstream before the
|
|
20
|
+
* pattern is fed to scaffolding.
|
|
21
|
+
*/
|
|
22
|
+
/** Width-and-position decomposition of a display-id-pattern. */
|
|
23
|
+
export interface DisplayIdPatternShape {
|
|
24
|
+
/** Literal text before the `{n:Nd}` placeholder. */
|
|
25
|
+
readonly prefix: string;
|
|
26
|
+
/** Width of the zero-padded numeric segment. */
|
|
27
|
+
readonly width: number;
|
|
28
|
+
/** Literal text after the `{n:Nd}` placeholder (often empty). */
|
|
29
|
+
readonly suffix: string;
|
|
30
|
+
}
|
|
31
|
+
/**
|
|
32
|
+
* Parse a `display-id-pattern` template. Returns `undefined` when
|
|
33
|
+
* the pattern does not contain a recognised `{n:Nd}` placeholder so
|
|
34
|
+
* callers can decide how to surface the error (CLI exits, LSP
|
|
35
|
+
* silently skips the type).
|
|
36
|
+
*/
|
|
37
|
+
export declare function parseDisplayIdPattern(pattern: string): DisplayIdPatternShape | undefined;
|
|
38
|
+
/**
|
|
39
|
+
* Pad a positive integer with leading zeros to at least `width`
|
|
40
|
+
* characters. Numbers longer than `width` are left unchanged — the
|
|
41
|
+
* pattern's width is a minimum, not a maximum, mirroring printf
|
|
42
|
+
* `%0Nd` semantics.
|
|
43
|
+
*/
|
|
44
|
+
export declare function padDisplayIdNumber(n: number, width: number): string;
|
|
45
|
+
/**
|
|
46
|
+
* Format a display ID from a parsed pattern and a numeric value.
|
|
47
|
+
* Inverse of the per-entry scan that {@linkcode highestDisplayIdNumber}
|
|
48
|
+
* performs.
|
|
49
|
+
*/
|
|
50
|
+
export declare function formatDisplayId(shape: DisplayIdPatternShape, n: number): string;
|
|
51
|
+
/**
|
|
52
|
+
* Scan `entries` for the highest numeric value used by any display
|
|
53
|
+
* ID that matches the given shape (same prefix AND same suffix; the
|
|
54
|
+
* numeric segment is parsed as a base-10 integer). Returns 0 when no
|
|
55
|
+
* matching ID exists, so `+ 1` yields the next sequential number.
|
|
56
|
+
*/
|
|
57
|
+
export declare function highestDisplayIdNumber(shape: DisplayIdPatternShape, entries: Iterable<{
|
|
58
|
+
displayId: string;
|
|
59
|
+
}>): number;
|
|
60
|
+
//# sourceMappingURL=display_id.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"display_id.d.ts","sourceRoot":"","sources":["../../src/profile/display_id.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;;;;;;;GAoBG;AAEH,gEAAgE;AAChE,MAAM,WAAW,qBAAqB;IACpC,oDAAoD;IACpD,QAAQ,CAAC,MAAM,EAAE,MAAM,CAAC;IACxB,gDAAgD;IAChD,QAAQ,CAAC,KAAK,EAAE,MAAM,CAAC;IACvB,iEAAiE;IACjE,QAAQ,CAAC,MAAM,EAAE,MAAM,CAAC;CACzB;AAKD;;;;;GAKG;AACH,wBAAgB,qBAAqB,CACnC,OAAO,EAAE,MAAM,GACd,qBAAqB,GAAG,SAAS,CAUnC;AAED;;;;;GAKG;AACH,wBAAgB,kBAAkB,CAAC,CAAC,EAAE,MAAM,EAAE,KAAK,EAAE,MAAM,GAAG,MAAM,CAEnE;AAED;;;;GAIG;AACH,wBAAgB,eAAe,CAC7B,KAAK,EAAE,qBAAqB,EAC5B,CAAC,EAAE,MAAM,GACR,MAAM,CAER;AAED;;;;;GAKG;AACH,wBAAgB,sBAAsB,CACpC,KAAK,EAAE,qBAAqB,EAC5B,OAAO,EAAE,QAAQ,CAAC;IAAE,SAAS,EAAE,MAAM,CAAA;CAAE,CAAC,GACvC,MAAM,CAcR"}
|
|
@@ -0,0 +1,86 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
/**
|
|
3
|
+
* @module core/profile/display_id
|
|
4
|
+
*
|
|
5
|
+
* Shared parser for the `display-id-pattern` template used by profile
|
|
6
|
+
* type declarations. Patterns look like:
|
|
7
|
+
*
|
|
8
|
+
* STK_{n:4d}
|
|
9
|
+
* STK_AEB_{n:04d}
|
|
10
|
+
* REQ-{n:03d}-draft
|
|
11
|
+
*
|
|
12
|
+
* The `{n:Nd}` placeholder (with optional leading zero in the Nd
|
|
13
|
+
* form) names the sequential number slot. The text before the
|
|
14
|
+
* placeholder becomes the literal prefix; the text after becomes the
|
|
15
|
+
* literal suffix.
|
|
16
|
+
*
|
|
17
|
+
* Note: the `{scope}` placeholder documented in the profile schema
|
|
18
|
+
* is NOT substituted here — callers handle that separately. For
|
|
19
|
+
* patterns containing `{scope}`, the literal text `{scope}` ends up
|
|
20
|
+
* in `prefix` (or `suffix`) and must be replaced upstream before the
|
|
21
|
+
* pattern is fed to scaffolding.
|
|
22
|
+
*/
|
|
23
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
24
|
+
exports.parseDisplayIdPattern = parseDisplayIdPattern;
|
|
25
|
+
exports.padDisplayIdNumber = padDisplayIdNumber;
|
|
26
|
+
exports.formatDisplayId = formatDisplayId;
|
|
27
|
+
exports.highestDisplayIdNumber = highestDisplayIdNumber;
|
|
28
|
+
/** Regex capturing the `{n:Nd}` placeholder; `0` and the digit count are both captured. */
|
|
29
|
+
const PLACEHOLDER_RE = /\{n:(\d+)d\}/;
|
|
30
|
+
/**
|
|
31
|
+
* Parse a `display-id-pattern` template. Returns `undefined` when
|
|
32
|
+
* the pattern does not contain a recognised `{n:Nd}` placeholder so
|
|
33
|
+
* callers can decide how to surface the error (CLI exits, LSP
|
|
34
|
+
* silently skips the type).
|
|
35
|
+
*/
|
|
36
|
+
function parseDisplayIdPattern(pattern) {
|
|
37
|
+
const match = PLACEHOLDER_RE.exec(pattern);
|
|
38
|
+
if (!match)
|
|
39
|
+
return undefined;
|
|
40
|
+
const width = parseInt(match[1], 10);
|
|
41
|
+
if (!Number.isFinite(width) || width < 1)
|
|
42
|
+
return undefined;
|
|
43
|
+
return {
|
|
44
|
+
prefix: pattern.slice(0, match.index),
|
|
45
|
+
width,
|
|
46
|
+
suffix: pattern.slice(match.index + match[0].length),
|
|
47
|
+
};
|
|
48
|
+
}
|
|
49
|
+
/**
|
|
50
|
+
* Pad a positive integer with leading zeros to at least `width`
|
|
51
|
+
* characters. Numbers longer than `width` are left unchanged — the
|
|
52
|
+
* pattern's width is a minimum, not a maximum, mirroring printf
|
|
53
|
+
* `%0Nd` semantics.
|
|
54
|
+
*/
|
|
55
|
+
function padDisplayIdNumber(n, width) {
|
|
56
|
+
return n.toString().padStart(width, "0");
|
|
57
|
+
}
|
|
58
|
+
/**
|
|
59
|
+
* Format a display ID from a parsed pattern and a numeric value.
|
|
60
|
+
* Inverse of the per-entry scan that {@linkcode highestDisplayIdNumber}
|
|
61
|
+
* performs.
|
|
62
|
+
*/
|
|
63
|
+
function formatDisplayId(shape, n) {
|
|
64
|
+
return `${shape.prefix}${padDisplayIdNumber(n, shape.width)}${shape.suffix}`;
|
|
65
|
+
}
|
|
66
|
+
/**
|
|
67
|
+
* Scan `entries` for the highest numeric value used by any display
|
|
68
|
+
* ID that matches the given shape (same prefix AND same suffix; the
|
|
69
|
+
* numeric segment is parsed as a base-10 integer). Returns 0 when no
|
|
70
|
+
* matching ID exists, so `+ 1` yields the next sequential number.
|
|
71
|
+
*/
|
|
72
|
+
function highestDisplayIdNumber(shape, entries) {
|
|
73
|
+
let max = 0;
|
|
74
|
+
for (const entry of entries) {
|
|
75
|
+
const id = entry.displayId;
|
|
76
|
+
if (!id.startsWith(shape.prefix))
|
|
77
|
+
continue;
|
|
78
|
+
if (shape.suffix && !id.endsWith(shape.suffix))
|
|
79
|
+
continue;
|
|
80
|
+
const numberPart = id.slice(shape.prefix.length, id.length - shape.suffix.length);
|
|
81
|
+
const n = parseInt(numberPart, 10);
|
|
82
|
+
if (!isNaN(n) && n > max)
|
|
83
|
+
max = n;
|
|
84
|
+
}
|
|
85
|
+
return max;
|
|
86
|
+
}
|
package/script/profile/mod.d.ts
CHANGED
|
@@ -19,6 +19,9 @@ export type { MergeResult } from "./merge.js";
|
|
|
19
19
|
export { resolveEntryColor } from "./colors.js";
|
|
20
20
|
export { buildEffectiveDisciplineRegistry } from "./discipline_registry.js";
|
|
21
21
|
export { inferDisciplineMode, resolveDisciplineMode, } from "./discipline_mode.js";
|
|
22
|
+
export { formatDisplayId, highestDisplayIdNumber, padDisplayIdNumber, parseDisplayIdPattern, } from "./display_id.js";
|
|
23
|
+
export type { DisplayIdPatternShape } from "./display_id.js";
|
|
24
|
+
export { entryMatchesTargets, filterEntriesByTraceTargets, targetsForRelation, } from "./trace_targets.js";
|
|
22
25
|
export { buildProfileIntrospection } from "./introspect.js";
|
|
23
26
|
export type { AttributeDetail, ConventionDetail, LabelConcernDetail, ProfileElementDetail, ProfileElementKind, ProfileElementRef, ProfileIntrospection, ProfileOverview, ProvenancedDescription, RelationDetail, TypeDetail, } from "./introspect.js";
|
|
24
27
|
//# sourceMappingURL=mod.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"mod.d.ts","sourceRoot":"","sources":["../../src/profile/mod.ts"],"names":[],"mappings":"AAAA;;;;;GAKG;AAEH,OAAO,EAAE,aAAa,EAAE,MAAM,eAAe,CAAC;AAC9C,YAAY,EAAE,mBAAmB,EAAE,MAAM,eAAe,CAAC;AAEzD,OAAO,EAAE,mBAAmB,EAAE,qBAAqB,EAAE,MAAM,eAAe,CAAC;AAC3E,YAAY,EAAE,qBAAqB,EAAE,iBAAiB,EAAE,MAAM,eAAe,CAAC;AAE9E,OAAO,EACL,eAAe,EACf,oBAAoB,EACpB,iBAAiB,EACjB,aAAa,EACb,qBAAqB,GACtB,MAAM,gBAAgB,CAAC;AACxB,YAAY,EACV,UAAU,EACV,aAAa,EACb,gBAAgB,EAChB,MAAM,EACN,YAAY,GACb,MAAM,gBAAgB,CAAC;AAExB,OAAO,EAAE,SAAS,EAAE,MAAM,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SAAS,EAAE,MAAM,YAAY,CAAC;AACvC,YAAY,EAAE,gBAAgB,EAAE,eAAe,EAAE,MAAM,YAAY,CAAC;AAEpE,OAAO,EAAE,qBAAqB,EAAE,MAAM,WAAW,CAAC;AAClD,YAAY,EAAE,2BAA2B,EAAE,MAAM,WAAW,CAAC;AAE7D,OAAO,EAAE,UAAU,EAAE,MAAM,YAAY,CAAC;AACxC,YAAY,EAAE,WAAW,EAAE,MAAM,YAAY,CAAC;AAO9C,OAAO,EAAE,iBAAiB,EAAE,MAAM,aAAa,CAAC;AAEhD,OAAO,EAAE,gCAAgC,EAAE,MAAM,0BAA0B,CAAC;AAE5E,OAAO,EACL,mBAAmB,EACnB,qBAAqB,GACtB,MAAM,sBAAsB,CAAC;AAE9B,OAAO,EACL,eAAe,EACf,sBAAsB,EACtB,kBAAkB,EAClB,qBAAqB,GACtB,MAAM,iBAAiB,CAAC;AACzB,YAAY,EAAE,qBAAqB,EAAE,MAAM,iBAAiB,CAAC;AAE7D,OAAO,EACL,mBAAmB,EACnB,2BAA2B,EAC3B,kBAAkB,GACnB,MAAM,oBAAoB,CAAC;AAE5B,OAAO,EAAE,yBAAyB,EAAE,MAAM,iBAAiB,CAAC;AAC5D,YAAY,EACV,eAAe,EACf,gBAAgB,EAChB,kBAAkB,EAClB,oBAAoB,EACpB,kBAAkB,EAClB,iBAAiB,EACjB,oBAAoB,EACpB,eAAe,EACf,sBAAsB,EACtB,cAAc,EACd,UAAU,GACX,MAAM,iBAAiB,CAAC"}
|
package/script/profile/mod.js
CHANGED
|
@@ -6,7 +6,7 @@
|
|
|
6
6
|
* resolution, and merging. Consumed by the validator pipeline and the CLI.
|
|
7
7
|
*/
|
|
8
8
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
9
|
-
exports.buildProfileIntrospection = exports.resolveDisciplineMode = exports.inferDisciplineMode = exports.buildEffectiveDisciplineRegistry = exports.resolveEntryColor = exports.mergeChain = exports.loadProfileForCommand = exports.loadChain = exports.ensureCacheGitignored = exports.defaultRunGit = exports.defaultAppendFile = exports.computeCacheLocation = exports.computeCacheKey = exports.resolveLocalSpecifier = exports.resolveGitSpecifier = exports.parseManifest = void 0;
|
|
9
|
+
exports.buildProfileIntrospection = exports.targetsForRelation = exports.filterEntriesByTraceTargets = exports.entryMatchesTargets = exports.parseDisplayIdPattern = exports.padDisplayIdNumber = exports.highestDisplayIdNumber = exports.formatDisplayId = exports.resolveDisciplineMode = exports.inferDisciplineMode = exports.buildEffectiveDisciplineRegistry = exports.resolveEntryColor = exports.mergeChain = exports.loadProfileForCommand = exports.loadChain = exports.ensureCacheGitignored = exports.defaultRunGit = exports.defaultAppendFile = exports.computeCacheLocation = exports.computeCacheKey = exports.resolveLocalSpecifier = exports.resolveGitSpecifier = exports.parseManifest = void 0;
|
|
10
10
|
var manifest_js_1 = require("./manifest.js");
|
|
11
11
|
Object.defineProperty(exports, "parseManifest", { enumerable: true, get: function () { return manifest_js_1.parseManifest; } });
|
|
12
12
|
var resolver_js_1 = require("./resolver.js");
|
|
@@ -35,5 +35,14 @@ Object.defineProperty(exports, "buildEffectiveDisciplineRegistry", { enumerable:
|
|
|
35
35
|
var discipline_mode_js_1 = require("./discipline_mode.js");
|
|
36
36
|
Object.defineProperty(exports, "inferDisciplineMode", { enumerable: true, get: function () { return discipline_mode_js_1.inferDisciplineMode; } });
|
|
37
37
|
Object.defineProperty(exports, "resolveDisciplineMode", { enumerable: true, get: function () { return discipline_mode_js_1.resolveDisciplineMode; } });
|
|
38
|
+
var display_id_js_1 = require("./display_id.js");
|
|
39
|
+
Object.defineProperty(exports, "formatDisplayId", { enumerable: true, get: function () { return display_id_js_1.formatDisplayId; } });
|
|
40
|
+
Object.defineProperty(exports, "highestDisplayIdNumber", { enumerable: true, get: function () { return display_id_js_1.highestDisplayIdNumber; } });
|
|
41
|
+
Object.defineProperty(exports, "padDisplayIdNumber", { enumerable: true, get: function () { return display_id_js_1.padDisplayIdNumber; } });
|
|
42
|
+
Object.defineProperty(exports, "parseDisplayIdPattern", { enumerable: true, get: function () { return display_id_js_1.parseDisplayIdPattern; } });
|
|
43
|
+
var trace_targets_js_1 = require("./trace_targets.js");
|
|
44
|
+
Object.defineProperty(exports, "entryMatchesTargets", { enumerable: true, get: function () { return trace_targets_js_1.entryMatchesTargets; } });
|
|
45
|
+
Object.defineProperty(exports, "filterEntriesByTraceTargets", { enumerable: true, get: function () { return trace_targets_js_1.filterEntriesByTraceTargets; } });
|
|
46
|
+
Object.defineProperty(exports, "targetsForRelation", { enumerable: true, get: function () { return trace_targets_js_1.targetsForRelation; } });
|
|
38
47
|
var introspect_js_1 = require("./introspect.js");
|
|
39
48
|
Object.defineProperty(exports, "buildProfileIntrospection", { enumerable: true, get: function () { return introspect_js_1.buildProfileIntrospection; } });
|
|
@@ -0,0 +1,43 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* @module core/profile/trace_targets
|
|
3
|
+
*
|
|
4
|
+
* Pure helpers for resolving the legal target types of a trace
|
|
5
|
+
* attribute (e.g. `Satisfies:`, `Derived-from:`) given the source
|
|
6
|
+
* entry's type and the active profile chain.
|
|
7
|
+
*
|
|
8
|
+
* A profile declares per-type `traceability:` rules — each relation
|
|
9
|
+
* maps to a `TraceRule.target` list of {@linkcode TargetMatcher}s.
|
|
10
|
+
* A matcher is either a type name (string) or a shape selector
|
|
11
|
+
* (`{ shape: "Authored" | "Reference" }`). An entry matches when its
|
|
12
|
+
* `type` equals or extends a string matcher, or its `shape` equals a
|
|
13
|
+
* shape matcher.
|
|
14
|
+
*
|
|
15
|
+
* The LSP uses these helpers to narrow trace-attribute completion
|
|
16
|
+
* suggestions to the IDs the profile actually allows in that slot.
|
|
17
|
+
* Callers fall back to the unfiltered workspace listing when no
|
|
18
|
+
* rule applies (no source type known, relation undeclared, profile
|
|
19
|
+
* absent).
|
|
20
|
+
*/
|
|
21
|
+
import type { Entry } from "../model/mod.js";
|
|
22
|
+
import type { EffectiveProfile, TargetMatcher } from "../model/profile.js";
|
|
23
|
+
/**
|
|
24
|
+
* Return the `TargetMatcher[]` for a given source-entry type and
|
|
25
|
+
* relation name, or `undefined` when no rule constrains it. Callers
|
|
26
|
+
* MUST treat `undefined` as "do not filter" rather than "no targets
|
|
27
|
+
* allowed" — the latter would silently hide every suggestion.
|
|
28
|
+
*/
|
|
29
|
+
export declare function targetsForRelation(profile: EffectiveProfile, sourceType: string | undefined, relationName: string): readonly TargetMatcher[] | undefined;
|
|
30
|
+
/**
|
|
31
|
+
* Whether `entry` satisfies any matcher in `targets`. A string
|
|
32
|
+
* matcher matches when the entry's `type` equals or transitively
|
|
33
|
+
* extends the named type. A shape matcher matches when the entry's
|
|
34
|
+
* `shape` equals the matcher's shape. An entry with no resolved
|
|
35
|
+
* `type` only matches shape selectors.
|
|
36
|
+
*/
|
|
37
|
+
export declare function entryMatchesTargets(entry: Entry, targets: readonly TargetMatcher[], profile: EffectiveProfile): boolean;
|
|
38
|
+
/**
|
|
39
|
+
* Filter `entries` to those that satisfy at least one of `targets`.
|
|
40
|
+
* Order is preserved.
|
|
41
|
+
*/
|
|
42
|
+
export declare function filterEntriesByTraceTargets(entries: Iterable<Entry>, targets: readonly TargetMatcher[], profile: EffectiveProfile): Entry[];
|
|
43
|
+
//# sourceMappingURL=trace_targets.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"trace_targets.d.ts","sourceRoot":"","sources":["../../src/profile/trace_targets.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;;;;;;GAmBG;AAEH,OAAO,KAAK,EAAE,KAAK,EAAE,MAAM,iBAAiB,CAAC;AAC7C,OAAO,KAAK,EAAE,gBAAgB,EAAE,aAAa,EAAE,MAAM,qBAAqB,CAAC;AAG3E;;;;;GAKG;AACH,wBAAgB,kBAAkB,CAChC,OAAO,EAAE,gBAAgB,EACzB,UAAU,EAAE,MAAM,GAAG,SAAS,EAC9B,YAAY,EAAE,MAAM,GACnB,SAAS,aAAa,EAAE,GAAG,SAAS,CAOtC;AAED;;;;;;GAMG;AACH,wBAAgB,mBAAmB,CACjC,KAAK,EAAE,KAAK,EACZ,OAAO,EAAE,SAAS,aAAa,EAAE,EACjC,OAAO,EAAE,gBAAgB,GACxB,OAAO,CAWT;AAED;;;GAGG;AACH,wBAAgB,2BAA2B,CACzC,OAAO,EAAE,QAAQ,CAAC,KAAK,CAAC,EACxB,OAAO,EAAE,SAAS,aAAa,EAAE,EACjC,OAAO,EAAE,gBAAgB,GACxB,KAAK,EAAE,CAMT"}
|
|
@@ -0,0 +1,79 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
/**
|
|
3
|
+
* @module core/profile/trace_targets
|
|
4
|
+
*
|
|
5
|
+
* Pure helpers for resolving the legal target types of a trace
|
|
6
|
+
* attribute (e.g. `Satisfies:`, `Derived-from:`) given the source
|
|
7
|
+
* entry's type and the active profile chain.
|
|
8
|
+
*
|
|
9
|
+
* A profile declares per-type `traceability:` rules — each relation
|
|
10
|
+
* maps to a `TraceRule.target` list of {@linkcode TargetMatcher}s.
|
|
11
|
+
* A matcher is either a type name (string) or a shape selector
|
|
12
|
+
* (`{ shape: "Authored" | "Reference" }`). An entry matches when its
|
|
13
|
+
* `type` equals or extends a string matcher, or its `shape` equals a
|
|
14
|
+
* shape matcher.
|
|
15
|
+
*
|
|
16
|
+
* The LSP uses these helpers to narrow trace-attribute completion
|
|
17
|
+
* suggestions to the IDs the profile actually allows in that slot.
|
|
18
|
+
* Callers fall back to the unfiltered workspace listing when no
|
|
19
|
+
* rule applies (no source type known, relation undeclared, profile
|
|
20
|
+
* absent).
|
|
21
|
+
*/
|
|
22
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
23
|
+
exports.targetsForRelation = targetsForRelation;
|
|
24
|
+
exports.entryMatchesTargets = entryMatchesTargets;
|
|
25
|
+
exports.filterEntriesByTraceTargets = filterEntriesByTraceTargets;
|
|
26
|
+
const discipline_mode_js_1 = require("./discipline_mode.js");
|
|
27
|
+
/**
|
|
28
|
+
* Return the `TargetMatcher[]` for a given source-entry type and
|
|
29
|
+
* relation name, or `undefined` when no rule constrains it. Callers
|
|
30
|
+
* MUST treat `undefined` as "do not filter" rather than "no targets
|
|
31
|
+
* allowed" — the latter would silently hide every suggestion.
|
|
32
|
+
*/
|
|
33
|
+
function targetsForRelation(profile, sourceType, relationName) {
|
|
34
|
+
if (!sourceType)
|
|
35
|
+
return undefined;
|
|
36
|
+
const typeDef = profile.types.get(sourceType);
|
|
37
|
+
if (!typeDef)
|
|
38
|
+
return undefined;
|
|
39
|
+
const rule = typeDef.value.traceability.get(relationName);
|
|
40
|
+
if (!rule)
|
|
41
|
+
return undefined;
|
|
42
|
+
return rule.value.target;
|
|
43
|
+
}
|
|
44
|
+
/**
|
|
45
|
+
* Whether `entry` satisfies any matcher in `targets`. A string
|
|
46
|
+
* matcher matches when the entry's `type` equals or transitively
|
|
47
|
+
* extends the named type. A shape matcher matches when the entry's
|
|
48
|
+
* `shape` equals the matcher's shape. An entry with no resolved
|
|
49
|
+
* `type` only matches shape selectors.
|
|
50
|
+
*/
|
|
51
|
+
function entryMatchesTargets(entry, targets, profile) {
|
|
52
|
+
for (const target of targets) {
|
|
53
|
+
if (typeof target === "string") {
|
|
54
|
+
if (!entry.type)
|
|
55
|
+
continue;
|
|
56
|
+
if (entry.type === target)
|
|
57
|
+
return true;
|
|
58
|
+
if ((0, discipline_mode_js_1.extendsTransitively)(entry.type, target, profile))
|
|
59
|
+
return true;
|
|
60
|
+
}
|
|
61
|
+
else {
|
|
62
|
+
if (entry.shape === target.shape)
|
|
63
|
+
return true;
|
|
64
|
+
}
|
|
65
|
+
}
|
|
66
|
+
return false;
|
|
67
|
+
}
|
|
68
|
+
/**
|
|
69
|
+
* Filter `entries` to those that satisfy at least one of `targets`.
|
|
70
|
+
* Order is preserved.
|
|
71
|
+
*/
|
|
72
|
+
function filterEntriesByTraceTargets(entries, targets, profile) {
|
|
73
|
+
const out = [];
|
|
74
|
+
for (const entry of entries) {
|
|
75
|
+
if (entryMatchesTargets(entry, targets, profile))
|
|
76
|
+
out.push(entry);
|
|
77
|
+
}
|
|
78
|
+
return out;
|
|
79
|
+
}
|
|
@@ -0,0 +1,19 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* @module core/self_upgrade/compare
|
|
3
|
+
*
|
|
4
|
+
* Strict semver-tuple comparison for self-upgrade. Three outcomes:
|
|
5
|
+
* - "up-to-date" current === target
|
|
6
|
+
* - "newer-available" current < target
|
|
7
|
+
* - "downgrade" current > target
|
|
8
|
+
*
|
|
9
|
+
* Accepts an optional leading 'v' on either arg. Rejects pre-release
|
|
10
|
+
* and build-metadata suffixes — the CLI only ships clean MAJOR.MINOR.PATCH
|
|
11
|
+
* tags and any drift means the input is malformed.
|
|
12
|
+
*
|
|
13
|
+
* Throws `Error` on malformed input; callers pass the compiled-in
|
|
14
|
+
* VERSION constant (known good) and the parsed GitHub `tag_name` (also
|
|
15
|
+
* known good if `releases/latest` returned successfully).
|
|
16
|
+
*/
|
|
17
|
+
export type Comparison = "up-to-date" | "newer-available" | "downgrade";
|
|
18
|
+
export declare function compareVersions(current: string, target: string): Comparison;
|
|
19
|
+
//# sourceMappingURL=compare.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"compare.d.ts","sourceRoot":"","sources":["../../src/self_upgrade/compare.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;;GAeG;AAIH,MAAM,MAAM,UAAU,GAAG,YAAY,GAAG,iBAAiB,GAAG,WAAW,CAAC;AAExE,wBAAgB,eAAe,CAAC,OAAO,EAAE,MAAM,EAAE,MAAM,EAAE,MAAM,GAAG,UAAU,CAO3E"}
|
|
@@ -0,0 +1,38 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
/**
|
|
3
|
+
* @module core/self_upgrade/compare
|
|
4
|
+
*
|
|
5
|
+
* Strict semver-tuple comparison for self-upgrade. Three outcomes:
|
|
6
|
+
* - "up-to-date" current === target
|
|
7
|
+
* - "newer-available" current < target
|
|
8
|
+
* - "downgrade" current > target
|
|
9
|
+
*
|
|
10
|
+
* Accepts an optional leading 'v' on either arg. Rejects pre-release
|
|
11
|
+
* and build-metadata suffixes — the CLI only ships clean MAJOR.MINOR.PATCH
|
|
12
|
+
* tags and any drift means the input is malformed.
|
|
13
|
+
*
|
|
14
|
+
* Throws `Error` on malformed input; callers pass the compiled-in
|
|
15
|
+
* VERSION constant (known good) and the parsed GitHub `tag_name` (also
|
|
16
|
+
* known good if `releases/latest` returned successfully).
|
|
17
|
+
*/
|
|
18
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
19
|
+
exports.compareVersions = compareVersions;
|
|
20
|
+
const VERSION_RE = /^(0|[1-9]\d*)\.(0|[1-9]\d*)\.(0|[1-9]\d*)$/;
|
|
21
|
+
function compareVersions(current, target) {
|
|
22
|
+
const c = parse(current);
|
|
23
|
+
const t = parse(target);
|
|
24
|
+
if (c[0] !== t[0])
|
|
25
|
+
return c[0] < t[0] ? "newer-available" : "downgrade";
|
|
26
|
+
if (c[1] !== t[1])
|
|
27
|
+
return c[1] < t[1] ? "newer-available" : "downgrade";
|
|
28
|
+
if (c[2] !== t[2])
|
|
29
|
+
return c[2] < t[2] ? "newer-available" : "downgrade";
|
|
30
|
+
return "up-to-date";
|
|
31
|
+
}
|
|
32
|
+
function parse(s) {
|
|
33
|
+
const stripped = s.startsWith("v") ? s.slice(1) : s;
|
|
34
|
+
const m = VERSION_RE.exec(stripped);
|
|
35
|
+
if (!m)
|
|
36
|
+
throw new Error(`invalid version: ${JSON.stringify(s)}`);
|
|
37
|
+
return [parseInt(m[1], 10), parseInt(m[2], 10), parseInt(m[3], 10)];
|
|
38
|
+
}
|