void 0.21.9 → 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-DZZGK80W.mjs → account-cmd-C84Ee8cO.mjs} +5 -5
- 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-B_CeugBw.mjs → auth-link-CioEg6uY.mjs} +5 -5
- package/dist/{auth-router-BgEFRuvZ.mjs → auth-router-BsR981d4.mjs} +5 -5
- package/dist/{better-auth-shared-rsBGBvWJ.mjs → better-auth-shared-hy6RPh9W.mjs} +13 -2
- package/dist/{build-cmd-Dpt0jd-x.mjs → build-cmd-LzvNJORH.mjs} +19 -7
- package/dist/{cache-7_UeZdTk.mjs → cache-C4MvnrMH.mjs} +4 -4
- package/dist/{cancel-deploy-D23R1RXT.mjs → cancel-deploy-abUxpP2n.mjs} +4 -4
- package/dist/{cf-build-output-CGT03qCD.mjs → cf-build-output-BPqOT964.mjs} +141 -63
- package/dist/cf-build-output-_0HNWysu.mjs +2 -0
- package/dist/cli/cli.mjs +114 -460
- package/dist/cli/cloudflare-operation-process.mjs +1103 -0
- 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-QTl6ko_D.mjs → client-RV8NVeB8.mjs} +165 -21
- package/dist/{cloudflare-auth-C4_GPZr0.mjs → cloudflare-auth-Qdc7tw8F.mjs} +41 -43
- package/dist/{cloudflare-cmd-bSmZ1d5L.mjs → cloudflare-cmd-BcrVyTmJ.mjs} +9 -10
- package/dist/cloudflare-config-Bktvwtpf.mjs +182 -0
- package/dist/{cloudflare-connect-jAwacxxP.mjs → cloudflare-connect-B8uPZ4nx.mjs} +4 -4
- package/dist/{cloudflare-operations-BipGMJ5O.mjs → cloudflare-operations-AiWashgg.mjs} +1 -1
- package/dist/{cloudflare-operations-sMZXpk_S.mjs → cloudflare-operations-fxHb-byx.mjs} +118 -203
- package/dist/{preset-UHj9ARyP.mjs → cloudflare-process-B-wekeR6.mjs} +93 -6
- package/dist/{config-CF69HgXc.d.mts → config-BMHb8RCj.d.mts} +2 -2
- package/dist/{config-CafTW6Cz.mjs → config-Br_JZD6u.mjs} +2 -7
- package/dist/config-C_XRIPx2.mjs +89 -0
- package/dist/{config-s7Xj7tPb.mjs → config-CyQ-wVd7.mjs} +1 -1
- package/dist/config-entry.d.mts +1 -1
- package/dist/{config-write-BSduPMY8.mjs → config-write-B1f88wJA.mjs} +1 -1
- package/dist/{connect-BsUSRzln.mjs → connect-Bd4kJd9U.mjs} +6 -6
- package/dist/{create-project-BniEV0OW.mjs → create-project-Boczwj5r.mjs} +1 -1
- package/dist/{create-project-DBfFSZKY.mjs → create-project-bMf6ffLZ.mjs} +9 -5
- package/dist/{db-hRrvZaq_.mjs → db-8uG64XLl.mjs} +26 -26
- package/dist/{delete-D6dZ9B6B.mjs → delete-NvbiyeJf.mjs} +4 -4
- package/dist/{deploy-WaAQez1O.mjs → deploy-DzAIwqNU.mjs} +944 -607
- package/dist/{deploy-DDz7c8LK.mjs → deploy-bjXdFCtn.mjs} +1 -1
- package/dist/{dist-BR1quN_w.mjs → dist-AoCzRTJE.mjs} +226 -60
- package/dist/{dist-C5fND3R0.mjs → dist-BuDuKZJv.mjs} +1 -1
- package/dist/{dist-Dn6nn2IU.mjs → dist-CTBk70IR.mjs} +42 -42
- package/dist/{domain-Dmhvb2oU.mjs → domain-y5Tvydvo.mjs} +5 -5
- package/dist/{email-DFi-s2t4.mjs → email-B3umsW75.mjs} +15 -30
- package/dist/{env-Csi-tMbT.mjs → env-BS6qYHDb.mjs} +6 -6
- package/dist/{env-public-D_6u46fX.d.mts → env-public-BX_r8HR6.d.mts} +2 -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-Dz3X1Qab.mjs → gen-B580--vC.mjs} +5 -5
- package/dist/gen-BVaUUumi.mjs +2 -0
- package/dist/{github-cmd-BED3_9JD.mjs → github-cmd-v45BdfKX.mjs} +6 -8
- package/dist/{handler-BXJTXd02.d.mts → handler-CZ4nAylQ.d.mts} +2 -1
- package/dist/{headers-BOg_velo.mjs → headers-DWi2IXWx.mjs} +1 -1
- package/dist/help-DofyZuY7.mjs +2 -0
- package/dist/{help-DC7gdz7L.mjs → help-daGKjXGk.mjs} +268 -666
- package/dist/index.d.mts +1 -1
- package/dist/index.mjs +305 -1490
- package/dist/info-B97bTX9N.mjs +113 -0
- package/dist/{init-WO0JlPx8.mjs → init-Bvy7zrBo.mjs} +51 -20
- package/dist/limits-Bq5LG8Id.d.mts +27 -0
- package/dist/limits-Cjuk2VPm.mjs +68 -0
- package/dist/{link-CsHOinF7.mjs → link-CDqqCjFl.mjs} +5 -5
- package/dist/{list-CDb-4bZ1.mjs → list-CZj0dzKY.mjs} +5 -5
- package/dist/{live-CKiJilLr.d.mts → live-Chw1eIMv.d.mts} +1 -1
- package/dist/{local-d1-CC8sKFGu.mjs → local-d1-2CMnpuW_.mjs} +2 -2
- package/dist/login-DYt_An22.mjs +2 -0
- package/dist/{login-DvqXsfGs.mjs → login-UZKFM_u7.mjs} +5 -5
- package/dist/{logs-BdfiOezj.mjs → logs-CUZ6t9t3.mjs} +5 -5
- package/dist/migrate-8_2u55MD.mjs +2 -0
- package/dist/{migrate-B8KuoYsO.mjs → migrate-DHul7PRV.mjs} +5 -4
- package/dist/{node-BM43oz4G.mjs → node-BkyRWRx8.mjs} +2 -2
- package/dist/operator-args-CLgKGlwU.mjs +690 -0
- package/dist/{operator-cmd-03819ATr.mjs → operator-cmd-DBA6dl0m.mjs} +69 -23
- package/dist/output-Dm_A4Tbv.mjs +81 -0
- 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 +3 -3
- package/dist/pages/islands-plugin.d.mts +16 -6
- package/dist/pages/islands-plugin.mjs +2 -2
- 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/{output-CCH48AMM.mjs → picocolors-BTps1_gs.mjs} +2 -76
- 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-z92h63q5.mjs → platform-auth-config-B56E9YP1.mjs} +4 -4
- package/dist/{platform-auth-protection-DeE3yr2R.mjs → platform-auth-protection-BDWO_aER.mjs} +3 -3
- package/dist/{platform-auth-recovery-o_340Ixx.mjs → platform-auth-recovery-1gg4CSRe.mjs} +4 -4
- package/dist/{platform-cmd-C4ZV3Vpy.mjs → platform-cmd-Bt-1w6pY.mjs} +1 -1
- package/dist/{platform-cmd-DNl8WosH.mjs → platform-cmd-DMcQStSc.mjs} +26 -5
- package/dist/{platform-domain-CU1JtJkW.mjs → platform-domain-BNkcz0OB.mjs} +36 -9
- package/dist/{platform-lifecycle-Bc047IeT.mjs → platform-lifecycle-9OyBALhH.mjs} +850 -276
- package/dist/{platform-lifecycle-Bs2qx1E3.mjs → platform-lifecycle-BE6C_jxh.mjs} +1 -1
- package/dist/{platform-management-CVpGI9Y5.mjs → platform-management-CjwLVQwN.mjs} +59 -11
- package/dist/{platform-management-C8tt6D8h.mjs → platform-management-CnyTdcWX.mjs} +1 -1
- package/dist/platform-plans-config-BNGKGr4P.mjs +359 -0
- package/dist/{platform-recovery-dvUaptLr.mjs → platform-recovery-D6KSpuFm.mjs} +2 -2
- package/dist/{plugin-inference-BMfKRSqE.mjs → plugin-inference-CXWnn79A.mjs} +174 -64
- package/dist/{prepare-DyZ-Yok5.mjs → prepare-B5Mkic5u.mjs} +3 -3
- package/dist/{prepare-C3kt3Rst.mjs → prepare-DOsL0CC9.mjs} +4 -20
- package/dist/prepare-cgvDMtSb.mjs +2 -0
- package/dist/{project-cmd-B44I8J_W.mjs → project-cmd-CNzrqvBv.mjs} +30 -16
- package/dist/{project-team-BkbYIsXN.mjs → project-team-DQOWPfQT.mjs} +4 -4
- package/dist/{project-token-C8xEEQnB.mjs → project-token-CTDYU0Cc.mjs} +4 -4
- package/dist/project-zero-trust-BNAkW-_0.mjs +63 -0
- package/dist/{protocol-ZH3jP4a7.d.mts → protocol-CjF_iI9X.d.mts} +2 -2
- package/dist/protocol-U7bfjHmA.mjs +331 -0
- package/dist/{provision-DNtrtaVD.mjs → provision-C4ORE7G7.mjs} +1 -1
- package/dist/{provision-BhreDAOS.mjs → provision-CJFgTZY8.mjs} +111 -215
- package/dist/{requests-DFyhBMaf.mjs → requests-MhxYnau8.mjs} +4 -4
- package/dist/resource-name-C7LVpcRm.mjs +11 -0
- package/dist/{rollback-DHHxXZiS.mjs → rollback-CJ6iSDoU.mjs} +5 -5
- 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 +3 -0
- package/dist/runtime/sandbox-container.mjs +2 -0
- package/dist/runtime/sandbox.d.mts +4 -32
- package/dist/runtime/sandbox.mjs +151 -75
- 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-XZAqzFlG.d.mts +52 -0
- package/dist/sandbox-container-Bo0eiFKz.d.mts +73 -0
- package/dist/sandbox-container-C6ItmVuN.mjs +281 -0
- package/dist/{scan-4tfN-PSn.mjs → scan-C7okrLyM.mjs} +4 -35
- package/dist/{secret-DN9sSNiV.mjs → secret-Dli5fP0B.mjs} +6 -6
- package/dist/{skills-O6FUaizK.mjs → skills-D1II1Juz.mjs} +1 -1
- package/dist/{sse-BaC1jXko.mjs → sse-CQNaDFFV.mjs} +6 -3
- package/dist/{subcommand-prompt-BuGYkAkC.mjs → subcommand-prompt-CY1C4fvl.mjs} +2 -2
- package/dist/validate-Dq_L3s0S.mjs +2 -0
- package/dist/{validate-CIUwFpjB.mjs → validate-ctOrgiS3.mjs} +2 -1
- package/dist/{wrangler-BymcxrRa.mjs → wrangler-7K-bW_DL.mjs} +14 -235
- package/dist/{ws-BwcqizuH.d.mts → ws-CL1w7GXU.d.mts} +13 -2
- package/package.json +48 -33
- package/sandbox.Dockerfile +4 -0
- package/schema.json +10 -22
- package/skills/migrate-vite-cloudflare-to-void/SKILL.md +34 -157
- package/skills/void/SKILL.md +50 -133
- 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 +6 -19
- package/skills/void/docs/guide/edge/rewrites.md +56 -284
- package/skills/void/docs/guide/edge/static-assets.md +23 -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 +189 -0
- package/skills/void/docs/guide/platform/development/local.md +2 -2
- 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 +31 -3
- package/skills/void/docs/guide/platform/installation/first-deployment.md +6 -0
- package/skills/void/docs/guide/platform/installation/maintenance.md +3 -1
- package/skills/void/docs/guide/platform/installation/prerequisites.md +21 -16
- package/skills/void/docs/guide/platform/installation/setup.md +9 -5
- package/skills/void/docs/guide/platform/installation/uninstall.md +17 -2
- package/skills/void/docs/guide/platform-administration.md +2 -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 +78 -41
- 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 +33 -1621
- package/skills/void/docs/reference/config.md +26 -32
- 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/cli/cf-compat.mjs +0 -968
- package/dist/client-4cDVv7BO.mjs +0 -2
- package/dist/gen-Vnv2f65C.mjs +0 -2
- package/dist/help-DQMfeKMz.mjs +0 -2
- package/dist/login-DFQk7rbW.mjs +0 -2
- package/dist/migrate-TsHGBnDA.mjs +0 -2
- package/dist/plan-BEZ8VJW0.mjs +0 -256
- package/dist/plan-DpuOr14e.mjs +0 -2
- package/dist/prepare-BZXkjdNe.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,9 +1,10 @@
|
|
|
1
1
|
import { a as join, l as relative, n as dirname, u as resolve } from "./dist-BVqXeR_h.mjs";
|
|
2
2
|
import { n as readProjectPaths } from "./project-paths-GgcMozYz.mjs";
|
|
3
|
-
import { i as readPackageJson, n as hasPackageDependency, t as getPackageDependencies } from "./package-json-DXfiT1jV.mjs";
|
|
4
3
|
import { i as hasSsrEntry, r as getSsrServerEntryPath } from "./entry-CF5wvH4w.mjs";
|
|
4
|
+
import { i as readPackageJson, n as hasPackageDependency, t as getPackageDependencies } from "./package-json-DXfiT1jV.mjs";
|
|
5
5
|
import { existsSync } from "node:fs";
|
|
6
6
|
import { fileURLToPath } from "node:url";
|
|
7
|
+
import { spawnSync } from "node:child_process";
|
|
7
8
|
//#region src/cli/preset.ts
|
|
8
9
|
/**
|
|
9
10
|
* Known output conventions for SSGs.
|
|
@@ -133,12 +134,12 @@ function shellQuoteExecutable(value) {
|
|
|
133
134
|
return `'${value.replace(/'/g, "'\\''")}'`;
|
|
134
135
|
}
|
|
135
136
|
/** Resolve the bundled cf transport without consulting project dependencies. */
|
|
136
|
-
function
|
|
137
|
+
function resolveCloudflareOperationArgv(_root) {
|
|
137
138
|
const directory = dirname(fileURLToPath(import.meta.url));
|
|
138
139
|
const entry = [
|
|
139
|
-
join(directory, "
|
|
140
|
-
join(directory, "
|
|
141
|
-
join(directory, "cli", "
|
|
140
|
+
join(directory, "cloudflare-operation-process.ts"),
|
|
141
|
+
join(directory, "cloudflare-operation-process.mjs"),
|
|
142
|
+
join(directory, "cli", "cloudflare-operation-process.mjs")
|
|
142
143
|
].find((candidate) => existsSync(candidate));
|
|
143
144
|
if (!entry) throw new Error(`Void's bundled Cloudflare tooling is unavailable. Reinstall the project's dependencies from its trusted lockfile, then retry.`);
|
|
144
145
|
return [process.execPath, entry];
|
|
@@ -300,4 +301,90 @@ function hasBackendFiles(root) {
|
|
|
300
301
|
return false;
|
|
301
302
|
}
|
|
302
303
|
//#endregion
|
|
303
|
-
|
|
304
|
+
//#region src/cli/cloudflare-process.ts
|
|
305
|
+
/** Operations contain public targets only. Secret values travel through stdin. */
|
|
306
|
+
function encodeCloudflareOperation(operation) {
|
|
307
|
+
return [JSON.stringify(operation)];
|
|
308
|
+
}
|
|
309
|
+
/** Decode the private process envelope once, retaining cancellation provenance. */
|
|
310
|
+
function decodeCloudflareOperationResult(result) {
|
|
311
|
+
if (result.signal || result.error || result.status === null) return result;
|
|
312
|
+
if (!result.stdout.trim() && result.status !== 0) return result;
|
|
313
|
+
try {
|
|
314
|
+
const value = JSON.parse(result.stdout);
|
|
315
|
+
if (!value || typeof value !== "object" || Array.isArray(value) || !("operationResult" in value) || value.operationResult !== 1) throw new Error("Invalid operation envelope.");
|
|
316
|
+
const envelope = value;
|
|
317
|
+
if (envelope.output !== void 0 && typeof envelope.output !== "string" || envelope.signal != null && typeof envelope.signal !== "string" || envelope.error != null && typeof envelope.error !== "string" || envelope.errorCode !== void 0 && !Number.isSafeInteger(envelope.errorCode) || envelope.failure !== void 0 && ![
|
|
318
|
+
"not-found",
|
|
319
|
+
"durable-migration",
|
|
320
|
+
"containers-unavailable"
|
|
321
|
+
].includes(envelope.failure) || envelope.errors !== void 0 && (!Array.isArray(envelope.errors) || envelope.errors.some((error) => !error || typeof error !== "object" || typeof error.message !== "string" || error.code !== void 0 && !Number.isSafeInteger(error.code)))) throw new Error("Invalid operation envelope fields.");
|
|
322
|
+
if (envelope.signal || envelope.error) return {
|
|
323
|
+
...result,
|
|
324
|
+
status: 1,
|
|
325
|
+
stdout: "",
|
|
326
|
+
signal: envelope.signal,
|
|
327
|
+
error: envelope.error
|
|
328
|
+
};
|
|
329
|
+
return {
|
|
330
|
+
...result,
|
|
331
|
+
stdout: envelope.output ?? "",
|
|
332
|
+
data: envelope.data,
|
|
333
|
+
errorCode: envelope.errorCode,
|
|
334
|
+
errors: envelope.errors,
|
|
335
|
+
failure: envelope.failure
|
|
336
|
+
};
|
|
337
|
+
} catch {
|
|
338
|
+
return {
|
|
339
|
+
...result,
|
|
340
|
+
status: 1,
|
|
341
|
+
stdout: "",
|
|
342
|
+
stderr: [result.stderr, "Cloudflare tooling returned an invalid operation response."].filter(Boolean).join("\n")
|
|
343
|
+
};
|
|
344
|
+
}
|
|
345
|
+
}
|
|
346
|
+
function createCloudflareProcessRunner(options) {
|
|
347
|
+
const [command, ...prefix] = resolveCloudflareOperationArgv(options.root);
|
|
348
|
+
return (operation, run) => {
|
|
349
|
+
const streaming = !run.capture && (operation.type === "auth.login" || operation.type === "tail");
|
|
350
|
+
const env = typeof options.env === "function" ? options.env() : options.env ?? process.env;
|
|
351
|
+
const result = spawnSync(command, [...prefix, ...encodeCloudflareOperation(operation)], {
|
|
352
|
+
cwd: run.cwd ?? options.root,
|
|
353
|
+
env: {
|
|
354
|
+
...env,
|
|
355
|
+
...options.accountId ? { CLOUDFLARE_ACCOUNT_ID: options.accountId } : {},
|
|
356
|
+
...options.apiBaseUrl ? { CLOUDFLARE_API_BASE_URL: options.apiBaseUrl } : {}
|
|
357
|
+
},
|
|
358
|
+
input: run.input,
|
|
359
|
+
encoding: "utf8",
|
|
360
|
+
shell: false,
|
|
361
|
+
windowsHide: true,
|
|
362
|
+
maxBuffer: 33554432,
|
|
363
|
+
stdio: streaming ? [
|
|
364
|
+
"inherit",
|
|
365
|
+
"inherit",
|
|
366
|
+
"inherit"
|
|
367
|
+
] : [
|
|
368
|
+
"pipe",
|
|
369
|
+
"pipe",
|
|
370
|
+
"pipe"
|
|
371
|
+
]
|
|
372
|
+
});
|
|
373
|
+
const raw = {
|
|
374
|
+
status: result.status ?? 1,
|
|
375
|
+
stdout: result.stdout ?? "",
|
|
376
|
+
stderr: result.stderr ?? "",
|
|
377
|
+
signal: result.signal,
|
|
378
|
+
error: result.error?.message
|
|
379
|
+
};
|
|
380
|
+
if (streaming) return raw;
|
|
381
|
+
const decoded = decodeCloudflareOperationResult(raw);
|
|
382
|
+
if (!run.capture) {
|
|
383
|
+
if (decoded.stdout) process.stdout.write(decoded.stdout);
|
|
384
|
+
if (decoded.stderr) process.stderr.write(decoded.stderr);
|
|
385
|
+
}
|
|
386
|
+
return decoded;
|
|
387
|
+
};
|
|
388
|
+
}
|
|
389
|
+
//#endregion
|
|
390
|
+
export { detectPreset as a, resolveCloudflareOperationArgv as c, FRAMEWORK_PRESETS as i, resolveProjectCommand as l, decodeCloudflareOperationResult as n, formatProjectCommand as o, encodeCloudflareOperation as r, hasBackendFiles as s, createCloudflareProcessRunner as t };
|
|
@@ -1,9 +1,10 @@
|
|
|
1
1
|
import "./types-CKWnYgfy.mjs";
|
|
2
2
|
import { t as VoidAuthProvider } from "./providers-BNKRacMr.mjs";
|
|
3
3
|
import { t as HeadConfig } from "./head-Do8P4puT.mjs";
|
|
4
|
+
import "@void/deploy-core";
|
|
4
5
|
import { RewriteDestination } from "void/routes";
|
|
5
6
|
//#region src/sandbox/config.d.ts
|
|
6
|
-
type SandboxInstanceType = "
|
|
7
|
+
type SandboxInstanceType = "lite" | "standard-1" | "standard-2" | "standard-3" | "standard-4";
|
|
7
8
|
type SandboxConfig = {
|
|
8
9
|
binding?: string;
|
|
9
10
|
className?: string;
|
|
@@ -12,7 +13,6 @@ type SandboxConfig = {
|
|
|
12
13
|
imageBuildContext?: string;
|
|
13
14
|
platformImage?: string;
|
|
14
15
|
instanceType?: SandboxInstanceType;
|
|
15
|
-
maxInstances?: number;
|
|
16
16
|
};
|
|
17
17
|
//#endregion
|
|
18
18
|
//#region src/config.d.ts
|
|
@@ -42,10 +42,7 @@ const VALID_DATABASE_VALUES = /* @__PURE__ */ new Set(["pg", "mysql"]);
|
|
|
42
42
|
/** Cloudflare's hard maximum for Workers CPU time per request (5 minutes). */
|
|
43
43
|
const MAX_WORKER_CPU_MS = 3e5;
|
|
44
44
|
const VALID_SANDBOX_INSTANCE_TYPES = /* @__PURE__ */ new Set([
|
|
45
|
-
"dev",
|
|
46
45
|
"lite",
|
|
47
|
-
"basic",
|
|
48
|
-
"standard",
|
|
49
46
|
"standard-1",
|
|
50
47
|
"standard-2",
|
|
51
48
|
"standard-3",
|
|
@@ -396,9 +393,8 @@ function validateConfigObject(config) {
|
|
|
396
393
|
"image",
|
|
397
394
|
"imageBuildContext",
|
|
398
395
|
"platformImage",
|
|
399
|
-
"instanceType"
|
|
400
|
-
|
|
401
|
-
].includes(key)) throw new Error(`config: Unknown key 'sandbox.${key}' in ${CONFIG_FILE}. Valid: binding, className, containerName, image, imageBuildContext, platformImage, instanceType, maxInstances.`);
|
|
396
|
+
"instanceType"
|
|
397
|
+
].includes(key)) throw new Error(`config: Unknown key 'sandbox.${key}' in ${CONFIG_FILE}. Valid: binding, className, containerName, image, imageBuildContext, platformImage, instanceType.`);
|
|
402
398
|
for (const key of [
|
|
403
399
|
"binding",
|
|
404
400
|
"className",
|
|
@@ -408,7 +404,6 @@ function validateConfigObject(config) {
|
|
|
408
404
|
"platformImage"
|
|
409
405
|
]) if (sandbox[key] !== void 0 && typeof sandbox[key] !== "string") throw new Error(`config: "sandbox.${key}" in ${CONFIG_FILE} must be a string.`);
|
|
410
406
|
if (sandbox.instanceType !== void 0 && (typeof sandbox.instanceType !== "string" || !VALID_SANDBOX_INSTANCE_TYPES.has(sandbox.instanceType))) throw new Error(`config: "sandbox.instanceType" in ${CONFIG_FILE} must be one of: ${[...VALID_SANDBOX_INSTANCE_TYPES].join(", ")}.`);
|
|
411
|
-
if (sandbox.maxInstances !== void 0 && (typeof sandbox.maxInstances !== "number" || !Number.isInteger(sandbox.maxInstances) || sandbox.maxInstances < 1)) throw new Error(`config: "sandbox.maxInstances" in ${CONFIG_FILE} must be a positive integer.`);
|
|
412
407
|
} else throw new Error(`config: "sandbox" in ${CONFIG_FILE} must be a boolean or an object.`);
|
|
413
408
|
}
|
|
414
409
|
if (obj.worker !== void 0) {
|
|
@@ -0,0 +1,89 @@
|
|
|
1
|
+
import { a as join, i as isAbsolute } from "./dist-BVqXeR_h.mjs";
|
|
2
|
+
import { fileURLToPath } from "node:url";
|
|
3
|
+
import { isSandboxRegistryImage } from "@void/deploy-core";
|
|
4
|
+
//#region src/sandbox/config.ts
|
|
5
|
+
const DEFAULT_SANDBOX_BINDING = "SANDBOX";
|
|
6
|
+
const DEFAULT_SANDBOX_CLASS_NAME = "SandboxV1";
|
|
7
|
+
const SANDBOX_MIGRATION_TAG = "void-sandbox-v2";
|
|
8
|
+
function isSandboxEnabled(config) {
|
|
9
|
+
return config.sandbox !== void 0 && config.sandbox !== false;
|
|
10
|
+
}
|
|
11
|
+
function getDefaultSandboxImage() {
|
|
12
|
+
return fileURLToPath(new URL("../../sandbox.Dockerfile", import.meta.resolve("void/sandbox")));
|
|
13
|
+
}
|
|
14
|
+
function getDefaultSandboxPlatformImage() {
|
|
15
|
+
return "cloudflare/debian-trixie";
|
|
16
|
+
}
|
|
17
|
+
function isLocalSandboxImage(image) {
|
|
18
|
+
const lowerImage = image.toLowerCase();
|
|
19
|
+
return isAbsolute(image) || image.startsWith("./") || image.startsWith("../") || lowerImage === "dockerfile" || lowerImage.includes("dockerfile") || lowerImage.endsWith("/dockerfile") || lowerImage.endsWith("\\dockerfile");
|
|
20
|
+
}
|
|
21
|
+
function requiresSandboxPlatformImage(config) {
|
|
22
|
+
if (typeof config.sandbox !== "object" || config.sandbox === null) return false;
|
|
23
|
+
return typeof config.sandbox.image === "string" && isLocalSandboxImage(config.sandbox.image) && config.sandbox.platformImage === void 0;
|
|
24
|
+
}
|
|
25
|
+
function resolveSandboxConfig(config, root = process.cwd()) {
|
|
26
|
+
const raw = typeof config.sandbox === "object" ? config.sandbox : {};
|
|
27
|
+
const image = raw.image ?? getDefaultSandboxImage();
|
|
28
|
+
const imageBuildContext = raw.imageBuildContext;
|
|
29
|
+
const platformImage = raw.platformImage ?? (raw.image && !isLocalSandboxImage(raw.image) ? raw.image : getDefaultSandboxPlatformImage());
|
|
30
|
+
if (!isLocalSandboxImage(image) && !isSandboxRegistryImage(image)) throw new Error("sandbox.image must be a Dockerfile or a digest-pinned Cloudflare registry image (registry.cloudflare.com/<account>/<image>@sha256:<digest>).");
|
|
31
|
+
if (platformImage !== getDefaultSandboxPlatformImage() && !isSandboxRegistryImage(platformImage)) throw new Error("sandbox.platformImage must be a digest-pinned Cloudflare registry image (registry.cloudflare.com/<account>/<image>@sha256:<digest>).");
|
|
32
|
+
return {
|
|
33
|
+
binding: raw.binding ?? "SANDBOX",
|
|
34
|
+
className: raw.className ?? "SandboxV1",
|
|
35
|
+
containerName: raw.containerName ?? "void-sandbox-v1",
|
|
36
|
+
image: resolveSandboxImage(image, root),
|
|
37
|
+
platformImage,
|
|
38
|
+
...imageBuildContext && { imageBuildContext: isAbsolute(imageBuildContext) ? imageBuildContext : join(root, imageBuildContext) },
|
|
39
|
+
...raw.instanceType && { instanceType: raw.instanceType }
|
|
40
|
+
};
|
|
41
|
+
}
|
|
42
|
+
function resolveSandboxImage(image, root) {
|
|
43
|
+
if (!isLocalSandboxImage(image) || isAbsolute(image)) return image;
|
|
44
|
+
return join(root, image);
|
|
45
|
+
}
|
|
46
|
+
function sandboxContainerConfig(sandbox) {
|
|
47
|
+
return {
|
|
48
|
+
name: sandbox.containerName,
|
|
49
|
+
class_name: sandbox.className,
|
|
50
|
+
scheduling_policy: "durable_object",
|
|
51
|
+
images: { default: isLocalSandboxImage(sandbox.image) ? {
|
|
52
|
+
dockerfile: sandbox.image,
|
|
53
|
+
...sandbox.imageBuildContext && { build_context: sandbox.imageBuildContext }
|
|
54
|
+
} : { image: sandbox.image } }
|
|
55
|
+
};
|
|
56
|
+
}
|
|
57
|
+
/** Resolve the final local storage kind without recreating a renamed or deleted class. */
|
|
58
|
+
function resolveSandboxMigrationStorage(migrations, className) {
|
|
59
|
+
const storage = /* @__PURE__ */ new Map();
|
|
60
|
+
for (const migration of migrations) {
|
|
61
|
+
for (const name of migration.new_classes ?? []) storage.set(name, "legacy-kv");
|
|
62
|
+
for (const name of migration.new_sqlite_classes ?? []) storage.set(name, "sqlite");
|
|
63
|
+
for (const rename of migration.renamed_classes ?? []) {
|
|
64
|
+
const sqlite = storage.get(rename.from);
|
|
65
|
+
storage.delete(rename.from);
|
|
66
|
+
storage.set(rename.to, sqlite ?? "unknown");
|
|
67
|
+
}
|
|
68
|
+
for (const transfer of migration.transferred_classes ?? []) storage.set(transfer.to, "unknown");
|
|
69
|
+
for (const name of migration.deleted_classes ?? []) storage.delete(name);
|
|
70
|
+
}
|
|
71
|
+
return storage.get(className);
|
|
72
|
+
}
|
|
73
|
+
function hasSandboxSqliteMigration(migrations, className) {
|
|
74
|
+
return resolveSandboxMigrationStorage(migrations, className) === "sqlite";
|
|
75
|
+
}
|
|
76
|
+
/** Refuse namespace reuse before either uploader can change a live Worker. */
|
|
77
|
+
function assertSandboxNamespaceConfig(config, sandbox) {
|
|
78
|
+
const containers = Array.isArray(config.containers) ? config.containers : [];
|
|
79
|
+
const durable = config.durable_objects;
|
|
80
|
+
const binding = durable?.bindings?.find((entry) => entry.name === sandbox.binding);
|
|
81
|
+
if (binding && (binding.script_name !== void 0 || binding.environment !== void 0)) throw new Error(`sandbox: binding '${sandbox.binding}' must reference the local '${sandbox.className}' class. Choose another sandbox.binding name to preserve the existing external Durable Object.`);
|
|
82
|
+
const migrations = Array.isArray(config.migrations) ? config.migrations : [];
|
|
83
|
+
const storage = resolveSandboxMigrationStorage(migrations, sandbox.className);
|
|
84
|
+
if (storage === "legacy-kv" || storage === "unknown") throw new Error(`sandbox: class '${sandbox.className}' needs SQLite storage, but its existing namespace has ${storage} storage. Preserve the existing migration history and choose a fresh Worker name or a new sandbox.className and sandbox.binding.`);
|
|
85
|
+
if (storage !== "sqlite" && migrations.some((migration) => migration.tag === "void-sandbox-v2")) throw new Error(`sandbox: migration tag '${SANDBOX_MIGRATION_TAG}' is already configured for another class. Keep the existing history and choose a fresh Worker for Sandbox.`);
|
|
86
|
+
if (containers.some((container) => container.class_name === sandbox.className && container.scheduling_policy !== "durable_object") || durable?.bindings?.some((binding) => binding.name === sandbox.binding && binding.class_name !== sandbox.className)) throw new Error("Sandbox SDK 1.0 needs a new Durable Object namespace. Back up existing Sandbox data and deploy to a fresh Worker name with the new Sandbox configuration; remove legacy Sandbox bindings, containers, and migrations from that new Worker configuration. See https://developers.cloudflare.com/containers/guides/migrate-to-durable-object-scheduling-policy/.");
|
|
87
|
+
}
|
|
88
|
+
//#endregion
|
|
89
|
+
export { hasSandboxSqliteMigration as a, resolveSandboxConfig as c, assertSandboxNamespaceConfig as i, sandboxContainerConfig as l, DEFAULT_SANDBOX_CLASS_NAME as n, isSandboxEnabled as o, SANDBOX_MIGRATION_TAG as r, requiresSandboxPlatformImage as s, DEFAULT_SANDBOX_BINDING as t };
|
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
import { m as readConfig, u as getDatabaseDialect } from "./config-
|
|
1
|
+
import { m as readConfig, u as getDatabaseDialect } from "./config-Br_JZD6u.mjs";
|
|
2
2
|
export { getDatabaseDialect, readConfig };
|
package/dist/config-entry.d.mts
CHANGED
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { t as VoidConfig } from "./config-
|
|
1
|
+
import { t as VoidConfig } from "./config-BMHb8RCj.mjs";
|
|
2
2
|
//#region src/config-entry.d.ts
|
|
3
3
|
/** Define a typed Void project configuration without loading the Vite plugin. */
|
|
4
4
|
export declare function defineConfig<const T extends VoidConfig>(config: T): T;
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import { a as join } from "./dist-BVqXeR_h.mjs";
|
|
2
2
|
import { o as TYPED_CONFIG_FILE, s as loadTypedVoidConfigFile } from "./project-paths-GgcMozYz.mjs";
|
|
3
|
-
import { g as validateConfig } from "./config-
|
|
3
|
+
import { g as validateConfig } from "./config-Br_JZD6u.mjs";
|
|
4
4
|
import { existsSync, readFileSync, writeFileSync } from "node:fs";
|
|
5
5
|
import { parse } from "acorn";
|
|
6
6
|
//#region src/config-write.ts
|
|
@@ -1,11 +1,11 @@
|
|
|
1
|
-
import { f as readPlatformToken } from "./auth-
|
|
1
|
+
import { f as readPlatformToken } from "./auth-CSkdO2Bb.mjs";
|
|
2
2
|
import { o as listPlatformConnections, s as normalizePlatformApiUrl } from "./platform-registry-QBa4DK32.mjs";
|
|
3
3
|
import { i as readDeploymentPlatform, l as writeDeploymentPlatform, u as writePlatformSelection } from "./project-C0Fqu05O.mjs";
|
|
4
|
-
import { I as select, W as isCancel, j as log } from "./dist-
|
|
5
|
-
import { i as isExpiredTokenError, n as PlatformClient } from "./client-
|
|
6
|
-
import { t as promptForLoginToken } from "./login-
|
|
7
|
-
import { i as saveDiscoveredPlatform, n as promptPlatformUrl, t as discoverPlatform } from "./platform-cmd-
|
|
8
|
-
import { t as connectCloudflare } from "./cloudflare-connect-
|
|
4
|
+
import { I as select, W as isCancel, j as log } from "./dist-CTBk70IR.mjs";
|
|
5
|
+
import { i as isExpiredTokenError, n as PlatformClient } from "./client-RV8NVeB8.mjs";
|
|
6
|
+
import { t as promptForLoginToken } from "./login-UZKFM_u7.mjs";
|
|
7
|
+
import { i as saveDiscoveredPlatform, n as promptPlatformUrl, t as discoverPlatform } from "./platform-cmd-DMcQStSc.mjs";
|
|
8
|
+
import { t as connectCloudflare } from "./cloudflare-connect-B8uPZ4nx.mjs";
|
|
9
9
|
//#region src/cli/connect.ts
|
|
10
10
|
async function selectVoidPlatform(interactive) {
|
|
11
11
|
if (!interactive) throw new Error("connect: Supply a Void platform URL in non-interactive mode.");
|
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
import { t as createProjectWithSlugRetry } from "./create-project-
|
|
1
|
+
import { t as createProjectWithSlugRetry } from "./create-project-bMf6ffLZ.mjs";
|
|
2
2
|
export { createProjectWithSlugRetry };
|
|
@@ -1,8 +1,8 @@
|
|
|
1
|
-
import {
|
|
2
|
-
import { s as getSiteDomain } from "./auth-DLNN0D3Z.mjs";
|
|
1
|
+
import { s as getSiteDomain } from "./auth-CSkdO2Bb.mjs";
|
|
3
2
|
import { d as writeProjectConfig, t as attachSelectedPlatform } from "./project-C0Fqu05O.mjs";
|
|
4
|
-
import { B as text, E as confirm, I as select, T as cancel, W as isCancel, j as log } from "./dist-
|
|
5
|
-
import { t as PlatformApiError } from "./client-
|
|
3
|
+
import { B as text, E as confirm, I as select, T as cancel, W as isCancel, j as log } from "./dist-CTBk70IR.mjs";
|
|
4
|
+
import { t as PlatformApiError } from "./client-RV8NVeB8.mjs";
|
|
5
|
+
import { c as import_picocolors, l as sanitizeTerminalText } from "./output-Dm_A4Tbv.mjs";
|
|
6
6
|
import { t as validateProjectSlug } from "./project-slug-23TpquG4.mjs";
|
|
7
7
|
import { n as inferDefaultSlug } from "./resolve-project-BG5ORGID.mjs";
|
|
8
8
|
//#region src/cli/prompt.ts
|
|
@@ -87,6 +87,7 @@ async function createProjectWithSlugRetry(client, initialDefaultSlug, promptSlug
|
|
|
87
87
|
log.step(`Creating project ${import_picocolors.default.blue(slug)}...`);
|
|
88
88
|
const project = await client.createProject(slug);
|
|
89
89
|
log.success(`Project created: ${import_picocolors.default.blue(project.slug)}`);
|
|
90
|
+
reportProjectCreationWarnings(project);
|
|
90
91
|
return project;
|
|
91
92
|
} catch (error) {
|
|
92
93
|
if (error instanceof PlatformApiError && isRetryableCreateError(error)) {
|
|
@@ -98,6 +99,9 @@ async function createProjectWithSlugRetry(client, initialDefaultSlug, promptSlug
|
|
|
98
99
|
}
|
|
99
100
|
}
|
|
100
101
|
}
|
|
102
|
+
function reportProjectCreationWarnings(project) {
|
|
103
|
+
for (const warning of project.warnings ?? []) log.warn(sanitizeTerminalText(warning));
|
|
104
|
+
}
|
|
101
105
|
async function promptAndCreateProject(root, client) {
|
|
102
106
|
const project = await createProjectWithSlugRetry(client, inferDefaultSlug(root), async (defaultSlug) => promptProjectSlug(defaultSlug));
|
|
103
107
|
if (!project) throw new Error("Project creation cancelled.");
|
|
@@ -121,4 +125,4 @@ function isSlugRelatedError(error) {
|
|
|
121
125
|
return `${error.code ?? ""} ${error.body ?? ""}`.toLowerCase().includes("slug");
|
|
122
126
|
}
|
|
123
127
|
//#endregion
|
|
124
|
-
export {
|
|
128
|
+
export { promptProjectSelection as a, reportProjectCreationWarnings as i, isRetryableCreateError as n, promptProjectSetupAction as o, promptAndCreateProject as r, createProjectWithSlugRetry as t };
|
|
@@ -1,19 +1,19 @@
|
|
|
1
1
|
import { a as join, l as relative, r as extname, t as basename, u as resolve } from "./dist-BVqXeR_h.mjs";
|
|
2
|
-
import {
|
|
2
|
+
import { r as detectFramework } from "./plugin-inference-CXWnn79A.mjs";
|
|
3
3
|
import { n as readProjectPaths } from "./project-paths-GgcMozYz.mjs";
|
|
4
|
+
import { h as resolveBindingNames, m as readConfig, u as getDatabaseDialect } from "./config-Br_JZD6u.mjs";
|
|
5
|
+
import { i as writeJournal, n as readJournal, r as stripSqlExt, t as collectMigrations } from "./collect-DiTn9yr6.mjs";
|
|
4
6
|
import { t as cfAccessHeaders } from "./cf-access-DRsQRe6k.mjs";
|
|
5
|
-
import { c as getToken, o as getProxyUrl } from "./auth-
|
|
7
|
+
import { c as getToken, o as getProxyUrl } from "./auth-CSkdO2Bb.mjs";
|
|
6
8
|
import { i as isCloudflareAccessChallenge, n as ensurePlatformAccessToken, r as ensurePlatformProxyAccess } from "./cf-access-P0iZnu0q.mjs";
|
|
7
9
|
import { i as readDeploymentPlatform, o as readProjectConfig } from "./project-C0Fqu05O.mjs";
|
|
8
|
-
import {
|
|
9
|
-
import { r as detectFramework } from "./plugin-inference-BMfKRSqE.mjs";
|
|
10
|
-
import { i as writeJournal, n as readJournal, r as stripSqlExt, t as collectMigrations } from "./collect-DiTn9yr6.mjs";
|
|
11
|
-
import { t as resolveLocalD1Target } from "./local-d1-CC8sKFGu.mjs";
|
|
10
|
+
import { t as resolveLocalD1Target } from "./local-d1-2CMnpuW_.mjs";
|
|
12
11
|
import { a as loadLocalEnv } from "./env-_v349JBd.mjs";
|
|
13
|
-
import { E as confirm, O as intro, P as outro, W as isCancel, j as log } from "./dist-
|
|
14
|
-
import { i as validateMigrations, r as listDrizzleArtifacts, t as assertJournalCoherence } from "./validate-
|
|
15
|
-
import { n as PlatformClient, t as PlatformApiError } from "./client-
|
|
16
|
-
import {
|
|
12
|
+
import { E as confirm, O as intro, P as outro, W as isCancel, j as log } from "./dist-CTBk70IR.mjs";
|
|
13
|
+
import { i as validateMigrations, r as listDrizzleArtifacts, t as assertJournalCoherence } from "./validate-ctOrgiS3.mjs";
|
|
14
|
+
import { n as PlatformClient, t as PlatformApiError } from "./client-RV8NVeB8.mjs";
|
|
15
|
+
import { a as dim, c as import_picocolors, r as cliTitle } from "./output-Dm_A4Tbv.mjs";
|
|
16
|
+
import { n as formatTimestamp } from "./gen-B580--vC.mjs";
|
|
17
17
|
import { createRequire } from "node:module";
|
|
18
18
|
import { existsSync, readFileSync, readdirSync, renameSync, rmSync, writeFileSync } from "node:fs";
|
|
19
19
|
import { fileURLToPath, pathToFileURL } from "node:url";
|
|
@@ -273,7 +273,7 @@ async function runConnect(root, dialect, args) {
|
|
|
273
273
|
if (result.dashboardUrl) log.info(`Dashboard: ${result.dashboardUrl}`);
|
|
274
274
|
}
|
|
275
275
|
if (!connectionString) {
|
|
276
|
-
const { text: promptText, isCancel: isCancelCheck } = await import("./dist-
|
|
276
|
+
const { text: promptText, isCancel: isCancelCheck } = await import("./dist-BuDuKZJv.mjs");
|
|
277
277
|
const answer = await promptText({
|
|
278
278
|
message: `Enter your ${dialect === "mysql" ? "MySQL" : "PostgreSQL"} connection string:`,
|
|
279
279
|
placeholder: dialect === "mysql" ? "mysql://user:pass@host:3306/database" : "postgresql://user:pass@host:5432/database"
|
|
@@ -318,7 +318,7 @@ async function runPush(root, dialect) {
|
|
|
318
318
|
outro("Done.");
|
|
319
319
|
}
|
|
320
320
|
async function runGenerate(root, dialect) {
|
|
321
|
-
const { prepareProject } = await import("./prepare-
|
|
321
|
+
const { prepareProject } = await import("./prepare-cgvDMtSb.mjs");
|
|
322
322
|
const { writeDrizzleConfig } = await import("./config-0acf1oys.mjs");
|
|
323
323
|
await prepareProject(root);
|
|
324
324
|
const authSchemaPath = join(root, ".void", "better-auth-schema.ts");
|
|
@@ -384,7 +384,7 @@ async function runStatus(root, dialect) {
|
|
|
384
384
|
localApplied = [];
|
|
385
385
|
}
|
|
386
386
|
else {
|
|
387
|
-
const { getAppliedMigrations } = await import("./runner-
|
|
387
|
+
const { getAppliedMigrations } = await import("./runner-CXA9Fh8h.mjs");
|
|
388
388
|
const { databasePath: dbPath } = getLocalD1Target(root);
|
|
389
389
|
localApplied = await getAppliedMigrations(dbPath);
|
|
390
390
|
}
|
|
@@ -399,7 +399,7 @@ async function runStatus(root, dialect) {
|
|
|
399
399
|
applied_at: ""
|
|
400
400
|
}));
|
|
401
401
|
} else {
|
|
402
|
-
const { readCloudflareD1Migrations, resolveCloudflareD1Context } = await import("./cloudflare-operations-
|
|
402
|
+
const { readCloudflareD1Migrations, resolveCloudflareD1Context } = await import("./cloudflare-operations-AiWashgg.mjs");
|
|
403
403
|
remoteApplied = (await readCloudflareD1Migrations(resolveCloudflareD1Context(root, resolveBindingNames(readConfig(root).inference?.bindings)?.d1 ?? "DB"))).map((name) => ({
|
|
404
404
|
name,
|
|
405
405
|
applied_at: ""
|
|
@@ -480,7 +480,7 @@ async function resetDatabase(root, dialect) {
|
|
|
480
480
|
}
|
|
481
481
|
return migrations.length;
|
|
482
482
|
}
|
|
483
|
-
const { runMigrations } = await import("./runner-
|
|
483
|
+
const { runMigrations } = await import("./runner-CXA9Fh8h.mjs");
|
|
484
484
|
const { databasePath: dbPath } = getLocalD1Target(root);
|
|
485
485
|
rmSync(dbPath, { force: true });
|
|
486
486
|
rmSync(dbPath + "-wal", { force: true });
|
|
@@ -515,7 +515,7 @@ async function runSeed(root, file, dialect) {
|
|
|
515
515
|
outro("Done.");
|
|
516
516
|
return;
|
|
517
517
|
}
|
|
518
|
-
const { openSqliteDatabase } = await import("./runner-
|
|
518
|
+
const { openSqliteDatabase } = await import("./runner-CXA9Fh8h.mjs");
|
|
519
519
|
const { databasePath: dbPath } = getLocalD1Target(root);
|
|
520
520
|
const db = await openSqliteDatabase(dbPath);
|
|
521
521
|
try {
|
|
@@ -641,7 +641,7 @@ async function runExecute(root, command, file, dialect, remote) {
|
|
|
641
641
|
process.exit(0);
|
|
642
642
|
}
|
|
643
643
|
if (dialect === "sqlite") {
|
|
644
|
-
const { executeCloudflareD1Sql, resolveCloudflareD1Context } = await import("./cloudflare-operations-
|
|
644
|
+
const { executeCloudflareD1Sql, resolveCloudflareD1Context } = await import("./cloudflare-operations-AiWashgg.mjs");
|
|
645
645
|
const rows = await executeCloudflareD1Sql(resolveCloudflareD1Context(root, resolveBindingNames(readConfig(root).inference?.bindings)?.d1 ?? "DB"), sql);
|
|
646
646
|
if (rows.length > 0) printTable(rows);
|
|
647
647
|
else log.success("Executed successfully.");
|
|
@@ -746,7 +746,7 @@ async function runExecute(root, command, file, dialect, remote) {
|
|
|
746
746
|
outro("Done.");
|
|
747
747
|
return;
|
|
748
748
|
}
|
|
749
|
-
const { openSqliteDatabase } = await import("./runner-
|
|
749
|
+
const { openSqliteDatabase } = await import("./runner-CXA9Fh8h.mjs");
|
|
750
750
|
const { databasePath: dbPath } = getLocalD1Target(root);
|
|
751
751
|
if (!existsSync(dbPath)) {
|
|
752
752
|
log.error("No local database found. Run `void dev` first.");
|
|
@@ -846,7 +846,7 @@ async function runMigrate(root, dialect, remote) {
|
|
|
846
846
|
outro("Done.");
|
|
847
847
|
return;
|
|
848
848
|
}
|
|
849
|
-
const { applyCloudflareD1Migrations, readCloudflareD1Migrations, resolveCloudflareD1Context } = await import("./cloudflare-operations-
|
|
849
|
+
const { applyCloudflareD1Migrations, readCloudflareD1Migrations, resolveCloudflareD1Context } = await import("./cloudflare-operations-AiWashgg.mjs");
|
|
850
850
|
const binding = resolveBindingNames(readConfig(root).inference?.bindings)?.d1 ?? "DB";
|
|
851
851
|
const context = resolveCloudflareD1Context(root, binding);
|
|
852
852
|
const remoteBefore = new Set(await readCloudflareD1Migrations(context));
|
|
@@ -862,7 +862,7 @@ async function runMigrate(root, dialect, remote) {
|
|
|
862
862
|
log.error(getErrorMessage(error));
|
|
863
863
|
process.exit(1);
|
|
864
864
|
}
|
|
865
|
-
const { checkWranglerMigrationApplySet, parseRootWranglerConfig } = await import("./deploy-
|
|
865
|
+
const { checkWranglerMigrationApplySet, parseRootWranglerConfig } = await import("./deploy-bjXdFCtn.mjs");
|
|
866
866
|
const applySet = await checkWranglerMigrationApplySet(context.operation.configPath, parseRootWranglerConfig(context.operation.configPath), binding, context.migrationsDir, rawMigrations);
|
|
867
867
|
if (!applySet.ok) {
|
|
868
868
|
log.error(applySet.reason);
|
|
@@ -980,7 +980,7 @@ async function runMigrate(root, dialect, remote) {
|
|
|
980
980
|
outro("Done.");
|
|
981
981
|
return;
|
|
982
982
|
}
|
|
983
|
-
const { getAppliedMigrations, runMigrations } = await import("./runner-
|
|
983
|
+
const { getAppliedMigrations, runMigrations } = await import("./runner-CXA9Fh8h.mjs");
|
|
984
984
|
const { databasePath: dbPath } = getLocalD1Target(root);
|
|
985
985
|
try {
|
|
986
986
|
const existingRows = await getAppliedMigrations(dbPath);
|
|
@@ -1290,7 +1290,7 @@ async function runRenameMigrations(root, dialect) {
|
|
|
1290
1290
|
process.exit(1);
|
|
1291
1291
|
}
|
|
1292
1292
|
else {
|
|
1293
|
-
const { openSqliteDatabase } = await import("./runner-
|
|
1293
|
+
const { openSqliteDatabase } = await import("./runner-CXA9Fh8h.mjs");
|
|
1294
1294
|
const { databasePath: dbPath } = getLocalD1Target(root);
|
|
1295
1295
|
if (existsSync(dbPath)) try {
|
|
1296
1296
|
const db = await openSqliteDatabase(dbPath);
|
|
@@ -1442,7 +1442,7 @@ async function runExport(root, args, dialect) {
|
|
|
1442
1442
|
} else process.stdout.write(output);
|
|
1443
1443
|
return;
|
|
1444
1444
|
}
|
|
1445
|
-
const { openSqliteDatabase } = await import("./runner-
|
|
1445
|
+
const { openSqliteDatabase } = await import("./runner-CXA9Fh8h.mjs");
|
|
1446
1446
|
const { databasePath: dbPath } = getLocalD1Target(root);
|
|
1447
1447
|
if (!existsSync(dbPath)) {
|
|
1448
1448
|
log.error("No local database found. Run `void dev` first.", errOut);
|
|
@@ -1508,7 +1508,7 @@ async function runExport(root, args, dialect) {
|
|
|
1508
1508
|
}
|
|
1509
1509
|
}
|
|
1510
1510
|
async function runSetUrl(root) {
|
|
1511
|
-
const { readConfig: readVoidConfig, getDatabaseDialect: getDialect } = await import("./config-
|
|
1511
|
+
const { readConfig: readVoidConfig, getDatabaseDialect: getDialect } = await import("./config-CyQ-wVd7.mjs");
|
|
1512
1512
|
const dialect = getDialect(readVoidConfig(root));
|
|
1513
1513
|
if (dialect === "sqlite") {
|
|
1514
1514
|
log.error("db: This command is only for PostgreSQL and MySQL projects. Set \"database\" to \"pg\" or \"mysql\" in void.config.ts.");
|
|
@@ -1524,7 +1524,7 @@ async function runSetUrl(root) {
|
|
|
1524
1524
|
log.error("No project linked. Run `void deploy` first or link a project.");
|
|
1525
1525
|
process.exit(1);
|
|
1526
1526
|
}
|
|
1527
|
-
const { text: promptText, isCancel: isCancelCheck } = await import("./dist-
|
|
1527
|
+
const { text: promptText, isCancel: isCancelCheck } = await import("./dist-BuDuKZJv.mjs");
|
|
1528
1528
|
const connectionString = await promptText({
|
|
1529
1529
|
message: `Enter your ${dialect === "mysql" ? "MySQL" : "PostgreSQL"} connection string:`,
|
|
1530
1530
|
placeholder: dialect === "mysql" ? "mysql://user:pass@host:3306/dbname" : "postgresql://user:pass@host:5432/dbname",
|
|
@@ -1611,7 +1611,7 @@ async function runSeedModule(root, seedPath, dialect) {
|
|
|
1611
1611
|
return;
|
|
1612
1612
|
}
|
|
1613
1613
|
const { drizzle } = await import("drizzle-orm/better-sqlite3");
|
|
1614
|
-
const { openSqliteDatabase } = await import("./runner-
|
|
1614
|
+
const { openSqliteDatabase } = await import("./runner-CXA9Fh8h.mjs");
|
|
1615
1615
|
const { databasePath: dbPath } = getLocalD1Target(root);
|
|
1616
1616
|
const sqlite = await openSqliteDatabase(dbPath);
|
|
1617
1617
|
try {
|
|
@@ -1,8 +1,8 @@
|
|
|
1
|
-
import {
|
|
2
|
-
import { c as getToken } from "./auth-DLNN0D3Z.mjs";
|
|
1
|
+
import { c as getToken } from "./auth-CSkdO2Bb.mjs";
|
|
3
2
|
import { c as removeProjectConfig, o as readProjectConfig } from "./project-C0Fqu05O.mjs";
|
|
4
|
-
import { B as text, N as note, O as intro, P as outro, T as cancel, W as isCancel, j as log } from "./dist-
|
|
5
|
-
import { n as PlatformClient } from "./client-
|
|
3
|
+
import { B as text, N as note, O as intro, P as outro, T as cancel, W as isCancel, j as log } from "./dist-CTBk70IR.mjs";
|
|
4
|
+
import { n as PlatformClient } from "./client-RV8NVeB8.mjs";
|
|
5
|
+
import { i as createSpinner, r as cliTitle } from "./output-Dm_A4Tbv.mjs";
|
|
6
6
|
import { r as resolveProjectBySlug } from "./resolve-project-BG5ORGID.mjs";
|
|
7
7
|
//#region src/cli/delete.ts
|
|
8
8
|
async function runDeleteCommand(root, slug, options) {
|