@jasonbelmonti/markdown-engine 3.0.0 → 3.1.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/CHANGELOG.md +19 -0
- package/README.md +67 -0
- package/dist/api/contracts.d.ts +2 -1
- package/dist/api/contracts.d.ts.map +1 -1
- package/dist/api/contracts.js +1 -0
- package/dist/api/contracts.js.map +1 -1
- package/dist/api/declarative-validation.d.ts +1 -1
- package/dist/api/declarative-validation.d.ts.map +1 -1
- package/dist/api/declarative-validation.js.map +1 -1
- package/dist/api/document-set-validation-types.d.ts +32 -0
- package/dist/api/document-set-validation-types.d.ts.map +1 -0
- package/dist/api/document-set-validation-types.js +2 -0
- package/dist/api/document-set-validation-types.js.map +1 -0
- package/dist/api/document-set-validation.d.ts +4 -0
- package/dist/api/document-set-validation.d.ts.map +1 -0
- package/dist/api/document-set-validation.js +60 -0
- package/dist/api/document-set-validation.js.map +1 -0
- package/dist/api/serialize.d.ts +2 -1
- package/dist/api/serialize.d.ts.map +1 -1
- package/dist/api/serialize.js.map +1 -1
- package/dist/declarative-validation/assertions/evaluator.d.ts.map +1 -1
- package/dist/declarative-validation/assertions/evaluator.js +6 -0
- package/dist/declarative-validation/assertions/evaluator.js.map +1 -1
- package/dist/declarative-validation/assertions/frontmatter-shape.d.ts +9 -0
- package/dist/declarative-validation/assertions/frontmatter-shape.d.ts.map +1 -0
- package/dist/declarative-validation/assertions/frontmatter-shape.js +105 -0
- package/dist/declarative-validation/assertions/frontmatter-shape.js.map +1 -0
- package/dist/declarative-validation/assertions/text-format.d.ts +9 -0
- package/dist/declarative-validation/assertions/text-format.d.ts.map +1 -0
- package/dist/declarative-validation/assertions/text-format.js +75 -0
- package/dist/declarative-validation/assertions/text-format.js.map +1 -0
- package/dist/declarative-validation/compiler/assertion-builders.d.ts.map +1 -1
- package/dist/declarative-validation/compiler/assertion-builders.js +38 -1
- package/dist/declarative-validation/compiler/assertion-builders.js.map +1 -1
- package/dist/declarative-validation/compiler/assertion-shapes.d.ts +3 -1
- package/dist/declarative-validation/compiler/assertion-shapes.d.ts.map +1 -1
- package/dist/declarative-validation/compiler/assertion-shapes.js +30 -0
- package/dist/declarative-validation/compiler/assertion-shapes.js.map +1 -1
- package/dist/declarative-validation/compiler/assertions.d.ts.map +1 -1
- package/dist/declarative-validation/compiler/assertions.js +2 -0
- package/dist/declarative-validation/compiler/assertions.js.map +1 -1
- package/dist/declarative-validation/compiler/compatibility.d.ts.map +1 -1
- package/dist/declarative-validation/compiler/compatibility.js +2 -0
- package/dist/declarative-validation/compiler/compatibility.js.map +1 -1
- package/dist/declarative-validation/compiler/plan.d.ts +8 -1
- package/dist/declarative-validation/compiler/plan.d.ts.map +1 -1
- package/dist/declarative-validation/profile/assertion-schema.d.ts.map +1 -1
- package/dist/declarative-validation/profile/assertion-schema.js +48 -3
- package/dist/declarative-validation/profile/assertion-schema.js.map +1 -1
- package/dist/declarative-validation/profile/frontmatter-shape-schema.d.ts +8 -0
- package/dist/declarative-validation/profile/frontmatter-shape-schema.d.ts.map +1 -0
- package/dist/declarative-validation/profile/frontmatter-shape-schema.js +178 -0
- package/dist/declarative-validation/profile/frontmatter-shape-schema.js.map +1 -0
- package/dist/declarative-validation/profile/index.d.ts +21 -0
- package/dist/declarative-validation/profile/index.d.ts.map +1 -1
- package/dist/declarative-validation/profile/text-format-contract.d.ts +4 -0
- package/dist/declarative-validation/profile/text-format-contract.d.ts.map +1 -0
- package/dist/declarative-validation/profile/text-format-contract.js +6 -0
- package/dist/declarative-validation/profile/text-format-contract.js.map +1 -0
- package/dist-bundled/markdown-engine-cli.mjs +552 -5
- package/docs/contracts/api.md +60 -0
- package/docs/contracts/declarative-validation.md +159 -20
- package/fixtures/declarative-validation/examples/okf-v0.1/fail/invalid-log-date/log.md +5 -0
- package/fixtures/declarative-validation/examples/okf-v0.1/fail/missing-concept-type/concepts/customer-metric.md +8 -0
- package/fixtures/declarative-validation/examples/okf-v0.1/fail/non-root-index-frontmatter/datasets/index.md +7 -0
- package/fixtures/declarative-validation/examples/okf-v0.1/pass/datasets/index.md +3 -0
- package/fixtures/declarative-validation/examples/okf-v0.1/pass/datasets/sales.md +16 -0
- package/fixtures/declarative-validation/examples/okf-v0.1/pass/index.md +8 -0
- package/fixtures/declarative-validation/examples/okf-v0.1/pass/log.md +9 -0
- package/fixtures/declarative-validation/examples/okf-v0.1/pass/playbooks/incident-response.md +17 -0
- package/fixtures/declarative-validation/examples/okf-v0.1/profiles/concept.yaml +14 -0
- package/fixtures/declarative-validation/examples/okf-v0.1/profiles/log.yaml +10 -0
- package/fixtures/declarative-validation/examples/okf-v0.1/profiles/non-root-index.yaml +9 -0
- package/fixtures/declarative-validation/examples/okf-v0.1/profiles/root-index.yaml +12 -0
- package/package.json +3 -2
- package/scripts/install-markdown-engine-cli.sh +113 -0
package/CHANGELOG.md
CHANGED
|
@@ -4,6 +4,25 @@
|
|
|
4
4
|
|
|
5
5
|
No unreleased changes.
|
|
6
6
|
|
|
7
|
+
## 3.1.0 - 2026-07-03
|
|
8
|
+
|
|
9
|
+
### Added
|
|
10
|
+
|
|
11
|
+
- Added `validateDocumentSet(...)` as a public API for validating multiple
|
|
12
|
+
Markdown documents with declarative validation profiles.
|
|
13
|
+
- Added Declarative Validation V2 support for `frontmatterShape` and
|
|
14
|
+
`textFormat: isoDate` across profile schema validation, compiler contracts,
|
|
15
|
+
runtime evaluation, API contracts, and fixtures.
|
|
16
|
+
- Added OKF profile examples, role-profile fixtures, document-set proof tests,
|
|
17
|
+
and release-readiness evidence for profile-backed validation workflows.
|
|
18
|
+
|
|
19
|
+
### Changed
|
|
20
|
+
|
|
21
|
+
- Expanded the GitHub Pages consumer site and docs with conditional validation,
|
|
22
|
+
OKF profile composition, repair-loop, and policy-validation guidance.
|
|
23
|
+
- Made the standalone CLI installer provider-neutral and removed its runtime
|
|
24
|
+
dependency on `npx markdown-engine`.
|
|
25
|
+
|
|
7
26
|
## 3.0.0 - 2026-06-05
|
|
8
27
|
|
|
9
28
|
### Added
|
package/README.md
CHANGED
|
@@ -43,6 +43,7 @@ The package root exports:
|
|
|
43
43
|
- `validateAnnotations(document, annotations)`
|
|
44
44
|
- `parseValidationProfile(input, options?)`
|
|
45
45
|
- `validateWithProfile(document, profile, options?)`
|
|
46
|
+
- `validateDocumentSet(entries, options?)`
|
|
46
47
|
|
|
47
48
|
Example:
|
|
48
49
|
|
|
@@ -202,6 +203,71 @@ node dist/cli/index.js validate --file fixtures/declarative-validation/examples/
|
|
|
202
203
|
The passing example exits `0`; the failing example exits `1` and prints JSON
|
|
203
204
|
diagnostics for review.
|
|
204
205
|
|
|
206
|
+
### OKF v0.1 example composition
|
|
207
|
+
|
|
208
|
+
The packaged OKF v0.1 examples show how callers can compose generic
|
|
209
|
+
declarative-validation primitives without making `markdown-engine` an OKF
|
|
210
|
+
adapter. The example profiles use `frontmatterShape` for role-specific
|
|
211
|
+
frontmatter checks, `textFormat` for `log.md` date headings, and
|
|
212
|
+
`validateDocumentSet` to aggregate caller-supplied Markdown/profile pairs.
|
|
213
|
+
|
|
214
|
+
The caller remains responsible for caller-owned path classification, bundle
|
|
215
|
+
traversal, IO, and profile selection. A caller-owned router should classify
|
|
216
|
+
non-reserved concept documents separately from reserved files:
|
|
217
|
+
|
|
218
|
+
- concept documents use `profiles/concept.yaml`, where `frontmatterShape`
|
|
219
|
+
requires a non-empty string `type`
|
|
220
|
+
- the bundle-root `index.md` uses `profiles/root-index.yaml`, which permits the
|
|
221
|
+
OKF version exception `okf_version: "0.1"`
|
|
222
|
+
- non-root `index.md` files use `profiles/non-root-index.yaml`, where
|
|
223
|
+
frontmatter is forbidden
|
|
224
|
+
- `log.md` uses `profiles/log.yaml`, where `textFormat` validates level-2 date
|
|
225
|
+
headings as real `YYYY-MM-DD` calendar dates
|
|
226
|
+
|
|
227
|
+
This package does not discover bundles, classify OKF paths, route roles for
|
|
228
|
+
callers, reject unknown concept types, check links, require optional
|
|
229
|
+
`index.md` files, or publish an OKF CLI.
|
|
230
|
+
|
|
231
|
+
### Bundled CLI install for constrained agent harnesses
|
|
232
|
+
|
|
233
|
+
The package ships a single-file bundled CLI at
|
|
234
|
+
`dist-bundled/markdown-engine-cli.mjs`. Agent harnesses that forbid random
|
|
235
|
+
runtime package execution should install this artifact once and run it through a
|
|
236
|
+
local wrapper instead of using `npx`:
|
|
237
|
+
|
|
238
|
+
```sh
|
|
239
|
+
scripts/install-markdown-engine-cli.sh
|
|
240
|
+
export PATH="${MARKDOWN_ENGINE_BIN_DIR:-$HOME/.local/bin}:$PATH"
|
|
241
|
+
```
|
|
242
|
+
|
|
243
|
+
From a project root where the package is installed as a dependency, invoke the
|
|
244
|
+
packaged installer directly:
|
|
245
|
+
|
|
246
|
+
```sh
|
|
247
|
+
node_modules/@jasonbelmonti/markdown-engine/scripts/install-markdown-engine-cli.sh
|
|
248
|
+
export PATH="${MARKDOWN_ENGINE_BIN_DIR:-$HOME/.local/bin}:$PATH"
|
|
249
|
+
```
|
|
250
|
+
|
|
251
|
+
By default, the installer places the CLI under
|
|
252
|
+
`${MARKDOWN_ENGINE_HOME:-${XDG_DATA_HOME:-$HOME/.local/share}/markdown-engine}`
|
|
253
|
+
and writes the wrapper to
|
|
254
|
+
`${MARKDOWN_ENGINE_BIN_DIR:-$HOME/.local/bin}/markdown-engine`. The installer
|
|
255
|
+
uses a local bundled artifact only when it matches the pinned artifact hash.
|
|
256
|
+
Otherwise it downloads `@jasonbelmonti/markdown-engine@3.0.0` with `npm pack
|
|
257
|
+
--ignore-scripts` and extracts only
|
|
258
|
+
`package/dist-bundled/markdown-engine-cli.mjs` from the tarball. It verifies the
|
|
259
|
+
pinned artifact hash before installing:
|
|
260
|
+
|
|
261
|
+
```text
|
|
262
|
+
f61ab59e28eb92cccf4fd8073c090102e67a9397a7f0d208661ded14b879053d
|
|
263
|
+
```
|
|
264
|
+
|
|
265
|
+
The installed wrapper is:
|
|
266
|
+
|
|
267
|
+
```sh
|
|
268
|
+
"${MARKDOWN_ENGINE_BIN_DIR:-$HOME/.local/bin}/markdown-engine" validate --file <file.md> --profile <profile.yaml> --format json
|
|
269
|
+
```
|
|
270
|
+
|
|
205
271
|
Package 3.0 keeps the 2.0 API normalization default: callers that invoke
|
|
206
272
|
`normalize(parsed)` receive the rich IR `1.0.0` document shape. Consumers that
|
|
207
273
|
still need the legacy `0.0.0` shape should consume the rich IR fields
|
|
@@ -248,6 +314,7 @@ currently check these evidence records:
|
|
|
248
314
|
- [Rich IR contract documentation gate](docs/evidence/wp-5-evd-6-rich-ir-contract.md)
|
|
249
315
|
- [Declarative validation contract review](docs/evidence/wp-5-evd-7-declarative-validation-contract-review.md)
|
|
250
316
|
- [Declarative validation boundary audit](docs/evidence/wp-5-evd-8-declarative-validation-boundary-audit.md)
|
|
317
|
+
- [OKF validation seal evidence](docs/evidence/bel-1332-okf-release-readiness.md)
|
|
251
318
|
|
|
252
319
|
Snapshot baseline updates are operational changes, not routine test-output
|
|
253
320
|
cleanup. Use the [testing and snapshot operations](docs/testing.md) guide before
|
package/dist/api/contracts.d.ts
CHANGED
|
@@ -1,6 +1,7 @@
|
|
|
1
|
-
export type MarkdownEngineApiName = "parse" | "normalize" | "validate" | "serialize" | "documentQueries" | "validateAnnotations" | "parseValidationProfile" | "validateWithProfile";
|
|
1
|
+
export type MarkdownEngineApiName = "parse" | "normalize" | "validate" | "serialize" | "documentQueries" | "validateAnnotations" | "parseValidationProfile" | "validateWithProfile" | "validateDocumentSet";
|
|
2
2
|
export * from "./annotations.js";
|
|
3
3
|
export * from "./declarative-validation.js";
|
|
4
|
+
export * from "./document-set-validation.js";
|
|
4
5
|
export * from "./diagnostics.js";
|
|
5
6
|
export * from "./document.js";
|
|
6
7
|
export * from "./document-queries.js";
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"contracts.d.ts","sourceRoot":"","sources":["../../src/api/contracts.ts"],"names":[],"mappings":"AAAA,MAAM,MAAM,qBAAqB,GAC7B,OAAO,GACP,WAAW,GACX,UAAU,GACV,WAAW,GACX,iBAAiB,GACjB,qBAAqB,GACrB,wBAAwB,GACxB,qBAAqB,CAAC;AAE1B,cAAc,kBAAkB,CAAC;AACjC,cAAc,6BAA6B,CAAC;AAC5C,cAAc,kBAAkB,CAAC;AACjC,cAAc,eAAe,CAAC;AAC9B,cAAc,uBAAuB,CAAC;AACtC,cAAc,gBAAgB,CAAC;AAC/B,cAAc,YAAY,CAAC;AAC3B,cAAc,gBAAgB,CAAC;AAC/B,cAAc,eAAe,CAAC"}
|
|
1
|
+
{"version":3,"file":"contracts.d.ts","sourceRoot":"","sources":["../../src/api/contracts.ts"],"names":[],"mappings":"AAAA,MAAM,MAAM,qBAAqB,GAC7B,OAAO,GACP,WAAW,GACX,UAAU,GACV,WAAW,GACX,iBAAiB,GACjB,qBAAqB,GACrB,wBAAwB,GACxB,qBAAqB,GACrB,qBAAqB,CAAC;AAE1B,cAAc,kBAAkB,CAAC;AACjC,cAAc,6BAA6B,CAAC;AAC5C,cAAc,8BAA8B,CAAC;AAC7C,cAAc,kBAAkB,CAAC;AACjC,cAAc,eAAe,CAAC;AAC9B,cAAc,uBAAuB,CAAC;AACtC,cAAc,gBAAgB,CAAC;AAC/B,cAAc,YAAY,CAAC;AAC3B,cAAc,gBAAgB,CAAC;AAC/B,cAAc,eAAe,CAAC"}
|
package/dist/api/contracts.js
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"contracts.js","sourceRoot":"","sources":["../../src/api/contracts.ts"],"names":[],"mappings":"
|
|
1
|
+
{"version":3,"file":"contracts.js","sourceRoot":"","sources":["../../src/api/contracts.ts"],"names":[],"mappings":"AAWA,cAAc,kBAAkB,CAAC;AACjC,cAAc,6BAA6B,CAAC;AAC5C,cAAc,8BAA8B,CAAC;AAC7C,cAAc,kBAAkB,CAAC;AACjC,cAAc,eAAe,CAAC;AAC9B,cAAc,uBAAuB,CAAC;AACtC,cAAc,gBAAgB,CAAC;AAC/B,cAAc,YAAY,CAAC;AAC3B,cAAc,gBAAgB,CAAC;AAC/B,cAAc,eAAe,CAAC"}
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
import type { EngineDocument } from "./document.js";
|
|
2
2
|
import type { DeclarativeProfileParseOptions, DeclarativeProfileParseResult, JsonSafeValue, ValidationProfile } from "../declarative-validation/profile/index.js";
|
|
3
3
|
import type { DeclarativeValidationOptions, DeclarativeValidationResult } from "../declarative-validation/results/index.js";
|
|
4
|
-
export type { DeclarativeAssertion, DeclarativeValidationApplicability, DeclarativeValidationAllOfRule, DeclarativeValidationAnyOfRule, DeclarativeValidationBranch, DeclarativeValidationFlatRule, DeclarativeValidationGroupRule, DeclarativeValidationRuleFields, DeclarativeIdSource, DeclarativeOutputFormat, DeclarativeProfileParseOptions, DeclarativeProfileParseResult, DeclarativeSectionOrder, DeclarativeSelector, DeclarativeTableCellPredicate, DeclarativeTableColumnCoverage, DeclarativeTableColumnCoverageSource, DeclarativeTableColumnCoverageTarget, DeclarativeValidationRule, DeclarativeValidationSeverity, JsonSafeValue, ValidationProfile, } from "../declarative-validation/profile/index.js";
|
|
4
|
+
export type { DeclarativeAssertion, DeclarativeValidationApplicability, DeclarativeValidationAllOfRule, DeclarativeValidationAnyOfRule, DeclarativeValidationBranch, DeclarativeValidationFlatRule, DeclarativeFrontmatterFieldShape, DeclarativeFrontmatterPresence, DeclarativeFrontmatterShape, DeclarativeFrontmatterValueType, DeclarativeValidationGroupRule, DeclarativeValidationRuleFields, DeclarativeIdSource, DeclarativeOutputFormat, DeclarativeProfileParseOptions, DeclarativeProfileParseResult, DeclarativeSectionOrder, DeclarativeSelector, DeclarativeTableCellPredicate, DeclarativeTableColumnCoverage, DeclarativeTableColumnCoverageSource, DeclarativeTableColumnCoverageTarget, DeclarativeValidationRule, DeclarativeValidationSeverity, JsonSafeValue, ValidationProfile, } from "../declarative-validation/profile/index.js";
|
|
5
5
|
export type { DeclarativeValidationEvidence } from "../declarative-validation/evidence/index.js";
|
|
6
6
|
export type { DeclarativeValidationAllOfEvaluationResult, DeclarativeValidationAnyOfEvaluationResult, DeclarativeValidationApplicabilityResult, DeclarativeValidationAssertionsEvaluationResult, DeclarativeValidationBranchReference, DeclarativeValidationBranchResult, DeclarativeValidationCliJsonResult, DeclarativeValidationConfigErrorResult, DeclarativeValidationOptions, DeclarativeValidationResultV1, DeclarativeValidationResultV2, DeclarativeValidationRuleEvaluationResult, DeclarativeValidationRuleResultV2, DeclarativeValidationRuleStatus, DeclarativeValidationSkippedEvaluationResult, DeclarativeValidationResult, } from "../declarative-validation/results/index.js";
|
|
7
7
|
export interface DeclarativeValidationApi {
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"declarative-validation.d.ts","sourceRoot":"","sources":["../../src/api/declarative-validation.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,cAAc,EAAE,MAAM,eAAe,CAAC;AAkBpD,OAAO,KAAK,EACV,8BAA8B,EAC9B,6BAA6B,EAC7B,aAAa,EACb,iBAAiB,EAClB,MAAM,4CAA4C,CAAC;AAKpD,OAAO,KAAK,EACV,4BAA4B,EAC5B,2BAA2B,EAC5B,MAAM,4CAA4C,CAAC;AAGpD,YAAY,EACV,oBAAoB,EACpB,kCAAkC,EAClC,8BAA8B,EAC9B,8BAA8B,EAC9B,2BAA2B,EAC3B,6BAA6B,EAC7B,8BAA8B,EAC9B,+BAA+B,EAC/B,mBAAmB,EACnB,uBAAuB,EACvB,8BAA8B,EAC9B,6BAA6B,EAC7B,uBAAuB,EACvB,mBAAmB,EACnB,6BAA6B,EAC7B,8BAA8B,EAC9B,oCAAoC,EACpC,oCAAoC,EACpC,yBAAyB,EACzB,6BAA6B,EAC7B,aAAa,EACb,iBAAiB,GAClB,MAAM,4CAA4C,CAAC;AACpD,YAAY,EAAE,6BAA6B,EAAE,MAAM,6CAA6C,CAAC;AACjG,YAAY,EACV,0CAA0C,EAC1C,0CAA0C,EAC1C,wCAAwC,EACxC,+CAA+C,EAC/C,oCAAoC,EACpC,iCAAiC,EACjC,kCAAkC,EAClC,sCAAsC,EACtC,4BAA4B,EAC5B,6BAA6B,EAC7B,6BAA6B,EAC7B,yCAAyC,EACzC,iCAAiC,EACjC,+BAA+B,EAC/B,4CAA4C,EAC5C,2BAA2B,GAC5B,MAAM,4CAA4C,CAAC;AAEpD,MAAM,WAAW,wBAAwB;IACvC,sBAAsB,CACpB,KAAK,EAAE,MAAM,GAAG,aAAa,EAC7B,OAAO,CAAC,EAAE,8BAA8B,GACvC,6BAA6B,CAAC;IACjC,mBAAmB,CACjB,QAAQ,EAAE,cAAc,EACxB,OAAO,EAAE,iBAAiB,EAC1B,OAAO,CAAC,EAAE,4BAA4B,GACrC,2BAA2B,CAAC;CAChC;AAED,wBAAgB,sBAAsB,CACpC,KAAK,EAAE,MAAM,GAAG,aAAa,EAC7B,OAAO,GAAE,8BAAmC,GAC3C,6BAA6B,CAE/B;AAED,wBAAgB,mBAAmB,CACjC,QAAQ,EAAE,cAAc,EACxB,OAAO,EAAE,iBAAiB,EAC1B,OAAO,GAAE,4BAAiC,GACzC,2BAA2B,CAgD7B"}
|
|
1
|
+
{"version":3,"file":"declarative-validation.d.ts","sourceRoot":"","sources":["../../src/api/declarative-validation.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,cAAc,EAAE,MAAM,eAAe,CAAC;AAkBpD,OAAO,KAAK,EACV,8BAA8B,EAC9B,6BAA6B,EAC7B,aAAa,EACb,iBAAiB,EAClB,MAAM,4CAA4C,CAAC;AAKpD,OAAO,KAAK,EACV,4BAA4B,EAC5B,2BAA2B,EAC5B,MAAM,4CAA4C,CAAC;AAGpD,YAAY,EACV,oBAAoB,EACpB,kCAAkC,EAClC,8BAA8B,EAC9B,8BAA8B,EAC9B,2BAA2B,EAC3B,6BAA6B,EAC7B,gCAAgC,EAChC,8BAA8B,EAC9B,2BAA2B,EAC3B,+BAA+B,EAC/B,8BAA8B,EAC9B,+BAA+B,EAC/B,mBAAmB,EACnB,uBAAuB,EACvB,8BAA8B,EAC9B,6BAA6B,EAC7B,uBAAuB,EACvB,mBAAmB,EACnB,6BAA6B,EAC7B,8BAA8B,EAC9B,oCAAoC,EACpC,oCAAoC,EACpC,yBAAyB,EACzB,6BAA6B,EAC7B,aAAa,EACb,iBAAiB,GAClB,MAAM,4CAA4C,CAAC;AACpD,YAAY,EAAE,6BAA6B,EAAE,MAAM,6CAA6C,CAAC;AACjG,YAAY,EACV,0CAA0C,EAC1C,0CAA0C,EAC1C,wCAAwC,EACxC,+CAA+C,EAC/C,oCAAoC,EACpC,iCAAiC,EACjC,kCAAkC,EAClC,sCAAsC,EACtC,4BAA4B,EAC5B,6BAA6B,EAC7B,6BAA6B,EAC7B,yCAAyC,EACzC,iCAAiC,EACjC,+BAA+B,EAC/B,4CAA4C,EAC5C,2BAA2B,GAC5B,MAAM,4CAA4C,CAAC;AAEpD,MAAM,WAAW,wBAAwB;IACvC,sBAAsB,CACpB,KAAK,EAAE,MAAM,GAAG,aAAa,EAC7B,OAAO,CAAC,EAAE,8BAA8B,GACvC,6BAA6B,CAAC;IACjC,mBAAmB,CACjB,QAAQ,EAAE,cAAc,EACxB,OAAO,EAAE,iBAAiB,EAC1B,OAAO,CAAC,EAAE,4BAA4B,GACrC,2BAA2B,CAAC;CAChC;AAED,wBAAgB,sBAAsB,CACpC,KAAK,EAAE,MAAM,GAAG,aAAa,EAC7B,OAAO,GAAE,8BAAmC,GAC3C,6BAA6B,CAE/B;AAED,wBAAgB,mBAAmB,CACjC,QAAQ,EAAE,cAAc,EACxB,OAAO,EAAE,iBAAiB,EAC1B,OAAO,GAAE,4BAAiC,GACzC,2BAA2B,CAgD7B"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"declarative-validation.js","sourceRoot":"","sources":["../../src/api/declarative-validation.ts"],"names":[],"mappings":"AAGA,OAAO,EAAE,4CAA4C,EAAE,MAAM,kDAAkD,CAAC;AAChH,OAAO,EACL,oCAAoC,EACpC,oCAAoC,EACpC,+BAA+B,E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
|
|
@@ -0,0 +1,32 @@
|
|
|
1
|
+
import type { DeclarativeValidationOptions, DeclarativeValidationResult, JsonSafeValue, ValidationProfile } from "./declarative-validation.js";
|
|
2
|
+
import type { MarkdownDiagnostic } from "./diagnostics.js";
|
|
3
|
+
import type { NormalizeOptions } from "./normalize.js";
|
|
4
|
+
export type ValidateDocumentSetProfileInput = string | JsonSafeValue | ValidationProfile;
|
|
5
|
+
export interface ValidateDocumentSetEntry {
|
|
6
|
+
path: string;
|
|
7
|
+
markdown: string;
|
|
8
|
+
profile: ValidateDocumentSetProfileInput;
|
|
9
|
+
profilePath?: string;
|
|
10
|
+
}
|
|
11
|
+
export interface ValidateDocumentSetOptions {
|
|
12
|
+
documentVersion?: NormalizeOptions["documentVersion"];
|
|
13
|
+
preserveSourceLocations?: NormalizeOptions["preserveSourceLocations"];
|
|
14
|
+
includeEvidence?: DeclarativeValidationOptions["includeEvidence"];
|
|
15
|
+
}
|
|
16
|
+
export interface ValidateDocumentSetEntryResult {
|
|
17
|
+
path: string;
|
|
18
|
+
profilePath?: string;
|
|
19
|
+
diagnostics: MarkdownDiagnostic[];
|
|
20
|
+
parseDiagnostics: MarkdownDiagnostic[];
|
|
21
|
+
normalizationDiagnostics: MarkdownDiagnostic[];
|
|
22
|
+
profileDiagnostics: MarkdownDiagnostic[];
|
|
23
|
+
validationDiagnostics: MarkdownDiagnostic[];
|
|
24
|
+
validationResult?: DeclarativeValidationResult;
|
|
25
|
+
}
|
|
26
|
+
export interface ValidateDocumentSetResult {
|
|
27
|
+
valid: boolean;
|
|
28
|
+
diagnostics: MarkdownDiagnostic[];
|
|
29
|
+
entries: ValidateDocumentSetEntryResult[];
|
|
30
|
+
}
|
|
31
|
+
export type ValidateDocumentSetFunction = (entries: readonly ValidateDocumentSetEntry[], options?: ValidateDocumentSetOptions) => ValidateDocumentSetResult;
|
|
32
|
+
//# sourceMappingURL=document-set-validation-types.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"document-set-validation-types.d.ts","sourceRoot":"","sources":["../../src/api/document-set-validation-types.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EACV,4BAA4B,EAC5B,2BAA2B,EAC3B,aAAa,EACb,iBAAiB,EAClB,MAAM,6BAA6B,CAAC;AACrC,OAAO,KAAK,EAAE,kBAAkB,EAAE,MAAM,kBAAkB,CAAC;AAC3D,OAAO,KAAK,EAAE,gBAAgB,EAAE,MAAM,gBAAgB,CAAC;AAEvD,MAAM,MAAM,+BAA+B,GACvC,MAAM,GACN,aAAa,GACb,iBAAiB,CAAC;AAEtB,MAAM,WAAW,wBAAwB;IACvC,IAAI,EAAE,MAAM,CAAC;IACb,QAAQ,EAAE,MAAM,CAAC;IACjB,OAAO,EAAE,+BAA+B,CAAC;IACzC,WAAW,CAAC,EAAE,MAAM,CAAC;CACtB;AAED,MAAM,WAAW,0BAA0B;IACzC,eAAe,CAAC,EAAE,gBAAgB,CAAC,iBAAiB,CAAC,CAAC;IACtD,uBAAuB,CAAC,EAAE,gBAAgB,CAAC,yBAAyB,CAAC,CAAC;IACtE,eAAe,CAAC,EAAE,4BAA4B,CAAC,iBAAiB,CAAC,CAAC;CACnE;AAED,MAAM,WAAW,8BAA8B;IAC7C,IAAI,EAAE,MAAM,CAAC;IACb,WAAW,CAAC,EAAE,MAAM,CAAC;IACrB,WAAW,EAAE,kBAAkB,EAAE,CAAC;IAClC,gBAAgB,EAAE,kBAAkB,EAAE,CAAC;IACvC,wBAAwB,EAAE,kBAAkB,EAAE,CAAC;IAC/C,kBAAkB,EAAE,kBAAkB,EAAE,CAAC;IACzC,qBAAqB,EAAE,kBAAkB,EAAE,CAAC;IAC5C,gBAAgB,CAAC,EAAE,2BAA2B,CAAC;CAChD;AAED,MAAM,WAAW,yBAAyB;IACxC,KAAK,EAAE,OAAO,CAAC;IACf,WAAW,EAAE,kBAAkB,EAAE,CAAC;IAClC,OAAO,EAAE,8BAA8B,EAAE,CAAC;CAC3C;AAED,MAAM,MAAM,2BAA2B,GAAG,CACxC,OAAO,EAAE,SAAS,wBAAwB,EAAE,EAC5C,OAAO,CAAC,EAAE,0BAA0B,KACjC,yBAAyB,CAAC"}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"document-set-validation-types.js","sourceRoot":"","sources":["../../src/api/document-set-validation-types.ts"],"names":[],"mappings":""}
|
|
@@ -0,0 +1,4 @@
|
|
|
1
|
+
import type { ValidateDocumentSetFunction } from "./document-set-validation-types.js";
|
|
2
|
+
export type { ValidateDocumentSetEntry, ValidateDocumentSetEntryResult, ValidateDocumentSetFunction, ValidateDocumentSetOptions, ValidateDocumentSetProfileInput, ValidateDocumentSetResult, } from "./document-set-validation-types.js";
|
|
3
|
+
export declare const validateDocumentSet: ValidateDocumentSetFunction;
|
|
4
|
+
//# sourceMappingURL=document-set-validation.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"document-set-validation.d.ts","sourceRoot":"","sources":["../../src/api/document-set-validation.ts"],"names":[],"mappings":"AAWA,OAAO,KAAK,EAGV,2BAA2B,EAG5B,MAAM,oCAAoC,CAAC;AAG5C,YAAY,EACV,wBAAwB,EACxB,8BAA8B,EAC9B,2BAA2B,EAC3B,0BAA0B,EAC1B,+BAA+B,EAC/B,yBAAyB,GAC1B,MAAM,oCAAoC,CAAC;AAE5C,eAAO,MAAM,mBAAmB,EAAE,2BAgBjC,CAAC"}
|
|
@@ -0,0 +1,60 @@
|
|
|
1
|
+
import { parseValidationProfile, validateWithProfile, } from "./declarative-validation.js";
|
|
2
|
+
import { normalize } from "./normalize.js";
|
|
3
|
+
import { parse } from "./parse.js";
|
|
4
|
+
import { cloneDiagnostics, hasErrorDiagnostic } from "../diagnostics/index.js";
|
|
5
|
+
export const validateDocumentSet = (entries, options = {}) => {
|
|
6
|
+
const entryResults = entries.map((entry) => validateDocumentSetEntry(entry, options));
|
|
7
|
+
const diagnostics = cloneDiagnostics(entryResults.flatMap((entry) => entry.diagnostics));
|
|
8
|
+
return {
|
|
9
|
+
valid: !hasErrorDiagnostic(diagnostics),
|
|
10
|
+
diagnostics,
|
|
11
|
+
entries: entryResults,
|
|
12
|
+
};
|
|
13
|
+
};
|
|
14
|
+
function validateDocumentSetEntry(entry, options) {
|
|
15
|
+
const parseResult = parse(entry.markdown, { path: entry.path });
|
|
16
|
+
const normalizeResult = normalize(parseResult.parsed, normalizeOptions(options));
|
|
17
|
+
const profileResult = parseValidationProfile(profileParserInput(entry.profile), {
|
|
18
|
+
...(entry.profilePath !== undefined ? { path: entry.profilePath } : {}),
|
|
19
|
+
});
|
|
20
|
+
let validationResult;
|
|
21
|
+
if (profileResult.profile !== undefined &&
|
|
22
|
+
!hasErrorDiagnostic(profileResult.diagnostics)) {
|
|
23
|
+
validationResult = validateWithProfile(normalizeResult.document, profileResult.profile, {
|
|
24
|
+
path: entry.path,
|
|
25
|
+
...(options.includeEvidence !== undefined
|
|
26
|
+
? { includeEvidence: options.includeEvidence }
|
|
27
|
+
: {}),
|
|
28
|
+
});
|
|
29
|
+
}
|
|
30
|
+
const validationDiagnostics = validationResult === undefined ? [] : validationResult.diagnostics;
|
|
31
|
+
const diagnostics = cloneDiagnostics([
|
|
32
|
+
...normalizeResult.diagnostics,
|
|
33
|
+
...profileResult.diagnostics,
|
|
34
|
+
...validationDiagnostics,
|
|
35
|
+
]);
|
|
36
|
+
return {
|
|
37
|
+
path: entry.path,
|
|
38
|
+
...(entry.profilePath !== undefined ? { profilePath: entry.profilePath } : {}),
|
|
39
|
+
diagnostics,
|
|
40
|
+
parseDiagnostics: cloneDiagnostics(parseResult.diagnostics),
|
|
41
|
+
normalizationDiagnostics: cloneDiagnostics(normalizeResult.diagnostics),
|
|
42
|
+
profileDiagnostics: cloneDiagnostics(profileResult.diagnostics),
|
|
43
|
+
validationDiagnostics: cloneDiagnostics(validationDiagnostics),
|
|
44
|
+
...(validationResult !== undefined ? { validationResult } : {}),
|
|
45
|
+
};
|
|
46
|
+
}
|
|
47
|
+
function normalizeOptions(options) {
|
|
48
|
+
return {
|
|
49
|
+
...(options.documentVersion !== undefined
|
|
50
|
+
? { documentVersion: options.documentVersion }
|
|
51
|
+
: {}),
|
|
52
|
+
...(options.preserveSourceLocations !== undefined
|
|
53
|
+
? { preserveSourceLocations: options.preserveSourceLocations }
|
|
54
|
+
: {}),
|
|
55
|
+
};
|
|
56
|
+
}
|
|
57
|
+
function profileParserInput(input) {
|
|
58
|
+
return input;
|
|
59
|
+
}
|
|
60
|
+
//# sourceMappingURL=document-set-validation.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"document-set-validation.js","sourceRoot":"","sources":["../../src/api/document-set-validation.ts"],"names":[],"mappings":"AAIA,OAAO,EACL,sBAAsB,EACtB,mBAAmB,GACpB,MAAM,6BAA6B,CAAC;AAErC,OAAO,EAAE,SAAS,EAAE,MAAM,gBAAgB,CAAC;AAC3C,OAAO,EAAE,KAAK,EAAE,MAAM,YAAY,CAAC;AAQnC,OAAO,EAAE,gBAAgB,EAAE,kBAAkB,EAAE,MAAM,yBAAyB,CAAC;AAW/E,MAAM,CAAC,MAAM,mBAAmB,GAAgC,CAC9D,OAAO,EACP,OAAO,GAAG,EAAE,EACZ,EAAE;IACF,MAAM,YAAY,GAAG,OAAO,CAAC,GAAG,CAAC,CAAC,KAAK,EAAE,EAAE,CACzC,wBAAwB,CAAC,KAAK,EAAE,OAAO,CAAC,CACzC,CAAC;IACF,MAAM,WAAW,GAAG,gBAAgB,CAClC,YAAY,CAAC,OAAO,CAAC,CAAC,KAAK,EAAE,EAAE,CAAC,KAAK,CAAC,WAAW,CAAC,CACnD,CAAC;IAEF,OAAO;QACL,KAAK,EAAE,CAAC,kBAAkB,CAAC,WAAW,CAAC;QACvC,WAAW;QACX,OAAO,EAAE,YAAY;KACtB,CAAC;AACJ,CAAC,CAAC;AAEF,SAAS,wBAAwB,CAC/B,KAA+B,EAC/B,OAAmC;IAEnC,MAAM,WAAW,GAAG,KAAK,CA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CAAC,WAAW,EAAE,CAAC,CAAC,CAAC,EAAE,CAAC;QAC9E,WAAW;QACX,gBAAgB,EAAE,gBAAgB,CAAC,WAAW,CAAC,WAAW,CAAC;QAC3D,wBAAwB,EAAE,gBAAgB,CAAC,eAAe,CAAC,WAAW,CAAC;QACvE,kBAAkB,EAAE,gBAAgB,CAAC,aAAa,CAAC,WAAW,CAAC;QAC/D,qBAAqB,EAAE,gBAAgB,CAAC,qBAAqB,CAAC;QAC9D,GAAG,CAAC,gBAAgB,KAAK,SAAS,CAAC,CAAC,CAAC,EAAE,gBAAgB,EAAE,CAAC,CAAC,CAAC,EAAE,CAAC;KAChE,CAAC;AACJ,CAAC;AAED,SAAS,gBAAgB,CAAC,OAAmC;IAC3D,OAAO;QACL,GAAG,CAAC,OAAO,CAAC,eAAe,KAAK,SAAS;YACvC,CAAC,CAAC,EAAE,eAAe,EAAE,OAAO,CAAC,eAAe,EAAE;YAC9C,CAAC,CAAC,EAAE,CAAC;QACP,GAAG,CAAC,OAAO,CAAC,uBAAuB,KAAK,SAAS;YAC/C,CAAC,CAAC,EAAE,uBAAuB,EAAE,OAAO,CAAC,uBAAuB,EAAE;YAC9D,CAAC,CAAC,EAAE,CAAC;KACR,CAAC;AACJ,CAAC;AAED,SAAS,kBAAkB,CACzB,KAAsC;IAEtC,OAAO,KAA+B,CAAC;AACzC,CAAC"}
|
package/dist/api/serialize.d.ts
CHANGED
|
@@ -1,9 +1,10 @@
|
|
|
1
1
|
import { type EngineCompatibilityMode } from "./compatibility.js";
|
|
2
|
+
import type { ValidateDocumentSetResult } from "./document-set-validation-types.js";
|
|
2
3
|
import type { SerializableEngineResult } from "./document.js";
|
|
3
4
|
import type { NormalizeResult } from "./normalize.js";
|
|
4
5
|
import type { ParseResult } from "./parse.js";
|
|
5
6
|
import type { ValidationResult } from "./validate.js";
|
|
6
|
-
export type SerializableMarkdownEngineResult = ParseResult | NormalizeResult | ValidationResult | SerializableEngineResult;
|
|
7
|
+
export type SerializableMarkdownEngineResult = ParseResult | NormalizeResult | ValidateDocumentSetResult | ValidationResult | SerializableEngineResult;
|
|
7
8
|
export { EngineCompatibilityError, type EngineCompatibilityMode, } from "./compatibility.js";
|
|
8
9
|
export interface SerializeOptions {
|
|
9
10
|
pretty?: boolean;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"serialize.d.ts","sourceRoot":"","sources":["../../src/api/serialize.ts"],"names":[],"mappings":"AAAA,OAAO,EAEL,KAAK,uBAAuB,EAC7B,MAAM,oBAAoB,CAAC;AAC5B,OAAO,KAAK,EAAE,wBAAwB,EAAE,MAAM,eAAe,CAAC;AAC9D,OAAO,KAAK,EAAE,eAAe,EAAE,MAAM,gBAAgB,CAAC;AACtD,OAAO,KAAK,EAAE,WAAW,EAAE,MAAM,YAAY,CAAC;AAC9C,OAAO,KAAK,EAAE,gBAAgB,EAAE,MAAM,eAAe,CAAC;AAGtD,MAAM,MAAM,gCAAgC,GACxC,WAAW,GACX,eAAe,GACf,gBAAgB,GAChB,wBAAwB,CAAC;AAE7B,OAAO,EACL,wBAAwB,EACxB,KAAK,uBAAuB,GAC7B,MAAM,oBAAoB,CAAC;AAE5B,MAAM,WAAW,gBAAgB;IAC/B,MAAM,CAAC,EAAE,OAAO,CAAC;IACjB,iBAAiB,CAAC,EAAE,uBAAuB,CAAC;CAC7C;AAED,MAAM,MAAM,iBAAiB,GAAG,CAC9B,MAAM,EAAE,gCAAgC,EACxC,OAAO,CAAC,EAAE,gBAAgB,KACvB,MAAM,CAAC;AAEZ,eAAO,MAAM,SAAS,EAAE,iBAYvB,CAAC"}
|
|
1
|
+
{"version":3,"file":"serialize.d.ts","sourceRoot":"","sources":["../../src/api/serialize.ts"],"names":[],"mappings":"AAAA,OAAO,EAEL,KAAK,uBAAuB,EAC7B,MAAM,oBAAoB,CAAC;AAC5B,OAAO,KAAK,EAAE,yBAAyB,EAAE,MAAM,oCAAoC,CAAC;AACpF,OAAO,KAAK,EAAE,wBAAwB,EAAE,MAAM,eAAe,CAAC;AAC9D,OAAO,KAAK,EAAE,eAAe,EAAE,MAAM,gBAAgB,CAAC;AACtD,OAAO,KAAK,EAAE,WAAW,EAAE,MAAM,YAAY,CAAC;AAC9C,OAAO,KAAK,EAAE,gBAAgB,EAAE,MAAM,eAAe,CAAC;AAGtD,MAAM,MAAM,gCAAgC,GACxC,WAAW,GACX,eAAe,GACf,yBAAyB,GACzB,gBAAgB,GAChB,wBAAwB,CAAC;AAE7B,OAAO,EACL,wBAAwB,EACxB,KAAK,uBAAuB,GAC7B,MAAM,oBAAoB,CAAC;AAE5B,MAAM,WAAW,gBAAgB;IAC/B,MAAM,CAAC,EAAE,OAAO,CAAC;IACjB,iBAAiB,CAAC,EAAE,uBAAuB,CAAC;CAC7C;AAED,MAAM,MAAM,iBAAiB,GAAG,CAC9B,MAAM,EAAE,gCAAgC,EACxC,OAAO,CAAC,EAAE,gBAAgB,KACvB,MAAM,CAAC;AAEZ,eAAO,MAAM,SAAS,EAAE,iBAYvB,CAAC"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"serialize.js","sourceRoot":"","sources":["../../src/api/serialize.ts"],"names":[],"mappings":"AAAA,OAAO,EACL,6BAA6B,GAE9B,MAAM,oBAAoB,CAAC;
|
|
1
|
+
{"version":3,"file":"serialize.js","sourceRoot":"","sources":["../../src/api/serialize.ts"],"names":[],"mappings":"AAAA,OAAO,EACL,6BAA6B,GAE9B,MAAM,oBAAoB,CAAC;AAM5B,OAAO,EAAE,wBAAwB,EAAE,MAAM,4BAA4B,CAAC;AAStE,OAAO,EACL,wBAAwB,GAEzB,MAAM,oBAAoB,CAAC;AAY5B,MAAM,CAAC,MAAM,SAAS,GAAsB,CAAC,MAAM,EAAE,OAAO,GAAG,EAAE,EAAE,EAAE;IACnE,IAAI,OAAO,CAAC,iBAAiB,KAAK,SAAS,EAAE,CAAC;QAC5C,6BAA6B,CAAC,MAAM,EAAE,OAAO,CAAC,iBAAiB,CAAC,CAAC;IACnE,CAAC;IAED,MAAM,UAAU,GAAG,IAAI,CAAC,SAAS,CAC/B,wBAAwB,CAAC,MAAM,CAAC,EAChC,IAAI,EACJ,OAAO,CAAC,MAAM,KAAK,IAAI,CAAC,CAAC,CAAC,CAAC,CAAC,CAAC,CAAC,CAAC,CAChC,CAAC;IAEF,OAAO,UAAU,IAAI,MAAM,CAAC;AAC9B,CAAC,CAAC"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"evaluator.d.ts","sourceRoot":"","sources":["../../../src/declarative-validation/assertions/evaluator.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,oBAAoB,EAAE,MAAM,uBAAuB,CAAC;AAClE,OAAO,KAAK,EAEV,2CAA2C,EAC5C,MAAM,qBAAqB,CAAC;AAC7B,OAAO,KAAK,EAAE,oBAAoB,EAAE,MAAM,uBAAuB,CAAC;
|
|
1
|
+
{"version":3,"file":"evaluator.d.ts","sourceRoot":"","sources":["../../../src/declarative-validation/assertions/evaluator.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,oBAAoB,EAAE,MAAM,uBAAuB,CAAC;AAClE,OAAO,KAAK,EAEV,2CAA2C,EAC5C,MAAM,qBAAqB,CAAC;AAC7B,OAAO,KAAK,EAAE,oBAAoB,EAAE,MAAM,uBAAuB,CAAC;AAiBlE,wBAAgB,+BAA+B,CAC7C,IAAI,EAAE,2CAA2C,EACjD,SAAS,EAAE,oBAAoB,GAC9B,oBAAoB,CAgBtB"}
|
|
@@ -1,4 +1,5 @@
|
|
|
1
1
|
import { evaluateExists } from "./exists.js";
|
|
2
|
+
import { evaluateFrontmatterShape } from "./frontmatter-shape.js";
|
|
2
3
|
import { evaluateFrontmatterRequired } from "./frontmatter-required.js";
|
|
3
4
|
import { evaluateIds } from "./ids.js";
|
|
4
5
|
import { sortAssertionDiagnostics } from "./ordering.js";
|
|
@@ -7,6 +8,7 @@ import { evaluateSectionsRequired } from "./sections-required.js";
|
|
|
7
8
|
import { evaluateTableColumnCoverage } from "./table-column-coverage.js";
|
|
8
9
|
import { evaluateTableColumnsRequired } from "./table-columns-required.js";
|
|
9
10
|
import { evaluateText } from "./text.js";
|
|
11
|
+
import { evaluateTextFormat } from "./text-format.js";
|
|
10
12
|
import { evaluateTextLength } from "./text-length.js";
|
|
11
13
|
import { evaluateTextOccurrenceCount } from "./text-occurrence-count.js";
|
|
12
14
|
export function evaluateCompiledDeclarativeRule(rule, selection) {
|
|
@@ -34,6 +36,8 @@ function evaluateAssertion(assertion, context) {
|
|
|
34
36
|
return evaluateTextOccurrenceCount(assertion, context);
|
|
35
37
|
case "textLength":
|
|
36
38
|
return evaluateTextLength(assertion, context);
|
|
39
|
+
case "textFormat":
|
|
40
|
+
return evaluateTextFormat(assertion, context);
|
|
37
41
|
case "frontmatterRequired":
|
|
38
42
|
return evaluateFrontmatterRequired(assertion, context);
|
|
39
43
|
case "tableColumnsRequired":
|
|
@@ -44,6 +48,8 @@ function evaluateAssertion(assertion, context) {
|
|
|
44
48
|
return evaluateReferences(assertion, context);
|
|
45
49
|
case "tableColumnCoverage":
|
|
46
50
|
return evaluateTableColumnCoverage(assertion, context);
|
|
51
|
+
case "frontmatterShape":
|
|
52
|
+
return evaluateFrontmatterShape(assertion, context);
|
|
47
53
|
}
|
|
48
54
|
}
|
|
49
55
|
//# sourceMappingURL=evaluator.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"evaluator.js","sourceRoot":"","sources":["../../../src/declarative-validation/assertions/evaluator.ts"],"names":[],"mappings":"AAQA,OAAO,EAAE,cAAc,EAAE,MAAM,aAAa,CAAC;AAC7C,OAAO,EAAE,2BAA2B,EAAE,MAAM,2BAA2B,CAAC;AACxE,OAAO,EAAE,WAAW,EAAE,MAAM,UAAU,CAAC;AACvC,OAAO,EAAE,wBAAwB,EAAE,MAAM,eAAe,CAAC;AACzD,OAAO,EAAE,kBAAkB,EAAE,MAAM,iBAAiB,CAAC;AACrD,OAAO,EAAE,wBAA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;YACrB,OAAO,wBAAwB,CAAC,SAAS,EAAE,OAAO,CAAC,CAAC;IACxD,CAAC;AACH,CAAC"}
|
|
@@ -0,0 +1,9 @@
|
|
|
1
|
+
import type { CompiledDeclarativeAssertion } from "../compiler/plan.js";
|
|
2
|
+
import type { AssertionEvaluationContext } from "./context.js";
|
|
3
|
+
import type { AssertionDiagnostic } from "./diagnostics.js";
|
|
4
|
+
type FrontmatterShapeAssertion = Extract<CompiledDeclarativeAssertion, {
|
|
5
|
+
kind: "frontmatterShape";
|
|
6
|
+
}>;
|
|
7
|
+
export declare function evaluateFrontmatterShape(assertion: FrontmatterShapeAssertion, context: AssertionEvaluationContext): AssertionDiagnostic[];
|
|
8
|
+
export {};
|
|
9
|
+
//# sourceMappingURL=frontmatter-shape.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"frontmatter-shape.d.ts","sourceRoot":"","sources":["../../../src/declarative-validation/assertions/frontmatter-shape.ts"],"names":[],"mappings":"AACA,OAAO,KAAK,EAAE,4BAA4B,EAAE,MAAM,qBAAqB,CAAC;AACxE,OAAO,KAAK,EAAE,0BAA0B,EAAE,MAAM,cAAc,CAAC;AAC/D,OAAO,KAAK,EAAE,mBAAmB,EAAE,MAAM,kBAAkB,CAAC;AAG5D,KAAK,yBAAyB,GAAG,OAAO,CACtC,4BAA4B,EAC5B;IAAE,IAAI,EAAE,kBAAkB,CAAA;CAAE,CAC7B,CAAC;AAMF,wBAAgB,wBAAwB,CACtC,SAAS,EAAE,yBAAyB,EACpC,OAAO,EAAE,0BAA0B,GAClC,mBAAmB,EAAE,CAiCvB"}
|
|
@@ -0,0 +1,105 @@
|
|
|
1
|
+
import { hasOwnProperty, isPlainRecord } from "../../internal/plain-record.js";
|
|
2
|
+
import { validationDiagnostic } from "./diagnostics.js";
|
|
3
|
+
export function evaluateFrontmatterShape(assertion, context) {
|
|
4
|
+
const frontmatter = context.selection.document.frontmatter;
|
|
5
|
+
const diagnostics = [];
|
|
6
|
+
if (assertion.presence === "required" && frontmatter === undefined) {
|
|
7
|
+
diagnostics.push(requiredFrontmatterDiagnostic(context));
|
|
8
|
+
}
|
|
9
|
+
if (assertion.presence === "forbidden" && frontmatter !== undefined) {
|
|
10
|
+
diagnostics.push(forbiddenFrontmatterDiagnostic(context));
|
|
11
|
+
}
|
|
12
|
+
if (assertion.fields === undefined) {
|
|
13
|
+
return diagnostics;
|
|
14
|
+
}
|
|
15
|
+
if (!isPlainRecord(frontmatter)) {
|
|
16
|
+
for (const [fieldOrder, field] of assertion.fields.entries()) {
|
|
17
|
+
if (field.required === true) {
|
|
18
|
+
diagnostics.push(missingFieldDiagnostic(field, context, fieldOrder));
|
|
19
|
+
}
|
|
20
|
+
}
|
|
21
|
+
return diagnostics;
|
|
22
|
+
}
|
|
23
|
+
for (const [fieldOrder, field] of assertion.fields.entries()) {
|
|
24
|
+
diagnostics.push(...evaluateFrontmatterField(frontmatter, field, context, fieldOrder));
|
|
25
|
+
}
|
|
26
|
+
return diagnostics;
|
|
27
|
+
}
|
|
28
|
+
function evaluateFrontmatterField(frontmatter, field, context, fieldOrder) {
|
|
29
|
+
if (!hasOwnProperty(frontmatter, field.field)) {
|
|
30
|
+
return field.required === true
|
|
31
|
+
? [missingFieldDiagnostic(field, context, fieldOrder)]
|
|
32
|
+
: [];
|
|
33
|
+
}
|
|
34
|
+
const value = frontmatter[field.field];
|
|
35
|
+
const diagnostics = [];
|
|
36
|
+
if (field.valueType !== undefined &&
|
|
37
|
+
!matchesFrontmatterValueType(value, field.valueType)) {
|
|
38
|
+
diagnostics.push(typeMismatchDiagnostic(field, context, fieldOrder));
|
|
39
|
+
}
|
|
40
|
+
if (field.nonEmpty === true && failsNonEmptyStringPredicate(value, field)) {
|
|
41
|
+
diagnostics.push(emptyFieldDiagnostic(field, context, fieldOrder));
|
|
42
|
+
}
|
|
43
|
+
return diagnostics;
|
|
44
|
+
}
|
|
45
|
+
function requiredFrontmatterDiagnostic(context) {
|
|
46
|
+
return validationDiagnostic("profile.validation.frontmatterMissing", "Frontmatter is required.", context.rule, {
|
|
47
|
+
assertionIndex: context.assertionIndex,
|
|
48
|
+
targetKey: "frontmatter:presence:required",
|
|
49
|
+
diagnosticOrder: 0,
|
|
50
|
+
});
|
|
51
|
+
}
|
|
52
|
+
function forbiddenFrontmatterDiagnostic(context) {
|
|
53
|
+
return validationDiagnostic("profile.validation.frontmatterForbidden", "Frontmatter is forbidden.", context.rule, {
|
|
54
|
+
assertionIndex: context.assertionIndex,
|
|
55
|
+
targetKey: "frontmatter:presence:forbidden",
|
|
56
|
+
diagnosticOrder: 0,
|
|
57
|
+
});
|
|
58
|
+
}
|
|
59
|
+
function missingFieldDiagnostic(field, context, fieldOrder) {
|
|
60
|
+
return validationDiagnostic("profile.validation.frontmatterFieldMissing", `Required frontmatter field "${field.field}" is missing.`, context.rule, {
|
|
61
|
+
assertionIndex: context.assertionIndex,
|
|
62
|
+
targetKey: frontmatterFieldTargetKey(field, "missing"),
|
|
63
|
+
diagnosticOrder: fieldOrder,
|
|
64
|
+
});
|
|
65
|
+
}
|
|
66
|
+
function typeMismatchDiagnostic(field, context, fieldOrder) {
|
|
67
|
+
return validationDiagnostic("profile.validation.frontmatterFieldTypeMismatch", `Frontmatter field "${field.field}" must be ${field.valueType}.`, context.rule, {
|
|
68
|
+
assertionIndex: context.assertionIndex,
|
|
69
|
+
targetKey: frontmatterFieldTargetKey(field, "type"),
|
|
70
|
+
diagnosticOrder: fieldOrder,
|
|
71
|
+
});
|
|
72
|
+
}
|
|
73
|
+
function emptyFieldDiagnostic(field, context, fieldOrder) {
|
|
74
|
+
return validationDiagnostic("profile.validation.frontmatterFieldEmpty", `Frontmatter field "${field.field}" must be a non-empty string.`, context.rule, {
|
|
75
|
+
assertionIndex: context.assertionIndex,
|
|
76
|
+
targetKey: frontmatterFieldTargetKey(field, "nonEmpty"),
|
|
77
|
+
diagnosticOrder: fieldOrder,
|
|
78
|
+
});
|
|
79
|
+
}
|
|
80
|
+
function frontmatterFieldTargetKey(field, predicate) {
|
|
81
|
+
return `frontmatter:${field.field}:${predicate}`;
|
|
82
|
+
}
|
|
83
|
+
function matchesFrontmatterValueType(value, valueType) {
|
|
84
|
+
switch (valueType) {
|
|
85
|
+
case "string":
|
|
86
|
+
return typeof value === "string";
|
|
87
|
+
case "number":
|
|
88
|
+
return typeof value === "number" && Number.isFinite(value);
|
|
89
|
+
case "boolean":
|
|
90
|
+
return typeof value === "boolean";
|
|
91
|
+
case "array":
|
|
92
|
+
return Array.isArray(value);
|
|
93
|
+
case "object":
|
|
94
|
+
return isPlainRecord(value);
|
|
95
|
+
case "null":
|
|
96
|
+
return value === null;
|
|
97
|
+
}
|
|
98
|
+
}
|
|
99
|
+
function failsNonEmptyStringPredicate(value, field) {
|
|
100
|
+
if (field.valueType === "string" && typeof value !== "string") {
|
|
101
|
+
return false;
|
|
102
|
+
}
|
|
103
|
+
return typeof value !== "string" || value.length === 0;
|
|
104
|
+
}
|
|
105
|
+
//# sourceMappingURL=frontmatter-shape.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"frontmatter-shape.js","sourceRoot":"","sources":["../../../src/declarative-validation/assertions/frontmatter-shape.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,cAAc,EAAE,aAAa,EAAE,MAAM,gCAAgC,CAAC;AAI/E,OAAO,EAAE,oBAAoB,EAAE,MAAM,kBAAkB,CAAC;AAWxD,MAAM,UAAU,wBAAwB,CACtC,SAAoC,EACpC,OAAmC;IAEnC,MAAM,WAAW,GAAG,OAAO,CAAC,SAAS,CAAC,QAAQ,CAAC,WAAW,CAAC;IAC3D,MAAM,WAAW,GAA0B,EAAE,CAAC;IAE9C,IAAI,SAAS,CAAC,QAAQ,KAAK,UAAU,IAAI,WAAW,KAAK,SAAS,EAAE,CAAC;QACnE,WAAW,CAAC,IAAI,CAAC,6BAA6B,CAAC,OAAO,CAAC,CAAC,CAAC;IAC3D,CAAC;IAED,IAAI,SAAS,CAAC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AK,CAAC,CAAC;QAE9B,KAAK,MAAM;YACT,OAAO,KAAK,KAAK,IAAI,CAAC;IAC1B,CAAC;AACH,CAAC;AAED,SAAS,4BAA4B,CACnC,KAAc,EACd,KAA4B;IAE5B,IAAI,KAAK,CAAC,SAAS,KAAK,QAAQ,IAAI,OAAO,KAAK,KAAK,QAAQ,EAAE,CAAC;QAC9D,OAAO,KAAK,CAAC;IACf,CAAC;IAED,OAAO,OAAO,KAAK,KAAK,QAAQ,IAAI,KAAK,CAAC,MAAM,KAAK,CAAC,CAAC;AACzD,CAAC"}
|
|
@@ -0,0 +1,9 @@
|
|
|
1
|
+
import type { CompiledDeclarativeAssertion } from "../compiler/plan.js";
|
|
2
|
+
import type { AssertionEvaluationContext } from "./context.js";
|
|
3
|
+
import type { AssertionDiagnostic } from "./diagnostics.js";
|
|
4
|
+
type TextFormatAssertion = Extract<CompiledDeclarativeAssertion, {
|
|
5
|
+
kind: "textFormat";
|
|
6
|
+
}>;
|
|
7
|
+
export declare function evaluateTextFormat(assertion: TextFormatAssertion, context: AssertionEvaluationContext): AssertionDiagnostic[];
|
|
8
|
+
export {};
|
|
9
|
+
//# sourceMappingURL=text-format.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"text-format.d.ts","sourceRoot":"","sources":["../../../src/declarative-validation/assertions/text-format.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,4BAA4B,EAAE,MAAM,qBAAqB,CAAC;AAExE,OAAO,KAAK,EAAE,0BAA0B,EAAE,MAAM,cAAc,CAAC;AAC/D,OAAO,KAAK,EAAE,mBAAmB,EAAE,MAAM,kBAAkB,CAAC;AAM5D,KAAK,mBAAmB,GAAG,OAAO,CAChC,4BAA4B,EAC5B;IAAE,IAAI,EAAE,YAAY,CAAA;CAAE,CACvB,CAAC;AAEF,wBAAgB,kBAAkB,CAChC,SAAS,EAAE,mBAAmB,EAC9B,OAAO,EAAE,0BAA0B,GAClC,mBAAmB,EAAE,CAWvB"}
|
|
@@ -0,0 +1,75 @@
|
|
|
1
|
+
import { emptySelectionDiagnostic, validationDiagnostic, } from "./diagnostics.js";
|
|
2
|
+
export function evaluateTextFormat(assertion, context) {
|
|
3
|
+
if (context.selection.targets.length === 0) {
|
|
4
|
+
return [emptySelectionDiagnostic(context.rule, context.assertionIndex)];
|
|
5
|
+
}
|
|
6
|
+
switch (assertion.format) {
|
|
7
|
+
case "isoDate":
|
|
8
|
+
return context.selection.targets.flatMap((target, targetOrder) => evaluateIsoDateTarget(context, target, targetOrder));
|
|
9
|
+
}
|
|
10
|
+
}
|
|
11
|
+
function evaluateIsoDateTarget(context, target, targetOrder) {
|
|
12
|
+
if (isIsoDateText(target.text)) {
|
|
13
|
+
return [];
|
|
14
|
+
}
|
|
15
|
+
return [
|
|
16
|
+
validationDiagnostic("profile.validation.assertionFailed", `Selected ${target.kind} text must be an exact ISO date in YYYY-MM-DD form.`, context.rule, {
|
|
17
|
+
assertionIndex: context.assertionIndex,
|
|
18
|
+
target,
|
|
19
|
+
targetOrder,
|
|
20
|
+
}),
|
|
21
|
+
];
|
|
22
|
+
}
|
|
23
|
+
function isIsoDateText(text) {
|
|
24
|
+
if (text.length !== 10 ||
|
|
25
|
+
text[4] !== "-" ||
|
|
26
|
+
text[7] !== "-") {
|
|
27
|
+
return false;
|
|
28
|
+
}
|
|
29
|
+
const year = decimalValue(text, 0, 4);
|
|
30
|
+
const month = decimalValue(text, 5, 7);
|
|
31
|
+
const day = decimalValue(text, 8, 10);
|
|
32
|
+
if (year === undefined || month === undefined || day === undefined) {
|
|
33
|
+
return false;
|
|
34
|
+
}
|
|
35
|
+
const maximumDay = daysInMonth(year, month);
|
|
36
|
+
return maximumDay !== undefined && day >= 1 && day <= maximumDay;
|
|
37
|
+
}
|
|
38
|
+
function decimalValue(text, start, end) {
|
|
39
|
+
const zeroCode = 48;
|
|
40
|
+
const nineCode = 57;
|
|
41
|
+
let value = 0;
|
|
42
|
+
for (let index = start; index < end; index += 1) {
|
|
43
|
+
const charCode = text.charCodeAt(index);
|
|
44
|
+
if (charCode < zeroCode || charCode > nineCode) {
|
|
45
|
+
return undefined;
|
|
46
|
+
}
|
|
47
|
+
value = value * 10 + (charCode - zeroCode);
|
|
48
|
+
}
|
|
49
|
+
return value;
|
|
50
|
+
}
|
|
51
|
+
function daysInMonth(year, month) {
|
|
52
|
+
switch (month) {
|
|
53
|
+
case 1:
|
|
54
|
+
case 3:
|
|
55
|
+
case 5:
|
|
56
|
+
case 7:
|
|
57
|
+
case 8:
|
|
58
|
+
case 10:
|
|
59
|
+
case 12:
|
|
60
|
+
return 31;
|
|
61
|
+
case 4:
|
|
62
|
+
case 6:
|
|
63
|
+
case 9:
|
|
64
|
+
case 11:
|
|
65
|
+
return 30;
|
|
66
|
+
case 2:
|
|
67
|
+
return isLeapYear(year) ? 29 : 28;
|
|
68
|
+
default:
|
|
69
|
+
return undefined;
|
|
70
|
+
}
|
|
71
|
+
}
|
|
72
|
+
function isLeapYear(year) {
|
|
73
|
+
return year % 4 === 0 && (year % 100 !== 0 || year % 400 === 0);
|
|
74
|
+
}
|
|
75
|
+
//# sourceMappingURL=text-format.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"text-format.js","sourceRoot":"","sources":["../../../src/declarative-validation/assertions/text-format.ts"],"names":[],"mappings":"AAIA,OAAO,EACL,wBAAwB,EACxB,oBAAoB,GACrB,MAAM,kBAAkB,CAAC;AAO1B,MAAM,UAAU,kBAAkB,CAChC,SAA8B,EAC9B,OAAmC;IAEnC,IAAI,OAAO,CAAC,SAAS,CAAC,OAAO,CAAC,MAAM,KAAK,CAAC,EAAE,CAAC;QAC3C,OAAO,CAAC,wBAAwB,CAAC,OAAO,CAAC,IAAI,EAAE,OAAO,CAAC,cAAc,CAAC,CAAC,CAAC;IAC1E,CAAC;IAED,QAAQ,SAAS,CAAC,MAAM,EAAE,CAAC;QACzB,KAAK,SAAS;YACZ,OAAO,OAAO,CAAC,SAAS,CA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AC,CAAC,CAAC;AAClE,CAAC"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"assertion-builders.d.ts","sourceRoot":"","sources":["../../../src/declarative-validation/compiler/assertion-builders.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,kBAAkB,EAAE,MAAM,0BAA0B,CAAC;AACnE,OAAO,KAAK,EACV,oBAAoB,EACpB,mBAAmB,EACpB,MAAM,qBAAqB,CAAC;AAK7B,OAAO,EAEL,KAAK,8BAA8B,EACpC,MAAM,8BAA8B,CAAC;AAMtC,OAAO,KAAK,EAAE,4BAA4B,EAAE,MAAM,WAAW,CAAC;
|
|
1
|
+
{"version":3,"file":"assertion-builders.d.ts","sourceRoot":"","sources":["../../../src/declarative-validation/compiler/assertion-builders.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,kBAAkB,EAAE,MAAM,0BAA0B,CAAC;AACnE,OAAO,KAAK,EACV,oBAAoB,EACpB,mBAAmB,EACpB,MAAM,qBAAqB,CAAC;AAK7B,OAAO,EAEL,KAAK,8BAA8B,EACpC,MAAM,8BAA8B,CAAC;AAMtC,OAAO,KAAK,EAAE,4BAA4B,EAAE,MAAM,WAAW,CAAC;AAuB9D,MAAM,MAAM,gBAAgB,GAAG,CAC7B,SAAS,EAAE,oBAAoB,EAC/B,QAAQ,EAAE,mBAAmB,EAC7B,MAAM,EAAE,MAAM,EACd,aAAa,EAAE,8BAA8B,EAC7C,WAAW,EAAE,kBAAkB,EAAE,KAC9B,4BAA4B,GAAG,SAAS,CAAC;AAE9C,eAAO,MAAM,kBAAkB,EAAE,SAAS,gBAAgB,EAazD,CAAC"}
|