@astrale-os/kernel-dsl 0.2.0-beta.4 → 0.2.0-beta.41
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/index.d.ts +0 -1
- package/dist/index.js +0 -1
- package/dist/upgrade/contract.d.ts +0 -1
- package/dist/upgrade/contract.js +0 -1
- package/dist/upgrade/index.d.ts +0 -1
- package/dist/upgrade/index.js +0 -1
- package/dist/v1/addressing/class-key.d.ts +12 -0
- package/dist/v1/addressing/class-key.js +39 -0
- package/dist/v1/addressing/definition-ref.d.ts +28 -0
- package/dist/v1/addressing/definition-ref.js +63 -0
- package/dist/v1/addressing/domain-dependency.d.ts +18 -0
- package/dist/v1/addressing/domain-dependency.js +6 -0
- package/dist/v1/addressing/index.d.ts +10 -4
- package/dist/v1/addressing/index.js +5 -3
- package/dist/v1/addressing/key.d.ts +14 -16
- package/dist/v1/addressing/key.js +24 -34
- package/dist/v1/addressing/method-address.d.ts +9 -0
- package/dist/v1/addressing/method-address.js +1 -0
- package/dist/v1/addressing/method-key.d.ts +15 -0
- package/dist/v1/addressing/method-key.js +60 -0
- package/dist/v1/addressing/ordering.d.ts +6 -0
- package/dist/v1/addressing/ordering.js +20 -0
- package/dist/v1/addressing/patterns.d.ts +12 -3
- package/dist/v1/addressing/patterns.js +11 -2
- package/dist/v1/addressing/property-key.d.ts +10 -15
- package/dist/v1/addressing/property-key.js +24 -15
- package/dist/v1/addressing/revision.d.ts +8 -0
- package/dist/v1/addressing/revision.js +8 -0
- package/dist/v1/builder/callable/authoring.d.ts +143 -0
- package/dist/v1/builder/callable/authoring.js +82 -0
- package/dist/v1/builder/class/authoring.d.ts +400 -0
- package/dist/v1/builder/class/authoring.js +134 -0
- package/dist/v1/builder/class/property.d.ts +58 -0
- package/dist/v1/builder/class/property.js +57 -0
- package/dist/v1/builder/core/authoring.d.ts +47 -0
- package/dist/v1/builder/core/authoring.js +39 -0
- package/dist/v1/builder/index.d.ts +26 -22
- package/dist/v1/builder/index.js +11 -11
- package/dist/v1/builder/lowering/callable.d.ts +24 -0
- package/dist/v1/builder/lowering/callable.js +150 -0
- package/dist/v1/builder/lowering/class.d.ts +22 -0
- package/dist/v1/builder/lowering/class.js +134 -0
- package/dist/v1/builder/lowering/core-properties.d.ts +10 -0
- package/dist/v1/builder/lowering/core-properties.js +76 -0
- package/dist/v1/builder/lowering/core.d.ts +22 -0
- package/dist/v1/builder/lowering/core.js +50 -0
- package/dist/v1/builder/lowering/policy.d.ts +16 -0
- package/dist/v1/builder/lowering/policy.js +60 -0
- package/dist/v1/builder/lowering/schema/capture.d.ts +4 -0
- package/dist/v1/builder/lowering/schema/capture.js +75 -0
- package/dist/v1/builder/lowering/schema/compile.d.ts +10 -0
- package/dist/v1/builder/lowering/schema/compile.js +80 -0
- package/dist/v1/builder/lowering/schema/context.d.ts +49 -0
- package/dist/v1/builder/lowering/schema/context.js +277 -0
- package/dist/v1/builder/lowering/schema/ownership.d.ts +8 -0
- package/dist/v1/builder/lowering/schema/ownership.js +30 -0
- package/dist/v1/builder/lowering/value/compile.d.ts +15 -0
- package/dist/v1/builder/lowering/value/compile.js +143 -0
- package/dist/v1/builder/lowering/value/path.d.ts +3 -0
- package/dist/v1/builder/lowering/value/path.js +20 -0
- package/dist/v1/builder/lowering/value/zod.d.ts +32 -0
- package/dist/v1/builder/lowering/value/zod.js +342 -0
- package/dist/v1/builder/lowering/view.d.ts +11 -0
- package/dist/v1/builder/lowering/view.js +27 -0
- package/dist/v1/builder/policy/authoring.d.ts +61 -0
- package/dist/v1/builder/policy/authoring.js +117 -0
- package/dist/v1/builder/schema/define.d.ts +11 -0
- package/dist/v1/builder/schema/define.js +5 -0
- package/dist/v1/builder/schema/diagnostic.d.ts +16 -0
- package/dist/v1/builder/schema/diagnostic.js +31 -0
- package/dist/v1/builder/schema/handle.d.ts +7 -0
- package/dist/v1/builder/schema/handle.js +14 -0
- package/dist/v1/builder/schema/input.d.ts +15 -0
- package/dist/v1/builder/schema/input.js +1 -0
- package/dist/v1/builder/schema/lazy.d.ts +2 -0
- package/dist/v1/builder/schema/lazy.js +13 -0
- package/dist/v1/builder/schema/projection.d.ts +375 -0
- package/dist/v1/builder/schema/projection.js +1 -0
- package/dist/v1/builder/value/full-match.d.ts +4 -0
- package/dist/v1/builder/value/full-match.js +11 -0
- package/dist/v1/builder/value/path-metadata.d.ts +4 -0
- package/dist/v1/builder/value/path-metadata.js +7 -0
- package/dist/v1/builder/value/path.d.ts +8 -0
- package/dist/v1/builder/value/path.js +11 -0
- package/dist/v1/builder/value/schema.d.ts +16 -0
- package/dist/v1/builder/value/schema.js +10 -0
- package/dist/v1/builder/view/authoring.d.ts +17 -0
- package/dist/v1/builder/view/authoring.js +16 -0
- package/dist/v1/bundle/codec.d.ts +0 -1
- package/dist/v1/bundle/codec.js +36 -19
- package/dist/v1/bundle/create.d.ts +3 -0
- package/dist/v1/bundle/create.js +5 -0
- package/dist/v1/bundle/diagnostic.d.ts +10 -0
- package/dist/v1/bundle/diagnostic.js +17 -0
- package/dist/v1/bundle/index.d.ts +3 -2
- package/dist/v1/bundle/index.js +2 -2
- package/dist/v1/bundle/model.d.ts +1 -4
- package/dist/v1/bundle/model.js +0 -6
- package/dist/v1/bundle/structure.d.ts +1 -2
- package/dist/v1/bundle/structure.js +6 -6
- package/dist/v1/bundle/transport.d.ts +8 -0
- package/dist/v1/bundle/transport.js +7 -0
- package/dist/v1/compiled/admission/accept.d.ts +3 -0
- package/dist/v1/compiled/admission/accept.js +1068 -0
- package/dist/v1/compiled/admission/revision.d.ts +4 -0
- package/dist/v1/compiled/admission/revision.js +79 -0
- package/dist/v1/compiled/admission/semantics.d.ts +7 -0
- package/dist/v1/compiled/admission/semantics.js +1187 -0
- package/dist/v1/compiled/codec/json.d.ts +3 -0
- package/dist/v1/compiled/codec/json.js +9 -0
- package/dist/v1/compiled/compiler/compile.d.ts +4 -0
- package/dist/v1/compiled/compiler/compile.js +142 -0
- package/dist/v1/compiled/diagnostic.d.ts +11 -0
- package/dist/v1/compiled/diagnostic.js +13 -0
- package/dist/v1/compiled/generated.d.ts +10 -0
- package/dist/v1/compiled/generated.js +15 -0
- package/dist/v1/compiled/index.d.ts +7 -0
- package/dist/v1/compiled/index.js +5 -0
- package/dist/v1/compiled/loader/index.d.ts +1 -0
- package/dist/v1/compiled/loader/index.js +1 -0
- package/dist/v1/compiled/loader/load.d.ts +18 -0
- package/dist/v1/compiled/loader/load.js +156 -0
- package/dist/v1/compiled/model/schema.d.ts +78 -0
- package/dist/v1/compiled/model/schema.js +1 -0
- package/dist/v1/domain/create.d.ts +8 -0
- package/dist/v1/domain/create.js +273 -0
- package/dist/v1/domain/index.d.ts +2 -0
- package/dist/v1/domain/index.js +1 -0
- package/dist/v1/domain/model/domain.d.ts +59 -0
- package/dist/v1/domain/model/domain.js +1 -0
- package/dist/v1/domain/model/input.d.ts +31 -0
- package/dist/v1/domain/model/input.js +1 -0
- package/dist/v1/domain/namespace/member-collection.d.ts +5 -0
- package/dist/v1/domain/namespace/member-collection.js +81 -0
- package/dist/v1/domain/projection/classes.d.ts +4 -0
- package/dist/v1/domain/projection/classes.js +178 -0
- package/dist/v1/domain/validation/create.d.ts +18 -0
- package/dist/v1/domain/validation/create.js +75 -0
- package/dist/v1/index.d.ts +15 -5
- package/dist/v1/index.js +7 -3
- package/dist/v1/language/callable/composition.d.ts +27 -0
- package/dist/v1/language/callable/composition.js +52 -0
- package/dist/v1/language/callable/executable.d.ts +6 -0
- package/dist/v1/language/callable/executable.js +4 -0
- package/dist/v1/language/callable/index.d.ts +2 -0
- package/dist/v1/language/callable/index.js +1 -0
- package/dist/v1/language/callable/model/callable.d.ts +56 -0
- package/dist/v1/language/callable/model/callable.js +3 -0
- package/dist/v1/language/callable/resolved.d.ts +83 -0
- package/dist/v1/language/callable/resolved.js +1 -0
- package/dist/v1/language/class/facets.d.ts +61 -0
- package/dist/v1/language/class/facets.js +1 -0
- package/dist/v1/language/class/index.d.ts +8 -0
- package/dist/v1/language/class/index.js +1 -0
- package/dist/v1/language/class/model/class.d.ts +37 -0
- package/dist/v1/language/class/model/class.js +1 -0
- package/dist/v1/language/class/model/data.d.ts +11 -0
- package/dist/v1/language/class/model/data.js +2 -0
- package/dist/v1/language/class/model/edge.d.ts +38 -0
- package/dist/v1/language/class/model/edge.js +1 -0
- package/dist/v1/language/class/model/property.d.ts +17 -0
- package/dist/v1/language/class/model/property.js +1 -0
- package/dist/v1/language/class/property-values.d.ts +15 -0
- package/dist/v1/language/class/property-values.js +33 -0
- package/dist/v1/language/class/resolved.d.ts +126 -0
- package/dist/v1/language/class/resolved.js +1 -0
- package/dist/v1/language/core/index.d.ts +2 -0
- package/dist/v1/language/core/index.js +1 -0
- package/dist/v1/language/core/model/core.d.ts +26 -0
- package/dist/v1/language/core/model/core.js +1 -0
- package/dist/v1/language/core/resolved.d.ts +25 -0
- package/dist/v1/language/core/resolved.js +1 -0
- package/dist/v1/language/definition/metadata.d.ts +12 -0
- package/dist/v1/language/definition/metadata.js +12 -0
- package/dist/v1/language/definition.d.ts +7 -0
- package/dist/v1/language/definition.js +1 -0
- package/dist/v1/language/index.d.ts +28 -0
- package/dist/v1/language/index.js +5 -0
- package/dist/v1/language/policy/analysis/branches.d.ts +20 -0
- package/dist/v1/language/policy/analysis/branches.js +174 -0
- package/dist/v1/language/policy/analysis/budgets.d.ts +16 -0
- package/dist/v1/language/policy/analysis/budgets.js +25 -0
- package/dist/v1/language/policy/index.d.ts +4 -0
- package/dist/v1/language/policy/index.js +2 -0
- package/dist/v1/language/policy/model/policy.d.ts +116 -0
- package/dist/v1/language/policy/model/policy.js +35 -0
- package/dist/v1/language/policy/normalization/normalize.d.ts +4 -0
- package/dist/v1/language/policy/normalization/normalize.js +275 -0
- package/dist/v1/language/policy/resolved.d.ts +9 -0
- package/dist/v1/language/policy/resolved.js +1 -0
- package/dist/v1/language/resolved.d.ts +10 -0
- package/dist/v1/language/resolved.js +1 -0
- package/dist/v1/language/state/index.d.ts +3 -0
- package/dist/v1/language/state/index.js +1 -0
- package/dist/v1/language/state/machine.d.ts +28 -0
- package/dist/v1/language/state/machine.js +40 -0
- package/dist/v1/language/state/topology.d.ts +14 -0
- package/dist/v1/language/state/topology.js +69 -0
- package/dist/v1/language/validation/diagnostic.d.ts +8 -0
- package/dist/v1/language/validation/diagnostic.js +3 -0
- package/dist/v1/language/value/compile/fields.d.ts +3 -0
- package/dist/v1/language/value/compile/fields.js +60 -0
- package/dist/v1/language/value/compile/load.d.ts +6 -0
- package/dist/v1/language/value/compile/load.js +62 -0
- package/dist/v1/language/value/compile/model.d.ts +42 -0
- package/dist/v1/language/value/compile/model.js +1 -0
- package/dist/v1/language/value/evaluate/assertions.d.ts +8 -0
- package/dist/v1/language/value/evaluate/assertions.js +71 -0
- package/dist/v1/language/value/evaluate/evaluator.d.ts +4 -0
- package/dist/v1/language/value/evaluate/evaluator.js +426 -0
- package/dist/v1/language/value/evaluate/preparation.d.ts +22 -0
- package/dist/v1/language/value/evaluate/preparation.js +126 -0
- package/dist/v1/language/value/evaluate/program.d.ts +3 -0
- package/dist/v1/language/value/evaluate/program.js +16 -0
- package/dist/v1/language/value/evaluate/types.d.ts +36 -0
- package/dist/v1/language/value/evaluate/types.js +9 -0
- package/dist/v1/language/value/evaluate/validate.d.ts +16 -0
- package/dist/v1/language/value/evaluate/validate.js +50 -0
- package/dist/v1/language/value/index.d.ts +11 -0
- package/dist/v1/language/value/index.js +8 -0
- package/dist/v1/language/value/model/blob.d.ts +33 -0
- package/dist/v1/language/value/model/blob.js +90 -0
- package/dist/v1/language/value/model/instant.d.ts +9 -0
- package/dist/v1/language/value/model/instant.js +37 -0
- package/dist/v1/language/value/model/object.d.ts +5 -0
- package/dist/v1/language/value/model/object.js +3 -0
- package/dist/v1/language/value/model/schema.d.ts +25 -0
- package/dist/v1/language/value/model/schema.js +11 -0
- package/dist/v1/language/value/ordering.d.ts +15 -0
- package/dist/v1/language/value/ordering.js +170 -0
- package/dist/v1/language/value/profile/canonicalize.d.ts +4 -0
- package/dist/v1/language/value/profile/canonicalize.js +130 -0
- package/dist/v1/language/value/profile/json.validate.d.ts +2 -0
- package/dist/v1/language/value/profile/json.validate.js +14 -0
- package/dist/v1/language/value/profile/meta-schema.compiled.d.ts +78 -0
- package/dist/v1/language/value/profile/meta-schema.compiled.js +2079 -0
- package/dist/v1/language/value/profile/meta-schema.d.ts +4 -0
- package/dist/v1/language/value/profile/meta-schema.js +19 -0
- package/dist/v1/language/value/profile/rules.d.ts +3 -0
- package/dist/v1/language/value/profile/rules.js +141 -0
- package/dist/v1/language/value/profile/validate.d.ts +4 -0
- package/dist/v1/language/value/profile/validate.js +39 -0
- package/dist/v1/language/value/profile/vocabulary.d.ts +2 -0
- package/dist/v1/language/value/profile/vocabulary.js +68 -0
- package/dist/v1/language/value/reference/closure.d.ts +11 -0
- package/dist/v1/language/value/reference/closure.js +51 -0
- package/dist/v1/language/value/reference/recursion.d.ts +5 -0
- package/dist/v1/language/value/reference/recursion.js +95 -0
- package/dist/v1/language/value/reference/references.d.ts +17 -0
- package/dist/v1/language/value/reference/references.js +45 -0
- package/dist/v1/language/value/reference/registry.d.ts +24 -0
- package/dist/v1/language/value/reference/registry.index.d.ts +14 -0
- package/dist/v1/language/value/reference/registry.index.js +76 -0
- package/dist/v1/language/value/reference/registry.js +1 -0
- package/dist/v1/language/value/regexp/ast.d.ts +21 -0
- package/dist/v1/language/value/regexp/ast.js +326 -0
- package/dist/v1/language/value/regexp/compile.d.ts +3 -0
- package/dist/v1/language/value/regexp/compile.js +138 -0
- package/dist/v1/language/value/regexp/lower.d.ts +3 -0
- package/dist/v1/language/value/regexp/lower.js +26 -0
- package/dist/v1/language/value/regexp/matcher.d.ts +10 -0
- package/dist/v1/language/value/regexp/matcher.js +207 -0
- package/dist/v1/language/value/regexp/pattern.d.ts +2 -0
- package/dist/v1/language/value/regexp/pattern.js +38 -0
- package/dist/v1/language/value/regexp/syntax.d.ts +2 -0
- package/dist/v1/language/value/regexp/syntax.js +5 -0
- package/dist/v1/language/value/syntax/full-match.d.ts +6 -0
- package/dist/v1/language/value/syntax/full-match.js +20 -0
- package/dist/v1/language/value/syntax/keywords.d.ts +3 -0
- package/dist/v1/language/value/syntax/keywords.js +20 -0
- package/dist/v1/language/value/syntax/node-path/schema.d.ts +5 -0
- package/dist/v1/language/value/syntax/node-path/schema.js +18 -0
- package/dist/v1/language/value/syntax/node-path/validate.d.ts +4 -0
- package/dist/v1/language/value/syntax/node-path/validate.js +78 -0
- package/dist/v1/language/value/syntax/pointer.d.ts +4 -0
- package/dist/v1/language/value/syntax/pointer.js +49 -0
- package/dist/v1/language/value/syntax/walk.d.ts +10 -0
- package/dist/v1/language/value/syntax/walk.js +53 -0
- package/dist/v1/language/view/index.d.ts +2 -0
- package/dist/v1/language/view/index.js +1 -0
- package/dist/v1/language/view/model/view.d.ts +11 -0
- package/dist/v1/language/view/model/view.js +1 -0
- package/dist/v1/language/view/resolved.d.ts +9 -0
- package/dist/v1/language/view/resolved.js +1 -0
- package/dist/v1/schema/admission/accept.d.ts +3 -0
- package/dist/v1/schema/admission/accept.js +26 -0
- package/dist/v1/schema/analysis/class.d.ts +69 -0
- package/dist/v1/schema/analysis/class.js +145 -0
- package/dist/v1/schema/canonical/domain.d.ts +2 -2
- package/dist/v1/schema/canonical/domain.digest.d.ts +1 -2
- package/dist/v1/schema/canonical/domain.digest.js +2 -6
- package/dist/v1/schema/canonical/domain.js +3 -224
- package/dist/v1/schema/canonical/freeze.d.ts +0 -1
- package/dist/v1/schema/canonical/freeze.js +0 -1
- package/dist/v1/schema/canonical/revision.d.ts +11 -0
- package/dist/v1/schema/canonical/revision.js +20 -0
- package/dist/v1/schema/codec/header.d.ts +17 -0
- package/dist/v1/schema/codec/header.js +26 -0
- package/dist/v1/schema/codec/schema.d.ts +5 -0
- package/dist/v1/schema/codec/schema.js +21 -0
- package/dist/v1/schema/compatibility/api.d.ts +2 -0
- package/dist/v1/schema/compatibility/api.js +1 -0
- package/dist/v1/schema/compatibility/comparators/callables.d.ts +32 -0
- package/dist/v1/schema/compatibility/comparators/callables.js +88 -0
- package/dist/v1/schema/compatibility/comparators/classes.d.ts +28 -0
- package/dist/v1/schema/compatibility/comparators/classes.js +96 -0
- package/dist/v1/schema/compatibility/comparators/index.d.ts +12 -0
- package/dist/v1/schema/compatibility/comparators/index.js +41 -0
- package/dist/v1/schema/compatibility/comparators/members.d.ts +4 -0
- package/dist/v1/schema/compatibility/comparators/members.js +49 -0
- package/dist/v1/schema/compatibility/comparators/values.d.ts +5 -0
- package/dist/v1/schema/compatibility/comparators/values.js +37 -0
- package/dist/v1/schema/compatibility/compare.d.ts +5 -0
- package/dist/v1/schema/compatibility/compare.js +23 -0
- package/dist/v1/schema/compatibility/context.d.ts +15 -0
- package/dist/v1/schema/compatibility/context.js +43 -0
- package/dist/v1/schema/compatibility/coordinate.d.ts +39 -0
- package/dist/v1/schema/compatibility/coordinate.js +38 -0
- package/dist/v1/schema/compatibility/diff.d.ts +12 -0
- package/dist/v1/schema/compatibility/diff.js +39 -0
- package/dist/v1/schema/compatibility/evidence.d.ts +5 -0
- package/dist/v1/schema/compatibility/evidence.js +51 -0
- package/dist/v1/schema/compatibility/fields.d.ts +192 -0
- package/dist/v1/schema/compatibility/fields.js +93 -0
- package/dist/v1/schema/compatibility/index.d.ts +8 -0
- package/dist/v1/schema/compatibility/index.js +4 -0
- package/dist/v1/schema/compatibility/legacy/index.d.ts +58 -0
- package/dist/v1/schema/compatibility/legacy/index.js +145 -0
- package/dist/v1/schema/compatibility/meaning/footprint.d.ts +7 -0
- package/dist/v1/schema/compatibility/meaning/footprint.js +57 -0
- package/dist/v1/schema/compatibility/meaning/index.d.ts +3 -0
- package/dist/v1/schema/compatibility/meaning/index.js +14 -0
- package/dist/v1/schema/compatibility/model.d.ts +96 -0
- package/dist/v1/schema/compatibility/model.js +1 -0
- package/dist/v1/schema/compatibility/references.d.ts +30 -0
- package/dist/v1/schema/compatibility/references.js +122 -0
- package/dist/v1/schema/compatibility/report.d.ts +26 -0
- package/dist/v1/schema/compatibility/report.js +100 -0
- package/dist/v1/schema/compatibility/scope.d.ts +27 -0
- package/dist/v1/schema/compatibility/scope.js +78 -0
- package/dist/v1/schema/compatibility/structure/index.d.ts +3 -0
- package/dist/v1/schema/compatibility/structure/index.js +16 -0
- package/dist/v1/schema/compatibility/structure/inheritance.d.ts +7 -0
- package/dist/v1/schema/compatibility/structure/inheritance.js +68 -0
- package/dist/v1/schema/compatibility/structure/requirements.d.ts +7 -0
- package/dist/v1/schema/compatibility/structure/requirements.js +70 -0
- package/dist/v1/schema/compatibility/subjects.d.ts +34 -0
- package/dist/v1/schema/compatibility/subjects.js +86 -0
- package/dist/v1/schema/dependency/lookup.d.ts +18 -0
- package/dist/v1/schema/dependency/lookup.js +31 -0
- package/dist/v1/schema/diagnostic.d.ts +7 -7
- package/dist/v1/schema/diagnostic.js +9 -9
- package/dist/v1/schema/fingerprint.d.ts +2 -0
- package/dist/v1/schema/fingerprint.js +1 -0
- package/dist/v1/schema/index.d.ts +27 -40
- package/dist/v1/schema/index.js +13 -18
- package/dist/v1/schema/model/format.d.ts +2 -0
- package/dist/v1/schema/model/format.js +2 -0
- package/dist/v1/schema/model/schema.d.ts +30 -0
- package/dist/v1/schema/model/schema.js +4 -0
- package/dist/v1/schema/normalization/domain.d.ts +2 -0
- package/dist/v1/schema/normalization/domain.js +234 -0
- package/dist/v1/schema/resolution/closure.d.ts +3 -4
- package/dist/v1/schema/resolution/closure.js +6 -7
- package/dist/v1/schema/resolution/context.d.ts +11 -12
- package/dist/v1/schema/resolution/context.js +82 -50
- package/dist/v1/schema/resolution/definition.index.d.ts +13 -35
- package/dist/v1/schema/resolution/definition.index.js +8 -18
- package/dist/v1/schema/resolution/domain.d.ts +4 -0
- package/dist/v1/schema/resolution/domain.js +120 -0
- package/dist/v1/schema/resolution/origins.d.ts +27 -14
- package/dist/v1/schema/resolution/origins.js +87 -58
- package/dist/v1/schema/resolution/value.registry.d.ts +3 -4
- package/dist/v1/schema/resolution/value.registry.js +7 -14
- package/dist/v1/schema/revision.d.ts +1 -0
- package/dist/v1/schema/revision.js +1 -0
- package/dist/v1/schema/validation/callable.d.ts +4 -0
- package/dist/v1/schema/validation/callable.js +39 -0
- package/dist/v1/schema/validation/class.d.ts +5 -0
- package/dist/v1/schema/validation/class.js +247 -0
- package/dist/v1/schema/validation/core.d.ts +5 -0
- package/dist/v1/schema/validation/core.js +318 -0
- package/dist/v1/schema/validation/domain.d.ts +11 -0
- package/dist/v1/schema/validation/domain.js +38 -0
- package/dist/v1/schema/validation/domain.route.d.ts +1 -2
- package/dist/v1/schema/validation/domain.route.js +3 -4
- package/dist/v1/schema/validation/domain.structure.d.ts +3 -4
- package/dist/v1/schema/validation/domain.structure.js +234 -218
- package/dist/v1/schema/validation/policy/budgets.d.ts +4 -0
- package/dist/v1/schema/validation/policy/budgets.js +119 -0
- package/dist/v1/schema/validation/policy/context.d.ts +28 -0
- package/dist/v1/schema/validation/policy/context.js +89 -0
- package/dist/v1/schema/validation/policy/objects.d.ts +4 -0
- package/dist/v1/schema/validation/policy/objects.js +71 -0
- package/dist/v1/schema/validation/policy/references.d.ts +2 -0
- package/dist/v1/schema/validation/policy/references.js +155 -0
- package/dist/v1/schema/validation/policy/typing.d.ts +19 -0
- package/dist/v1/schema/validation/policy/typing.js +347 -0
- package/dist/v1/schema/validation/policy/uses.d.ts +5 -0
- package/dist/v1/schema/validation/policy/uses.js +196 -0
- package/dist/v1/schema/validation/policy/validate.d.ts +11 -0
- package/dist/v1/schema/validation/policy/validate.js +23 -0
- package/dist/v1/schema/validation/value-api.d.ts +15 -0
- package/dist/v1/schema/validation/value-api.js +24 -0
- package/dist/v1/schema/validation/value.d.ts +4 -5
- package/dist/v1/schema/validation/value.js +11 -10
- package/dist/v1/schema/validation/view.d.ts +3 -0
- package/dist/v1/schema/validation/view.js +29 -0
- package/dist/v1/value/full-match.d.ts +2 -0
- package/dist/v1/value/full-match.js +2 -0
- package/dist/v1.d.ts +1 -2
- package/dist/v1.js +1 -2
- package/dist/value/accept.d.ts +9 -1
- package/dist/value/accept.js +78 -6
- package/dist/value/canonical.d.ts +3 -1
- package/dist/value/canonical.js +13 -6
- package/dist/value/decode.d.ts +0 -1
- package/dist/value/decode.js +0 -1
- package/dist/value/equal.d.ts +0 -1
- package/dist/value/equal.js +0 -1
- package/dist/value/error.d.ts +0 -1
- package/dist/value/error.js +0 -1
- package/dist/value/immutable.optimization.d.ts +12 -0
- package/dist/value/immutable.optimization.js +28 -0
- package/dist/value/index.d.ts +1 -2
- package/dist/value/index.js +1 -2
- package/dist/value/json.d.ts +1 -2
- package/dist/value/json.js +1 -2
- package/dist/value/limits.d.ts +0 -1
- package/dist/value/limits.js +0 -1
- package/dist/value/types.d.ts +0 -1
- package/dist/value/types.js +0 -1
- package/dist/value/unicode.d.ts +1 -2
- package/dist/value/unicode.js +1 -1
- package/dist/version/dispatch.d.ts +0 -1
- package/dist/version/dispatch.js +0 -1
- package/dist/version/index.d.ts +0 -1
- package/dist/version/index.js +0 -1
- package/package.json +52 -21
- package/dist/index.d.ts.map +0 -1
- package/dist/index.js.map +0 -1
- package/dist/upgrade/contract.d.ts.map +0 -1
- package/dist/upgrade/contract.js.map +0 -1
- package/dist/upgrade/index.d.ts.map +0 -1
- package/dist/upgrade/index.js.map +0 -1
- package/dist/v1/addressing/index.d.ts.map +0 -1
- package/dist/v1/addressing/index.js.map +0 -1
- package/dist/v1/addressing/key.d.ts.map +0 -1
- package/dist/v1/addressing/key.js.map +0 -1
- package/dist/v1/addressing/patterns.d.ts.map +0 -1
- package/dist/v1/addressing/patterns.js.map +0 -1
- package/dist/v1/addressing/property-key.d.ts.map +0 -1
- package/dist/v1/addressing/property-key.js.map +0 -1
- package/dist/v1/addressing/ref.d.ts +0 -35
- package/dist/v1/addressing/ref.d.ts.map +0 -1
- package/dist/v1/addressing/ref.js +0 -94
- package/dist/v1/addressing/ref.js.map +0 -1
- package/dist/v1/addressing/schema-ref.d.ts +0 -8
- package/dist/v1/addressing/schema-ref.d.ts.map +0 -1
- package/dist/v1/addressing/schema-ref.js +0 -2
- package/dist/v1/addressing/schema-ref.js.map +0 -1
- package/dist/v1/builder/callable.d.ts +0 -91
- package/dist/v1/builder/callable.d.ts.map +0 -1
- package/dist/v1/builder/callable.js +0 -46
- package/dist/v1/builder/callable.js.map +0 -1
- package/dist/v1/builder/compiler/callable.d.ts +0 -20
- package/dist/v1/builder/compiler/callable.d.ts.map +0 -1
- package/dist/v1/builder/compiler/callable.js +0 -138
- package/dist/v1/builder/compiler/callable.js.map +0 -1
- package/dist/v1/builder/compiler/core.d.ts +0 -6
- package/dist/v1/builder/compiler/core.d.ts.map +0 -1
- package/dist/v1/builder/compiler/core.js +0 -44
- package/dist/v1/builder/compiler/core.js.map +0 -1
- package/dist/v1/builder/compiler/core.properties.d.ts +0 -6
- package/dist/v1/builder/compiler/core.properties.d.ts.map +0 -1
- package/dist/v1/builder/compiler/core.properties.js +0 -70
- package/dist/v1/builder/compiler/core.properties.js.map +0 -1
- package/dist/v1/builder/compiler/definition.d.ts +0 -32
- package/dist/v1/builder/compiler/definition.d.ts.map +0 -1
- package/dist/v1/builder/compiler/definition.js +0 -197
- package/dist/v1/builder/compiler/definition.js.map +0 -1
- package/dist/v1/builder/compiler/policy.d.ts +0 -17
- package/dist/v1/builder/compiler/policy.d.ts.map +0 -1
- package/dist/v1/builder/compiler/policy.js +0 -54
- package/dist/v1/builder/compiler/policy.js.map +0 -1
- package/dist/v1/builder/compiler/schema.capture.d.ts +0 -5
- package/dist/v1/builder/compiler/schema.capture.d.ts.map +0 -1
- package/dist/v1/builder/compiler/schema.capture.js +0 -85
- package/dist/v1/builder/compiler/schema.capture.js.map +0 -1
- package/dist/v1/builder/compiler/schema.context.d.ts +0 -45
- package/dist/v1/builder/compiler/schema.context.d.ts.map +0 -1
- package/dist/v1/builder/compiler/schema.context.js +0 -255
- package/dist/v1/builder/compiler/schema.context.js.map +0 -1
- package/dist/v1/builder/compiler/schema.d.ts +0 -10
- package/dist/v1/builder/compiler/schema.d.ts.map +0 -1
- package/dist/v1/builder/compiler/schema.js +0 -90
- package/dist/v1/builder/compiler/schema.js.map +0 -1
- package/dist/v1/builder/compiler/schema.ownership.d.ts +0 -9
- package/dist/v1/builder/compiler/schema.ownership.d.ts.map +0 -1
- package/dist/v1/builder/compiler/schema.ownership.js +0 -30
- package/dist/v1/builder/compiler/schema.ownership.js.map +0 -1
- package/dist/v1/builder/compiler/value.d.ts +0 -26
- package/dist/v1/builder/compiler/value.d.ts.map +0 -1
- package/dist/v1/builder/compiler/value.js +0 -160
- package/dist/v1/builder/compiler/value.js.map +0 -1
- package/dist/v1/builder/compiler/value.path.d.ts +0 -4
- package/dist/v1/builder/compiler/value.path.d.ts.map +0 -1
- package/dist/v1/builder/compiler/value.path.js +0 -21
- package/dist/v1/builder/compiler/value.path.js.map +0 -1
- package/dist/v1/builder/compiler/value.zod.d.ts +0 -33
- package/dist/v1/builder/compiler/value.zod.d.ts.map +0 -1
- package/dist/v1/builder/compiler/value.zod.js +0 -343
- package/dist/v1/builder/compiler/value.zod.js.map +0 -1
- package/dist/v1/builder/compiler/view.d.ts +0 -12
- package/dist/v1/builder/compiler/view.d.ts.map +0 -1
- package/dist/v1/builder/compiler/view.js +0 -27
- package/dist/v1/builder/compiler/view.js.map +0 -1
- package/dist/v1/builder/core.d.ts +0 -27
- package/dist/v1/builder/core.d.ts.map +0 -1
- package/dist/v1/builder/core.js +0 -21
- package/dist/v1/builder/core.js.map +0 -1
- package/dist/v1/builder/definition.d.ts +0 -155
- package/dist/v1/builder/definition.d.ts.map +0 -1
- package/dist/v1/builder/definition.js +0 -141
- package/dist/v1/builder/definition.js.map +0 -1
- package/dist/v1/builder/full-match.d.ts +0 -5
- package/dist/v1/builder/full-match.d.ts.map +0 -1
- package/dist/v1/builder/full-match.js +0 -12
- package/dist/v1/builder/full-match.js.map +0 -1
- package/dist/v1/builder/index.d.ts.map +0 -1
- package/dist/v1/builder/index.js.map +0 -1
- package/dist/v1/builder/internal/authoring.d.ts +0 -8
- package/dist/v1/builder/internal/authoring.d.ts.map +0 -1
- package/dist/v1/builder/internal/authoring.js +0 -15
- package/dist/v1/builder/internal/authoring.js.map +0 -1
- package/dist/v1/builder/internal/authoring.lazy.d.ts +0 -3
- package/dist/v1/builder/internal/authoring.lazy.d.ts.map +0 -1
- package/dist/v1/builder/internal/authoring.lazy.js +0 -14
- package/dist/v1/builder/internal/authoring.lazy.js.map +0 -1
- package/dist/v1/builder/internal/diagnostic.d.ts +0 -4
- package/dist/v1/builder/internal/diagnostic.d.ts.map +0 -1
- package/dist/v1/builder/internal/diagnostic.js +0 -16
- package/dist/v1/builder/internal/diagnostic.js.map +0 -1
- package/dist/v1/builder/internal/path.metadata.d.ts +0 -5
- package/dist/v1/builder/internal/path.metadata.d.ts.map +0 -1
- package/dist/v1/builder/internal/path.metadata.js +0 -8
- package/dist/v1/builder/internal/path.metadata.js.map +0 -1
- package/dist/v1/builder/path.d.ts +0 -9
- package/dist/v1/builder/path.d.ts.map +0 -1
- package/dist/v1/builder/path.js +0 -12
- package/dist/v1/builder/path.js.map +0 -1
- package/dist/v1/builder/policy.d.ts +0 -50
- package/dist/v1/builder/policy.d.ts.map +0 -1
- package/dist/v1/builder/policy.js +0 -79
- package/dist/v1/builder/policy.js.map +0 -1
- package/dist/v1/builder/property.d.ts +0 -37
- package/dist/v1/builder/property.d.ts.map +0 -1
- package/dist/v1/builder/property.js +0 -36
- package/dist/v1/builder/property.js.map +0 -1
- package/dist/v1/builder/schema.d.ts +0 -6
- package/dist/v1/builder/schema.d.ts.map +0 -1
- package/dist/v1/builder/schema.input.d.ts +0 -19
- package/dist/v1/builder/schema.input.d.ts.map +0 -1
- package/dist/v1/builder/schema.input.js +0 -2
- package/dist/v1/builder/schema.input.js.map +0 -1
- package/dist/v1/builder/schema.js +0 -6
- package/dist/v1/builder/schema.js.map +0 -1
- package/dist/v1/builder/value-schema.d.ts +0 -17
- package/dist/v1/builder/value-schema.d.ts.map +0 -1
- package/dist/v1/builder/value-schema.js +0 -11
- package/dist/v1/builder/value-schema.js.map +0 -1
- package/dist/v1/builder/view.d.ts +0 -19
- package/dist/v1/builder/view.d.ts.map +0 -1
- package/dist/v1/builder/view.js +0 -7
- package/dist/v1/builder/view.js.map +0 -1
- package/dist/v1/builder.d.ts +0 -3
- package/dist/v1/builder.d.ts.map +0 -1
- package/dist/v1/builder.js +0 -2
- package/dist/v1/builder.js.map +0 -1
- package/dist/v1/bundle/codec.d.ts.map +0 -1
- package/dist/v1/bundle/codec.js.map +0 -1
- package/dist/v1/bundle/index.d.ts.map +0 -1
- package/dist/v1/bundle/index.js.map +0 -1
- package/dist/v1/bundle/model.d.ts.map +0 -1
- package/dist/v1/bundle/model.js.map +0 -1
- package/dist/v1/bundle/structure.d.ts.map +0 -1
- package/dist/v1/bundle/structure.js.map +0 -1
- package/dist/v1/bundle.d.ts +0 -3
- package/dist/v1/bundle.d.ts.map +0 -1
- package/dist/v1/bundle.js +0 -3
- package/dist/v1/bundle.js.map +0 -1
- package/dist/v1/index.d.ts.map +0 -1
- package/dist/v1/index.js.map +0 -1
- package/dist/v1/schema/callable.d.ts +0 -29
- package/dist/v1/schema/callable.d.ts.map +0 -1
- package/dist/v1/schema/callable.js +0 -2
- package/dist/v1/schema/callable.js.map +0 -1
- package/dist/v1/schema/canonical/domain.d.ts.map +0 -1
- package/dist/v1/schema/canonical/domain.digest.d.ts.map +0 -1
- package/dist/v1/schema/canonical/domain.digest.js.map +0 -1
- package/dist/v1/schema/canonical/domain.js.map +0 -1
- package/dist/v1/schema/canonical/freeze.d.ts.map +0 -1
- package/dist/v1/schema/canonical/freeze.js.map +0 -1
- package/dist/v1/schema/compiled/admission.d.ts +0 -4
- package/dist/v1/schema/compiled/admission.d.ts.map +0 -1
- package/dist/v1/schema/compiled/admission.js +0 -217
- package/dist/v1/schema/compiled/admission.js.map +0 -1
- package/dist/v1/schema/compiled/authored-validator.d.ts +0 -5
- package/dist/v1/schema/compiled/authored-validator.d.ts.map +0 -1
- package/dist/v1/schema/compiled/authored-validator.js +0 -7
- package/dist/v1/schema/compiled/authored-validator.js.map +0 -1
- package/dist/v1/schema/compiled/compiler.d.ts +0 -5
- package/dist/v1/schema/compiled/compiler.d.ts.map +0 -1
- package/dist/v1/schema/compiled/compiler.js +0 -86
- package/dist/v1/schema/compiled/compiler.js.map +0 -1
- package/dist/v1/schema/compiled/model.d.ts +0 -61
- package/dist/v1/schema/compiled/model.d.ts.map +0 -1
- package/dist/v1/schema/compiled/model.js +0 -2
- package/dist/v1/schema/compiled/model.js.map +0 -1
- package/dist/v1/schema/compiled/program.d.ts +0 -5
- package/dist/v1/schema/compiled/program.d.ts.map +0 -1
- package/dist/v1/schema/compiled/program.js +0 -42
- package/dist/v1/schema/compiled/program.js.map +0 -1
- package/dist/v1/schema/compiled/validator.d.ts +0 -23
- package/dist/v1/schema/compiled/validator.d.ts.map +0 -1
- package/dist/v1/schema/compiled/validator.js +0 -62
- package/dist/v1/schema/compiled/validator.js.map +0 -1
- package/dist/v1/schema/core/declaration.d.ts +0 -17
- package/dist/v1/schema/core/declaration.d.ts.map +0 -1
- package/dist/v1/schema/core/declaration.js +0 -2
- package/dist/v1/schema/core/declaration.js.map +0 -1
- package/dist/v1/schema/core/validate.d.ts +0 -6
- package/dist/v1/schema/core/validate.d.ts.map +0 -1
- package/dist/v1/schema/core/validate.js +0 -257
- package/dist/v1/schema/core/validate.js.map +0 -1
- package/dist/v1/schema/definition/analysis.d.ts +0 -43
- package/dist/v1/schema/definition/analysis.d.ts.map +0 -1
- package/dist/v1/schema/definition/analysis.js +0 -190
- package/dist/v1/schema/definition/analysis.js.map +0 -1
- package/dist/v1/schema/definition/class.d.ts +0 -28
- package/dist/v1/schema/definition/class.d.ts.map +0 -1
- package/dist/v1/schema/definition/class.js +0 -2
- package/dist/v1/schema/definition/class.js.map +0 -1
- package/dist/v1/schema/definition/data.d.ts +0 -12
- package/dist/v1/schema/definition/data.d.ts.map +0 -1
- package/dist/v1/schema/definition/data.js +0 -3
- package/dist/v1/schema/definition/data.js.map +0 -1
- package/dist/v1/schema/definition/edge.d.ts +0 -35
- package/dist/v1/schema/definition/edge.d.ts.map +0 -1
- package/dist/v1/schema/definition/edge.js +0 -2
- package/dist/v1/schema/definition/edge.js.map +0 -1
- package/dist/v1/schema/definition/interface.d.ts +0 -22
- package/dist/v1/schema/definition/interface.d.ts.map +0 -1
- package/dist/v1/schema/definition/interface.js +0 -2
- package/dist/v1/schema/definition/interface.js.map +0 -1
- package/dist/v1/schema/definition/property.d.ts +0 -18
- package/dist/v1/schema/definition/property.d.ts.map +0 -1
- package/dist/v1/schema/definition/property.js +0 -2
- package/dist/v1/schema/definition/property.js.map +0 -1
- package/dist/v1/schema/definition/validate.d.ts +0 -5
- package/dist/v1/schema/definition/validate.d.ts.map +0 -1
- package/dist/v1/schema/definition/validate.js +0 -221
- package/dist/v1/schema/definition/validate.js.map +0 -1
- package/dist/v1/schema/dependency.meaning.d.ts +0 -30
- package/dist/v1/schema/dependency.meaning.d.ts.map +0 -1
- package/dist/v1/schema/dependency.meaning.js +0 -608
- package/dist/v1/schema/dependency.meaning.js.map +0 -1
- package/dist/v1/schema/diagnostic.d.ts.map +0 -1
- package/dist/v1/schema/diagnostic.js.map +0 -1
- package/dist/v1/schema/domain.accept.d.ts +0 -4
- package/dist/v1/schema/domain.accept.d.ts.map +0 -1
- package/dist/v1/schema/domain.accept.js +0 -27
- package/dist/v1/schema/domain.accept.js.map +0 -1
- package/dist/v1/schema/domain.codec.d.ts +0 -6
- package/dist/v1/schema/domain.codec.d.ts.map +0 -1
- package/dist/v1/schema/domain.codec.js +0 -22
- package/dist/v1/schema/domain.codec.js.map +0 -1
- package/dist/v1/schema/domain.header.d.ts +0 -15
- package/dist/v1/schema/domain.header.d.ts.map +0 -1
- package/dist/v1/schema/domain.header.js +0 -21
- package/dist/v1/schema/domain.header.js.map +0 -1
- package/dist/v1/schema/domain.ir.d.ts +0 -40
- package/dist/v1/schema/domain.ir.d.ts.map +0 -1
- package/dist/v1/schema/domain.ir.js +0 -5
- package/dist/v1/schema/domain.ir.js.map +0 -1
- package/dist/v1/schema/domain.lookup.d.ts +0 -19
- package/dist/v1/schema/domain.lookup.d.ts.map +0 -1
- package/dist/v1/schema/domain.lookup.js +0 -32
- package/dist/v1/schema/domain.lookup.js.map +0 -1
- package/dist/v1/schema/domain.resolve.d.ts +0 -26
- package/dist/v1/schema/domain.resolve.d.ts.map +0 -1
- package/dist/v1/schema/domain.resolve.js +0 -43
- package/dist/v1/schema/domain.resolve.js.map +0 -1
- package/dist/v1/schema/domain.revision.d.ts +0 -12
- package/dist/v1/schema/domain.revision.d.ts.map +0 -1
- package/dist/v1/schema/domain.revision.js +0 -18
- package/dist/v1/schema/domain.revision.js.map +0 -1
- package/dist/v1/schema/domain.validate.d.ts +0 -12
- package/dist/v1/schema/domain.validate.d.ts.map +0 -1
- package/dist/v1/schema/domain.validate.js +0 -36
- package/dist/v1/schema/domain.validate.js.map +0 -1
- package/dist/v1/schema/index.d.ts.map +0 -1
- package/dist/v1/schema/index.js.map +0 -1
- package/dist/v1/schema/metadata.d.ts +0 -13
- package/dist/v1/schema/metadata.d.ts.map +0 -1
- package/dist/v1/schema/metadata.js +0 -13
- package/dist/v1/schema/metadata.js.map +0 -1
- package/dist/v1/schema/policy/ast.d.ts +0 -77
- package/dist/v1/schema/policy/ast.d.ts.map +0 -1
- package/dist/v1/schema/policy/ast.js +0 -2
- package/dist/v1/schema/policy/ast.js.map +0 -1
- package/dist/v1/schema/policy/normalize.d.ts +0 -5
- package/dist/v1/schema/policy/normalize.d.ts.map +0 -1
- package/dist/v1/schema/policy/normalize.js +0 -230
- package/dist/v1/schema/policy/normalize.js.map +0 -1
- package/dist/v1/schema/policy/validation/branches.d.ts +0 -21
- package/dist/v1/schema/policy/validation/branches.d.ts.map +0 -1
- package/dist/v1/schema/policy/validation/branches.js +0 -155
- package/dist/v1/schema/policy/validation/branches.js.map +0 -1
- package/dist/v1/schema/policy/validation/budgets.d.ts +0 -19
- package/dist/v1/schema/policy/validation/budgets.d.ts.map +0 -1
- package/dist/v1/schema/policy/validation/budgets.js +0 -132
- package/dist/v1/schema/policy/validation/budgets.js.map +0 -1
- package/dist/v1/schema/policy/validation/context.d.ts +0 -28
- package/dist/v1/schema/policy/validation/context.d.ts.map +0 -1
- package/dist/v1/schema/policy/validation/context.js +0 -99
- package/dist/v1/schema/policy/validation/context.js.map +0 -1
- package/dist/v1/schema/policy/validation/references.d.ts +0 -3
- package/dist/v1/schema/policy/validation/references.d.ts.map +0 -1
- package/dist/v1/schema/policy/validation/references.js +0 -136
- package/dist/v1/schema/policy/validation/references.js.map +0 -1
- package/dist/v1/schema/policy/validation/typing.d.ts +0 -23
- package/dist/v1/schema/policy/validation/typing.d.ts.map +0 -1
- package/dist/v1/schema/policy/validation/typing.js +0 -360
- package/dist/v1/schema/policy/validation/typing.js.map +0 -1
- package/dist/v1/schema/policy/validation/uses.d.ts +0 -6
- package/dist/v1/schema/policy/validation/uses.d.ts.map +0 -1
- package/dist/v1/schema/policy/validation/uses.js +0 -272
- package/dist/v1/schema/policy/validation/uses.js.map +0 -1
- package/dist/v1/schema/policy/validation/validate.d.ts +0 -12
- package/dist/v1/schema/policy/validation/validate.d.ts.map +0 -1
- package/dist/v1/schema/policy/validation/validate.js +0 -24
- package/dist/v1/schema/policy/validation/validate.js.map +0 -1
- package/dist/v1/schema/reference.d.ts +0 -43
- package/dist/v1/schema/reference.d.ts.map +0 -1
- package/dist/v1/schema/reference.js +0 -31
- package/dist/v1/schema/reference.js.map +0 -1
- package/dist/v1/schema/resolution/closure.d.ts.map +0 -1
- package/dist/v1/schema/resolution/closure.js.map +0 -1
- package/dist/v1/schema/resolution/context.d.ts.map +0 -1
- package/dist/v1/schema/resolution/context.js.map +0 -1
- package/dist/v1/schema/resolution/definition.index.d.ts.map +0 -1
- package/dist/v1/schema/resolution/definition.index.js.map +0 -1
- package/dist/v1/schema/resolution/origins.d.ts.map +0 -1
- package/dist/v1/schema/resolution/origins.js.map +0 -1
- package/dist/v1/schema/resolution/value.registry.d.ts.map +0 -1
- package/dist/v1/schema/resolution/value.registry.js.map +0 -1
- package/dist/v1/schema/validation/domain.route.d.ts.map +0 -1
- package/dist/v1/schema/validation/domain.route.js.map +0 -1
- package/dist/v1/schema/validation/domain.structure.d.ts.map +0 -1
- package/dist/v1/schema/validation/domain.structure.js.map +0 -1
- package/dist/v1/schema/validation/value.d.ts.map +0 -1
- package/dist/v1/schema/validation/value.js.map +0 -1
- package/dist/v1/schema/value/extensions/node-path/schema.d.ts +0 -6
- package/dist/v1/schema/value/extensions/node-path/schema.d.ts.map +0 -1
- package/dist/v1/schema/value/extensions/node-path/schema.js +0 -19
- package/dist/v1/schema/value/extensions/node-path/schema.js.map +0 -1
- package/dist/v1/schema/value/extensions/node-path/validate.d.ts +0 -5
- package/dist/v1/schema/value/extensions/node-path/validate.d.ts.map +0 -1
- package/dist/v1/schema/value/extensions/node-path/validate.js +0 -80
- package/dist/v1/schema/value/extensions/node-path/validate.js.map +0 -1
- package/dist/v1/schema/value/full-match.d.ts +0 -7
- package/dist/v1/schema/value/full-match.d.ts.map +0 -1
- package/dist/v1/schema/value/full-match.js +0 -21
- package/dist/v1/schema/value/full-match.js.map +0 -1
- package/dist/v1/schema/value/index.d.ts +0 -14
- package/dist/v1/schema/value/index.d.ts.map +0 -1
- package/dist/v1/schema/value/index.js +0 -24
- package/dist/v1/schema/value/index.js.map +0 -1
- package/dist/v1/schema/value/instance/assertions.d.ts +0 -7
- package/dist/v1/schema/value/instance/assertions.d.ts.map +0 -1
- package/dist/v1/schema/value/instance/assertions.js +0 -59
- package/dist/v1/schema/value/instance/assertions.js.map +0 -1
- package/dist/v1/schema/value/instance/evaluator.d.ts +0 -5
- package/dist/v1/schema/value/instance/evaluator.d.ts.map +0 -1
- package/dist/v1/schema/value/instance/evaluator.js +0 -362
- package/dist/v1/schema/value/instance/evaluator.js.map +0 -1
- package/dist/v1/schema/value/instance/preparation.d.ts +0 -14
- package/dist/v1/schema/value/instance/preparation.d.ts.map +0 -1
- package/dist/v1/schema/value/instance/preparation.js +0 -137
- package/dist/v1/schema/value/instance/preparation.js.map +0 -1
- package/dist/v1/schema/value/instance/types.d.ts +0 -37
- package/dist/v1/schema/value/instance/types.d.ts.map +0 -1
- package/dist/v1/schema/value/instance/types.js +0 -10
- package/dist/v1/schema/value/instance/types.js.map +0 -1
- package/dist/v1/schema/value/instance.validate.d.ts +0 -13
- package/dist/v1/schema/value/instance.validate.d.ts.map +0 -1
- package/dist/v1/schema/value/instance.validate.js +0 -44
- package/dist/v1/schema/value/instance.validate.js.map +0 -1
- package/dist/v1/schema/value/instant.d.ts +0 -9
- package/dist/v1/schema/value/instant.d.ts.map +0 -1
- package/dist/v1/schema/value/instant.js +0 -37
- package/dist/v1/schema/value/instant.js.map +0 -1
- package/dist/v1/schema/value/location/keywords.d.ts +0 -4
- package/dist/v1/schema/value/location/keywords.d.ts.map +0 -1
- package/dist/v1/schema/value/location/keywords.js +0 -21
- package/dist/v1/schema/value/location/keywords.js.map +0 -1
- package/dist/v1/schema/value/location/pointer.d.ts +0 -5
- package/dist/v1/schema/value/location/pointer.d.ts.map +0 -1
- package/dist/v1/schema/value/location/pointer.js +0 -50
- package/dist/v1/schema/value/location/pointer.js.map +0 -1
- package/dist/v1/schema/value/location/walk.d.ts +0 -11
- package/dist/v1/schema/value/location/walk.d.ts.map +0 -1
- package/dist/v1/schema/value/location/walk.js +0 -54
- package/dist/v1/schema/value/location/walk.js.map +0 -1
- package/dist/v1/schema/value/object.d.ts +0 -5
- package/dist/v1/schema/value/object.d.ts.map +0 -1
- package/dist/v1/schema/value/object.js +0 -4
- package/dist/v1/schema/value/object.js.map +0 -1
- package/dist/v1/schema/value/ordering.d.ts +0 -11
- package/dist/v1/schema/value/ordering.d.ts.map +0 -1
- package/dist/v1/schema/value/ordering.js +0 -172
- package/dist/v1/schema/value/ordering.js.map +0 -1
- package/dist/v1/schema/value/profile/canonicalize.d.ts +0 -5
- package/dist/v1/schema/value/profile/canonicalize.d.ts.map +0 -1
- package/dist/v1/schema/value/profile/canonicalize.js +0 -133
- package/dist/v1/schema/value/profile/canonicalize.js.map +0 -1
- package/dist/v1/schema/value/profile/dialect.d.ts +0 -5
- package/dist/v1/schema/value/profile/dialect.d.ts.map +0 -1
- package/dist/v1/schema/value/profile/dialect.js +0 -36
- package/dist/v1/schema/value/profile/dialect.js.map +0 -1
- package/dist/v1/schema/value/profile/json.validate.d.ts +0 -3
- package/dist/v1/schema/value/profile/json.validate.d.ts.map +0 -1
- package/dist/v1/schema/value/profile/json.validate.js +0 -15
- package/dist/v1/schema/value/profile/json.validate.js.map +0 -1
- package/dist/v1/schema/value/profile/meta-schema.compiled.d.ts +0 -79
- package/dist/v1/schema/value/profile/meta-schema.compiled.d.ts.map +0 -1
- package/dist/v1/schema/value/profile/meta-schema.compiled.js +0 -2080
- package/dist/v1/schema/value/profile/meta-schema.compiled.js.map +0 -1
- package/dist/v1/schema/value/profile/meta-schema.d.ts +0 -5
- package/dist/v1/schema/value/profile/meta-schema.d.ts.map +0 -1
- package/dist/v1/schema/value/profile/meta-schema.js +0 -20
- package/dist/v1/schema/value/profile/meta-schema.js.map +0 -1
- package/dist/v1/schema/value/profile/rules.d.ts +0 -5
- package/dist/v1/schema/value/profile/rules.d.ts.map +0 -1
- package/dist/v1/schema/value/profile/rules.js +0 -152
- package/dist/v1/schema/value/profile/rules.js.map +0 -1
- package/dist/v1/schema/value/profile/validate.d.ts +0 -5
- package/dist/v1/schema/value/profile/validate.d.ts.map +0 -1
- package/dist/v1/schema/value/profile/validate.js +0 -47
- package/dist/v1/schema/value/profile/validate.js.map +0 -1
- package/dist/v1/schema/value/profile/vocabulary.d.ts +0 -3
- package/dist/v1/schema/value/profile/vocabulary.d.ts.map +0 -1
- package/dist/v1/schema/value/profile/vocabulary.js +0 -69
- package/dist/v1/schema/value/profile/vocabulary.js.map +0 -1
- package/dist/v1/schema/value/regexp/ast.d.ts +0 -22
- package/dist/v1/schema/value/regexp/ast.d.ts.map +0 -1
- package/dist/v1/schema/value/regexp/ast.js +0 -327
- package/dist/v1/schema/value/regexp/ast.js.map +0 -1
- package/dist/v1/schema/value/regexp/compile.d.ts +0 -4
- package/dist/v1/schema/value/regexp/compile.d.ts.map +0 -1
- package/dist/v1/schema/value/regexp/compile.js +0 -97
- package/dist/v1/schema/value/regexp/compile.js.map +0 -1
- package/dist/v1/schema/value/regexp/linear.d.ts +0 -20
- package/dist/v1/schema/value/regexp/linear.d.ts.map +0 -1
- package/dist/v1/schema/value/regexp/linear.js +0 -24
- package/dist/v1/schema/value/regexp/linear.js.map +0 -1
- package/dist/v1/schema/value/regexp/lower.d.ts +0 -4
- package/dist/v1/schema/value/regexp/lower.d.ts.map +0 -1
- package/dist/v1/schema/value/regexp/lower.js +0 -27
- package/dist/v1/schema/value/regexp/lower.js.map +0 -1
- package/dist/v1/schema/value/regexp/matcher.d.ts +0 -8
- package/dist/v1/schema/value/regexp/matcher.d.ts.map +0 -1
- package/dist/v1/schema/value/regexp/matcher.js +0 -51
- package/dist/v1/schema/value/regexp/matcher.js.map +0 -1
- package/dist/v1/schema/value/regexp/pattern.d.ts +0 -3
- package/dist/v1/schema/value/regexp/pattern.d.ts.map +0 -1
- package/dist/v1/schema/value/regexp/pattern.js +0 -39
- package/dist/v1/schema/value/regexp/pattern.js.map +0 -1
- package/dist/v1/schema/value/regexp/syntax.d.ts +0 -3
- package/dist/v1/schema/value/regexp/syntax.d.ts.map +0 -1
- package/dist/v1/schema/value/regexp/syntax.js +0 -6
- package/dist/v1/schema/value/regexp/syntax.js.map +0 -1
- package/dist/v1/schema/value/registry.d.ts +0 -22
- package/dist/v1/schema/value/registry.d.ts.map +0 -1
- package/dist/v1/schema/value/registry.js +0 -2
- package/dist/v1/schema/value/registry.js.map +0 -1
- package/dist/v1/schema/value/resources/closure.d.ts +0 -12
- package/dist/v1/schema/value/resources/closure.d.ts.map +0 -1
- package/dist/v1/schema/value/resources/closure.js +0 -59
- package/dist/v1/schema/value/resources/closure.js.map +0 -1
- package/dist/v1/schema/value/resources/recursion.d.ts +0 -6
- package/dist/v1/schema/value/resources/recursion.d.ts.map +0 -1
- package/dist/v1/schema/value/resources/recursion.js +0 -96
- package/dist/v1/schema/value/resources/recursion.js.map +0 -1
- package/dist/v1/schema/value/resources/references.d.ts +0 -25
- package/dist/v1/schema/value/resources/references.d.ts.map +0 -1
- package/dist/v1/schema/value/resources/references.js +0 -93
- package/dist/v1/schema/value/resources/references.js.map +0 -1
- package/dist/v1/schema/value/resources/registry.index.d.ts +0 -22
- package/dist/v1/schema/value/resources/registry.index.d.ts.map +0 -1
- package/dist/v1/schema/value/resources/registry.index.js +0 -114
- package/dist/v1/schema/value/resources/registry.index.js.map +0 -1
- package/dist/v1/schema/value/schema.d.ts +0 -26
- package/dist/v1/schema/value/schema.d.ts.map +0 -1
- package/dist/v1/schema/value/schema.js +0 -13
- package/dist/v1/schema/value/schema.js.map +0 -1
- package/dist/v1/schema/view/declaration.d.ts +0 -14
- package/dist/v1/schema/view/declaration.d.ts.map +0 -1
- package/dist/v1/schema/view/declaration.js +0 -2
- package/dist/v1/schema/view/declaration.js.map +0 -1
- package/dist/v1/schema/view/validate.d.ts +0 -4
- package/dist/v1/schema/view/validate.d.ts.map +0 -1
- package/dist/v1/schema/view/validate.js +0 -22
- package/dist/v1/schema/view/validate.js.map +0 -1
- package/dist/v1/schema.d.ts +0 -3
- package/dist/v1/schema.d.ts.map +0 -1
- package/dist/v1/schema.js +0 -3
- package/dist/v1/schema.js.map +0 -1
- package/dist/v1.d.ts.map +0 -1
- package/dist/v1.js.map +0 -1
- package/dist/value/accept.d.ts.map +0 -1
- package/dist/value/accept.js.map +0 -1
- package/dist/value/canonical.d.ts.map +0 -1
- package/dist/value/canonical.js.map +0 -1
- package/dist/value/decode.d.ts.map +0 -1
- package/dist/value/decode.js.map +0 -1
- package/dist/value/equal.d.ts.map +0 -1
- package/dist/value/equal.js.map +0 -1
- package/dist/value/error.d.ts.map +0 -1
- package/dist/value/error.js.map +0 -1
- package/dist/value/index.d.ts.map +0 -1
- package/dist/value/index.js.map +0 -1
- package/dist/value/json.d.ts.map +0 -1
- package/dist/value/json.js.map +0 -1
- package/dist/value/limits.d.ts.map +0 -1
- package/dist/value/limits.js.map +0 -1
- package/dist/value/types.d.ts.map +0 -1
- package/dist/value/types.js.map +0 -1
- package/dist/value/unicode.d.ts.map +0 -1
- package/dist/value/unicode.js.map +0 -1
- package/dist/version/dispatch.d.ts.map +0 -1
- package/dist/version/dispatch.js.map +0 -1
- package/dist/version/index.d.ts.map +0 -1
- package/dist/version/index.js.map +0 -1
|
@@ -1,24 +1,20 @@
|
|
|
1
|
-
import {
|
|
2
|
-
import {
|
|
3
|
-
import {
|
|
4
|
-
import {
|
|
1
|
+
import { compareDefinitionRefs, definitionRefIndex } from '../../addressing/ordering.js';
|
|
2
|
+
import { isBinaryInput } from '../../language/callable/model/callable.js';
|
|
3
|
+
import { policyVariableClass } from '../../language/policy/model/policy.js';
|
|
4
|
+
import { isValueObject as isJsonObject } from '../../language/value/model/object.js';
|
|
5
|
+
import { walkSchema } from '../../language/value/syntax/walk.js';
|
|
5
6
|
/** Collect only semantic refs, never strings or objects embedded as JSON data. */
|
|
6
7
|
export function collectUsedForeignOrigins(schema) {
|
|
7
|
-
return new Set(
|
|
8
|
+
return new Set(collectDomainDefinitionRefs(schema)
|
|
8
9
|
.filter((ref) => ref.origin !== schema.origin)
|
|
9
10
|
.map((ref) => ref.origin));
|
|
10
11
|
}
|
|
11
12
|
/** Complete structured references in one schema, in canonical order. */
|
|
12
|
-
export function
|
|
13
|
+
export function collectDomainDefinitionRefs(schema) {
|
|
13
14
|
const result = new Map();
|
|
14
15
|
const add = (ref) => {
|
|
15
|
-
result.set(
|
|
16
|
+
result.set(definitionRefIndex(ref), ref);
|
|
16
17
|
};
|
|
17
|
-
for (const value of Object.values(schema.types))
|
|
18
|
-
collectValueSchemaRefs(value, add);
|
|
19
|
-
for (const declaration of Object.values(schema.interfaces)) {
|
|
20
|
-
collectInterfaceRefs(declaration, add);
|
|
21
|
-
}
|
|
22
18
|
for (const declaration of Object.values(schema.classes)) {
|
|
23
19
|
collectClassRefs(declaration, add);
|
|
24
20
|
}
|
|
@@ -26,69 +22,102 @@ export function collectDomainSchemaRefs(schema) {
|
|
|
26
22
|
collectCallableRefs(declaration, add);
|
|
27
23
|
}
|
|
28
24
|
for (const declaration of Object.values(schema.policies)) {
|
|
29
|
-
|
|
25
|
+
collectPolicyDefinitionRefs(declaration, add);
|
|
30
26
|
}
|
|
31
27
|
for (const declaration of Object.values(schema.views)) {
|
|
32
|
-
if (declaration.target.kind === 'definition')
|
|
33
|
-
declaration.target.definitions.forEach(add);
|
|
28
|
+
if (declaration.target.kind === 'definition') {
|
|
29
|
+
declaration.target.definitions.forEach((ref) => add(ref, 'view'));
|
|
30
|
+
}
|
|
34
31
|
}
|
|
35
|
-
|
|
36
|
-
|
|
37
|
-
for (const edge of schema.core.edges)
|
|
38
|
-
add(edge.class);
|
|
39
|
-
return Object.freeze([...result.values()].sort(compareSchemaRefs));
|
|
32
|
+
collectCoreRefs(schema, add);
|
|
33
|
+
return Object.freeze([...result.values()].sort(compareDefinitionRefs));
|
|
40
34
|
}
|
|
41
|
-
export function
|
|
42
|
-
|
|
43
|
-
|
|
44
|
-
|
|
45
|
-
|
|
35
|
+
export function collectCoreRefs(schema, add) {
|
|
36
|
+
for (const node of Object.values(schema.core.nodes))
|
|
37
|
+
add(node.class, 'core');
|
|
38
|
+
for (const edge of schema.core.edges) {
|
|
39
|
+
add(edge.class, 'core');
|
|
40
|
+
for (const endpoint of [edge.source, edge.target]) {
|
|
41
|
+
const ref = coreEndpointDefinitionRef(endpoint);
|
|
42
|
+
// An endpoint names the Definition without instantiating it, exactly like an accepts contract.
|
|
43
|
+
if (ref !== undefined)
|
|
44
|
+
add(ref, 'endpoint');
|
|
45
|
+
}
|
|
46
46
|
}
|
|
47
|
-
|
|
48
|
-
|
|
47
|
+
}
|
|
48
|
+
/** The owning Domain addresses no Definition, and a Method is addressed through its owner Class. */
|
|
49
|
+
export function coreEndpointDefinitionRef(endpoint) {
|
|
50
|
+
if (endpoint.kind === 'domain')
|
|
51
|
+
return undefined;
|
|
52
|
+
return endpoint.kind === 'method' ? endpoint.owner : endpoint;
|
|
49
53
|
}
|
|
50
54
|
export function collectClassRefs(declaration, add) {
|
|
51
|
-
declaration.
|
|
52
|
-
|
|
53
|
-
|
|
55
|
+
declaration.extends.forEach((ref) => add(ref, 'extends'));
|
|
56
|
+
Object.values(declaration.properties).forEach((property) => collectValueDefinitionRefs(property.schema, add));
|
|
57
|
+
collectClassPolicyRefs(declaration, add);
|
|
58
|
+
if (declaration.kind === 'edge') {
|
|
54
59
|
collectEndpointRefs(declaration, add);
|
|
55
60
|
return;
|
|
56
61
|
}
|
|
57
62
|
Object.values(declaration.methods).forEach((method) => collectCallableRefs(method, add));
|
|
63
|
+
}
|
|
64
|
+
export function collectClassPolicyRefs(declaration, add) {
|
|
58
65
|
if (declaration.policies.read !== undefined)
|
|
59
|
-
add(declaration.policies.read);
|
|
66
|
+
add(declaration.policies.read, 'policy');
|
|
67
|
+
if (declaration.policies.traverse !== undefined)
|
|
68
|
+
add(declaration.policies.traverse, 'policy');
|
|
60
69
|
}
|
|
61
|
-
function collectEndpointRefs(declaration, add) {
|
|
70
|
+
export function collectEndpointRefs(declaration, add) {
|
|
62
71
|
const endpoints = declaration.orientation === 'directed'
|
|
63
72
|
? [declaration.endpoints.source, declaration.endpoints.target]
|
|
64
73
|
: declaration.endpoints;
|
|
65
|
-
endpoints[0].accepts.forEach(add);
|
|
66
|
-
endpoints[1].accepts.forEach(add);
|
|
74
|
+
endpoints[0].accepts.forEach((ref) => add(ref, 'endpoint'));
|
|
75
|
+
endpoints[1].accepts.forEach((ref) => add(ref, 'endpoint'));
|
|
67
76
|
}
|
|
68
77
|
export function collectCallableRefs(declaration, add) {
|
|
69
|
-
|
|
70
|
-
if (declaration.output.mode === 'value')
|
|
71
|
-
collectValueSchemaRefs(declaration.output.schema, add);
|
|
72
|
-
if (declaration.output.mode === 'stream')
|
|
73
|
-
collectValueSchemaRefs(declaration.output.item, add);
|
|
78
|
+
collectCallableContractRefs(declaration, add);
|
|
74
79
|
if (declaration.policy !== undefined)
|
|
75
80
|
collectPolicyCheckRefs(declaration.policy, add);
|
|
76
81
|
}
|
|
77
|
-
|
|
78
|
-
|
|
79
|
-
|
|
82
|
+
/** References inside the contract a caller compiles against: the input and output value schemas. */
|
|
83
|
+
export function collectCallableContractRefs(declaration, add) {
|
|
84
|
+
collectValueDefinitionRefs(isBinaryInput(declaration.input) ? declaration.input.metadata : declaration.input, add);
|
|
85
|
+
if (declaration.output.mode === 'value')
|
|
86
|
+
collectValueDefinitionRefs(declaration.output.schema, add);
|
|
87
|
+
if (declaration.output.mode === 'stream')
|
|
88
|
+
collectValueDefinitionRefs(declaration.output.item, add);
|
|
89
|
+
}
|
|
90
|
+
export function collectPolicyDefinitionRefs(declaration, add) {
|
|
91
|
+
collectPolicyExpressionRefs(declaration.expression, add);
|
|
92
|
+
}
|
|
93
|
+
function collectPolicyExpressionRefs(expression, add) {
|
|
94
|
+
if ('match' in expression) {
|
|
95
|
+
collectPolicyPatternRefs(expression.match, add);
|
|
80
96
|
return;
|
|
81
97
|
}
|
|
82
|
-
const refs = 'allOf' in
|
|
83
|
-
refs.forEach(add);
|
|
98
|
+
const refs = 'allOf' in expression ? expression.allOf : expression.anyOf;
|
|
99
|
+
refs.forEach((ref) => add(ref, 'policy'));
|
|
84
100
|
}
|
|
85
101
|
function collectPolicyPatternRefs(expression, add) {
|
|
102
|
+
if ('sameNode' in expression) {
|
|
103
|
+
for (const term of [expression.sameNode.left, expression.sameNode.right])
|
|
104
|
+
if (term.kind === 'ref')
|
|
105
|
+
add(term.ref.kind === 'method' ? term.ref.owner : term.ref, 'policy');
|
|
106
|
+
return;
|
|
107
|
+
}
|
|
86
108
|
if ('source' in expression) {
|
|
87
|
-
|
|
109
|
+
for (const term of [expression.source, expression.target])
|
|
110
|
+
if (term.kind === 'ref')
|
|
111
|
+
add(term.ref.kind === 'method' ? term.ref.owner : term.ref, 'policy');
|
|
112
|
+
add(expression.class, 'policy');
|
|
88
113
|
return;
|
|
89
114
|
}
|
|
90
115
|
if ('exists' in expression) {
|
|
91
|
-
expression.exists.nodes.forEach((node) =>
|
|
116
|
+
expression.exists.nodes.forEach((node) => {
|
|
117
|
+
const ref = policyVariableClass(node);
|
|
118
|
+
if (ref !== undefined)
|
|
119
|
+
add(ref, 'policy');
|
|
120
|
+
});
|
|
92
121
|
collectPolicyPatternRefs(expression.exists.where, add);
|
|
93
122
|
return;
|
|
94
123
|
}
|
|
@@ -96,26 +125,27 @@ function collectPolicyPatternRefs(expression, add) {
|
|
|
96
125
|
children.forEach((child) => collectPolicyPatternRefs(child, add));
|
|
97
126
|
}
|
|
98
127
|
function collectPolicyCheckRefs(expression, add) {
|
|
128
|
+
if ('sameNode' in expression) {
|
|
129
|
+
for (const term of [expression.sameNode.left, expression.sameNode.right])
|
|
130
|
+
if (term.kind === 'ref')
|
|
131
|
+
add(term.ref.kind === 'method' ? term.ref.owner : term.ref, 'policy');
|
|
132
|
+
return;
|
|
133
|
+
}
|
|
99
134
|
if ('check' in expression) {
|
|
100
|
-
add(expression.check);
|
|
135
|
+
add(expression.check, 'policy');
|
|
101
136
|
if (expression.object.kind === 'ref')
|
|
102
|
-
add(expression.object.ref
|
|
137
|
+
add(expression.object.ref.kind === 'method'
|
|
138
|
+
? expression.object.ref.owner
|
|
139
|
+
: expression.object.ref, 'policy');
|
|
103
140
|
return;
|
|
104
141
|
}
|
|
105
142
|
const children = 'allOf' in expression ? expression.allOf : expression.anyOf;
|
|
106
143
|
children.forEach((child) => collectPolicyCheckRefs(child, add));
|
|
107
144
|
}
|
|
108
|
-
export function
|
|
145
|
+
export function collectValueDefinitionRefs(schema, add) {
|
|
109
146
|
walkSchema(schema, ({ schema: current }) => {
|
|
110
147
|
if (!isJsonObject(current))
|
|
111
148
|
return;
|
|
112
|
-
if (typeof current.$ref === 'string') {
|
|
113
|
-
const named = parseNamedTypeReference(current.$ref);
|
|
114
|
-
if (named !== undefined) {
|
|
115
|
-
const ref = { origin: named.origin, kind: 'type', name: named.name };
|
|
116
|
-
add(ref);
|
|
117
|
-
}
|
|
118
|
-
}
|
|
119
149
|
const annotation = current['x-astrale-path'];
|
|
120
150
|
if (!isJsonObject(annotation) || !Array.isArray(annotation.accepts))
|
|
121
151
|
return;
|
|
@@ -124,9 +154,8 @@ export function collectValueSchemaRefs(schema, add) {
|
|
|
124
154
|
typeof candidate.origin === 'string' &&
|
|
125
155
|
typeof candidate.kind === 'string' &&
|
|
126
156
|
typeof candidate.name === 'string') {
|
|
127
|
-
add(candidate);
|
|
157
|
+
add(candidate, 'value');
|
|
128
158
|
}
|
|
129
159
|
}
|
|
130
160
|
});
|
|
131
161
|
}
|
|
132
|
-
//# sourceMappingURL=origins.js.map
|
|
@@ -1,8 +1,7 @@
|
|
|
1
|
-
import type {
|
|
2
|
-
import type { DomainSchemaLookup } from '../
|
|
3
|
-
import type {
|
|
1
|
+
import type { ValueSchemaRegistry } from '../../language/value/reference/registry.js';
|
|
2
|
+
import type { DomainSchemaLookup } from '../dependency/lookup.js';
|
|
3
|
+
import type { DomainSchema } from '../model/schema.js';
|
|
4
4
|
import type { DomainResolutionContext } from './context.js';
|
|
5
5
|
/** Build the exact value-schema resource closure for one installed Domain. */
|
|
6
6
|
export declare function createDomainValueSchemaRegistry(schema: DomainSchema, lookup?: DomainSchemaLookup): ValueSchemaRegistry;
|
|
7
7
|
export declare function createValueSchemaRegistry(context: DomainResolutionContext): ValueSchemaRegistry;
|
|
8
|
-
//# sourceMappingURL=value.registry.d.ts.map
|
|
@@ -1,5 +1,5 @@
|
|
|
1
|
-
import {
|
|
2
|
-
import {
|
|
1
|
+
import { graphNodePathSchema } from '../../language/value/syntax/node-path/schema.js';
|
|
2
|
+
import { revisionOfDomainSchema } from '../canonical/revision.js';
|
|
3
3
|
import { lookupForDomainClosure } from './closure.js';
|
|
4
4
|
import { buildDomainResolutionContext } from './context.js';
|
|
5
5
|
/** Build the exact value-schema resource closure for one installed Domain. */
|
|
@@ -9,7 +9,7 @@ export function createDomainValueSchemaRegistry(schema, lookup = lookupForDomain
|
|
|
9
9
|
export function createValueSchemaRegistry(context) {
|
|
10
10
|
const directDependencies = [];
|
|
11
11
|
const transitiveDependencies = [];
|
|
12
|
-
const directOrigins = new Set(context.candidate.dependencies.map(({ origin }) => origin));
|
|
12
|
+
const directOrigins = new Set(Object.values(context.candidate.dependencies).map(({ origin }) => origin));
|
|
13
13
|
for (const schema of context.dependencies.values()) {
|
|
14
14
|
const entry = {
|
|
15
15
|
...domainValueRegistry(schema),
|
|
@@ -28,19 +28,12 @@ export function createValueSchemaRegistry(context) {
|
|
|
28
28
|
});
|
|
29
29
|
}
|
|
30
30
|
function domainValueRegistry(schema) {
|
|
31
|
-
const nodeDefinitions =
|
|
32
|
-
|
|
33
|
-
|
|
34
|
-
.map(([name]) => ({ origin: schema.origin, kind: 'interface', name })),
|
|
35
|
-
...Object.entries(schema.classes)
|
|
36
|
-
.filter(([, declaration]) => declaration.family === 'node')
|
|
37
|
-
.map(([name]) => ({ origin: schema.origin, kind: 'class', name })),
|
|
38
|
-
];
|
|
31
|
+
const nodeDefinitions = Object.entries(schema.classes)
|
|
32
|
+
.filter(([, declaration]) => declaration.kind === 'node')
|
|
33
|
+
.map(([name]) => ({ origin: schema.origin, kind: 'class', name }));
|
|
39
34
|
return Object.freeze({
|
|
40
35
|
origin: schema.origin,
|
|
41
|
-
dependencies: schema.dependencies,
|
|
42
|
-
types: schema.types,
|
|
36
|
+
dependencies: Object.values(schema.dependencies),
|
|
43
37
|
nodeDefinitions: Object.freeze(nodeDefinitions),
|
|
44
38
|
});
|
|
45
39
|
}
|
|
46
|
-
//# sourceMappingURL=value.registry.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export { revisionOfDomainSchema as revision } from './canonical/revision.js';
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export { revisionOfDomainSchema as revision } from './canonical/revision.js';
|
|
@@ -0,0 +1,4 @@
|
|
|
1
|
+
import type { SchemaDiagnostic } from '../diagnostic.js';
|
|
2
|
+
import type { DomainSchemaIR } from '../model/schema.js';
|
|
3
|
+
/** Validate the execution modifier of every local Function and Node Method. */
|
|
4
|
+
export declare function validateCallables(schema: DomainSchemaIR): readonly SchemaDiagnostic[];
|
|
@@ -0,0 +1,39 @@
|
|
|
1
|
+
import { isBinaryInput } from '../../language/callable/model/callable.js';
|
|
2
|
+
import { diagnostic } from '../diagnostic.js';
|
|
3
|
+
/** Validate the execution modifier of every local Function and Node Method. */
|
|
4
|
+
export function validateCallables(schema) {
|
|
5
|
+
const diagnostics = [];
|
|
6
|
+
for (const [name, declaration] of Object.entries(schema.functions)) {
|
|
7
|
+
validateExecution(declaration, `/functions/${escapePointer(name)}`, diagnostics);
|
|
8
|
+
}
|
|
9
|
+
for (const [name, declaration] of Object.entries(schema.classes)) {
|
|
10
|
+
if (declaration.kind !== 'node')
|
|
11
|
+
continue;
|
|
12
|
+
for (const [method, value] of Object.entries(declaration.methods)) {
|
|
13
|
+
const pointer = `/classes/${escapePointer(name)}/methods/${escapePointer(method)}`;
|
|
14
|
+
validateExecution(value, pointer, diagnostics);
|
|
15
|
+
}
|
|
16
|
+
}
|
|
17
|
+
return Object.freeze(diagnostics);
|
|
18
|
+
}
|
|
19
|
+
/**
|
|
20
|
+
* An Execution records its initiating caller and its admitted input, from which the run is
|
|
21
|
+
* resubmitted, and retains one portable outcome. A durable callable therefore needs a known caller,
|
|
22
|
+
* a value input and a replayable value output.
|
|
23
|
+
*/
|
|
24
|
+
function validateExecution(declaration, pointer, diagnostics) {
|
|
25
|
+
if (declaration.execution?.durable !== true)
|
|
26
|
+
return;
|
|
27
|
+
if (declaration.auth === 'anonymous') {
|
|
28
|
+
diagnostics.push(diagnostic('DV_CALLABLE_AUTH', `${pointer}/auth`, 'A durable callable requires authenticated or authorized auth.'));
|
|
29
|
+
}
|
|
30
|
+
if (isBinaryInput(declaration.input)) {
|
|
31
|
+
diagnostics.push(diagnostic('DV_CALLABLE_IO', `${pointer}/input/mode`, 'A durable callable requires a value input.'));
|
|
32
|
+
}
|
|
33
|
+
if (declaration.output.mode !== 'value') {
|
|
34
|
+
diagnostics.push(diagnostic('DV_CALLABLE_IO', `${pointer}/output/mode`, 'A durable callable requires a value output.'));
|
|
35
|
+
}
|
|
36
|
+
}
|
|
37
|
+
function escapePointer(value) {
|
|
38
|
+
return value.replaceAll('~', '~0').replaceAll('/', '~1');
|
|
39
|
+
}
|
|
@@ -0,0 +1,5 @@
|
|
|
1
|
+
import type { DefinitionAnalysisResult } from '../analysis/class.js';
|
|
2
|
+
import type { SchemaDiagnostic } from '../diagnostic.js';
|
|
3
|
+
import type { DomainResolutionContext } from '../resolution/context.js';
|
|
4
|
+
/** Validate the semantic contracts owned by Class declarations. */
|
|
5
|
+
export declare function validateDefinitions(environment: DomainResolutionContext, analysis: DefinitionAnalysisResult): readonly SchemaDiagnostic[];
|
|
@@ -0,0 +1,247 @@
|
|
|
1
|
+
import { Key } from '../../addressing/key.js';
|
|
2
|
+
import { definitionRefIndex } from '../../addressing/ordering.js';
|
|
3
|
+
import { isMethodExecutable } from '../../language/callable/executable.js';
|
|
4
|
+
import { admitStateTopology } from '../../language/state/topology.js';
|
|
5
|
+
import { isBlobValueSchema } from '../../language/value/model/blob.js';
|
|
6
|
+
import { classifyOrdering } from '../../language/value/ordering.js';
|
|
7
|
+
import { diagnostic } from '../diagnostic.js';
|
|
8
|
+
import { createValueSchemaRegistry } from '../resolution/value.registry.js';
|
|
9
|
+
const formatDefinitionRef = Key.of;
|
|
10
|
+
/** Validate the semantic contracts owned by Class declarations. */
|
|
11
|
+
export function validateDefinitions(environment, analysis) {
|
|
12
|
+
const diagnostics = [...analysis.diagnostics];
|
|
13
|
+
const schema = environment.candidate;
|
|
14
|
+
for (const [name, declaration] of Object.entries(schema.classes)) {
|
|
15
|
+
const ref = localRef(schema.origin, name);
|
|
16
|
+
const pointer = `/classes/${escapePointer(name)}`;
|
|
17
|
+
if (!sameRef(declaration.ref, ref)) {
|
|
18
|
+
diagnostics.push(diagnostic('DV_REF_RESOLVES', `${pointer}/ref`, `Class ref must be exactly ${formatDefinitionRef(ref)}.`, formatDefinitionRef(declaration.ref)));
|
|
19
|
+
}
|
|
20
|
+
if (declaration.abstract &&
|
|
21
|
+
(declaration.policies.read !== undefined || declaration.policies.traverse !== undefined)) {
|
|
22
|
+
diagnostics.push(diagnostic('DV_CLASS_ABSTRACT', `${pointer}/policies`, 'Abstract Classes cannot declare observation Policies.'));
|
|
23
|
+
}
|
|
24
|
+
validateFacet(environment, declaration, pointer, diagnostics);
|
|
25
|
+
validateParents(environment, ref, declaration.kind, declaration.extends, diagnostics);
|
|
26
|
+
if (declaration.kind === 'edge') {
|
|
27
|
+
validateEdgeContract(environment, ref, declaration, diagnostics);
|
|
28
|
+
}
|
|
29
|
+
}
|
|
30
|
+
validateEdgeClassComposition(environment, diagnostics);
|
|
31
|
+
return Object.freeze(diagnostics);
|
|
32
|
+
}
|
|
33
|
+
function validateFacet(environment, declaration, pointer, diagnostics) {
|
|
34
|
+
const valueRegistry = createValueSchemaRegistry(environment);
|
|
35
|
+
for (const [name, property] of Object.entries(declaration.properties)) {
|
|
36
|
+
const propertyPointer = `${pointer}/properties/${escapePointer(name)}`;
|
|
37
|
+
if (isBlobValueSchema(property.schema) &&
|
|
38
|
+
(declaration.kind !== 'node' || property.auto !== undefined || property.state !== undefined)) {
|
|
39
|
+
diagnostics.push(diagnostic('DV_VALUE_SCHEMA', `${propertyPointer}/schema/x-astrale-value-kind`, 'Blob values are allowed only on non-automatic, non-state Node properties.'));
|
|
40
|
+
}
|
|
41
|
+
if (property.state !== undefined) {
|
|
42
|
+
if (declaration.kind !== 'node') {
|
|
43
|
+
diagnostics.push(diagnostic('DV_PROPERTY_STATE', `${propertyPointer}/state`, 'A State Property may be declared only on a Node Class.'));
|
|
44
|
+
}
|
|
45
|
+
try {
|
|
46
|
+
const topology = admitStateTopology(property.state);
|
|
47
|
+
const expected = Object.keys(topology.transitions).sort();
|
|
48
|
+
const schema = property.schema;
|
|
49
|
+
const schemaMatches = schema !== null &&
|
|
50
|
+
typeof schema === 'object' &&
|
|
51
|
+
!Array.isArray(schema) &&
|
|
52
|
+
Object.keys(schema).length === 2 &&
|
|
53
|
+
schema.type === 'string' &&
|
|
54
|
+
Array.isArray(schema.enum) &&
|
|
55
|
+
schema.enum.length === expected.length &&
|
|
56
|
+
[...schema.enum].sort().every((state, index) => state === expected[index]);
|
|
57
|
+
if (!property.required || property.auto !== undefined || !schemaMatches) {
|
|
58
|
+
diagnostics.push(diagnostic('DV_PROPERTY_STATE', `${propertyPointer}/state`, 'A State Property is required, non-automatic, and has exactly its declared states.'));
|
|
59
|
+
}
|
|
60
|
+
}
|
|
61
|
+
catch (error) {
|
|
62
|
+
diagnostics.push(diagnostic('DV_PROPERTY_STATE', `${propertyPointer}/state`, error instanceof Error ? error.message : 'Invalid State topology.'));
|
|
63
|
+
}
|
|
64
|
+
}
|
|
65
|
+
if (property.auto === undefined)
|
|
66
|
+
continue;
|
|
67
|
+
const autoPointer = `${propertyPointer}/auto`;
|
|
68
|
+
if (property.required && !property.auto.on.includes('create')) {
|
|
69
|
+
diagnostics.push(diagnostic('DV_PROPERTY_AUTO', `${autoPointer}/on`, 'A required auto Property must run on create.'));
|
|
70
|
+
}
|
|
71
|
+
if (property.auto.set === 'instant' &&
|
|
72
|
+
classifyOrdering(property.schema, valueRegistry) !== 'instant') {
|
|
73
|
+
diagnostics.push(diagnostic('DV_PROPERTY_AUTO', `${autoPointer}/set`, 'The instant setter requires an Instant value schema.'));
|
|
74
|
+
}
|
|
75
|
+
}
|
|
76
|
+
if (declaration.kind !== 'node')
|
|
77
|
+
return;
|
|
78
|
+
for (const [name, method] of Object.entries(declaration.methods)) {
|
|
79
|
+
const methodPointer = `${pointer}/methods/${escapePointer(name)}`;
|
|
80
|
+
if (!isMethodExecutable(declaration, method) && method.policy !== undefined) {
|
|
81
|
+
diagnostics.push(diagnostic('DV_METHOD_ABSTRACT', `${methodPointer}/policy`, 'Abstract Methods cannot have a Policy.'));
|
|
82
|
+
}
|
|
83
|
+
}
|
|
84
|
+
}
|
|
85
|
+
function validateParents(environment, owner, ownerKind, parents, diagnostics) {
|
|
86
|
+
for (const [index, parent] of parents.entries()) {
|
|
87
|
+
const target = environment.resolve(parent);
|
|
88
|
+
const pointer = `/classes/${escapePointer(owner.name)}/extends/${index}`;
|
|
89
|
+
if (target === undefined) {
|
|
90
|
+
diagnostics.push(diagnostic('DV_REF_RESOLVES', pointer, `Parent ${formatDefinitionRef(parent)} does not resolve exactly.`, formatDefinitionRef(parent)));
|
|
91
|
+
continue;
|
|
92
|
+
}
|
|
93
|
+
if (target.ref.kind !== 'class' || target.declaration.kind !== ownerKind) {
|
|
94
|
+
diagnostics.push(diagnostic('DV_CLASS_KIND', pointer, `${formatDefinitionRef(owner)} cannot extend different-kind Class ${formatDefinitionRef(parent)}.`, formatDefinitionRef(parent)));
|
|
95
|
+
}
|
|
96
|
+
}
|
|
97
|
+
}
|
|
98
|
+
function validateEdgeContract(environment, owner, declaration, diagnostics) {
|
|
99
|
+
const endpoints = declaration.orientation === 'directed'
|
|
100
|
+
? [declaration.endpoints.source, declaration.endpoints.target]
|
|
101
|
+
: declaration.endpoints;
|
|
102
|
+
if (endpoints[0].role === endpoints[1].role) {
|
|
103
|
+
diagnostics.push(diagnostic('DV_EDGE_ROLE', '', `${formatDefinitionRef(owner)} has equal endpoint roles.`));
|
|
104
|
+
}
|
|
105
|
+
validateEndpoint(environment, owner, endpoints[0], declaration.orientation === 'directed' ? 'source' : 'first endpoint', diagnostics);
|
|
106
|
+
validateEndpoint(environment, owner, endpoints[1], declaration.orientation === 'directed' ? 'target' : 'second endpoint', diagnostics);
|
|
107
|
+
if (declaration.orientation === 'undirected') {
|
|
108
|
+
if (!sameIncidentEndpointContract(declaration.endpoints[0], declaration.endpoints[1]) &&
|
|
109
|
+
undirectedEndpointsOverlap(environment, declaration.endpoints)) {
|
|
110
|
+
diagnostics.push(diagnostic('DV_EDGE_UNDIRECTED', '', `${formatDefinitionRef(owner)} has unequal undirected endpoint contracts whose accepted Node families overlap.`));
|
|
111
|
+
}
|
|
112
|
+
if (declaration.constraints.acyclic === true) {
|
|
113
|
+
diagnostics.push(diagnostic('DV_EDGE_CONSTRAINT', '', 'acyclic is valid only for directed Edge contracts.'));
|
|
114
|
+
}
|
|
115
|
+
}
|
|
116
|
+
}
|
|
117
|
+
function validateEndpoint(environment, owner, endpoint, side, diagnostics) {
|
|
118
|
+
const seen = new Set();
|
|
119
|
+
for (const ref of endpoint.accepts) {
|
|
120
|
+
const key = definitionRefIndex(ref);
|
|
121
|
+
if (seen.has(key)) {
|
|
122
|
+
diagnostics.push(diagnostic('DV_EDGE_ACCEPTS', '', `${formatDefinitionRef(owner)} ${side} repeats ${formatDefinitionRef(ref)}.`));
|
|
123
|
+
}
|
|
124
|
+
seen.add(key);
|
|
125
|
+
const resolved = environment.resolve(ref);
|
|
126
|
+
if (resolved === undefined ||
|
|
127
|
+
resolved.ref.kind !== 'class' ||
|
|
128
|
+
resolved.declaration.kind !== 'node') {
|
|
129
|
+
diagnostics.push(diagnostic('DV_EDGE_ACCEPTS', '', `${formatDefinitionRef(owner)} ${side} ref ${formatDefinitionRef(ref)} does not resolve to a Node Class.`));
|
|
130
|
+
}
|
|
131
|
+
}
|
|
132
|
+
}
|
|
133
|
+
/** Edge inheritance is refinement, not a second interface composition mechanism. */
|
|
134
|
+
function validateEdgeClassComposition(environment, diagnostics) {
|
|
135
|
+
for (const resolved of environment.definitions.values()) {
|
|
136
|
+
if (resolved.ref.kind !== 'class' || resolved.declaration.kind !== 'edge')
|
|
137
|
+
continue;
|
|
138
|
+
const child = resolved.declaration;
|
|
139
|
+
for (const parentRef of child.extends) {
|
|
140
|
+
const parent = environment.resolveAny(parentRef);
|
|
141
|
+
if (parent === undefined ||
|
|
142
|
+
parent.ref.kind !== 'class' ||
|
|
143
|
+
parent.declaration.kind !== 'edge') {
|
|
144
|
+
continue;
|
|
145
|
+
}
|
|
146
|
+
if (!edgeContractRefines(environment, child, parent.declaration)) {
|
|
147
|
+
diagnostics.push(diagnostic('DV_EDGE_CLASS_COMPOSITION', '', `${formatDefinitionRef(resolved.ref)} does not safely refine ${formatDefinitionRef(parentRef)}.`));
|
|
148
|
+
}
|
|
149
|
+
}
|
|
150
|
+
}
|
|
151
|
+
}
|
|
152
|
+
function edgeContractRefines(environment, child, parent) {
|
|
153
|
+
if (child.orientation !== parent.orientation)
|
|
154
|
+
return false;
|
|
155
|
+
if (parent.constraints.noSelf === true && child.constraints.noSelf !== true)
|
|
156
|
+
return false;
|
|
157
|
+
if (parent.constraints.acyclic === true && child.constraints.acyclic !== true)
|
|
158
|
+
return false;
|
|
159
|
+
if (child.orientation === 'directed' && parent.orientation === 'directed') {
|
|
160
|
+
return (endpointRefines(environment, child.endpoints.source, parent.endpoints.source) &&
|
|
161
|
+
countRefines(child.endpoints.source.outgoing, parent.endpoints.source.outgoing) &&
|
|
162
|
+
endpointRefines(environment, child.endpoints.target, parent.endpoints.target) &&
|
|
163
|
+
countRefines(child.endpoints.target.incoming, parent.endpoints.target.incoming));
|
|
164
|
+
}
|
|
165
|
+
if (child.orientation !== 'undirected' || parent.orientation !== 'undirected')
|
|
166
|
+
return false;
|
|
167
|
+
const refines = (childIndex, parentIndex) => endpointRefines(environment, child.endpoints[childIndex], parent.endpoints[parentIndex]) &&
|
|
168
|
+
countRefines(child.endpoints[childIndex].incident, parent.endpoints[parentIndex].incident);
|
|
169
|
+
const direct = refines(0, 0) && refines(1, 1);
|
|
170
|
+
if (direct)
|
|
171
|
+
return true;
|
|
172
|
+
return refines(0, 1) && refines(1, 0);
|
|
173
|
+
}
|
|
174
|
+
function endpointRefines(environment, child, parent) {
|
|
175
|
+
return child.accepts.every((accepted) => classSatisfies(environment, accepted, parent.accepts));
|
|
176
|
+
}
|
|
177
|
+
function countRefines(child, parent) {
|
|
178
|
+
const bounds = {
|
|
179
|
+
'0..*': [0, Number.POSITIVE_INFINITY],
|
|
180
|
+
'1..*': [1, Number.POSITIVE_INFINITY],
|
|
181
|
+
'0..1': [0, 1],
|
|
182
|
+
'1': [1, 1],
|
|
183
|
+
};
|
|
184
|
+
const [childMinimum, childMaximum] = bounds[child];
|
|
185
|
+
const [parentMinimum, parentMaximum] = bounds[parent];
|
|
186
|
+
return childMinimum >= parentMinimum && childMaximum <= parentMaximum;
|
|
187
|
+
}
|
|
188
|
+
function sameIncidentEndpointContract(left, right) {
|
|
189
|
+
if (left.incident !== right.incident)
|
|
190
|
+
return false;
|
|
191
|
+
const a = [...left.accepts].map(definitionRefIndex).sort();
|
|
192
|
+
const b = [...right.accepts].map(definitionRefIndex).sort();
|
|
193
|
+
return a.length === b.length && a.every((value, index) => value === b[index]);
|
|
194
|
+
}
|
|
195
|
+
function undirectedEndpointsOverlap(environment, endpoints) {
|
|
196
|
+
for (const resolved of environment.definitions.values()) {
|
|
197
|
+
if (resolved.ref.kind !== 'class' ||
|
|
198
|
+
resolved.declaration.kind !== 'node' ||
|
|
199
|
+
resolved.declaration.abstract) {
|
|
200
|
+
continue;
|
|
201
|
+
}
|
|
202
|
+
const candidate = resolved.ref;
|
|
203
|
+
if (classSatisfies(environment, candidate, endpoints[0].accepts) &&
|
|
204
|
+
classSatisfies(environment, candidate, endpoints[1].accepts)) {
|
|
205
|
+
return true;
|
|
206
|
+
}
|
|
207
|
+
}
|
|
208
|
+
return false;
|
|
209
|
+
}
|
|
210
|
+
function classSatisfies(environment, candidate, accepts) {
|
|
211
|
+
if (accepts.some((ref) => definitionRefIndex(ref) === definitionRefIndex(candidate)))
|
|
212
|
+
return true;
|
|
213
|
+
const resolved = environment.resolveAny(candidate);
|
|
214
|
+
if (resolved === undefined ||
|
|
215
|
+
resolved.ref.kind !== 'class' ||
|
|
216
|
+
resolved.declaration.kind !== 'node') {
|
|
217
|
+
return false;
|
|
218
|
+
}
|
|
219
|
+
return extendsAny(environment, resolved.declaration.extends, accepts, new Set());
|
|
220
|
+
}
|
|
221
|
+
function extendsAny(environment, parents, accepts, visited) {
|
|
222
|
+
const accepted = new Set(accepts.map(definitionRefIndex));
|
|
223
|
+
for (const parent of parents) {
|
|
224
|
+
const key = definitionRefIndex(parent);
|
|
225
|
+
if (accepted.has(key))
|
|
226
|
+
return true;
|
|
227
|
+
if (visited.has(key))
|
|
228
|
+
continue;
|
|
229
|
+
visited.add(key);
|
|
230
|
+
const resolved = environment.resolveAny(parent);
|
|
231
|
+
if (resolved !== undefined &&
|
|
232
|
+
resolved.ref.kind === 'class' &&
|
|
233
|
+
extendsAny(environment, resolved.declaration.extends, accepts, visited)) {
|
|
234
|
+
return true;
|
|
235
|
+
}
|
|
236
|
+
}
|
|
237
|
+
return false;
|
|
238
|
+
}
|
|
239
|
+
function localRef(origin, name) {
|
|
240
|
+
return { origin, kind: 'class', name };
|
|
241
|
+
}
|
|
242
|
+
function sameRef(left, right) {
|
|
243
|
+
return left.origin === right.origin && left.kind === right.kind && left.name === right.name;
|
|
244
|
+
}
|
|
245
|
+
function escapePointer(value) {
|
|
246
|
+
return value.replaceAll('~', '~0').replaceAll('/', '~1');
|
|
247
|
+
}
|
|
@@ -0,0 +1,5 @@
|
|
|
1
|
+
import type { ValueSchemaRegistry } from '../../language/value/reference/registry.js';
|
|
2
|
+
import type { DefinitionAnalysisResult } from '../analysis/class.js';
|
|
3
|
+
import type { SchemaDiagnostic } from '../diagnostic.js';
|
|
4
|
+
import type { DomainResolutionContext } from '../resolution/context.js';
|
|
5
|
+
export declare function validateCore(environment: DomainResolutionContext, analysis: DefinitionAnalysisResult, registry: ValueSchemaRegistry): readonly SchemaDiagnostic[];
|