void 0.27.0 → 1.0.3
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 +3 -1
- package/dist/{account-cmd-l-FM7Ioq.mjs → account-cmd-BTcUzv9L.mjs} +6 -6
- package/dist/{agents-B_pX_HmQ.mjs → agents-CuNtT0D_.mjs} +5 -2
- package/dist/{application-analysis-DKy02UY0.mjs → application-analysis-AB_YYWgH.mjs} +118 -135
- package/dist/{application-routing-DQyUh_5S.mjs → application-routing-L7V-TFhZ.mjs} +1 -2
- package/dist/atomic-write-Dq6R0BPN.mjs +18 -0
- package/dist/{auth-Dn2vw-SG.mjs → auth-B6iOCjKI.mjs} +23 -56
- package/dist/auth-Cbqi1iVX.mjs +1 -0
- package/dist/{auth-link-vz9Z2kmG.mjs → auth-link-DUJuvRx5.mjs} +11 -11
- package/dist/{auth-migrations-BwHgeEsD.mjs → auth-migrations-Cgs0k6lS.mjs} +28 -5
- package/dist/{auth-router-DvsCUVw4.mjs → auth-router-CIxiMG7i.mjs} +5 -5
- package/dist/base64-DVrOndmI.mjs +16 -0
- package/dist/{better-auth-shared-CPvWD3nG.d.mts → better-auth-shared-B74NJIus.d.mts} +8 -13
- package/dist/{better-auth-shared-DPpj8zxc.mjs → better-auth-shared-CMXlZG7W.mjs} +56 -68
- package/dist/{build-cmd-D6we0VjO.mjs → build-cmd-BkIv25PA.mjs} +6 -6
- package/dist/{cache-CZRdzKx1.mjs → cache-Ctzfig-W.mjs} +6 -6
- package/dist/{cancel-deploy-CQ3NnMvf.mjs → cancel-deploy-CD9o-SsC.mjs} +5 -5
- package/dist/{cf-access-TWNzXltp.mjs → cf-access-BM9G0lhO.mjs} +4 -3
- package/dist/{cf-access-BcIBSKqG.mjs → cf-access-CWP4avfP.mjs} +3 -7
- package/dist/cf-build-output-BU3hqdHu.mjs +1 -0
- package/dist/{cf-build-output-DjvB_872.mjs → cf-build-output-Bc8i3dzE.mjs} +2 -2
- package/dist/cf-user-agent-ChjQp2MU.mjs +33 -0
- package/dist/cli/cli.mjs +199 -312
- package/dist/cli/cloudflare-operation-process.mjs +41 -15
- package/dist/cli/env-schema-probe.d.mts +7 -44
- package/dist/cli/env-schema-probe.mjs +14 -80
- package/dist/client-B60PwCC4.mjs +1 -0
- package/dist/{client-DlDJuY0s.mjs → client-DM9Kcf4e.mjs} +161 -415
- package/dist/{cloudflare-auth-CuxfF6OA.mjs → cloudflare-auth-CqFBDo52.mjs} +12 -39
- package/dist/{cloudflare-cmd-lHqNlJGW.mjs → cloudflare-cmd-BIAF_BIY.mjs} +7 -6
- package/dist/{cloudflare-config-BmhBv3HV.mjs → cloudflare-config-DV60XFFK.mjs} +16 -28
- package/dist/{cloudflare-connect-2G3rL2rP.mjs → cloudflare-connect-WjwnVOJA.mjs} +4 -4
- package/dist/{cloudflare-operations-CwI1bChl.mjs → cloudflare-operations-B42EZeJy.mjs} +26 -34
- package/dist/cloudflare-operations-CrSUFRzJ.mjs +1 -0
- package/dist/{cloudflare-process-2-TfIEzB.mjs → cloudflare-process-CeDWJRhj.mjs} +12 -7
- package/dist/collect-Cae8A7Zr.mjs +1 -0
- package/dist/{collect-DiTn9yr6.mjs → collect-xjffdCdk.mjs} +1 -1
- package/dist/{config-CSa15FvD.d.mts → config-7qoq2p9v.d.mts} +2 -2
- package/dist/{config-CLYAosnQ.mjs → config-BEm9vRvS.mjs} +11 -5
- package/dist/{config-DiowPT80.mjs → config-Bx_1SpnO.mjs} +87 -177
- package/dist/{config-DPByhVck.mjs → config-D0GY5ItR.mjs} +1 -1
- package/dist/config-QrJWu0IX.mjs +1 -0
- package/dist/config-entry.d.mts +1 -1
- package/dist/{connect-BfPBHHm-.mjs → connect-CKtk-EZe.mjs} +9 -9
- package/dist/create-project-B-ewF_Af.mjs +1 -0
- package/dist/{create-project-BdXEFKal.mjs → create-project-yInGo72M.mjs} +8 -8
- package/dist/database-provider.mjs +1 -2
- package/dist/{db-Xs80hcaA.mjs → db-7I_gfdVq.mjs} +177 -268
- package/dist/db-types-Bb4WBWIs.mjs +49 -0
- package/dist/{delete-d2vuou3j.mjs → delete-Cy-M1u-r.mjs} +6 -6
- package/dist/deploy-9lgfhrXS.mjs +2 -0
- package/dist/deploy-BYYlnsiy.mjs +6164 -0
- package/dist/deploy-managed-static-Ca4TFdmx.mjs +1595 -0
- package/dist/deploy-transport-DWlWBe6M.mjs +180 -0
- package/dist/deploy.d.mts +10 -0
- package/dist/deploy.mjs +82 -0
- package/dist/dev-inbox-Rd6j_8vM.mjs +217 -0
- package/dist/discover-ClzFSwns.mjs +1 -0
- package/dist/{discover-CkCYv9T_.mjs → discover-D2PGT63u.mjs} +2 -2
- package/dist/dispatch-DrTTk8Xg.mjs +431 -0
- package/dist/{dist-D3m88sjf.mjs → dist-BVdsO7Py.mjs} +5 -6
- package/dist/dist-CfgIkieS.mjs +1 -0
- package/dist/{dist-BVqXeR_h.mjs → dist-ipQi0Q8y.mjs} +2 -3
- package/dist/{domain-BsDUBAvt.mjs → domain-CZGxPv9u.mjs} +8 -23
- package/dist/{dotenv-BfU6eqFt.mjs → dotenv-CNazY3-w.mjs} +4 -16
- package/dist/edge.mjs +1 -2
- package/dist/{email-d_Aux1vM.mjs → email-BcjSyAL0.mjs} +4 -20
- package/dist/{email-_lGAHOhp.mjs → email-DzyNVuoU.mjs} +100 -192
- package/dist/email-cloudflare-DfG6UEMm.mjs +1096 -0
- package/dist/email-protocol-D9nTvhCp.mjs +82 -0
- package/dist/{entry-CMAkqBmU.mjs → entry-ehmBvs5w.mjs} +2 -2
- package/dist/{env-DMA3cXZt.mjs → env-0jrMQJI_.mjs} +6 -14
- package/dist/{env-BxocywBB.mjs → env-BJjULvL0.mjs} +2 -2
- package/dist/{env-C74QepDE.mjs → env-Nx3yf50r.mjs} +9 -9
- package/dist/{env-public-DR7ZM6d-.d.mts → env-public-CCdykygU.d.mts} +6 -23
- package/dist/{env-raw-jZpP5n47.mjs → env-raw-D74P4ebM.mjs} +15 -21
- package/dist/{env-types-CwXgeMgL.mjs → env-types-DS2_y4X8.mjs} +2 -2
- package/dist/env-validation-BT7z-qpQ.mjs +1 -0
- package/dist/env-validation-DYxjz_Wo.mjs +488 -0
- package/dist/{gen-DtkQhvQg.mjs → gen-CufHEf42.mjs} +132 -254
- package/dist/gen-sXyp5DFO.mjs +1 -0
- package/dist/generate-ClI89brV.mjs +1 -0
- package/dist/{generate-GDbL7sUr.mjs → generate-Dat0UTry.mjs} +38 -4
- package/dist/generated-wrangler-config-DeWj5F9Y.mjs +18 -0
- package/dist/{github-cmd-DaDdBbSS.mjs → github-cmd-FU8EjFyU.mjs} +28 -72
- package/dist/{handler-BHAn2fZJ.mjs → handler-BZ1t7-Rv.mjs} +2 -2
- package/dist/{handler-CNAwjRcW.d.mts → handler-_PqY82xe.d.mts} +1 -1
- package/dist/{headers-DlfR78Nu.mjs → headers-Di1FsD3e.mjs} +26 -81
- package/dist/{help-0bTe_lID.mjs → help-BT2hovNI.mjs} +26 -14
- package/dist/help-i2YGGnTH.mjs +1 -0
- package/dist/{inbound-PfQDLXc5.mjs → inbound-BuTfm11U.mjs} +71 -222
- package/dist/{inbound-CH5Mksyy.d.mts → inbound-brj2-TM5.d.mts} +19 -58
- package/dist/index.d.mts +2 -18
- package/dist/index.mjs +714 -762
- package/dist/{info-PYWwkWyt.mjs → info-l249eUdH.mjs} +5 -5
- package/dist/{init-DaBGmaXC.mjs → init-D0A6M64Q.mjs} +229 -392
- package/dist/isr-config-fZaJJ8t7.mjs +165 -0
- package/dist/{link-C6fjafep.mjs → link-WMoJFf4i.mjs} +9 -9
- package/dist/{list-BTFBlqKl.mjs → list-CQ2EQEHL.mjs} +7 -18
- package/dist/{live-CgQuTpqD.mjs → live-BcHoTDFe.mjs} +19 -17
- package/dist/{live-Du8jXwOW.d.mts → live-DJONVlQK.d.mts} +1 -1
- package/dist/load-user-env-DD5qveNU.mjs +49 -0
- package/dist/{local-d1-ga5O_idV.mjs → local-d1-BxvQYEFi.mjs} +6 -6
- package/dist/{login-GKcNUmtI.mjs → login-C2T1oVG-.mjs} +12 -12
- package/dist/login-XD844Xs-.mjs +1 -0
- package/dist/{logs-BiMSULmc.mjs → logs-DnC1d7xB.mjs} +6 -6
- package/dist/{migrate-NLsjBbuM.mjs → migrate-BDIprOYd.mjs} +70 -22
- package/dist/migrate-BRwU-blY.mjs +1 -0
- package/dist/migration-handler-Cg0Y4EPu.mjs +470 -0
- package/dist/{migration-handler-DM4clYj5.d.mts → migration-handler-CwlEQUoo.d.mts} +17 -26
- package/dist/{mime-DxCznlJq.mjs → mime-srOklVVv.mjs} +92 -395
- package/dist/mysql-migration-sql-BIS5vbNk.mjs +241 -0
- package/dist/nitro.d.mts +30 -0
- package/dist/nitro.mjs +88 -0
- package/dist/{node-DJicPvPj.mjs → node-cPadMgUO.mjs} +9 -25
- package/dist/{operator-args-DOBhIaIg.mjs → operator-args-UnE8Y2eK.mjs} +27 -26
- package/dist/{operator-auth-BEZ_u0Cz.mjs → operator-auth-Cr2zCc-J.mjs} +2 -2
- package/dist/{operator-client-DbDv4vtE.mjs → operator-client-C-ROjk1I.mjs} +4 -4
- package/dist/operator-cmd-D6gnZsnK.mjs +1 -0
- package/dist/{operator-cmd-BT4hgavL.mjs → operator-cmd-DHieWtFp.mjs} +8 -8
- package/dist/{output-C50ag2r3.mjs → output-Ba6ZbrzY.mjs} +37 -6
- package/dist/{package-json-DXfiT1jV.mjs → package-json-BjYqR-So.mjs} +1 -1
- package/dist/pages/client.d.mts +1 -1
- package/dist/pages/client.mjs +91 -5
- package/dist/pages/head.mjs +1 -2
- package/dist/pages/index.d.mts +1 -2
- package/dist/pages/index.mjs +6 -6
- package/dist/pages/islands-plugin.mjs +5 -83
- package/dist/pages/prefetch.mjs +1 -2
- package/dist/pages/protocol.d.mts +2 -2
- package/dist/pages/protocol.mjs +1 -1
- package/dist/pages/serialize.mjs +1 -2
- package/dist/plan-CKX_jWnD.mjs +1 -0
- package/dist/platform-args-B0HeTh0C.mjs +1 -0
- package/dist/{platform-args-DUeXY9Om.mjs → platform-args-CaCL_1Ch.mjs} +43 -60
- package/dist/{platform-auth-config-CkSx3usH.mjs → platform-auth-config-Z16-I8nT.mjs} +11 -12
- package/dist/{platform-auth-protection-BJimB_p9.mjs → platform-auth-protection-BXwZiJSF.mjs} +37 -27
- package/dist/{platform-auth-recovery-BU6izFAU.mjs → platform-auth-recovery-CXjfqyOv.mjs} +9 -10
- package/dist/{platform-cmd-BbY1dWiM.mjs → platform-cmd-DaAOiWTl.mjs} +16 -16
- package/dist/platform-cmd-PT4YwMLM.mjs +1 -0
- package/dist/{platform-discovery-DIYz8V63.mjs → platform-discovery-CHhNs8Nn.mjs} +1 -1
- package/dist/{platform-domain-CHVS6cV0.mjs → platform-domain-CxpvUeo0.mjs} +6 -6
- package/dist/{platform-lifecycle-DzCwqhFq.mjs → platform-lifecycle-DBiS0cJd.mjs} +1693 -2120
- package/dist/platform-lifecycle-u9pMOvxC.mjs +1 -0
- package/dist/{platform-management-CuuVDhyt.mjs → platform-management-DhEFdQAf.mjs} +696 -130
- package/dist/platform-management-DvBS83rC.mjs +1 -0
- package/dist/{platform-plans-config-CN-heS4q.mjs → platform-plans-config-BWn1S2Rv.mjs} +16 -12
- package/dist/{platform-recovery-CskSJgLh.mjs → platform-recovery-BUGOB4RC.mjs} +6 -9
- package/dist/{platform-registry-Cjv2Qf0r.mjs → platform-registry-B9mWX9LO.mjs} +13 -18
- package/dist/{platform-setup-BBxRxmFC.mjs → platform-setup-YvN9VQXV.mjs} +21 -28
- package/dist/{plugin-inference-BlQbOL0P.mjs → plugin-inference-DsARdQKE.mjs} +18 -33
- package/dist/prepare-CYT6tAzD.mjs +1 -0
- package/dist/{prepare-Do96654b.mjs → prepare-DEB5SeVJ.mjs} +12 -13
- package/dist/{prepare-Dq9hTIbo.mjs → prepare-PQCgsny0.mjs} +4 -4
- package/dist/{prerender-render-Ct20jftc.mjs → prerender-render-Bfsumdkv.mjs} +8 -2
- package/dist/prerender-render.d.mts +2 -0
- package/dist/prerender-render.mjs +1 -2
- package/dist/{project-cmd-DaoRrn-8.mjs → project-cmd-DVatD8Ev.mjs} +20 -20
- package/dist/{project-paths-GgcMozYz.mjs → project-paths-DMvEeSau.mjs} +9 -14
- package/dist/{project-BAm2aB6Q.mjs → project-rqDnVsJN.mjs} +8 -4
- package/dist/project-slug-6cyz8E7k.mjs +1 -0
- package/dist/{project-team-Q_lCA7Io.mjs → project-team-DJrWEAG1.mjs} +7 -7
- package/dist/{project-token-BArgK9o1.mjs → project-token-CBgLBuL6.mjs} +6 -6
- package/dist/{project-tsconfig-CVJhNMxs.mjs → project-tsconfig-bveqhlYA.mjs} +3 -5
- package/dist/project-zdB3fs9G.mjs +1 -0
- package/dist/{project-zero-trust-KO9Hu2Pq.mjs → project-zero-trust-92gLtZ25.mjs} +6 -6
- package/dist/{protocol-BPZaNqBo.d.mts → protocol-4H7V_3Os.d.mts} +1 -1
- package/dist/{protocol-CfaUwNs8.mjs → protocol-RNP0u7UY.mjs} +9 -3
- package/dist/{provision-BfaLiWbj.mjs → provision-BnSSkiED.mjs} +119 -866
- package/dist/{requests-C7Oeoh5u.mjs → requests-7W1Pygt2.mjs} +5 -5
- package/dist/resolve-project-PnhzMtY6.mjs +1 -0
- package/dist/resolve-project-WpwkCB_c.mjs +48 -0
- package/dist/{rollback-DVAtrLAl.mjs → rollback-BcASVnwP.mjs} +8 -18
- package/dist/{route-types-CbtsIeFn.mjs → route-types-BZi26DVS.mjs} +9 -91
- package/dist/routing-assets-VkrKIbxE.mjs +139 -0
- package/dist/{runner-DMBKSrRk.mjs → runner-CabsQ-iM.mjs} +22 -34
- package/dist/runner-So9mYfcm.mjs +1 -0
- package/dist/runner-mysql-BhRaONkO.mjs +146 -0
- package/dist/runner-mysql-DWwE8jKi.mjs +1 -0
- package/dist/{runner-pg-DV8p_zjA.mjs → runner-pg-BRemq_GX.mjs} +3 -3
- package/dist/runner-pg-_Xncr3H5.mjs +1 -0
- package/dist/runtime/ai.mjs +23 -25
- package/dist/runtime/auth-client-react.mjs +1 -2
- package/dist/runtime/auth-client-solid.mjs +1 -2
- package/dist/runtime/auth-client-svelte.mjs +1 -2
- package/dist/runtime/auth-client-vue.mjs +1 -2
- package/dist/runtime/auth-client.mjs +1 -2
- package/dist/runtime/auth.mjs +1 -2
- package/dist/runtime/better-auth-mysql.d.mts +2 -5
- package/dist/runtime/better-auth-mysql.mjs +9 -31
- package/dist/runtime/better-auth-pg.d.mts +2 -5
- package/dist/runtime/better-auth-pg.mjs +6 -32
- package/dist/runtime/better-auth.d.mts +2 -4
- package/dist/runtime/better-auth.mjs +9 -19
- package/dist/runtime/db.mjs +6 -2
- package/dist/runtime/durable.d.mts +18 -1
- package/dist/runtime/durable.mjs +26 -2
- package/dist/runtime/email/testing.d.mts +1 -1
- package/dist/runtime/email/testing.mjs +9 -23
- package/dist/runtime/email-protocol.d.mts +12 -0
- package/dist/runtime/email-protocol.mjs +1 -70
- package/dist/runtime/email.d.mts +1 -1
- package/dist/runtime/email.mjs +79 -221
- package/dist/runtime/env-public.d.mts +1 -1
- package/dist/runtime/env-public.mjs +12 -38
- package/dist/runtime/env.d.mts +1 -12
- package/dist/runtime/env.mjs +1 -2
- package/dist/runtime/handler.d.mts +1 -1
- package/dist/runtime/handler.mjs +1 -1
- package/dist/runtime/isr.mjs +1 -1
- package/dist/runtime/kv.mjs +1 -1
- package/dist/runtime/limits.mjs +1 -2
- package/dist/runtime/live-client.d.mts +3 -2
- package/dist/runtime/live-server.d.mts +2 -1
- package/dist/runtime/live-server.mjs +1 -16
- package/dist/runtime/live.d.mts +1 -1
- package/dist/runtime/live.mjs +1 -2
- package/dist/runtime/log.d.mts +2 -1
- package/dist/runtime/migration-handler-mysql.d.mts +2 -2
- package/dist/runtime/migration-handler-mysql.mjs +39 -8
- package/dist/runtime/migration-handler-pg.d.mts +2 -2
- package/dist/runtime/migration-handler-pg.mjs +1 -1
- package/dist/runtime/migration-handler.d.mts +2 -2
- package/dist/runtime/migration-handler.mjs +1 -470
- package/dist/runtime/queues.mjs +1 -1
- package/dist/runtime/remote/binding-handler.mjs +62 -62
- package/dist/runtime/remote/index.mjs +16 -77
- package/dist/runtime/response.mjs +1 -2
- package/dist/runtime/route-url.mjs +1 -2
- package/dist/runtime/routing.d.mts +3 -5
- package/dist/runtime/routing.mjs +82 -218
- package/dist/runtime/sandbox-container.d.mts +2 -2
- package/dist/runtime/sandbox-container.mjs +1 -2
- package/dist/runtime/sandbox.d.mts +2 -2
- package/dist/runtime/sandbox.mjs +13 -6
- package/dist/runtime/seed.d.mts +2 -1
- package/dist/runtime/sse.mjs +1 -2
- package/dist/runtime/storage.mjs +1 -1
- package/dist/runtime/validator.d.mts +1 -1
- package/dist/runtime/validator.mjs +1 -2
- package/dist/runtime/ws-server.d.mts +4 -4
- package/dist/runtime/ws-server.mjs +6 -28
- package/dist/runtime/ws.d.mts +1 -1
- package/dist/{sandbox-container-Bo0eiFKz.d.mts → sandbox-container-ChQRum-j.d.mts} +3 -1
- package/dist/{sandbox-container-C6ItmVuN.mjs → sandbox-container-a9LRUtii.mjs} +13 -2
- package/dist/{sandbox-C5LFoJMf.d.mts → sandbox-q3waMc2T.d.mts} +1 -1
- package/dist/{scan-C3uDzz6J.mjs → scan-C0BMdmEd.mjs} +84 -7
- package/dist/{secret-BvtB7IjY.mjs → secret-bg73f1Ge.mjs} +63 -81
- package/dist/{serialize-BPvnNQuA.mjs → serialize-BtQyaYoC.mjs} +10 -4
- package/dist/{skills-BgVMvQdy.mjs → skills-C_yRTg0g.mjs} +3 -3
- package/dist/{subcommand-prompt-BSlnD1fI.mjs → subcommand-prompt-Bm3ZlYgA.mjs} +39 -44
- package/dist/sveltekit.d.mts +2 -1
- package/dist/sveltekit.mjs +1 -1
- package/dist/validate-BQFdf0Pi.mjs +1 -0
- package/dist/{validate-C9qJArv7.mjs → validate-CheZGRE7.mjs} +4 -8
- package/dist/version-metadata-DIrqEHQo.mjs +73 -0
- package/dist/{wrangler-D9KTuqnv.mjs → wrangler-BYs07Rxy.mjs} +119 -378
- package/dist/wrapper-CwhpNWtH.mjs +663 -0
- package/dist/{ws-CChrrAU-.d.mts → ws-aKVYB-fA.d.mts} +1 -1
- package/dist/yarn-pnp-DLbEFMT0.mjs +92 -0
- package/docs/guide/ai.md +8 -2
- package/docs/guide/auth.md +2 -0
- package/docs/guide/database/mysql.md +14 -3
- package/docs/guide/database/postgresql.md +2 -0
- package/docs/guide/database.md +3 -5
- package/docs/guide/durable-state.md +32 -4
- package/docs/guide/platform/administration/access.md +4 -0
- package/docs/guide/platform/administration/connected-apps.md +55 -0
- package/docs/guide/platform/installation/credentials.md +21 -3
- package/docs/guide/platform/installation/domains.md +1 -1
- package/docs/guide/platform/installation/maintenance.md +38 -1
- package/docs/guide/platform/installation/prerequisites.md +6 -2
- package/docs/guide/platform/installation/setup.md +23 -1
- package/docs/guide/platform/installation/uninstall.md +6 -1
- package/docs/guide/quickstart.md +2 -0
- package/docs/guide/sandboxes.md +3 -1
- package/docs/guide/self-hosted-platform.md +1 -1
- package/docs/integrations/cloudflare.md +2 -2
- package/docs/integrations/frameworks/analog.md +3 -11
- package/docs/integrations/frameworks/nuxt.md +7 -10
- package/docs/integrations/nodejs-bun-deno.md +2 -0
- package/docs/reference/api/deploy.md +23 -0
- package/docs/reference/api/pages.md +2 -0
- package/docs/reference/api.md +3 -1
- package/docs/reference/cli/database.md +9 -3
- package/docs/reference/cli/platform-installation.md +19 -7
- package/docs/reference/cli/setup.md +2 -0
- package/docs/reference/config.md +2 -0
- package/package.json +39 -36
- package/sandbox.Dockerfile +1 -1
- package/skills/void/SKILL.md +2 -1
- package/dist/auth-LMJcNESe.mjs +0 -2
- package/dist/cf-build-output-H9a97vME.mjs +0 -2
- package/dist/cf-user-agent-lKblH3zU.mjs +0 -17
- package/dist/client-tso2OfcG.mjs +0 -2
- package/dist/cloudflare-operations-BlYLlowZ.mjs +0 -2
- package/dist/collect-DLyFDiKW.mjs +0 -2
- package/dist/config-5r-YpMC-.mjs +0 -2
- package/dist/config-B_ggY-IO.mjs +0 -89
- package/dist/config-BtSFvXZx.mjs +0 -2
- package/dist/config-write-AHGesphx.mjs +0 -61
- package/dist/create-project-qFDC45zg.mjs +0 -2
- package/dist/deploy-Bqe1PYBw.mjs +0 -10458
- package/dist/deploy-VsWsVQkw.mjs +0 -2
- package/dist/dev-inbox-CK-UuPob.mjs +0 -297
- package/dist/discover-EDUf6JJw.mjs +0 -2
- package/dist/dist-Bx1z6Eva.mjs +0 -2
- package/dist/dist-_UUlL6bg.mjs +0 -2
- package/dist/env-validation-CrVNjsPm.mjs +0 -2
- package/dist/env-validation-Dxdx_5wo.mjs +0 -951
- package/dist/gen-dA9hW7AV.mjs +0 -2
- package/dist/head-client-DzmJGN4C.mjs +0 -90
- package/dist/help-DfQYVfGY.mjs +0 -2
- package/dist/login-mx_ydhmp.mjs +0 -2
- package/dist/migrate-BHp07yJE.mjs +0 -2
- package/dist/operator-cmd-CwBB-1yb.mjs +0 -2
- package/dist/pages/head-client.d.mts +0 -13
- package/dist/pages/head-client.mjs +0 -2
- package/dist/plan-CH2G51je.mjs +0 -2
- package/dist/platform-args-D4E1PjVw.mjs +0 -2
- package/dist/platform-cmd-BbmJiq5O.mjs +0 -2
- package/dist/platform-lifecycle-ByAlpkhV.mjs +0 -2
- package/dist/platform-management-CBOT4BSM.mjs +0 -2
- package/dist/prepare-DRUV-g3X.mjs +0 -2
- package/dist/project-DedqCp59.mjs +0 -2
- package/dist/project-slug-DofjTFd-.mjs +0 -2
- package/dist/provision-Wu9ZBk9L.mjs +0 -2
- package/dist/resolve-project-BIeYs9Cw.mjs +0 -2
- package/dist/resolve-project-CP8rZs_p.mjs +0 -28
- package/dist/runner-9wjsSZx-.mjs +0 -2
- package/dist/runner-mysql-CEzKtmFb.mjs +0 -54
- package/dist/runner-mysql-CkFqZ6CE.mjs +0 -2
- package/dist/runner-pg-BGYRFdRp.mjs +0 -2
- package/dist/runtime/env-helpers.d.mts +0 -2
- package/dist/runtime/env-helpers.mjs +0 -2
- package/dist/validate-BJr9LfXy.mjs +0 -2
- package/dist/yarn-pnp-CUX_iTPA.mjs +0 -188
|
@@ -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-_PqY82xe.mjs";
|
|
2
2
|
export { HandlerInput, ValidatorSlots, runValidation };
|
|
@@ -1,2 +1 @@
|
|
|
1
|
-
|
|
2
|
-
export { runValidation };
|
|
1
|
+
export { t as runValidation } from "../validator-BTOu0fB0.mjs";
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import { n as AuthState } from "../auth-DkcFflXV.mjs";
|
|
2
|
-
import {
|
|
3
|
-
import { f as WebSocketInstanceKey, t as AnyWebSocketDefinition } from "../ws-
|
|
2
|
+
import { r as VoidAuthRuntimeOptions, t as VoidAuthEnv } from "../better-auth-shared-B74NJIus.mjs";
|
|
3
|
+
import { f as WebSocketInstanceKey, t as AnyWebSocketDefinition } from "../ws-aKVYB-fA.mjs";
|
|
4
4
|
//#region src/runtime/ws-server.d.ts
|
|
5
5
|
export type WebSocketRouteMeta = {
|
|
6
6
|
name?: string;
|
|
@@ -23,6 +23,6 @@ export declare function buildWebSocketInstanceId(route: Pick<WebSocketRouteMeta,
|
|
|
23
23
|
export declare function createWebSocketDurableObject(definition: AnyWebSocketDefinition, route: WebSocketRouteMeta, authRuntime?: VoidAuthRuntimeOptions, resolveAuthState?: ResolveVoidAuthState): WebSocketDurableObjectClass;
|
|
24
24
|
/** Keep a removed WebSocket Durable Object class deployable without deleting its storage. */
|
|
25
25
|
export declare function createWebSocketTombstoneDurableObject(className: string): WebSocketDurableObjectClass;
|
|
26
|
-
export declare function handleWebSocketUpgrade(request: Request, env: Record<string, unknown>, routes: Array<WebSocketRouteMeta>): Promise<Response | null>;
|
|
27
26
|
export declare function forwardWebSocketRequest(request: Request, env: Record<string, unknown>, route: WebSocketRouteMeta): Promise<Response>;
|
|
28
|
-
//#endregion
|
|
27
|
+
//#endregion
|
|
28
|
+
export {};
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import { t as authContext } from "../auth-3sGB0zJ1.mjs";
|
|
2
|
-
import { o as withRuntimeEnv } from "../env-
|
|
2
|
+
import { o as withRuntimeEnv } from "../env-0jrMQJI_.mjs";
|
|
3
3
|
//#region src/runtime/ws-server.ts
|
|
4
4
|
function matchRoute(pattern, pathname) {
|
|
5
5
|
const patternSegments = pattern.split("/").filter(Boolean);
|
|
@@ -58,20 +58,9 @@ function buildWebSocketInstanceId(route, params) {
|
|
|
58
58
|
if (entries.length > 1 && entries.some(([, value]) => value.includes("&"))) return `v2:${JSON.stringify(entries)}`;
|
|
59
59
|
return route.params.map((name) => `${name}=${params[name] ?? ""}`).join("&");
|
|
60
60
|
}
|
|
61
|
-
async function validateSchema(schema, value) {
|
|
62
|
-
const result = await schema["~standard"].validate(value);
|
|
63
|
-
if (result.issues) return {
|
|
64
|
-
ok: false,
|
|
65
|
-
issues: result.issues
|
|
66
|
-
};
|
|
67
|
-
return {
|
|
68
|
-
ok: true,
|
|
69
|
-
value: result.value
|
|
70
|
-
};
|
|
71
|
-
}
|
|
72
61
|
async function serializeServerEvent(schema, event) {
|
|
73
|
-
const result = await
|
|
74
|
-
if (
|
|
62
|
+
const result = await schema["~standard"].validate(event);
|
|
63
|
+
if (result.issues) throw new Error(`ws: Message validation failed: ${result.issues.map((issue) => issue.message).join("; ")}.`);
|
|
75
64
|
return JSON.stringify(result.value);
|
|
76
65
|
}
|
|
77
66
|
function parseIncomingMessage(message) {
|
|
@@ -248,8 +237,8 @@ function createWebSocketDurableObject(definition, route, authRuntime, resolveAut
|
|
|
248
237
|
webSocket.close(1007, "Invalid JSON");
|
|
249
238
|
return;
|
|
250
239
|
}
|
|
251
|
-
const result = await
|
|
252
|
-
if (
|
|
240
|
+
const result = await definition.messages.client["~standard"].validate(parsed);
|
|
241
|
+
if (result.issues) {
|
|
253
242
|
webSocket.close(1007, "Invalid message");
|
|
254
243
|
return;
|
|
255
244
|
}
|
|
@@ -300,21 +289,10 @@ function getStub(env, route, params) {
|
|
|
300
289
|
const id = binding.idFromName(buildWebSocketInstanceId(route, params));
|
|
301
290
|
return binding.get(id);
|
|
302
291
|
}
|
|
303
|
-
async function handleWebSocketUpgrade(request, env, routes) {
|
|
304
|
-
if (request.headers.get("upgrade")?.toLowerCase() !== "websocket") return null;
|
|
305
|
-
for (const route of routes) {
|
|
306
|
-
const params = getRouteMatch(request, route);
|
|
307
|
-
if (!params) continue;
|
|
308
|
-
const stub = getStub(env, route, params);
|
|
309
|
-
if (!stub) return new Response(`Missing Durable Object binding "${route.bindingName}"`, { status: 503 });
|
|
310
|
-
return stub.fetch(request);
|
|
311
|
-
}
|
|
312
|
-
return null;
|
|
313
|
-
}
|
|
314
292
|
async function forwardWebSocketRequest(request, env, route) {
|
|
315
293
|
const stub = getStub(env, route, getRouteMatch(request, route) ?? {});
|
|
316
294
|
if (!stub) return new Response(`Missing Durable Object binding "${route.bindingName}"`, { status: 503 });
|
|
317
295
|
return stub.fetch(request);
|
|
318
296
|
}
|
|
319
297
|
//#endregion
|
|
320
|
-
export { buildWebSocketInstanceId, createWebSocketDurableObject, createWebSocketTombstoneDurableObject, forwardWebSocketRequest
|
|
298
|
+
export { buildWebSocketInstanceId, createWebSocketDurableObject, createWebSocketTombstoneDurableObject, forwardWebSocketRequest };
|
package/dist/runtime/ws.d.mts
CHANGED
|
@@ -1,2 +1,2 @@
|
|
|
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-
|
|
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-aKVYB-fA.mjs";
|
|
2
2
|
export { AnyWebSocketDefinition, ConnectCommonOptions, RoomContext, RoomController, RoomDefinition, SocketContext, SocketDefinition, VoidSocket, VoidSocketCloseEvent, WebSocketBaseContext, WebSocketConnection, WebSocketInstanceKey, connect, defineRoom, defineWebSocket };
|
|
@@ -16,6 +16,7 @@ type SandboxExecOptions = ContainerExecOptions & {
|
|
|
16
16
|
type SandboxCapability = {
|
|
17
17
|
invoke(operation: string, args: Array<unknown>): Promise<unknown>;
|
|
18
18
|
};
|
|
19
|
+
declare const SANDBOX_PORT_HEADER = "x-void-sandbox-port";
|
|
19
20
|
type SandboxProcessWire = {
|
|
20
21
|
capability: SandboxCapability;
|
|
21
22
|
pid: number;
|
|
@@ -45,6 +46,7 @@ declare class SandboxContainer<Env = unknown> extends DurableObject<Env> {
|
|
|
45
46
|
#private;
|
|
46
47
|
protected instanceType: SandboxInstance;
|
|
47
48
|
protected starting: boolean;
|
|
49
|
+
fetch(request: Request): Promise<Response>;
|
|
48
50
|
constructor(ctx: DurableObjectState, env: Env);
|
|
49
51
|
protected get container(): SandboxNativeContainer;
|
|
50
52
|
configure(options: SandboxOptions): Promise<void>;
|
|
@@ -70,4 +72,4 @@ declare class SandboxContainer<Env = unknown> extends DurableObject<Env> {
|
|
|
70
72
|
invoke(operation: string, args: Array<unknown>): Promise<unknown>;
|
|
71
73
|
}
|
|
72
74
|
//#endregion
|
|
73
|
-
export {
|
|
75
|
+
export { SandboxExecOptions as a, SandboxOptions as c, SandboxContainer as i, SandboxProcessWire as l, SANDBOX_PORT_HEADER as n, SandboxInstance as o, SandboxCapability as r, SandboxNativeContainer as s, DEFAULT_SANDBOX_INACTIVITY_TIMEOUT_MS as t, validateSandboxOptions as u };
|
|
@@ -1,6 +1,7 @@
|
|
|
1
1
|
import { DurableObject, RpcTarget } from "cloudflare:workers";
|
|
2
2
|
import { Files } from "@cloudflare/sandbox";
|
|
3
3
|
//#region src/runtime/sandbox-container.ts
|
|
4
|
+
const SANDBOX_PORT_HEADER = "x-void-sandbox-port";
|
|
4
5
|
const OPTIONS = /* @__PURE__ */ new Set([
|
|
5
6
|
"inactivityTimeoutMs",
|
|
6
7
|
"enableInternet",
|
|
@@ -84,6 +85,16 @@ var SandboxContainer = class extends DurableObject {
|
|
|
84
85
|
#ready;
|
|
85
86
|
starting = false;
|
|
86
87
|
#epoch = 0;
|
|
88
|
+
async fetch(request) {
|
|
89
|
+
const value = request.headers.get(SANDBOX_PORT_HEADER);
|
|
90
|
+
if (!value || !/^\d+$/.test(value)) return new Response("Invalid Sandbox TCP port.", { status: 400 });
|
|
91
|
+
const port = Number(value);
|
|
92
|
+
if (!Number.isInteger(port) || port < 1 || port > 65535) return new Response("Invalid Sandbox TCP port.", { status: 400 });
|
|
93
|
+
const headers = new Headers(request.headers);
|
|
94
|
+
headers.delete(SANDBOX_PORT_HEADER);
|
|
95
|
+
await this.ensureRunning();
|
|
96
|
+
return this.container.getTcpPort(port).fetch(new Request(request, { headers }));
|
|
97
|
+
}
|
|
87
98
|
constructor(ctx, env) {
|
|
88
99
|
super(ctx, env);
|
|
89
100
|
this.#ready = ctx.blockConcurrencyWhile(async () => {
|
|
@@ -185,9 +196,9 @@ var SandboxContainer = class extends DurableObject {
|
|
|
185
196
|
labels: this.#options.labels,
|
|
186
197
|
...this.entrypoint ? { entrypoint: this.entrypoint } : {}
|
|
187
198
|
});
|
|
199
|
+
await this.container.setInactivityTimeout(this.inactivityTimeoutMs);
|
|
188
200
|
await this.initialize();
|
|
189
201
|
if (epoch !== this.#epoch) throw new Error("Sandbox startup was cancelled.");
|
|
190
|
-
await this.container.setInactivityTimeout(this.inactivityTimeoutMs);
|
|
191
202
|
await this.afterStart();
|
|
192
203
|
} catch (error) {
|
|
193
204
|
await this.destroy().catch(() => {});
|
|
@@ -278,4 +289,4 @@ var SandboxContainer = class extends DurableObject {
|
|
|
278
289
|
}
|
|
279
290
|
};
|
|
280
291
|
//#endregion
|
|
281
|
-
export {
|
|
292
|
+
export { validateSandboxOptions as i, SANDBOX_PORT_HEADER as n, SandboxContainer as r, DEFAULT_SANDBOX_INACTIVITY_TIMEOUT_MS as t };
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import { t as UsageLimit } from "./limits-CFsDKQvU.mjs";
|
|
2
|
-
import {
|
|
2
|
+
import { a as SandboxExecOptions, c as SandboxOptions, i as SandboxContainer } from "./sandbox-container-ChQRum-j.mjs";
|
|
3
3
|
import { Files } from "@cloudflare/sandbox";
|
|
4
4
|
//#region src/runtime/sandbox.d.ts
|
|
5
5
|
declare const DEFAULT_SANDBOX_ID = "default";
|
|
@@ -1,10 +1,88 @@
|
|
|
1
|
-
import { a as join, n as dirname, r as extname, t as basename } from "./dist-
|
|
2
|
-
import { n as readProjectPaths } from "./project-paths-
|
|
1
|
+
import { a as join, n as dirname, r as extname, t as basename } from "./dist-ipQi0Q8y.mjs";
|
|
2
|
+
import { n as readProjectPaths } from "./project-paths-DMvEeSau.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
5
|
import { a as staticLiteral, i as staticExportInitializers, n as parseRouteFilename } from "./parse-filename-CUbj-1MP.mjs";
|
|
6
|
+
import { t as MagicString } from "./dist-Cegxq8gs.mjs";
|
|
6
7
|
import { existsSync, readFileSync } from "node:fs";
|
|
7
8
|
import { parseSync } from "vite";
|
|
9
|
+
//#region src/pages/island-imports.ts
|
|
10
|
+
/** The whole JS/TS module, or each `<script>` block of a Vue/Svelte SFC with its offset in the file. */
|
|
11
|
+
function scriptBlocks(code, filename) {
|
|
12
|
+
if (!/\.(?:vue|svelte)$/.test(filename)) return [{
|
|
13
|
+
source: code,
|
|
14
|
+
offset: 0,
|
|
15
|
+
filename
|
|
16
|
+
}];
|
|
17
|
+
const scriptFilename = filename.replace(/\.(?:vue|svelte)$/, ".ts");
|
|
18
|
+
return [...code.matchAll(/<script\b[^>]*>([\s\S]*?)<\/script\s*>/gi)].map((match) => {
|
|
19
|
+
const source = match[1];
|
|
20
|
+
return {
|
|
21
|
+
source,
|
|
22
|
+
offset: match.index + match[0].indexOf(source),
|
|
23
|
+
filename: scriptFilename
|
|
24
|
+
};
|
|
25
|
+
});
|
|
26
|
+
}
|
|
27
|
+
/** Collect stylesheet imports from authored modules without treating dynamic imports or text as dependencies. */
|
|
28
|
+
function findStaticCssImports(code, filename) {
|
|
29
|
+
if (!code.includes("import")) return [];
|
|
30
|
+
const imports = [];
|
|
31
|
+
for (const script of scriptBlocks(code, filename)) {
|
|
32
|
+
if (!script.source.includes("import")) continue;
|
|
33
|
+
const program = parseSync(script.filename, script.source).program;
|
|
34
|
+
for (const node of program.body ?? []) {
|
|
35
|
+
const source = node.source;
|
|
36
|
+
if (node.type !== "ImportDeclaration" || !isLiteral(source) || typeof source.value !== "string" || !/\.(?:css|scss|sass|less|styl|stylus|pcss|postcss)$/.test(source.value) || node.start === void 0 || node.end === void 0) continue;
|
|
37
|
+
imports.push({
|
|
38
|
+
statement: script.source.slice(node.start, node.end),
|
|
39
|
+
specifier: source.value
|
|
40
|
+
});
|
|
41
|
+
}
|
|
42
|
+
}
|
|
43
|
+
return imports;
|
|
44
|
+
}
|
|
45
|
+
function editIslandSource(code, edits, options) {
|
|
46
|
+
const ms = new MagicString(code);
|
|
47
|
+
for (const edit of edits) ms.overwrite(edit.start, edit.end, edit.text);
|
|
48
|
+
for (const insertion of options?.insert ?? []) ms.appendLeft(insertion.offset, insertion.text);
|
|
49
|
+
if (options?.prepend) ms.prepend(options.prepend);
|
|
50
|
+
if (options?.append) ms.append(options.append);
|
|
51
|
+
return {
|
|
52
|
+
code: ms.toString(),
|
|
53
|
+
map: ms.generateMap({ hires: true })
|
|
54
|
+
};
|
|
55
|
+
}
|
|
56
|
+
/** Read island import attributes from JS/TS, or script blocks inside an SFC. */
|
|
57
|
+
function findIslandImports(code, filename) {
|
|
58
|
+
if (!code.includes("import") || !code.includes("island")) return [];
|
|
59
|
+
const imports = [];
|
|
60
|
+
for (const script of scriptBlocks(code, filename)) {
|
|
61
|
+
if (!script.source.includes("island")) continue;
|
|
62
|
+
const program = parseSync(script.filename, script.source).program;
|
|
63
|
+
for (const node of program.body ?? []) {
|
|
64
|
+
if (node.type !== "ImportDeclaration") continue;
|
|
65
|
+
const specifiers = node.specifiers;
|
|
66
|
+
const attributes = node.attributes;
|
|
67
|
+
const first = specifiers?.[0];
|
|
68
|
+
const attribute = attributes?.[0];
|
|
69
|
+
const key = attribute?.key;
|
|
70
|
+
const value = attribute?.value;
|
|
71
|
+
const source = node.source;
|
|
72
|
+
if (specifiers?.length !== 1 || first?.type !== "ImportDefaultSpecifier" || !isIdentifier(first.local) || attributes?.length !== 1 || !isIdentifier(key) || key.name !== "island" || !isLiteral(value) || typeof value.value !== "string" || !isLiteral(source) || typeof source.value !== "string" || source.start === void 0 || source.end === void 0 || node.start === void 0 || node.end === void 0) continue;
|
|
73
|
+
imports.push({
|
|
74
|
+
start: script.offset + node.start,
|
|
75
|
+
end: script.offset + node.end,
|
|
76
|
+
importName: first.local.name,
|
|
77
|
+
specifierRaw: script.source.slice(source.start, source.end),
|
|
78
|
+
specifier: source.value,
|
|
79
|
+
hydrate: value.value
|
|
80
|
+
});
|
|
81
|
+
}
|
|
82
|
+
}
|
|
83
|
+
return imports;
|
|
84
|
+
}
|
|
85
|
+
//#endregion
|
|
8
86
|
//#region src/pages/layout-resolution.ts
|
|
9
87
|
function isNamedLayout(layout) {
|
|
10
88
|
return "name" in layout;
|
|
@@ -95,10 +173,9 @@ const PAGE_METHODS = /* @__PURE__ */ new Set([
|
|
|
95
173
|
const MAX_REVALIDATE = 31536e3;
|
|
96
174
|
function componentLayout(source, filename) {
|
|
97
175
|
if (!source.includes("layout")) return;
|
|
98
|
-
const
|
|
99
|
-
|
|
100
|
-
|
|
101
|
-
const initializer = staticExportInitializers(filename.replace(/\.(vue|svelte)$/, ".ts"), script, /* @__PURE__ */ new Set(["layout"])).get("layout");
|
|
176
|
+
for (const script of scriptBlocks(source, filename)) {
|
|
177
|
+
if (!script.source.includes("layout")) continue;
|
|
178
|
+
const initializer = staticExportInitializers(script.filename, script.source, /* @__PURE__ */ new Set(["layout"])).get("layout");
|
|
102
179
|
const value = staticLiteral(initializer);
|
|
103
180
|
if (typeof value === "string" || value === false) return value;
|
|
104
181
|
}
|
|
@@ -338,4 +415,4 @@ function extractFrontmatterLayout(source) {
|
|
|
338
415
|
return value;
|
|
339
416
|
}
|
|
340
417
|
//#endregion
|
|
341
|
-
export { resolveNamedLayout as a, resolveLayoutIds as i, resolveEffectiveLayoutChain as n, toLayoutId as o, resolveLayoutChain as r, scanPages as t };
|
|
418
|
+
export { resolveNamedLayout as a, findIslandImports as c, resolveLayoutIds as i, findStaticCssImports as l, resolveEffectiveLayoutChain as n, toLayoutId as o, resolveLayoutChain as r, editIslandSource as s, scanPages as t };
|
|
@@ -1,43 +1,23 @@
|
|
|
1
|
-
import { n as readDeploymentPlatform, r as readProjectConfig } from "./project-
|
|
2
|
-
import { c as getToken } from "./auth-
|
|
3
|
-
import { A as confirm, H as outro, L as log, O as cancel, U as password, tt as isCancel } from "./dist-
|
|
4
|
-
import {
|
|
5
|
-
import {
|
|
6
|
-
import {
|
|
7
|
-
import {
|
|
1
|
+
import { n as readDeploymentPlatform, r as readProjectConfig } from "./project-rqDnVsJN.mjs";
|
|
2
|
+
import { c as getToken } from "./auth-B6iOCjKI.mjs";
|
|
3
|
+
import { A as confirm, H as outro, L as log, O as cancel, U as password, tt as isCancel } from "./dist-BVdsO7Py.mjs";
|
|
4
|
+
import { m as printSuccess, o as formatCount, p as note } from "./output-Ba6ZbrzY.mjs";
|
|
5
|
+
import { r as PlatformClient } from "./client-DM9Kcf4e.mjs";
|
|
6
|
+
import { a as resolveProjectBySlug, t as getRequestedProjectSlug } from "./resolve-project-WpwkCB_c.mjs";
|
|
7
|
+
import { _ as validateSecretValues } from "./env-validation-DYxjz_Wo.mjs";
|
|
8
8
|
import { readFileSync } from "node:fs";
|
|
9
9
|
//#region src/cli/secret.ts
|
|
10
10
|
async function runSecretCommand(root, args) {
|
|
11
11
|
console.log();
|
|
12
|
-
const
|
|
13
|
-
if (platform === "cloudflare") return runCloudflareSecretCommand(root, args);
|
|
14
|
-
if (platform === "none") throw new Error("secret: Deployment is disabled. Run `void init` to choose a platform.");
|
|
15
|
-
const token = getToken(root);
|
|
16
|
-
if (!token) {
|
|
17
|
-
log.error("Not logged in. Run `void account login` first.");
|
|
18
|
-
process.exit(1);
|
|
19
|
-
}
|
|
20
|
-
const client = new PlatformClient(token, { root });
|
|
21
|
-
const requestedProjectName = getRequestedProjectSlug({ projectSlug: args.projectName });
|
|
22
|
-
let projectId;
|
|
23
|
-
if (requestedProjectName) {
|
|
24
|
-
const projects = await client.listProjects();
|
|
25
|
-
const config = resolveProjectBySlug(projects, requestedProjectName);
|
|
26
|
-
if (!config) throw new Error(`secret: No project found with slug '${requestedProjectName}'.`);
|
|
27
|
-
projectId = config.projectId;
|
|
28
|
-
} else {
|
|
29
|
-
const config = readProjectConfig(root);
|
|
30
|
-
if (!config) throw new Error("No linked project found. Run `void project link`, `void deploy`, or pass --project <name>.");
|
|
31
|
-
projectId = config.projectId;
|
|
32
|
-
}
|
|
12
|
+
const backend = await resolveSecretBackend(root, args);
|
|
33
13
|
if (args.action === "list") {
|
|
34
|
-
const
|
|
35
|
-
if (
|
|
14
|
+
const names = await backend.list();
|
|
15
|
+
if (names.length === 0) {
|
|
36
16
|
outro("No secrets set.");
|
|
37
17
|
return;
|
|
38
18
|
}
|
|
39
|
-
note(
|
|
40
|
-
outro(formatCount(
|
|
19
|
+
note(names.map((name) => ` ${name}`).join("\n"), "Secrets");
|
|
20
|
+
outro(formatCount(names.length, "secret"));
|
|
41
21
|
return;
|
|
42
22
|
}
|
|
43
23
|
if (args.action === "put") {
|
|
@@ -46,7 +26,7 @@ async function runSecretCommand(root, args) {
|
|
|
46
26
|
name: args.name,
|
|
47
27
|
value
|
|
48
28
|
}]);
|
|
49
|
-
await
|
|
29
|
+
await backend.put(args.name, value);
|
|
50
30
|
printSuccess(`Secret ${args.name} set.`);
|
|
51
31
|
return;
|
|
52
32
|
}
|
|
@@ -60,66 +40,68 @@ async function runSecretCommand(root, args) {
|
|
|
60
40
|
await validateSecretValues(root, secrets);
|
|
61
41
|
log.info(`Found ${formatCount(secrets.length, "secret")}:`);
|
|
62
42
|
for (const s of secrets) log.message(` ${s.name}`);
|
|
63
|
-
const proceed = await confirm({ message: `This will overwrite ${formatCount(secrets.length, "secret")} in the
|
|
43
|
+
const proceed = await confirm({ message: `This will overwrite ${formatCount(secrets.length, "secret")} in the ${backend.target}. Continue?` });
|
|
64
44
|
if (isCancel(proceed) || !proceed) {
|
|
65
45
|
cancel("Secret sync cancelled.");
|
|
66
46
|
process.exit(0);
|
|
67
47
|
}
|
|
68
|
-
|
|
69
|
-
await client.setSecret(projectId, s.name, s.value);
|
|
70
|
-
log.step(`Set ${s.name}`);
|
|
71
|
-
}
|
|
48
|
+
await backend.sync(secrets);
|
|
72
49
|
printSuccess(`Synced ${formatCount(secrets.length, "secret")}.`);
|
|
73
50
|
return;
|
|
74
51
|
}
|
|
75
|
-
await
|
|
52
|
+
await backend.delete(args.name);
|
|
76
53
|
printSuccess(`Secret ${args.name} deleted.`);
|
|
77
54
|
}
|
|
78
|
-
async function
|
|
79
|
-
|
|
80
|
-
|
|
81
|
-
|
|
82
|
-
|
|
83
|
-
|
|
84
|
-
|
|
85
|
-
|
|
86
|
-
return;
|
|
87
|
-
}
|
|
88
|
-
note(secrets.map((name) => ` ${name}`).join("\n"), "Secrets");
|
|
89
|
-
outro(formatCount(secrets.length, "secret"));
|
|
90
|
-
return;
|
|
55
|
+
async function resolveSecretBackend(root, args) {
|
|
56
|
+
const platform = readDeploymentPlatform(root);
|
|
57
|
+
if (platform === "cloudflare") return resolveCloudflareSecretBackend(root, args);
|
|
58
|
+
if (platform === "none") throw new Error("secret: Deployment is disabled. Run `void init` to choose a platform.");
|
|
59
|
+
const token = getToken(root);
|
|
60
|
+
if (!token) {
|
|
61
|
+
log.error("Not logged in. Run `void account login` first.");
|
|
62
|
+
process.exit(1);
|
|
91
63
|
}
|
|
92
|
-
|
|
93
|
-
|
|
94
|
-
|
|
95
|
-
|
|
96
|
-
|
|
97
|
-
|
|
98
|
-
|
|
99
|
-
|
|
100
|
-
|
|
64
|
+
const client = new PlatformClient(token, { root });
|
|
65
|
+
const requestedProjectName = getRequestedProjectSlug({ projectSlug: args.projectName });
|
|
66
|
+
let projectId;
|
|
67
|
+
if (requestedProjectName) {
|
|
68
|
+
const projects = await client.listProjects();
|
|
69
|
+
const config = resolveProjectBySlug(projects, requestedProjectName);
|
|
70
|
+
if (!config) throw new Error(`secret: No project found with slug '${requestedProjectName}'.`);
|
|
71
|
+
projectId = config.projectId;
|
|
72
|
+
} else {
|
|
73
|
+
const config = readProjectConfig(root);
|
|
74
|
+
if (!config) throw new Error("No linked project found. Run `void project link`, `void deploy`, or pass --project <name>.");
|
|
75
|
+
projectId = config.projectId;
|
|
101
76
|
}
|
|
102
|
-
|
|
103
|
-
|
|
104
|
-
|
|
105
|
-
|
|
106
|
-
|
|
107
|
-
|
|
108
|
-
|
|
109
|
-
|
|
110
|
-
|
|
111
|
-
|
|
112
|
-
|
|
113
|
-
|
|
114
|
-
|
|
115
|
-
|
|
77
|
+
return {
|
|
78
|
+
target: "remote environment",
|
|
79
|
+
list: async () => (await client.listSecrets(projectId)).map((s) => s.name),
|
|
80
|
+
put: async (name, value) => {
|
|
81
|
+
await client.setSecret(projectId, name, value);
|
|
82
|
+
},
|
|
83
|
+
sync: async (secrets) => {
|
|
84
|
+
for (const s of secrets) {
|
|
85
|
+
await client.setSecret(projectId, s.name, s.value);
|
|
86
|
+
log.step(`Set ${s.name}`);
|
|
87
|
+
}
|
|
88
|
+
},
|
|
89
|
+
delete: async (name) => {
|
|
90
|
+
await client.deleteSecret(projectId, name);
|
|
116
91
|
}
|
|
117
|
-
|
|
118
|
-
|
|
119
|
-
|
|
120
|
-
|
|
121
|
-
|
|
122
|
-
|
|
92
|
+
};
|
|
93
|
+
}
|
|
94
|
+
async function resolveCloudflareSecretBackend(root, args) {
|
|
95
|
+
if (args.projectName) throw new Error("secret: --project selects a Void platform project and is not used for direct Cloudflare apps.");
|
|
96
|
+
const { deleteCloudflareSecret, listCloudflareSecrets, putCloudflareSecret, resolveCloudflareOperationContext, syncCloudflareSecrets } = await import("./cloudflare-operations-CrSUFRzJ.mjs");
|
|
97
|
+
const context = resolveCloudflareOperationContext(root);
|
|
98
|
+
return {
|
|
99
|
+
target: "Cloudflare Worker",
|
|
100
|
+
list: () => listCloudflareSecrets(context),
|
|
101
|
+
put: (name, value) => putCloudflareSecret(context, name, value),
|
|
102
|
+
sync: (secrets) => syncCloudflareSecrets(context, secrets),
|
|
103
|
+
delete: (name) => deleteCloudflareSecret(context, name)
|
|
104
|
+
};
|
|
123
105
|
}
|
|
124
106
|
const SECRET_KEY_RE = /^[A-Z][A-Z0-9_]*$/;
|
|
125
107
|
function parseDotenvFile(filePath) {
|
|
@@ -1,3 +1,11 @@
|
|
|
1
|
+
//#region src/pages/script-json.ts
|
|
2
|
+
const UNSAFE_SCRIPT_CHARS = /[<>&\u2028\u2029]/g;
|
|
3
|
+
function escapeScriptJson(json) {
|
|
4
|
+
return json.replace(UNSAFE_SCRIPT_CHARS, (c) => {
|
|
5
|
+
return `\\u${c.charCodeAt(0).toString(16).padStart(4, "0")}`;
|
|
6
|
+
});
|
|
7
|
+
}
|
|
8
|
+
//#endregion
|
|
1
9
|
//#region src/pages/serialize.ts
|
|
2
10
|
/**
|
|
3
11
|
* Escape JSON for embedding inside an inline `<script type="application/json">`
|
|
@@ -6,9 +14,7 @@
|
|
|
6
14
|
* `JSON.parse` on hydration.
|
|
7
15
|
*/
|
|
8
16
|
function serializePageData(pageObj) {
|
|
9
|
-
return JSON.stringify(pageObj)
|
|
10
|
-
return `\\u${c.charCodeAt(0).toString(16).padStart(4, "0")}`;
|
|
11
|
-
});
|
|
17
|
+
return escapeScriptJson(JSON.stringify(pageObj));
|
|
12
18
|
}
|
|
13
19
|
//#endregion
|
|
14
|
-
export { serializePageData as t };
|
|
20
|
+
export { escapeScriptJson as n, serializePageData as t };
|
|
@@ -1,6 +1,6 @@
|
|
|
1
|
-
import { a as join,
|
|
2
|
-
import { L as log } from "./dist-
|
|
3
|
-
import {
|
|
1
|
+
import { a as join, s as relative } from "./dist-ipQi0Q8y.mjs";
|
|
2
|
+
import { L as log } from "./dist-BVdsO7Py.mjs";
|
|
3
|
+
import { r as getPackageDir } from "./agents-CuNtT0D_.mjs";
|
|
4
4
|
import { existsSync, mkdirSync, readFileSync, readdirSync, readlinkSync, symlinkSync } from "node:fs";
|
|
5
5
|
//#region src/cli/skills.ts
|
|
6
6
|
function parseSkills(skillsDir) {
|