@astrale-os/sdk 0.4.18 → 0.5.0-beta.1
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 +7 -5
- package/dist/auth/index.d.ts +3 -15
- package/dist/auth/index.d.ts.map +1 -1
- package/dist/auth/index.js +2 -10
- package/dist/auth/index.js.map +1 -1
- package/dist/capability/client.d.ts +25 -0
- package/dist/capability/client.d.ts.map +1 -0
- package/dist/capability/client.js +147 -0
- package/dist/capability/client.js.map +1 -0
- package/dist/capability/contract.d.ts +70 -0
- package/dist/capability/contract.d.ts.map +1 -0
- package/dist/capability/contract.js +3 -0
- package/dist/capability/contract.js.map +1 -0
- package/dist/capability/define.d.ts +14 -0
- package/dist/capability/define.d.ts.map +1 -0
- package/dist/capability/define.js +145 -0
- package/dist/capability/define.js.map +1 -0
- package/dist/capability/index.d.ts +3 -0
- package/dist/capability/index.d.ts.map +1 -0
- package/dist/capability/index.js +2 -0
- package/dist/capability/index.js.map +1 -0
- package/dist/cli/arguments.d.ts +21 -0
- package/dist/cli/arguments.d.ts.map +1 -0
- package/dist/cli/arguments.js +220 -0
- package/dist/cli/arguments.js.map +1 -0
- package/dist/cli/dotenv.d.ts +1 -4
- package/dist/cli/dotenv.d.ts.map +1 -1
- package/dist/cli/dotenv.js +6 -15
- package/dist/cli/dotenv.js.map +1 -1
- package/dist/cli/index.d.ts +4 -5
- package/dist/cli/index.d.ts.map +1 -1
- package/dist/cli/index.js +4 -5
- package/dist/cli/index.js.map +1 -1
- package/dist/cli/run.d.ts +4 -79
- package/dist/cli/run.d.ts.map +1 -1
- package/dist/cli/run.js +68 -326
- package/dist/cli/run.js.map +1 -1
- package/dist/deployment/artifact/bindings.d.ts +7 -0
- package/dist/deployment/artifact/bindings.d.ts.map +1 -0
- package/dist/deployment/artifact/bindings.js +44 -0
- package/dist/deployment/artifact/bindings.js.map +1 -0
- package/dist/deployment/artifact/deployment.d.ts +35 -0
- package/dist/deployment/artifact/deployment.d.ts.map +1 -0
- package/dist/deployment/artifact/deployment.js +90 -0
- package/dist/deployment/artifact/deployment.js.map +1 -0
- package/dist/deployment/artifact/index.d.ts +5 -0
- package/dist/deployment/artifact/index.d.ts.map +1 -0
- package/dist/deployment/artifact/index.js +4 -0
- package/dist/deployment/artifact/index.js.map +1 -0
- package/dist/deployment/check/check.d.ts +8 -0
- package/dist/deployment/check/check.d.ts.map +1 -0
- package/dist/deployment/check/check.js +94 -0
- package/dist/deployment/check/check.js.map +1 -0
- package/dist/deployment/check/contract.d.ts +29 -0
- package/dist/deployment/check/contract.d.ts.map +1 -0
- package/dist/deployment/check/contract.js +2 -0
- package/dist/deployment/check/contract.js.map +1 -0
- package/dist/deployment/check/index.d.ts +3 -0
- package/dist/deployment/check/index.d.ts.map +1 -0
- package/dist/deployment/check/index.js +2 -0
- package/dist/deployment/check/index.js.map +1 -0
- package/dist/deployment/index.d.ts +7 -0
- package/dist/deployment/index.d.ts.map +1 -0
- package/dist/deployment/index.js +4 -0
- package/dist/deployment/index.js.map +1 -0
- package/dist/deployment/provider/adapter.d.ts +56 -0
- package/dist/deployment/provider/adapter.d.ts.map +1 -0
- package/dist/deployment/provider/adapter.js +84 -0
- package/dist/deployment/provider/adapter.js.map +1 -0
- package/dist/deployment/provider/config.d.ts +10 -0
- package/dist/deployment/provider/config.d.ts.map +1 -0
- package/dist/deployment/provider/config.js +8 -0
- package/dist/deployment/provider/config.js.map +1 -0
- package/dist/deployment/provider/index.d.ts +5 -0
- package/dist/deployment/provider/index.d.ts.map +1 -0
- package/dist/deployment/provider/index.js +3 -0
- package/dist/deployment/provider/index.js.map +1 -0
- package/dist/domain/app.d.ts +34 -0
- package/dist/domain/app.d.ts.map +1 -0
- package/dist/domain/app.js +2 -0
- package/dist/domain/app.js.map +1 -0
- package/dist/domain/context.d.ts +66 -0
- package/dist/domain/context.d.ts.map +1 -0
- package/dist/domain/context.js +2 -0
- package/dist/domain/context.js.map +1 -0
- package/dist/domain/define.d.ts +91 -65
- package/dist/domain/define.d.ts.map +1 -1
- package/dist/domain/define.js +74 -59
- package/dist/domain/define.js.map +1 -1
- package/dist/domain/handlers.d.ts +53 -0
- package/dist/domain/handlers.d.ts.map +1 -0
- package/dist/domain/handlers.js +88 -0
- package/dist/domain/handlers.js.map +1 -0
- package/dist/domain/implement.d.ts +5 -0
- package/dist/domain/implement.d.ts.map +1 -0
- package/dist/domain/implement.js +23 -0
- package/dist/domain/implement.js.map +1 -0
- package/dist/domain/index.d.ts +11 -4
- package/dist/domain/index.d.ts.map +1 -1
- package/dist/domain/index.js +6 -3
- package/dist/domain/index.js.map +1 -1
- package/dist/graph/class/index.d.ts +3 -0
- package/dist/graph/class/index.d.ts.map +1 -0
- package/dist/graph/class/index.js +3 -0
- package/dist/graph/class/index.js.map +1 -0
- package/dist/graph/edge/index.d.ts +3 -0
- package/dist/graph/edge/index.d.ts.map +1 -0
- package/dist/graph/edge/index.js +3 -0
- package/dist/graph/edge/index.js.map +1 -0
- package/dist/graph/index.d.ts +10 -0
- package/dist/graph/index.d.ts.map +1 -0
- package/dist/graph/index.js +9 -0
- package/dist/graph/index.js.map +1 -0
- package/dist/graph/model/index.d.ts +3 -0
- package/dist/graph/model/index.d.ts.map +1 -0
- package/dist/graph/model/index.js +3 -0
- package/dist/graph/model/index.js.map +1 -0
- package/dist/graph/node/index.d.ts +3 -0
- package/dist/graph/node/index.d.ts.map +1 -0
- package/dist/graph/node/index.js +3 -0
- package/dist/graph/node/index.js.map +1 -0
- package/dist/graph/path/index.d.ts +3 -0
- package/dist/graph/path/index.d.ts.map +1 -0
- package/dist/graph/path/index.js +3 -0
- package/dist/graph/path/index.js.map +1 -0
- package/dist/graph/properties/index.d.ts +3 -0
- package/dist/graph/properties/index.d.ts.map +1 -0
- package/dist/graph/properties/index.js +3 -0
- package/dist/graph/properties/index.js.map +1 -0
- package/dist/index.d.ts +20 -27
- package/dist/index.d.ts.map +1 -1
- package/dist/index.js +10 -47
- package/dist/index.js.map +1 -1
- package/dist/invocation/handler.d.ts +51 -0
- package/dist/invocation/handler.d.ts.map +1 -0
- package/dist/invocation/handler.js +266 -0
- package/dist/invocation/handler.js.map +1 -0
- package/dist/invocation/index.d.ts +3 -0
- package/dist/invocation/index.d.ts.map +1 -0
- package/dist/invocation/index.js +2 -0
- package/dist/invocation/index.js.map +1 -0
- package/dist/invocation/receiver.d.ts +5 -0
- package/dist/invocation/receiver.d.ts.map +1 -0
- package/dist/invocation/receiver.js +70 -0
- package/dist/invocation/receiver.js.map +1 -0
- package/dist/invocation/result.d.ts +5 -0
- package/dist/invocation/result.d.ts.map +1 -0
- package/dist/invocation/result.js +146 -0
- package/dist/invocation/result.js.map +1 -0
- package/dist/invocation/selection.d.ts +21 -0
- package/dist/invocation/selection.d.ts.map +1 -0
- package/dist/invocation/selection.js +113 -0
- package/dist/invocation/selection.js.map +1 -0
- package/dist/linter/adapters/typescript/discover.d.ts +4 -0
- package/dist/linter/adapters/typescript/discover.d.ts.map +1 -0
- package/dist/linter/adapters/typescript/discover.js +412 -0
- package/dist/linter/adapters/typescript/discover.js.map +1 -0
- package/dist/linter/adapters/typescript/evidence-admission.d.ts +5 -0
- package/dist/linter/adapters/typescript/evidence-admission.d.ts.map +1 -0
- package/dist/linter/adapters/typescript/evidence-admission.js +22 -0
- package/dist/linter/adapters/typescript/evidence-admission.js.map +1 -0
- package/dist/linter/adapters/typescript/imports.d.ts +7 -0
- package/dist/linter/adapters/typescript/imports.d.ts.map +1 -0
- package/dist/linter/adapters/typescript/imports.js +171 -0
- package/dist/linter/adapters/typescript/imports.js.map +1 -0
- package/dist/linter/adapters/typescript/index.d.ts +48 -0
- package/dist/linter/adapters/typescript/index.d.ts.map +1 -0
- package/dist/linter/adapters/typescript/index.js +8 -0
- package/dist/linter/adapters/typescript/index.js.map +1 -0
- package/dist/linter/adapters/typescript/query-observation.d.ts +4 -0
- package/dist/linter/adapters/typescript/query-observation.d.ts.map +1 -0
- package/dist/linter/adapters/typescript/query-observation.js +172 -0
- package/dist/linter/adapters/typescript/query-observation.js.map +1 -0
- package/dist/linter/adapters/typescript/suppression-directives.d.ts +5 -0
- package/dist/linter/adapters/typescript/suppression-directives.d.ts.map +1 -0
- package/dist/linter/adapters/typescript/suppression-directives.js +85 -0
- package/dist/linter/adapters/typescript/suppression-directives.js.map +1 -0
- package/dist/linter/adapters/typescript/syntax.d.ts +39 -0
- package/dist/linter/adapters/typescript/syntax.d.ts.map +1 -0
- package/dist/linter/adapters/typescript/syntax.js +183 -0
- package/dist/linter/adapters/typescript/syntax.js.map +1 -0
- package/dist/linter/adapters/typescript/type-universe.d.ts +2 -0
- package/dist/linter/adapters/typescript/type-universe.d.ts.map +1 -0
- package/dist/linter/adapters/typescript/type-universe.js +265 -0
- package/dist/linter/adapters/typescript/type-universe.js.map +1 -0
- package/dist/linter/catalog/compile.d.ts +3 -0
- package/dist/linter/catalog/compile.d.ts.map +1 -0
- package/dist/linter/catalog/compile.js +111 -0
- package/dist/linter/catalog/compile.js.map +1 -0
- package/dist/linter/catalog/index.d.ts +19 -0
- package/dist/linter/catalog/index.d.ts.map +1 -0
- package/dist/linter/catalog/index.js +3 -0
- package/dist/linter/catalog/index.js.map +1 -0
- package/dist/linter/catalog/revision.d.ts +7 -0
- package/dist/linter/catalog/revision.d.ts.map +1 -0
- package/dist/linter/catalog/revision.js +13 -0
- package/dist/linter/catalog/revision.js.map +1 -0
- package/dist/linter/diagnostics/error.d.ts +10 -0
- package/dist/linter/diagnostics/error.d.ts.map +1 -0
- package/dist/linter/diagnostics/error.js +10 -0
- package/dist/linter/diagnostics/error.js.map +1 -0
- package/dist/linter/diagnostics/index.d.ts +29 -0
- package/dist/linter/diagnostics/index.d.ts.map +1 -0
- package/dist/linter/diagnostics/index.js +3 -0
- package/dist/linter/diagnostics/index.js.map +1 -0
- package/dist/linter/diagnostics/sort.d.ts +3 -0
- package/dist/linter/diagnostics/sort.d.ts.map +1 -0
- package/dist/linter/diagnostics/sort.js +27 -0
- package/dist/linter/diagnostics/sort.js.map +1 -0
- package/dist/linter/evaluation/binding/bind.d.ts +5 -0
- package/dist/linter/evaluation/binding/bind.d.ts.map +1 -0
- package/dist/linter/evaluation/binding/bind.js +356 -0
- package/dist/linter/evaluation/binding/bind.js.map +1 -0
- package/dist/linter/evaluation/binding/diagnostic.d.ts +5 -0
- package/dist/linter/evaluation/binding/diagnostic.d.ts.map +1 -0
- package/dist/linter/evaluation/binding/diagnostic.js +17 -0
- package/dist/linter/evaluation/binding/diagnostic.js.map +1 -0
- package/dist/linter/evaluation/binding/index.d.ts +2 -0
- package/dist/linter/evaluation/binding/index.d.ts.map +1 -0
- package/dist/linter/evaluation/binding/index.js +2 -0
- package/dist/linter/evaluation/binding/index.js.map +1 -0
- package/dist/linter/evaluation/contract/availability.d.ts +28 -0
- package/dist/linter/evaluation/contract/availability.d.ts.map +1 -0
- package/dist/linter/evaluation/contract/availability.js +2 -0
- package/dist/linter/evaluation/contract/availability.js.map +1 -0
- package/dist/linter/evaluation/contract/decision.d.ts +26 -0
- package/dist/linter/evaluation/contract/decision.d.ts.map +1 -0
- package/dist/linter/evaluation/contract/decision.js +2 -0
- package/dist/linter/evaluation/contract/decision.js.map +1 -0
- package/dist/linter/evaluation/contract/evidence.d.ts +12 -0
- package/dist/linter/evaluation/contract/evidence.d.ts.map +1 -0
- package/dist/linter/evaluation/contract/evidence.js +2 -0
- package/dist/linter/evaluation/contract/evidence.js.map +1 -0
- package/dist/linter/evaluation/contract/implementation.d.ts +22 -0
- package/dist/linter/evaluation/contract/implementation.d.ts.map +1 -0
- package/dist/linter/evaluation/contract/implementation.js +2 -0
- package/dist/linter/evaluation/contract/implementation.js.map +1 -0
- package/dist/linter/evaluation/contract/index.d.ts +5 -0
- package/dist/linter/evaluation/contract/index.d.ts.map +1 -0
- package/dist/linter/evaluation/contract/index.js +2 -0
- package/dist/linter/evaluation/contract/index.js.map +1 -0
- package/dist/linter/evaluation/index.d.ts +3 -0
- package/dist/linter/evaluation/index.d.ts.map +1 -0
- package/dist/linter/evaluation/index.js +2 -0
- package/dist/linter/evaluation/index.js.map +1 -0
- package/dist/linter/implementations/source/capabilities.d.ts +3 -0
- package/dist/linter/implementations/source/capabilities.d.ts.map +1 -0
- package/dist/linter/implementations/source/capabilities.js +41 -0
- package/dist/linter/implementations/source/capabilities.js.map +1 -0
- package/dist/linter/implementations/source/contract.d.ts +17 -0
- package/dist/linter/implementations/source/contract.d.ts.map +1 -0
- package/dist/linter/implementations/source/contract.js +53 -0
- package/dist/linter/implementations/source/contract.js.map +1 -0
- package/dist/linter/implementations/source/functions.d.ts +3 -0
- package/dist/linter/implementations/source/functions.d.ts.map +1 -0
- package/dist/linter/implementations/source/functions.js +102 -0
- package/dist/linter/implementations/source/functions.js.map +1 -0
- package/dist/linter/implementations/source/global.d.ts +3 -0
- package/dist/linter/implementations/source/global.d.ts.map +1 -0
- package/dist/linter/implementations/source/global.js +812 -0
- package/dist/linter/implementations/source/global.js.map +1 -0
- package/dist/linter/implementations/source/index.d.ts +4 -0
- package/dist/linter/implementations/source/index.d.ts.map +1 -0
- package/dist/linter/implementations/source/index.js +4 -0
- package/dist/linter/implementations/source/index.js.map +1 -0
- package/dist/linter/implementations/source/integrations.d.ts +3 -0
- package/dist/linter/implementations/source/integrations.d.ts.map +1 -0
- package/dist/linter/implementations/source/integrations.js +186 -0
- package/dist/linter/implementations/source/integrations.js.map +1 -0
- package/dist/linter/implementations/source/migrations.d.ts +3 -0
- package/dist/linter/implementations/source/migrations.d.ts.map +1 -0
- package/dist/linter/implementations/source/migrations.js +115 -0
- package/dist/linter/implementations/source/migrations.js.map +1 -0
- package/dist/linter/implementations/source/mutations.d.ts +3 -0
- package/dist/linter/implementations/source/mutations.d.ts.map +1 -0
- package/dist/linter/implementations/source/mutations.js +185 -0
- package/dist/linter/implementations/source/mutations.js.map +1 -0
- package/dist/linter/implementations/source/queries.d.ts +3 -0
- package/dist/linter/implementations/source/queries.d.ts.map +1 -0
- package/dist/linter/implementations/source/queries.js +1000 -0
- package/dist/linter/implementations/source/queries.js.map +1 -0
- package/dist/linter/implementations/source/rules.d.ts +3 -0
- package/dist/linter/implementations/source/rules.d.ts.map +1 -0
- package/dist/linter/implementations/source/rules.js +141 -0
- package/dist/linter/implementations/source/rules.js.map +1 -0
- package/dist/linter/implementations/source/schema.d.ts +3 -0
- package/dist/linter/implementations/source/schema.d.ts.map +1 -0
- package/dist/linter/implementations/source/schema.js +105 -0
- package/dist/linter/implementations/source/schema.js.map +1 -0
- package/dist/linter/implementations/source/shared.d.ts +42 -0
- package/dist/linter/implementations/source/shared.d.ts.map +1 -0
- package/dist/linter/implementations/source/shared.js +239 -0
- package/dist/linter/implementations/source/shared.js.map +1 -0
- package/dist/linter/implementations/source/states.d.ts +3 -0
- package/dist/linter/implementations/source/states.d.ts.map +1 -0
- package/dist/linter/implementations/source/states.js +2 -0
- package/dist/linter/implementations/source/states.js.map +1 -0
- package/dist/linter/implementations/source/tests.d.ts +3 -0
- package/dist/linter/implementations/source/tests.d.ts.map +1 -0
- package/dist/linter/implementations/source/tests.js +28 -0
- package/dist/linter/implementations/source/tests.js.map +1 -0
- package/dist/linter/implementations/source/ui.d.ts +3 -0
- package/dist/linter/implementations/source/ui.d.ts.map +1 -0
- package/dist/linter/implementations/source/ui.js +21 -0
- package/dist/linter/implementations/source/ui.js.map +1 -0
- package/dist/linter/implementations/source/utils.d.ts +3 -0
- package/dist/linter/implementations/source/utils.d.ts.map +1 -0
- package/dist/linter/implementations/source/utils.js +29 -0
- package/dist/linter/implementations/source/utils.js.map +1 -0
- package/dist/linter/implementations/source/verifiers.d.ts +3 -0
- package/dist/linter/implementations/source/verifiers.d.ts.map +1 -0
- package/dist/linter/implementations/source/verifiers.js +33 -0
- package/dist/linter/implementations/source/verifiers.js.map +1 -0
- package/dist/linter/implementations/source/views.d.ts +3 -0
- package/dist/linter/implementations/source/views.d.ts.map +1 -0
- package/dist/linter/implementations/source/views.js +36 -0
- package/dist/linter/implementations/source/views.js.map +1 -0
- package/dist/linter/implementations/source/workflows.d.ts +3 -0
- package/dist/linter/implementations/source/workflows.d.ts.map +1 -0
- package/dist/linter/implementations/source/workflows.js +308 -0
- package/dist/linter/implementations/source/workflows.js.map +1 -0
- package/dist/linter/index.d.ts +7 -8
- package/dist/linter/index.d.ts.map +1 -1
- package/dist/linter/index.js +2 -4
- package/dist/linter/index.js.map +1 -1
- package/dist/linter/lint.d.ts +22 -6
- package/dist/linter/lint.d.ts.map +1 -1
- package/dist/linter/lint.js +58 -15
- package/dist/linter/lint.js.map +1 -1
- package/dist/linter/oxlint/index.d.ts +4 -0
- package/dist/linter/oxlint/index.d.ts.map +1 -0
- package/dist/linter/oxlint/index.js +2 -0
- package/dist/linter/oxlint/index.js.map +1 -0
- package/dist/linter/oxlint/process.d.ts +19 -0
- package/dist/linter/oxlint/process.d.ts.map +1 -0
- package/dist/linter/oxlint/process.js +170 -0
- package/dist/linter/oxlint/process.js.map +1 -0
- package/dist/linter/oxlint/run.d.ts +7 -6
- package/dist/linter/oxlint/run.d.ts.map +1 -1
- package/dist/linter/oxlint/run.js +166 -36
- package/dist/linter/oxlint/run.js.map +1 -1
- package/dist/linter/oxlint-config/ignore-patterns.d.ts +6 -0
- package/dist/linter/oxlint-config/ignore-patterns.d.ts.map +1 -0
- package/dist/linter/oxlint-config/ignore-patterns.js +10 -0
- package/dist/linter/oxlint-config/ignore-patterns.js.map +1 -0
- package/dist/linter/oxlint-config/index.d.ts +5 -0
- package/dist/linter/oxlint-config/index.d.ts.map +1 -0
- package/dist/linter/oxlint-config/index.js +18 -0
- package/dist/linter/oxlint-config/index.js.map +1 -0
- package/dist/linter/packs/domain.d.ts +3 -0
- package/dist/linter/packs/domain.d.ts.map +1 -0
- package/dist/linter/packs/domain.js +8 -0
- package/dist/linter/packs/domain.js.map +1 -0
- package/dist/linter/packs/index.d.ts +9 -0
- package/dist/linter/packs/index.d.ts.map +1 -0
- package/dist/linter/packs/index.js +2 -0
- package/dist/linter/packs/index.js.map +1 -0
- package/dist/linter/policy/compile.d.ts +3 -0
- package/dist/linter/policy/compile.d.ts.map +1 -0
- package/dist/linter/policy/compile.js +256 -0
- package/dist/linter/policy/compile.js.map +1 -0
- package/dist/linter/policy/generated.d.ts +5 -0
- package/dist/linter/policy/generated.d.ts.map +1 -0
- package/dist/linter/policy/generated.js +764 -0
- package/dist/linter/policy/generated.js.map +1 -0
- package/dist/linter/policy/index.d.ts +43 -0
- package/dist/linter/policy/index.d.ts.map +1 -0
- package/dist/linter/policy/index.js +3 -0
- package/dist/linter/policy/index.js.map +1 -0
- package/dist/linter/qualification/index.d.ts +11 -0
- package/dist/linter/qualification/index.d.ts.map +1 -0
- package/dist/linter/qualification/index.js +3 -0
- package/dist/linter/qualification/index.js.map +1 -0
- package/dist/linter/qualification/query-fixtures.d.ts +3 -0
- package/dist/linter/qualification/query-fixtures.d.ts.map +1 -0
- package/dist/linter/qualification/query-fixtures.js +69 -0
- package/dist/linter/qualification/query-fixtures.js.map +1 -0
- package/dist/linter/qualification/runner.d.ts +4 -0
- package/dist/linter/qualification/runner.d.ts.map +1 -0
- package/dist/linter/qualification/runner.js +7 -0
- package/dist/linter/qualification/runner.js.map +1 -0
- package/dist/linter/report/format.d.ts +4 -0
- package/dist/linter/report/format.d.ts.map +1 -0
- package/dist/linter/report/format.js +33 -0
- package/dist/linter/report/format.js.map +1 -0
- package/dist/linter/report/index.d.ts +3 -0
- package/dist/linter/report/index.d.ts.map +1 -0
- package/dist/linter/report/index.js +2 -0
- package/dist/linter/report/index.js.map +1 -0
- package/dist/linter/requirements/index.d.ts +3 -0
- package/dist/linter/requirements/index.d.ts.map +1 -0
- package/dist/linter/requirements/index.js +2 -0
- package/dist/linter/requirements/index.js.map +1 -0
- package/dist/linter/requirements/model.d.ts +9 -0
- package/dist/linter/requirements/model.d.ts.map +1 -0
- package/dist/linter/requirements/model.js +2 -0
- package/dist/linter/requirements/model.js.map +1 -0
- package/dist/linter/requirements/registry.d.ts +4 -0
- package/dist/linter/requirements/registry.d.ts.map +1 -0
- package/dist/linter/requirements/registry.js +188 -0
- package/dist/linter/requirements/registry.js.map +1 -0
- package/dist/linter/semantics/query/decision.d.ts +5 -0
- package/dist/linter/semantics/query/decision.d.ts.map +1 -0
- package/dist/linter/semantics/query/decision.js +74 -0
- package/dist/linter/semantics/query/decision.js.map +1 -0
- package/dist/linter/semantics/query/index.d.ts +4 -0
- package/dist/linter/semantics/query/index.d.ts.map +1 -0
- package/dist/linter/semantics/query/index.js +3 -0
- package/dist/linter/semantics/query/index.js.map +1 -0
- package/dist/linter/semantics/query/observation.d.ts +36 -0
- package/dist/linter/semantics/query/observation.d.ts.map +1 -0
- package/dist/linter/semantics/query/observation.js +13 -0
- package/dist/linter/semantics/query/observation.js.map +1 -0
- package/dist/linter/suppression/apply.d.ts +4 -0
- package/dist/linter/suppression/apply.d.ts.map +1 -0
- package/dist/linter/suppression/apply.js +48 -0
- package/dist/linter/suppression/apply.js.map +1 -0
- package/dist/linter/suppression/directive.d.ts +11 -0
- package/dist/linter/suppression/directive.d.ts.map +1 -0
- package/dist/linter/suppression/directive.js +2 -0
- package/dist/linter/suppression/directive.js.map +1 -0
- package/dist/linter/suppression/index.d.ts +14 -0
- package/dist/linter/suppression/index.d.ts.map +1 -0
- package/dist/linter/suppression/index.js +2 -0
- package/dist/linter/suppression/index.js.map +1 -0
- package/dist/mutation/contract.d.ts +134 -0
- package/dist/mutation/contract.d.ts.map +1 -0
- package/dist/mutation/contract.js +2 -0
- package/dist/mutation/contract.js.map +1 -0
- package/dist/mutation/define.d.ts +9 -0
- package/dist/mutation/define.d.ts.map +1 -0
- package/dist/mutation/define.js +24 -0
- package/dist/mutation/define.js.map +1 -0
- package/dist/mutation/errors.d.ts +3 -0
- package/dist/mutation/errors.d.ts.map +1 -0
- package/dist/mutation/errors.js +16 -0
- package/dist/mutation/errors.js.map +1 -0
- package/dist/mutation/execute.d.ts +11 -0
- package/dist/mutation/execute.d.ts.map +1 -0
- package/dist/mutation/execute.js +24 -0
- package/dist/mutation/execute.js.map +1 -0
- package/dist/mutation/index.d.ts +8 -0
- package/dist/mutation/index.d.ts.map +1 -0
- package/dist/mutation/index.js +5 -0
- package/dist/mutation/index.js.map +1 -0
- package/dist/mutation/rich.d.ts +4 -0
- package/dist/mutation/rich.d.ts.map +1 -0
- package/dist/mutation/rich.js +147 -0
- package/dist/mutation/rich.js.map +1 -0
- package/dist/query/composite/contract.d.ts +37 -0
- package/dist/query/composite/contract.d.ts.map +1 -0
- package/dist/query/composite/contract.js +2 -0
- package/dist/query/composite/contract.js.map +1 -0
- package/dist/query/composite/errors.d.ts +8 -0
- package/dist/query/composite/errors.d.ts.map +1 -0
- package/dist/query/composite/errors.js +9 -0
- package/dist/query/composite/errors.js.map +1 -0
- package/dist/query/composite/index.d.ts +6 -0
- package/dist/query/composite/index.d.ts.map +1 -0
- package/dist/query/composite/index.js +3 -0
- package/dist/query/composite/index.js.map +1 -0
- package/dist/query/composite/plan.d.ts +38 -0
- package/dist/query/composite/plan.d.ts.map +1 -0
- package/dist/query/composite/plan.js +225 -0
- package/dist/query/composite/plan.js.map +1 -0
- package/dist/query/contract.d.ts +58 -0
- package/dist/query/contract.d.ts.map +1 -0
- package/dist/query/contract.js +2 -0
- package/dist/query/contract.js.map +1 -0
- package/dist/query/define.d.ts +3 -0
- package/dist/query/define.d.ts.map +1 -0
- package/dist/query/define.js +90 -0
- package/dist/query/define.js.map +1 -0
- package/dist/query/definition.d.ts +29 -0
- package/dist/query/definition.d.ts.map +1 -0
- package/dist/query/definition.js +2 -0
- package/dist/query/definition.js.map +1 -0
- package/dist/query/errors.d.ts +9 -0
- package/dist/query/errors.d.ts.map +1 -0
- package/dist/query/errors.js +15 -0
- package/dist/query/errors.js.map +1 -0
- package/dist/query/execute.d.ts +20 -0
- package/dist/query/execute.d.ts.map +1 -0
- package/dist/query/execute.js +97 -0
- package/dist/query/execute.js.map +1 -0
- package/dist/query/index.d.ts +15 -0
- package/dist/query/index.d.ts.map +1 -0
- package/dist/query/index.js +8 -0
- package/dist/query/index.js.map +1 -0
- package/dist/query/node.d.ts +109 -0
- package/dist/query/node.d.ts.map +1 -0
- package/dist/query/node.js +156 -0
- package/dist/query/node.js.map +1 -0
- package/dist/query/result/contract.d.ts +23 -0
- package/dist/query/result/contract.d.ts.map +1 -0
- package/dist/query/result/contract.js +2 -0
- package/dist/query/result/contract.js.map +1 -0
- package/dist/query/result/index.d.ts +3 -0
- package/dist/query/result/index.d.ts.map +1 -0
- package/dist/query/result/index.js +2 -0
- package/dist/query/result/index.js.map +1 -0
- package/dist/query/result/projection.d.ts +3 -0
- package/dist/query/result/projection.d.ts.map +1 -0
- package/dist/query/result/projection.js +100 -0
- package/dist/query/result/projection.js.map +1 -0
- package/dist/query/selection.d.ts +4 -0
- package/dist/query/selection.d.ts.map +1 -0
- package/dist/query/selection.js +25 -0
- package/dist/query/selection.js.map +1 -0
- package/dist/react/compile.d.ts +9 -0
- package/dist/react/compile.d.ts.map +1 -0
- package/dist/react/compile.js +64 -0
- package/dist/react/compile.js.map +1 -0
- package/dist/react/define.d.ts +8 -0
- package/dist/react/define.d.ts.map +1 -0
- package/dist/react/define.js +89 -0
- package/dist/react/define.js.map +1 -0
- package/dist/react/definition.d.ts +69 -0
- package/dist/react/definition.d.ts.map +1 -0
- package/dist/react/definition.js +2 -0
- package/dist/react/definition.js.map +1 -0
- package/dist/react/index.d.ts +4 -0
- package/dist/react/index.d.ts.map +1 -0
- package/dist/react/index.js +3 -0
- package/dist/react/index.js.map +1 -0
- package/dist/result/index.d.ts +3 -0
- package/dist/result/index.d.ts.map +1 -0
- package/dist/result/index.js +2 -0
- package/dist/result/index.js.map +1 -0
- package/dist/result/result.d.ts +10 -0
- package/dist/result/result.d.ts.map +1 -0
- package/dist/result/result.js +7 -0
- package/dist/result/result.js.map +1 -0
- package/dist/schema/index.d.ts +3 -0
- package/dist/schema/index.d.ts.map +1 -0
- package/dist/schema/index.js +3 -0
- package/dist/schema/index.js.map +1 -0
- package/dist/schema/kernel/index.d.ts +3 -0
- package/dist/schema/kernel/index.d.ts.map +1 -0
- package/dist/schema/kernel/index.js +3 -0
- package/dist/schema/kernel/index.js.map +1 -0
- package/dist/schema/v1/index.d.ts +3 -0
- package/dist/schema/v1/index.d.ts.map +1 -0
- package/dist/schema/v1/index.js +3 -0
- package/dist/schema/v1/index.js.map +1 -0
- package/dist/server/application.d.ts +35 -0
- package/dist/server/application.d.ts.map +1 -0
- package/dist/server/application.js +124 -0
- package/dist/server/application.js.map +1 -0
- package/dist/server/index.d.ts +4 -13
- package/dist/server/index.d.ts.map +1 -1
- package/dist/server/index.js +2 -8
- package/dist/server/index.js.map +1 -1
- package/dist/server/node/index.d.ts +3 -0
- package/dist/server/node/index.d.ts.map +1 -0
- package/dist/server/node/index.js +2 -0
- package/dist/server/node/index.js.map +1 -0
- package/dist/server/node/server.d.ts +14 -0
- package/dist/server/node/server.d.ts.map +1 -0
- package/dist/server/node/server.js +71 -0
- package/dist/server/node/server.js.map +1 -0
- package/dist/server/remote.d.ts +51 -0
- package/dist/server/remote.d.ts.map +1 -0
- package/dist/server/remote.js +631 -0
- package/dist/server/remote.js.map +1 -0
- package/dist/server/source.d.ts +13 -0
- package/dist/server/source.d.ts.map +1 -0
- package/dist/server/source.js +38 -0
- package/dist/server/source.js.map +1 -0
- package/dist/state/index.d.ts +4 -0
- package/dist/state/index.d.ts.map +1 -0
- package/dist/state/index.js +2 -0
- package/dist/state/index.js.map +1 -0
- package/dist/state/machine.d.ts +28 -0
- package/dist/state/machine.d.ts.map +1 -0
- package/dist/state/machine.js +32 -0
- package/dist/state/machine.js.map +1 -0
- package/dist/state/relation.d.ts +28 -0
- package/dist/state/relation.d.ts.map +1 -0
- package/dist/state/relation.js +48 -0
- package/dist/state/relation.js.map +1 -0
- package/dist/value/index.d.ts +3 -0
- package/dist/value/index.d.ts.map +1 -0
- package/dist/value/index.js +3 -0
- package/dist/value/index.js.map +1 -0
- package/dist/view/admission.d.ts +6 -0
- package/dist/view/admission.d.ts.map +1 -0
- package/dist/view/admission.js +43 -0
- package/dist/view/admission.js.map +1 -0
- package/dist/view/compile.d.ts +15 -0
- package/dist/view/compile.d.ts.map +1 -0
- package/dist/view/compile.js +189 -0
- package/dist/view/compile.js.map +1 -0
- package/dist/view/define.d.ts +20 -0
- package/dist/view/define.d.ts.map +1 -0
- package/dist/view/define.js +236 -0
- package/dist/view/define.js.map +1 -0
- package/dist/view/definition.d.ts +96 -0
- package/dist/view/definition.d.ts.map +1 -0
- package/dist/view/definition.js +2 -0
- package/dist/view/definition.js.map +1 -0
- package/dist/view/index.d.ts +4 -0
- package/dist/view/index.d.ts.map +1 -0
- package/dist/view/index.js +3 -0
- package/dist/view/index.js.map +1 -0
- package/dist/workflow/binding.d.ts +43 -0
- package/dist/workflow/binding.d.ts.map +1 -0
- package/dist/workflow/binding.js +32 -0
- package/dist/workflow/binding.js.map +1 -0
- package/dist/workflow/contract.d.ts +56 -0
- package/dist/workflow/contract.d.ts.map +1 -0
- package/dist/workflow/contract.js +2 -0
- package/dist/workflow/contract.js.map +1 -0
- package/dist/workflow/define.d.ts +4 -0
- package/dist/workflow/define.d.ts.map +1 -0
- package/dist/workflow/define.js +57 -0
- package/dist/workflow/define.js.map +1 -0
- package/dist/workflow/index.d.ts +7 -0
- package/dist/workflow/index.d.ts.map +1 -0
- package/dist/workflow/index.js +4 -0
- package/dist/workflow/index.js.map +1 -0
- package/dist/workflow/runner.d.ts +4 -0
- package/dist/workflow/runner.d.ts.map +1 -0
- package/dist/workflow/runner.js +24 -0
- package/dist/workflow/runner.js.map +1 -0
- package/dist/workflow/step/index.d.ts +3 -0
- package/dist/workflow/step/index.d.ts.map +1 -0
- package/dist/workflow/step/index.js +2 -0
- package/dist/workflow/step/index.js.map +1 -0
- package/dist/workflow/step/inline.d.ts +6 -0
- package/dist/workflow/step/inline.d.ts.map +1 -0
- package/dist/workflow/step/inline.js +44 -0
- package/dist/workflow/step/inline.js.map +1 -0
- package/dist/workflow/step/step.d.ts +5 -0
- package/dist/workflow/step/step.d.ts.map +1 -0
- package/dist/workflow/step/step.js +2 -0
- package/dist/workflow/step/step.js.map +1 -0
- package/package.json +124 -24
- package/dist/auth/authenticate.d.ts +0 -24
- package/dist/auth/authenticate.d.ts.map +0 -1
- package/dist/auth/authenticate.js +0 -29
- package/dist/auth/authenticate.js.map +0 -1
- package/dist/auth/check.d.ts +0 -38
- package/dist/auth/check.d.ts.map +0 -1
- package/dist/auth/check.js +0 -50
- package/dist/auth/check.js.map +0 -1
- package/dist/auth/compose.d.ts +0 -41
- package/dist/auth/compose.d.ts.map +0 -1
- package/dist/auth/compose.js +0 -45
- package/dist/auth/compose.js.map +0 -1
- package/dist/auth/errors.d.ts +0 -16
- package/dist/auth/errors.d.ts.map +0 -1
- package/dist/auth/errors.js +0 -26
- package/dist/auth/errors.js.map +0 -1
- package/dist/auth/function-context.d.ts +0 -28
- package/dist/auth/function-context.d.ts.map +0 -1
- package/dist/auth/function-context.js +0 -47
- package/dist/auth/function-context.js.map +0 -1
- package/dist/auth/identity.d.ts +0 -18
- package/dist/auth/identity.d.ts.map +0 -1
- package/dist/auth/identity.js +0 -2
- package/dist/auth/identity.js.map +0 -1
- package/dist/auth/issuer-mint.d.ts +0 -53
- package/dist/auth/issuer-mint.d.ts.map +0 -1
- package/dist/auth/issuer-mint.js +0 -35
- package/dist/auth/issuer-mint.js.map +0 -1
- package/dist/auth/kernel-client.d.ts +0 -37
- package/dist/auth/kernel-client.d.ts.map +0 -1
- package/dist/auth/kernel-client.js +0 -111
- package/dist/auth/kernel-client.js.map +0 -1
- package/dist/auth/resolve.d.ts +0 -19
- package/dist/auth/resolve.d.ts.map +0 -1
- package/dist/auth/resolve.js +0 -43
- package/dist/auth/resolve.js.map +0 -1
- package/dist/auth/sign.d.ts +0 -15
- package/dist/auth/sign.d.ts.map +0 -1
- package/dist/auth/sign.js +0 -24
- package/dist/auth/sign.js.map +0 -1
- package/dist/auth/verify.d.ts +0 -28
- package/dist/auth/verify.d.ts.map +0 -1
- package/dist/auth/verify.js +0 -151
- package/dist/auth/verify.js.map +0 -1
- package/dist/cli/spec.d.ts +0 -19
- package/dist/cli/spec.d.ts.map +0 -1
- package/dist/cli/spec.js +0 -33
- package/dist/cli/spec.js.map +0 -1
- package/dist/config/adapter.d.ts +0 -148
- package/dist/config/adapter.d.ts.map +0 -1
- package/dist/config/adapter.js +0 -40
- package/dist/config/adapter.js.map +0 -1
- package/dist/config/define-domain.d.ts +0 -177
- package/dist/config/define-domain.d.ts.map +0 -1
- package/dist/config/define-domain.js +0 -145
- package/dist/config/define-domain.js.map +0 -1
- package/dist/config/deploy.d.ts +0 -28
- package/dist/config/deploy.d.ts.map +0 -1
- package/dist/config/deploy.js +0 -24
- package/dist/config/deploy.js.map +0 -1
- package/dist/config/index.d.ts +0 -21
- package/dist/config/index.d.ts.map +0 -1
- package/dist/config/index.js +0 -18
- package/dist/config/index.js.map +0 -1
- package/dist/define/index.d.ts +0 -5
- package/dist/define/index.d.ts.map +0 -1
- package/dist/define/index.js +0 -3
- package/dist/define/index.js.map +0 -1
- package/dist/define/remote-function.d.ts +0 -120
- package/dist/define/remote-function.d.ts.map +0 -1
- package/dist/define/remote-function.js +0 -26
- package/dist/define/remote-function.js.map +0 -1
- package/dist/define/view.d.ts +0 -104
- package/dist/define/view.d.ts.map +0 -1
- package/dist/define/view.js +0 -30
- package/dist/define/view.js.map +0 -1
- package/dist/deploy/check.d.ts +0 -30
- package/dist/deploy/check.d.ts.map +0 -1
- package/dist/deploy/check.js +0 -82
- package/dist/deploy/check.js.map +0 -1
- package/dist/deploy/index.d.ts +0 -3
- package/dist/deploy/index.d.ts.map +0 -1
- package/dist/deploy/index.js +0 -3
- package/dist/deploy/index.js.map +0 -1
- package/dist/deploy/meta.d.ts +0 -29
- package/dist/deploy/meta.d.ts.map +0 -1
- package/dist/deploy/meta.js +0 -45
- package/dist/deploy/meta.js.map +0 -1
- package/dist/dispatch/authorize.d.ts +0 -14
- package/dist/dispatch/authorize.d.ts.map +0 -1
- package/dist/dispatch/authorize.js +0 -24
- package/dist/dispatch/authorize.js.map +0 -1
- package/dist/dispatch/dispatcher.d.ts +0 -59
- package/dist/dispatch/dispatcher.d.ts.map +0 -1
- package/dist/dispatch/dispatcher.js +0 -237
- package/dist/dispatch/dispatcher.js.map +0 -1
- package/dist/dispatch/errors.d.ts +0 -47
- package/dist/dispatch/errors.d.ts.map +0 -1
- package/dist/dispatch/errors.js +0 -76
- package/dist/dispatch/errors.js.map +0 -1
- package/dist/dispatch/execute.d.ts +0 -44
- package/dist/dispatch/execute.d.ts.map +0 -1
- package/dist/dispatch/execute.js +0 -29
- package/dist/dispatch/execute.js.map +0 -1
- package/dist/dispatch/identity.d.ts +0 -75
- package/dist/dispatch/identity.d.ts.map +0 -1
- package/dist/dispatch/identity.js +0 -101
- package/dist/dispatch/identity.js.map +0 -1
- package/dist/dispatch/index.d.ts +0 -7
- package/dist/dispatch/index.d.ts.map +0 -1
- package/dist/dispatch/index.js +0 -7
- package/dist/dispatch/index.js.map +0 -1
- package/dist/dispatch/resolve.d.ts +0 -27
- package/dist/dispatch/resolve.d.ts.map +0 -1
- package/dist/dispatch/resolve.js +0 -65
- package/dist/dispatch/resolve.js.map +0 -1
- package/dist/dispatch/self.d.ts +0 -51
- package/dist/dispatch/self.d.ts.map +0 -1
- package/dist/dispatch/self.js +0 -116
- package/dist/dispatch/self.js.map +0 -1
- package/dist/dispatch/validate.d.ts +0 -35
- package/dist/dispatch/validate.d.ts.map +0 -1
- package/dist/dispatch/validate.js +0 -27
- package/dist/dispatch/validate.js.map +0 -1
- package/dist/domain/binding.d.ts +0 -18
- package/dist/domain/binding.d.ts.map +0 -1
- package/dist/domain/binding.js +0 -29
- package/dist/domain/binding.js.map +0 -1
- package/dist/domain/build-spec.d.ts +0 -37
- package/dist/domain/build-spec.d.ts.map +0 -1
- package/dist/domain/build-spec.js +0 -114
- package/dist/domain/build-spec.js.map +0 -1
- package/dist/domain/contract.d.ts +0 -17
- package/dist/domain/contract.d.ts.map +0 -1
- package/dist/domain/contract.js +0 -26
- package/dist/domain/contract.js.map +0 -1
- package/dist/domain/extend-functions.d.ts +0 -48
- package/dist/domain/extend-functions.d.ts.map +0 -1
- package/dist/domain/extend-functions.js +0 -85
- package/dist/domain/extend-functions.js.map +0 -1
- package/dist/domain/extend-views.d.ts +0 -45
- package/dist/domain/extend-views.d.ts.map +0 -1
- package/dist/domain/extend-views.js +0 -116
- package/dist/domain/extend-views.js.map +0 -1
- package/dist/linter/analyze.d.ts +0 -6
- package/dist/linter/analyze.d.ts.map +0 -1
- package/dist/linter/analyze.js +0 -12
- package/dist/linter/analyze.js.map +0 -1
- package/dist/linter/diagnostic.d.ts +0 -32
- package/dist/linter/diagnostic.d.ts.map +0 -1
- package/dist/linter/diagnostic.js +0 -35
- package/dist/linter/diagnostic.js.map +0 -1
- package/dist/linter/oxlint/config.d.ts +0 -14
- package/dist/linter/oxlint/config.d.ts.map +0 -1
- package/dist/linter/oxlint/config.js +0 -18
- package/dist/linter/oxlint/config.js.map +0 -1
- package/dist/linter/oxlint/plugin.d.ts +0 -13
- package/dist/linter/oxlint/plugin.d.ts.map +0 -1
- package/dist/linter/oxlint/plugin.js +0 -14
- package/dist/linter/oxlint/plugin.js.map +0 -1
- package/dist/linter/preflight.d.ts +0 -2
- package/dist/linter/preflight.d.ts.map +0 -1
- package/dist/linter/preflight.js +0 -162
- package/dist/linter/preflight.js.map +0 -1
- package/dist/linter/project.d.ts +0 -18
- package/dist/linter/project.d.ts.map +0 -1
- package/dist/linter/project.js +0 -150
- package/dist/linter/project.js.map +0 -1
- package/dist/linter/report.d.ts +0 -4
- package/dist/linter/report.d.ts.map +0 -1
- package/dist/linter/report.js +0 -22
- package/dist/linter/report.js.map +0 -1
- package/dist/linter/rules/catalog.d.ts +0 -56
- package/dist/linter/rules/catalog.d.ts.map +0 -1
- package/dist/linter/rules/catalog.js +0 -53
- package/dist/linter/rules/catalog.js.map +0 -1
- package/dist/linter/rules/core-has-no-async.d.ts +0 -3
- package/dist/linter/rules/core-has-no-async.d.ts.map +0 -1
- package/dist/linter/rules/core-has-no-async.js +0 -43
- package/dist/linter/rules/core-has-no-async.js.map +0 -1
- package/dist/linter/rules/core-is-pure.d.ts +0 -3
- package/dist/linter/rules/core-is-pure.d.ts.map +0 -1
- package/dist/linter/rules/core-is-pure.js +0 -74
- package/dist/linter/rules/core-is-pure.js.map +0 -1
- package/dist/linter/rules/no-nested-steps.d.ts +0 -3
- package/dist/linter/rules/no-nested-steps.d.ts.map +0 -1
- package/dist/linter/rules/no-nested-steps.js +0 -32
- package/dist/linter/rules/no-nested-steps.js.map +0 -1
- package/dist/linter/rules/no-read-inside-mutate.d.ts +0 -3
- package/dist/linter/rules/no-read-inside-mutate.d.ts.map +0 -1
- package/dist/linter/rules/no-read-inside-mutate.js +0 -64
- package/dist/linter/rules/no-read-inside-mutate.js.map +0 -1
- package/dist/linter/rules/one-remote-definition-per-file.d.ts +0 -3
- package/dist/linter/rules/one-remote-definition-per-file.d.ts.map +0 -1
- package/dist/linter/rules/one-remote-definition-per-file.js +0 -23
- package/dist/linter/rules/one-remote-definition-per-file.js.map +0 -1
- package/dist/linter/rules/oxlint-ast.d.ts +0 -30
- package/dist/linter/rules/oxlint-ast.d.ts.map +0 -1
- package/dist/linter/rules/oxlint-ast.js +0 -104
- package/dist/linter/rules/oxlint-ast.js.map +0 -1
- package/dist/linter/rules/oxlint-rule.d.ts +0 -45
- package/dist/linter/rules/oxlint-rule.d.ts.map +0 -1
- package/dist/linter/rules/oxlint-rule.js +0 -2
- package/dist/linter/rules/oxlint-rule.js.map +0 -1
- package/dist/linter/rules/project-rule.d.ts +0 -10
- package/dist/linter/rules/project-rule.d.ts.map +0 -1
- package/dist/linter/rules/project-rule.js +0 -24
- package/dist/linter/rules/project-rule.js.map +0 -1
- package/dist/linter/rules/thin-schema-composition-root.d.ts +0 -3
- package/dist/linter/rules/thin-schema-composition-root.d.ts.map +0 -1
- package/dist/linter/rules/thin-schema-composition-root.js +0 -23
- package/dist/linter/rules/thin-schema-composition-root.js.map +0 -1
- package/dist/linter/source.d.ts +0 -24
- package/dist/linter/source.d.ts.map +0 -1
- package/dist/linter/source.js +0 -279
- package/dist/linter/source.js.map +0 -1
- package/dist/linter/suppression.d.ts +0 -3
- package/dist/linter/suppression.d.ts.map +0 -1
- package/dist/linter/suppression.js +0 -11
- package/dist/linter/suppression.js.map +0 -1
- package/dist/method/class.d.ts +0 -71
- package/dist/method/class.d.ts.map +0 -1
- package/dist/method/class.js +0 -26
- package/dist/method/class.js.map +0 -1
- package/dist/method/context.d.ts +0 -99
- package/dist/method/context.d.ts.map +0 -1
- package/dist/method/context.js +0 -11
- package/dist/method/context.js.map +0 -1
- package/dist/method/index.d.ts +0 -6
- package/dist/method/index.d.ts.map +0 -1
- package/dist/method/index.js +0 -3
- package/dist/method/index.js.map +0 -1
- package/dist/method/single.d.ts +0 -81
- package/dist/method/single.d.ts.map +0 -1
- package/dist/method/single.js +0 -8
- package/dist/method/single.js.map +0 -1
- package/dist/server/auxiliary-routes.d.ts +0 -48
- package/dist/server/auxiliary-routes.d.ts.map +0 -1
- package/dist/server/auxiliary-routes.js +0 -322
- package/dist/server/auxiliary-routes.js.map +0 -1
- package/dist/server/config.d.ts +0 -83
- package/dist/server/config.d.ts.map +0 -1
- package/dist/server/config.js +0 -8
- package/dist/server/config.js.map +0 -1
- package/dist/server/create.d.ts +0 -8
- package/dist/server/create.d.ts.map +0 -1
- package/dist/server/create.js +0 -171
- package/dist/server/create.js.map +0 -1
- package/dist/server/domain-entry.d.ts +0 -77
- package/dist/server/domain-entry.d.ts.map +0 -1
- package/dist/server/domain-entry.js +0 -60
- package/dist/server/domain-entry.js.map +0 -1
- package/dist/server/handle.d.ts +0 -35
- package/dist/server/handle.d.ts.map +0 -1
- package/dist/server/handle.js +0 -9
- package/dist/server/handle.js.map +0 -1
- package/dist/server/jwks.d.ts +0 -11
- package/dist/server/jwks.d.ts.map +0 -1
- package/dist/server/jwks.js +0 -15
- package/dist/server/jwks.js.map +0 -1
- package/dist/server/require-env.d.ts +0 -15
- package/dist/server/require-env.d.ts.map +0 -1
- package/dist/server/require-env.js +0 -21
- package/dist/server/require-env.js.map +0 -1
- package/dist/server/service-entry.d.ts +0 -32
- package/dist/server/service-entry.d.ts.map +0 -1
- package/dist/server/service-entry.js +0 -150
- package/dist/server/service-entry.js.map +0 -1
- package/dist/server/serving-url.d.ts +0 -14
- package/dist/server/serving-url.d.ts.map +0 -1
- package/dist/server/serving-url.js +0 -28
- package/dist/server/serving-url.js.map +0 -1
- package/dist/server/start.d.ts +0 -11
- package/dist/server/start.d.ts.map +0 -1
- package/dist/server/start.js +0 -34
- package/dist/server/start.js.map +0 -1
- package/dist/server/worker-entry.d.ts +0 -157
- package/dist/server/worker-entry.d.ts.map +0 -1
- package/dist/server/worker-entry.js +0 -201
- package/dist/server/worker-entry.js.map +0 -1
- package/dist/service/functions.d.ts +0 -148
- package/dist/service/functions.d.ts.map +0 -1
- package/dist/service/functions.js +0 -115
- package/dist/service/functions.js.map +0 -1
- package/dist/service/index.d.ts +0 -3
- package/dist/service/index.d.ts.map +0 -1
- package/dist/service/index.js +0 -2
- package/dist/service/index.js.map +0 -1
- package/dist/step/index.d.ts +0 -5
- package/dist/step/index.d.ts.map +0 -1
- package/dist/step/index.js +0 -3
- package/dist/step/index.js.map +0 -1
- package/dist/step/inline.d.ts +0 -8
- package/dist/step/inline.d.ts.map +0 -1
- package/dist/step/inline.js +0 -22
- package/dist/step/inline.js.map +0 -1
- package/dist/step/step.d.ts +0 -28
- package/dist/step/step.d.ts.map +0 -1
- package/dist/step/step.js +0 -53
- package/dist/step/step.js.map +0 -1
- package/src/auth/authenticate.ts +0 -51
- package/src/auth/check.ts +0 -69
- package/src/auth/compose.ts +0 -56
- package/src/auth/errors.ts +0 -32
- package/src/auth/function-context.ts +0 -108
- package/src/auth/identity.ts +0 -17
- package/src/auth/index.ts +0 -19
- package/src/auth/issuer-mint.ts +0 -76
- package/src/auth/kernel-client.ts +0 -153
- package/src/auth/resolve.ts +0 -63
- package/src/auth/sign.ts +0 -36
- package/src/auth/verify.ts +0 -199
- package/src/cli/bin.ts +0 -15
- package/src/cli/dotenv.ts +0 -65
- package/src/cli/index.ts +0 -15
- package/src/cli/log.ts +0 -18
- package/src/cli/publish.ts +0 -341
- package/src/cli/run.ts +0 -749
- package/src/cli/spec.ts +0 -44
- package/src/config/adapter.ts +0 -177
- package/src/config/define-domain.ts +0 -354
- package/src/config/deploy.ts +0 -35
- package/src/config/index.ts +0 -31
- package/src/define/index.ts +0 -10
- package/src/define/remote-function.ts +0 -184
- package/src/define/view.ts +0 -112
- package/src/deploy/check.ts +0 -124
- package/src/deploy/index.ts +0 -2
- package/src/deploy/meta.ts +0 -50
- package/src/dispatch/authorize.ts +0 -29
- package/src/dispatch/dispatcher.ts +0 -321
- package/src/dispatch/errors.ts +0 -94
- package/src/dispatch/execute.ts +0 -67
- package/src/dispatch/identity.ts +0 -143
- package/src/dispatch/index.ts +0 -16
- package/src/dispatch/resolve.ts +0 -78
- package/src/dispatch/self.ts +0 -198
- package/src/dispatch/validate.ts +0 -41
- package/src/domain/binding.ts +0 -37
- package/src/domain/build-spec.ts +0 -156
- package/src/domain/contract.ts +0 -41
- package/src/domain/define.ts +0 -161
- package/src/domain/extend-functions.ts +0 -110
- package/src/domain/extend-views.ts +0 -151
- package/src/domain/index.ts +0 -4
- package/src/index.ts +0 -165
- package/src/linter/analyze.ts +0 -17
- package/src/linter/diagnostic.ts +0 -68
- package/src/linter/docs/DIAGNOSTICS.md +0 -47
- package/src/linter/docs/JUDGMENT.md +0 -81
- package/src/linter/docs/PRINCIPLES.md +0 -97
- package/src/linter/docs/README.md +0 -38
- package/src/linter/docs/RULE-AUTHORING.md +0 -144
- package/src/linter/docs/RULES.md +0 -153
- package/src/linter/index.ts +0 -14
- package/src/linter/lint.ts +0 -32
- package/src/linter/oxlint/astrale-ox.d.ts +0 -5
- package/src/linter/oxlint/config.ts +0 -19
- package/src/linter/oxlint/plugin.js +0 -16
- package/src/linter/oxlint/run.ts +0 -162
- package/src/linter/preflight.ts +0 -181
- package/src/linter/project.ts +0 -190
- package/src/linter/report.ts +0 -25
- package/src/linter/rules/catalog.ts +0 -67
- package/src/linter/rules/core-has-no-async.js +0 -43
- package/src/linter/rules/core-is-pure.ts +0 -103
- package/src/linter/rules/no-nested-steps.js +0 -37
- package/src/linter/rules/no-read-inside-mutate.js +0 -72
- package/src/linter/rules/one-remote-definition-per-file.ts +0 -29
- package/src/linter/rules/oxlint-ast.js +0 -110
- package/src/linter/rules/oxlint-rule.ts +0 -35
- package/src/linter/rules/project-rule.ts +0 -37
- package/src/linter/rules/thin-schema-composition-root.ts +0 -26
- package/src/linter/source.ts +0 -323
- package/src/linter/suppression.ts +0 -11
- package/src/method/class.ts +0 -163
- package/src/method/context.ts +0 -135
- package/src/method/index.ts +0 -19
- package/src/method/single.ts +0 -166
- package/src/server/auxiliary-routes.ts +0 -456
- package/src/server/config.ts +0 -85
- package/src/server/create.ts +0 -210
- package/src/server/domain-entry.ts +0 -125
- package/src/server/handle.ts +0 -37
- package/src/server/index.ts +0 -19
- package/src/server/jwks.ts +0 -18
- package/src/server/require-env.ts +0 -19
- package/src/server/service-entry.ts +0 -209
- package/src/server/serving-url.ts +0 -28
- package/src/server/start.ts +0 -42
- package/src/server/worker-entry.ts +0 -286
- package/src/service/functions.ts +0 -164
- package/src/service/index.ts +0 -18
- package/src/step/index.ts +0 -4
- package/src/step/inline.ts +0 -38
- package/src/step/step.ts +0 -95
package/src/auth/verify.ts
DELETED
|
@@ -1,199 +0,0 @@
|
|
|
1
|
-
/**
|
|
2
|
-
* Inbound credential verification.
|
|
3
|
-
*
|
|
4
|
-
* Uses kernel-core's credential verification infrastructure
|
|
5
|
-
* (CredentialMethodResolver, MethodRegistry) instead of manual JWT handling.
|
|
6
|
-
* Not tied to JWT — supports any credential method kernel-core provides.
|
|
7
|
-
*/
|
|
8
|
-
|
|
9
|
-
import type {
|
|
10
|
-
Attestation,
|
|
11
|
-
CredentialInput,
|
|
12
|
-
Delegation,
|
|
13
|
-
IssuerId,
|
|
14
|
-
VerifiedCredential,
|
|
15
|
-
} from '@astrale-os/kernel-core'
|
|
16
|
-
|
|
17
|
-
import {
|
|
18
|
-
CredentialMethodResolver,
|
|
19
|
-
MethodRegistry,
|
|
20
|
-
SignatureVerificationError,
|
|
21
|
-
SigningKeyNotFoundError,
|
|
22
|
-
verifyAudience,
|
|
23
|
-
verifyCredential,
|
|
24
|
-
} from '@astrale-os/kernel-core'
|
|
25
|
-
import { createLocalJWKSet, createRemoteJWKSet, type JWK } from 'jose'
|
|
26
|
-
|
|
27
|
-
import type { RemoteIdentityConfig } from './identity.js'
|
|
28
|
-
|
|
29
|
-
import { derivePublicJwk } from '../server/jwks.js'
|
|
30
|
-
import { canonicalizeServingUrl } from '../server/serving-url.js'
|
|
31
|
-
|
|
32
|
-
export type VerifiedInbound = {
|
|
33
|
-
/** The full verified credential (iss, sub, aud, claims) */
|
|
34
|
-
verified: VerifiedCredential
|
|
35
|
-
/** Issuer URL (from credential's iss claim) */
|
|
36
|
-
issuer: string
|
|
37
|
-
/** Attestation — proves caller can invoke this function */
|
|
38
|
-
attestation: Attestation
|
|
39
|
-
/** Delegation — scoped caller permissions as kernel-signed credential */
|
|
40
|
-
delegation: Delegation
|
|
41
|
-
}
|
|
42
|
-
|
|
43
|
-
const methodResolver = new CredentialMethodResolver(new MethodRegistry())
|
|
44
|
-
|
|
45
|
-
// JWKS resolvers cached per JWKS URL (module-level, like the pools/selfIds
|
|
46
|
-
// Maps in kernel-client.ts). jose handles freshness WITHIN a resolver: 10min
|
|
47
|
-
// max-age, 30s fetch cooldown, and auto-refetch on kid-miss when not cooling
|
|
48
|
-
// down. The one gap — issuer restarts with new keys while the cooldown pins
|
|
49
|
-
// the old set (the incident that got a prior indefinite cache removed) — is
|
|
50
|
-
// covered by evict-and-retry-once in `verifyInboundCredential`, so indefinite
|
|
51
|
-
// Map residency is safe and the per-call JWKS fetch is gone.
|
|
52
|
-
const remoteResolvers = new Map<string, ReturnType<typeof createRemoteJWKSet>>()
|
|
53
|
-
|
|
54
|
-
// Self-issued credentials verify against the worker's own in-memory key;
|
|
55
|
-
// cache the local JWKS per canonical self-issuer (one key per worker) so the
|
|
56
|
-
// public-JWK derivation isn't redone on every request.
|
|
57
|
-
const localResolvers = new Map<string, ReturnType<typeof createLocalJWKSet>>()
|
|
58
|
-
|
|
59
|
-
/** Clear cached JWKS resolvers. Used in tests when keys rotate between fixtures. */
|
|
60
|
-
export function clearJwksCache(): void {
|
|
61
|
-
remoteResolvers.clear()
|
|
62
|
-
localResolvers.clear()
|
|
63
|
-
}
|
|
64
|
-
|
|
65
|
-
/**
|
|
66
|
-
* M-28 fix: a bare-slug iss (`mails.localhost`) makes
|
|
67
|
-
* `new URL('mails.localhost/.well-known/jwks.json')` throw "Invalid URL
|
|
68
|
-
* string". The dispatcher's identity map normalizes the iss it signs with,
|
|
69
|
-
* but inbound creds from older clients may still carry the slug form. Coerce
|
|
70
|
-
* to a URL with a default `https://` scheme (matches kernel.astrale.ai
|
|
71
|
-
* canonical form). If the actual receiver is on http://localhost the
|
|
72
|
-
* receiver-side resolver still works because both endpoints are on localhost
|
|
73
|
-
* — but for prod targets requiring TLS this is the right default.
|
|
74
|
-
*/
|
|
75
|
-
function jwksUrlFor(issuer: string): string {
|
|
76
|
-
const normalized = /^https?:\/\//.test(issuer) ? issuer : `https://${issuer}`
|
|
77
|
-
return `${normalized}/.well-known/jwks.json`
|
|
78
|
-
}
|
|
79
|
-
|
|
80
|
-
function getRemoteResolver(jwksUrl: string): ReturnType<typeof createRemoteJWKSet> {
|
|
81
|
-
let resolver = remoteResolvers.get(jwksUrl)
|
|
82
|
-
if (!resolver) {
|
|
83
|
-
resolver = createRemoteJWKSet(new URL(jwksUrl))
|
|
84
|
-
remoteResolvers.set(jwksUrl, resolver)
|
|
85
|
-
}
|
|
86
|
-
return resolver
|
|
87
|
-
}
|
|
88
|
-
|
|
89
|
-
function getLocalResolver(
|
|
90
|
-
selfIssuer: string,
|
|
91
|
-
privateKey: RemoteIdentityConfig['privateKey'],
|
|
92
|
-
): ReturnType<typeof createLocalJWKSet> {
|
|
93
|
-
let resolver = localResolvers.get(selfIssuer)
|
|
94
|
-
if (!resolver) {
|
|
95
|
-
resolver = createLocalJWKSet({ keys: [derivePublicJwk(privateKey) as JWK] })
|
|
96
|
-
localResolvers.set(selfIssuer, resolver)
|
|
97
|
-
}
|
|
98
|
-
return resolver
|
|
99
|
-
}
|
|
100
|
-
|
|
101
|
-
/**
|
|
102
|
-
* Build the key resolver for one verifying server. Captures `config` so it can
|
|
103
|
-
* short-circuit the server's OWN issuer (`config.issuer`): a self-issued
|
|
104
|
-
* credential is verified against the in-memory public key, never fetched — a
|
|
105
|
-
* Worker can't fetch its own hostname, and it already holds the key. Every other
|
|
106
|
-
* issuer is resolved via the cached per-URL JWKS resolvers above; every JWKS
|
|
107
|
-
* URL touched is recorded in `resolvedJwksUrls` so the caller can evict
|
|
108
|
-
* exactly those resolvers if verification fails on an unknown signing key.
|
|
109
|
-
*/
|
|
110
|
-
function makeResolveKeys(config: RemoteIdentityConfig, resolvedJwksUrls: Set<string>) {
|
|
111
|
-
// The worker's own canonical iss. STRICT: `config.issuer` is the serving URL
|
|
112
|
-
// by contract (both producers — buildIdentityMap / buildAuxIdentityMap — feed
|
|
113
|
-
// it `canonicalizeServingUrl(config.url)`), so a value that doesn't parse is
|
|
114
|
-
// a construction-time config error. Swallowing it would silently disable
|
|
115
|
-
// self-verification and route self-issued credentials to a JWKS fetch on the
|
|
116
|
-
// worker's own hostname — which Cloudflare forbids — turning a config bug
|
|
117
|
-
// into an opaque per-call failure.
|
|
118
|
-
const selfIssuer = canonicalizeServingUrl(config.issuer)
|
|
119
|
-
|
|
120
|
-
return async (issuer: IssuerId, _method: string, _kid?: string) => {
|
|
121
|
-
const url = issuer as string
|
|
122
|
-
|
|
123
|
-
// Self-issued credential (iss == this worker's own serving URL): resolve
|
|
124
|
-
// from the in-memory public key. Never fetch self — Cloudflare forbids a
|
|
125
|
-
// Worker fetching its own hostname, and the published JWKS is this key.
|
|
126
|
-
if (selfIssuer !== undefined) {
|
|
127
|
-
let canonical: string | undefined
|
|
128
|
-
try {
|
|
129
|
-
canonical = canonicalizeServingUrl(url)
|
|
130
|
-
} catch {
|
|
131
|
-
canonical = undefined
|
|
132
|
-
}
|
|
133
|
-
if (canonical === selfIssuer) {
|
|
134
|
-
return getLocalResolver(selfIssuer, config.privateKey)
|
|
135
|
-
}
|
|
136
|
-
}
|
|
137
|
-
|
|
138
|
-
const jwksUrl = jwksUrlFor(url)
|
|
139
|
-
resolvedJwksUrls.add(jwksUrl)
|
|
140
|
-
return getRemoteResolver(jwksUrl)
|
|
141
|
-
}
|
|
142
|
-
}
|
|
143
|
-
|
|
144
|
-
/**
|
|
145
|
-
* Verify an inbound delegation credential using kernel-core's verification.
|
|
146
|
-
*
|
|
147
|
-
* @throws AuthenticationError subclasses from kernel-core on verification failure
|
|
148
|
-
*/
|
|
149
|
-
export async function verifyInboundCredential(
|
|
150
|
-
credential: CredentialInput,
|
|
151
|
-
config: RemoteIdentityConfig,
|
|
152
|
-
): Promise<VerifiedInbound> {
|
|
153
|
-
// Verify using kernel-core's credential verification pipeline
|
|
154
|
-
const resolvedJwksUrls = new Set<string>()
|
|
155
|
-
const deps = { methodResolver, resolveKeys: makeResolveKeys(config, resolvedJwksUrls) }
|
|
156
|
-
let verified: VerifiedCredential
|
|
157
|
-
try {
|
|
158
|
-
verified = await verifyCredential(deps, credential)
|
|
159
|
-
} catch (error) {
|
|
160
|
-
// A cached resolver can hold a stale key set after the issuer rotates:
|
|
161
|
-
// - new kid → jose kid-misses but its 30s fetch cooldown blocks the
|
|
162
|
-
// refetch (SigningKeyNotFoundError) — the incident that got a prior
|
|
163
|
-
// indefinite cache removed;
|
|
164
|
-
// - SAME kid, new key material (kernel kids derive from the subject, so
|
|
165
|
-
// a re-keyed issuer reuses its kid) → the signature check fails
|
|
166
|
-
// (SignatureVerificationError).
|
|
167
|
-
// Both: evict the resolver(s) this verification touched and retry ONCE
|
|
168
|
-
// with fresh ones. Forged-token spam thus costs at most one JWKS fetch
|
|
169
|
-
// per bad credential — equal to the uncached per-call baseline, never
|
|
170
|
-
// worse. An empty set means self-issued — refetching can't help, rethrow.
|
|
171
|
-
const staleKeySuspect =
|
|
172
|
-
error instanceof SigningKeyNotFoundError || error instanceof SignatureVerificationError
|
|
173
|
-
if (!staleKeySuspect || resolvedJwksUrls.size === 0) throw error
|
|
174
|
-
for (const url of resolvedJwksUrls) remoteResolvers.delete(url)
|
|
175
|
-
verified = await verifyCredential(deps, credential)
|
|
176
|
-
}
|
|
177
|
-
|
|
178
|
-
// Validate audience matches this function's issuer (its serving URL).
|
|
179
|
-
// kernel-core's verifyAudience compares canonically.
|
|
180
|
-
verifyAudience(verified, (config.audience ?? config.issuer) as IssuerId)
|
|
181
|
-
|
|
182
|
-
// Extract attestation and delegation from claims
|
|
183
|
-
const attestation = verified.claims.attestation as Attestation | undefined
|
|
184
|
-
if (!attestation?.expr) {
|
|
185
|
-
throw new Error('Credential missing attestation')
|
|
186
|
-
}
|
|
187
|
-
|
|
188
|
-
const delegation = verified.claims.delegation as Delegation | undefined
|
|
189
|
-
if (!delegation?.credential) {
|
|
190
|
-
throw new Error('Credential missing delegation')
|
|
191
|
-
}
|
|
192
|
-
|
|
193
|
-
return {
|
|
194
|
-
verified,
|
|
195
|
-
issuer: verified.iss as string,
|
|
196
|
-
attestation,
|
|
197
|
-
delegation,
|
|
198
|
-
}
|
|
199
|
-
}
|
package/src/cli/bin.ts
DELETED
|
@@ -1,15 +0,0 @@
|
|
|
1
|
-
#!/usr/bin/env bun
|
|
2
|
-
/**
|
|
3
|
-
* `astrale-domain` bin entry. Runs under bun (native TS) so it can import the
|
|
4
|
-
* project's `astrale.config.ts` directly — matching the `astrale` CLI.
|
|
5
|
-
*/
|
|
6
|
-
|
|
7
|
-
import { run } from './run.js'
|
|
8
|
-
|
|
9
|
-
run(process.argv.slice(2))
|
|
10
|
-
.then((code) => process.exit(code))
|
|
11
|
-
.catch((err: unknown) => {
|
|
12
|
-
process.stderr.write(`\x1b[31m✗\x1b[0m ${(err as Error).message ?? String(err)}\n`)
|
|
13
|
-
if (process.env.DEBUG) process.stderr.write(`${(err as Error).stack ?? ''}\n`)
|
|
14
|
-
process.exit(1)
|
|
15
|
-
})
|
package/src/cli/dotenv.ts
DELETED
|
@@ -1,65 +0,0 @@
|
|
|
1
|
-
/**
|
|
2
|
-
* Minimal dotenv parser — the secrets-file boundary.
|
|
3
|
-
*
|
|
4
|
-
* `secrets: '.env.<env>'` in an adapter's params points a gitignored file whose
|
|
5
|
-
* entire contents are secrets. `loadDotenvFile` reads it into a flat
|
|
6
|
-
* `Record<string,string>` the CLI hands the adapter (injected into the local
|
|
7
|
-
* runtime in dev, pushed to a secret store in prod). No `process.env` mutation,
|
|
8
|
-
* no interpolation magic beyond `${VAR}` against earlier keys in the same file.
|
|
9
|
-
*/
|
|
10
|
-
|
|
11
|
-
import { readFileSync } from 'node:fs'
|
|
12
|
-
|
|
13
|
-
export function parseDotenv(contents: string): Record<string, string> {
|
|
14
|
-
const out: Record<string, string> = {}
|
|
15
|
-
for (const raw of contents.split('\n')) {
|
|
16
|
-
const line = raw.trim()
|
|
17
|
-
if (!line || line.startsWith('#')) continue
|
|
18
|
-
const match = /^(?:export\s+)?([A-Za-z_]\w*)\s*=\s*(.*)$/.exec(line)
|
|
19
|
-
if (!match) continue
|
|
20
|
-
const [, key, rawValue] = match
|
|
21
|
-
let value = rawValue.trim()
|
|
22
|
-
// Single quotes mean a LITERAL value (standard dotenv): no `${VAR}`
|
|
23
|
-
// interpolation, so a secret that legitimately contains a literal `${...}`
|
|
24
|
-
// (e.g. a password) survives intact instead of being silently blanked.
|
|
25
|
-
const singleQuoted = value.length >= 2 && value.startsWith("'") && value.endsWith("'")
|
|
26
|
-
if ((value.length >= 2 && value.startsWith('"') && value.endsWith('"')) || singleQuoted) {
|
|
27
|
-
value = value.slice(1, -1)
|
|
28
|
-
}
|
|
29
|
-
out[key] = singleQuoted
|
|
30
|
-
? value
|
|
31
|
-
: value.replace(/\$\{(\w+)\}/g, (_, name: string) => out[name] ?? '')
|
|
32
|
-
}
|
|
33
|
-
return out
|
|
34
|
-
}
|
|
35
|
-
|
|
36
|
-
/** Read + parse a dotenv file. Returns `{}` if the file is absent (CI-safe). */
|
|
37
|
-
export function loadDotenvFile(path: string): Record<string, string> {
|
|
38
|
-
let contents: string
|
|
39
|
-
try {
|
|
40
|
-
contents = readFileSync(path, 'utf-8')
|
|
41
|
-
} catch {
|
|
42
|
-
return {}
|
|
43
|
-
}
|
|
44
|
-
return parseDotenv(contents)
|
|
45
|
-
}
|
|
46
|
-
|
|
47
|
-
/**
|
|
48
|
-
* Read + parse a dotenv file the preset explicitly DECLARED (`secrets:`).
|
|
49
|
-
* Declared-but-absent is a wiring error (the gitignored file was never created
|
|
50
|
-
* on this machine), so it throws instead of loading `{}` — silently forwarding
|
|
51
|
-
* nothing surfaces much later as an empty credential at the provider. A file
|
|
52
|
-
* that exists but holds no keys is legitimate (a domain with no secrets yet).
|
|
53
|
-
*/
|
|
54
|
-
export function loadDeclaredSecrets(path: string, declaration: string): Record<string, string> {
|
|
55
|
-
let contents: string
|
|
56
|
-
try {
|
|
57
|
-
contents = readFileSync(path, 'utf-8')
|
|
58
|
-
} catch {
|
|
59
|
-
throw new Error(
|
|
60
|
-
`Secrets file '${declaration}' is declared in the preset but missing at ${path}. ` +
|
|
61
|
-
`Create it (it may be empty) or remove 'secrets:' from the preset.`,
|
|
62
|
-
)
|
|
63
|
-
}
|
|
64
|
-
return parseDotenv(contents)
|
|
65
|
-
}
|
package/src/cli/index.ts
DELETED
|
@@ -1,15 +0,0 @@
|
|
|
1
|
-
/**
|
|
2
|
-
* `@astrale-os/sdk/cli` — the `astrale-domain` CLI (dev | build | deploy) and
|
|
3
|
-
* the dotenv secrets-file boundary, folded in from the former
|
|
4
|
-
* `@astrale-os/devkit` package.
|
|
5
|
-
*
|
|
6
|
-
* Node-only: the CLI imports `node:fs`/`node:module`/`node:url` and runs under
|
|
7
|
-
* Bun (it imports the project's `astrale.config.ts` directly). This subpath is
|
|
8
|
-
* deliberately NOT re-exported from the package barrel — pulling it into the
|
|
9
|
-
* isomorphic `.` entry would poison browser/worker bundlers that traverse every
|
|
10
|
-
* re-export (the same rule that keeps `./server` and `./deploy` off the barrel).
|
|
11
|
-
* The bin lives at `./bin`.
|
|
12
|
-
*/
|
|
13
|
-
|
|
14
|
-
export { run, parseArgs } from './run.js'
|
|
15
|
-
export { parseDotenv, loadDotenvFile, loadDeclaredSecrets } from './dotenv.js'
|
package/src/cli/log.ts
DELETED
|
@@ -1,18 +0,0 @@
|
|
|
1
|
-
/** CLI output helpers + ANSI colours, shared by run.ts and publish.ts. */
|
|
2
|
-
|
|
3
|
-
export const GREEN = '\x1b[32m'
|
|
4
|
-
export const DIM = '\x1b[2m'
|
|
5
|
-
export const BOLD = '\x1b[1m'
|
|
6
|
-
export const YELLOW = '\x1b[33m'
|
|
7
|
-
export const RED = '\x1b[31m'
|
|
8
|
-
export const RESET = '\x1b[0m'
|
|
9
|
-
|
|
10
|
-
export function info(msg: string): void {
|
|
11
|
-
process.stdout.write(`${DIM}›${RESET} ${msg}\n`)
|
|
12
|
-
}
|
|
13
|
-
export function warn(msg: string): void {
|
|
14
|
-
process.stderr.write(`${YELLOW}!${RESET} ${msg}\n`)
|
|
15
|
-
}
|
|
16
|
-
export function error(msg: string): void {
|
|
17
|
-
process.stderr.write(`${RED}✗${RESET} ${msg}\n`)
|
|
18
|
-
}
|
package/src/cli/publish.ts
DELETED
|
@@ -1,341 +0,0 @@
|
|
|
1
|
-
/**
|
|
2
|
-
* All `publish` logic — the schema-publish step, the admin-catalog register, and
|
|
3
|
-
* the release orchestration tying them together. `run.ts` only parses args and
|
|
4
|
-
* dispatches here.
|
|
5
|
-
*
|
|
6
|
-
* A release has two halves that must stay in sync: the CONTRACT (the `./schema`
|
|
7
|
-
* package on npm, so other domains can `imports`/`implements`/`extends` it) and
|
|
8
|
-
* the DEPLOYMENT (the worker URL in the admin catalog). They run npm-FIRST — npm
|
|
9
|
-
* publish is irreversible, so the catalog is registered only on schema-publish
|
|
10
|
-
* success, never pointing at an unpublished contract.
|
|
11
|
-
*
|
|
12
|
-
* Why `pnpm pack` then `npm publish <tarball>` (not a plain `npm publish`): a
|
|
13
|
-
* schema package ships only `dist` and uses `publishConfig` to repoint
|
|
14
|
-
* main/exports from source `.ts` to `dist` — a field override only PNPM applies,
|
|
15
|
-
* so npm would otherwise publish an entry pointing at unshipped source.
|
|
16
|
-
*/
|
|
17
|
-
import { spawn } from 'node:child_process'
|
|
18
|
-
import { existsSync, mkdtempSync, readdirSync, readFileSync, rmSync } from 'node:fs'
|
|
19
|
-
import { tmpdir } from 'node:os'
|
|
20
|
-
import { join } from 'node:path'
|
|
21
|
-
|
|
22
|
-
import { BOLD, DIM, error, GREEN, info, RESET, warn } from './log.js'
|
|
23
|
-
|
|
24
|
-
type SchemaPkg = {
|
|
25
|
-
name?: string
|
|
26
|
-
version?: string
|
|
27
|
-
private?: boolean
|
|
28
|
-
files?: readonly string[]
|
|
29
|
-
peerDependencies?: Record<string, string>
|
|
30
|
-
dependencies?: Record<string, string>
|
|
31
|
-
optionalDependencies?: Record<string, string>
|
|
32
|
-
publishConfig?: { access?: string }
|
|
33
|
-
}
|
|
34
|
-
|
|
35
|
-
// ── release orchestration (schema THEN catalog) ──────────────────────────────
|
|
36
|
-
|
|
37
|
-
/** `publish` (no deploy): publish the schema, then register the deployed URL. */
|
|
38
|
-
export async function runRelease(opts: {
|
|
39
|
-
projectDir: string
|
|
40
|
-
origin: string
|
|
41
|
-
name?: string
|
|
42
|
-
publicUrl?: string
|
|
43
|
-
skipSchema: boolean
|
|
44
|
-
dryRun: boolean
|
|
45
|
-
otp?: string
|
|
46
|
-
installByDefault?: boolean
|
|
47
|
-
}): Promise<number> {
|
|
48
|
-
const schemaCode = await publishSchemaBeforeCatalog(opts.projectDir, opts)
|
|
49
|
-
if (schemaCode !== 0) return schemaCode
|
|
50
|
-
|
|
51
|
-
const url = opts.publicUrl ?? `https://${opts.origin}`
|
|
52
|
-
if (opts.dryRun) {
|
|
53
|
-
info(`dry-run: would register ${opts.origin} → ${url} in the admin catalog (not registered).`)
|
|
54
|
-
return 0
|
|
55
|
-
}
|
|
56
|
-
info(`registering ${opts.origin} → ${url} in the admin catalog (no deploy)`)
|
|
57
|
-
return await registerCatalog(opts.projectDir, opts, url)
|
|
58
|
-
}
|
|
59
|
-
|
|
60
|
-
/** The `deploy --publish` tail: publish the schema, then register the just-deployed URL. */
|
|
61
|
-
export async function runReleaseAfterDeploy(opts: {
|
|
62
|
-
projectDir: string
|
|
63
|
-
origin: string
|
|
64
|
-
deployedUrl: string
|
|
65
|
-
name?: string
|
|
66
|
-
skipSchema: boolean
|
|
67
|
-
otp?: string
|
|
68
|
-
installByDefault?: boolean
|
|
69
|
-
}): Promise<number> {
|
|
70
|
-
const schemaCode = await publishSchemaBeforeCatalog(opts.projectDir, { ...opts, dryRun: false })
|
|
71
|
-
if (schemaCode !== 0) return schemaCode
|
|
72
|
-
return await registerCatalog(opts.projectDir, opts, opts.deployedUrl)
|
|
73
|
-
}
|
|
74
|
-
|
|
75
|
-
/**
|
|
76
|
-
* The schema half of a release. npm publish is irreversible, so it runs FIRST:
|
|
77
|
-
* returns 0 to proceed (published | skipped | no `./schema` package), non-zero to
|
|
78
|
-
* ABORT before the catalog touch — so the catalog never points at an unpublished
|
|
79
|
-
* contract.
|
|
80
|
-
*/
|
|
81
|
-
async function publishSchemaBeforeCatalog(
|
|
82
|
-
projectDir: string,
|
|
83
|
-
opts: { skipSchema: boolean; dryRun: boolean; otp?: string },
|
|
84
|
-
): Promise<number> {
|
|
85
|
-
if (opts.skipSchema) return 0
|
|
86
|
-
if (!existsSync(join(projectDir, 'schema', 'package.json'))) {
|
|
87
|
-
info('no ./schema package — registering the catalog only.')
|
|
88
|
-
return 0
|
|
89
|
-
}
|
|
90
|
-
const code = await publishSchema({
|
|
91
|
-
projectDir,
|
|
92
|
-
schemaDir: 'schema',
|
|
93
|
-
dryRun: opts.dryRun,
|
|
94
|
-
...(opts.otp !== undefined ? { otp: opts.otp } : {}),
|
|
95
|
-
})
|
|
96
|
-
if (code !== 0)
|
|
97
|
-
error(
|
|
98
|
-
'schema publish failed — NOT registering the catalog (a catalog entry must never point ' +
|
|
99
|
-
'at an unpublished contract). Fix the schema package and re-run, or pass --skip-schema.',
|
|
100
|
-
)
|
|
101
|
-
return code
|
|
102
|
-
}
|
|
103
|
-
|
|
104
|
-
/**
|
|
105
|
-
* Register a domain's public URL in the admin catalog by shelling out to the
|
|
106
|
-
* operator CLI (`astrale domain publish`). Deliberately a subprocess: all
|
|
107
|
-
* credential/admin-target resolution lives in `@astrale-os/cli`, kept out of
|
|
108
|
-
* this build tool. A missing `astrale` is reported with the exact line to run by
|
|
109
|
-
* hand. The catalog `name` is a short slug (the origin's first label by default),
|
|
110
|
-
* distinct from the FQDN origin and from any `@scope/…` npm package name.
|
|
111
|
-
*/
|
|
112
|
-
async function registerCatalog(
|
|
113
|
-
projectDir: string,
|
|
114
|
-
opts: { origin: string; name?: string; installByDefault?: boolean },
|
|
115
|
-
url: string,
|
|
116
|
-
): Promise<number> {
|
|
117
|
-
const { description } = readPackageMeta(projectDir)
|
|
118
|
-
const name = opts.name ?? opts.origin.split('.')[0] ?? opts.origin
|
|
119
|
-
// `--public-url`, not `--url`: the operator CLI reserves `--url` for kernel targeting.
|
|
120
|
-
const cliArgs = [
|
|
121
|
-
'domain',
|
|
122
|
-
'publish',
|
|
123
|
-
'--origin',
|
|
124
|
-
opts.origin,
|
|
125
|
-
'--name',
|
|
126
|
-
name,
|
|
127
|
-
'--public-url',
|
|
128
|
-
url,
|
|
129
|
-
]
|
|
130
|
-
if (description) cliArgs.push('--description', description)
|
|
131
|
-
if (opts.installByDefault) cliArgs.push('--install-by-default')
|
|
132
|
-
|
|
133
|
-
info(`publishing to the admin catalog → astrale ${cliArgs.join(' ')}`)
|
|
134
|
-
return await new Promise<number>((resolve) => {
|
|
135
|
-
const child = spawn('astrale', cliArgs, { stdio: 'inherit' })
|
|
136
|
-
child.on('error', (err) => {
|
|
137
|
-
if ((err as NodeJS.ErrnoException).code === 'ENOENT')
|
|
138
|
-
error(
|
|
139
|
-
`\`astrale\` CLI not found on PATH. Register it by hand:\n astrale ${cliArgs.join(' ')}`,
|
|
140
|
-
)
|
|
141
|
-
else error(`failed to run \`astrale domain publish\`: ${err.message}`)
|
|
142
|
-
resolve(1)
|
|
143
|
-
})
|
|
144
|
-
child.on('exit', (code) => resolve(code ?? 1))
|
|
145
|
-
})
|
|
146
|
-
}
|
|
147
|
-
|
|
148
|
-
function readPackageMeta(projectDir: string): { name?: string; description?: string } {
|
|
149
|
-
try {
|
|
150
|
-
return JSON.parse(readFileSync(join(projectDir, 'package.json'), 'utf8')) as {
|
|
151
|
-
name?: string
|
|
152
|
-
description?: string
|
|
153
|
-
}
|
|
154
|
-
} catch {
|
|
155
|
-
return {}
|
|
156
|
-
}
|
|
157
|
-
}
|
|
158
|
-
|
|
159
|
-
// ── schema publish ───────────────────────────────────────────────────────────
|
|
160
|
-
|
|
161
|
-
/**
|
|
162
|
-
* Build a domain's thin schema package and publish it to npm. Operates on the
|
|
163
|
-
* schema PACKAGE (its own package.json), not astrale.config.ts, so it needs no
|
|
164
|
-
* adapter — `publish --schema` runs it config-free.
|
|
165
|
-
*/
|
|
166
|
-
export async function publishSchema(args: {
|
|
167
|
-
projectDir: string
|
|
168
|
-
/** Schema-package dir. Default: `<projectDir>/schema`, else `<projectDir>`. */
|
|
169
|
-
schemaDir?: string
|
|
170
|
-
dryRun: boolean
|
|
171
|
-
/** 2FA one-time password forwarded to `npm publish`. */
|
|
172
|
-
otp?: string
|
|
173
|
-
}): Promise<number> {
|
|
174
|
-
const dir = resolveSchemaDir(args.projectDir, args.schemaDir)
|
|
175
|
-
if (!dir) {
|
|
176
|
-
error(
|
|
177
|
-
`No schema package found (no package.json at ./schema or the current dir). A schema\n` +
|
|
178
|
-
` package declares peerDependencies (@astrale-os/kernel-core + kernel-dsl + zod) and a\n` +
|
|
179
|
-
` publishConfig that repoints main/exports to ./dist — see domains/shell/schema.`,
|
|
180
|
-
)
|
|
181
|
-
return 1
|
|
182
|
-
}
|
|
183
|
-
|
|
184
|
-
const pkgPath = join(dir, 'package.json')
|
|
185
|
-
let pkg: SchemaPkg
|
|
186
|
-
try {
|
|
187
|
-
pkg = JSON.parse(readFileSync(pkgPath, 'utf8')) as SchemaPkg
|
|
188
|
-
} catch (err) {
|
|
189
|
-
error(`Could not read ${pkgPath}: ${(err as Error).message}`)
|
|
190
|
-
return 1
|
|
191
|
-
}
|
|
192
|
-
|
|
193
|
-
const problems = preflight(pkg)
|
|
194
|
-
if (problems.length > 0) {
|
|
195
|
-
error(`Schema package is not ready to publish (${pkgPath}):`)
|
|
196
|
-
for (const p of problems) process.stderr.write(` • ${p}\n`)
|
|
197
|
-
return 1
|
|
198
|
-
}
|
|
199
|
-
const name = pkg.name as string
|
|
200
|
-
const version = pkg.version as string
|
|
201
|
-
|
|
202
|
-
// Idempotent in BOTH modes: a dry-run must skip too, since `npm publish
|
|
203
|
-
// --dry-run` still validates against the registry and errors on an existing version.
|
|
204
|
-
if (await isOnRegistry(name, version)) {
|
|
205
|
-
info(
|
|
206
|
-
`${BOLD}${name}@${version}${RESET} is already published — ` +
|
|
207
|
-
(args.dryRun ? `a real run would skip it.` : `bump the version to ship again.`),
|
|
208
|
-
)
|
|
209
|
-
return 0
|
|
210
|
-
}
|
|
211
|
-
|
|
212
|
-
const dest = mkdtempSync(join(tmpdir(), 'astrale-schema-pack-'))
|
|
213
|
-
try {
|
|
214
|
-
info(`packing ${BOLD}${name}@${version}${RESET} from ${rel(args.projectDir, dir)}`)
|
|
215
|
-
if ((await runInherit('pnpm', ['pack', '--pack-destination', dest], dir)) !== 0) {
|
|
216
|
-
error(`pnpm pack failed — see the build output above.`)
|
|
217
|
-
return 1
|
|
218
|
-
}
|
|
219
|
-
const tarball = readdirSync(dest)
|
|
220
|
-
.filter((f) => f.endsWith('.tgz'))
|
|
221
|
-
.map((f) => join(dest, f))[0]
|
|
222
|
-
if (!tarball) {
|
|
223
|
-
error(`pnpm pack produced no .tgz in ${dest}.`)
|
|
224
|
-
return 1
|
|
225
|
-
}
|
|
226
|
-
|
|
227
|
-
// `--access` mirrors the manifest's baked publishConfig.access; npm's 2FA
|
|
228
|
-
// prompt passes through `stdio: 'inherit'` (or `--otp` for non-interactive).
|
|
229
|
-
const access = pkg.publishConfig?.access ?? 'public'
|
|
230
|
-
const publishArgs = [
|
|
231
|
-
'publish',
|
|
232
|
-
tarball,
|
|
233
|
-
'--access',
|
|
234
|
-
access,
|
|
235
|
-
...(args.dryRun ? ['--dry-run'] : []),
|
|
236
|
-
...(args.otp ? ['--otp', args.otp] : []),
|
|
237
|
-
]
|
|
238
|
-
info(
|
|
239
|
-
args.dryRun
|
|
240
|
-
? `dry-run: ${DIM}npm ${publishArgs.join(' ')}${RESET}`
|
|
241
|
-
: `publishing ${DIM}(a browser / OTP prompt may appear for 2FA)${RESET}`,
|
|
242
|
-
)
|
|
243
|
-
const code = await runInherit('npm', publishArgs)
|
|
244
|
-
if (code !== 0) {
|
|
245
|
-
error(
|
|
246
|
-
`npm publish exited ${code}. An auth error (E401/E404) usually means the session ` +
|
|
247
|
-
`expired — \`npm login\` and retry.`,
|
|
248
|
-
)
|
|
249
|
-
return code
|
|
250
|
-
}
|
|
251
|
-
if (args.dryRun) info(`dry-run complete — nothing was published.`)
|
|
252
|
-
else printPublished(name, version)
|
|
253
|
-
return 0
|
|
254
|
-
} finally {
|
|
255
|
-
try {
|
|
256
|
-
rmSync(dest, { recursive: true, force: true })
|
|
257
|
-
} catch {
|
|
258
|
-
warn(`(non-fatal) could not clean the temp pack dir ${dest}`)
|
|
259
|
-
}
|
|
260
|
-
}
|
|
261
|
-
}
|
|
262
|
-
|
|
263
|
-
/** Locate the schema package: an explicit path, else `<projectDir>/schema`, else `<projectDir>`. */
|
|
264
|
-
function resolveSchemaDir(projectDir: string, explicit?: string): string | undefined {
|
|
265
|
-
const candidates = explicit
|
|
266
|
-
? [join(projectDir, explicit)]
|
|
267
|
-
: [join(projectDir, 'schema'), projectDir]
|
|
268
|
-
return candidates.find((c) => existsSync(join(c, 'package.json')))
|
|
269
|
-
}
|
|
270
|
-
|
|
271
|
-
/** Static guards against the classic schema-publish footguns, before any network call. */
|
|
272
|
-
function preflight(pkg: SchemaPkg): string[] {
|
|
273
|
-
const problems: string[] = []
|
|
274
|
-
if (!pkg.name) problems.push('package.json has no "name".')
|
|
275
|
-
if (!pkg.version) problems.push('package.json has no "version".')
|
|
276
|
-
else if (!/^\d+\.\d+\.\d+(?:[-+][0-9A-Za-z.-]+)?$/.test(pkg.version))
|
|
277
|
-
problems.push(`"version" ("${pkg.version}") must be an exact semver, not a range.`)
|
|
278
|
-
if (pkg.private) problems.push('"private": true — remove it to publish.')
|
|
279
|
-
// Peers, not deps: bundling kernel-core/dsl/zod gives the consumer a 2nd copy
|
|
280
|
-
// and breaks the def `__brand` identity at compile time.
|
|
281
|
-
if (!pkg.peerDependencies || Object.keys(pkg.peerDependencies).length === 0)
|
|
282
|
-
problems.push(
|
|
283
|
-
'no "peerDependencies" — peer-depend on @astrale-os/kernel-core (+ kernel-dsl, zod).',
|
|
284
|
-
)
|
|
285
|
-
if (!pkg.files?.includes('dist'))
|
|
286
|
-
problems.push('"files" must include "dist" (ship only the built output).')
|
|
287
|
-
if (!pkg.publishConfig)
|
|
288
|
-
problems.push('no "publishConfig" — main/types/exports won\'t repoint to ./dist at pack time.')
|
|
289
|
-
for (const field of ['dependencies', 'peerDependencies', 'optionalDependencies'] as const) {
|
|
290
|
-
for (const [dep, spec] of Object.entries(pkg[field] ?? {})) {
|
|
291
|
-
if (/^(link:|file:|workspace:)/.test(spec))
|
|
292
|
-
problems.push(
|
|
293
|
-
`${field}["${dep}"] is "${spec}" — npm can't publish that; use a semver range.`,
|
|
294
|
-
)
|
|
295
|
-
}
|
|
296
|
-
}
|
|
297
|
-
return problems
|
|
298
|
-
}
|
|
299
|
-
|
|
300
|
-
/** True if `<name>@<version>` already exists on the registry. */
|
|
301
|
-
async function isOnRegistry(name: string, version: string): Promise<boolean> {
|
|
302
|
-
return await new Promise<boolean>((resolve) => {
|
|
303
|
-
let out = ''
|
|
304
|
-
const child = spawn('npm', ['view', `${name}@${version}`, 'version'], {
|
|
305
|
-
stdio: ['ignore', 'pipe', 'ignore'],
|
|
306
|
-
})
|
|
307
|
-
child.stdout?.on('data', (d) => (out += String(d)))
|
|
308
|
-
child.on('error', () => resolve(false)) // npm missing / not-found / offline → let publish surface it
|
|
309
|
-
child.on('exit', () => resolve(out.trim().length > 0))
|
|
310
|
-
})
|
|
311
|
-
}
|
|
312
|
-
|
|
313
|
-
async function runInherit(cmd: string, cmdArgs: readonly string[], cwd?: string): Promise<number> {
|
|
314
|
-
return await new Promise<number>((resolve) => {
|
|
315
|
-
const child = spawn(cmd, cmdArgs as string[], { stdio: 'inherit', ...(cwd ? { cwd } : {}) })
|
|
316
|
-
child.on('error', (err) => {
|
|
317
|
-
const c = (err as NodeJS.ErrnoException).code
|
|
318
|
-
error(
|
|
319
|
-
c === 'ENOENT'
|
|
320
|
-
? `\`${cmd}\` not found on PATH.`
|
|
321
|
-
: `failed to run \`${cmd}\`: ${err.message}`,
|
|
322
|
-
)
|
|
323
|
-
resolve(1)
|
|
324
|
-
})
|
|
325
|
-
child.on('exit', (code) => resolve(code ?? 1))
|
|
326
|
-
})
|
|
327
|
-
}
|
|
328
|
-
|
|
329
|
-
function printPublished(name: string, version: string): void {
|
|
330
|
-
process.stdout.write(
|
|
331
|
-
`\n${GREEN}✓${RESET} published ${BOLD}${name}@${version}${RESET}\n` +
|
|
332
|
-
` ${DIM}consume it:${RESET} ${BOLD}import { schema as S } from '${name}'${RESET}` +
|
|
333
|
-
`${DIM} → imports: [S], implements: [S.interfaces.X]${RESET}\n` +
|
|
334
|
-
` ${DIM}and add ${BOLD}requires: ['<this-origin>']${RESET}${DIM} on the consumer ` +
|
|
335
|
-
`(producer installs first).${RESET}\n\n`,
|
|
336
|
-
)
|
|
337
|
-
}
|
|
338
|
-
|
|
339
|
-
function rel(from: string, to: string): string {
|
|
340
|
-
return to.startsWith(from) ? `.${to.slice(from.length) || '/'}` : to
|
|
341
|
-
}
|