@astrale-os/sdk 0.5.0-beta.13 → 0.5.0-beta.131
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/README.md +128 -20
- package/dist/application/action/action.d.ts +43 -0
- package/dist/application/action/action.js +1 -0
- package/dist/application/action/authoring.d.ts +5 -0
- package/dist/application/action/authoring.js +1 -0
- package/dist/application/action/context.d.ts +87 -0
- package/dist/application/action/context.js +1 -0
- package/dist/application/action/define.d.ts +12 -0
- package/dist/application/action/define.js +34 -0
- package/dist/application/action/index.d.ts +5 -0
- package/dist/application/action/index.js +1 -0
- package/dist/application/action/output.d.ts +6 -0
- package/dist/application/action/output.js +1 -0
- package/dist/application/application.d.ts +28 -0
- package/dist/application/application.js +1 -0
- package/dist/application/define.d.ts +16 -0
- package/dist/application/define.js +40 -0
- package/dist/application/dependency/index.d.ts +1 -0
- package/dist/application/dependency/index.js +1 -0
- package/dist/application/dependency/invoker.d.ts +26 -0
- package/dist/application/dependency/invoker.js +1 -0
- package/dist/application/error/error.d.ts +23 -0
- package/dist/application/error/error.js +87 -0
- package/dist/application/error/index.d.ts +2 -0
- package/dist/application/error/index.js +1 -0
- package/dist/application/index.d.ts +9 -0
- package/dist/application/index.js +4 -0
- package/dist/application/integration/admission.d.ts +9 -0
- package/dist/application/integration/admission.js +21 -0
- package/dist/application/integration/authentication.d.ts +10 -0
- package/dist/application/integration/authentication.js +1 -0
- package/dist/application/integration/authentication.typecheck.d.ts +1 -0
- package/dist/application/integration/authentication.typecheck.js +18 -0
- package/dist/application/integration/client.d.ts +27 -0
- package/dist/application/integration/client.js +117 -0
- package/dist/application/integration/define.d.ts +24 -0
- package/dist/application/integration/define.js +101 -0
- package/dist/application/integration/index.d.ts +8 -0
- package/dist/application/integration/index.js +2 -0
- package/dist/application/integration/integration.d.ts +19 -0
- package/dist/application/integration/integration.js +1 -0
- package/dist/application/integration/operation.d.ts +38 -0
- package/dist/application/integration/operation.js +1 -0
- package/dist/application/integration/provider.d.ts +14 -0
- package/dist/application/integration/provider.js +1 -0
- package/dist/application/integration/replay.d.ts +3 -0
- package/dist/application/integration/replay.js +37 -0
- package/dist/application/mutation/authoring/builder.d.ts +55 -0
- package/dist/application/mutation/authoring/builder.js +102 -0
- package/dist/application/mutation/authoring/endpoint.d.ts +16 -0
- package/dist/application/mutation/authoring/endpoint.js +22 -0
- package/dist/application/mutation/authoring/index.d.ts +4 -0
- package/dist/application/mutation/authoring/index.js +1 -0
- package/dist/application/mutation/authoring/precondition.d.ts +7 -0
- package/dist/application/mutation/authoring/precondition.js +8 -0
- package/dist/application/mutation/authoring/properties.d.ts +22 -0
- package/dist/application/mutation/authoring/properties.js +29 -0
- package/dist/application/mutation/authoring/transition.d.ts +26 -0
- package/dist/application/mutation/authoring/transition.js +63 -0
- package/dist/application/mutation/define.d.ts +12 -0
- package/dist/application/mutation/define.js +56 -0
- package/dist/application/mutation/execution/execute.d.ts +9 -0
- package/dist/application/mutation/execution/execute.js +21 -0
- package/dist/application/mutation/execution/executor.d.ts +13 -0
- package/dist/application/mutation/execution/executor.js +7 -0
- package/dist/application/mutation/execution/index.d.ts +2 -0
- package/dist/application/mutation/execution/index.js +1 -0
- package/dist/application/mutation/execution/projection.d.ts +3 -0
- package/dist/application/mutation/execution/projection.js +3 -0
- package/dist/application/mutation/failure.d.ts +13 -0
- package/dist/application/mutation/failure.js +51 -0
- package/dist/application/mutation/index.d.ts +8 -0
- package/dist/application/mutation/index.js +4 -0
- package/dist/application/mutation/mutation.d.ts +24 -0
- package/dist/application/mutation/mutation.js +1 -0
- package/dist/application/query/collection/identity.d.ts +4 -0
- package/dist/application/query/collection/identity.js +15 -0
- package/dist/application/query/collection/limits.d.ts +5 -0
- package/dist/application/query/collection/limits.js +5 -0
- package/dist/application/query/collection/metadata.d.ts +11 -0
- package/dist/application/query/collection/metadata.js +62 -0
- package/dist/application/query/collection/union.d.ts +19 -0
- package/dist/application/query/collection/union.js +157 -0
- package/dist/application/query/composite/builder.d.ts +46 -0
- package/dist/application/query/composite/builder.js +176 -0
- package/dist/application/query/composite/errors.d.ts +7 -0
- package/dist/application/query/composite/errors.js +8 -0
- package/dist/application/query/composite/index.d.ts +4 -0
- package/dist/application/query/composite/index.js +3 -0
- package/dist/application/query/composite/plan.d.ts +24 -0
- package/dist/application/query/composite/plan.js +85 -0
- package/dist/application/query/composite/query.d.ts +44 -0
- package/dist/application/query/composite/query.js +1 -0
- package/dist/application/query/define.d.ts +48 -0
- package/dist/application/query/define.js +162 -0
- package/dist/application/query/execution/execute.d.ts +14 -0
- package/dist/application/query/execution/execute.js +74 -0
- package/dist/application/query/execution/executor.d.ts +14 -0
- package/dist/application/query/execution/executor.js +7 -0
- package/dist/application/query/execution/index.d.ts +2 -0
- package/dist/application/query/execution/index.js +1 -0
- package/dist/application/query/execution/pages.d.ts +1 -0
- package/dist/application/query/execution/pages.js +1 -0
- package/dist/application/query/execution/projection.d.ts +3 -0
- package/dist/application/query/execution/projection.js +3 -0
- package/dist/application/query/failure.d.ts +10 -0
- package/dist/application/query/failure.js +14 -0
- package/dist/application/query/index.d.ts +10 -0
- package/dist/application/query/index.js +6 -0
- package/dist/application/query/query.d.ts +35 -0
- package/dist/application/query/query.js +1 -0
- package/dist/application/query/single/index.d.ts +4 -0
- package/dist/application/query/single/index.js +3 -0
- package/dist/application/query/single/node.d.ts +18 -0
- package/dist/application/query/single/node.js +86 -0
- package/dist/application/query/single/pagination.d.ts +9 -0
- package/dist/application/query/single/pagination.js +24 -0
- package/dist/application/query/single/query.d.ts +47 -0
- package/dist/application/query/single/query.js +1 -0
- package/dist/application/query/single/selection.d.ts +2 -0
- package/dist/application/query/single/selection.js +23 -0
- package/dist/application/requirements/authority.d.ts +7 -0
- package/dist/application/requirements/authority.js +38 -0
- package/dist/application/requirements/classes.d.ts +9 -0
- package/dist/application/requirements/classes.js +52 -0
- package/dist/application/requirements/core.d.ts +14 -0
- package/dist/application/requirements/core.js +41 -0
- package/dist/application/requirements/functions.d.ts +4 -0
- package/dist/application/requirements/functions.js +30 -0
- package/dist/application/requirements/index.d.ts +19 -0
- package/dist/application/requirements/index.js +32 -0
- package/dist/application/requirements/requirement.d.ts +25 -0
- package/dist/application/requirements/requirement.js +1 -0
- package/dist/application/routes/admission.d.ts +5 -0
- package/dist/application/routes/admission.js +15 -0
- package/dist/application/routes/collection.d.ts +8 -0
- package/dist/application/routes/collection.js +23 -0
- package/dist/application/routes/index.d.ts +9 -0
- package/dist/application/routes/index.js +45 -0
- package/dist/application/routes/route.d.ts +10 -0
- package/dist/application/routes/route.js +1 -0
- package/dist/application/runtime/actions.d.ts +10 -0
- package/dist/application/runtime/actions.js +27 -0
- package/dist/application/runtime/authoring.d.ts +6 -0
- package/dist/application/runtime/authoring.js +1 -0
- package/dist/application/runtime/callables.d.ts +11 -0
- package/dist/application/runtime/callables.js +40 -0
- package/dist/application/runtime/declarations.d.ts +43 -0
- package/dist/application/runtime/declarations.js +1 -0
- package/dist/application/runtime/define.d.ts +28 -0
- package/dist/application/runtime/define.js +42 -0
- package/dist/application/runtime/index.d.ts +6 -0
- package/dist/application/runtime/index.js +2 -0
- package/dist/application/runtime/initialize.d.ts +10 -0
- package/dist/application/runtime/initialize.js +1 -0
- package/dist/application/runtime/integrations.d.ts +3 -0
- package/dist/application/runtime/integrations.js +1 -0
- package/dist/application/runtime/runtime.d.ts +30 -0
- package/dist/application/runtime/runtime.js +37 -0
- package/dist/application/runtime/workflows.d.ts +11 -0
- package/dist/application/runtime/workflows.js +33 -0
- package/dist/application/state/index.d.ts +2 -0
- package/dist/application/state/index.js +1 -0
- package/dist/application/view/admission.d.ts +3 -0
- package/dist/application/view/admission.js +8 -0
- package/dist/application/view/define.d.ts +4 -0
- package/dist/application/view/define.js +52 -0
- package/dist/application/view/frontend.d.ts +19 -0
- package/dist/application/view/frontend.js +1 -0
- package/dist/application/view/index.d.ts +6 -0
- package/dist/application/view/index.js +3 -0
- package/dist/application/view/route.d.ts +19 -0
- package/dist/application/view/route.js +131 -0
- package/dist/application/view/source.d.ts +16 -0
- package/dist/application/view/source.js +55 -0
- package/dist/application/workflow/authoring.d.ts +4 -0
- package/dist/application/workflow/authoring.js +1 -0
- package/dist/application/workflow/context.d.ts +9 -0
- package/dist/application/workflow/context.js +1 -0
- package/dist/application/workflow/define.d.ts +11 -0
- package/dist/application/workflow/define.js +37 -0
- package/dist/application/workflow/index.d.ts +6 -0
- package/dist/application/workflow/index.js +3 -0
- package/dist/application/workflow/runner/index.d.ts +2 -0
- package/dist/application/workflow/runner/index.js +1 -0
- package/dist/application/workflow/runner/inline.d.ts +3 -0
- package/dist/application/workflow/runner/inline.js +55 -0
- package/dist/application/workflow/runner/runner.d.ts +10 -0
- package/dist/application/workflow/runner/runner.js +1 -0
- package/dist/application/workflow/step/index.d.ts +2 -0
- package/dist/application/workflow/step/index.js +1 -0
- package/dist/application/workflow/step/run.d.ts +2 -0
- package/dist/application/workflow/step/run.js +10 -0
- package/dist/application/workflow/step/step.d.ts +4 -0
- package/dist/application/workflow/step/step.js +1 -0
- package/dist/application/workflow/workflow.d.ts +23 -0
- package/dist/application/workflow/workflow.js +1 -0
- package/dist/deployment/adapter/adapter.d.ts +27 -0
- package/dist/deployment/adapter/adapter.js +1 -0
- package/dist/deployment/adapter/define.d.ts +7 -0
- package/dist/deployment/adapter/define.js +66 -0
- package/dist/deployment/adapter/deploy/context.d.ts +15 -0
- package/dist/deployment/adapter/deploy/context.js +1 -0
- package/dist/deployment/adapter/deploy/index.d.ts +2 -0
- package/dist/deployment/adapter/deploy/index.js +1 -0
- package/dist/deployment/adapter/deploy/result.d.ts +50 -0
- package/dist/deployment/adapter/deploy/result.js +1 -0
- package/dist/deployment/adapter/index.d.ts +4 -0
- package/dist/deployment/adapter/index.js +1 -0
- package/dist/deployment/adapter/prepare/artifact.d.ts +33 -0
- package/dist/deployment/adapter/prepare/artifact.js +1 -0
- package/dist/deployment/adapter/prepare/context.d.ts +23 -0
- package/dist/deployment/adapter/prepare/context.js +1 -0
- package/dist/deployment/adapter/prepare/index.d.ts +2 -0
- package/dist/deployment/adapter/prepare/index.js +1 -0
- package/dist/deployment/authoring.d.ts +5 -0
- package/dist/deployment/authoring.js +2 -0
- package/dist/deployment/build/admission.d.ts +12 -0
- package/dist/deployment/build/admission.js +15 -0
- package/dist/deployment/build/build.d.ts +13 -0
- package/dist/deployment/build/build.js +1 -0
- package/dist/deployment/build/compile.d.ts +9 -0
- package/dist/deployment/build/compile.js +114 -0
- package/dist/deployment/build/frontend/compilation.d.ts +18 -0
- package/dist/deployment/build/frontend/compilation.js +29 -0
- package/dist/deployment/build/frontend/digest.d.ts +4 -0
- package/dist/deployment/build/frontend/digest.js +23 -0
- package/dist/deployment/build/frontend/files.d.ts +13 -0
- package/dist/deployment/build/frontend/files.js +61 -0
- package/dist/deployment/build/frontend/index.d.ts +6 -0
- package/dist/deployment/build/frontend/index.js +4 -0
- package/dist/deployment/build/frontend/provenance.d.ts +7 -0
- package/dist/deployment/build/frontend/provenance.js +12 -0
- package/dist/deployment/build/index.d.ts +6 -0
- package/dist/deployment/build/index.js +4 -0
- package/dist/deployment/build/material.d.ts +42 -0
- package/dist/deployment/build/material.js +201 -0
- package/dist/deployment/build/schema.d.ts +10 -0
- package/dist/deployment/build/schema.js +1 -0
- package/dist/deployment/deploy.d.ts +20 -0
- package/dist/deployment/deploy.js +31 -0
- package/dist/deployment/deployment.d.ts +9 -0
- package/dist/deployment/deployment.js +10 -0
- package/dist/deployment/index.d.ts +14 -7
- package/dist/deployment/index.js +7 -4
- package/dist/deployment/release/addressing.d.ts +7 -0
- package/dist/deployment/release/addressing.js +27 -0
- package/dist/deployment/release/admission.d.ts +3 -0
- package/dist/deployment/release/admission.js +8 -0
- package/dist/deployment/release/assemble.d.ts +5 -0
- package/dist/deployment/release/assemble.js +20 -0
- package/dist/deployment/release/index.d.ts +5 -0
- package/dist/deployment/release/index.js +4 -0
- package/dist/deployment/release/invocation.d.ts +2 -0
- package/dist/deployment/release/invocation.js +5 -0
- package/dist/deployment/release/publication/callables.d.ts +4 -0
- package/dist/deployment/release/publication/callables.js +8 -0
- package/dist/deployment/release/publication/index.d.ts +6 -0
- package/dist/deployment/release/publication/index.js +6 -0
- package/dist/deployment/release/publication/manifest.d.ts +3 -0
- package/dist/deployment/release/publication/manifest.js +5 -0
- package/dist/deployment/release/publication/requirements.d.ts +3 -0
- package/dist/deployment/release/publication/requirements.js +3 -0
- package/dist/deployment/release/publication/routes.d.ts +4 -0
- package/dist/deployment/release/publication/routes.js +4 -0
- package/dist/deployment/release/publication/seal.d.ts +11 -0
- package/dist/deployment/release/publication/seal.js +40 -0
- package/dist/deployment/release/publication/views.d.ts +4 -0
- package/dist/deployment/release/publication/views.js +13 -0
- package/dist/deployment/release/release.d.ts +11 -0
- package/dist/deployment/release/release.js +1 -0
- package/dist/deployment/release/runtime.d.ts +2 -0
- package/dist/deployment/release/runtime.js +2 -0
- package/dist/deployment/runtime/admission.d.ts +5 -0
- package/dist/deployment/runtime/admission.js +11 -0
- package/dist/deployment/runtime/index.d.ts +3 -0
- package/dist/deployment/runtime/index.js +3 -0
- package/dist/deployment/runtime/reference.d.ts +7 -0
- package/dist/deployment/runtime/reference.js +16 -0
- package/dist/deployment/runtime/resolve.d.ts +10 -0
- package/dist/deployment/runtime/resolve.js +29 -0
- package/dist/deployment/verify/index.d.ts +4 -0
- package/dist/deployment/verify/index.js +3 -0
- package/dist/deployment/verify/preflight/artifact.d.ts +6 -0
- package/dist/deployment/verify/preflight/artifact.js +122 -0
- package/dist/deployment/verify/preflight/build.d.ts +2 -0
- package/dist/deployment/verify/preflight/build.js +6 -0
- package/dist/deployment/verify/preflight/index.d.ts +13 -0
- package/dist/deployment/verify/preflight/index.js +13 -0
- package/dist/deployment/verify/preflight/publication.d.ts +4 -0
- package/dist/deployment/verify/preflight/publication.js +14 -0
- package/dist/deployment/verify/readiness/deployment.d.ts +3 -0
- package/dist/deployment/verify/readiness/deployment.js +150 -0
- package/dist/deployment/verify/readiness/identity.d.ts +7 -0
- package/dist/deployment/verify/readiness/identity.js +29 -0
- package/dist/deployment/verify/readiness/index.d.ts +10 -0
- package/dist/deployment/verify/readiness/index.js +10 -0
- package/dist/deployment/verify/readiness/publication.d.ts +11 -0
- package/dist/deployment/verify/readiness/publication.js +41 -0
- package/dist/execution/identity/authentication.d.ts +21 -0
- package/dist/execution/identity/authentication.js +161 -0
- package/dist/execution/identity/callback.d.ts +44 -0
- package/dist/execution/identity/callback.js +105 -0
- package/dist/execution/identity/delivery.d.ts +6 -0
- package/dist/execution/identity/delivery.js +34 -0
- package/dist/execution/identity/errors.d.ts +22 -0
- package/dist/execution/identity/errors.js +61 -0
- package/dist/execution/identity/exchange.d.ts +10 -0
- package/dist/execution/identity/exchange.js +115 -0
- package/dist/execution/identity/identity.d.ts +24 -0
- package/dist/execution/identity/identity.js +99 -0
- package/dist/execution/identity/index.d.ts +2 -0
- package/dist/execution/identity/index.js +2 -0
- package/dist/execution/identity/jwks.d.ts +29 -0
- package/dist/execution/identity/jwks.js +252 -0
- package/dist/execution/identity/signing.d.ts +9 -0
- package/dist/execution/identity/signing.js +28 -0
- package/dist/execution/index.d.ts +5 -0
- package/dist/execution/index.js +3 -0
- package/dist/execution/invocation/admission/authentication.d.ts +17 -0
- package/dist/execution/invocation/admission/authentication.js +153 -0
- package/dist/execution/invocation/admission/authority.d.ts +34 -0
- package/dist/execution/invocation/admission/authority.js +23 -0
- package/dist/execution/invocation/admission/index.d.ts +5 -0
- package/dist/execution/invocation/admission/index.js +4 -0
- package/dist/execution/invocation/admission/input.d.ts +2 -0
- package/dist/execution/invocation/admission/input.js +4 -0
- package/dist/execution/invocation/admission/target.d.ts +8 -0
- package/dist/execution/invocation/admission/target.js +30 -0
- package/dist/execution/invocation/dependency/bind.d.ts +5 -0
- package/dist/execution/invocation/dependency/bind.js +68 -0
- package/dist/execution/invocation/dependency/index.d.ts +1 -0
- package/dist/execution/invocation/dependency/index.js +1 -0
- package/dist/execution/invocation/dispatch/action.d.ts +3 -0
- package/dist/execution/invocation/dispatch/action.js +20 -0
- package/dist/execution/invocation/dispatch/context.d.ts +23 -0
- package/dist/execution/invocation/dispatch/context.js +64 -0
- package/dist/execution/invocation/dispatch/index.d.ts +5 -0
- package/dist/execution/invocation/dispatch/index.js +5 -0
- package/dist/execution/invocation/dispatch/receiver.d.ts +4 -0
- package/dist/execution/invocation/dispatch/receiver.js +18 -0
- package/dist/execution/invocation/dispatch/select.d.ts +10 -0
- package/dist/execution/invocation/dispatch/select.js +20 -0
- package/dist/execution/invocation/dispatch/workflow.d.ts +4 -0
- package/dist/execution/invocation/dispatch/workflow.js +24 -0
- package/dist/execution/invocation/handler.d.ts +7 -0
- package/dist/execution/invocation/handler.js +37 -0
- package/dist/execution/invocation/index.d.ts +5 -0
- package/dist/execution/invocation/index.js +3 -0
- package/dist/execution/invocation/integration/authentication.d.ts +5 -0
- package/dist/execution/invocation/integration/authentication.js +53 -0
- package/dist/execution/invocation/integration/call.d.ts +11 -0
- package/dist/execution/invocation/integration/call.js +24 -0
- package/dist/execution/invocation/integration/clients.d.ts +5 -0
- package/dist/execution/invocation/integration/clients.js +4 -0
- package/dist/execution/invocation/integration/index.d.ts +2 -0
- package/dist/execution/invocation/integration/index.js +2 -0
- package/dist/execution/invocation/invocation.d.ts +10 -0
- package/dist/execution/invocation/invocation.js +53 -0
- package/dist/execution/invocation/lifecycle/active.d.ts +4 -0
- package/dist/execution/invocation/lifecycle/active.js +86 -0
- package/dist/execution/invocation/lifecycle/index.d.ts +1 -0
- package/dist/execution/invocation/lifecycle/index.js +1 -0
- package/dist/execution/invocation/result/errors.d.ts +23 -0
- package/dist/execution/invocation/result/errors.js +97 -0
- package/dist/execution/invocation/result/index.d.ts +4 -0
- package/dist/execution/invocation/result/index.js +3 -0
- package/dist/execution/invocation/result/project.d.ts +3 -0
- package/dist/execution/invocation/result/project.js +186 -0
- package/dist/execution/invocation/result/validate.d.ts +4 -0
- package/dist/execution/invocation/result/validate.js +25 -0
- package/dist/execution/node/index.d.ts +2 -0
- package/dist/execution/node/index.js +1 -0
- package/dist/execution/node/listener.d.ts +10 -0
- package/dist/execution/node/listener.js +25 -0
- package/dist/execution/node/serve.d.ts +9 -0
- package/dist/execution/node/serve.js +44 -0
- package/dist/execution/runtime/admission.d.ts +3 -0
- package/dist/execution/runtime/admission.js +8 -0
- package/dist/execution/runtime/index.d.ts +5 -0
- package/dist/execution/runtime/index.js +5 -0
- package/dist/execution/runtime/initialize.d.ts +11 -0
- package/dist/execution/runtime/initialize.js +13 -0
- package/dist/execution/runtime/integrations.d.ts +3 -0
- package/dist/execution/runtime/integrations.js +5 -0
- package/dist/execution/runtime/load.d.ts +14 -0
- package/dist/execution/runtime/load.js +12 -0
- package/dist/execution/runtime/providers.d.ts +3 -0
- package/dist/execution/runtime/providers.js +12 -0
- package/dist/execution/serve.d.ts +27 -0
- package/dist/execution/serve.js +61 -0
- package/dist/execution/service/create.d.ts +4 -0
- package/dist/execution/service/create.js +113 -0
- package/dist/execution/service/errors.d.ts +3 -0
- package/dist/execution/service/errors.js +3 -0
- package/dist/execution/service/index.d.ts +3 -0
- package/dist/execution/service/index.js +1 -0
- package/dist/execution/service/initialization.d.ts +6 -0
- package/dist/execution/service/initialization.js +18 -0
- package/dist/execution/service/lifecycle.d.ts +7 -0
- package/dist/execution/service/lifecycle.js +25 -0
- package/dist/execution/service/publication/delivery.d.ts +2 -0
- package/dist/execution/service/publication/delivery.js +9 -0
- package/dist/execution/service/publication/index.d.ts +3 -0
- package/dist/execution/service/publication/index.js +3 -0
- package/dist/execution/service/publication/installation.d.ts +3 -0
- package/dist/execution/service/publication/installation.js +8 -0
- package/dist/execution/service/publication/source.d.ts +3 -0
- package/dist/execution/service/publication/source.js +11 -0
- package/dist/execution/service/release.d.ts +7 -0
- package/dist/execution/service/release.js +12 -0
- package/dist/execution/service/service.d.ts +23 -0
- package/dist/execution/service/service.js +1 -0
- package/dist/index.d.ts +21 -23
- package/dist/index.js +11 -12
- package/dist/platform/auth/exchange/configuration.d.ts +3 -0
- package/dist/platform/auth/exchange/configuration.js +3 -0
- package/dist/platform/auth/exchange/index.d.ts +2 -0
- package/dist/platform/auth/exchange/index.js +2 -0
- package/dist/platform/auth/exchange/response.d.ts +2 -0
- package/dist/platform/auth/exchange/response.js +2 -0
- package/dist/platform/auth/index.d.ts +4 -0
- package/dist/platform/auth/index.js +4 -0
- package/dist/platform/client/index.d.ts +5 -0
- package/dist/platform/client/index.js +4 -0
- package/dist/platform/client/schema/index.d.ts +2 -0
- package/dist/platform/client/schema/index.js +2 -0
- package/dist/platform/client/session/index.d.ts +2 -0
- package/dist/platform/client/session/index.js +2 -0
- package/dist/platform/client/store/index.d.ts +2 -0
- package/dist/platform/client/store/index.js +2 -0
- package/dist/platform/graph/alias.d.ts +6 -0
- package/dist/platform/graph/alias.js +6 -0
- package/dist/platform/graph/class/index.d.ts +4 -0
- package/dist/platform/graph/class/index.js +2 -0
- package/dist/platform/graph/document/index.d.ts +3 -0
- package/dist/platform/graph/document/index.js +3 -0
- package/dist/platform/graph/edge/index.d.ts +2 -0
- package/dist/platform/graph/edge/index.js +2 -0
- package/dist/platform/graph/index.d.ts +14 -0
- package/dist/platform/graph/index.js +13 -0
- package/dist/platform/graph/node/index.d.ts +2 -0
- package/dist/platform/graph/node/index.js +2 -0
- package/dist/platform/graph/path/index.d.ts +2 -0
- package/dist/platform/graph/path/index.js +2 -0
- package/dist/platform/graph/properties/index.d.ts +2 -0
- package/dist/platform/graph/properties/index.js +2 -0
- package/dist/platform/invocation/index.d.ts +2 -0
- package/dist/platform/invocation/index.js +2 -0
- package/dist/platform/publication/index.d.ts +2 -0
- package/dist/platform/publication/index.js +2 -0
- package/dist/platform/result/index.d.ts +2 -0
- package/dist/platform/result/index.js +1 -0
- package/dist/platform/result/result.d.ts +10 -0
- package/dist/platform/result/result.js +6 -0
- package/dist/platform/schema/addressing/index.d.ts +3 -0
- package/dist/platform/schema/addressing/index.js +2 -0
- package/dist/platform/schema/class-authoring.d.ts +37 -0
- package/dist/platform/schema/class-authoring.js +20 -0
- package/dist/platform/schema/class-icon.d.ts +15 -0
- package/dist/platform/schema/class-icon.js +46 -0
- package/dist/platform/schema/error.d.ts +11 -0
- package/dist/platform/schema/error.js +34 -0
- package/dist/platform/schema/errors/index.d.ts +3 -0
- package/dist/platform/schema/errors/index.js +2 -0
- package/dist/platform/schema/icons/index.d.ts +2 -0
- package/dist/platform/schema/icons/index.js +2 -0
- package/dist/platform/schema/index.d.ts +23 -0
- package/dist/platform/schema/index.js +12 -0
- package/dist/platform/schema/kernel.d.ts +22 -0
- package/dist/platform/schema/kernel.js +5 -0
- package/dist/platform/schema/node-id.d.ts +3 -0
- package/dist/platform/schema/node-id.js +6 -0
- package/dist/platform/schema/schema-authoring.d.ts +48 -0
- package/dist/platform/schema/schema-authoring.js +3 -0
- package/dist/platform/schema/state-property.d.ts +11 -0
- package/dist/platform/schema/state-property.js +3 -0
- package/dist/platform/value/index.d.ts +3 -0
- package/dist/platform/value/index.js +3 -0
- package/dist/project/admit.d.ts +4 -0
- package/dist/project/admit.js +22 -0
- package/dist/project/define.d.ts +12 -0
- package/dist/project/define.js +106 -0
- package/dist/project/index.d.ts +4 -0
- package/dist/project/index.js +2 -0
- package/dist/project/project.d.ts +24 -0
- package/dist/project/project.js +1 -0
- package/dist/testing/dataset/admission.d.ts +13 -0
- package/dist/testing/dataset/admission.js +107 -0
- package/dist/testing/dataset/builder.d.ts +42 -0
- package/dist/testing/dataset/builder.js +127 -0
- package/dist/testing/dataset/codec.d.ts +6 -0
- package/dist/testing/dataset/codec.js +113 -0
- package/dist/testing/dataset/dataset.d.ts +58 -0
- package/dist/testing/dataset/dataset.js +2 -0
- package/dist/testing/dataset/define.d.ts +33 -0
- package/dist/testing/dataset/define.js +105 -0
- package/dist/testing/dataset/index.d.ts +8 -0
- package/dist/testing/dataset/index.js +4 -0
- package/dist/testing/dataset/references.d.ts +14 -0
- package/dist/testing/dataset/references.js +56 -0
- package/dist/testing/index.d.ts +9 -0
- package/dist/testing/index.js +5 -0
- package/dist/testing/load.d.ts +14 -0
- package/dist/testing/load.js +44 -0
- package/dist/testing/reference.d.ts +11 -0
- package/dist/testing/reference.js +19 -0
- package/dist/testing/tests.d.ts +12 -0
- package/dist/testing/tests.js +31 -0
- package/dist/tooling/cli/arguments.d.ts +17 -0
- package/dist/tooling/cli/arguments.js +162 -0
- package/dist/tooling/cli/astrale/authority.d.ts +5 -0
- package/dist/tooling/cli/astrale/authority.js +11 -0
- package/dist/tooling/cli/astrale/executable.d.ts +2 -0
- package/dist/tooling/cli/astrale/executable.js +47 -0
- package/dist/tooling/cli/astrale/failure.d.ts +6 -0
- package/dist/tooling/cli/astrale/failure.js +48 -0
- package/dist/tooling/cli/astrale/instance.d.ts +11 -0
- package/dist/tooling/cli/astrale/instance.js +52 -0
- package/dist/tooling/cli/astrale/process.d.ts +13 -0
- package/dist/tooling/cli/astrale/process.js +94 -0
- package/dist/tooling/cli/astrale/version.d.ts +18 -0
- package/dist/tooling/cli/astrale/version.js +55 -0
- package/dist/tooling/cli/bin.d.ts +6 -0
- package/dist/tooling/cli/bin.js +36 -0
- package/dist/tooling/cli/bun.d.ts +15 -0
- package/dist/tooling/cli/bun.js +108 -0
- package/dist/tooling/cli/credential.d.ts +2 -0
- package/dist/tooling/cli/credential.js +57 -0
- package/dist/tooling/cli/development/candidate.d.ts +25 -0
- package/dist/tooling/cli/development/candidate.js +176 -0
- package/dist/tooling/cli/development/deployment.d.ts +16 -0
- package/dist/tooling/cli/development/deployment.js +39 -0
- package/dist/tooling/cli/development/develop.d.ts +11 -0
- package/dist/tooling/cli/development/develop.js +240 -0
- package/dist/tooling/cli/development/lease.d.ts +18 -0
- package/dist/tooling/cli/development/lease.js +163 -0
- package/dist/tooling/cli/development/lifecycle.d.ts +9 -0
- package/dist/tooling/cli/development/lifecycle.js +43 -0
- package/dist/tooling/cli/development/project-imports.d.ts +22 -0
- package/dist/tooling/cli/development/project-imports.js +39 -0
- package/dist/tooling/cli/development/project-lock.d.ts +16 -0
- package/dist/tooling/cli/development/project-lock.js +41 -0
- package/dist/tooling/cli/development/rebuild.d.ts +13 -0
- package/dist/tooling/cli/development/rebuild.js +58 -0
- package/dist/tooling/cli/development/release-evidence.d.ts +4 -0
- package/dist/tooling/cli/development/release-evidence.js +10 -0
- package/dist/tooling/cli/development/report.d.ts +6 -0
- package/dist/tooling/cli/development/report.js +14 -0
- package/dist/tooling/cli/development/session-file.d.ts +53 -0
- package/dist/tooling/cli/development/session-file.js +337 -0
- package/dist/tooling/cli/development/source-watch.d.ts +14 -0
- package/dist/tooling/cli/development/source-watch.js +140 -0
- package/dist/tooling/cli/development/sources.d.ts +7 -0
- package/dist/tooling/cli/development/sources.js +48 -0
- package/dist/tooling/cli/development/target-lock.d.ts +16 -0
- package/dist/tooling/cli/development/target-lock.js +68 -0
- package/dist/tooling/cli/development/view.d.ts +28 -0
- package/dist/tooling/cli/development/view.js +151 -0
- package/dist/tooling/cli/dotenv.d.ts +19 -0
- package/dist/tooling/cli/dotenv.js +85 -0
- package/dist/tooling/cli/environment-release.d.ts +21 -0
- package/dist/tooling/cli/environment-release.js +46 -0
- package/dist/tooling/cli/evidence.d.ts +11 -0
- package/dist/tooling/cli/evidence.js +52 -0
- package/dist/tooling/cli/failure.d.ts +2 -0
- package/dist/tooling/cli/failure.js +13 -0
- package/dist/tooling/cli/help.d.ts +8 -0
- package/dist/tooling/cli/help.js +152 -0
- package/dist/tooling/cli/index.d.ts +16 -0
- package/dist/tooling/cli/index.js +15 -0
- package/dist/tooling/cli/installation/index.d.ts +2 -0
- package/dist/tooling/cli/installation/index.js +1 -0
- package/dist/tooling/cli/installation/observation.d.ts +10 -0
- package/dist/tooling/cli/installation/observation.js +44 -0
- package/dist/tooling/cli/installation/reconcile.d.ts +32 -0
- package/dist/tooling/cli/installation/reconcile.js +122 -0
- package/dist/tooling/cli/log.d.ts +10 -0
- package/dist/tooling/cli/log.js +16 -0
- package/dist/tooling/cli/orchestrate.d.ts +7 -0
- package/dist/tooling/cli/orchestrate.js +198 -0
- package/dist/tooling/cli/project.d.ts +17 -0
- package/dist/tooling/cli/project.js +18 -0
- package/dist/tooling/cli/run.d.ts +1 -0
- package/dist/tooling/cli/run.js +1 -0
- package/dist/tooling/cli/source.d.ts +2 -0
- package/dist/tooling/cli/source.js +2 -0
- package/dist/tooling/cli/test.d.ts +12 -0
- package/dist/tooling/cli/test.js +47 -0
- package/dist/tooling/linter/adapters/typescript/discover.d.ts +3 -0
- package/dist/tooling/linter/adapters/typescript/discover.js +424 -0
- package/dist/tooling/linter/adapters/typescript/evidence-admission.d.ts +4 -0
- package/dist/tooling/linter/adapters/typescript/evidence-admission.js +21 -0
- package/dist/tooling/linter/adapters/typescript/imports.d.ts +6 -0
- package/dist/tooling/linter/adapters/typescript/imports.js +172 -0
- package/dist/tooling/linter/adapters/typescript/index.d.ts +49 -0
- package/dist/tooling/linter/adapters/typescript/index.js +9 -0
- package/dist/tooling/linter/adapters/typescript/query-collection-type.d.ts +4 -0
- package/dist/tooling/linter/adapters/typescript/query-collection-type.js +47 -0
- package/dist/tooling/linter/adapters/typescript/query-observation.d.ts +3 -0
- package/dist/tooling/linter/adapters/typescript/query-observation.js +228 -0
- package/dist/tooling/linter/adapters/typescript/suppression-directives.d.ts +4 -0
- package/dist/tooling/linter/adapters/typescript/suppression-directives.js +84 -0
- package/dist/tooling/linter/adapters/typescript/syntax.d.ts +38 -0
- package/dist/tooling/linter/adapters/typescript/syntax.js +182 -0
- package/dist/tooling/linter/adapters/typescript/type-analysis.d.ts +9 -0
- package/dist/tooling/linter/adapters/typescript/type-analysis.js +55 -0
- package/dist/tooling/linter/adapters/typescript/type-universe.d.ts +1 -0
- package/dist/tooling/linter/adapters/typescript/type-universe.js +264 -0
- package/dist/tooling/linter/analysis/query/decision.d.ts +4 -0
- package/dist/tooling/linter/analysis/query/decision.js +73 -0
- package/dist/tooling/linter/analysis/query/index.d.ts +3 -0
- package/dist/tooling/linter/analysis/query/index.js +2 -0
- package/dist/tooling/linter/analysis/query/observation.d.ts +35 -0
- package/dist/tooling/linter/analysis/query/observation.js +12 -0
- package/dist/tooling/linter/catalog/compile.d.ts +2 -0
- package/dist/tooling/linter/catalog/compile.js +110 -0
- package/dist/tooling/linter/catalog/index.d.ts +18 -0
- package/dist/tooling/linter/catalog/index.js +2 -0
- package/dist/tooling/linter/catalog/revision.d.ts +6 -0
- package/dist/tooling/linter/catalog/revision.js +12 -0
- package/dist/tooling/linter/diagnostics/error.d.ts +9 -0
- package/dist/tooling/linter/diagnostics/error.js +9 -0
- package/dist/tooling/linter/diagnostics/index.d.ts +28 -0
- package/dist/tooling/linter/diagnostics/index.js +2 -0
- package/dist/tooling/linter/diagnostics/sort.d.ts +2 -0
- package/dist/tooling/linter/diagnostics/sort.js +26 -0
- package/dist/tooling/linter/evaluation/binding/bind.d.ts +4 -0
- package/dist/tooling/linter/evaluation/binding/bind.js +384 -0
- package/dist/tooling/linter/evaluation/binding/diagnostic.d.ts +4 -0
- package/dist/tooling/linter/evaluation/binding/diagnostic.js +16 -0
- package/dist/tooling/linter/evaluation/binding/index.d.ts +1 -0
- package/dist/tooling/linter/evaluation/binding/index.js +1 -0
- package/dist/tooling/linter/evaluation/contract/availability.d.ts +30 -0
- package/dist/tooling/linter/evaluation/contract/availability.js +1 -0
- package/dist/tooling/linter/evaluation/contract/decision.d.ts +25 -0
- package/dist/tooling/linter/evaluation/contract/decision.js +1 -0
- package/dist/tooling/linter/evaluation/contract/evidence.d.ts +11 -0
- package/dist/tooling/linter/evaluation/contract/evidence.js +1 -0
- package/dist/tooling/linter/evaluation/contract/implementation.d.ts +21 -0
- package/dist/tooling/linter/evaluation/contract/implementation.js +1 -0
- package/dist/tooling/linter/evaluation/contract/index.d.ts +4 -0
- package/dist/tooling/linter/evaluation/contract/index.js +1 -0
- package/dist/tooling/linter/evaluation/index.d.ts +2 -0
- package/dist/tooling/linter/evaluation/index.js +1 -0
- package/dist/tooling/linter/implementations/source/actions.d.ts +2 -0
- package/dist/tooling/linter/implementations/source/actions.js +184 -0
- package/dist/tooling/linter/implementations/source/callable-requirements.d.ts +28 -0
- package/dist/tooling/linter/implementations/source/callable-requirements.js +234 -0
- package/dist/tooling/linter/implementations/source/dependencies.d.ts +2 -0
- package/dist/tooling/linter/implementations/source/dependencies.js +219 -0
- package/dist/tooling/linter/implementations/source/global.d.ts +2 -0
- package/dist/tooling/linter/implementations/source/global.js +1002 -0
- package/dist/tooling/linter/implementations/source/index.d.ts +3 -0
- package/dist/tooling/linter/implementations/source/index.js +3 -0
- package/dist/tooling/linter/implementations/source/integrations.d.ts +2 -0
- package/dist/tooling/linter/implementations/source/integrations.js +40 -0
- package/dist/tooling/linter/implementations/source/migrations.d.ts +2 -0
- package/dist/tooling/linter/implementations/source/migrations.js +113 -0
- package/dist/tooling/linter/implementations/source/mutations.d.ts +2 -0
- package/dist/tooling/linter/implementations/source/mutations.js +1404 -0
- package/dist/tooling/linter/implementations/source/providers.d.ts +2 -0
- package/dist/tooling/linter/implementations/source/providers.js +230 -0
- package/dist/tooling/linter/implementations/source/queries.d.ts +2 -0
- package/dist/tooling/linter/implementations/source/queries.js +1176 -0
- package/dist/tooling/linter/implementations/source/rules.d.ts +2 -0
- package/dist/tooling/linter/implementations/source/rules.js +139 -0
- package/dist/tooling/linter/implementations/source/schema.d.ts +2 -0
- package/dist/tooling/linter/implementations/source/schema.js +826 -0
- package/dist/tooling/linter/implementations/source/shared.d.ts +44 -0
- package/dist/tooling/linter/implementations/source/shared.js +319 -0
- package/dist/tooling/linter/implementations/source/state-machine.d.ts +24 -0
- package/dist/tooling/linter/implementations/source/state-machine.js +381 -0
- package/dist/tooling/linter/implementations/source/states.d.ts +2 -0
- package/dist/tooling/linter/implementations/source/states.js +361 -0
- package/dist/tooling/linter/implementations/source/tests.d.ts +2 -0
- package/dist/tooling/linter/implementations/source/tests.js +35 -0
- package/dist/tooling/linter/implementations/source/ui.d.ts +2 -0
- package/dist/tooling/linter/implementations/source/ui.js +20 -0
- package/dist/tooling/linter/implementations/source/utility-rules.d.ts +2 -0
- package/dist/tooling/linter/implementations/source/utility-rules.js +28 -0
- package/dist/tooling/linter/implementations/source/verifier.d.ts +16 -0
- package/dist/tooling/linter/implementations/source/verifier.js +52 -0
- package/dist/tooling/linter/implementations/source/verifiers.d.ts +2 -0
- package/dist/tooling/linter/implementations/source/verifiers.js +34 -0
- package/dist/tooling/linter/implementations/source/views.d.ts +2 -0
- package/dist/tooling/linter/implementations/source/views.js +57 -0
- package/dist/tooling/linter/implementations/source/workflows.d.ts +2 -0
- package/dist/tooling/linter/implementations/source/workflows.js +240 -0
- package/dist/tooling/linter/index.d.ts +9 -0
- package/dist/tooling/linter/index.js +3 -0
- package/dist/tooling/linter/lint.d.ts +25 -0
- package/dist/tooling/linter/lint.js +70 -0
- package/dist/tooling/linter/oxlint/index.d.ts +3 -0
- package/dist/tooling/linter/oxlint/index.js +1 -0
- package/dist/tooling/linter/oxlint/process.d.ts +18 -0
- package/dist/tooling/linter/oxlint/process.js +169 -0
- package/dist/tooling/linter/oxlint/run.d.ts +7 -0
- package/dist/tooling/linter/oxlint/run.js +253 -0
- package/dist/tooling/linter/oxlint-config/ignore-patterns.d.ts +5 -0
- package/dist/tooling/linter/oxlint-config/ignore-patterns.js +10 -0
- package/dist/tooling/linter/oxlint-config/index.d.ts +4 -0
- package/dist/tooling/linter/oxlint-config/index.js +38 -0
- package/dist/tooling/linter/packs/domain.d.ts +2 -0
- package/dist/tooling/linter/packs/domain.js +7 -0
- package/dist/tooling/linter/packs/index.d.ts +8 -0
- package/dist/tooling/linter/packs/index.js +1 -0
- package/dist/tooling/linter/policy/compile.d.ts +2 -0
- package/dist/tooling/linter/policy/compile.js +271 -0
- package/dist/tooling/linter/policy/configuration.d.ts +21 -0
- package/dist/tooling/linter/policy/configuration.js +149 -0
- package/dist/tooling/linter/policy/generated.d.ts +4 -0
- package/dist/tooling/linter/policy/generated.js +716 -0
- package/dist/tooling/linter/policy/index.d.ts +45 -0
- package/dist/tooling/linter/policy/index.js +3 -0
- package/dist/tooling/linter/qualification/index.d.ts +10 -0
- package/dist/tooling/linter/qualification/index.js +2 -0
- package/dist/tooling/linter/qualification/query-fixtures.d.ts +2 -0
- package/dist/tooling/linter/qualification/query-fixtures.js +68 -0
- package/dist/tooling/linter/qualification/runner.d.ts +3 -0
- package/dist/tooling/linter/qualification/runner.js +6 -0
- package/dist/tooling/linter/report/format.d.ts +3 -0
- package/dist/tooling/linter/report/format.js +46 -0
- package/dist/tooling/linter/report/index.d.ts +2 -0
- package/dist/tooling/linter/report/index.js +1 -0
- package/dist/tooling/linter/requirements/index.d.ts +2 -0
- package/dist/tooling/linter/requirements/index.js +1 -0
- package/dist/tooling/linter/requirements/registry.d.ts +3 -0
- package/dist/tooling/linter/requirements/registry.js +197 -0
- package/dist/tooling/linter/requirements/requirement.d.ts +8 -0
- package/dist/tooling/linter/requirements/requirement.js +1 -0
- package/dist/tooling/linter/suppression/apply.d.ts +3 -0
- package/dist/tooling/linter/suppression/apply.js +47 -0
- package/dist/tooling/linter/suppression/directive.d.ts +10 -0
- package/dist/tooling/linter/suppression/directive.js +1 -0
- package/dist/tooling/linter/suppression/index.d.ts +13 -0
- package/dist/tooling/linter/suppression/index.js +1 -0
- package/dist/tooling/packaging/admission.d.ts +9 -0
- package/dist/tooling/packaging/admission.js +93 -0
- package/dist/tooling/packaging/compile.d.ts +10 -0
- package/dist/tooling/packaging/compile.js +311 -0
- package/dist/tooling/packaging/declarations/admission.d.ts +7 -0
- package/dist/tooling/packaging/declarations/admission.js +56 -0
- package/dist/tooling/packaging/declarations/admission.typecheck.d.ts +7 -0
- package/dist/tooling/packaging/declarations/admission.typecheck.js +1 -0
- package/dist/tooling/packaging/declarations/imports.d.ts +16 -0
- package/dist/tooling/packaging/declarations/imports.js +50 -0
- package/dist/tooling/packaging/declarations/index.d.ts +7 -0
- package/dist/tooling/packaging/declarations/index.js +9 -0
- package/dist/tooling/packaging/declarations/normalize.d.ts +13 -0
- package/dist/tooling/packaging/declarations/normalize.js +135 -0
- package/dist/tooling/packaging/declarations/ownership.d.ts +9 -0
- package/dist/tooling/packaging/declarations/ownership.js +85 -0
- package/dist/tooling/packaging/declarations/references.d.ts +5 -0
- package/dist/tooling/packaging/declarations/references.js +38 -0
- package/dist/tooling/packaging/declarations/transform.d.ts +11 -0
- package/dist/tooling/packaging/declarations/transform.js +76 -0
- package/dist/tooling/packaging/declarations/verify.d.ts +11 -0
- package/dist/tooling/packaging/declarations/verify.js +44 -0
- package/dist/tooling/packaging/exports.d.ts +11 -0
- package/dist/tooling/packaging/exports.js +61 -0
- package/dist/tooling/packaging/index.d.ts +2 -0
- package/dist/tooling/packaging/index.js +1 -0
- package/dist/tooling/packaging/javascript.d.ts +3 -0
- package/dist/tooling/packaging/javascript.js +71 -0
- package/dist/tooling/packaging/packaging.d.ts +10 -0
- package/dist/tooling/packaging/packaging.js +195 -0
- package/dist/tooling/packaging/self.d.ts +9 -0
- package/dist/tooling/packaging/self.js +25 -0
- package/package.json +203 -108
- package/dist/auth/exchange.d.ts +0 -11
- package/dist/auth/exchange.d.ts.map +0 -1
- package/dist/auth/exchange.js +0 -8
- package/dist/auth/exchange.js.map +0 -1
- package/dist/auth/index.d.ts +0 -5
- package/dist/auth/index.d.ts.map +0 -1
- package/dist/auth/index.js +0 -4
- package/dist/auth/index.js.map +0 -1
- package/dist/capability/client.d.ts +0 -25
- package/dist/capability/client.d.ts.map +0 -1
- package/dist/capability/client.js +0 -147
- package/dist/capability/client.js.map +0 -1
- package/dist/capability/contract.d.ts +0 -70
- package/dist/capability/contract.d.ts.map +0 -1
- package/dist/capability/contract.js +0 -3
- package/dist/capability/contract.js.map +0 -1
- package/dist/capability/define.d.ts +0 -14
- package/dist/capability/define.d.ts.map +0 -1
- package/dist/capability/define.js +0 -145
- package/dist/capability/define.js.map +0 -1
- package/dist/capability/index.d.ts +0 -3
- package/dist/capability/index.d.ts.map +0 -1
- package/dist/capability/index.js +0 -2
- package/dist/capability/index.js.map +0 -1
- package/dist/cli/arguments.d.ts +0 -21
- package/dist/cli/arguments.d.ts.map +0 -1
- package/dist/cli/arguments.js +0 -220
- package/dist/cli/arguments.js.map +0 -1
- package/dist/cli/bin.d.ts +0 -7
- package/dist/cli/bin.d.ts.map +0 -1
- package/dist/cli/bin.js +0 -15
- package/dist/cli/bin.js.map +0 -1
- package/dist/cli/dotenv.d.ts +0 -18
- package/dist/cli/dotenv.d.ts.map +0 -1
- package/dist/cli/dotenv.js +0 -55
- package/dist/cli/dotenv.js.map +0 -1
- package/dist/cli/index.d.ts +0 -14
- package/dist/cli/index.d.ts.map +0 -1
- package/dist/cli/index.js +0 -14
- package/dist/cli/index.js.map +0 -1
- package/dist/cli/log.d.ts +0 -11
- package/dist/cli/log.d.ts.map +0 -1
- package/dist/cli/log.js +0 -17
- package/dist/cli/log.js.map +0 -1
- package/dist/cli/publish.d.ts +0 -35
- package/dist/cli/publish.d.ts.map +0 -1
- package/dist/cli/publish.js +0 -271
- package/dist/cli/publish.js.map +0 -1
- package/dist/cli/run.d.ts +0 -51
- package/dist/cli/run.d.ts.map +0 -1
- package/dist/cli/run.js +0 -519
- package/dist/cli/run.js.map +0 -1
- package/dist/deployment/artifact/bindings.d.ts +0 -7
- package/dist/deployment/artifact/bindings.d.ts.map +0 -1
- package/dist/deployment/artifact/bindings.js +0 -44
- package/dist/deployment/artifact/bindings.js.map +0 -1
- package/dist/deployment/artifact/deployment.d.ts +0 -50
- package/dist/deployment/artifact/deployment.d.ts.map +0 -1
- package/dist/deployment/artifact/deployment.js +0 -132
- package/dist/deployment/artifact/deployment.js.map +0 -1
- package/dist/deployment/artifact/index.d.ts +0 -5
- package/dist/deployment/artifact/index.d.ts.map +0 -1
- package/dist/deployment/artifact/index.js +0 -4
- package/dist/deployment/artifact/index.js.map +0 -1
- package/dist/deployment/check/check.d.ts +0 -9
- package/dist/deployment/check/check.d.ts.map +0 -1
- package/dist/deployment/check/check.js +0 -96
- package/dist/deployment/check/check.js.map +0 -1
- package/dist/deployment/check/contract.d.ts +0 -34
- package/dist/deployment/check/contract.d.ts.map +0 -1
- package/dist/deployment/check/contract.js +0 -2
- package/dist/deployment/check/contract.js.map +0 -1
- package/dist/deployment/check/index.d.ts +0 -3
- package/dist/deployment/check/index.d.ts.map +0 -1
- package/dist/deployment/check/index.js +0 -2
- package/dist/deployment/check/index.js.map +0 -1
- package/dist/deployment/index.d.ts.map +0 -1
- package/dist/deployment/index.js.map +0 -1
- package/dist/deployment/provider/adapter.d.ts +0 -59
- package/dist/deployment/provider/adapter.d.ts.map +0 -1
- package/dist/deployment/provider/adapter.js +0 -84
- package/dist/deployment/provider/adapter.js.map +0 -1
- package/dist/deployment/provider/config.d.ts +0 -10
- package/dist/deployment/provider/config.d.ts.map +0 -1
- package/dist/deployment/provider/config.js +0 -8
- package/dist/deployment/provider/config.js.map +0 -1
- package/dist/deployment/provider/index.d.ts +0 -5
- package/dist/deployment/provider/index.d.ts.map +0 -1
- package/dist/deployment/provider/index.js +0 -3
- package/dist/deployment/provider/index.js.map +0 -1
- package/dist/domain/app.d.ts +0 -34
- package/dist/domain/app.d.ts.map +0 -1
- package/dist/domain/app.js +0 -2
- package/dist/domain/app.js.map +0 -1
- package/dist/domain/context.d.ts +0 -68
- package/dist/domain/context.d.ts.map +0 -1
- package/dist/domain/context.js +0 -2
- package/dist/domain/context.js.map +0 -1
- package/dist/domain/define.d.ts +0 -109
- package/dist/domain/define.d.ts.map +0 -1
- package/dist/domain/define.js +0 -102
- package/dist/domain/define.js.map +0 -1
- package/dist/domain/handlers.d.ts +0 -51
- package/dist/domain/handlers.d.ts.map +0 -1
- package/dist/domain/handlers.js +0 -88
- package/dist/domain/handlers.js.map +0 -1
- package/dist/domain/implement.d.ts +0 -5
- package/dist/domain/implement.d.ts.map +0 -1
- package/dist/domain/implement.js +0 -23
- package/dist/domain/implement.js.map +0 -1
- package/dist/domain/index.d.ts +0 -14
- package/dist/domain/index.d.ts.map +0 -1
- package/dist/domain/index.js +0 -8
- package/dist/domain/index.js.map +0 -1
- package/dist/domain/requirements.d.ts +0 -26
- package/dist/domain/requirements.d.ts.map +0 -1
- package/dist/domain/requirements.js +0 -98
- package/dist/domain/requirements.js.map +0 -1
- package/dist/graph/class/index.d.ts +0 -3
- package/dist/graph/class/index.d.ts.map +0 -1
- package/dist/graph/class/index.js +0 -3
- package/dist/graph/class/index.js.map +0 -1
- package/dist/graph/edge/index.d.ts +0 -3
- package/dist/graph/edge/index.d.ts.map +0 -1
- package/dist/graph/edge/index.js +0 -3
- package/dist/graph/edge/index.js.map +0 -1
- package/dist/graph/index.d.ts +0 -10
- package/dist/graph/index.d.ts.map +0 -1
- package/dist/graph/index.js +0 -9
- package/dist/graph/index.js.map +0 -1
- package/dist/graph/model/index.d.ts +0 -3
- package/dist/graph/model/index.d.ts.map +0 -1
- package/dist/graph/model/index.js +0 -3
- package/dist/graph/model/index.js.map +0 -1
- package/dist/graph/node/index.d.ts +0 -3
- package/dist/graph/node/index.d.ts.map +0 -1
- package/dist/graph/node/index.js +0 -3
- package/dist/graph/node/index.js.map +0 -1
- package/dist/graph/path/index.d.ts +0 -3
- package/dist/graph/path/index.d.ts.map +0 -1
- package/dist/graph/path/index.js +0 -3
- package/dist/graph/path/index.js.map +0 -1
- package/dist/graph/properties/index.d.ts +0 -3
- package/dist/graph/properties/index.d.ts.map +0 -1
- package/dist/graph/properties/index.js +0 -3
- package/dist/graph/properties/index.js.map +0 -1
- package/dist/index.d.ts.map +0 -1
- package/dist/index.js.map +0 -1
- package/dist/invocation/error.d.ts +0 -47
- package/dist/invocation/error.d.ts.map +0 -1
- package/dist/invocation/error.js +0 -93
- package/dist/invocation/error.js.map +0 -1
- package/dist/invocation/handler.d.ts +0 -51
- package/dist/invocation/handler.d.ts.map +0 -1
- package/dist/invocation/handler.js +0 -323
- package/dist/invocation/handler.js.map +0 -1
- package/dist/invocation/index.d.ts +0 -7
- package/dist/invocation/index.d.ts.map +0 -1
- package/dist/invocation/index.js +0 -3
- package/dist/invocation/index.js.map +0 -1
- package/dist/invocation/receiver.d.ts +0 -5
- package/dist/invocation/receiver.d.ts.map +0 -1
- package/dist/invocation/receiver.js +0 -70
- package/dist/invocation/receiver.js.map +0 -1
- package/dist/invocation/result.d.ts +0 -5
- package/dist/invocation/result.d.ts.map +0 -1
- package/dist/invocation/result.js +0 -142
- package/dist/invocation/result.js.map +0 -1
- package/dist/invocation/selection.d.ts +0 -27
- package/dist/invocation/selection.d.ts.map +0 -1
- package/dist/invocation/selection.js +0 -100
- package/dist/invocation/selection.js.map +0 -1
- package/dist/invocation/target.d.ts +0 -10
- package/dist/invocation/target.d.ts.map +0 -1
- package/dist/invocation/target.js +0 -48
- package/dist/invocation/target.js.map +0 -1
- package/dist/linter/adapters/typescript/discover.d.ts +0 -4
- package/dist/linter/adapters/typescript/discover.d.ts.map +0 -1
- package/dist/linter/adapters/typescript/discover.js +0 -412
- package/dist/linter/adapters/typescript/discover.js.map +0 -1
- package/dist/linter/adapters/typescript/evidence-admission.d.ts +0 -5
- package/dist/linter/adapters/typescript/evidence-admission.d.ts.map +0 -1
- package/dist/linter/adapters/typescript/evidence-admission.js +0 -22
- package/dist/linter/adapters/typescript/evidence-admission.js.map +0 -1
- package/dist/linter/adapters/typescript/imports.d.ts +0 -7
- package/dist/linter/adapters/typescript/imports.d.ts.map +0 -1
- package/dist/linter/adapters/typescript/imports.js +0 -171
- package/dist/linter/adapters/typescript/imports.js.map +0 -1
- package/dist/linter/adapters/typescript/index.d.ts +0 -48
- package/dist/linter/adapters/typescript/index.d.ts.map +0 -1
- package/dist/linter/adapters/typescript/index.js +0 -8
- package/dist/linter/adapters/typescript/index.js.map +0 -1
- package/dist/linter/adapters/typescript/query-observation.d.ts +0 -4
- package/dist/linter/adapters/typescript/query-observation.d.ts.map +0 -1
- package/dist/linter/adapters/typescript/query-observation.js +0 -172
- package/dist/linter/adapters/typescript/query-observation.js.map +0 -1
- package/dist/linter/adapters/typescript/suppression-directives.d.ts +0 -5
- package/dist/linter/adapters/typescript/suppression-directives.d.ts.map +0 -1
- package/dist/linter/adapters/typescript/suppression-directives.js +0 -85
- package/dist/linter/adapters/typescript/suppression-directives.js.map +0 -1
- package/dist/linter/adapters/typescript/syntax.d.ts +0 -39
- package/dist/linter/adapters/typescript/syntax.d.ts.map +0 -1
- package/dist/linter/adapters/typescript/syntax.js +0 -183
- package/dist/linter/adapters/typescript/syntax.js.map +0 -1
- package/dist/linter/adapters/typescript/type-universe.d.ts +0 -2
- package/dist/linter/adapters/typescript/type-universe.d.ts.map +0 -1
- package/dist/linter/adapters/typescript/type-universe.js +0 -265
- package/dist/linter/adapters/typescript/type-universe.js.map +0 -1
- package/dist/linter/catalog/compile.d.ts +0 -3
- package/dist/linter/catalog/compile.d.ts.map +0 -1
- package/dist/linter/catalog/compile.js +0 -111
- package/dist/linter/catalog/compile.js.map +0 -1
- package/dist/linter/catalog/index.d.ts +0 -19
- package/dist/linter/catalog/index.d.ts.map +0 -1
- package/dist/linter/catalog/index.js +0 -3
- package/dist/linter/catalog/index.js.map +0 -1
- package/dist/linter/catalog/revision.d.ts +0 -7
- package/dist/linter/catalog/revision.d.ts.map +0 -1
- package/dist/linter/catalog/revision.js +0 -13
- package/dist/linter/catalog/revision.js.map +0 -1
- package/dist/linter/diagnostics/error.d.ts +0 -10
- package/dist/linter/diagnostics/error.d.ts.map +0 -1
- package/dist/linter/diagnostics/error.js +0 -10
- package/dist/linter/diagnostics/error.js.map +0 -1
- package/dist/linter/diagnostics/index.d.ts +0 -29
- package/dist/linter/diagnostics/index.d.ts.map +0 -1
- package/dist/linter/diagnostics/index.js +0 -3
- package/dist/linter/diagnostics/index.js.map +0 -1
- package/dist/linter/diagnostics/sort.d.ts +0 -3
- package/dist/linter/diagnostics/sort.d.ts.map +0 -1
- package/dist/linter/diagnostics/sort.js +0 -27
- package/dist/linter/diagnostics/sort.js.map +0 -1
- package/dist/linter/evaluation/binding/bind.d.ts +0 -5
- package/dist/linter/evaluation/binding/bind.d.ts.map +0 -1
- package/dist/linter/evaluation/binding/bind.js +0 -356
- package/dist/linter/evaluation/binding/bind.js.map +0 -1
- package/dist/linter/evaluation/binding/diagnostic.d.ts +0 -5
- package/dist/linter/evaluation/binding/diagnostic.d.ts.map +0 -1
- package/dist/linter/evaluation/binding/diagnostic.js +0 -17
- package/dist/linter/evaluation/binding/diagnostic.js.map +0 -1
- package/dist/linter/evaluation/binding/index.d.ts +0 -2
- package/dist/linter/evaluation/binding/index.d.ts.map +0 -1
- package/dist/linter/evaluation/binding/index.js +0 -2
- package/dist/linter/evaluation/binding/index.js.map +0 -1
- package/dist/linter/evaluation/contract/availability.d.ts +0 -28
- package/dist/linter/evaluation/contract/availability.d.ts.map +0 -1
- package/dist/linter/evaluation/contract/availability.js +0 -2
- package/dist/linter/evaluation/contract/availability.js.map +0 -1
- package/dist/linter/evaluation/contract/decision.d.ts +0 -26
- package/dist/linter/evaluation/contract/decision.d.ts.map +0 -1
- package/dist/linter/evaluation/contract/decision.js +0 -2
- package/dist/linter/evaluation/contract/decision.js.map +0 -1
- package/dist/linter/evaluation/contract/evidence.d.ts +0 -12
- package/dist/linter/evaluation/contract/evidence.d.ts.map +0 -1
- package/dist/linter/evaluation/contract/evidence.js +0 -2
- package/dist/linter/evaluation/contract/evidence.js.map +0 -1
- package/dist/linter/evaluation/contract/implementation.d.ts +0 -22
- package/dist/linter/evaluation/contract/implementation.d.ts.map +0 -1
- package/dist/linter/evaluation/contract/implementation.js +0 -2
- package/dist/linter/evaluation/contract/implementation.js.map +0 -1
- package/dist/linter/evaluation/contract/index.d.ts +0 -5
- package/dist/linter/evaluation/contract/index.d.ts.map +0 -1
- package/dist/linter/evaluation/contract/index.js +0 -2
- package/dist/linter/evaluation/contract/index.js.map +0 -1
- package/dist/linter/evaluation/index.d.ts +0 -3
- package/dist/linter/evaluation/index.d.ts.map +0 -1
- package/dist/linter/evaluation/index.js +0 -2
- package/dist/linter/evaluation/index.js.map +0 -1
- package/dist/linter/implementations/source/capabilities.d.ts +0 -3
- package/dist/linter/implementations/source/capabilities.d.ts.map +0 -1
- package/dist/linter/implementations/source/capabilities.js +0 -41
- package/dist/linter/implementations/source/capabilities.js.map +0 -1
- package/dist/linter/implementations/source/contract.d.ts +0 -17
- package/dist/linter/implementations/source/contract.d.ts.map +0 -1
- package/dist/linter/implementations/source/contract.js +0 -53
- package/dist/linter/implementations/source/contract.js.map +0 -1
- package/dist/linter/implementations/source/functions.d.ts +0 -3
- package/dist/linter/implementations/source/functions.d.ts.map +0 -1
- package/dist/linter/implementations/source/functions.js +0 -102
- package/dist/linter/implementations/source/functions.js.map +0 -1
- package/dist/linter/implementations/source/global.d.ts +0 -3
- package/dist/linter/implementations/source/global.d.ts.map +0 -1
- package/dist/linter/implementations/source/global.js +0 -814
- package/dist/linter/implementations/source/global.js.map +0 -1
- package/dist/linter/implementations/source/index.d.ts +0 -4
- package/dist/linter/implementations/source/index.d.ts.map +0 -1
- package/dist/linter/implementations/source/index.js +0 -4
- package/dist/linter/implementations/source/index.js.map +0 -1
- package/dist/linter/implementations/source/integrations.d.ts +0 -3
- package/dist/linter/implementations/source/integrations.d.ts.map +0 -1
- package/dist/linter/implementations/source/integrations.js +0 -186
- package/dist/linter/implementations/source/integrations.js.map +0 -1
- package/dist/linter/implementations/source/migrations.d.ts +0 -3
- package/dist/linter/implementations/source/migrations.d.ts.map +0 -1
- package/dist/linter/implementations/source/migrations.js +0 -115
- package/dist/linter/implementations/source/migrations.js.map +0 -1
- package/dist/linter/implementations/source/mutations.d.ts +0 -3
- package/dist/linter/implementations/source/mutations.d.ts.map +0 -1
- package/dist/linter/implementations/source/mutations.js +0 -185
- package/dist/linter/implementations/source/mutations.js.map +0 -1
- package/dist/linter/implementations/source/queries.d.ts +0 -3
- package/dist/linter/implementations/source/queries.d.ts.map +0 -1
- package/dist/linter/implementations/source/queries.js +0 -1000
- package/dist/linter/implementations/source/queries.js.map +0 -1
- package/dist/linter/implementations/source/rules.d.ts +0 -3
- package/dist/linter/implementations/source/rules.d.ts.map +0 -1
- package/dist/linter/implementations/source/rules.js +0 -141
- package/dist/linter/implementations/source/rules.js.map +0 -1
- package/dist/linter/implementations/source/schema.d.ts +0 -3
- package/dist/linter/implementations/source/schema.d.ts.map +0 -1
- package/dist/linter/implementations/source/schema.js +0 -105
- package/dist/linter/implementations/source/schema.js.map +0 -1
- package/dist/linter/implementations/source/shared.d.ts +0 -42
- package/dist/linter/implementations/source/shared.d.ts.map +0 -1
- package/dist/linter/implementations/source/shared.js +0 -239
- package/dist/linter/implementations/source/shared.js.map +0 -1
- package/dist/linter/implementations/source/states.d.ts +0 -3
- package/dist/linter/implementations/source/states.d.ts.map +0 -1
- package/dist/linter/implementations/source/states.js +0 -2
- package/dist/linter/implementations/source/states.js.map +0 -1
- package/dist/linter/implementations/source/tests.d.ts +0 -3
- package/dist/linter/implementations/source/tests.d.ts.map +0 -1
- package/dist/linter/implementations/source/tests.js +0 -32
- package/dist/linter/implementations/source/tests.js.map +0 -1
- package/dist/linter/implementations/source/ui.d.ts +0 -3
- package/dist/linter/implementations/source/ui.d.ts.map +0 -1
- package/dist/linter/implementations/source/ui.js +0 -21
- package/dist/linter/implementations/source/ui.js.map +0 -1
- package/dist/linter/implementations/source/utils.d.ts +0 -3
- package/dist/linter/implementations/source/utils.d.ts.map +0 -1
- package/dist/linter/implementations/source/utils.js +0 -29
- package/dist/linter/implementations/source/utils.js.map +0 -1
- package/dist/linter/implementations/source/verifiers.d.ts +0 -3
- package/dist/linter/implementations/source/verifiers.d.ts.map +0 -1
- package/dist/linter/implementations/source/verifiers.js +0 -33
- package/dist/linter/implementations/source/verifiers.js.map +0 -1
- package/dist/linter/implementations/source/views.d.ts +0 -3
- package/dist/linter/implementations/source/views.d.ts.map +0 -1
- package/dist/linter/implementations/source/views.js +0 -36
- package/dist/linter/implementations/source/views.js.map +0 -1
- package/dist/linter/implementations/source/workflows.d.ts +0 -3
- package/dist/linter/implementations/source/workflows.d.ts.map +0 -1
- package/dist/linter/implementations/source/workflows.js +0 -308
- package/dist/linter/implementations/source/workflows.js.map +0 -1
- package/dist/linter/index.d.ts +0 -10
- package/dist/linter/index.d.ts.map +0 -1
- package/dist/linter/index.js +0 -4
- package/dist/linter/index.js.map +0 -1
- package/dist/linter/lint.d.ts +0 -24
- package/dist/linter/lint.d.ts.map +0 -1
- package/dist/linter/lint.js +0 -70
- package/dist/linter/lint.js.map +0 -1
- package/dist/linter/oxlint/index.d.ts +0 -4
- package/dist/linter/oxlint/index.d.ts.map +0 -1
- package/dist/linter/oxlint/index.js +0 -2
- package/dist/linter/oxlint/index.js.map +0 -1
- package/dist/linter/oxlint/process.d.ts +0 -19
- package/dist/linter/oxlint/process.d.ts.map +0 -1
- package/dist/linter/oxlint/process.js +0 -170
- package/dist/linter/oxlint/process.js.map +0 -1
- package/dist/linter/oxlint/run.d.ts +0 -8
- package/dist/linter/oxlint/run.d.ts.map +0 -1
- package/dist/linter/oxlint/run.js +0 -252
- package/dist/linter/oxlint/run.js.map +0 -1
- package/dist/linter/oxlint-config/ignore-patterns.d.ts +0 -6
- package/dist/linter/oxlint-config/ignore-patterns.d.ts.map +0 -1
- package/dist/linter/oxlint-config/ignore-patterns.js +0 -10
- package/dist/linter/oxlint-config/ignore-patterns.js.map +0 -1
- package/dist/linter/oxlint-config/index.d.ts +0 -5
- package/dist/linter/oxlint-config/index.d.ts.map +0 -1
- package/dist/linter/oxlint-config/index.js +0 -18
- package/dist/linter/oxlint-config/index.js.map +0 -1
- package/dist/linter/packs/domain.d.ts +0 -3
- package/dist/linter/packs/domain.d.ts.map +0 -1
- package/dist/linter/packs/domain.js +0 -8
- package/dist/linter/packs/domain.js.map +0 -1
- package/dist/linter/packs/index.d.ts +0 -9
- package/dist/linter/packs/index.d.ts.map +0 -1
- package/dist/linter/packs/index.js +0 -2
- package/dist/linter/packs/index.js.map +0 -1
- package/dist/linter/policy/compile.d.ts +0 -3
- package/dist/linter/policy/compile.d.ts.map +0 -1
- package/dist/linter/policy/compile.js +0 -258
- package/dist/linter/policy/compile.js.map +0 -1
- package/dist/linter/policy/configuration.d.ts +0 -12
- package/dist/linter/policy/configuration.d.ts.map +0 -1
- package/dist/linter/policy/configuration.js +0 -119
- package/dist/linter/policy/configuration.js.map +0 -1
- package/dist/linter/policy/generated.d.ts +0 -5
- package/dist/linter/policy/generated.d.ts.map +0 -1
- package/dist/linter/policy/generated.js +0 -782
- package/dist/linter/policy/generated.js.map +0 -1
- package/dist/linter/policy/index.d.ts +0 -45
- package/dist/linter/policy/index.d.ts.map +0 -1
- package/dist/linter/policy/index.js +0 -4
- package/dist/linter/policy/index.js.map +0 -1
- package/dist/linter/qualification/index.d.ts +0 -11
- package/dist/linter/qualification/index.d.ts.map +0 -1
- package/dist/linter/qualification/index.js +0 -3
- package/dist/linter/qualification/index.js.map +0 -1
- package/dist/linter/qualification/query-fixtures.d.ts +0 -3
- package/dist/linter/qualification/query-fixtures.d.ts.map +0 -1
- package/dist/linter/qualification/query-fixtures.js +0 -69
- package/dist/linter/qualification/query-fixtures.js.map +0 -1
- package/dist/linter/qualification/runner.d.ts +0 -4
- package/dist/linter/qualification/runner.d.ts.map +0 -1
- package/dist/linter/qualification/runner.js +0 -7
- package/dist/linter/qualification/runner.js.map +0 -1
- package/dist/linter/report/format.d.ts +0 -4
- package/dist/linter/report/format.d.ts.map +0 -1
- package/dist/linter/report/format.js +0 -33
- package/dist/linter/report/format.js.map +0 -1
- package/dist/linter/report/index.d.ts +0 -3
- package/dist/linter/report/index.d.ts.map +0 -1
- package/dist/linter/report/index.js +0 -2
- package/dist/linter/report/index.js.map +0 -1
- package/dist/linter/requirements/index.d.ts +0 -3
- package/dist/linter/requirements/index.d.ts.map +0 -1
- package/dist/linter/requirements/index.js +0 -2
- package/dist/linter/requirements/index.js.map +0 -1
- package/dist/linter/requirements/model.d.ts +0 -9
- package/dist/linter/requirements/model.d.ts.map +0 -1
- package/dist/linter/requirements/model.js +0 -2
- package/dist/linter/requirements/model.js.map +0 -1
- package/dist/linter/requirements/registry.d.ts +0 -4
- package/dist/linter/requirements/registry.d.ts.map +0 -1
- package/dist/linter/requirements/registry.js +0 -188
- package/dist/linter/requirements/registry.js.map +0 -1
- package/dist/linter/semantics/query/decision.d.ts +0 -5
- package/dist/linter/semantics/query/decision.d.ts.map +0 -1
- package/dist/linter/semantics/query/decision.js +0 -74
- package/dist/linter/semantics/query/decision.js.map +0 -1
- package/dist/linter/semantics/query/index.d.ts +0 -4
- package/dist/linter/semantics/query/index.d.ts.map +0 -1
- package/dist/linter/semantics/query/index.js +0 -3
- package/dist/linter/semantics/query/index.js.map +0 -1
- package/dist/linter/semantics/query/observation.d.ts +0 -36
- package/dist/linter/semantics/query/observation.d.ts.map +0 -1
- package/dist/linter/semantics/query/observation.js +0 -13
- package/dist/linter/semantics/query/observation.js.map +0 -1
- package/dist/linter/suppression/apply.d.ts +0 -4
- package/dist/linter/suppression/apply.d.ts.map +0 -1
- package/dist/linter/suppression/apply.js +0 -48
- package/dist/linter/suppression/apply.js.map +0 -1
- package/dist/linter/suppression/directive.d.ts +0 -11
- package/dist/linter/suppression/directive.d.ts.map +0 -1
- package/dist/linter/suppression/directive.js +0 -2
- package/dist/linter/suppression/directive.js.map +0 -1
- package/dist/linter/suppression/index.d.ts +0 -14
- package/dist/linter/suppression/index.d.ts.map +0 -1
- package/dist/linter/suppression/index.js +0 -2
- package/dist/linter/suppression/index.js.map +0 -1
- package/dist/mutation/contract.d.ts +0 -134
- package/dist/mutation/contract.d.ts.map +0 -1
- package/dist/mutation/contract.js +0 -2
- package/dist/mutation/contract.js.map +0 -1
- package/dist/mutation/define.d.ts +0 -9
- package/dist/mutation/define.d.ts.map +0 -1
- package/dist/mutation/define.js +0 -24
- package/dist/mutation/define.js.map +0 -1
- package/dist/mutation/errors.d.ts +0 -3
- package/dist/mutation/errors.d.ts.map +0 -1
- package/dist/mutation/errors.js +0 -30
- package/dist/mutation/errors.js.map +0 -1
- package/dist/mutation/execute.d.ts +0 -11
- package/dist/mutation/execute.d.ts.map +0 -1
- package/dist/mutation/execute.js +0 -24
- package/dist/mutation/execute.js.map +0 -1
- package/dist/mutation/index.d.ts +0 -8
- package/dist/mutation/index.d.ts.map +0 -1
- package/dist/mutation/index.js +0 -5
- package/dist/mutation/index.js.map +0 -1
- package/dist/mutation/rich.d.ts +0 -4
- package/dist/mutation/rich.d.ts.map +0 -1
- package/dist/mutation/rich.js +0 -147
- package/dist/mutation/rich.js.map +0 -1
- package/dist/query/composite/contract.d.ts +0 -37
- package/dist/query/composite/contract.d.ts.map +0 -1
- package/dist/query/composite/contract.js +0 -2
- package/dist/query/composite/contract.js.map +0 -1
- package/dist/query/composite/errors.d.ts +0 -8
- package/dist/query/composite/errors.d.ts.map +0 -1
- package/dist/query/composite/errors.js +0 -9
- package/dist/query/composite/errors.js.map +0 -1
- package/dist/query/composite/index.d.ts +0 -6
- package/dist/query/composite/index.d.ts.map +0 -1
- package/dist/query/composite/index.js +0 -3
- package/dist/query/composite/index.js.map +0 -1
- package/dist/query/composite/plan.d.ts +0 -38
- package/dist/query/composite/plan.d.ts.map +0 -1
- package/dist/query/composite/plan.js +0 -225
- package/dist/query/composite/plan.js.map +0 -1
- package/dist/query/contract.d.ts +0 -58
- package/dist/query/contract.d.ts.map +0 -1
- package/dist/query/contract.js +0 -2
- package/dist/query/contract.js.map +0 -1
- package/dist/query/define.d.ts +0 -3
- package/dist/query/define.d.ts.map +0 -1
- package/dist/query/define.js +0 -90
- package/dist/query/define.js.map +0 -1
- package/dist/query/definition.d.ts +0 -29
- package/dist/query/definition.d.ts.map +0 -1
- package/dist/query/definition.js +0 -2
- package/dist/query/definition.js.map +0 -1
- package/dist/query/errors.d.ts +0 -9
- package/dist/query/errors.d.ts.map +0 -1
- package/dist/query/errors.js +0 -15
- package/dist/query/errors.js.map +0 -1
- package/dist/query/execute.d.ts +0 -20
- package/dist/query/execute.d.ts.map +0 -1
- package/dist/query/execute.js +0 -97
- package/dist/query/execute.js.map +0 -1
- package/dist/query/index.d.ts +0 -15
- package/dist/query/index.d.ts.map +0 -1
- package/dist/query/index.js +0 -8
- package/dist/query/index.js.map +0 -1
- package/dist/query/node.d.ts +0 -109
- package/dist/query/node.d.ts.map +0 -1
- package/dist/query/node.js +0 -166
- package/dist/query/node.js.map +0 -1
- package/dist/query/result/contract.d.ts +0 -23
- package/dist/query/result/contract.d.ts.map +0 -1
- package/dist/query/result/contract.js +0 -2
- package/dist/query/result/contract.js.map +0 -1
- package/dist/query/result/index.d.ts +0 -3
- package/dist/query/result/index.d.ts.map +0 -1
- package/dist/query/result/index.js +0 -2
- package/dist/query/result/index.js.map +0 -1
- package/dist/query/result/projection.d.ts +0 -3
- package/dist/query/result/projection.d.ts.map +0 -1
- package/dist/query/result/projection.js +0 -100
- package/dist/query/result/projection.js.map +0 -1
- package/dist/query/selection.d.ts +0 -4
- package/dist/query/selection.d.ts.map +0 -1
- package/dist/query/selection.js +0 -25
- package/dist/query/selection.js.map +0 -1
- package/dist/result/index.d.ts +0 -3
- package/dist/result/index.d.ts.map +0 -1
- package/dist/result/index.js +0 -2
- package/dist/result/index.js.map +0 -1
- package/dist/result/result.d.ts +0 -10
- package/dist/result/result.d.ts.map +0 -1
- package/dist/result/result.js +0 -7
- package/dist/result/result.js.map +0 -1
- package/dist/schema/index.d.ts +0 -3
- package/dist/schema/index.d.ts.map +0 -1
- package/dist/schema/index.js +0 -3
- package/dist/schema/index.js.map +0 -1
- package/dist/schema/kernel/index.d.ts +0 -3
- package/dist/schema/kernel/index.d.ts.map +0 -1
- package/dist/schema/kernel/index.js +0 -3
- package/dist/schema/kernel/index.js.map +0 -1
- package/dist/schema/v1/index.d.ts +0 -3
- package/dist/schema/v1/index.d.ts.map +0 -1
- package/dist/schema/v1/index.js +0 -3
- package/dist/schema/v1/index.js.map +0 -1
- package/dist/server/application.d.ts +0 -36
- package/dist/server/application.d.ts.map +0 -1
- package/dist/server/application.js +0 -128
- package/dist/server/application.js.map +0 -1
- package/dist/server/index.d.ts +0 -6
- package/dist/server/index.d.ts.map +0 -1
- package/dist/server/index.js +0 -3
- package/dist/server/index.js.map +0 -1
- package/dist/server/node/index.d.ts +0 -3
- package/dist/server/node/index.d.ts.map +0 -1
- package/dist/server/node/index.js +0 -2
- package/dist/server/node/index.js.map +0 -1
- package/dist/server/node/server.d.ts +0 -14
- package/dist/server/node/server.d.ts.map +0 -1
- package/dist/server/node/server.js +0 -71
- package/dist/server/node/server.js.map +0 -1
- package/dist/server/remote.d.ts +0 -57
- package/dist/server/remote.d.ts.map +0 -1
- package/dist/server/remote.js +0 -795
- package/dist/server/remote.js.map +0 -1
- package/dist/server/source.d.ts +0 -13
- package/dist/server/source.d.ts.map +0 -1
- package/dist/server/source.js +0 -40
- package/dist/server/source.js.map +0 -1
- package/dist/state/index.d.ts +0 -4
- package/dist/state/index.d.ts.map +0 -1
- package/dist/state/index.js +0 -2
- package/dist/state/index.js.map +0 -1
- package/dist/state/machine.d.ts +0 -28
- package/dist/state/machine.d.ts.map +0 -1
- package/dist/state/machine.js +0 -32
- package/dist/state/machine.js.map +0 -1
- package/dist/state/relation.d.ts +0 -28
- package/dist/state/relation.d.ts.map +0 -1
- package/dist/state/relation.js +0 -48
- package/dist/state/relation.js.map +0 -1
- package/dist/value/index.d.ts +0 -3
- package/dist/value/index.d.ts.map +0 -1
- package/dist/value/index.js +0 -3
- package/dist/value/index.js.map +0 -1
- package/dist/view/admission.d.ts +0 -6
- package/dist/view/admission.d.ts.map +0 -1
- package/dist/view/admission.js +0 -43
- package/dist/view/admission.js.map +0 -1
- package/dist/view/compile.d.ts +0 -15
- package/dist/view/compile.d.ts.map +0 -1
- package/dist/view/compile.js +0 -186
- package/dist/view/compile.js.map +0 -1
- package/dist/view/define.d.ts +0 -11
- package/dist/view/define.d.ts.map +0 -1
- package/dist/view/define.js +0 -173
- package/dist/view/define.js.map +0 -1
- package/dist/view/definition.d.ts +0 -89
- package/dist/view/definition.d.ts.map +0 -1
- package/dist/view/definition.js +0 -2
- package/dist/view/definition.js.map +0 -1
- package/dist/view/index.d.ts +0 -4
- package/dist/view/index.d.ts.map +0 -1
- package/dist/view/index.js +0 -3
- package/dist/view/index.js.map +0 -1
- package/dist/workflow/binding.d.ts +0 -43
- package/dist/workflow/binding.d.ts.map +0 -1
- package/dist/workflow/binding.js +0 -32
- package/dist/workflow/binding.js.map +0 -1
- package/dist/workflow/contract.d.ts +0 -57
- package/dist/workflow/contract.d.ts.map +0 -1
- package/dist/workflow/contract.js +0 -2
- package/dist/workflow/contract.js.map +0 -1
- package/dist/workflow/define.d.ts +0 -4
- package/dist/workflow/define.d.ts.map +0 -1
- package/dist/workflow/define.js +0 -57
- package/dist/workflow/define.js.map +0 -1
- package/dist/workflow/index.d.ts +0 -7
- package/dist/workflow/index.d.ts.map +0 -1
- package/dist/workflow/index.js +0 -4
- package/dist/workflow/index.js.map +0 -1
- package/dist/workflow/runner.d.ts +0 -4
- package/dist/workflow/runner.d.ts.map +0 -1
- package/dist/workflow/runner.js +0 -24
- package/dist/workflow/runner.js.map +0 -1
- package/dist/workflow/step/index.d.ts +0 -3
- package/dist/workflow/step/index.d.ts.map +0 -1
- package/dist/workflow/step/index.js +0 -2
- package/dist/workflow/step/index.js.map +0 -1
- package/dist/workflow/step/inline.d.ts +0 -6
- package/dist/workflow/step/inline.d.ts.map +0 -1
- package/dist/workflow/step/inline.js +0 -44
- package/dist/workflow/step/inline.js.map +0 -1
- package/dist/workflow/step/step.d.ts +0 -5
- package/dist/workflow/step/step.d.ts.map +0 -1
- package/dist/workflow/step/step.js +0 -2
- package/dist/workflow/step/step.js.map +0 -1
|
@@ -0,0 +1,48 @@
|
|
|
1
|
+
import type { QueryAST } from '@astrale-os/kernel-core/graph/query';
|
|
2
|
+
import type { AnyResolvedClass } from '@astrale-os/kernel-dsl/v1';
|
|
3
|
+
import type { Domain, schema } from '../../platform/schema/index.js';
|
|
4
|
+
import type { ProjectedCompositeQuery, QueryComposition, QueryPlan, QueryPlanOutput, RawCompositeQuery } from './composite/index.js';
|
|
5
|
+
import type { CompositeQueryDefinition, CollectionQueryDefinition, QueryDefinition, RealizedQuery, SingleQueryDefinition } from './query.js';
|
|
6
|
+
import type { PaginatedQuery, ProjectedQuery, RawQuery, SingleQuery } from './single/index.js';
|
|
7
|
+
import { type CollectionQuerySpec } from './collection/metadata.js';
|
|
8
|
+
type AuthoredRaw<Input, Ast extends QueryAST> = Omit<RawQuery<Input, Ast>, 'kind' | 'page'> & {
|
|
9
|
+
readonly page?: {
|
|
10
|
+
readonly size: number;
|
|
11
|
+
};
|
|
12
|
+
};
|
|
13
|
+
type AuthoredProjected<Input, Output, Ast extends QueryAST> = Omit<ProjectedQuery<Input, Output, Ast>, 'kind' | 'page'> & {
|
|
14
|
+
readonly page?: {
|
|
15
|
+
readonly size: number;
|
|
16
|
+
};
|
|
17
|
+
};
|
|
18
|
+
type AuthoredPaginated<Input, Output, Ast extends QueryAST> = Omit<PaginatedQuery<Input, Output, Ast>, 'kind' | 'page'> & {
|
|
19
|
+
readonly page?: {
|
|
20
|
+
readonly size: number;
|
|
21
|
+
};
|
|
22
|
+
};
|
|
23
|
+
type ResolvedDomainOf<Schema extends schema.DomainSchema> = Extract<schema.DomainOf<Schema>, Domain>;
|
|
24
|
+
interface SingleQueryProjector<Schema extends schema.DomainSchema> {
|
|
25
|
+
<Input, Ast extends QueryAST>(project: (domain: ResolvedDomainOf<Schema>) => AuthoredRaw<Input, Ast>): SingleQueryDefinition<ResolvedDomainOf<Schema>, Input, RawQuery<Input, Ast> extends SingleQuery<Input, infer Output> ? Output : never>;
|
|
26
|
+
<Input, Output, Ast extends QueryAST>(project: (domain: ResolvedDomainOf<Schema>) => AuthoredProjected<Input, Output, Ast>): SingleQueryDefinition<ResolvedDomainOf<Schema>, Input, Output>;
|
|
27
|
+
<Input, Output, Ast extends QueryAST>(project: (domain: ResolvedDomainOf<Schema>) => AuthoredPaginated<Input, Output, Ast>): SingleQueryDefinition<ResolvedDomainOf<Schema>, Input, Output>;
|
|
28
|
+
}
|
|
29
|
+
interface CollectionQueryProjector<Schema extends schema.DomainSchema> {
|
|
30
|
+
<Class extends AnyResolvedClass>(project: (domain: ResolvedDomainOf<Schema>) => CollectionQuerySpec<Class>): CollectionQueryDefinition<ResolvedDomainOf<Schema>, Class>;
|
|
31
|
+
}
|
|
32
|
+
type AuthoredInferredComposite<Input, Composed, Plan extends QueryPlan<unknown>, Output, DomainValue extends Domain> = Omit<ProjectedCompositeQuery<Input, Composed, Output, DomainValue>, 'kind' | 'compose' | 'project'> & {
|
|
33
|
+
compose(builder: QueryComposition<DomainValue>, input: Input): Plan;
|
|
34
|
+
project(value: QueryPlanOutput<Plan>, input: Input): Output;
|
|
35
|
+
};
|
|
36
|
+
interface CompositeQueryProjector<Schema extends schema.DomainSchema> {
|
|
37
|
+
<Plan extends QueryPlan<unknown>, Output>(project: (domain: ResolvedDomainOf<Schema>) => AuthoredInferredComposite<void, QueryPlanOutput<Plan>, Plan, Output, ResolvedDomainOf<Schema>>): CompositeQueryDefinition<ResolvedDomainOf<Schema>, void, Output>;
|
|
38
|
+
<Input, Output>(project: (domain: ResolvedDomainOf<Schema>) => Omit<RawCompositeQuery<Input, Output, ResolvedDomainOf<Schema>>, 'kind'>): CompositeQueryDefinition<ResolvedDomainOf<Schema>, Input, Output>;
|
|
39
|
+
<Input, Composed, Output, Plan extends QueryPlan<Composed> = QueryPlan<Composed>>(project: (domain: ResolvedDomainOf<Schema>) => AuthoredInferredComposite<Input, Composed, Plan, Output, ResolvedDomainOf<Schema>>): CompositeQueryDefinition<ResolvedDomainOf<Schema>, Input, Output>;
|
|
40
|
+
}
|
|
41
|
+
/** Define one inert single Query recipe projected from its exact loaded Domain. */
|
|
42
|
+
export declare function defineQuery<Schema extends schema.DomainSchema>(): SingleQueryProjector<Schema>;
|
|
43
|
+
/** Define one reusable complete polymorphic Class-extent Query. */
|
|
44
|
+
export declare function defineCollectionQuery<Schema extends schema.DomainSchema>(): CollectionQueryProjector<Schema>;
|
|
45
|
+
/** Define one inert composite Query recipe projected from its exact loaded Domain. */
|
|
46
|
+
export declare function defineCompositeQuery<Schema extends schema.DomainSchema>(): CompositeQueryProjector<Schema>;
|
|
47
|
+
export declare function realizeQuery<DomainValue extends Domain, Input, Output>(query: QueryDefinition<DomainValue, Input, Output>, domain: DomainValue): RealizedQuery<Input, Output>;
|
|
48
|
+
export {};
|
|
@@ -0,0 +1,162 @@
|
|
|
1
|
+
import { Query } from '@astrale-os/kernel-core/graph/query';
|
|
2
|
+
import { isDomain } from '@astrale-os/kernel-dsl/v1/domain';
|
|
3
|
+
import { requireUniqueCollectionValues } from './collection/identity.js';
|
|
4
|
+
import { COLLECTION_QUERY_LIMITS } from './collection/limits.js';
|
|
5
|
+
import { realizeCollectionQuery, registerCollectionQuery, } from './collection/metadata.js';
|
|
6
|
+
import { queryResult } from './single/index.js';
|
|
7
|
+
const DEFAULT_PAGE_SIZE = 256;
|
|
8
|
+
const MAXIMUM_PAGES = 1_024;
|
|
9
|
+
const projectors = new WeakMap();
|
|
10
|
+
const realized = new WeakMap();
|
|
11
|
+
/** Define one inert single Query recipe projected from its exact loaded Domain. */
|
|
12
|
+
export function defineQuery() {
|
|
13
|
+
return ((project) => recipe('query', project));
|
|
14
|
+
}
|
|
15
|
+
/** Define one reusable complete polymorphic Class-extent Query. */
|
|
16
|
+
export function defineCollectionQuery() {
|
|
17
|
+
return ((project) => {
|
|
18
|
+
const definition = defineQuery()((domain) => {
|
|
19
|
+
const specification = realizeCollectionQuery(definition, domain);
|
|
20
|
+
const selected = specification.class;
|
|
21
|
+
if (selected.kind === 'node') {
|
|
22
|
+
return {
|
|
23
|
+
id: specification.id,
|
|
24
|
+
page: { size: COLLECTION_QUERY_LIMITS.pageSize },
|
|
25
|
+
pagination: { maximumPages: COLLECTION_QUERY_LIMITS.maximumPages },
|
|
26
|
+
build: () => Query.from({ nodes: [selected] }).select({
|
|
27
|
+
kind: 'nodes',
|
|
28
|
+
projection: { kind: 'value' },
|
|
29
|
+
}),
|
|
30
|
+
project: (pages) => requireUniqueCollectionValues(queryResult.completeNodeValues(pages, specification.id), `Collection Query ${specification.id}`),
|
|
31
|
+
};
|
|
32
|
+
}
|
|
33
|
+
return {
|
|
34
|
+
id: specification.id,
|
|
35
|
+
page: { size: COLLECTION_QUERY_LIMITS.pageSize },
|
|
36
|
+
pagination: { maximumPages: COLLECTION_QUERY_LIMITS.maximumPages },
|
|
37
|
+
build: () => Query.from({ edges: [selected] }).select({
|
|
38
|
+
kind: 'edges',
|
|
39
|
+
projection: { edge: 'value', source: 'reference', target: 'reference' },
|
|
40
|
+
}),
|
|
41
|
+
project: (pages) => requireUniqueCollectionValues(Object.freeze(pages.flatMap((page) => queryResult.edgeItems(page, specification.id).map((item) => {
|
|
42
|
+
if (item.edge.kind !== 'value') {
|
|
43
|
+
throw new TypeError(`Collection Query ${specification.id} must project Edge values.`);
|
|
44
|
+
}
|
|
45
|
+
return item.edge.value;
|
|
46
|
+
}))), `Collection Query ${specification.id}`),
|
|
47
|
+
};
|
|
48
|
+
});
|
|
49
|
+
registerCollectionQuery(definition, project);
|
|
50
|
+
return definition;
|
|
51
|
+
});
|
|
52
|
+
}
|
|
53
|
+
/** Define one inert composite Query recipe projected from its exact loaded Domain. */
|
|
54
|
+
export function defineCompositeQuery() {
|
|
55
|
+
return ((project) => recipe('composite-query', project));
|
|
56
|
+
}
|
|
57
|
+
export function realizeQuery(query, domain) {
|
|
58
|
+
const project = projectors.get(query);
|
|
59
|
+
if (project === undefined)
|
|
60
|
+
throw new TypeError('Query must be produced by defineQuery.');
|
|
61
|
+
if (!isDomain(domain))
|
|
62
|
+
throw new TypeError('Query projection requires an admitted Domain.');
|
|
63
|
+
let byDomain = realized.get(query);
|
|
64
|
+
const cached = byDomain?.get(domain);
|
|
65
|
+
if (cached !== undefined)
|
|
66
|
+
return cached;
|
|
67
|
+
const authored = project(domain);
|
|
68
|
+
if (isPromiseLike(authored))
|
|
69
|
+
throw new TypeError('Query projection must be synchronous.');
|
|
70
|
+
const admitted = query.kind === 'query' ? admitSingle(authored) : admitComposite(authored);
|
|
71
|
+
if (byDomain === undefined) {
|
|
72
|
+
byDomain = new WeakMap();
|
|
73
|
+
realized.set(query, byDomain);
|
|
74
|
+
}
|
|
75
|
+
byDomain.set(domain, admitted);
|
|
76
|
+
return admitted;
|
|
77
|
+
}
|
|
78
|
+
function recipe(kind, project) {
|
|
79
|
+
if (typeof project !== 'function')
|
|
80
|
+
throw new TypeError('Query projection must be a function.');
|
|
81
|
+
const definition = Object.freeze({ kind });
|
|
82
|
+
projectors.set(definition, project);
|
|
83
|
+
return definition;
|
|
84
|
+
}
|
|
85
|
+
function admitSingle(definition) {
|
|
86
|
+
definitionBase(definition, 'build');
|
|
87
|
+
const page = pageOf(definition.page);
|
|
88
|
+
const pagination = definition.pagination;
|
|
89
|
+
if (pagination !== undefined) {
|
|
90
|
+
if (typeof definition.project !== 'function') {
|
|
91
|
+
throw new TypeError('Paginated Query requires a project function.');
|
|
92
|
+
}
|
|
93
|
+
if (pagination === null ||
|
|
94
|
+
typeof pagination !== 'object' ||
|
|
95
|
+
Array.isArray(pagination) ||
|
|
96
|
+
Reflect.ownKeys(pagination).length !== 1 ||
|
|
97
|
+
!Object.hasOwn(pagination, 'maximumPages')) {
|
|
98
|
+
throw new TypeError('Query pagination is invalid.');
|
|
99
|
+
}
|
|
100
|
+
const maximumPages = Reflect.get(pagination, 'maximumPages');
|
|
101
|
+
if (!Number.isSafeInteger(maximumPages) ||
|
|
102
|
+
maximumPages < 1 ||
|
|
103
|
+
maximumPages > MAXIMUM_PAGES) {
|
|
104
|
+
throw new TypeError(`Query pagination must be bounded from 1 through ${MAXIMUM_PAGES}.`);
|
|
105
|
+
}
|
|
106
|
+
}
|
|
107
|
+
return Object.freeze({ ...definition, page, kind: 'single' });
|
|
108
|
+
}
|
|
109
|
+
function admitComposite(definition) {
|
|
110
|
+
definitionBase(definition, 'compose');
|
|
111
|
+
if (Object.hasOwn(definition, 'page') || Object.hasOwn(definition, 'pagination')) {
|
|
112
|
+
throw new TypeError('Composite Query cannot declare pagination.');
|
|
113
|
+
}
|
|
114
|
+
return Object.freeze({ ...definition, kind: 'composite' });
|
|
115
|
+
}
|
|
116
|
+
function definitionBase(definition, operation) {
|
|
117
|
+
if (definition === null || typeof definition !== 'object' || Array.isArray(definition))
|
|
118
|
+
invalid();
|
|
119
|
+
if (typeof definition.id !== 'string' ||
|
|
120
|
+
definition.id.length === 0 ||
|
|
121
|
+
definition.id.trim() !== definition.id ||
|
|
122
|
+
typeof definition[operation] !== 'function') {
|
|
123
|
+
invalid();
|
|
124
|
+
}
|
|
125
|
+
for (const optional of ['prepare', 'project', 'reject']) {
|
|
126
|
+
if (definition[optional] !== undefined && typeof definition[optional] !== 'function')
|
|
127
|
+
invalid();
|
|
128
|
+
}
|
|
129
|
+
const allowed = new Set([
|
|
130
|
+
'id',
|
|
131
|
+
operation,
|
|
132
|
+
'prepare',
|
|
133
|
+
'project',
|
|
134
|
+
'reject',
|
|
135
|
+
...(operation === 'build' ? ['page', 'pagination'] : []),
|
|
136
|
+
]);
|
|
137
|
+
if (Reflect.ownKeys(definition).some((key) => typeof key !== 'string' || !allowed.has(key))) {
|
|
138
|
+
invalid();
|
|
139
|
+
}
|
|
140
|
+
}
|
|
141
|
+
function pageOf(input) {
|
|
142
|
+
if (input === undefined)
|
|
143
|
+
return Object.freeze({ size: DEFAULT_PAGE_SIZE });
|
|
144
|
+
if (input === null ||
|
|
145
|
+
typeof input !== 'object' ||
|
|
146
|
+
Array.isArray(input) ||
|
|
147
|
+
Reflect.ownKeys(input).length !== 1 ||
|
|
148
|
+
!Object.hasOwn(input, 'size') ||
|
|
149
|
+
!Number.isSafeInteger(Reflect.get(input, 'size')) ||
|
|
150
|
+
Reflect.get(input, 'size') < 1) {
|
|
151
|
+
throw new TypeError('Query page size must be a positive safe integer.');
|
|
152
|
+
}
|
|
153
|
+
return Object.freeze({ size: Reflect.get(input, 'size') });
|
|
154
|
+
}
|
|
155
|
+
function invalid() {
|
|
156
|
+
throw new TypeError('Query definition is invalid.');
|
|
157
|
+
}
|
|
158
|
+
function isPromiseLike(input) {
|
|
159
|
+
return (input !== null &&
|
|
160
|
+
(typeof input === 'object' || typeof input === 'function') &&
|
|
161
|
+
typeof input.then === 'function');
|
|
162
|
+
}
|
|
@@ -0,0 +1,14 @@
|
|
|
1
|
+
import type { QueryPageRequest, QueryResponse } from '@astrale-os/kernel-client/graph';
|
|
2
|
+
import type { QueryAST, QueryResultFor } from '@astrale-os/kernel-core/graph/query';
|
|
3
|
+
import type { Domain } from '../../../platform/schema/index.js';
|
|
4
|
+
import type { CompositeQuery } from '../composite/index.js';
|
|
5
|
+
import type { QueryDefinition } from '../query.js';
|
|
6
|
+
export interface QueryClient {
|
|
7
|
+
query<Ast extends QueryAST>(ast: Ast, options: {
|
|
8
|
+
readonly page: QueryPageRequest;
|
|
9
|
+
readonly expected?: Domain['closure'];
|
|
10
|
+
}): Promise<QueryResponse<QueryResultFor<Ast>>>;
|
|
11
|
+
}
|
|
12
|
+
export declare function executeQuery<DomainValue extends Domain, Output>(client: QueryClient, domain: DomainValue, query: QueryDefinition<DomainValue, void, Output>): Promise<Output>;
|
|
13
|
+
export declare function executeQuery<DomainValue extends Domain, Input, Output>(client: QueryClient, domain: DomainValue, query: QueryDefinition<DomainValue, Input, Output>, input: Input): Promise<Output>;
|
|
14
|
+
export type ExecutableCompositeQuery = CompositeQuery<unknown, unknown, unknown>;
|
|
@@ -0,0 +1,74 @@
|
|
|
1
|
+
import { COLLECTION_QUERY_LIMITS } from '../collection/limits.js';
|
|
2
|
+
import { compileCollectionUnion, partitionCollectionUnion } from '../collection/union.js';
|
|
3
|
+
import { createQueryComposition, executeQueryPlan } from '../composite/index.js';
|
|
4
|
+
import { realizeQuery } from '../define.js';
|
|
5
|
+
import { queryFailure } from '../failure.js';
|
|
6
|
+
import { completeSelection, queryResult } from '../single/index.js';
|
|
7
|
+
import { executePages } from './pages.js';
|
|
8
|
+
export async function executeQuery(client, domain, query, input) {
|
|
9
|
+
if (client === null || typeof client !== 'object' || typeof client.query !== 'function') {
|
|
10
|
+
throw new TypeError('Query execution requires a Client query capability.');
|
|
11
|
+
}
|
|
12
|
+
const execute = (ast, options) => client.query(ast, { ...options, expected: domain.closure });
|
|
13
|
+
const operation = realizeQuery(query, domain);
|
|
14
|
+
try {
|
|
15
|
+
if (operation.kind === 'single') {
|
|
16
|
+
return (await runSingle(execute, operation, input));
|
|
17
|
+
}
|
|
18
|
+
const prepared = operation.prepare?.(input) ?? input;
|
|
19
|
+
const session = createQueryComposition();
|
|
20
|
+
const composed = operation.compose(session.builder, prepared);
|
|
21
|
+
if (isPromiseLike(composed))
|
|
22
|
+
throw new TypeError('Composite Query composition must be synchronous.');
|
|
23
|
+
const plan = session.close(composed);
|
|
24
|
+
const result = await executeQueryPlan(plan, (child, childInput) => runSingle(execute, realizeSingle(child, domain), childInput), (definitions, outputPath) => runCollectionUnion(execute, domain, definitions, outputPath));
|
|
25
|
+
return (operation.project === undefined ? result : operation.project(result, prepared));
|
|
26
|
+
}
|
|
27
|
+
catch (cause) {
|
|
28
|
+
const expected = queryFailure(cause);
|
|
29
|
+
if (operation.reject !== undefined && expected !== undefined) {
|
|
30
|
+
return operation.reject(expected);
|
|
31
|
+
}
|
|
32
|
+
throw cause;
|
|
33
|
+
}
|
|
34
|
+
}
|
|
35
|
+
async function runCollectionUnion(execute, domain, definitions, outputPath) {
|
|
36
|
+
const compiled = compileCollectionUnion(domain, definitions, outputPath);
|
|
37
|
+
const pages = await executePages(execute, compiled.ast, { size: COLLECTION_QUERY_LIMITS.pageSize }, { maximumPages: COLLECTION_QUERY_LIMITS.maximumPages });
|
|
38
|
+
const context = outputPath.length === 0 ? 'collection union' : outputPath.join('.');
|
|
39
|
+
const values = compiled.kind === 'node'
|
|
40
|
+
? queryResult.completeNodeValues(pages, context)
|
|
41
|
+
: Object.freeze(pages.flatMap((page) => queryResult.edgeItems(page, context).map((item) => {
|
|
42
|
+
if (item.edge.kind !== 'value') {
|
|
43
|
+
throw new TypeError(`${context} must project Edge values.`);
|
|
44
|
+
}
|
|
45
|
+
return item.edge.value;
|
|
46
|
+
})));
|
|
47
|
+
return partitionCollectionUnion(domain, compiled, values);
|
|
48
|
+
}
|
|
49
|
+
function realizeSingle(definition, domain) {
|
|
50
|
+
const operation = realizeQuery(definition, domain);
|
|
51
|
+
if (operation.kind !== 'single')
|
|
52
|
+
throw new TypeError('Composite Query leaves must be single.');
|
|
53
|
+
return operation;
|
|
54
|
+
}
|
|
55
|
+
async function runSingle(execute, definition, input) {
|
|
56
|
+
const prepared = definition.prepare?.(input) ?? input;
|
|
57
|
+
const ast = definition.build(prepared);
|
|
58
|
+
if (definition.pagination !== undefined) {
|
|
59
|
+
const collected = await executePages(execute, ast, definition.page, definition.pagination);
|
|
60
|
+
return definition.project(collected, prepared, {
|
|
61
|
+
ast,
|
|
62
|
+
complete: completeSelection(collected),
|
|
63
|
+
});
|
|
64
|
+
}
|
|
65
|
+
const response = await execute(ast, { page: definition.page });
|
|
66
|
+
return definition.project === undefined
|
|
67
|
+
? response.result
|
|
68
|
+
: definition.project(response.result, prepared, { ast });
|
|
69
|
+
}
|
|
70
|
+
function isPromiseLike(input) {
|
|
71
|
+
return (input !== null &&
|
|
72
|
+
(typeof input === 'object' || typeof input === 'function') &&
|
|
73
|
+
typeof input.then === 'function');
|
|
74
|
+
}
|
|
@@ -0,0 +1,14 @@
|
|
|
1
|
+
import type { Domain, schema } from '../../../platform/schema/index.js';
|
|
2
|
+
import type { QueryDefinition } from '../query.js';
|
|
3
|
+
import type { QueryClient } from './execute.js';
|
|
4
|
+
/** Invocation-bound executor for authored Query definitions. */
|
|
5
|
+
export interface QueryExecutor<DomainValue extends Domain = Domain> {
|
|
6
|
+
<Output>(query: QueryDefinition<DomainValue, void, Output>): Promise<Output>;
|
|
7
|
+
<Input, Output>(query: QueryDefinition<DomainValue, Input, Output>, input: Input): Promise<Output>;
|
|
8
|
+
}
|
|
9
|
+
type ExecutableDomain<DomainValue extends Domain> = DomainValue extends {
|
|
10
|
+
readonly source: infer Source extends schema.DomainSchema;
|
|
11
|
+
} ? Extract<schema.DomainOf<Source>, Domain> : DomainValue;
|
|
12
|
+
/** Private Runtime binding to one Client and the exact loaded root Domain. */
|
|
13
|
+
export declare function bindQuery<DomainValue extends Domain>(client: QueryClient, domain: DomainValue): QueryExecutor<ExecutableDomain<DomainValue>>;
|
|
14
|
+
export {};
|
|
@@ -0,0 +1,7 @@
|
|
|
1
|
+
import { executeQuery } from './execute.js';
|
|
2
|
+
/** Private Runtime binding to one Client and the exact loaded root Domain. */
|
|
3
|
+
export function bindQuery(client, domain) {
|
|
4
|
+
const executable = domain;
|
|
5
|
+
const execute = (query, input) => executeQuery(client, executable, query, input);
|
|
6
|
+
return execute;
|
|
7
|
+
}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export { executeQuery } from './execute.js';
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export { pages as executePages } from '../single/pagination.js';
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export { pages as executePages } from '../single/pagination.js';
|
|
@@ -0,0 +1,3 @@
|
|
|
1
|
+
import type { QueryAST, QueryResultFor } from '@astrale-os/kernel-core/graph/query';
|
|
2
|
+
import type { ProjectedQuery, QueryProjectionContext } from '../single/index.js';
|
|
3
|
+
export declare function projectQuery<Input, Output, Ast extends QueryAST>(definition: ProjectedQuery<Input, Output, Ast>, result: QueryResultFor<Ast>, input: Input, context: QueryProjectionContext<Ast>): Output;
|
|
@@ -0,0 +1,10 @@
|
|
|
1
|
+
export interface QueryFailure extends Error {
|
|
2
|
+
readonly code: string;
|
|
3
|
+
}
|
|
4
|
+
export type QueryPaginationErrorCode = 'QUERY_PAGINATION_LIMIT' | 'QUERY_PAGINATION_CURSOR_REPEATED';
|
|
5
|
+
export declare class QueryPaginationError extends Error implements QueryFailure {
|
|
6
|
+
readonly code: QueryPaginationErrorCode;
|
|
7
|
+
readonly name = "QueryPaginationError";
|
|
8
|
+
constructor(code: QueryPaginationErrorCode, message: string);
|
|
9
|
+
}
|
|
10
|
+
export declare function queryFailure(input: unknown): QueryFailure | undefined;
|
|
@@ -0,0 +1,14 @@
|
|
|
1
|
+
export class QueryPaginationError extends Error {
|
|
2
|
+
code;
|
|
3
|
+
name = 'QueryPaginationError';
|
|
4
|
+
constructor(code, message) {
|
|
5
|
+
super(message);
|
|
6
|
+
this.code = code;
|
|
7
|
+
}
|
|
8
|
+
}
|
|
9
|
+
export function queryFailure(input) {
|
|
10
|
+
if (!(input instanceof Error))
|
|
11
|
+
return undefined;
|
|
12
|
+
const code = input.code;
|
|
13
|
+
return typeof code === 'string' && code.startsWith('QUERY_') ? input : undefined;
|
|
14
|
+
}
|
|
@@ -0,0 +1,10 @@
|
|
|
1
|
+
export { defineCollectionQuery, defineCompositeQuery, defineQuery, realizeQuery } from './define.js';
|
|
2
|
+
export type { CollectionQuerySpec } from './collection/metadata.js';
|
|
3
|
+
export { executeQuery, type QueryClient, type QueryExecutor } from './execution/index.js';
|
|
4
|
+
export { QueryPaginationError, type QueryFailure, type QueryPaginationErrorCode, } from './failure.js';
|
|
5
|
+
export type { CollectionQueryDefinition, CollectionValue, CompositeQueryDefinition, QueryAstOf, QueryDefinition, QueryInputOf, QueryOutputOf, SingleQueryDefinition, } from './query.js';
|
|
6
|
+
export { queryResult } from './single/index.js';
|
|
7
|
+
export type { CompleteQueryProjectionContext, PaginatedQuery, ProjectedQuery, QueryPages, QueryPagination, QueryProjectionContext, RawQuery, SingleQuery, } from './single/index.js';
|
|
8
|
+
export type { CompositeQuery, ProjectedCompositeQuery, QueryComposition, QueryPlan, QueryPlanInput, QueryPlanOutput, QueryPlanValue, RawCompositeQuery, } from './composite/index.js';
|
|
9
|
+
/** Canonical Query language and authoring values accept DSL ResolvedClass directly. */
|
|
10
|
+
export * from '@astrale-os/kernel-core/graph/query';
|
|
@@ -0,0 +1,6 @@
|
|
|
1
|
+
export { defineCollectionQuery, defineCompositeQuery, defineQuery, realizeQuery } from './define.js';
|
|
2
|
+
export { executeQuery } from './execution/index.js';
|
|
3
|
+
export { QueryPaginationError, } from './failure.js';
|
|
4
|
+
export { queryResult } from './single/index.js';
|
|
5
|
+
/** Canonical Query language and authoring values accept DSL ResolvedClass directly. */
|
|
6
|
+
export * from '@astrale-os/kernel-core/graph/query';
|
|
@@ -0,0 +1,35 @@
|
|
|
1
|
+
import type { QueryAST, QueryResult } from '@astrale-os/kernel-core/graph/query';
|
|
2
|
+
import type { AnyResolvedClass, ResolvedClass } from '@astrale-os/kernel-dsl/v1';
|
|
3
|
+
import type { Edge } from '../../platform/graph/edge/index.js';
|
|
4
|
+
import type { Node } from '../../platform/graph/node/index.js';
|
|
5
|
+
import type { Domain } from '../../platform/schema/index.js';
|
|
6
|
+
import type { CompositeQuery } from './composite/index.js';
|
|
7
|
+
import type { QueryLifecycle, SingleQuery } from './single/index.js';
|
|
8
|
+
declare const QUERY_DOMAIN: unique symbol;
|
|
9
|
+
declare const QUERY_INPUT: unique symbol;
|
|
10
|
+
declare const QUERY_OUTPUT: unique symbol;
|
|
11
|
+
declare const COLLECTION_QUERY_CLASS: unique symbol;
|
|
12
|
+
/** Inert Domain-bound Query recipe. Its projector is retained privately by the SDK. */
|
|
13
|
+
export interface QueryDefinition<DomainValue extends Domain = Domain, Input = unknown, Output = QueryResult> {
|
|
14
|
+
readonly kind: 'query' | 'composite-query';
|
|
15
|
+
readonly [QUERY_DOMAIN]: (domain: DomainValue) => DomainValue;
|
|
16
|
+
readonly [QUERY_INPUT]?: Input;
|
|
17
|
+
readonly [QUERY_OUTPUT]?: Output;
|
|
18
|
+
}
|
|
19
|
+
export interface SingleQueryDefinition<DomainValue extends Domain = Domain, Input = unknown, Output = QueryResult> extends QueryDefinition<DomainValue, Input, Output> {
|
|
20
|
+
readonly kind: 'query';
|
|
21
|
+
}
|
|
22
|
+
export type CollectionValue<Class extends AnyResolvedClass> = Class extends ResolvedClass<'node'> ? Node : Class extends ResolvedClass<'edge'> ? Edge : never;
|
|
23
|
+
/** Closed complete-Class Query recipe admitted for explicit physical union planning. */
|
|
24
|
+
export interface CollectionQueryDefinition<DomainValue extends Domain = Domain, Class extends AnyResolvedClass = AnyResolvedClass> extends SingleQueryDefinition<DomainValue, void, readonly CollectionValue<Class>[]> {
|
|
25
|
+
readonly [COLLECTION_QUERY_CLASS]: Class;
|
|
26
|
+
}
|
|
27
|
+
export interface CompositeQueryDefinition<DomainValue extends Domain = Domain, Input = unknown, Output = unknown> extends QueryDefinition<DomainValue, Input, Output> {
|
|
28
|
+
readonly kind: 'composite-query';
|
|
29
|
+
}
|
|
30
|
+
/** Canonical admitted operation produced by realizing one Query recipe. */
|
|
31
|
+
export type RealizedQuery<Input, Output = QueryResult, Ast extends QueryAST = QueryAST> = SingleQuery<Input, Output, Ast> | CompositeQuery<Input, unknown, Output, Domain>;
|
|
32
|
+
export type QueryInputOf<Value> = Value extends QueryDefinition<infer _Domain, infer Input, infer _Output> ? Input : Value extends QueryLifecycle<infer Input, infer _Output> ? Input : never;
|
|
33
|
+
export type QueryOutputOf<Value> = Value extends QueryDefinition<infer _Domain, infer _Input, infer Output> ? Output : Value extends QueryLifecycle<infer _Input, infer Output> ? Output : never;
|
|
34
|
+
export type QueryAstOf<Value> = Value extends RealizedQuery<unknown, unknown, infer Ast> ? Ast : never;
|
|
35
|
+
export {};
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export {};
|
|
@@ -0,0 +1,4 @@
|
|
|
1
|
+
export { queryResult } from './node.js';
|
|
2
|
+
export { pages, type QueryPageExecutor } from './pagination.js';
|
|
3
|
+
export { completeSelection } from './selection.js';
|
|
4
|
+
export type { AuthoredSingleQuery, CompleteQueryProjectionContext, PaginatedQuery, ProjectedQuery, QueryLifecycle, QueryPages, QueryPagination, QueryProjectionContext, RawQuery, SingleQuery, } from './query.js';
|
|
@@ -0,0 +1,18 @@
|
|
|
1
|
+
import type { Node, NodeId } from '@astrale-os/kernel-core/graph/node';
|
|
2
|
+
import type { QueryEdgeItemFor, QueryEdgeProjection, QueryResult } from '@astrale-os/kernel-core/graph/query';
|
|
3
|
+
declare function nodeValues(result: QueryResult, context: string): readonly Node[];
|
|
4
|
+
declare function nodeIds(result: QueryResult, context: string): readonly NodeId[];
|
|
5
|
+
declare function edgeItems(result: QueryResult, context: string): readonly QueryEdgeItemFor<QueryEdgeProjection>[];
|
|
6
|
+
export declare const queryResult: Readonly<{
|
|
7
|
+
nodeValues: typeof nodeValues;
|
|
8
|
+
completeNodeValues: (results: readonly QueryResult[], context: string) => readonly Node[];
|
|
9
|
+
nodeIds: typeof nodeIds;
|
|
10
|
+
completeNodeIds: (results: readonly QueryResult[], context: string) => readonly NodeId[];
|
|
11
|
+
exactlyOneNode(result: QueryResult, context: string): Node;
|
|
12
|
+
optionalNode(result: QueryResult, context: string): Node | undefined;
|
|
13
|
+
edgeItems: typeof edgeItems;
|
|
14
|
+
optionalEdgeTarget(result: QueryResult, context: string): Node | undefined;
|
|
15
|
+
exactlyOneEdgeTarget(result: QueryResult, context: string): Node;
|
|
16
|
+
exactlyOneEdgeSource(result: QueryResult, context: string): Node;
|
|
17
|
+
}>;
|
|
18
|
+
export {};
|
|
@@ -0,0 +1,86 @@
|
|
|
1
|
+
function nodeValues(result, context) {
|
|
2
|
+
if (result.kind === 'graph') {
|
|
3
|
+
if (result.selection.kind !== 'node')
|
|
4
|
+
invalid(`Expected a Node ${context} query result.`);
|
|
5
|
+
const byId = new Map(result.graph.nodes.map((node) => [node.id, node]));
|
|
6
|
+
return Object.freeze(result.selection.ids.map((id) => {
|
|
7
|
+
const node = byId.get(id);
|
|
8
|
+
if (node === undefined)
|
|
9
|
+
invalid(`${context} graph omits selected Node ${id}.`);
|
|
10
|
+
return node;
|
|
11
|
+
}));
|
|
12
|
+
}
|
|
13
|
+
if (result.kind !== 'nodes')
|
|
14
|
+
invalid(`Expected a Node ${context} query result.`);
|
|
15
|
+
return Object.freeze(result.nodes.map((projection) => {
|
|
16
|
+
if (projection.kind !== 'value')
|
|
17
|
+
invalid(`Expected ${context} query to project Node values.`);
|
|
18
|
+
return projection.value;
|
|
19
|
+
}));
|
|
20
|
+
}
|
|
21
|
+
function nodeIds(result, context) {
|
|
22
|
+
if (result.kind === 'graph') {
|
|
23
|
+
if (result.selection.kind !== 'node')
|
|
24
|
+
invalid(`Expected a Node ${context} query result.`);
|
|
25
|
+
return result.selection.ids;
|
|
26
|
+
}
|
|
27
|
+
if (result.kind !== 'nodes')
|
|
28
|
+
invalid(`Expected a Node ${context} query result.`);
|
|
29
|
+
return Object.freeze(result.nodes.map((projection) => projection.value.id));
|
|
30
|
+
}
|
|
31
|
+
function edgeItems(result, context) {
|
|
32
|
+
if (result.kind !== 'edges')
|
|
33
|
+
invalid(`Expected an Edge ${context} query result.`);
|
|
34
|
+
return result.edges;
|
|
35
|
+
}
|
|
36
|
+
export const queryResult = Object.freeze({
|
|
37
|
+
nodeValues,
|
|
38
|
+
completeNodeValues: (results, context) => Object.freeze(results.flatMap((result) => nodeValues(result, context))),
|
|
39
|
+
nodeIds,
|
|
40
|
+
completeNodeIds: (results, context) => Object.freeze(results.flatMap((result) => nodeIds(result, context))),
|
|
41
|
+
exactlyOneNode(result, context) {
|
|
42
|
+
const values = nodeValues(result, context);
|
|
43
|
+
if (values.length !== 1)
|
|
44
|
+
invalid(`${context} must resolve exactly one Node.`);
|
|
45
|
+
return values[0];
|
|
46
|
+
},
|
|
47
|
+
optionalNode(result, context) {
|
|
48
|
+
const values = nodeValues(result, context);
|
|
49
|
+
if (values.length > 1)
|
|
50
|
+
invalid(`${context} must resolve at most one Node.`);
|
|
51
|
+
return values[0];
|
|
52
|
+
},
|
|
53
|
+
edgeItems,
|
|
54
|
+
optionalEdgeTarget(result, context) {
|
|
55
|
+
const items = edgeItems(result, context);
|
|
56
|
+
if (items.length > 1)
|
|
57
|
+
invalid(`${context} must resolve at most one Edge.`);
|
|
58
|
+
const target = items[0]?.target;
|
|
59
|
+
if (target === undefined)
|
|
60
|
+
return undefined;
|
|
61
|
+
if (target.kind !== 'value')
|
|
62
|
+
invalid(`${context} must project its target value.`);
|
|
63
|
+
return target.value;
|
|
64
|
+
},
|
|
65
|
+
exactlyOneEdgeTarget(result, context) {
|
|
66
|
+
const items = edgeItems(result, context);
|
|
67
|
+
if (items.length !== 1)
|
|
68
|
+
invalid(`${context} must resolve exactly one Edge.`);
|
|
69
|
+
const target = items[0].target;
|
|
70
|
+
if (target.kind !== 'value')
|
|
71
|
+
invalid(`${context} must project its target value.`);
|
|
72
|
+
return target.value;
|
|
73
|
+
},
|
|
74
|
+
exactlyOneEdgeSource(result, context) {
|
|
75
|
+
const items = edgeItems(result, context);
|
|
76
|
+
if (items.length !== 1)
|
|
77
|
+
invalid(`${context} must resolve exactly one Edge.`);
|
|
78
|
+
const source = items[0].source;
|
|
79
|
+
if (source.kind !== 'value')
|
|
80
|
+
invalid(`${context} must project its source value.`);
|
|
81
|
+
return source.value;
|
|
82
|
+
},
|
|
83
|
+
});
|
|
84
|
+
function invalid(message) {
|
|
85
|
+
throw new TypeError(message);
|
|
86
|
+
}
|
|
@@ -0,0 +1,9 @@
|
|
|
1
|
+
import type { QueryPageRequest, QueryResponse } from '@astrale-os/kernel-client/graph';
|
|
2
|
+
import type { QueryAST, QueryResultFor } from '@astrale-os/kernel-core/graph/query';
|
|
3
|
+
import type { QueryPages, QueryPagination } from './query.js';
|
|
4
|
+
export interface QueryPageExecutor {
|
|
5
|
+
<Query extends QueryAST>(ast: Query, options: {
|
|
6
|
+
readonly page: QueryPageRequest;
|
|
7
|
+
}): Promise<QueryResponse<QueryResultFor<Query>>>;
|
|
8
|
+
}
|
|
9
|
+
export declare function pages<Query extends QueryAST>(execute: QueryPageExecutor, ast: Query, page: Readonly<Pick<QueryPageRequest, 'size'>>, pagination: QueryPagination): Promise<QueryPages<Query>>;
|
|
@@ -0,0 +1,24 @@
|
|
|
1
|
+
import { QueryPaginationError } from '../failure.js';
|
|
2
|
+
export async function pages(execute, ast, page, pagination) {
|
|
3
|
+
const collected = [];
|
|
4
|
+
const cursors = new Set();
|
|
5
|
+
let response = await execute(ast, { page });
|
|
6
|
+
const kind = response.result.kind;
|
|
7
|
+
while (true) {
|
|
8
|
+
if (response.result.kind !== kind) {
|
|
9
|
+
throw new TypeError(`Paginated Query result kind changed from ${kind} to ${response.result.kind}.`);
|
|
10
|
+
}
|
|
11
|
+
collected.push(response.result);
|
|
12
|
+
const cursor = response.page.next;
|
|
13
|
+
if (cursor === undefined)
|
|
14
|
+
return Object.freeze(collected);
|
|
15
|
+
if (cursors.has(cursor)) {
|
|
16
|
+
throw new QueryPaginationError('QUERY_PAGINATION_CURSOR_REPEATED', 'Paginated Query returned a repeated continuation cursor.');
|
|
17
|
+
}
|
|
18
|
+
cursors.add(cursor);
|
|
19
|
+
if (collected.length >= pagination.maximumPages) {
|
|
20
|
+
throw new QueryPaginationError('QUERY_PAGINATION_LIMIT', `Paginated Query exceeded its ${pagination.maximumPages}-page bound.`);
|
|
21
|
+
}
|
|
22
|
+
response = await execute(ast, { page: { size: page.size, after: cursor } });
|
|
23
|
+
}
|
|
24
|
+
}
|
|
@@ -0,0 +1,47 @@
|
|
|
1
|
+
import type { QueryPageRequest } from '@astrale-os/kernel-client/graph';
|
|
2
|
+
import type { QueryAST, QueryResult, QueryResultFor, QuerySelectionFor } from '@astrale-os/kernel-core/graph/query';
|
|
3
|
+
import type { QueryFailure } from '../failure.js';
|
|
4
|
+
declare const QUERY_INPUT: unique symbol;
|
|
5
|
+
declare const QUERY_OUTPUT: unique symbol;
|
|
6
|
+
export interface QueryLifecycle<Input, Output> {
|
|
7
|
+
readonly id: string;
|
|
8
|
+
readonly [QUERY_INPUT]?: Input;
|
|
9
|
+
readonly [QUERY_OUTPUT]?: Output;
|
|
10
|
+
prepare?(input: Input): Input;
|
|
11
|
+
reject?(failure: QueryFailure): Output;
|
|
12
|
+
}
|
|
13
|
+
export interface QueryProjectionContext<Query extends QueryAST> {
|
|
14
|
+
readonly ast: Query;
|
|
15
|
+
}
|
|
16
|
+
export interface CompleteQueryProjectionContext<Query extends QueryAST> extends QueryProjectionContext<Query> {
|
|
17
|
+
readonly complete: QuerySelectionFor<QueryResultFor<Query>>;
|
|
18
|
+
}
|
|
19
|
+
export interface QueryPagination {
|
|
20
|
+
readonly maximumPages: number;
|
|
21
|
+
}
|
|
22
|
+
export type QueryPages<Query extends QueryAST = QueryAST> = readonly [
|
|
23
|
+
QueryResultFor<Query>,
|
|
24
|
+
...QueryResultFor<Query>[]
|
|
25
|
+
];
|
|
26
|
+
export interface SingleQueryBase<Input, Output, Query extends QueryAST> extends QueryLifecycle<Input, Output> {
|
|
27
|
+
readonly kind: 'single';
|
|
28
|
+
readonly page: Readonly<Pick<QueryPageRequest, 'size'>>;
|
|
29
|
+
build(input: Input): Query;
|
|
30
|
+
}
|
|
31
|
+
export interface RawQuery<Input, Query extends QueryAST = QueryAST> extends SingleQueryBase<Input, QueryResultFor<Query>, Query> {
|
|
32
|
+
readonly pagination?: undefined;
|
|
33
|
+
readonly project?: undefined;
|
|
34
|
+
}
|
|
35
|
+
export interface ProjectedQuery<Input, Output, Query extends QueryAST = QueryAST> extends SingleQueryBase<Input, Output, Query> {
|
|
36
|
+
readonly pagination?: undefined;
|
|
37
|
+
project(result: QueryResultFor<Query>, input: Input, context: QueryProjectionContext<Query>): Output;
|
|
38
|
+
}
|
|
39
|
+
export interface PaginatedQuery<Input, Output, Query extends QueryAST = QueryAST> extends SingleQueryBase<Input, Output, Query> {
|
|
40
|
+
readonly pagination: QueryPagination;
|
|
41
|
+
project(pages: QueryPages<Query>, input: Input, context: CompleteQueryProjectionContext<Query>): Output;
|
|
42
|
+
}
|
|
43
|
+
export type SingleQuery<Input, Output = QueryResult, Query extends QueryAST = QueryAST> = RawQuery<Input, Query> | ProjectedQuery<Input, Output, Query> | PaginatedQuery<Input, Output, Query>;
|
|
44
|
+
export type AuthoredSingleQuery<Input, Output, Query extends QueryAST> = Omit<SingleQuery<Input, Output, Query>, 'kind' | 'page'> & {
|
|
45
|
+
readonly page?: Readonly<Pick<QueryPageRequest, 'size'>>;
|
|
46
|
+
};
|
|
47
|
+
export {};
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export {};
|