@mysten-incubation/devstack 0.0.0
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/LICENSE +189 -0
- package/README.md +94 -0
- package/dist/_virtual/_rolldown/runtime.mjs +13 -0
- package/dist/api/define-capabilities.d.mts +25 -0
- package/dist/api/define-capabilities.mjs +19 -0
- package/dist/api/define-capabilities.mjs.map +1 -0
- package/dist/api/define-devstack-with.d.mts +41 -0
- package/dist/api/define-devstack-with.mjs +24 -0
- package/dist/api/define-devstack-with.mjs.map +1 -0
- package/dist/api/define-devstack.d.mts +62 -0
- package/dist/api/define-devstack.mjs +108 -0
- package/dist/api/define-devstack.mjs.map +1 -0
- package/dist/api/define-plugin.d.mts +1 -0
- package/dist/api/inference-network.mjs +122 -0
- package/dist/api/inference-network.mjs.map +1 -0
- package/dist/api/mode-narrowed-factory.d.mts +26 -0
- package/dist/api/mode-narrowed-factory.mjs +8 -0
- package/dist/api/mode-narrowed-factory.mjs.map +1 -0
- package/dist/api/plugin-errors.mjs +10 -0
- package/dist/api/plugin-errors.mjs.map +1 -0
- package/dist/api/run-stack.d.mts +82 -0
- package/dist/api/run-stack.mjs +127 -0
- package/dist/api/run-stack.mjs.map +1 -0
- package/dist/build-integrations/playwright/config.d.mts +92 -0
- package/dist/build-integrations/playwright/config.mjs +71 -0
- package/dist/build-integrations/playwright/config.mjs.map +1 -0
- package/dist/build-integrations/playwright/errors.d.mts +82 -0
- package/dist/build-integrations/playwright/errors.mjs +43 -0
- package/dist/build-integrations/playwright/errors.mjs.map +1 -0
- package/dist/build-integrations/playwright/global-setup.d.mts +64 -0
- package/dist/build-integrations/playwright/global-setup.mjs +44 -0
- package/dist/build-integrations/playwright/global-setup.mjs.map +1 -0
- package/dist/build-integrations/playwright/index.d.mts +6 -0
- package/dist/build-integrations/playwright/index.mjs +6 -0
- package/dist/build-integrations/playwright/stack-context.d.mts +95 -0
- package/dist/build-integrations/playwright/stack-context.mjs +277 -0
- package/dist/build-integrations/playwright/stack-context.mjs.map +1 -0
- package/dist/build-integrations/playwright/wallet-context.d.mts +87 -0
- package/dist/build-integrations/playwright/wallet-context.mjs +148 -0
- package/dist/build-integrations/playwright/wallet-context.mjs.map +1 -0
- package/dist/build-integrations/runtime/cold-start-url.d.mts +67 -0
- package/dist/build-integrations/runtime/cold-start-url.mjs +56 -0
- package/dist/build-integrations/runtime/cold-start-url.mjs.map +1 -0
- package/dist/build-integrations/runtime/dapp-kit-slot.mjs +10 -0
- package/dist/build-integrations/runtime/dapp-kit-slot.mjs.map +1 -0
- package/dist/build-integrations/runtime/discover.d.mts +78 -0
- package/dist/build-integrations/runtime/discover.mjs +124 -0
- package/dist/build-integrations/runtime/discover.mjs.map +1 -0
- package/dist/build-integrations/runtime/endpoint-registry.d.mts +26 -0
- package/dist/build-integrations/runtime/endpoint-registry.mjs +41 -0
- package/dist/build-integrations/runtime/endpoint-registry.mjs.map +1 -0
- package/dist/build-integrations/runtime/errors.d.mts +64 -0
- package/dist/build-integrations/runtime/errors.mjs +51 -0
- package/dist/build-integrations/runtime/errors.mjs.map +1 -0
- package/dist/build-integrations/runtime/index.d.mts +7 -0
- package/dist/build-integrations/runtime/index.mjs +6 -0
- package/dist/build-integrations/runtime/read-stack-context.d.mts +38 -0
- package/dist/build-integrations/runtime/read-stack-context.mjs +130 -0
- package/dist/build-integrations/runtime/read-stack-context.mjs.map +1 -0
- package/dist/build-integrations/runtime/stack-context.d.mts +53 -0
- package/dist/build-integrations/vitest/config.d.mts +62 -0
- package/dist/build-integrations/vitest/config.mjs +80 -0
- package/dist/build-integrations/vitest/config.mjs.map +1 -0
- package/dist/build-integrations/vitest/env.d.mts +48 -0
- package/dist/build-integrations/vitest/env.mjs +50 -0
- package/dist/build-integrations/vitest/env.mjs.map +1 -0
- package/dist/build-integrations/vitest/errors.d.mts +44 -0
- package/dist/build-integrations/vitest/errors.mjs +18 -0
- package/dist/build-integrations/vitest/errors.mjs.map +1 -0
- package/dist/build-integrations/vitest/index.d.mts +6 -0
- package/dist/build-integrations/vitest/index.mjs +6 -0
- package/dist/build-integrations/vitest/setup.d.mts +53 -0
- package/dist/build-integrations/vitest/setup.mjs +56 -0
- package/dist/build-integrations/vitest/setup.mjs.map +1 -0
- package/dist/build-integrations/vitest/stack-context.d.mts +58 -0
- package/dist/build-integrations/vitest/stack-context.mjs +67 -0
- package/dist/build-integrations/vitest/stack-context.mjs.map +1 -0
- package/dist/cli/main.d.mts +5 -0
- package/dist/cli/main.mjs +586 -0
- package/dist/cli/main.mjs.map +1 -0
- package/dist/cli/prune-direct.mjs +216 -0
- package/dist/cli/prune-direct.mjs.map +1 -0
- package/dist/cli/snapshot-reader.mjs +73 -0
- package/dist/cli/snapshot-reader.mjs.map +1 -0
- package/dist/cli/up-lifecycle.mjs +28 -0
- package/dist/cli/up-lifecycle.mjs.map +1 -0
- package/dist/contracts/capability-decl.d.mts +42 -0
- package/dist/contracts/chain-probe.d.mts +26 -0
- package/dist/contracts/chain-probe.mjs +8 -0
- package/dist/contracts/chain-probe.mjs.map +1 -0
- package/dist/contracts/codegenable.d.mts +43 -0
- package/dist/contracts/container-runtime.d.mts +245 -0
- package/dist/contracts/liveness-classifier.d.mts +19 -0
- package/dist/contracts/network-resolver.d.mts +15 -0
- package/dist/contracts/network-resolver.mjs +7 -0
- package/dist/contracts/network-resolver.mjs.map +1 -0
- package/dist/contracts/projection.d.mts +15 -0
- package/dist/contracts/routable.d.mts +53 -0
- package/dist/contracts/snapshotable.d.mts +39 -0
- package/dist/contracts/strategy-contributor.d.mts +26 -0
- package/dist/index.d.mts +89 -0
- package/dist/index.mjs +37 -0
- package/dist/orchestrators/codegen/bindings.d.mts +2 -0
- package/dist/orchestrators/codegen/bindings.mjs +340 -0
- package/dist/orchestrators/codegen/bindings.mjs.map +1 -0
- package/dist/orchestrators/codegen/emit.mjs +56 -0
- package/dist/orchestrators/codegen/emit.mjs.map +1 -0
- package/dist/orchestrators/codegen/errors.d.mts +1 -0
- package/dist/orchestrators/codegen/errors.mjs +66 -0
- package/dist/orchestrators/codegen/errors.mjs.map +1 -0
- package/dist/orchestrators/codegen/extras.mjs +16 -0
- package/dist/orchestrators/codegen/extras.mjs.map +1 -0
- package/dist/orchestrators/codegen/format.mjs +109 -0
- package/dist/orchestrators/codegen/format.mjs.map +1 -0
- package/dist/orchestrators/codegen/gitignore.mjs +67 -0
- package/dist/orchestrators/codegen/gitignore.mjs.map +1 -0
- package/dist/orchestrators/codegen/paths.d.mts +1 -0
- package/dist/orchestrators/codegen/paths.mjs +33 -0
- package/dist/orchestrators/codegen/paths.mjs.map +1 -0
- package/dist/orchestrators/codegen/permissions.mjs +6 -0
- package/dist/orchestrators/codegen/permissions.mjs.map +1 -0
- package/dist/orchestrators/codegen/service.d.mts +1 -0
- package/dist/orchestrators/codegen/service.mjs +276 -0
- package/dist/orchestrators/codegen/service.mjs.map +1 -0
- package/dist/orchestrators/router/cleanup.mjs +58 -0
- package/dist/orchestrators/router/cleanup.mjs.map +1 -0
- package/dist/orchestrators/router/cors.mjs +31 -0
- package/dist/orchestrators/router/cors.mjs.map +1 -0
- package/dist/orchestrators/router/entrypoints.d.mts +1 -0
- package/dist/orchestrators/router/entrypoints.mjs +80 -0
- package/dist/orchestrators/router/entrypoints.mjs.map +1 -0
- package/dist/orchestrators/router/errors.d.mts +1 -0
- package/dist/orchestrators/router/errors.mjs +103 -0
- package/dist/orchestrators/router/errors.mjs.map +1 -0
- package/dist/orchestrators/router/file-provider.d.mts +1 -0
- package/dist/orchestrators/router/file-provider.mjs +320 -0
- package/dist/orchestrators/router/file-provider.mjs.map +1 -0
- package/dist/orchestrators/router/hostname.d.mts +1 -0
- package/dist/orchestrators/router/hostname.mjs +107 -0
- package/dist/orchestrators/router/hostname.mjs.map +1 -0
- package/dist/orchestrators/router/index.d.mts +1 -0
- package/dist/orchestrators/router/profile.d.mts +1 -0
- package/dist/orchestrators/router/profile.mjs +109 -0
- package/dist/orchestrators/router/profile.mjs.map +1 -0
- package/dist/orchestrators/router/service.d.mts +3 -0
- package/dist/orchestrators/router/service.mjs +421 -0
- package/dist/orchestrators/router/service.mjs.map +1 -0
- package/dist/orchestrators/router/traefik-container.d.mts +1 -0
- package/dist/orchestrators/router/traefik-container.mjs +229 -0
- package/dist/orchestrators/router/traefik-container.mjs.map +1 -0
- package/dist/orchestrators/runtime-composition.d.mts +10 -0
- package/dist/orchestrators/runtime-composition.mjs +168 -0
- package/dist/orchestrators/runtime-composition.mjs.map +1 -0
- package/dist/orchestrators/snapshot/capture.d.mts +1 -0
- package/dist/orchestrators/snapshot/capture.mjs +350 -0
- package/dist/orchestrators/snapshot/capture.mjs.map +1 -0
- package/dist/orchestrators/snapshot/descriptor.d.mts +1 -0
- package/dist/orchestrators/snapshot/descriptor.mjs +109 -0
- package/dist/orchestrators/snapshot/descriptor.mjs.map +1 -0
- package/dist/orchestrators/snapshot/identity-guard.d.mts +1 -0
- package/dist/orchestrators/snapshot/identity-guard.mjs +132 -0
- package/dist/orchestrators/snapshot/identity-guard.mjs.map +1 -0
- package/dist/orchestrators/snapshot/image-bundle-tags.mjs +207 -0
- package/dist/orchestrators/snapshot/image-bundle-tags.mjs.map +1 -0
- package/dist/orchestrators/snapshot/index.d.mts +1 -0
- package/dist/orchestrators/snapshot/integrity.d.mts +1 -0
- package/dist/orchestrators/snapshot/integrity.mjs +74 -0
- package/dist/orchestrators/snapshot/integrity.mjs.map +1 -0
- package/dist/orchestrators/snapshot/prune.d.mts +1 -0
- package/dist/orchestrators/snapshot/prune.mjs +110 -0
- package/dist/orchestrators/snapshot/prune.mjs.map +1 -0
- package/dist/orchestrators/snapshot/restore.d.mts +1 -0
- package/dist/orchestrators/snapshot/restore.mjs +404 -0
- package/dist/orchestrators/snapshot/restore.mjs.map +1 -0
- package/dist/orchestrators/snapshot/service.d.mts +1 -0
- package/dist/orchestrators/snapshot/service.mjs +296 -0
- package/dist/orchestrators/snapshot/service.mjs.map +1 -0
- package/dist/orchestrators/snapshot/state-document.mjs +18 -0
- package/dist/orchestrators/snapshot/state-document.mjs.map +1 -0
- package/dist/orchestrators/snapshot/wipe.d.mts +1 -0
- package/dist/orchestrators/snapshot/wipe.mjs +59 -0
- package/dist/orchestrators/snapshot/wipe.mjs.map +1 -0
- package/dist/plugins/account/codegen.d.mts +12 -0
- package/dist/plugins/account/codegen.mjs +22 -0
- package/dist/plugins/account/codegen.mjs.map +1 -0
- package/dist/plugins/account/errors.d.mts +44 -0
- package/dist/plugins/account/errors.mjs +16 -0
- package/dist/plugins/account/errors.mjs.map +1 -0
- package/dist/plugins/account/funding.d.mts +94 -0
- package/dist/plugins/account/funding.mjs +199 -0
- package/dist/plugins/account/funding.mjs.map +1 -0
- package/dist/plugins/account/index.d.mts +54 -0
- package/dist/plugins/account/index.mjs +151 -0
- package/dist/plugins/account/index.mjs.map +1 -0
- package/dist/plugins/account/keypair.d.mts +32 -0
- package/dist/plugins/account/keypair.mjs +99 -0
- package/dist/plugins/account/keypair.mjs.map +1 -0
- package/dist/plugins/account/lease.mjs +21 -0
- package/dist/plugins/account/lease.mjs.map +1 -0
- package/dist/plugins/account/registry.d.mts +33 -0
- package/dist/plugins/account/registry.mjs +36 -0
- package/dist/plugins/account/registry.mjs.map +1 -0
- package/dist/plugins/account/service.d.mts +104 -0
- package/dist/plugins/account/service.mjs +405 -0
- package/dist/plugins/account/service.mjs.map +1 -0
- package/dist/plugins/account/snapshot.mjs +33 -0
- package/dist/plugins/account/snapshot.mjs.map +1 -0
- package/dist/plugins/account/variants/env.mjs +24 -0
- package/dist/plugins/account/variants/env.mjs.map +1 -0
- package/dist/plugins/account/variants/ephemeral.mjs +72 -0
- package/dist/plugins/account/variants/ephemeral.mjs.map +1 -0
- package/dist/plugins/account/variants/impersonate.d.mts +16 -0
- package/dist/plugins/account/variants/impersonate.mjs +48 -0
- package/dist/plugins/account/variants/impersonate.mjs.map +1 -0
- package/dist/plugins/account/variants/inline.mjs +13 -0
- package/dist/plugins/account/variants/inline.mjs.map +1 -0
- package/dist/plugins/account/variants/keystore.mjs +93 -0
- package/dist/plugins/account/variants/keystore.mjs.map +1 -0
- package/dist/plugins/account/variants/signer.mjs +31 -0
- package/dist/plugins/account/variants/signer.mjs.map +1 -0
- package/dist/plugins/action/build-context.d.mts +41 -0
- package/dist/plugins/action/discriminator.d.mts +20 -0
- package/dist/plugins/action/discriminator.mjs +13 -0
- package/dist/plugins/action/discriminator.mjs.map +1 -0
- package/dist/plugins/action/errors.d.mts +31 -0
- package/dist/plugins/action/errors.mjs +13 -0
- package/dist/plugins/action/errors.mjs.map +1 -0
- package/dist/plugins/action/execute.d.mts +2 -0
- package/dist/plugins/action/execute.mjs +145 -0
- package/dist/plugins/action/execute.mjs.map +1 -0
- package/dist/plugins/action/index.d.mts +56 -0
- package/dist/plugins/action/index.mjs +82 -0
- package/dist/plugins/action/index.mjs.map +1 -0
- package/dist/plugins/action/service.d.mts +26 -0
- package/dist/plugins/action/service.mjs +84 -0
- package/dist/plugins/action/service.mjs.map +1 -0
- package/dist/plugins/coin/address-resolution.d.mts +34 -0
- package/dist/plugins/coin/address-resolution.mjs +80 -0
- package/dist/plugins/coin/address-resolution.mjs.map +1 -0
- package/dist/plugins/coin/codegen.d.mts +16 -0
- package/dist/plugins/coin/codegen.mjs +21 -0
- package/dist/plugins/coin/codegen.mjs.map +1 -0
- package/dist/plugins/coin/discovery.d.mts +26 -0
- package/dist/plugins/coin/discovery.mjs +112 -0
- package/dist/plugins/coin/discovery.mjs.map +1 -0
- package/dist/plugins/coin/errors.d.mts +48 -0
- package/dist/plugins/coin/errors.mjs +13 -0
- package/dist/plugins/coin/errors.mjs.map +1 -0
- package/dist/plugins/coin/index.d.mts +95 -0
- package/dist/plugins/coin/index.mjs +172 -0
- package/dist/plugins/coin/index.mjs.map +1 -0
- package/dist/plugins/coin/metadata.d.mts +15 -0
- package/dist/plugins/coin/metadata.mjs +99 -0
- package/dist/plugins/coin/metadata.mjs.map +1 -0
- package/dist/plugins/coin/mint.d.mts +34 -0
- package/dist/plugins/coin/mint.mjs +164 -0
- package/dist/plugins/coin/mint.mjs.map +1 -0
- package/dist/plugins/coin/registry.d.mts +1 -0
- package/dist/plugins/coin/registry.mjs +37 -0
- package/dist/plugins/coin/registry.mjs.map +1 -0
- package/dist/plugins/coin/service.d.mts +47 -0
- package/dist/plugins/coin/service.mjs +51 -0
- package/dist/plugins/coin/service.mjs.map +1 -0
- package/dist/plugins/coin/snapshot.mjs +19 -0
- package/dist/plugins/coin/snapshot.mjs.map +1 -0
- package/dist/plugins/coin/type-strings.mjs +49 -0
- package/dist/plugins/coin/type-strings.mjs.map +1 -0
- package/dist/plugins/deepbook/codegen.d.mts +39 -0
- package/dist/plugins/deepbook/codegen.mjs +15 -0
- package/dist/plugins/deepbook/codegen.mjs.map +1 -0
- package/dist/plugins/deepbook/deploy.mjs +437 -0
- package/dist/plugins/deepbook/deploy.mjs.map +1 -0
- package/dist/plugins/deepbook/errors.d.mts +29 -0
- package/dist/plugins/deepbook/errors.mjs +26 -0
- package/dist/plugins/deepbook/errors.mjs.map +1 -0
- package/dist/plugins/deepbook/faucet-strategy.d.mts +8 -0
- package/dist/plugins/deepbook/faucet-strategy.mjs +81 -0
- package/dist/plugins/deepbook/faucet-strategy.mjs.map +1 -0
- package/dist/plugins/deepbook/index.d.mts +171 -0
- package/dist/plugins/deepbook/index.mjs +359 -0
- package/dist/plugins/deepbook/index.mjs.map +1 -0
- package/dist/plugins/deepbook/plugin-key.mjs +7 -0
- package/dist/plugins/deepbook/plugin-key.mjs.map +1 -0
- package/dist/plugins/deepbook/pyth/index.mjs +226 -0
- package/dist/plugins/deepbook/pyth/index.mjs.map +1 -0
- package/dist/plugins/deepbook/routable.mjs +21 -0
- package/dist/plugins/deepbook/routable.mjs.map +1 -0
- package/dist/plugins/deepbook/snapshot.mjs +49 -0
- package/dist/plugins/deepbook/snapshot.mjs.map +1 -0
- package/dist/plugins/deepbook/types.d.mts +125 -0
- package/dist/plugins/deepbook/types.mjs +12 -0
- package/dist/plugins/deepbook/types.mjs.map +1 -0
- package/dist/plugins/faucet/dispatcher.d.mts +9 -0
- package/dist/plugins/faucet/dispatcher.mjs +13 -0
- package/dist/plugins/faucet/dispatcher.mjs.map +1 -0
- package/dist/plugins/faucet/errors.d.mts +86 -0
- package/dist/plugins/faucet/errors.mjs +19 -0
- package/dist/plugins/faucet/errors.mjs.map +1 -0
- package/dist/plugins/faucet/http.mjs +127 -0
- package/dist/plugins/faucet/http.mjs.map +1 -0
- package/dist/plugins/faucet/index.d.mts +43 -0
- package/dist/plugins/faucet/index.mjs +42 -0
- package/dist/plugins/faucet/index.mjs.map +1 -0
- package/dist/plugins/faucet/service.d.mts +20 -0
- package/dist/plugins/faucet/strategies/sui-local.d.mts +23 -0
- package/dist/plugins/faucet/strategies/sui-local.mjs +29 -0
- package/dist/plugins/faucet/strategies/sui-local.mjs.map +1 -0
- package/dist/plugins/host-service/errors.d.mts +27 -0
- package/dist/plugins/host-service/errors.mjs +14 -0
- package/dist/plugins/host-service/errors.mjs.map +1 -0
- package/dist/plugins/host-service/index.d.mts +10 -0
- package/dist/plugins/host-service/index.mjs +48 -0
- package/dist/plugins/host-service/index.mjs.map +1 -0
- package/dist/plugins/host-service/routable.mjs +24 -0
- package/dist/plugins/host-service/routable.mjs.map +1 -0
- package/dist/plugins/host-service/service.d.mts +49 -0
- package/dist/plugins/host-service/service.mjs +375 -0
- package/dist/plugins/host-service/service.mjs.map +1 -0
- package/dist/plugins/package/build.d.mts +1 -0
- package/dist/plugins/package/build.mjs +24 -0
- package/dist/plugins/package/build.mjs.map +1 -0
- package/dist/plugins/package/codegen.d.mts +19 -0
- package/dist/plugins/package/codegen.mjs +41 -0
- package/dist/plugins/package/codegen.mjs.map +1 -0
- package/dist/plugins/package/dep-resolution.mjs +10 -0
- package/dist/plugins/package/dep-resolution.mjs.map +1 -0
- package/dist/plugins/package/errors.d.mts +34 -0
- package/dist/plugins/package/errors.mjs +13 -0
- package/dist/plugins/package/errors.mjs.map +1 -0
- package/dist/plugins/package/index.d.mts +109 -0
- package/dist/plugins/package/index.mjs +207 -0
- package/dist/plugins/package/index.mjs.map +1 -0
- package/dist/plugins/package/mode-known.mjs +41 -0
- package/dist/plugins/package/mode-known.mjs.map +1 -0
- package/dist/plugins/package/mode-local.d.mts +1 -0
- package/dist/plugins/package/mode-local.mjs +183 -0
- package/dist/plugins/package/mode-local.mjs.map +1 -0
- package/dist/plugins/package/publish-executor.mjs +202 -0
- package/dist/plugins/package/publish-executor.mjs.map +1 -0
- package/dist/plugins/package/publish-output.d.mts +28 -0
- package/dist/plugins/package/publish-output.mjs +45 -0
- package/dist/plugins/package/publish-output.mjs.map +1 -0
- package/dist/plugins/package/registry.d.mts +25 -0
- package/dist/plugins/package/registry.mjs +30 -0
- package/dist/plugins/package/registry.mjs.map +1 -0
- package/dist/plugins/package/service.mjs +20 -0
- package/dist/plugins/package/service.mjs.map +1 -0
- package/dist/plugins/package/snapshot.mjs +25 -0
- package/dist/plugins/package/snapshot.mjs.map +1 -0
- package/dist/plugins/postgres/codegen.mjs +42 -0
- package/dist/plugins/postgres/codegen.mjs.map +1 -0
- package/dist/plugins/postgres/connection.d.mts +33 -0
- package/dist/plugins/postgres/connection.mjs +19 -0
- package/dist/plugins/postgres/connection.mjs.map +1 -0
- package/dist/plugins/postgres/db-ensure.mjs +100 -0
- package/dist/plugins/postgres/db-ensure.mjs.map +1 -0
- package/dist/plugins/postgres/errors.d.mts +55 -0
- package/dist/plugins/postgres/errors.mjs +29 -0
- package/dist/plugins/postgres/errors.mjs.map +1 -0
- package/dist/plugins/postgres/index.d.mts +37 -0
- package/dist/plugins/postgres/index.mjs +75 -0
- package/dist/plugins/postgres/index.mjs.map +1 -0
- package/dist/plugins/postgres/routable.mjs +33 -0
- package/dist/plugins/postgres/routable.mjs.map +1 -0
- package/dist/plugins/postgres/service.d.mts +50 -0
- package/dist/plugins/postgres/service.mjs +145 -0
- package/dist/plugins/postgres/service.mjs.map +1 -0
- package/dist/plugins/postgres/snapshot.d.mts +1 -0
- package/dist/plugins/postgres/snapshot.mjs +32 -0
- package/dist/plugins/postgres/snapshot.mjs.map +1 -0
- package/dist/plugins/router-entrypoints.mjs +21 -0
- package/dist/plugins/router-entrypoints.mjs.map +1 -0
- package/dist/plugins/seal/bootstrap-assets/cargo-image.mjs +59 -0
- package/dist/plugins/seal/bootstrap-assets/cargo-image.mjs.map +1 -0
- package/dist/plugins/seal/bootstrap-assets/source-fetch.mjs +132 -0
- package/dist/plugins/seal/bootstrap-assets/source-fetch.mjs.map +1 -0
- package/dist/plugins/seal/codegen.d.mts +19 -0
- package/dist/plugins/seal/codegen.mjs +16 -0
- package/dist/plugins/seal/codegen.mjs.map +1 -0
- package/dist/plugins/seal/config-render.mjs +82 -0
- package/dist/plugins/seal/config-render.mjs.map +1 -0
- package/dist/plugins/seal/deploy.mjs +198 -0
- package/dist/plugins/seal/deploy.mjs.map +1 -0
- package/dist/plugins/seal/errors.d.mts +52 -0
- package/dist/plugins/seal/errors.mjs +19 -0
- package/dist/plugins/seal/errors.mjs.map +1 -0
- package/dist/plugins/seal/index.d.mts +161 -0
- package/dist/plugins/seal/index.mjs +235 -0
- package/dist/plugins/seal/index.mjs.map +1 -0
- package/dist/plugins/seal/key-manager.d.mts +22 -0
- package/dist/plugins/seal/key-manager.mjs +22 -0
- package/dist/plugins/seal/key-manager.mjs.map +1 -0
- package/dist/plugins/seal/key-server.mjs +175 -0
- package/dist/plugins/seal/key-server.mjs.map +1 -0
- package/dist/plugins/seal/keygen.mjs +96 -0
- package/dist/plugins/seal/keygen.mjs.map +1 -0
- package/dist/plugins/seal/mode/fork-known.d.mts +8 -0
- package/dist/plugins/seal/mode/fork-known.mjs +23 -0
- package/dist/plugins/seal/mode/fork-known.mjs.map +1 -0
- package/dist/plugins/seal/mode/live.d.mts +18 -0
- package/dist/plugins/seal/mode/live.mjs +64 -0
- package/dist/plugins/seal/mode/live.mjs.map +1 -0
- package/dist/plugins/seal/mode/local-keygen.mjs +180 -0
- package/dist/plugins/seal/mode/local-keygen.mjs.map +1 -0
- package/dist/plugins/seal/plugin-key.mjs +7 -0
- package/dist/plugins/seal/plugin-key.mjs.map +1 -0
- package/dist/plugins/seal/registry-publish.d.mts +43 -0
- package/dist/plugins/seal/registry-publish.mjs +9 -0
- package/dist/plugins/seal/registry-publish.mjs.map +1 -0
- package/dist/plugins/seal/routable.mjs +57 -0
- package/dist/plugins/seal/routable.mjs.map +1 -0
- package/dist/plugins/seal/service.mjs +17 -0
- package/dist/plugins/seal/service.mjs.map +1 -0
- package/dist/plugins/seal/snapshot.mjs +51 -0
- package/dist/plugins/seal/snapshot.mjs.map +1 -0
- package/dist/plugins/sui/auto-tick.mjs +45 -0
- package/dist/plugins/sui/auto-tick.mjs.map +1 -0
- package/dist/plugins/sui/chain-build-container.d.mts +1 -0
- package/dist/plugins/sui/chain-probe.d.mts +85 -0
- package/dist/plugins/sui/chain-probe.mjs +104 -0
- package/dist/plugins/sui/chain-probe.mjs.map +1 -0
- package/dist/plugins/sui/codegen.d.mts +14 -0
- package/dist/plugins/sui/codegen.mjs +26 -0
- package/dist/plugins/sui/codegen.mjs.map +1 -0
- package/dist/plugins/sui/errors.d.mts +74 -0
- package/dist/plugins/sui/errors.mjs +28 -0
- package/dist/plugins/sui/errors.mjs.map +1 -0
- package/dist/plugins/sui/fork-orchestration.mjs +24 -0
- package/dist/plugins/sui/fork-orchestration.mjs.map +1 -0
- package/dist/plugins/sui/fork-transaction.mjs +96 -0
- package/dist/plugins/sui/fork-transaction.mjs.map +1 -0
- package/dist/plugins/sui/index.d.mts +318 -0
- package/dist/plugins/sui/index.mjs +182 -0
- package/dist/plugins/sui/index.mjs.map +1 -0
- package/dist/plugins/sui/mode/external.mjs +60 -0
- package/dist/plugins/sui/mode/external.mjs.map +1 -0
- package/dist/plugins/sui/mode/fork.mjs +283 -0
- package/dist/plugins/sui/mode/fork.mjs.map +1 -0
- package/dist/plugins/sui/mode/live.mjs +103 -0
- package/dist/plugins/sui/mode/live.mjs.map +1 -0
- package/dist/plugins/sui/mode/local.mjs +293 -0
- package/dist/plugins/sui/mode/local.mjs.map +1 -0
- package/dist/plugins/sui/mode/shared-boot.mjs +254 -0
- package/dist/plugins/sui/mode/shared-boot.mjs.map +1 -0
- package/dist/plugins/sui/mode/shared.d.mts +103 -0
- package/dist/plugins/sui/mode/shared.mjs +12 -0
- package/dist/plugins/sui/mode/shared.mjs.map +1 -0
- package/dist/plugins/sui/mode/spec.d.mts +94 -0
- package/dist/plugins/sui/network-resolver.d.mts +23 -0
- package/dist/plugins/sui/routable.mjs +88 -0
- package/dist/plugins/sui/routable.mjs.map +1 -0
- package/dist/plugins/sui/seed-objects.d.mts +18 -0
- package/dist/plugins/sui/seed-objects.mjs +25 -0
- package/dist/plugins/sui/seed-objects.mjs.map +1 -0
- package/dist/plugins/sui/service.mjs +38 -0
- package/dist/plugins/sui/service.mjs.map +1 -0
- package/dist/plugins/sui/snapshot.mjs +53 -0
- package/dist/plugins/sui/snapshot.mjs.map +1 -0
- package/dist/plugins/wallet/codegen.d.mts +33 -0
- package/dist/plugins/wallet/codegen.mjs +34 -0
- package/dist/plugins/wallet/codegen.mjs.map +1 -0
- package/dist/plugins/wallet/errors.d.mts +66 -0
- package/dist/plugins/wallet/errors.mjs +16 -0
- package/dist/plugins/wallet/errors.mjs.map +1 -0
- package/dist/plugins/wallet/index.d.mts +63 -0
- package/dist/plugins/wallet/index.mjs +126 -0
- package/dist/plugins/wallet/index.mjs.map +1 -0
- package/dist/plugins/wallet/origin-policy.d.mts +1 -0
- package/dist/plugins/wallet/origin-policy.mjs +65 -0
- package/dist/plugins/wallet/origin-policy.mjs.map +1 -0
- package/dist/plugins/wallet/pairing.d.mts +11 -0
- package/dist/plugins/wallet/pairing.mjs +125 -0
- package/dist/plugins/wallet/pairing.mjs.map +1 -0
- package/dist/plugins/wallet/protocol.d.mts +1 -0
- package/dist/plugins/wallet/protocol.mjs +96 -0
- package/dist/plugins/wallet/protocol.mjs.map +1 -0
- package/dist/plugins/wallet/routable.mjs +32 -0
- package/dist/plugins/wallet/routable.mjs.map +1 -0
- package/dist/plugins/wallet/server.d.mts +12 -0
- package/dist/plugins/wallet/server.mjs +317 -0
- package/dist/plugins/wallet/server.mjs.map +1 -0
- package/dist/plugins/wallet/service.d.mts +68 -0
- package/dist/plugins/wallet/service.mjs +97 -0
- package/dist/plugins/wallet/service.mjs.map +1 -0
- package/dist/plugins/wallet/snapshot.d.mts +1 -0
- package/dist/plugins/wallet/snapshot.mjs +14 -0
- package/dist/plugins/wallet/snapshot.mjs.map +1 -0
- package/dist/plugins/walrus/bootstrap-assets/cargo-image.mjs +42 -0
- package/dist/plugins/walrus/bootstrap-assets/cargo-image.mjs.map +1 -0
- package/dist/plugins/walrus/codegen.d.mts +38 -0
- package/dist/plugins/walrus/codegen.mjs +34 -0
- package/dist/plugins/walrus/codegen.mjs.map +1 -0
- package/dist/plugins/walrus/deploy-paths.mjs +14 -0
- package/dist/plugins/walrus/deploy-paths.mjs.map +1 -0
- package/dist/plugins/walrus/deploy.d.mts +1 -0
- package/dist/plugins/walrus/deploy.mjs +224 -0
- package/dist/plugins/walrus/deploy.mjs.map +1 -0
- package/dist/plugins/walrus/errors.d.mts +38 -0
- package/dist/plugins/walrus/errors.mjs +26 -0
- package/dist/plugins/walrus/errors.mjs.map +1 -0
- package/dist/plugins/walrus/faucet-strategy.d.mts +12 -0
- package/dist/plugins/walrus/faucet-strategy.mjs +62 -0
- package/dist/plugins/walrus/faucet-strategy.mjs.map +1 -0
- package/dist/plugins/walrus/index.d.mts +177 -0
- package/dist/plugins/walrus/index.mjs +284 -0
- package/dist/plugins/walrus/index.mjs.map +1 -0
- package/dist/plugins/walrus/mode/known-deploy.d.mts +25 -0
- package/dist/plugins/walrus/mode/known-deploy.mjs +71 -0
- package/dist/plugins/walrus/mode/known-deploy.mjs.map +1 -0
- package/dist/plugins/walrus/mode/local-cluster.d.mts +34 -0
- package/dist/plugins/walrus/mode/local-cluster.mjs +153 -0
- package/dist/plugins/walrus/mode/local-cluster.mjs.map +1 -0
- package/dist/plugins/walrus/plugin-key.mjs +7 -0
- package/dist/plugins/walrus/plugin-key.mjs.map +1 -0
- package/dist/plugins/walrus/registry-publish.d.mts +24 -0
- package/dist/plugins/walrus/registry-publish.mjs +7 -0
- package/dist/plugins/walrus/registry-publish.mjs.map +1 -0
- package/dist/plugins/walrus/routable.mjs +99 -0
- package/dist/plugins/walrus/routable.mjs.map +1 -0
- package/dist/plugins/walrus/service.mjs +20 -0
- package/dist/plugins/walrus/service.mjs.map +1 -0
- package/dist/plugins/walrus/snapshot.mjs +53 -0
- package/dist/plugins/walrus/snapshot.mjs.map +1 -0
- package/dist/plugins/walrus/storage-nodes.d.mts +15 -0
- package/dist/plugins/walrus/storage-nodes.mjs +154 -0
- package/dist/plugins/walrus/storage-nodes.mjs.map +1 -0
- package/dist/plugins/walrus/wal-swap.d.mts +2 -0
- package/dist/plugins/walrus/wal-swap.mjs +58 -0
- package/dist/plugins/walrus/wal-swap.mjs.map +1 -0
- package/dist/primitives/artifact-publisher.d.mts +12 -0
- package/dist/primitives/cache.d.mts +1 -0
- package/dist/runtime/built-in-plugin-layers.mjs +49 -0
- package/dist/runtime/built-in-plugin-layers.mjs.map +1 -0
- package/dist/runtime/docker/client.d.mts +2 -0
- package/dist/runtime/docker/client.mjs +54 -0
- package/dist/runtime/docker/client.mjs.map +1 -0
- package/dist/runtime/docker/container.d.mts +1 -0
- package/dist/runtime/docker/container.mjs +562 -0
- package/dist/runtime/docker/container.mjs.map +1 -0
- package/dist/runtime/docker/errors.d.mts +1 -0
- package/dist/runtime/docker/errors.mjs +187 -0
- package/dist/runtime/docker/errors.mjs.map +1 -0
- package/dist/runtime/docker/exec.d.mts +1 -0
- package/dist/runtime/docker/exec.mjs +63 -0
- package/dist/runtime/docker/exec.mjs.map +1 -0
- package/dist/runtime/docker/image.d.mts +1 -0
- package/dist/runtime/docker/image.mjs +278 -0
- package/dist/runtime/docker/image.mjs.map +1 -0
- package/dist/runtime/docker/index.d.mts +1 -0
- package/dist/runtime/docker/inventory.d.mts +1 -0
- package/dist/runtime/docker/inventory.mjs +167 -0
- package/dist/runtime/docker/inventory.mjs.map +1 -0
- package/dist/runtime/docker/labels.d.mts +1 -0
- package/dist/runtime/docker/labels.mjs +97 -0
- package/dist/runtime/docker/labels.mjs.map +1 -0
- package/dist/runtime/docker/logs.d.mts +1 -0
- package/dist/runtime/docker/logs.mjs +34 -0
- package/dist/runtime/docker/logs.mjs.map +1 -0
- package/dist/runtime/docker/network.d.mts +1 -0
- package/dist/runtime/docker/network.mjs +168 -0
- package/dist/runtime/docker/network.mjs.map +1 -0
- package/dist/runtime/docker/service.d.mts +9 -0
- package/dist/runtime/docker/service.mjs +266 -0
- package/dist/runtime/docker/service.mjs.map +1 -0
- package/dist/runtime/docker/sweep.d.mts +1 -0
- package/dist/runtime/docker/sweep.mjs +220 -0
- package/dist/runtime/docker/sweep.mjs.map +1 -0
- package/dist/runtime/docker/volume.d.mts +1 -0
- package/dist/runtime/docker/volume.mjs +24 -0
- package/dist/runtime/docker/volume.mjs.map +1 -0
- package/dist/runtime/docker/wrap.d.mts +1 -0
- package/dist/runtime/docker/wrap.mjs +131 -0
- package/dist/runtime/docker/wrap.mjs.map +1 -0
- package/dist/substrate/brand.d.mts +24 -0
- package/dist/substrate/brand.mjs +14 -0
- package/dist/substrate/brand.mjs.map +1 -0
- package/dist/substrate/cross-process.d.mts +1 -0
- package/dist/substrate/cross-process.mjs +28 -0
- package/dist/substrate/cross-process.mjs.map +1 -0
- package/dist/substrate/events.d.mts +117 -0
- package/dist/substrate/identity.d.mts +13 -0
- package/dist/substrate/lifecycle.d.mts +12 -0
- package/dist/substrate/manifest.d.mts +39 -0
- package/dist/substrate/manifest.mjs +33 -0
- package/dist/substrate/manifest.mjs.map +1 -0
- package/dist/substrate/network.d.mts +34 -0
- package/dist/substrate/options.d.mts +23 -0
- package/dist/substrate/plugin.d.mts +101 -0
- package/dist/substrate/plugin.mjs +61 -0
- package/dist/substrate/plugin.mjs.map +1 -0
- package/dist/substrate/projection.d.mts +100 -0
- package/dist/substrate/runtime/artifact-publisher/index.mjs +76 -0
- package/dist/substrate/runtime/artifact-publisher/index.mjs.map +1 -0
- package/dist/substrate/runtime/atomic-write.mjs +106 -0
- package/dist/substrate/runtime/atomic-write.mjs.map +1 -0
- package/dist/substrate/runtime/cache/index.d.mts +1 -0
- package/dist/substrate/runtime/cache/schema.d.mts +1 -0
- package/dist/substrate/runtime/cache/schema.mjs +22 -0
- package/dist/substrate/runtime/cache/schema.mjs.map +1 -0
- package/dist/substrate/runtime/cache/service.d.mts +1 -0
- package/dist/substrate/runtime/cache/service.mjs +89 -0
- package/dist/substrate/runtime/cache/service.mjs.map +1 -0
- package/dist/substrate/runtime/capability-sinks/index.d.mts +1 -0
- package/dist/substrate/runtime/capability-sinks/layer.d.mts +1 -0
- package/dist/substrate/runtime/capability-sinks/layer.mjs +31 -0
- package/dist/substrate/runtime/capability-sinks/layer.mjs.map +1 -0
- package/dist/substrate/runtime/capability-sinks/service.d.mts +36 -0
- package/dist/substrate/runtime/capability-sinks/service.mjs +74 -0
- package/dist/substrate/runtime/capability-sinks/service.mjs.map +1 -0
- package/dist/substrate/runtime/config-validation.d.mts +38 -0
- package/dist/substrate/runtime/config-validation.mjs +137 -0
- package/dist/substrate/runtime/config-validation.mjs.map +1 -0
- package/dist/substrate/runtime/context-helpers.mjs +32 -0
- package/dist/substrate/runtime/context-helpers.mjs.map +1 -0
- package/dist/substrate/runtime/cross-process/command-channel/channel.mjs +128 -0
- package/dist/substrate/runtime/cross-process/command-channel/channel.mjs.map +1 -0
- package/dist/substrate/runtime/cross-process/command-channel/file-channel.mjs +136 -0
- package/dist/substrate/runtime/cross-process/command-channel/file-channel.mjs.map +1 -0
- package/dist/substrate/runtime/cross-process/command-channel/protocol.mjs +49 -0
- package/dist/substrate/runtime/cross-process/command-channel/protocol.mjs.map +1 -0
- package/dist/substrate/runtime/cross-process/command-channel/runtime-control-lock.mjs +9 -0
- package/dist/substrate/runtime/cross-process/command-channel/runtime-control-lock.mjs.map +1 -0
- package/dist/substrate/runtime/cross-process/liveness.mjs +119 -0
- package/dist/substrate/runtime/cross-process/liveness.mjs.map +1 -0
- package/dist/substrate/runtime/cross-process/roster.mjs +275 -0
- package/dist/substrate/runtime/cross-process/roster.mjs.map +1 -0
- package/dist/substrate/runtime/cross-process/snapshot-reservation.d.mts +1 -0
- package/dist/substrate/runtime/cross-process/snapshot-reservation.mjs +117 -0
- package/dist/substrate/runtime/cross-process/snapshot-reservation.mjs.map +1 -0
- package/dist/substrate/runtime/cross-process/stack-lock.d.mts +1 -0
- package/dist/substrate/runtime/cross-process/stack-lock.mjs +142 -0
- package/dist/substrate/runtime/cross-process/stack-lock.mjs.map +1 -0
- package/dist/substrate/runtime/current-plugin.mjs +15 -0
- package/dist/substrate/runtime/current-plugin.mjs.map +1 -0
- package/dist/substrate/runtime/errors.d.mts +1 -0
- package/dist/substrate/runtime/errors.mjs +76 -0
- package/dist/substrate/runtime/errors.mjs.map +1 -0
- package/dist/substrate/runtime/host-tree-tar/index.mjs +364 -0
- package/dist/substrate/runtime/host-tree-tar/index.mjs.map +1 -0
- package/dist/substrate/runtime/http-probe.d.mts +35 -0
- package/dist/substrate/runtime/http-probe.mjs +65 -0
- package/dist/substrate/runtime/http-probe.mjs.map +1 -0
- package/dist/substrate/runtime/lease-broker/index.d.mts +1 -0
- package/dist/substrate/runtime/lease-broker/service.d.mts +64 -0
- package/dist/substrate/runtime/lease-broker/service.mjs +155 -0
- package/dist/substrate/runtime/lease-broker/service.mjs.map +1 -0
- package/dist/substrate/runtime/lifecycle/dep-graph.d.mts +1 -0
- package/dist/substrate/runtime/lifecycle/dep-graph.mjs +138 -0
- package/dist/substrate/runtime/lifecycle/dep-graph.mjs.map +1 -0
- package/dist/substrate/runtime/lifecycle/index.d.mts +1 -0
- package/dist/substrate/runtime/lifecycle/lifecycle-fact.mjs +31 -0
- package/dist/substrate/runtime/lifecycle/lifecycle-fact.mjs.map +1 -0
- package/dist/substrate/runtime/lifecycle/plugin-registry.d.mts +1 -0
- package/dist/substrate/runtime/lifecycle/plugin-registry.mjs +133 -0
- package/dist/substrate/runtime/lifecycle/plugin-registry.mjs.map +1 -0
- package/dist/substrate/runtime/lifecycle/ready-gate.d.mts +1 -0
- package/dist/substrate/runtime/lifecycle/ready-gate.mjs +34 -0
- package/dist/substrate/runtime/lifecycle/ready-gate.mjs.map +1 -0
- package/dist/substrate/runtime/lifecycle/selective-restart.d.mts +1 -0
- package/dist/substrate/runtime/lifecycle/selective-restart.mjs +43 -0
- package/dist/substrate/runtime/lifecycle/selective-restart.mjs.map +1 -0
- package/dist/substrate/runtime/lifecycle/signals.d.mts +1 -0
- package/dist/substrate/runtime/lifecycle/signals.mjs +64 -0
- package/dist/substrate/runtime/lifecycle/signals.mjs.map +1 -0
- package/dist/substrate/runtime/lifecycle/state-machine.d.mts +1 -0
- package/dist/substrate/runtime/lifecycle/state-machine.mjs +38 -0
- package/dist/substrate/runtime/lifecycle/state-machine.mjs.map +1 -0
- package/dist/substrate/runtime/lifecycle/watch-attribution.d.mts +1 -0
- package/dist/substrate/runtime/lifecycle/watch-attribution.mjs +27 -0
- package/dist/substrate/runtime/lifecycle/watch-attribution.mjs.map +1 -0
- package/dist/substrate/runtime/managed-container.d.mts +30 -0
- package/dist/substrate/runtime/managed-container.mjs +32 -0
- package/dist/substrate/runtime/managed-container.mjs.map +1 -0
- package/dist/substrate/runtime/manifest/manifest.mjs +73 -0
- package/dist/substrate/runtime/manifest/manifest.mjs.map +1 -0
- package/dist/substrate/runtime/mode-errors.d.mts +36 -0
- package/dist/substrate/runtime/observability/cascade-formatter.d.mts +1 -0
- package/dist/substrate/runtime/observability/cascade-formatter.mjs +135 -0
- package/dist/substrate/runtime/observability/cascade-formatter.mjs.map +1 -0
- package/dist/substrate/runtime/observability/formatter-registry.d.mts +1 -0
- package/dist/substrate/runtime/observability/formatter-registry.mjs +65 -0
- package/dist/substrate/runtime/observability/formatter-registry.mjs.map +1 -0
- package/dist/substrate/runtime/observability/index.d.mts +3 -0
- package/dist/substrate/runtime/observability/logger.d.mts +58 -0
- package/dist/substrate/runtime/observability/logger.mjs +89 -0
- package/dist/substrate/runtime/observability/logger.mjs.map +1 -0
- package/dist/substrate/runtime/observability/pretty-error.d.mts +1 -0
- package/dist/substrate/runtime/observability/pretty-error.mjs +119 -0
- package/dist/substrate/runtime/observability/pretty-error.mjs.map +1 -0
- package/dist/substrate/runtime/observability/process-lines.d.mts +31 -0
- package/dist/substrate/runtime/observability/process-lines.mjs +40 -0
- package/dist/substrate/runtime/observability/process-lines.mjs.map +1 -0
- package/dist/substrate/runtime/observability/redaction.d.mts +28 -0
- package/dist/substrate/runtime/observability/redaction.mjs +45 -0
- package/dist/substrate/runtime/observability/redaction.mjs.map +1 -0
- package/dist/substrate/runtime/observability/spans.d.mts +1 -0
- package/dist/substrate/runtime/observability/spans.mjs +87 -0
- package/dist/substrate/runtime/observability/spans.mjs.map +1 -0
- package/dist/substrate/runtime/observability/subprocess-capture.d.mts +2 -0
- package/dist/substrate/runtime/observability/subprocess-capture.mjs +82 -0
- package/dist/substrate/runtime/observability/subprocess-capture.mjs.map +1 -0
- package/dist/substrate/runtime/paths.d.mts +17 -0
- package/dist/substrate/runtime/paths.mjs +61 -0
- package/dist/substrate/runtime/paths.mjs.map +1 -0
- package/dist/substrate/runtime/port-broker/index.d.mts +1 -0
- package/dist/substrate/runtime/port-broker/service.d.mts +1 -0
- package/dist/substrate/runtime/port-broker/service.mjs +319 -0
- package/dist/substrate/runtime/port-broker/service.mjs.map +1 -0
- package/dist/substrate/runtime/post-acquire-tasks.d.mts +1 -0
- package/dist/substrate/runtime/post-acquire-tasks.mjs +34 -0
- package/dist/substrate/runtime/post-acquire-tasks.mjs.map +1 -0
- package/dist/substrate/runtime/probes.d.mts +51 -0
- package/dist/substrate/runtime/probes.mjs +84 -0
- package/dist/substrate/runtime/probes.mjs.map +1 -0
- package/dist/substrate/runtime/process-supervisor.d.mts +57 -0
- package/dist/substrate/runtime/process-supervisor.mjs +73 -0
- package/dist/substrate/runtime/process-supervisor.mjs.map +1 -0
- package/dist/substrate/runtime/projection/operational-endpoints.mjs +44 -0
- package/dist/substrate/runtime/projection/operational-endpoints.mjs.map +1 -0
- package/dist/substrate/runtime/projection/persisted.mjs +195 -0
- package/dist/substrate/runtime/projection/persisted.mjs.map +1 -0
- package/dist/substrate/runtime/projection/state-ref.mjs +48 -0
- package/dist/substrate/runtime/projection/state-ref.mjs.map +1 -0
- package/dist/substrate/runtime/projection/update.mjs +200 -0
- package/dist/substrate/runtime/projection/update.mjs.map +1 -0
- package/dist/substrate/runtime/retry-policy.d.mts +18 -0
- package/dist/substrate/runtime/retry-policy.mjs +16 -0
- package/dist/substrate/runtime/retry-policy.mjs.map +1 -0
- package/dist/substrate/runtime/run.mjs +86 -0
- package/dist/substrate/runtime/run.mjs.map +1 -0
- package/dist/substrate/runtime/runtime-decode.d.mts +32 -0
- package/dist/substrate/runtime/runtime-decode.mjs +53 -0
- package/dist/substrate/runtime/runtime-decode.mjs.map +1 -0
- package/dist/substrate/runtime/scoped-http-server.mjs +36 -0
- package/dist/substrate/runtime/scoped-http-server.mjs.map +1 -0
- package/dist/substrate/runtime/scoped-ref-map/service.mjs +83 -0
- package/dist/substrate/runtime/scoped-ref-map/service.mjs.map +1 -0
- package/dist/substrate/runtime/stage-and-swap/index.d.mts +1 -0
- package/dist/substrate/runtime/stage-and-swap/index.mjs +131 -0
- package/dist/substrate/runtime/stage-and-swap/index.mjs.map +1 -0
- package/dist/substrate/runtime/state-store/schema.mjs +36 -0
- package/dist/substrate/runtime/state-store/schema.mjs.map +1 -0
- package/dist/substrate/runtime/strategy-registry/chain-probe-for.d.mts +1 -0
- package/dist/substrate/runtime/strategy-registry/chain-probe-for.mjs +22 -0
- package/dist/substrate/runtime/strategy-registry/chain-probe-for.mjs.map +1 -0
- package/dist/substrate/runtime/strategy-registry/faucet-capability-for.d.mts +1 -0
- package/dist/substrate/runtime/strategy-registry/faucet-capability-for.mjs +30 -0
- package/dist/substrate/runtime/strategy-registry/faucet-capability-for.mjs.map +1 -0
- package/dist/substrate/runtime/strategy-registry/index.d.mts +1 -0
- package/dist/substrate/runtime/strategy-registry/service.d.mts +1 -0
- package/dist/substrate/runtime/strategy-registry/service.mjs +67 -0
- package/dist/substrate/runtime/strategy-registry/service.mjs.map +1 -0
- package/dist/substrate/runtime/sui-execute/index.d.mts +11 -0
- package/dist/substrate/runtime/sui-execute/index.mjs +144 -0
- package/dist/substrate/runtime/sui-execute/index.mjs.map +1 -0
- package/dist/substrate/runtime/sui-move-build/index.d.mts +1 -0
- package/dist/substrate/runtime/sui-move-build/index.mjs +283 -0
- package/dist/substrate/runtime/sui-move-build/index.mjs.map +1 -0
- package/dist/substrate/runtime/supervisor.d.mts +1 -0
- package/dist/substrate/runtime/supervisor.mjs +831 -0
- package/dist/substrate/runtime/supervisor.mjs.map +1 -0
- package/dist/surfaces/cli/command-tree.mjs +276 -0
- package/dist/surfaces/cli/command-tree.mjs.map +1 -0
- package/dist/surfaces/cli/commands/config.mjs +31 -0
- package/dist/surfaces/cli/commands/config.mjs.map +1 -0
- package/dist/surfaces/cli/commands/confirm-node.mjs +26 -0
- package/dist/surfaces/cli/commands/confirm-node.mjs.map +1 -0
- package/dist/surfaces/cli/commands/confirm.mjs +26 -0
- package/dist/surfaces/cli/commands/confirm.mjs.map +1 -0
- package/dist/surfaces/cli/commands/doctor-probes.mjs +452 -0
- package/dist/surfaces/cli/commands/doctor-probes.mjs.map +1 -0
- package/dist/surfaces/cli/commands/doctor.mjs +38 -0
- package/dist/surfaces/cli/commands/doctor.mjs.map +1 -0
- package/dist/surfaces/cli/commands/prune-picker.mjs +347 -0
- package/dist/surfaces/cli/commands/prune-picker.mjs.map +1 -0
- package/dist/surfaces/cli/commands/prune.mjs +178 -0
- package/dist/surfaces/cli/commands/prune.mjs.map +1 -0
- package/dist/surfaces/cli/commands/snapshot.mjs +141 -0
- package/dist/surfaces/cli/commands/snapshot.mjs.map +1 -0
- package/dist/surfaces/cli/commands/status.mjs +95 -0
- package/dist/surfaces/cli/commands/status.mjs.map +1 -0
- package/dist/surfaces/cli/commands/supervisor-presence.mjs +33 -0
- package/dist/surfaces/cli/commands/supervisor-presence.mjs.map +1 -0
- package/dist/surfaces/cli/commands/wipe.mjs +28 -0
- package/dist/surfaces/cli/commands/wipe.mjs.map +1 -0
- package/dist/surfaces/cli/envelope.mjs +43 -0
- package/dist/surfaces/cli/envelope.mjs.map +1 -0
- package/dist/surfaces/cli/errors.mjs +110 -0
- package/dist/surfaces/cli/errors.mjs.map +1 -0
- package/dist/surfaces/cli/flags.mjs +56 -0
- package/dist/surfaces/cli/flags.mjs.map +1 -0
- package/dist/surfaces/cli/index.mjs +418 -0
- package/dist/surfaces/cli/index.mjs.map +1 -0
- package/dist/surfaces/cli/output.mjs +115 -0
- package/dist/surfaces/cli/output.mjs.map +1 -0
- package/dist/surfaces/cli/sysexits.mjs +139 -0
- package/dist/surfaces/cli/sysexits.mjs.map +1 -0
- package/dist/surfaces/tui/app.mjs +104 -0
- package/dist/surfaces/tui/app.mjs.map +1 -0
- package/dist/surfaces/tui/dashboard.mjs +261 -0
- package/dist/surfaces/tui/dashboard.mjs.map +1 -0
- package/dist/surfaces/tui/display-derivation.mjs +395 -0
- package/dist/surfaces/tui/display-derivation.mjs.map +1 -0
- package/dist/surfaces/tui/errors.mjs +11 -0
- package/dist/surfaces/tui/errors.mjs.map +1 -0
- package/dist/surfaces/tui/event-log.mjs +155 -0
- package/dist/surfaces/tui/event-log.mjs.map +1 -0
- package/dist/surfaces/tui/heartbeat.mjs +33 -0
- package/dist/surfaces/tui/heartbeat.mjs.map +1 -0
- package/dist/surfaces/tui/index.mjs +50 -0
- package/dist/surfaces/tui/index.mjs.map +1 -0
- package/dist/surfaces/tui/input.mjs +104 -0
- package/dist/surfaces/tui/input.mjs.map +1 -0
- package/dist/surfaces/tui/mode-detect.mjs +32 -0
- package/dist/surfaces/tui/mode-detect.mjs.map +1 -0
- package/dist/surfaces/tui/mount-ink.mjs +31 -0
- package/dist/surfaces/tui/mount-ink.mjs.map +1 -0
- package/dist/surfaces/tui/plain-renderer.mjs +170 -0
- package/dist/surfaces/tui/plain-renderer.mjs.map +1 -0
- package/dist/surfaces/tui/resource-table.mjs +507 -0
- package/dist/surfaces/tui/resource-table.mjs.map +1 -0
- package/images/_shared/signal-forward.sh +77 -0
- package/images/postgres/Dockerfile +32 -0
- package/images/seal/Dockerfile +68 -0
- package/images/seal/entrypoint.sh +65 -0
- package/images/sui/Dockerfile +73 -0
- package/images/sui/entrypoint.sh +244 -0
- package/images/sui-fork/Dockerfile +53 -0
- package/images/sui-fork/entrypoint.sh +51 -0
- package/images/walrus/Dockerfile +122 -0
- package/images/walrus/deploy-walrus.sh +305 -0
- package/images/walrus/run-walrus.sh +53 -0
- package/package.json +94 -0
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"stack-context.mjs","names":["runtimeDiscoverManifestPath","readStackContextRuntime","port","runtimeColdStartUrl"],"sources":["../../../src/build-integrations/playwright/stack-context.ts"],"sourcesContent":["// Stack-context surface for the Playwright preset — thin wrapper\n// over `runtime/`'s sync read API.\n//\n// Playwright config-load is synchronous; it runs BEFORE the supervisor\n// spawns, so the preset MUST support a cold-start fallback that picks\n// a conventional URL when the manifest isn't on disk yet. The\n// decode + version-gate + walk-up live in `runtime/`; this surface\n// re-shapes the result into playwright-flavored typed errors and the\n// endpoint-name accessors in-spec helpers use.\n\nimport {\n\tdiscoverManifestPath as runtimeDiscoverManifestPath,\n\tcoldStartUrl as runtimeColdStartUrl,\n\tconventionalRoutesFromHints,\n\tEndpointRegistry,\n\tmanifestEnvelopeFromStackContext,\n\tManifestDiscoveryError,\n\tManifestShapeError,\n\treadStackContext as readStackContextRuntime,\n\ttype DiscoverManifestPathOptions,\n\ttype ResolvedEndpoint as RuntimeResolvedEndpoint,\n\ttype StackContext as RuntimeStackContext,\n} from '../runtime/index.ts';\nimport type { EndpointEntry, ManifestEnvelope } from '../../substrate/manifest.ts';\nimport {\n\tPlaywrightEndpointNotFoundError,\n\tPlaywrightManifestDiscoveryError,\n\tPlaywrightManifestShapeError,\n} from './errors.ts';\n\n/** Centralized env-var names this surface consults. Kept in sync with\n * the CLI's `ENV_VARS` table. */\nexport const PLAYWRIGHT_ENV = {\n\tSTATE_DIR: 'DEVSTACK_STATE_DIR',\n\tSTACK: 'DEVSTACK_STACK',\n\tMANIFEST_PATH: 'DEVSTACK_MANIFEST_PATH',\n\tROUTER_HOST_SUFFIX: 'DEVSTACK_ROUTER_HOST_SUFFIX',\n\tROUTER_PORT: 'DEVSTACK_ROUTER_PORT',\n} as const;\n\nexport interface ResolveStackContextOptions {\n\t/** Working directory to start the walk-up from. */\n\treadonly cwd?: string;\n\t/** Explicit manifest path. Wins over discovery + env. */\n\treadonly manifestPath?: string;\n\t/** Explicit `<stateDir>` root override. Combined with `stack` to\n\t * form `<root>/stacks/<stack>/manifest.json`. */\n\treadonly stateDir?: string;\n\t/** Stack name override. Defaults to env `DEVSTACK_STACK`. */\n\treadonly stack?: string;\n\t/** Env bag (defaults to `process.env`). Injectable for tests. */\n\treadonly env?: Readonly<Record<string, string | undefined>>;\n}\n\nexport interface StackContext {\n\treadonly manifest: ManifestEnvelope;\n\treadonly manifestPath: string;\n\treadonly endpointNames: ReadonlyArray<string>;\n\treadonly manifestEndpointKeys: ReadonlyArray<string>;\n\treadonly endpoint: (endpointNameOrAlias: string) => string;\n\treadonly endpointMaybe: (endpointNameOrAlias: string) => string | null;\n\treadonly endpointEntry: (endpointNameOrAlias: string) => EndpointEntry;\n}\n\nexport interface ResolvedEndpoint {\n\treadonly url: string;\n\treadonly source: 'manifest' | 'conventional';\n\treadonly endpointKey: string;\n\treadonly endpointName: string;\n}\n\nconst PLAYWRIGHT_ENDPOINT_ALIASES: Readonly<Record<string, string>> = {\n\tapp: 'dev',\n\twallet: 'wallet-app',\n};\n\nconst PLAYWRIGHT_DEFAULT_ROUTER_PORTS: Readonly<Record<string, number>> = {\n\tapp: 5175,\n\tdev: 5175,\n\twallet: 5175,\n\t'wallet-app': 5175,\n};\n\nexport const playwrightEndpointNameFor = (endpointNameOrAlias: string): string =>\n\tPLAYWRIGHT_ENDPOINT_ALIASES[endpointNameOrAlias] ?? endpointNameOrAlias;\n\nconst endpointRegistryFromEnvelope = (envelope: ManifestEnvelope): EndpointRegistry => {\n\tconst entries: RuntimeResolvedEndpoint[] = [];\n\tfor (const raw of Object.values(envelope.endpoints)) {\n\t\tentries.push({\n\t\t\tname: raw.name,\n\t\t\turl: raw.url,\n\t\t\tdisplayUrl: raw.displayUrl,\n\t\t\twireProtocol: raw.wireProtocol,\n\t\t\tpluginKey: raw.pluginKey as string,\n\t\t\tendpointKey: raw.endpointKey as string,\n\t\t});\n\t}\n\treturn new EndpointRegistry(entries);\n};\n\n// -----------------------------------------------------------------------------\n// Discovery\n// -----------------------------------------------------------------------------\n\nconst buildRuntimeDiscoverOpts = (\n\toptions: ResolveStackContextOptions,\n): DiscoverManifestPathOptions => {\n\tconst env = options.env ?? (process.env as Record<string, string | undefined>);\n\tconst stack = options.stack ?? env[PLAYWRIGHT_ENV.STACK] ?? 'main';\n\tconst stateDir = options.stateDir ?? env[PLAYWRIGHT_ENV.STATE_DIR];\n\treturn {\n\t\tenv,\n\t\tstack,\n\t\t...(options.cwd !== undefined ? { cwd: options.cwd } : {}),\n\t\t...(options.manifestPath !== undefined ? { override: options.manifestPath } : {}),\n\t\t...(stateDir !== undefined && stateDir !== '' ? { stateDir } : {}),\n\t};\n};\n\n/**\n * Find the stack-scoped manifest by walking up from `cwd` looking for\n * `.devstack/stacks/<stack>/manifest.json`. Returns the absolute path\n * + the list of paths probed, or `null` on miss.\n */\nexport const discoverManifestPath = (\n\toptions: ResolveStackContextOptions = {},\n): { readonly path: string; readonly searched: ReadonlyArray<string> } | null => {\n\tconst path = runtimeDiscoverManifestPath(buildRuntimeDiscoverOpts(options));\n\tif (path === undefined) return null;\n\t// Runtime resolver doesn't surface intermediate probe paths today.\n\t// We expose the resolved path in the `searched` array so the\n\t// PlaywrightManifestDiscoveryError can still cite at least one\n\t// concrete path.\n\treturn { path, searched: [path] };\n};\n\n// -----------------------------------------------------------------------------\n// Synchronous read + decode\n// -----------------------------------------------------------------------------\n\n/**\n * Synchronously read + decode the manifest at `manifestPath`. Throws\n * `PlaywrightManifestShapeError` on JSON-parse or schema-decode\n * failure, or version mismatch. Used by callers that already know\n * the path (preset's webServer.url resolution + global-setup).\n */\nexport const readManifestSync = (manifestPath: string): ManifestEnvelope => {\n\ttry {\n\t\treturn manifestEnvelopeFromStackContext(readStackContextRuntime({ manifestPath }));\n\t} catch (cause) {\n\t\tif (cause instanceof ManifestShapeError) {\n\t\t\tthrow new PlaywrightManifestShapeError({\n\t\t\t\tmessage:\n\t\t\t\t\tcause.phase === 'version'\n\t\t\t\t\t\t? `manifest at ${manifestPath} version mismatch: ${cause.message}`\n\t\t\t\t\t\t: `manifest at ${manifestPath} does not match the envelope schema`,\n\t\t\t\tmanifestPath,\n\t\t\t\tphase: cause.phase === 'version' ? 'version-mismatch' : 'shape',\n\t\t\t\trecoveryHint:\n\t\t\t\t\tcause.phase === 'version'\n\t\t\t\t\t\t? `Re-run \\`devstack up\\` to write a manifest at the current version, ` +\n\t\t\t\t\t\t\t`or upgrade @mysten-incubation/devstack to a build-integration ` +\n\t\t\t\t\t\t\t`that understands the new envelope.`\n\t\t\t\t\t\t: `Delete \\`${manifestPath}\\` and run \\`devstack up\\`. If the error ` +\n\t\t\t\t\t\t\t`persists, the build-integration is older than the supervisor.`,\n\t\t\t\tcause,\n\t\t\t});\n\t\t}\n\t\tif (cause instanceof ManifestDiscoveryError) {\n\t\t\tthrow new PlaywrightManifestShapeError({\n\t\t\t\tmessage: `failed to read manifest at ${manifestPath}`,\n\t\t\t\tmanifestPath,\n\t\t\t\tphase: 'parse',\n\t\t\t\trecoveryHint:\n\t\t\t\t\t`Confirm the file exists and is readable. Run \\`devstack up\\` to ` +\n\t\t\t\t\t`regenerate it if the supervisor was interrupted mid-write.`,\n\t\t\t\tcause,\n\t\t\t});\n\t\t}\n\t\tthrow cause;\n\t}\n};\n\n// -----------------------------------------------------------------------------\n// Conventional URL fallback\n// -----------------------------------------------------------------------------\n\n/**\n * Cold-start URL fallback for endpoints with a conventional host\n * pattern. Playwright config-load runs BEFORE the supervisor writes\n * the manifest; the preset MUST be able to resolve a `baseURL`\n * without a manifest read.\n *\n * The route table shape matches `runtime/coldStartUrl`; Playwright\n * only supplies its conventional endpoint hints while the shared\n * runtime helper owns host formatting.\n */\nexport const conventionalUrlFor = (\n\tendpointKey: string,\n\topts: {\n\t\treadonly stack?: string;\n\t\treadonly hostSuffix?: string;\n\t\treadonly port?: number;\n\t\treadonly app?: string;\n\t\treadonly cwd?: string;\n\t\treadonly env?: Readonly<Record<string, string | undefined>>;\n\t} = {},\n): string | null => {\n\tconst stack = opts.stack ?? 'main';\n\tconst env = opts.env ?? (process.env as Record<string, string | undefined>);\n\tconst envPort = Number.parseInt(env[PLAYWRIGHT_ENV.ROUTER_PORT] ?? '', 10);\n\tconst resolvedPort =\n\t\topts.port ??\n\t\t(Number.isFinite(envPort) && envPort > 0 ? envPort : undefined) ??\n\t\tPLAYWRIGHT_DEFAULT_ROUTER_PORTS[endpointKey];\n\n\tif (resolvedPort === undefined || !Number.isFinite(resolvedPort) || resolvedPort <= 0) {\n\t\treturn null;\n\t}\n\tconst port = resolvedPort;\n\n\tconst routes = conventionalRoutesFromHints(\n\t\t[\n\t\t\t{ endpoint: 'app', service: 'dev' },\n\t\t\t{ endpoint: 'dev', service: 'dev' },\n\t\t\t{ endpoint: 'sui-rpc', service: 'sui-rpc' },\n\t\t\t{ endpoint: 'sui-faucet', service: 'sui-faucet' },\n\t\t\t{ endpoint: 'walrus-aggregator', service: 'walrus-aggregator' },\n\t\t\t{ endpoint: 'walrus-publisher', service: 'walrus-publisher' },\n\t\t\t{ endpoint: 'seal', service: 'seal' },\n\t\t\t{ endpoint: 'wallet', service: 'api' },\n\t\t\t{ endpoint: 'wallet-app', service: 'api' },\n\t\t],\n\t\tport,\n\t);\n\tif (!routes.has(endpointKey)) return null;\n\n\treturn runtimeColdStartUrl(endpointKey, {\n\t\troutes,\n\t\tstack,\n\t\t...(opts.app !== undefined ? { app: opts.app } : {}),\n\t\t...(opts.cwd !== undefined ? { cwd: opts.cwd } : {}),\n\t\t...(opts.hostSuffix !== undefined ? { hostSuffix: opts.hostSuffix } : {}),\n\t});\n};\n\n// -----------------------------------------------------------------------------\n// Public readers\n// -----------------------------------------------------------------------------\n\n/**\n * Synchronously resolve the full stack context. Throws on missing\n * manifest (no cold-start fallback here — caller wants the typed\n * envelope, not a guessed URL).\n */\nexport const readStackContext = (options: ResolveStackContextOptions = {}): StackContext => {\n\ttry {\n\t\tconst ctx = readStackContextRuntime(buildRuntimeDiscoverOpts(options));\n\t\treturn projectFromRuntime(ctx);\n\t} catch (err) {\n\t\tif (err instanceof ManifestDiscoveryError) {\n\t\t\tthrow new PlaywrightManifestDiscoveryError({\n\t\t\t\tmessage: 'no manifest found along walk-up path or env override',\n\t\t\t\tsearchedPaths: err.path !== undefined ? [err.path] : [],\n\t\t\t\trecoveryHint:\n\t\t\t\t\t`Run \\`devstack up\\` from your example app's directory to write ` +\n\t\t\t\t\t`the manifest, or set DEVSTACK_MANIFEST_PATH to an explicit path.`,\n\t\t\t});\n\t\t}\n\t\tif (err instanceof ManifestShapeError) {\n\t\t\tthrow new PlaywrightManifestShapeError({\n\t\t\t\tmessage: err.message,\n\t\t\t\tmanifestPath: err.path,\n\t\t\t\tphase: err.phase === 'version' ? 'version-mismatch' : err.phase,\n\t\t\t\trecoveryHint: `Delete \\`${err.path}\\` and run \\`devstack up\\` to regenerate.`,\n\t\t\t\tcause: err,\n\t\t\t});\n\t\t}\n\t\tthrow err;\n\t}\n};\n\nconst projectFromRuntime = (ctx: RuntimeStackContext): StackContext => {\n\tconst envelope = manifestEnvelopeFromStackContext(ctx);\n\treturn makeStackContext(envelope, ctx.manifestPath);\n};\n\n/** Project an in-memory envelope (test fixtures use this) into the\n * same accessor shape as the on-disk read. */\nexport const makeStackContext = (\n\tenvelope: ManifestEnvelope,\n\tmanifestPath: string,\n): StackContext => {\n\tconst endpoints = endpointRegistryFromEnvelope(envelope);\n\tconst manifestEndpointKeys = Object.keys(envelope.endpoints).sort();\n\tconst endpointNames = endpoints.names();\n\tconst notFound = (endpointKey: string, endpointName: string): PlaywrightEndpointNotFoundError =>\n\t\tnew PlaywrightEndpointNotFoundError({\n\t\t\tmessage:\n\t\t\t\t`no endpoint \\`${endpointKey}\\` (resolved endpoint name \\`${endpointName}\\`) ` +\n\t\t\t\t`in manifest at ${manifestPath}`,\n\t\t\tendpointKey,\n\t\t\tendpointName,\n\t\t\tavailable: endpointNames,\n\t\t\tmanifestKeys: manifestEndpointKeys,\n\t\t\trecoveryHint:\n\t\t\t\t`Available endpoint names: ${endpointNames.join(', ') || '(none)'}. ` +\n\t\t\t\t`Raw manifest keys: ${manifestEndpointKeys.join(', ') || '(none)'}. ` +\n\t\t\t\t`Check the plugin emitting this endpoint is present in your stack, ` +\n\t\t\t\t`or check for a typo in the endpoint name.`,\n\t\t});\n\tconst findEndpoint = (endpointNameOrAlias: string): RuntimeResolvedEndpoint | undefined =>\n\t\tendpoints.byName(playwrightEndpointNameFor(endpointNameOrAlias));\n\tconst rawEntryFor = (resolved: RuntimeResolvedEndpoint): EndpointEntry => {\n\t\tconst byMapKey = envelope.endpoints[resolved.endpointKey];\n\t\tif (byMapKey !== undefined) return byMapKey;\n\t\tconst byEntryKey = Object.values(envelope.endpoints).find(\n\t\t\t(entry) => (entry.endpointKey as string) === resolved.endpointKey,\n\t\t);\n\t\tif (byEntryKey !== undefined) return byEntryKey;\n\t\treturn {\n\t\t\tname: resolved.name,\n\t\t\turl: resolved.url,\n\t\t\tdisplayUrl: resolved.displayUrl,\n\t\t\twireProtocol: resolved.wireProtocol,\n\t\t\tpluginKey: resolved.pluginKey as never,\n\t\t\tendpointKey: resolved.endpointKey as never,\n\t\t};\n\t};\n\n\treturn {\n\t\tmanifest: envelope,\n\t\tmanifestPath,\n\t\tendpointNames,\n\t\tmanifestEndpointKeys,\n\t\tendpoint: (endpointNameOrAlias: string): string => {\n\t\t\tconst endpointName = playwrightEndpointNameFor(endpointNameOrAlias);\n\t\t\tconst entry = findEndpoint(endpointNameOrAlias);\n\t\t\tif (entry === undefined) {\n\t\t\t\tthrow notFound(endpointNameOrAlias, endpointName);\n\t\t\t}\n\t\t\treturn entry.url;\n\t\t},\n\t\tendpointMaybe: (endpointNameOrAlias: string): string | null =>\n\t\t\tfindEndpoint(endpointNameOrAlias)?.url ?? null,\n\t\tendpointEntry: (endpointNameOrAlias: string): EndpointEntry => {\n\t\t\tconst endpointName = playwrightEndpointNameFor(endpointNameOrAlias);\n\t\t\tconst entry = findEndpoint(endpointNameOrAlias);\n\t\t\tif (entry === undefined) {\n\t\t\t\tthrow notFound(endpointNameOrAlias, endpointName);\n\t\t\t}\n\t\t\treturn rawEntryFor(entry);\n\t\t},\n\t};\n};\n\n/**\n * Resolve a URL for a single endpoint with cold-start fallback to the\n * conventional URL when the manifest is absent. Throws when both the\n * manifest and the conventional table miss.\n */\nexport const resolveEndpointUrl = (\n\tendpointNameOrAlias: string,\n\toptions: ResolveStackContextOptions & {\n\t\treadonly port?: number;\n\t\treadonly hostSuffix?: string;\n\t} = {},\n): ResolvedEndpoint => {\n\tconst endpointName = playwrightEndpointNameFor(endpointNameOrAlias);\n\tlet ctx: StackContext | undefined;\n\ttry {\n\t\tctx = readStackContext(options);\n\t} catch (err) {\n\t\tif (!(err instanceof PlaywrightManifestDiscoveryError)) throw err;\n\t}\n\tif (ctx !== undefined) {\n\t\tconst entry = ctx.endpointEntry(endpointNameOrAlias);\n\t\treturn { url: entry.url, source: 'manifest', endpointKey: entry.endpointKey, endpointName };\n\t}\n\n\tconst env = options.env ?? (process.env as Record<string, string | undefined>);\n\tconst stack = options.stack ?? env[PLAYWRIGHT_ENV.STACK] ?? 'main';\n\tconst fallback = conventionalUrlFor(endpointNameOrAlias, {\n\t\tstack,\n\t\t...(options.cwd !== undefined ? { cwd: options.cwd } : {}),\n\t\t...(options.hostSuffix !== undefined\n\t\t\t? { hostSuffix: options.hostSuffix }\n\t\t\t: env[PLAYWRIGHT_ENV.ROUTER_HOST_SUFFIX] !== undefined\n\t\t\t\t? { hostSuffix: env[PLAYWRIGHT_ENV.ROUTER_HOST_SUFFIX] }\n\t\t\t\t: {}),\n\t\t...(options.port !== undefined ? { port: options.port } : {}),\n\t\t...(options.env !== undefined ? { env: options.env } : {}),\n\t});\n\tif (fallback !== null) {\n\t\treturn {\n\t\t\turl: fallback,\n\t\t\tsource: 'conventional',\n\t\t\tendpointKey: endpointNameOrAlias,\n\t\t\tendpointName,\n\t\t};\n\t}\n\n\tthrow new PlaywrightManifestDiscoveryError({\n\t\tmessage:\n\t\t\t`no manifest found and no conventional fallback for endpoint ` +\n\t\t\t`\\`${endpointNameOrAlias}\\` (resolved endpoint name \\`${endpointName}\\`)`,\n\t\tsearchedPaths: [],\n\t\tendpointKey: endpointNameOrAlias,\n\t\trecoveryHint:\n\t\t\t`Run \\`devstack up\\` to materialize the manifest before invoking ` +\n\t\t\t`playwright, or pass an explicit \\`baseURL\\`.`,\n\t});\n};\n"],"mappings":"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"}
|
|
@@ -0,0 +1,87 @@
|
|
|
1
|
+
import { ResolveStackContextOptions, StackContext } from "./stack-context.mjs";
|
|
2
|
+
|
|
3
|
+
//#region src/build-integrations/playwright/wallet-context.d.ts
|
|
4
|
+
/** Subset of `Page` we use. */
|
|
5
|
+
interface PlaywrightPageLike {
|
|
6
|
+
readonly evaluate: <T>(fn: (arg: unknown) => T, arg?: unknown) => Promise<T>;
|
|
7
|
+
}
|
|
8
|
+
/** Public alias for the dev-wallet endpoint. The manifest stores raw
|
|
9
|
+
* keys as `${pluginKey}:${endpointName}` and the actual endpoint name
|
|
10
|
+
* is `wallet-app`; `readStackContext(...).endpointMaybe('wallet')`
|
|
11
|
+
* maps this alias through the Playwright boundary. */
|
|
12
|
+
declare const WALLET_ENDPOINT_KEY: "wallet";
|
|
13
|
+
interface WalletAdapterOptions extends ResolveStackContextOptions {
|
|
14
|
+
/** Override the resolved wallet URL. Useful for tests targeting a
|
|
15
|
+
* remote / non-default stack. */
|
|
16
|
+
readonly walletUrl?: string;
|
|
17
|
+
/** Custom `fetch` for tests. Defaults to `globalThis.fetch`. */
|
|
18
|
+
readonly fetch?: typeof fetch;
|
|
19
|
+
/** Per-request timeout in ms. Default: 5_000. */
|
|
20
|
+
readonly timeoutMs?: number;
|
|
21
|
+
}
|
|
22
|
+
/** Public shape of the wallet adapter — typed by-key methods plus the
|
|
23
|
+
* raw `request` escape hatch. */
|
|
24
|
+
interface WalletAdapter {
|
|
25
|
+
/** Resolved base URL of the wallet plugin. */
|
|
26
|
+
readonly walletUrl: string;
|
|
27
|
+
/** List dev-wallet account names + addresses. */
|
|
28
|
+
readonly listAccounts: () => Promise<ReadonlyArray<DevAccount>>;
|
|
29
|
+
/** Switch the active dev-wallet account by name. Posts to the
|
|
30
|
+
* wallet's `switch-account` endpoint. */
|
|
31
|
+
readonly switchAccount: (accountName: string) => Promise<void>;
|
|
32
|
+
/** Sign + execute a serialized transaction as `accountName`.
|
|
33
|
+
* `txBytes` is the canonical Sui tx bytes (base64). Returns the
|
|
34
|
+
* wallet's response body (typed `unknown` — caller decodes). */
|
|
35
|
+
readonly signTransaction: (input: SignTxRequest) => Promise<SignTxResponse>;
|
|
36
|
+
/** Raw POST escape hatch. Used by the helpers above and by tests
|
|
37
|
+
* that need a wallet-endpoint not in the typed surface. */
|
|
38
|
+
readonly request: <T>(path: string, body?: Record<string, unknown>) => Promise<T>;
|
|
39
|
+
}
|
|
40
|
+
interface DevAccount {
|
|
41
|
+
readonly name: string;
|
|
42
|
+
readonly address: string;
|
|
43
|
+
}
|
|
44
|
+
interface SignTxRequest {
|
|
45
|
+
readonly accountName: string;
|
|
46
|
+
/** Canonical Sui tx bytes, base64-encoded. */
|
|
47
|
+
readonly txBytesBase64: string;
|
|
48
|
+
/** Optional caller-supplied label for correlated trace output. */
|
|
49
|
+
readonly label?: string;
|
|
50
|
+
}
|
|
51
|
+
interface SignTxResponse {
|
|
52
|
+
readonly digest: string;
|
|
53
|
+
readonly signature: string;
|
|
54
|
+
/** Raw response payload (wallet-plugin-versioned shape). */
|
|
55
|
+
readonly raw: unknown;
|
|
56
|
+
}
|
|
57
|
+
/**
|
|
58
|
+
* Build a wallet adapter. Most tests call this once per `test`
|
|
59
|
+
* fixture; the resolution is sync (a hash-lookup on the
|
|
60
|
+
* fixture / manifest) so this is cheap.
|
|
61
|
+
*/
|
|
62
|
+
declare const createWalletAdapter: (options?: WalletAdapterOptions) => WalletAdapter;
|
|
63
|
+
/** Slot name owned by the app's `dapp-kit.ts`. The build integration
|
|
64
|
+
* reads it; the app populates it. Re-exported from `runtime/`'s
|
|
65
|
+
* canonical contract — kept here as a name alias for the
|
|
66
|
+
* in-spec-helpers' import path. */
|
|
67
|
+
declare const DAPP_KIT_SLOT: "__devstackDAppKit__";
|
|
68
|
+
/**
|
|
69
|
+
* Connect/switch the app's active dev-wallet account through the dapp-kit
|
|
70
|
+
* slot the app populates at boot.
|
|
71
|
+
*
|
|
72
|
+
* This intentionally avoids driving the wallet UI. The app-side slot
|
|
73
|
+
* implementation still goes through dapp-kit + wallet-standard, so pairing,
|
|
74
|
+
* origin, and account discovery failures surface as real browser failures.
|
|
75
|
+
*/
|
|
76
|
+
declare const connectAs: (page: PlaywrightPageLike, accountName: string) => Promise<void>;
|
|
77
|
+
/**
|
|
78
|
+
* Switch the dev-wallet's active account by routing through the
|
|
79
|
+
* dapp-kit global slot the app populates at module init. Strictly
|
|
80
|
+
* faster + less flaky than clicking the wallet's UI.
|
|
81
|
+
*/
|
|
82
|
+
declare const selectAccount: (page: PlaywrightPageLike, accountName: string) => Promise<void>;
|
|
83
|
+
/** Test-side accessor for the full manifest (already decoded). */
|
|
84
|
+
declare const loadStackManifest: (options?: ResolveStackContextOptions) => StackContext;
|
|
85
|
+
//#endregion
|
|
86
|
+
export { DAPP_KIT_SLOT, DevAccount, PlaywrightPageLike, SignTxRequest, SignTxResponse, WALLET_ENDPOINT_KEY, WalletAdapter, WalletAdapterOptions, connectAs, createWalletAdapter, loadStackManifest, selectAccount };
|
|
87
|
+
//# sourceMappingURL=wallet-context.d.mts.map
|
|
@@ -0,0 +1,148 @@
|
|
|
1
|
+
import { PlaywrightWalletAdapterError } from "./errors.mjs";
|
|
2
|
+
import { readStackContext } from "./stack-context.mjs";
|
|
3
|
+
import { readStashedFixture } from "./global-setup.mjs";
|
|
4
|
+
import { DAPP_KIT_SLOT_KEY } from "../runtime/dapp-kit-slot.mjs";
|
|
5
|
+
//#region src/build-integrations/playwright/wallet-context.ts
|
|
6
|
+
/** Public alias for the dev-wallet endpoint. The manifest stores raw
|
|
7
|
+
* keys as `${pluginKey}:${endpointName}` and the actual endpoint name
|
|
8
|
+
* is `wallet-app`; `readStackContext(...).endpointMaybe('wallet')`
|
|
9
|
+
* maps this alias through the Playwright boundary. */
|
|
10
|
+
const WALLET_ENDPOINT_KEY = "wallet";
|
|
11
|
+
/**
|
|
12
|
+
* Resolve the dev-wallet URL. Precedence:
|
|
13
|
+
* 1. `options.walletUrl` (explicit override).
|
|
14
|
+
* 2. The fixture stashed by `globalSetup` on `globalThis`.
|
|
15
|
+
* 3. A fresh manifest read.
|
|
16
|
+
*
|
|
17
|
+
* Throws `PlaywrightWalletAdapterError` when every path misses. */
|
|
18
|
+
const resolveWalletUrl = (options) => {
|
|
19
|
+
if (options.walletUrl !== void 0) return options.walletUrl;
|
|
20
|
+
const fixture = readStashedFixture();
|
|
21
|
+
if (fixture !== null && fixture.walletEndpoint !== null) return fixture.walletEndpoint;
|
|
22
|
+
let ctx;
|
|
23
|
+
try {
|
|
24
|
+
ctx = readStackContext(options);
|
|
25
|
+
} catch (cause) {
|
|
26
|
+
throw new PlaywrightWalletAdapterError({
|
|
27
|
+
message: "unable to resolve dev-wallet URL — no globalSetup fixture and manifest read failed",
|
|
28
|
+
operation: "fetch",
|
|
29
|
+
cause
|
|
30
|
+
});
|
|
31
|
+
}
|
|
32
|
+
const walletUrl = ctx.endpointMaybe(WALLET_ENDPOINT_KEY);
|
|
33
|
+
if (walletUrl === null) throw new PlaywrightWalletAdapterError({
|
|
34
|
+
message: `manifest has no \`${WALLET_ENDPOINT_KEY}\` endpoint (alias for \`wallet-app\`) — is the dev-wallet plugin present in your stack? Available endpoint names: ${ctx.endpointNames.join(", ") || "(none)"}. Raw manifest keys: ${ctx.manifestEndpointKeys.join(", ") || "(none)"}.`,
|
|
35
|
+
operation: "fetch"
|
|
36
|
+
});
|
|
37
|
+
return walletUrl;
|
|
38
|
+
};
|
|
39
|
+
/**
|
|
40
|
+
* Build a wallet adapter. Most tests call this once per `test`
|
|
41
|
+
* fixture; the resolution is sync (a hash-lookup on the
|
|
42
|
+
* fixture / manifest) so this is cheap.
|
|
43
|
+
*/
|
|
44
|
+
const createWalletAdapter = (options = {}) => {
|
|
45
|
+
const walletUrl = resolveWalletUrl(options).replace(/\/$/, "");
|
|
46
|
+
const fetchImpl = options.fetch ?? globalThis.fetch;
|
|
47
|
+
const timeoutMs = options.timeoutMs ?? 5e3;
|
|
48
|
+
const request = async (path, body) => {
|
|
49
|
+
const url = `${walletUrl}${path.startsWith("/") ? path : `/${path}`}`;
|
|
50
|
+
const controller = new AbortController();
|
|
51
|
+
const handle = setTimeout(() => controller.abort(), timeoutMs);
|
|
52
|
+
try {
|
|
53
|
+
const res = await fetchImpl(url, {
|
|
54
|
+
method: body === void 0 ? "GET" : "POST",
|
|
55
|
+
headers: { "content-type": "application/json" },
|
|
56
|
+
body: body === void 0 ? void 0 : JSON.stringify(body),
|
|
57
|
+
signal: controller.signal
|
|
58
|
+
});
|
|
59
|
+
if (!res.ok) throw new PlaywrightWalletAdapterError({
|
|
60
|
+
message: `wallet request ${path} failed: HTTP ${res.status}`,
|
|
61
|
+
operation: "fetch",
|
|
62
|
+
url,
|
|
63
|
+
status: res.status
|
|
64
|
+
});
|
|
65
|
+
return await res.json();
|
|
66
|
+
} catch (cause) {
|
|
67
|
+
if (cause instanceof PlaywrightWalletAdapterError) throw cause;
|
|
68
|
+
throw new PlaywrightWalletAdapterError({
|
|
69
|
+
message: `wallet request ${path} threw`,
|
|
70
|
+
operation: "fetch",
|
|
71
|
+
url,
|
|
72
|
+
cause
|
|
73
|
+
});
|
|
74
|
+
} finally {
|
|
75
|
+
clearTimeout(handle);
|
|
76
|
+
}
|
|
77
|
+
};
|
|
78
|
+
return {
|
|
79
|
+
walletUrl,
|
|
80
|
+
listAccounts: () => request("/accounts"),
|
|
81
|
+
switchAccount: async (accountName) => {
|
|
82
|
+
await request("/accounts/switch", { accountName });
|
|
83
|
+
},
|
|
84
|
+
signTransaction: (input) => request("/sign-transaction", {
|
|
85
|
+
accountName: input.accountName,
|
|
86
|
+
txBytesBase64: input.txBytesBase64,
|
|
87
|
+
label: input.label
|
|
88
|
+
}),
|
|
89
|
+
request
|
|
90
|
+
};
|
|
91
|
+
};
|
|
92
|
+
/** Slot name owned by the app's `dapp-kit.ts`. The build integration
|
|
93
|
+
* reads it; the app populates it. Re-exported from `runtime/`'s
|
|
94
|
+
* canonical contract — kept here as a name alias for the
|
|
95
|
+
* in-spec-helpers' import path. */
|
|
96
|
+
const DAPP_KIT_SLOT = DAPP_KIT_SLOT_KEY;
|
|
97
|
+
/**
|
|
98
|
+
* Connect/switch the app's active dev-wallet account through the dapp-kit
|
|
99
|
+
* slot the app populates at boot.
|
|
100
|
+
*
|
|
101
|
+
* This intentionally avoids driving the wallet UI. The app-side slot
|
|
102
|
+
* implementation still goes through dapp-kit + wallet-standard, so pairing,
|
|
103
|
+
* origin, and account discovery failures surface as real browser failures.
|
|
104
|
+
*/
|
|
105
|
+
const connectAs = async (page, accountName) => {
|
|
106
|
+
try {
|
|
107
|
+
await selectAccount(page, accountName);
|
|
108
|
+
} catch (cause) {
|
|
109
|
+
throw new PlaywrightWalletAdapterError({
|
|
110
|
+
message: `connectAs("${accountName}") failed`,
|
|
111
|
+
operation: "switch-account",
|
|
112
|
+
cause
|
|
113
|
+
});
|
|
114
|
+
}
|
|
115
|
+
};
|
|
116
|
+
/**
|
|
117
|
+
* Switch the dev-wallet's active account by routing through the
|
|
118
|
+
* dapp-kit global slot the app populates at module init. Strictly
|
|
119
|
+
* faster + less flaky than clicking the wallet's UI.
|
|
120
|
+
*/
|
|
121
|
+
const selectAccount = async (page, accountName) => {
|
|
122
|
+
const result = await page.evaluate(async (name) => {
|
|
123
|
+
const slot = globalThis.__devstackDAppKit__;
|
|
124
|
+
if (slot === void 0 || slot.selectAccount === void 0) return {
|
|
125
|
+
ok: false,
|
|
126
|
+
reason: "slot-not-populated"
|
|
127
|
+
};
|
|
128
|
+
try {
|
|
129
|
+
await slot.selectAccount(name);
|
|
130
|
+
return { ok: true };
|
|
131
|
+
} catch (err) {
|
|
132
|
+
return {
|
|
133
|
+
ok: false,
|
|
134
|
+
reason: err instanceof Error ? err.message : String(err)
|
|
135
|
+
};
|
|
136
|
+
}
|
|
137
|
+
}, accountName);
|
|
138
|
+
if (!result.ok) throw new PlaywrightWalletAdapterError({
|
|
139
|
+
message: `selectAccount("${accountName}") failed: ${result.reason ?? "unknown"}. Confirm \`globalThis.${DAPP_KIT_SLOT}\` is populated by the app's dapp-kit module at boot.`,
|
|
140
|
+
operation: "switch-account"
|
|
141
|
+
});
|
|
142
|
+
};
|
|
143
|
+
/** Test-side accessor for the full manifest (already decoded). */
|
|
144
|
+
const loadStackManifest = (options = {}) => readStackContext(options);
|
|
145
|
+
//#endregion
|
|
146
|
+
export { DAPP_KIT_SLOT, WALLET_ENDPOINT_KEY, connectAs, createWalletAdapter, loadStackManifest, selectAccount };
|
|
147
|
+
|
|
148
|
+
//# sourceMappingURL=wallet-context.mjs.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"wallet-context.mjs","names":[],"sources":["../../../src/build-integrations/playwright/wallet-context.ts"],"sourcesContent":["// Wallet-context test helpers.\n//\n// Architecture (distilled/23-build-integrations.md § Playwright /\n// \"What it produces\"):\n//\n// In-spec helpers (`connectAs`, `selectAccount`) and artifact\n// loaders (`loadStackManifest`, `loadStackKeypair`).\n//\n// And (per the user task brief): tests sign txs via the wallet's HTTP\n// API rather than driving the browser's wallet-UI flow. That is the\n// load-bearing wallet-context contract: a tiny typed HTTP client over\n// the dev wallet's endpoint exposed in the manifest.\n//\n// Discipline:\n// - This module performs NO browser interaction. The `page` arg in\n// `connectAs` is the Playwright `Page` (kept structural — we do\n// not import `@playwright/test`), but the helpers here only use\n// it to expose the dev-wallet selection / account-switch flow\n// through `evaluate`. The actual key handling stays server-side\n// in the wallet plugin.\n// - HTTP calls go through `fetch`. We do NOT pull in `@mysten/sui`\n// here — txs are constructed by tests, serialized, and POSTed\n// to the wallet for signing. The wallet plugin is the\n// authoritative key holder.\n// - Account-switch via the global slot (`globalThis.__devstackDAppKit__`)\n// for dapp-kit-driven in-browser context; HTTP wallet helpers\n// are the spec-level lower-friction path.\n\nimport {\n\treadStackContext,\n\ttype ResolveStackContextOptions,\n\ttype StackContext,\n} from './stack-context.ts';\nimport { readStashedFixture } from './global-setup.ts';\nimport { PlaywrightWalletAdapterError } from './errors.ts';\nimport { DAPP_KIT_SLOT_KEY, type DAppKitSlot } from '../runtime/dapp-kit-slot.ts';\n\n// -----------------------------------------------------------------------------\n// Structural Playwright `Page` shape — we keep `@playwright/test` an\n// optional peer.\n// -----------------------------------------------------------------------------\n\n/** Subset of `Page` we use. */\nexport interface PlaywrightPageLike {\n\treadonly evaluate: <T>(fn: (arg: unknown) => T, arg?: unknown) => Promise<T>;\n}\n\n// -----------------------------------------------------------------------------\n// Wallet adapter — HTTP client targeting the wallet plugin's endpoint\n// -----------------------------------------------------------------------------\n\n/** Public alias for the dev-wallet endpoint. The manifest stores raw\n * keys as `${pluginKey}:${endpointName}` and the actual endpoint name\n * is `wallet-app`; `readStackContext(...).endpointMaybe('wallet')`\n * maps this alias through the Playwright boundary. */\nexport const WALLET_ENDPOINT_KEY = 'wallet' as const;\n\nexport interface WalletAdapterOptions extends ResolveStackContextOptions {\n\t/** Override the resolved wallet URL. Useful for tests targeting a\n\t * remote / non-default stack. */\n\treadonly walletUrl?: string;\n\t/** Custom `fetch` for tests. Defaults to `globalThis.fetch`. */\n\treadonly fetch?: typeof fetch;\n\t/** Per-request timeout in ms. Default: 5_000. */\n\treadonly timeoutMs?: number;\n}\n\n/** Public shape of the wallet adapter — typed by-key methods plus the\n * raw `request` escape hatch. */\nexport interface WalletAdapter {\n\t/** Resolved base URL of the wallet plugin. */\n\treadonly walletUrl: string;\n\n\t/** List dev-wallet account names + addresses. */\n\treadonly listAccounts: () => Promise<ReadonlyArray<DevAccount>>;\n\n\t/** Switch the active dev-wallet account by name. Posts to the\n\t * wallet's `switch-account` endpoint. */\n\treadonly switchAccount: (accountName: string) => Promise<void>;\n\n\t/** Sign + execute a serialized transaction as `accountName`.\n\t * `txBytes` is the canonical Sui tx bytes (base64). Returns the\n\t * wallet's response body (typed `unknown` — caller decodes). */\n\treadonly signTransaction: (input: SignTxRequest) => Promise<SignTxResponse>;\n\n\t/** Raw POST escape hatch. Used by the helpers above and by tests\n\t * that need a wallet-endpoint not in the typed surface. */\n\treadonly request: <T>(path: string, body?: Record<string, unknown>) => Promise<T>;\n}\n\nexport interface DevAccount {\n\treadonly name: string;\n\treadonly address: string;\n}\n\nexport interface SignTxRequest {\n\treadonly accountName: string;\n\t/** Canonical Sui tx bytes, base64-encoded. */\n\treadonly txBytesBase64: string;\n\t/** Optional caller-supplied label for correlated trace output. */\n\treadonly label?: string;\n}\n\nexport interface SignTxResponse {\n\treadonly digest: string;\n\treadonly signature: string;\n\t/** Raw response payload (wallet-plugin-versioned shape). */\n\treadonly raw: unknown;\n}\n\n// -----------------------------------------------------------------------------\n// Resolver: locate the wallet URL via fixture > manifest > error\n// -----------------------------------------------------------------------------\n\n/**\n * Resolve the dev-wallet URL. Precedence:\n * 1. `options.walletUrl` (explicit override).\n * 2. The fixture stashed by `globalSetup` on `globalThis`.\n * 3. A fresh manifest read.\n *\n * Throws `PlaywrightWalletAdapterError` when every path misses. */\nconst resolveWalletUrl = (options: WalletAdapterOptions): string => {\n\tif (options.walletUrl !== undefined) return options.walletUrl;\n\n\tconst fixture = readStashedFixture();\n\tif (fixture !== null && fixture.walletEndpoint !== null) {\n\t\treturn fixture.walletEndpoint;\n\t}\n\n\tlet ctx: StackContext;\n\ttry {\n\t\tctx = readStackContext(options);\n\t} catch (cause) {\n\t\tthrow new PlaywrightWalletAdapterError({\n\t\t\tmessage:\n\t\t\t\t`unable to resolve dev-wallet URL — no globalSetup fixture and ` + `manifest read failed`,\n\t\t\toperation: 'fetch',\n\t\t\tcause,\n\t\t});\n\t}\n\tconst walletUrl = ctx.endpointMaybe(WALLET_ENDPOINT_KEY);\n\tif (walletUrl === null) {\n\t\tthrow new PlaywrightWalletAdapterError({\n\t\t\tmessage:\n\t\t\t\t`manifest has no \\`${WALLET_ENDPOINT_KEY}\\` endpoint (alias for ` +\n\t\t\t\t`\\`wallet-app\\`) — is the dev-wallet plugin present in your stack? ` +\n\t\t\t\t`Available endpoint names: ${ctx.endpointNames.join(', ') || '(none)'}. ` +\n\t\t\t\t`Raw manifest keys: ${ctx.manifestEndpointKeys.join(', ') || '(none)'}.`,\n\t\t\toperation: 'fetch',\n\t\t});\n\t}\n\treturn walletUrl;\n};\n\n// -----------------------------------------------------------------------------\n// Factory\n// -----------------------------------------------------------------------------\n\n/**\n * Build a wallet adapter. Most tests call this once per `test`\n * fixture; the resolution is sync (a hash-lookup on the\n * fixture / manifest) so this is cheap.\n */\nexport const createWalletAdapter = (options: WalletAdapterOptions = {}): WalletAdapter => {\n\tconst walletUrl = resolveWalletUrl(options).replace(/\\/$/, '');\n\tconst fetchImpl = options.fetch ?? globalThis.fetch;\n\tconst timeoutMs = options.timeoutMs ?? 5_000;\n\n\tconst request = async <T>(path: string, body?: Record<string, unknown>): Promise<T> => {\n\t\tconst url = `${walletUrl}${path.startsWith('/') ? path : `/${path}`}`;\n\t\tconst controller = new AbortController();\n\t\tconst handle = setTimeout(() => controller.abort(), timeoutMs);\n\t\ttry {\n\t\t\tconst res = await fetchImpl(url, {\n\t\t\t\tmethod: body === undefined ? 'GET' : 'POST',\n\t\t\t\theaders: { 'content-type': 'application/json' },\n\t\t\t\tbody: body === undefined ? undefined : JSON.stringify(body),\n\t\t\t\tsignal: controller.signal,\n\t\t\t});\n\t\t\tif (!res.ok) {\n\t\t\t\tthrow new PlaywrightWalletAdapterError({\n\t\t\t\t\tmessage: `wallet request ${path} failed: HTTP ${res.status}`,\n\t\t\t\t\toperation: 'fetch',\n\t\t\t\t\turl,\n\t\t\t\t\tstatus: res.status,\n\t\t\t\t});\n\t\t\t}\n\t\t\treturn (await res.json()) as T;\n\t\t} catch (cause) {\n\t\t\tif (cause instanceof PlaywrightWalletAdapterError) throw cause;\n\t\t\tthrow new PlaywrightWalletAdapterError({\n\t\t\t\tmessage: `wallet request ${path} threw`,\n\t\t\t\toperation: 'fetch',\n\t\t\t\turl,\n\t\t\t\tcause,\n\t\t\t});\n\t\t} finally {\n\t\t\tclearTimeout(handle);\n\t\t}\n\t};\n\n\treturn {\n\t\twalletUrl,\n\t\tlistAccounts: () => request<ReadonlyArray<DevAccount>>('/accounts'),\n\t\tswitchAccount: async (accountName: string) => {\n\t\t\tawait request<{ readonly ok: true }>('/accounts/switch', { accountName });\n\t\t},\n\t\tsignTransaction: (input: SignTxRequest) =>\n\t\t\trequest<SignTxResponse>('/sign-transaction', {\n\t\t\t\taccountName: input.accountName,\n\t\t\t\ttxBytesBase64: input.txBytesBase64,\n\t\t\t\tlabel: input.label,\n\t\t\t}),\n\t\trequest,\n\t};\n};\n\n// -----------------------------------------------------------------------------\n// In-spec helpers — `connectAs` and `selectAccount`\n// -----------------------------------------------------------------------------\n\n/** Slot name owned by the app's `dapp-kit.ts`. The build integration\n * reads it; the app populates it. Re-exported from `runtime/`'s\n * canonical contract — kept here as a name alias for the\n * in-spec-helpers' import path. */\nexport const DAPP_KIT_SLOT = DAPP_KIT_SLOT_KEY;\n\n/**\n * Connect/switch the app's active dev-wallet account through the dapp-kit\n * slot the app populates at boot.\n *\n * This intentionally avoids driving the wallet UI. The app-side slot\n * implementation still goes through dapp-kit + wallet-standard, so pairing,\n * origin, and account discovery failures surface as real browser failures.\n */\nexport const connectAs = async (page: PlaywrightPageLike, accountName: string): Promise<void> => {\n\ttry {\n\t\tawait selectAccount(page, accountName);\n\t} catch (cause) {\n\t\tthrow new PlaywrightWalletAdapterError({\n\t\t\tmessage: `connectAs(\"${accountName}\") failed`,\n\t\t\toperation: 'switch-account',\n\t\t\tcause,\n\t\t});\n\t}\n};\n\n/**\n * Switch the dev-wallet's active account by routing through the\n * dapp-kit global slot the app populates at module init. Strictly\n * faster + less flaky than clicking the wallet's UI.\n */\nexport const selectAccount = async (\n\tpage: PlaywrightPageLike,\n\taccountName: string,\n): Promise<void> => {\n\t// `evaluate`'s closure is serialized into the browser; the slot\n\t// shape (`DAppKitSlot`) lives in `runtime/dapp-kit-slot.ts` — the\n\t// in-browser closure can't import it, but the global-augmentation\n\t// `globalThis.__devstackDAppKit__` is the typed contract both sides\n\t// rely on.\n\tconst result = await page.evaluate(async (name): Promise<{ ok: boolean; reason?: string }> => {\n\t\tconst slot = (globalThis as { __devstackDAppKit__?: DAppKitSlot }).__devstackDAppKit__;\n\t\tif (slot === undefined || slot.selectAccount === undefined) {\n\t\t\treturn { ok: false, reason: 'slot-not-populated' };\n\t\t}\n\t\ttry {\n\t\t\tawait slot.selectAccount(name as string);\n\t\t\treturn { ok: true };\n\t\t} catch (err) {\n\t\t\treturn {\n\t\t\t\tok: false,\n\t\t\t\treason: err instanceof Error ? err.message : String(err),\n\t\t\t};\n\t\t}\n\t}, accountName);\n\tif (!result.ok) {\n\t\tthrow new PlaywrightWalletAdapterError({\n\t\t\tmessage:\n\t\t\t\t`selectAccount(\"${accountName}\") failed: ${result.reason ?? 'unknown'}. ` +\n\t\t\t\t`Confirm \\`globalThis.${DAPP_KIT_SLOT}\\` is populated by the app's ` +\n\t\t\t\t`dapp-kit module at boot.`,\n\t\t\toperation: 'switch-account',\n\t\t});\n\t}\n};\n\n// -----------------------------------------------------------------------------\n// Artifact loaders\n// -----------------------------------------------------------------------------\n\n/** Test-side accessor for the full manifest (already decoded). */\nexport const loadStackManifest = (options: ResolveStackContextOptions = {}): StackContext =>\n\treadStackContext(options);\n"],"mappings":";;;;;;;;;AAuDA,MAAa,sBAAsB;;;;;;;;AAkEnC,MAAM,oBAAoB,YAA0C;AACnE,KAAI,QAAQ,cAAc,KAAA,EAAW,QAAO,QAAQ;CAEpD,MAAM,UAAU,oBAAoB;AACpC,KAAI,YAAY,QAAQ,QAAQ,mBAAmB,KAClD,QAAO,QAAQ;CAGhB,IAAI;AACJ,KAAI;AACH,QAAM,iBAAiB,QAAQ;UACvB,OAAO;AACf,QAAM,IAAI,6BAA6B;GACtC,SACC;GACD,WAAW;GACX;GACA,CAAC;;CAEH,MAAM,YAAY,IAAI,cAAc,oBAAoB;AACxD,KAAI,cAAc,KACjB,OAAM,IAAI,6BAA6B;EACtC,SACC,qBAAqB,oBAAoB,qHAEZ,IAAI,cAAc,KAAK,KAAK,IAAI,SAAS,uBAChD,IAAI,qBAAqB,KAAK,KAAK,IAAI,SAAS;EACvE,WAAW;EACX,CAAC;AAEH,QAAO;;;;;;;AAYR,MAAa,uBAAuB,UAAgC,EAAE,KAAoB;CACzF,MAAM,YAAY,iBAAiB,QAAQ,CAAC,QAAQ,OAAO,GAAG;CAC9D,MAAM,YAAY,QAAQ,SAAS,WAAW;CAC9C,MAAM,YAAY,QAAQ,aAAa;CAEvC,MAAM,UAAU,OAAU,MAAc,SAA+C;EACtF,MAAM,MAAM,GAAG,YAAY,KAAK,WAAW,IAAI,GAAG,OAAO,IAAI;EAC7D,MAAM,aAAa,IAAI,iBAAiB;EACxC,MAAM,SAAS,iBAAiB,WAAW,OAAO,EAAE,UAAU;AAC9D,MAAI;GACH,MAAM,MAAM,MAAM,UAAU,KAAK;IAChC,QAAQ,SAAS,KAAA,IAAY,QAAQ;IACrC,SAAS,EAAE,gBAAgB,oBAAoB;IAC/C,MAAM,SAAS,KAAA,IAAY,KAAA,IAAY,KAAK,UAAU,KAAK;IAC3D,QAAQ,WAAW;IACnB,CAAC;AACF,OAAI,CAAC,IAAI,GACR,OAAM,IAAI,6BAA6B;IACtC,SAAS,kBAAkB,KAAK,gBAAgB,IAAI;IACpD,WAAW;IACX;IACA,QAAQ,IAAI;IACZ,CAAC;AAEH,UAAQ,MAAM,IAAI,MAAM;WAChB,OAAO;AACf,OAAI,iBAAiB,6BAA8B,OAAM;AACzD,SAAM,IAAI,6BAA6B;IACtC,SAAS,kBAAkB,KAAK;IAChC,WAAW;IACX;IACA;IACA,CAAC;YACO;AACT,gBAAa,OAAO;;;AAItB,QAAO;EACN;EACA,oBAAoB,QAAmC,YAAY;EACnE,eAAe,OAAO,gBAAwB;AAC7C,SAAM,QAA+B,oBAAoB,EAAE,aAAa,CAAC;;EAE1E,kBAAkB,UACjB,QAAwB,qBAAqB;GAC5C,aAAa,MAAM;GACnB,eAAe,MAAM;GACrB,OAAO,MAAM;GACb,CAAC;EACH;EACA;;;;;;AAWF,MAAa,gBAAgB;;;;;;;;;AAU7B,MAAa,YAAY,OAAO,MAA0B,gBAAuC;AAChG,KAAI;AACH,QAAM,cAAc,MAAM,YAAY;UAC9B,OAAO;AACf,QAAM,IAAI,6BAA6B;GACtC,SAAS,cAAc,YAAY;GACnC,WAAW;GACX;GACA,CAAC;;;;;;;;AASJ,MAAa,gBAAgB,OAC5B,MACA,gBACmB;CAMnB,MAAM,SAAS,MAAM,KAAK,SAAS,OAAO,SAAoD;EAC7F,MAAM,OAAQ,WAAqD;AACnE,MAAI,SAAS,KAAA,KAAa,KAAK,kBAAkB,KAAA,EAChD,QAAO;GAAE,IAAI;GAAO,QAAQ;GAAsB;AAEnD,MAAI;AACH,SAAM,KAAK,cAAc,KAAe;AACxC,UAAO,EAAE,IAAI,MAAM;WACX,KAAK;AACb,UAAO;IACN,IAAI;IACJ,QAAQ,eAAe,QAAQ,IAAI,UAAU,OAAO,IAAI;IACxD;;IAEA,YAAY;AACf,KAAI,CAAC,OAAO,GACX,OAAM,IAAI,6BAA6B;EACtC,SACC,kBAAkB,YAAY,aAAa,OAAO,UAAU,UAAU,yBAC9C,cAAc;EAEvC,WAAW;EACX,CAAC;;;AASJ,MAAa,qBAAqB,UAAsC,EAAE,KACzE,iBAAiB,QAAQ"}
|
|
@@ -0,0 +1,67 @@
|
|
|
1
|
+
//#region src/build-integrations/runtime/cold-start-url.d.ts
|
|
2
|
+
/** One row of the conventional-route table. The supervisor's router
|
|
3
|
+
* plugin emits a `Map<endpointName, ConventionalRoute>` from its
|
|
4
|
+
* Routable contributions; cold-start URL resolution keys off it. */
|
|
5
|
+
interface ConventionalRoute {
|
|
6
|
+
/** `<service>` segment of the hostname — typically the
|
|
7
|
+
* routable's `dispatchId.role`. */
|
|
8
|
+
readonly service: string;
|
|
9
|
+
/** Traefik entrypoint port — the router's public-facing port for
|
|
10
|
+
* this endpoint kind. */
|
|
11
|
+
readonly port: number;
|
|
12
|
+
/** Wire protocol — `http` or `h2c`. Determines the URL scheme. */
|
|
13
|
+
readonly wireProtocol: 'http' | 'h2c';
|
|
14
|
+
}
|
|
15
|
+
interface ColdStartUrlOptions {
|
|
16
|
+
/** Conventional-route table to consult. Supplied by the caller
|
|
17
|
+
* (build integration), populated from the router plugin's
|
|
18
|
+
* `RoutableDecl` contributions. Empty by default — calls that
|
|
19
|
+
* don't pass a table will always throw, which is the right
|
|
20
|
+
* behavior for "no router plugin = no fallback". */
|
|
21
|
+
readonly routes: ReadonlyMap<string, ConventionalRoute>;
|
|
22
|
+
/** Stack name. Defaults through `$DEVSTACK_STACK`, then `'main'`. */
|
|
23
|
+
readonly stack?: string;
|
|
24
|
+
/** App name (un-scoped). Defaults to reading `package.json` at
|
|
25
|
+
* `cwd` (with the `@scope/` prefix stripped) and finally to
|
|
26
|
+
* `basename(cwd)`. Injectable so unit tests don't depend on
|
|
27
|
+
* filesystem state. */
|
|
28
|
+
readonly app?: string;
|
|
29
|
+
/** Starting directory for the app-name lookup. Defaults to
|
|
30
|
+
* `process.cwd()`. */
|
|
31
|
+
readonly cwd?: string;
|
|
32
|
+
/** Host suffix owned by the router. Default: `.localhost`. */
|
|
33
|
+
readonly hostSuffix?: string;
|
|
34
|
+
}
|
|
35
|
+
interface ConventionalRouteHostInput {
|
|
36
|
+
readonly service: string;
|
|
37
|
+
readonly app: string;
|
|
38
|
+
readonly stack: string;
|
|
39
|
+
readonly hostSuffix?: string;
|
|
40
|
+
}
|
|
41
|
+
interface ConventionalRouteUrlInput extends ConventionalRouteHostInput {
|
|
42
|
+
readonly route: ConventionalRoute;
|
|
43
|
+
readonly scheme?: 'http' | 'https';
|
|
44
|
+
readonly trailingSlash?: boolean;
|
|
45
|
+
}
|
|
46
|
+
interface ConventionalRouteHint {
|
|
47
|
+
readonly endpoint: string;
|
|
48
|
+
readonly service: string;
|
|
49
|
+
readonly wireProtocol?: 'http' | 'h2c';
|
|
50
|
+
}
|
|
51
|
+
declare const conventionalRouteHost: (input: ConventionalRouteHostInput) => string;
|
|
52
|
+
declare const conventionalRouteUrl: (input: ConventionalRouteUrlInput) => string;
|
|
53
|
+
declare const conventionalRoutesFromHints: (hints: ReadonlyArray<ConventionalRouteHint>, port: number) => ReadonlyMap<string, ConventionalRoute>;
|
|
54
|
+
/**
|
|
55
|
+
* Compute the conventional URL for `endpoint`. Throws
|
|
56
|
+
* `NoConventionalRouteError` when the endpoint isn't in the supplied
|
|
57
|
+
* `routes` table.
|
|
58
|
+
*
|
|
59
|
+
* Callers that prefer a `undefined`-on-miss surface should catch the
|
|
60
|
+
* error or use `tryColdStartUrl` instead.
|
|
61
|
+
*/
|
|
62
|
+
declare const coldStartUrl: (endpoint: string, opts: ColdStartUrlOptions) => string;
|
|
63
|
+
/** `undefined`-on-miss variant. */
|
|
64
|
+
declare const tryColdStartUrl: (endpoint: string, opts: ColdStartUrlOptions) => string | undefined;
|
|
65
|
+
//#endregion
|
|
66
|
+
export { ColdStartUrlOptions, ConventionalRoute, ConventionalRouteHint, ConventionalRouteHostInput, ConventionalRouteUrlInput, coldStartUrl, conventionalRouteHost, conventionalRouteUrl, conventionalRoutesFromHints, tryColdStartUrl };
|
|
67
|
+
//# sourceMappingURL=cold-start-url.d.mts.map
|
|
@@ -0,0 +1,56 @@
|
|
|
1
|
+
import { NoConventionalRouteError } from "./errors.mjs";
|
|
2
|
+
import { readAppName, resolveBuildIntegrationStack } from "./discover.mjs";
|
|
3
|
+
import { basename } from "node:path";
|
|
4
|
+
//#region src/build-integrations/runtime/cold-start-url.ts
|
|
5
|
+
const conventionalRouteHost = (input) => {
|
|
6
|
+
const hostSuffix = input.hostSuffix ?? ".localhost";
|
|
7
|
+
return input.stack === "main" ? `${input.service}.${input.app}${hostSuffix}` : `${input.service}.${input.stack}.${input.app}${hostSuffix}`;
|
|
8
|
+
};
|
|
9
|
+
const conventionalRouteUrl = (input) => {
|
|
10
|
+
const url = `${input.scheme ?? "http"}://${conventionalRouteHost(input)}:${input.route.port}`;
|
|
11
|
+
return input.trailingSlash === true ? `${url}/` : url;
|
|
12
|
+
};
|
|
13
|
+
const conventionalRoutesFromHints = (hints, port) => new Map(hints.map((hint) => [hint.endpoint, {
|
|
14
|
+
service: hint.service,
|
|
15
|
+
port,
|
|
16
|
+
wireProtocol: hint.wireProtocol ?? "http"
|
|
17
|
+
}]));
|
|
18
|
+
/**
|
|
19
|
+
* Compute the conventional URL for `endpoint`. Throws
|
|
20
|
+
* `NoConventionalRouteError` when the endpoint isn't in the supplied
|
|
21
|
+
* `routes` table.
|
|
22
|
+
*
|
|
23
|
+
* Callers that prefer a `undefined`-on-miss surface should catch the
|
|
24
|
+
* error or use `tryColdStartUrl` instead.
|
|
25
|
+
*/
|
|
26
|
+
const coldStartUrl = (endpoint, opts) => {
|
|
27
|
+
const route = opts.routes.get(endpoint);
|
|
28
|
+
if (route === void 0) {
|
|
29
|
+
const supported = [...opts.routes.keys()].sort();
|
|
30
|
+
throw new NoConventionalRouteError({
|
|
31
|
+
endpoint,
|
|
32
|
+
supported,
|
|
33
|
+
message: `[devstack] endpoint ${JSON.stringify(endpoint)} has no conventional URL fallback. Supported endpoints: ${supported.length === 0 ? "(none)" : supported.join(", ")}. Check the endpoint name or write the manifest first via \`devstack up\`.`
|
|
34
|
+
});
|
|
35
|
+
}
|
|
36
|
+
const cwd = opts.cwd ?? process.cwd();
|
|
37
|
+
const stack = resolveBuildIntegrationStack(opts.stack);
|
|
38
|
+
const app = opts.app ?? readAppName(cwd) ?? basename(cwd);
|
|
39
|
+
return conventionalRouteUrl({
|
|
40
|
+
route,
|
|
41
|
+
service: route.service,
|
|
42
|
+
app,
|
|
43
|
+
stack,
|
|
44
|
+
...opts.hostSuffix !== void 0 ? { hostSuffix: opts.hostSuffix } : {},
|
|
45
|
+
scheme: route.wireProtocol === "h2c" ? "http" : "http"
|
|
46
|
+
});
|
|
47
|
+
};
|
|
48
|
+
/** `undefined`-on-miss variant. */
|
|
49
|
+
const tryColdStartUrl = (endpoint, opts) => {
|
|
50
|
+
if (!opts.routes.has(endpoint)) return void 0;
|
|
51
|
+
return coldStartUrl(endpoint, opts);
|
|
52
|
+
};
|
|
53
|
+
//#endregion
|
|
54
|
+
export { coldStartUrl, conventionalRouteHost, conventionalRouteUrl, conventionalRoutesFromHints, tryColdStartUrl };
|
|
55
|
+
|
|
56
|
+
//# sourceMappingURL=cold-start-url.mjs.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"cold-start-url.mjs","names":[],"sources":["../../../src/build-integrations/runtime/cold-start-url.ts"],"sourcesContent":["// Cold-start URL — conventional-route fallback for callers that need\n// an endpoint URL BEFORE the supervisor has written the manifest.\n//\n// Playwright's config loader runs ahead of the supervisor (it's the\n// process that spawns `pnpm dev`, which boots the supervisor, which\n// then writes the manifest). For `webServer.url` / `use.baseURL` to\n// be resolvable at config-load time, the build-integration needs a\n// derivation that doesn't require the manifest on disk.\n//\n// The derivation:\n//\n// <service>.<stack-prefix>.<app>.localhost:<port>\n//\n// where:\n// - `<service>` and `<port>` come from the endpoint's Routable\n// declaration (its `conventional` hint, populated by the router\n// plugin).\n// - `<app>` is the un-scoped app name (from cwd's `package.json` or\n// an explicit override).\n// - `<stack-prefix>` comes from an explicit stack, `DEVSTACK_STACK`,\n// or the `main` default. Package metadata is not a stack selector\n// for build integrations; it only supplies the app name.\n// - `<stack-prefix>` is empty for the `main` stack and `.<stack>`\n// otherwise. Matches the router's hostname-minting rule so\n// conventional and post-manifest URLs converge.\n//\n// Architecture § invariants: \"conventional URL convergence\" — the\n// fallback this function returns MUST equal the URL the supervisor's\n// router publishes once the manifest exists. The shared invariant is\n// enforced by deriving both from the same Routable declaration.\n//\n// This module does NOT import any service-specific endpoint names.\n// The conventional-route table is supplied by the caller; the router\n// plugin populates it from `RoutableDecl[].upstream` + a hard-coded\n// conventional-port map. (Architecture: \"engine knows zero service\n// names\" — the table is plugin-emitted.)\n\nimport { basename } from 'node:path';\n\nimport { NoConventionalRouteError } from './errors.ts';\nimport { readAppName, resolveBuildIntegrationStack } from './discover.ts';\n\n/** One row of the conventional-route table. The supervisor's router\n * plugin emits a `Map<endpointName, ConventionalRoute>` from its\n * Routable contributions; cold-start URL resolution keys off it. */\nexport interface ConventionalRoute {\n\t/** `<service>` segment of the hostname — typically the\n\t * routable's `dispatchId.role`. */\n\treadonly service: string;\n\t/** Traefik entrypoint port — the router's public-facing port for\n\t * this endpoint kind. */\n\treadonly port: number;\n\t/** Wire protocol — `http` or `h2c`. Determines the URL scheme. */\n\treadonly wireProtocol: 'http' | 'h2c';\n}\n\nexport interface ColdStartUrlOptions {\n\t/** Conventional-route table to consult. Supplied by the caller\n\t * (build integration), populated from the router plugin's\n\t * `RoutableDecl` contributions. Empty by default — calls that\n\t * don't pass a table will always throw, which is the right\n\t * behavior for \"no router plugin = no fallback\". */\n\treadonly routes: ReadonlyMap<string, ConventionalRoute>;\n\t/** Stack name. Defaults through `$DEVSTACK_STACK`, then `'main'`. */\n\treadonly stack?: string;\n\t/** App name (un-scoped). Defaults to reading `package.json` at\n\t * `cwd` (with the `@scope/` prefix stripped) and finally to\n\t * `basename(cwd)`. Injectable so unit tests don't depend on\n\t * filesystem state. */\n\treadonly app?: string;\n\t/** Starting directory for the app-name lookup. Defaults to\n\t * `process.cwd()`. */\n\treadonly cwd?: string;\n\t/** Host suffix owned by the router. Default: `.localhost`. */\n\treadonly hostSuffix?: string;\n}\n\nexport interface ConventionalRouteHostInput {\n\treadonly service: string;\n\treadonly app: string;\n\treadonly stack: string;\n\treadonly hostSuffix?: string;\n}\n\nexport interface ConventionalRouteUrlInput extends ConventionalRouteHostInput {\n\treadonly route: ConventionalRoute;\n\treadonly scheme?: 'http' | 'https';\n\treadonly trailingSlash?: boolean;\n}\n\nexport interface ConventionalRouteHint {\n\treadonly endpoint: string;\n\treadonly service: string;\n\treadonly wireProtocol?: 'http' | 'h2c';\n}\n\nexport const conventionalRouteHost = (input: ConventionalRouteHostInput): string => {\n\tconst hostSuffix = input.hostSuffix ?? '.localhost';\n\treturn input.stack === 'main'\n\t\t? `${input.service}.${input.app}${hostSuffix}`\n\t\t: `${input.service}.${input.stack}.${input.app}${hostSuffix}`;\n};\n\nexport const conventionalRouteUrl = (input: ConventionalRouteUrlInput): string => {\n\tconst scheme = input.scheme ?? 'http';\n\tconst host = conventionalRouteHost(input);\n\tconst url = `${scheme}://${host}:${input.route.port}`;\n\treturn input.trailingSlash === true ? `${url}/` : url;\n};\n\nexport const conventionalRoutesFromHints = (\n\thints: ReadonlyArray<ConventionalRouteHint>,\n\tport: number,\n): ReadonlyMap<string, ConventionalRoute> =>\n\tnew Map(\n\t\thints.map((hint): [string, ConventionalRoute] => [\n\t\t\thint.endpoint,\n\t\t\t{\n\t\t\t\tservice: hint.service,\n\t\t\t\tport,\n\t\t\t\twireProtocol: hint.wireProtocol ?? 'http',\n\t\t\t},\n\t\t]),\n\t);\n\n/**\n * Compute the conventional URL for `endpoint`. Throws\n * `NoConventionalRouteError` when the endpoint isn't in the supplied\n * `routes` table.\n *\n * Callers that prefer a `undefined`-on-miss surface should catch the\n * error or use `tryColdStartUrl` instead.\n */\nexport const coldStartUrl = (endpoint: string, opts: ColdStartUrlOptions): string => {\n\tconst route = opts.routes.get(endpoint);\n\tif (route === undefined) {\n\t\tconst supported = [...opts.routes.keys()].sort();\n\t\tthrow new NoConventionalRouteError({\n\t\t\tendpoint,\n\t\t\tsupported,\n\t\t\tmessage:\n\t\t\t\t`[devstack] endpoint ${JSON.stringify(endpoint)} has no conventional URL fallback. ` +\n\t\t\t\t`Supported endpoints: ${supported.length === 0 ? '(none)' : supported.join(', ')}. ` +\n\t\t\t\t`Check the endpoint name or write the manifest first via \\`devstack up\\`.`,\n\t\t});\n\t}\n\tconst cwd = opts.cwd ?? process.cwd();\n\tconst stack = resolveBuildIntegrationStack(opts.stack);\n\tconst app = opts.app ?? readAppName(cwd) ?? basename(cwd);\n\treturn conventionalRouteUrl({\n\t\troute,\n\t\tservice: route.service,\n\t\tapp,\n\t\tstack,\n\t\t...(opts.hostSuffix !== undefined ? { hostSuffix: opts.hostSuffix } : {}),\n\t\tscheme: route.wireProtocol === 'h2c' ? 'http' : 'http',\n\t});\n};\n\n/** `undefined`-on-miss variant. */\nexport const tryColdStartUrl = (\n\tendpoint: string,\n\topts: ColdStartUrlOptions,\n): string | undefined => {\n\tif (!opts.routes.has(endpoint)) return undefined;\n\treturn coldStartUrl(endpoint, opts);\n};\n"],"mappings":";;;;AAgGA,MAAa,yBAAyB,UAA8C;CACnF,MAAM,aAAa,MAAM,cAAc;AACvC,QAAO,MAAM,UAAU,SACpB,GAAG,MAAM,QAAQ,GAAG,MAAM,MAAM,eAChC,GAAG,MAAM,QAAQ,GAAG,MAAM,MAAM,GAAG,MAAM,MAAM;;AAGnD,MAAa,wBAAwB,UAA6C;CAGjF,MAAM,MAAM,GAFG,MAAM,UAAU,OAET,KADT,sBAAsB,MACJ,CAAC,GAAG,MAAM,MAAM;AAC/C,QAAO,MAAM,kBAAkB,OAAO,GAAG,IAAI,KAAK;;AAGnD,MAAa,+BACZ,OACA,SAEA,IAAI,IACH,MAAM,KAAK,SAAsC,CAChD,KAAK,UACL;CACC,SAAS,KAAK;CACd;CACA,cAAc,KAAK,gBAAgB;CACnC,CACD,CAAC,CACF;;;;;;;;;AAUF,MAAa,gBAAgB,UAAkB,SAAsC;CACpF,MAAM,QAAQ,KAAK,OAAO,IAAI,SAAS;AACvC,KAAI,UAAU,KAAA,GAAW;EACxB,MAAM,YAAY,CAAC,GAAG,KAAK,OAAO,MAAM,CAAC,CAAC,MAAM;AAChD,QAAM,IAAI,yBAAyB;GAClC;GACA;GACA,SACC,uBAAuB,KAAK,UAAU,SAAS,CAAC,0DACxB,UAAU,WAAW,IAAI,WAAW,UAAU,KAAK,KAAK,CAAC;GAElF,CAAC;;CAEH,MAAM,MAAM,KAAK,OAAO,QAAQ,KAAK;CACrC,MAAM,QAAQ,6BAA6B,KAAK,MAAM;CACtD,MAAM,MAAM,KAAK,OAAO,YAAY,IAAI,IAAI,SAAS,IAAI;AACzD,QAAO,qBAAqB;EAC3B;EACA,SAAS,MAAM;EACf;EACA;EACA,GAAI,KAAK,eAAe,KAAA,IAAY,EAAE,YAAY,KAAK,YAAY,GAAG,EAAE;EACxE,QAAQ,MAAM,iBAAiB,QAAQ,SAAS;EAChD,CAAC;;;AAIH,MAAa,mBACZ,UACA,SACwB;AACxB,KAAI,CAAC,KAAK,OAAO,IAAI,SAAS,CAAE,QAAO,KAAA;AACvC,QAAO,aAAa,UAAU,KAAK"}
|
|
@@ -0,0 +1,10 @@
|
|
|
1
|
+
//#region src/build-integrations/runtime/dapp-kit-slot.ts
|
|
2
|
+
/** The literal property name on `globalThis` that the app writes the
|
|
3
|
+
* kit handle to. Renames here cascade through every consumer
|
|
4
|
+
* (Playwright config-load, in-spec helpers, app-side dapp-kit-config
|
|
5
|
+
* emit). The slot's name is part of the contract. */
|
|
6
|
+
const DAPP_KIT_SLOT_KEY = "__devstackDAppKit__";
|
|
7
|
+
//#endregion
|
|
8
|
+
export { DAPP_KIT_SLOT_KEY };
|
|
9
|
+
|
|
10
|
+
//# sourceMappingURL=dapp-kit-slot.mjs.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"dapp-kit-slot.mjs","names":[],"sources":["../../../src/build-integrations/runtime/dapp-kit-slot.ts"],"sourcesContent":["// Typed contract for the `globalThis.__devstackDAppKit__` test bridge.\n//\n// This is intentionally narrow: app code writes only the account\n// switcher Playwright needs. It is not a place to stash the full\n// dAppKit instance or manifest projection.\n//\n// This module evaluates in browser bundles and in Node build\n// integration callers. Discipline: no `node:*` imports here.\n\n/** The literal property name on `globalThis` that the app writes the\n * kit handle to. Renames here cascade through every consumer\n * (Playwright config-load, in-spec helpers, app-side dapp-kit-config\n * emit). The slot's name is part of the contract. */\nexport const DAPP_KIT_SLOT_KEY = '__devstackDAppKit__' as const;\n\nexport interface DAppKitSlot {\n\t/** Account switcher entry point consumed by Playwright's\n\t * `connectAs` / `selectAccount` helpers. */\n\treadonly selectAccount?: (accountName: string) => void | Promise<void>;\n}\n\ndeclare global {\n\t// eslint-disable-next-line no-var\n\tvar __devstackDAppKit__: DAppKitSlot | undefined;\n}\n"],"mappings":";;;;;AAaA,MAAa,oBAAoB"}
|
|
@@ -0,0 +1,78 @@
|
|
|
1
|
+
//#region src/build-integrations/runtime/discover.d.ts
|
|
2
|
+
/** Default name of the supervisor's per-user state directory. Mirrors
|
|
3
|
+
* the L0 path resolver. Held here as a literal so the discover walk
|
|
4
|
+
* doesn't reach into the substrate package. */
|
|
5
|
+
declare const DEFAULT_STATE_DIR = ".devstack";
|
|
6
|
+
/** Default stack name when neither `opts.stack` nor `$DEVSTACK_STACK`
|
|
7
|
+
* yields a useful value. */
|
|
8
|
+
declare const DEFAULT_STACK = "main";
|
|
9
|
+
interface DiscoverManifestPathOptions {
|
|
10
|
+
/** Caller-supplied override path. Bypasses the walk-up but is still
|
|
11
|
+
* existence-checked. Lower precedence than
|
|
12
|
+
* `DEVSTACK_MANIFEST_PATH`. */
|
|
13
|
+
readonly override?: string;
|
|
14
|
+
/** Starting directory for the walk-up. Defaults to
|
|
15
|
+
* `process.cwd()`. */
|
|
16
|
+
readonly cwd?: string;
|
|
17
|
+
/** Stack name. Defaults through `$DEVSTACK_STACK`, then `'main'`. */
|
|
18
|
+
readonly stack?: string;
|
|
19
|
+
/** State-dir name. Defaults to `$DEVSTACK_STATE_DIR ?? '.devstack'`.
|
|
20
|
+
* Absolute paths are honored — the walk-up degenerates into a
|
|
21
|
+
* single existence check in that case. */
|
|
22
|
+
readonly stateDir?: string;
|
|
23
|
+
/** Env bag for the env-precedence step. Defaults to `process.env`.
|
|
24
|
+
* Tests pass a fixture (often `{}`) to suppress leaks from the
|
|
25
|
+
* ambient environment. */
|
|
26
|
+
readonly env?: Readonly<Record<string, string | undefined>>;
|
|
27
|
+
/** When `true`, throw `ManifestDiscoveryError` on miss instead of
|
|
28
|
+
* returning `undefined`. Default `false` (lets callers that treat
|
|
29
|
+
* "no manifest" as cold-start branch cleanly). */
|
|
30
|
+
readonly required?: boolean;
|
|
31
|
+
}
|
|
32
|
+
interface BuildIntegrationIdentity {
|
|
33
|
+
readonly app: string | undefined;
|
|
34
|
+
readonly stack: string;
|
|
35
|
+
readonly stateDir: string;
|
|
36
|
+
readonly manifestPath: string;
|
|
37
|
+
}
|
|
38
|
+
interface DiscoverBuildIntegrationIdentityOptions {
|
|
39
|
+
/** Resolution cwd. Defaults to `process.cwd()`. */
|
|
40
|
+
readonly cwd?: string;
|
|
41
|
+
/** Explicit app name. Overrides env + package.json walk-up. */
|
|
42
|
+
readonly app?: string;
|
|
43
|
+
/** Explicit stack name. Overrides `DEVSTACK_STACK`; otherwise
|
|
44
|
+
* defaults to `main`. */
|
|
45
|
+
readonly stack?: string;
|
|
46
|
+
/** Explicit state-dir name. Overrides `DEVSTACK_STATE_DIR`. */
|
|
47
|
+
readonly stateDir?: string;
|
|
48
|
+
/** Env bag for tests and config loaders. Defaults to `process.env`. */
|
|
49
|
+
readonly env?: Readonly<Record<string, string | undefined>>;
|
|
50
|
+
}
|
|
51
|
+
/** Read `name` out of `<dir>/package.json`, strip the `@scope/`
|
|
52
|
+
* prefix and any leading non-alphanumerics. Returns `undefined`
|
|
53
|
+
* when the file is missing / unreadable / has no name field. */
|
|
54
|
+
declare const readAppName: (dir: string) => string | undefined;
|
|
55
|
+
/** Walk up from `cwd` to find the closest `package.json` and return
|
|
56
|
+
* its un-scoped `name` field. Returns `undefined` if no package.json
|
|
57
|
+
* is reachable. Bounded to 32 levels — defense against pathological
|
|
58
|
+
* symlink loops. */
|
|
59
|
+
declare const readAppNameWalkup: (cwd: string) => string | undefined;
|
|
60
|
+
/** Resolve the framework-neutral identity tuple build integrations
|
|
61
|
+
* need at config-load time. The manifest path is returned even when
|
|
62
|
+
* it does not exist yet so cold-start callers can still compute
|
|
63
|
+
* conventional URLs and watch-ignore paths. */
|
|
64
|
+
declare const discoverBuildIntegrationIdentity: (options?: DiscoverBuildIntegrationIdentityOptions) => BuildIntegrationIdentity;
|
|
65
|
+
/**
|
|
66
|
+
* Locate an existing devstack manifest on disk. Sync — Playwright's
|
|
67
|
+
* config loader and apps' startup paths both depend on this being
|
|
68
|
+
* synchronous.
|
|
69
|
+
*
|
|
70
|
+
* Returns the absolute path of the first match per the precedence
|
|
71
|
+
* documented at the top of this module, or `undefined` if no candidate
|
|
72
|
+
* exists. Pass `{ required: true }` to throw `ManifestDiscoveryError`
|
|
73
|
+
* on miss instead.
|
|
74
|
+
*/
|
|
75
|
+
declare function discoverManifestPath(opts?: DiscoverManifestPathOptions): string | undefined;
|
|
76
|
+
//#endregion
|
|
77
|
+
export { BuildIntegrationIdentity, DEFAULT_STACK, DEFAULT_STATE_DIR, DiscoverBuildIntegrationIdentityOptions, DiscoverManifestPathOptions, discoverBuildIntegrationIdentity, discoverManifestPath, readAppName, readAppNameWalkup };
|
|
78
|
+
//# sourceMappingURL=discover.d.mts.map
|