@astrale-os/kernel-dsl 0.2.0-beta.5 → 0.2.0-beta.7
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 +8 -0
- package/dist/v1/addressing/domain-dependency.js +1 -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 +8 -3
- package/dist/v1/addressing/patterns.js +7 -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.d.ts → callable/authoring.d.ts} +28 -14
- package/dist/v1/builder/{callable.js → callable/authoring.js} +23 -5
- package/dist/v1/builder/class/authoring.d.ts +128 -0
- package/dist/v1/builder/class/authoring.js +135 -0
- package/dist/v1/builder/class/property.d.ts +52 -0
- package/dist/v1/builder/class/property.js +49 -0
- package/dist/v1/builder/core/authoring.d.ts +32 -0
- package/dist/v1/builder/{core.js → core/authoring.js} +5 -7
- package/dist/v1/builder/index.d.ts +25 -22
- package/dist/v1/builder/index.js +11 -11
- package/dist/v1/builder/lowering/callable.d.ts +24 -0
- package/dist/v1/builder/{compiler → lowering}/callable.js +11 -14
- package/dist/v1/builder/lowering/class.d.ts +22 -0
- package/dist/v1/builder/lowering/class.js +129 -0
- package/dist/v1/builder/lowering/core-properties.d.ts +10 -0
- package/dist/v1/builder/{compiler/core.properties.js → lowering/core-properties.js} +14 -8
- package/dist/v1/builder/lowering/core.d.ts +22 -0
- package/dist/v1/builder/{compiler → lowering}/core.js +9 -6
- package/dist/v1/builder/lowering/policy.d.ts +16 -0
- package/dist/v1/builder/{compiler → lowering}/policy.js +19 -14
- package/dist/v1/builder/{compiler/schema.capture.d.ts → lowering/schema/capture.d.ts} +2 -3
- package/dist/v1/builder/lowering/schema/capture.js +70 -0
- package/dist/v1/builder/{compiler/schema.d.ts → lowering/schema/compile.d.ts} +4 -4
- package/dist/v1/builder/{compiler/schema.js → lowering/schema/compile.js} +32 -42
- package/dist/v1/builder/lowering/schema/context.d.ts +46 -0
- package/dist/v1/builder/{compiler/schema.context.js → lowering/schema/context.js} +47 -60
- package/dist/v1/builder/{compiler/schema.ownership.d.ts → lowering/schema/ownership.d.ts} +1 -2
- package/dist/v1/builder/{compiler/schema.ownership.js → lowering/schema/ownership.js} +1 -2
- package/dist/v1/builder/lowering/value/compile.d.ts +15 -0
- package/dist/v1/builder/{compiler/value.js → lowering/value/compile.js} +34 -58
- package/dist/v1/builder/lowering/value/path.d.ts +3 -0
- package/dist/v1/builder/{compiler/value.path.js → lowering/value/path.js} +1 -2
- package/dist/v1/builder/{compiler/value.zod.d.ts → lowering/value/zod.d.ts} +4 -5
- package/dist/v1/builder/{compiler/value.zod.js → lowering/value/zod.js} +5 -6
- package/dist/v1/builder/lowering/view.d.ts +11 -0
- package/dist/v1/builder/{compiler → lowering}/view.js +7 -6
- package/dist/v1/builder/{policy.d.ts → policy/authoring.d.ts} +19 -17
- package/dist/v1/builder/{policy.js → policy/authoring.js} +23 -12
- package/dist/v1/builder/schema/define.d.ts +10 -0
- package/dist/v1/builder/{schema.js → schema/define.js} +1 -2
- package/dist/v1/builder/schema/diagnostic.d.ts +16 -0
- package/dist/v1/builder/schema/diagnostic.js +31 -0
- package/dist/v1/builder/{internal/authoring.d.ts → schema/handle.d.ts} +1 -2
- package/dist/v1/builder/{internal/authoring.js → schema/handle.js} +0 -1
- package/dist/v1/builder/schema/input.d.ts +15 -0
- package/dist/v1/builder/schema/input.js +1 -0
- package/dist/v1/builder/{internal/authoring.lazy.d.ts → schema/lazy.d.ts} +0 -1
- package/dist/v1/builder/{internal/authoring.lazy.js → schema/lazy.js} +0 -1
- package/dist/v1/builder/schema/projection.d.ts +247 -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/{internal/path.metadata.js → value/path-metadata.js} +0 -1
- package/dist/v1/builder/value/path.d.ts +8 -0
- package/dist/v1/builder/{path.js → value/path.js} +2 -3
- package/dist/v1/builder/{value-schema.d.ts → value/schema.d.ts} +2 -3
- package/dist/v1/builder/{value-schema.js → value/schema.js} +0 -1
- package/dist/v1/builder/view/authoring.d.ts +21 -0
- package/dist/v1/builder/view/authoring.js +11 -0
- package/dist/v1/bundle/codec.d.ts +0 -1
- package/dist/v1/bundle/codec.js +13 -13
- 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 +840 -0
- package/dist/v1/compiled/admission/revision.d.ts +4 -0
- package/dist/v1/compiled/admission/revision.js +73 -0
- package/dist/v1/compiled/admission/semantics.d.ts +7 -0
- package/dist/v1/compiled/admission/semantics.js +1091 -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 +113 -0
- package/dist/v1/compiled/diagnostic.d.ts +11 -0
- package/dist/v1/compiled/diagnostic.js +13 -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 +4 -0
- package/dist/v1/compiled/loader/load.js +139 -0
- package/dist/v1/compiled/model/schema.d.ts +73 -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 +192 -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 +53 -0
- package/dist/v1/domain/model/domain.js +1 -0
- package/dist/v1/domain/model/input.d.ts +27 -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 +200 -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 +12 -5
- package/dist/v1/index.js +5 -3
- 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 +33 -0
- package/dist/v1/language/callable/model/callable.js +1 -0
- package/dist/v1/language/callable/resolved.d.ts +68 -0
- package/dist/v1/language/callable/resolved.js +1 -0
- package/dist/v1/language/class/facets.d.ts +58 -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 +36 -0
- package/dist/v1/language/class/model/class.js +1 -0
- package/dist/v1/{schema/definition → language/class/model}/data.d.ts +2 -3
- package/dist/v1/{schema/definition → language/class/model}/data.js +0 -1
- package/dist/v1/{schema/definition → language/class/model}/edge.d.ts +9 -6
- package/dist/v1/language/class/model/edge.js +1 -0
- package/dist/v1/{schema/definition → language/class/model}/property.d.ts +6 -6
- 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 +30 -0
- package/dist/v1/language/class/resolved.d.ts +123 -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 +20 -0
- package/dist/v1/language/core/model/core.js +1 -0
- package/dist/v1/language/core/resolved.d.ts +21 -0
- package/dist/v1/language/core/resolved.js +1 -0
- package/dist/v1/{schema → language/definition}/metadata.d.ts +0 -1
- package/dist/v1/{schema → language/definition}/metadata.js +0 -1
- package/dist/v1/language/definition.d.ts +7 -0
- package/dist/v1/language/definition.js +1 -0
- package/dist/v1/language/index.d.ts +23 -0
- package/dist/v1/language/index.js +1 -0
- package/dist/v1/{schema/policy/validation → language/policy/analysis}/branches.d.ts +2 -4
- package/dist/v1/{schema/policy/validation → language/policy/analysis}/branches.js +5 -28
- package/dist/v1/{schema/policy/validation → language/policy/analysis}/budgets.d.ts +1 -4
- package/dist/v1/language/policy/analysis/budgets.js +25 -0
- package/dist/v1/language/policy/index.d.ts +3 -0
- package/dist/v1/language/policy/index.js +1 -0
- package/dist/v1/{schema/policy/ast.d.ts → language/policy/model/policy.d.ts} +7 -7
- package/dist/v1/language/policy/model/policy.js +1 -0
- package/dist/v1/language/policy/normalization/normalize.d.ts +4 -0
- package/dist/v1/{schema/policy → language/policy/normalization}/normalize.js +12 -16
- 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/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/{schema/compiled/program.d.ts → language/value/compile/load.d.ts} +1 -2
- package/dist/v1/{schema/compiled/program.js → language/value/compile/load.js} +2 -3
- package/dist/v1/language/value/compile/model.d.ts +27 -0
- package/dist/v1/language/value/compile/model.js +1 -0
- package/dist/v1/{schema/value/instance → language/value/evaluate}/assertions.d.ts +0 -1
- package/dist/v1/{schema/value/instance → language/value/evaluate}/assertions.js +1 -2
- package/dist/v1/{schema/value/instance → language/value/evaluate}/evaluator.d.ts +0 -1
- package/dist/v1/{schema/value/instance → language/value/evaluate}/evaluator.js +3 -4
- package/dist/v1/{schema/value/instance → language/value/evaluate}/preparation.d.ts +2 -3
- package/dist/v1/{schema/value/instance → language/value/evaluate}/preparation.js +6 -8
- package/dist/v1/language/value/evaluate/program.d.ts +3 -0
- package/dist/v1/language/value/evaluate/program.js +16 -0
- package/dist/v1/{schema/value/instance → language/value/evaluate}/types.d.ts +4 -5
- package/dist/v1/{schema/value/instance → language/value/evaluate}/types.js +0 -1
- package/dist/v1/{schema/value/instance.validate.d.ts → language/value/evaluate/validate.d.ts} +4 -5
- package/dist/v1/{schema/value/instance.validate.js → language/value/evaluate/validate.js} +4 -5
- package/dist/v1/language/value/index.d.ts +11 -0
- package/dist/v1/language/value/index.js +8 -0
- package/dist/v1/{schema/value → language/value/model}/instant.d.ts +1 -1
- package/dist/v1/{schema/value → language/value/model}/instant.js +1 -1
- package/dist/v1/{schema/value → language/value/model}/object.d.ts +1 -1
- package/dist/v1/{schema/value → language/value/model}/object.js +0 -1
- package/dist/v1/{schema/value → language/value/model}/schema.d.ts +3 -4
- package/dist/v1/{schema/value → language/value/model}/schema.js +0 -2
- package/dist/v1/{schema → language}/value/ordering.d.ts +5 -3
- package/dist/v1/{schema → language}/value/ordering.js +15 -13
- package/dist/v1/{schema → language}/value/profile/canonicalize.d.ts +2 -3
- package/dist/v1/{schema → language}/value/profile/canonicalize.js +4 -7
- package/dist/v1/language/value/profile/json.validate.d.ts +2 -0
- package/dist/v1/{schema → language}/value/profile/json.validate.js +1 -2
- package/dist/v1/{schema → language}/value/profile/meta-schema.compiled.d.ts +0 -1
- package/dist/v1/{schema → language}/value/profile/meta-schema.compiled.js +0 -1
- package/dist/v1/language/value/profile/meta-schema.d.ts +4 -0
- package/dist/v1/{schema → language}/value/profile/meta-schema.js +1 -2
- package/dist/v1/language/value/profile/rules.d.ts +3 -0
- package/dist/v1/{schema → language}/value/profile/rules.js +7 -50
- package/dist/v1/language/value/profile/validate.d.ts +4 -0
- package/dist/v1/{schema → language}/value/profile/validate.js +13 -21
- package/dist/v1/{schema → language}/value/profile/vocabulary.d.ts +0 -1
- package/dist/v1/{schema → language}/value/profile/vocabulary.js +0 -1
- package/dist/v1/language/value/reference/closure.d.ts +11 -0
- package/dist/v1/{schema/value/resources → language/value/reference}/closure.js +13 -21
- package/dist/v1/{schema/value/resources → language/value/reference}/recursion.d.ts +3 -4
- package/dist/v1/{schema/value/resources → language/value/reference}/recursion.js +5 -6
- package/dist/v1/language/value/reference/references.d.ts +17 -0
- package/dist/v1/language/value/reference/references.js +45 -0
- package/dist/v1/{schema/value → language/value/reference}/registry.d.ts +9 -7
- package/dist/v1/language/value/reference/registry.index.d.ts +14 -0
- package/dist/v1/{schema/value/resources → language/value/reference}/registry.index.js +7 -45
- package/dist/v1/language/value/reference/registry.js +1 -0
- package/dist/v1/{schema → language}/value/regexp/ast.d.ts +0 -1
- package/dist/v1/{schema → language}/value/regexp/ast.js +0 -1
- package/dist/v1/{schema → language}/value/regexp/compile.d.ts +1 -2
- package/dist/v1/{schema → language}/value/regexp/compile.js +0 -1
- package/dist/v1/{schema → language}/value/regexp/lower.d.ts +1 -2
- package/dist/v1/{schema → language}/value/regexp/lower.js +2 -3
- package/dist/v1/{schema → language}/value/regexp/matcher.d.ts +1 -2
- package/dist/v1/{schema → language}/value/regexp/matcher.js +0 -1
- package/dist/v1/{schema → language}/value/regexp/pattern.d.ts +0 -1
- package/dist/v1/{schema → language}/value/regexp/pattern.js +0 -1
- package/dist/v1/{schema → language}/value/regexp/syntax.d.ts +0 -1
- package/dist/v1/{schema → language}/value/regexp/syntax.js +0 -1
- package/dist/v1/{schema/value → language/value/syntax}/full-match.d.ts +0 -1
- package/dist/v1/{schema/value → language/value/syntax}/full-match.js +3 -4
- package/dist/v1/{schema/value/location → language/value/syntax}/keywords.d.ts +0 -1
- package/dist/v1/{schema/value/location → language/value/syntax}/keywords.js +0 -1
- package/dist/v1/{schema/value/extensions → language/value/syntax}/node-path/schema.d.ts +1 -2
- package/dist/v1/{schema/value/extensions → language/value/syntax}/node-path/schema.js +2 -3
- package/dist/v1/language/value/syntax/node-path/validate.d.ts +4 -0
- package/dist/v1/{schema/value/extensions → language/value/syntax}/node-path/validate.js +12 -12
- package/dist/v1/{schema/value/location → language/value/syntax}/pointer.d.ts +0 -1
- package/dist/v1/{schema/value/location → language/value/syntax}/pointer.js +1 -2
- package/dist/v1/{schema/value/location → language/value/syntax}/walk.d.ts +1 -2
- package/dist/v1/{schema/value/location → language/value/syntax}/walk.js +1 -2
- 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/{domain.accept.js → admission/accept.js} +8 -9
- package/dist/v1/schema/{definition/analysis.d.ts → analysis/class.d.ts} +15 -17
- package/dist/v1/schema/{definition/analysis.js → analysis/class.js} +21 -30
- 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 -223
- package/dist/v1/schema/canonical/freeze.d.ts +0 -1
- package/dist/v1/schema/canonical/freeze.js +0 -1
- package/dist/v1/schema/{domain.revision.d.ts → canonical/revision.d.ts} +2 -3
- package/dist/v1/schema/{domain.revision.js → canonical/revision.js} +3 -4
- package/dist/v1/schema/{domain.header.d.ts → codec/header.d.ts} +6 -4
- package/dist/v1/schema/codec/header.js +23 -0
- package/dist/v1/schema/{domain.codec.d.ts → codec/schema.d.ts} +2 -3
- package/dist/v1/schema/{domain.codec.js → codec/schema.js} +4 -5
- package/dist/v1/schema/{dependency.meaning.d.ts → compatibility/meaning.d.ts} +4 -5
- package/dist/v1/schema/{dependency.meaning.js → compatibility/meaning.js} +120 -123
- package/dist/v1/schema/{domain.lookup.d.ts → dependency/lookup.d.ts} +3 -4
- package/dist/v1/schema/{domain.lookup.js → dependency/lookup.js} +1 -2
- package/dist/v1/schema/diagnostic.d.ts +7 -7
- package/dist/v1/schema/diagnostic.js +9 -9
- package/dist/v1/schema/index.d.ts +24 -40
- package/dist/v1/schema/index.js +11 -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 +37 -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 +207 -0
- package/dist/v1/schema/resolution/closure.d.ts +2 -3
- package/dist/v1/schema/resolution/closure.js +5 -6
- package/dist/v1/schema/resolution/context.d.ts +11 -12
- package/dist/v1/schema/resolution/context.js +5 -5
- 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 +109 -0
- package/dist/v1/schema/resolution/origins.d.ts +11 -14
- package/dist/v1/schema/resolution/origins.js +31 -42
- package/dist/v1/schema/resolution/value.registry.d.ts +3 -4
- package/dist/v1/schema/resolution/value.registry.js +5 -12
- package/dist/v1/schema/revision.d.ts +1 -0
- package/dist/v1/schema/revision.js +1 -0
- package/dist/v1/schema/validation/class.d.ts +5 -0
- package/dist/v1/schema/validation/class.js +208 -0
- package/dist/v1/schema/validation/core.d.ts +5 -0
- package/dist/v1/schema/{core/validate.js → validation/core.js} +35 -28
- package/dist/v1/schema/validation/domain.d.ts +11 -0
- package/dist/v1/schema/{domain.validate.js → validation/domain.js} +12 -12
- 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 +1 -2
- package/dist/v1/schema/validation/domain.structure.js +53 -82
- package/dist/v1/schema/validation/policy/budgets.d.ts +4 -0
- package/dist/v1/schema/{policy/validation → validation/policy}/budgets.js +2 -32
- package/dist/v1/schema/validation/policy/context.d.ts +28 -0
- package/dist/v1/schema/{policy/validation → validation/policy}/context.js +23 -33
- package/dist/v1/schema/{policy/validation → validation/policy}/references.d.ts +0 -1
- package/dist/v1/schema/{policy/validation → validation/policy}/references.js +16 -9
- package/dist/v1/schema/{policy/validation → validation/policy}/typing.d.ts +4 -8
- package/dist/v1/schema/{policy/validation → validation/policy}/typing.js +24 -66
- package/dist/v1/schema/{policy/validation → validation/policy}/uses.d.ts +0 -1
- package/dist/v1/schema/{policy/validation → validation/policy}/uses.js +20 -34
- package/dist/v1/schema/{policy/validation → validation/policy}/validate.d.ts +3 -4
- package/dist/v1/schema/{policy/validation → validation/policy}/validate.js +0 -1
- package/dist/v1/schema/{value/index.d.ts → validation/value-api.d.ts} +9 -10
- package/dist/v1/schema/{value/index.js → validation/value-api.js} +4 -5
- package/dist/v1/schema/validation/value.d.ts +4 -5
- package/dist/v1/schema/validation/value.js +4 -9
- package/dist/v1/schema/validation/view.d.ts +3 -0
- package/dist/v1/schema/{view/validate.js → validation/view.js} +11 -4
- 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 +0 -1
- package/dist/value/accept.js +0 -1
- package/dist/value/canonical.d.ts +0 -1
- package/dist/value/canonical.js +0 -1
- 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/index.d.ts +0 -1
- package/dist/value/index.js +0 -1
- package/dist/value/json.d.ts +0 -1
- package/dist/value/json.js +0 -1
- 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 +0 -1
- package/dist/value/unicode.js +0 -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 +39 -19
- 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.map +0 -1
- 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.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.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.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.map +0 -1
- 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.map +0 -1
- package/dist/v1/builder/compiler/schema.d.ts.map +0 -1
- package/dist/v1/builder/compiler/schema.js.map +0 -1
- package/dist/v1/builder/compiler/schema.ownership.d.ts.map +0 -1
- 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.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.map +0 -1
- package/dist/v1/builder/compiler/value.zod.d.ts.map +0 -1
- 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.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.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.map +0 -1
- package/dist/v1/builder/internal/authoring.js.map +0 -1
- package/dist/v1/builder/internal/authoring.lazy.d.ts.map +0 -1
- 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.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.map +0 -1
- package/dist/v1/builder/policy.d.ts.map +0 -1
- 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.map +0 -1
- package/dist/v1/builder/value-schema.d.ts.map +0 -1
- package/dist/v1/builder/value-schema.js.map +0 -1
- package/dist/v1/builder/view.d.ts +0 -17
- 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.map +0 -1
- 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.map +0 -1
- package/dist/v1/schema/definition/analysis.d.ts.map +0 -1
- 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.map +0 -1
- package/dist/v1/schema/definition/data.js.map +0 -1
- 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.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.map +0 -1
- 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.map +0 -1
- package/dist/v1/schema/domain.codec.d.ts.map +0 -1
- package/dist/v1/schema/domain.codec.js.map +0 -1
- 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.map +0 -1
- 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.map +0 -1
- 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.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.map +0 -1
- package/dist/v1/schema/metadata.js.map +0 -1
- 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.map +0 -1
- package/dist/v1/schema/policy/validation/branches.d.ts.map +0 -1
- package/dist/v1/schema/policy/validation/branches.js.map +0 -1
- package/dist/v1/schema/policy/validation/budgets.d.ts.map +0 -1
- 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.map +0 -1
- package/dist/v1/schema/policy/validation/references.d.ts.map +0 -1
- package/dist/v1/schema/policy/validation/references.js.map +0 -1
- package/dist/v1/schema/policy/validation/typing.d.ts.map +0 -1
- package/dist/v1/schema/policy/validation/typing.js.map +0 -1
- package/dist/v1/schema/policy/validation/uses.d.ts.map +0 -1
- package/dist/v1/schema/policy/validation/uses.js.map +0 -1
- package/dist/v1/schema/policy/validation/validate.d.ts.map +0 -1
- 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.map +0 -1
- 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.map +0 -1
- package/dist/v1/schema/value/full-match.d.ts.map +0 -1
- package/dist/v1/schema/value/full-match.js.map +0 -1
- package/dist/v1/schema/value/index.d.ts.map +0 -1
- package/dist/v1/schema/value/index.js.map +0 -1
- package/dist/v1/schema/value/instance/assertions.d.ts.map +0 -1
- package/dist/v1/schema/value/instance/assertions.js.map +0 -1
- package/dist/v1/schema/value/instance/evaluator.d.ts.map +0 -1
- package/dist/v1/schema/value/instance/evaluator.js.map +0 -1
- package/dist/v1/schema/value/instance/preparation.d.ts.map +0 -1
- package/dist/v1/schema/value/instance/preparation.js.map +0 -1
- package/dist/v1/schema/value/instance/types.d.ts.map +0 -1
- package/dist/v1/schema/value/instance/types.js.map +0 -1
- package/dist/v1/schema/value/instance.validate.d.ts.map +0 -1
- package/dist/v1/schema/value/instance.validate.js.map +0 -1
- package/dist/v1/schema/value/instant.d.ts.map +0 -1
- package/dist/v1/schema/value/instant.js.map +0 -1
- package/dist/v1/schema/value/location/keywords.d.ts.map +0 -1
- package/dist/v1/schema/value/location/keywords.js.map +0 -1
- package/dist/v1/schema/value/location/pointer.d.ts.map +0 -1
- package/dist/v1/schema/value/location/pointer.js.map +0 -1
- package/dist/v1/schema/value/location/walk.d.ts.map +0 -1
- package/dist/v1/schema/value/location/walk.js.map +0 -1
- package/dist/v1/schema/value/object.d.ts.map +0 -1
- package/dist/v1/schema/value/object.js.map +0 -1
- package/dist/v1/schema/value/ordering.d.ts.map +0 -1
- package/dist/v1/schema/value/ordering.js.map +0 -1
- package/dist/v1/schema/value/profile/canonicalize.d.ts.map +0 -1
- 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.map +0 -1
- package/dist/v1/schema/value/profile/meta-schema.compiled.d.ts.map +0 -1
- 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.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.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.map +0 -1
- package/dist/v1/schema/value/profile/vocabulary.d.ts.map +0 -1
- package/dist/v1/schema/value/profile/vocabulary.js.map +0 -1
- package/dist/v1/schema/value/regexp/ast.d.ts.map +0 -1
- package/dist/v1/schema/value/regexp/ast.js.map +0 -1
- package/dist/v1/schema/value/regexp/compile.d.ts.map +0 -1
- 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.map +0 -1
- package/dist/v1/schema/value/regexp/lower.js.map +0 -1
- package/dist/v1/schema/value/regexp/matcher.d.ts.map +0 -1
- package/dist/v1/schema/value/regexp/matcher.js.map +0 -1
- package/dist/v1/schema/value/regexp/pattern.d.ts.map +0 -1
- package/dist/v1/schema/value/regexp/pattern.js.map +0 -1
- package/dist/v1/schema/value/regexp/syntax.d.ts.map +0 -1
- package/dist/v1/schema/value/regexp/syntax.js.map +0 -1
- 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.map +0 -1
- package/dist/v1/schema/value/resources/recursion.d.ts.map +0 -1
- 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.map +0 -1
- package/dist/v1/schema/value/schema.d.ts.map +0 -1
- package/dist/v1/schema/value/schema.js.map +0 -1
- package/dist/v1/schema/view/declaration.d.ts +0 -12
- 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.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,20 +1,30 @@
|
|
|
1
|
-
import {
|
|
2
|
-
import {
|
|
3
|
-
|
|
1
|
+
import { assertKnownKeys, fail } from '../schema/diagnostic.js';
|
|
2
|
+
import { authoringValue } from '../schema/handle.js';
|
|
3
|
+
const declarations = new WeakMap();
|
|
4
|
+
const compositions = new WeakSet();
|
|
5
|
+
export function policyDeclaration(value) {
|
|
6
|
+
const declaration = declarations.get(value);
|
|
7
|
+
if (declaration === undefined)
|
|
8
|
+
fail('BUILDER_POLICY', '/', 'Policies are created by policy(...).');
|
|
9
|
+
return declaration;
|
|
10
|
+
}
|
|
11
|
+
function createPolicy(input) {
|
|
4
12
|
if ('operator' in input) {
|
|
5
|
-
if (!
|
|
13
|
+
if (!compositions.has(input)) {
|
|
6
14
|
fail('BUILDER_POLICY_COMPOSITION', '/', 'Policy compositions are created by policy.allOf(...) or policy.anyOf(...).');
|
|
7
15
|
}
|
|
8
16
|
}
|
|
9
17
|
else {
|
|
10
18
|
assertKnownKeys(input, ['description', 'match']);
|
|
11
19
|
}
|
|
12
|
-
|
|
20
|
+
const value = authoringValue('policy', {});
|
|
21
|
+
declarations.set(value, input);
|
|
22
|
+
return value;
|
|
13
23
|
}
|
|
14
|
-
export const policy = Object.freeze({
|
|
15
|
-
allOf: (...
|
|
16
|
-
anyOf: (...
|
|
17
|
-
});
|
|
24
|
+
export const policy = Object.freeze(Object.assign(createPolicy, {
|
|
25
|
+
allOf: (first, ...rest) => createPolicy(composition('allOf', first === undefined ? [] : [first, ...rest])),
|
|
26
|
+
anyOf: (first, ...rest) => createPolicy(composition('anyOf', first === undefined ? [] : [first, ...rest])),
|
|
27
|
+
}));
|
|
18
28
|
export function createPatternContext(options) {
|
|
19
29
|
let nextVariable = 0;
|
|
20
30
|
const subject = Object.freeze({ kind: 'subject' });
|
|
@@ -67,13 +77,14 @@ export function createPatternContext(options) {
|
|
|
67
77
|
}
|
|
68
78
|
function composition(operator, policies) {
|
|
69
79
|
nonEmpty(policies, `/${operator}`);
|
|
70
|
-
|
|
80
|
+
const value = {
|
|
71
81
|
operator,
|
|
72
82
|
policies: [...policies],
|
|
73
|
-
}
|
|
83
|
+
};
|
|
84
|
+
compositions.add(value);
|
|
85
|
+
return value;
|
|
74
86
|
}
|
|
75
87
|
function nonEmpty(values, pointer) {
|
|
76
88
|
if (values.length === 0)
|
|
77
89
|
fail('BUILDER_POLICY_EMPTY_COMPOSITION', pointer, 'Policy composition must be non-empty.');
|
|
78
90
|
}
|
|
79
|
-
//# sourceMappingURL=policy.js.map
|
|
@@ -0,0 +1,10 @@
|
|
|
1
|
+
import type { DomainSchema } from '../../schema/model/schema.js';
|
|
2
|
+
import type { DomainSchemaInput } from './input.js';
|
|
3
|
+
import type { DomainOfInput } from './projection.js';
|
|
4
|
+
export type { DomainSchemaInput } from './input.js';
|
|
5
|
+
/** Exact named Schema produced from one authored input. */
|
|
6
|
+
export interface DefinedSchema<Origin extends string, Input extends DomainSchemaInput> extends DomainSchema<Origin, Input, DomainOfInput<Origin, Input>> {
|
|
7
|
+
}
|
|
8
|
+
/** Build and semantically accept one immutable V1 DomainSchema. */
|
|
9
|
+
export declare function defineSchema<const Origin extends string, const Input extends DomainSchemaInput>(origin: Origin, input: Input): DefinedSchema<Origin, Input>;
|
|
10
|
+
export type { DomainOfInput } from './projection.js';
|
|
@@ -1,6 +1,5 @@
|
|
|
1
|
-
import { compileSchema } from '
|
|
1
|
+
import { compileSchema } from '../lowering/schema/compile.js';
|
|
2
2
|
/** Build and semantically accept one immutable V1 DomainSchema. */
|
|
3
3
|
export function defineSchema(origin, input) {
|
|
4
4
|
return compileSchema(origin, input);
|
|
5
5
|
}
|
|
6
|
-
//# sourceMappingURL=schema.js.map
|
|
@@ -0,0 +1,16 @@
|
|
|
1
|
+
import type { DiagnosticCode as LanguageDiagnosticCode } from '../../language/validation/diagnostic.js';
|
|
2
|
+
export type BuilderDiagnosticCode = LanguageDiagnosticCode | 'BUILDER_ABSTRACT_POLICY' | 'BUILDER_AMBIGUOUS_OWNERSHIP' | 'BUILDER_AUTO_EVENT_INVALID' | 'BUILDER_AUTO_NESTED' | 'BUILDER_AUTO_SET_INVALID' | 'BUILDER_CALLABLE_AUTH' | 'BUILDER_CALLABLE_PLACEMENT' | 'BUILDER_CALLABLE_POLICY_AUTH' | 'BUILDER_CORE_CLASS' | 'BUILDER_CORE_EDGE' | 'BUILDER_CORE_NODE' | 'BUILDER_CORE_PROPERTY' | 'BUILDER_CORE_REF' | 'BUILDER_DEFINITION' | 'BUILDER_DEPENDENCY_CONFLICT' | 'BUILDER_DEPENDENCY_DIRECT' | 'BUILDER_DUPLICATE_MEMBER' | 'BUILDER_FOREIGN_POLICY' | 'BUILDER_FULL_MATCH_INVALID' | 'BUILDER_FUNCTION' | 'BUILDER_METHOD' | 'BUILDER_PATH_DUPLICATE' | 'BUILDER_PATH_EMPTY' | 'BUILDER_POLICY' | 'BUILDER_POLICY_COMPOSITION' | 'BUILDER_POLICY_CYCLE' | 'BUILDER_POLICY_EMPTY_COMPOSITION' | 'BUILDER_POLICY_EMPTY_EXISTS' | 'BUILDER_POLICY_INPUT' | 'BUILDER_POLICY_REF' | 'BUILDER_POLICY_SELF' | 'BUILDER_REFERENCE_CYCLE' | 'BUILDER_REFERENCE_KIND' | 'BUILDER_REFERENCE_MISSING' | 'BUILDER_UNKNOWN_FIELD' | 'BUILDER_UNOWNED_REFERENCE' | 'BUILDER_VIEW' | 'ZOD_SCHEMA_NOT_LOSSLESS';
|
|
3
|
+
export interface BuilderDiagnostic<out Code extends BuilderDiagnosticCode = BuilderDiagnosticCode> {
|
|
4
|
+
readonly code: Code;
|
|
5
|
+
readonly pointer: string;
|
|
6
|
+
readonly message: string;
|
|
7
|
+
readonly ref?: string;
|
|
8
|
+
}
|
|
9
|
+
export declare function diagnostic<const Code extends BuilderDiagnosticCode>(code: Code, pointer: string, message: string, ref?: string): BuilderDiagnostic<Code>;
|
|
10
|
+
export declare class BuilderError extends Error {
|
|
11
|
+
readonly diagnostics: readonly BuilderDiagnostic[];
|
|
12
|
+
constructor(diagnostics: readonly BuilderDiagnostic[]);
|
|
13
|
+
}
|
|
14
|
+
export declare function assertKnownKeys(value: object, allowed: readonly string[], pointer?: string): void;
|
|
15
|
+
export declare function fail(code: BuilderDiagnosticCode, pointer: string, message: string): never;
|
|
16
|
+
export declare function escapeToken(value: string): string;
|
|
@@ -0,0 +1,31 @@
|
|
|
1
|
+
import { compareUnicode } from '../../addressing/ordering.js';
|
|
2
|
+
export function diagnostic(code, pointer, message, ref) {
|
|
3
|
+
return Object.freeze({ code, pointer, message, ...(ref === undefined ? {} : { ref }) });
|
|
4
|
+
}
|
|
5
|
+
export class BuilderError extends Error {
|
|
6
|
+
diagnostics;
|
|
7
|
+
constructor(diagnostics) {
|
|
8
|
+
const ordered = [...diagnostics].sort((left, right) => compareUnicode(left.pointer, right.pointer) ||
|
|
9
|
+
compareUnicode(left.code, right.code) ||
|
|
10
|
+
compareUnicode(left.message, right.message));
|
|
11
|
+
super(ordered
|
|
12
|
+
.map(({ code, pointer, message }) => `${pointer || '/'} [${code}] ${message}`)
|
|
13
|
+
.join('\n'));
|
|
14
|
+
this.name = 'BuilderError';
|
|
15
|
+
this.diagnostics = Object.freeze(ordered);
|
|
16
|
+
}
|
|
17
|
+
}
|
|
18
|
+
export function assertKnownKeys(value, allowed, pointer = '') {
|
|
19
|
+
const accepted = new Set(allowed);
|
|
20
|
+
for (const key of Object.keys(value)) {
|
|
21
|
+
if (!accepted.has(key)) {
|
|
22
|
+
fail('BUILDER_UNKNOWN_FIELD', `${pointer}/${escapeToken(key)}`, `Unknown builder field ${key}.`);
|
|
23
|
+
}
|
|
24
|
+
}
|
|
25
|
+
}
|
|
26
|
+
export function fail(code, pointer, message) {
|
|
27
|
+
throw new BuilderError([diagnostic(code, pointer, message)]);
|
|
28
|
+
}
|
|
29
|
+
export function escapeToken(value) {
|
|
30
|
+
return value.replaceAll('~', '~0').replaceAll('/', '~1');
|
|
31
|
+
}
|
|
@@ -1,8 +1,7 @@
|
|
|
1
1
|
export declare const AUTHORING: unique symbol;
|
|
2
|
-
export type AuthoringKind = 'definition' | 'function' | 'callable-output' | 'policy' | 'view' | 'core-node' | 'core-edge' | 'property' | 'auto'
|
|
2
|
+
export type AuthoringKind = 'definition' | 'function' | 'method' | 'callable-output' | 'policy' | 'view' | 'core-node' | 'core-edge' | 'property' | 'auto';
|
|
3
3
|
export interface AuthoringValue<Kind extends AuthoringKind> {
|
|
4
4
|
readonly [AUTHORING]: Kind;
|
|
5
5
|
}
|
|
6
6
|
export declare function authoringValue<Kind extends AuthoringKind, Value extends object>(kind: Kind, value: Value): Readonly<Value & AuthoringValue<Kind>>;
|
|
7
7
|
export declare function isAuthoringValue<Kind extends AuthoringKind>(value: unknown, kind: Kind): value is AuthoringValue<Kind> & object;
|
|
8
|
-
//# sourceMappingURL=authoring.d.ts.map
|
|
@@ -0,0 +1,15 @@
|
|
|
1
|
+
import type { DomainSchema } from '../../schema/model/schema.js';
|
|
2
|
+
import type { Function } from '../callable/authoring.js';
|
|
3
|
+
import type { Class } from '../class/authoring.js';
|
|
4
|
+
import type { CoreInput } from '../core/authoring.js';
|
|
5
|
+
import type { Policy } from '../policy/authoring.js';
|
|
6
|
+
import type { View } from '../view/authoring.js';
|
|
7
|
+
/** Complete authoring input accepted by defineSchema. */
|
|
8
|
+
export interface DomainSchemaInput {
|
|
9
|
+
readonly dependencies?: readonly DomainSchema<string, unknown>[];
|
|
10
|
+
readonly classes?: Readonly<Record<string, Class>>;
|
|
11
|
+
readonly functions?: Readonly<Record<string, Function>>;
|
|
12
|
+
readonly policies?: Readonly<Record<string, Policy>>;
|
|
13
|
+
readonly views?: Readonly<Record<string, View>>;
|
|
14
|
+
readonly core?: CoreInput;
|
|
15
|
+
}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export {};
|
|
@@ -0,0 +1,247 @@
|
|
|
1
|
+
import type { Value as PortableValue } from '@astrale-os/kernel-dsl/value';
|
|
2
|
+
import type { z } from 'zod';
|
|
3
|
+
import type { Revision } from '../../addressing/index.js';
|
|
4
|
+
import type * as domain from '../../domain/model/domain.js';
|
|
5
|
+
import type * as language from '../../language/index.js';
|
|
6
|
+
import type { Function, Method, StreamOutput, BinaryOutput } from '../callable/authoring.js';
|
|
7
|
+
import type { Class, DirectedEdgeClass, NodeClass, UndirectedEdgeClass } from '../class/authoring.js';
|
|
8
|
+
import type { AutoProperty, Property, PropertyOptions, ValueSchemaInput } from '../class/property.js';
|
|
9
|
+
import type { TypedValueSchema } from '../value/schema.js';
|
|
10
|
+
import type { DomainSchemaInput } from './input.js';
|
|
11
|
+
export type DomainOfInput<Origin extends string, Input extends DomainSchemaInput> = domain.Domain<{
|
|
12
|
+
readonly [Name in keyof ClassesInputOf<Input>]: ResolvedClassOfAuthoring<Origin, Extract<Name, string>, ClassesInputOf<Input>[Name], Input>;
|
|
13
|
+
}, {
|
|
14
|
+
readonly [Name in keyof FunctionsInputOf<Input>]: ResolvedFunctionOfAuthoring<Origin, Extract<Name, string>, FunctionsInputOf<Input>[Name]>;
|
|
15
|
+
}, {
|
|
16
|
+
readonly [Name in keyof PoliciesInputOf<Input>]: language.ResolvedPolicy & {
|
|
17
|
+
readonly ref: language.PolicyRef<Extract<Name, string>> & {
|
|
18
|
+
readonly origin: Origin;
|
|
19
|
+
};
|
|
20
|
+
readonly key: language.DefinitionKey<Origin, 'policy', Extract<Name, string>>;
|
|
21
|
+
};
|
|
22
|
+
}, {
|
|
23
|
+
readonly [Name in keyof ViewsInputOf<Input>]: language.ResolvedView & {
|
|
24
|
+
readonly ref: language.ViewRef<Extract<Name, string>> & {
|
|
25
|
+
readonly origin: Origin;
|
|
26
|
+
};
|
|
27
|
+
readonly key: language.DefinitionKey<Origin, 'view', Extract<Name, string>>;
|
|
28
|
+
};
|
|
29
|
+
}, {
|
|
30
|
+
readonly [Name in keyof CoreNodesInputOf<Input>]: language.ResolvedCoreDefinition & {
|
|
31
|
+
readonly ref: language.CoreRef<Extract<Name, string>> & {
|
|
32
|
+
readonly origin: Origin;
|
|
33
|
+
};
|
|
34
|
+
readonly key: language.DefinitionKey<Origin, 'core', Extract<Name, string>>;
|
|
35
|
+
};
|
|
36
|
+
}, Revision>;
|
|
37
|
+
export type ResolvedClassOfAuthoring<Origin extends string, Name extends string, Value, Root extends DomainSchemaInput, Seen = Value> = Value extends NodeClass ? language.ResolvedClass<'node', PropertyCollectionOf<Origin, EffectivePropertyEntries<Value>, Root>, MethodCollectionOf<Origin, EffectiveMethodEntries<Value, false>, Root>, MethodCollectionOf<Origin, EffectiveMethodEntries<Value, true>, Root>, PropertyCollectionOf<Origin, OwnPropertyEntries<Value>, Root>, MethodCollectionOf<Origin, OwnMethodEntries<Value, false>, Root>, MethodCollectionOf<Origin, OwnMethodEntries<Value, true>, Root>, Extract<ProjectedClassDefinition<Origin, Name, Value>, language.NodeClassDefinition>, ResolvedParentsOf<Origin, Value, Root, Seen>> & {
|
|
38
|
+
readonly ref: language.ClassRef<Name> & {
|
|
39
|
+
readonly origin: Origin;
|
|
40
|
+
};
|
|
41
|
+
readonly key: language.DefinitionKey<Origin, 'class', Name>;
|
|
42
|
+
} : Value extends DirectedEdgeClass | UndirectedEdgeClass ? language.ResolvedClass<'edge', PropertyCollectionOf<Origin, EffectivePropertyEntries<Value>, Root>, EmptyMethodCollection, EmptyMethodCollection, PropertyCollectionOf<Origin, OwnPropertyEntries<Value>, Root>, EmptyMethodCollection, EmptyMethodCollection, Extract<ProjectedClassDefinition<Origin, Name, Value>, language.EdgeClassDefinition>, ResolvedParentsOf<Origin, Value, Root, Seen>> & {
|
|
43
|
+
readonly ref: language.ClassRef<Name> & {
|
|
44
|
+
readonly origin: Origin;
|
|
45
|
+
};
|
|
46
|
+
readonly key: language.DefinitionKey<Origin, 'class', Name>;
|
|
47
|
+
} : never;
|
|
48
|
+
type EmptyMethodCollection = language.ResolvedMethodCollection<Record<never, never>>;
|
|
49
|
+
type AbstractOf<Config> = Config extends {
|
|
50
|
+
readonly abstract: infer Abstract extends boolean;
|
|
51
|
+
} ? Abstract : false;
|
|
52
|
+
type ConstraintsOf<Options> = Options extends {
|
|
53
|
+
readonly constraints?: infer Constraints;
|
|
54
|
+
} ? NonNullable<Constraints> : Record<never, never>;
|
|
55
|
+
type ProjectedClassDefinition<Origin extends string, Name extends string, Value> = Value extends NodeClass<infer Config> ? language.NodeClassDefinition & {
|
|
56
|
+
readonly ref: language.ClassRef<Name> & {
|
|
57
|
+
readonly origin: Origin;
|
|
58
|
+
};
|
|
59
|
+
readonly kind: 'node';
|
|
60
|
+
readonly abstract: AbstractOf<Config>;
|
|
61
|
+
} : Value extends DirectedEdgeClass<infer Input> ? language.EdgeClassDefinition & {
|
|
62
|
+
readonly ref: language.ClassRef<Name> & {
|
|
63
|
+
readonly origin: Origin;
|
|
64
|
+
};
|
|
65
|
+
readonly kind: 'edge';
|
|
66
|
+
readonly abstract: AbstractOf<Input>;
|
|
67
|
+
readonly orientation: 'directed';
|
|
68
|
+
readonly endpoints: {
|
|
69
|
+
readonly source: language.DirectedSourceEndpoint & {
|
|
70
|
+
readonly role: Input['source']['as'];
|
|
71
|
+
readonly outgoing: Input['source']['outgoing'];
|
|
72
|
+
};
|
|
73
|
+
readonly target: language.DirectedTargetEndpoint & {
|
|
74
|
+
readonly role: Input['target']['as'];
|
|
75
|
+
readonly incoming: Input['target']['incoming'];
|
|
76
|
+
};
|
|
77
|
+
};
|
|
78
|
+
readonly constraints: language.DirectedEdgeConstraints & ConstraintsOf<Input>;
|
|
79
|
+
} : Value extends UndirectedEdgeClass<infer Input> ? language.EdgeClassDefinition & {
|
|
80
|
+
readonly ref: language.ClassRef<Name> & {
|
|
81
|
+
readonly origin: Origin;
|
|
82
|
+
};
|
|
83
|
+
readonly kind: 'edge';
|
|
84
|
+
readonly abstract: AbstractOf<Input>;
|
|
85
|
+
readonly orientation: 'undirected';
|
|
86
|
+
readonly endpoints: readonly [
|
|
87
|
+
language.IncidentEndpoint & {
|
|
88
|
+
readonly role: Input['endpoints'][0]['as'];
|
|
89
|
+
readonly incident: Input['endpoints'][0]['incident'];
|
|
90
|
+
},
|
|
91
|
+
language.IncidentEndpoint & {
|
|
92
|
+
readonly role: Input['endpoints'][1]['as'];
|
|
93
|
+
readonly incident: Input['endpoints'][1]['incident'];
|
|
94
|
+
}
|
|
95
|
+
];
|
|
96
|
+
readonly constraints: language.UndirectedEdgeConstraints & ConstraintsOf<Input>;
|
|
97
|
+
} : never;
|
|
98
|
+
type RecordField<Value, Key extends PropertyKey> = Key extends keyof Value ? NonNullable<Value[Key]> extends Readonly<Record<string, unknown>> ? NonNullable<Value[Key]> : Record<never, never> : Record<never, never>;
|
|
99
|
+
type ClassesInputOf<Input extends DomainSchemaInput> = RecordField<Input, 'classes'>;
|
|
100
|
+
type FunctionsInputOf<Input extends DomainSchemaInput> = RecordField<Input, 'functions'>;
|
|
101
|
+
type PoliciesInputOf<Input extends DomainSchemaInput> = RecordField<Input, 'policies'>;
|
|
102
|
+
type ViewsInputOf<Input extends DomainSchemaInput> = RecordField<Input, 'views'>;
|
|
103
|
+
type CoreInputOf<Input extends DomainSchemaInput> = Input extends {
|
|
104
|
+
readonly core?: infer CoreValue;
|
|
105
|
+
} ? NonNullable<CoreValue> : Record<never, never>;
|
|
106
|
+
type CoreNodesInputOf<Input extends DomainSchemaInput> = RecordField<CoreInputOf<Input>, 'nodes'>;
|
|
107
|
+
type ResolveLazy<Value, Depth extends readonly unknown[] = []> = Depth['length'] extends 32 ? Value : Value extends () => infer Resolved ? ResolveLazy<Resolved, readonly [...Depth, unknown]> : Value;
|
|
108
|
+
type ClassInputOf<Value> = Value extends NodeClass<infer Input> ? Input : Value extends DirectedEdgeClass<infer Input> ? Input : Value extends UndirectedEdgeClass<infer Input> ? Input : never;
|
|
109
|
+
type ParentsOf<Value> = ClassInputOf<Value> extends {
|
|
110
|
+
readonly extends?: readonly (infer Parent)[];
|
|
111
|
+
} ? ResolveLazy<Parent> : never;
|
|
112
|
+
type ParentInputsOf<Value> = ClassInputOf<Value> extends {
|
|
113
|
+
readonly extends?: infer Parents extends readonly unknown[];
|
|
114
|
+
} ? Parents : readonly [];
|
|
115
|
+
type ResolvedParentOf<Origin extends string, Parent, Root extends DomainSchemaInput, Seen> = ResolveLazy<Parent> extends infer Resolved ? Resolved extends language.ResolvedClass ? Resolved : LocalNameOf<Root, Resolved> extends infer Name extends string ? Resolved extends Seen ? Resolved extends NodeClass ? language.ResolvedClass<'node'> & {
|
|
116
|
+
readonly key: language.DefinitionKey<Origin, 'class', Name>;
|
|
117
|
+
} : language.ResolvedClass<'edge'> & {
|
|
118
|
+
readonly key: language.DefinitionKey<Origin, 'class', Name>;
|
|
119
|
+
} : ResolvedClassOfAuthoring<Origin, Name, Resolved, Root, Seen | Resolved> : never : never;
|
|
120
|
+
type ResolvedParentsOf<Origin extends string, Value, Root extends DomainSchemaInput, Seen> = ResolvedParentTuple<Origin, ParentInputsOf<Value>, Root, Seen>;
|
|
121
|
+
type ResolvedParentTuple<Origin extends string, Parents extends readonly unknown[], Root extends DomainSchemaInput, Seen> = Parents extends readonly [] ? readonly [] : Parents extends readonly [infer Parent, ...infer Rest] ? readonly [
|
|
122
|
+
ResolvedParentOf<Origin, Parent, Root, Seen>,
|
|
123
|
+
...ResolvedParentTuple<Origin, Rest, Root, Seen>
|
|
124
|
+
] : readonly ResolvedParentOf<Origin, Parents[number], Root, Seen>[];
|
|
125
|
+
type Same<Left, Right> = [Left] extends [Right] ? ([Right] extends [Left] ? true : false) : false;
|
|
126
|
+
type LocalNameOf<Root extends DomainSchemaInput, Value> = {
|
|
127
|
+
[Name in keyof ClassesInputOf<Root>]: Same<ClassesInputOf<Root>[Name], Value> extends true ? Name : never;
|
|
128
|
+
}[keyof ClassesInputOf<Root>];
|
|
129
|
+
type PropertyFieldsOf<Value> = RecordField<ClassInputOf<Value>, 'properties'>;
|
|
130
|
+
interface AuthoredPropertyEntry<Owner, Name extends string, Field> {
|
|
131
|
+
readonly owner: Owner;
|
|
132
|
+
readonly name: Name;
|
|
133
|
+
readonly field: Field;
|
|
134
|
+
}
|
|
135
|
+
type OwnPropertyEntries<Value> = {
|
|
136
|
+
[Name in keyof PropertyFieldsOf<Value>]: AuthoredPropertyEntry<Value, Extract<Name, string>, PropertyFieldsOf<Value>[Name]>;
|
|
137
|
+
}[keyof PropertyFieldsOf<Value>];
|
|
138
|
+
type ParentPropertyEntries<Parent, Seen> = Parent extends language.ResolvedClass ? language.PropertiesOf<Parent>['byKey'][keyof language.PropertiesOf<Parent>['byKey']] : Parent extends Class ? EffectivePropertyEntries<Parent, Seen> : never;
|
|
139
|
+
type EffectivePropertyEntries<Value, Seen = never> = Value extends Seen ? never : OwnPropertyEntries<Value> | (ParentsOf<Value> extends infer Parent ? Parent extends unknown ? ParentPropertyEntries<Parent, Seen | Value> : never : never);
|
|
140
|
+
type PropertySchemaOf<Field> = Field extends AutoProperty<infer Value> ? PropertySchemaOf<Value> : Field extends Property<infer Schema, PropertyOptions> ? Schema : Field;
|
|
141
|
+
type PropertyOptionsOf<Field> = Field extends AutoProperty<infer Value> ? PropertyOptionsOf<Value> : Field extends Property<ValueSchemaInput, infer Options> ? Options : Record<never, never>;
|
|
142
|
+
type ValueOutputOf<Schema> = Schema extends TypedValueSchema<infer Value> ? Value : Schema extends z.ZodType ? z.output<Schema> : PortableValue;
|
|
143
|
+
type ValueInputOf<Schema> = Schema extends TypedValueSchema<infer Value> ? Value : Schema extends z.ZodType ? z.input<Schema> : PortableValue;
|
|
144
|
+
type PropertyRequiredOf<Field> = PropertyOptionsOf<Field> extends {
|
|
145
|
+
readonly required: infer Required extends boolean;
|
|
146
|
+
} ? Required : undefined extends ValueInputOf<PropertySchemaOf<Field>> ? false : true;
|
|
147
|
+
export type CorePropertyInput<ClassValue> = ResolveLazy<ClassValue> extends infer Resolved ? Resolved extends Class ? CorePropertyInputFromEntries<EffectivePropertyEntries<Resolved>> : Resolved extends language.ResolvedClass ? language.PropertyInputOf<Resolved> : never : never;
|
|
148
|
+
type PropertyEntryName<Entry> = Entry extends {
|
|
149
|
+
readonly name: infer Name extends string;
|
|
150
|
+
} ? Name : never;
|
|
151
|
+
type PropertyEntryValue<Entry> = Entry extends language.ResolvedProperty<infer Value, boolean> ? Value : Entry extends AuthoredPropertyEntry<unknown, string, infer Field> ? ValueInputOf<PropertySchemaOf<Field>> : never;
|
|
152
|
+
type PropertyEntryRequired<Entry> = Entry extends language.ResolvedProperty<unknown, infer Required> ? Required : Entry extends AuthoredPropertyEntry<unknown, string, infer Field> ? PropertyRequiredOf<Field> : false;
|
|
153
|
+
type UniquePropertyEntries<Entries> = Entries extends unknown ? IsMultiple<Extract<Entries, {
|
|
154
|
+
readonly name: PropertyEntryName<Entries>;
|
|
155
|
+
}>> extends true ? never : Entries : never;
|
|
156
|
+
type RequiredPropertyNames<Entries> = UniquePropertyEntries<Entries> extends infer Entry ? Entry extends unknown ? PropertyEntryRequired<Entry> extends true ? PropertyEntryName<Entry> : never : never : never;
|
|
157
|
+
type OptionalPropertyNames<Entries> = Exclude<PropertyEntryName<UniquePropertyEntries<Entries>>, RequiredPropertyNames<Entries>>;
|
|
158
|
+
type CorePropertyInputFromEntries<Entries> = Readonly<({
|
|
159
|
+
[Name in RequiredPropertyNames<Entries>]: PropertyEntryValue<Extract<UniquePropertyEntries<Entries>, {
|
|
160
|
+
readonly name: Name;
|
|
161
|
+
}>>;
|
|
162
|
+
} & {
|
|
163
|
+
[Name in OptionalPropertyNames<Entries>]?: PropertyEntryValue<Extract<UniquePropertyEntries<Entries>, {
|
|
164
|
+
readonly name: Name;
|
|
165
|
+
}>>;
|
|
166
|
+
}) | Record<language.PropertyKey, language.PropertyValue>>;
|
|
167
|
+
type ProjectedProperty<Origin extends string, Entry, Root extends DomainSchemaInput> = Entry extends language.ResolvedProperty ? Entry : Entry extends AuthoredPropertyEntry<infer Owner, infer Name, infer Field> ? LocalNameOf<Root, Owner> extends infer OwnerName extends string ? language.ResolvedProperty<ValueOutputOf<PropertySchemaOf<Field>>, PropertyRequiredOf<Field>> & {
|
|
168
|
+
readonly name: Name;
|
|
169
|
+
readonly key: language.PropertyKey<Origin, OwnerName, Name>;
|
|
170
|
+
} : never : never;
|
|
171
|
+
type ProjectedPropertyUnion<Origin extends string, Entries, Root extends DomainSchemaInput> = Entries extends unknown ? ProjectedProperty<Origin, Entries, Root> : never;
|
|
172
|
+
type UnionIsMultiple<Value, Whole = Value> = Value extends unknown ? [Whole] extends [Value] ? false : true : never;
|
|
173
|
+
type IsMultiple<Value> = true extends UnionIsMultiple<Value> ? true : false;
|
|
174
|
+
type PropertyByKey<Origin extends string, Entries, Root extends DomainSchemaInput> = Readonly<{
|
|
175
|
+
[Key in ProjectedPropertyUnion<Origin, Entries, Root>['key']]: Extract<ProjectedPropertyUnion<Origin, Entries, Root>, {
|
|
176
|
+
readonly key: Key;
|
|
177
|
+
}>;
|
|
178
|
+
}>;
|
|
179
|
+
type PropertyByName<Origin extends string, Entries, Root extends DomainSchemaInput> = Readonly<{
|
|
180
|
+
[Name in ProjectedPropertyUnion<Origin, Entries, Root>['name'] as IsMultiple<Extract<ProjectedPropertyUnion<Origin, Entries, Root>, {
|
|
181
|
+
readonly name: Name;
|
|
182
|
+
}>> extends true ? never : Name extends PropertyCollectionOperation ? never : Name]: Extract<ProjectedPropertyUnion<Origin, Entries, Root>, {
|
|
183
|
+
readonly name: Name;
|
|
184
|
+
}>;
|
|
185
|
+
}>;
|
|
186
|
+
type PropertyCollectionOperation = 'byKey' | 'get' | 'from';
|
|
187
|
+
type PropertyCollectionOf<Origin extends string, Entries, Root extends DomainSchemaInput> = language.ResolvedPropertyCollection<PropertyByKey<Origin, Entries, Root>, PropertyByName<Origin, Entries, Root>>;
|
|
188
|
+
type MethodFieldsOf<Value> = RecordField<ClassInputOf<Value>, 'methods'>;
|
|
189
|
+
interface AuthoredMethodEntry<Owner, Name extends string, Value extends Method> {
|
|
190
|
+
readonly owner: Owner;
|
|
191
|
+
readonly name: Name;
|
|
192
|
+
readonly value: Value;
|
|
193
|
+
}
|
|
194
|
+
type OwnMethodEntries<Value, Static extends boolean> = {
|
|
195
|
+
[Name in keyof MethodFieldsOf<Value>]: MethodFieldsOf<Value>[Name] extends infer MethodValue extends Method ? CallableConfig<MethodValue> extends {
|
|
196
|
+
readonly static: true;
|
|
197
|
+
} ? Static extends true ? AuthoredMethodEntry<Value, Extract<Name, string>, MethodValue> : never : Static extends false ? AuthoredMethodEntry<Value, Extract<Name, string>, MethodValue> : never : never;
|
|
198
|
+
}[keyof MethodFieldsOf<Value>];
|
|
199
|
+
type ParentMethodEntries<Parent, Static extends boolean, Seen> = Parent extends language.ResolvedClass<'node'> ? Static extends true ? language.StaticMethodsOf<Parent>['byKey'][keyof language.StaticMethodsOf<Parent>['byKey']] : language.MethodsOf<Parent>['byKey'][keyof language.MethodsOf<Parent>['byKey']] : Parent extends NodeClass ? EffectiveMethodEntries<Parent, Static, Seen> : never;
|
|
200
|
+
type RemoveMethodNames<Entries, Names> = Entries extends {
|
|
201
|
+
readonly name: infer Name;
|
|
202
|
+
} ? Name extends Names ? never : Entries : never;
|
|
203
|
+
type EffectiveMethodEntries<Value, Static extends boolean, Seen = never> = Value extends Seen ? never : OwnMethodEntries<Value, Static> extends infer Own ? Own | RemoveMethodNames<ParentsOf<Value> extends infer Parent ? Parent extends unknown ? ParentMethodEntries<Parent, Static, Seen | Value> : never : never, Own extends {
|
|
204
|
+
readonly name: infer Name;
|
|
205
|
+
} ? Name : never> : never;
|
|
206
|
+
type CallableConfig<Value> = Value extends Method<infer Config> ? Config : Value extends Function<infer Config> ? Config : never;
|
|
207
|
+
type CallableInputValue<Value extends Method | Function> = ValueInputOf<CallableConfig<Value>['input']>;
|
|
208
|
+
type CallableOutputValue<Value extends Method | Function> = CallableConfig<Value>['output'] extends StreamOutput<infer Item> ? {
|
|
209
|
+
readonly mode: 'stream';
|
|
210
|
+
readonly item: ValueOutputOf<Item>;
|
|
211
|
+
} : CallableConfig<Value>['output'] extends BinaryOutput ? {
|
|
212
|
+
readonly mode: 'binary';
|
|
213
|
+
} : {
|
|
214
|
+
readonly mode: 'value';
|
|
215
|
+
readonly value: ValueOutputOf<CallableConfig<Value>['output']>;
|
|
216
|
+
};
|
|
217
|
+
type ProjectedMethod<Origin extends string, Entry, Root extends DomainSchemaInput> = Entry extends language.ResolvedMethod ? Entry : Entry extends AuthoredMethodEntry<infer Owner, infer Name, infer Value> ? LocalNameOf<Root, Owner> extends infer OwnerName extends string ? language.ResolvedMethod<CallableInputValue<Value>, CallableOutputValue<Value>, CallableStaticOf<Value>, CallableInheritanceOf<Value>, CallableAuthOf<Value>, CallablePolicyOf<Value>, language.MethodKey<Origin, OwnerName, Name>> & {
|
|
218
|
+
readonly name: Name;
|
|
219
|
+
} : never : never;
|
|
220
|
+
type CallableStaticOf<Value extends Method> = CallableConfig<Value> extends {
|
|
221
|
+
readonly static: true;
|
|
222
|
+
} ? true : false;
|
|
223
|
+
type CallableInheritanceOf<Value extends Method> = CallableConfig<Value> extends {
|
|
224
|
+
readonly inheritance: infer Inheritance extends language.MethodInheritance;
|
|
225
|
+
} ? Inheritance : 'default';
|
|
226
|
+
type CallableAuthOf<Value extends Method | Function> = CallableConfig<Value>['auth'];
|
|
227
|
+
type CallablePolicyOf<Value extends Method | Function> = CallableAuthOf<Value> extends 'authorized' ? language.PolicyCheckExpression : never;
|
|
228
|
+
type ProjectedMethodUnion<Origin extends string, Entries, Root extends DomainSchemaInput> = Entries extends unknown ? ProjectedMethod<Origin, Entries, Root> : never;
|
|
229
|
+
type MethodByKey<Origin extends string, Entries, Root extends DomainSchemaInput> = Readonly<{
|
|
230
|
+
[Key in ProjectedMethodUnion<Origin, Entries, Root>['key']]: Extract<ProjectedMethodUnion<Origin, Entries, Root>, {
|
|
231
|
+
readonly key: Key;
|
|
232
|
+
}>;
|
|
233
|
+
}>;
|
|
234
|
+
type MethodByName<Origin extends string, Entries, Root extends DomainSchemaInput> = Readonly<{
|
|
235
|
+
[Name in ProjectedMethodUnion<Origin, Entries, Root>['name'] as Name extends MethodCollectionOperation ? never : Name]: Extract<ProjectedMethodUnion<Origin, Entries, Root>, {
|
|
236
|
+
readonly name: Name;
|
|
237
|
+
}>;
|
|
238
|
+
}>;
|
|
239
|
+
type MethodCollectionOperation = 'byKey' | 'get';
|
|
240
|
+
type MethodCollectionOf<Origin extends string, Entries, Root extends DomainSchemaInput> = language.ResolvedMethodCollection<MethodByKey<Origin, Entries, Root>, MethodByName<Origin, Entries, Root>>;
|
|
241
|
+
type ResolvedFunctionOfAuthoring<Origin extends string, Name extends string, Value> = Value extends Function ? language.ResolvedFunction<CallableInputValue<Value>, CallableOutputValue<Value>, CallableAuthOf<Value>, CallablePolicyOf<Value>> & {
|
|
242
|
+
readonly ref: language.FunctionRef<Name> & {
|
|
243
|
+
readonly origin: Origin;
|
|
244
|
+
};
|
|
245
|
+
readonly key: language.DefinitionKey<Origin, 'function', Name>;
|
|
246
|
+
} : never;
|
|
247
|
+
export {};
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export {};
|
|
@@ -0,0 +1,4 @@
|
|
|
1
|
+
import { type FullMatch } from '../../language/value/syntax/full-match.js';
|
|
2
|
+
export { fullMatchSource, type FullMatch } from '../../language/value/syntax/full-match.js';
|
|
3
|
+
/** Authoring facade preserving the Builder-owned diagnostic for invalid source syntax. */
|
|
4
|
+
export declare function fullMatch(source: string): FullMatch;
|
|
@@ -0,0 +1,11 @@
|
|
|
1
|
+
import { isIRegexp } from '../../language/value/regexp/syntax.js';
|
|
2
|
+
import { fullMatch as languageFullMatch, } from '../../language/value/syntax/full-match.js';
|
|
3
|
+
import { fail } from '../schema/diagnostic.js';
|
|
4
|
+
export { fullMatchSource } from '../../language/value/syntax/full-match.js';
|
|
5
|
+
/** Authoring facade preserving the Builder-owned diagnostic for invalid source syntax. */
|
|
6
|
+
export function fullMatch(source) {
|
|
7
|
+
if (!isIRegexp(source)) {
|
|
8
|
+
fail('BUILDER_FULL_MATCH_INVALID', '/fullMatch', 'fullMatch(...) requires a complete RFC 9485 I-Regexp source.');
|
|
9
|
+
}
|
|
10
|
+
return languageFullMatch(source);
|
|
11
|
+
}
|
|
@@ -0,0 +1,4 @@
|
|
|
1
|
+
import type { z } from 'zod';
|
|
2
|
+
import type { NodeClassReferenceInput } from '../class/authoring.js';
|
|
3
|
+
export declare function rememberPath(schema: z.ZodType, accepts: readonly NodeClassReferenceInput[]): void;
|
|
4
|
+
export declare function pathAccepts(schema: z.ZodType): readonly NodeClassReferenceInput[] | undefined;
|
|
@@ -0,0 +1,8 @@
|
|
|
1
|
+
import { z } from 'zod';
|
|
2
|
+
import type { NodeClassReferenceInput } from '../class/authoring.js';
|
|
3
|
+
declare const PATH_ACCEPTS: unique symbol;
|
|
4
|
+
export type PathAuthoring<Accepts extends readonly NodeClassReferenceInput[] = readonly NodeClassReferenceInput[]> = z.ZodString & {
|
|
5
|
+
readonly [PATH_ACCEPTS]: Accepts;
|
|
6
|
+
};
|
|
7
|
+
export declare function path<const Accepts extends readonly NodeClassReferenceInput[]>(...accepts: Accepts): PathAuthoring<Accepts>;
|
|
8
|
+
export {};
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import { z } from 'zod';
|
|
2
|
-
import { fail } from '
|
|
3
|
-
import { rememberPath } from './
|
|
2
|
+
import { fail } from '../schema/diagnostic.js';
|
|
3
|
+
import { rememberPath } from './path-metadata.js';
|
|
4
4
|
export function path(...accepts) {
|
|
5
5
|
if (accepts.length === 0) {
|
|
6
6
|
fail('BUILDER_PATH_EMPTY', '', 'path(...) requires at least one Node Definition.');
|
|
@@ -9,4 +9,3 @@ export function path(...accepts) {
|
|
|
9
9
|
rememberPath(schema, accepts);
|
|
10
10
|
return schema;
|
|
11
11
|
}
|
|
12
|
-
//# sourceMappingURL=path.js.map
|
|
@@ -1,5 +1,5 @@
|
|
|
1
|
-
import type { JsonSchemaObject } from '
|
|
2
|
-
import type { ValueSchemaInput } from '
|
|
1
|
+
import type { JsonSchemaObject } from '../../language/value/model/schema.js';
|
|
2
|
+
import type { ValueSchemaInput } from '../class/property.js';
|
|
3
3
|
declare const VALUE_SCHEMA_TYPE: unique symbol;
|
|
4
4
|
/** Type-only value retained by one lossless Value Schema authored in TypeScript. */
|
|
5
5
|
export interface TypedValueSchema<out Value = unknown> extends JsonSchemaObject {
|
|
@@ -14,4 +14,3 @@ export interface TypedValueSchema<out Value = unknown> extends JsonSchemaObject
|
|
|
14
14
|
*/
|
|
15
15
|
export declare function valueSchema<Value>(): <const Schema extends ValueSchemaInput>(schema: Schema) => Schema & TypedValueSchema<Value>;
|
|
16
16
|
export {};
|
|
17
|
-
//# sourceMappingURL=value-schema.d.ts.map
|
|
@@ -0,0 +1,21 @@
|
|
|
1
|
+
import type { NodeClassReferenceInput } from '../class/authoring.js';
|
|
2
|
+
import type { AUTHORING } from '../schema/handle.js';
|
|
3
|
+
declare const VIEW_INPUT: unique symbol;
|
|
4
|
+
export type ViewDefinitionTargetsInput = readonly [
|
|
5
|
+
NodeClassReferenceInput,
|
|
6
|
+
...NodeClassReferenceInput[]
|
|
7
|
+
];
|
|
8
|
+
export type ViewTargetInput = 'domain' | NodeClassReferenceInput | ViewDefinitionTargetsInput;
|
|
9
|
+
export interface ViewInput {
|
|
10
|
+
readonly description?: string;
|
|
11
|
+
readonly target?: ViewTargetInput;
|
|
12
|
+
}
|
|
13
|
+
export interface View<out Config extends ViewInput = ViewInput> {
|
|
14
|
+
readonly [AUTHORING]: 'view';
|
|
15
|
+
readonly [VIEW_INPUT]: Config;
|
|
16
|
+
}
|
|
17
|
+
export type ViewAuthoringInput<Value extends View> = Value extends View<infer Config> ? Config : never;
|
|
18
|
+
/** Internal lowering access; View authoring handles expose no public configuration object. */
|
|
19
|
+
export declare function viewAuthoringInput<const Value extends View>(value: Value): ViewAuthoringInput<Value>;
|
|
20
|
+
export declare function view<const Config extends ViewInput>(config: Config & Record<Exclude<keyof Config, keyof ViewInput>, never>): View<Config>;
|
|
21
|
+
export {};
|
|
@@ -0,0 +1,11 @@
|
|
|
1
|
+
import { assertKnownKeys } from '../schema/diagnostic.js';
|
|
2
|
+
import { authoringValue } from '../schema/handle.js';
|
|
3
|
+
const VIEW_INPUT = Symbol('astrale.v1.view-input');
|
|
4
|
+
/** Internal lowering access; View authoring handles expose no public configuration object. */
|
|
5
|
+
export function viewAuthoringInput(value) {
|
|
6
|
+
return value[VIEW_INPUT];
|
|
7
|
+
}
|
|
8
|
+
export function view(config) {
|
|
9
|
+
assertKnownKeys(config, ['description', 'target']);
|
|
10
|
+
return authoringValue('view', { [VIEW_INPUT]: { ...config } });
|
|
11
|
+
}
|
|
@@ -3,4 +3,3 @@ export declare function acceptDomainSchemaBundle(input: unknown): DomainSchemaBu
|
|
|
3
3
|
export declare function decodeDomainSchemaBundle(input: string | Uint8Array): DomainSchemaBundle;
|
|
4
4
|
export declare function serializeDomainSchemaBundle(bundle: DomainSchemaBundleValue): string;
|
|
5
5
|
export declare function encodeDomainSchemaBundle(bundle: DomainSchemaBundleValue): Uint8Array;
|
|
6
|
-
//# sourceMappingURL=codec.d.ts.map
|
package/dist/v1/bundle/codec.js
CHANGED
|
@@ -1,10 +1,11 @@
|
|
|
1
1
|
import { accept as acceptJsonValue, BoundaryError as JsonBoundaryError, json, } from '@astrale-os/kernel-dsl/value';
|
|
2
|
-
import {
|
|
3
|
-
import { acceptDomainSchema } from '../schema/
|
|
4
|
-
import {
|
|
5
|
-
import {
|
|
6
|
-
import {
|
|
7
|
-
import {
|
|
2
|
+
import { compareUnicode } from '../addressing/ordering.js';
|
|
3
|
+
import { acceptDomainSchema } from '../schema/admission/accept.js';
|
|
4
|
+
import { canonicalDomainSchemaAfterValidation } from '../schema/canonical/revision.js';
|
|
5
|
+
import { revisionOfDomainSchema } from '../schema/canonical/revision.js';
|
|
6
|
+
import { MemoryDomainSchemaLookup } from '../schema/dependency/lookup.js';
|
|
7
|
+
import { SchemaError } from '../schema/diagnostic.js';
|
|
8
|
+
import { BundleError, diagnostic } from './diagnostic.js';
|
|
8
9
|
import { asDomainSchemaBundle, } from './model.js';
|
|
9
10
|
import { parseDomainSchemaBundleStructure } from './structure.js';
|
|
10
11
|
export function acceptDomainSchemaBundle(input) {
|
|
@@ -14,7 +15,7 @@ export function acceptDomainSchemaBundle(input) {
|
|
|
14
15
|
}
|
|
15
16
|
catch (error) {
|
|
16
17
|
if (error instanceof JsonBoundaryError) {
|
|
17
|
-
throw new
|
|
18
|
+
throw new BundleError([diagnostic('DV_JSON_VALUE', error.pointer, error.message)]);
|
|
18
19
|
}
|
|
19
20
|
throw error;
|
|
20
21
|
}
|
|
@@ -26,7 +27,7 @@ export function decodeDomainSchemaBundle(input) {
|
|
|
26
27
|
}
|
|
27
28
|
catch (error) {
|
|
28
29
|
if (error instanceof json.DecodeError) {
|
|
29
|
-
throw new
|
|
30
|
+
throw new BundleError([diagnostic('DV_JSON_VALUE', '', error.message)]);
|
|
30
31
|
}
|
|
31
32
|
throw error;
|
|
32
33
|
}
|
|
@@ -63,7 +64,7 @@ function acceptBundleValue(input) {
|
|
|
63
64
|
}
|
|
64
65
|
}
|
|
65
66
|
if (diagnostics.length > 0)
|
|
66
|
-
throw new
|
|
67
|
+
throw new BundleError(diagnostics);
|
|
67
68
|
const accepted = new Map();
|
|
68
69
|
const acceptCandidate = (entry) => {
|
|
69
70
|
const existing = accepted.get(entry.key);
|
|
@@ -78,7 +79,7 @@ function acceptBundleValue(input) {
|
|
|
78
79
|
const schema = acceptDomainSchema(entry.schema, new MemoryDomainSchemaLookup([...accepted.values()]));
|
|
79
80
|
const revision = revisionOfDomainSchema(schema);
|
|
80
81
|
if (revision !== entry.revision) {
|
|
81
|
-
throw new
|
|
82
|
+
throw new BundleError([
|
|
82
83
|
diagnostic('BUNDLE_SCHEMA_REVISION', '', `Accepted schema revision ${revision} differs from indexed revision ${entry.revision}.`),
|
|
83
84
|
]);
|
|
84
85
|
}
|
|
@@ -86,9 +87,9 @@ function acceptBundleValue(input) {
|
|
|
86
87
|
return schema;
|
|
87
88
|
}
|
|
88
89
|
catch (error) {
|
|
89
|
-
if (!(error instanceof
|
|
90
|
+
if (!(error instanceof SchemaError))
|
|
90
91
|
throw error;
|
|
91
|
-
throw new
|
|
92
|
+
throw new BundleError(error.diagnostics.map((item) => diagnostic(item.code, `${entry.pointer}${item.pointer}`, item.message, item.ref)));
|
|
92
93
|
}
|
|
93
94
|
};
|
|
94
95
|
for (const entry of candidates.values()) {
|
|
@@ -148,4 +149,3 @@ function compareSchemas(left, right) {
|
|
|
148
149
|
function keyOf(origin, revision) {
|
|
149
150
|
return `${origin}\u0000${revision}`;
|
|
150
151
|
}
|
|
151
|
-
//# sourceMappingURL=codec.js.map
|