@astrale-os/sdk 0.4.19 → 0.5.0-beta.2
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 +5 -3
- package/dist/auth/exchange.d.ts +11 -0
- package/dist/auth/exchange.d.ts.map +1 -0
- package/dist/auth/exchange.js +8 -0
- package/dist/auth/exchange.js.map +1 -0
- package/dist/auth/index.d.ts +4 -15
- package/dist/auth/index.d.ts.map +1 -1
- package/dist/auth/index.js +3 -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 +47 -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 +91 -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 +68 -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 +99 -65
- package/dist/domain/define.d.ts.map +1 -1
- package/dist/domain/define.js +78 -60
- 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 +13 -4
- package/dist/domain/index.d.ts.map +1 -1
- package/dist/domain/index.js +7 -3
- package/dist/domain/index.js.map +1 -1
- package/dist/domain/requirements.d.ts +26 -0
- package/dist/domain/requirements.d.ts.map +1 -0
- package/dist/domain/requirements.js +98 -0
- package/dist/domain/requirements.js.map +1 -0
- 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 +289 -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 +107 -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 -8
- 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 +6 -6
- package/dist/linter/oxlint/process.d.ts.map +1 -1
- package/dist/linter/oxlint/process.js +1 -1
- package/dist/linter/oxlint/process.js.map +1 -1
- package/dist/linter/oxlint/run.d.ts +5 -5
- package/dist/linter/oxlint/run.d.ts.map +1 -1
- package/dist/linter/oxlint/run.js +140 -20
- 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 +30 -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 +164 -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 +36 -0
- package/dist/server/application.d.ts.map +1 -0
- package/dist/server/application.js +126 -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 +56 -0
- package/dist/server/remote.d.ts.map +1 -0
- package/dist/server/remote.js +798 -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 +57 -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 +117 -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 -38
- package/dist/linter/diagnostic.d.ts.map +0 -1
- package/dist/linter/diagnostic.js +0 -37
- package/dist/linter/diagnostic.js.map +0 -1
- package/dist/linter/oxlint/config.d.ts +0 -15
- package/dist/linter/oxlint/config.d.ts.map +0 -1
- package/dist/linter/oxlint/config.js +0 -23
- package/dist/linter/oxlint/config.js.map +0 -1
- package/dist/linter/oxlint/ignore-patterns.d.ts +0 -9
- package/dist/linter/oxlint/ignore-patterns.d.ts.map +0 -1
- package/dist/linter/oxlint/ignore-patterns.js +0 -18
- package/dist/linter/oxlint/ignore-patterns.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 -769
- 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 -162
- 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 -85
- 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 -15
- package/src/linter/lint.ts +0 -34
- package/src/linter/oxlint/astrale-ox.d.ts +0 -5
- package/src/linter/oxlint/config.ts +0 -24
- package/src/linter/oxlint/ignore-patterns.ts +0 -17
- package/src/linter/oxlint/plugin.js +0 -16
- package/src/linter/oxlint/process.ts +0 -219
- package/src/linter/oxlint/run.ts +0 -175
- package/src/linter/preflight.ts +0 -182
- 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/linter/index.ts
DELETED
|
@@ -1,15 +0,0 @@
|
|
|
1
|
-
export { ruleCatalog, ruleId, ruleInfo } from './rules/catalog.js'
|
|
2
|
-
export type { ImplementedRuleSlug, RuleInfo, RuleOwner } from './rules/catalog.js'
|
|
3
|
-
export type {
|
|
4
|
-
DiagnosticLocation,
|
|
5
|
-
DiagnosticSeverity,
|
|
6
|
-
LintDiagnostic,
|
|
7
|
-
LintResult,
|
|
8
|
-
LinterToolErrorCode,
|
|
9
|
-
} from './diagnostic.js'
|
|
10
|
-
export { LinterToolError } from './diagnostic.js'
|
|
11
|
-
export { lintDomain } from './lint.js'
|
|
12
|
-
export type { LintDomainOptions } from './lint.js'
|
|
13
|
-
export { domainOxlintConfig } from './oxlint/config.js'
|
|
14
|
-
export { formatLintResult } from './report.js'
|
|
15
|
-
export type { LintReportFormat } from './report.js'
|
package/src/linter/lint.ts
DELETED
|
@@ -1,34 +0,0 @@
|
|
|
1
|
-
import { resolve } from 'node:path'
|
|
2
|
-
import { performance } from 'node:perf_hooks'
|
|
3
|
-
|
|
4
|
-
import { analyzeProject } from './analyze.js'
|
|
5
|
-
import { dedupeDiagnostics, type LintResult } from './diagnostic.js'
|
|
6
|
-
import { runOxlint } from './oxlint/run.js'
|
|
7
|
-
import { assertSingleTypeUniverse } from './preflight.js'
|
|
8
|
-
import { discoverProject } from './project.js'
|
|
9
|
-
|
|
10
|
-
export type LintDomainOptions = {
|
|
11
|
-
root?: string
|
|
12
|
-
fix?: boolean
|
|
13
|
-
preflight?: boolean
|
|
14
|
-
/** Cancels the external Oxlint process and rejects the lint operation. */
|
|
15
|
-
signal?: AbortSignal
|
|
16
|
-
}
|
|
17
|
-
|
|
18
|
-
export async function lintDomain(options: LintDomainOptions = {}): Promise<LintResult> {
|
|
19
|
-
const started = performance.now()
|
|
20
|
-
const root = resolve(options.root ?? process.cwd())
|
|
21
|
-
if (options.preflight !== false) await assertSingleTypeUniverse(root)
|
|
22
|
-
const [project, oxlint] = await Promise.all([
|
|
23
|
-
discoverProject(root),
|
|
24
|
-
runOxlint(root, options.fix ?? false, { signal: options.signal }),
|
|
25
|
-
])
|
|
26
|
-
const diagnostics = dedupeDiagnostics([...oxlint.diagnostics, ...analyzeProject(project)])
|
|
27
|
-
return {
|
|
28
|
-
root: project.root,
|
|
29
|
-
diagnostics,
|
|
30
|
-
files: Math.max(project.files.length, oxlint.files),
|
|
31
|
-
durationMs: Math.max(0, Math.round(performance.now() - started)),
|
|
32
|
-
exitCode: diagnostics.some((diagnostic) => diagnostic.severity === 'error') ? 1 : 0,
|
|
33
|
-
}
|
|
34
|
-
}
|
|
@@ -1,24 +0,0 @@
|
|
|
1
|
-
import base from '@astrale-os/ox/lint'
|
|
2
|
-
import { defineConfig } from 'oxlint'
|
|
3
|
-
|
|
4
|
-
export const domainOxlintConfig = defineConfig({
|
|
5
|
-
extends: [base],
|
|
6
|
-
// Oxlint resolves ignore patterns relative to the config object that declares
|
|
7
|
-
// them. Lift the shared preset's traversal boundary onto the project config;
|
|
8
|
-
// leaving it only inside `extends` roots it in the installed preset package
|
|
9
|
-
// and allows a project's dependency tree into discovery.
|
|
10
|
-
ignorePatterns: base.ignorePatterns,
|
|
11
|
-
jsPlugins: [
|
|
12
|
-
{
|
|
13
|
-
name: 'astrale',
|
|
14
|
-
specifier: '@astrale-os/sdk/linter/oxlint-plugin',
|
|
15
|
-
},
|
|
16
|
-
],
|
|
17
|
-
rules: {
|
|
18
|
-
'astrale/core-has-no-async': 'error',
|
|
19
|
-
'astrale/no-nested-steps': 'error',
|
|
20
|
-
'astrale/no-read-inside-mutate': 'error',
|
|
21
|
-
},
|
|
22
|
-
})
|
|
23
|
-
|
|
24
|
-
export default domainOxlintConfig
|
|
@@ -1,17 +0,0 @@
|
|
|
1
|
-
/**
|
|
2
|
-
* The domain linter's process-level project-discovery boundary.
|
|
3
|
-
*
|
|
4
|
-
* Oxlint roots config-file ignores at that config's directory. The SDK also
|
|
5
|
-
* uses an internal fallback config outside the target project, so invocation
|
|
6
|
-
* must enforce these patterns relative to its working directory as well.
|
|
7
|
-
*/
|
|
8
|
-
export const DOMAIN_OXLINT_IGNORE_PATTERNS = [
|
|
9
|
-
'**/dist/**',
|
|
10
|
-
'**/node_modules/**',
|
|
11
|
-
'**/coverage/**',
|
|
12
|
-
'**/*.js',
|
|
13
|
-
'**/*.mjs',
|
|
14
|
-
'**/*.cjs',
|
|
15
|
-
'**/*.gen.ts',
|
|
16
|
-
'**/*.gen.tsx',
|
|
17
|
-
] as const
|
|
@@ -1,16 +0,0 @@
|
|
|
1
|
-
// @ts-check
|
|
2
|
-
|
|
3
|
-
import { coreHasNoAsync } from '../rules/core-has-no-async.js'
|
|
4
|
-
import { noNestedSteps } from '../rules/no-nested-steps.js'
|
|
5
|
-
import { noReadInsideMutate } from '../rules/no-read-inside-mutate.js'
|
|
6
|
-
|
|
7
|
-
const astraleOxlintPlugin = {
|
|
8
|
-
meta: { name: 'astrale', version: '0.1.0' },
|
|
9
|
-
rules: {
|
|
10
|
-
'core-has-no-async': coreHasNoAsync,
|
|
11
|
-
'no-nested-steps': noNestedSteps,
|
|
12
|
-
'no-read-inside-mutate': noReadInsideMutate,
|
|
13
|
-
},
|
|
14
|
-
}
|
|
15
|
-
|
|
16
|
-
export default astraleOxlintPlugin
|
|
@@ -1,219 +0,0 @@
|
|
|
1
|
-
import { spawn } from 'node:child_process'
|
|
2
|
-
|
|
3
|
-
import { LinterToolError } from '../diagnostic.js'
|
|
4
|
-
|
|
5
|
-
const DEFAULT_TIMEOUT_MS = 60_000
|
|
6
|
-
const DEFAULT_OUTPUT_LIMIT_BYTES = 16 * 1024 * 1024
|
|
7
|
-
const DEFAULT_TERMINATION_GRACE_MS = 1_000
|
|
8
|
-
|
|
9
|
-
export type OxlintProcessOptions = {
|
|
10
|
-
signal?: AbortSignal
|
|
11
|
-
timeoutMs?: number
|
|
12
|
-
outputLimitBytes?: number
|
|
13
|
-
terminationGraceMs?: number
|
|
14
|
-
}
|
|
15
|
-
|
|
16
|
-
export type OxlintProcessResult = {
|
|
17
|
-
status: number | null
|
|
18
|
-
signal: NodeJS.Signals | null
|
|
19
|
-
stdout: string
|
|
20
|
-
stderr: string
|
|
21
|
-
}
|
|
22
|
-
|
|
23
|
-
type TerminationReason =
|
|
24
|
-
| { kind: 'cancelled'; cause: unknown }
|
|
25
|
-
| { kind: 'output-limit'; limitBytes: number }
|
|
26
|
-
| { kind: 'timeout'; timeoutMs: number }
|
|
27
|
-
|
|
28
|
-
/**
|
|
29
|
-
* Run Oxlint under the runtime it declares, independent of the SDK CLI's
|
|
30
|
-
* parent runtime. The published CLI intentionally runs under Bun, while
|
|
31
|
-
* Oxlint's executable is a Node program.
|
|
32
|
-
*/
|
|
33
|
-
export async function runOxlintProcess(
|
|
34
|
-
bin: string,
|
|
35
|
-
args: readonly string[],
|
|
36
|
-
cwd: string,
|
|
37
|
-
options: OxlintProcessOptions = {},
|
|
38
|
-
): Promise<OxlintProcessResult> {
|
|
39
|
-
const timeoutMs = positiveInteger(options.timeoutMs, DEFAULT_TIMEOUT_MS, 'timeoutMs')
|
|
40
|
-
const outputLimitBytes = positiveInteger(
|
|
41
|
-
options.outputLimitBytes,
|
|
42
|
-
DEFAULT_OUTPUT_LIMIT_BYTES,
|
|
43
|
-
'outputLimitBytes',
|
|
44
|
-
)
|
|
45
|
-
const terminationGraceMs = nonNegativeInteger(
|
|
46
|
-
options.terminationGraceMs,
|
|
47
|
-
DEFAULT_TERMINATION_GRACE_MS,
|
|
48
|
-
'terminationGraceMs',
|
|
49
|
-
)
|
|
50
|
-
|
|
51
|
-
if (options.signal?.aborted) throw cancelledError(options.signal.reason)
|
|
52
|
-
|
|
53
|
-
let child: ReturnType<typeof spawn>
|
|
54
|
-
try {
|
|
55
|
-
child = spawn('node', [bin, ...args], {
|
|
56
|
-
cwd,
|
|
57
|
-
env: process.env,
|
|
58
|
-
stdio: ['ignore', 'pipe', 'pipe'],
|
|
59
|
-
windowsHide: true,
|
|
60
|
-
})
|
|
61
|
-
} catch (cause) {
|
|
62
|
-
throw startError(bin, cause)
|
|
63
|
-
}
|
|
64
|
-
|
|
65
|
-
return await new Promise<OxlintProcessResult>((resolve, reject) => {
|
|
66
|
-
const stdout: Buffer[] = []
|
|
67
|
-
const stderr: Buffer[] = []
|
|
68
|
-
let capturedBytes = 0
|
|
69
|
-
let settled = false
|
|
70
|
-
let processError: unknown
|
|
71
|
-
let terminationReason: TerminationReason | undefined
|
|
72
|
-
let forceKillTimer: NodeJS.Timeout | undefined
|
|
73
|
-
|
|
74
|
-
const timeout = setTimeout(() => {
|
|
75
|
-
terminate({ kind: 'timeout', timeoutMs })
|
|
76
|
-
}, timeoutMs)
|
|
77
|
-
timeout.unref?.()
|
|
78
|
-
|
|
79
|
-
const onAbort = () => terminate({ kind: 'cancelled', cause: options.signal?.reason })
|
|
80
|
-
options.signal?.addEventListener('abort', onAbort, { once: true })
|
|
81
|
-
|
|
82
|
-
const onStdout = (chunk: Buffer | string) => capture(stdout, chunk)
|
|
83
|
-
const onStderr = (chunk: Buffer | string) => capture(stderr, chunk)
|
|
84
|
-
child.stdout?.on('data', onStdout)
|
|
85
|
-
child.stderr?.on('data', onStderr)
|
|
86
|
-
|
|
87
|
-
// `close` follows both normal exit and spawn errors. Record an error here
|
|
88
|
-
// but settle only after `close`, so the process handle and stdio are always
|
|
89
|
-
// reaped before the caller continues.
|
|
90
|
-
child.once('error', (cause) => {
|
|
91
|
-
processError = cause
|
|
92
|
-
clearTimeout(timeout)
|
|
93
|
-
})
|
|
94
|
-
child.once('close', (status, signal) => {
|
|
95
|
-
finish(() => {
|
|
96
|
-
if (terminationReason) {
|
|
97
|
-
reject(terminationError(terminationReason))
|
|
98
|
-
return
|
|
99
|
-
}
|
|
100
|
-
if (processError) {
|
|
101
|
-
reject(startError(bin, processError))
|
|
102
|
-
return
|
|
103
|
-
}
|
|
104
|
-
resolve({
|
|
105
|
-
status,
|
|
106
|
-
signal,
|
|
107
|
-
stdout: Buffer.concat(stdout).toString('utf8'),
|
|
108
|
-
stderr: Buffer.concat(stderr).toString('utf8'),
|
|
109
|
-
})
|
|
110
|
-
})
|
|
111
|
-
})
|
|
112
|
-
|
|
113
|
-
// Close the race between the pre-spawn check and listener registration.
|
|
114
|
-
if (options.signal?.aborted) onAbort()
|
|
115
|
-
|
|
116
|
-
function capture(target: Buffer[], chunk: Buffer | string): void {
|
|
117
|
-
if (terminationReason) return
|
|
118
|
-
const buffer = Buffer.isBuffer(chunk) ? chunk : Buffer.from(chunk)
|
|
119
|
-
const remaining = outputLimitBytes - capturedBytes
|
|
120
|
-
if (remaining > 0) {
|
|
121
|
-
const accepted = Math.min(remaining, buffer.byteLength)
|
|
122
|
-
target.push(buffer.subarray(0, accepted))
|
|
123
|
-
capturedBytes += accepted
|
|
124
|
-
}
|
|
125
|
-
if (buffer.byteLength > remaining) {
|
|
126
|
-
terminate({ kind: 'output-limit', limitBytes: outputLimitBytes })
|
|
127
|
-
}
|
|
128
|
-
}
|
|
129
|
-
|
|
130
|
-
function terminate(reason: TerminationReason): void {
|
|
131
|
-
if (settled || terminationReason) return
|
|
132
|
-
terminationReason = reason
|
|
133
|
-
try {
|
|
134
|
-
child.kill('SIGTERM')
|
|
135
|
-
} catch {
|
|
136
|
-
forceKill()
|
|
137
|
-
return
|
|
138
|
-
}
|
|
139
|
-
forceKillTimer = setTimeout(forceKill, terminationGraceMs)
|
|
140
|
-
forceKillTimer.unref?.()
|
|
141
|
-
}
|
|
142
|
-
|
|
143
|
-
function forceKill(): void {
|
|
144
|
-
if (settled || child.exitCode !== null || child.signalCode !== null) return
|
|
145
|
-
try {
|
|
146
|
-
child.kill('SIGKILL')
|
|
147
|
-
} catch {
|
|
148
|
-
// The close/error event remains the authoritative process outcome.
|
|
149
|
-
}
|
|
150
|
-
}
|
|
151
|
-
|
|
152
|
-
function finish(settle: () => void): void {
|
|
153
|
-
if (settled) return
|
|
154
|
-
settled = true
|
|
155
|
-
clearTimeout(timeout)
|
|
156
|
-
if (forceKillTimer) clearTimeout(forceKillTimer)
|
|
157
|
-
options.signal?.removeEventListener('abort', onAbort)
|
|
158
|
-
child.stdout?.off('data', onStdout)
|
|
159
|
-
child.stderr?.off('data', onStderr)
|
|
160
|
-
settle()
|
|
161
|
-
}
|
|
162
|
-
})
|
|
163
|
-
}
|
|
164
|
-
|
|
165
|
-
function startError(bin: string, cause: unknown): LinterToolError {
|
|
166
|
-
return new LinterToolError(`Could not start Oxlint with Node at ${bin}.`, {
|
|
167
|
-
code: 'OXLINT_START_FAILED',
|
|
168
|
-
cause,
|
|
169
|
-
})
|
|
170
|
-
}
|
|
171
|
-
|
|
172
|
-
function cancelledError(cause: unknown): LinterToolError {
|
|
173
|
-
return new LinterToolError('Oxlint was cancelled and its process was terminated.', {
|
|
174
|
-
code: 'OXLINT_CANCELLED',
|
|
175
|
-
cause,
|
|
176
|
-
})
|
|
177
|
-
}
|
|
178
|
-
|
|
179
|
-
function terminationError(reason: TerminationReason): LinterToolError {
|
|
180
|
-
switch (reason.kind) {
|
|
181
|
-
case 'cancelled':
|
|
182
|
-
return cancelledError(reason.cause)
|
|
183
|
-
case 'output-limit':
|
|
184
|
-
return new LinterToolError(
|
|
185
|
-
`Oxlint exceeded the ${formatBytes(reason.limitBytes)} output limit and was terminated.`,
|
|
186
|
-
{ code: 'OXLINT_OUTPUT_LIMIT' },
|
|
187
|
-
)
|
|
188
|
-
case 'timeout':
|
|
189
|
-
return new LinterToolError(
|
|
190
|
-
`Oxlint exceeded the ${formatDuration(reason.timeoutMs)} timeout and was terminated.`,
|
|
191
|
-
{ code: 'OXLINT_TIMEOUT' },
|
|
192
|
-
)
|
|
193
|
-
}
|
|
194
|
-
}
|
|
195
|
-
|
|
196
|
-
function positiveInteger(value: number | undefined, fallback: number, name: string): number {
|
|
197
|
-
const result = value ?? fallback
|
|
198
|
-
if (!Number.isSafeInteger(result) || result <= 0) {
|
|
199
|
-
throw new TypeError(`${name} must be a positive integer.`)
|
|
200
|
-
}
|
|
201
|
-
return result
|
|
202
|
-
}
|
|
203
|
-
|
|
204
|
-
function nonNegativeInteger(value: number | undefined, fallback: number, name: string): number {
|
|
205
|
-
const result = value ?? fallback
|
|
206
|
-
if (!Number.isSafeInteger(result) || result < 0) {
|
|
207
|
-
throw new TypeError(`${name} must be a non-negative integer.`)
|
|
208
|
-
}
|
|
209
|
-
return result
|
|
210
|
-
}
|
|
211
|
-
|
|
212
|
-
function formatDuration(milliseconds: number): string {
|
|
213
|
-
return milliseconds % 1_000 === 0 ? `${milliseconds / 1_000}s` : `${milliseconds}ms`
|
|
214
|
-
}
|
|
215
|
-
|
|
216
|
-
function formatBytes(bytes: number): string {
|
|
217
|
-
const mib = 1024 * 1024
|
|
218
|
-
return bytes % mib === 0 ? `${bytes / mib} MiB` : `${bytes} bytes`
|
|
219
|
-
}
|
package/src/linter/oxlint/run.ts
DELETED
|
@@ -1,175 +0,0 @@
|
|
|
1
|
-
import { existsSync } from 'node:fs'
|
|
2
|
-
import { createRequire } from 'node:module'
|
|
3
|
-
import { dirname, join, relative, resolve, sep } from 'node:path'
|
|
4
|
-
import { fileURLToPath } from 'node:url'
|
|
5
|
-
|
|
6
|
-
import { LinterToolError, type DiagnosticSeverity, type LintDiagnostic } from '../diagnostic.js'
|
|
7
|
-
import { ruleInfo } from '../rules/catalog.js'
|
|
8
|
-
import { DOMAIN_OXLINT_IGNORE_PATTERNS } from './ignore-patterns.js'
|
|
9
|
-
import { runOxlintProcess, type OxlintProcessOptions } from './process.js'
|
|
10
|
-
|
|
11
|
-
type OxlintOutput = {
|
|
12
|
-
diagnostics?: OxlintDiagnostic[]
|
|
13
|
-
number_of_files?: number
|
|
14
|
-
}
|
|
15
|
-
|
|
16
|
-
type OxlintDiagnostic = {
|
|
17
|
-
message?: string
|
|
18
|
-
code?: string
|
|
19
|
-
severity?: string
|
|
20
|
-
url?: string
|
|
21
|
-
help?: string
|
|
22
|
-
filename?: string
|
|
23
|
-
labels?: Array<{
|
|
24
|
-
span?: { offset?: number; length?: number; line?: number; column?: number }
|
|
25
|
-
}>
|
|
26
|
-
}
|
|
27
|
-
|
|
28
|
-
export type OxlintResult = {
|
|
29
|
-
diagnostics: LintDiagnostic[]
|
|
30
|
-
files: number
|
|
31
|
-
}
|
|
32
|
-
|
|
33
|
-
export async function runOxlint(
|
|
34
|
-
root: string,
|
|
35
|
-
fix: boolean,
|
|
36
|
-
options: OxlintProcessOptions = {},
|
|
37
|
-
): Promise<OxlintResult> {
|
|
38
|
-
const packageJson = join(root, 'package.json')
|
|
39
|
-
const projectRequire = createRequire(packageJson)
|
|
40
|
-
const sdkRequire = createRequire(import.meta.url)
|
|
41
|
-
const oxlintPackage = resolvePackage('oxlint/package.json', projectRequire, sdkRequire)
|
|
42
|
-
const bin = join(dirname(oxlintPackage), 'bin', 'oxlint')
|
|
43
|
-
const config = projectConfig(root) ?? internalConfigPath()
|
|
44
|
-
const args = ['.', '--format=json', '--no-error-on-unmatched-pattern', '--config', config]
|
|
45
|
-
// Config-file ignores are rooted at the config's own directory. Enforce the
|
|
46
|
-
// SDK's traversal boundary at the target process as well so the internal
|
|
47
|
-
// fallback config and imported presets cannot discover dependency/build trees.
|
|
48
|
-
for (const pattern of DOMAIN_OXLINT_IGNORE_PATTERNS) args.push('--ignore-pattern', pattern)
|
|
49
|
-
if (fix) args.push('--fix')
|
|
50
|
-
|
|
51
|
-
const { status, signal, stdout, stderr } = await runOxlintProcess(bin, args, root, options)
|
|
52
|
-
|
|
53
|
-
if (status !== 0 && status !== 1) {
|
|
54
|
-
const outcome = signal ? `signal ${signal}` : `status ${status ?? 'unknown'}`
|
|
55
|
-
const detail = failureDetail(stderr, stdout)
|
|
56
|
-
throw new LinterToolError(`Oxlint failed with ${outcome}.${detail ? `\n${detail}` : ''}`, {
|
|
57
|
-
code: 'OXLINT_FAILED',
|
|
58
|
-
})
|
|
59
|
-
}
|
|
60
|
-
|
|
61
|
-
let output: OxlintOutput
|
|
62
|
-
try {
|
|
63
|
-
const parsed: unknown = JSON.parse(stdout)
|
|
64
|
-
if (!isOxlintOutput(parsed)) throw new TypeError('Unexpected Oxlint report shape.')
|
|
65
|
-
output = parsed
|
|
66
|
-
} catch (error) {
|
|
67
|
-
const detail = failureDetail(stderr, stdout) || `Oxlint exited with status ${status}`
|
|
68
|
-
throw new LinterToolError(`Oxlint did not produce a diagnostic report.\n${detail}`, {
|
|
69
|
-
code: 'OXLINT_INVALID_OUTPUT',
|
|
70
|
-
cause: error,
|
|
71
|
-
})
|
|
72
|
-
}
|
|
73
|
-
|
|
74
|
-
return {
|
|
75
|
-
diagnostics: (output.diagnostics ?? []).map((diagnostic) =>
|
|
76
|
-
normalizeDiagnostic(root, diagnostic),
|
|
77
|
-
),
|
|
78
|
-
files: output.number_of_files ?? 0,
|
|
79
|
-
}
|
|
80
|
-
}
|
|
81
|
-
|
|
82
|
-
function resolvePackage(
|
|
83
|
-
id: string,
|
|
84
|
-
projectRequire: NodeJS.Require,
|
|
85
|
-
sdkRequire: NodeJS.Require,
|
|
86
|
-
): string {
|
|
87
|
-
try {
|
|
88
|
-
return projectRequire.resolve(id)
|
|
89
|
-
} catch (projectError) {
|
|
90
|
-
try {
|
|
91
|
-
return sdkRequire.resolve(id)
|
|
92
|
-
} catch {
|
|
93
|
-
throw new LinterToolError(
|
|
94
|
-
'Oxlint is not installed. Add the scaffolded Oxlint dev dependency and run your package manager install.',
|
|
95
|
-
{ code: 'OXLINT_NOT_INSTALLED', cause: projectError },
|
|
96
|
-
)
|
|
97
|
-
}
|
|
98
|
-
}
|
|
99
|
-
}
|
|
100
|
-
|
|
101
|
-
function isOxlintOutput(value: unknown): value is OxlintOutput {
|
|
102
|
-
if (!value || typeof value !== 'object' || Array.isArray(value)) return false
|
|
103
|
-
const output = value as OxlintOutput
|
|
104
|
-
return (
|
|
105
|
-
(output.diagnostics === undefined || Array.isArray(output.diagnostics)) &&
|
|
106
|
-
(output.number_of_files === undefined || typeof output.number_of_files === 'number')
|
|
107
|
-
)
|
|
108
|
-
}
|
|
109
|
-
|
|
110
|
-
function failureDetail(stderr: string, stdout: string): string {
|
|
111
|
-
const detail = stderr.trim() || stdout.trim()
|
|
112
|
-
const limit = 4_000
|
|
113
|
-
return detail.length <= limit ? detail : `…${detail.slice(-limit)}`
|
|
114
|
-
}
|
|
115
|
-
|
|
116
|
-
function projectConfig(root: string): string | undefined {
|
|
117
|
-
for (const name of [
|
|
118
|
-
'oxlint.config.ts',
|
|
119
|
-
'oxlint.config.js',
|
|
120
|
-
'oxlint.config.mjs',
|
|
121
|
-
'oxlint.config.cjs',
|
|
122
|
-
'.oxlintrc.json',
|
|
123
|
-
'.oxlintrc.jsonc',
|
|
124
|
-
]) {
|
|
125
|
-
const path = join(root, name)
|
|
126
|
-
if (existsSync(path)) return path
|
|
127
|
-
}
|
|
128
|
-
return undefined
|
|
129
|
-
}
|
|
130
|
-
|
|
131
|
-
function internalConfigPath(): string {
|
|
132
|
-
const current = fileURLToPath(import.meta.url)
|
|
133
|
-
const extension = current.endsWith('.ts') ? '.ts' : '.js'
|
|
134
|
-
return join(dirname(current), `config${extension}`)
|
|
135
|
-
}
|
|
136
|
-
|
|
137
|
-
function normalizeDiagnostic(root: string, diagnostic: OxlintDiagnostic): LintDiagnostic {
|
|
138
|
-
const id = normalizeCode(diagnostic.code ?? 'oxlint/unknown')
|
|
139
|
-
const info = ruleInfo(id)
|
|
140
|
-
const span = diagnostic.labels?.[0]?.span
|
|
141
|
-
return {
|
|
142
|
-
id,
|
|
143
|
-
severity: normalizeSeverity(diagnostic.severity),
|
|
144
|
-
message: diagnostic.message ?? info?.message ?? 'Oxlint reported a violation.',
|
|
145
|
-
...(diagnostic.help || info?.help ? { help: diagnostic.help ?? info?.help } : {}),
|
|
146
|
-
...(diagnostic.url || info?.url ? { url: diagnostic.url ?? info?.url } : {}),
|
|
147
|
-
owner: info?.owner ?? 'generic',
|
|
148
|
-
...(diagnostic.filename
|
|
149
|
-
? {
|
|
150
|
-
location: {
|
|
151
|
-
path: relativePath(root, diagnostic.filename),
|
|
152
|
-
line: span?.line ?? 1,
|
|
153
|
-
column: span?.column ?? 1,
|
|
154
|
-
...(span?.offset !== undefined ? { offset: span.offset } : {}),
|
|
155
|
-
...(span?.length !== undefined ? { length: span.length } : {}),
|
|
156
|
-
},
|
|
157
|
-
}
|
|
158
|
-
: {}),
|
|
159
|
-
}
|
|
160
|
-
}
|
|
161
|
-
|
|
162
|
-
function normalizeCode(code: string): string {
|
|
163
|
-
const match = /^([^()]+)\(([^()]+)\)$/.exec(code)
|
|
164
|
-
return match ? `${match[1]}/${match[2]}` : code
|
|
165
|
-
}
|
|
166
|
-
|
|
167
|
-
function normalizeSeverity(severity: string | undefined): DiagnosticSeverity {
|
|
168
|
-
return severity === 'error' ? 'error' : 'warning'
|
|
169
|
-
}
|
|
170
|
-
|
|
171
|
-
function relativePath(root: string, filename: string): string {
|
|
172
|
-
const absolute = resolve(root, filename)
|
|
173
|
-
const path = relative(root, absolute)
|
|
174
|
-
return sep === '/' ? path : path.split(sep).join('/')
|
|
175
|
-
}
|
package/src/linter/preflight.ts
DELETED
|
@@ -1,182 +0,0 @@
|
|
|
1
|
-
import { existsSync } from 'node:fs'
|
|
2
|
-
import { readFile, realpath } from 'node:fs/promises'
|
|
3
|
-
import { createRequire } from 'node:module'
|
|
4
|
-
import { dirname, join, relative, resolve } from 'node:path'
|
|
5
|
-
import { fileURLToPath } from 'node:url'
|
|
6
|
-
|
|
7
|
-
import { LinterToolError } from './diagnostic.js'
|
|
8
|
-
|
|
9
|
-
const brandedPackages = [
|
|
10
|
-
'@astrale-os/kernel-client',
|
|
11
|
-
'@astrale-os/kernel-core',
|
|
12
|
-
'@astrale-os/kernel-dsl',
|
|
13
|
-
] as const
|
|
14
|
-
|
|
15
|
-
const conventionalMembers = ['client', 'frontend', 'schema', 'worker'] as const
|
|
16
|
-
|
|
17
|
-
type Resolution = {
|
|
18
|
-
consumer: string
|
|
19
|
-
path: string
|
|
20
|
-
}
|
|
21
|
-
|
|
22
|
-
type ConsumerPackageJson = {
|
|
23
|
-
name?: string
|
|
24
|
-
dependencies?: Record<string, string>
|
|
25
|
-
optionalDependencies?: Record<string, string>
|
|
26
|
-
workspaces?: string[] | { packages?: string[] }
|
|
27
|
-
}
|
|
28
|
-
|
|
29
|
-
export async function assertSingleTypeUniverse(root: string): Promise<void> {
|
|
30
|
-
const manifests = await collectConsumerManifests(root)
|
|
31
|
-
const consumers = [
|
|
32
|
-
...manifests.map((path) => ({ label: relative(root, dirname(path)) || '.', path })),
|
|
33
|
-
{ label: '@astrale-os/sdk/linter', path: fileURLPackageJson() },
|
|
34
|
-
]
|
|
35
|
-
|
|
36
|
-
for (const packageName of brandedPackages) {
|
|
37
|
-
const resolutions: Resolution[] = []
|
|
38
|
-
for (const consumer of consumers) {
|
|
39
|
-
const resolved = await resolvePackageRoot(packageName, consumer.path)
|
|
40
|
-
if (resolved) resolutions.push({ consumer: consumer.label, path: resolved })
|
|
41
|
-
}
|
|
42
|
-
const paths = new Set(resolutions.map((resolution) => resolution.path))
|
|
43
|
-
if (paths.size <= 1) continue
|
|
44
|
-
const detail = formatResolutions(resolutions)
|
|
45
|
-
throw new LinterToolError(
|
|
46
|
-
`Multiple physical installations of ${packageName} would create incompatible Astrale types.\n` +
|
|
47
|
-
`${detail}\nReinstall the workspace so every member resolves one compatible package instance.`,
|
|
48
|
-
{ code: 'LINTER_PREFLIGHT_FAILED' },
|
|
49
|
-
)
|
|
50
|
-
}
|
|
51
|
-
}
|
|
52
|
-
|
|
53
|
-
function formatResolutions(resolutions: readonly Resolution[]): string {
|
|
54
|
-
const byPath = new Map<string, string[]>()
|
|
55
|
-
for (const resolution of resolutions) {
|
|
56
|
-
const consumers = byPath.get(resolution.path) ?? []
|
|
57
|
-
consumers.push(resolution.consumer)
|
|
58
|
-
byPath.set(resolution.path, consumers)
|
|
59
|
-
}
|
|
60
|
-
return [...byPath]
|
|
61
|
-
.sort(([a], [b]) => a.localeCompare(b))
|
|
62
|
-
.map(([path, consumers]) => {
|
|
63
|
-
const sorted = [...new Set(consumers)].sort()
|
|
64
|
-
const shown = sorted.slice(0, 4).join(', ')
|
|
65
|
-
const omitted = sorted.length > 4 ? ` (+${sorted.length - 4} more)` : ''
|
|
66
|
-
return ` ${path}\n from: ${shown}${omitted}`
|
|
67
|
-
})
|
|
68
|
-
.join('\n')
|
|
69
|
-
}
|
|
70
|
-
|
|
71
|
-
async function collectConsumerManifests(root: string): Promise<string[]> {
|
|
72
|
-
const rootManifest = join(root, 'package.json')
|
|
73
|
-
if (!existsSync(rootManifest)) return []
|
|
74
|
-
|
|
75
|
-
const manifests = new Set([rootManifest])
|
|
76
|
-
const packageJson = await readPackageJson(rootManifest)
|
|
77
|
-
const workspaces = Array.isArray(packageJson?.workspaces)
|
|
78
|
-
? packageJson.workspaces
|
|
79
|
-
: packageJson?.workspaces?.packages
|
|
80
|
-
|
|
81
|
-
for (const workspace of workspaces ?? []) {
|
|
82
|
-
if (typeof workspace !== 'string' || hasGlob(workspace)) continue
|
|
83
|
-
addManifestWithinRoot(manifests, root, workspace)
|
|
84
|
-
}
|
|
85
|
-
|
|
86
|
-
for (const member of conventionalMembers) addManifestWithinRoot(manifests, root, member)
|
|
87
|
-
await addDomainContractDependencyManifests(manifests)
|
|
88
|
-
return [...manifests].sort()
|
|
89
|
-
}
|
|
90
|
-
|
|
91
|
-
async function readPackageJson(manifest: string): Promise<ConsumerPackageJson | undefined> {
|
|
92
|
-
try {
|
|
93
|
-
return JSON.parse(await readFile(manifest, 'utf8'))
|
|
94
|
-
} catch {
|
|
95
|
-
return undefined
|
|
96
|
-
}
|
|
97
|
-
}
|
|
98
|
-
|
|
99
|
-
async function addDomainContractDependencyManifests(manifests: Set<string>): Promise<void> {
|
|
100
|
-
const pending = [...manifests]
|
|
101
|
-
for (let index = 0; index < pending.length; index++) {
|
|
102
|
-
const consumer = pending[index]!
|
|
103
|
-
const packageJson = await readPackageJson(consumer)
|
|
104
|
-
const dependencies = {
|
|
105
|
-
...packageJson?.optionalDependencies,
|
|
106
|
-
...packageJson?.dependencies,
|
|
107
|
-
}
|
|
108
|
-
for (const packageName of Object.keys(dependencies).sort()) {
|
|
109
|
-
if (!isDomainContractPackage(packageName)) continue
|
|
110
|
-
const manifest = await resolveDependencyManifest(packageName, consumer)
|
|
111
|
-
if (!manifest || manifests.has(manifest)) continue
|
|
112
|
-
manifests.add(manifest)
|
|
113
|
-
pending.push(manifest)
|
|
114
|
-
}
|
|
115
|
-
}
|
|
116
|
-
}
|
|
117
|
-
|
|
118
|
-
async function resolveDependencyManifest(
|
|
119
|
-
packageName: string,
|
|
120
|
-
consumerManifest: string,
|
|
121
|
-
): Promise<string | undefined> {
|
|
122
|
-
const require = createRequire(consumerManifest)
|
|
123
|
-
try {
|
|
124
|
-
return await realpath(require.resolve(`${packageName}/package.json`))
|
|
125
|
-
} catch {
|
|
126
|
-
try {
|
|
127
|
-
let directory = dirname(await realpath(require.resolve(packageName)))
|
|
128
|
-
for (;;) {
|
|
129
|
-
const manifest = join(directory, 'package.json')
|
|
130
|
-
if (existsSync(manifest)) {
|
|
131
|
-
const packageJson = await readPackageJson(manifest)
|
|
132
|
-
if (packageJson?.name === packageName) return await realpath(manifest)
|
|
133
|
-
}
|
|
134
|
-
const parent = dirname(directory)
|
|
135
|
-
if (parent === directory) return undefined
|
|
136
|
-
directory = parent
|
|
137
|
-
}
|
|
138
|
-
} catch {
|
|
139
|
-
return undefined
|
|
140
|
-
}
|
|
141
|
-
}
|
|
142
|
-
}
|
|
143
|
-
|
|
144
|
-
function addManifestWithinRoot(manifests: Set<string>, root: string, member: string): void {
|
|
145
|
-
const manifest = resolve(root, member, 'package.json')
|
|
146
|
-
const parent = relative(root, manifest)
|
|
147
|
-
if (parent.startsWith('..') || parent === '') return
|
|
148
|
-
if (existsSync(manifest)) manifests.add(manifest)
|
|
149
|
-
}
|
|
150
|
-
|
|
151
|
-
function hasGlob(path: string): boolean {
|
|
152
|
-
return /[*?[\]{}!]/u.test(path)
|
|
153
|
-
}
|
|
154
|
-
|
|
155
|
-
function isDomainContractPackage(packageName: string): boolean {
|
|
156
|
-
return packageName.startsWith('@astrale-domains/')
|
|
157
|
-
}
|
|
158
|
-
|
|
159
|
-
async function resolvePackageRoot(
|
|
160
|
-
packageName: (typeof brandedPackages)[number],
|
|
161
|
-
manifest: string,
|
|
162
|
-
): Promise<string | undefined> {
|
|
163
|
-
if (!existsSync(manifest)) return undefined
|
|
164
|
-
try {
|
|
165
|
-
const resolved = createRequire(manifest).resolve(`${packageName}/package.json`)
|
|
166
|
-
return await realpath(dirname(resolved))
|
|
167
|
-
} catch {
|
|
168
|
-
return undefined
|
|
169
|
-
}
|
|
170
|
-
}
|
|
171
|
-
|
|
172
|
-
function fileURLPackageJson(): string {
|
|
173
|
-
let directory = dirname(fileURLToPath(import.meta.url))
|
|
174
|
-
for (;;) {
|
|
175
|
-
const candidate = join(directory, 'package.json')
|
|
176
|
-
if (existsSync(candidate)) return candidate
|
|
177
|
-
const parent = dirname(directory)
|
|
178
|
-
if (parent === directory) break
|
|
179
|
-
directory = parent
|
|
180
|
-
}
|
|
181
|
-
return join(directory, 'package.json')
|
|
182
|
-
}
|