@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
|
@@ -0,0 +1,53 @@
|
|
|
1
|
+
import type { DefinitionKey, DefinitionRef, Key, Revision } from '../../addressing/index.js';
|
|
2
|
+
import type { DomainDependency } from '../../addressing/index.js';
|
|
3
|
+
import type { MethodOwnerKeyOf, ResolvedCallable, ResolvedFunction } from '../../language/callable/resolved.js';
|
|
4
|
+
import type { AnyResolvedClass } from '../../language/class/resolved.js';
|
|
5
|
+
import type { ResolvedCoreDefinition, ResolvedCoreEdge } from '../../language/core/resolved.js';
|
|
6
|
+
import type { ResolvedPolicy } from '../../language/policy/resolved.js';
|
|
7
|
+
import type { ResolvedDefinition, ResolvedDefinitionOf } from '../../language/resolved.js';
|
|
8
|
+
import type { ResolvedView } from '../../language/view/resolved.js';
|
|
9
|
+
export type ClassNamespace<Classes extends Readonly<Record<string, unknown>> = Readonly<Record<string, AnyResolvedClass>>> = Readonly<Classes>;
|
|
10
|
+
export type FunctionNamespace<Functions extends Readonly<Record<string, unknown>> = Readonly<Record<string, ResolvedFunction>>> = Readonly<Functions>;
|
|
11
|
+
export type PolicyNamespace<Policies extends Readonly<Record<string, unknown>> = Readonly<Record<string, ResolvedPolicy>>> = Readonly<Policies>;
|
|
12
|
+
export type ViewNamespace<Views extends Readonly<Record<string, unknown>> = Readonly<Record<string, ResolvedView>>> = Readonly<Views>;
|
|
13
|
+
export interface CoreNamespace<Nodes extends Readonly<Record<string, unknown>> = Readonly<Record<string, ResolvedCoreDefinition>>> {
|
|
14
|
+
readonly nodes: Readonly<Nodes>;
|
|
15
|
+
readonly edges: readonly ResolvedCoreEdge[];
|
|
16
|
+
}
|
|
17
|
+
export interface Domain<Classes extends Readonly<Record<string, unknown>> = Readonly<Record<string, AnyResolvedClass>>, Functions extends Readonly<Record<string, unknown>> = Readonly<Record<string, ResolvedFunction>>, Policies extends Readonly<Record<string, unknown>> = Readonly<Record<string, ResolvedPolicy>>, Views extends Readonly<Record<string, unknown>> = Readonly<Record<string, ResolvedView>>, CoreNodes extends Readonly<Record<string, unknown>> = Readonly<Record<string, ResolvedCoreDefinition>>, RevisionValue extends Revision = Revision> {
|
|
18
|
+
readonly origin: Key.Origin;
|
|
19
|
+
readonly revision: RevisionValue;
|
|
20
|
+
/** Exact admitted root and transitive dependency revisions, ordered by origin. */
|
|
21
|
+
readonly closure: readonly DomainDependency[];
|
|
22
|
+
readonly dependencies: readonly DomainDependency[];
|
|
23
|
+
readonly classes: ClassNamespace<Classes>;
|
|
24
|
+
readonly functions: FunctionNamespace<Functions>;
|
|
25
|
+
readonly policies: PolicyNamespace<Policies>;
|
|
26
|
+
readonly views: ViewNamespace<Views>;
|
|
27
|
+
readonly core: CoreNamespace<CoreNodes>;
|
|
28
|
+
definition<const Ref extends DefinitionRef>(ref: Ref): ResolvedDefinitionOf<Ref['kind']> | undefined;
|
|
29
|
+
definition<const Origin extends Key.Origin, const Kind extends DefinitionRef['kind'], const Name extends string>(key: DefinitionKey<Origin, Kind, Name>): ResolvedDefinitionOf<Kind> | undefined;
|
|
30
|
+
callable(key: Key.Callable): ResolvedCallable | undefined;
|
|
31
|
+
definitions(): readonly ResolvedDefinition[];
|
|
32
|
+
definitions<const Kind extends DefinitionRef['kind']>(kind: Kind): readonly ResolvedDefinitionOf<Kind>[];
|
|
33
|
+
viewsFor(target: 'domain' | AnyResolvedClass): readonly Views[keyof Views][];
|
|
34
|
+
}
|
|
35
|
+
declare const DOMAIN_SOURCE_RESOLVED: unique symbol;
|
|
36
|
+
/** Type-only witness carried by a source that retains its exact resolved Domain. */
|
|
37
|
+
export interface DomainSource<Resolved extends Domain = Domain> {
|
|
38
|
+
readonly [DOMAIN_SOURCE_RESOLVED]: Resolved;
|
|
39
|
+
}
|
|
40
|
+
export type DomainOfSource<Source> = Source extends DomainSource<infer Resolved> ? Resolved : Domain;
|
|
41
|
+
export type SourceDomain<Source, Resolved extends Domain = DomainOfSource<Source>> = Resolved & {
|
|
42
|
+
readonly source: Source;
|
|
43
|
+
};
|
|
44
|
+
export type ClassesOf<Value> = Value extends Domain<infer Classes> ? Classes : never;
|
|
45
|
+
export type MethodOwnerOf<Work extends Domain, Method> = Extract<ClassesOf<Work>[keyof ClassesOf<Work>], {
|
|
46
|
+
readonly key: MethodOwnerKeyOf<Method>;
|
|
47
|
+
}>;
|
|
48
|
+
export type FunctionsOf<Value> = Value extends Domain<Readonly<Record<string, unknown>>, infer Functions> ? Functions : never;
|
|
49
|
+
export type PoliciesOf<Value> = Value extends Domain<Readonly<Record<string, unknown>>, Readonly<Record<string, unknown>>, infer Policies> ? Policies : never;
|
|
50
|
+
export type ViewsOf<Value> = Value extends Domain<Readonly<Record<string, unknown>>, Readonly<Record<string, unknown>>, Readonly<Record<string, unknown>>, infer Views> ? Views : never;
|
|
51
|
+
export type PropertyInputFor<Class extends AnyResolvedClass> = import('../../language/class/resolved.js').PropertyInputOf<Class>;
|
|
52
|
+
export type PropertyValuesFor<Class extends AnyResolvedClass> = ReturnType<Class['properties']['from']>;
|
|
53
|
+
export {};
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export {};
|
|
@@ -0,0 +1,27 @@
|
|
|
1
|
+
import type { Key as AddressKey, PropertyKey, Revision } from '../../addressing/index.js';
|
|
2
|
+
import type { DomainDependency } from '../../addressing/index.js';
|
|
3
|
+
import type { CoreEdge } from '../../language/core/model/core.js';
|
|
4
|
+
import type { Definition } from '../../language/definition.js';
|
|
5
|
+
import type { Diagnostic } from '../../language/validation/diagnostic.js';
|
|
6
|
+
import type { OrderingKind } from '../../language/value/ordering.js';
|
|
7
|
+
/** Dependency-closed, representation-neutral input to the one Domain constructor. */
|
|
8
|
+
export interface DomainInput {
|
|
9
|
+
readonly origin: AddressKey.Origin;
|
|
10
|
+
readonly revision: Revision;
|
|
11
|
+
readonly closure: readonly DomainDependency[];
|
|
12
|
+
readonly dependencies: readonly DomainDependency[];
|
|
13
|
+
readonly definitions: readonly Definition[];
|
|
14
|
+
readonly coreEdges: readonly CoreEdge[];
|
|
15
|
+
readonly validation: DomainValidation;
|
|
16
|
+
}
|
|
17
|
+
/** Already-bound validation semantics supplied by source compilation or compiled loading. */
|
|
18
|
+
export interface DomainValidation {
|
|
19
|
+
propertyExists(key: PropertyKey): boolean;
|
|
20
|
+
property(key: PropertyKey, input: unknown): readonly Diagnostic[];
|
|
21
|
+
propertyOrdering(key: PropertyKey): OrderingKind | undefined;
|
|
22
|
+
callableExists(key: AddressKey.Callable): boolean;
|
|
23
|
+
callableInput(key: AddressKey.Callable, input: unknown): readonly Diagnostic[];
|
|
24
|
+
callableFields(key: AddressKey.Callable): readonly string[] | undefined;
|
|
25
|
+
callableInputField(key: AddressKey.Callable, field: string, input: unknown): readonly Diagnostic[];
|
|
26
|
+
callableOutput(key: AddressKey.Callable, output: unknown): readonly Diagnostic[];
|
|
27
|
+
}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export {};
|
|
@@ -0,0 +1,5 @@
|
|
|
1
|
+
import type { ResolvedMethod, ResolvedMethodCollection } from '../../language/callable/resolved.js';
|
|
2
|
+
import type { ResolvedProperty, ResolvedPropertyCollection } from '../../language/class/resolved.js';
|
|
3
|
+
export declare function createPropertyCollection(values: Iterable<ResolvedProperty>): ResolvedPropertyCollection;
|
|
4
|
+
export declare function createMethodCollection(values: Iterable<ResolvedMethod>): ResolvedMethodCollection;
|
|
5
|
+
export declare function frozenRecord<Value>(entries: Iterable<readonly [string, Value]>): Readonly<Record<string, Value>>;
|
|
@@ -0,0 +1,81 @@
|
|
|
1
|
+
import { PropertyKey as PropertyKeyValue } from '../../addressing/index.js';
|
|
2
|
+
import { createPropertyValues } from '../../language/class/property-values.js';
|
|
3
|
+
const PROPERTY_OPERATIONS = new Set(['byKey', 'get', 'from']);
|
|
4
|
+
const METHOD_OPERATIONS = new Set(['byKey', 'get']);
|
|
5
|
+
export function createPropertyCollection(values) {
|
|
6
|
+
const ordered = [...values].sort((left, right) => compare(left.key, right.key));
|
|
7
|
+
const byKey = frozenRecord(ordered.map((value) => [value.key, value]));
|
|
8
|
+
const named = uniqueNames(ordered);
|
|
9
|
+
const collection = {
|
|
10
|
+
byKey,
|
|
11
|
+
get(key) {
|
|
12
|
+
return byKey[key];
|
|
13
|
+
},
|
|
14
|
+
from(input) {
|
|
15
|
+
const entries = new Map();
|
|
16
|
+
const source = new Map();
|
|
17
|
+
for (const [candidate, value] of Object.entries(input)) {
|
|
18
|
+
const property = PropertyKeyValue.is(candidate) ? byKey[candidate] : named[candidate];
|
|
19
|
+
if (property === undefined) {
|
|
20
|
+
throw new TypeError(`Unknown or ambiguous Property ${JSON.stringify(candidate)}.`);
|
|
21
|
+
}
|
|
22
|
+
if (entries.has(property.key)) {
|
|
23
|
+
throw new TypeError(`Property ${property.key} is supplied through both ${JSON.stringify(source.get(property.key))} and ${JSON.stringify(candidate)}.`);
|
|
24
|
+
}
|
|
25
|
+
const diagnostics = property.validate(value);
|
|
26
|
+
if (diagnostics.length > 0) {
|
|
27
|
+
throw new TypeError(`Invalid value for Property ${property.key}: ${diagnostics.map(({ message }) => message).join('; ')}`);
|
|
28
|
+
}
|
|
29
|
+
source.set(property.key, candidate);
|
|
30
|
+
entries.set(property.key, value);
|
|
31
|
+
}
|
|
32
|
+
return createPropertyValues(entries);
|
|
33
|
+
},
|
|
34
|
+
*[Symbol.iterator]() {
|
|
35
|
+
yield* ordered;
|
|
36
|
+
},
|
|
37
|
+
};
|
|
38
|
+
installShortcuts(collection, named, PROPERTY_OPERATIONS);
|
|
39
|
+
return Object.freeze(collection);
|
|
40
|
+
}
|
|
41
|
+
export function createMethodCollection(values) {
|
|
42
|
+
const ordered = [...values].sort((left, right) => compare(left.key, right.key));
|
|
43
|
+
const byKey = frozenRecord(ordered.map((value) => [value.key, value]));
|
|
44
|
+
const named = uniqueNames(ordered);
|
|
45
|
+
const collection = {
|
|
46
|
+
byKey,
|
|
47
|
+
get(key) {
|
|
48
|
+
return byKey[key];
|
|
49
|
+
},
|
|
50
|
+
*[Symbol.iterator]() {
|
|
51
|
+
yield* ordered;
|
|
52
|
+
},
|
|
53
|
+
};
|
|
54
|
+
installShortcuts(collection, named, METHOD_OPERATIONS);
|
|
55
|
+
return Object.freeze(collection);
|
|
56
|
+
}
|
|
57
|
+
function uniqueNames(values) {
|
|
58
|
+
const candidates = new Map();
|
|
59
|
+
for (const value of values) {
|
|
60
|
+
const list = candidates.get(value.name) ?? [];
|
|
61
|
+
list.push(value);
|
|
62
|
+
candidates.set(value.name, list);
|
|
63
|
+
}
|
|
64
|
+
return frozenRecord([...candidates].flatMap(([name, list]) => list.length === 1 ? [[name, list[0]]] : []));
|
|
65
|
+
}
|
|
66
|
+
function installShortcuts(target, named, reserved) {
|
|
67
|
+
for (const [name, value] of Object.entries(named)) {
|
|
68
|
+
if (!reserved.has(name))
|
|
69
|
+
Object.defineProperty(target, name, { enumerable: true, value });
|
|
70
|
+
}
|
|
71
|
+
}
|
|
72
|
+
export function frozenRecord(entries) {
|
|
73
|
+
const output = Object.create(null);
|
|
74
|
+
for (const [key, value] of [...entries].sort(([left], [right]) => compare(left, right))) {
|
|
75
|
+
Object.defineProperty(output, key, { enumerable: true, value });
|
|
76
|
+
}
|
|
77
|
+
return Object.freeze(output);
|
|
78
|
+
}
|
|
79
|
+
function compare(left, right) {
|
|
80
|
+
return left < right ? -1 : left > right ? 1 : 0;
|
|
81
|
+
}
|
|
@@ -0,0 +1,4 @@
|
|
|
1
|
+
import type { AnyResolvedClass } from '../../language/class/resolved.js';
|
|
2
|
+
import type { Definition } from '../../language/definition.js';
|
|
3
|
+
import type { DomainValidation } from '../model/input.js';
|
|
4
|
+
export declare function createClasses(definitions: readonly Definition[], validation: DomainValidation): ReadonlyMap<string, AnyResolvedClass>;
|
|
@@ -0,0 +1,200 @@
|
|
|
1
|
+
import { compareUnicode, Key, MethodKey as MethodKeyValue, PropertyKey as PropertyKeyValue, } from '../../addressing/index.js';
|
|
2
|
+
import { acceptPropertyValues } from '../../language/class/property-values.js';
|
|
3
|
+
import { appendPointer } from '../../language/value/syntax/pointer.js';
|
|
4
|
+
import { createMethodCollection, createPropertyCollection } from '../namespace/member-collection.js';
|
|
5
|
+
export function createClasses(definitions, validation) {
|
|
6
|
+
const declarations = new Map(definitions
|
|
7
|
+
.filter((value) => value.ref.kind === 'class')
|
|
8
|
+
.map((value) => [Key.of(value.ref), value]));
|
|
9
|
+
const resolved = new Map();
|
|
10
|
+
const visiting = new Set();
|
|
11
|
+
const resolve = (ref) => {
|
|
12
|
+
const key = Key.of(ref);
|
|
13
|
+
const cached = resolved.get(key);
|
|
14
|
+
if (cached !== undefined)
|
|
15
|
+
return cached;
|
|
16
|
+
if (visiting.has(key))
|
|
17
|
+
throw new TypeError(`Class inheritance cycle reaches ${key}.`);
|
|
18
|
+
const definition = declarations.get(key);
|
|
19
|
+
if (definition === undefined)
|
|
20
|
+
throw new TypeError(`Class ${key} is absent from Domain input.`);
|
|
21
|
+
visiting.add(key);
|
|
22
|
+
const parents = definition.extends.map(resolve);
|
|
23
|
+
if (parents.some((parent) => parent.kind !== definition.kind)) {
|
|
24
|
+
throw new TypeError(`Class ${key} extends a Class of another graph kind.`);
|
|
25
|
+
}
|
|
26
|
+
const shell = {};
|
|
27
|
+
const policies = Object.freeze({
|
|
28
|
+
read: Object.freeze(definition.kind === 'node'
|
|
29
|
+
? uniquePolicyRefs([
|
|
30
|
+
...parents.flatMap((parent) => parent.kind === 'node' ? [...parent.policies.read] : []),
|
|
31
|
+
...(definition.policies.read === undefined ? [] : [definition.policies.read]),
|
|
32
|
+
])
|
|
33
|
+
: []),
|
|
34
|
+
traverse: Object.freeze(uniquePolicyRefs([
|
|
35
|
+
...parents.flatMap((parent) => [...parent.policies.traverse]),
|
|
36
|
+
...(definition.policies.traverse === undefined ? [] : [definition.policies.traverse]),
|
|
37
|
+
])),
|
|
38
|
+
});
|
|
39
|
+
const effectiveProperties = new Map();
|
|
40
|
+
const effectiveMethods = new Map();
|
|
41
|
+
let inheritedData;
|
|
42
|
+
for (const parent of parents) {
|
|
43
|
+
for (const property of parent.properties) {
|
|
44
|
+
effectiveProperties.set(property.key, property);
|
|
45
|
+
}
|
|
46
|
+
for (const method of [...parent.methods, ...parent.static.methods]) {
|
|
47
|
+
if (!effectiveMethods.has(method.name))
|
|
48
|
+
effectiveMethods.set(method.name, method);
|
|
49
|
+
}
|
|
50
|
+
if (parent.kind === 'node' && inheritedData === undefined)
|
|
51
|
+
inheritedData = parent.data;
|
|
52
|
+
}
|
|
53
|
+
const ownProperties = [];
|
|
54
|
+
for (const [name, propertyDefinition] of Object.entries(definition.properties)) {
|
|
55
|
+
const propertyKey = PropertyKeyValue.of(ref, name);
|
|
56
|
+
const ordering = validation.propertyOrdering(propertyKey);
|
|
57
|
+
const property = Object.freeze({
|
|
58
|
+
owner: shell,
|
|
59
|
+
name,
|
|
60
|
+
key: propertyKey,
|
|
61
|
+
definition: propertyDefinition,
|
|
62
|
+
...(ordering === undefined ? {} : { ordering }),
|
|
63
|
+
validate: (input) => validation.property(propertyKey, input),
|
|
64
|
+
});
|
|
65
|
+
ownProperties.push(property);
|
|
66
|
+
effectiveProperties.set(property.key, property);
|
|
67
|
+
}
|
|
68
|
+
const ownInstanceMethods = [];
|
|
69
|
+
const ownStaticMethods = [];
|
|
70
|
+
const ownData = definition.kind === 'node' && definition.data !== undefined
|
|
71
|
+
? Object.freeze({ owner: shell, definition: definition.data })
|
|
72
|
+
: undefined;
|
|
73
|
+
if (definition.kind === 'node') {
|
|
74
|
+
for (const [name, methodDefinition] of Object.entries(definition.methods)) {
|
|
75
|
+
const methodKey = MethodKeyValue.of(ref, name);
|
|
76
|
+
const inputFields = validation.callableFields(methodKey);
|
|
77
|
+
const method = Object.freeze({
|
|
78
|
+
owner: shell,
|
|
79
|
+
name,
|
|
80
|
+
key: methodKey,
|
|
81
|
+
description: methodDefinition.description,
|
|
82
|
+
input: methodDefinition.input,
|
|
83
|
+
output: methodDefinition.output,
|
|
84
|
+
auth: methodDefinition.auth,
|
|
85
|
+
policy: methodDefinition.policy,
|
|
86
|
+
static: methodDefinition.static,
|
|
87
|
+
inheritance: methodDefinition.inheritance,
|
|
88
|
+
...(inputFields === undefined ? {} : { inputFields }),
|
|
89
|
+
definition: methodDefinition,
|
|
90
|
+
validateInput: (input) => validation.callableInput(methodKey, input),
|
|
91
|
+
validateInputField: (field, input) => validation.callableInputField(methodKey, field, input),
|
|
92
|
+
validateOutput: (output) => validation.callableOutput(methodKey, output),
|
|
93
|
+
});
|
|
94
|
+
effectiveMethods.set(name, method);
|
|
95
|
+
(methodDefinition.static ? ownStaticMethods : ownInstanceMethods).push(method);
|
|
96
|
+
}
|
|
97
|
+
}
|
|
98
|
+
const instanceMethods = [...effectiveMethods.values()].filter(({ definition }) => !definition.static);
|
|
99
|
+
const staticMethods = [...effectiveMethods.values()].filter(({ definition }) => definition.static);
|
|
100
|
+
Object.assign(shell, {
|
|
101
|
+
ref: definition.ref,
|
|
102
|
+
key,
|
|
103
|
+
kind: definition.kind,
|
|
104
|
+
abstract: definition.abstract,
|
|
105
|
+
definition,
|
|
106
|
+
extends: Object.freeze(parents),
|
|
107
|
+
policies,
|
|
108
|
+
data: definition.kind === 'node' ? (ownData ?? inheritedData) : undefined,
|
|
109
|
+
properties: createPropertyCollection(effectiveProperties.values()),
|
|
110
|
+
methods: createMethodCollection(instanceMethods),
|
|
111
|
+
static: Object.freeze({ methods: createMethodCollection(staticMethods) }),
|
|
112
|
+
self: Object.freeze({
|
|
113
|
+
data: definition.kind === 'node' ? ownData : undefined,
|
|
114
|
+
properties: createPropertyCollection(ownProperties),
|
|
115
|
+
policies: definition.policies,
|
|
116
|
+
methods: createMethodCollection(ownInstanceMethods),
|
|
117
|
+
static: Object.freeze({ methods: createMethodCollection(ownStaticMethods) }),
|
|
118
|
+
}),
|
|
119
|
+
satisfies(selected) {
|
|
120
|
+
if (key === selected.key)
|
|
121
|
+
return true;
|
|
122
|
+
return parents.some((parent) => {
|
|
123
|
+
if (parent.kind === 'node' && selected.kind === 'node')
|
|
124
|
+
return parent.satisfies(selected);
|
|
125
|
+
if (parent.kind === 'edge' && selected.kind === 'edge')
|
|
126
|
+
return parent.satisfies(selected);
|
|
127
|
+
return false;
|
|
128
|
+
});
|
|
129
|
+
},
|
|
130
|
+
validateProperties(input) {
|
|
131
|
+
return validateProperties(definition.abstract, effectiveProperties, input);
|
|
132
|
+
},
|
|
133
|
+
});
|
|
134
|
+
const value = Object.freeze(shell);
|
|
135
|
+
resolved.set(key, value);
|
|
136
|
+
visiting.delete(key);
|
|
137
|
+
return value;
|
|
138
|
+
};
|
|
139
|
+
for (const definition of declarations.values())
|
|
140
|
+
resolve(definition.ref);
|
|
141
|
+
return resolved;
|
|
142
|
+
}
|
|
143
|
+
function uniquePolicyRefs(values) {
|
|
144
|
+
const result = new Map();
|
|
145
|
+
for (const value of values)
|
|
146
|
+
result.set(Key.of(value), value);
|
|
147
|
+
return [...result.values()].sort((left, right) => compareUnicode(Key.of(left), Key.of(right)));
|
|
148
|
+
}
|
|
149
|
+
function validateProperties(abstract, properties, input) {
|
|
150
|
+
if (abstract) {
|
|
151
|
+
return [
|
|
152
|
+
{
|
|
153
|
+
code: 'DOMAIN_CLASS_ABSTRACT',
|
|
154
|
+
pointer: '/class',
|
|
155
|
+
message: 'An abstract Class cannot admit exact object Properties.',
|
|
156
|
+
},
|
|
157
|
+
];
|
|
158
|
+
}
|
|
159
|
+
let values;
|
|
160
|
+
try {
|
|
161
|
+
values = acceptPropertyValues(input, '/properties');
|
|
162
|
+
}
|
|
163
|
+
catch (cause) {
|
|
164
|
+
return [
|
|
165
|
+
{
|
|
166
|
+
code: 'DOMAIN_PROPERTY_INPUT_INVALID',
|
|
167
|
+
pointer: '/properties',
|
|
168
|
+
message: cause instanceof Error ? cause.message : 'Properties are not canonical.',
|
|
169
|
+
},
|
|
170
|
+
];
|
|
171
|
+
}
|
|
172
|
+
const diagnostics = [];
|
|
173
|
+
for (const key of Object.keys(values)) {
|
|
174
|
+
if (!properties.has(key)) {
|
|
175
|
+
diagnostics.push({
|
|
176
|
+
code: 'DOMAIN_PROPERTY_UNKNOWN',
|
|
177
|
+
pointer: appendPointer('/properties', key),
|
|
178
|
+
message: `Property ${key} is not effective on this Class.`,
|
|
179
|
+
});
|
|
180
|
+
}
|
|
181
|
+
}
|
|
182
|
+
for (const property of properties.values()) {
|
|
183
|
+
if (!Object.hasOwn(values, property.key)) {
|
|
184
|
+
if (property.definition.required) {
|
|
185
|
+
diagnostics.push({
|
|
186
|
+
code: 'DOMAIN_PROPERTY_REQUIRED',
|
|
187
|
+
pointer: appendPointer('/properties', property.key),
|
|
188
|
+
message: `Required Property ${property.key} is absent.`,
|
|
189
|
+
});
|
|
190
|
+
}
|
|
191
|
+
continue;
|
|
192
|
+
}
|
|
193
|
+
const pointer = appendPointer('/properties', property.key);
|
|
194
|
+
diagnostics.push(...property.validate(values[property.key]).map((item) => ({
|
|
195
|
+
...item,
|
|
196
|
+
pointer: `${pointer}${item.pointer}`,
|
|
197
|
+
})));
|
|
198
|
+
}
|
|
199
|
+
return Object.freeze(diagnostics);
|
|
200
|
+
}
|
|
@@ -0,0 +1,18 @@
|
|
|
1
|
+
import type { Key, PropertyKey } from '../../addressing/index.js';
|
|
2
|
+
import type { Diagnostic } from '../../language/validation/diagnostic.js';
|
|
3
|
+
import type { OrderingKind } from '../../language/value/ordering.js';
|
|
4
|
+
import type { DomainValidation } from '../model/input.js';
|
|
5
|
+
export interface PropertyValidation {
|
|
6
|
+
readonly ordering?: OrderingKind;
|
|
7
|
+
validate(input: unknown): readonly Diagnostic[];
|
|
8
|
+
}
|
|
9
|
+
export interface CallableValidation {
|
|
10
|
+
readonly fields?: readonly string[];
|
|
11
|
+
validateInput(input: unknown): readonly Diagnostic[];
|
|
12
|
+
validateInputField(field: string, input: unknown): readonly Diagnostic[];
|
|
13
|
+
validateOutput(output: unknown): readonly Diagnostic[];
|
|
14
|
+
}
|
|
15
|
+
/** Build the one Domain-level router shared by source resolution and compiled loading. */
|
|
16
|
+
export declare function createDomainValidation(properties: ReadonlyMap<PropertyKey, PropertyValidation>, callables: ReadonlyMap<Key.Callable, CallableValidation>): DomainValidation;
|
|
17
|
+
export declare function combineDomainValidation(values: readonly DomainValidation[]): DomainValidation;
|
|
18
|
+
export declare function unknownInputField(field: string): readonly Diagnostic[];
|
|
@@ -0,0 +1,75 @@
|
|
|
1
|
+
/** Build the one Domain-level router shared by source resolution and compiled loading. */
|
|
2
|
+
export function createDomainValidation(properties, callables) {
|
|
3
|
+
const validation = {
|
|
4
|
+
propertyExists: (key) => properties.has(key),
|
|
5
|
+
property(key, input) {
|
|
6
|
+
const target = properties.get(key);
|
|
7
|
+
return target === undefined ? unknownTarget('Property', key) : target.validate(input);
|
|
8
|
+
},
|
|
9
|
+
propertyOrdering: (key) => properties.get(key)?.ordering,
|
|
10
|
+
callableExists: (key) => callables.has(key),
|
|
11
|
+
callableInput(key, input) {
|
|
12
|
+
const target = callables.get(key);
|
|
13
|
+
return target === undefined ? unknownTarget('Callable', key) : target.validateInput(input);
|
|
14
|
+
},
|
|
15
|
+
callableFields: (key) => callables.get(key)?.fields,
|
|
16
|
+
callableInputField(key, field, input) {
|
|
17
|
+
const target = callables.get(key);
|
|
18
|
+
return target === undefined
|
|
19
|
+
? unknownTarget('Callable', key)
|
|
20
|
+
: target.validateInputField(field, input);
|
|
21
|
+
},
|
|
22
|
+
callableOutput(key, output) {
|
|
23
|
+
const target = callables.get(key);
|
|
24
|
+
return target === undefined ? unknownTarget('Callable', key) : target.validateOutput(output);
|
|
25
|
+
},
|
|
26
|
+
};
|
|
27
|
+
return Object.freeze(validation);
|
|
28
|
+
}
|
|
29
|
+
export function combineDomainValidation(values) {
|
|
30
|
+
const validation = {
|
|
31
|
+
propertyExists: (key) => values.some((value) => value.propertyExists(key)),
|
|
32
|
+
property(key, input) {
|
|
33
|
+
const owner = values.find((value) => value.propertyExists(key));
|
|
34
|
+
return owner === undefined ? unknownTarget('Property', key) : owner.property(key, input);
|
|
35
|
+
},
|
|
36
|
+
propertyOrdering: (key) => values.find((value) => value.propertyExists(key))?.propertyOrdering(key),
|
|
37
|
+
callableExists: (key) => values.some((value) => value.callableExists(key)),
|
|
38
|
+
callableInput(key, input) {
|
|
39
|
+
const owner = values.find((value) => value.callableExists(key));
|
|
40
|
+
return owner === undefined ? unknownTarget('Callable', key) : owner.callableInput(key, input);
|
|
41
|
+
},
|
|
42
|
+
callableFields: (key) => values.find((value) => value.callableExists(key))?.callableFields(key),
|
|
43
|
+
callableInputField(key, field, input) {
|
|
44
|
+
const owner = values.find((value) => value.callableExists(key));
|
|
45
|
+
return owner === undefined
|
|
46
|
+
? unknownTarget('Callable', key)
|
|
47
|
+
: owner.callableInputField(key, field, input);
|
|
48
|
+
},
|
|
49
|
+
callableOutput(key, output) {
|
|
50
|
+
const owner = values.find((value) => value.callableExists(key));
|
|
51
|
+
return owner === undefined
|
|
52
|
+
? unknownTarget('Callable', key)
|
|
53
|
+
: owner.callableOutput(key, output);
|
|
54
|
+
},
|
|
55
|
+
};
|
|
56
|
+
return Object.freeze(validation);
|
|
57
|
+
}
|
|
58
|
+
export function unknownInputField(field) {
|
|
59
|
+
return [
|
|
60
|
+
Object.freeze({
|
|
61
|
+
code: 'CALLABLE_INPUT_FIELD_UNKNOWN',
|
|
62
|
+
pointer: '',
|
|
63
|
+
message: `Input field ${field} is absent.`,
|
|
64
|
+
}),
|
|
65
|
+
];
|
|
66
|
+
}
|
|
67
|
+
function unknownTarget(kind, key) {
|
|
68
|
+
return [
|
|
69
|
+
Object.freeze({
|
|
70
|
+
code: 'DOMAIN_VALIDATION_TARGET_UNKNOWN',
|
|
71
|
+
pointer: '',
|
|
72
|
+
message: `${kind} ${key} is absent.`,
|
|
73
|
+
}),
|
|
74
|
+
];
|
|
75
|
+
}
|
package/dist/v1/index.d.ts
CHANGED
|
@@ -1,9 +1,16 @@
|
|
|
1
1
|
/** Stable aggregate facade for the V1 language. */
|
|
2
|
-
export { auto,
|
|
3
|
-
export
|
|
4
|
-
export
|
|
5
|
-
export {
|
|
2
|
+
export { auto, core, defineClass, defineSchema, edgeClass, func, fullMatch, method, nodeClass, output, path, policy, property, valueSchema, view, } from './builder/index.js';
|
|
3
|
+
export { PropertyValues } from './language/index.js';
|
|
4
|
+
export * as metadata from './language/definition/metadata.js';
|
|
5
|
+
export type { AnyResolvedClass, BoundMethodOf, BoundMethodShortcutsOf, CallableResultOf, CallableInputOf, CallableOutputOf, ClassSatisfactionKeysOf, ClassDefinition, CoreDefinition, CoreEdge, FunctionAuth, FunctionDefinition, MethodDefinition, MethodInheritance, MethodOwnerKeyOf, PolicyCheckExpression, PolicyDefinition, PropertyInputOf, PropertyAccessOf, PropertyOutputOf, PropertyShortcutsOf, PropertyValuesOf, ResolvedClass, ResolvedCoreDefinition, ResolvedData, ResolvedFunction, ResolvedMethod, ResolvedMethodCollection, ResolvedPolicy, ResolvedProperty, ResolvedView, MethodAccessOf, SelfMethodsOf, SelfPropertiesOf, SelfStaticMethodsOf, StaticMethodsOf, ViewDefinition, } from './language/index.js';
|
|
6
|
+
export { acceptDefinitionRef, callableAddress, ClassKey, equalDefinitionRefs, isDefinitionRef, Key, MethodKey, PropertyKey, } from './addressing/index.js';
|
|
7
|
+
export type { ClassRef, CoreRef, DefinitionBase, DefinitionKey, DefinitionRef, FunctionRef, MethodAddress, PolicyRef, Revision, ViewRef, } from './addressing/index.js';
|
|
8
|
+
export type { Definition } from './language/index.js';
|
|
9
|
+
export type { Domain, MethodOwnerOf, SourceDomain } from './domain/index.js';
|
|
10
|
+
export { isDomain } from './domain/index.js';
|
|
6
11
|
export type * as builder from './builder/index.js';
|
|
12
|
+
export type { PathAuthoring, TypedValueSchema } from './builder/index.js';
|
|
13
|
+
export type { PropertyValues as PropertyValuesValue } from './language/index.js';
|
|
14
|
+
export type { CompiledSchema } from './compiled/index.js';
|
|
7
15
|
export * as schema from './schema/index.js';
|
|
8
16
|
export * as bundle from './bundle/index.js';
|
|
9
|
-
//# sourceMappingURL=index.d.ts.map
|
package/dist/v1/index.js
CHANGED
|
@@ -1,6 +1,8 @@
|
|
|
1
1
|
/** Stable aggregate facade for the V1 language. */
|
|
2
|
-
export { auto,
|
|
3
|
-
export {
|
|
2
|
+
export { auto, core, defineClass, defineSchema, edgeClass, func, fullMatch, method, nodeClass, output, path, policy, property, valueSchema, view, } from './builder/index.js';
|
|
3
|
+
export { PropertyValues } from './language/index.js';
|
|
4
|
+
export * as metadata from './language/definition/metadata.js';
|
|
5
|
+
export { acceptDefinitionRef, callableAddress, ClassKey, equalDefinitionRefs, isDefinitionRef, Key, MethodKey, PropertyKey, } from './addressing/index.js';
|
|
6
|
+
export { isDomain } from './domain/index.js';
|
|
4
7
|
export * as schema from './schema/index.js';
|
|
5
8
|
export * as bundle from './bundle/index.js';
|
|
6
|
-
//# sourceMappingURL=index.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export {};
|
|
@@ -0,0 +1,33 @@
|
|
|
1
|
+
import type { DefinitionBase, FunctionRef } from '../../../addressing/index.js';
|
|
2
|
+
import type { PolicyCheckExpression } from '../../policy/model/policy.js';
|
|
3
|
+
import type { JsonSchema } from '../../value/model/schema.js';
|
|
4
|
+
export type MethodInheritance = 'abstract' | 'default' | 'sealed';
|
|
5
|
+
export type FunctionAuth = 'anonymous' | 'authenticated' | 'authorized';
|
|
6
|
+
export type CallableOutput = {
|
|
7
|
+
readonly mode: 'value';
|
|
8
|
+
readonly schema: JsonSchema;
|
|
9
|
+
} | {
|
|
10
|
+
readonly mode: 'stream';
|
|
11
|
+
readonly item: JsonSchema;
|
|
12
|
+
} | {
|
|
13
|
+
readonly mode: 'binary';
|
|
14
|
+
};
|
|
15
|
+
export type OutputMode = CallableOutput['mode'];
|
|
16
|
+
export interface CallableDefinitionBase {
|
|
17
|
+
readonly description?: string;
|
|
18
|
+
readonly input: JsonSchema;
|
|
19
|
+
readonly output: CallableOutput;
|
|
20
|
+
}
|
|
21
|
+
export type CallableDefinition = CallableDefinitionBase & ({
|
|
22
|
+
readonly auth: 'anonymous' | 'authenticated';
|
|
23
|
+
readonly policy?: never;
|
|
24
|
+
} | {
|
|
25
|
+
readonly auth: 'authorized';
|
|
26
|
+
readonly policy?: PolicyCheckExpression;
|
|
27
|
+
});
|
|
28
|
+
export type FunctionDefinition = DefinitionBase<FunctionRef> & CallableDefinition;
|
|
29
|
+
export type MethodDefinition = CallableDefinition & {
|
|
30
|
+
readonly static: boolean;
|
|
31
|
+
readonly inheritance: MethodInheritance;
|
|
32
|
+
};
|
|
33
|
+
export type MethodRecord = Readonly<Record<string, MethodDefinition>>;
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export {};
|
|
@@ -0,0 +1,68 @@
|
|
|
1
|
+
import type { DefinitionKey, FunctionRef, Key, MethodKey } from '../../addressing/index.js';
|
|
2
|
+
import type { ResolvedClass } from '../class/resolved.js';
|
|
3
|
+
import type { PolicyCheckExpression } from '../policy/model/policy.js';
|
|
4
|
+
import type { Diagnostic } from '../validation/diagnostic.js';
|
|
5
|
+
import type { FunctionDefinition, MethodDefinition } from './model/callable.js';
|
|
6
|
+
import type { FunctionAuth } from './model/callable.js';
|
|
7
|
+
type CallableDefinitionOf<Definition extends FunctionDefinition | MethodDefinition, Auth extends FunctionAuth, Policy extends PolicyCheckExpression> = Omit<Definition, 'auth' | 'policy'> & (Auth extends FunctionAuth ? {
|
|
8
|
+
readonly auth: Auth;
|
|
9
|
+
} & (Auth extends 'authorized' ? {
|
|
10
|
+
readonly policy?: Policy;
|
|
11
|
+
} : {
|
|
12
|
+
readonly policy?: never;
|
|
13
|
+
}) : never);
|
|
14
|
+
export interface ResolvedMethod<out Input = unknown, out Output = unknown, out Static extends boolean = boolean, out Inheritance extends MethodDefinition['inheritance'] = MethodDefinition['inheritance'], out Auth extends FunctionAuth = FunctionAuth, out Policy extends PolicyCheckExpression = PolicyCheckExpression, out ExactKey extends MethodKey = MethodKey> {
|
|
15
|
+
readonly owner: ResolvedClass<'node'> & {
|
|
16
|
+
readonly key: MethodOwnerKeyOfKey<ExactKey>;
|
|
17
|
+
};
|
|
18
|
+
readonly name: string;
|
|
19
|
+
readonly key: ExactKey;
|
|
20
|
+
readonly description?: MethodDefinition['description'];
|
|
21
|
+
readonly input: MethodDefinition['input'];
|
|
22
|
+
readonly output: MethodDefinition['output'];
|
|
23
|
+
readonly auth: Auth;
|
|
24
|
+
readonly policy?: Auth extends 'authorized' ? Policy : never;
|
|
25
|
+
readonly static: Static;
|
|
26
|
+
readonly inheritance: Inheritance;
|
|
27
|
+
/** Present only when the callable input is a safely enumerable closed object. */
|
|
28
|
+
readonly inputFields?: readonly string[];
|
|
29
|
+
readonly definition: CallableDefinitionOf<MethodDefinition, Auth, Policy> & {
|
|
30
|
+
readonly static: Static;
|
|
31
|
+
readonly inheritance: Inheritance;
|
|
32
|
+
};
|
|
33
|
+
validateInput(input: unknown): readonly Diagnostic[];
|
|
34
|
+
validateInputField(field: string, input: unknown): readonly Diagnostic[];
|
|
35
|
+
validateOutput(output: unknown): readonly Diagnostic[];
|
|
36
|
+
readonly __input?: Input;
|
|
37
|
+
readonly __output?: Output;
|
|
38
|
+
}
|
|
39
|
+
export type ResolvedMethodCollection<ByKey extends Readonly<Record<MethodKey, ResolvedMethod>> = Readonly<Record<MethodKey, ResolvedMethod>>, ByName extends Readonly<Record<string, ResolvedMethod>> = Readonly<Record<never, never>>> = Readonly<ByName> & Iterable<ByKey[keyof ByKey]> & {
|
|
40
|
+
readonly byKey: ByKey;
|
|
41
|
+
get<Key extends keyof ByKey>(key: Key): ByKey[Key];
|
|
42
|
+
get(key: MethodKey): ResolvedMethod | undefined;
|
|
43
|
+
};
|
|
44
|
+
export interface ResolvedFunction<out Input = unknown, out Output = unknown, out Auth extends FunctionAuth = FunctionAuth, out Policy extends PolicyCheckExpression = PolicyCheckExpression> {
|
|
45
|
+
readonly ref: FunctionRef;
|
|
46
|
+
readonly key: DefinitionKey<string, 'function'>;
|
|
47
|
+
readonly description?: FunctionDefinition['description'];
|
|
48
|
+
readonly input: FunctionDefinition['input'];
|
|
49
|
+
readonly output: FunctionDefinition['output'];
|
|
50
|
+
readonly auth: Auth;
|
|
51
|
+
readonly policy?: Auth extends 'authorized' ? Policy : never;
|
|
52
|
+
/** Present only when the callable input is a safely enumerable closed object. */
|
|
53
|
+
readonly inputFields?: readonly string[];
|
|
54
|
+
readonly definition: CallableDefinitionOf<FunctionDefinition, Auth, Policy>;
|
|
55
|
+
validateInput(input: unknown): readonly Diagnostic[];
|
|
56
|
+
validateInputField(field: string, input: unknown): readonly Diagnostic[];
|
|
57
|
+
validateOutput(output: unknown): readonly Diagnostic[];
|
|
58
|
+
readonly __input?: Input;
|
|
59
|
+
readonly __output?: Output;
|
|
60
|
+
}
|
|
61
|
+
export type ResolvedCallable = ResolvedFunction | ResolvedMethod;
|
|
62
|
+
export type MethodOwnerKeyOf<Method> = Method extends {
|
|
63
|
+
readonly key: infer ExactKey extends MethodKey;
|
|
64
|
+
} ? MethodOwnerKeyOfKey<ExactKey> : never;
|
|
65
|
+
type MethodOwnerKeyOfKey<ExactKey extends MethodKey> = ExactKey extends `${infer Origin}:class.${infer Owner}.method.${string}` ? DefinitionKey<Extract<Origin, Key.Origin>, 'class', Owner> : never;
|
|
66
|
+
export type CallableInputOf<Callable> = Callable extends ResolvedMethod<infer Input, unknown, boolean> ? Input : Callable extends ResolvedFunction<infer Input, unknown> ? Input : never;
|
|
67
|
+
export type CallableOutputOf<Callable> = Callable extends ResolvedMethod<unknown, infer Output, boolean> ? Output : Callable extends ResolvedFunction<unknown, infer Output> ? Output : never;
|
|
68
|
+
export {};
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export {};
|