@driftsys/markspec 0.11.0 → 0.12.1
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/README.md +9 -0
- package/esm/ast/normalize.d.ts +4 -5
- package/esm/ast/normalize.d.ts.map +1 -1
- package/esm/ast/normalize.js +6 -37
- package/esm/collect/mod.d.ts +29 -9
- package/esm/collect/mod.d.ts.map +1 -1
- package/esm/collect/mod.js +36 -10
- package/esm/compiler/mod.d.ts.map +1 -1
- package/esm/compiler/mod.js +2 -6
- package/esm/config/markspec.d.ts +5 -3
- package/esm/config/markspec.d.ts.map +1 -1
- package/esm/config/mod.d.ts.map +1 -1
- package/esm/config/mod.js +47 -5
- package/esm/discovery/mod.d.ts +24 -8
- package/esm/discovery/mod.d.ts.map +1 -1
- package/esm/discovery/mod.js +57 -21
- package/esm/discovery/projects.d.ts +111 -0
- package/esm/discovery/projects.d.ts.map +1 -0
- package/esm/discovery/projects.js +242 -0
- package/esm/formatter/entry_body.d.ts +84 -0
- package/esm/formatter/entry_body.d.ts.map +1 -0
- package/esm/formatter/entry_body.js +291 -0
- package/esm/formatter/md_equiv.d.ts +6 -5
- package/esm/formatter/md_equiv.d.ts.map +1 -1
- package/esm/formatter/md_equiv.js +6 -5
- package/esm/formatter/mod.d.ts +16 -9
- package/esm/formatter/mod.d.ts.map +1 -1
- package/esm/formatter/mod.js +327 -53
- package/esm/formatter/tab_markers.d.ts +15 -0
- package/esm/formatter/tab_markers.d.ts.map +1 -0
- package/esm/formatter/tab_markers.js +133 -0
- package/esm/gates/mod.d.ts.map +1 -1
- package/esm/gates/mod.js +6 -5
- package/esm/lint/runner.d.ts.map +1 -1
- package/esm/lint/runner.js +4 -4
- package/esm/lock/check.d.ts.map +1 -1
- package/esm/lock/check.js +2 -1
- package/esm/lock/edge_drift.d.ts +2 -0
- package/esm/lock/edge_drift.d.ts.map +1 -1
- package/esm/lock/edge_drift.js +4 -0
- package/esm/lock/mod.d.ts +1 -1
- package/esm/lock/mod.d.ts.map +1 -1
- package/esm/lock/mod.js +1 -1
- package/esm/lock/upstream_deps.js +1 -1
- package/esm/mod.d.ts +11 -6
- package/esm/mod.d.ts.map +1 -1
- package/esm/mod.js +9 -6
- package/esm/model/mod.d.ts +22 -1
- package/esm/model/mod.d.ts.map +1 -1
- package/esm/model/mod.js +10 -0
- package/esm/parser/code_regions.d.ts +29 -0
- package/esm/parser/code_regions.d.ts.map +1 -0
- package/esm/parser/code_regions.js +38 -0
- package/esm/parser/markdown.d.ts.map +1 -1
- package/esm/parser/markdown.js +103 -40
- package/esm/parser/mod.d.ts.map +1 -1
- package/esm/parser/mod.js +7 -1
- package/esm/parser/translate.d.ts.map +1 -1
- package/esm/parser/translate.js +5 -0
- package/esm/refs/mod.d.ts +6 -2
- package/esm/refs/mod.d.ts.map +1 -1
- package/esm/refs/mod.js +15 -21
- package/esm/reporter/mod.d.ts.map +1 -1
- package/esm/reporter/mod.js +2 -2
- package/esm/sync/mapping.d.ts +4 -3
- package/esm/sync/mapping.d.ts.map +1 -1
- package/esm/sync/mapping.js +52 -9
- package/esm/util/display_id.d.ts +20 -0
- package/esm/util/display_id.d.ts.map +1 -0
- package/esm/util/display_id.js +19 -0
- package/esm/util/fence.d.ts +20 -29
- package/esm/util/fence.d.ts.map +1 -1
- package/esm/util/fence.js +42 -50
- package/esm/util/modals.d.ts +6 -0
- package/esm/util/modals.d.ts.map +1 -1
- package/esm/util/modals.js +37 -0
- package/esm/validator/body_blocks.d.ts +2 -1
- package/esm/validator/body_blocks.d.ts.map +1 -1
- package/esm/validator/body_blocks.js +80 -2
- package/esm/validator/corpus.d.ts +6 -0
- package/esm/validator/corpus.d.ts.map +1 -1
- package/esm/validator/corpus.js +16 -4
- package/esm/validator/mod.d.ts +1 -1
- package/esm/validator/mod.d.ts.map +1 -1
- package/esm/validator/mod.js +1 -1
- package/esm/validator/pipeline.d.ts +6 -4
- package/esm/validator/pipeline.d.ts.map +1 -1
- package/esm/validator/pipeline.js +24 -19
- package/package.json +1 -1
- package/script/ast/normalize.d.ts +4 -5
- package/script/ast/normalize.d.ts.map +1 -1
- package/script/ast/normalize.js +5 -36
- package/script/collect/mod.d.ts +29 -9
- package/script/collect/mod.d.ts.map +1 -1
- package/script/collect/mod.js +38 -10
- package/script/compiler/mod.d.ts.map +1 -1
- package/script/compiler/mod.js +1 -5
- package/script/config/markspec.d.ts +5 -3
- package/script/config/markspec.d.ts.map +1 -1
- package/script/config/mod.d.ts.map +1 -1
- package/script/config/mod.js +47 -5
- package/script/discovery/mod.d.ts +24 -8
- package/script/discovery/mod.d.ts.map +1 -1
- package/script/discovery/mod.js +56 -20
- package/script/discovery/projects.d.ts +111 -0
- package/script/discovery/projects.d.ts.map +1 -0
- package/script/discovery/projects.js +250 -0
- package/script/formatter/entry_body.d.ts +84 -0
- package/script/formatter/entry_body.d.ts.map +1 -0
- package/script/formatter/entry_body.js +296 -0
- package/script/formatter/md_equiv.d.ts +6 -5
- package/script/formatter/md_equiv.d.ts.map +1 -1
- package/script/formatter/md_equiv.js +6 -5
- package/script/formatter/mod.d.ts +16 -9
- package/script/formatter/mod.d.ts.map +1 -1
- package/script/formatter/mod.js +324 -50
- package/script/formatter/tab_markers.d.ts +15 -0
- package/script/formatter/tab_markers.d.ts.map +1 -0
- package/script/formatter/tab_markers.js +141 -0
- package/script/gates/mod.d.ts.map +1 -1
- package/script/gates/mod.js +15 -14
- package/script/lint/runner.d.ts.map +1 -1
- package/script/lint/runner.js +3 -3
- package/script/lock/check.d.ts.map +1 -1
- package/script/lock/check.js +2 -1
- package/script/lock/edge_drift.d.ts +2 -0
- package/script/lock/edge_drift.d.ts.map +1 -1
- package/script/lock/edge_drift.js +5 -0
- package/script/lock/mod.d.ts +1 -1
- package/script/lock/mod.d.ts.map +1 -1
- package/script/lock/mod.js +2 -1
- package/script/lock/upstream_deps.js +1 -1
- package/script/mod.d.ts +11 -6
- package/script/mod.d.ts.map +1 -1
- package/script/mod.js +23 -5
- package/script/model/mod.d.ts +22 -1
- package/script/model/mod.d.ts.map +1 -1
- package/script/model/mod.js +11 -0
- package/script/parser/code_regions.d.ts +29 -0
- package/script/parser/code_regions.d.ts.map +1 -0
- package/script/parser/code_regions.js +41 -0
- package/script/parser/markdown.d.ts.map +1 -1
- package/script/parser/markdown.js +102 -39
- package/script/parser/mod.d.ts.map +1 -1
- package/script/parser/mod.js +7 -1
- package/script/parser/translate.d.ts.map +1 -1
- package/script/parser/translate.js +5 -0
- package/script/refs/mod.d.ts +6 -2
- package/script/refs/mod.d.ts.map +1 -1
- package/script/refs/mod.js +14 -20
- package/script/reporter/mod.d.ts.map +1 -1
- package/script/reporter/mod.js +1 -1
- package/script/sync/mapping.d.ts +4 -3
- package/script/sync/mapping.d.ts.map +1 -1
- package/script/sync/mapping.js +52 -9
- package/script/util/display_id.d.ts +20 -0
- package/script/util/display_id.d.ts.map +1 -0
- package/script/util/display_id.js +22 -0
- package/script/util/fence.d.ts +20 -29
- package/script/util/fence.d.ts.map +1 -1
- package/script/util/fence.js +47 -54
- package/script/util/modals.d.ts +6 -0
- package/script/util/modals.d.ts.map +1 -1
- package/script/util/modals.js +38 -0
- package/script/validator/body_blocks.d.ts +2 -1
- package/script/validator/body_blocks.d.ts.map +1 -1
- package/script/validator/body_blocks.js +80 -2
- package/script/validator/corpus.d.ts +6 -0
- package/script/validator/corpus.d.ts.map +1 -1
- package/script/validator/corpus.js +16 -3
- package/script/validator/mod.d.ts +1 -1
- package/script/validator/mod.d.ts.map +1 -1
- package/script/validator/mod.js +2 -1
- package/script/validator/pipeline.d.ts +6 -4
- package/script/validator/pipeline.d.ts.map +1 -1
- package/script/validator/pipeline.js +24 -19
|
@@ -0,0 +1,141 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
var __importDefault = (this && this.__importDefault) || function (mod) {
|
|
3
|
+
return (mod && mod.__esModule) ? mod : { "default": mod };
|
|
4
|
+
};
|
|
5
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
6
|
+
exports.entryListItems = entryListItems;
|
|
7
|
+
exports.tabMarkers = tabMarkers;
|
|
8
|
+
exports.protectedTabRanges = protectedTabRanges;
|
|
9
|
+
const unified_1 = require("unified");
|
|
10
|
+
const remark_parse_1 = __importDefault(require("remark-parse"));
|
|
11
|
+
const remark_gfm_1 = __importDefault(require("remark-gfm"));
|
|
12
|
+
const entry_body_js_1 = require("./entry_body.js");
|
|
13
|
+
const parser = (0, unified_1.unified)().use(remark_parse_1.default).use(remark_gfm_1.default);
|
|
14
|
+
/** Find actual unordered list items, excluding code, HTML, and task lists. */
|
|
15
|
+
function entryListItems(lines) {
|
|
16
|
+
const markers = [];
|
|
17
|
+
const visit = (node, container, enclosingList) => {
|
|
18
|
+
if (node.type === "list") {
|
|
19
|
+
for (const item of node.children) {
|
|
20
|
+
const outer = container ?? item;
|
|
21
|
+
const start = (item.position?.start.line ?? 1) - 1;
|
|
22
|
+
const column = (item.position?.start.column ?? 1) - 1;
|
|
23
|
+
const match = /^[-*+]([ \t]+)\[[^\]\s]+\](?:\s|$)/.exec((lines[start] ?? "").slice(column));
|
|
24
|
+
if (!node.ordered && item.checked == null && match &&
|
|
25
|
+
item.children[0]?.type === "paragraph") {
|
|
26
|
+
markers.push({
|
|
27
|
+
start,
|
|
28
|
+
end: item.position?.end.line ?? start + 1,
|
|
29
|
+
column,
|
|
30
|
+
whitespace: match[1],
|
|
31
|
+
container: {
|
|
32
|
+
start: (outer.position?.start.line ?? 1) - 1,
|
|
33
|
+
end: outer.position?.end.line ?? lines.length,
|
|
34
|
+
},
|
|
35
|
+
listContext: enclosingList ?? {
|
|
36
|
+
start: (node.position?.start.line ?? 1) - 1,
|
|
37
|
+
end: node.position?.end.line ?? lines.length,
|
|
38
|
+
},
|
|
39
|
+
});
|
|
40
|
+
}
|
|
41
|
+
for (const child of item.children) {
|
|
42
|
+
visit(child, outer, enclosingList ?? {
|
|
43
|
+
start: (node.position?.start.line ?? 1) - 1,
|
|
44
|
+
end: node.position?.end.line ?? lines.length,
|
|
45
|
+
});
|
|
46
|
+
}
|
|
47
|
+
}
|
|
48
|
+
}
|
|
49
|
+
else if ("children" in node) {
|
|
50
|
+
for (const [index, child] of node.children.entries()) {
|
|
51
|
+
let context = enclosingList;
|
|
52
|
+
if (!context && child.type === "list") {
|
|
53
|
+
// A marker change (for example `*` to `-`) splits adjacent
|
|
54
|
+
// items into separate mdast lists. Their indentation still
|
|
55
|
+
// affects admission of a tab rewrite across that boundary.
|
|
56
|
+
let first = index;
|
|
57
|
+
let last = index;
|
|
58
|
+
while (first > 0 && node.children[first - 1].type === "list")
|
|
59
|
+
first--;
|
|
60
|
+
while (node.children[last + 1]?.type === "list")
|
|
61
|
+
last++;
|
|
62
|
+
// Indented blocks after the list can move into an entry when its
|
|
63
|
+
// content column shrinks. Formatting them in isolation can remove
|
|
64
|
+
// that indentation and admit a refused rewrite on the next run.
|
|
65
|
+
// Keep complete blocks, including unindented lazy continuations.
|
|
66
|
+
const contentColumn = Math.min(...node.children.slice(first, last + 1).flatMap((sibling) => sibling.type === "list"
|
|
67
|
+
? sibling.children.map((item) => (item.position?.start.column ?? 1) + 1)
|
|
68
|
+
: []));
|
|
69
|
+
while ((node.children[last + 1]?.position?.start.column ?? 0) >=
|
|
70
|
+
contentColumn)
|
|
71
|
+
last++;
|
|
72
|
+
context = {
|
|
73
|
+
start: (node.children[first].position?.start.line ?? 1) - 1,
|
|
74
|
+
end: node.children[last].position?.end.line ?? lines.length,
|
|
75
|
+
};
|
|
76
|
+
}
|
|
77
|
+
visit(child, container, context);
|
|
78
|
+
}
|
|
79
|
+
}
|
|
80
|
+
};
|
|
81
|
+
visit(parser.parse(lines.join("\n")));
|
|
82
|
+
return markers;
|
|
83
|
+
}
|
|
84
|
+
/** Find entry list items with a tab in the whitespace after the marker. */
|
|
85
|
+
function tabMarkers(lines) {
|
|
86
|
+
if (!lines.some((line) => /[-*+][ \t]*\t[ \t]*\[/.test(line)))
|
|
87
|
+
return [];
|
|
88
|
+
return entryListItems(lines).filter((marker) => marker.whitespace.includes("\t"));
|
|
89
|
+
}
|
|
90
|
+
/** Ranges kept out of every formatter pass after a tab rewrite is refused. */
|
|
91
|
+
function protectedTabRanges(lines, preserveListContext = false) {
|
|
92
|
+
const markers = tabMarkers(lines);
|
|
93
|
+
const items = markers.length > 0 ? entryListItems(lines) : [];
|
|
94
|
+
const ranges = markers.map((marker) => {
|
|
95
|
+
// A prose rewrite of a neighbouring item can make a refused marker
|
|
96
|
+
// eligible on the next run. Keep the containing list and the following
|
|
97
|
+
// indented blocks stable, even when CommonMark puts them outside it.
|
|
98
|
+
const range = preserveListContext ? marker.listContext : marker;
|
|
99
|
+
let start = range.start;
|
|
100
|
+
if (!preserveListContext && marker.column > 0) {
|
|
101
|
+
for (let i = start - 1; i >= marker.container.start; i--) {
|
|
102
|
+
if (lines[i].trim() === "")
|
|
103
|
+
continue;
|
|
104
|
+
if (!lines[i].startsWith(" ".repeat(marker.column)))
|
|
105
|
+
break;
|
|
106
|
+
if (/^[-*+][ \t]/.test(lines[i].slice(marker.column)))
|
|
107
|
+
start = i;
|
|
108
|
+
else if (!lines[i].startsWith(" ".repeat(marker.column + 2)))
|
|
109
|
+
break;
|
|
110
|
+
}
|
|
111
|
+
}
|
|
112
|
+
let end = range.end;
|
|
113
|
+
const nextEntry = items.find((item) => item.start > marker.start)?.start ??
|
|
114
|
+
lines.length;
|
|
115
|
+
const trailerIndent = " ".repeat((0, entry_body_js_1.contentColumn)(lines[marker.start], marker.column) + 4);
|
|
116
|
+
for (let i = end; i < nextEntry; i++) {
|
|
117
|
+
if (lines[i].trim() === "")
|
|
118
|
+
continue;
|
|
119
|
+
if (!lines[i].startsWith(" ".repeat(marker.column + 2)))
|
|
120
|
+
break;
|
|
121
|
+
// A less-indented trailer belongs to an enclosing space-marker entry.
|
|
122
|
+
if (/^[A-Z][A-Za-z-]*:(?:\s|$)/.test(lines[i].trim()) &&
|
|
123
|
+
!lines[i].startsWith(trailerIndent))
|
|
124
|
+
break;
|
|
125
|
+
end = i + 1;
|
|
126
|
+
}
|
|
127
|
+
while (end < lines.length && lines[end].trim() === "")
|
|
128
|
+
end++;
|
|
129
|
+
return { start, end };
|
|
130
|
+
});
|
|
131
|
+
const merged = [];
|
|
132
|
+
for (const range of ranges.sort((a, b) => a.start - b.start)) {
|
|
133
|
+
const previous = merged.at(-1);
|
|
134
|
+
if (previous && range.start <= previous.end) {
|
|
135
|
+
previous.end = Math.max(previous.end, range.end);
|
|
136
|
+
}
|
|
137
|
+
else
|
|
138
|
+
merged.push({ ...range });
|
|
139
|
+
}
|
|
140
|
+
return merged;
|
|
141
|
+
}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"mod.d.ts","sourceRoot":"","sources":["../../src/gates/mod.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;;;;;GAkBG;AAEH,OAAO,KAAK,EAAE,UAAU,EAAE,gBAAgB,EAAE,KAAK,EAAE,MAAM,iBAAiB,CAAC;
|
|
1
|
+
{"version":3,"file":"mod.d.ts","sourceRoot":"","sources":["../../src/gates/mod.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;;;;;GAkBG;AAEH,OAAO,KAAK,EAAE,UAAU,EAAE,gBAAgB,EAAE,KAAK,EAAE,MAAM,iBAAiB,CAAC;AAG3E,OAAO,KAAK,EAAE,cAAc,EAAE,MAAM,wBAAwB,CAAC;AAG7D,OAAO,EAGL,KAAK,QAAQ,EACb,KAAK,mBAAmB,EACxB,KAAK,QAAQ,IAAI,YAAY,EAE9B,MAAM,gBAAgB,CAAC;AAGxB;;;;;;;;;;;;;;;;;;;;GAoBG;AACH,wBAAsB,YAAY,CAChC,UAAU,EAAE,WAAW,CAAC,MAAM,EAAE,MAAM,CAAC,EACvC,OAAO,EAAE,SAAS,KAAK,EAAE,EACzB,MAAM,EAAE,SAAS,QAAQ,EAAE,EAC3B,mBAAmB,EAAE,cAAc,GAAG,SAAS,GAC9C,OAAO,CAAC,UAAU,EAAE,CAAC,CAyCvB;AAED;;;;;;;;;;;;;;;;;;;;;;;;;;;GA2BG;AACH,wBAAsB,iBAAiB,CACrC,SAAS,EAAE,mBAAmB,EAC9B,QAAQ,EAAE,MAAM,EAChB,OAAO,EAAE,SAAS,KAAK,EAAE,EACzB,KAAK,CAAC,EAAE;IAAE,QAAQ,CAAC,SAAS,EAAE,MAAM,CAAC;IAAC,QAAQ,CAAC,QAAQ,EAAE,YAAY,CAAA;CAAE,GACtE,OAAO,CAAC,UAAU,EAAE,CAAC,CAuCvB;AAED;;;;;;;;;;;;;;GAcG;AACH,wBAAsB,aAAa,CACjC,OAAO,EAAE,SAAS,KAAK,EAAE,EACzB,OAAO,EAAE,gBAAgB,GAAG,SAAS,GACpC,OAAO,CAAC,UAAU,EAAE,CAAC,CAQvB"}
|
package/script/gates/mod.js
CHANGED
|
@@ -22,11 +22,12 @@ Object.defineProperty(exports, "__esModule", { value: true });
|
|
|
22
22
|
exports.fmtDriftGate = fmtDriftGate;
|
|
23
23
|
exports.lockfileDriftGate = lockfileDriftGate;
|
|
24
24
|
exports.proseLintGate = proseLintGate;
|
|
25
|
-
const mod_js_1 = require("../
|
|
26
|
-
const mod_js_2 = require("../
|
|
27
|
-
const mod_js_3 = require("../
|
|
28
|
-
const mod_js_4 = require("../
|
|
29
|
-
const mod_js_5 = require("../
|
|
25
|
+
const mod_js_1 = require("../model/mod.js");
|
|
26
|
+
const mod_js_2 = require("../formatter/mod.js");
|
|
27
|
+
const mod_js_3 = require("../parser/mod.js");
|
|
28
|
+
const mod_js_4 = require("../refs/mod.js");
|
|
29
|
+
const mod_js_5 = require("../lock/mod.js");
|
|
30
|
+
const mod_js_6 = require("../lint/mod.js");
|
|
30
31
|
/**
|
|
31
32
|
* Format-drift gate — the `MSL-F010` (formatter drift) and `MSL-F011`
|
|
32
33
|
* (reference-canonicalization drift) findings.
|
|
@@ -57,9 +58,9 @@ async function fmtDriftGate(mdContents, entries, ledger, formatMarkdownProse) {
|
|
|
57
58
|
// consumer using a delivered corpus. Filter to `!e.origin`, mirroring
|
|
58
59
|
// lockfileDriftGate — deliberately BROADER than the validators'
|
|
59
60
|
// `emittableEntries` (upstream-only, #771); do not "unify" it.
|
|
60
|
-
const refIndex = (0,
|
|
61
|
+
const refIndex = (0, mod_js_4.buildRefIndex)(entries.filter((e) => !(0, mod_js_1.isCorpusEntry)(e)));
|
|
61
62
|
for (const [filePath, content] of mdContents) {
|
|
62
|
-
const formatted = (0,
|
|
63
|
+
const formatted = (0, mod_js_2.format)(content, {
|
|
63
64
|
file: filePath,
|
|
64
65
|
formatMarkdownProse,
|
|
65
66
|
});
|
|
@@ -71,8 +72,8 @@ async function fmtDriftGate(mdContents, entries, ledger, formatMarkdownProse) {
|
|
|
71
72
|
location: { file: filePath, line: 1, column: 1 },
|
|
72
73
|
});
|
|
73
74
|
}
|
|
74
|
-
const parsed = await (0,
|
|
75
|
-
const refResult = (0,
|
|
75
|
+
const parsed = await (0, mod_js_3.parseFile)(formatted.output, { file: filePath });
|
|
76
|
+
const refResult = (0, mod_js_4.canonicalizeRefs)(formatted.output, parsed.entries, refIndex, ledger, formatted.preservedRanges);
|
|
76
77
|
if (refResult.changed) {
|
|
77
78
|
diagnostics.push({
|
|
78
79
|
code: "MSL-F011",
|
|
@@ -119,18 +120,18 @@ async function lockfileDriftGate(lockParse, lockPath, entries, cache) {
|
|
|
119
120
|
// `!e.origin` (project-owned only) — deliberately BROADER than the
|
|
120
121
|
// validators' `emittableEntries` partition (upstream-only, #771): the
|
|
121
122
|
// edge ledger records only edges the project authors.
|
|
122
|
-
const projectEntries = entries.filter((e) => !
|
|
123
|
-
const drift = await (0,
|
|
123
|
+
const projectEntries = entries.filter((e) => !(0, mod_js_1.isCorpusEntry)(e));
|
|
124
|
+
const drift = await (0, mod_js_5.detectOfflineEdgeDrift)(projectEntries, lockParse.lockfile.generatedCache);
|
|
124
125
|
const diagnostics = drift.drifted
|
|
125
126
|
? [{
|
|
126
127
|
code: "MSL-L212",
|
|
127
128
|
severity: "error",
|
|
128
|
-
message:
|
|
129
|
+
message: (0, mod_js_5.formatEdgeDriftMessage)(drift.lockedCount, drift.currentCount),
|
|
129
130
|
location: { file: lockPath, line: 1, column: 1 },
|
|
130
131
|
}]
|
|
131
132
|
: [];
|
|
132
133
|
if (cache !== undefined) {
|
|
133
|
-
const cacheDiags = await (0,
|
|
134
|
+
const cacheDiags = await (0, mod_js_5.verifyUpstreamCache)(lockParse.lockfile.upstreams, cache.cacheRoot, cache.readFile);
|
|
134
135
|
// verifyUpstreamCache is a reusable, lockfile-path-agnostic probe and
|
|
135
136
|
// emits `location: undefined` (see cache_check.ts). Stamp the same
|
|
136
137
|
// lockfile location the sibling edge-drift MSL-L212 above uses, so both
|
|
@@ -161,7 +162,7 @@ async function lockfileDriftGate(lockParse, lockPath, entries, cache) {
|
|
|
161
162
|
* file indexing) is not needed here: `check` passes no `glossaryFilePaths`.
|
|
162
163
|
*/
|
|
163
164
|
async function proseLintGate(entries, profile) {
|
|
164
|
-
const lintResult = await (0,
|
|
165
|
+
const lintResult = await (0, mod_js_6.runLint)({ entries, profile });
|
|
165
166
|
return lintResult.diagnostics.map((d) => ({
|
|
166
167
|
code: d.code,
|
|
167
168
|
severity: d.severity,
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"runner.d.ts","sourceRoot":"","sources":["../../src/lint/runner.ts"],"names":[],"mappings":"AAAA;;;;;;;GAOG;AAEH,OAAO,KAAK,EAAE,gBAAgB,EAAE,KAAK,EAAE,MAAM,iBAAiB,CAAC;AAG/D,OAAO,KAAK,EAAE,cAAc,EAAE,MAAM,YAAY,CAAC;AAUjD,OAAO,KAAK,EAAE,UAAU,EAAiB,MAAM,eAAe,CAAC;AAY/D,OAAO,KAAK,EAAE,WAAW,EAAE,MAAM,YAAY,CAAC;AAgB9C;;;;;;;;;;;;GAYG;AACH,wBAAgB,YAAY,CAC1B,KAAK,EAAE,KAAK,EACZ,OAAO,CAAC,EAAE,gBAAgB,GACzB,OAAO,CA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AAE,gBAAgB,CAAC;IACpC,6EAA6E;IAC7E,QAAQ,CAAC,gBAAgB,CAAC,EAAE,WAAW,CAAC,MAAM,CAAC,CAAC;IAChD,yEAAyE;IACzE,QAAQ,CAAC,iBAAiB,CAAC,EAAE,SAAS,MAAM,EAAE,CAAC;IAC/C,mDAAmD;IACnD,QAAQ,CAAC,QAAQ,CAAC,EAAE,UAAU,CAAC;CAChC;AAED,MAAM,WAAW,UAAU;IACzB,QAAQ,CAAC,WAAW,EAAE,SAAS,cAAc,EAAE,CAAC;IAChD,QAAQ,CAAC,KAAK,EAAE,WAAW,CAAC;CAC7B;AAoBD;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;GAiCG;AACH,wBAAsB,OAAO,CAAC,OAAO,EAAE,WAAW,GAAG,OAAO,CAAC,UAAU,CAAC,CA+FvE"}
|
package/script/lint/runner.js
CHANGED
|
@@ -125,7 +125,7 @@ async function runLint(options) {
|
|
|
125
125
|
// validated but is never prose-linted — do not "unify" this filter.
|
|
126
126
|
const inScopeDiags = new Map();
|
|
127
127
|
for (const entry of entries) {
|
|
128
|
-
if (
|
|
128
|
+
if ((0, mod_js_1.isCorpusEntry)(entry))
|
|
129
129
|
continue;
|
|
130
130
|
if (!isProseScope(entry, profile))
|
|
131
131
|
continue;
|
|
@@ -153,7 +153,7 @@ async function runLint(options) {
|
|
|
153
153
|
for (const entry of entries) {
|
|
154
154
|
if (entry.shape !== "Authored")
|
|
155
155
|
continue;
|
|
156
|
-
if (
|
|
156
|
+
if ((0, mod_js_1.isCorpusEntry)(entry))
|
|
157
157
|
continue;
|
|
158
158
|
hygieneDiags.push(...(0, suppression_js_1.runSuppressionRules)(entry));
|
|
159
159
|
}
|
|
@@ -188,6 +188,6 @@ async function runLint(options) {
|
|
|
188
188
|
// ones). Corpus entries are excluded — counting them would skew band-counts
|
|
189
189
|
// and the mean on prose a consumer cannot act on (ADR-030 §D4). A no-op when
|
|
190
190
|
// no corpus is present.
|
|
191
|
-
const score = (0, score_js_1.computeScoreRollup)(out, entries.filter((e) => !
|
|
191
|
+
const score = (0, score_js_1.computeScoreRollup)(out, entries.filter((e) => !(0, mod_js_1.isCorpusEntry)(e)));
|
|
192
192
|
return { diagnostics: out, score };
|
|
193
193
|
}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"check.d.ts","sourceRoot":"","sources":["../../src/lock/check.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;;;;;;;GAoBG;AAEH,OAAO,KAAK,EAAE,UAAU,EAAE,MAAM,iBAAiB,CAAC;AAClD,OAAO,KAAK,EACV,QAAQ,EAIT,MAAM,YAAY,CAAC;AACpB,OAAO,KAAK,EAAE,iBAAiB,EAAE,MAAM,cAAc,CAAC;
|
|
1
|
+
{"version":3,"file":"check.d.ts","sourceRoot":"","sources":["../../src/lock/check.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;;;;;;;GAoBG;AAEH,OAAO,KAAK,EAAE,UAAU,EAAE,MAAM,iBAAiB,CAAC;AAClD,OAAO,KAAK,EACV,QAAQ,EAIT,MAAM,YAAY,CAAC;AACpB,OAAO,KAAK,EAAE,iBAAiB,EAAE,MAAM,cAAc,CAAC;AAGtD;;;;;;;;GAQG;AACH,wBAAgB,UAAU,CACxB,MAAM,EAAE,QAAQ,EAChB,QAAQ,EAAE,iBAAiB,EAC3B,oBAAoB,EAAE,SAAS,MAAM,EAAE,GACtC,UAAU,EAAE,CA4Jd"}
|
package/script/lock/check.js
CHANGED
|
@@ -22,6 +22,7 @@
|
|
|
22
22
|
*/
|
|
23
23
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
24
24
|
exports.checkDrift = checkDrift;
|
|
25
|
+
const edge_drift_js_1 = require("./edge_drift.js");
|
|
25
26
|
/**
|
|
26
27
|
* Compare locked vs resolved upstreams; return one diagnostic per drift
|
|
27
28
|
* case. An empty result means the lockfile is in sync with the current
|
|
@@ -160,7 +161,7 @@ function checkDrift(locked, resolved, declaredReferenceIds) {
|
|
|
160
161
|
diags.push({
|
|
161
162
|
code: "MSL-L212",
|
|
162
163
|
severity: "error",
|
|
163
|
-
message:
|
|
164
|
+
message: (0, edge_drift_js_1.formatEdgeDriftMessage)(locked.generatedCache.edgesCount, resolved.canonicalEdgeCount),
|
|
164
165
|
location: undefined,
|
|
165
166
|
});
|
|
166
167
|
}
|
|
@@ -18,6 +18,8 @@ export interface OfflineEdgeDrift {
|
|
|
18
18
|
/** Edge count in the current project graph. */
|
|
19
19
|
readonly currentCount: number;
|
|
20
20
|
}
|
|
21
|
+
/** Build the actionable edge-drift message shared by CLI and core checks. */
|
|
22
|
+
export declare function formatEdgeDriftMessage(lockedCount: number, currentCount: number): string;
|
|
21
23
|
/**
|
|
22
24
|
* Compare the current project graph's canonical edge hash against a
|
|
23
25
|
* lockfile's generated-cache. Offline by design — no upstream resolution.
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"edge_drift.d.ts","sourceRoot":"","sources":["../../src/lock/edge_drift.ts"],"names":[],"mappings":"AAAA;;;;;;;;GAQG;AAEH,OAAO,KAAK,EAAE,KAAK,EAAE,MAAM,iBAAiB,CAAC;AAC7C,OAAO,KAAK,EAAE,cAAc,EAAE,MAAM,YAAY,CAAC;AAIjD,qEAAqE;AACrE,MAAM,WAAW,gBAAgB;IAC/B,2EAA2E;IAC3E,QAAQ,CAAC,OAAO,EAAE,OAAO,CAAC;IAC1B,6DAA6D;IAC7D,QAAQ,CAAC,WAAW,EAAE,MAAM,CAAC;IAC7B,+CAA+C;IAC/C,QAAQ,CAAC,YAAY,EAAE,MAAM,CAAC;CAC/B;AAED;;;;;;;;GAQG;AACH,wBAAsB,sBAAsB,CAC1C,cAAc,EAAE,SAAS,KAAK,EAAE,EAChC,KAAK,EAAE,cAAc,GACpB,OAAO,CAAC,gBAAgB,CAAC,CAQ3B"}
|
|
1
|
+
{"version":3,"file":"edge_drift.d.ts","sourceRoot":"","sources":["../../src/lock/edge_drift.ts"],"names":[],"mappings":"AAAA;;;;;;;;GAQG;AAEH,OAAO,KAAK,EAAE,KAAK,EAAE,MAAM,iBAAiB,CAAC;AAC7C,OAAO,KAAK,EAAE,cAAc,EAAE,MAAM,YAAY,CAAC;AAIjD,qEAAqE;AACrE,MAAM,WAAW,gBAAgB;IAC/B,2EAA2E;IAC3E,QAAQ,CAAC,OAAO,EAAE,OAAO,CAAC;IAC1B,6DAA6D;IAC7D,QAAQ,CAAC,WAAW,EAAE,MAAM,CAAC;IAC7B,+CAA+C;IAC/C,QAAQ,CAAC,YAAY,EAAE,MAAM,CAAC;CAC/B;AAED,6EAA6E;AAC7E,wBAAgB,sBAAsB,CACpC,WAAW,EAAE,MAAM,EACnB,YAAY,EAAE,MAAM,GACnB,MAAM,CAER;AAED;;;;;;;;GAQG;AACH,wBAAsB,sBAAsB,CAC1C,cAAc,EAAE,SAAS,KAAK,EAAE,EAChC,KAAK,EAAE,cAAc,GACpB,OAAO,CAAC,gBAAgB,CAAC,CAQ3B"}
|
|
@@ -9,9 +9,14 @@
|
|
|
9
9
|
* can never disagree on what "drift" means.
|
|
10
10
|
*/
|
|
11
11
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
12
|
+
exports.formatEdgeDriftMessage = formatEdgeDriftMessage;
|
|
12
13
|
exports.detectOfflineEdgeDrift = detectOfflineEdgeDrift;
|
|
13
14
|
const resolve_js_1 = require("./resolve.js");
|
|
14
15
|
const canonical_edges_js_1 = require("./canonical_edges.js");
|
|
16
|
+
/** Build the actionable edge-drift message shared by CLI and core checks. */
|
|
17
|
+
function formatEdgeDriftMessage(lockedCount, currentCount) {
|
|
18
|
+
return `traceability edges drifted from markspec.lock: locked ${lockedCount} edge(s), current ${currentCount} — run \`markspec lock\` to refresh. (After upgrading MarkSpec this can also fire once because traceability inputs now include source-file doc comments; re-running \`markspec lock\` clears it.)`;
|
|
19
|
+
}
|
|
15
20
|
/**
|
|
16
21
|
* Compare the current project graph's canonical edge hash against a
|
|
17
22
|
* lockfile's generated-cache. Offline by design — no upstream resolution.
|
package/script/lock/mod.d.ts
CHANGED
|
@@ -16,7 +16,7 @@ export { checkDrift } from "./check.js";
|
|
|
16
16
|
export { sha256Bytes, sha256String } from "./hash.js";
|
|
17
17
|
export { canonicalEdgeJson, hashCanonicalEdges } from "./canonical_edges.js";
|
|
18
18
|
export type { EdgeQuad } from "./canonical_edges.js";
|
|
19
|
-
export { detectOfflineEdgeDrift } from "./edge_drift.js";
|
|
19
|
+
export { detectOfflineEdgeDrift, formatEdgeDriftMessage, } from "./edge_drift.js";
|
|
20
20
|
export type { OfflineEdgeDrift } from "./edge_drift.js";
|
|
21
21
|
export { verifyUpstreamCache } from "./cache_check.js";
|
|
22
22
|
export { extractEdgeLedger, extractEdgeQuads, resolveBoundEntries, resolveProfileChain, resolveReferences, resolveUpstreams, } from "./resolve.js";
|
package/script/lock/mod.d.ts.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"mod.d.ts","sourceRoot":"","sources":["../../src/lock/mod.ts"],"names":[],"mappings":"AAAA;;;;;;GAMG;AAEH,YAAY,EACV,UAAU,EACV,iBAAiB,EACjB,cAAc,EACd,gBAAgB,EAChB,QAAQ,EACR,QAAQ,EACR,YAAY,EACZ,iBAAiB,EACjB,QAAQ,EACR,kBAAkB,EAClB,eAAe,EACf,iBAAiB,EACjB,gBAAgB,GACjB,MAAM,YAAY,CAAC;AACpB,OAAO,EAAE,uBAAuB,EAAE,MAAM,YAAY,CAAC;AAErD,OAAO,EAAE,iBAAiB,EAAE,MAAM,iBAAiB,CAAC;AACpD,OAAO,EAAE,aAAa,EAAE,MAAM,aAAa,CAAC;AAC5C,YAAY,EAAE,mBAAmB,EAAE,MAAM,aAAa,CAAC;AAEvD,OAAO,EAAE,sBAAsB,EAAE,MAAM,oBAAoB,CAAC;AAE5D,OAAO,EAAE,YAAY,EAAE,MAAM,cAAc,CAAC;AAE5C,OAAO,EAAE,UAAU,EAAE,MAAM,YAAY,CAAC;AAExC,OAAO,EAA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ChB,mBAAmB,EACnB,mBAAmB,EACnB,iBAAiB,EACjB,gBAAgB,GACjB,MAAM,cAAc,CAAC;AACtB,YAAY,EACV,QAAQ,EACR,QAAQ,EACR,kBAAkB,EAClB,eAAe,EACf,iBAAiB,EACjB,iBAAiB,EACjB,uBAAuB,GACxB,MAAM,cAAc,CAAC;AAEtB,OAAO,EACL,gBAAgB,EAChB,wBAAwB,EACxB,iBAAiB,GAClB,MAAM,oBAAoB,CAAC;AAC5B,YAAY,EACV,+BAA+B,EAC/B,8BAA8B,EAC9B,cAAc,GACf,MAAM,oBAAoB,CAAC;AAE5B,OAAO,EACL,KAAK,KAAK,EACV,0BAA0B,EAC1B,KAAK,iCAAiC,EACtC,KAAK,gCAAgC,EACrC,KAAK,cAAc,GACpB,MAAM,oBAAoB,CAAC;AAC5B,OAAO,EACL,KAAK,gBAAgB,EACrB,mBAAmB,EACnB,KAAK,gBAAgB,GACtB,MAAM,sBAAsB,CAAC;AAC9B,OAAO,EACL,KAAK,MAAM,EACX,aAAa,EACb,KAAK,OAAO,EACZ,KAAK,cAAc,EACnB,aAAa,GACd,MAAM,iBAAiB,CAAC"}
|
package/script/lock/mod.js
CHANGED
|
@@ -7,7 +7,7 @@
|
|
|
7
7
|
* for both `markspec lock` and `markspec compile --frozen`.
|
|
8
8
|
*/
|
|
9
9
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
10
|
-
exports.resolveIntent = exports.parseLsRemote = exports.compileAcquiredTree = exports.resolveProjectDependencies = exports.upstreamCacheRoot = exports.resolveProjectReferences = exports.deriveUpstreamId = exports.resolveUpstreams = exports.resolveReferences = exports.resolveProfileChain = exports.resolveBoundEntries = exports.extractEdgeQuads = exports.extractEdgeLedger = exports.verifyUpstreamCache = exports.detectOfflineEdgeDrift = exports.hashCanonicalEdges = exports.canonicalEdgeJson = exports.sha256String = exports.sha256Bytes = exports.checkDrift = exports.isBelowFloor = exports.dependencyPinAssurance = exports.parseLockfile = exports.serializeLockfile = exports.LOCKFILE_SCHEMA_VERSION = void 0;
|
|
10
|
+
exports.resolveIntent = exports.parseLsRemote = exports.compileAcquiredTree = exports.resolveProjectDependencies = exports.upstreamCacheRoot = exports.resolveProjectReferences = exports.deriveUpstreamId = exports.resolveUpstreams = exports.resolveReferences = exports.resolveProfileChain = exports.resolveBoundEntries = exports.extractEdgeQuads = exports.extractEdgeLedger = exports.verifyUpstreamCache = exports.formatEdgeDriftMessage = exports.detectOfflineEdgeDrift = exports.hashCanonicalEdges = exports.canonicalEdgeJson = exports.sha256String = exports.sha256Bytes = exports.checkDrift = exports.isBelowFloor = exports.dependencyPinAssurance = exports.parseLockfile = exports.serializeLockfile = exports.LOCKFILE_SCHEMA_VERSION = void 0;
|
|
11
11
|
var model_js_1 = require("./model.js");
|
|
12
12
|
Object.defineProperty(exports, "LOCKFILE_SCHEMA_VERSION", { enumerable: true, get: function () { return model_js_1.LOCKFILE_SCHEMA_VERSION; } });
|
|
13
13
|
var serializer_js_1 = require("./serializer.js");
|
|
@@ -28,6 +28,7 @@ Object.defineProperty(exports, "canonicalEdgeJson", { enumerable: true, get: fun
|
|
|
28
28
|
Object.defineProperty(exports, "hashCanonicalEdges", { enumerable: true, get: function () { return canonical_edges_js_1.hashCanonicalEdges; } });
|
|
29
29
|
var edge_drift_js_1 = require("./edge_drift.js");
|
|
30
30
|
Object.defineProperty(exports, "detectOfflineEdgeDrift", { enumerable: true, get: function () { return edge_drift_js_1.detectOfflineEdgeDrift; } });
|
|
31
|
+
Object.defineProperty(exports, "formatEdgeDriftMessage", { enumerable: true, get: function () { return edge_drift_js_1.formatEdgeDriftMessage; } });
|
|
31
32
|
var cache_check_js_1 = require("./cache_check.js");
|
|
32
33
|
Object.defineProperty(exports, "verifyUpstreamCache", { enumerable: true, get: function () { return cache_check_js_1.verifyUpstreamCache; } });
|
|
33
34
|
var resolve_js_1 = require("./resolve.js");
|
|
@@ -160,7 +160,7 @@ async function resolveProjectDependencies(opts) {
|
|
|
160
160
|
continue;
|
|
161
161
|
}
|
|
162
162
|
// FIRST-LOCK or UPDATE.
|
|
163
|
-
const intent = ref.version
|
|
163
|
+
const intent = ref.version || "auto";
|
|
164
164
|
const outcome = await firstLockOrUpdate(ref, id, dir, intent, opts.io, opts.lockedAt);
|
|
165
165
|
if ("code" in outcome) {
|
|
166
166
|
diagnostics.push(outcome);
|
package/script/mod.d.ts
CHANGED
|
@@ -8,8 +8,9 @@
|
|
|
8
8
|
* from core/mod.ts, never from internal paths.
|
|
9
9
|
*/
|
|
10
10
|
import "./_dnt.polyfills.js";
|
|
11
|
-
export declare const VERSION = "0.
|
|
12
|
-
export {
|
|
11
|
+
export declare const VERSION = "0.12.1";
|
|
12
|
+
export { DISPLAY_ID_CHAR_RE, DISPLAY_ID_TOKEN_RE } from "./util/display_id.js";
|
|
13
|
+
export { ConfigError, CORE_DISCIPLINE_REGISTRY, CORE_KINDS, CORE_RELATIONS, CORE_SCHEMA_VERSION, DEFAULT_PROJECT_CONFIG, descendantsOf, emittableEntries, formatEntryOrigin, isCorpusEntry, isUpstreamEntry, KNOWN_LINK_KINDS, LOCK_EXTRA_INVERSE_KEYS, makeDisplayId, makeUlid, MIXED_DISCIPLINE, PALETTE_HUES, sameOriginSource, } from "./model/mod.js";
|
|
13
14
|
export type { Attribute, BodyToken, BodyTokenKind, Caption, CaptionConventions, CaptionPosition, ConfigFieldError, DeliveredDocument, Diagnostic, Directive, Discipline, DisciplineRegistry, DisplayId, EarsTrigger, EffectiveProfile, EffectiveTypeDef, EntityRefConvention, Entry, EntryOrigin, EntryShape, EntrySource, ExtractorRule, InlineRef, KindDecl, LabelConcern, LabelConcernKind, LabelValue, Link, LinkKind, LoadedProfile, ModalCase, PaletteHue, ProfileChain, ProfileConvention, ProjectConfig, ProjectRef, ProvenancedMap, ProvenancedMapEntry, ProvenancedValue, RelationDef, Severity, SourceLocation, Ulid, } from "./model/mod.js";
|
|
14
15
|
export { astEquivalent } from "./ast/equivalence.js";
|
|
15
16
|
export { normalizeBodyAst } from "./ast/normalize.js";
|
|
@@ -34,9 +35,11 @@ export { detectCaptions, detectDirectives, detectInlineRefs, isSupportedExtensio
|
|
|
34
35
|
export type { DetectCaptionsOptions, DetectDirectivesOptions, DetectInlineRefsOptions, DocCommentBlockMeta, LanguageDocCommentSpec, LineMap, ParseFileResult, ParseOptions, ParseSourceOptions, ParseSourceResult, SupportedLanguage, } from "./parser/mod.js";
|
|
35
36
|
export { format } from "./formatter/mod.js";
|
|
36
37
|
export type { FormatOptions, FormatResult } from "./formatter/mod.js";
|
|
38
|
+
export { readEntryBody, replaceEntryBody } from "./formatter/entry_body.js";
|
|
39
|
+
export type { EntryBodyEdit, EntryBodyRefusal, } from "./formatter/entry_body.js";
|
|
37
40
|
export { loadMarkdownFormatter, MARKSPEC_MARKDOWN_GLOBAL_CONFIG, MARKSPEC_MARKDOWN_PLUGIN_CONFIG, } from "./formatter/dprint.js";
|
|
38
41
|
export type { ProseFormatOptions, ProseFormatter } from "./formatter/dprint.js";
|
|
39
|
-
export { attributeCorpusDiagnostics, classifyEntriesStage, classifyEntry, compileDisplayIdPattern, detectCorpusCollisions, effectiveScope, effectiveTraceRules, matchesAnyTarget, normalizeListValues, runPipeline, suppressDeclaredAttrR010, validate, validateAttributesForEntry, validateListingDocuments, validateTraceabilityForEntry, validateValue, } from "./validator/mod.js";
|
|
42
|
+
export { applyCorpusPostPass, attributeCorpusDiagnostics, classifyEntriesStage, classifyEntry, compileDisplayIdPattern, detectCorpusCollisions, effectiveScope, effectiveTraceRules, matchesAnyTarget, normalizeListValues, runPipeline, suppressDeclaredAttrR010, validate, validateAttributesForEntry, validateListingDocuments, validateTraceabilityForEntry, validateValue, } from "./validator/mod.js";
|
|
40
43
|
export type { ClassifyResult, ClassifyStageResult, CorpusCollisionResult, EffectiveAttrScope, ListingFileContext, ListingKind, PipelineOptions, PipelineResult, ValidateResult, ValueValidator, } from "./validator/mod.js";
|
|
41
44
|
export { compile, generateInverses, serializeCompileResult, } from "./compiler/mod.js";
|
|
42
45
|
export type { CompileOptions, CompileResult, GenerateInversesResult, SerializedCompileResult, SerializedEntry, SerializedTypeRegistry, } from "./compiler/mod.js";
|
|
@@ -51,12 +54,12 @@ export type { EntryScore, LintDiagnostic, LintOptions, LintResult, RuleContribut
|
|
|
51
54
|
export * as typl from "./typl/mod.js";
|
|
52
55
|
export { uxilDeclaringTypes, validateUxilFamily, } from "./validator/uxil_family.js";
|
|
53
56
|
export * as uxil from "./uxil/mod.js";
|
|
54
|
-
export { canonicalEdgeJson, checkDrift, compileAcquiredTree, dependencyPinAssurance, deriveUpstreamId, detectOfflineEdgeDrift, extractEdgeLedger, extractEdgeQuads, hashCanonicalEdges, isBelowFloor, LOCKFILE_SCHEMA_VERSION, parseLockfile, parseLsRemote, resolveBoundEntries, resolveIntent, resolveProfileChain, resolveProjectDependencies, resolveProjectReferences, resolveReferences, resolveUpstreams, serializeLockfile, sha256Bytes, sha256String, upstreamCacheRoot, verifyUpstreamCache, } from "./lock/mod.js";
|
|
57
|
+
export { canonicalEdgeJson, checkDrift, compileAcquiredTree, dependencyPinAssurance, deriveUpstreamId, detectOfflineEdgeDrift, extractEdgeLedger, extractEdgeQuads, formatEdgeDriftMessage, hashCanonicalEdges, isBelowFloor, LOCKFILE_SCHEMA_VERSION, parseLockfile, parseLsRemote, resolveBoundEntries, resolveIntent, resolveProfileChain, resolveProjectDependencies, resolveProjectReferences, resolveReferences, resolveUpstreams, serializeLockfile, sha256Bytes, sha256String, upstreamCacheRoot, verifyUpstreamCache, } from "./lock/mod.js";
|
|
55
58
|
export type { AcquireCompileIO, BoundEntry as LockBoundEntry, BoundEntryBinding as LockBinding, CompiledSnapshot, EdgeQuad, FetchUrl, GeneratedCache, GitIO, GitRef, LockedAttributes, LockEdge, Lockfile, LockfileMeta, LockfileToolchain, OfflineEdgeDrift, ParseLockfileResult, ReadFile as LockReadFile, RefList, ResolvedBoundEntry, ResolvedIntent, ResolvedProfile, ResolvedReference, ResolvedUpstreams, ResolveProjectDependenciesOptions, ResolveProjectDependenciesResult, ResolveProjectReferencesOptions, ResolveProjectReferencesResult, ResolveUpstreamsOptions, Upstream, UpstreamDependency, UpstreamDepsIO, UpstreamProfile, UpstreamReference, UpstreamRefsIO, UpstreamRegistry, } from "./lock/mod.js";
|
|
56
59
|
export { buildRefIndex, canonicalizeRefs, TRACE_ATTRIBUTE_KEYS, } from "./refs/mod.js";
|
|
57
60
|
export type { RefIndex } from "./refs/mod.js";
|
|
58
61
|
export { fmtDriftGate, lockfileDriftGate, proseLintGate } from "./gates/mod.js";
|
|
59
|
-
export { FENCE_RE, isLineFenced, walkProseLines } from "./util/fence.js";
|
|
62
|
+
export { FENCE_RE, fencedCodeLines, isLineFenced, walkProseLines, } from "./util/fence.js";
|
|
60
63
|
export type { ProseLineCallback } from "./util/fence.js";
|
|
61
64
|
export { isUnsafeRelPath } from "./util/paths.js";
|
|
62
65
|
export { aggregateStatusByState, encodeLogLine, inferLockedAttributes, parseLogLine, parseMapping, validateMappings, } from "./sync/mod.js";
|
|
@@ -64,7 +67,9 @@ export type { AttributeMapping, BoundEntryStatus, ConflictPolicy, Direction as S
|
|
|
64
67
|
export { type Arch as SelfUpgradeArch, assertTrustedReleaseUrl, classifyInstallPath, type ClassifyResult as SelfUpgradeClassifyResult, compareVersions, type Comparison, DEFAULT_RELEASES_API, DEFAULT_RELEASES_DOWNLOAD_BASE, detectTarget, type InstallSource, type Os as SelfUpgradeOs, parseSha256Line, type Platform as SelfUpgradePlatform, platformFromBuild, type ReleaseAssets, releaseAssets, type ReleaseEndpoints, type ResolveEndpointsInput, resolveReleaseEndpoints, type Target as SelfUpgradeTarget, } from "./self_upgrade/mod.js";
|
|
65
68
|
export { discoverFiles, isIgnored, MARKDOWN_EXTENSIONS, parseGitignore, RELEVANT_EXTENSIONS, SOURCE_EXTENSIONS, } from "./discovery/mod.js";
|
|
66
69
|
export type { DiscoverOptions, DiscoveryDirEntry, DiscoveryIO, GitignoreRule, } from "./discovery/mod.js";
|
|
67
|
-
export {
|
|
70
|
+
export { createProjectRootResolver, discoverProjectRoots, findNestedProjectRoots, isWithin, nearestRoot, resolveConfigRoot, } from "./discovery/projects.js";
|
|
71
|
+
export type { ProjectDiscoveryOptions, ProjectRootResolver, } from "./discovery/projects.js";
|
|
72
|
+
export { collectProjectEntries, UnreadableProjectFileError, } from "./collect/mod.js";
|
|
68
73
|
export type { CollectOptions } from "./collect/mod.js";
|
|
69
74
|
export { checkSnapshotSchema, deserializeEntry, extractSerializedEntries, } from "./compiler/deserialize.js";
|
|
70
75
|
export type { ExtractedEntries } from "./compiler/deserialize.js";
|
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,WAAW,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,WAAW,CAAC;AAEhC,OAAO,EAAE,kBAAkB,EAAE,mBAAmB,EAAE,MAAM,sBAAsB,CAAC;AAG/E,OAAO,EACL,WAAW,EACX,wBAAwB,EACxB,UAAU,EACV,cAAc,EACd,mBAAmB,EACnB,sBAAsB,EACtB,aAAa,EACb,gBAAgB,EAChB,iBAAiB,EACjB,aAAa,EACb,eAAe,EACf,gBAAgB,EAChB,uBAAuB,EACvB,aAAa,EACb,QAAQ,EACR,gBAAgB,EAChB,YAAY,EACZ,gBAAgB,GACjB,MAAM,gBAAgB,CAAC;AACxB,YAAY,EACV,SAAS,EACT,SAAS,EACT,aAAa,EACb,OAAO,EACP,kBAAkB,EAClB,eAAe,EACf,gBAAgB,EAChB,iBAAiB,EACjB,UAAU,EACV,SAAS,EACT,UAAU,EACV,kBAAkB,EAClB,SAAS,EACT,W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aAAa,EACxB,eAAe,EACf,KAAK,QAAQ,IAAI,mBAAmB,EACpC,iBAAiB,EACjB,KAAK,aAAa,EAClB,aAAa,EACb,KAAK,gBAAgB,EACrB,KAAK,qBAAqB,EAC1B,uBAAuB,EACvB,KAAK,MAAM,IAAI,iBAAiB,GACjC,MAAM,uBAAuB,CAAC;AAG/B,OAAO,EACL,aAAa,EACb,SAAS,EACT,mBAAmB,EACnB,cAAc,EACd,mBAAmB,EACnB,iBAAiB,GAClB,MAAM,oBAAoB,CAAC;AAC5B,YAAY,EACV,eAAe,EACf,iBAAiB,EACjB,WAAW,EACX,aAAa,GACd,MAAM,oBAAoB,CAAC;AAC5B,OAAO,EACL,yBAAyB,EACzB,oBAAoB,EACpB,sBAAsB,EACtB,QAAQ,EACR,WAAW,EACX,iBAAiB,GAClB,MAAM,yBAAyB,CAAC;AACjC,YAAY,EACV,uBAAuB,EACvB,mBAAmB,GACpB,MAAM,yBAAyB,CAAC;AAGjC,OAAO,EACL,qBAAqB,EACrB,0BAA0B,GAC3B,MAAM,kBAAkB,CAAC;AAC1B,YAAY,EAAE,cAAc,EAAE,MAAM,kBAAkB,CAAC;AAGvD,OAAO,EACL,mBAAmB,EACnB,gBAAgB,EAChB,wBAAwB,GACzB,MAAM,2BAA2B,CAAC;AACnC,YAAY,EAAE,gBAAgB,EAAE,MAAM,2BAA2B,CAAC;AAGlE,OAAO,EAAE,kBAAkB,EAAE,MAAM,mBAAmB,CAAC;AACvD,YAAY,EACV,wBAAwB,EACxB,mBAAmB,GACpB,MAAM,mBAAmB,CAAC;AAG3B,OAAO,EAAE,wBAAwB,EAAE,MAAM,oBAAoB,CAAC;AAG9D,OAAO,EAAE,oBAAoB,EAAE,MAAM,uBAAuB,CAAC"}
|
package/script/mod.js
CHANGED
|
@@ -33,10 +33,10 @@ var __importStar = (this && this.__importStar) || (function () {
|
|
|
33
33
|
};
|
|
34
34
|
})();
|
|
35
35
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
36
|
-
exports.
|
|
37
|
-
exports.
|
|
38
|
-
exports.
|
|
39
|
-
exports.loadProjectUpstreams = exports.upstreamRefsFromLockfile = exports.loadUpstreamCorpus = exports.extractSerializedEntries = exports.deserializeEntry = exports.checkSnapshotSchema = exports.collectProjectEntries = exports.SOURCE_EXTENSIONS = exports.RELEVANT_EXTENSIONS = exports.parseGitignore = exports.MARKDOWN_EXTENSIONS = exports.isIgnored = exports.discoverFiles = exports.resolveReleaseEndpoints = exports.releaseAssets = exports.platformFromBuild = exports.parseSha256Line = void 0;
|
|
36
|
+
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.loadToolConfig = exports.discoverMarkspecRoot = exports.DEFAULT_TOOL_CONFIG = exports.addProfileSpecifier = exports.parseProjectConfig = exports.loadConfig = exports.discoverProjectRoot = exports.render = exports.normalizeBodyAst = exports.astEquivalent = exports.sameOriginSource = exports.PALETTE_HUES = exports.MIXED_DISCIPLINE = exports.makeUlid = exports.makeDisplayId = exports.LOCK_EXTRA_INVERSE_KEYS = exports.KNOWN_LINK_KINDS = exports.isUpstreamEntry = exports.isCorpusEntry = exports.formatEntryOrigin = exports.emittableEntries = exports.descendantsOf = exports.DEFAULT_PROJECT_CONFIG = exports.CORE_SCHEMA_VERSION = exports.CORE_RELATIONS = exports.CORE_KINDS = exports.CORE_DISCIPLINE_REGISTRY = exports.ConfigError = exports.DISPLAY_ID_TOKEN_RE = exports.DISPLAY_ID_CHAR_RE = exports.VERSION = void 0;
|
|
37
|
+
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.detectCorpusCollisions = exports.compileDisplayIdPattern = exports.classifyEntry = exports.classifyEntriesStage = exports.attributeCorpusDiagnostics = exports.applyCorpusPostPass = exports.MARKSPEC_MARKDOWN_PLUGIN_CONFIG = exports.MARKSPEC_MARKDOWN_GLOBAL_CONFIG = exports.loadMarkdownFormatter = exports.replaceEntryBody = exports.readEntryBody = exports.format = exports.parseSource = exports.parseFile = exports.parse = exports.loadGrammar = exports.isSupportedExtension = exports.detectInlineRefs = exports.detectDirectives = exports.detectCaptions = exports.loadDeliveredCorpus = exports.deliveredPathIsContained = exports.corpusOriginLabel = exports.buildCorpusIndex = exports.buildProfileIntrospection = exports.targetsForRelation = exports.filterEntriesByTraceTargets = exports.entryMatchesTargets = exports.validateDisplayIdPattern = exports.parseDisplayIdPattern = exports.padDisplayIdNumber = exports.highestDisplayIdNumber = void 0;
|
|
38
|
+
exports.parseLogLine = exports.inferLockedAttributes = exports.encodeLogLine = exports.aggregateStatusByState = exports.isUnsafeRelPath = exports.walkProseLines = exports.isLineFenced = exports.fencedCodeLines = exports.FENCE_RE = exports.proseLintGate = exports.lockfileDriftGate = exports.fmtDriftGate = exports.TRACE_ATTRIBUTE_KEYS = exports.canonicalizeRefs = exports.buildRefIndex = exports.verifyUpstreamCache = exports.upstreamCacheRoot = exports.sha256String = exports.sha256Bytes = exports.serializeLockfile = exports.resolveUpstreams = exports.resolveReferences = exports.resolveProjectReferences = exports.resolveProjectDependencies = exports.resolveProfileChain = exports.resolveIntent = exports.resolveBoundEntries = exports.parseLsRemote = exports.parseLockfile = exports.LOCKFILE_SCHEMA_VERSION = exports.isBelowFloor = exports.hashCanonicalEdges = exports.formatEdgeDriftMessage = exports.extractEdgeQuads = exports.extractEdgeLedger = exports.detectOfflineEdgeDrift = exports.deriveUpstreamId = exports.dependencyPinAssurance = exports.compileAcquiredTree = exports.checkDrift = exports.canonicalEdgeJson = exports.uxil = exports.validateUxilFamily = exports.uxilDeclaringTypes = exports.typl = exports.runLint = exports.isProseScope = exports.computeScoreRollup = exports.ANTI_PATTERN_NOTE = exports.report = void 0;
|
|
39
|
+
exports.loadProjectUpstreams = exports.upstreamRefsFromLockfile = exports.loadUpstreamCorpus = exports.extractSerializedEntries = exports.deserializeEntry = exports.checkSnapshotSchema = exports.UnreadableProjectFileError = exports.collectProjectEntries = exports.resolveConfigRoot = exports.nearestRoot = exports.isWithin = exports.findNestedProjectRoots = exports.discoverProjectRoots = exports.createProjectRootResolver = exports.SOURCE_EXTENSIONS = exports.RELEVANT_EXTENSIONS = exports.parseGitignore = exports.MARKDOWN_EXTENSIONS = exports.isIgnored = exports.discoverFiles = exports.resolveReleaseEndpoints = exports.releaseAssets = exports.platformFromBuild = exports.parseSha256Line = exports.detectTarget = exports.DEFAULT_RELEASES_DOWNLOAD_BASE = exports.DEFAULT_RELEASES_API = exports.compareVersions = exports.classifyInstallPath = exports.assertTrustedReleaseUrl = exports.validateMappings = exports.parseMapping = void 0;
|
|
40
40
|
/**
|
|
41
41
|
* @module core
|
|
42
42
|
*
|
|
@@ -47,7 +47,10 @@ exports.loadProjectUpstreams = exports.upstreamRefsFromLockfile = exports.loadUp
|
|
|
47
47
|
* from core/mod.ts, never from internal paths.
|
|
48
48
|
*/
|
|
49
49
|
require("./_dnt.polyfills.js");
|
|
50
|
-
exports.VERSION = "0.
|
|
50
|
+
exports.VERSION = "0.12.1";
|
|
51
|
+
var display_id_js_1 = require("./util/display_id.js");
|
|
52
|
+
Object.defineProperty(exports, "DISPLAY_ID_CHAR_RE", { enumerable: true, get: function () { return display_id_js_1.DISPLAY_ID_CHAR_RE; } });
|
|
53
|
+
Object.defineProperty(exports, "DISPLAY_ID_TOKEN_RE", { enumerable: true, get: function () { return display_id_js_1.DISPLAY_ID_TOKEN_RE; } });
|
|
51
54
|
// Model types
|
|
52
55
|
var mod_js_1 = require("./model/mod.js");
|
|
53
56
|
Object.defineProperty(exports, "ConfigError", { enumerable: true, get: function () { return mod_js_1.ConfigError; } });
|
|
@@ -59,6 +62,7 @@ Object.defineProperty(exports, "DEFAULT_PROJECT_CONFIG", { enumerable: true, get
|
|
|
59
62
|
Object.defineProperty(exports, "descendantsOf", { enumerable: true, get: function () { return mod_js_1.descendantsOf; } });
|
|
60
63
|
Object.defineProperty(exports, "emittableEntries", { enumerable: true, get: function () { return mod_js_1.emittableEntries; } });
|
|
61
64
|
Object.defineProperty(exports, "formatEntryOrigin", { enumerable: true, get: function () { return mod_js_1.formatEntryOrigin; } });
|
|
65
|
+
Object.defineProperty(exports, "isCorpusEntry", { enumerable: true, get: function () { return mod_js_1.isCorpusEntry; } });
|
|
62
66
|
Object.defineProperty(exports, "isUpstreamEntry", { enumerable: true, get: function () { return mod_js_1.isUpstreamEntry; } });
|
|
63
67
|
Object.defineProperty(exports, "KNOWN_LINK_KINDS", { enumerable: true, get: function () { return mod_js_1.KNOWN_LINK_KINDS; } });
|
|
64
68
|
Object.defineProperty(exports, "LOCK_EXTRA_INVERSE_KEYS", { enumerable: true, get: function () { return mod_js_1.LOCK_EXTRA_INVERSE_KEYS; } });
|
|
@@ -139,12 +143,16 @@ Object.defineProperty(exports, "parseSource", { enumerable: true, get: function
|
|
|
139
143
|
// Formatter
|
|
140
144
|
var mod_js_10 = require("./formatter/mod.js");
|
|
141
145
|
Object.defineProperty(exports, "format", { enumerable: true, get: function () { return mod_js_10.format; } });
|
|
146
|
+
var entry_body_js_1 = require("./formatter/entry_body.js");
|
|
147
|
+
Object.defineProperty(exports, "readEntryBody", { enumerable: true, get: function () { return entry_body_js_1.readEntryBody; } });
|
|
148
|
+
Object.defineProperty(exports, "replaceEntryBody", { enumerable: true, get: function () { return entry_body_js_1.replaceEntryBody; } });
|
|
142
149
|
var dprint_js_1 = require("./formatter/dprint.js");
|
|
143
150
|
Object.defineProperty(exports, "loadMarkdownFormatter", { enumerable: true, get: function () { return dprint_js_1.loadMarkdownFormatter; } });
|
|
144
151
|
Object.defineProperty(exports, "MARKSPEC_MARKDOWN_GLOBAL_CONFIG", { enumerable: true, get: function () { return dprint_js_1.MARKSPEC_MARKDOWN_GLOBAL_CONFIG; } });
|
|
145
152
|
Object.defineProperty(exports, "MARKSPEC_MARKDOWN_PLUGIN_CONFIG", { enumerable: true, get: function () { return dprint_js_1.MARKSPEC_MARKDOWN_PLUGIN_CONFIG; } });
|
|
146
153
|
// Validator
|
|
147
154
|
var mod_js_11 = require("./validator/mod.js");
|
|
155
|
+
Object.defineProperty(exports, "applyCorpusPostPass", { enumerable: true, get: function () { return mod_js_11.applyCorpusPostPass; } });
|
|
148
156
|
Object.defineProperty(exports, "attributeCorpusDiagnostics", { enumerable: true, get: function () { return mod_js_11.attributeCorpusDiagnostics; } });
|
|
149
157
|
Object.defineProperty(exports, "classifyEntriesStage", { enumerable: true, get: function () { return mod_js_11.classifyEntriesStage; } });
|
|
150
158
|
Object.defineProperty(exports, "classifyEntry", { enumerable: true, get: function () { return mod_js_11.classifyEntry; } });
|
|
@@ -196,6 +204,7 @@ Object.defineProperty(exports, "deriveUpstreamId", { enumerable: true, get: func
|
|
|
196
204
|
Object.defineProperty(exports, "detectOfflineEdgeDrift", { enumerable: true, get: function () { return mod_js_15.detectOfflineEdgeDrift; } });
|
|
197
205
|
Object.defineProperty(exports, "extractEdgeLedger", { enumerable: true, get: function () { return mod_js_15.extractEdgeLedger; } });
|
|
198
206
|
Object.defineProperty(exports, "extractEdgeQuads", { enumerable: true, get: function () { return mod_js_15.extractEdgeQuads; } });
|
|
207
|
+
Object.defineProperty(exports, "formatEdgeDriftMessage", { enumerable: true, get: function () { return mod_js_15.formatEdgeDriftMessage; } });
|
|
199
208
|
Object.defineProperty(exports, "hashCanonicalEdges", { enumerable: true, get: function () { return mod_js_15.hashCanonicalEdges; } });
|
|
200
209
|
Object.defineProperty(exports, "isBelowFloor", { enumerable: true, get: function () { return mod_js_15.isBelowFloor; } });
|
|
201
210
|
Object.defineProperty(exports, "LOCKFILE_SCHEMA_VERSION", { enumerable: true, get: function () { return mod_js_15.LOCKFILE_SCHEMA_VERSION; } });
|
|
@@ -226,6 +235,7 @@ Object.defineProperty(exports, "proseLintGate", { enumerable: true, get: functio
|
|
|
226
235
|
// ── Fenced-code-block detection (#668/#679/#680) ──────────────────────────
|
|
227
236
|
var fence_js_1 = require("./util/fence.js");
|
|
228
237
|
Object.defineProperty(exports, "FENCE_RE", { enumerable: true, get: function () { return fence_js_1.FENCE_RE; } });
|
|
238
|
+
Object.defineProperty(exports, "fencedCodeLines", { enumerable: true, get: function () { return fence_js_1.fencedCodeLines; } });
|
|
229
239
|
Object.defineProperty(exports, "isLineFenced", { enumerable: true, get: function () { return fence_js_1.isLineFenced; } });
|
|
230
240
|
Object.defineProperty(exports, "walkProseLines", { enumerable: true, get: function () { return fence_js_1.walkProseLines; } });
|
|
231
241
|
var paths_js_1 = require("./util/paths.js");
|
|
@@ -258,9 +268,17 @@ Object.defineProperty(exports, "MARKDOWN_EXTENSIONS", { enumerable: true, get: f
|
|
|
258
268
|
Object.defineProperty(exports, "parseGitignore", { enumerable: true, get: function () { return mod_js_20.parseGitignore; } });
|
|
259
269
|
Object.defineProperty(exports, "RELEVANT_EXTENSIONS", { enumerable: true, get: function () { return mod_js_20.RELEVANT_EXTENSIONS; } });
|
|
260
270
|
Object.defineProperty(exports, "SOURCE_EXTENSIONS", { enumerable: true, get: function () { return mod_js_20.SOURCE_EXTENSIONS; } });
|
|
271
|
+
var projects_js_1 = require("./discovery/projects.js");
|
|
272
|
+
Object.defineProperty(exports, "createProjectRootResolver", { enumerable: true, get: function () { return projects_js_1.createProjectRootResolver; } });
|
|
273
|
+
Object.defineProperty(exports, "discoverProjectRoots", { enumerable: true, get: function () { return projects_js_1.discoverProjectRoots; } });
|
|
274
|
+
Object.defineProperty(exports, "findNestedProjectRoots", { enumerable: true, get: function () { return projects_js_1.findNestedProjectRoots; } });
|
|
275
|
+
Object.defineProperty(exports, "isWithin", { enumerable: true, get: function () { return projects_js_1.isWithin; } });
|
|
276
|
+
Object.defineProperty(exports, "nearestRoot", { enumerable: true, get: function () { return projects_js_1.nearestRoot; } });
|
|
277
|
+
Object.defineProperty(exports, "resolveConfigRoot", { enumerable: true, get: function () { return projects_js_1.resolveConfigRoot; } });
|
|
261
278
|
// ── Project-entry collection (discover + parse → Entry[]) ────────────────
|
|
262
279
|
var mod_js_21 = require("./collect/mod.js");
|
|
263
280
|
Object.defineProperty(exports, "collectProjectEntries", { enumerable: true, get: function () { return mod_js_21.collectProjectEntries; } });
|
|
281
|
+
Object.defineProperty(exports, "UnreadableProjectFileError", { enumerable: true, get: function () { return mod_js_21.UnreadableProjectFileError; } });
|
|
264
282
|
// ── Compiled-snapshot deserialization (federated upstream, slice 1) ──────
|
|
265
283
|
var deserialize_js_1 = require("./compiler/deserialize.js");
|
|
266
284
|
Object.defineProperty(exports, "checkSnapshotSchema", { enumerable: true, get: function () { return deserialize_js_1.checkSnapshotSchema; } });
|
package/script/model/mod.d.ts
CHANGED
|
@@ -306,6 +306,16 @@ export type EntryOrigin = {
|
|
|
306
306
|
readonly upstreamId: string;
|
|
307
307
|
readonly version: string;
|
|
308
308
|
};
|
|
309
|
+
/**
|
|
310
|
+
* Whether an entry belongs to a read-only corpus: a profile-delivered
|
|
311
|
+
* document or a locked upstream snapshot. Project-authored entries have no
|
|
312
|
+
* origin. This is broader than {@linkcode isUpstreamEntry}: profile corpus
|
|
313
|
+
* entries remain structurally validated but are excluded from prose lint
|
|
314
|
+
* and project-owned gates.
|
|
315
|
+
*/
|
|
316
|
+
export declare function isCorpusEntry(entry: Entry): entry is Entry & {
|
|
317
|
+
origin: EntryOrigin;
|
|
318
|
+
};
|
|
309
319
|
/**
|
|
310
320
|
* Human-facing `<profileId>@<profileVersion>` (or `<upstreamId>@<version>`)
|
|
311
321
|
* label for an entry's origin (ADR-030). The single formatter for the origin
|
|
@@ -428,6 +438,17 @@ export interface Entry {
|
|
|
428
438
|
* `location.line + 1` when absent.
|
|
429
439
|
*/
|
|
430
440
|
readonly bodyStartLine?: number;
|
|
441
|
+
/**
|
|
442
|
+
* 1-based line of the last content line of the entry's list item, from
|
|
443
|
+
* the mdast item position. It includes a CommonMark lazy continuation
|
|
444
|
+
* line and the trailer, and excludes the blank lines after the item.
|
|
445
|
+
* The formatter uses it to find where the item ends, which an
|
|
446
|
+
* indentation scan cannot tell for a lazy continuation line.
|
|
447
|
+
*
|
|
448
|
+
* Optional so test fixtures and pipeline stages that do not set it can
|
|
449
|
+
* remain unchanged.
|
|
450
|
+
*/
|
|
451
|
+
readonly endLine?: number;
|
|
431
452
|
/** Whether this came from a Markdown file or a doc comment. */
|
|
432
453
|
readonly source: EntrySource;
|
|
433
454
|
/**
|
|
@@ -522,7 +543,7 @@ export type CaptionConventions = Readonly<Partial<Record<string, CaptionPosition
|
|
|
522
543
|
* `driftsys/schemas` `project/v1.json` `$defs/projectRef`). Used by the
|
|
523
544
|
* `dependencies:` (git repositories) and `references:` (published sites)
|
|
524
545
|
* lists. `version` carries intent: an exact tag is a frozen baseline, a
|
|
525
|
-
* branch name tracks its head, absent means auto (latest semver release
|
|
546
|
+
* branch name tracks its head, absent or empty means auto (latest semver release
|
|
526
547
|
* tag, else default-branch head). `name` is the upstream id used for the
|
|
527
548
|
* cache directory, lockfile rows, and origin badges; derived from the URL
|
|
528
549
|
* when absent.
|