@maroonedog/luq 2.4.2 → 2.4.4

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.
Files changed (35) hide show
  1. package/README.md +158 -6
  2. package/dist/chain/field-chain.types.d.ts +11 -1
  3. package/dist/chain/index.d.ts +2 -0
  4. package/dist/chain/plugin-not-imported.types.d.ts +40 -0
  5. package/dist/chain/plugin-not-imported.types.js +2 -0
  6. package/dist/chain/plugin-not-imported.types.mjs +1 -0
  7. package/dist/chain/slot-catalog.generated.d.ts +265 -0
  8. package/dist/chain/slot-catalog.generated.js +4 -0
  9. package/dist/chain/slot-catalog.generated.mjs +3 -0
  10. package/dist/core/type-erasure.d.ts +20 -0
  11. package/dist/core/type-erasure.js +23 -0
  12. package/dist/core/type-erasure.mjs +22 -0
  13. package/dist/field-rule/use-field.d.ts +2 -1
  14. package/dist/field-rule/use-field.js +9 -2
  15. package/dist/field-rule/use-field.mjs +9 -2
  16. package/dist/plugins/manifest.generated.d.ts +18 -0
  17. package/dist/plugins/manifest.generated.js +77 -77
  18. package/dist/plugins/manifest.generated.mjs +77 -77
  19. package/dist/runtime/index-stack.d.ts +10 -1
  20. package/dist/runtime/index-stack.js +19 -3
  21. package/dist/runtime/index-stack.mjs +19 -3
  22. package/dist/runtime/index.d.ts +1 -1
  23. package/dist/runtime/index.js +1 -2
  24. package/dist/runtime/index.mjs +1 -1
  25. package/dist/runtime/run-branch.js +8 -3
  26. package/dist/runtime/run-branch.mjs +9 -4
  27. package/dist/runtime/run-plan.d.ts +5 -11
  28. package/dist/runtime/run-plan.js +5 -21
  29. package/dist/runtime/run-plan.mjs +5 -20
  30. package/dist/runtime/run-recursion.js +9 -7
  31. package/dist/runtime/run-recursion.mjs +10 -8
  32. package/dist/schema-tooling/index.d.ts +11 -0
  33. package/dist/schema-tooling/index.js +12 -1
  34. package/dist/schema-tooling/index.mjs +10 -0
  35. package/package.json +6 -4
@@ -15,11 +15,13 @@ exports.createRecursionRunner = createRecursionRunner;
15
15
  // Legacy truncated at maxDepth as a SUCCESS, which meant a structure deeper
16
16
  // than the limit silently skipped every rule below it.
17
17
  //
18
- // The nested plan runs into its OWN sink and its OWN index stack, and its
19
- // issues are re-based onto the entering field's path afterwards. That is what
20
- // makes `node.child.name` come out right: the plan's fields are declared
21
- // relative to the plan's subject and know nothing about where they were
22
- // re-entered from.
18
+ // The nested plan runs into its OWN sink, and its OWN index stack STARTED AT
19
+ // the entering field's path. That is what makes `node.child.name` come out
20
+ // right: the plan's fields are declared relative to the plan's subject and know
21
+ // nothing about where they were re-entered from, so the stack is what carries
22
+ // the descent. Giving it the path up front rather than rewriting the issues
23
+ // afterwards is also what makes a message agree with the path beside it — a
24
+ // message is rendered once, from that path, at the moment the issue is built.
23
25
  //
24
26
  // A re-entry never writes. RecursionRunner returns void by contract, so there
25
27
  // is nowhere for a transformed subtree to go; recursion is validation, and
