@driftsys/markspec 0.12.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/esm/config/markspec.d.ts +2 -2
- package/esm/config/mod.d.ts.map +1 -1
- package/esm/config/mod.js +47 -5
- package/esm/discovery/projects.d.ts +6 -4
- package/esm/discovery/projects.d.ts.map +1 -1
- package/esm/discovery/projects.js +27 -17
- package/esm/formatter/entry_body.d.ts +5 -7
- package/esm/formatter/entry_body.d.ts.map +1 -1
- package/esm/formatter/entry_body.js +13 -9
- 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 +4 -1
- package/esm/formatter/mod.d.ts.map +1 -1
- package/esm/formatter/mod.js +206 -8
- 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 +1 -1
- package/esm/lock/upstream_deps.js +1 -1
- package/esm/mod.d.ts +2 -1
- package/esm/mod.d.ts.map +1 -1
- package/esm/mod.js +2 -1
- package/esm/model/mod.d.ts +1 -1
- package/esm/refs/mod.d.ts +6 -2
- package/esm/refs/mod.d.ts.map +1 -1
- package/esm/refs/mod.js +8 -3
- 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/validator/pipeline.d.ts +6 -4
- package/esm/validator/pipeline.d.ts.map +1 -1
- package/esm/validator/pipeline.js +13 -11
- package/package.json +1 -1
- package/script/config/markspec.d.ts +2 -2
- package/script/config/mod.d.ts.map +1 -1
- package/script/config/mod.js +47 -5
- package/script/discovery/projects.d.ts +6 -4
- package/script/discovery/projects.d.ts.map +1 -1
- package/script/discovery/projects.js +27 -17
- package/script/formatter/entry_body.d.ts +5 -7
- package/script/formatter/entry_body.d.ts.map +1 -1
- package/script/formatter/entry_body.js +13 -9
- 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 +4 -1
- package/script/formatter/mod.d.ts.map +1 -1
- package/script/formatter/mod.js +205 -7
- 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 +1 -1
- package/script/lock/upstream_deps.js +1 -1
- package/script/mod.d.ts +2 -1
- package/script/mod.d.ts.map +1 -1
- package/script/mod.js +8 -5
- package/script/model/mod.d.ts +1 -1
- package/script/refs/mod.d.ts +6 -2
- package/script/refs/mod.d.ts.map +1 -1
- package/script/refs/mod.js +8 -3
- 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/validator/pipeline.d.ts +6 -4
- package/script/validator/pipeline.d.ts.map +1 -1
- package/script/validator/pipeline.js +13 -11
|
@@ -6,6 +6,7 @@
|
|
|
6
6
|
* and requirement block insertion.
|
|
7
7
|
*/
|
|
8
8
|
import type { Attribute, Diagnostic } from "../model/mod.js";
|
|
9
|
+
import { type EntryExtent } from "./prose.js";
|
|
9
10
|
import { type ProseFormatter } from "./dprint.js";
|
|
10
11
|
/**
|
|
11
12
|
* Decide whether the EARS keyword at `offset` in `line` is at sentence
|
|
@@ -76,6 +77,8 @@ export interface FormatResult {
|
|
|
76
77
|
readonly diagnostics: readonly Diagnostic[];
|
|
77
78
|
/** Whether any changes were made. */
|
|
78
79
|
readonly changed: boolean;
|
|
80
|
+
/** Output line spans (0-based, end exclusive) kept unchanged after refusal. */
|
|
81
|
+
readonly preservedRanges?: readonly EntryExtent[];
|
|
79
82
|
}
|
|
80
83
|
/**
|
|
81
84
|
* Format a Markdown string — normalize attribute blocks,
|
|
@@ -143,7 +146,7 @@ export declare function findItemEnd(lines: readonly string[], startIdx: number,
|
|
|
143
146
|
* Scans forward from the entry start to find the list item boundary,
|
|
144
147
|
* then walks backwards to find the contiguous trailing attribute block.
|
|
145
148
|
*/
|
|
146
|
-
export declare function findAttributeBlockRange(lines: readonly string[], entryStartLine: number, indent: number, itemEndFloor?: number): {
|
|
149
|
+
export declare function findAttributeBlockRange(lines: readonly string[], entryStartLine: number, indent: number, itemEndFloor?: number, preservedRanges?: readonly EntryExtent[]): {
|
|
147
150
|
start: number;
|
|
148
151
|
end: number;
|
|
149
152
|
} | undefined;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"mod.d.ts","sourceRoot":"","sources":["../../src/formatter/mod.ts"],"names":[],"mappings":"AAAA;;;;;;GAMG;AAKH,OAAO,KAAK,EACV,SAAS,EACT,UAAU,EAGX,MAAM,iBAAiB,CAAC;
|
|
1
|
+
{"version":3,"file":"mod.d.ts","sourceRoot":"","sources":["../../src/formatter/mod.ts"],"names":[],"mappings":"AAAA;;;;;;GAMG;AAKH,OAAO,KAAK,EACV,SAAS,EACT,UAAU,EAGX,MAAM,iBAAiB,CAAC;AAyBzB,OAAO,EAAE,KAAK,WAAW,EAAuB,MAAM,YAAY,CAAC;AAOnE,OAAO,EAEL,KAAK,cAAc,EACpB,MAAM,aAAa,CAAC;AAGrB;;;;;GAKG;AACH,wBAAgB,iBAAiB,CAAC,IAAI,EAAE,MAAM,EAAE,MAAM,EAAE,MAAM,GAAG,OAAO,CAEvE;AAED;;;;;;;;;;;;;;;;;;;;;;GAsBG;AACH,wBAAgB,sBAAsB,CAAC,QAAQ,EAAE,MAAM,GAAG,MAAM,CAE/D;AA4WD,sCAA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B,MAAM,EAAE,MAAM,EACd,YAAY,SAAI,GACf,MAAM,CAkBR;AA0FD;;;;;;GAMG;AACH,wBAAgB,uBAAuB,CACrC,KAAK,EAAE,SAAS,MAAM,EAAE,EACxB,cAAc,EAAE,MAAM,EACtB,MAAM,EAAE,MAAM,EACd,YAAY,SAAI,EAChB,eAAe,GAAE,SAAS,WAAW,EAAO,GAC3C;IAAE,KAAK,EAAE,MAAM,CAAC;IAAC,GAAG,EAAE,MAAM,CAAA;CAAE,GAAG,SAAS,CA8B5C"}
|
package/script/formatter/mod.js
CHANGED
|
@@ -34,6 +34,7 @@ const normalize_js_1 = require("../ast/normalize.js");
|
|
|
34
34
|
const equivalence_js_1 = require("../ast/equivalence.js");
|
|
35
35
|
const prose_js_1 = require("./prose.js");
|
|
36
36
|
const entry_body_js_1 = require("./entry_body.js");
|
|
37
|
+
const tab_markers_js_1 = require("./tab_markers.js");
|
|
37
38
|
const dprint_js_1 = require("./dprint.js");
|
|
38
39
|
const md_equiv_js_1 = require("./md_equiv.js");
|
|
39
40
|
/**
|
|
@@ -220,10 +221,60 @@ function emitBodyViaAst(lines, file, diagnostics, cachedEntries, proseFormat) {
|
|
|
220
221
|
// Process bottom-to-top so splices don't shift earlier entry positions.
|
|
221
222
|
const sorted = [...entries].sort((a, b) => b.location.line - a.location.line);
|
|
222
223
|
for (const entry of sorted) {
|
|
224
|
+
const protectedRanges = (0, tab_markers_js_1.protectedTabRanges)(lines);
|
|
225
|
+
const start = entry.location.line - 1;
|
|
226
|
+
if (protectedRanges.some((range) => start >= range.start && start < range.end))
|
|
227
|
+
continue;
|
|
228
|
+
const children = protectedRanges.filter((range, index) => range.start > start && range.start < (entry.endLine ?? start) &&
|
|
229
|
+
!protectedRanges.some((outer, other) => other !== index &&
|
|
230
|
+
outer.start < range.start && outer.end >= range.end));
|
|
231
|
+
if (children.length > 0) {
|
|
232
|
+
// Format the parent's prose with each refused child represented by a
|
|
233
|
+
// verbatim block, then restore the original child lines.
|
|
234
|
+
const end = entry.endLine;
|
|
235
|
+
const fragment = lines.slice(start, end);
|
|
236
|
+
const indent = (0, entry_body_js_1.contentColumn)(lines[start], entry.location.column - 1);
|
|
237
|
+
const replacements = [];
|
|
238
|
+
for (const child of children.toReversed()) {
|
|
239
|
+
const childEnd = Math.min(child.end, end);
|
|
240
|
+
let token = "<!-- markspec-preserved-child -->";
|
|
241
|
+
while (lines.some((line) => line.includes(token)) ||
|
|
242
|
+
replacements.some((r) => r.token === token))
|
|
243
|
+
token = token.replace(" -->", "- -->");
|
|
244
|
+
replacements.push({
|
|
245
|
+
token,
|
|
246
|
+
original: lines.slice(child.start, childEnd),
|
|
247
|
+
});
|
|
248
|
+
fragment.splice(child.start - start, childEnd - child.start, " ".repeat(indent) + token, "");
|
|
249
|
+
}
|
|
250
|
+
const nestedDiagnostics = [];
|
|
251
|
+
emitBodyViaAst(fragment, file, nestedDiagnostics, undefined, proseFormat);
|
|
252
|
+
for (const { token, original } of replacements) {
|
|
253
|
+
const at = fragment.findIndex((line) => line.trim() === token);
|
|
254
|
+
if (at < 0)
|
|
255
|
+
throw new Error("Preserved child placeholder was lost");
|
|
256
|
+
let after = at + 1;
|
|
257
|
+
while (after < fragment.length && fragment[after].trim() === "") {
|
|
258
|
+
after++;
|
|
259
|
+
}
|
|
260
|
+
fragment.splice(at, after - at, ...original);
|
|
261
|
+
}
|
|
262
|
+
diagnostics.push(...nestedDiagnostics.map((d) => ({
|
|
263
|
+
...d,
|
|
264
|
+
location: d.location
|
|
265
|
+
? { ...d.location, line: d.location.line + start }
|
|
266
|
+
: undefined,
|
|
267
|
+
})));
|
|
268
|
+
if (fragment.join("\n") !== lines.slice(start, end).join("\n")) {
|
|
269
|
+
lines.splice(start, end - start, ...fragment);
|
|
270
|
+
bodyChanged = true;
|
|
271
|
+
}
|
|
272
|
+
continue;
|
|
273
|
+
}
|
|
223
274
|
if (!entry.body.trim())
|
|
224
275
|
continue; // empty or whitespace-only body
|
|
225
276
|
// List-item continuation indent: the item's content column, which
|
|
226
|
-
//
|
|
277
|
+
// counts every space and tab after the marker (#865).
|
|
227
278
|
const indent = (0, entry_body_js_1.contentColumn)(lines[entry.location.line - 1] ?? "", entry.location.column - 1);
|
|
228
279
|
const indentStr = " ".repeat(indent);
|
|
229
280
|
const titleLineIdx = entry.location.line - 1; // 0-based
|
|
@@ -365,6 +416,97 @@ function stampDisciplineFrozen(value, today) {
|
|
|
365
416
|
}
|
|
366
417
|
return value;
|
|
367
418
|
}
|
|
419
|
+
/**
|
|
420
|
+
* Normalize tab markers before any pass can stamp or splice their entries.
|
|
421
|
+
* Compare whole documents so a neighbouring list cannot become a child.
|
|
422
|
+
*/
|
|
423
|
+
function normalizeTabMarkers(markdown, options, diagnostics) {
|
|
424
|
+
const lines = markdown.split("\n");
|
|
425
|
+
const original = [...lines];
|
|
426
|
+
const markers = (0, tab_markers_js_1.tabMarkers)(lines).sort((a, b) => b.start - a.start);
|
|
427
|
+
if (markers.length === 0)
|
|
428
|
+
return markdown;
|
|
429
|
+
const accepted = new Set();
|
|
430
|
+
const refused = new Set();
|
|
431
|
+
for (const marker of markers) {
|
|
432
|
+
const before = lines.join("\n");
|
|
433
|
+
const candidate = [...lines];
|
|
434
|
+
const title = lines[marker.start];
|
|
435
|
+
const indent = (0, entry_body_js_1.contentColumn)(title, marker.column);
|
|
436
|
+
const delta = indent - (marker.column + 2);
|
|
437
|
+
candidate[marker.start] = title.slice(0, marker.column) + "- " +
|
|
438
|
+
title.slice(marker.column + 1 + marker.whitespace.length);
|
|
439
|
+
for (let i = marker.start + 1; i < marker.end; i++) {
|
|
440
|
+
if (candidate[i].startsWith(" ".repeat(indent))) {
|
|
441
|
+
candidate[i] = candidate[i].slice(delta);
|
|
442
|
+
}
|
|
443
|
+
}
|
|
444
|
+
const after = candidate.join("\n");
|
|
445
|
+
const beforeEntries = (0, markdown_js_1.parseMarkdown)(before).entries;
|
|
446
|
+
const afterEntries = (0, markdown_js_1.parseMarkdown)(after).entries;
|
|
447
|
+
const identitiesKept = beforeEntries.length === afterEntries.length &&
|
|
448
|
+
beforeEntries.every((entry, i) => entry.displayId === afterEntries[i].displayId &&
|
|
449
|
+
entry.id === afterEntries[i].id);
|
|
450
|
+
const containsRefused = [...refused].some((start) => start > marker.start && start < marker.end);
|
|
451
|
+
if (containsRefused || !(0, md_equiv_js_1.markdownSemanticallyEquivalent)(before, after) ||
|
|
452
|
+
!identitiesKept) {
|
|
453
|
+
// Refusing an enclosing entry must also undo admitted changes to its
|
|
454
|
+
// descendants. No identities have been stamped at this point.
|
|
455
|
+
lines.splice(marker.start, marker.end - marker.start, ...original.slice(marker.start, marker.end));
|
|
456
|
+
for (const start of accepted) {
|
|
457
|
+
if (start >= marker.start && start < marker.end)
|
|
458
|
+
accepted.delete(start);
|
|
459
|
+
}
|
|
460
|
+
refused.add(marker.start);
|
|
461
|
+
diagnostics.push({
|
|
462
|
+
code: "MSL-F013",
|
|
463
|
+
severity: "warning",
|
|
464
|
+
message: "Tab-separated entry marker cannot be normalized without " +
|
|
465
|
+
"changing CommonMark structure; kept the entry unchanged",
|
|
466
|
+
location: {
|
|
467
|
+
file: options?.file ?? "<unknown>",
|
|
468
|
+
line: marker.start + 1,
|
|
469
|
+
column: marker.column + 1,
|
|
470
|
+
},
|
|
471
|
+
});
|
|
472
|
+
continue;
|
|
473
|
+
}
|
|
474
|
+
lines.splice(0, lines.length, ...candidate);
|
|
475
|
+
accepted.add(marker.start);
|
|
476
|
+
}
|
|
477
|
+
const indexedStarts = new Set((0, markdown_js_1.parseMarkdown)(lines.join("\n")).entries.map((entry) => entry.location.line - 1));
|
|
478
|
+
for (const start of [...accepted].sort((a, b) => b - a)) {
|
|
479
|
+
// Re-read extents after each nested splice. Admission itself never
|
|
480
|
+
// changes line counts, so earlier title positions remain valid.
|
|
481
|
+
const marker = (0, tab_markers_js_1.entryListItems)(lines).find((item) => item.start === start);
|
|
482
|
+
// Nested entries are outside the parser's top-level entry index. Format
|
|
483
|
+
// their normalized item separately, then restore the enclosing indent.
|
|
484
|
+
if (marker.container.start !== marker.start &&
|
|
485
|
+
!indexedStarts.has(marker.container.start)) {
|
|
486
|
+
const prefix = " ".repeat(marker.column);
|
|
487
|
+
const fragment = lines.slice(marker.start, marker.end)
|
|
488
|
+
.map((line) => line.startsWith(prefix) ? line.slice(prefix.length) : line)
|
|
489
|
+
.join("\n");
|
|
490
|
+
const nested = formatEntries(fragment, options);
|
|
491
|
+
const replacement = nested.output.split("\n")
|
|
492
|
+
.map((line) => line === "" ? "" : prefix + line);
|
|
493
|
+
lines.splice(marker.start, marker.end - marker.start, ...replacement);
|
|
494
|
+
diagnostics.push(...nested.diagnostics.map((diagnostic) => ({
|
|
495
|
+
...diagnostic,
|
|
496
|
+
...(diagnostic.location
|
|
497
|
+
? {
|
|
498
|
+
location: {
|
|
499
|
+
...diagnostic.location,
|
|
500
|
+
line: diagnostic.location.line + marker.start,
|
|
501
|
+
column: diagnostic.location.column + marker.column,
|
|
502
|
+
},
|
|
503
|
+
}
|
|
504
|
+
: {}),
|
|
505
|
+
})));
|
|
506
|
+
}
|
|
507
|
+
}
|
|
508
|
+
return lines.join("\n");
|
|
509
|
+
}
|
|
368
510
|
/**
|
|
369
511
|
* Format a Markdown string — normalize attribute blocks,
|
|
370
512
|
* fix indentation, enforce canonical ordering.
|
|
@@ -374,6 +516,20 @@ function stampDisciplineFrozen(value, today) {
|
|
|
374
516
|
* @returns Format result with output text and diagnostics
|
|
375
517
|
*/
|
|
376
518
|
function format(markdown, options) {
|
|
519
|
+
const diagnostics = [];
|
|
520
|
+
const ending = (0, line_endings_js_1.detectLineEnding)(markdown);
|
|
521
|
+
const prepared = normalizeTabMarkers((0, line_endings_js_1.normalizeLineEndings)(markdown), options, diagnostics);
|
|
522
|
+
const result = formatEntries(prepared, options);
|
|
523
|
+
const output = (0, line_endings_js_1.applyLineEnding)(result.output, ending);
|
|
524
|
+
return {
|
|
525
|
+
output,
|
|
526
|
+
diagnostics: [...diagnostics, ...result.diagnostics],
|
|
527
|
+
changed: output !== markdown,
|
|
528
|
+
preservedRanges: (0, tab_markers_js_1.protectedTabRanges)((0, line_endings_js_1.normalizeLineEndings)(output).split("\n")),
|
|
529
|
+
};
|
|
530
|
+
}
|
|
531
|
+
/** Run the entry and prose passes after tab-marker admission. */
|
|
532
|
+
function formatEntries(markdown, options) {
|
|
377
533
|
const file = options?.file ?? "<unknown>";
|
|
378
534
|
// Detect the source file's line-ending convention up front so we can
|
|
379
535
|
// restore it on write-back. The rest of the formatter operates on a
|
|
@@ -418,7 +574,11 @@ function format(markdown, options) {
|
|
|
418
574
|
// Process bottom-to-top so line splicing doesn't shift earlier entries.
|
|
419
575
|
const sorted = [...entries].sort((a, b) => b.location.line - a.location.line);
|
|
420
576
|
const genUlid = options?.generateUlid ?? ulid_1.ulid;
|
|
577
|
+
const protectedRanges = (0, tab_markers_js_1.protectedTabRanges)(lines);
|
|
421
578
|
for (const entry of sorted) {
|
|
579
|
+
if (protectedRanges.some((range) => entry.location.line - 1 >= range.start &&
|
|
580
|
+
entry.location.line - 1 < range.end))
|
|
581
|
+
continue;
|
|
422
582
|
const indent = (0, entry_body_js_1.contentColumn)(lines[entry.location.line - 1] ?? "", entry.location.column - 1);
|
|
423
583
|
// `entry.endLine` comes from the parse of the unedited buffer. Entries
|
|
424
584
|
// are processed bottom to top, so only this entry's own edits move its
|
|
@@ -427,7 +587,14 @@ function format(markdown, options) {
|
|
|
427
587
|
const itemEndFloor = () => entry.endLine === undefined
|
|
428
588
|
? 0
|
|
429
589
|
: entry.endLine + (lines.length - lengthAtStart);
|
|
430
|
-
|
|
590
|
+
const existingTrailer = protectedRanges.length > 0
|
|
591
|
+
? findAttributeBlockRange(lines, entry.location.line, indent, itemEndFloor(), protectedRanges)
|
|
592
|
+
: undefined;
|
|
593
|
+
let attrs = protectedRanges.length > 0
|
|
594
|
+
? existingTrailer
|
|
595
|
+
? (0, attributes_js_1.parseAttributes)(lines.slice(existingTrailer.start, existingTrailer.end))
|
|
596
|
+
: []
|
|
597
|
+
: [...entry.rawAttributes];
|
|
431
598
|
const titleLineIdx = entry.location.line - 1;
|
|
432
599
|
// #686: a title that soft-wraps onto extra physical lines is a single
|
|
433
600
|
// Markdown paragraph, but the line-based passes here and in
|
|
@@ -523,7 +690,7 @@ function format(markdown, options) {
|
|
|
523
690
|
if (attrs.length === 0)
|
|
524
691
|
continue;
|
|
525
692
|
const normalized = sortAttributes(expandCsvValues(attrs));
|
|
526
|
-
const range = findAttributeBlockRange(lines, entry.location.line, indent, itemEndFloor());
|
|
693
|
+
const range = findAttributeBlockRange(lines, entry.location.line, indent, itemEndFloor(), protectedRanges);
|
|
527
694
|
if (range) {
|
|
528
695
|
// Replace existing attribute block.
|
|
529
696
|
const newBlock = renderAttributeBlock(normalized, indent);
|
|
@@ -582,7 +749,26 @@ function format(markdown, options) {
|
|
|
582
749
|
end: findItemEnd(collapsedLines, start, entryIndent, e.endLine ?? 0),
|
|
583
750
|
};
|
|
584
751
|
});
|
|
585
|
-
|
|
752
|
+
if ((0, tab_markers_js_1.tabMarkers)(collapsedLines).length > 0) {
|
|
753
|
+
// Title-only entry items are outside the entry index. Keep their list
|
|
754
|
+
// context too: isolated prose formatting can move adjacent entries.
|
|
755
|
+
const indexedStarts = new Set(proseEntries.map((entry) => entry.location.line - 1));
|
|
756
|
+
extents.push(...(0, tab_markers_js_1.entryListItems)(collapsedLines)
|
|
757
|
+
.filter((item) => !indexedStarts.has(item.start))
|
|
758
|
+
.map((item) => item.listContext));
|
|
759
|
+
extents.push(...(0, tab_markers_js_1.protectedTabRanges)(collapsedLines, true));
|
|
760
|
+
}
|
|
761
|
+
extents.sort((a, b) => a.start - b.start);
|
|
762
|
+
const merged = [];
|
|
763
|
+
for (const extent of extents) {
|
|
764
|
+
const previous = merged.at(-1);
|
|
765
|
+
if (previous && extent.start <= previous.end) {
|
|
766
|
+
previous.end = Math.max(previous.end, extent.end);
|
|
767
|
+
}
|
|
768
|
+
else
|
|
769
|
+
merged.push({ ...extent });
|
|
770
|
+
}
|
|
771
|
+
const prose = (0, prose_js_1.formatProseSegments)(collapsedLines, merged, proseFormat);
|
|
586
772
|
if (prose.changed)
|
|
587
773
|
changed = true;
|
|
588
774
|
for (const fallback of prose.fallbacks) {
|
|
@@ -646,9 +832,11 @@ function renderFrontMatter(attrs) {
|
|
|
646
832
|
function collapseBlankLines(lines) {
|
|
647
833
|
const out = [];
|
|
648
834
|
const fencedLines = (0, fence_js_1.fencedCodeLines)(lines.join("\n"));
|
|
835
|
+
const protectedRanges = (0, tab_markers_js_1.protectedTabRanges)(lines, true);
|
|
649
836
|
let prevBlank = false;
|
|
650
837
|
for (const [i, line] of lines.entries()) {
|
|
651
|
-
if (fencedLines.has(i)
|
|
838
|
+
if (fencedLines.has(i) ||
|
|
839
|
+
protectedRanges.some((range) => i >= range.start && i < range.end)) {
|
|
652
840
|
out.push(line);
|
|
653
841
|
prevBlank = false;
|
|
654
842
|
continue;
|
|
@@ -809,19 +997,26 @@ function removeEmptyTrailerLines(body, entries, diagnostics) {
|
|
|
809
997
|
const lines = body.split("\n");
|
|
810
998
|
let removedAny = false;
|
|
811
999
|
const sorted = [...entries].sort((a, b) => b.location.line - a.location.line);
|
|
1000
|
+
const protectedRanges = (0, tab_markers_js_1.protectedTabRanges)(lines);
|
|
812
1001
|
for (const entry of sorted) {
|
|
1002
|
+
if (protectedRanges.some((range) => entry.location.line - 1 >= range.start &&
|
|
1003
|
+
entry.location.line - 1 < range.end))
|
|
1004
|
+
continue;
|
|
813
1005
|
const indent = (0, entry_body_js_1.contentColumn)(lines[entry.location.line - 1] ?? "", entry.location.column - 1);
|
|
814
1006
|
const startIdx = entry.location.line - 1;
|
|
815
1007
|
let end = findItemEnd(lines, startIdx, indent, entry.endLine ?? 0);
|
|
816
1008
|
while (end > startIdx && lines[end - 1].trim() === "")
|
|
817
1009
|
end--;
|
|
818
1010
|
let start = end;
|
|
819
|
-
while (start - 1 > startIdx && lines[start - 1].trim() !== ""
|
|
1011
|
+
while (start - 1 > startIdx && lines[start - 1].trim() !== "" &&
|
|
1012
|
+
!protectedRanges.some((range) => start - 1 >= range.start && start - 1 < range.end))
|
|
820
1013
|
start--;
|
|
821
1014
|
if (start >= end || start - 1 <= startIdx)
|
|
822
1015
|
continue;
|
|
823
1016
|
const trailerIndent = " ".repeat(indent + 4);
|
|
824
1017
|
const block = lines.slice(start, end);
|
|
1018
|
+
if (protectedRanges.some((range) => range.start > startIdx && start < range.end && end > range.start))
|
|
1019
|
+
continue;
|
|
825
1020
|
const isTrailerBlock = block.every((l) => l.startsWith(trailerIndent) && TRAILER_SHAPED_RE.test(l.trim()));
|
|
826
1021
|
if (!isTrailerBlock)
|
|
827
1022
|
continue;
|
|
@@ -858,7 +1053,7 @@ function removeEmptyTrailerLines(body, entries, diagnostics) {
|
|
|
858
1053
|
* Scans forward from the entry start to find the list item boundary,
|
|
859
1054
|
* then walks backwards to find the contiguous trailing attribute block.
|
|
860
1055
|
*/
|
|
861
|
-
function findAttributeBlockRange(lines, entryStartLine, indent, itemEndFloor = 0) {
|
|
1056
|
+
function findAttributeBlockRange(lines, entryStartLine, indent, itemEndFloor = 0, preservedRanges = []) {
|
|
862
1057
|
const startIdx = entryStartLine - 1;
|
|
863
1058
|
const itemEnd = findItemEnd(lines, startIdx, indent, itemEndFloor);
|
|
864
1059
|
// Walk backwards from itemEnd, skip trailing blank lines.
|
|
@@ -871,6 +1066,9 @@ function findAttributeBlockRange(lines, entryStartLine, indent, itemEndFloor = 0
|
|
|
871
1066
|
// Walk backwards collecting attribute lines.
|
|
872
1067
|
let attrStart = scanEnd;
|
|
873
1068
|
for (let i = scanEnd - 1; i > startIdx; i--) {
|
|
1069
|
+
if (preservedRanges.some((range) => i >= range.start && i < range.end)) {
|
|
1070
|
+
break;
|
|
1071
|
+
}
|
|
874
1072
|
const trimmed = lines[i].trim();
|
|
875
1073
|
if (trimmed === "")
|
|
876
1074
|
break;
|
|
@@ -0,0 +1,15 @@
|
|
|
1
|
+
import type { EntryExtent } from "./prose.js";
|
|
2
|
+
/** An entry title and the list context that controls its indentation. */
|
|
3
|
+
export interface EntryListItem extends EntryExtent {
|
|
4
|
+
readonly column: number;
|
|
5
|
+
readonly whitespace: string;
|
|
6
|
+
readonly container: EntryExtent;
|
|
7
|
+
readonly listContext: EntryExtent;
|
|
8
|
+
}
|
|
9
|
+
/** Find actual unordered list items, excluding code, HTML, and task lists. */
|
|
10
|
+
export declare function entryListItems(lines: readonly string[]): EntryListItem[];
|
|
11
|
+
/** Find entry list items with a tab in the whitespace after the marker. */
|
|
12
|
+
export declare function tabMarkers(lines: readonly string[]): EntryListItem[];
|
|
13
|
+
/** Ranges kept out of every formatter pass after a tab rewrite is refused. */
|
|
14
|
+
export declare function protectedTabRanges(lines: readonly string[], preserveListContext?: boolean): EntryExtent[];
|
|
15
|
+
//# sourceMappingURL=tab_markers.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"tab_markers.d.ts","sourceRoot":"","sources":["../../src/formatter/tab_markers.ts"],"names":[],"mappings":"AASA,OAAO,KAAK,EAAE,WAAW,EAAE,MAAM,YAAY,CAAC;AAI9C,yEAAyE;AACzE,MAAM,WAAW,aAAc,SAAQ,WAAW;IAChD,QAAQ,CAAC,MAAM,EAAE,MAAM,CAAC;IACxB,QAAQ,CAAC,UAAU,EAAE,MAAM,CAAC;IAC5B,QAAQ,CAAC,SAAS,EAAE,WAAW,CAAC;IAChC,QAAQ,CAAC,WAAW,EAAE,WAAW,CAAC;CACnC;AAED,8EAA8E;AAC9E,wBAAgB,cAAc,CAAC,KAAK,EAAE,SAAS,MAAM,EAAE,GAAG,aAAa,EAAE,CAoFxE;AAED,2EAA2E;AAC3E,wBAAgB,UAAU,CAAC,KAAK,EAAE,SAAS,MAAM,EAAE,GAAG,aAAa,EAAE,CAKpE;AAED,8EAA8E;AAC9E,wBAAgB,kBAAkB,CAChC,KAAK,EAAE,SAAS,MAAM,EAAE,EACxB,mBAAmB,UAAQ,GAC1B,WAAW,EAAE,CA4Cf"}
|
|
@@ -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;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,
|
|
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
|
@@ -73,7 +73,7 @@ async function fmtDriftGate(mdContents, entries, ledger, formatMarkdownProse) {
|
|
|
73
73
|
});
|
|
74
74
|
}
|
|
75
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);
|
|
76
|
+
const refResult = (0, mod_js_4.canonicalizeRefs)(formatted.output, parsed.entries, refIndex, ledger, formatted.preservedRanges);
|
|
77
77
|
if (refResult.changed) {
|
|
78
78
|
diagnostics.push({
|
|
79
79
|
code: "MSL-F011",
|
|
@@ -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,7 +8,8 @@
|
|
|
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.
|
|
11
|
+
export declare const VERSION = "0.12.1";
|
|
12
|
+
export { DISPLAY_ID_CHAR_RE, DISPLAY_ID_TOKEN_RE } from "./util/display_id.js";
|
|
12
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";
|
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,WAAW,EACX,gBAAgB,EAChB,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AAK,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.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 = 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.12.
|
|
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; } });
|
package/script/model/mod.d.ts
CHANGED
|
@@ -543,7 +543,7 @@ export type CaptionConventions = Readonly<Partial<Record<string, CaptionPosition
|
|
|
543
543
|
* `driftsys/schemas` `project/v1.json` `$defs/projectRef`). Used by the
|
|
544
544
|
* `dependencies:` (git repositories) and `references:` (published sites)
|
|
545
545
|
* lists. `version` carries intent: an exact tag is a frozen baseline, a
|
|
546
|
-
* 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
|
|
547
547
|
* tag, else default-branch head). `name` is the upstream id used for the
|
|
548
548
|
* cache directory, lockfile rows, and origin badges; derived from the URL
|
|
549
549
|
* when absent.
|