@hawkeyexl/manni 3.0.0 → 4.0.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/README.md +3 -3
- package/dist/{chunk-G7INFKNJ.js → chunk-J3KIKNWZ.js} +2 -2
- package/dist/{chunk-I6PYC7EP.js → chunk-O7RMPQZ4.js} +89 -12
- package/dist/chunk-O7RMPQZ4.js.map +1 -0
- package/dist/chunk-YDUFTHBZ.js +13908 -0
- package/dist/chunk-YDUFTHBZ.js.map +1 -0
- package/dist/cli.js +326 -28
- package/dist/cli.js.map +1 -1
- package/dist/docmeta.js +2 -2
- package/dist/index.d.ts +1569 -244
- package/dist/index.js +110 -3
- package/dist/index.js.map +1 -1
- package/package.json +17 -2
- package/schemas/lint/config.json +73 -0
- package/schemas/lint/template.json +346 -0
- package/templates/lint/tgdp/concept.yaml +77 -0
- package/templates/lint/tgdp/how-to.yaml +64 -0
- package/templates/lint/tgdp/manifest.json +57 -0
- package/templates/lint/tgdp/readme.yaml +163 -0
- package/templates/lint/tgdp/reference.yaml +67 -0
- package/templates/lint/tgdp/release-notes.yaml +108 -0
- package/templates/lint/tgdp/troubleshooting.yaml +98 -0
- package/templates/lint/tgdp/tutorial.yaml +74 -0
- package/dist/chunk-I6PYC7EP.js.map +0 -1
- package/dist/chunk-W75SLU7Z.js +0 -6541
- package/dist/chunk-W75SLU7Z.js.map +0 -1
- /package/dist/{chunk-G7INFKNJ.js.map → chunk-J3KIKNWZ.js.map} +0 -0
package/dist/index.d.ts
CHANGED
|
@@ -361,9 +361,22 @@ interface ValeToolConfig {
|
|
|
361
361
|
/** Vale's config file, as written, relative to `manni.config.yaml`. */
|
|
362
362
|
config?: string;
|
|
363
363
|
}
|
|
364
|
+
/** DITA Open Toolkit's settings under `tools.dita-ot`. */
|
|
365
|
+
interface DitaOtToolConfig {
|
|
366
|
+
/**
|
|
367
|
+
* DITA-OT's installation directory, as written, relative to
|
|
368
|
+
* `manni.config.yaml`. Unset means the `dita` on PATH.
|
|
369
|
+
*
|
|
370
|
+
* A directory rather than a path to the launcher, because that is the unit
|
|
371
|
+
* DITA-OT is distributed and documented as: the download unpacks to one
|
|
372
|
+
* directory, and `bin/dita` inside it will not run from anywhere else.
|
|
373
|
+
*/
|
|
374
|
+
home?: string;
|
|
375
|
+
}
|
|
364
376
|
/** The document's top-level `tools:`, one namespace per outside tool. */
|
|
365
377
|
interface ToolsConfig {
|
|
366
378
|
vale?: ValeToolConfig;
|
|
379
|
+
"dita-ot"?: DitaOtToolConfig;
|
|
367
380
|
}
|
|
368
381
|
|
|
369
382
|
interface ConfigFile {
|
|
@@ -416,7 +429,7 @@ interface ConfigFile {
|
|
|
416
429
|
encryptionKeyPrevious?: string;
|
|
417
430
|
}
|
|
418
431
|
|
|
419
|
-
interface BuiltinInfo {
|
|
432
|
+
interface BuiltinInfo$1 {
|
|
420
433
|
id: string;
|
|
421
434
|
title: string;
|
|
422
435
|
description: string;
|
|
@@ -437,10 +450,10 @@ interface RegisteredSchema {
|
|
|
437
450
|
}
|
|
438
451
|
/** The registered schemas of one config, keyed by `$id`. */
|
|
439
452
|
type RegisteredSchemas = ReadonlyMap<string, RegisteredSchema>;
|
|
440
|
-
declare function listBuiltins(): BuiltinInfo[];
|
|
441
|
-
type RefKind = "builtin" | "file" | "url";
|
|
442
|
-
declare function classifyRef(ref: string): {
|
|
443
|
-
kind: RefKind;
|
|
453
|
+
declare function listBuiltins$1(): BuiltinInfo$1[];
|
|
454
|
+
type RefKind$1 = "builtin" | "file" | "url";
|
|
455
|
+
declare function classifyRef$1(ref: string): {
|
|
456
|
+
kind: RefKind$1;
|
|
444
457
|
ref: string;
|
|
445
458
|
};
|
|
446
459
|
/**
|
|
@@ -1208,7 +1221,7 @@ interface DocmetaConfig {
|
|
|
1208
1221
|
* tool's config — a pre-family `docmeta.config.yaml`, or a section already
|
|
1209
1222
|
* cut out of the family file.
|
|
1210
1223
|
*/
|
|
1211
|
-
declare function parseConfig(text: string, source: string): DocmetaConfig;
|
|
1224
|
+
declare function parseConfig$1(text: string, source: string): DocmetaConfig;
|
|
1212
1225
|
interface LoadedConfig {
|
|
1213
1226
|
config: DocmetaConfig;
|
|
1214
1227
|
/** Absolute path to the file the config was read from. */
|
|
@@ -1289,7 +1302,7 @@ interface SchemaTrustRoot {
|
|
|
1289
1302
|
*
|
|
1290
1303
|
* Returns null when no config is found via discovery.
|
|
1291
1304
|
*/
|
|
1292
|
-
declare function loadConfig(explicitPath?: string, cwd?: string): Promise<LoadedConfig | null>;
|
|
1305
|
+
declare function loadConfig$1(explicitPath?: string, cwd?: string): Promise<LoadedConfig | null>;
|
|
1293
1306
|
/** Told to a caller once, when a run turns out to be governed by a config. */
|
|
1294
1307
|
interface ConfigNotice {
|
|
1295
1308
|
/** Absolute path to the config file. */
|
|
@@ -1410,7 +1423,7 @@ interface RunConfig {
|
|
|
1410
1423
|
*/
|
|
1411
1424
|
declare function resolveRunConfig(opts: RunConfigOptions): Promise<RunConfig>;
|
|
1412
1425
|
|
|
1413
|
-
interface ValidateOptions {
|
|
1426
|
+
interface ValidateOptions$1 {
|
|
1414
1427
|
inputs: string[];
|
|
1415
1428
|
cliSchemas?: string[];
|
|
1416
1429
|
exts?: string[];
|
|
@@ -1502,7 +1515,7 @@ interface ValidateRun {
|
|
|
1502
1515
|
*/
|
|
1503
1516
|
frame: FingerprintContext;
|
|
1504
1517
|
}
|
|
1505
|
-
declare function runValidate(opts: ValidateOptions): Promise<ValidateRun>;
|
|
1518
|
+
declare function runValidate(opts: ValidateOptions$1): Promise<ValidateRun>;
|
|
1506
1519
|
|
|
1507
1520
|
interface GetOptions {
|
|
1508
1521
|
fields: string[];
|
|
@@ -2250,7 +2263,7 @@ interface RegisteredInfo {
|
|
|
2250
2263
|
file: string;
|
|
2251
2264
|
}
|
|
2252
2265
|
interface SchemasInfo {
|
|
2253
|
-
builtins: BuiltinInfo[];
|
|
2266
|
+
builtins: BuiltinInfo$1[];
|
|
2254
2267
|
/** The governing config's registered schemas (proposal 0070). */
|
|
2255
2268
|
registered: RegisteredInfo[];
|
|
2256
2269
|
formats: {
|
|
@@ -2324,7 +2337,7 @@ declare function runVendorSchema(opts: VendorOptions): Promise<VendorResult>;
|
|
|
2324
2337
|
/** Shared shapes for the `fill` command, split out to keep imports acyclic. */
|
|
2325
2338
|
|
|
2326
2339
|
/** Why a proposed value was not written. */
|
|
2327
|
-
type SkipReason =
|
|
2340
|
+
type SkipReason$1 =
|
|
2328
2341
|
/** Self-reported confidence was below the threshold. */
|
|
2329
2342
|
"low-confidence"
|
|
2330
2343
|
/** Writing it would leave the document failing its own schema. */
|
|
@@ -2349,7 +2362,7 @@ interface FilledField {
|
|
|
2349
2362
|
*/
|
|
2350
2363
|
value?: unknown;
|
|
2351
2364
|
written: boolean;
|
|
2352
|
-
skipReason?: SkipReason;
|
|
2365
|
+
skipReason?: SkipReason$1;
|
|
2353
2366
|
/**
|
|
2354
2367
|
* The value was written encrypted, because the field's schema marks it
|
|
2355
2368
|
* `x-manni-encrypt`. Absent otherwise.
|
|
@@ -3314,13 +3327,13 @@ declare class SchemaCache {
|
|
|
3314
3327
|
write(url: string, schema: Record<string, unknown>): Promise<boolean>;
|
|
3315
3328
|
}
|
|
3316
3329
|
|
|
3317
|
-
interface SarifOptions {
|
|
3330
|
+
interface SarifOptions$1 {
|
|
3318
3331
|
/** The run's path frame. Without one, `file` labels are emitted as they are. */
|
|
3319
3332
|
frame?: FingerprintContext;
|
|
3320
3333
|
/** Diagnostics for the user; the CLI writes these to stderr. */
|
|
3321
3334
|
onNotice?: (message: string) => void;
|
|
3322
3335
|
}
|
|
3323
|
-
declare function renderSarif(results: ValidationResult[], opts?: SarifOptions): string;
|
|
3336
|
+
declare function renderSarif$1(results: ValidationResult[], opts?: SarifOptions$1): string;
|
|
3324
3337
|
|
|
3325
3338
|
/**
|
|
3326
3339
|
* JUnit XML — what CI systems parse for the "Tests" tab.
|
|
@@ -3368,7 +3381,7 @@ interface JunitOptions {
|
|
|
3368
3381
|
*/
|
|
3369
3382
|
frame?: FingerprintContext;
|
|
3370
3383
|
}
|
|
3371
|
-
declare function renderJunit(results: ValidationResult[], opts?: JunitOptions): string;
|
|
3384
|
+
declare function renderJunit$1(results: ValidationResult[], opts?: JunitOptions): string;
|
|
3372
3385
|
|
|
3373
3386
|
/**
|
|
3374
3387
|
* Reporters render validation results to a string. The command layer writes
|
|
@@ -3386,8 +3399,8 @@ declare function renderJunit(results: ValidationResult[], opts?: JunitOptions):
|
|
|
3386
3399
|
* runtime. Deriving the union from the array makes that drift impossible.
|
|
3387
3400
|
*/
|
|
3388
3401
|
declare const REPORT_FORMATS: readonly ["pretty", "json", "github", "sarif", "junit"];
|
|
3389
|
-
type ReportFormat = (typeof REPORT_FORMATS)[number];
|
|
3390
|
-
declare function isReportFormat(value: string): value is ReportFormat;
|
|
3402
|
+
type ReportFormat$1 = (typeof REPORT_FORMATS)[number];
|
|
3403
|
+
declare function isReportFormat(value: string): value is ReportFormat$1;
|
|
3391
3404
|
/**
|
|
3392
3405
|
* The formats **every** command produces.
|
|
3393
3406
|
*
|
|
@@ -3413,13 +3426,13 @@ declare function isCommonFormat(value: string): value is CommonFormat;
|
|
|
3413
3426
|
declare const QUERY_FORMATS: readonly ["pretty", "json", "csv", "github", "sarif", "junit"];
|
|
3414
3427
|
type QueryFormat = (typeof QUERY_FORMATS)[number];
|
|
3415
3428
|
declare function isQueryFormat(value: string): value is QueryFormat;
|
|
3416
|
-
interface ReportOptions extends SarifOptions, JunitOptions {
|
|
3429
|
+
interface ReportOptions$1 extends SarifOptions$1, JunitOptions {
|
|
3417
3430
|
color?: boolean;
|
|
3418
3431
|
/** In pretty output, omit passing files. */
|
|
3419
3432
|
quiet?: boolean;
|
|
3420
3433
|
}
|
|
3421
3434
|
|
|
3422
|
-
declare function render(format: ReportFormat, results: ValidationResult[], summary: RunSummary, opts?: ReportOptions): string;
|
|
3435
|
+
declare function render$1(format: ReportFormat$1, results: ValidationResult[], summary: RunSummary, opts?: ReportOptions$1): string;
|
|
3423
3436
|
|
|
3424
3437
|
/**
|
|
3425
3438
|
* Every value `fill -f` accepts, in the order help and error messages list
|
|
@@ -3470,7 +3483,7 @@ declare function renderFill(format: FillReportFormat, run: FillRun, opts?: FillR
|
|
|
3470
3483
|
declare const DERIVE_FORMATS: readonly ["pretty", "json", "github", "sarif", "junit"];
|
|
3471
3484
|
type DeriveReportFormat = (typeof DERIVE_FORMATS)[number];
|
|
3472
3485
|
declare function isDeriveFormat(value: string): value is DeriveReportFormat;
|
|
3473
|
-
type DeriveReportOptions = ReportOptions;
|
|
3486
|
+
type DeriveReportOptions = ReportOptions$1;
|
|
3474
3487
|
declare function renderDerive(run: DeriveRun, format: DeriveReportFormat, opts?: DeriveReportOptions): string;
|
|
3475
3488
|
|
|
3476
3489
|
/**
|
|
@@ -3628,7 +3641,7 @@ options?: {
|
|
|
3628
3641
|
/** Resolve the extractor for a file extension (incl. dot). */
|
|
3629
3642
|
declare function extractorForExtension(ext: string): MetadataExtractor | undefined;
|
|
3630
3643
|
/** Extensions handled by registered extractors (used for directory walks). */
|
|
3631
|
-
declare function supportedExtensions(): string[];
|
|
3644
|
+
declare function supportedExtensions$1(): string[];
|
|
3632
3645
|
|
|
3633
3646
|
type KeySource = "env" | "config" | "none";
|
|
3634
3647
|
interface ResolvedKey {
|
|
@@ -4461,9 +4474,9 @@ declare class CiteError extends ToolError {
|
|
|
4461
4474
|
*/
|
|
4462
4475
|
|
|
4463
4476
|
declare const DEFAULT_SEVERITY: Readonly<Record<CiteRule, CiteSeverity>>;
|
|
4464
|
-
declare const RULE_ID_PREFIX = "manni:cite";
|
|
4477
|
+
declare const RULE_ID_PREFIX$1 = "manni:cite";
|
|
4465
4478
|
/** `manni:cite/<rule>`: the SARIF rule id and the JUnit failure type. */
|
|
4466
|
-
declare function ruleId(rule: CiteRule): string;
|
|
4479
|
+
declare function ruleId$1(rule: CiteRule): string;
|
|
4467
4480
|
declare function isCiteRule(value: string): value is CiteRule;
|
|
4468
4481
|
/** The effective severity table: defaults with the config's overrides. */
|
|
4469
4482
|
declare function resolveSeverity(overrides?: Partial<Record<CiteRule, CiteSeverity>>): Record<CiteRule, CiteSeverity>;
|
|
@@ -5129,6 +5142,8 @@ declare function shiftedEntries(opts: ShiftOptions): Shifted;
|
|
|
5129
5142
|
/** A copy of a manifest entry with its `claim.lines` replaced. */
|
|
5130
5143
|
declare function withClaimLines(entry: unknown, lines: LineSpec): unknown;
|
|
5131
5144
|
|
|
5145
|
+
declare const STDIN_TOKEN = "-";
|
|
5146
|
+
|
|
5132
5147
|
interface SpliceManifestOptions {
|
|
5133
5148
|
/**
|
|
5134
5149
|
* The document entry: its path relative to the config's directory, or its
|
|
@@ -5668,6 +5683,15 @@ declare function reencryptCitationEntries(page: {
|
|
|
5668
5683
|
type Colors = ReturnType<typeof pc.createColors>;
|
|
5669
5684
|
/** Build a picocolors palette with color explicitly on or off. */
|
|
5670
5685
|
declare function palette(enabled: boolean): Colors;
|
|
5686
|
+
/**
|
|
5687
|
+
* Decide whether to emit ANSI color: off when `--no-color`/`NO_COLOR`, on only
|
|
5688
|
+
* for a TTY otherwise. `forced` (from `--color`) overrides detection.
|
|
5689
|
+
*/
|
|
5690
|
+
declare function shouldColor(opts: {
|
|
5691
|
+
noColor?: boolean;
|
|
5692
|
+
isTTY?: boolean;
|
|
5693
|
+
env?: NodeJS.ProcessEnv;
|
|
5694
|
+
}): boolean;
|
|
5671
5695
|
|
|
5672
5696
|
/**
|
|
5673
5697
|
* Pretty output for `check` and `update`.
|
|
@@ -5725,229 +5749,1530 @@ declare function renderCheckGithub(run: CheckRun): string;
|
|
|
5725
5749
|
* `cite` namespace: `import { cite } from "@hawkeyexl/manni"`.
|
|
5726
5750
|
*/
|
|
5727
5751
|
|
|
5728
|
-
type index$
|
|
5729
|
-
type index$
|
|
5730
|
-
type index$
|
|
5731
|
-
declare const index$
|
|
5732
|
-
declare const index$
|
|
5733
|
-
declare const index$
|
|
5734
|
-
type index$
|
|
5735
|
-
type index$
|
|
5736
|
-
type index$
|
|
5737
|
-
type index$
|
|
5738
|
-
type index$
|
|
5739
|
-
type index$
|
|
5740
|
-
type index$
|
|
5741
|
-
type index$
|
|
5742
|
-
type index$
|
|
5743
|
-
type index$
|
|
5744
|
-
type index$
|
|
5745
|
-
type index$
|
|
5746
|
-
type index$
|
|
5747
|
-
type index$
|
|
5748
|
-
type index$
|
|
5749
|
-
declare const index$
|
|
5750
|
-
type index$
|
|
5751
|
-
type index$
|
|
5752
|
-
type index$
|
|
5753
|
-
type index$
|
|
5754
|
-
type index$
|
|
5755
|
-
type index$
|
|
5756
|
-
type index$
|
|
5757
|
-
type index$
|
|
5758
|
-
type index$
|
|
5759
|
-
type index$
|
|
5760
|
-
declare const index$
|
|
5761
|
-
declare const index$
|
|
5762
|
-
type index$
|
|
5763
|
-
declare const index$
|
|
5764
|
-
type index$
|
|
5765
|
-
declare const index$
|
|
5766
|
-
declare const index$
|
|
5767
|
-
type index$
|
|
5768
|
-
type index$
|
|
5769
|
-
type index$
|
|
5770
|
-
type index$
|
|
5771
|
-
type index$
|
|
5772
|
-
type index$
|
|
5773
|
-
type index$
|
|
5774
|
-
declare const index$
|
|
5775
|
-
declare const index$
|
|
5776
|
-
declare const index$
|
|
5777
|
-
declare const index$
|
|
5778
|
-
declare const index$
|
|
5779
|
-
declare const index$
|
|
5780
|
-
type index$
|
|
5781
|
-
declare const index$
|
|
5782
|
-
type index$
|
|
5783
|
-
type index$
|
|
5784
|
-
type index$
|
|
5785
|
-
type index$
|
|
5786
|
-
type index$
|
|
5787
|
-
type index$
|
|
5788
|
-
type index$
|
|
5789
|
-
type index$
|
|
5790
|
-
declare const index$
|
|
5791
|
-
type index$
|
|
5792
|
-
type index$
|
|
5793
|
-
type index$
|
|
5794
|
-
type index$
|
|
5795
|
-
type index$
|
|
5796
|
-
type index$
|
|
5797
|
-
type index$
|
|
5798
|
-
type index$
|
|
5752
|
+
type index$2_AddOptions = AddOptions;
|
|
5753
|
+
type index$2_AddResult = AddResult;
|
|
5754
|
+
type index$2_BuildIndexOptions = BuildIndexOptions;
|
|
5755
|
+
declare const index$2_CITATIONS_KEY: typeof CITATIONS_KEY;
|
|
5756
|
+
declare const index$2_CITE_RULES: typeof CITE_RULES;
|
|
5757
|
+
declare const index$2_CITE_SECTION: typeof CITE_SECTION;
|
|
5758
|
+
type index$2_CheckOptions = CheckOptions;
|
|
5759
|
+
type index$2_CheckPageOptions = CheckPageOptions;
|
|
5760
|
+
type index$2_CheckRun = CheckRun;
|
|
5761
|
+
type index$2_Citation = Citation;
|
|
5762
|
+
type index$2_CitationAnchor = CitationAnchor;
|
|
5763
|
+
type index$2_CitationClaim = CitationClaim;
|
|
5764
|
+
type index$2_CitationFinding = CitationFinding;
|
|
5765
|
+
type index$2_CitationInput = CitationInput;
|
|
5766
|
+
type index$2_CitationManifest = CitationManifest;
|
|
5767
|
+
type index$2_CitationOrigin = CitationOrigin;
|
|
5768
|
+
type index$2_CitationResult = CitationResult;
|
|
5769
|
+
type index$2_CitationSidecars = CitationSidecars;
|
|
5770
|
+
type index$2_CitationSource = CitationSource;
|
|
5771
|
+
type index$2_CiteConfig = CiteConfig;
|
|
5772
|
+
type index$2_CiteError = CiteError;
|
|
5773
|
+
declare const index$2_CiteError: typeof CiteError;
|
|
5774
|
+
type index$2_CiteRule = CiteRule;
|
|
5775
|
+
type index$2_CiteRun = CiteRun;
|
|
5776
|
+
type index$2_CiteRunOptions = CiteRunOptions;
|
|
5777
|
+
type index$2_CiteSeverity = CiteSeverity;
|
|
5778
|
+
type index$2_ClaimEnd = ClaimEnd;
|
|
5779
|
+
type index$2_ClaimHistory = ClaimHistory;
|
|
5780
|
+
type index$2_ClaimHistoryInput = ClaimHistoryInput;
|
|
5781
|
+
type index$2_ClaimStatus = ClaimStatus;
|
|
5782
|
+
type index$2_ClaimUnit = ClaimUnit;
|
|
5783
|
+
type index$2_ClassifyOptions = ClassifyOptions;
|
|
5784
|
+
declare const index$2_DEFAULT_CITE_BASELINE_PATH: typeof DEFAULT_CITE_BASELINE_PATH;
|
|
5785
|
+
declare const index$2_DEFAULT_SEVERITY: typeof DEFAULT_SEVERITY;
|
|
5786
|
+
type index$2_EntryPath = EntryPath;
|
|
5787
|
+
declare const index$2_FILE_PATTERN: typeof FILE_PATTERN;
|
|
5788
|
+
type index$2_FindWindowsOptions = FindWindowsOptions;
|
|
5789
|
+
declare const index$2_GIT_UNAVAILABLE_COMMIT: typeof GIT_UNAVAILABLE_COMMIT;
|
|
5790
|
+
declare const index$2_GIT_UNAVAILABLE_HISTORY: typeof GIT_UNAVAILABLE_HISTORY;
|
|
5791
|
+
type index$2_GitClient = GitClient;
|
|
5792
|
+
type index$2_HeldManifest = HeldManifest;
|
|
5793
|
+
type index$2_History = History;
|
|
5794
|
+
type index$2_InlineStatement = InlineStatement;
|
|
5795
|
+
type index$2_LineSpec = LineSpec;
|
|
5796
|
+
type index$2_LoadSidecarOptions = LoadSidecarOptions;
|
|
5797
|
+
type index$2_LoadedCiteConfig = LoadedCiteConfig;
|
|
5798
|
+
declare const index$2_MARKER_JSON: typeof MARKER_JSON;
|
|
5799
|
+
declare const index$2_MAX_MARKERS_PER_PAGE: typeof MAX_MARKERS_PER_PAGE;
|
|
5800
|
+
declare const index$2_MAX_PAGE_COMMITS: typeof MAX_PAGE_COMMITS;
|
|
5801
|
+
declare const index$2_MAX_RANGE_LINES: typeof MAX_RANGE_LINES;
|
|
5802
|
+
declare const index$2_MOVE_BUDGET_BYTES: typeof MOVE_BUDGET_BYTES;
|
|
5803
|
+
declare const index$2_MOVE_WINDOW_LINES: typeof MOVE_WINDOW_LINES;
|
|
5804
|
+
type index$2_ManifestSet = ManifestSet;
|
|
5805
|
+
declare const index$2_ManifestSet: typeof ManifestSet;
|
|
5806
|
+
type index$2_ManifestWrite = ManifestWrite;
|
|
5807
|
+
type index$2_MarkerEnd = MarkerEnd;
|
|
5808
|
+
type index$2_MintOptions = MintOptions;
|
|
5809
|
+
type index$2_MisplacedMarker = MisplacedMarker;
|
|
5810
|
+
type index$2_MisplacedMarkerReport = MisplacedMarkerReport;
|
|
5811
|
+
type index$2_MissingReason = MissingReason;
|
|
5812
|
+
type index$2_NoUnit = NoUnit;
|
|
5813
|
+
type index$2_OriginKind = OriginKind;
|
|
5814
|
+
declare const index$2_PAGE_HISTORY_UNAVAILABLE: typeof PAGE_HISTORY_UNAVAILABLE;
|
|
5815
|
+
type index$2_PageCitation = PageCitation;
|
|
5816
|
+
type index$2_PageCitationReport = PageCitationReport;
|
|
5817
|
+
type index$2_PageCitations = PageCitations;
|
|
5818
|
+
type index$2_PageCommit = PageCommit;
|
|
5819
|
+
type index$2_PageHistory = PageHistory;
|
|
5820
|
+
type index$2_PageLines = PageLines;
|
|
5821
|
+
type index$2_PageSidecar = PageSidecar;
|
|
5822
|
+
type index$2_PrettyOptions = PrettyOptions;
|
|
5823
|
+
type index$2_ReadPageOptions = ReadPageOptions;
|
|
5824
|
+
type index$2_ReadSourceResult = ReadSourceResult;
|
|
5825
|
+
type index$2_RecommitReason = RecommitReason;
|
|
5826
|
+
type index$2_ReencryptCitationsResult = ReencryptCitationsResult;
|
|
5827
|
+
type index$2_ReencryptEntriesResult = ReencryptEntriesResult;
|
|
5828
|
+
type index$2_ReencryptOptions = ReencryptOptions;
|
|
5829
|
+
type index$2_ReencryptedCitation = ReencryptedCitation;
|
|
5830
|
+
type index$2_RefineClaimInput = RefineClaimInput;
|
|
5831
|
+
type index$2_Removal = Removal;
|
|
5832
|
+
type index$2_RemoveOptions = RemoveOptions;
|
|
5833
|
+
type index$2_RemovePage = RemovePage;
|
|
5834
|
+
type index$2_RemoveRun = RemoveRun;
|
|
5835
|
+
declare const index$2_SRC_PATTERN: typeof SRC_PATTERN;
|
|
5836
|
+
type index$2_ShiftOptions = ShiftOptions;
|
|
5837
|
+
type index$2_Shifted = Shifted;
|
|
5838
|
+
type index$2_ShownFile = ShownFile;
|
|
5839
|
+
type index$2_SourceEnd = SourceEnd;
|
|
5840
|
+
type index$2_SourceIndex = SourceIndex;
|
|
5841
|
+
type index$2_SourceRange = SourceRange;
|
|
5842
|
+
type index$2_SourceStatus = SourceStatus;
|
|
5843
|
+
type index$2_StatementForm = StatementForm;
|
|
5844
|
+
type index$2_TextEdit = TextEdit;
|
|
5845
|
+
type index$2_UpdateOptions = UpdateOptions;
|
|
5846
|
+
type index$2_UpdatePage = UpdatePage;
|
|
5847
|
+
type index$2_UpdateRewrite = UpdateRewrite;
|
|
5848
|
+
type index$2_UpdateRun = UpdateRun;
|
|
5849
|
+
declare const index$2_anchoredLines: typeof anchoredLines;
|
|
5850
|
+
declare const index$2_appendFrontmatterCitation: typeof appendFrontmatterCitation;
|
|
5851
|
+
declare const index$2_blockMatches: typeof blockMatches;
|
|
5852
|
+
declare const index$2_bodyLineOf: typeof bodyLineOf;
|
|
5853
|
+
declare const index$2_buildSourceIndex: typeof buildSourceIndex;
|
|
5854
|
+
declare const index$2_checkCitations: typeof checkCitations;
|
|
5855
|
+
declare const index$2_citationInputs: typeof citationInputs;
|
|
5856
|
+
declare const index$2_claimDiff: typeof claimDiff;
|
|
5857
|
+
declare const index$2_claimEnd: typeof claimEnd;
|
|
5858
|
+
declare const index$2_claimHistory: typeof claimHistory;
|
|
5859
|
+
declare const index$2_claimLine: typeof claimLine;
|
|
5860
|
+
declare const index$2_claimMessageFor: typeof claimMessageFor;
|
|
5861
|
+
declare const index$2_claimWords: typeof claimWords;
|
|
5862
|
+
declare const index$2_classifyCitation: typeof classifyCitation;
|
|
5863
|
+
declare const index$2_detectEol: typeof detectEol;
|
|
5864
|
+
declare const index$2_duplicateJoinRefusal: typeof duplicateJoinRefusal;
|
|
5865
|
+
declare const index$2_entryObject: typeof entryObject;
|
|
5866
|
+
declare const index$2_errorSite: typeof errorSite;
|
|
5867
|
+
declare const index$2_fenceSpanAt: typeof fenceSpanAt;
|
|
5868
|
+
declare const index$2_fencedBlockAfter: typeof fencedBlockAfter;
|
|
5869
|
+
declare const index$2_fencedBlockAt: typeof fencedBlockAt;
|
|
5870
|
+
declare const index$2_fencedBlocks: typeof fencedBlocks;
|
|
5871
|
+
declare const index$2_findWindows: typeof findWindows;
|
|
5872
|
+
declare const index$2_findingsFor: typeof findingsFor;
|
|
5873
|
+
declare const index$2_formatSrc: typeof formatSrc;
|
|
5874
|
+
declare const index$2_formatStatement: typeof formatStatement;
|
|
5875
|
+
declare const index$2_gitClient: typeof gitClient;
|
|
5876
|
+
declare const index$2_hashLines: typeof hashLines;
|
|
5877
|
+
declare const index$2_hashRange: typeof hashRange;
|
|
5878
|
+
declare const index$2_historyOf: typeof historyOf;
|
|
5879
|
+
declare const index$2_holdsWords: typeof holdsWords;
|
|
5880
|
+
declare const index$2_insertStatementBefore: typeof insertStatementBefore;
|
|
5881
|
+
declare const index$2_insideFence: typeof insideFence;
|
|
5882
|
+
declare const index$2_isBoundLine: typeof isBoundLine;
|
|
5883
|
+
declare const index$2_isCiteRule: typeof isCiteRule;
|
|
5884
|
+
declare const index$2_isKeyedPin: typeof isKeyedPin;
|
|
5885
|
+
declare const index$2_isTableRow: typeof isTableRow;
|
|
5886
|
+
declare const index$2_isUnitText: typeof isUnitText;
|
|
5887
|
+
declare const index$2_itemLine: typeof itemLine;
|
|
5888
|
+
declare const index$2_lineAt: typeof lineAt;
|
|
5889
|
+
declare const index$2_lineSpec: typeof lineSpec;
|
|
5890
|
+
declare const index$2_loadCitationSidecars: typeof loadCitationSidecars;
|
|
5891
|
+
declare const index$2_loadCiteConfig: typeof loadCiteConfig;
|
|
5892
|
+
declare const index$2_markerClaimEnd: typeof markerClaimEnd;
|
|
5893
|
+
declare const index$2_markerRunAt: typeof markerRunAt;
|
|
5894
|
+
declare const index$2_markerUnit: typeof markerUnit;
|
|
5895
|
+
declare const index$2_messageFor: typeof messageFor;
|
|
5896
|
+
declare const index$2_mintCitation: typeof mintCitation;
|
|
5897
|
+
declare const index$2_misplacedMarkerAt: typeof misplacedMarkerAt;
|
|
5898
|
+
declare const index$2_misplacedMarkers: typeof misplacedMarkers;
|
|
5899
|
+
declare const index$2_misplacedMessageFor: typeof misplacedMessageFor;
|
|
5900
|
+
declare const index$2_movedUnit: typeof movedUnit;
|
|
5901
|
+
declare const index$2_noGit: typeof noGit;
|
|
5902
|
+
declare const index$2_noUnitAt: typeof noUnitAt;
|
|
5903
|
+
declare const index$2_normalizeText: typeof normalizeText;
|
|
5904
|
+
declare const index$2_normalizeWhitespace: typeof normalizeWhitespace;
|
|
5905
|
+
declare const index$2_offsetOfLine: typeof offsetOfLine;
|
|
5906
|
+
declare const index$2_orphanRefusal: typeof orphanRefusal;
|
|
5907
|
+
declare const index$2_ownedMessage: typeof ownedMessage;
|
|
5908
|
+
declare const index$2_paragraphAfter: typeof paragraphAfter;
|
|
5909
|
+
declare const index$2_parseCiteConfig: typeof parseCiteConfig;
|
|
5910
|
+
declare const index$2_parseLines: typeof parseLines;
|
|
5911
|
+
declare const index$2_parseSrc: typeof parseSrc;
|
|
5912
|
+
declare const index$2_parseStatements: typeof parseStatements;
|
|
5913
|
+
declare const index$2_pickExtractor: typeof pickExtractor;
|
|
5914
|
+
declare const index$2_pinOfLines: typeof pinOfLines;
|
|
5915
|
+
declare const index$2_pre43Span: typeof pre43Span;
|
|
5916
|
+
declare const index$2_rangeLines: typeof rangeLines;
|
|
5917
|
+
declare const index$2_readCiteConfigFile: typeof readCiteConfigFile;
|
|
5918
|
+
declare const index$2_readPage: typeof readPage;
|
|
5919
|
+
declare const index$2_readSource: typeof readSource;
|
|
5920
|
+
declare const index$2_reencryptCitationEntries: typeof reencryptCitationEntries;
|
|
5921
|
+
declare const index$2_reencryptCitations: typeof reencryptCitations;
|
|
5922
|
+
declare const index$2_refineClaim: typeof refineClaim;
|
|
5923
|
+
declare const index$2_refusalLine: typeof refusalLine;
|
|
5924
|
+
declare const index$2_removalLine: typeof removalLine;
|
|
5925
|
+
declare const index$2_removeFrontmatterCitations: typeof removeFrontmatterCitations;
|
|
5926
|
+
declare const index$2_removeLine: typeof removeLine;
|
|
5927
|
+
declare const index$2_renderCheckGithub: typeof renderCheckGithub;
|
|
5928
|
+
declare const index$2_renderCheckJson: typeof renderCheckJson;
|
|
5929
|
+
declare const index$2_renderCheckPretty: typeof renderCheckPretty;
|
|
5930
|
+
declare const index$2_renderRemoveJson: typeof renderRemoveJson;
|
|
5931
|
+
declare const index$2_renderRemovePretty: typeof renderRemovePretty;
|
|
5932
|
+
declare const index$2_renderUpdateJson: typeof renderUpdateJson;
|
|
5933
|
+
declare const index$2_renderUpdatePretty: typeof renderUpdatePretty;
|
|
5934
|
+
declare const index$2_resolveCiteRun: typeof resolveCiteRun;
|
|
5935
|
+
declare const index$2_resolveSeverity: typeof resolveSeverity;
|
|
5936
|
+
declare const index$2_rewriteLine: typeof rewriteLine;
|
|
5937
|
+
declare const index$2_runAdd: typeof runAdd;
|
|
5938
|
+
declare const index$2_runCheck: typeof runCheck;
|
|
5939
|
+
declare const index$2_runRemove: typeof runRemove;
|
|
5940
|
+
declare const index$2_runUpdate: typeof runUpdate;
|
|
5941
|
+
declare const index$2_runsHolding: typeof runsHolding;
|
|
5942
|
+
declare const index$2_sentencesOf: typeof sentencesOf;
|
|
5943
|
+
declare const index$2_sharesSentence: typeof sharesSentence;
|
|
5944
|
+
declare const index$2_shiftedEntries: typeof shiftedEntries;
|
|
5945
|
+
declare const index$2_shortCommit: typeof shortCommit;
|
|
5946
|
+
declare const index$2_shortLine: typeof shortLine;
|
|
5947
|
+
declare const index$2_shortPin: typeof shortPin;
|
|
5948
|
+
declare const index$2_shortSrc: typeof shortSrc;
|
|
5949
|
+
declare const index$2_sidecarsFor: typeof sidecarsFor;
|
|
5950
|
+
declare const index$2_sliceLines: typeof sliceLines;
|
|
5951
|
+
declare const index$2_sourceRange: typeof sourceRange;
|
|
5952
|
+
declare const index$2_spellAt: typeof spellAt;
|
|
5953
|
+
declare const index$2_spellLines: typeof spellLines;
|
|
5954
|
+
declare const index$2_spellSource: typeof spellSource;
|
|
5955
|
+
declare const index$2_splice: typeof splice;
|
|
5956
|
+
declare const index$2_spliceEntryField: typeof spliceEntryField;
|
|
5957
|
+
declare const index$2_splitLines: typeof splitLines;
|
|
5958
|
+
declare const index$2_splitUnit: typeof splitUnit;
|
|
5959
|
+
declare const index$2_statementForms: typeof statementForms;
|
|
5960
|
+
declare const index$2_stripMarkers: typeof stripMarkers;
|
|
5961
|
+
declare const index$2_toBodyLines: typeof toBodyLines;
|
|
5962
|
+
declare const index$2_toFileLines: typeof toFileLines;
|
|
5963
|
+
declare const index$2_toValidationResult: typeof toValidationResult;
|
|
5964
|
+
declare const index$2_twoManifestsRefusal: typeof twoManifestsRefusal;
|
|
5965
|
+
declare const index$2_unifiedDiff: typeof unifiedDiff;
|
|
5966
|
+
declare const index$2_unitAt: typeof unitAt;
|
|
5967
|
+
declare const index$2_unitText: typeof unitText;
|
|
5968
|
+
declare const index$2_urlManifestRefusal: typeof urlManifestRefusal;
|
|
5969
|
+
declare const index$2_validateEntry: typeof validateEntry;
|
|
5970
|
+
declare const index$2_withClaimLines: typeof withClaimLines;
|
|
5971
|
+
declare namespace index$2 {
|
|
5972
|
+
export { type index$2_AddOptions as AddOptions, type index$2_AddResult as AddResult, type index$2_BuildIndexOptions as BuildIndexOptions, index$2_CITATIONS_KEY as CITATIONS_KEY, index$2_CITE_RULES as CITE_RULES, index$2_CITE_SECTION as CITE_SECTION, type index$2_CheckOptions as CheckOptions, type index$2_CheckPageOptions as CheckPageOptions, type index$2_CheckRun as CheckRun, type index$2_Citation as Citation, type index$2_CitationAnchor as CitationAnchor, type index$2_CitationClaim as CitationClaim, type index$2_CitationFinding as CitationFinding, type index$2_CitationInput as CitationInput, type index$2_CitationManifest as CitationManifest, type index$2_CitationOrigin as CitationOrigin, type index$2_CitationResult as CitationResult, type index$2_CitationSidecars as CitationSidecars, type index$2_CitationSource as CitationSource, type index$2_CiteConfig as CiteConfig, index$2_CiteError as CiteError, type index$2_CiteRule as CiteRule, type index$2_CiteRun as CiteRun, type index$2_CiteRunOptions as CiteRunOptions, type index$2_CiteSeverity as CiteSeverity, type index$2_ClaimEnd as ClaimEnd, type index$2_ClaimHistory as ClaimHistory, type index$2_ClaimHistoryInput as ClaimHistoryInput, type index$2_ClaimStatus as ClaimStatus, type index$2_ClaimUnit as ClaimUnit, type index$2_ClassifyOptions as ClassifyOptions, index$2_DEFAULT_CITE_BASELINE_PATH as DEFAULT_CITE_BASELINE_PATH, index$2_DEFAULT_SEVERITY as DEFAULT_SEVERITY, type index$2_EntryPath as EntryPath, index$2_FILE_PATTERN as FILE_PATTERN, type index$2_FindWindowsOptions as FindWindowsOptions, index$2_GIT_UNAVAILABLE_COMMIT as GIT_UNAVAILABLE_COMMIT, index$2_GIT_UNAVAILABLE_HISTORY as GIT_UNAVAILABLE_HISTORY, type index$2_GitClient as GitClient, type index$2_HeldManifest as HeldManifest, type index$2_History as History, type index$2_InlineStatement as InlineStatement, type index$2_LineSpec as LineSpec, type index$2_LoadSidecarOptions as LoadSidecarOptions, type index$2_LoadedCiteConfig as LoadedCiteConfig, index$2_MARKER_JSON as MARKER_JSON, index$2_MAX_MARKERS_PER_PAGE as MAX_MARKERS_PER_PAGE, index$2_MAX_PAGE_COMMITS as MAX_PAGE_COMMITS, index$2_MAX_RANGE_LINES as MAX_RANGE_LINES, index$2_MOVE_BUDGET_BYTES as MOVE_BUDGET_BYTES, index$2_MOVE_WINDOW_LINES as MOVE_WINDOW_LINES, type ManifestChange$1 as ManifestChange, index$2_ManifestSet as ManifestSet, type index$2_ManifestWrite as ManifestWrite, type index$2_MarkerEnd as MarkerEnd, type index$2_MintOptions as MintOptions, type index$2_MisplacedMarker as MisplacedMarker, type index$2_MisplacedMarkerReport as MisplacedMarkerReport, type index$2_MissingReason as MissingReason, type index$2_NoUnit as NoUnit, type index$2_OriginKind as OriginKind, index$2_PAGE_HISTORY_UNAVAILABLE as PAGE_HISTORY_UNAVAILABLE, type index$2_PageCitation as PageCitation, type index$2_PageCitationReport as PageCitationReport, type index$2_PageCitations as PageCitations, type index$2_PageCommit as PageCommit, type index$2_PageHistory as PageHistory, type index$2_PageLines as PageLines, type index$2_PageSidecar as PageSidecar, type index$2_PrettyOptions as PrettyOptions, RULE_ID_PREFIX$1 as RULE_ID_PREFIX, type index$2_ReadPageOptions as ReadPageOptions, type index$2_ReadSourceResult as ReadSourceResult, type index$2_RecommitReason as RecommitReason, type index$2_ReencryptCitationsResult as ReencryptCitationsResult, type index$2_ReencryptEntriesResult as ReencryptEntriesResult, type index$2_ReencryptOptions as ReencryptOptions, type index$2_ReencryptedCitation as ReencryptedCitation, type index$2_RefineClaimInput as RefineClaimInput, type index$2_Removal as Removal, type index$2_RemoveOptions as RemoveOptions, type index$2_RemovePage as RemovePage, type index$2_RemoveRun as RemoveRun, index$2_SRC_PATTERN as SRC_PATTERN, type index$2_ShiftOptions as ShiftOptions, type index$2_Shifted as Shifted, type index$2_ShownFile as ShownFile, type index$2_SourceEnd as SourceEnd, type index$2_SourceIndex as SourceIndex, type index$2_SourceRange as SourceRange, type index$2_SourceStatus as SourceStatus, type index$2_StatementForm as StatementForm, type index$2_TextEdit as TextEdit, type index$2_UpdateOptions as UpdateOptions, type index$2_UpdatePage as UpdatePage, type index$2_UpdateRewrite as UpdateRewrite, type index$2_UpdateRun as UpdateRun, index$2_anchoredLines as anchoredLines, index$2_appendFrontmatterCitation as appendFrontmatterCitation, index$2_blockMatches as blockMatches, index$2_bodyLineOf as bodyLineOf, index$2_buildSourceIndex as buildSourceIndex, index$2_checkCitations as checkCitations, index$2_citationInputs as citationInputs, index$2_claimDiff as claimDiff, index$2_claimEnd as claimEnd, index$2_claimHistory as claimHistory, index$2_claimLine as claimLine, index$2_claimMessageFor as claimMessageFor, index$2_claimWords as claimWords, index$2_classifyCitation as classifyCitation, index$2_detectEol as detectEol, index$2_duplicateJoinRefusal as duplicateJoinRefusal, index$2_entryObject as entryObject, index$2_errorSite as errorSite, index$2_fenceSpanAt as fenceSpanAt, index$2_fencedBlockAfter as fencedBlockAfter, index$2_fencedBlockAt as fencedBlockAt, index$2_fencedBlocks as fencedBlocks, index$2_findWindows as findWindows, index$2_findingsFor as findingsFor, index$2_formatSrc as formatSrc, index$2_formatStatement as formatStatement, index$2_gitClient as gitClient, index$2_hashLines as hashLines, index$2_hashRange as hashRange, index$2_historyOf as historyOf, index$2_holdsWords as holdsWords, index$2_insertStatementBefore as insertStatementBefore, index$2_insideFence as insideFence, index$2_isBoundLine as isBoundLine, index$2_isCiteRule as isCiteRule, index$2_isKeyedPin as isKeyedPin, index$2_isTableRow as isTableRow, index$2_isUnitText as isUnitText, index$2_itemLine as itemLine, index$2_lineAt as lineAt, index$2_lineSpec as lineSpec, index$2_loadCitationSidecars as loadCitationSidecars, index$2_loadCiteConfig as loadCiteConfig, index$2_markerClaimEnd as markerClaimEnd, index$2_markerRunAt as markerRunAt, index$2_markerUnit as markerUnit, index$2_messageFor as messageFor, index$2_mintCitation as mintCitation, index$2_misplacedMarkerAt as misplacedMarkerAt, index$2_misplacedMarkers as misplacedMarkers, index$2_misplacedMessageFor as misplacedMessageFor, index$2_movedUnit as movedUnit, index$2_noGit as noGit, index$2_noUnitAt as noUnitAt, index$2_normalizeText as normalizeText, index$2_normalizeWhitespace as normalizeWhitespace, index$2_offsetOfLine as offsetOfLine, index$2_orphanRefusal as orphanRefusal, index$2_ownedMessage as ownedMessage, index$2_paragraphAfter as paragraphAfter, index$2_parseCiteConfig as parseCiteConfig, index$2_parseLines as parseLines, index$2_parseSrc as parseSrc, index$2_parseStatements as parseStatements, index$2_pickExtractor as pickExtractor, index$2_pinOfLines as pinOfLines, index$2_pre43Span as pre43Span, index$2_rangeLines as rangeLines, index$2_readCiteConfigFile as readCiteConfigFile, index$2_readPage as readPage, index$2_readSource as readSource, index$2_reencryptCitationEntries as reencryptCitationEntries, index$2_reencryptCitations as reencryptCitations, index$2_refineClaim as refineClaim, index$2_refusalLine as refusalLine, index$2_removalLine as removalLine, index$2_removeFrontmatterCitations as removeFrontmatterCitations, index$2_removeLine as removeLine, index$2_renderCheckGithub as renderCheckGithub, index$2_renderCheckJson as renderCheckJson, index$2_renderCheckPretty as renderCheckPretty, index$2_renderRemoveJson as renderRemoveJson, index$2_renderRemovePretty as renderRemovePretty, index$2_renderUpdateJson as renderUpdateJson, index$2_renderUpdatePretty as renderUpdatePretty, index$2_resolveCiteRun as resolveCiteRun, index$2_resolveSeverity as resolveSeverity, index$2_rewriteLine as rewriteLine, ruleId$1 as ruleId, index$2_runAdd as runAdd, index$2_runCheck as runCheck, index$2_runRemove as runRemove, index$2_runUpdate as runUpdate, index$2_runsHolding as runsHolding, index$2_sentencesOf as sentencesOf, index$2_sharesSentence as sharesSentence, index$2_shiftedEntries as shiftedEntries, index$2_shortCommit as shortCommit, index$2_shortLine as shortLine, index$2_shortPin as shortPin, index$2_shortSrc as shortSrc, index$2_sidecarsFor as sidecarsFor, index$2_sliceLines as sliceLines, index$2_sourceRange as sourceRange, index$2_spellAt as spellAt, index$2_spellLines as spellLines, index$2_spellSource as spellSource, index$2_splice as splice, index$2_spliceEntryField as spliceEntryField, index$2_splitLines as splitLines, index$2_splitUnit as splitUnit, index$2_statementForms as statementForms, index$2_stripMarkers as stripMarkers, index$2_toBodyLines as toBodyLines, index$2_toFileLines as toFileLines, index$2_toValidationResult as toValidationResult, index$2_twoManifestsRefusal as twoManifestsRefusal, index$2_unifiedDiff as unifiedDiff, index$2_unitAt as unitAt, index$2_unitText as unitText, index$2_urlManifestRefusal as urlManifestRefusal, index$2_validateEntry as validateEntry, index$2_withClaimLines as withClaimLines };
|
|
5973
|
+
}
|
|
5974
|
+
|
|
5975
|
+
/**
|
|
5976
|
+
* The contract every other module is written against.
|
|
5977
|
+
*
|
|
5978
|
+
* Two shapes matter. `DocumentTree` is what a parser owes the rest of the tool:
|
|
5979
|
+
* a nested section tree with real source positions, in a vocabulary that has
|
|
5980
|
+
* nothing to do with Markdown. `Finding` is what the tool owes its caller.
|
|
5981
|
+
* Everything between the two - matching, rules, reporting - touches neither
|
|
5982
|
+
* mdast nor Asciidoctor nor parse5, which is what lets a new input format be
|
|
5983
|
+
* one file plus a line in the parser registry.
|
|
5984
|
+
*/
|
|
5985
|
+
|
|
5986
|
+
/**
|
|
5987
|
+
* Operational/usage failure. Exits 2; never used for lint findings.
|
|
5988
|
+
*
|
|
5989
|
+
* Extends the umbrella's `ToolError`, which is what the shared bin runner
|
|
5990
|
+
* matches on; the subclass stays so this tool's tests and library callers can
|
|
5991
|
+
* match on it by name. Named for its domain, as `A11yError`, `CiteError` and
|
|
5992
|
+
* `KeyError` are.
|
|
5993
|
+
*/
|
|
5994
|
+
declare class LintError extends ToolError {
|
|
5995
|
+
constructor(message: string);
|
|
5996
|
+
}
|
|
5997
|
+
/** A point in a source file. Line and column are 1-based, offset 0-based. */
|
|
5998
|
+
interface Point {
|
|
5999
|
+
line: number;
|
|
6000
|
+
column: number;
|
|
6001
|
+
offset: number;
|
|
6002
|
+
}
|
|
6003
|
+
/** A half-open source span, `start` inclusive and `end` exclusive. */
|
|
6004
|
+
interface Position {
|
|
6005
|
+
start: Point;
|
|
6006
|
+
end: Point;
|
|
6007
|
+
}
|
|
6008
|
+
/**
|
|
6009
|
+
* Content kinds a section can hold, named generically so a rule written once
|
|
6010
|
+
* works on every format. Each parser maps its own AST onto these: mdast
|
|
6011
|
+
* `paragraph`/`code`/`list`, Asciidoctor `paragraph`/`listing`/`ulist`|`olist`,
|
|
6012
|
+
* HTML `<p>`/`<pre>`/`<ul>` - all three onto `paragraph`/`codeBlock`/`list`.
|
|
6013
|
+
*
|
|
6014
|
+
* The vocabulary is wider than any one parser emits today. `table`,
|
|
6015
|
+
* `admonition`, `image`, `blockquote`, `definitionList`, and `element` are
|
|
6016
|
+
* declared here, and in each `DocumentParser.kinds`, only once a parser
|
|
6017
|
+
* actually produces them - see `src/lint/parsers/index.ts`.
|
|
6018
|
+
*/
|
|
6019
|
+
type ContentKind = "paragraph" | "codeBlock" | "list" | "listItem" | "table" | "tableRow" | "tableCell" | "admonition" | "image" | "blockquote" | "definitionList" | "definitionItem" | "element";
|
|
6020
|
+
interface ContentNodeBase {
|
|
6021
|
+
kind: ContentKind;
|
|
6022
|
+
position: Position;
|
|
6023
|
+
/** Plain-text rendering, used by pattern rules. */
|
|
6024
|
+
text: string;
|
|
6025
|
+
}
|
|
6026
|
+
interface ParagraphNode extends ContentNodeBase {
|
|
6027
|
+
kind: "paragraph";
|
|
6028
|
+
}
|
|
6029
|
+
interface CodeNode extends ContentNodeBase {
|
|
6030
|
+
kind: "codeBlock";
|
|
6031
|
+
/** Language, when the format carries one. */
|
|
6032
|
+
language?: string;
|
|
6033
|
+
/** The info-string tail after the language, when the format carries one. */
|
|
6034
|
+
fenceInfo?: string;
|
|
6035
|
+
}
|
|
6036
|
+
interface ListItemNode {
|
|
6037
|
+
kind: "listItem";
|
|
6038
|
+
position: Position;
|
|
6039
|
+
text: string;
|
|
6040
|
+
/** Nested content, so item-level paragraph/code/list rules can run. */
|
|
6041
|
+
children: ContentNode[];
|
|
6042
|
+
}
|
|
6043
|
+
interface ListNode extends ContentNodeBase {
|
|
6044
|
+
kind: "list";
|
|
6045
|
+
ordered: boolean;
|
|
6046
|
+
items: ListItemNode[];
|
|
6047
|
+
}
|
|
6048
|
+
interface TableCellNode extends ContentNodeBase {
|
|
6049
|
+
kind: "tableCell";
|
|
6050
|
+
children: ContentNode[];
|
|
6051
|
+
}
|
|
6052
|
+
interface TableRowNode extends ContentNodeBase {
|
|
6053
|
+
kind: "tableRow";
|
|
6054
|
+
header: boolean;
|
|
6055
|
+
children: TableCellNode[];
|
|
6056
|
+
}
|
|
6057
|
+
interface TableNode extends ContentNodeBase {
|
|
6058
|
+
kind: "table";
|
|
6059
|
+
children: TableRowNode[];
|
|
6060
|
+
}
|
|
6061
|
+
/**
|
|
6062
|
+
* A callout, and the flavor the source gave it.
|
|
6063
|
+
*
|
|
6064
|
+
* `variant` is optional because not every format names one this vocabulary
|
|
6065
|
+
* has. reStructuredText has `hint`, `attention`, `error` and a generic
|
|
6066
|
+
* `admonition` directive, and a bare HTML `<aside>` says nothing at all. Those
|
|
6067
|
+
* produce an admonition with no variant rather than an invented equivalence:
|
|
6068
|
+
* mapping `hint` onto `tip` would make `variant: tip` pass on a page that
|
|
6069
|
+
* never said tip. A `variant:` rule reports such a node as a mismatch, and a
|
|
6070
|
+
* plain count rule still counts it.
|
|
6071
|
+
*/
|
|
6072
|
+
interface AdmonitionNode extends ContentNodeBase {
|
|
6073
|
+
kind: "admonition";
|
|
6074
|
+
variant?: "note" | "tip" | "important" | "caution" | "warning" | "danger";
|
|
6075
|
+
children: ContentNode[];
|
|
6076
|
+
}
|
|
6077
|
+
interface ImageNode extends ContentNodeBase {
|
|
6078
|
+
kind: "image";
|
|
6079
|
+
url: string;
|
|
6080
|
+
alt: string;
|
|
6081
|
+
title?: string;
|
|
6082
|
+
}
|
|
6083
|
+
interface BlockquoteNode extends ContentNodeBase {
|
|
6084
|
+
kind: "blockquote";
|
|
6085
|
+
children: ContentNode[];
|
|
6086
|
+
}
|
|
6087
|
+
interface DefinitionItemNode {
|
|
6088
|
+
kind: "definitionItem";
|
|
6089
|
+
position: Position;
|
|
6090
|
+
text: string;
|
|
6091
|
+
term: string;
|
|
6092
|
+
definition: ContentNode[];
|
|
6093
|
+
}
|
|
6094
|
+
interface DefinitionListNode extends ContentNodeBase {
|
|
6095
|
+
kind: "definitionList";
|
|
6096
|
+
children: DefinitionItemNode[];
|
|
6097
|
+
}
|
|
6098
|
+
/**
|
|
6099
|
+
* A named wrapper - an MDX/JSX component today, and where HTML and DITA may
|
|
6100
|
+
* eventually anchor a custom element. Its children are its own content, never
|
|
6101
|
+
* the enclosing section's: a rule reading a section's `children` must not see
|
|
6102
|
+
* inside an `<Element>` it did not ask about.
|
|
6103
|
+
*/
|
|
6104
|
+
interface ElementNode extends ContentNodeBase {
|
|
6105
|
+
kind: "element";
|
|
6106
|
+
name: string;
|
|
6107
|
+
attributes?: Record<string, string | true>;
|
|
6108
|
+
children: ContentNode[];
|
|
6109
|
+
}
|
|
6110
|
+
type ContentNode = ParagraphNode | CodeNode | ListNode | TableNode | AdmonitionNode | ImageNode | BlockquoteNode | DefinitionListNode | ElementNode;
|
|
6111
|
+
/**
|
|
6112
|
+
* One section of a document, demarcated by a heading.
|
|
6113
|
+
*
|
|
6114
|
+
* `slug`/`title`/`level`/`order`/`parentSlug` intentionally match manni kg's
|
|
6115
|
+
* `Section` (dockg/src/types.ts), so its graph can be built from this tree.
|
|
6116
|
+
*
|
|
6117
|
+
* `children` is in document order and is the single source of truth: the
|
|
6118
|
+
* paragraph/codeBlock/list counts every rule needs are queries over it, not
|
|
6119
|
+
* separately maintained arrays.
|
|
6120
|
+
*/
|
|
6121
|
+
interface SectionNode {
|
|
6122
|
+
/** Slug of the heading, disambiguated across the document (`install-1`). */
|
|
6123
|
+
slug: string;
|
|
6124
|
+
/** Heading text, with inline markup flattened. */
|
|
6125
|
+
title: string;
|
|
6126
|
+
/** Heading level, 1-6. 0 for the implicit lead section before any heading. */
|
|
6127
|
+
level: number;
|
|
6128
|
+
/** 1-based position among siblings under the same parent. */
|
|
6129
|
+
order: number;
|
|
6130
|
+
/** Slug of the enclosing section, or null at the top level. */
|
|
6131
|
+
parentSlug: string | null;
|
|
6132
|
+
/** Span of the title itself. Null for the implicit lead section. */
|
|
6133
|
+
titlePosition: Position | null;
|
|
6134
|
+
/** Span of the whole section: its heading through the last node before the next sibling heading. */
|
|
6135
|
+
position: Position;
|
|
6136
|
+
/** Direct content, in document order, excluding anything owned by a subsection. */
|
|
6137
|
+
children: ContentNode[];
|
|
6138
|
+
/** Nested sections, in document order. */
|
|
6139
|
+
sections: SectionNode[];
|
|
6140
|
+
}
|
|
6141
|
+
/** What a parser returns for one file. */
|
|
6142
|
+
interface DocumentTree {
|
|
6143
|
+
/** Name of the parser that produced this (`markdown`, `asciidoc`, ...). */
|
|
6144
|
+
format: string;
|
|
6145
|
+
/** Path the content came from, for error messages. */
|
|
6146
|
+
filePath: string;
|
|
6147
|
+
/** Raw frontmatter/metadata values, or null when the file carries none. */
|
|
6148
|
+
frontmatter: Record<string, unknown> | null;
|
|
6149
|
+
/** Span of the frontmatter block, for anchoring findings about it. */
|
|
6150
|
+
frontmatterPosition: Position | null;
|
|
6151
|
+
/** Top-level sections, in document order. */
|
|
6152
|
+
sections: SectionNode[];
|
|
6153
|
+
}
|
|
6154
|
+
/**
|
|
6155
|
+
* A parser for one input format.
|
|
6156
|
+
*
|
|
6157
|
+
* Shaped after docmeta's `MetadataExtractor` so the two registries read the
|
|
6158
|
+
* same way. A format is registered only when its parser reads it, so every
|
|
6159
|
+
* registered format is one the tool reads, and an extension no parser claims is
|
|
6160
|
+
* skipped by name rather than parsed as Markdown.
|
|
6161
|
+
*/
|
|
6162
|
+
interface DocumentParser {
|
|
6163
|
+
/** Stable name, also used as `DocumentTree.format`. */
|
|
6164
|
+
name: string;
|
|
6165
|
+
/** Human-readable label for `manni lint tools`. */
|
|
6166
|
+
label: string;
|
|
6167
|
+
/**
|
|
6168
|
+
* The content kinds this parser actually emits today. A capability
|
|
6169
|
+
* declaration, not the full `ContentKind` vocabulary: a kind absent here is
|
|
6170
|
+
* one no rule will ever see from this parser's trees, whatever the format
|
|
6171
|
+
* could in principle represent.
|
|
6172
|
+
*/
|
|
6173
|
+
kinds: ContentKind[];
|
|
6174
|
+
/** Lowercase file extensions this parser handles, incl. dot (e.g. ".md"). */
|
|
6175
|
+
extensions: string[];
|
|
6176
|
+
/**
|
|
6177
|
+
* Extensions safe to collect from a directory walk. Defaults to
|
|
6178
|
+
* `extensions`.
|
|
6179
|
+
*
|
|
6180
|
+
* The two differ when an extension is a generic container rather than a
|
|
6181
|
+
* documentation format. `.xml` is the case: this parser can read a DocBook
|
|
6182
|
+
* or DITA document named explicitly, but a docs tree also contains
|
|
6183
|
+
* `pom.xml`, `sitemap.xml`, and `.csproj`, and sweeping those in turns a
|
|
6184
|
+
* clean run into a failure about files the user never asked to lint.
|
|
6185
|
+
*/
|
|
6186
|
+
walkExtensions?: string[];
|
|
6187
|
+
/** Parse raw file content into the generic tree. */
|
|
6188
|
+
parse(content: string, filePath: string): DocumentTree;
|
|
6189
|
+
}
|
|
6190
|
+
|
|
6191
|
+
/**
|
|
6192
|
+
* One structural violation.
|
|
6193
|
+
*
|
|
6194
|
+
* The field set is pinned by manni docevals' tool adapter, which reads
|
|
6195
|
+
* `{ type, heading, message, position }` off the JSON reporter. Additions are
|
|
6196
|
+
* safe; renames are not.
|
|
6197
|
+
*/
|
|
6198
|
+
interface Finding {
|
|
6199
|
+
/** Machine-readable rule id, e.g. `missing_section`. */
|
|
6200
|
+
type: string;
|
|
6201
|
+
/** Heading of the section the finding is anchored to, if any. */
|
|
6202
|
+
heading: string | null;
|
|
6203
|
+
message: string;
|
|
6204
|
+
position: Position;
|
|
6205
|
+
severity: Severity;
|
|
6206
|
+
}
|
|
6207
|
+
/**
|
|
6208
|
+
* Why a file was not linted.
|
|
6209
|
+
*
|
|
6210
|
+
* `unreadable` is the one that is not about the document: the file was found,
|
|
6211
|
+
* claimed by a parser, and then could not be opened - a denied permission, a
|
|
6212
|
+
* symlink loop, a page a doc build moved between the walk and the read. It is a
|
|
6213
|
+
* skip rather than a finding because nothing was checked, and calling it a
|
|
6214
|
+
* finding would report the docs as wrong when the filesystem was.
|
|
6215
|
+
*/
|
|
6216
|
+
type SkipReason = "no-template" | "unsupported-format" | "unreadable";
|
|
6217
|
+
/** Result of linting one file. */
|
|
6218
|
+
interface FileResult {
|
|
6219
|
+
file: string;
|
|
6220
|
+
/** True when the file was linted and produced no findings. */
|
|
6221
|
+
success: boolean;
|
|
6222
|
+
findings: Finding[];
|
|
6223
|
+
/** Template id/ref applied, or null when skipped. */
|
|
6224
|
+
template: string | null;
|
|
6225
|
+
/** Set when the file was skipped rather than linted. */
|
|
6226
|
+
skipped?: SkipReason;
|
|
6227
|
+
}
|
|
6228
|
+
|
|
6229
|
+
/**
|
|
6230
|
+
* The template DSL, as TypeScript. `schemas/lint/template.json` is the
|
|
6231
|
+
* authority that user input is validated against; this is the shape the rest of
|
|
6232
|
+
* the code reads once that validation has passed.
|
|
6233
|
+
*
|
|
6234
|
+
* Two things are worth knowing before reading it.
|
|
6235
|
+
*
|
|
6236
|
+
* A template *is* a rule. It describes the page, so it takes every rule key,
|
|
6237
|
+
* plus `title`, `types` and `extends`. It may not take `min` or `max`, because
|
|
6238
|
+
* a page is one page, and the loader refuses those two by hand.
|
|
6239
|
+
*
|
|
6240
|
+
* A rule's children are a **list**, not a map. The v1 format keyed section
|
|
6241
|
+
* rules by name and let YAML key order carry the grammar, which made the order
|
|
6242
|
+
* invisible to the schema and unspeakable in `extends`. A rule names itself
|
|
6243
|
+
* with `id` instead, and that is what `extends` targets.
|
|
6244
|
+
*
|
|
6245
|
+
* The block-rule keys are plural where the node model is singular. That is
|
|
6246
|
+
* deliberate: the node model names one node (`codeBlock`), while a template key
|
|
6247
|
+
* carries a count (`codeBlocks: { min: 1 }`).
|
|
6248
|
+
*/
|
|
6249
|
+
|
|
6250
|
+
/** Shared by every counted rule: how many of the thing there must be. */
|
|
6251
|
+
interface Occurrences {
|
|
6252
|
+
/** Fewest occurrences. Absent means one. */
|
|
6253
|
+
min?: number;
|
|
6254
|
+
/** Most occurrences. Absent is unbounded; `0` forbids. */
|
|
6255
|
+
max?: number;
|
|
6256
|
+
}
|
|
6257
|
+
/**
|
|
6258
|
+
* What a rule's `heading` may say.
|
|
6259
|
+
*
|
|
6260
|
+
* `undefined` (the key absent) matches any heading or none. A string is exact
|
|
6261
|
+
* text, a list is one-of, `{ pattern }` is an unanchored regular expression,
|
|
6262
|
+
* and `false` means the section has no heading of its own.
|
|
6263
|
+
*/
|
|
6264
|
+
type HeadingRule = string | string[] | {
|
|
6265
|
+
pattern: string;
|
|
6266
|
+
} | false;
|
|
6267
|
+
/**
|
|
6268
|
+
* Attributes a node must carry. A string is the required value, `true`
|
|
6269
|
+
* requires the attribute's presence, and `false` requires its absence.
|
|
6270
|
+
*/
|
|
6271
|
+
type AttributesRule = Record<string, string | boolean>;
|
|
6272
|
+
/** `paragraphs:` - how many paragraphs, and what each must look like. */
|
|
6273
|
+
interface ParagraphsRule extends Occurrences {
|
|
6274
|
+
/** Unanchored regular expression every paragraph in the run must match. */
|
|
6275
|
+
pattern?: string;
|
|
6276
|
+
}
|
|
6277
|
+
/** `codeBlocks:` - how many code blocks, and how they are tagged. */
|
|
6278
|
+
interface CodeBlocksRule extends Occurrences {
|
|
6279
|
+
/** Language, or languages, every code block must declare one of. */
|
|
6280
|
+
language?: string | string[];
|
|
6281
|
+
/** Info-string tail after the language; narrows which blocks count. */
|
|
6282
|
+
fenceInfo?: string;
|
|
6283
|
+
}
|
|
6284
|
+
/** `lists.items:` - how many items per list, and what each item holds. */
|
|
6285
|
+
interface ListItemsRule extends Occurrences {
|
|
6286
|
+
sequence?: BlockRule[];
|
|
6287
|
+
contains?: BlockRule;
|
|
6288
|
+
}
|
|
6289
|
+
/** `lists:` - how many lists, whether they are ordered, and item rules. */
|
|
6290
|
+
interface ListsRule extends Occurrences {
|
|
6291
|
+
ordered?: boolean;
|
|
6292
|
+
items?: ListItemsRule;
|
|
6293
|
+
}
|
|
6294
|
+
/** `tables:` - how many tables, and the header cells in order. */
|
|
6295
|
+
interface TablesRule extends Occurrences {
|
|
6296
|
+
columns?: string[];
|
|
6297
|
+
}
|
|
6298
|
+
/** `admonitions:` - how many, and of which variant. */
|
|
6299
|
+
interface AdmonitionsRule extends Occurrences {
|
|
6300
|
+
variant?: "note" | "tip" | "important" | "caution" | "warning" | "danger";
|
|
6301
|
+
}
|
|
6302
|
+
/** `images:` - how many, and what they point at. */
|
|
6303
|
+
interface ImagesRule extends Occurrences {
|
|
6304
|
+
url?: string;
|
|
6305
|
+
alt?: string;
|
|
6306
|
+
attributes?: AttributesRule;
|
|
6307
|
+
}
|
|
6308
|
+
/** `elements:` - how many named wrappers, and what they hold. */
|
|
6309
|
+
interface ElementsRule extends Occurrences {
|
|
6310
|
+
/** Name, or names, an element must carry to be counted by this rule. */
|
|
6311
|
+
tag?: string | string[];
|
|
6312
|
+
attributes?: AttributesRule;
|
|
6313
|
+
sequence?: BlockRule[];
|
|
6314
|
+
contains?: BlockRule;
|
|
6315
|
+
}
|
|
6316
|
+
/**
|
|
6317
|
+
* What a section holds, keyed by content kind.
|
|
6318
|
+
*
|
|
6319
|
+
* One of these is a whole `contains:`. As an entry of `sequence:` exactly one
|
|
6320
|
+
* key is set, and it names the kind expected at that position.
|
|
6321
|
+
*/
|
|
6322
|
+
interface BlockRule {
|
|
6323
|
+
paragraphs?: ParagraphsRule;
|
|
6324
|
+
codeBlocks?: CodeBlocksRule;
|
|
6325
|
+
lists?: ListsRule;
|
|
6326
|
+
tables?: TablesRule;
|
|
6327
|
+
admonitions?: AdmonitionsRule;
|
|
6328
|
+
images?: ImagesRule;
|
|
6329
|
+
blockquotes?: Occurrences;
|
|
6330
|
+
definitionLists?: Occurrences;
|
|
6331
|
+
elements?: ElementsRule;
|
|
6332
|
+
}
|
|
6333
|
+
/** One block-rule key: a content kind, spelled plural. */
|
|
6334
|
+
type BlockKind = keyof BlockRule;
|
|
6335
|
+
/** Every block-rule key, in the order the schema declares them. */
|
|
6336
|
+
declare const BLOCK_KINDS: readonly BlockKind[];
|
|
6337
|
+
/** One rule: a section of the page, or a repeated run of sections. */
|
|
6338
|
+
interface Rule extends Occurrences {
|
|
6339
|
+
/** Handle, unique among siblings. `extends` targets it. */
|
|
6340
|
+
id?: string;
|
|
6341
|
+
/** Prose description of what the rule is for. Never checked. */
|
|
6342
|
+
description?: string;
|
|
6343
|
+
heading?: HeadingRule;
|
|
6344
|
+
/** Rules matched in order as one unit, repeated by this rule's `min`/`max`. */
|
|
6345
|
+
repeat?: Rule[];
|
|
6346
|
+
/** What the section holds, in order. Not combinable with `contains`. */
|
|
6347
|
+
sequence?: BlockRule[];
|
|
6348
|
+
/** What the section holds, in any order. Not combinable with `sequence`. */
|
|
6349
|
+
contains?: BlockRule;
|
|
6350
|
+
/** Rules for the subsections, in document order. */
|
|
6351
|
+
sections?: Rule[];
|
|
6352
|
+
}
|
|
6353
|
+
/** One doctype template: the rule that describes a whole page. */
|
|
6354
|
+
interface Template extends Rule {
|
|
6355
|
+
/** Human-readable name, shown by `manni lint templates`. */
|
|
6356
|
+
title?: string;
|
|
6357
|
+
/** Doctypes this template serves, matched against a page's `type`. */
|
|
6358
|
+
types?: string[];
|
|
6359
|
+
/** Built-in id, path, or URL to inherit from. */
|
|
6360
|
+
extends?: string;
|
|
6361
|
+
}
|
|
6362
|
+
/** A template file: named templates plus reusable `$ref` targets. */
|
|
6363
|
+
interface TemplateFile {
|
|
6364
|
+
/** Published schema URL, for editors. Ignored by the linter. */
|
|
6365
|
+
$schema?: string;
|
|
6366
|
+
templates?: Record<string, Template>;
|
|
6367
|
+
components?: Record<string, unknown>;
|
|
6368
|
+
info?: Record<string, unknown>;
|
|
6369
|
+
}
|
|
6370
|
+
/**
|
|
6371
|
+
* A rule is a wildcard when it says nothing about its heading.
|
|
6372
|
+
*
|
|
6373
|
+
* It then matches any heading, and matches a section with none. `heading:
|
|
6374
|
+
* false` is not a wildcard: it states that the section has no heading of its
|
|
6375
|
+
* own, which is as specific as naming one.
|
|
6376
|
+
*/
|
|
6377
|
+
declare function isWildcard(rule: Rule): boolean;
|
|
6378
|
+
/**
|
|
6379
|
+
* How many sections a rule claims: `min` defaulting to one, and `max` as
|
|
6380
|
+
* written, with `null` for unbounded.
|
|
6381
|
+
*
|
|
6382
|
+
* The defaults live here rather than in the schema. A default written into the
|
|
6383
|
+
* data by Ajv is indistinguishable from a value the author typed, so it wins
|
|
6384
|
+
* the `extends` merge against the parent's real value.
|
|
6385
|
+
*
|
|
6386
|
+
* One default is not the naive `min ?? 1`. `max: 0` is how the format forbids
|
|
6387
|
+
* a thing outright, and a bare `max: 0` has to be satisfiable by a page that
|
|
6388
|
+
* truly has none of it. A blanket "min defaults to 1" makes it unsatisfiable -
|
|
6389
|
+
* at least one demanded, at most zero permitted - so `min` defaults to 0
|
|
6390
|
+
* exactly when `max` is written as `0` and `min` itself is not, and to 1
|
|
6391
|
+
* otherwise. `checkCount` in `rules/index.ts` states the same rule for the
|
|
6392
|
+
* content counts; the two agree deliberately.
|
|
6393
|
+
*/
|
|
6394
|
+
declare function occurrenceRange(rule: Occurrences): {
|
|
6395
|
+
min: number;
|
|
6396
|
+
max: number | null;
|
|
6397
|
+
};
|
|
6398
|
+
/** Whether a section's title satisfies a rule's `heading`. */
|
|
6399
|
+
declare function headingMatches(heading: HeadingRule | undefined, title: string | null): boolean;
|
|
6400
|
+
|
|
6401
|
+
/** Where a resolution came from, in precedence order. */
|
|
6402
|
+
type ResolutionStage = "cli" | "frontmatter-template" | "config-override" | "type" | "config-default";
|
|
6403
|
+
type SkipCause = "no-type" | "unknown-type";
|
|
6404
|
+
interface ResolutionStep {
|
|
6405
|
+
stage: ResolutionStage;
|
|
6406
|
+
/** What the stage found, or null when it had nothing to say. */
|
|
6407
|
+
ref: string | null;
|
|
6408
|
+
/** Human-readable account of what the stage saw. */
|
|
6409
|
+
detail: string;
|
|
6410
|
+
}
|
|
6411
|
+
interface Resolution {
|
|
6412
|
+
/** The template ref to lint with, or null when the page is not linted. */
|
|
6413
|
+
ref: string | null;
|
|
6414
|
+
/** Which stage decided, when one did. */
|
|
6415
|
+
stage: ResolutionStage | null;
|
|
6416
|
+
/** Why no template was found. Only set when `ref` is null. */
|
|
6417
|
+
cause?: SkipCause;
|
|
6418
|
+
/**
|
|
6419
|
+
* The `type` the page declared but that resolved to nothing. Set only for
|
|
6420
|
+
* `unknown-type`, so the caller can name it and suggest near misses.
|
|
6421
|
+
*/
|
|
6422
|
+
unknownType?: string;
|
|
6423
|
+
/** Near-miss doctypes, for an unknown-type message. */
|
|
6424
|
+
suggestions?: string[];
|
|
6425
|
+
/**
|
|
6426
|
+
* Every doctype something serves, for an unknown-type message with no near
|
|
6427
|
+
* miss to offer. Carried on the resolution rather than looked up by each
|
|
6428
|
+
* reporter, because the type index does not reach them - which is how the
|
|
6429
|
+
* pretty reporter came to print the list and `--explain` came to print
|
|
6430
|
+
* nothing, for the same page.
|
|
6431
|
+
*/
|
|
6432
|
+
knownTypes?: string[];
|
|
6433
|
+
/** The full chain, for `--explain`. */
|
|
6434
|
+
steps: ResolutionStep[];
|
|
6435
|
+
}
|
|
6436
|
+
/** Per-glob repo policy, from `manni.config.yaml`'s `lint.overrides`. */
|
|
6437
|
+
interface TemplateOverride {
|
|
6438
|
+
files: string;
|
|
6439
|
+
template: string;
|
|
6440
|
+
}
|
|
6441
|
+
|
|
6442
|
+
/**
|
|
6443
|
+
* Everything the `lint:` section can carry. Every key is optional, and an
|
|
6444
|
+
* absent one means "the consumer's default", never a value written in here.
|
|
6445
|
+
*
|
|
6446
|
+
* `overrides[].template` and the `types` values are template refs, left as the
|
|
6447
|
+
* strings they were written as: `resolve-template.ts` owns what a ref means.
|
|
6448
|
+
*/
|
|
6449
|
+
interface LintConfig {
|
|
6450
|
+
/** Zero matched files is a success, not an operational error. */
|
|
6451
|
+
allowEmpty?: boolean;
|
|
6452
|
+
/** The structure job: what `lint structure` runs and `lint check` includes. */
|
|
6453
|
+
structure?: LintJobConfig;
|
|
6454
|
+
/** Template files to load; their `types:` join the routing table. */
|
|
6455
|
+
templates?: string[];
|
|
6456
|
+
/** Template for a page that declares no doctype. */
|
|
6457
|
+
template?: string;
|
|
6458
|
+
/** Explicit doctype -> template ref map. */
|
|
6459
|
+
types?: Record<string, string>;
|
|
6460
|
+
/** Repo policy, first matching glob wins. */
|
|
6461
|
+
overrides?: TemplateOverride[];
|
|
6462
|
+
}
|
|
6463
|
+
|
|
6464
|
+
/** One job's settings. The tool that performs it is all a job configures. */
|
|
6465
|
+
interface LintJobConfig {
|
|
6466
|
+
tool?: LintTool;
|
|
6467
|
+
}
|
|
6468
|
+
/**
|
|
6469
|
+
* The tools that can perform a lint job: manni's own engine, and DITA Open
|
|
6470
|
+
* Toolkit for a DITA docset.
|
|
6471
|
+
*/
|
|
6472
|
+
declare const LINT_TOOLS: readonly ["manni", "dita-ot"];
|
|
6473
|
+
type LintTool = (typeof LINT_TOOLS)[number];
|
|
6474
|
+
/** The jobs `lint check` runs: `structure`. */
|
|
6475
|
+
declare const LINT_JOBS: readonly ["structure"];
|
|
6476
|
+
type LintJob = (typeof LINT_JOBS)[number];
|
|
6477
|
+
/** The tools each job accepts, in the order its message lists them. */
|
|
6478
|
+
declare const TOOLS_BY_JOB: Readonly<Record<LintJob, readonly LintTool[]>>;
|
|
6479
|
+
declare function isLintTool(value: string): value is LintTool;
|
|
6480
|
+
/**
|
|
6481
|
+
* Parse a whole `manni.config.yaml` and return its `lint:` section.
|
|
6482
|
+
*
|
|
6483
|
+
* `source` names the file in every message. A file that is empty, or that
|
|
6484
|
+
* carries only other tools' sections, returns `{}` rather than throwing - that
|
|
6485
|
+
* is the case that keeps one shared file usable by a project which has not
|
|
6486
|
+
* adopted this tool yet.
|
|
6487
|
+
*/
|
|
6488
|
+
declare function parseConfig(text: string, source: string): LintConfig;
|
|
6489
|
+
/**
|
|
6490
|
+
* Load the config from an explicit path, or by walking up from `cwd`.
|
|
6491
|
+
*
|
|
6492
|
+
* Discovery is the family's: the nearest `manni.config.yaml` with a `lint:`
|
|
6493
|
+
* key or a family key wins, and a family file with neither belongs to a
|
|
6494
|
+
* sibling and is passed over. An explicit path skips discovery and errors if
|
|
6495
|
+
* it is missing; its `lint:` key is unwrapped when present and the whole
|
|
6496
|
+
* document is the section otherwise, so a file passed by hand may be called
|
|
6497
|
+
* anything.
|
|
6498
|
+
*
|
|
6499
|
+
* A wrapper differing from `lint:` only in case is still caught on an
|
|
6500
|
+
* un-wrapped document: nothing else in the section's schema would name it.
|
|
6501
|
+
*
|
|
6502
|
+
* Returns null when discovery finds no config, which is not an error - a repo
|
|
6503
|
+
* whose pages all declare their `type` needs no config at all.
|
|
6504
|
+
*/
|
|
6505
|
+
declare function loadConfig(explicitPath?: string, cwd?: string): Promise<{
|
|
6506
|
+
config: LintConfig;
|
|
6507
|
+
path: string;
|
|
6508
|
+
} | null>;
|
|
6509
|
+
/**
|
|
6510
|
+
* Re-base everything a config declares against the config file's own
|
|
6511
|
+
* directory.
|
|
6512
|
+
*
|
|
6513
|
+
* `loadConfig` returns the file's `path` precisely so this can happen, and
|
|
6514
|
+
* discarding it made the same config mean different things depending on where
|
|
6515
|
+
* the tool was invoked from. Running from a subdirectory turned `templates:`
|
|
6516
|
+
* into "file not found" - and turned `overrides:` into nothing at all,
|
|
6517
|
+
* silently: the glob stopped matching, every page fell through to its own
|
|
6518
|
+
* `type`, and the run exited 0 having applied none of the repo's policy.
|
|
6519
|
+
*
|
|
6520
|
+
* Refs go through `refRelativeTo`, which leaves built-in ids, URLs, and
|
|
6521
|
+
* absolute paths alone. Globs become absolute, which is what the run matches
|
|
6522
|
+
* them against. Every non-absolute glob is relative to the config, `**\/*.md`
|
|
6523
|
+
* included: exempting a leading `**` left the original bug half-open, because
|
|
6524
|
+
* from a subdirectory that pattern expanded against the working directory.
|
|
6525
|
+
*/
|
|
6526
|
+
declare function rebaseConfig(found: {
|
|
6527
|
+
config: LintConfig;
|
|
6528
|
+
path: string;
|
|
6529
|
+
} | null): LintConfig;
|
|
6530
|
+
interface LintRunOptions {
|
|
6531
|
+
cwd: string;
|
|
6532
|
+
/** `-c/--config`. */
|
|
6533
|
+
configPath?: string;
|
|
6534
|
+
/** `--no-config`: skip discovery and run on the built-in defaults. */
|
|
6535
|
+
noConfig?: boolean;
|
|
6536
|
+
/** Positional inputs; empty means fall back to the selected collections' `paths:`. */
|
|
6537
|
+
inputs: string[];
|
|
6538
|
+
/**
|
|
6539
|
+
* `--collection <name>`, repeatable: the collections this run covers. Empty
|
|
6540
|
+
* or absent means every declared one, the same thing, because commander's
|
|
6541
|
+
* collector hands `[]` over when the flag was never typed.
|
|
6542
|
+
*/
|
|
6543
|
+
collection?: string[];
|
|
6544
|
+
onConfigLoaded?: (info: {
|
|
6545
|
+
path: string;
|
|
6546
|
+
dir: string;
|
|
6547
|
+
}) => void;
|
|
6548
|
+
}
|
|
6549
|
+
/** What every lint command settles before it touches a file. */
|
|
6550
|
+
interface ResolvedLintRun {
|
|
6551
|
+
/** The `lint:` section, rebased against the config's directory. */
|
|
6552
|
+
config: LintConfig;
|
|
6553
|
+
/** What to resolve: the positional inputs, or the collections' `paths:`. */
|
|
6554
|
+
inputs: string[];
|
|
6555
|
+
/** The directory `inputs` resolve from. */
|
|
6556
|
+
base: string;
|
|
6557
|
+
/** The collections this run covers; `[]` with no config. */
|
|
6558
|
+
collections: CollectionConfig[];
|
|
6559
|
+
/** Whether `inputs` came from the collections rather than the command line. */
|
|
6560
|
+
fromCollections: boolean;
|
|
6561
|
+
/**
|
|
6562
|
+
* The document's top-level `tools:`, an outside tool's settings (proposal
|
|
6563
|
+
* 0052). `{}` with no config. It is not part of the `lint:` section and is
|
|
6564
|
+
* not rebased here: a path in it is resolved against `configDir` by the run
|
|
6565
|
+
* that needs it, through the helpers in `src/shared/tools.ts`.
|
|
6566
|
+
*/
|
|
6567
|
+
tools: ToolsConfig;
|
|
6568
|
+
configDir?: string;
|
|
6569
|
+
configPath?: string;
|
|
6570
|
+
configSource?: string;
|
|
6571
|
+
}
|
|
6572
|
+
/**
|
|
6573
|
+
* Settle which config governs the run and what it covers. The same shape cite
|
|
6574
|
+
* uses, for the same reason: positional inputs are typed from a shell and stay
|
|
6575
|
+
* cwd-relative, while a collection's `paths:` was written next to the config
|
|
6576
|
+
* and resolves there, so one run has exactly one base.
|
|
6577
|
+
*/
|
|
6578
|
+
declare function resolveLintRun(opts: LintRunOptions): Promise<ResolvedLintRun>;
|
|
6579
|
+
|
|
6580
|
+
/**
|
|
6581
|
+
* `tools` command core. One row per lint job: which tool performs it, whether
|
|
6582
|
+
* this checkout can run it, what it read its settings from, and the input
|
|
6583
|
+
* formats it understands.
|
|
6584
|
+
*
|
|
6585
|
+
* It replaces `formats`, which reported the parser registry alone. Proposal
|
|
6586
|
+
* 0050 records the rename. The registry is here as one column of the job that
|
|
6587
|
+
* reads it, because the formats belong to the tool performing that job.
|
|
6588
|
+
*
|
|
6589
|
+
* The column lists exactly the formats the tool reads, so a row carries no
|
|
6590
|
+
* state: a listed format is one that is read, and `--as` accepts every name in
|
|
6591
|
+
* it.
|
|
6592
|
+
*
|
|
6593
|
+
* Returns data; `src/lint/reporters/index.ts` renders it.
|
|
6594
|
+
*/
|
|
6595
|
+
|
|
6596
|
+
interface FormatInfo {
|
|
6597
|
+
/** Parser name, also what `--as` accepts. */
|
|
6598
|
+
name: string;
|
|
6599
|
+
label: string;
|
|
6600
|
+
extensions: string[];
|
|
6601
|
+
/** The content kinds this format's parser actually emits today. */
|
|
6602
|
+
kinds: ContentKind[];
|
|
6603
|
+
}
|
|
6604
|
+
/** One job, and the tool that would perform it on this run. */
|
|
6605
|
+
interface ToolInfo {
|
|
6606
|
+
job: LintJob;
|
|
6607
|
+
tool: LintTool;
|
|
6608
|
+
/** Whether the config declares this job, or anything the job's tool reads. */
|
|
6609
|
+
configured: boolean;
|
|
6610
|
+
/** Whether the tool can run here, as its own probe reported it. */
|
|
6611
|
+
available: boolean;
|
|
6612
|
+
/**
|
|
6613
|
+
* The version the probe reported, or null when it reported none.
|
|
6614
|
+
*
|
|
6615
|
+
* Null rather than a placeholder string, because this is the shape
|
|
6616
|
+
* `-f json` emits: a consumer can test for an absent version, where a dash
|
|
6617
|
+
* would be a value it has to know to recognize. The pretty reporter renders
|
|
6618
|
+
* the dash.
|
|
6619
|
+
*/
|
|
6620
|
+
version: string | null;
|
|
6621
|
+
/** Where the tool read its settings: the config file, or the defaults. */
|
|
6622
|
+
config: string;
|
|
6623
|
+
/** The input formats the tool reads. */
|
|
6624
|
+
formats: FormatInfo[];
|
|
6625
|
+
}
|
|
6626
|
+
interface ToolsOptions {
|
|
6627
|
+
cwd?: string;
|
|
6628
|
+
/** `-c/--config`. */
|
|
6629
|
+
configPath?: string;
|
|
6630
|
+
/** `--no-config`: ignore any discovered config file. */
|
|
6631
|
+
noConfig?: boolean;
|
|
6632
|
+
}
|
|
6633
|
+
/** What a run with no config file to read reports in the `config` column. */
|
|
6634
|
+
declare const BUILT_IN_DEFAULTS = "built-in defaults";
|
|
6635
|
+
declare function runTools(opts?: ToolsOptions): Promise<ToolInfo[]>;
|
|
6636
|
+
|
|
6637
|
+
/** What the launcher did. `code` is null when a signal ended it. */
|
|
6638
|
+
interface DitaOtProcessResult {
|
|
6639
|
+
code: number | null;
|
|
6640
|
+
/**
|
|
6641
|
+
* The signal that ended it, when one did, and `code` is then null. Optional
|
|
6642
|
+
* because absent means what it says: the run was not killed.
|
|
6643
|
+
*/
|
|
6644
|
+
signal?: string | null;
|
|
6645
|
+
stdout: string;
|
|
6646
|
+
stderr: string;
|
|
6647
|
+
}
|
|
6648
|
+
/**
|
|
6649
|
+
* Start `launcher` with `args` and wait for it. Resolves for any exit; rejects
|
|
6650
|
+
* when the process could not start, with an error whose `code` is `ENOENT`
|
|
6651
|
+
* when there is no such launcher. Tests inject a stub.
|
|
6652
|
+
*/
|
|
6653
|
+
type DitaOtSpawn = (launcher: string, args: string[], opts: {
|
|
6654
|
+
cwd?: string;
|
|
6655
|
+
}) => Promise<DitaOtProcessResult>;
|
|
6656
|
+
/** One diagnostic DITA-OT reported, in the vocabulary the lint branch reads. */
|
|
6657
|
+
interface DitaOtMessage {
|
|
6658
|
+
/** DITA-OT's own message id, e.g. `DOTX010E`. Becomes the finding's `type`. */
|
|
6659
|
+
code: string;
|
|
6660
|
+
severity: Severity;
|
|
6661
|
+
message: string;
|
|
6662
|
+
/** The path its `location` URI named, absent when it named none. */
|
|
6663
|
+
file?: string;
|
|
6664
|
+
line?: number;
|
|
6665
|
+
/** The **column**. See `readMessage` for why the log calls it `row`. */
|
|
6666
|
+
column?: number;
|
|
6667
|
+
}
|
|
6668
|
+
/** What one invocation of DITA-OT had to say about one target. */
|
|
6669
|
+
interface DitaOtTargetResult {
|
|
6670
|
+
/** The absolute path this invocation was given as `--input`. */
|
|
6671
|
+
target: string;
|
|
6672
|
+
messages: DitaOtMessage[];
|
|
6673
|
+
}
|
|
6674
|
+
interface DitaOtRunOptions {
|
|
6675
|
+
/** Absolute paths. One invocation each: DITA-OT takes one `--input`. */
|
|
6676
|
+
targets: string[];
|
|
6677
|
+
/** The directory the run resolves from, and where the launcher is started. */
|
|
6678
|
+
cwd: string;
|
|
6679
|
+
/** `tools.dita-ot.home`, already resolved to an absolute directory. */
|
|
6680
|
+
home?: string;
|
|
6681
|
+
spawn?: DitaOtSpawn;
|
|
6682
|
+
}
|
|
6683
|
+
/**
|
|
6684
|
+
* DITA-OT over each target, and what its log said.
|
|
6685
|
+
*
|
|
6686
|
+
* ## Why this is not `dita validate`
|
|
6687
|
+
*
|
|
6688
|
+
* Because `dita validate` does not answer the question this tool exists for.
|
|
6689
|
+
* Run against a map whose topic conrefs an id that is not there, it exits 0 and
|
|
6690
|
+
* prints nothing. It parses and checks grammar, and it resolves no references.
|
|
6691
|
+
* Its own `--help` lists neither `--logger` nor `--logfile` nor `--temp`, so
|
|
6692
|
+
* the obvious invocation is silently accepted and silently useless.
|
|
6693
|
+
*
|
|
6694
|
+
* `--format=dita` is the DITA-to-DITA transformation. It runs the whole
|
|
6695
|
+
* preprocessing chain, which is where conref, keyref and link resolution
|
|
6696
|
+
* happen, and it reports what those stages find. Measured against the fixtures
|
|
6697
|
+
* beside this file, it catches everything `validate` catches and the references
|
|
6698
|
+
* as well: a grammar error is `DOTJ088E` with a line and a column, a missing
|
|
6699
|
+
* conref target is `DOTX010E`, an unreadable link target is `DOTX008E`.
|
|
6700
|
+
*
|
|
6701
|
+
* The cost is that a transformation writes output. It goes to the scratch
|
|
6702
|
+
* directory with the logs and the temp trees, and the whole scratch is removed
|
|
6703
|
+
* however the run ends, so nothing of ours lands in the user's tree.
|
|
6704
|
+
*
|
|
6705
|
+
* ## Why verbose
|
|
6706
|
+
*
|
|
6707
|
+
* Because DITA-OT reports an undefined key reference (`DOTJ047I`) at `INFO`,
|
|
6708
|
+
* and the default verbosity drops it. Verbose turns one run of a four-file map
|
|
6709
|
+
* into roughly 135 log entries, of which one carries a `code`. That is what
|
|
6710
|
+
* makes the `code` filter in `parseDitaOtLog` load-bearing rather than tidy.
|
|
6711
|
+
*/
|
|
6712
|
+
declare function runDitaOtValidate(opts: DitaOtRunOptions): Promise<DitaOtTargetResult[]>;
|
|
6713
|
+
|
|
6714
|
+
/** File label used for a document read from stdin. */
|
|
6715
|
+
declare const STDIN_LABEL = "<stdin>";
|
|
6716
|
+
interface LintOptions {
|
|
6717
|
+
/**
|
|
6718
|
+
* Positional inputs: files, directories, or globs. `-` reads stdin. Empty
|
|
6719
|
+
* falls back to the `collections:` the config declares (proposal 0041).
|
|
6720
|
+
*/
|
|
6721
|
+
inputs: string[];
|
|
6722
|
+
/** `--collection <name>`, repeatable: the collections this run covers. */
|
|
6723
|
+
collection?: string[];
|
|
6724
|
+
/**
|
|
6725
|
+
* `--tool`: which tool performs the structure job. Overrides the config's
|
|
6726
|
+
* own `lint.structure.tool`, and defaults to manni's engine.
|
|
6727
|
+
*/
|
|
6728
|
+
tool?: string;
|
|
6729
|
+
/** `--template`: a built-in id, a path, or a name inside `templates`. */
|
|
6730
|
+
template?: string;
|
|
6731
|
+
/**
|
|
6732
|
+
* `--templates`: template files whose `types:` join the routing table. A bare
|
|
6733
|
+
* `--template <name>` is resolved as a name inside the *last* of them, which
|
|
6734
|
+
* is the pairing the manni docevals adapter invokes. Last, not first, to
|
|
6735
|
+
* agree with `buildTypeIndex`: a later file overrides an earlier one there,
|
|
6736
|
+
* so resolving a bare name against the first would make one name mean two
|
|
6737
|
+
* different templates depending on how it was written.
|
|
6738
|
+
*/
|
|
6739
|
+
templates?: string | string[];
|
|
6740
|
+
/** `--as`: force an input format, by parser name. */
|
|
6741
|
+
as?: string;
|
|
6742
|
+
/** `--ext`: extensions kept during directory and glob expansion. */
|
|
6743
|
+
exts?: string[];
|
|
6744
|
+
/** `--exclude`: globs removed from directory/glob expansion. */
|
|
6745
|
+
exclude?: string[];
|
|
6746
|
+
cwd?: string;
|
|
6747
|
+
/** Content for the `-` input, injected by the CLI and by tests. */
|
|
6748
|
+
stdinContent?: string;
|
|
6749
|
+
/** `--explain`: record how each file's template was chosen. */
|
|
6750
|
+
explain?: boolean;
|
|
6751
|
+
/** Repo policy: first matching glob wins. Overrides the config's own. */
|
|
6752
|
+
overrides?: TemplateOverride[];
|
|
6753
|
+
/** Applied when a page declares no doctype. Overrides the config's own. */
|
|
6754
|
+
defaultTemplate?: string;
|
|
6755
|
+
/** Explicit doctype -> template ref map. Overrides the config's own. */
|
|
6756
|
+
types?: Record<string, string>;
|
|
6757
|
+
/** `--allow-empty`: zero matched files is a success, not an error. */
|
|
6758
|
+
allowEmpty?: boolean;
|
|
6759
|
+
/** `--no-gitignore`: only an explicit `false` travels, so config can decide. */
|
|
6760
|
+
respectGitignore?: boolean;
|
|
6761
|
+
/** `-c/--config`. */
|
|
6762
|
+
configPath?: string;
|
|
6763
|
+
/** `--no-config`: skip discovery and run on the built-in defaults. */
|
|
6764
|
+
noConfig?: boolean;
|
|
6765
|
+
/** Told which config governed the run, and where it came from. */
|
|
6766
|
+
onConfigLoaded?: (info: {
|
|
6767
|
+
path: string;
|
|
6768
|
+
dir: string;
|
|
6769
|
+
}) => void;
|
|
6770
|
+
/** Told what the run had to say beside its findings. */
|
|
6771
|
+
onNotice?: (message: string) => void;
|
|
6772
|
+
/**
|
|
6773
|
+
* The DITA-OT seam, injected by tests, as `term lint` injects Vale's.
|
|
6774
|
+
*
|
|
6775
|
+
* There is no JVM and no DITA-OT on a CI runner of ours, so the only way to
|
|
6776
|
+
* exercise this branch end to end is to hand it the process boundary. The
|
|
6777
|
+
* shipped default is the real one.
|
|
6778
|
+
*/
|
|
6779
|
+
runDitaOt?: typeof runDitaOtValidate;
|
|
6780
|
+
}
|
|
6781
|
+
interface LintSummary {
|
|
6782
|
+
/** Files actually linted. Always `passed + failed`; skips are counted apart. */
|
|
6783
|
+
checked: number;
|
|
6784
|
+
passed: number;
|
|
6785
|
+
failed: number;
|
|
6786
|
+
skipped: number;
|
|
6787
|
+
}
|
|
6788
|
+
/**
|
|
6789
|
+
* A `FileResult` plus the human-readable reason a file was skipped.
|
|
6790
|
+
*
|
|
6791
|
+
* `types.ts` pins the fields manni docevals reads off the JSON reporter, so
|
|
6792
|
+
* this diagnostic lives here instead: it exists for pretty output, and the
|
|
6793
|
+
* JSON reporter never emits it.
|
|
6794
|
+
*/
|
|
6795
|
+
interface LintFileResult extends FileResult {
|
|
6796
|
+
/** Why the file was skipped, in words. Set only alongside `skipped`. */
|
|
6797
|
+
reason?: string;
|
|
6798
|
+
/** How the template was chosen. Present when `--explain` asked for it. */
|
|
6799
|
+
resolution?: Resolution;
|
|
6800
|
+
/**
|
|
6801
|
+
* What the alignment block is rendered from. Present when `--explain` asked
|
|
6802
|
+
* for it, and only for a file that routed to a template.
|
|
6803
|
+
*
|
|
6804
|
+
* Nested rather than flat, because `FileResult.template` is already taken by
|
|
6805
|
+
* the template's *ref* - the string a reader sees on the routing line. A
|
|
6806
|
+
* loaded `Template` beside it under the same name would be two things called
|
|
6807
|
+
* one thing, and the reporter would read whichever it got.
|
|
6808
|
+
*/
|
|
6809
|
+
alignment?: {
|
|
6810
|
+
tree: DocumentTree;
|
|
6811
|
+
template: Template;
|
|
6812
|
+
};
|
|
6813
|
+
}
|
|
6814
|
+
interface LintRun {
|
|
6815
|
+
results: LintFileResult[];
|
|
6816
|
+
summary: LintSummary;
|
|
6817
|
+
}
|
|
6818
|
+
declare function runLint(opts: LintOptions): Promise<LintRun>;
|
|
6819
|
+
|
|
6820
|
+
/** `TemplateInfo.source` for a template that ships with the tool. */
|
|
6821
|
+
declare const BUILTIN_SOURCE = "builtin";
|
|
6822
|
+
interface TemplateInfo {
|
|
6823
|
+
/** The ref to pass to `--template`. */
|
|
6824
|
+
id: string;
|
|
6825
|
+
/**
|
|
6826
|
+
* Human-readable title. Empty for templates read from a user file: the
|
|
6827
|
+
* template DSL has no title field, only the built-in registry carries one.
|
|
6828
|
+
*/
|
|
6829
|
+
title: string;
|
|
6830
|
+
/** Doctypes the template serves, matched against a page `type`. */
|
|
6831
|
+
types: string[];
|
|
6832
|
+
/** `builtin`, or the template file this entry came from. */
|
|
6833
|
+
source: string;
|
|
6834
|
+
}
|
|
6835
|
+
interface TemplatesInfo {
|
|
6836
|
+
templates: TemplateInfo[];
|
|
6837
|
+
}
|
|
6838
|
+
interface TemplatesOptions {
|
|
6839
|
+
/** Template files whose entries join the built-ins. */
|
|
6840
|
+
templates?: string | string[];
|
|
6841
|
+
}
|
|
6842
|
+
declare function runTemplates(opts?: TemplatesOptions): Promise<TemplatesInfo>;
|
|
6843
|
+
|
|
6844
|
+
/** One rule paired with the section it claimed. */
|
|
6845
|
+
interface Match {
|
|
6846
|
+
/** The rule itself - a `repeat` group's member, never the group. */
|
|
6847
|
+
rule: Rule;
|
|
6848
|
+
section: SectionNode;
|
|
6849
|
+
/**
|
|
6850
|
+
* True when the rule was paired with a section whose heading does not
|
|
6851
|
+
* satisfy it, because nothing else could claim that section. Keeps the
|
|
6852
|
+
* precise "Expected title X, but found Y" report for the common one-for-one
|
|
6853
|
+
* case instead of degrading it into missing + unexpected.
|
|
6854
|
+
*/
|
|
6855
|
+
coerced: boolean;
|
|
6856
|
+
}
|
|
6857
|
+
interface MatchResult {
|
|
6858
|
+
matches: Match[];
|
|
6859
|
+
findings: Finding[];
|
|
6860
|
+
}
|
|
6861
|
+
interface MatchOptions {
|
|
6862
|
+
/** Section these are the subsections of, for anchoring a trailing gap. */
|
|
6863
|
+
parent?: SectionNode | null;
|
|
6864
|
+
/** File the rules came from. Used only to name the state-cap failure. */
|
|
6865
|
+
source?: string;
|
|
6866
|
+
/** Template within that file. Used only to name the state-cap failure. */
|
|
6867
|
+
template?: string;
|
|
6868
|
+
}
|
|
6869
|
+
/**
|
|
6870
|
+
* Align `sections` against `rules` and say what is missing, what is extra, and
|
|
6871
|
+
* which rule describes which section.
|
|
6872
|
+
*
|
|
6873
|
+
* `rules` being absent means the template says nothing about this level, which
|
|
6874
|
+
* is silence rather than "no sections allowed". An empty list is the other
|
|
6875
|
+
* thing: a rule list that describes no sections, so every section is
|
|
6876
|
+
* unexpected.
|
|
6877
|
+
*/
|
|
6878
|
+
declare function matchSections(sections: SectionNode[], rules: Rule[] | undefined, options?: MatchOptions): MatchResult;
|
|
6879
|
+
|
|
6880
|
+
/**
|
|
6881
|
+
* Run a template over a parsed document.
|
|
6882
|
+
*
|
|
6883
|
+
* Matching and checking are deliberately separate: `match.ts` decides which
|
|
6884
|
+
* section each rule is talking about, and this module asks the content rules
|
|
6885
|
+
* about the pairs it produced. The old code fused the two - it inferred which
|
|
6886
|
+
* section a rule meant by running the rules and seeing whether they passed -
|
|
6887
|
+
* which made "does this section match?" and "is this section valid?" the same
|
|
6888
|
+
* question, so a section could never be both matched and wrong.
|
|
6889
|
+
*
|
|
6890
|
+
* Everything here is synchronous. It was async only to await a language model,
|
|
6891
|
+
* which this tool no longer has.
|
|
6892
|
+
*
|
|
6893
|
+
* Two things beyond that wiring live here, and both are about the document as a
|
|
6894
|
+
* whole rather than about any one section.
|
|
6895
|
+
*
|
|
6896
|
+
* **A template is a rule, and its subject is the page.** Its `heading`
|
|
6897
|
+
* constrains the page's own title, its `sequence`/`contains` describe what sits
|
|
6898
|
+
* before the first heading, and its `sections` describe what follows. See
|
|
6899
|
+
* `pageSection` for which section that makes the subject.
|
|
6900
|
+
*
|
|
6901
|
+
* **A rule the format cannot answer is said out loud.** A parser declares the
|
|
6902
|
+
* content kinds it emits (proposal 0065), and a rule about a kind absent from
|
|
6903
|
+
* that list is dropped and reported as a `warning` rather than silently passing
|
|
6904
|
+
* - or, worse, failing a document for holding none of something its format
|
|
6905
|
+
* cannot express.
|
|
6906
|
+
*/
|
|
6907
|
+
|
|
6908
|
+
/** What a caller can tell the validator beyond the tree and the template. */
|
|
6909
|
+
interface ValidateOptions {
|
|
6910
|
+
/** Template file the rules came from. Names the state-cap failure. */
|
|
6911
|
+
source?: string;
|
|
6912
|
+
/** Template within that file. Named in messages about the template. */
|
|
6913
|
+
template?: string;
|
|
6914
|
+
/**
|
|
6915
|
+
* Content kinds the parser that produced this tree emits. Defaults to what
|
|
6916
|
+
* the registry declares for `tree.format`, which is what the CLI wants; a
|
|
6917
|
+
* caller holding a tree from somewhere else passes its own.
|
|
6918
|
+
*/
|
|
6919
|
+
kinds?: ContentKind[];
|
|
6920
|
+
}
|
|
6921
|
+
/** Match one level of sections, check each pair, then recurse. */
|
|
6922
|
+
declare function validateSections(sections: SectionNode[], rules: Rule[] | undefined, options?: MatchOptions): Finding[];
|
|
6923
|
+
/** Findings for one document against one template, in document order. */
|
|
6924
|
+
declare function validateDocument(tree: DocumentTree, template: Template, options?: ValidateOptions): Finding[];
|
|
6925
|
+
|
|
6926
|
+
interface BuiltinInfo {
|
|
6927
|
+
id: string;
|
|
6928
|
+
title: string;
|
|
6929
|
+
types: string[];
|
|
6930
|
+
}
|
|
6931
|
+
declare function listBuiltins(): BuiltinInfo[];
|
|
6932
|
+
type RefKind = "builtin" | "file" | "url";
|
|
6933
|
+
declare function classifyRef(ref: string): {
|
|
6934
|
+
kind: RefKind;
|
|
6935
|
+
ref: string;
|
|
6936
|
+
};
|
|
6937
|
+
interface LoadTemplateOptions {
|
|
6938
|
+
/** Abort a remote fetch after this many ms (default 10_000). */
|
|
6939
|
+
timeoutMs?: number;
|
|
6940
|
+
}
|
|
6941
|
+
/** Load, dereference, and validate a whole template file. */
|
|
6942
|
+
declare function loadTemplateFile(ref: string, options?: LoadTemplateOptions): Promise<TemplateFile>;
|
|
6943
|
+
/**
|
|
6944
|
+
* Resolve a single template.
|
|
6945
|
+
*
|
|
6946
|
+
* A built-in id names one directly. A file or URL may name one inside itself
|
|
6947
|
+
* with a `#` fragment; without a fragment a single-template file resolves
|
|
6948
|
+
* unambiguously and anything else is an error listing what is on offer.
|
|
6949
|
+
*
|
|
6950
|
+
* `extends` is left unresolved - see `resolveExtends`.
|
|
6951
|
+
*/
|
|
6952
|
+
declare function loadTemplate(ref: string, options?: LoadTemplateOptions): Promise<Template>;
|
|
6953
|
+
/** How `resolveExtends` turns an `extends` ref into a template. */
|
|
6954
|
+
type TemplateResolver = (ref: string) => Promise<Template>;
|
|
6955
|
+
/**
|
|
6956
|
+
* Resolve a template's `extends` chain, innermost first.
|
|
6957
|
+
*
|
|
6958
|
+
* `load` is injected because a relative `extends` is relative to the file the
|
|
6959
|
+
* child came from, which this function has no way to know. `chain` is internal
|
|
6960
|
+
* bookkeeping for cycle detection.
|
|
6961
|
+
*/
|
|
6962
|
+
declare function resolveExtends(template: Template, load?: TemplateResolver, chain?: string[]): Promise<Template>;
|
|
6963
|
+
|
|
6964
|
+
/**
|
|
6965
|
+
* Parser registry. Maps file extensions to parsers and resolves a parser by
|
|
6966
|
+
* name for the `--as` override.
|
|
6967
|
+
*
|
|
6968
|
+
* Shaped after docmeta's extractor registry, and for the same reason:
|
|
6969
|
+
* everything downstream of `parse()` operates on the generic `DocumentTree`, so
|
|
6970
|
+
* adding a format is one file plus one line here - no change to matching,
|
|
6971
|
+
* rules, templates, or reporting.
|
|
6972
|
+
*
|
|
6973
|
+
* A format is registered here when, and only when, a parser reads it. That is
|
|
6974
|
+
* what `manni lint tools` lists and what `--as` accepts, so neither can name a
|
|
6975
|
+
* format the tool does not read. An extension no parser claims is skipped by
|
|
6976
|
+
* name, never parsed as Markdown the way the pre-rewrite `inferFileType` did.
|
|
6977
|
+
*/
|
|
6978
|
+
|
|
6979
|
+
/** Resolve a parser for a file extension (including the dot). */
|
|
6980
|
+
declare function parserForExtension(ext: string): DocumentParser | undefined;
|
|
6981
|
+
/** Resolve a parser by its `--as` name. */
|
|
6982
|
+
declare function parserByName(name: string): DocumentParser | undefined;
|
|
6983
|
+
/** Extensions collected from a directory walk. */
|
|
6984
|
+
declare function supportedExtensions(): string[];
|
|
6985
|
+
/** Every format the tool reads, for `manni lint tools`. */
|
|
6986
|
+
declare function listFormats(): {
|
|
6987
|
+
name: string;
|
|
6988
|
+
label: string;
|
|
6989
|
+
extensions: string[];
|
|
6990
|
+
kinds: ContentKind[];
|
|
6991
|
+
}[];
|
|
6992
|
+
|
|
6993
|
+
/**
|
|
6994
|
+
* JUnit XML, rendered through **meta's** writer rather than a second one.
|
|
6995
|
+
*
|
|
6996
|
+
* There is no authoritative JUnit schema, and the escaping is the part a
|
|
6997
|
+
* hand-rolled writer gets wrong - XML 1.0 forbids characters that sit quite
|
|
6998
|
+
* happily in a JavaScript string, and one of them makes the whole document
|
|
6999
|
+
* unparseable rather than merely mis-rendered. That work is done once, in
|
|
7000
|
+
* `src/meta/reporters/junit.ts`, and cite already rides it. So does lint:
|
|
7001
|
+
* adapt the run onto meta's `ValidationResult`, hand it to that writer, and
|
|
7002
|
+
* the family ships one XML writer, one escaping rule, and one
|
|
7003
|
+
* testcase-per-file convention.
|
|
7004
|
+
*
|
|
7005
|
+
* What is lint's is the two strings that identify the findings as lint's:
|
|
7006
|
+
* the `classname` on every `<testcase>`, and the `<failure type>`, which is
|
|
7007
|
+
* the namespaced rule id.
|
|
7008
|
+
*/
|
|
7009
|
+
|
|
7010
|
+
/**
|
|
7011
|
+
* Straight to meta's JUnit writer rather than through its `render`, which
|
|
7012
|
+
* takes a `RunSummary` its junit branch does not forward. Building one here
|
|
7013
|
+
* only to have it dropped read as though the suite's counts came from the run,
|
|
7014
|
+
* and they do not: they are the length of the list above and how much of it
|
|
7015
|
+
* carries an error-severity finding.
|
|
7016
|
+
*/
|
|
7017
|
+
declare function renderJunit(run: LintRun): string;
|
|
7018
|
+
|
|
7019
|
+
/**
|
|
7020
|
+
* Every `-f` value, plus `--explain`.
|
|
7021
|
+
*
|
|
7022
|
+
* The findings formats are the family's, taken from meta rather than restated,
|
|
7023
|
+
* so a format added there is available here the moment lint's `render` grows a
|
|
7024
|
+
* case for it - and a value lint does not handle is a compile error instead of
|
|
7025
|
+
* a silent fall-through to pretty. `explain` is lint's own: it is reachable
|
|
7026
|
+
* through `--explain` and never through `-f`, because it reports on
|
|
7027
|
+
* configuration rather than on documents.
|
|
7028
|
+
*/
|
|
7029
|
+
type ReportFormat = ReportFormat$1 | "explain";
|
|
7030
|
+
/** Listing commands have nothing to annotate, so they offer no `github`. */
|
|
7031
|
+
type ListFormat = "pretty" | "json";
|
|
7032
|
+
interface ReportOptions {
|
|
7033
|
+
color?: boolean;
|
|
7034
|
+
/**
|
|
7035
|
+
* Directory the run's relative paths are relative to, forwarded to the SARIF
|
|
7036
|
+
* reporter and ignored by the others. Defaults to the process cwd, which is
|
|
7037
|
+
* right for the CLI because `runLint` defaults its `cwd` the same way.
|
|
7038
|
+
*
|
|
7039
|
+
* It is here rather than only on `renderSarif` because `render` is the entry
|
|
7040
|
+
* point a library caller reaches for, and without it that caller was pinned
|
|
7041
|
+
* to the process cwd with no way out short of bypassing `render` entirely -
|
|
7042
|
+
* for the one reporter whose whole output is paths.
|
|
7043
|
+
*/
|
|
7044
|
+
root?: string;
|
|
7045
|
+
}
|
|
7046
|
+
declare function renderPretty(run: LintRun, opts?: ReportOptions): string;
|
|
7047
|
+
/**
|
|
7048
|
+
* The published JSON shape, and the reason this builds objects by hand rather
|
|
7049
|
+
* than stringifying `run.results` directly.
|
|
7050
|
+
*
|
|
7051
|
+
* manni docevals reads `[{ file, success, errors: [{ type, heading, message,
|
|
7052
|
+
* position: { start: { line, column } } }] }]` off stdout, and it parses
|
|
7053
|
+
* rather than validates - a renamed key produces zero findings, not an error.
|
|
7054
|
+
* So: a bare array at the top level, and `errors`, even though the internal
|
|
7055
|
+
* field is `findings`. Adding keys is safe; renaming or nesting is not.
|
|
7056
|
+
*/
|
|
7057
|
+
declare function renderJson(run: LintRun): string;
|
|
7058
|
+
/**
|
|
7059
|
+
* GitHub workflow commands: one annotation per finding, shaped as cite's are -
|
|
7060
|
+
* `::<severity> file=…,line=…,col=…,title=<ruleId>::<message>`.
|
|
7061
|
+
*
|
|
7062
|
+
* The rule id is a `title=` property rather than a `[type]` prefix inside the
|
|
7063
|
+
* message. GitHub renders the title as the alert's own heading, so the prefix
|
|
7064
|
+
* spelled the rule's name a second time; and `title` is the field a reader can
|
|
7065
|
+
* group and filter on, which prose can never be.
|
|
7066
|
+
*
|
|
7067
|
+
* The level is the severity, not a constant `error`. The family scale was
|
|
7068
|
+
* chosen to be GitHub's for exactly this: `::warning` and `::notice` render
|
|
7069
|
+
* inline like `::error` but do not fail the check, which is the severity
|
|
7070
|
+
* invariant in GitHub's terms, and it is load-bearing rather than theoretical:
|
|
7071
|
+
* `unsupported_content_kind` is a `warning`, so it annotates the file without
|
|
7072
|
+
* failing the job.
|
|
7073
|
+
*
|
|
7074
|
+
* Line breaks are escaped rather than collapsed to spaces, as this once did.
|
|
7075
|
+
* `%0A` is the format's own answer and GitHub renders it as a multi-line
|
|
7076
|
+
* annotation, so the message arrives whole; collapsing threw away the author's
|
|
7077
|
+
* line breaks to solve a problem the escape already solves, and its `\r?\n`
|
|
7078
|
+
* pattern let a bare carriage return through into the command untouched.
|
|
7079
|
+
*
|
|
7080
|
+
* The escaping itself is the family's, from `src/shared/github.ts`. It lives
|
|
7081
|
+
* there precisely so a second renderer cannot re-derive it: the replacements
|
|
7082
|
+
* are order-dependent (`%` first, or the escape sequences get escaped again),
|
|
7083
|
+
* and a local copy that got the order wrong would look identical in review and
|
|
7084
|
+
* only show itself on a message carrying a literal `%`.
|
|
7085
|
+
*/
|
|
7086
|
+
declare function renderGithub(run: LintRun): string;
|
|
7087
|
+
declare function render(run: LintRun, format: ReportFormat, opts?: ReportOptions): string;
|
|
7088
|
+
declare function renderTemplates(info: TemplatesInfo, format: ListFormat, opts?: ReportOptions): string;
|
|
7089
|
+
/**
|
|
7090
|
+
* `manni lint tools`: one block per job. Every column is printed for every
|
|
7091
|
+
* job, the negatives included - "not configured" beside a job that still runs
|
|
7092
|
+
* on defaults is the answer someone ran this command to get.
|
|
7093
|
+
*/
|
|
7094
|
+
declare function renderTools(tools: ToolInfo[], format: ListFormat, opts?: ReportOptions): string;
|
|
7095
|
+
|
|
7096
|
+
interface SarifOptions {
|
|
7097
|
+
/**
|
|
7098
|
+
* Directory the relative paths in `LintRun` are relative to - the lint run's
|
|
7099
|
+
* `cwd`. Defaults to the process cwd, which is what `runLint` itself
|
|
7100
|
+
* defaults to. It is a parameter rather than a bare read of `process.cwd()`
|
|
7101
|
+
* so the URI mapping, the part most likely to be silently wrong, is testable
|
|
7102
|
+
* without moving the whole process into a fixture directory.
|
|
7103
|
+
*/
|
|
7104
|
+
root?: string;
|
|
7105
|
+
}
|
|
7106
|
+
declare function renderSarif(run: LintRun, opts?: SarifOptions): string;
|
|
7107
|
+
|
|
7108
|
+
/**
|
|
7109
|
+
* A finding's **rule identity**: `manni:lint/<job>/<rule>`.
|
|
7110
|
+
*
|
|
7111
|
+
* One id, in one place, for every consumer that files or correlates findings -
|
|
7112
|
+
* the SARIF `ruleId`, the JUnit `<failure type>`, the GitHub annotation's
|
|
7113
|
+
* `title`, and the `ruleId` the JSON reporter carries beside `type`. A rule id
|
|
7114
|
+
* is durable by contract: rename one and every historical alert in a
|
|
7115
|
+
* dashboard closes, then reopens as new.
|
|
7116
|
+
*
|
|
7117
|
+
* Three segments rather than cite's two. The job is what makes a second lint
|
|
7118
|
+
* tool possible without collisions: a prose job will report
|
|
7119
|
+
* `manni:lint/prose/Google.Passive`, keeping Vale's own rule name because that
|
|
7120
|
+
* is the name Vale's documentation uses, and nothing about it can be confused
|
|
7121
|
+
* with a structure rule. Proposal 0050 records the shape, and warns that
|
|
7122
|
+
* anything parsing family rule ids must not assume two segments.
|
|
7123
|
+
*
|
|
7124
|
+
* The rule half is derived from the finding's `type` rather than authored
|
|
7125
|
+
* beside it. `type` is already the machine-readable name the JSON reporter
|
|
7126
|
+
* publishes - manni docevals' grader reads it - so a hand-maintained second
|
|
7127
|
+
* table would be one more thing to keep in step, and the derivation cannot
|
|
7128
|
+
* drift. `_error` is dropped because it says only that a finding is a finding;
|
|
7129
|
+
* `heading_pattern_error` is the rule "heading-pattern".
|
|
7130
|
+
*/
|
|
7131
|
+
|
|
7132
|
+
/** Every lint rule id starts here. */
|
|
7133
|
+
declare const RULE_ID_PREFIX = "manni:lint";
|
|
7134
|
+
/** The tool that performs the structure job, reported beside every finding. */
|
|
7135
|
+
declare const TOOL_NAME = "manni";
|
|
7136
|
+
/**
|
|
7137
|
+
* `heading_pattern_error` -> `heading-pattern`; `parse_error` -> `parse`.
|
|
7138
|
+
*
|
|
7139
|
+
* Only a trailing `_error` is dropped, so a rule that is genuinely *about*
|
|
7140
|
+
* errors keeps the word.
|
|
7141
|
+
*/
|
|
7142
|
+
declare function ruleName(type: string): string;
|
|
7143
|
+
/** `manni:lint/<job>/<rule>` for one finding `type`. */
|
|
7144
|
+
declare function ruleId(type: string, job?: LintJob): string;
|
|
7145
|
+
|
|
7146
|
+
/**
|
|
7147
|
+
* Drop every process-lifetime cache: parsed built-ins, fetched template files,
|
|
7148
|
+
* compiled override globs, and compiled heading patterns.
|
|
7149
|
+
*
|
|
7150
|
+
* A CLI run never needs this - it lints one docset and exits, and the caches
|
|
7151
|
+
* are what stop a tree of one doctype from re-reading the same template per
|
|
7152
|
+
* page. A long-lived host is the different case: the maps grow with the number
|
|
7153
|
+
* of distinct refs and patterns seen, and a cached remote template is served
|
|
7154
|
+
* for the life of the process, so one republished upstream is never picked up.
|
|
7155
|
+
* Call this between runs, or when a template may have changed underneath.
|
|
7156
|
+
*/
|
|
7157
|
+
declare function clearCaches(): void;
|
|
7158
|
+
|
|
7159
|
+
type index$1_AdmonitionNode = AdmonitionNode;
|
|
7160
|
+
type index$1_AdmonitionsRule = AdmonitionsRule;
|
|
7161
|
+
type index$1_AttributesRule = AttributesRule;
|
|
7162
|
+
declare const index$1_BLOCK_KINDS: typeof BLOCK_KINDS;
|
|
7163
|
+
declare const index$1_BUILTIN_SOURCE: typeof BUILTIN_SOURCE;
|
|
7164
|
+
declare const index$1_BUILT_IN_DEFAULTS: typeof BUILT_IN_DEFAULTS;
|
|
7165
|
+
type index$1_BlockKind = BlockKind;
|
|
7166
|
+
type index$1_BlockRule = BlockRule;
|
|
7167
|
+
type index$1_BlockquoteNode = BlockquoteNode;
|
|
7168
|
+
type index$1_BuiltinInfo = BuiltinInfo;
|
|
7169
|
+
type index$1_CodeBlocksRule = CodeBlocksRule;
|
|
7170
|
+
type index$1_CodeNode = CodeNode;
|
|
7171
|
+
type index$1_ContentKind = ContentKind;
|
|
7172
|
+
type index$1_ContentNode = ContentNode;
|
|
7173
|
+
type index$1_ContentNodeBase = ContentNodeBase;
|
|
7174
|
+
type index$1_DefinitionItemNode = DefinitionItemNode;
|
|
7175
|
+
type index$1_DefinitionListNode = DefinitionListNode;
|
|
7176
|
+
type index$1_DocumentParser = DocumentParser;
|
|
7177
|
+
type index$1_DocumentTree = DocumentTree;
|
|
7178
|
+
type index$1_ElementNode = ElementNode;
|
|
7179
|
+
type index$1_ElementsRule = ElementsRule;
|
|
7180
|
+
type index$1_FileResult = FileResult;
|
|
7181
|
+
type index$1_Finding = Finding;
|
|
7182
|
+
type index$1_FormatInfo = FormatInfo;
|
|
7183
|
+
type index$1_HeadingRule = HeadingRule;
|
|
7184
|
+
type index$1_ImageNode = ImageNode;
|
|
7185
|
+
type index$1_ImagesRule = ImagesRule;
|
|
7186
|
+
declare const index$1_LINT_JOBS: typeof LINT_JOBS;
|
|
7187
|
+
declare const index$1_LINT_TOOLS: typeof LINT_TOOLS;
|
|
7188
|
+
type index$1_LintConfig = LintConfig;
|
|
7189
|
+
type index$1_LintError = LintError;
|
|
7190
|
+
declare const index$1_LintError: typeof LintError;
|
|
7191
|
+
type index$1_LintFileResult = LintFileResult;
|
|
7192
|
+
type index$1_LintJob = LintJob;
|
|
7193
|
+
type index$1_LintJobConfig = LintJobConfig;
|
|
7194
|
+
type index$1_LintOptions = LintOptions;
|
|
7195
|
+
type index$1_LintRun = LintRun;
|
|
7196
|
+
type index$1_LintRunOptions = LintRunOptions;
|
|
7197
|
+
type index$1_LintSummary = LintSummary;
|
|
7198
|
+
type index$1_LintTool = LintTool;
|
|
7199
|
+
type index$1_ListFormat = ListFormat;
|
|
7200
|
+
type index$1_ListItemNode = ListItemNode;
|
|
7201
|
+
type index$1_ListItemsRule = ListItemsRule;
|
|
7202
|
+
type index$1_ListNode = ListNode;
|
|
7203
|
+
type index$1_ListsRule = ListsRule;
|
|
7204
|
+
type index$1_LoadTemplateOptions = LoadTemplateOptions;
|
|
7205
|
+
type index$1_Match = Match;
|
|
7206
|
+
type index$1_MatchResult = MatchResult;
|
|
7207
|
+
type index$1_Occurrences = Occurrences;
|
|
7208
|
+
type index$1_ParagraphNode = ParagraphNode;
|
|
7209
|
+
type index$1_ParagraphsRule = ParagraphsRule;
|
|
7210
|
+
type index$1_Point = Point;
|
|
7211
|
+
type index$1_Position = Position;
|
|
5799
7212
|
declare const index$1_RULE_ID_PREFIX: typeof RULE_ID_PREFIX;
|
|
5800
|
-
type index$
|
|
5801
|
-
type index$
|
|
5802
|
-
type index$
|
|
5803
|
-
type index$
|
|
5804
|
-
type index$
|
|
5805
|
-
|
|
5806
|
-
|
|
5807
|
-
type index$
|
|
5808
|
-
type index$
|
|
5809
|
-
type index$
|
|
5810
|
-
type index$
|
|
5811
|
-
|
|
5812
|
-
declare const index$
|
|
5813
|
-
type index$
|
|
5814
|
-
type index$
|
|
5815
|
-
type index$
|
|
5816
|
-
type index$
|
|
5817
|
-
type index$
|
|
5818
|
-
type index$
|
|
5819
|
-
type index$
|
|
5820
|
-
type index$
|
|
5821
|
-
type index$
|
|
5822
|
-
type index$
|
|
5823
|
-
type index$
|
|
5824
|
-
type index$
|
|
5825
|
-
|
|
5826
|
-
declare const index$
|
|
5827
|
-
declare const index$
|
|
5828
|
-
declare const index$
|
|
5829
|
-
declare const index$
|
|
5830
|
-
declare const index$
|
|
5831
|
-
declare const index$
|
|
5832
|
-
declare const index$
|
|
5833
|
-
declare const index$
|
|
5834
|
-
declare const index$
|
|
5835
|
-
declare const index$
|
|
5836
|
-
declare const index$
|
|
5837
|
-
declare const index$
|
|
5838
|
-
declare const index$
|
|
5839
|
-
declare const index$
|
|
5840
|
-
declare const index$
|
|
5841
|
-
declare const index$
|
|
5842
|
-
declare const index$
|
|
5843
|
-
declare const index$
|
|
5844
|
-
declare const index$
|
|
5845
|
-
declare const index$
|
|
5846
|
-
declare const index$
|
|
5847
|
-
declare const index$
|
|
5848
|
-
declare const index$
|
|
5849
|
-
declare const index$
|
|
5850
|
-
declare const index$
|
|
5851
|
-
declare const index$
|
|
5852
|
-
declare const index$1_gitClient: typeof gitClient;
|
|
5853
|
-
declare const index$1_hashLines: typeof hashLines;
|
|
5854
|
-
declare const index$1_hashRange: typeof hashRange;
|
|
5855
|
-
declare const index$1_historyOf: typeof historyOf;
|
|
5856
|
-
declare const index$1_holdsWords: typeof holdsWords;
|
|
5857
|
-
declare const index$1_insertStatementBefore: typeof insertStatementBefore;
|
|
5858
|
-
declare const index$1_insideFence: typeof insideFence;
|
|
5859
|
-
declare const index$1_isBoundLine: typeof isBoundLine;
|
|
5860
|
-
declare const index$1_isCiteRule: typeof isCiteRule;
|
|
5861
|
-
declare const index$1_isKeyedPin: typeof isKeyedPin;
|
|
5862
|
-
declare const index$1_isTableRow: typeof isTableRow;
|
|
5863
|
-
declare const index$1_isUnitText: typeof isUnitText;
|
|
5864
|
-
declare const index$1_itemLine: typeof itemLine;
|
|
5865
|
-
declare const index$1_lineAt: typeof lineAt;
|
|
5866
|
-
declare const index$1_lineSpec: typeof lineSpec;
|
|
5867
|
-
declare const index$1_loadCitationSidecars: typeof loadCitationSidecars;
|
|
5868
|
-
declare const index$1_loadCiteConfig: typeof loadCiteConfig;
|
|
5869
|
-
declare const index$1_markerClaimEnd: typeof markerClaimEnd;
|
|
5870
|
-
declare const index$1_markerRunAt: typeof markerRunAt;
|
|
5871
|
-
declare const index$1_markerUnit: typeof markerUnit;
|
|
5872
|
-
declare const index$1_messageFor: typeof messageFor;
|
|
5873
|
-
declare const index$1_mintCitation: typeof mintCitation;
|
|
5874
|
-
declare const index$1_misplacedMarkerAt: typeof misplacedMarkerAt;
|
|
5875
|
-
declare const index$1_misplacedMarkers: typeof misplacedMarkers;
|
|
5876
|
-
declare const index$1_misplacedMessageFor: typeof misplacedMessageFor;
|
|
5877
|
-
declare const index$1_movedUnit: typeof movedUnit;
|
|
5878
|
-
declare const index$1_noGit: typeof noGit;
|
|
5879
|
-
declare const index$1_noUnitAt: typeof noUnitAt;
|
|
5880
|
-
declare const index$1_normalizeText: typeof normalizeText;
|
|
5881
|
-
declare const index$1_normalizeWhitespace: typeof normalizeWhitespace;
|
|
5882
|
-
declare const index$1_offsetOfLine: typeof offsetOfLine;
|
|
5883
|
-
declare const index$1_orphanRefusal: typeof orphanRefusal;
|
|
5884
|
-
declare const index$1_ownedMessage: typeof ownedMessage;
|
|
5885
|
-
declare const index$1_paragraphAfter: typeof paragraphAfter;
|
|
5886
|
-
declare const index$1_parseCiteConfig: typeof parseCiteConfig;
|
|
5887
|
-
declare const index$1_parseLines: typeof parseLines;
|
|
5888
|
-
declare const index$1_parseSrc: typeof parseSrc;
|
|
5889
|
-
declare const index$1_parseStatements: typeof parseStatements;
|
|
5890
|
-
declare const index$1_pickExtractor: typeof pickExtractor;
|
|
5891
|
-
declare const index$1_pinOfLines: typeof pinOfLines;
|
|
5892
|
-
declare const index$1_pre43Span: typeof pre43Span;
|
|
5893
|
-
declare const index$1_rangeLines: typeof rangeLines;
|
|
5894
|
-
declare const index$1_readCiteConfigFile: typeof readCiteConfigFile;
|
|
5895
|
-
declare const index$1_readPage: typeof readPage;
|
|
5896
|
-
declare const index$1_readSource: typeof readSource;
|
|
5897
|
-
declare const index$1_reencryptCitationEntries: typeof reencryptCitationEntries;
|
|
5898
|
-
declare const index$1_reencryptCitations: typeof reencryptCitations;
|
|
5899
|
-
declare const index$1_refineClaim: typeof refineClaim;
|
|
5900
|
-
declare const index$1_refusalLine: typeof refusalLine;
|
|
5901
|
-
declare const index$1_removalLine: typeof removalLine;
|
|
5902
|
-
declare const index$1_removeFrontmatterCitations: typeof removeFrontmatterCitations;
|
|
5903
|
-
declare const index$1_removeLine: typeof removeLine;
|
|
5904
|
-
declare const index$1_renderCheckGithub: typeof renderCheckGithub;
|
|
5905
|
-
declare const index$1_renderCheckJson: typeof renderCheckJson;
|
|
5906
|
-
declare const index$1_renderCheckPretty: typeof renderCheckPretty;
|
|
5907
|
-
declare const index$1_renderRemoveJson: typeof renderRemoveJson;
|
|
5908
|
-
declare const index$1_renderRemovePretty: typeof renderRemovePretty;
|
|
5909
|
-
declare const index$1_renderUpdateJson: typeof renderUpdateJson;
|
|
5910
|
-
declare const index$1_renderUpdatePretty: typeof renderUpdatePretty;
|
|
5911
|
-
declare const index$1_resolveCiteRun: typeof resolveCiteRun;
|
|
5912
|
-
declare const index$1_resolveSeverity: typeof resolveSeverity;
|
|
5913
|
-
declare const index$1_rewriteLine: typeof rewriteLine;
|
|
7213
|
+
type index$1_RefKind = RefKind;
|
|
7214
|
+
type index$1_ReportFormat = ReportFormat;
|
|
7215
|
+
type index$1_ReportOptions = ReportOptions;
|
|
7216
|
+
type index$1_ResolvedLintRun = ResolvedLintRun;
|
|
7217
|
+
type index$1_Rule = Rule;
|
|
7218
|
+
declare const index$1_STDIN_LABEL: typeof STDIN_LABEL;
|
|
7219
|
+
declare const index$1_STDIN_TOKEN: typeof STDIN_TOKEN;
|
|
7220
|
+
type index$1_SarifOptions = SarifOptions;
|
|
7221
|
+
type index$1_SectionNode = SectionNode;
|
|
7222
|
+
type index$1_Severity = Severity;
|
|
7223
|
+
type index$1_SkipReason = SkipReason;
|
|
7224
|
+
declare const index$1_TOOLS_BY_JOB: typeof TOOLS_BY_JOB;
|
|
7225
|
+
declare const index$1_TOOL_NAME: typeof TOOL_NAME;
|
|
7226
|
+
type index$1_TableCellNode = TableCellNode;
|
|
7227
|
+
type index$1_TableNode = TableNode;
|
|
7228
|
+
type index$1_TableRowNode = TableRowNode;
|
|
7229
|
+
type index$1_TablesRule = TablesRule;
|
|
7230
|
+
type index$1_Template = Template;
|
|
7231
|
+
type index$1_TemplateFile = TemplateFile;
|
|
7232
|
+
type index$1_TemplateInfo = TemplateInfo;
|
|
7233
|
+
type index$1_TemplateResolver = TemplateResolver;
|
|
7234
|
+
type index$1_TemplatesInfo = TemplatesInfo;
|
|
7235
|
+
type index$1_TemplatesOptions = TemplatesOptions;
|
|
7236
|
+
type index$1_ToolInfo = ToolInfo;
|
|
7237
|
+
type index$1_ToolsOptions = ToolsOptions;
|
|
7238
|
+
declare const index$1_classifyRef: typeof classifyRef;
|
|
7239
|
+
declare const index$1_clearCaches: typeof clearCaches;
|
|
7240
|
+
declare const index$1_headingMatches: typeof headingMatches;
|
|
7241
|
+
declare const index$1_isLintTool: typeof isLintTool;
|
|
7242
|
+
declare const index$1_isWildcard: typeof isWildcard;
|
|
7243
|
+
declare const index$1_listBuiltins: typeof listBuiltins;
|
|
7244
|
+
declare const index$1_listFormats: typeof listFormats;
|
|
7245
|
+
declare const index$1_loadConfig: typeof loadConfig;
|
|
7246
|
+
declare const index$1_loadTemplate: typeof loadTemplate;
|
|
7247
|
+
declare const index$1_loadTemplateFile: typeof loadTemplateFile;
|
|
7248
|
+
declare const index$1_matchSections: typeof matchSections;
|
|
7249
|
+
declare const index$1_occurrenceRange: typeof occurrenceRange;
|
|
7250
|
+
declare const index$1_palette: typeof palette;
|
|
7251
|
+
declare const index$1_parseConfig: typeof parseConfig;
|
|
7252
|
+
declare const index$1_parserByName: typeof parserByName;
|
|
7253
|
+
declare const index$1_parserForExtension: typeof parserForExtension;
|
|
7254
|
+
declare const index$1_rebaseConfig: typeof rebaseConfig;
|
|
7255
|
+
declare const index$1_render: typeof render;
|
|
7256
|
+
declare const index$1_renderGithub: typeof renderGithub;
|
|
7257
|
+
declare const index$1_renderJson: typeof renderJson;
|
|
7258
|
+
declare const index$1_renderJunit: typeof renderJunit;
|
|
7259
|
+
declare const index$1_renderPretty: typeof renderPretty;
|
|
7260
|
+
declare const index$1_renderSarif: typeof renderSarif;
|
|
7261
|
+
declare const index$1_renderTemplates: typeof renderTemplates;
|
|
7262
|
+
declare const index$1_renderTools: typeof renderTools;
|
|
7263
|
+
declare const index$1_resolveExtends: typeof resolveExtends;
|
|
7264
|
+
declare const index$1_resolveLintRun: typeof resolveLintRun;
|
|
5914
7265
|
declare const index$1_ruleId: typeof ruleId;
|
|
5915
|
-
declare const index$
|
|
5916
|
-
declare const index$
|
|
5917
|
-
declare const index$
|
|
5918
|
-
declare const index$
|
|
5919
|
-
declare const index$
|
|
5920
|
-
declare const index$
|
|
5921
|
-
declare const index$
|
|
5922
|
-
declare const index$
|
|
5923
|
-
declare const index$1_shortCommit: typeof shortCommit;
|
|
5924
|
-
declare const index$1_shortLine: typeof shortLine;
|
|
5925
|
-
declare const index$1_shortPin: typeof shortPin;
|
|
5926
|
-
declare const index$1_shortSrc: typeof shortSrc;
|
|
5927
|
-
declare const index$1_sidecarsFor: typeof sidecarsFor;
|
|
5928
|
-
declare const index$1_sliceLines: typeof sliceLines;
|
|
5929
|
-
declare const index$1_sourceRange: typeof sourceRange;
|
|
5930
|
-
declare const index$1_spellAt: typeof spellAt;
|
|
5931
|
-
declare const index$1_spellLines: typeof spellLines;
|
|
5932
|
-
declare const index$1_spellSource: typeof spellSource;
|
|
5933
|
-
declare const index$1_splice: typeof splice;
|
|
5934
|
-
declare const index$1_spliceEntryField: typeof spliceEntryField;
|
|
5935
|
-
declare const index$1_splitLines: typeof splitLines;
|
|
5936
|
-
declare const index$1_splitUnit: typeof splitUnit;
|
|
5937
|
-
declare const index$1_statementForms: typeof statementForms;
|
|
5938
|
-
declare const index$1_stripMarkers: typeof stripMarkers;
|
|
5939
|
-
declare const index$1_toBodyLines: typeof toBodyLines;
|
|
5940
|
-
declare const index$1_toFileLines: typeof toFileLines;
|
|
5941
|
-
declare const index$1_toValidationResult: typeof toValidationResult;
|
|
5942
|
-
declare const index$1_twoManifestsRefusal: typeof twoManifestsRefusal;
|
|
5943
|
-
declare const index$1_unifiedDiff: typeof unifiedDiff;
|
|
5944
|
-
declare const index$1_unitAt: typeof unitAt;
|
|
5945
|
-
declare const index$1_unitText: typeof unitText;
|
|
5946
|
-
declare const index$1_urlManifestRefusal: typeof urlManifestRefusal;
|
|
5947
|
-
declare const index$1_validateEntry: typeof validateEntry;
|
|
5948
|
-
declare const index$1_withClaimLines: typeof withClaimLines;
|
|
7266
|
+
declare const index$1_ruleName: typeof ruleName;
|
|
7267
|
+
declare const index$1_runLint: typeof runLint;
|
|
7268
|
+
declare const index$1_runTemplates: typeof runTemplates;
|
|
7269
|
+
declare const index$1_runTools: typeof runTools;
|
|
7270
|
+
declare const index$1_shouldColor: typeof shouldColor;
|
|
7271
|
+
declare const index$1_supportedExtensions: typeof supportedExtensions;
|
|
7272
|
+
declare const index$1_validateDocument: typeof validateDocument;
|
|
7273
|
+
declare const index$1_validateSections: typeof validateSections;
|
|
5949
7274
|
declare namespace index$1 {
|
|
5950
|
-
export { type index$
|
|
7275
|
+
export { type index$1_AdmonitionNode as AdmonitionNode, type index$1_AdmonitionsRule as AdmonitionsRule, type index$1_AttributesRule as AttributesRule, index$1_BLOCK_KINDS as BLOCK_KINDS, index$1_BUILTIN_SOURCE as BUILTIN_SOURCE, index$1_BUILT_IN_DEFAULTS as BUILT_IN_DEFAULTS, type index$1_BlockKind as BlockKind, type index$1_BlockRule as BlockRule, type index$1_BlockquoteNode as BlockquoteNode, type index$1_BuiltinInfo as BuiltinInfo, type index$1_CodeBlocksRule as CodeBlocksRule, type index$1_CodeNode as CodeNode, type index$1_ContentKind as ContentKind, type index$1_ContentNode as ContentNode, type index$1_ContentNodeBase as ContentNodeBase, type index$1_DefinitionItemNode as DefinitionItemNode, type index$1_DefinitionListNode as DefinitionListNode, type index$1_DocumentParser as DocumentParser, type index$1_DocumentTree as DocumentTree, type index$1_ElementNode as ElementNode, type index$1_ElementsRule as ElementsRule, type index$1_FileResult as FileResult, type index$1_Finding as Finding, type index$1_FormatInfo as FormatInfo, type index$1_HeadingRule as HeadingRule, type index$1_ImageNode as ImageNode, type index$1_ImagesRule as ImagesRule, index$1_LINT_JOBS as LINT_JOBS, index$1_LINT_TOOLS as LINT_TOOLS, type index$1_LintConfig as LintConfig, index$1_LintError as LintError, type index$1_LintFileResult as LintFileResult, type index$1_LintJob as LintJob, type index$1_LintJobConfig as LintJobConfig, type index$1_LintOptions as LintOptions, type index$1_LintRun as LintRun, type index$1_LintRunOptions as LintRunOptions, type index$1_LintSummary as LintSummary, type index$1_LintTool as LintTool, type index$1_ListFormat as ListFormat, type index$1_ListItemNode as ListItemNode, type index$1_ListItemsRule as ListItemsRule, type index$1_ListNode as ListNode, type index$1_ListsRule as ListsRule, type index$1_LoadTemplateOptions as LoadTemplateOptions, type index$1_Match as Match, type index$1_MatchResult as MatchResult, type index$1_Occurrences as Occurrences, type index$1_ParagraphNode as ParagraphNode, type index$1_ParagraphsRule as ParagraphsRule, type index$1_Point as Point, type index$1_Position as Position, index$1_RULE_ID_PREFIX as RULE_ID_PREFIX, type index$1_RefKind as RefKind, type index$1_ReportFormat as ReportFormat, type index$1_ReportOptions as ReportOptions, type index$1_ResolvedLintRun as ResolvedLintRun, type index$1_Rule as Rule, index$1_STDIN_LABEL as STDIN_LABEL, index$1_STDIN_TOKEN as STDIN_TOKEN, type index$1_SarifOptions as SarifOptions, type index$1_SectionNode as SectionNode, type index$1_Severity as Severity, type index$1_SkipReason as SkipReason, index$1_TOOLS_BY_JOB as TOOLS_BY_JOB, index$1_TOOL_NAME as TOOL_NAME, type index$1_TableCellNode as TableCellNode, type index$1_TableNode as TableNode, type index$1_TableRowNode as TableRowNode, type index$1_TablesRule as TablesRule, type index$1_Template as Template, type index$1_TemplateFile as TemplateFile, type index$1_TemplateInfo as TemplateInfo, type index$1_TemplateResolver as TemplateResolver, type index$1_TemplatesInfo as TemplatesInfo, type index$1_TemplatesOptions as TemplatesOptions, type index$1_ToolInfo as ToolInfo, type index$1_ToolsOptions as ToolsOptions, index$1_classifyRef as classifyRef, index$1_clearCaches as clearCaches, index$1_headingMatches as headingMatches, index$1_isLintTool as isLintTool, index$1_isWildcard as isWildcard, index$1_listBuiltins as listBuiltins, index$1_listFormats as listFormats, index$1_loadConfig as loadConfig, index$1_loadTemplate as loadTemplate, index$1_loadTemplateFile as loadTemplateFile, index$1_matchSections as matchSections, index$1_occurrenceRange as occurrenceRange, index$1_palette as palette, index$1_parseConfig as parseConfig, index$1_parserByName as parserByName, index$1_parserForExtension as parserForExtension, index$1_rebaseConfig as rebaseConfig, index$1_render as render, index$1_renderGithub as renderGithub, index$1_renderJson as renderJson, index$1_renderJunit as renderJunit, index$1_renderPretty as renderPretty, index$1_renderSarif as renderSarif, index$1_renderTemplates as renderTemplates, index$1_renderTools as renderTools, index$1_resolveExtends as resolveExtends, index$1_resolveLintRun as resolveLintRun, index$1_ruleId as ruleId, index$1_ruleName as ruleName, index$1_runLint as runLint, index$1_runTemplates as runTemplates, index$1_runTools as runTools, index$1_shouldColor as shouldColor, index$1_supportedExtensions as supportedExtensions, index$1_validateDocument as validateDocument, index$1_validateSections as validateSections };
|
|
5951
7276
|
}
|
|
5952
7277
|
|
|
5953
7278
|
/**
|
|
@@ -6201,4 +7526,4 @@ declare namespace index {
|
|
|
6201
7526
|
export { type index_EncryptionContext as EncryptionContext, index_KeyError as KeyError, type index_KeyRotateOptions as KeyRotateOptions, type index_KeyRotateResult as KeyRotateResult, type index_KeySetOptions as KeySetOptions, type index_KeySetResult as KeySetResult, type index_KeySource as KeySource, type index_ResolvedKey as ResolvedKey, type index_RotateManifest as RotateManifest, type index_RotateOutcome as RotateOutcome, type index_RotatePage as RotatePage, type index_RotatedCitation as RotatedCitation, type index_RotatedManifestValue as RotatedManifestValue, type index_RotatedMetadata as RotatedMetadata, type index_RotatedValue as RotatedValue, type index_SkippedCitation as SkippedCitation, type index_SkippedManifestValue as SkippedManifestValue, type index_SkippedMetadata as SkippedMetadata, type index_SkippedValue as SkippedValue, index_decryptValue as decryptValue, index_encryptValue as encryptValue, index_isEncryptedValue as isEncryptedValue, index_resolveEncryptionKey as resolveEncryptionKey, index_runKeyRotate as runKeyRotate, index_runKeySet as runKeySet };
|
|
6202
7527
|
}
|
|
6203
7528
|
|
|
6204
|
-
export { type ApplyOptions, type Approval, type BaselineSummary, BinMissing, type BuiltinDerivableField, COMMON_FORMATS, type CheckConfig, type CollectionConfig, type CommandSourceOptions, type CommandSourceResult, type CommonFormat, type ConfigNotice, DEFAULT_SCHEMAS, DEFAULT_TTL_HOURS, DEFAULT_VENDOR_DIR, DERIVABLE_FIELDS, DERIVED_KEYWORD, DERIVED_STALE_SCHEMA, DERIVE_FORMATS, DERIVE_SOURCES, type DerivableField, type DeriveCommand, type DeriveCommandConfig, type DeriveConfig, type DeriveContext, type DeriveFileResult, type DeriveInput, type DeriveOptions, type DeriveReportFormat, type DeriveReportOptions, type DeriveResult, type DeriveRun, type DeriveSource, type DeriveSummary, type DerivedField, type DerivedRecord, type DerivedStatus, type DerivedValue, type DocmetaConfig, DocmetaError, type DocumentRefTrust, EXTERNAL_DUPLICATE_SCHEMA, EXTERNAL_KEYWORD, EXTERNAL_METADATA_FETCH_MAX_BYTES, EXTERNAL_METADATA_FETCH_TIMEOUT_MS, EXTERNAL_OWNED_SCHEMA, type ExternalMetadataCollision, type ExternalMetadataConfig, type ExternalMetadataEntry, type ExternalMetadataFetchOptions, type ExternalMetadataIndex, type ExternalMetadataJoin, type ExternalMetadataValue, type ExtractOptions, type ExtractedMetadata, FIELD_SOURCES, FILL_FORMATS, type FetchedSchema, type FieldError, type FieldLocation, type FillConfig, type FillFileResult, type FillOptions, type FillReportFormat, type FillReportOptions, type FillRun, type FillSummary, type FilledField, type FingerprintContext, type FrontmatterFlavor, type FrontmatterLocation, type GetFileResult, type GetOptions, type GetReportOptions, GitHubClient, GitLabClient, INTEGRITY_SHAPE, type JunitOptions, LOCATION_KEYWORD, type LoadExternalMetadataOptions, type LoadSchemaOptions, type LoadedConfig, type LocationPreference, MERGE_SAFE_FIELDS, type MergedChange, type MergedMetadata, type MetadataExtractor, type MetadataPatch, PATH_JOIN, PATH_PLACEHOLDER, QUERY_FORMATS, type QueryChange, type QueryFormat, type QueryOptions, type QueryReportOptions, type QueryRun, REPORT_FORMATS, RESOLVED_VIEW, REVIEW_CACHE_DIR, REVIEW_CACHE_VERSION, type ReadOptions, type ReencryptMetadataResult, type ReencryptedValue, type RegisteredSchema, type RegisteredSchemas, type RelocateOptions, type RelocateResult, type RemoteIdentity, type ReportFormat, type ReportOptions, ReviewCache, type ReviewClient, type ReviewFacts, type ReviewSourceInput, type ReviewSourceResult, type Run, type RunConfig, type RunConfigOptions, type RunSummary, SCHEMA_CACHE_DIR, SCHEMA_CACHE_VERSION, type SarifOptions, SchemaCache, type SchemaCacheConfig, type SchemaCacheEntry, type SchemaEntry, type SchemaPin, type SchemaRefEntry, type SchemaTrustConfig, type SkipReason, type SourceLocation, type SourceStatus$1 as SourceStatus, type SpawnOptions, type ValidateOptions, type ValidateRun, type ValidationResult, Validator, type VendorOptions, type VendorResult, applyFrontmatter, argvFor, assertSourcesAvailable, cachedClient, index$
|
|
7529
|
+
export { type ApplyOptions, type Approval, type BaselineSummary, BinMissing, type BuiltinDerivableField, COMMON_FORMATS, type CheckConfig, type CollectionConfig, type CommandSourceOptions, type CommandSourceResult, type CommonFormat, type ConfigNotice, DEFAULT_SCHEMAS, DEFAULT_TTL_HOURS, DEFAULT_VENDOR_DIR, DERIVABLE_FIELDS, DERIVED_KEYWORD, DERIVED_STALE_SCHEMA, DERIVE_FORMATS, DERIVE_SOURCES, type DerivableField, type DeriveCommand, type DeriveCommandConfig, type DeriveConfig, type DeriveContext, type DeriveFileResult, type DeriveInput, type DeriveOptions, type DeriveReportFormat, type DeriveReportOptions, type DeriveResult, type DeriveRun, type DeriveSource, type DeriveSummary, type DerivedField, type DerivedRecord, type DerivedStatus, type DerivedValue, type DocmetaConfig, DocmetaError, type DocumentRefTrust, EXTERNAL_DUPLICATE_SCHEMA, EXTERNAL_KEYWORD, EXTERNAL_METADATA_FETCH_MAX_BYTES, EXTERNAL_METADATA_FETCH_TIMEOUT_MS, EXTERNAL_OWNED_SCHEMA, type ExternalMetadataCollision, type ExternalMetadataConfig, type ExternalMetadataEntry, type ExternalMetadataFetchOptions, type ExternalMetadataIndex, type ExternalMetadataJoin, type ExternalMetadataValue, type ExtractOptions, type ExtractedMetadata, FIELD_SOURCES, FILL_FORMATS, type FetchedSchema, type FieldError, type FieldLocation, type FillConfig, type FillFileResult, type FillOptions, type FillReportFormat, type FillReportOptions, type FillRun, type FillSummary, type FilledField, type FingerprintContext, type FrontmatterFlavor, type FrontmatterLocation, type GetFileResult, type GetOptions, type GetReportOptions, GitHubClient, GitLabClient, INTEGRITY_SHAPE, type JunitOptions, LOCATION_KEYWORD, type LoadExternalMetadataOptions, type LoadSchemaOptions, type LoadedConfig, type LocationPreference, MERGE_SAFE_FIELDS, type MergedChange, type MergedMetadata, type MetadataExtractor, type MetadataPatch, PATH_JOIN, PATH_PLACEHOLDER, QUERY_FORMATS, type QueryChange, type QueryFormat, type QueryOptions, type QueryReportOptions, type QueryRun, REPORT_FORMATS, RESOLVED_VIEW, REVIEW_CACHE_DIR, REVIEW_CACHE_VERSION, type ReadOptions, type ReencryptMetadataResult, type ReencryptedValue, type RegisteredSchema, type RegisteredSchemas, type RelocateOptions, type RelocateResult, type RemoteIdentity, type ReportFormat$1 as ReportFormat, type ReportOptions$1 as ReportOptions, ReviewCache, type ReviewClient, type ReviewFacts, type ReviewSourceInput, type ReviewSourceResult, type Run, type RunConfig, type RunConfigOptions, type RunSummary, SCHEMA_CACHE_DIR, SCHEMA_CACHE_VERSION, type SarifOptions$1 as SarifOptions, SchemaCache, type SchemaCacheConfig, type SchemaCacheEntry, type SchemaEntry, type SchemaPin, type SchemaRefEntry, type SchemaTrustConfig, type SkipReason$1 as SkipReason, type SourceLocation, type SourceStatus$1 as SourceStatus, type SpawnOptions, type ValidateOptions$1 as ValidateOptions, type ValidateRun, type ValidationResult, Validator, type VendorOptions, type VendorResult, applyFrontmatter, argvFor, assertSourcesAvailable, cachedClient, index$2 as cite, classifyRef$1 as classifyRef, collectSchemaPins, compareDerived, consultedSources, createResolvedView, createReviewClient, deriveFromCommands, deriveFromReviews, deriveMetadata, externalMetadataJoin, externalMetadataPointer, externalMetadataUrlProblem, extractFrontmatter, extractorForExtension, fetchExternalMetadata, fetchSchemaBytes, frontmatterInnerText, getSchemasInfo, identityFromOrigin, integrityOf, isBuiltinField, isCommonFormat, isDeriveFormat, isDeriveSource, isErrorSeverity, isFillFormat, isIntegrity, isMember, isPerFile, isQueryFormat, isReportFormat, index as key, index$1 as lint, listBuiltins$1 as listBuiltins, loadConfig$1 as loadConfig, loadExternalMetadata, loadSchema, locateFrontmatter, memberOf, mentionsResolved, mergeExternalMetadata, orphanEntries, orphanError, orphanJoins, parseCollections, parseConfig$1 as parseConfig, parseOriginUrl, rebaseConfigSchemaRefs, reencryptMetadata, render$1 as render, renderDerive, renderFill, renderFillGithub, renderGet, renderJunit$1 as renderJunit, renderQuery, renderQueryCsv, renderSarif$1 as renderSarif, resolveRunConfig, resolveSchemaSet, resolvedColumns, run, runDerive, runFill, runGet, runQuery, runRelocate, runValidate, runVendorSchema, schemaCacheDir, schemaEntryRef, schemaLoadOptions, selectCollections, sourcesFor, staleFindings, stringifyValue, supportedExtensions$1 as supportedExtensions, valueOf, vendorFileName, writeFileAtomic };
|