@hawkeyexl/manni 0.2.0 → 0.3.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/{chunk-2OALUJV2.js → chunk-7M2YOXVG.js} +1224 -537
- package/dist/chunk-7M2YOXVG.js.map +1 -0
- package/dist/{chunk-OXH2ZM7E.js → chunk-BKJOQHWN.js} +2 -2
- package/dist/cli.js +2 -2
- package/dist/docmeta.js +2 -2
- package/dist/index.d.ts +228 -2
- package/dist/index.js +31 -1
- package/package.json +1 -1
- package/dist/chunk-2OALUJV2.js.map +0 -1
- /package/dist/{chunk-OXH2ZM7E.js.map → chunk-BKJOQHWN.js.map} +0 -0
|
@@ -39,7 +39,7 @@ import {
|
|
|
39
39
|
shouldColor,
|
|
40
40
|
supportedExtensions,
|
|
41
41
|
toJsonText
|
|
42
|
-
} from "./chunk-
|
|
42
|
+
} from "./chunk-7M2YOXVG.js";
|
|
43
43
|
|
|
44
44
|
// src/shared/run.ts
|
|
45
45
|
import { realpathSync } from "node:fs";
|
|
@@ -1047,4 +1047,4 @@ export {
|
|
|
1047
1047
|
runIfMain,
|
|
1048
1048
|
buildProgram
|
|
1049
1049
|
};
|
|
1050
|
-
//# sourceMappingURL=chunk-
|
|
1050
|
+
//# sourceMappingURL=chunk-BKJOQHWN.js.map
|
package/dist/cli.js
CHANGED
|
@@ -3,7 +3,7 @@ import {
|
|
|
3
3
|
buildProgram,
|
|
4
4
|
fail,
|
|
5
5
|
runIfMain
|
|
6
|
-
} from "./chunk-
|
|
6
|
+
} from "./chunk-BKJOQHWN.js";
|
|
7
7
|
import {
|
|
8
8
|
ToolError,
|
|
9
9
|
escapeWorkflowCommandMessage,
|
|
@@ -14,7 +14,7 @@ import {
|
|
|
14
14
|
programName,
|
|
15
15
|
readConfigFile,
|
|
16
16
|
shouldColor
|
|
17
|
-
} from "./chunk-
|
|
17
|
+
} from "./chunk-7M2YOXVG.js";
|
|
18
18
|
|
|
19
19
|
// src/cli.ts
|
|
20
20
|
import { Command as Command2 } from "commander";
|
package/dist/docmeta.js
CHANGED
package/dist/index.d.ts
CHANGED
|
@@ -174,6 +174,16 @@ interface FieldError {
|
|
|
174
174
|
line?: number;
|
|
175
175
|
/** 1-based column, when known. */
|
|
176
176
|
col?: number;
|
|
177
|
+
/**
|
|
178
|
+
* The file `line` and `col` refer to, when it is not the result's own file.
|
|
179
|
+
*
|
|
180
|
+
* Set only for a value a sidecar manifest supplied (proposal 0037), spelled
|
|
181
|
+
* the way the run spells file labels. Absent means the document itself,
|
|
182
|
+
* which is every violation that existed before sidecars. The finding's
|
|
183
|
+
* subject file stays `ValidationResult.file`: that is its baseline identity
|
|
184
|
+
* and its SARIF location, and this names where the *value* was written.
|
|
185
|
+
*/
|
|
186
|
+
file?: string;
|
|
177
187
|
}
|
|
178
188
|
/** Validation outcome for a single file. */
|
|
179
189
|
interface ValidationResult {
|
|
@@ -347,6 +357,40 @@ interface CheckConfig {
|
|
|
347
357
|
/** One SQL statement whose rows follow the finding column convention. */
|
|
348
358
|
query: string;
|
|
349
359
|
}
|
|
360
|
+
/**
|
|
361
|
+
* One sidecar manifest (proposal 0037): a YAML file that supplies a fixed set
|
|
362
|
+
* of top-level keys for named documents, merged into each document's metadata
|
|
363
|
+
* before schema resolution. The private half of a public docset.
|
|
364
|
+
*/
|
|
365
|
+
interface SidecarConfig {
|
|
366
|
+
/**
|
|
367
|
+
* Manifest path, relative to the config file's directory, or an `https://`
|
|
368
|
+
* URL (proposal 0038) fetched at the start of every run. A URL serves a
|
|
369
|
+
* manifest in another public repository as readily as a private one; only
|
|
370
|
+
* the private one needs `tokenEnv`.
|
|
371
|
+
*/
|
|
372
|
+
file: string;
|
|
373
|
+
/**
|
|
374
|
+
* The top-level keys this manifest owns. Ownership is disjoint across
|
|
375
|
+
* entries, so two manifests can never disagree about one key, and a
|
|
376
|
+
* document carrying an owned key is a finding rather than a tiebreak.
|
|
377
|
+
*/
|
|
378
|
+
keys: string[];
|
|
379
|
+
/**
|
|
380
|
+
* Name of an environment variable whose value is sent as a bearer token
|
|
381
|
+
* when `file` is a URL. The token never appears in the config, a message,
|
|
382
|
+
* or a report. Refused on a path `file`, where it would do nothing.
|
|
383
|
+
*/
|
|
384
|
+
tokenEnv?: string;
|
|
385
|
+
/**
|
|
386
|
+
* `path` (the default), or the top-level frontmatter field whose value the
|
|
387
|
+
* manifest's keys name (proposal 0039). A field join survives a rename;
|
|
388
|
+
* what it cannot survive is two documents sharing one value, which is a
|
|
389
|
+
* finding on both. Never `$schema`, and never a key this entry owns: the
|
|
390
|
+
* value that selects an entry cannot come from the entry.
|
|
391
|
+
*/
|
|
392
|
+
join?: string;
|
|
393
|
+
}
|
|
350
394
|
/** Defaults for the `fill` command; every key is overridable by a CLI flag. */
|
|
351
395
|
interface FillConfig {
|
|
352
396
|
provider?: string;
|
|
@@ -381,6 +425,11 @@ interface DocmetaConfig {
|
|
|
381
425
|
* run's file set is the config-resolved corpus. See `CheckConfig`.
|
|
382
426
|
*/
|
|
383
427
|
checks?: CheckConfig[];
|
|
428
|
+
/**
|
|
429
|
+
* Sidecar manifests whose keys are merged into the documents they name.
|
|
430
|
+
* See `SidecarConfig`.
|
|
431
|
+
*/
|
|
432
|
+
sidecars?: SidecarConfig[];
|
|
384
433
|
/**
|
|
385
434
|
* Element paths to lift in addition to each format's convention. See
|
|
386
435
|
* `parseElementPath` for the syntax.
|
|
@@ -1125,6 +1174,153 @@ interface FillOptions {
|
|
|
1125
1174
|
|
|
1126
1175
|
declare function runFill(opts: FillOptions): Promise<FillRun>;
|
|
1127
1176
|
|
|
1177
|
+
/**
|
|
1178
|
+
* The `schema` ref a collision finding carries, and so its baseline and rule
|
|
1179
|
+
* identity: `sidecar:owned/sidecar`. Shaped like `check:<name>` so
|
|
1180
|
+
* `classifyRef` passes it through as a built-in id rather than resolving it
|
|
1181
|
+
* as a cwd-relative file path, and reserved in the registry for the same
|
|
1182
|
+
* reason `check` is.
|
|
1183
|
+
*/
|
|
1184
|
+
declare const SIDECAR_OWNED_SCHEMA = "sidecar:owned";
|
|
1185
|
+
/**
|
|
1186
|
+
* The `schema` ref of a duplicate-join finding (0039): two documents carry
|
|
1187
|
+
* the same value of a join field, so one manifest entry matched both.
|
|
1188
|
+
*/
|
|
1189
|
+
declare const SIDECAR_DUPLICATE_SCHEMA = "sidecar:duplicate";
|
|
1190
|
+
/** The `keyword` every sidecar finding carries: no Ajv keyword produced it. */
|
|
1191
|
+
declare const SIDECAR_KEYWORD = "sidecar";
|
|
1192
|
+
/** The join that names documents by path, and the default. */
|
|
1193
|
+
declare const PATH_JOIN = "path";
|
|
1194
|
+
/** One value a sidecar supplied, and where it was written. */
|
|
1195
|
+
interface SidecarValue {
|
|
1196
|
+
value: unknown;
|
|
1197
|
+
/** Manifest path as the run reports it: relative to the run's base, posix — or the URL. */
|
|
1198
|
+
file: string;
|
|
1199
|
+
/** 1-based line of the key in the manifest, when known. */
|
|
1200
|
+
line?: number;
|
|
1201
|
+
}
|
|
1202
|
+
/** One manifest entry, for the orphan checks. */
|
|
1203
|
+
interface SidecarEntry {
|
|
1204
|
+
/** `path`, or the frontmatter field this entry is keyed by. */
|
|
1205
|
+
join: string;
|
|
1206
|
+
/** Absolute document path, for a path entry. */
|
|
1207
|
+
abs?: string;
|
|
1208
|
+
/** The key exactly as written in the manifest. */
|
|
1209
|
+
spelled: string;
|
|
1210
|
+
/** Manifest path as the run reports it. */
|
|
1211
|
+
file: string;
|
|
1212
|
+
/** 1-based line of the entry in the manifest, when known. */
|
|
1213
|
+
line?: number;
|
|
1214
|
+
}
|
|
1215
|
+
/** Every sidecar of a run, loaded once and consulted per document. */
|
|
1216
|
+
interface SidecarIndex {
|
|
1217
|
+
/** Owned key -> manifest path as reported. */
|
|
1218
|
+
owners: ReadonlyMap<string, string>;
|
|
1219
|
+
/** Path-joined sidecars: absolute document path -> owned key -> value. */
|
|
1220
|
+
byPath: ReadonlyMap<string, ReadonlyMap<string, SidecarValue>>;
|
|
1221
|
+
/** Field-joined sidecars: field -> value -> owned key -> value. */
|
|
1222
|
+
byField: ReadonlyMap<string, ReadonlyMap<string, ReadonlyMap<string, SidecarValue>>>;
|
|
1223
|
+
/** Every manifest entry, in manifest order. */
|
|
1224
|
+
entries: readonly SidecarEntry[];
|
|
1225
|
+
}
|
|
1226
|
+
interface LoadSidecarsOptions {
|
|
1227
|
+
/** Directory `sidecars[].file` and every manifest key resolve from. */
|
|
1228
|
+
configDir: string;
|
|
1229
|
+
/** Directory the run's file labels are relative to; manifests are reported the same way. */
|
|
1230
|
+
base: string;
|
|
1231
|
+
/** `--offline` / `offline:`: a URL manifest is refused rather than fetched (0038). */
|
|
1232
|
+
offline?: boolean;
|
|
1233
|
+
/** Network timeout for a URL manifest; the schema fetch's default otherwise. */
|
|
1234
|
+
timeoutMs?: number;
|
|
1235
|
+
/** For tests: the environment `tokenEnv` is read from. */
|
|
1236
|
+
env?: Record<string, string | undefined>;
|
|
1237
|
+
}
|
|
1238
|
+
/** A place a merged value lives, for a finding that must name it. */
|
|
1239
|
+
interface SourceLocation {
|
|
1240
|
+
file: string;
|
|
1241
|
+
line?: number;
|
|
1242
|
+
col?: number;
|
|
1243
|
+
}
|
|
1244
|
+
/** A key the document carries that a sidecar owns. */
|
|
1245
|
+
interface SidecarCollision {
|
|
1246
|
+
key: string;
|
|
1247
|
+
/** The owning manifest, as the run reports it. */
|
|
1248
|
+
file: string;
|
|
1249
|
+
}
|
|
1250
|
+
/** A field-joined entry a document matched (0039). */
|
|
1251
|
+
interface SidecarJoin {
|
|
1252
|
+
field: string;
|
|
1253
|
+
value: string;
|
|
1254
|
+
/** The manifest, as the run reports it. */
|
|
1255
|
+
file: string;
|
|
1256
|
+
}
|
|
1257
|
+
/** What `mergeSidecars` hands back. */
|
|
1258
|
+
interface MergedMetadata {
|
|
1259
|
+
/** The document's metadata with every owned key the manifest supplied. */
|
|
1260
|
+
extracted: ExtractedMetadata;
|
|
1261
|
+
/**
|
|
1262
|
+
* Owned keys the document itself also carried, in document order, each
|
|
1263
|
+
* with the manifest that owns it — so the finding names it without a
|
|
1264
|
+
* second lookup, and without a fallback for an index that is not there.
|
|
1265
|
+
*/
|
|
1266
|
+
collisions: SidecarCollision[];
|
|
1267
|
+
/** Field-joined entries this document matched, one per sidecar at most. */
|
|
1268
|
+
joins: SidecarJoin[];
|
|
1269
|
+
/**
|
|
1270
|
+
* Where a merged pointer's value lives. Answers only for a value the
|
|
1271
|
+
* manifest supplied — a bare key or its `/key` pointer, and anything
|
|
1272
|
+
* beneath it — and `undefined` for everything the document owns, which is
|
|
1273
|
+
* what `lineFor` is for.
|
|
1274
|
+
*/
|
|
1275
|
+
locate: (pointer: string) => SourceLocation | undefined;
|
|
1276
|
+
}
|
|
1277
|
+
/** The join a sidecar config asks for: `path` unless it names a field. */
|
|
1278
|
+
declare function sidecarJoin(sidecar: Pick<SidecarConfig, "join">): string;
|
|
1279
|
+
/**
|
|
1280
|
+
* Load every configured manifest. Resolves to `null` when the config declares
|
|
1281
|
+
* none, which is every setup that existed before this feature.
|
|
1282
|
+
*
|
|
1283
|
+
* Every refusal is a `DocmetaError`: the manifest is a config-supplied input,
|
|
1284
|
+
* and one that is missing or misshapen is the run's problem, not a
|
|
1285
|
+
* document's (0014).
|
|
1286
|
+
*/
|
|
1287
|
+
declare function loadSidecars(config: DocmetaConfig | null | undefined, opts: LoadSidecarsOptions): Promise<SidecarIndex | null>;
|
|
1288
|
+
/**
|
|
1289
|
+
* Merge the sidecar values for one document into its extracted metadata.
|
|
1290
|
+
*
|
|
1291
|
+
* `label` is the document as the run spells it, relative to `base`; a path
|
|
1292
|
+
* entry matches on the resolved absolute path, never on the spelling, so a
|
|
1293
|
+
* positional run from a subdirectory finds the same entry a config-corpus
|
|
1294
|
+
* run does. A field entry matches on the document's own value of the join
|
|
1295
|
+
* field, wherever the document lives. Stdin never matches a path entry:
|
|
1296
|
+
* there is no file behind it.
|
|
1297
|
+
*
|
|
1298
|
+
* `present`, `format` and the document's own positions are untouched. A
|
|
1299
|
+
* sidecar key is not in the document, so `lineFor` keeps answering
|
|
1300
|
+
* `undefined` for it, and `locate` answers instead.
|
|
1301
|
+
*/
|
|
1302
|
+
declare function mergeSidecars(label: string, extracted: ExtractedMetadata, index: SidecarIndex | null, base: string): MergedMetadata;
|
|
1303
|
+
/** The `/key` pointer for a sidecar finding, RFC 6901 escaped. */
|
|
1304
|
+
declare function sidecarPointer(key: string): string;
|
|
1305
|
+
/**
|
|
1306
|
+
* Path entries naming no loaded document.
|
|
1307
|
+
*
|
|
1308
|
+
* `loaded` are the run's file labels, relative to `base`. Checked only when
|
|
1309
|
+
* the run is the config corpus (the same invariant corpus checks use): a
|
|
1310
|
+
* positional path means the operator chose to look at part of the corpus,
|
|
1311
|
+
* and an entry for the rest is expected, not orphaned.
|
|
1312
|
+
*/
|
|
1313
|
+
declare function orphanEntries(index: SidecarIndex | null, loaded: readonly string[], base: string): SidecarEntry[];
|
|
1314
|
+
/**
|
|
1315
|
+
* Field entries no loaded document matched (0039). `matched` is field -> the
|
|
1316
|
+
* values documents in the run carried, which the caller collects from each
|
|
1317
|
+
* document's `joins` — so this runs after the per-file loop, under the same
|
|
1318
|
+
* corpus invariant as `orphanEntries`.
|
|
1319
|
+
*/
|
|
1320
|
+
declare function orphanJoins(index: SidecarIndex | null, matched: ReadonlyMap<string, ReadonlySet<string>>): SidecarEntry[];
|
|
1321
|
+
/** The operational error an orphan check raises, naming the first entry. */
|
|
1322
|
+
declare function orphanError(orphans: readonly SidecarEntry[]): DocmetaError;
|
|
1323
|
+
|
|
1128
1324
|
declare class Validator {
|
|
1129
1325
|
private readonly schemaOptions;
|
|
1130
1326
|
/**
|
|
@@ -1170,7 +1366,13 @@ declare class Validator {
|
|
|
1170
1366
|
* Callers with an extractor that supplies no column pass nothing and get the
|
|
1171
1367
|
* previous behavior exactly.
|
|
1172
1368
|
*/
|
|
1173
|
-
validate(data: Record<string, unknown>, refs: string[], lineFor: (pointer: string) => number | undefined, colFor?: (pointer: string) => number | undefined
|
|
1369
|
+
validate(data: Record<string, unknown>, refs: string[], lineFor: (pointer: string) => number | undefined, colFor?: (pointer: string) => number | undefined,
|
|
1370
|
+
/**
|
|
1371
|
+
* Where a merged value lives when it is not in the document (proposal
|
|
1372
|
+
* 0037): a sidecar manifest's file and line. Consulted before `lineFor`,
|
|
1373
|
+
* and additive in the way `colFor` was.
|
|
1374
|
+
*/
|
|
1375
|
+
locate?: (pointer: string) => SourceLocation | undefined): Promise<FieldError[]>;
|
|
1174
1376
|
}
|
|
1175
1377
|
|
|
1176
1378
|
/**
|
|
@@ -1273,6 +1475,30 @@ declare function integrityOf(bytes: Uint8Array): string;
|
|
|
1273
1475
|
/** Whether `value` is a pin this version can verify. */
|
|
1274
1476
|
declare function isIntegrity(value: string): boolean;
|
|
1275
1477
|
|
|
1478
|
+
/** Default network timeout, matching the schema fetch. */
|
|
1479
|
+
declare const SIDECAR_FETCH_TIMEOUT_MS = 10000;
|
|
1480
|
+
/** Body cap, matching the schema fetch. */
|
|
1481
|
+
declare const SIDECAR_FETCH_MAX_BYTES: number;
|
|
1482
|
+
interface SidecarFetchOptions {
|
|
1483
|
+
/** Environment variable holding a bearer token. Absent means an anonymous request. */
|
|
1484
|
+
tokenEnv?: string;
|
|
1485
|
+
timeoutMs?: number;
|
|
1486
|
+
maxBytes?: number;
|
|
1487
|
+
/** `--offline` / `offline:`: refuse rather than fetch. */
|
|
1488
|
+
offline?: boolean;
|
|
1489
|
+
/** For tests: the environment to read `tokenEnv` from. Defaults to `process.env`. */
|
|
1490
|
+
env?: Record<string, string | undefined>;
|
|
1491
|
+
}
|
|
1492
|
+
/**
|
|
1493
|
+
* Whether a URL may name a sidecar manifest: `https://` anywhere, or `http://`
|
|
1494
|
+
* on a loopback host only, where plaintext leaks nothing. Userinfo is refused
|
|
1495
|
+
* because the URL is printed in every diagnostic and a secret in it would
|
|
1496
|
+
* print too. Returns the reason it may not, or `null`.
|
|
1497
|
+
*/
|
|
1498
|
+
declare function sidecarUrlProblem(url: string): string | null;
|
|
1499
|
+
/** Fetch one remote manifest. Resolves to its text; throws `DocmetaError`. */
|
|
1500
|
+
declare function fetchSidecar(url: string, opts?: SidecarFetchOptions): Promise<string>;
|
|
1501
|
+
|
|
1276
1502
|
/**
|
|
1277
1503
|
* Where the cache lives, relative to the project root.
|
|
1278
1504
|
*
|
|
@@ -1620,4 +1846,4 @@ declare function extractorForExtension(ext: string): MetadataExtractor | undefin
|
|
|
1620
1846
|
/** Extensions handled by implemented extractors (used for directory walks). */
|
|
1621
1847
|
declare function supportedExtensions(): string[];
|
|
1622
1848
|
|
|
1623
|
-
export { type ApplyOptions, type BaselineSummary, COMMON_FORMATS, type CheckConfig, type CommonFormat, type ConfigNotice, DEFAULT_SCHEMAS, DEFAULT_TTL_HOURS, DEFAULT_VENDOR_DIR, type DocmetaConfig, DocmetaError, type DocumentRefTrust, type ExtractOptions, type ExtractedMetadata, FILL_FORMATS, type FetchedSchema, type FieldError, 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, INTEGRITY_SHAPE, type JunitOptions, type LoadSchemaOptions, type LoadedConfig, type MetadataExtractor, type MetadataPatch, QUERY_FORMATS, type QueryChange, type QueryFormat, type QueryOptions, type QueryReportOptions, type QueryRun, REPORT_FORMATS, type ReadOptions, type ReportFormat, type ReportOptions, 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 ValidateOptions, type ValidateRun, type ValidationResult, Validator, type VendorOptions, type VendorResult, applyFrontmatter, classifyRef, collectSchemaPins, extractFrontmatter, extractorForExtension, fetchSchemaBytes, frontmatterInnerText, getSchemasInfo, integrityOf, isCommonFormat, isFillFormat, isIntegrity, isQueryFormat, isReportFormat, listBuiltins, loadConfig, loadSchema, locateFrontmatter, parseConfig, rebaseConfigSchemaRefs, render, renderFill, renderFillGithub, renderGet, renderJunit, renderQuery, renderQueryCsv, renderSarif, resolveRunConfig, resolveSchemaSet, runFill, runGet, runQuery, runValidate, runVendorSchema, schemaCacheDir, schemaEntryRef, schemaLoadOptions, stringifyValue, supportedExtensions, vendorFileName, writeFileAtomic };
|
|
1849
|
+
export { type ApplyOptions, type BaselineSummary, COMMON_FORMATS, type CheckConfig, type CommonFormat, type ConfigNotice, DEFAULT_SCHEMAS, DEFAULT_TTL_HOURS, DEFAULT_VENDOR_DIR, type DocmetaConfig, DocmetaError, type DocumentRefTrust, type ExtractOptions, type ExtractedMetadata, FILL_FORMATS, type FetchedSchema, type FieldError, 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, INTEGRITY_SHAPE, type JunitOptions, type LoadSchemaOptions, type LoadSidecarsOptions, type LoadedConfig, type MergedMetadata, type MetadataExtractor, type MetadataPatch, PATH_JOIN, QUERY_FORMATS, type QueryChange, type QueryFormat, type QueryOptions, type QueryReportOptions, type QueryRun, REPORT_FORMATS, type ReadOptions, type ReportFormat, type ReportOptions, type RunConfig, type RunConfigOptions, type RunSummary, SCHEMA_CACHE_DIR, SCHEMA_CACHE_VERSION, SIDECAR_DUPLICATE_SCHEMA, SIDECAR_FETCH_MAX_BYTES, SIDECAR_FETCH_TIMEOUT_MS, SIDECAR_KEYWORD, SIDECAR_OWNED_SCHEMA, type SarifOptions, SchemaCache, type SchemaCacheConfig, type SchemaCacheEntry, type SchemaEntry, type SchemaPin, type SchemaRefEntry, type SchemaTrustConfig, type SidecarCollision, type SidecarConfig, type SidecarEntry, type SidecarFetchOptions, type SidecarIndex, type SidecarJoin, type SidecarValue, type SkipReason, type SourceLocation, type ValidateOptions, type ValidateRun, type ValidationResult, Validator, type VendorOptions, type VendorResult, applyFrontmatter, classifyRef, collectSchemaPins, extractFrontmatter, extractorForExtension, fetchSchemaBytes, fetchSidecar, frontmatterInnerText, getSchemasInfo, integrityOf, isCommonFormat, isFillFormat, isIntegrity, isQueryFormat, isReportFormat, listBuiltins, loadConfig, loadSchema, loadSidecars, locateFrontmatter, mergeSidecars, orphanEntries, orphanError, orphanJoins, parseConfig, rebaseConfigSchemaRefs, render, renderFill, renderFillGithub, renderGet, renderJunit, renderQuery, renderQueryCsv, renderSarif, resolveRunConfig, resolveSchemaSet, runFill, runGet, runQuery, runValidate, runVendorSchema, schemaCacheDir, schemaEntryRef, schemaLoadOptions, sidecarJoin, sidecarPointer, sidecarUrlProblem, stringifyValue, supportedExtensions, vendorFileName, writeFileAtomic };
|
package/dist/index.js
CHANGED
|
@@ -7,10 +7,16 @@ import {
|
|
|
7
7
|
DocmetaError,
|
|
8
8
|
FILL_FORMATS,
|
|
9
9
|
INTEGRITY_SHAPE,
|
|
10
|
+
PATH_JOIN,
|
|
10
11
|
QUERY_FORMATS,
|
|
11
12
|
REPORT_FORMATS,
|
|
12
13
|
SCHEMA_CACHE_DIR,
|
|
13
14
|
SCHEMA_CACHE_VERSION,
|
|
15
|
+
SIDECAR_DUPLICATE_SCHEMA,
|
|
16
|
+
SIDECAR_FETCH_MAX_BYTES,
|
|
17
|
+
SIDECAR_FETCH_TIMEOUT_MS,
|
|
18
|
+
SIDECAR_KEYWORD,
|
|
19
|
+
SIDECAR_OWNED_SCHEMA,
|
|
14
20
|
SchemaCache,
|
|
15
21
|
Validator,
|
|
16
22
|
applyFrontmatter,
|
|
@@ -19,6 +25,7 @@ import {
|
|
|
19
25
|
extractFrontmatter,
|
|
20
26
|
extractorForExtension,
|
|
21
27
|
fetchSchemaBytes,
|
|
28
|
+
fetchSidecar,
|
|
22
29
|
frontmatterInnerText,
|
|
23
30
|
getSchemasInfo,
|
|
24
31
|
integrityOf,
|
|
@@ -30,7 +37,12 @@ import {
|
|
|
30
37
|
listBuiltins,
|
|
31
38
|
loadConfig,
|
|
32
39
|
loadSchema,
|
|
40
|
+
loadSidecars,
|
|
33
41
|
locateFrontmatter,
|
|
42
|
+
mergeSidecars,
|
|
43
|
+
orphanEntries,
|
|
44
|
+
orphanError,
|
|
45
|
+
orphanJoins,
|
|
34
46
|
parseConfig,
|
|
35
47
|
rebaseConfigSchemaRefs,
|
|
36
48
|
render,
|
|
@@ -51,11 +63,14 @@ import {
|
|
|
51
63
|
schemaCacheDir,
|
|
52
64
|
schemaEntryRef,
|
|
53
65
|
schemaLoadOptions,
|
|
66
|
+
sidecarJoin,
|
|
67
|
+
sidecarPointer,
|
|
68
|
+
sidecarUrlProblem,
|
|
54
69
|
stringifyValue,
|
|
55
70
|
supportedExtensions,
|
|
56
71
|
vendorFileName,
|
|
57
72
|
writeFileAtomic
|
|
58
|
-
} from "./chunk-
|
|
73
|
+
} from "./chunk-7M2YOXVG.js";
|
|
59
74
|
export {
|
|
60
75
|
COMMON_FORMATS,
|
|
61
76
|
DEFAULT_SCHEMAS,
|
|
@@ -64,10 +79,16 @@ export {
|
|
|
64
79
|
DocmetaError,
|
|
65
80
|
FILL_FORMATS,
|
|
66
81
|
INTEGRITY_SHAPE,
|
|
82
|
+
PATH_JOIN,
|
|
67
83
|
QUERY_FORMATS,
|
|
68
84
|
REPORT_FORMATS,
|
|
69
85
|
SCHEMA_CACHE_DIR,
|
|
70
86
|
SCHEMA_CACHE_VERSION,
|
|
87
|
+
SIDECAR_DUPLICATE_SCHEMA,
|
|
88
|
+
SIDECAR_FETCH_MAX_BYTES,
|
|
89
|
+
SIDECAR_FETCH_TIMEOUT_MS,
|
|
90
|
+
SIDECAR_KEYWORD,
|
|
91
|
+
SIDECAR_OWNED_SCHEMA,
|
|
71
92
|
SchemaCache,
|
|
72
93
|
Validator,
|
|
73
94
|
applyFrontmatter,
|
|
@@ -76,6 +97,7 @@ export {
|
|
|
76
97
|
extractFrontmatter,
|
|
77
98
|
extractorForExtension,
|
|
78
99
|
fetchSchemaBytes,
|
|
100
|
+
fetchSidecar,
|
|
79
101
|
frontmatterInnerText,
|
|
80
102
|
getSchemasInfo,
|
|
81
103
|
integrityOf,
|
|
@@ -87,7 +109,12 @@ export {
|
|
|
87
109
|
listBuiltins,
|
|
88
110
|
loadConfig,
|
|
89
111
|
loadSchema,
|
|
112
|
+
loadSidecars,
|
|
90
113
|
locateFrontmatter,
|
|
114
|
+
mergeSidecars,
|
|
115
|
+
orphanEntries,
|
|
116
|
+
orphanError,
|
|
117
|
+
orphanJoins,
|
|
91
118
|
parseConfig,
|
|
92
119
|
rebaseConfigSchemaRefs,
|
|
93
120
|
render,
|
|
@@ -108,6 +135,9 @@ export {
|
|
|
108
135
|
schemaCacheDir,
|
|
109
136
|
schemaEntryRef,
|
|
110
137
|
schemaLoadOptions,
|
|
138
|
+
sidecarJoin,
|
|
139
|
+
sidecarPointer,
|
|
140
|
+
sidecarUrlProblem,
|
|
111
141
|
stringifyValue,
|
|
112
142
|
supportedExtensions,
|
|
113
143
|
vendorFileName,
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@hawkeyexl/manni",
|
|
3
|
-
"version": "0.
|
|
3
|
+
"version": "0.3.0",
|
|
4
4
|
"description": "One command line for documentation that is meant to be checked. `manni meta` validates the presence and format of document metadata (Markdown frontmatter and more) against JSON Schema, built for CI. Formerly docmeta.",
|
|
5
5
|
"type": "module",
|
|
6
6
|
"bin": {
|