@plexus-ms/lib 0.120.0 → 0.122.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/baseline.d.ts +16 -0
- package/dist/baseline.d.ts.map +1 -0
- package/dist/baseline.js +38 -0
- package/dist/baseline.js.map +1 -0
- package/dist/index.d.ts +4 -1
- package/dist/index.d.ts.map +1 -1
- package/dist/index.js +4 -1
- package/dist/index.js.map +1 -1
- package/dist/lints.d.ts +56 -0
- package/dist/lints.d.ts.map +1 -0
- package/dist/lints.js +330 -0
- package/dist/lints.js.map +1 -0
- package/dist/requirements.d.ts +63 -0
- package/dist/requirements.d.ts.map +1 -1
- package/dist/requirements.js +189 -6
- package/dist/requirements.js.map +1 -1
- package/dist/standard-index.json +143 -0
- package/dist/standardIndex.d.ts +14 -0
- package/dist/standardIndex.d.ts.map +1 -0
- package/dist/standardIndex.js +39 -0
- package/dist/standardIndex.js.map +1 -0
- package/package.json +1 -1
|
@@ -0,0 +1,16 @@
|
|
|
1
|
+
import { type Violation } from './lints.ts';
|
|
2
|
+
export declare const BASELINE_FILE = "plx-baseline.txt";
|
|
3
|
+
/** The keys a baseline holds, comments and blank lines left out. */
|
|
4
|
+
export declare const parseBaseline: (text: string) => string[];
|
|
5
|
+
export declare const renderBaseline: (violations: Violation[]) => string;
|
|
6
|
+
export interface Compared {
|
|
7
|
+
/** Violations the baseline does not hold. */
|
|
8
|
+
fresh: Violation[];
|
|
9
|
+
/** Baseline entries that no longer occur, once per missing occurrence. */
|
|
10
|
+
stale: string[];
|
|
11
|
+
/** Violations the baseline holds. */
|
|
12
|
+
known: number;
|
|
13
|
+
}
|
|
14
|
+
/** The violations against the baseline, counted as multisets: a key baselined twice covers two occurrences. */
|
|
15
|
+
export declare function compareBaseline(violations: Violation[], baseline: string[]): Compared;
|
|
16
|
+
//# sourceMappingURL=baseline.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"baseline.d.ts","sourceRoot":"","sources":["../src/baseline.ts"],"names":[],"mappings":"AAMA,OAAO,EAAS,KAAK,SAAS,EAAE,MAAM,YAAY,CAAC;AAEnD,eAAO,MAAM,aAAa,qBAAqB,CAAC;AAOhD,oEAAoE;AACpE,eAAO,MAAM,aAAa,GAAI,MAAM,MAAM,KAAG,MAAM,EAID,CAAC;AAEnD,eAAO,MAAM,cAAc,GAAI,YAAY,SAAS,EAAE,KAAG,MACO,CAAC;AAEjE,MAAM,WAAW,QAAQ;IACvB,6CAA6C;IAC7C,KAAK,EAAE,SAAS,EAAE,CAAC;IACnB,0EAA0E;IAC1E,KAAK,EAAE,MAAM,EAAE,CAAC;IAChB,qCAAqC;IACrC,KAAK,EAAE,MAAM,CAAC;CACf;AAED,+GAA+G;AAC/G,wBAAgB,eAAe,CAAC,UAAU,EAAE,SAAS,EAAE,EAAE,QAAQ,EAAE,MAAM,EAAE,GAAG,QAAQ,CAcrF"}
|
package/dist/baseline.js
ADDED
|
@@ -0,0 +1,38 @@
|
|
|
1
|
+
// The baseline: a repo's known violations of the lints (lints.ts), recorded
|
|
2
|
+
// when a lint lands on a tree that already breaks it, and burned down from
|
|
3
|
+
// there. One key per line (`<lint> <file>: <excerpt>`, a key repeated as often
|
|
4
|
+
// as it occurs), sorted; `plx requirements --write-baseline` writes it. The
|
|
5
|
+
// check fails on a violation the baseline does not hold, and on an entry that
|
|
6
|
+
// no longer occurs, so a fixed violation leaves the list in the same commit.
|
|
7
|
+
import { keyOf } from "./lints.js";
|
|
8
|
+
export const BASELINE_FILE = 'plx-baseline.txt';
|
|
9
|
+
const HEADER = [
|
|
10
|
+
'# Known violations of `plx requirements`: burn them down, never add to them.',
|
|
11
|
+
'# One per line, as often as each occurs; `plx requirements --write-baseline` rewrites the file.',
|
|
12
|
+
];
|
|
13
|
+
/** The keys a baseline holds, comments and blank lines left out. */
|
|
14
|
+
export const parseBaseline = (text) => text
|
|
15
|
+
.split('\n')
|
|
16
|
+
.map((l) => l.trimEnd())
|
|
17
|
+
.filter((l) => l !== '' && !l.startsWith('#'));
|
|
18
|
+
export const renderBaseline = (violations) => `${[...HEADER, ...violations.map(keyOf).sort()].join('\n')}\n`;
|
|
19
|
+
/** The violations against the baseline, counted as multisets: a key baselined twice covers two occurrences. */
|
|
20
|
+
export function compareBaseline(violations, baseline) {
|
|
21
|
+
const left = new Map();
|
|
22
|
+
for (const key of baseline)
|
|
23
|
+
left.set(key, (left.get(key) ?? 0) + 1);
|
|
24
|
+
const fresh = [];
|
|
25
|
+
let known = 0;
|
|
26
|
+
for (const v of violations) {
|
|
27
|
+
const n = left.get(keyOf(v)) ?? 0;
|
|
28
|
+
if (n > 0) {
|
|
29
|
+
left.set(keyOf(v), n - 1);
|
|
30
|
+
known++;
|
|
31
|
+
}
|
|
32
|
+
else
|
|
33
|
+
fresh.push(v);
|
|
34
|
+
}
|
|
35
|
+
const stale = [...left].flatMap(([key, n]) => Array(n).fill(key));
|
|
36
|
+
return { fresh, stale: stale.sort(), known };
|
|
37
|
+
}
|
|
38
|
+
//# sourceMappingURL=baseline.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"baseline.js","sourceRoot":"","sources":["../src/baseline.ts"],"names":[],"mappings":"AAAA,4EAA4E;AAC5E,2EAA2E;AAC3E,+EAA+E;AAC/E,4EAA4E;AAC5E,8EAA8E;AAC9E,6EAA6E;AAC7E,OAAO,EAAE,KAAK,EAAkB,MAAM,YAAY,CAAC;AAEnD,MAAM,CAAC,MAAM,aAAa,GAAG,kBAAkB,CAAC;AAEhD,MAAM,MAAM,GAAG;IACb,8EAA8E;IAC9E,iGAAiG;CAClG,CAAC;AAEF,oEAAoE;AACpE,MAAM,CAAC,MAAM,aAAa,GAAG,CAAC,IAAY,EAAY,EAAE,CACtD,IAAI;KACD,KAAK,CAAC,IAAI,CAAC;KACX,GAAG,CAAC,CAAC,CAAC,EAAE,EAAE,CAAC,CAAC,CAAC,OAAO,EAAE,CAAC;KACvB,MAAM,C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;IAC1E,OAAO,EAAE,KAAK,EAAE,KAAK,EAAE,KAAK,CAAC,IAAI,EAAE,EAAE,KAAK,EAAE,CAAC;AAC/C,CAAC"}
|
package/dist/index.d.ts
CHANGED
|
@@ -1,3 +1,4 @@
|
|
|
1
|
+
export { BASELINE_FILE, type Compared, compareBaseline, parseBaseline, renderBaseline } from './baseline.ts';
|
|
1
2
|
export { bumpWorkflowRefs, hasConflictMarkers, hasUnmergedEntries, syncMarker, WORKFLOW_REF } from './bookkeeping.ts';
|
|
2
3
|
export { CATALOG_DIRS, type Catalog, type Module, parseModule, readCatalog } from './catalog.ts';
|
|
3
4
|
export { CHANGESET_DIR, type Changeset, type ChangesetInput, changesetPath, type DependencyChange, type Manifest, parseCatalogs, planChangeset, readChangeset, workspaceGlobs, } from './changeset.ts';
|
|
@@ -10,13 +11,15 @@ export { compareVersions, type Diagnosis, diagnose, type Report } from './doctor
|
|
|
10
11
|
export { body, describe, type Plan, run, type Step, write } from './effects.ts';
|
|
11
12
|
export { frontmatterField, setFrontmatterField } from './frontmatter.ts';
|
|
12
13
|
export { type DirEntry, ExecError, type ExecOptions, type Io, orAbsent, realIo, render } from './io.ts';
|
|
14
|
+
export { type Citable, keyOf, type LintId, lintCitations, lintCommitMessage, lintDateOrVersion, lintIssueIds, lintTemplateHeader, REQUIREMENT_NAME, renderViolation, type Violation, } from './lints.ts';
|
|
13
15
|
export { buildManifest, catalogOf, MANIFEST_FILE, MANIFEST_SCHEMA, type ModuleManifest, parseManifest, renderManifest, } from './manifest.ts';
|
|
14
16
|
export { type Declaration, MARKER_FILE, parseMarker, splitFrontmatter } from './marker.ts';
|
|
15
17
|
export { type Directory, type GitFacet, isNotable, type Kind, kindOf, shortRemote, type TemplateFacet, } from './model.ts';
|
|
16
18
|
export { DEFAULT_MAX_AGE, MAX_AGE_ANSWER, type Marked, maxAgeOf, type Need, type NeedInput, needOf, parseMaxAge, type Release, type Stale, staleModules, type Trigger, } from './need.ts';
|
|
17
19
|
export { overview, PRUNED, type ScanOptions } from './overview.ts';
|
|
18
20
|
export { type PropagateOptions, propagate } from './propagate.ts';
|
|
19
|
-
export { type CompendiumCheck, checkCompendium, extractRequirements, MAP_PAGE, modulePages, type PageMode, type Scan, scanPage, } from './requirements.ts';
|
|
21
|
+
export { type CompendiumCheck, checkCommitMessage, checkCompendium, checkRepo, extractRequirements, lintRepo, MAP_PAGE, modulePages, type PageMode, planBaseline, type RepoCheck, type RepoKind, type RepoLint, type RepoOptions, type RequirementName, readCitable, requirementName, type Scan, scanPage, } from './requirements.ts';
|
|
22
|
+
export { bundledIndex, parseStandardIndex, renderStandardIndex, STANDARD_INDEX_FILE, type StandardIndex, } from './standardIndex.ts';
|
|
20
23
|
export { mergeLine, renderSummary } from './summary.ts';
|
|
21
24
|
export { detail, emptySummary, isClean, type Summary, type Take, takeVersion } from './take.ts';
|
|
22
25
|
export { type UpdateOptions, update } from './update.ts';
|
package/dist/index.d.ts.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../src/index.ts"],"names":[],"mappings":"AAYA,OAAO,EAAE,gBAAgB,EAAE,kBAAkB,EAAE,kBAAkB,EAAE,UAAU,EAAE,YAAY,EAAE,MAAM,kBAAkB,CAAC;AACtH,OAAO,EAAE,YAAY,EAAE,KAAK,OAAO,EAAE,KAAK,MAAM,EAAE,WAAW,EAAE,WAAW,EAAE,MAAM,cAAc,CAAC;AACjG,OAAO,EACL,aAAa,EACb,KAAK,SAAS,EACd,KAAK,cAAc,EACnB,aAAa,EACb,KAAK,gBAAgB,EACrB,KAAK,QAAQ,EACb,aAAa,EACb,aAAa,EACb,aAAa,EACb,cAAc,GACf,MAAM,gBAAgB,CAAC;AACxB,OAAO,EACL,KAAK,QAAQ,EACb,cAAc,EACd,aAAa,EACb,iBAAiB,EACjB,KAAK,IAAI,EACT,SAAS,EACT,UAAU,EACV,cAAc,GACf,MAAM,gBAAgB,CAAC;AACxB,OAAO,EAAE,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eAAe,EACpB,WAAW,EACX,eAAe,EACf,KAAK,IAAI,EACT,QAAQ,GACT,MAAM,mBAAmB,CAAC;AAC3B,OAAO,EACL,YAAY,EACZ,kBAAkB,EAClB,mBAAmB,EACnB,mBAAmB,EACnB,KAAK,aAAa,GACnB,MAAM,oBAAoB,CAAC;AAC5B,OAAO,EAAE,SAAS,EAAE,aAAa,EAAE,MAAM,cAAc,CAAC;AACxD,OAAO,EAAE,MAAM,EAAE,YAAY,EAAE,OAAO,EAAE,KAAK,OAAO,EAAE,KAAK,IAAI,EAAE,WAAW,EAAE,MAAM,WAAW,CAAC;AAChG,OAAO,EAAE,KAAK,aAAa,EAAE,MAAM,EAAE,MAAM,aAAa,CAAC;AACzD,OAAO,EAAE,UAAU,EAAE,eAAe,EAAE,cAAc,EAAE,UAAU,EAAE,eAAe,EAAE,MAAM,cAAc,CAAC"}
|
package/dist/index.js
CHANGED
|
@@ -10,6 +10,7 @@
|
|
|
10
10
|
// package is an adapter that maps argv onto this. The parsers of Plexus's own
|
|
11
11
|
// file shapes (marker.ts, copier.ts) live here, once, for every verb.
|
|
12
12
|
// Conventions: compendium/miscellaneous/cli-design.md.
|
|
13
|
+
export { BASELINE_FILE, compareBaseline, parseBaseline, renderBaseline } from "./baseline.js";
|
|
13
14
|
export { bumpWorkflowRefs, hasConflictMarkers, hasUnmergedEntries, syncMarker, WORKFLOW_REF } from "./bookkeeping.js";
|
|
14
15
|
export { CATALOG_DIRS, parseModule, readCatalog } from "./catalog.js";
|
|
15
16
|
export { CHANGESET_DIR, changesetPath, parseCatalogs, planChangeset, readChangeset, workspaceGlobs, } from "./changeset.js";
|
|
@@ -22,13 +23,15 @@ export { compareVersions, diagnose } from "./doctor.js";
|
|
|
22
23
|
export { body, describe, run, write } from "./effects.js";
|
|
23
24
|
export { frontmatterField, setFrontmatterField } from "./frontmatter.js";
|
|
24
25
|
export { ExecError, orAbsent, realIo, render } from "./io.js";
|
|
26
|
+
export { keyOf, lintCitations, lintCommitMessage, lintDateOrVersion, lintIssueIds, lintTemplateHeader, REQUIREMENT_NAME, renderViolation, } from "./lints.js";
|
|
25
27
|
export { buildManifest, catalogOf, MANIFEST_FILE, MANIFEST_SCHEMA, parseManifest, renderManifest, } from "./manifest.js";
|
|
26
28
|
export { MARKER_FILE, parseMarker, splitFrontmatter } from "./marker.js";
|
|
27
29
|
export { isNotable, kindOf, shortRemote, } from "./model.js";
|
|
28
30
|
export { DEFAULT_MAX_AGE, MAX_AGE_ANSWER, maxAgeOf, needOf, parseMaxAge, staleModules, } from "./need.js";
|
|
29
31
|
export { overview, PRUNED } from "./overview.js";
|
|
30
32
|
export { propagate } from "./propagate.js";
|
|
31
|
-
export { checkCompendium, extractRequirements, MAP_PAGE, modulePages, scanPage, } from "./requirements.js";
|
|
33
|
+
export { checkCommitMessage, checkCompendium, checkRepo, extractRequirements, lintRepo, MAP_PAGE, modulePages, planBaseline, readCitable, requirementName, scanPage, } from "./requirements.js";
|
|
34
|
+
export { bundledIndex, parseStandardIndex, renderStandardIndex, STANDARD_INDEX_FILE, } from "./standardIndex.js";
|
|
32
35
|
export { mergeLine, renderSummary } from "./summary.js";
|
|
33
36
|
export { detail, emptySummary, isClean, takeVersion } from "./take.js";
|
|
34
37
|
export { update } from "./update.js";
|
package/dist/index.js.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.js","sourceRoot":"","sources":["../src/index.ts"],"names":[],"mappings":"AAAA,iEAAiE;AACjE,EAAE;AACF,8EAA8E;AAC9E,kEAAkE;AAClE,iEAAiE;AACjE,EAAE;AACF,6EAA6E;AAC7E,iFAAiF;AACjF,0EAA0E;AAC1E,8EAA8E;AAC9E,sEAAsE;AACtE,uDAAuD;AACvD,OAAO,EAAE,gBAAgB,EAAE,kBAAkB,EAAE,kBAAkB,EAAE,UAAU,EAAE,YAAY,EAAE,MAAM,kBAAkB,CAAC;AACtH,OAAO,EAAE,YAAY,EAA6B,WAAW,EAAE,WAAW,EAAE,MAAM,c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AAoB,CAAC;AAC5B,OAAO,EAAE,SAAS,EAAE,aAAa,EAAE,MAAM,cAAc,CAAC;AACxD,OAAO,EAAE,MAAM,EAAE,YAAY,EAAE,OAAO,EAA2B,WAAW,EAAE,MAAM,WAAW,CAAC;AAChG,OAAO,EAAsB,MAAM,EAAE,MAAM,aAAa,CAAC;AACzD,OAAO,EAAE,UAAU,EAAE,eAAe,EAAE,cAAc,EAAE,UAAU,EAAE,eAAe,EAAE,MAAM,cAAc,CAAC"}
|
package/dist/lints.d.ts
ADDED
|
@@ -0,0 +1,56 @@
|
|
|
1
|
+
export type LintId = 'date-or-version' | 'citations' | 'template-header' | 'issue-id';
|
|
2
|
+
export interface Violation {
|
|
3
|
+
lint: LintId;
|
|
4
|
+
/** Relative to the repo root. */
|
|
5
|
+
file: string;
|
|
6
|
+
/** 1-based. */
|
|
7
|
+
line: number;
|
|
8
|
+
/** The offending text; with lint and file, the baseline key. */
|
|
9
|
+
excerpt: string;
|
|
10
|
+
/** What is wrong, for a human. */
|
|
11
|
+
message: string;
|
|
12
|
+
}
|
|
13
|
+
/** The baseline key of a violation: no line number, so it survives edits elsewhere in the file. */
|
|
14
|
+
export declare const keyOf: (v: Violation) => string;
|
|
15
|
+
export declare const renderViolation: (v: Violation) => string;
|
|
16
|
+
/** The prose of a Markdown page: its text with frontmatter, fenced code blocks and code spans blanked, lines kept in place. */
|
|
17
|
+
export declare function proseOf(text: string): string;
|
|
18
|
+
export declare function lintDateOrVersion(text: string, file: string): Violation[];
|
|
19
|
+
/** `PLX-<Module>/<Name>` or `PLX-<Module>/<Profile>/<Name>`, each segment capitalised as a module code's word is. */
|
|
20
|
+
export declare const REQUIREMENT_NAME = "PLX-[A-Z][A-Za-z]+(?:/[A-Z][A-Za-z0-9]*){1,2}";
|
|
21
|
+
/** The citable facts of one Plexus version: `§ <n> <code>` for every numbered section, and every requirement name. */
|
|
22
|
+
export type Citable = ReadonlySet<string>;
|
|
23
|
+
/**
|
|
24
|
+
* The citations in a file that name nothing. `own` is the code a bare `§ n`
|
|
25
|
+
* stands for: the page's own, on a page of the compendium (`PLX` on the map);
|
|
26
|
+
* elsewhere a bare `§ n` has no page and is not checked.
|
|
27
|
+
*/
|
|
28
|
+
export declare function lintCitations(text: string, file: string, citable: Citable, own?: string): Violation[];
|
|
29
|
+
export declare const MAX_HEADER_LINES = 2;
|
|
30
|
+
/**
|
|
31
|
+
* The number of comment lines a template file's header holds. The header is
|
|
32
|
+
* the first comment block, line comments and block comments counted line by
|
|
33
|
+
* line, when no more than one line of content precedes it (the one line a
|
|
34
|
+
* workflow names itself with, `name: on_pr`). A later block, after blank
|
|
35
|
+
* lines, counts as well when a blank line (or the end of the file) follows it:
|
|
36
|
+
* a blank line cannot split a long header. A later block directly above a line
|
|
37
|
+
* of content is that content's own comment; it does not count, and the header
|
|
38
|
+
* ends there, as it does at any line of content. After the header has begun, a
|
|
39
|
+
* line that holds only a Jinja tag is content, not a blank line: a comment above
|
|
40
|
+
* `{% if x %}` is the comment of the block it opens. Before it, such a line is
|
|
41
|
+
* skipped like a blank one.
|
|
42
|
+
*/
|
|
43
|
+
export declare function headerLines(text: string, file: string): number;
|
|
44
|
+
export declare function lintTemplateHeader(text: string, file: string): Violation[];
|
|
45
|
+
export declare function lintIssueIds(text: string, file: string): Violation[];
|
|
46
|
+
/**
|
|
47
|
+
* A commit message's issue identifiers. Every line counts, comment lines too:
|
|
48
|
+
* under `git commit -m` git keeps them. What git adds itself is left out: its
|
|
49
|
+
* template, from the "Please enter the commit message" line on (it names the
|
|
50
|
+
* branch), and everything below a scissors line, both recognised by the
|
|
51
|
+
* repo's comment character (`core.commentChar`, read by the caller; under
|
|
52
|
+
* `auto`, any character git may pick). Git writes that template in the user's
|
|
53
|
+
* language; under another locale its lines are linted too.
|
|
54
|
+
*/
|
|
55
|
+
export declare function lintCommitMessage(text: string, comment?: string): Violation[];
|
|
56
|
+
//# sourceMappingURL=lints.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
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AY1E;AA0BD,wBAAgB,YAAY,CAAC,IAAI,EAAE,MAAM,EAAE,IAAI,EAAE,MAAM,GAAG,SAAS,EAAE,CAUpE;AAKD;;;;;;;;GAQG;AACH,wBAAgB,iBAAiB,CAAC,IAAI,EAAE,MAAM,EAAE,OAAO,SAAM,GAAG,SAAS,EAAE,CAU1E"}
|
package/dist/lints.js
ADDED
|
@@ -0,0 +1,330 @@
|
|
|
1
|
+
// The four lints that keep one home per fact, run by `plx requirements` over a
|
|
2
|
+
// repo's tracked files (requirements.ts says which run where):
|
|
3
|
+
//
|
|
4
|
+
// date-or-version no date and no version number in the compendium's prose;
|
|
5
|
+
// frontmatter and code, fenced or inline, are exempt
|
|
6
|
+
// citations every section citation names a numbered section that
|
|
7
|
+
// exists, `§ n PLX-Module` or `PLX-Module § n` (`PLX` for
|
|
8
|
+
// the map), and on a page of the compendium a bare `§ n`
|
|
9
|
+
// names one of the page's own; every requirement name,
|
|
10
|
+
// `PLX-<Module>[/<Profile>]/<Name>`, a named requirement line
|
|
11
|
+
// template-header a template file opens with at most two comment lines
|
|
12
|
+
// issue-id no issue identifier: three capitals, a dash and digits;
|
|
13
|
+
// module codes (`PLX-App`, a dash and a word) pass
|
|
14
|
+
//
|
|
15
|
+
// Each lint is a pure function of a file's text and reports violations with a
|
|
16
|
+
// stable key, `<lint> <file>: <excerpt>`, that a baseline records (baseline.ts):
|
|
17
|
+
// the excerpt is the offending text, not the line number, so an edit elsewhere
|
|
18
|
+
// in the file does not move the key.
|
|
19
|
+
/** The baseline key of a violation: no line number, so it survives edits elsewhere in the file. */
|
|
20
|
+
export const keyOf = (v) => `${v.lint} ${v.file}: ${v.excerpt}`;
|
|
21
|
+
export const renderViolation = (v) => `✗ ${v.file}: line ${v.line}: ${v.message}`;
|
|
22
|
+
const lineAt = (text, index) => {
|
|
23
|
+
let line = 1;
|
|
24
|
+
for (let i = 0; i < index; i++)
|
|
25
|
+
if (text.charCodeAt(i) === 10)
|
|
26
|
+
line++;
|
|
27
|
+
return line;
|
|
28
|
+
};
|
|
29
|
+
/** Every match of a global pattern, with its 1-based line. */
|
|
30
|
+
function* matches(text, pattern) {
|
|
31
|
+
for (const match of text.matchAll(pattern))
|
|
32
|
+
yield { match, line: lineAt(text, match.index) };
|
|
33
|
+
}
|
|
34
|
+
// --- date-or-version: no date and no version number in compendium prose ------------------
|
|
35
|
+
const MONTH = 'Jan(?:uary)?|Feb(?:ruary)?|Mar(?:ch)?|Apr(?:il)?|May|June?|July?|Aug(?:ust)?|Sep(?:t(?:ember)?)?|Oct(?:ober)?|Nov(?:ember)?|Dec(?:ember)?';
|
|
36
|
+
const YEAR = '(?:19|20)\\d{2}';
|
|
37
|
+
/**
|
|
38
|
+
* What reads as a date or a version number. Section numbers (`§ 1.2`), IP
|
|
39
|
+
* addresses (four dotted parts), `0.x`, RFC numbers, port numbers and other
|
|
40
|
+
* bare integers do not: a version is three dotted parts, or a number after
|
|
41
|
+
* `v` or `@`; a year counts only in a date, after a month, or after a word
|
|
42
|
+
* that makes it one ("in 2026", "since 2025"). `1.0.0` is semver's line
|
|
43
|
+
* between unstable and stable, a concept rather than a release, and passes.
|
|
44
|
+
* Two dotted parts are a decimal as often as a version (`1.42 GiB`), and a
|
|
45
|
+
* product's version after its name (`Debian 13`, `Safari 26.1`) is not told
|
|
46
|
+
* apart from any other number: neither is caught.
|
|
47
|
+
*/
|
|
48
|
+
const DATE_OR_VERSION = new RegExp([
|
|
49
|
+
// 2026-11-04, 2026-07, 2026-11-04T10:00Z
|
|
50
|
+
`(?<![\\w-])${YEAR}-(?:0[1-9]|1[0-2])(?:-(?:0[1-9]|[12]\\d|3[01])(?:T\\d{2}:\\d{2}(?::\\d{2}(?:\\.\\d+)?)?(?:Z|[+-]\\d{2}:?\\d{2})?)?)?(?![\\w-])`,
|
|
51
|
+
// November 2026, Nov. 4, 2026
|
|
52
|
+
`\\b(?:${MONTH})\\.?\\s+(?:\\d{1,2}(?:st|nd|rd|th)?,?\\s+)?${YEAR}\\b`,
|
|
53
|
+
// in 2026, since 2025, Q3 2026
|
|
54
|
+
`\\b(?:[Ii]n|[Ss]ince|[Uu]ntil|[Tt]ill|[Aa]s of|[Bb]efore|[Aa]fter|[Dd]uring|[Ee]arly|[Mm]id|[Ll]ate|Q[1-4])\\s+${YEAR}\\b(?![.,]?\\d)`,
|
|
55
|
+
// 0.111.0, 1.2.3-rc.1; not the dotted parts of an IP address, not a section number
|
|
56
|
+
'(?<![\\w.§]|§\\s*)(?!1\\.0\\.0(?![\\w-]|\\.\\d))\\d+\\.\\d+\\.\\d+(?:-[0-9A-Za-z.]+)?(?!\\.?\\d)',
|
|
57
|
+
// v24, v1.48
|
|
58
|
+
'(?<![\\w./-])v\\d+(?:\\.\\d+)*\\b',
|
|
59
|
+
// pnpm@12, hk@1.48 (three parts are caught above)
|
|
60
|
+
'(?<=@)\\d+(?:\\.\\d+)?\\b(?!\\.\\d)',
|
|
61
|
+
].join('|'), 'g');
|
|
62
|
+
/** The prose of a Markdown page: its text with frontmatter, fenced code blocks and code spans blanked, lines kept in place. */
|
|
63
|
+
export function proseOf(text) {
|
|
64
|
+
const lines = text.split('\n');
|
|
65
|
+
let i = 0;
|
|
66
|
+
if (lines[0] === '---') {
|
|
67
|
+
const end = lines.findIndex((l, n) => n > 0 && l === '---');
|
|
68
|
+
if (end !== -1)
|
|
69
|
+
for (; i <= end; i++)
|
|
70
|
+
lines[i] = '';
|
|
71
|
+
}
|
|
72
|
+
let fence;
|
|
73
|
+
for (; i < lines.length; i++) {
|
|
74
|
+
const line = lines[i] ?? '';
|
|
75
|
+
const opener = /^\s*(`{3,}|~{3,})/.exec(line)?.[1];
|
|
76
|
+
if (fence === undefined && opener) {
|
|
77
|
+
fence = opener;
|
|
78
|
+
lines[i] = '';
|
|
79
|
+
}
|
|
80
|
+
else if (fence !== undefined) {
|
|
81
|
+
if (opener?.startsWith(fence[0] ?? '') && opener.length >= fence.length && line.trim() === opener)
|
|
82
|
+
fence = undefined;
|
|
83
|
+
lines[i] = '';
|
|
84
|
+
}
|
|
85
|
+
else
|
|
86
|
+
lines[i] = line.replace(/(`+)[^\n]*?\1/g, (span) => ' '.repeat(span.length));
|
|
87
|
+
}
|
|
88
|
+
return lines.join('\n');
|
|
89
|
+
}
|
|
90
|
+
export function lintDateOrVersion(text, file) {
|
|
91
|
+
return [...matches(proseOf(text), DATE_OR_VERSION)].map(({ match, line }) => ({
|
|
92
|
+
lint: 'date-or-version',
|
|
93
|
+
file,
|
|
94
|
+
line,
|
|
95
|
+
excerpt: match[0],
|
|
96
|
+
message: `a date or version number in prose goes stale; say it once where it is maintained: ${match[0]}`,
|
|
97
|
+
}));
|
|
98
|
+
}
|
|
99
|
+
// --- citations: every cited section and requirement name exists -----------------
|
|
100
|
+
/** A module code, or `PLX` for the map. */
|
|
101
|
+
const CODE = 'PLX(?:-[A-Z][A-Za-z]+)?(?![A-Za-z])';
|
|
102
|
+
const NUMBER = '\\d+(?:\\.\\d+)*';
|
|
103
|
+
/** One section number or several: `2`, `2 and 5`, `2, 3 or 6`, `2–4` (a range: its two ends are checked). */
|
|
104
|
+
const NUMBERS = `${NUMBER}(?:[ \\t\\u00a0]*(?:,|and|or|&|–|-|to)[ \\t\\u00a0]*${NUMBER})*`;
|
|
105
|
+
/** Between the numbers and the code: blanks, or a line break with a comment or blockquote marker. */
|
|
106
|
+
const GAP = '(?:[ \\t\\u00a0]+|[ \\t]*\\r?\\n[ \\t]*(?:#+|//+|\\*|>)?[ \\t]*)';
|
|
107
|
+
const SIGN = `(?<!§)§§?[ \\t\\u00a0]*`;
|
|
108
|
+
/** `PLX-<Module>/<Name>` or `PLX-<Module>/<Profile>/<Name>`, each segment capitalised as a module code's word is. */
|
|
109
|
+
export const REQUIREMENT_NAME = 'PLX-[A-Z][A-Za-z]+(?:/[A-Z][A-Za-z0-9]*){1,2}';
|
|
110
|
+
/** Anything shaped like a name, well-formed or not: a lowercase segment, four segments. */
|
|
111
|
+
const NAME_LIKE = 'PLX-[A-Z][A-Za-z]+(?:/[\\w-]+)+';
|
|
112
|
+
/** `§ 2 PLX-App`, `§§ 2 and 5 PLX-Delivery`, `§§ 2–4 PLX-Delivery`, wrapped onto a comment line or not. */
|
|
113
|
+
const FORWARD = new RegExp(`${SIGN}(${NUMBERS})${GAP}(${CODE})`, 'g');
|
|
114
|
+
/** `PLX-CLI § 1`, `(PLX-Delivery, § 8)`. */
|
|
115
|
+
const REVERSE = new RegExp(`(?<![\\w-])(${CODE})[ \\t\\u00a0]*,?[ \\t\\u00a0]*${SIGN}(${NUMBERS})`, 'g');
|
|
116
|
+
/** `§ 2`, `§§ 2 and 3`, with no code on either side: the page's own sections. */
|
|
117
|
+
const BARE = new RegExp(`${SIGN}(${NUMBERS})`, 'g');
|
|
118
|
+
const NAME_CITATION = new RegExp(`(?<![\\w/-])${NAME_LIKE}(?![\\w/])`, 'g');
|
|
119
|
+
const sectionKey = (n, code) => `§ ${n} ${code}`;
|
|
120
|
+
const numbersOf = (list) => list.match(new RegExp(NUMBER, 'g')) ?? [];
|
|
121
|
+
/**
|
|
122
|
+
* The citations in a file that name nothing. `own` is the code a bare `§ n`
|
|
123
|
+
* stands for: the page's own, on a page of the compendium (`PLX` on the map);
|
|
124
|
+
* elsewhere a bare `§ n` has no page and is not checked.
|
|
125
|
+
*/
|
|
126
|
+
export function lintCitations(text, file, citable, own) {
|
|
127
|
+
const codes = new Set([...citable].filter((c) => c.startsWith('§ ')).map((c) => c.replace(/^§ \S+ /, '')));
|
|
128
|
+
const out = [];
|
|
129
|
+
const sections = (list, code, line) => {
|
|
130
|
+
for (const n of numbersOf(list)) {
|
|
131
|
+
const excerpt = sectionKey(n, code);
|
|
132
|
+
if (citable.has(excerpt))
|
|
133
|
+
continue;
|
|
134
|
+
const message = codes.has(code)
|
|
135
|
+
? `${excerpt} cites a section that does not exist`
|
|
136
|
+
: `${excerpt} cites ${code}, which is no module`;
|
|
137
|
+
out.push({ lint: 'citations', file, line, excerpt, message });
|
|
138
|
+
}
|
|
139
|
+
};
|
|
140
|
+
// A sign belongs to the first reading that takes it: a code after the
|
|
141
|
+
// numbers, then a code before them, then the page itself. So a code, a
|
|
142
|
+
// comma and a bare sign read as a reverse citation even where the sign
|
|
143
|
+
// means the page's own section: "it consumes <code>, § <n> says how" is read
|
|
144
|
+
// as section <n> of <code>, not of the page.
|
|
145
|
+
const taken = new Set();
|
|
146
|
+
const signAt = (m) => m.index + m[0].indexOf('§');
|
|
147
|
+
for (const { match, line } of matches(text, FORWARD)) {
|
|
148
|
+
taken.add(signAt(match));
|
|
149
|
+
sections(match[1] ?? '', match[2] ?? '', line);
|
|
150
|
+
}
|
|
151
|
+
for (const { match, line } of matches(text, REVERSE)) {
|
|
152
|
+
if (taken.has(signAt(match)))
|
|
153
|
+
continue;
|
|
154
|
+
taken.add(signAt(match));
|
|
155
|
+
sections(match[2] ?? '', match[1] ?? '', line);
|
|
156
|
+
}
|
|
157
|
+
if (own)
|
|
158
|
+
for (const { match, line } of matches(text, BARE)) {
|
|
159
|
+
const at = signAt(match);
|
|
160
|
+
const lineStart = text.lastIndexOf('\n', at) + 1;
|
|
161
|
+
if (taken.has(at) || /^#+[ \t]*$/.test(text.slice(lineStart, at)))
|
|
162
|
+
continue; // a heading defines, not cites
|
|
163
|
+
sections(match[1] ?? '', own, line);
|
|
164
|
+
}
|
|
165
|
+
const wellFormed = new RegExp(`^${REQUIREMENT_NAME}$`);
|
|
166
|
+
for (const { match, line } of matches(text, NAME_CITATION)) {
|
|
167
|
+
const name = match[0];
|
|
168
|
+
if (!wellFormed.test(name))
|
|
169
|
+
out.push({
|
|
170
|
+
lint: 'citations',
|
|
171
|
+
file,
|
|
172
|
+
line,
|
|
173
|
+
excerpt: name,
|
|
174
|
+
message: `${name} is no requirement name: PLX-<Module>[/<Profile>]/<Name>, each segment capitalised`,
|
|
175
|
+
});
|
|
176
|
+
else if (!citable.has(name))
|
|
177
|
+
out.push({ lint: 'citations', file, line, excerpt: name, message: `${name} names no requirement line` });
|
|
178
|
+
}
|
|
179
|
+
return out.sort((a, b) => a.line - b.line);
|
|
180
|
+
}
|
|
181
|
+
// --- template-header: at most two comment lines at the top of a template file -----
|
|
182
|
+
export const MAX_HEADER_LINES = 2;
|
|
183
|
+
/** The comment syntax of a template file by its extension; a `.jinja` file has Jinja's comments too. Markdown has only HTML comments. */
|
|
184
|
+
function commentSyntax(file) {
|
|
185
|
+
const jinja = file.endsWith('.jinja') ? [['{#', '#}']] : [];
|
|
186
|
+
const name = file.replace(/\.jinja$/, '');
|
|
187
|
+
if (/\.(md|mdx|html)$/.test(name))
|
|
188
|
+
return { blocks: [['<!--', '-->'], ...jinja] };
|
|
189
|
+
if (/\.(ts|tsx|js|jsx|mjs|cjs|css|json|jsonc|pkl)$/.test(name))
|
|
190
|
+
return { line: /^\/\//, blocks: [['/*', '*/'], ...jinja] };
|
|
191
|
+
return { line: /^#(?!!)/, blocks: jinja };
|
|
192
|
+
}
|
|
193
|
+
const JINJA_TAG = /\{%-?[\s\S]*?-?%\}/g;
|
|
194
|
+
/** Lines (Jinja tags removed) that open a file without being content: a shebang, a parser directive, a YAML document start. */
|
|
195
|
+
const isPreamble = (line) => /^#!/.test(line) || /^#\s*(syntax|escape|check)\s*=/.test(line) || line === '---';
|
|
196
|
+
/**
|
|
197
|
+
* The number of comment lines a template file's header holds. The header is
|
|
198
|
+
* the first comment block, line comments and block comments counted line by
|
|
199
|
+
* line, when no more than one line of content precedes it (the one line a
|
|
200
|
+
* workflow names itself with, `name: on_pr`). A later block, after blank
|
|
201
|
+
* lines, counts as well when a blank line (or the end of the file) follows it:
|
|
202
|
+
* a blank line cannot split a long header. A later block directly above a line
|
|
203
|
+
* of content is that content's own comment; it does not count, and the header
|
|
204
|
+
* ends there, as it does at any line of content. After the header has begun, a
|
|
205
|
+
* line that holds only a Jinja tag is content, not a blank line: a comment above
|
|
206
|
+
* `{% if x %}` is the comment of the block it opens. Before it, such a line is
|
|
207
|
+
* skipped like a blank one.
|
|
208
|
+
*/
|
|
209
|
+
export function headerLines(text, file) {
|
|
210
|
+
const syntax = commentSyntax(file);
|
|
211
|
+
const raw = text.split('\n').map((l) => l.trim());
|
|
212
|
+
const lines = raw.map((l) => l.replace(JINJA_TAG, '').trim());
|
|
213
|
+
/** A line that held only a Jinja tag (`{% if x %}`): content to the header's end, though nothing is left of it. */
|
|
214
|
+
const jinjaOnly = (n) => (lines[n] ?? '') === '' && (raw[n] ?? '') !== '';
|
|
215
|
+
/** Where the comment block that starts at line `i` ends (exclusive); `i` when that line is no comment. */
|
|
216
|
+
const blockEnd = (i) => {
|
|
217
|
+
let j = i;
|
|
218
|
+
for (;;) {
|
|
219
|
+
const line = lines[j] ?? '';
|
|
220
|
+
const block = line === '' ? undefined : syntax.blocks.find(([open]) => line.startsWith(open));
|
|
221
|
+
if (block) {
|
|
222
|
+
const [open, close] = block;
|
|
223
|
+
let k = j;
|
|
224
|
+
while (k < lines.length - 1 && !(lines[k] ?? '').includes(close, k === j ? open.length : 0))
|
|
225
|
+
k++;
|
|
226
|
+
j = k + 1;
|
|
227
|
+
}
|
|
228
|
+
else if (line !== '' && syntax.line?.test(line))
|
|
229
|
+
j++;
|
|
230
|
+
else
|
|
231
|
+
return j;
|
|
232
|
+
}
|
|
233
|
+
};
|
|
234
|
+
let i = 0;
|
|
235
|
+
let content = 0;
|
|
236
|
+
for (; i < lines.length; i++) {
|
|
237
|
+
const line = lines[i] ?? '';
|
|
238
|
+
if (line === '' || isPreamble(line))
|
|
239
|
+
continue;
|
|
240
|
+
if (blockEnd(i) > i)
|
|
241
|
+
break;
|
|
242
|
+
if (++content > 1)
|
|
243
|
+
return 0;
|
|
244
|
+
}
|
|
245
|
+
if (i >= lines.length)
|
|
246
|
+
return 0;
|
|
247
|
+
let end = blockEnd(i);
|
|
248
|
+
let count = end - i;
|
|
249
|
+
for (i = end; i < lines.length;) {
|
|
250
|
+
if ((lines[i] ?? '') === '' && !jinjaOnly(i)) {
|
|
251
|
+
i++;
|
|
252
|
+
continue;
|
|
253
|
+
}
|
|
254
|
+
end = blockEnd(i);
|
|
255
|
+
if (end === i || (lines[end] ?? '') !== '' || jinjaOnly(end))
|
|
256
|
+
break;
|
|
257
|
+
count += end - i;
|
|
258
|
+
i = end;
|
|
259
|
+
}
|
|
260
|
+
return count;
|
|
261
|
+
}
|
|
262
|
+
export function lintTemplateHeader(text, file) {
|
|
263
|
+
const n = headerLines(text, file);
|
|
264
|
+
if (n <= MAX_HEADER_LINES)
|
|
265
|
+
return [];
|
|
266
|
+
return [
|
|
267
|
+
{
|
|
268
|
+
lint: 'template-header',
|
|
269
|
+
file,
|
|
270
|
+
line: 1,
|
|
271
|
+
excerpt: `${n} header comment lines`,
|
|
272
|
+
message: `${n} header comment lines; a template file opens with at most ${MAX_HEADER_LINES}, and the rest lives in the compendium`,
|
|
273
|
+
},
|
|
274
|
+
];
|
|
275
|
+
}
|
|
276
|
+
// --- issue-id: no reference to the issue tracker -------------------------------
|
|
277
|
+
/**
|
|
278
|
+
* An issue identifier as any tracker writes it: exactly three capitals, a
|
|
279
|
+
* dash, digits; no tracker's key is named here. A module code passes, its dash
|
|
280
|
+
* being followed by a word. A dash after the digits does not save one (a
|
|
281
|
+
* branch slug that opens with an identifier names the issue all the same);
|
|
282
|
+
* lowercase does, as slugs, CSS classes and the like are lowercase.
|
|
283
|
+
*/
|
|
284
|
+
const ISSUE_ID = /(?<![\w])([A-Z]{3})-\d+(?![\w])/g;
|
|
285
|
+
/**
|
|
286
|
+
* The standard tokens of an identifier's shape, by prefix: these five and no
|
|
287
|
+
* other, fixed here and read from no configuration. Anything else of the shape
|
|
288
|
+
* that is no issue identifier is renamed, or sits in its repo's baseline.
|
|
289
|
+
*/
|
|
290
|
+
const STANDARD_PREFIXES = new Set([
|
|
291
|
+
'SHA', // hash functions: SHA-256
|
|
292
|
+
'UTF', // character encodings: UTF-8
|
|
293
|
+
'GPL', // licence identifiers: GPL-3.0-or-later
|
|
294
|
+
'PDF', // format versions: PDF-1.4
|
|
295
|
+
'ADR', // architecture decision records: ADR-0009
|
|
296
|
+
]);
|
|
297
|
+
export function lintIssueIds(text, file) {
|
|
298
|
+
return [...matches(text, ISSUE_ID)]
|
|
299
|
+
.filter(({ match }) => !STANDARD_PREFIXES.has(match[1] ?? ''))
|
|
300
|
+
.map(({ match, line }) => ({
|
|
301
|
+
lint: 'issue-id',
|
|
302
|
+
file,
|
|
303
|
+
line,
|
|
304
|
+
excerpt: match[0],
|
|
305
|
+
message: `${match[0]} reads as an issue identifier; say what it means instead`,
|
|
306
|
+
}));
|
|
307
|
+
}
|
|
308
|
+
/** The characters git picks from under `core.commentChar=auto`, in its order. */
|
|
309
|
+
const AUTO_COMMENT_CHARS = '#;@!$%^&|:';
|
|
310
|
+
/**
|
|
311
|
+
* A commit message's issue identifiers. Every line counts, comment lines too:
|
|
312
|
+
* under `git commit -m` git keeps them. What git adds itself is left out: its
|
|
313
|
+
* template, from the "Please enter the commit message" line on (it names the
|
|
314
|
+
* branch), and everything below a scissors line, both recognised by the
|
|
315
|
+
* repo's comment character (`core.commentChar`, read by the caller; under
|
|
316
|
+
* `auto`, any character git may pick). Git writes that template in the user's
|
|
317
|
+
* language; under another locale its lines are linted too.
|
|
318
|
+
*/
|
|
319
|
+
export function lintCommitMessage(text, comment = '#') {
|
|
320
|
+
const chars = comment === 'auto' ? [...AUTO_COMMENT_CHARS] : [comment];
|
|
321
|
+
const ends = chars
|
|
322
|
+
.flatMap((c) => {
|
|
323
|
+
const q = c.replace(/[.*+?^${}()|[\]\\]/g, '\\$&');
|
|
324
|
+
return [new RegExp(`^${q} -+ >8 -+$`, 'm'), new RegExp(`^${q} Please enter the commit message`, 'm')];
|
|
325
|
+
})
|
|
326
|
+
.map((p) => text.search(p))
|
|
327
|
+
.filter((n) => n !== -1);
|
|
328
|
+
return lintIssueIds(ends.length > 0 ? text.slice(0, Math.min(...ends)) : text, 'commit message');
|
|
329
|
+
}
|
|
330
|
+
//# sourceMappingURL=lints.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+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,CAAC,IAAI,CAAC,MAAM,GAAG,CAAC,CAAC,CAAC,CAAC,IAAI,CAAC,KAAK,CAAC,CAAC,EAAE,IAAI,CAAC,GAAG,CAAC,GAAG,IAAI,CAAC,CAAC,CAAC,CAAC,CAAC,IAAI,EAAE,gBAAgB,CAAC,CAAC;AACnG,CAAC"}
|
package/dist/requirements.d.ts
CHANGED
|
@@ -1,10 +1,16 @@
|
|
|
1
1
|
import type { Context } from './context.ts';
|
|
2
|
+
import { type Plan } from './effects.ts';
|
|
3
|
+
import { type Violation } from './lints.ts';
|
|
2
4
|
export type PageMode = 'map' | 'module';
|
|
3
5
|
export interface Scan {
|
|
4
6
|
/** `✗ <name>: line N: ...`, in page order. */
|
|
5
7
|
defects: string[];
|
|
6
8
|
/** The requirement lines of a standard module; empty for anything else. */
|
|
7
9
|
requirements: string[];
|
|
10
|
+
/** The numbers of the page's numbered sections, in page order. */
|
|
11
|
+
sections: string[];
|
|
12
|
+
/** The names its requirement lines carry, in page order. */
|
|
13
|
+
names: string[];
|
|
8
14
|
/** The frontmatter fields the cross-page rules need. */
|
|
9
15
|
code?: string;
|
|
10
16
|
maturity?: string;
|
|
@@ -12,6 +18,19 @@ export interface Scan {
|
|
|
12
18
|
depends: string[];
|
|
13
19
|
consumes: string[];
|
|
14
20
|
}
|
|
21
|
+
/** A requirement line's name, and whether it is written as the format and syntax require. */
|
|
22
|
+
export interface RequirementName {
|
|
23
|
+
name: string;
|
|
24
|
+
/** What is wrong with it; absent for a well-formed name. */
|
|
25
|
+
malformed?: string;
|
|
26
|
+
}
|
|
27
|
+
/**
|
|
28
|
+
* The name a requirement line carries, from the text after its `> - `: the
|
|
29
|
+
* full name in a code span, then a colon, at the very start. The one parser of
|
|
30
|
+
* that syntax: undefined for an unnamed line, `malformed` set when the opening
|
|
31
|
+
* code span holds something name-shaped (`PLX-…/…`) that is not a name.
|
|
32
|
+
*/
|
|
33
|
+
export declare function requirementName(bullet: string): RequirementName | undefined;
|
|
15
34
|
export declare function scanPage(text: string, name: string, mode: PageMode): Scan;
|
|
16
35
|
/** The requirement lines of a page, defects ignored: what `changed` compares across versions. */
|
|
17
36
|
export declare const extractRequirements: (text: string) => string[];
|
|
@@ -24,4 +43,48 @@ export interface CompendiumCheck {
|
|
|
24
43
|
/** Every module page of a compendium checkout: `<dir>/<file>`, sorted, index pages left out. */
|
|
25
44
|
export declare function modulePages(ctx: Context, compendium: string): Promise<string[]>;
|
|
26
45
|
export declare function checkCompendium(ctx: Context, compendium: string): Promise<CompendiumCheck>;
|
|
46
|
+
/**
|
|
47
|
+
* Everything a citation can name in a compendium checkout, in page order: `§ <n>
|
|
48
|
+
* PLX` for the map's numbered sections, `§ <n> <code>` for a module's, and the
|
|
49
|
+
* requirement names. Notes have no code and cannot be cited by one.
|
|
50
|
+
*/
|
|
51
|
+
export declare function readCitable(ctx: Context, compendium: string): Promise<string[]>;
|
|
52
|
+
/** What a repo is to the lints: the compendium (the map at its root), a copier template (a `_subdirectory`), or any other repo. */
|
|
53
|
+
export type RepoKind = 'compendium' | 'template' | 'repo';
|
|
54
|
+
export interface RepoOptions {
|
|
55
|
+
/** A compendium checkout to resolve citations against, instead of the index this plx carries. */
|
|
56
|
+
compendium?: string;
|
|
57
|
+
}
|
|
58
|
+
export interface RepoLint {
|
|
59
|
+
kind: RepoKind;
|
|
60
|
+
/** Where the citable sections and names came from. */
|
|
61
|
+
against: string;
|
|
62
|
+
/** The compendium's structural defects; never baselined. */
|
|
63
|
+
defects: string[];
|
|
64
|
+
violations: Violation[];
|
|
65
|
+
contracts?: number;
|
|
66
|
+
approaches?: number;
|
|
67
|
+
}
|
|
68
|
+
/** Every violation of the four lints in a repo's tracked files, before the baseline; the compendium's structure too. */
|
|
69
|
+
export declare function lintRepo(ctx: Context, dir: string, options?: RepoOptions): Promise<RepoLint>;
|
|
70
|
+
export interface RepoCheck {
|
|
71
|
+
kind: RepoKind;
|
|
72
|
+
against: string;
|
|
73
|
+
/** Every reason the check fails, one line each: structural defects, violations the baseline does not hold, baseline entries that no longer occur. */
|
|
74
|
+
defects: string[];
|
|
75
|
+
/** Violations the baseline holds. */
|
|
76
|
+
known: number;
|
|
77
|
+
contracts?: number;
|
|
78
|
+
approaches?: number;
|
|
79
|
+
}
|
|
80
|
+
/** The repo's lints held against its baseline: a violation it does not hold fails, and so does an entry that no longer occurs. */
|
|
81
|
+
export declare function checkRepo(ctx: Context, dir: string, options?: RepoOptions): Promise<RepoCheck>;
|
|
82
|
+
/** The write that records every current violation as the repo's baseline. */
|
|
83
|
+
export declare function planBaseline(ctx: Context, dir: string, options?: RepoOptions): Promise<Plan>;
|
|
84
|
+
/**
|
|
85
|
+
* A commit message file's issue identifiers (the commit-msg hook), git's own
|
|
86
|
+
* template recognised by the repo's comment character: `core.commentString`,
|
|
87
|
+
* else `core.commentChar`, else `#`.
|
|
88
|
+
*/
|
|
89
|
+
export declare function checkCommitMessage(ctx: Context, file: string, dir: string): Promise<Violation[]>;
|
|
27
90
|
//# sourceMappingURL=requirements.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"requirements.d.ts","sourceRoot":"","sources":["../src/requirements.ts"],"names":[],"mappings":"
|
|
1
|
+
{"version":3,"file":"requirements.d.ts","sourceRoot":"","sources":["../src/requirements.ts"],"names":[],"mappings":"AAiDA,OAAO,KAAK,EAAE,OAAO,EAAE,MAAM,cAAc,CAAC;AAC5C,OAAO,EAAE,KAAK,IAAI,EAAS,MAAM,cAAc,CAAC;AAChD,OAAO,EASL,KAAK,SAAS,EACf,MAAM,YAAY,CAAC;AAGpB,MAAM,MAAM,QAAQ,GAAG,KAAK,GAAG,QAAQ,CAAC;AAExC,MAAM,WAAW,IAAI;IACnB,8CAA8C;IAC9C,OAAO,EAAE,MAAM,EAAE,CAAC;IAClB,2EAA2E;IAC3E,YAAY,EAAE,MAAM,EAAE,CAAC;IACvB,kEAAkE;IAClE,QAAQ,EAAE,MAAM,EAAE,CAAC;IACnB,4DAA4D;IAC5D,KAAK,E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CHANGED
|
@@ -2,10 +2,14 @@
|
|
|
2
2
|
// moved: a verb, not a system.
|
|
3
3
|
//
|
|
4
4
|
// scanPage one page: its defects, and for a standard module its
|
|
5
|
-
// requirement lines, `§ <section> <text>`, in page order
|
|
5
|
+
// requirement lines, `§ <section> <text>`, in page order,
|
|
6
|
+
// its numbered sections and its requirement names
|
|
6
7
|
// checkCompendium the map and every module page, plus the cross-page rules:
|
|
7
|
-
// unique codes,
|
|
8
|
-
// the seams (§ 1.3 PLX)
|
|
8
|
+
// unique codes, unique requirement names, known
|
|
9
|
+
// dependencies, dependencies that respect the seams (§ 1.3 PLX)
|
|
10
|
+
// checkRepo any repo: the four lints of lints.ts over its tracked
|
|
11
|
+
// files, against its baseline (baseline.ts); for the
|
|
12
|
+
// compendium, checkCompendium too
|
|
9
13
|
//
|
|
10
14
|
// The map carries no requirements and no BCP 14 keyword. A module at standard
|
|
11
15
|
// maturity carries its requirements as blockquoted bullets ("> - ") under
|
|
@@ -16,13 +20,56 @@
|
|
|
16
20
|
// `plx-dev ship` compares a module's extracted lines across versions to stamp `changed`,
|
|
17
21
|
// so the extractor and the linter are one function and cannot disagree.
|
|
18
22
|
//
|
|
19
|
-
//
|
|
23
|
+
// A requirement line carries its name, when it has one, as its first words:
|
|
24
|
+
// the full name in a code span and a colon (requirementName),
|
|
25
|
+
//
|
|
26
|
+
// > - `PLX-App/<Name>`: The app MUST ...
|
|
27
|
+
// > - `PLX-App/Stateful/<Name>`: ... (a line of the app's stateful profile)
|
|
28
|
+
//
|
|
29
|
+
// in the one format `<module>[/<profile>]/<name>`, each segment capitalised
|
|
30
|
+
// like a module code's word, the module being the page's code. A profile is a
|
|
31
|
+
// part of its module's page; `PLX-AppStateful/<Name>`, the profile spelled as
|
|
32
|
+
// a module, is refused. A code span that opens a requirement line and holds
|
|
33
|
+
// something else of that shape (lowercase, four segments, no colon) is a
|
|
34
|
+
// malformed name, never an unnamed line.
|
|
35
|
+
//
|
|
36
|
+
// What a citation can name, the citable index of a version (`§ <n> <code>`
|
|
37
|
+
// for every numbered section, and every requirement name), comes from the
|
|
38
|
+
// compendium checked, from a checkout given with --compendium, or else from
|
|
39
|
+
// the index this plx carries (standardIndex.ts), written by `plx-dev ship`
|
|
40
|
+
// from the compendium at the version it cuts: a tenant repo, which has no
|
|
41
|
+
// compendium, checks its citations against the version of plx it pins.
|
|
42
|
+
//
|
|
43
|
+
// plx requirements <repo> # lint; exit 1 on any defect
|
|
44
|
+
// plx requirements <repo> --write-baseline # record today's violations
|
|
45
|
+
// plx requirements --commit-msg <file> # the commit-msg hook
|
|
20
46
|
// plx requirements --extract contracts/app.md
|
|
21
47
|
import { join } from 'node:path';
|
|
48
|
+
import { BASELINE_FILE, compareBaseline, parseBaseline, renderBaseline } from "./baseline.js";
|
|
22
49
|
import { CATALOG_DIRS } from "./catalog.js";
|
|
50
|
+
import { write } from "./effects.js";
|
|
51
|
+
import { lintCitations, lintCommitMessage, lintDateOrVersion, lintIssueIds, lintTemplateHeader, REQUIREMENT_NAME, renderViolation, } from "./lints.js";
|
|
52
|
+
import { bundledIndex } from "./standardIndex.js";
|
|
23
53
|
const KEYWORD = /MUST|SHOULD|MAY/;
|
|
24
54
|
/** A BCP 14 keyword in a line, the informal plurals (MUSTs, SHOULDs, MAYs) not counting. */
|
|
25
55
|
const hasKeyword = (line) => KEYWORD.test(line.replace(/MUSTs|SHOULDs|MAYs/g, ''));
|
|
56
|
+
/**
|
|
57
|
+
* The name a requirement line carries, from the text after its `> - `: the
|
|
58
|
+
* full name in a code span, then a colon, at the very start. The one parser of
|
|
59
|
+
* that syntax: undefined for an unnamed line, `malformed` set when the opening
|
|
60
|
+
* code span holds something name-shaped (`PLX-…/…`) that is not a name.
|
|
61
|
+
*/
|
|
62
|
+
export function requirementName(bullet) {
|
|
63
|
+
const span = /^`(PLX-[^`\s]*\/[^`\s]*)`(:\s)?/.exec(bullet);
|
|
64
|
+
if (!span)
|
|
65
|
+
return undefined;
|
|
66
|
+
const name = span[1] ?? '';
|
|
67
|
+
if (!new RegExp(`^${REQUIREMENT_NAME}$`).test(name))
|
|
68
|
+
return { name, malformed: 'the format is PLX-<Module>[/<Profile>]/<Name>, each segment capitalised' };
|
|
69
|
+
if (!span[2])
|
|
70
|
+
return { name, malformed: 'a name is followed by a colon and a blank' };
|
|
71
|
+
return { name };
|
|
72
|
+
}
|
|
26
73
|
/** A bracketed, comma-separated list as the frontmatter writes it: `[A, B]`. */
|
|
27
74
|
const list = (value) => value
|
|
28
75
|
.replace(/^\s*\[/, '')
|
|
@@ -31,7 +78,7 @@ const list = (value) => value
|
|
|
31
78
|
.map((s) => s.trim())
|
|
32
79
|
.filter(Boolean);
|
|
33
80
|
export function scanPage(text, name, mode) {
|
|
34
|
-
const scan = { defects: [], requirements: [], depends: [], consumes: [] };
|
|
81
|
+
const scan = { defects: [], requirements: [], sections: [], names: [], depends: [], consumes: [] };
|
|
35
82
|
const lines = text.split('\n');
|
|
36
83
|
const defect = (n, msg) => scan.defects.push(`✗ ${name}: line ${n + 1}: ${msg}`);
|
|
37
84
|
let i = 0;
|
|
@@ -77,6 +124,7 @@ export function scanPage(text, name, mode) {
|
|
|
77
124
|
if (maintaining)
|
|
78
125
|
defect(i, 'numbered section after Maintaining');
|
|
79
126
|
section = heading[1] ?? '';
|
|
127
|
+
scan.sections.push(section);
|
|
80
128
|
started = true;
|
|
81
129
|
continue;
|
|
82
130
|
}
|
|
@@ -89,8 +137,16 @@ export function scanPage(text, name, mode) {
|
|
|
89
137
|
defect(i, `requirement under Maintaining: ${line}`);
|
|
90
138
|
else if (!started)
|
|
91
139
|
defect(i, 'requirement before the first § heading');
|
|
92
|
-
else
|
|
140
|
+
else {
|
|
93
141
|
scan.requirements.push(`§ ${section} ${line.slice(4)}`);
|
|
142
|
+
const named = requirementName(line.slice(4));
|
|
143
|
+
if (named?.malformed)
|
|
144
|
+
defect(i, `malformed requirement name ${named.name}: ${named.malformed}`);
|
|
145
|
+
else if (named && named.name.split('/')[0] !== scan.code)
|
|
146
|
+
defect(i, `requirement name ${named.name} does not start with the page's code, ${scan.code}`);
|
|
147
|
+
else if (named)
|
|
148
|
+
scan.names.push(named.name);
|
|
149
|
+
}
|
|
94
150
|
continue;
|
|
95
151
|
}
|
|
96
152
|
if (line.startsWith('>')) {
|
|
@@ -146,6 +202,20 @@ export async function checkCompendium(ctx, compendium) {
|
|
|
146
202
|
for (const [code, where] of byCode)
|
|
147
203
|
if (where.length > 1)
|
|
148
204
|
defects.push(`✗ duplicate module code: ${code}`);
|
|
205
|
+
// Requirement names are unique across pages: a citation names one line. A
|
|
206
|
+
// profile is part of its module's page, so a name whose module is another
|
|
207
|
+
// module's code and a word (PLX-AppStateful) spells the profile as a module.
|
|
208
|
+
const named = new Set();
|
|
209
|
+
for (const s of scans.values())
|
|
210
|
+
for (const name of s.names) {
|
|
211
|
+
if (named.has(name))
|
|
212
|
+
defects.push(`✗ duplicate requirement name: ${name}`);
|
|
213
|
+
named.add(name);
|
|
214
|
+
const module = name.split('/')[0] ?? '';
|
|
215
|
+
const base = [...byCode.keys()].find((c) => c !== module && new RegExp(`^${c}[A-Z][a-z]+$`).test(module));
|
|
216
|
+
if (base)
|
|
217
|
+
defects.push(`✗ requirement name ${name} spells a profile of ${base} as a module; a profile's lines are named ${base}/<Profile>/<Name> on the page of ${base}`);
|
|
218
|
+
}
|
|
149
219
|
// Every declared dependency names a module that exists.
|
|
150
220
|
for (const s of scans.values())
|
|
151
221
|
for (const dep of s.depends)
|
|
@@ -185,4 +255,117 @@ export async function checkCompendium(ctx, compendium) {
|
|
|
185
255
|
approaches: pages.filter((p) => p.startsWith('approaches/')).length,
|
|
186
256
|
};
|
|
187
257
|
}
|
|
258
|
+
/**
|
|
259
|
+
* Everything a citation can name in a compendium checkout, in page order: `§ <n>
|
|
260
|
+
* PLX` for the map's numbered sections, `§ <n> <code>` for a module's, and the
|
|
261
|
+
* requirement names. Notes have no code and cannot be cited by one.
|
|
262
|
+
*/
|
|
263
|
+
export async function readCitable(ctx, compendium) {
|
|
264
|
+
return (await readPages(ctx, compendium)).citable;
|
|
265
|
+
}
|
|
266
|
+
/** The citable index of a compendium checkout, and the code each page's bare `§ n` stands for (`PLX` on the map). */
|
|
267
|
+
async function readPages(ctx, compendium) {
|
|
268
|
+
const own = new Map([[MAP_PAGE, 'PLX']]);
|
|
269
|
+
const citable = scanPage(await ctx.readFile(join(compendium, MAP_PAGE)), MAP_PAGE, 'map').sections.map((n) => `§ ${n} PLX`);
|
|
270
|
+
for (const page of await modulePages(ctx, compendium)) {
|
|
271
|
+
const scan = scanPage(await ctx.readFile(join(compendium, page)), page, 'module');
|
|
272
|
+
if (!scan.code)
|
|
273
|
+
continue;
|
|
274
|
+
own.set(page, scan.code);
|
|
275
|
+
citable.push(...scan.sections.map((n) => `§ ${n} ${scan.code}`), ...scan.names);
|
|
276
|
+
}
|
|
277
|
+
return { citable, own };
|
|
278
|
+
}
|
|
279
|
+
const COPIER_FILES = ['copier.yml', 'copier.yaml'];
|
|
280
|
+
async function kindOf(ctx, dir) {
|
|
281
|
+
if (await ctx.readFile(join(dir, MAP_PAGE)).then(() => true, () => false))
|
|
282
|
+
return { kind: 'compendium' };
|
|
283
|
+
for (const file of COPIER_FILES) {
|
|
284
|
+
const text = await ctx.readFile(join(dir, file)).catch(() => undefined);
|
|
285
|
+
const sub = text === undefined ? undefined : /^_subdirectory:\s*["']?([^"'\s#]+)/m.exec(text)?.[1];
|
|
286
|
+
if (sub)
|
|
287
|
+
return { kind: 'template', templateDir: sub.replace(/\/+$/, '') };
|
|
288
|
+
}
|
|
289
|
+
return { kind: 'repo' };
|
|
290
|
+
}
|
|
291
|
+
/** The repo's tracked files, relative to its root. */
|
|
292
|
+
async function trackedFiles(ctx, dir) {
|
|
293
|
+
const out = await ctx.read('git', ['ls-files', '-z'], { cwd: dir }).catch(() => {
|
|
294
|
+
throw new Error(`${dir} is not a git checkout; the lints read its tracked files`);
|
|
295
|
+
});
|
|
296
|
+
return out.split('\0').filter(Boolean).sort();
|
|
297
|
+
}
|
|
298
|
+
/** Every violation of the four lints in a repo's tracked files, before the baseline; the compendium's structure too. */
|
|
299
|
+
export async function lintRepo(ctx, dir, options = {}) {
|
|
300
|
+
const { kind, templateDir } = await kindOf(ctx, dir);
|
|
301
|
+
const result = { kind, against: '', defects: [], violations: [] };
|
|
302
|
+
let index;
|
|
303
|
+
/** The code a bare `§ n` stands for, by page: only in the compendium checked. */
|
|
304
|
+
let own = new Map();
|
|
305
|
+
if (kind === 'compendium') {
|
|
306
|
+
const check = await checkCompendium(ctx, dir);
|
|
307
|
+
Object.assign(result, { defects: check.defects, contracts: check.contracts, approaches: check.approaches });
|
|
308
|
+
const pages = await readPages(ctx, dir);
|
|
309
|
+
index = { version: 'this checkout', citable: pages.citable };
|
|
310
|
+
own = pages.own;
|
|
311
|
+
result.against = 'this compendium';
|
|
312
|
+
}
|
|
313
|
+
else if (options.compendium) {
|
|
314
|
+
index = { version: options.compendium, citable: await readCitable(ctx, options.compendium) };
|
|
315
|
+
result.against = `the compendium at ${options.compendium}`;
|
|
316
|
+
}
|
|
317
|
+
else {
|
|
318
|
+
index = bundledIndex();
|
|
319
|
+
result.against = `Plexus ${index.version}, the index this plx carries`;
|
|
320
|
+
}
|
|
321
|
+
const citable = new Set(index.citable);
|
|
322
|
+
for (const file of await trackedFiles(ctx, dir)) {
|
|
323
|
+
if (file === BASELINE_FILE)
|
|
324
|
+
continue;
|
|
325
|
+
const text = await ctx.readFile(join(dir, file)).catch(() => undefined);
|
|
326
|
+
if (text === undefined || text.includes('\0'))
|
|
327
|
+
continue; // deleted in the worktree, a submodule, or binary
|
|
328
|
+
if (kind === 'compendium' && /\.mdx?$/.test(file))
|
|
329
|
+
result.violations.push(...lintDateOrVersion(text, file));
|
|
330
|
+
result.violations.push(...lintCitations(text, file, citable, own.get(file)));
|
|
331
|
+
if (templateDir && file.startsWith(`${templateDir}/`))
|
|
332
|
+
result.violations.push(...lintTemplateHeader(text, file));
|
|
333
|
+
result.violations.push(...lintIssueIds(text, file));
|
|
334
|
+
}
|
|
335
|
+
return result;
|
|
336
|
+
}
|
|
337
|
+
/** The repo's lints held against its baseline: a violation it does not hold fails, and so does an entry that no longer occurs. */
|
|
338
|
+
export async function checkRepo(ctx, dir, options = {}) {
|
|
339
|
+
const lint = await lintRepo(ctx, dir, options);
|
|
340
|
+
const baseline = parseBaseline(await ctx.readFile(join(dir, BASELINE_FILE)).catch(() => ''));
|
|
341
|
+
const { fresh, stale, known } = compareBaseline(lint.violations, baseline);
|
|
342
|
+
return {
|
|
343
|
+
kind: lint.kind,
|
|
344
|
+
against: lint.against,
|
|
345
|
+
defects: [
|
|
346
|
+
...lint.defects,
|
|
347
|
+
...fresh.map(renderViolation),
|
|
348
|
+
...stale.map((key) => `✗ ${BASELINE_FILE}: no longer occurs, remove it: ${key}`),
|
|
349
|
+
],
|
|
350
|
+
known,
|
|
351
|
+
contracts: lint.contracts,
|
|
352
|
+
approaches: lint.approaches,
|
|
353
|
+
};
|
|
354
|
+
}
|
|
355
|
+
/** The write that records every current violation as the repo's baseline. */
|
|
356
|
+
export async function planBaseline(ctx, dir, options = {}) {
|
|
357
|
+
const lint = await lintRepo(ctx, dir, options);
|
|
358
|
+
ctx.say(`• ${lint.violations.length} known violations → ${BASELINE_FILE}`);
|
|
359
|
+
return [write(join(dir, BASELINE_FILE), renderBaseline(lint.violations))];
|
|
360
|
+
}
|
|
361
|
+
/**
|
|
362
|
+
* A commit message file's issue identifiers (the commit-msg hook), git's own
|
|
363
|
+
* template recognised by the repo's comment character: `core.commentString`,
|
|
364
|
+
* else `core.commentChar`, else `#`.
|
|
365
|
+
*/
|
|
366
|
+
export async function checkCommitMessage(ctx, file, dir) {
|
|
367
|
+
const config = async (key) => (await ctx.read('git', ['config', '--get', key], { cwd: dir }).catch(() => '')).trim();
|
|
368
|
+
const comment = (await config('core.commentString')) || (await config('core.commentChar')) || '#';
|
|
369
|
+
return lintCommitMessage(await ctx.readFile(file), comment);
|
|
370
|
+
}
|
|
188
371
|
//# sourceMappingURL=requirements.js.map
|
package/dist/requirements.js.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"requirements.js","sourceRoot":"","sources":["../src/requirements.ts"],"names":[],"mappings":"AAAA,yEAAyE;AACzE,+BAA+B;AAC/B,EAAE;AACF,yEAAyE;AACzE,2EAA2E;AAC3E,8EAA8E;AAC9E,gFAAgF;AAChF,0CAA0C;AAC1C,EAAE;AACF,8EAA8E;AAC9E,0EAA0E;AAC1E,+EAA+E;AAC/E,yEAAyE;AACzE,uEAAuE;AACvE,0EAA0E;AAC1E,yFAAyF;AACzF,wEAAwE;AACxE,EAAE;AACF,4EAA4E;AAC5E,gDAAgD;AAChD,OAAO,EAAE,IAAI,EAAE,MAAM,WAAW,CAAC;AACjC,OAAO,EAAE,YAAY,EAAE,MAAM,cAAc,CAAC;AAkB5C,MAAM,OAAO,GAAG,iBAAiB,CAAC;AAElC,4FAA4F;AAC5F,MAAM,UAAU,GAAG,CAAC,IAAY,EAAW,EAAE,CAAC,OAAO,CAAC,IAAI,CAAC,IAAI,CAAC,OAAO,CAAC,qBAAqB,EAAE,EAAE,CAAC,CAAC,CAAC;AAEpG,gFAAgF;AAChF,MAAM,IAAI,GAAG,CAAC,KAAa,EAAY,EAAE,CACvC,KAAK;KACF,OAAO,CAAC,QAAQ,EAAE,EAAE,CAAC;KACrB,OAAO,CAAC,OAAO,EAAE,EAAE,CAAC;KACpB,KAAK,CAAC,GAAG,CAAC;KACV,GAAG,CAAC,CAAC,CAAC,EAAE,EAAE,CAAC,CAAC,CAAC,IAAI,EAAE,CAAC;KACpB,MAAM,CAAC,OAAO,CAAC,CAAC;AAErB,MAAM,UAAU,QAAQ,CAAC,IAAY,EAAE,IAAY,EAAE,IAAc;IACjE,MAAM,IAAI,GAAS,EAAE,OAAO,EAAE,EAAE,EAAE,YAAY,EAAE,EAAE,EAAE,OAAO,EAAE,EAAE,EAAE,QAAQ,EAAE,EAAE,EAAE,CAAC;IAChF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 7.3 PLX",
|
|
52
|
+
"§ 7.4 PLX",
|
|
53
|
+
"§ 7.5 PLX",
|
|
54
|
+
"§ 7.6 PLX",
|
|
55
|
+
"§ 7.7 PLX",
|
|
56
|
+
"§ 8 PLX",
|
|
57
|
+
"§ 8.1 PLX",
|
|
58
|
+
"§ 8.2 PLX",
|
|
59
|
+
"§ 8.3 PLX",
|
|
60
|
+
"§ 8.4 PLX",
|
|
61
|
+
"§ 8.5 PLX",
|
|
62
|
+
"§ 8.6 PLX",
|
|
63
|
+
"§ 8.7 PLX",
|
|
64
|
+
"§ 9 PLX",
|
|
65
|
+
"§ 10 PLX",
|
|
66
|
+
"§ 10.1 PLX",
|
|
67
|
+
"§ 10.2 PLX",
|
|
68
|
+
"§ 10.3 PLX",
|
|
69
|
+
"§ 10.4 PLX",
|
|
70
|
+
"§ 10.5 PLX",
|
|
71
|
+
"§ 11 PLX",
|
|
72
|
+
"§ 11.1 PLX",
|
|
73
|
+
"§ 11.2 PLX",
|
|
74
|
+
"§ 11.3 PLX",
|
|
75
|
+
"§ 11.4 PLX",
|
|
76
|
+
"§ 11.5 PLX",
|
|
77
|
+
"§ 11.6 PLX",
|
|
78
|
+
"§ 12 PLX",
|
|
79
|
+
"§ 12.1 PLX",
|
|
80
|
+
"§ 12.2 PLX",
|
|
81
|
+
"§ 12.3 PLX",
|
|
82
|
+
"§ 12.4 PLX",
|
|
83
|
+
"§ 12.5 PLX",
|
|
84
|
+
"§ 12.6 PLX",
|
|
85
|
+
"§ 13 PLX",
|
|
86
|
+
"§ 13.1 PLX",
|
|
87
|
+
"§ 13.2 PLX",
|
|
88
|
+
"§ 13.3 PLX",
|
|
89
|
+
"§ 13.4 PLX",
|
|
90
|
+
"§ 13.5 PLX",
|
|
91
|
+
"§ 1 PLX-AppStateful",
|
|
92
|
+
"§ 2 PLX-AppStateful",
|
|
93
|
+
"§ 3 PLX-AppStateful",
|
|
94
|
+
"§ 1 PLX-AppStateless",
|
|
95
|
+
"§ 1 PLX-App",
|
|
96
|
+
"§ 2 PLX-App",
|
|
97
|
+
"§ 3 PLX-App",
|
|
98
|
+
"§ 4 PLX-App",
|
|
99
|
+
"§ 5 PLX-App",
|
|
100
|
+
"§ 6 PLX-App",
|
|
101
|
+
"§ 7 PLX-App",
|
|
102
|
+
"§ 1 PLX-Environment",
|
|
103
|
+
"§ 2 PLX-Environment",
|
|
104
|
+
"§ 1 PLX-Host",
|
|
105
|
+
"§ 2 PLX-Host",
|
|
106
|
+
"§ 1 PLX-Repo",
|
|
107
|
+
"§ 2 PLX-Repo",
|
|
108
|
+
"§ 3 PLX-Repo",
|
|
109
|
+
"§ 1 PLX-Tenancy",
|
|
110
|
+
"§ 2 PLX-Tenancy",
|
|
111
|
+
"§ 3 PLX-Tenancy",
|
|
112
|
+
"§ 4 PLX-Tenancy",
|
|
113
|
+
"§ 1 PLX-CLI",
|
|
114
|
+
"§ 2 PLX-CLI",
|
|
115
|
+
"§ 3 PLX-CLI",
|
|
116
|
+
"§ 4 PLX-CLI",
|
|
117
|
+
"§ 5 PLX-CLI",
|
|
118
|
+
"§ 6 PLX-CLI",
|
|
119
|
+
"§ 1 PLX-Delivery",
|
|
120
|
+
"§ 2 PLX-Delivery",
|
|
121
|
+
"§ 3 PLX-Delivery",
|
|
122
|
+
"§ 4 PLX-Delivery",
|
|
123
|
+
"§ 5 PLX-Delivery",
|
|
124
|
+
"§ 6 PLX-Delivery",
|
|
125
|
+
"§ 7 PLX-Delivery",
|
|
126
|
+
"§ 8 PLX-Delivery",
|
|
127
|
+
"§ 1 PLX-Infrastructure",
|
|
128
|
+
"§ 2 PLX-Infrastructure",
|
|
129
|
+
"§ 3 PLX-Infrastructure",
|
|
130
|
+
"§ 1 PLX-Ingress",
|
|
131
|
+
"§ 2 PLX-Ingress",
|
|
132
|
+
"§ 1 PLX-JS",
|
|
133
|
+
"§ 1 PLX-Platform",
|
|
134
|
+
"§ 2 PLX-Platform",
|
|
135
|
+
"§ 3 PLX-Platform",
|
|
136
|
+
"§ 1 PLX-Secrets",
|
|
137
|
+
"§ 2 PLX-Secrets",
|
|
138
|
+
"§ 3 PLX-Secrets",
|
|
139
|
+
"§ 1 PLX-Updates",
|
|
140
|
+
"§ 2 PLX-Updates",
|
|
141
|
+
"§ 3 PLX-Updates"
|
|
142
|
+
]
|
|
143
|
+
}
|
|
@@ -0,0 +1,14 @@
|
|
|
1
|
+
/** Where ship writes the index, relative to tooling's root. */
|
|
2
|
+
export declare const STANDARD_INDEX_FILE = "packages/lib/src/standard-index.json";
|
|
3
|
+
export interface StandardIndex {
|
|
4
|
+
/** The Plexus version whose compendium the index was read from. */
|
|
5
|
+
version: string;
|
|
6
|
+
/** `§ <n> <code>` and requirement names, in page order. */
|
|
7
|
+
citable: string[];
|
|
8
|
+
}
|
|
9
|
+
export declare const renderStandardIndex: (index: StandardIndex) => string;
|
|
10
|
+
/** An index from its text, as `renderStandardIndex` writes it; anything else is refused. */
|
|
11
|
+
export declare function parseStandardIndex(text: string): StandardIndex;
|
|
12
|
+
/** The index this package was published with. */
|
|
13
|
+
export declare const bundledIndex: () => StandardIndex;
|
|
14
|
+
//# sourceMappingURL=standardIndex.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"standardIndex.d.ts","sourceRoot":"","sources":["../src/standardIndex.ts"],"names":[],"mappings":"AAiBA,+DAA+D;AAC/D,eAAO,MAAM,mBAAmB,yCAAyC,CAAC;AAE1E,MAAM,WAAW,aAAa;IAC5B,mEAAmE;IACnE,OAAO,EAAE,MAAM,CAAC;IAChB,2DAA2D;IAC3D,OAAO,EAAE,MAAM,EAAE,CAAC;CACnB;AAED,eAAO,MAAM,mBAAmB,GAAI,OAAO,aAAa,KAAG,MAA+C,CAAC;AAE3G,4FAA4F;AAC5F,wBAAgB,kBAAkB,CAAC,IAAI,EAAE,MAAM,GAAG,aAAa,CAQ9D;AAED,iDAAiD;AACjD,eAAO,MAAM,YAAY,QAAO,aAA8B,CAAC"}
|
|
@@ -0,0 +1,39 @@
|
|
|
1
|
+
// The citable index this package carries: everything a citation can name in
|
|
2
|
+
// the compendium of one Plexus version, `§ <n> <code>` for every numbered
|
|
3
|
+
// section of the map (`PLX`) and the modules, and every requirement name
|
|
4
|
+
// (requirements.ts, readCitable). It is what lets `plx requirements` check a
|
|
5
|
+
// tenant repo's citations with no compendium in reach, against the version of
|
|
6
|
+
// plx the repo pins.
|
|
7
|
+
//
|
|
8
|
+
// The compendium is a repo of its own, so tooling's build never reads it:
|
|
9
|
+
// `plx-dev ship` writes standard-index.json from the compendium checkout in the
|
|
10
|
+
// workspace it cuts (where it always is; ship refuses a workspace without it)
|
|
11
|
+
// as part of tooling's bookkeeping, before the tag, so the published package
|
|
12
|
+
// carries the index of its own version and the build stays a plain build. The
|
|
13
|
+
// file holds methodology only, section numbers and names, never a tenant's
|
|
14
|
+
// substance. Between two versions it lags the compendium's main; a check
|
|
15
|
+
// that needs the newest sections passes --compendium <checkout>.
|
|
16
|
+
import data from './standard-index.json' with { type: 'json' };
|
|
17
|
+
/** Where ship writes the index, relative to tooling's root. */
|
|
18
|
+
export const STANDARD_INDEX_FILE = 'packages/lib/src/standard-index.json';
|
|
19
|
+
export const renderStandardIndex = (index) => `${JSON.stringify(index, null, 2)}\n`;
|
|
20
|
+
/** An index from its text, as `renderStandardIndex` writes it; anything else is refused. */
|
|
21
|
+
export function parseStandardIndex(text) {
|
|
22
|
+
let data;
|
|
23
|
+
try {
|
|
24
|
+
data = JSON.parse(text);
|
|
25
|
+
}
|
|
26
|
+
catch {
|
|
27
|
+
throw new Error('the citable index is not JSON');
|
|
28
|
+
}
|
|
29
|
+
return checked(data);
|
|
30
|
+
}
|
|
31
|
+
/** The index this package was published with. */
|
|
32
|
+
export const bundledIndex = () => checked(data);
|
|
33
|
+
function checked(value) {
|
|
34
|
+
const { version, citable } = (value ?? {});
|
|
35
|
+
if (typeof version !== 'string' || !Array.isArray(citable) || !citable.every((c) => typeof c === 'string'))
|
|
36
|
+
throw new Error(`${STANDARD_INDEX_FILE} is not a citable index`);
|
|
37
|
+
return { version, citable };
|
|
38
|
+
}
|
|
39
|
+
//# sourceMappingURL=standardIndex.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"standardIndex.js","sourceRoot":"","sources":["../src/standardIndex.ts"],"names":[],"mappings":"AAAA,4EAA4E;AAC5E,0EAA0E;AAC1E,yEAAyE;AACzE,6EAA6E;AAC7E,8EAA8E;AAC9E,qBAAqB;AACrB,EAAE;AACF,0EAA0E;AAC1E,gFAAgF;AAChF,8EAA8E;AAC9E,6EAA6E;AAC7E,8EAA8E;AAC9E,2EAA2E;AAC3E,yEAAyE;AACzE,iEAAiE;AACjE,OAAO,IAAI,MAAM,uBAAuB,CAAC,OAAO,IAAI,EAAE,MAAM,EAAE,CAAC;AAE/D,+DAA+D;AAC/D,MAAM,CAAC,MAAM,mBAAmB,GAAG,sCAAsC,CAAC;AAS1E,MAAM,CAAC,MAAM,mBAAmB,GAAG,CAAC,KAAoB,EAAU,EAAE,CAAC,GAAG,IAAI,CAAC,SAAS,CAAC,KAAK,EAAE,IAAI,EAAE,CAAC,CAAC,IAAI,CAAC;AAE3G,4FAA4F;AAC5F,MAAM,UAAU,kBAAkB,CAAC,IAAY;IAC7C,IAAI,IAAa,CAAC;IAClB,IAAI,CAAC;QACH,IAAI,GAAG,IAAI,CAAC,KAAK,CAAC,IAAI,CAAC,CAAC;IAC1B,CAAC;IAAC,MAAM,CAAC;QACP,MAAM,IAAI,KAAK,CAAC,+BAA+B,CAAC,CAAC;IACnD,CAAC;IACD,OAAO,OAAO,CAAC,IAAI,CAAC,CAAC;AACvB,CAAC;AAED,iDAAiD;AACjD,MAAM,CAAC,MAAM,YAAY,GAAG,GAAkB,EAAE,CAAC,OAAO,CAAC,IAAI,CAAC,CAAC;AAE/D,SAAS,OAAO,CAAC,KAAc;IAC7B,MAAM,EAAE,OAAO,EAAE,OAAO,EAAE,GAAG,CAAC,KAAK,IAAI,EAAE,CAA2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