@@ -88,12 +90,12 @@ function bindRecursionRunner(host, progress) {
88
90
  (0, run_plan_1.runPlan)(policy.plan.resolve(), value, {
89
91
  root: host.root,
90
92
  sink: nested,
91
- indices: new index_stack_1.IndexStack(),
93
+ indices: new index_stack_1.IndexStack(path),
92
94
  shouldApplyTransforms: false,
93
95
  runRecursion: bindRecursionRunner({ ...host, sink: nested }, progress),
94
96
  external: host.external,
95
97
  });
96
- for (const issue of (0, run_plan_1.prefixIssuePaths)(path, nested.issues)) {
98
+ for (const issue of nested.issues) {
97
99
  host.sink.add(issue);
98
100
  }
99
101
  }
@@ -11,11 +11,13 @@
11
11
  // Legacy truncated at maxDepth as a SUCCESS, which meant a structure deeper
12
12
  // than the limit silently skipped every rule below it.
13
13
  //
14
- // The nested plan runs into its OWN sink and its OWN index stack, and its
15
- // issues are re-based onto the entering field's path afterwards. That is what
16
- // makes `node.child.name` come out right: the plan's fields are declared
17
- // relative to the plan's subject and know nothing about where they were
18
- // re-entered from.
14
+ // The nested plan runs into its OWN sink, and its OWN index stack STARTED AT
15
+ // the entering field's path. That is what makes `node.child.name` come out
16
+ // right: the plan's fields are declared relative to the plan's subject and know
17
+ // nothing about where they were re-entered from, so the stack is what carries
18
+ // the descent. Giving it the path up front rather than rewriting the issues
19
+ // afterwards is also what makes a message agree with the path beside it — a
20
+ // message is rendered once, from that path, at the moment the issue is built.
19
21
  //
20
22
  // A re-entry never writes. RecursionRunner returns void by contract, so there
21
23
  // is nowhere for a transformed subtree to go; recursion is validation, and
@@ -25,7 +27,7 @@ import { isArray } from "../types/index.mjs";
25
27
  import { createIssue } from "./create-issue.mjs";
26
28
  import { IndexStack } from "./index-stack.mjs";
27
29
  import { IssueSink } from "./issue-sink.mjs";
28
- import { prefixIssuePaths, runPlan } from "./run-plan.mjs";
30
+ import { runPlan } from "./run-plan.mjs";
29
31
  /**
30
32
  * Legacy contract, kept: fields do not abort each other inside a recursive
31
33
  * re-entry. A descent that stopped at its first issue would report one leaf of
@@ -84,12 +86,12 @@ function bindRecursionRunner(host, progress) {
84
86
  runPlan(policy.plan.resolve(), value, {
85
87
  root: host.root,
86
88
  sink: nested,
87
- indices: new IndexStack(),
89
+ indices: new IndexStack(path),
88
90
  shouldApplyTransforms: false,
89
91
  runRecursion: bindRecursionRunner({ ...host, sink: nested }, progress),
90
92
  external: host.external,
91
93
  });
92
- for (const issue of prefixIssuePaths(path, nested.issues)) {
94
+ for (const issue of nested.issues) {
93
95
  host.sink.add(issue);
94
96
  }
95
97
  }
@@ -5,3 +5,14 @@ export { isDraft07Schema, isSchemaObject } from "../json-schema";
5
5
  /** The vocabulary itself: what a tool must have a decision for. */
6
6
  export { listDraft07Keywords } from "../json-schema";
7
7
  export type { ChildSchema, Draft07Schema, Draft07SchemaObject, } from "../json-schema";
8
+ /**
9
+ * Which plugin offers which chain method, on which slot, and the specifier to
10
+ * import it from.
11
+ *
12
+ * A generator emitting `.min(3)` has to emit the import that makes `.min`
13
+ * exist, and nothing else in the package answers that: the barrel names the
14
+ * symbols but not the methods they add. Data only — no plugin is loaded by
15
+ * reading it.
16
+ */
17
+ export { PLUGIN_MANIFEST } from "../plugins/manifest.generated";
18
+ export type { PluginManifestEntry, PluginSurface, } from "../plugins/manifest.generated";
@@ -1,6 +1,6 @@
1
1
  "use strict";
2
2
  Object.defineProperty(exports, "__esModule", { value: true });
3
- exports.listDraft07Keywords = exports.isSchemaObject = exports.isDraft07Schema = exports.readChildSchemas = exports.flattenSchema = void 0;
3
+ exports.PLUGIN_MANIFEST = exports.listDraft07Keywords = exports.isSchemaObject = exports.isDraft07Schema = exports.readChildSchemas = exports.flattenSchema = void 0;
4
4
  // ===========================================================================
5
5
  // src/schema-tooling/index.ts — re-exports only. Nothing is defined here.
6
6
  //
@@ -24,3 +24,14 @@ Object.defineProperty(exports, "isSchemaObject", { enumerable: true, get: functi
24
24
  /** The vocabulary itself: what a tool must have a decision for. */
25
25
  var json_schema_4 = require("../json-schema");
26
26
  Object.defineProperty(exports, "listDraft07Keywords", { enumerable: true, get: function () { return json_schema_4.listDraft07Keywords; } });
27
+ /**
28
+ * Which plugin offers which chain method, on which slot, and the specifier to
29
+ * import it from.
30
+ *
31
+ * A generator emitting `.min(3)` has to emit the import that makes `.min`
32
+ * exist, and nothing else in the package answers that: the barrel names the
33
+ * symbols but not the methods they add. Data only — no plugin is loaded by
34
+ * reading it.
35
+ */
36
+ var manifest_generated_1 = require("../plugins/manifest.generated");
37
+ Object.defineProperty(exports, "PLUGIN_MANIFEST", { enumerable: true, get: function () { return manifest_generated_1.PLUGIN_MANIFEST; } });
@@ -16,3 +16,13 @@ export { readChildSchemas } from "../json-schema/index.mjs";
16
16
  export { isDraft07Schema, isSchemaObject } from "../json-schema/index.mjs";
17
17
  /** The vocabulary itself: what a tool must have a decision for. */
18
18
  export { listDraft07Keywords } from "../json-schema/index.mjs";
19
+ /**
20
+ * Which plugin offers which chain method, on which slot, and the specifier to
21
+ * import it from.
22
+ *
23
+ * A generator emitting `.min(3)` has to emit the import that makes `.min`
24
+ * exist, and nothing else in the package answers that: the barrel names the
25
+ * symbols but not the methods they add. Data only — no plugin is loaded by
26
+ * reading it.
27
+ */
28
+ export { PLUGIN_MANIFEST } from "../plugins/manifest.generated.mjs";
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@maroonedog/luq",
3
- "version": "2.4.2",
3
+ "version": "2.4.4",
4
4
  "description": "Universal Model & API Definition Platform - TypeScript validation library evolving into cross-language code generation",
5
5
  "main": "dist/index.js",
6
6
  "module": "dist/index.mjs",
@@ -448,7 +448,7 @@
448
448
  "test": "jest --no-watch --no-watchman --passWithNoTests",
449
449
  "test:watch": "jest --watch",
450
450
  "lint": "npm run lint:ox && npm run lint:naming",
451
- "prepare": "npm run build",
451
+ "prepare": "npm run generate:sources && npm run build",
452
452
  "prepublishOnly": "npm run verify",
453
453
  "generate-docs": "npx ts-node --project scripts/tsconfig.json scripts/generate-docs.ts",
454
454
  "lint:fix": "oxlint -c .oxlintrc.json --fix src bench",
@@ -460,7 +460,8 @@
460
460
  "typecheck:scripts": "tsc --noEmit -p scripts/tsconfig.json",
461
461
  "typecheck:bench": "tsc --noEmit -p bench/tsconfig.json",
462
462
  "generate": "npm run generate:sources && npm run generate:exports && npm run generate:lock",
463
- "generate:sources": "npm run generate:manifest && npm run generate:barrel",
463
+ "generate:sources": "npm run generate:manifest && npm run generate:barrel && npm run generate:slot-catalog",
464
+ "generate:slot-catalog": "npx ts-node --project scripts/tsconfig.json scripts/generate-slot-catalog.ts",
464
465
  "generate:manifest": "npx ts-node --project scripts/tsconfig.json scripts/generate-plugin-manifest.ts",
465
466
  "generate:barrel": "npx ts-node --project scripts/tsconfig.json scripts/generate-plugin-barrel.ts",
466
467
  "generate:exports": "npx ts-node --project scripts/tsconfig.json scripts/generate-package-exports.ts",
@@ -483,9 +484,10 @@
483
484
  "verify": "npm run generate:sources && npm run format:check && npm run lint && npm run lint:filenames && npm run typecheck && npm run test:types && npm run check:source && npm run check:catalog && npm run build && npm run check:dist && npm run check:docs && npm run check:distribution && npm test",
484
485
  "test:types": "tsc --noEmit -p tsconfig.type-test.json",
485
486
  "check:doc-examples": "npx ts-node --project scripts/tsconfig.json scripts/check-doc-examples.ts",
487
+ "check:readme-links": "npx ts-node --project scripts/tsconfig.json scripts/check-readme-links.ts",
486
488
  "check:doc-imports": "npx ts-node --project scripts/tsconfig.json scripts/check-doc-imports.ts",
487
489
  "check:generated-docs": "npx ts-node --project scripts/tsconfig.json scripts/generate-docs.ts --check",
488
- "check:docs": "npm run check:generated-docs && npm run check:doc-examples && npm run check:doc-imports && npm run check:conformance-figures && npm run check:perf-figures",
490
+ "check:docs": "npm run check:generated-docs && npm run check:readme-links && npm run check:doc-examples && npm run check:doc-imports && npm run check:conformance-figures && npm run check:perf-figures",
489
491
  "bench:record": "npx ts-node --project scripts/tsconfig.json scripts/run-bench.ts --record",
490
492
  "bench:gate": "npx ts-node --project scripts/tsconfig.json scripts/run-bench.ts --gate",
491
493
  "check:conformance-figures": "npx ts-node --project scripts/tsconfig.json scripts/check-conformance-figures.ts",