void 0.22.0 → 0.23.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/README.md +5 -1
- package/dist/{account-cmd-CjyxcGkM.mjs → account-cmd-C84Ee8cO.mjs} +4 -4
- package/dist/{scan-ClYmX3sa.mjs → application-analysis-BVsVqc11.mjs} +135 -18
- package/dist/application-routing-B7QEjqSR.mjs +27 -0
- package/dist/{auth-CZuiVsFh.mjs → auth-CCjt0hcq.mjs} +1 -1
- package/dist/{auth-DLNN0D3Z.mjs → auth-CSkdO2Bb.mjs} +4 -47
- package/dist/{auth-link-BLO4ptzo.mjs → auth-link-CioEg6uY.mjs} +4 -4
- package/dist/{auth-router-ZUg9MF_U.mjs → auth-router-BsR981d4.mjs} +4 -4
- package/dist/{better-auth-shared-rsBGBvWJ.mjs → better-auth-shared-hy6RPh9W.mjs} +13 -2
- package/dist/{build-cmd-BxR5FROK.mjs → build-cmd-LzvNJORH.mjs} +17 -5
- package/dist/{cache-D0sWhgKI.mjs → cache-C4MvnrMH.mjs} +2 -2
- package/dist/{cancel-deploy-D4NUqFbi.mjs → cancel-deploy-abUxpP2n.mjs} +2 -2
- package/dist/{cf-build-output-BJ6yGEIS.mjs → cf-build-output-BPqOT964.mjs} +2 -1
- package/dist/cf-build-output-_0HNWysu.mjs +2 -0
- package/dist/cli/cli.mjs +80 -455
- package/dist/cli/{cf-compat.mjs → cloudflare-operation-process.mjs} +442 -421
- package/dist/cli/env-schema-probe.d.mts +2 -1
- package/dist/cli/env-schema-probe.mjs +3 -3
- package/dist/client-Cu7jWiF1.mjs +2 -0
- package/dist/{client-BTZ3XkrB.mjs → client-RV8NVeB8.mjs} +140 -21
- package/dist/{cloudflare-auth-DQkqoMYa.mjs → cloudflare-auth-Qdc7tw8F.mjs} +41 -38
- package/dist/{cloudflare-cmd-BKlfGHAy.mjs → cloudflare-cmd-BcrVyTmJ.mjs} +5 -5
- package/dist/cloudflare-config-Bktvwtpf.mjs +182 -0
- package/dist/{cloudflare-connect-Ctmrw579.mjs → cloudflare-connect-B8uPZ4nx.mjs} +3 -3
- package/dist/{cloudflare-operations-BT6OWFBk.mjs → cloudflare-operations-AiWashgg.mjs} +1 -1
- package/dist/{cloudflare-operations-B9tzgjmf.mjs → cloudflare-operations-fxHb-byx.mjs} +116 -172
- package/dist/{preset-UHj9ARyP.mjs → cloudflare-process-B-wekeR6.mjs} +93 -6
- package/dist/{config-VavjpDnp.d.mts → config-BMHb8RCj.d.mts} +1 -0
- package/dist/config-C_XRIPx2.mjs +89 -0
- package/dist/config-entry.d.mts +1 -1
- package/dist/{connect-Dg-WkW-C.mjs → connect-Bd4kJd9U.mjs} +5 -5
- package/dist/{create-project-DdoqwFLF.mjs → create-project-Boczwj5r.mjs} +1 -1
- package/dist/{create-project-l9J7pbtm.mjs → create-project-bMf6ffLZ.mjs} +2 -2
- package/dist/{db-gp2sCXyN.mjs → db-8uG64XLl.mjs} +21 -21
- package/dist/{delete-TTedbH6B.mjs → delete-NvbiyeJf.mjs} +2 -2
- package/dist/{deploy-CH-o2CaZ.mjs → deploy-DzAIwqNU.mjs} +908 -582
- package/dist/{deploy-B19L2Bra.mjs → deploy-bjXdFCtn.mjs} +1 -1
- package/dist/{domain-JRF59P_r.mjs → domain-y5Tvydvo.mjs} +3 -3
- package/dist/{email-Bo6G9LOZ.mjs → email-B3umsW75.mjs} +13 -28
- package/dist/{env-BYOrWQnv.mjs → env-BS6qYHDb.mjs} +4 -4
- package/dist/{env-public-BxU_0yTL.d.mts → env-public-BX_r8HR6.d.mts} +1 -1
- package/dist/{env-validation-BB4GkLxn.mjs → env-validation-BPn7vk-V.mjs} +18 -71
- package/dist/{env-validation-BXge7uyK.mjs → env-validation-DbTg7-ar.mjs} +1 -1
- package/dist/{fetch-CXDChK7B.mjs → fetch-BIZJh7vR.mjs} +2 -2
- package/dist/{fetch-stream-AOByI7Ki.mjs → fetch-stream-IvCYKyQL.mjs} +24 -4
- package/dist/{gen-sCtlCOdA.mjs → gen-B580--vC.mjs} +2 -2
- package/dist/gen-BVaUUumi.mjs +2 -0
- package/dist/{github-cmd-0-7PexDq.mjs → github-cmd-v45BdfKX.mjs} +2 -2
- package/dist/{handler-HEcZsaij.d.mts → handler-CZ4nAylQ.d.mts} +1 -1
- package/dist/help-DofyZuY7.mjs +2 -0
- package/dist/{help-GKtwl07I.mjs → help-daGKjXGk.mjs} +229 -747
- package/dist/index.d.mts +1 -1
- package/dist/index.mjs +288 -1502
- package/dist/info-B97bTX9N.mjs +113 -0
- package/dist/{init-FZx3Elvz.mjs → init-Bvy7zrBo.mjs} +46 -15
- package/dist/limits-Bq5LG8Id.d.mts +27 -0
- package/dist/limits-Cjuk2VPm.mjs +68 -0
- package/dist/{link-BrQfb_CU.mjs → link-CDqqCjFl.mjs} +3 -3
- package/dist/{list-D44jmIAM.mjs → list-CZj0dzKY.mjs} +3 -3
- package/dist/{live-CKJlvlNp.d.mts → live-Chw1eIMv.d.mts} +1 -1
- package/dist/{local-d1-Bg9OzEEO.mjs → local-d1-2CMnpuW_.mjs} +2 -2
- package/dist/login-DYt_An22.mjs +2 -0
- package/dist/{login-CAsAsQ-_.mjs → login-UZKFM_u7.mjs} +3 -3
- package/dist/{logs-BjKvFnVM.mjs → logs-CUZ6t9t3.mjs} +3 -3
- package/dist/migrate-8_2u55MD.mjs +2 -0
- package/dist/{migrate-BPITvDJN.mjs → migrate-DHul7PRV.mjs} +2 -1
- package/dist/{node-Dt7z256D.mjs → node-BkyRWRx8.mjs} +1 -1
- package/dist/operator-args-CLgKGlwU.mjs +690 -0
- package/dist/{operator-cmd-BK5CCiT9.mjs → operator-cmd-DBA6dl0m.mjs} +68 -22
- package/dist/pages/client.d.mts +34 -2
- package/dist/pages/client.mjs +59 -3
- package/dist/pages/index.d.mts +1 -1
- package/dist/pages/index.mjs +1 -1
- package/dist/pages/islands-plugin.mjs +1 -1
- package/dist/pages/protocol.d.mts +2 -2
- package/dist/pages/protocol.mjs +2 -308
- package/dist/{parse-filename-DioPHiR9.mjs → parse-filename-CUbj-1MP.mjs} +35 -1
- package/dist/plan-D1Q5rf-r.mjs +2 -0
- package/dist/plan-NPpwZ_kc.mjs +58 -0
- package/dist/platform-args-BJdRtlLq.mjs +506 -0
- package/dist/platform-args-D3RXyR6h.mjs +2 -0
- package/dist/{platform-auth-config-BlN8xTdD.mjs → platform-auth-config-B56E9YP1.mjs} +3 -3
- package/dist/{platform-auth-protection-7d5aV2Jg.mjs → platform-auth-protection-BDWO_aER.mjs} +2 -2
- package/dist/{platform-auth-recovery-Dxij8ZbR.mjs → platform-auth-recovery-1gg4CSRe.mjs} +3 -3
- package/dist/{platform-cmd-E0FuL212.mjs → platform-cmd-Bt-1w6pY.mjs} +1 -1
- package/dist/{platform-cmd-B3hwKrFK.mjs → platform-cmd-DMcQStSc.mjs} +24 -3
- package/dist/{platform-domain-D6Xcy9ZX.mjs → platform-domain-BNkcz0OB.mjs} +2 -2
- package/dist/{platform-lifecycle-k0E0xoxx.mjs → platform-lifecycle-9OyBALhH.mjs} +327 -215
- package/dist/{platform-lifecycle-DMh_qrry.mjs → platform-lifecycle-BE6C_jxh.mjs} +1 -1
- package/dist/{platform-management-Brz_BDiT.mjs → platform-management-CjwLVQwN.mjs} +6 -3
- package/dist/{platform-management-DOtss0BN.mjs → platform-management-CnyTdcWX.mjs} +1 -1
- package/dist/platform-plans-config-BNGKGr4P.mjs +359 -0
- package/dist/{platform-recovery-BvtcXON5.mjs → platform-recovery-D6KSpuFm.mjs} +2 -2
- package/dist/{plugin-inference-BMfKRSqE.mjs → plugin-inference-CXWnn79A.mjs} +174 -64
- package/dist/{prepare-C-6YZyyg.mjs → prepare-B5Mkic5u.mjs} +1 -1
- package/dist/{prepare-CRhJbVrG.mjs → prepare-DOsL0CC9.mjs} +4 -20
- package/dist/prepare-cgvDMtSb.mjs +2 -0
- package/dist/{project-cmd-BZLCqOqw.mjs → project-cmd-CNzrqvBv.mjs} +16 -16
- package/dist/{project-team-BvgM0WoX.mjs → project-team-DQOWPfQT.mjs} +2 -2
- package/dist/{project-token-l5DqK6Az.mjs → project-token-CTDYU0Cc.mjs} +2 -2
- package/dist/{project-zero-trust-v6Mvpp8y.mjs → project-zero-trust-BNAkW-_0.mjs} +2 -2
- package/dist/{protocol-BBa6cstI.d.mts → protocol-CjF_iI9X.d.mts} +2 -2
- package/dist/protocol-U7bfjHmA.mjs +331 -0
- package/dist/{provision-Fr9pRqce.mjs → provision-C4ORE7G7.mjs} +1 -1
- package/dist/{provision-C4IGqkBf.mjs → provision-CJFgTZY8.mjs} +89 -198
- package/dist/{requests-DN-BbNiM.mjs → requests-MhxYnau8.mjs} +2 -2
- package/dist/resource-name-C7LVpcRm.mjs +11 -0
- package/dist/{rollback-D7rzSaZM.mjs → rollback-CJ6iSDoU.mjs} +3 -3
- package/dist/route-url-CG7U-cRN.mjs +15 -0
- package/dist/{runner-B8wXwWlo.mjs → runner-CXA9Fh8h.mjs} +1 -1
- package/dist/{runner-p-dMs2UN.mjs → runner-Ol0TNjk6.mjs} +2 -2
- package/dist/runtime/ai.d.mts +12 -8
- package/dist/runtime/ai.mjs +84 -17
- package/dist/runtime/better-auth-mysql.mjs +1 -1
- package/dist/runtime/better-auth-pg.mjs +1 -1
- package/dist/runtime/better-auth.mjs +1 -1
- package/dist/runtime/client-react.mjs +2 -2
- package/dist/runtime/client-solid.mjs +2 -2
- package/dist/runtime/client-svelte.mjs +2 -2
- package/dist/runtime/client-vue.mjs +2 -2
- package/dist/runtime/client.mjs +2 -2
- package/dist/runtime/durable.d.mts +3 -1
- package/dist/runtime/durable.mjs +4 -1
- package/dist/runtime/email/testing.mjs +1 -1
- package/dist/runtime/env-public.d.mts +1 -1
- package/dist/runtime/fetch-stream.mjs +1 -1
- package/dist/runtime/fetch.mjs +1 -1
- package/dist/runtime/handler.d.mts +1 -1
- package/dist/runtime/kv.mjs +0 -1
- package/dist/runtime/limits.d.mts +2 -0
- package/dist/runtime/limits.mjs +2 -0
- package/dist/runtime/live-client.d.mts +1 -1
- package/dist/runtime/live-server.mjs +25 -16
- package/dist/runtime/live.d.mts +1 -1
- package/dist/runtime/migration-handler.mjs +62 -42
- package/dist/runtime/route-url.d.mts +4 -0
- package/dist/runtime/route-url.mjs +2 -0
- package/dist/runtime/routing.d.mts +180 -0
- package/dist/runtime/routing.mjs +1082 -0
- package/dist/runtime/sandbox-container.d.mts +1 -1
- package/dist/runtime/sandbox-container.mjs +1 -1
- package/dist/runtime/sandbox.d.mts +3 -3
- package/dist/runtime/sandbox.mjs +75 -45
- package/dist/runtime/sse.mjs +1 -1
- package/dist/runtime/validator.d.mts +1 -1
- package/dist/runtime/ws-server.d.mts +4 -2
- package/dist/runtime/ws-server.mjs +27 -2
- package/dist/runtime/ws.d.mts +2 -2
- package/dist/runtime/ws.mjs +8 -6
- package/dist/{sandbox-qpNBT8a3.d.mts → sandbox-XZAqzFlG.d.mts} +11 -8
- package/dist/{sandbox-container-DdNEBfCc.d.mts → sandbox-container-Bo0eiFKz.d.mts} +2 -1
- package/dist/{sandbox-container-4fdqLnyb.mjs → sandbox-container-C6ItmVuN.mjs} +4 -2
- package/dist/{scan-4tfN-PSn.mjs → scan-C7okrLyM.mjs} +4 -35
- package/dist/{secret-BOtOl_cb.mjs → secret-Dli5fP0B.mjs} +4 -4
- package/dist/{sse-BaC1jXko.mjs → sse-CQNaDFFV.mjs} +6 -3
- package/dist/validate-Dq_L3s0S.mjs +2 -0
- package/dist/{validate-CIUwFpjB.mjs → validate-ctOrgiS3.mjs} +2 -1
- package/dist/{wrangler-DQF1vKyf.mjs → wrangler-7K-bW_DL.mjs} +8 -239
- package/dist/{ws-BoY7vQML.d.mts → ws-CL1w7GXU.d.mts} +13 -2
- package/package.json +15 -8
- package/skills/migrate-vite-cloudflare-to-void/SKILL.md +34 -157
- package/skills/void/SKILL.md +50 -135
- package/skills/void/docs/guide/ai.md +94 -84
- package/skills/void/docs/guide/app-types.md +3 -32
- package/skills/void/docs/guide/auth.md +12 -116
- package/skills/void/docs/guide/database/d1.md +9 -54
- package/skills/void/docs/guide/database/mysql.md +1 -1
- package/skills/void/docs/guide/database/postgresql.md +5 -26
- package/skills/void/docs/guide/database.md +23 -75
- package/skills/void/docs/guide/deployment.md +27 -113
- package/skills/void/docs/guide/durable-state.md +43 -18
- package/skills/void/docs/guide/edge/headers.md +3 -47
- package/skills/void/docs/guide/edge/prerendering.md +5 -20
- package/skills/void/docs/guide/edge/redirects.md +11 -64
- package/skills/void/docs/guide/edge/revalidation.md +5 -18
- package/skills/void/docs/guide/edge/rewrites.md +56 -284
- package/skills/void/docs/guide/edge/static-assets.md +22 -72
- package/skills/void/docs/guide/email/domains.md +112 -0
- package/skills/void/docs/guide/email/receiving.md +139 -0
- package/skills/void/docs/guide/email/sending.md +231 -0
- package/skills/void/docs/guide/email.md +13 -619
- package/skills/void/docs/guide/env-migration.md +11 -11
- package/skills/void/docs/guide/env-vars.md +9 -29
- package/skills/void/docs/guide/index.md +0 -15
- package/skills/void/docs/guide/jobs.md +3 -18
- package/skills/void/docs/guide/kv.md +5 -11
- package/skills/void/docs/guide/live.md +5 -56
- package/skills/void/docs/guide/pages-routing/actions-and-forms.md +78 -125
- package/skills/void/docs/guide/pages-routing/head.md +10 -10
- package/skills/void/docs/guide/pages-routing/islands.md +6 -36
- package/skills/void/docs/guide/pages-routing/layouts.md +6 -128
- package/skills/void/docs/guide/pages-routing/loaders.md +3 -19
- package/skills/void/docs/guide/pages-routing/markdown.md +13 -171
- package/skills/void/docs/guide/pages-routing/overview.md +7 -17
- package/skills/void/docs/guide/pages-routing/view-transitions.md +1 -1
- package/skills/void/docs/guide/platform/administration/access.md +1 -4
- package/skills/void/docs/guide/platform/administration/email.md +35 -8
- package/skills/void/docs/guide/platform/administration/operations.md +26 -4
- package/skills/void/docs/guide/platform/administration/plans.md +126 -0
- package/skills/void/docs/guide/platform/administration/projects.md +5 -2
- package/skills/void/docs/guide/platform/administration/zero-trust.md +23 -152
- package/skills/void/docs/guide/platform/development/runtime.md +3 -13
- package/skills/void/docs/guide/platform/development/schema-ci.md +0 -58
- package/skills/void/docs/guide/platform/installation/credentials.md +6 -4
- package/skills/void/docs/guide/platform/installation/domains.md +30 -2
- package/skills/void/docs/guide/platform/installation/first-deployment.md +2 -0
- package/skills/void/docs/guide/platform/installation/maintenance.md +3 -1
- package/skills/void/docs/guide/platform/installation/prerequisites.md +20 -15
- package/skills/void/docs/guide/platform/installation/setup.md +9 -5
- package/skills/void/docs/guide/platform-administration.md +1 -0
- package/skills/void/docs/guide/queues.md +7 -9
- package/skills/void/docs/guide/quickstart.md +38 -37
- package/skills/void/docs/guide/remote-dev.md +4 -9
- package/skills/void/docs/guide/sandboxes.md +29 -21
- package/skills/void/docs/guide/server-routing.md +9 -72
- package/skills/void/docs/guide/sse.md +4 -18
- package/skills/void/docs/guide/ssg.md +3 -15
- package/skills/void/docs/guide/ssr.md +14 -62
- package/skills/void/docs/guide/storage.md +9 -4
- package/skills/void/docs/guide/type-safety.md +3 -14
- package/skills/void/docs/guide/typed-fetch.md +3 -7
- package/skills/void/docs/guide/websockets.md +68 -40
- package/skills/void/docs/integrations/agents.md +3 -3
- package/skills/void/docs/integrations/cloudflare.md +85 -316
- package/skills/void/docs/integrations/frameworks/analog.md +5 -64
- package/skills/void/docs/integrations/frameworks/astro.md +4 -73
- package/skills/void/docs/integrations/frameworks/nuxt.md +5 -62
- package/skills/void/docs/integrations/frameworks/overview.md +11 -54
- package/skills/void/docs/integrations/frameworks/react-router.md +5 -60
- package/skills/void/docs/integrations/frameworks/sveltekit.md +6 -65
- package/skills/void/docs/integrations/frameworks/tanstack-start.md +4 -62
- package/skills/void/docs/integrations/nodejs-bun-deno.md +5 -69
- package/skills/void/docs/reference/api/auth.md +156 -0
- package/skills/void/docs/reference/api/client.md +87 -0
- package/skills/void/docs/reference/api/database.md +95 -0
- package/skills/void/docs/reference/api/durable.md +46 -0
- package/skills/void/docs/reference/api/env.md +50 -0
- package/skills/void/docs/reference/api/handlers.md +254 -0
- package/skills/void/docs/reference/api/pages.md +241 -0
- package/skills/void/docs/reference/api/plugin.md +39 -0
- package/skills/void/docs/reference/api/resources.md +109 -0
- package/skills/void/docs/reference/api/rewrites.md +76 -0
- package/skills/void/docs/reference/api/types.md +92 -0
- package/skills/void/docs/reference/api.md +56 -1218
- package/skills/void/docs/reference/cli/auth.md +88 -0
- package/skills/void/docs/reference/cli/database.md +128 -0
- package/skills/void/docs/reference/cli/deploy.md +85 -0
- package/skills/void/docs/reference/cli/domains.md +41 -0
- package/skills/void/docs/reference/cli/email.md +129 -0
- package/skills/void/docs/reference/cli/generate.md +116 -0
- package/skills/void/docs/reference/cli/github.md +189 -0
- package/skills/void/docs/reference/cli/platform-config.md +92 -0
- package/skills/void/docs/reference/cli/platform-email.md +81 -0
- package/skills/void/docs/reference/cli/platform-installation.md +127 -0
- package/skills/void/docs/reference/cli/platform-operations.md +90 -0
- package/skills/void/docs/reference/cli/platform-users.md +89 -0
- package/skills/void/docs/reference/cli/platform-zero-trust.md +45 -0
- package/skills/void/docs/reference/cli/platform.md +70 -0
- package/skills/void/docs/reference/cli/project.md +214 -0
- package/skills/void/docs/reference/cli/secrets.md +76 -0
- package/skills/void/docs/reference/cli/setup.md +70 -0
- package/skills/void/docs/reference/cli.md +32 -1682
- package/skills/void/docs/reference/config.md +12 -18
- package/skills/void/docs/reference/resource-inference.md +3 -58
- package/skills/void/docs/reference/structure.md +14 -41
- package/dist/canonical-json-DuDiiUsQ.mjs +0 -13
- package/dist/client-Czz8o5jP.mjs +0 -2
- package/dist/gen-CNJ62MM7.mjs +0 -2
- package/dist/help-CmZzxUba.mjs +0 -2
- package/dist/login-CGcRKEoi.mjs +0 -2
- package/dist/migrate-CYfbKkXh.mjs +0 -2
- package/dist/plan-BEZ8VJW0.mjs +0 -256
- package/dist/plan-DpuOr14e.mjs +0 -2
- package/dist/prepare-Bm3iq-u4.mjs +0 -2
- package/dist/validate-EKmJWxmy.mjs +0 -2
- /package/dist/cli/{cf-compat.d.mts → cloudflare-operation-process.d.mts} +0 -0
|
@@ -1,3 +1,3 @@
|
|
|
1
1
|
/// <reference types="@cloudflare/workers-types" />
|
|
2
|
-
import { a as SandboxInstance, c as SandboxProcessWire, i as SandboxExecOptions, l as validateSandboxOptions, n as SandboxCapability, o as SandboxNativeContainer, r as SandboxContainer, s as SandboxOptions, t as DEFAULT_SANDBOX_INACTIVITY_TIMEOUT_MS } from "../sandbox-container-
|
|
2
|
+
import { a as SandboxInstance, c as SandboxProcessWire, i as SandboxExecOptions, l as validateSandboxOptions, n as SandboxCapability, o as SandboxNativeContainer, r as SandboxContainer, s as SandboxOptions, t as DEFAULT_SANDBOX_INACTIVITY_TIMEOUT_MS } from "../sandbox-container-Bo0eiFKz.mjs";
|
|
3
3
|
export { DEFAULT_SANDBOX_INACTIVITY_TIMEOUT_MS, SandboxCapability, SandboxContainer, SandboxExecOptions, SandboxInstance, SandboxNativeContainer, SandboxOptions, SandboxProcessWire, validateSandboxOptions };
|
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
import { n as SandboxContainer, r as validateSandboxOptions, t as DEFAULT_SANDBOX_INACTIVITY_TIMEOUT_MS } from "../sandbox-container-
|
|
1
|
+
import { n as SandboxContainer, r as validateSandboxOptions, t as DEFAULT_SANDBOX_INACTIVITY_TIMEOUT_MS } from "../sandbox-container-C6ItmVuN.mjs";
|
|
2
2
|
export { DEFAULT_SANDBOX_INACTIVITY_TIMEOUT_MS, SandboxContainer, validateSandboxOptions };
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
/// <reference types="@cloudflare/workers-types" />
|
|
2
|
-
import { i as SandboxExecOptions, s as SandboxOptions } from "../sandbox-container-
|
|
3
|
-
import { a as
|
|
2
|
+
import { i as SandboxExecOptions, s as SandboxOptions } from "../sandbox-container-Bo0eiFKz.mjs";
|
|
3
|
+
import { a as SandboxFiles, c as SandboxUnavailableError, d as __setSandboxBindingName, f as getSandbox, i as SandboxClient, l as VoidPlatformSandbox, n as DEFAULT_SANDBOX_ID, o as SandboxLimitError, p as sandbox, r as SANDBOX_SERVICE_BINDING, s as SandboxProcess, t as DEFAULT_SANDBOX_BINDING, u as VoidSandboxOptions } from "../sandbox-XZAqzFlG.mjs";
|
|
4
4
|
export * from "@cloudflare/sandbox";
|
|
5
|
-
export { DEFAULT_SANDBOX_BINDING, DEFAULT_SANDBOX_ID, SANDBOX_SERVICE_BINDING, SandboxClient, type SandboxExecOptions, SandboxLimitError, type SandboxOptions, SandboxProcess, SandboxUnavailableError, VoidPlatformSandbox, VoidSandboxOptions, __setSandboxBindingName, getSandbox, sandbox };
|
|
5
|
+
export { DEFAULT_SANDBOX_BINDING, DEFAULT_SANDBOX_ID, SANDBOX_SERVICE_BINDING, SandboxClient, type SandboxExecOptions, SandboxFiles, SandboxLimitError, type SandboxOptions, SandboxProcess, SandboxUnavailableError, VoidPlatformSandbox, VoidSandboxOptions, __setSandboxBindingName, getSandbox, sandbox };
|
package/dist/runtime/sandbox.mjs
CHANGED
|
@@ -1,17 +1,20 @@
|
|
|
1
1
|
import { a as getRawRuntimeEnv } from "../env-raw-Cx8ElDdj.mjs";
|
|
2
2
|
import { a as requireRuntimeBinding } from "../env-D5liuQYR.mjs";
|
|
3
|
-
import {
|
|
3
|
+
import { i as limitOperation, t as UsageLimit } from "../limits-Cjuk2VPm.mjs";
|
|
4
|
+
import { n as SandboxContainer, r as validateSandboxOptions } from "../sandbox-container-C6ItmVuN.mjs";
|
|
4
5
|
export * from "@cloudflare/sandbox";
|
|
5
6
|
//#region src/runtime/sandbox.ts
|
|
6
7
|
const DEFAULT_SANDBOX_ID = "default";
|
|
7
8
|
const DEFAULT_SANDBOX_BINDING = "SANDBOX";
|
|
8
9
|
const SANDBOX_SERVICE_BINDING = "__VOID_SANDBOX";
|
|
9
|
-
var SandboxLimitError = class extends
|
|
10
|
+
var SandboxLimitError = class extends UsageLimit {
|
|
10
11
|
name = "SandboxLimitError";
|
|
11
|
-
reason;
|
|
12
12
|
constructor(reason, message) {
|
|
13
|
-
super(
|
|
14
|
-
|
|
13
|
+
super({
|
|
14
|
+
resource: "sandbox",
|
|
15
|
+
reason,
|
|
16
|
+
message: message ?? `Sandbox limit reached: ${reason}`
|
|
17
|
+
});
|
|
15
18
|
}
|
|
16
19
|
};
|
|
17
20
|
var SandboxUnavailableError = class extends Error {
|
|
@@ -88,48 +91,75 @@ function client(capability) {
|
|
|
88
91
|
throw error;
|
|
89
92
|
}
|
|
90
93
|
};
|
|
94
|
+
const files = new Proxy(Object.create(null), { get(_target, method) {
|
|
95
|
+
if (typeof method !== "string" || method === "then") return;
|
|
96
|
+
return (...args) => {
|
|
97
|
+
const index = method === "writeFile" || method === "rename" ? 3 : 2;
|
|
98
|
+
return limitOperation(() => callWithOptions("files", [method, ...args], index));
|
|
99
|
+
};
|
|
100
|
+
} });
|
|
101
|
+
const execute = async (argv, options) => {
|
|
102
|
+
const wire = await callWithOptions("exec", [argv, options], 1);
|
|
103
|
+
let exitCode;
|
|
104
|
+
let output;
|
|
105
|
+
const process = {
|
|
106
|
+
pid: wire.pid,
|
|
107
|
+
isPty: wire.isPty,
|
|
108
|
+
stdin: wire.stdin,
|
|
109
|
+
stdout: wire.stdout,
|
|
110
|
+
stderr: wire.stderr,
|
|
111
|
+
get exitCode() {
|
|
112
|
+
return exitCode ??= limitOperation(async () => {
|
|
113
|
+
try {
|
|
114
|
+
return await wire.capability.invoke("exitCode", []);
|
|
115
|
+
} catch (error) {
|
|
116
|
+
rethrowSandboxError(error);
|
|
117
|
+
}
|
|
118
|
+
});
|
|
119
|
+
},
|
|
120
|
+
output() {
|
|
121
|
+
return output ??= limitOperation(async () => {
|
|
122
|
+
try {
|
|
123
|
+
return await Promise.all([
|
|
124
|
+
wire.stdout ? new Response(wire.stdout).arrayBuffer() : /* @__PURE__ */ new ArrayBuffer(0),
|
|
125
|
+
wire.stderr ? new Response(wire.stderr).arrayBuffer() : /* @__PURE__ */ new ArrayBuffer(0),
|
|
126
|
+
process.exitCode.match({
|
|
127
|
+
ok: (code) => code,
|
|
128
|
+
limited: (limit) => {
|
|
129
|
+
throw limit;
|
|
130
|
+
}
|
|
131
|
+
})
|
|
132
|
+
]).then(([stdout, stderr, exitCode]) => ({
|
|
133
|
+
stdout,
|
|
134
|
+
stderr,
|
|
135
|
+
exitCode
|
|
136
|
+
}));
|
|
137
|
+
} catch (error) {
|
|
138
|
+
rethrowSandboxError(error);
|
|
139
|
+
}
|
|
140
|
+
});
|
|
141
|
+
},
|
|
142
|
+
kill: async (signal) => {
|
|
143
|
+
await wire.capability.invoke("kill", [signal]);
|
|
144
|
+
},
|
|
145
|
+
resize: async (cols, rows) => {
|
|
146
|
+
await wire.capability.invoke("resize", [cols, rows]);
|
|
147
|
+
}
|
|
148
|
+
};
|
|
149
|
+
return process;
|
|
150
|
+
};
|
|
91
151
|
return {
|
|
92
|
-
files
|
|
93
|
-
|
|
94
|
-
|
|
95
|
-
|
|
96
|
-
|
|
97
|
-
|
|
98
|
-
|
|
99
|
-
async exec(argv, options) {
|
|
100
|
-
const wire = await callWithOptions("exec", [argv, options], 1);
|
|
101
|
-
let exitCode;
|
|
102
|
-
let output;
|
|
103
|
-
const process = {
|
|
104
|
-
pid: wire.pid,
|
|
105
|
-
isPty: wire.isPty,
|
|
106
|
-
stdin: wire.stdin,
|
|
107
|
-
stdout: wire.stdout,
|
|
108
|
-
stderr: wire.stderr,
|
|
109
|
-
get exitCode() {
|
|
110
|
-
return exitCode ??= wire.capability.invoke("exitCode", []);
|
|
111
|
-
},
|
|
112
|
-
output() {
|
|
113
|
-
return output ??= Promise.all([
|
|
114
|
-
wire.stdout ? new Response(wire.stdout).arrayBuffer() : /* @__PURE__ */ new ArrayBuffer(0),
|
|
115
|
-
wire.stderr ? new Response(wire.stderr).arrayBuffer() : /* @__PURE__ */ new ArrayBuffer(0),
|
|
116
|
-
process.exitCode
|
|
117
|
-
]).then(([stdout, stderr, exitCode]) => ({
|
|
118
|
-
stdout,
|
|
119
|
-
stderr,
|
|
120
|
-
exitCode
|
|
121
|
-
}));
|
|
122
|
-
},
|
|
123
|
-
kill: async (signal) => {
|
|
124
|
-
await wire.capability.invoke("kill", [signal]);
|
|
125
|
-
},
|
|
126
|
-
resize: async (cols, rows) => {
|
|
127
|
-
await wire.capability.invoke("resize", [cols, rows]);
|
|
152
|
+
files,
|
|
153
|
+
exec: (argv, options) => limitOperation(() => execute(argv, options)),
|
|
154
|
+
run: (argv, options) => limitOperation(async () => {
|
|
155
|
+
return (await execute(argv, options)).output().match({
|
|
156
|
+
ok: (result) => result,
|
|
157
|
+
limited: (limit) => {
|
|
158
|
+
throw limit;
|
|
128
159
|
}
|
|
129
|
-
};
|
|
130
|
-
|
|
131
|
-
|
|
132
|
-
fetch: async (port, request) => await call("fetch", [port, request]),
|
|
160
|
+
});
|
|
161
|
+
}),
|
|
162
|
+
fetch: (port, request) => limitOperation(async () => await call("fetch", [port, request])),
|
|
133
163
|
running: async () => await call("running", []),
|
|
134
164
|
destroy: async () => {
|
|
135
165
|
await call("destroy", []);
|
package/dist/runtime/sse.mjs
CHANGED
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
import { a as getLastEventId, i as formatSseText, n as eventStream, r as formatSse, t as SseStreamClosedError } from "../sse-
|
|
1
|
+
import { a as getLastEventId, i as formatSseText, n as eventStream, r as formatSse, t as SseStreamClosedError } from "../sse-CQNaDFFV.mjs";
|
|
2
2
|
export { SseStreamClosedError, eventStream, formatSse, formatSseText, getLastEventId };
|
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
import { D as runValidation, E as ValidatorSlots, T as HandlerInput } from "../handler-
|
|
1
|
+
import { D as runValidation, E as ValidatorSlots, T as HandlerInput } from "../handler-CZ4nAylQ.mjs";
|
|
2
2
|
export { HandlerInput, ValidatorSlots, runValidation };
|
|
@@ -1,8 +1,10 @@
|
|
|
1
1
|
import { n as AuthState } from "../auth-DkcFflXV.mjs";
|
|
2
2
|
import { i as VoidAuthRuntimeOptions, n as VoidAuthEnv } from "../better-auth-shared-BVkjZ3vM.mjs";
|
|
3
|
-
import { t as AnyWebSocketDefinition } from "../ws-
|
|
3
|
+
import { f as WebSocketInstanceKey, t as AnyWebSocketDefinition } from "../ws-CL1w7GXU.mjs";
|
|
4
4
|
//#region src/runtime/ws-server.d.ts
|
|
5
5
|
export type WebSocketRouteMeta = {
|
|
6
|
+
name?: string;
|
|
7
|
+
key?: WebSocketInstanceKey;
|
|
6
8
|
pattern: string;
|
|
7
9
|
params: Array<string>;
|
|
8
10
|
className: string;
|
|
@@ -17,7 +19,7 @@ export type WebSocketDurableObjectClass = {
|
|
|
17
19
|
new (state: DurableObjectState, env: Record<string, unknown>): WebSocketDurableObjectInstance;
|
|
18
20
|
};
|
|
19
21
|
type ResolveVoidAuthState = (request: Request, env: VoidAuthEnv, runtime: VoidAuthRuntimeOptions) => Promise<AuthState | null>;
|
|
20
|
-
export declare function buildWebSocketInstanceId(route: Pick<WebSocketRouteMeta, "params">, params: Record<string, string>): string;
|
|
22
|
+
export declare function buildWebSocketInstanceId(route: Pick<WebSocketRouteMeta, "params" | "key">, params: Record<string, string>): string;
|
|
21
23
|
export declare function createWebSocketDurableObject(definition: AnyWebSocketDefinition, route: WebSocketRouteMeta, authRuntime?: VoidAuthRuntimeOptions, resolveAuthState?: ResolveVoidAuthState): WebSocketDurableObjectClass;
|
|
22
24
|
/** Keep a removed WebSocket Durable Object class deployable without deleting its storage. */
|
|
23
25
|
export declare function createWebSocketTombstoneDurableObject(className: string): WebSocketDurableObjectClass;
|
|
@@ -48,7 +48,14 @@ function getRouteMatch(request, route) {
|
|
|
48
48
|
return match.matched ? match.params : null;
|
|
49
49
|
}
|
|
50
50
|
function buildWebSocketInstanceId(route, params) {
|
|
51
|
+
if (route.key) {
|
|
52
|
+
const key = route.key({ params });
|
|
53
|
+
if (typeof key !== "string") throw new Error("ws: key must return a string synchronously.");
|
|
54
|
+
return key;
|
|
55
|
+
}
|
|
51
56
|
if (route.params.length === 0) return "default";
|
|
57
|
+
const entries = route.params.map((name) => [name, params[name] ?? ""]);
|
|
58
|
+
if (entries.length > 1 && entries.some(([, value]) => value.includes("&"))) return `v2:${JSON.stringify(entries)}`;
|
|
52
59
|
return route.params.map((name) => `${name}=${params[name] ?? ""}`).join("&");
|
|
53
60
|
}
|
|
54
61
|
async function validateSchema(schema, value) {
|
|
@@ -92,6 +99,16 @@ function getStoredConnection(webSocket) {
|
|
|
92
99
|
authState: null
|
|
93
100
|
};
|
|
94
101
|
}
|
|
102
|
+
function completeWebSocketClose(webSocket, code, reason) {
|
|
103
|
+
if (webSocket.readyState === 3) return;
|
|
104
|
+
if ([
|
|
105
|
+
1004,
|
|
106
|
+
1005,
|
|
107
|
+
1006,
|
|
108
|
+
1015
|
|
109
|
+
].includes(code)) webSocket.close();
|
|
110
|
+
else webSocket.close(code, reason);
|
|
111
|
+
}
|
|
95
112
|
function setStoredConnection(webSocket, data) {
|
|
96
113
|
webSocket.serializeAttachment?.(data);
|
|
97
114
|
}
|
|
@@ -164,6 +181,11 @@ function assertDefinition(definition) {
|
|
|
164
181
|
}
|
|
165
182
|
function createWebSocketDurableObject(definition, route, authRuntime, resolveAuthState) {
|
|
166
183
|
assertDefinition(definition);
|
|
184
|
+
if (definition.name !== route.name) throw new Error("ws: name must be statically discoverable in the route definition. Run void info to inspect this route.");
|
|
185
|
+
const instanceRoute = {
|
|
186
|
+
...route,
|
|
187
|
+
key: definition.key
|
|
188
|
+
};
|
|
167
189
|
class VoidWebSocketDurableObject {
|
|
168
190
|
state;
|
|
169
191
|
env;
|
|
@@ -176,7 +198,7 @@ function createWebSocketDurableObject(definition, route, authRuntime, resolveAut
|
|
|
176
198
|
}
|
|
177
199
|
async handleFetch(request) {
|
|
178
200
|
const params = getRouteMatch(request, route) ?? {};
|
|
179
|
-
const roomId = buildWebSocketInstanceId(
|
|
201
|
+
const roomId = buildWebSocketInstanceId(instanceRoute, params);
|
|
180
202
|
const authState = authRuntime && resolveAuthState ? await resolveAuthState(request, this.env, authRuntime) : null;
|
|
181
203
|
const user = authState?.user ?? null;
|
|
182
204
|
if (request.headers.get("upgrade")?.toLowerCase() === "websocket") {
|
|
@@ -261,6 +283,7 @@ function createWebSocketDurableObject(definition, route, authRuntime, resolveAut
|
|
|
261
283
|
return withRuntimeEnv(this.env, () => this.handleWebSocketClose(webSocket, code, reason, wasClean));
|
|
262
284
|
}
|
|
263
285
|
async handleWebSocketClose(webSocket, code, reason, wasClean) {
|
|
286
|
+
completeWebSocketClose(webSocket, code, reason);
|
|
264
287
|
const stored = getStoredConnection(webSocket);
|
|
265
288
|
const request = new Request(`https://void.local${route.pattern}`);
|
|
266
289
|
if (definition.__kind === "room") {
|
|
@@ -297,7 +320,9 @@ function createWebSocketTombstoneDurableObject(className) {
|
|
|
297
320
|
async webSocketMessage(webSocket) {
|
|
298
321
|
webSocket.close(1012, "WebSocket route removed");
|
|
299
322
|
}
|
|
300
|
-
async webSocketClose() {
|
|
323
|
+
async webSocketClose(webSocket, code, reason) {
|
|
324
|
+
completeWebSocketClose(webSocket, code, reason);
|
|
325
|
+
}
|
|
301
326
|
};
|
|
302
327
|
}
|
|
303
328
|
function getStub(env, route, params) {
|
package/dist/runtime/ws.d.mts
CHANGED
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
import { a as RoomDefinition, c as VoidSocket, d as WebSocketConnection, f as
|
|
2
|
-
export { AnyWebSocketDefinition, ConnectCommonOptions, RoomContext, RoomController, RoomDefinition, SocketContext, SocketDefinition, VoidSocket, VoidSocketCloseEvent, WebSocketBaseContext, WebSocketConnection, connect, defineRoom, defineWebSocket };
|
|
1
|
+
import { a as RoomDefinition, c as VoidSocket, d as WebSocketConnection, f as WebSocketInstanceKey, h as defineWebSocket, i as RoomController, l as VoidSocketCloseEvent, m as defineRoom, n as ConnectCommonOptions, o as SocketContext, p as connect, r as RoomContext, s as SocketDefinition, t as AnyWebSocketDefinition, u as WebSocketBaseContext } from "../ws-CL1w7GXU.mjs";
|
|
2
|
+
export { AnyWebSocketDefinition, ConnectCommonOptions, RoomContext, RoomController, RoomDefinition, SocketContext, SocketDefinition, VoidSocket, VoidSocketCloseEvent, WebSocketBaseContext, WebSocketConnection, WebSocketInstanceKey, connect, defineRoom, defineWebSocket };
|
package/dist/runtime/ws.mjs
CHANGED
|
@@ -1,16 +1,23 @@
|
|
|
1
|
+
import { t as isResourceName } from "../resource-name-C7LVpcRm.mjs";
|
|
2
|
+
import { t as interpolateRouteParams } from "../route-url-CG7U-cRN.mjs";
|
|
1
3
|
//#region src/runtime/ws.ts
|
|
2
4
|
function defineRoom(definition) {
|
|
5
|
+
assertResourceName(definition.name);
|
|
3
6
|
return {
|
|
4
7
|
...definition,
|
|
5
8
|
__kind: "room"
|
|
6
9
|
};
|
|
7
10
|
}
|
|
8
11
|
function defineWebSocket(definition) {
|
|
12
|
+
assertResourceName(definition.name);
|
|
9
13
|
return {
|
|
10
14
|
...definition,
|
|
11
15
|
__kind: "socket"
|
|
12
16
|
};
|
|
13
17
|
}
|
|
18
|
+
function assertResourceName(name) {
|
|
19
|
+
if (name !== void 0 && !isResourceName(name)) throw new Error("ws: name must contain a word starting with a letter.");
|
|
20
|
+
}
|
|
14
21
|
var VoidSocket = class {
|
|
15
22
|
url;
|
|
16
23
|
options;
|
|
@@ -89,14 +96,9 @@ function resolveBaseUrl(baseURL) {
|
|
|
89
96
|
if (!location) throw new Error("ws: connect() requires a browser-like runtime or an explicit \"baseURL\".");
|
|
90
97
|
return new URL(location.href);
|
|
91
98
|
}
|
|
92
|
-
function interpolateParams(path, params) {
|
|
93
|
-
let resolved = path;
|
|
94
|
-
if (params) for (const [key, value] of Object.entries(params)) resolved = resolved.replace(`:${key}`, encodeURIComponent(value));
|
|
95
|
-
return resolved;
|
|
96
|
-
}
|
|
97
99
|
function connect(path, options = {}) {
|
|
98
100
|
const base = resolveBaseUrl(options.baseURL);
|
|
99
|
-
const resolvedPath =
|
|
101
|
+
const resolvedPath = interpolateRouteParams(path, options.params);
|
|
100
102
|
const url = new URL(resolvedPath, base);
|
|
101
103
|
url.protocol = url.protocol === "https:" ? "wss:" : "ws:";
|
|
102
104
|
return new VoidSocket(url.toString(), options);
|
|
@@ -1,4 +1,5 @@
|
|
|
1
|
-
import {
|
|
1
|
+
import { n as LimitOperation, r as UsageLimit } from "./limits-Bq5LG8Id.mjs";
|
|
2
|
+
import { i as SandboxExecOptions, r as SandboxContainer, s as SandboxOptions } from "./sandbox-container-Bo0eiFKz.mjs";
|
|
2
3
|
import { Files } from "@cloudflare/sandbox";
|
|
3
4
|
//#region src/runtime/sandbox.d.ts
|
|
4
5
|
declare const DEFAULT_SANDBOX_ID = "default";
|
|
@@ -14,19 +15,21 @@ type SandboxProcess = {
|
|
|
14
15
|
stdin: WritableStream | null;
|
|
15
16
|
stdout: ReadableStream | null;
|
|
16
17
|
stderr: ReadableStream | null;
|
|
17
|
-
readonly exitCode:
|
|
18
|
-
output():
|
|
18
|
+
readonly exitCode: LimitOperation<number>;
|
|
19
|
+
output(): LimitOperation<ExecOutput>;
|
|
19
20
|
kill(signal?: number): Promise<void>;
|
|
20
21
|
resize(cols: number, rows: number): Promise<void>;
|
|
21
22
|
};
|
|
23
|
+
type SandboxFiles = { [K in keyof Files]: Files[K] extends ((...args: infer A) => Promise<infer R>) ? (...args: A) => LimitOperation<R> : never; };
|
|
22
24
|
type SandboxClient = {
|
|
23
|
-
exec(argv: Array<string>, options?: SandboxExecOptions):
|
|
24
|
-
|
|
25
|
-
|
|
25
|
+
exec(argv: Array<string>, options?: SandboxExecOptions): LimitOperation<SandboxProcess>;
|
|
26
|
+
run(argv: Array<string>, options?: SandboxExecOptions): LimitOperation<ExecOutput>;
|
|
27
|
+
files: SandboxFiles;
|
|
28
|
+
fetch(port: number, request: Request): LimitOperation<Response>;
|
|
26
29
|
running(): Promise<boolean>;
|
|
27
30
|
destroy(): Promise<void>;
|
|
28
31
|
};
|
|
29
|
-
declare class SandboxLimitError extends
|
|
32
|
+
declare class SandboxLimitError extends UsageLimit {
|
|
30
33
|
override readonly name = "SandboxLimitError";
|
|
31
34
|
readonly reason: "concurrency" | "runtime_budget";
|
|
32
35
|
constructor(reason: "concurrency" | "runtime_budget", message?: string);
|
|
@@ -46,4 +49,4 @@ declare const sandbox: {
|
|
|
46
49
|
get: typeof getSandbox;
|
|
47
50
|
};
|
|
48
51
|
//#endregion
|
|
49
|
-
export {
|
|
52
|
+
export { SandboxFiles as a, SandboxUnavailableError as c, __setSandboxBindingName as d, getSandbox as f, SandboxClient as i, VoidPlatformSandbox as l, DEFAULT_SANDBOX_ID as n, SandboxLimitError as o, sandbox as p, SANDBOX_SERVICE_BINDING as r, SandboxProcess as s, DEFAULT_SANDBOX_BINDING as t, VoidSandboxOptions as u };
|
|
@@ -53,7 +53,8 @@ declare class SandboxContainer<Env = unknown> extends DurableObject<Env> {
|
|
|
53
53
|
protected afterStart(): Promise<void>;
|
|
54
54
|
protected beforeUse(): Promise<void>;
|
|
55
55
|
protected stopped(): Promise<void>;
|
|
56
|
-
protected
|
|
56
|
+
protected processContext(_exitCode: Promise<number>): unknown;
|
|
57
|
+
protected waitForProcessExit(exitCode: Promise<number>, _context?: unknown): Promise<number>;
|
|
57
58
|
/** Native abort listeners must be detached as soon as a process exits. */
|
|
58
59
|
protected execProcess(argv: Array<string>, options?: SandboxExecOptions): Promise<ExecProcess & {
|
|
59
60
|
isPty?: boolean;
|
|
@@ -109,7 +109,8 @@ var SandboxContainer = class extends DurableObject {
|
|
|
109
109
|
async afterStart() {}
|
|
110
110
|
async beforeUse() {}
|
|
111
111
|
async stopped() {}
|
|
112
|
-
|
|
112
|
+
processContext(_exitCode) {}
|
|
113
|
+
async waitForProcessExit(exitCode, _context) {
|
|
113
114
|
return exitCode;
|
|
114
115
|
}
|
|
115
116
|
/** Native abort listeners must be detached as soon as a process exits. */
|
|
@@ -253,8 +254,9 @@ var SandboxContainer = class extends DurableObject {
|
|
|
253
254
|
...options
|
|
254
255
|
});
|
|
255
256
|
process.exitCode.then(finish, finish);
|
|
257
|
+
const processContext = this.processContext(process.exitCode);
|
|
256
258
|
return {
|
|
257
|
-
capability: new ProcessCapability(process, () => this.waitForProcessExit(process.exitCode)),
|
|
259
|
+
capability: new ProcessCapability(process, () => this.waitForProcessExit(process.exitCode, processContext)),
|
|
258
260
|
pid: process.pid,
|
|
259
261
|
isPty: process.isPty ?? false,
|
|
260
262
|
stdin: process.stdin ?? null,
|
|
@@ -2,41 +2,9 @@ import { a as join, n as dirname, r as extname, t as basename } from "./dist-BVq
|
|
|
2
2
|
import { n as readProjectPaths } from "./project-paths-GgcMozYz.mjs";
|
|
3
3
|
import { t as glob } from "./dist-Bn8Kodjp.mjs";
|
|
4
4
|
import { n as isIdentifier, r as isLiteral } from "./ast-CPGPjb0V.mjs";
|
|
5
|
-
import { n as parseRouteFilename } from "./parse-filename-
|
|
5
|
+
import { a as staticLiteral, i as staticExportInitializers, n as parseRouteFilename } from "./parse-filename-CUbj-1MP.mjs";
|
|
6
6
|
import { existsSync, readFileSync } from "node:fs";
|
|
7
7
|
import { parseSync } from "vite";
|
|
8
|
-
//#region src/shared/static-exports.ts
|
|
9
|
-
/** Read the initializer of directly exported constants without evaluating user code. */
|
|
10
|
-
function staticExportInitializers(filename, source, names) {
|
|
11
|
-
const result = /* @__PURE__ */ new Map();
|
|
12
|
-
const program = parseSync(filename, source).program;
|
|
13
|
-
for (const statement of program.body ?? []) {
|
|
14
|
-
if (statement.type !== "ExportNamedDeclaration") continue;
|
|
15
|
-
const declaration = statement.declaration;
|
|
16
|
-
if (declaration?.type !== "VariableDeclaration" || declaration.kind !== "const") continue;
|
|
17
|
-
for (const variable of declaration.declarations ?? []) if (isIdentifier(variable.id) && names.has(variable.id.name) && variable.init) result.set(variable.id.name, variable.init);
|
|
18
|
-
}
|
|
19
|
-
return result;
|
|
20
|
-
}
|
|
21
|
-
function unwrapStaticExpression(node) {
|
|
22
|
-
while (node && [
|
|
23
|
-
"ParenthesizedExpression",
|
|
24
|
-
"TSAsExpression",
|
|
25
|
-
"TSSatisfiesExpression",
|
|
26
|
-
"TSTypeAssertion"
|
|
27
|
-
].includes(node.type)) node = node.expression;
|
|
28
|
-
return node;
|
|
29
|
-
}
|
|
30
|
-
function staticLiteral(node) {
|
|
31
|
-
node = unwrapStaticExpression(node);
|
|
32
|
-
if (node?.type === "Literal") return node.value;
|
|
33
|
-
if (node?.type === "TemplateLiteral") {
|
|
34
|
-
const expressions = node.expressions;
|
|
35
|
-
const quasis = node.quasis;
|
|
36
|
-
if (expressions?.length === 0 && quasis?.length === 1) return quasis[0]?.value?.cooked;
|
|
37
|
-
}
|
|
38
|
-
}
|
|
39
|
-
//#endregion
|
|
40
8
|
//#region src/pages/layout-resolution.ts
|
|
41
9
|
function isNamedLayout(layout) {
|
|
42
10
|
return "name" in layout;
|
|
@@ -131,7 +99,8 @@ function componentLayout(source, filename) {
|
|
|
131
99
|
const scripts = filename.endsWith(".vue") || filename.endsWith(".svelte") ? [...source.matchAll(/<script\b[^>]*>([\s\S]*?)<\/script\s*>/gi)].map((match) => match[1]) : [source];
|
|
132
100
|
for (const script of scripts) {
|
|
133
101
|
if (!script.includes("layout")) continue;
|
|
134
|
-
const
|
|
102
|
+
const initializer = staticExportInitializers(filename.replace(/\.(vue|svelte)$/, ".ts"), script, /* @__PURE__ */ new Set(["layout"])).get("layout");
|
|
103
|
+
const value = staticLiteral(initializer);
|
|
135
104
|
if (typeof value === "string" || value === false) return value;
|
|
136
105
|
}
|
|
137
106
|
}
|
|
@@ -366,4 +335,4 @@ function extractFrontmatterLayout(source) {
|
|
|
366
335
|
return value;
|
|
367
336
|
}
|
|
368
337
|
//#endregion
|
|
369
|
-
export { resolveNamedLayout as a,
|
|
338
|
+
export { resolveNamedLayout as a, resolveLayoutIds as i, resolveEffectiveLayoutChain as n, resolveLayoutChain as r, scanPages as t };
|
|
@@ -1,8 +1,8 @@
|
|
|
1
|
-
import { c as getToken } from "./auth-
|
|
1
|
+
import { c as getToken } from "./auth-CSkdO2Bb.mjs";
|
|
2
2
|
import { i as readDeploymentPlatform, o as readProjectConfig } from "./project-C0Fqu05O.mjs";
|
|
3
|
-
import { _ as validateSecretValues } from "./env-validation-
|
|
3
|
+
import { _ as validateSecretValues } from "./env-validation-BPn7vk-V.mjs";
|
|
4
4
|
import { E as confirm, F as password, N as note, O as intro, P as outro, T as cancel, W as isCancel, j as log } from "./dist-CTBk70IR.mjs";
|
|
5
|
-
import { n as PlatformClient } from "./client-
|
|
5
|
+
import { n as PlatformClient } from "./client-RV8NVeB8.mjs";
|
|
6
6
|
import { r as cliTitle } from "./output-Dm_A4Tbv.mjs";
|
|
7
7
|
import { r as resolveProjectBySlug, t as getRequestedProjectSlug } from "./resolve-project-BG5ORGID.mjs";
|
|
8
8
|
import { readFileSync } from "node:fs";
|
|
@@ -78,7 +78,7 @@ async function runSecretCommand(root, args) {
|
|
|
78
78
|
}
|
|
79
79
|
async function runCloudflareSecretCommand(root, args) {
|
|
80
80
|
if (args.projectName) throw new Error("secret: --project selects a Void platform project and is not used for direct Cloudflare apps.");
|
|
81
|
-
const { deleteCloudflareSecret, listCloudflareSecrets, putCloudflareSecret, resolveCloudflareOperationContext, syncCloudflareSecrets } = await import("./cloudflare-operations-
|
|
81
|
+
const { deleteCloudflareSecret, listCloudflareSecrets, putCloudflareSecret, resolveCloudflareOperationContext, syncCloudflareSecrets } = await import("./cloudflare-operations-AiWashgg.mjs");
|
|
82
82
|
const context = resolveCloudflareOperationContext(root);
|
|
83
83
|
if (args.action === "list") {
|
|
84
84
|
const secrets = await listCloudflareSecrets(context);
|
|
@@ -55,6 +55,7 @@ function eventStream(start, options = {}) {
|
|
|
55
55
|
const markClosed = () => {
|
|
56
56
|
if (closedOnce) return;
|
|
57
57
|
closedOnce = true;
|
|
58
|
+
options.signal?.removeEventListener("abort", abort);
|
|
58
59
|
if (!signalController.signal.aborted) signalController.abort();
|
|
59
60
|
if (keepAliveTimer != null) {
|
|
60
61
|
clearInterval(keepAliveTimer);
|
|
@@ -68,10 +69,12 @@ function eventStream(start, options = {}) {
|
|
|
68
69
|
await writer.close().catch(() => {});
|
|
69
70
|
}
|
|
70
71
|
async function fail(error) {
|
|
71
|
-
if (closedOnce) return;
|
|
72
72
|
markClosed();
|
|
73
73
|
await writer.abort(error).catch(() => {});
|
|
74
74
|
}
|
|
75
|
+
function abort() {
|
|
76
|
+
fail(options.signal?.reason ?? new SseStreamClosedError());
|
|
77
|
+
}
|
|
75
78
|
async function write(text) {
|
|
76
79
|
if (closedOnce) throw new SseStreamClosedError();
|
|
77
80
|
try {
|
|
@@ -95,11 +98,11 @@ function eventStream(start, options = {}) {
|
|
|
95
98
|
writer.closed.catch(() => {
|
|
96
99
|
close();
|
|
97
100
|
});
|
|
98
|
-
if (options.signal?.aborted) close();
|
|
99
|
-
else options.signal?.addEventListener("abort", () => void close(), { once: true });
|
|
100
101
|
if (keepAlive) keepAliveTimer = setInterval(() => {
|
|
101
102
|
stream.comment(keepAlive.comment).catch(() => close());
|
|
102
103
|
}, keepAlive.intervalMs);
|
|
104
|
+
if (options.signal?.aborted) abort();
|
|
105
|
+
else options.signal?.addEventListener("abort", abort, { once: true });
|
|
103
106
|
queueMicrotask(() => {
|
|
104
107
|
(async () => {
|
|
105
108
|
try {
|
|
@@ -1,7 +1,8 @@
|
|
|
1
1
|
import { a as join } from "./dist-BVqXeR_h.mjs";
|
|
2
2
|
import { n as readJournal, r as stripSqlExt } from "./collect-DiTn9yr6.mjs";
|
|
3
|
-
import { t as DESTRUCTIVE_PRAGMA
|
|
3
|
+
import { t as DESTRUCTIVE_PRAGMA } from "./plan-NPpwZ_kc.mjs";
|
|
4
4
|
import { existsSync, readdirSync } from "node:fs";
|
|
5
|
+
import { tokenizeSql } from "@void/deploy-core";
|
|
5
6
|
//#region src/migrations/validate.ts
|
|
6
7
|
/**
|
|
7
8
|
* Destructive SQL patterns that are rejected unless the migration
|