@pagefront/lint-commerce 0.1.1 → 0.2.1
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/README.md +3 -1
- package/dist/schema-validators.d.ts +10 -0
- package/dist/schema-validators.js +6 -0
- package/dist/validate-and-lint.js +5 -17
- package/dist/validate-organization.js +1 -12
- package/dist/version.d.ts +1 -1
- package/dist/version.js +1 -1
- package/package.json +3 -3
package/README.md
CHANGED
|
@@ -39,7 +39,9 @@ internal):
|
|
|
39
39
|
`{ layer: 1, schemaErrors: SchemaError[] }` or
|
|
40
40
|
`{ layer: 2, report: Report }`. The bundled schemas are the current
|
|
41
41
|
format version; a document declaring another `format_version` fails
|
|
42
|
-
Layer 1 by design.
|
|
42
|
+
Layer 1 by design. Layer 1 runs validators compiled ahead of time at
|
|
43
|
+
package build, so the pipeline needs no runtime code generation and
|
|
44
|
+
runs under Cloudflare Workers and strict Content Security Policies.
|
|
43
45
|
- `lintSheet(sheet: Sheet, options?: LintOptions): Report` — Layer 2
|
|
44
46
|
only, for input you have already schema-validated. Dispatches to the
|
|
45
47
|
page type's catalogue the same way.
|
|
@@ -0,0 +1,10 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* The Layer 1 validators, compiled ahead of time from the bundled
|
|
3
|
+
* schemas by scripts/compile-validators.mjs into dist/schema-validators.js
|
|
4
|
+
* (the second half of `npm run build`). This declaration is the module's
|
|
5
|
+
* type; the script copies it beside the generated file.
|
|
6
|
+
*/
|
|
7
|
+
import type { ValidateFunction } from "ajv";
|
|
8
|
+
|
|
9
|
+
export const validateProduct: ValidateFunction;
|
|
10
|
+
export const validateOrganization: ValidateFunction;
|