void 1.1.11 → 1.2.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/dist/{account-cmd-R35a4Oa8.mjs → account-cmd-CdUll_35.mjs} +5 -5
- package/dist/action-key-XZ9HkWAO.mjs +26 -0
- package/dist/{application-analysis-D7nNmNJb.mjs → application-analysis-fEqoSeMp.mjs} +11 -11
- package/dist/{application-routing-CZH66gXn.mjs → application-routing-DAhNP4u3.mjs} +1 -1
- package/dist/{ast-CPGPjb0V.mjs → ast-CsZ_q_gc.mjs} +6 -1
- package/dist/ast-bindings-C3yaPs1y.mjs +296 -0
- package/dist/{auth-link-VHmiKZmP.mjs → auth-link-C87vGXM-.mjs} +5 -5
- package/dist/{auth-router-O_Wrs5kg.mjs → auth-router-6I81r-ix.mjs} +3 -3
- package/dist/{better-auth-shared-Bv18bB-l.d.mts → better-auth-shared-DVk2DkTW.d.mts} +1 -1
- package/dist/{build-cmd-CMZiMn46.mjs → build-cmd-ex1g-j_e.mjs} +4 -4
- package/dist/{cache-TZ5Ab3d7.mjs → cache-oHzrnY3z.mjs} +4 -4
- package/dist/{cancel-deploy-DXoR6oC3.mjs → cancel-deploy-viAMD0Q_.mjs} +3 -3
- package/dist/cf-build-output-BJHuSsVN.mjs +1 -0
- package/dist/{cf-build-output-Bc8i3dzE.mjs → cf-build-output-BhVxldCw.mjs} +75 -10
- package/dist/{cf-user-agent-ChjQp2MU.mjs → cf-command-values-ByHk0xg4.mjs} +6 -16
- package/dist/cf-worker-settings-BECvvTVd.mjs +37 -0
- package/dist/cli/cli.mjs +139 -35
- package/dist/cli/cloudflare-operation-process.mjs +65 -18
- package/dist/cli/env-schema-probe.d.mts +1 -1
- package/dist/cli/env-schema-probe.mjs +3 -3
- package/dist/{client-GuSO3v_x.mjs → client-BEkdj1kx.mjs} +58 -13
- package/dist/client-BiRDZTSd.mjs +1 -0
- package/dist/{cloudflare-auth-DSvBc1Gu.mjs → cloudflare-auth-Byo_0_N9.mjs} +1 -1
- package/dist/{cloudflare-cmd-ZSErUl6Y.mjs → cloudflare-cmd-DMzCv12s.mjs} +5 -5
- package/dist/{cloudflare-config-rdFOys4X.mjs → cloudflare-config-DchHxPTo.mjs} +1 -1
- package/dist/{cloudflare-connect-BN-k2kD-.mjs → cloudflare-connect-CCRTVg-I.mjs} +3 -3
- package/dist/{cloudflare-operations-DH3GedbV.mjs → cloudflare-operations-Dh9dEHJj.mjs} +17 -7
- package/dist/{cloudflare-operations-Cm8lVx7W.mjs → cloudflare-operations-DsSaw2BT.mjs} +1 -1
- package/dist/{cloudflare-process-CZJ4viYl.mjs → cloudflare-process-8jEYIeim.mjs} +3 -2
- package/dist/{config-DC5llZaI.mjs → config-BIaXIkkv.mjs} +8 -3
- package/dist/{config-DYJV8aEH.mjs → config-BU6hMu1W.mjs} +1 -1
- package/dist/{config-D26zcdKy.mjs → config-DHgSEWT7.mjs} +39 -6
- package/dist/{config-7qoq2p9v.d.mts → config-DQfHOKh9.d.mts} +10 -1
- package/dist/config-entry.d.mts +1 -1
- package/dist/{connect-yQuLbuiJ.mjs → connect-k7R2rPVA.mjs} +6 -6
- package/dist/{create-project-CGOo_OL_.mjs → create-project-DTuy-l0z.mjs} +1 -1
- package/dist/{create-project-DEEWJX_M.mjs → create-project-DV71ol5d.mjs} +4 -4
- package/dist/{db-COI-yTJE.mjs → db-DVOkLH5X.mjs} +79 -23
- package/dist/{delete-PgN6L_9N.mjs → delete-BbP5eopu.mjs} +4 -4
- package/dist/{deploy-DsW-PrRQ.mjs → deploy-7H32EnUs.mjs} +220 -95
- package/dist/deploy-CE0Ev0Ob.mjs +2 -0
- package/dist/{deploy-managed-static-Dqz06S2u.mjs → deploy-managed-static-DlvcvnQT.mjs} +74 -28
- package/dist/{deploy-transport-nY3vLXPL.mjs → deploy-transport-BzGEj0Ge.mjs} +2 -2
- package/dist/deploy.d.mts +22 -1
- package/dist/deploy.mjs +49 -8
- package/dist/{dev-inbox-Rd6j_8vM.mjs → dev-inbox-D0jxye_D.mjs} +1 -1
- package/dist/{dispatch-BAbbn3jg.mjs → dispatch-DoUnxTNo.mjs} +15 -11
- package/dist/{dist-CfgIkieS.mjs → dist-B1PLt4_8.mjs} +1 -1
- package/dist/{dist-BVdsO7Py.mjs → dist-Cor9XGoz.mjs} +94 -200
- package/dist/{dist-Bn8Kodjp.mjs → dist-D15hFhP0.mjs} +1 -1
- package/dist/{domain-DKlNI0SR.mjs → domain-CA2wBgra.mjs} +5 -5
- package/dist/drizzle-9TubSZvI.mjs +1 -0
- package/dist/{email-BcjSyAL0.mjs → email-B9ayYQEG.mjs} +1 -1
- package/dist/{email-C0s3OvJk.mjs → email-DXpCc77w.mjs} +10 -10
- package/dist/{email-cloudflare-etpKiITL.mjs → email-cloudflare-D03g2TkS.mjs} +7 -7
- package/dist/{entry-B_0IhV64.mjs → entry-BEM8ZuGP.mjs} +40 -12
- package/dist/{env-BX2JFsgF.mjs → env-DgOQ9_8S.mjs} +6 -6
- package/dist/{env-public-CCdykygU.d.mts → env-public-6lqiSD2b.d.mts} +1 -0
- package/dist/{env-types-GRchm5dw.mjs → env-types-BicfKBhV.mjs} +1 -1
- package/dist/{env-validation-CuGfWRJd.mjs → env-validation-BmsdCZEk.mjs} +1 -1
- package/dist/{env-validation-D_KyMdab.mjs → env-validation-Dwq3PJzK.mjs} +3 -3
- package/dist/{fetch-DHLOuPyk.d.mts → fetch-CUX0tB78.d.mts} +14 -1
- package/dist/fetch-CtESUYWd.mjs +26 -0
- package/dist/{fetch-error-Dj3crt0e.mjs → fetch-error-Bw0n-IY-.mjs} +1 -1
- package/dist/{fetch-stream-PGgz4uGz.mjs → fetch-stream-BspOeTAI.mjs} +1 -1
- package/dist/{fetch-stream-CNxOrBdP.d.mts → fetch-stream-DfkAzZf-.d.mts} +1 -1
- package/dist/{gen-Bj6ZkOcI.mjs → gen-BfmcIi2g.mjs} +5 -5
- package/dist/gen-NrOlWZaG.mjs +1 -0
- package/dist/{github-cmd-DQDryS-5.mjs → github-cmd-CY9LUqLh.mjs} +4 -4
- package/dist/{handler-_PqY82xe.d.mts → handler-BbkSPzGF.d.mts} +91 -9
- package/dist/{headers-Bi4bOAwp.mjs → headers-D522zd0A.mjs} +2 -2
- package/dist/help-BeAFFE5C.mjs +1 -0
- package/dist/{help-D49SL_lN.mjs → help-CxSlPpzJ.mjs} +83 -12
- package/dist/{inbound-BuTfm11U.mjs → inbound-VrOLqwZY.mjs} +1 -1
- package/dist/index.d.mts +1 -1
- package/dist/index.mjs +125 -124
- package/dist/{info-Bxunp14X.mjs → info-7VDlhtyy.mjs} +4 -4
- package/dist/{init-DyTEY04s.mjs → init-DxYyOs4-.mjs} +103 -43
- package/dist/{link-CgOVn9EC.mjs → link-Ddmod1dZ.mjs} +5 -5
- package/dist/{list-CUfD9RSb.mjs → list-MogaugiO.mjs} +5 -5
- package/dist/{live-DJONVlQK.d.mts → live-Bt8Y_0bg.d.mts} +1 -1
- package/dist/{local-d1-CpaPbd_L.mjs → local-d1-BHBnKWRb.mjs} +1 -1
- package/dist/{log-vqY3pqwI.mjs → log-BMwmN5Ae.mjs} +2 -2
- package/dist/{login-BJvGW5Eu.mjs → login-Cttnagmm.mjs} +4 -4
- package/dist/login-DgDwlKc_.mjs +1 -0
- package/dist/{logs-DeizBI4j.mjs → logs-CAszUWZI.mjs} +4 -4
- package/dist/{migrate-8rk56vV8.mjs → migrate-DyT2jJ8y.mjs} +5 -5
- package/dist/migrate-n49ZeS1X.mjs +1 -0
- package/dist/{mime-srOklVVv.mjs → mime-BAyHPskU.mjs} +1 -1
- package/dist/nitro.mjs +3 -3
- package/dist/{node-uN8_zxJr.mjs → node-WB7c2N4L.mjs} +2 -2
- package/dist/operator-cmd-d2MvJOrl.mjs +1 -0
- package/dist/{operator-cmd-CA5QQyvE.mjs → operator-cmd-skshjMGl.mjs} +4 -4
- package/dist/output-BW9uK099.mjs +1 -0
- package/dist/{output-Ba6ZbrzY.mjs → output-BpgYODYx.mjs} +16 -4
- package/dist/pages/client.d.mts +2 -2
- package/dist/pages/client.mjs +48 -25
- package/dist/pages/index.d.mts +2 -2
- package/dist/pages/index.mjs +4 -4
- package/dist/pages/islands-plugin.d.mts +43 -5
- package/dist/pages/islands-plugin.mjs +100 -28
- package/dist/pages/protocol.d.mts +2 -2
- package/dist/pages/protocol.mjs +1 -1
- package/dist/pages/serialize.d.mts +2 -2
- package/dist/pages/serialize.mjs +1 -1
- package/dist/{parse-filename-CUbj-1MP.mjs → parse-filename-DioPHiR9.mjs} +1 -35
- package/dist/{picocolors-BTps1_gs.mjs → picocolors-BsDfhxIw.mjs} +1 -1
- package/dist/{platform-args-B7ke06up.mjs → platform-args-DVbVClZl.mjs} +12 -4
- package/dist/platform-args-kQrgxScY.mjs +1 -0
- package/dist/{platform-auth-config-CZaY812e.mjs → platform-auth-config-C-pm5Qzx.mjs} +6 -6
- package/dist/{platform-auth-protection-U9HCqoXv.mjs → platform-auth-protection-SHhvim1L.mjs} +4 -4
- package/dist/{platform-auth-recovery-B0BV2hfV.mjs → platform-auth-recovery-DXVWs-wA.mjs} +4 -4
- package/dist/{platform-cmd-CXrjk4fb.mjs → platform-cmd-D5I1beUX.mjs} +7 -7
- package/dist/{platform-cmd-D9lwFpcl.mjs → platform-cmd-PiNRkopU.mjs} +1 -1
- package/dist/{platform-domain-CXyq-68_.mjs → platform-domain-jpmBfZeb.mjs} +4 -4
- package/dist/{platform-lifecycle-Dz2cJsLX.mjs → platform-lifecycle-DH3Yr1qQ.mjs} +1 -1
- package/dist/{platform-lifecycle-D0TdyXbN.mjs → platform-lifecycle-DyKmuNY6.mjs} +405 -44
- package/dist/{platform-management-CnXhgxTM.mjs → platform-management--vDwSn35.mjs} +49 -5
- package/dist/{platform-management-BvgbusqL.mjs → platform-management-7m-PLaPJ.mjs} +1 -1
- package/dist/{platform-plans-config-BWn1S2Rv.mjs → platform-plans-config-CeydDSj0.mjs} +2 -2
- package/dist/{platform-recovery-CH_fThW6.mjs → platform-recovery-BiNpZZab.mjs} +2 -2
- package/dist/{platform-setup-YvN9VQXV.mjs → platform-setup-Ca53gtt0.mjs} +3 -2
- package/dist/{plugin-inference-Bekzjuqw.mjs → plugin-inference-DUjCd55H.mjs} +145 -218
- package/dist/{prepare-2XD6kh77.mjs → prepare-BcAE5Sdj.mjs} +3 -3
- package/dist/prepare-C4I0f--h.mjs +1 -0
- package/dist/{prepare-DepAGBcV.mjs → prepare-DA-17DhO.mjs} +5 -5
- package/dist/{prerender-render-Bfsumdkv.mjs → prerender-render-Cijv7UFo.mjs} +11 -6
- package/dist/prerender-render.mjs +1 -1
- package/dist/{project-cmd-CpLYflCH.mjs → project-cmd-DA4K5faU.mjs} +18 -18
- package/dist/{project-team-CTSY7W7Q.mjs → project-team-CQBNveX3.mjs} +4 -4
- package/dist/{project-token-Cybtlfbl.mjs → project-token-CCalFyQf.mjs} +4 -4
- package/dist/{project-zero-trust-DKOtqyvu.mjs → project-zero-trust-DPnkiEuT.mjs} +4 -4
- package/dist/{protocol-B8sI8dRD.d.mts → protocol-BBDpJz3G.d.mts} +3 -1
- package/dist/{protocol-RNP0u7UY.mjs → protocol-DimNxVRr.mjs} +42 -17
- package/dist/{provision-UcYjpTRh.mjs → provision-BFLCrnUp.mjs} +1 -1
- package/dist/{provision-BuifYvLc.mjs → provision-DtROpNNI.mjs} +6 -5
- package/dist/{requests-Ryiazz9i.mjs → requests-BpH0kImL.mjs} +3 -3
- package/dist/resolve-project-DD1vu8s9.mjs +1 -0
- package/dist/{resolve-project-WpwkCB_c.mjs → resolve-project-Xoi6eTWY.mjs} +1 -1
- package/dist/{rollback-Or0EV3rP.mjs → rollback-CXS1tAa-.mjs} +10 -9
- package/dist/{rolldown-runtime-DXIUcv95.mjs → rolldown-runtime-3h0WiCiA.mjs} +1 -1
- package/dist/{routing-assets-VkrKIbxE.mjs → routing-assets-DdSFxoLp.mjs} +10 -4
- package/dist/runtime/better-auth-mysql.d.mts +1 -1
- package/dist/runtime/better-auth-pg.d.mts +1 -1
- package/dist/runtime/better-auth.d.mts +1 -1
- package/dist/runtime/client-react.d.mts +2 -2
- package/dist/runtime/client-react.mjs +3 -3
- package/dist/runtime/client-solid.d.mts +2 -2
- package/dist/runtime/client-solid.mjs +3 -3
- package/dist/runtime/client-svelte.d.mts +2 -2
- package/dist/runtime/client-svelte.mjs +3 -3
- package/dist/runtime/client-vue.d.mts +2 -2
- package/dist/runtime/client-vue.mjs +3 -3
- package/dist/runtime/client.d.mts +2 -2
- package/dist/runtime/client.mjs +3 -3
- package/dist/runtime/email/testing.mjs +4 -4
- package/dist/runtime/email.mjs +3 -3
- package/dist/runtime/env-public.d.mts +1 -1
- package/dist/runtime/fetch-server.d.mts +8 -0
- package/dist/runtime/fetch-server.mjs +30 -0
- package/dist/runtime/fetch-stream.d.mts +2 -2
- package/dist/runtime/fetch-stream.mjs +2 -2
- package/dist/runtime/fetch.d.mts +2 -2
- package/dist/runtime/fetch.mjs +3 -3
- package/dist/runtime/handler.d.mts +1 -1
- package/dist/runtime/live-client.d.mts +1 -1
- package/dist/runtime/live.d.mts +1 -1
- package/dist/runtime/routing.d.mts +17 -76
- package/dist/runtime/routing.mjs +277 -216
- package/dist/runtime/validator.d.mts +1 -1
- package/dist/runtime/ws-server.d.mts +2 -2
- package/dist/runtime/ws.d.mts +1 -1
- package/dist/{scan-D2-FcLHs.mjs → scan-8IzYXiU_.mjs} +12 -11
- package/dist/{secret-CClHaFxm.mjs → secret-BbXHfLAt.mjs} +6 -6
- package/dist/serialize-DtR8Vwa_.d.mts +18 -0
- package/dist/serialize-YHvlcG3Q.mjs +31 -0
- package/dist/{skills-C_yRTg0g.mjs → skills-CrUO3PJ0.mjs} +1 -1
- package/dist/{subcommand-prompt-Bm3ZlYgA.mjs → subcommand-prompt-D9OhhbGG.mjs} +2 -2
- package/dist/{version-metadata-B1Bm2wSq.mjs → version-metadata-tS39iW09.mjs} +1 -1
- package/dist/wrangler-BLb3_luP.mjs +1 -0
- package/dist/{wrangler-C9XSzrju.mjs → wrangler-F96NnLyb.mjs} +13 -5
- package/dist/{wrapper-BOigE1xJ.mjs → wrapper-D3sZyh2C.mjs} +5 -3
- package/dist/{ws-CsBNxv86.d.mts → ws-BH-im_tX.d.mts} +1 -1
- package/docs/guide/ai.md +1 -1
- package/docs/guide/database/postgresql.md +1 -1
- package/docs/guide/database.md +26 -0
- package/docs/guide/deployment.md +2 -0
- package/docs/guide/edge/headers.md +1 -1
- package/docs/guide/email/domains.md +1 -1
- package/docs/guide/email/receiving.md +1 -1
- package/docs/guide/email/sending.md +3 -3
- package/docs/guide/pages-routing/actions-and-forms.md +1 -1
- package/docs/guide/pages-routing/markdown.md +3 -1
- package/docs/guide/platform/administration/email.md +7 -1
- package/docs/guide/platform/installation/ci.md +2 -0
- package/docs/guide/platform/installation/credentials.md +24 -6
- package/docs/guide/platform/installation/domains.md +16 -0
- package/docs/guide/platform/installation/maintenance.md +32 -2
- package/docs/guide/platform/installation/setup.md +1 -1
- package/docs/guide/self-hosted-platform.md +1 -1
- package/docs/guide/server-routing.md +1 -1
- package/docs/guide/typed-fetch.md +1 -1
- package/docs/integrations/cloudflare.md +2 -1
- package/docs/integrations/frameworks/tanstack-start.md +25 -0
- package/docs/reference/api/deploy.md +35 -3
- package/docs/reference/api/env.md +1 -1
- package/docs/reference/api/rewrites.md +1 -1
- package/docs/reference/api/types.md +1 -0
- package/docs/reference/cli/database.md +15 -0
- package/docs/reference/cli/platform-installation.md +5 -2
- package/docs/reference/cli/project.md +4 -2
- package/docs/reference/cli/setup.md +17 -0
- package/docs/reference/cli.md +1 -0
- package/docs/reference/config.md +14 -1
- package/docs/reference/resource-inference.md +4 -0
- package/package.json +23 -22
- package/sandbox.Dockerfile +1 -1
- package/schema.json +23 -3
- package/dist/cf-build-output-BU3hqdHu.mjs +0 -1
- package/dist/client-DrdeJgHR.mjs +0 -1
- package/dist/deploy-CxNgEYr4.mjs +0 -2
- package/dist/fetch-sAcwjzLO.mjs +0 -18
- package/dist/gen-DsCukhuw.mjs +0 -1
- package/dist/help-DOFygYi4.mjs +0 -1
- package/dist/login-alAlxw4S.mjs +0 -1
- package/dist/migrate-D2odrAmh.mjs +0 -1
- package/dist/operator-cmd-D7toMPJ9.mjs +0 -1
- package/dist/platform-args-B_LrqEZB.mjs +0 -1
- package/dist/prepare-EVEbQ9n2.mjs +0 -1
- package/dist/resolve-project-PnhzMtY6.mjs +0 -1
- package/dist/serialize-BtQyaYoC.mjs +0 -20
- package/dist/serialize-CfSwWfF2.d.mts +0 -10
- package/dist/wrangler-DAdxHEzh.mjs +0 -1
package/dist/index.mjs
CHANGED
|
@@ -1,43 +1,42 @@
|
|
|
1
|
-
import { n as __toESM } from "./rolldown-runtime-
|
|
2
|
-
import { a as join, c as resolve, n as dirname, o as normalize, s as relative } from "./dist-ipQi0Q8y.mjs";
|
|
3
|
-
import { t as require_picocolors } from "./picocolors-
|
|
4
|
-
import {
|
|
1
|
+
import { n as __toESM } from "./rolldown-runtime-3h0WiCiA.mjs";
|
|
2
|
+
import { a as join, c as resolve, i as isAbsolute, n as dirname, o as normalize, s as relative } from "./dist-ipQi0Q8y.mjs";
|
|
3
|
+
import { t as require_picocolors } from "./picocolors-BsDfhxIw.mjs";
|
|
4
|
+
import { l as inferBindingsFromSource, n as FRAMEWORK_SCAN_DIRS, p as applyBindingOverrides, t as DEFAULT_SCAN_DIRS, u as staticModuleReferences } from "./plugin-inference-DUjCd55H.mjs";
|
|
5
5
|
import { n as readProjectPaths, t as assertNoRootSourceConventionConflicts } from "./project-paths-DGu_QZ_Q.mjs";
|
|
6
6
|
import { n as loadVoidAuthConfig } from "./config-CyUJzi3q.mjs";
|
|
7
|
-
import { c as
|
|
8
|
-
import { i as isMemberExpression, n as isIdentifier, r as isLiteral } from "./ast-
|
|
9
|
-
import {
|
|
10
|
-
import { a as hasSandboxSqliteMigration, c as sandboxContainerConfig, i as assertSandboxNamespaceConfig, n as DEFAULT_SANDBOX_CLASS_NAME, p as scanJobsSync, r as SANDBOX_MIGRATION_TAG, s as resolveSandboxConfig, t as analyzeApplicationSync, u as scanQueuesSync } from "./application-analysis-
|
|
11
|
-
import {
|
|
12
|
-
import {
|
|
13
|
-
import {
|
|
7
|
+
import { c as getDatabaseCasing, l as getDatabaseDialect, p as readConfig, u as isNodeTarget } from "./config-DHgSEWT7.mjs";
|
|
8
|
+
import { i as isMemberExpression, n as isIdentifier, r as isLiteral } from "./ast-CsZ_q_gc.mjs";
|
|
9
|
+
import { n as bindingResolver } from "./ast-bindings-C3yaPs1y.mjs";
|
|
10
|
+
import { a as hasSandboxSqliteMigration, c as sandboxContainerConfig, i as assertSandboxNamespaceConfig, n as DEFAULT_SANDBOX_CLASS_NAME, p as scanJobsSync, r as SANDBOX_MIGRATION_TAG, s as resolveSandboxConfig, t as analyzeApplicationSync, u as scanQueuesSync } from "./application-analysis-fEqoSeMp.mjs";
|
|
11
|
+
import { t as isRouteEnabledForEnvironment } from "./parse-filename-DioPHiR9.mjs";
|
|
12
|
+
import { a as validateSsrEntries, n as SSR_SERVER_ENTRY_RELATIVE_PATHS, o as validateSsrEntry, t as SSR_CLIENT_ENTRY_RELATIVE_PATHS } from "./entry-BEM8ZuGP.mjs";
|
|
13
|
+
import { r as hasEmailHandlers } from "./email-B9ayYQEG.mjs";
|
|
14
|
+
import { i as voidWarn, n as voidError, r as voidLog, t as setShowTimestamp } from "./log-BMwmN5Ae.mjs";
|
|
14
15
|
import { t as MagicString } from "./dist-Cegxq8gs.mjs";
|
|
15
|
-
import { i as resolveLayoutIds } from "./scan-
|
|
16
|
+
import { i as resolveLayoutIds } from "./scan-8IzYXiU_.mjs";
|
|
16
17
|
import { a as resolveDistDir, c as hasDocumentRoutes, n as collectRevalidate, o as resolveWorkerDirName, r as hasRevalidate, s as hasApiRoutes, t as collectPages, u as resolveAssetRoutingPolicy } from "./isr-config-fZaJJ8t7.mjs";
|
|
17
|
-
import { n as mergeRoutingRules, t as lintRoutingPhases } from "./headers-
|
|
18
|
+
import { n as mergeRoutingRules, t as lintRoutingPhases } from "./headers-D522zd0A.mjs";
|
|
18
19
|
import { n as readDeploymentPlatform, r as readProjectConfig } from "./project-rqDnVsJN.mjs";
|
|
19
|
-
import { a as restoreCloudflarePreviewPointer, r as materializeCloudflareConfig, s as stashCloudflareDeployPointer } from "./cloudflare-config-
|
|
20
|
-
import {
|
|
21
|
-
import { n as writeLocalD1PersistState, t as resolveLocalD1Target } from "./local-d1-
|
|
20
|
+
import { a as restoreCloudflarePreviewPointer, r as materializeCloudflareConfig, s as stashCloudflareDeployPointer } from "./cloudflare-config-DchHxPTo.mjs";
|
|
21
|
+
import { A as syncWranglerWebSockets, E as resolveLiveBindingConfig, O as syncWranglerBindings, T as readWranglerWebSocketTombstones, a as LIVE_MIGRATION_TAG, b as readRootWranglerConfig, d as ensureWranglerCompatibilityDate, f as ensureWranglerNodejsAlsFlag, g as normalizeWranglerCompatibilityFlags, h as nextDurableObjectMigrationTag, k as syncWranglerDurableObjects, m as hasDurableObjectSqliteMigration, p as findBindingNameOwner, u as ensureWranglerCompat, v as readExistingLiveBindingConfig, x as readWranglerCompat } from "./wrangler-F96NnLyb.mjs";
|
|
22
|
+
import { n as writeLocalD1PersistState, t as resolveLocalD1Target } from "./local-d1-BHBnKWRb.mjs";
|
|
22
23
|
import { n as scopedAccessCredentials } from "./cf-access-BM9G0lhO.mjs";
|
|
23
24
|
import { n as ensurePlatformProxyAccess } from "./cf-access-CWP4avfP.mjs";
|
|
24
25
|
import { a as getApiUrl, c as getToken, o as getProxyUrl } from "./auth-B6iOCjKI.mjs";
|
|
25
|
-
import { m as printSuccess } from "./output-Ba6ZbrzY.mjs";
|
|
26
26
|
import { r as writeFileIfChanged } from "./project-tsconfig-Itv1f4WC.mjs";
|
|
27
|
-
import { n as drizzlePlugin, t as generateQueueResolverSource } from "./dispatch-
|
|
28
|
-
import { _ as parseCapturedMessage, a as DEV_INBOX_ENV_VAR, c as DEV_INBOX_TOKEN_ENV_VAR, f as clearDevBuffer, g as listDevMessages, l as DEV_INBOX_TOKEN_HEADER, m as findDevMessage, n as DEV_INBOX_ACK_VALUE, o as DEV_INBOX_MAX_CAPTURE_BYTES, s as DEV_INBOX_PREFIX, t as DEV_INBOX_ACK_HEADER, u as DEV_INBOX_TOKEN_QUERY, v as pushToDevBuffer } from "./dev-inbox-
|
|
27
|
+
import { n as drizzlePlugin, t as generateQueueResolverSource } from "./dispatch-DoUnxTNo.mjs";
|
|
28
|
+
import { _ as parseCapturedMessage, a as DEV_INBOX_ENV_VAR, c as DEV_INBOX_TOKEN_ENV_VAR, f as clearDevBuffer, g as listDevMessages, l as DEV_INBOX_TOKEN_HEADER, m as findDevMessage, n as DEV_INBOX_ACK_VALUE, o as DEV_INBOX_MAX_CAPTURE_BYTES, s as DEV_INBOX_PREFIX, t as DEV_INBOX_ACK_HEADER, u as DEV_INBOX_TOKEN_QUERY, v as pushToDevBuffer } from "./dev-inbox-D0jxye_D.mjs";
|
|
29
29
|
import { n as scanWranglerDotenvKeys } from "./dotenv-CNazY3-w.mjs";
|
|
30
30
|
import { a as isClientEnvKey, c as resolveRemoteMode, i as findReservedEnvKeys, n as LOCAL_ENV_FILE, o as loadLocalEnv, r as findLegacyEnvFiles, s as reservedEnvKeysMessage } from "./env-BJjULvL0.mjs";
|
|
31
|
-
import { n as findEnvFileForPaths, r as generateEnvTypes, t as findEnvFile } from "./env-types-
|
|
31
|
+
import { n as findEnvFileForPaths, r as generateEnvTypes, t as findEnvFile } from "./env-types-BicfKBhV.mjs";
|
|
32
32
|
import { t as loadUserEnvFile } from "./load-user-env-DD5qveNU.mjs";
|
|
33
33
|
import { n as INTERNAL_BINDING_PREFIXES, t as INTERNAL_BINDING_EXACT_NAMES } from "./env-raw-D74P4ebM.mjs";
|
|
34
|
-
import { t as ASSET_EXTENSIONS } from "./routing-assets-
|
|
35
|
-
import { r as selectNativeVersionMetadataBinding, t as CLOUDFLARE_PRESERVE_BINDINGS_BUILD_ENV } from "./version-metadata-
|
|
36
|
-
import { f as prerenderPages, n as SEND_EMAIL_BINDING, p as prerenderPagesNode } from "./email-cloudflare-
|
|
34
|
+
import { t as ASSET_EXTENSIONS } from "./routing-assets-DdSFxoLp.mjs";
|
|
35
|
+
import { r as selectNativeVersionMetadataBinding, t as CLOUDFLARE_PRESERVE_BINDINGS_BUILD_ENV } from "./version-metadata-tS39iW09.mjs";
|
|
36
|
+
import { f as prerenderPages, n as SEND_EMAIL_BINDING, p as prerenderPagesNode } from "./email-cloudflare-D03g2TkS.mjs";
|
|
37
37
|
import { r as defer } from "./validation-error-Dg9Recn1.mjs";
|
|
38
|
-
import { i as safeJsonStringify } from "./protocol-
|
|
39
|
-
import { n as completeApplicationAnalysis } from "./application-routing-
|
|
40
|
-
import { n as generateVoidAuthDrizzleSchema, t as generateVoidAuthDatabaseModule } from "./drizzle-BQfyvQKX.mjs";
|
|
38
|
+
import { i as safeJsonStringify } from "./protocol-DimNxVRr.mjs";
|
|
39
|
+
import { n as completeApplicationAnalysis } from "./application-routing-DAhNP4u3.mjs";
|
|
41
40
|
import { n as generateQueueTypes, t as generateRouteTypes } from "./route-types-BZi26DVS.mjs";
|
|
42
41
|
import { a as defineMiddleware, c as defineScheduled, i as defineHead, n as basicAuth, o as defineQueue, r as defineHandler, s as defineRender, t as VoidAssetRewriteError } from "./handler-BZ1t7-Rv.mjs";
|
|
43
42
|
import module, { builtinModules, createRequire } from "node:module";
|
|
@@ -489,10 +488,11 @@ function readVoidDevCredentials(root) {
|
|
|
489
488
|
* block the server. On completion, writes project.json and restarts the server.
|
|
490
489
|
*/
|
|
491
490
|
async function runAiSetupPrompt(root, token, apiUrl, server) {
|
|
492
|
-
const { select, text, isCancel, log } = await import("./dist-
|
|
493
|
-
const { PlatformClient } = await import("./client-
|
|
491
|
+
const { select, text, isCancel, log } = await import("./dist-B1PLt4_8.mjs");
|
|
492
|
+
const { PlatformClient } = await import("./client-BiRDZTSd.mjs");
|
|
494
493
|
const { attachSelectedPlatform, writeProjectConfig } = await import("./project-zdB3fs9G.mjs");
|
|
495
|
-
const { inferDefaultSlug } = await import("./resolve-project-
|
|
494
|
+
const { inferDefaultSlug } = await import("./resolve-project-DD1vu8s9.mjs");
|
|
495
|
+
const { printSuccess } = await import("./output-BW9uK099.mjs");
|
|
496
496
|
const client = new PlatformClient(token, { apiUrl });
|
|
497
497
|
let projects;
|
|
498
498
|
try {
|
|
@@ -519,7 +519,7 @@ async function runAiSetupPrompt(root, token, apiUrl, server) {
|
|
|
519
519
|
let slug;
|
|
520
520
|
if (result === "__create__") {
|
|
521
521
|
const { validateProjectSlug } = await import("./project-slug-6cyz8E7k.mjs");
|
|
522
|
-
const { createProjectWithSlugRetry } = await import("./create-project-
|
|
522
|
+
const { createProjectWithSlugRetry } = await import("./create-project-DTuy-l0z.mjs");
|
|
523
523
|
let created;
|
|
524
524
|
try {
|
|
525
525
|
created = await createProjectWithSlugRetry(client, inferDefaultSlug(root), async (defaultSlug) => {
|
|
@@ -1185,16 +1185,32 @@ function offsetToLineCol(index, offset) {
|
|
|
1185
1185
|
* bound to the `void/env` proxy.
|
|
1186
1186
|
*/
|
|
1187
1187
|
function walkEnvReads(program, bindings, visit) {
|
|
1188
|
-
|
|
1189
|
-
|
|
1190
|
-
|
|
1191
|
-
|
|
1192
|
-
|
|
1193
|
-
|
|
1188
|
+
const references = [];
|
|
1189
|
+
const resolve = bindingResolver(program, {
|
|
1190
|
+
names: /* @__PURE__ */ new Set([...bindings.directNames, ...bindings.namespaceNames]),
|
|
1191
|
+
visit(current) {
|
|
1192
|
+
if (!isMemberExpression(current)) return false;
|
|
1193
|
+
if (isIdentifier(current.object) && bindings.directNames.has(current.object.name)) {
|
|
1194
|
+
references.push({
|
|
1195
|
+
node: current,
|
|
1196
|
+
name: current.object.name,
|
|
1197
|
+
bindingType: "ImportSpecifier"
|
|
1198
|
+
});
|
|
1199
|
+
return true;
|
|
1200
|
+
}
|
|
1201
|
+
const obj = current.object;
|
|
1202
|
+
if (isMemberExpression(obj) && !obj.computed && isIdentifier(obj.object) && bindings.namespaceNames.has(obj.object.name) && isIdentifier(obj.property) && obj.property.name === "env") {
|
|
1203
|
+
references.push({
|
|
1204
|
+
node: current,
|
|
1205
|
+
name: obj.object.name,
|
|
1206
|
+
bindingType: "ImportNamespaceSpecifier"
|
|
1207
|
+
});
|
|
1208
|
+
return true;
|
|
1209
|
+
}
|
|
1210
|
+
return false;
|
|
1194
1211
|
}
|
|
1195
|
-
|
|
1196
|
-
|
|
1197
|
-
} });
|
|
1212
|
+
});
|
|
1213
|
+
for (const { node, name, bindingType } of references) if (resolve(node, name)?.type === bindingType) visit(node);
|
|
1198
1214
|
}
|
|
1199
1215
|
/**
|
|
1200
1216
|
* Collect every `void/env` read. Computed access produces a warning hit
|
|
@@ -2127,7 +2143,7 @@ function astroDevTriggerInjectPlugin(root) {
|
|
|
2127
2143
|
}
|
|
2128
2144
|
//#endregion
|
|
2129
2145
|
//#region src/router/compile.ts
|
|
2130
|
-
const
|
|
2146
|
+
const FETCH_SERVER_PATH = fileURLToPath(import.meta.resolve("#self/runtime/fetch-server"));
|
|
2131
2147
|
const ROUTING_RUNTIME_PATH = fileURLToPath(import.meta.resolve("#self/runtime/routing"));
|
|
2132
2148
|
function pushDefaultErrorPageHelpers(lines, options) {
|
|
2133
2149
|
lines.push(`const __errorRenderer = __createErrorRenderer(${JSON.stringify({
|
|
@@ -2150,7 +2166,7 @@ function compileRouteTable(scan, routesDir, middlewareDir, jobsDir, queuesDir, s
|
|
|
2150
2166
|
const managedDispatch = options.nodeTarget !== true && options.dev !== true && options.managedDispatch === true;
|
|
2151
2167
|
lines.push(`import { AsyncLocalStorage } from "node:async_hooks";`);
|
|
2152
2168
|
lines.push(`import { Hono } from ${JSON.stringify(options.honoPath)};`);
|
|
2153
|
-
lines.push(`import { createRoutingRuntime as __createRoutingRuntime, createHttpRouteHandler as __createHttpRouteHandler, createErrorRenderer as __createErrorRenderer, createPageGetHandler as __createPageGetHandler, createPageMutationHandler as __createPageMutationHandler, createPagesFallback as __createPagesFallback, createModuleLoader as __createModuleLoader, createClientAssetTags as __createClientAssetTags, createManifestLoader as __createManifestLoader, createSsrFallback as __createSsrFallback, createAssetNotFound as __createAssetNotFound } from ${JSON.stringify(ROUTING_RUNTIME_PATH)};`);
|
|
2169
|
+
lines.push(`import { createRoutingRuntime as __createRoutingRuntime, createHttpRouteHandler as __createHttpRouteHandler, createErrorRenderer as __createErrorRenderer, createPageGetHandler as __createPageGetHandler, createPageMutationHandler as __createPageMutationHandler, createNamedActionMarker as __createNamedActionMarker, markRouteHandler as __markRouteHandler, createPagesFallback as __createPagesFallback, createModuleLoader as __createModuleLoader, createClientAssetTags as __createClientAssetTags, createManifestLoader as __createManifestLoader, createSsrFallback as __createSsrFallback, createAssetNotFound as __createAssetNotFound } from ${JSON.stringify(ROUTING_RUNTIME_PATH)};`);
|
|
2154
2170
|
if (options.nodeTarget) lines.push(`const withRuntimeEnv = (_env, fn) => fn();`);
|
|
2155
2171
|
else lines.push(`import { withRuntimeEnv } from ${JSON.stringify(options.runtimeEnvPath)};`);
|
|
2156
2172
|
if (auth) {
|
|
@@ -2206,6 +2222,10 @@ function compileRouteTable(scan, routesDir, middlewareDir, jobsDir, queuesDir, s
|
|
|
2206
2222
|
const fallbackRulesJson = JSON.stringify(emitEdgeRules && options.fallbackRules?.length ? options.dev ? options.fallbackRules : stripOriginForProd(options.fallbackRules) : void 0);
|
|
2207
2223
|
if (emitEdgeRules && options.redirectRules?.length) compileRoutingRulesMiddleware(lines, options.redirectRules, options.dev === true);
|
|
2208
2224
|
if (emitEdgeRules && options.headerRules?.length) compileHeaderMiddleware(lines, options.headerRules);
|
|
2225
|
+
if (pages && scan.pages.pages.some((page) => page.methods.includes("actions"))) {
|
|
2226
|
+
lines.push(`import { matchedRoutes as __matchedRoutes } from ${JSON.stringify(options.honoRoutePath)};`);
|
|
2227
|
+
lines.push("app.use(__createNamedActionMarker(__matchedRoutes));");
|
|
2228
|
+
}
|
|
2209
2229
|
if (auth) {
|
|
2210
2230
|
lines.push("app.use(async (c, next) => {");
|
|
2211
2231
|
lines.push(" return runVoidAuthMiddleware(c, next, __voidAuthOptions, __voidAuthDatabase);");
|
|
@@ -2223,13 +2243,13 @@ function compileRouteTable(scan, routesDir, middlewareDir, jobsDir, queuesDir, s
|
|
|
2223
2243
|
}
|
|
2224
2244
|
if (webSockets.length > 0) lines.push("");
|
|
2225
2245
|
if (auth) {
|
|
2226
|
-
lines.push("app.all(\"/api/auth\", async (c) => {");
|
|
2246
|
+
lines.push("app.all(\"/api/auth\", __markRouteHandler(async (c) => {");
|
|
2227
2247
|
lines.push(" return handleVoidAuthRequest(c, __voidAuthOptions, __voidAuthDatabase);");
|
|
2228
|
-
lines.push("});");
|
|
2248
|
+
lines.push("}));");
|
|
2229
2249
|
lines.push("");
|
|
2230
|
-
lines.push("app.all(\"/api/auth/*\", async (c) => {");
|
|
2250
|
+
lines.push("app.all(\"/api/auth/*\", __markRouteHandler(async (c) => {");
|
|
2231
2251
|
lines.push(" return handleVoidAuthRequest(c, __voidAuthOptions, __voidAuthDatabase);");
|
|
2232
|
-
lines.push("});");
|
|
2252
|
+
lines.push("}));");
|
|
2233
2253
|
lines.push("");
|
|
2234
2254
|
}
|
|
2235
2255
|
const seenFiles = /* @__PURE__ */ new Set();
|
|
@@ -2276,7 +2296,7 @@ function compileRouteTable(scan, routesDir, middlewareDir, jobsDir, queuesDir, s
|
|
|
2276
2296
|
lines.push("");
|
|
2277
2297
|
}
|
|
2278
2298
|
if (pages && scan.pages.pages.length > 0) compilePageRoutes(lines, scan, pages, options);
|
|
2279
|
-
for (let i = 0; i < webSockets.length; i++) lines.push(`app.all(${JSON.stringify(webSockets[i].pattern)}, (c) => __forwardWebSocketRequest(c.req.raw, c.env, __voidWebSocketRoutes[${i}]));`);
|
|
2299
|
+
for (let i = 0; i < webSockets.length; i++) lines.push(`app.all(${JSON.stringify(webSockets[i].pattern)}, __markRouteHandler((c) => __forwardWebSocketRequest(c.req.raw, c.env, __voidWebSocketRoutes[${i}])));`);
|
|
2280
2300
|
if (webSockets.length > 0) lines.push("");
|
|
2281
2301
|
if (pages && scan.pages.pages.length > 0) lines.push(`app.notFound(__createPagesFallback({ routing: __routingRuntime, errors: __errorRenderer, assetsDir: ${JSON.stringify(options.assetsDir)}, fallbackRules: ${fallbackRulesJson} }));`);
|
|
2282
2302
|
compilePrerenderCollector(lines, scan, ssr, options);
|
|
@@ -2289,7 +2309,7 @@ function compileRouteTable(scan, routesDir, middlewareDir, jobsDir, queuesDir, s
|
|
|
2289
2309
|
reactRefresh: options.reactRefresh
|
|
2290
2310
|
})});`);
|
|
2291
2311
|
lines.push(`app.notFound(__createSsrFallback({ routing: __routingRuntime, nodeTarget: ${JSON.stringify(options.nodeTarget === true)}, assetsDir: ${JSON.stringify(options.assetsDir)}, fallbackRules: ${fallbackRulesJson}, load: () => import(${JSON.stringify(ssr.serverEntryPath)}), assets: getClientAssetTags }));`);
|
|
2292
|
-
} else if (emitEdgeRules && (options.fallbackRules?.length || !options.nodeTarget && options.headerRules?.length) && !(pages && scan.pages.pages.length > 0)) lines.push(`app.notFound(__createAssetNotFound({ routing: __routingRuntime, nodeTarget: ${JSON.stringify(options.nodeTarget === true)}, assetsDir: ${JSON.stringify(options.assetsDir)}, fallbackRules: ${fallbackRulesJson} }));`);
|
|
2312
|
+
} else if (emitEdgeRules && (options.fallbackRules?.length || options.redirectRules?.some((rule) => rule.status === 200) || !options.nodeTarget && options.headerRules?.length) && !(pages && scan.pages.pages.length > 0)) lines.push(`app.notFound(__createAssetNotFound({ routing: __routingRuntime, nodeTarget: ${JSON.stringify(options.nodeTarget === true)}, assetsDir: ${JSON.stringify(options.assetsDir)}, fallbackRules: ${fallbackRulesJson} }));`);
|
|
2293
2313
|
if (scan.jobs.length > 0) {
|
|
2294
2314
|
for (let i = 0; i < scan.jobs.length; i++) {
|
|
2295
2315
|
const job = scan.jobs[i];
|
|
@@ -2340,7 +2360,7 @@ function compileRouteTable(scan, routesDir, middlewareDir, jobsDir, queuesDir, s
|
|
|
2340
2360
|
lines.push(" await scheduled(controller, c.env, c.executionCtx);");
|
|
2341
2361
|
lines.push(" return c.json({ ok: true });");
|
|
2342
2362
|
lines.push("};");
|
|
2343
|
-
lines.push("app.post(\"/__void/scheduled\", __scheduledHandler);");
|
|
2363
|
+
lines.push("app.post(\"/__void/scheduled\", __markRouteHandler(__scheduledHandler));");
|
|
2344
2364
|
lines.push("");
|
|
2345
2365
|
}
|
|
2346
2366
|
if (scan.queues.length > 0) {
|
|
@@ -2390,7 +2410,7 @@ function compileRouteTable(scan, routesDir, middlewareDir, jobsDir, queuesDir, s
|
|
|
2390
2410
|
lines.push(" const result = await __processQueue(payload, c.env);");
|
|
2391
2411
|
lines.push(" return c.json(result);");
|
|
2392
2412
|
lines.push("};");
|
|
2393
|
-
lines.push("app.post(\"/__void/queue\", __queueHandler);");
|
|
2413
|
+
lines.push("app.post(\"/__void/queue\", __markRouteHandler(__queueHandler));");
|
|
2394
2414
|
lines.push("");
|
|
2395
2415
|
}
|
|
2396
2416
|
const email = scan.email;
|
|
@@ -2491,11 +2511,11 @@ function compileRouteTable(scan, routesDir, middlewareDir, jobsDir, queuesDir, s
|
|
|
2491
2511
|
}
|
|
2492
2512
|
lines.push(" return null;");
|
|
2493
2513
|
lines.push("}");
|
|
2494
|
-
lines.push(`app.post("/__void/migrate", (c) => __voidCreateMigrationRequestHandler(${auth ? "true" : "false"}, false)(c.req.raw));`);
|
|
2495
|
-
lines.push(`app.get("/__void/migrate/capabilities", (c) => __voidCreateMigrationRequestHandler(${auth ? "true" : "false"}, true)(c.req.raw));`);
|
|
2496
|
-
lines.push("app.post(\"/__void/migrate/app\", (c) => __voidCreateMigrationRequestHandler(false, true)(c.req.raw));");
|
|
2497
|
-
lines.push("app.get(\"/__void/migrate/app/attempt/:attemptId\", (c) => __voidCreateMigrationRequestHandler(false, true)(c.req.raw));");
|
|
2498
|
-
if (auth) lines.push("app.post(\"/__void/migrate/auth\", (c) => __voidCreateMigrationRequestHandler(true, true)(c.req.raw));");
|
|
2514
|
+
lines.push(`app.post("/__void/migrate", __markRouteHandler((c) => __voidCreateMigrationRequestHandler(${auth ? "true" : "false"}, false)(c.req.raw)));`);
|
|
2515
|
+
lines.push(`app.get("/__void/migrate/capabilities", __markRouteHandler((c) => __voidCreateMigrationRequestHandler(${auth ? "true" : "false"}, true)(c.req.raw)));`);
|
|
2516
|
+
lines.push("app.post(\"/__void/migrate/app\", __markRouteHandler((c) => __voidCreateMigrationRequestHandler(false, true)(c.req.raw)));");
|
|
2517
|
+
lines.push("app.get(\"/__void/migrate/app/attempt/:attemptId\", __markRouteHandler((c) => __voidCreateMigrationRequestHandler(false, true)(c.req.raw)));");
|
|
2518
|
+
if (auth) lines.push("app.post(\"/__void/migrate/auth\", __markRouteHandler((c) => __voidCreateMigrationRequestHandler(true, true)(c.req.raw)));");
|
|
2499
2519
|
lines.push("");
|
|
2500
2520
|
} else {
|
|
2501
2521
|
lines.push("export async function __voidHandleInternalRoute() { return null; }");
|
|
@@ -2504,12 +2524,12 @@ function compileRouteTable(scan, routesDir, middlewareDir, jobsDir, queuesDir, s
|
|
|
2504
2524
|
if (options.bindingHandlerPath) {
|
|
2505
2525
|
lines.push(`import { createBindingHandler as __createBindingHandler } from ${JSON.stringify(options.bindingHandlerPath)};`);
|
|
2506
2526
|
lines.push("let __voidBindingApp;");
|
|
2507
|
-
lines.push("app.all(\"/__void/*\", async (c) => {");
|
|
2527
|
+
lines.push("app.all(\"/__void/*\", __markRouteHandler(async (c) => {");
|
|
2508
2528
|
lines.push(" if (!__voidBindingApp) __voidBindingApp = __createBindingHandler(__getRawEnv());");
|
|
2509
2529
|
lines.push(" const url = new URL(c.req.url);");
|
|
2510
2530
|
lines.push(" url.pathname = url.pathname.slice(7);");
|
|
2511
2531
|
lines.push(" return __voidBindingApp.fetch(new Request(url.toString(), c.req.raw));");
|
|
2512
|
-
lines.push("});");
|
|
2532
|
+
lines.push("}));");
|
|
2513
2533
|
lines.push("");
|
|
2514
2534
|
}
|
|
2515
2535
|
lines.push("const __rawEnvStore = new AsyncLocalStorage();");
|
|
@@ -2896,68 +2916,17 @@ function compileHeaderMiddleware(lines, rules) {
|
|
|
2896
2916
|
/** Generate the server-side fetch client, which calls `app.fetch()` with the current request's credentials. */
|
|
2897
2917
|
function compileWorkerClient(authClientPath, nodeTarget = false) {
|
|
2898
2918
|
const envImport = nodeTarget ? "" : "import { env } from \"cloudflare:workers\";\n";
|
|
2899
|
-
const dispatch = nodeTarget ? "
|
|
2919
|
+
const dispatch = nodeTarget ? "app.fetch(request)" : "app.fetch(request, env, store?.executionCtx ?? { waitUntil() {}, passThroughOnException() {} })";
|
|
2900
2920
|
return `import app, { requestContext } from "virtual:void-routes";
|
|
2901
|
-
import {
|
|
2921
|
+
import { createServerFetch } from ${JSON.stringify(FETCH_SERVER_PATH)};
|
|
2922
|
+
export { FetchError } from ${JSON.stringify(FETCH_SERVER_PATH)};
|
|
2902
2923
|
${envImport}export { auth, createAuthClient } from ${JSON.stringify(authClientPath)};
|
|
2903
2924
|
|
|
2904
|
-
export
|
|
2905
|
-
|
|
2906
|
-
|
|
2907
|
-
|
|
2908
|
-
|
|
2909
|
-
this.statusText = statusText;
|
|
2910
|
-
this.data = data;
|
|
2911
|
-
}
|
|
2912
|
-
}
|
|
2913
|
-
|
|
2914
|
-
export async function fetch(path, options) {
|
|
2915
|
-
let url = interpolateRouteParams(path, options?.params);
|
|
2916
|
-
|
|
2917
|
-
if (options?.query) {
|
|
2918
|
-
const qs = new URLSearchParams(options.query).toString();
|
|
2919
|
-
if (qs) url += "?" + qs;
|
|
2920
|
-
}
|
|
2921
|
-
|
|
2922
|
-
const method = options?.method ?? "GET";
|
|
2923
|
-
const headers = new Headers(options?.headers);
|
|
2924
|
-
|
|
2925
|
-
const store = requestContext.getStore();
|
|
2926
|
-
if (store?.request) {
|
|
2927
|
-
const outerReq = store.request;
|
|
2928
|
-
if (!headers.has("cookie")) {
|
|
2929
|
-
const cookie = outerReq.headers.get("cookie");
|
|
2930
|
-
if (cookie) headers.set("cookie", cookie);
|
|
2931
|
-
}
|
|
2932
|
-
if (!headers.has("authorization")) {
|
|
2933
|
-
const auth = outerReq.headers.get("authorization");
|
|
2934
|
-
if (auth) headers.set("authorization", auth);
|
|
2935
|
-
}
|
|
2936
|
-
}
|
|
2937
|
-
|
|
2938
|
-
if (options?.body != null && !headers.has("content-type")) {
|
|
2939
|
-
headers.set("content-type", "application/json");
|
|
2940
|
-
}
|
|
2941
|
-
|
|
2942
|
-
const request = new Request("${nodeTarget ? "http://localhost" : "http://worker.local"}" + url, {
|
|
2943
|
-
method,
|
|
2944
|
-
headers,
|
|
2945
|
-
body: options?.body != null ? JSON.stringify(options.body) : undefined,
|
|
2946
|
-
});
|
|
2947
|
-
|
|
2948
|
-
${dispatch}
|
|
2949
|
-
|
|
2950
|
-
if (response.status === 204) return undefined;
|
|
2951
|
-
|
|
2952
|
-
const contentType = response.headers.get("content-type") ?? "";
|
|
2953
|
-
const data = contentType.includes("application/json") ? await response.json() : await response.text();
|
|
2954
|
-
|
|
2955
|
-
if (!response.ok) {
|
|
2956
|
-
throw new FetchError(response.status, response.statusText, data);
|
|
2957
|
-
}
|
|
2958
|
-
|
|
2959
|
-
return data;
|
|
2960
|
-
}
|
|
2925
|
+
export const fetch = createServerFetch(
|
|
2926
|
+
(request, store) => ${dispatch},
|
|
2927
|
+
() => requestContext.getStore(),
|
|
2928
|
+
"${nodeTarget ? "http://localhost" : "http://worker.local"}",
|
|
2929
|
+
);
|
|
2961
2930
|
`;
|
|
2962
2931
|
}
|
|
2963
2932
|
//#endregion
|
|
@@ -2970,15 +2939,32 @@ export async function fetch(path, options) {
|
|
|
2970
2939
|
* (see `generateClassATriggerWrapper`). Production deploys go through
|
|
2971
2940
|
* `cli/wrapper.ts` instead.
|
|
2972
2941
|
*/
|
|
2973
|
-
function getFrameworkEntry(framework, root, devTriggerToken, dialect, notFound) {
|
|
2942
|
+
function getFrameworkEntry(framework, root, devTriggerToken, dialect, notFound, configuredMain) {
|
|
2974
2943
|
const isBuild = isViteBuildOrPreview();
|
|
2975
2944
|
if (!isBuild) writeFrameworkTriggersDispatch(root, devTriggerToken);
|
|
2976
|
-
return generateClassATriggerWrapper(root, framework, getOriginalFrameworkEntry(framework, root), isBuild, dialect, void 0, notFound);
|
|
2945
|
+
return generateClassATriggerWrapper(root, framework, getOriginalFrameworkEntry(framework, root, configuredMain), isBuild, dialect, void 0, notFound);
|
|
2946
|
+
}
|
|
2947
|
+
const TANSTACK_SERVER_ENTRY = "@tanstack/react-start/server-entry";
|
|
2948
|
+
/**
|
|
2949
|
+
* Whether `main` names a file in the app rather than a package. A migrated TanStack config keeps
|
|
2950
|
+
* `main: "@tanstack/react-start/server-entry"`, and a package subpath may end in `.js`, so a
|
|
2951
|
+
* bare name counts as a file only when it exists in the app.
|
|
2952
|
+
*/
|
|
2953
|
+
function isFileEntry(root, main) {
|
|
2954
|
+
if (main.startsWith(".") || isAbsolute(main)) return true;
|
|
2955
|
+
return statSync(resolve(root, main), { throwIfNoEntry: false })?.isFile() === true;
|
|
2977
2956
|
}
|
|
2978
2957
|
/** The framework's own server entry, before our trigger wrapper. */
|
|
2979
|
-
function getOriginalFrameworkEntry(framework, root) {
|
|
2958
|
+
function getOriginalFrameworkEntry(framework, root, configuredMain) {
|
|
2980
2959
|
switch (framework) {
|
|
2981
|
-
case "tanstack-start":
|
|
2960
|
+
case "tanstack-start": {
|
|
2961
|
+
if (configuredMain === void 0 || configuredMain === TANSTACK_SERVER_ENTRY || configuredMain === `${TANSTACK_SERVER_ENTRY}.js`) return TANSTACK_SERVER_ENTRY;
|
|
2962
|
+
if (typeof configuredMain !== "string" || configuredMain.trim() === "") throw new Error("config: cloudflare.main must be a non-empty Worker entry path.");
|
|
2963
|
+
if (!isFileEntry(root, configuredMain)) return configuredMain;
|
|
2964
|
+
const original = resolve(root, configuredMain);
|
|
2965
|
+
if (original === resolve(root, ".void", "tanstack-start-trigger-wrapper.ts")) throw new Error("config: cloudflare.main cannot point to Void's generated framework wrapper.");
|
|
2966
|
+
return original;
|
|
2967
|
+
}
|
|
2982
2968
|
case "react-router": return generateReactRouterEntry(root);
|
|
2983
2969
|
case "vinext-app": return "vinext/server/app-router-entry";
|
|
2984
2970
|
case "vinext-pages": return generateVinextPagesEntry(root);
|
|
@@ -3030,6 +3016,7 @@ ${fetchBody}
|
|
|
3030
3016
|
},`;
|
|
3031
3017
|
const body = `// @ts-nocheck — Auto-generated by Void ${isBuild ? "for vite build" : "in dev"}. Do NOT edit.
|
|
3032
3018
|
import original from ${JSON.stringify(original)};
|
|
3019
|
+
export * from ${JSON.stringify(original)};
|
|
3033
3020
|
${scoped ? "import { withRuntimeEnv } from \"void/_env\";\n" : ""}
|
|
3034
3021
|
export default {
|
|
3035
3022
|
...original,
|
|
@@ -3307,7 +3294,7 @@ function migrationPlugin(root, dialect, databaseId = "local", persistRoot = join
|
|
|
3307
3294
|
const hasSqlMigrations = existsSync(migrationsDir);
|
|
3308
3295
|
if (!hasSqlMigrations && !auth?.enabled) return;
|
|
3309
3296
|
const migrateAuth = async (databaseUrl) => {
|
|
3310
|
-
const { runLocalVoidAuthMigrations } = await import("./node-
|
|
3297
|
+
const { runLocalVoidAuthMigrations } = await import("./node-WB7c2N4L.mjs");
|
|
3311
3298
|
await runLocalVoidAuthMigrations(root, dialect, persistRoot, databaseId, auth?.configPath, databaseUrl);
|
|
3312
3299
|
};
|
|
3313
3300
|
const mysqlAuth = dialect === "mysql" && auth?.enabled === true;
|
|
@@ -3650,7 +3637,7 @@ function createFrameworkPlugins(input) {
|
|
|
3650
3637
|
apply: "serve",
|
|
3651
3638
|
config() {
|
|
3652
3639
|
if (detected.class !== "b") return;
|
|
3653
|
-
return { ssr: { noExternal: ["void", ...dialect
|
|
3640
|
+
return { ssr: { noExternal: ["void", ...dialect !== "sqlite" || getDatabaseCasing(config) !== void 0 ? findVoidDependentPackages(root) : []] } };
|
|
3654
3641
|
},
|
|
3655
3642
|
resolveId: {
|
|
3656
3643
|
order: "pre",
|
|
@@ -3734,6 +3721,14 @@ export default {
|
|
|
3734
3721
|
return injectSvelteKitBuildHooks(code, id, envModuleFile);
|
|
3735
3722
|
}
|
|
3736
3723
|
} : void 0;
|
|
3724
|
+
const svelteKitD1CasingBuildPlugin = detected.class === "b" && dialect === "sqlite" && getDatabaseCasing(config) !== void 0 ? {
|
|
3725
|
+
name: "void:sveltekit-d1-casing-build",
|
|
3726
|
+
apply: "build",
|
|
3727
|
+
configEnvironment(name) {
|
|
3728
|
+
if (name !== "ssr") return;
|
|
3729
|
+
return { resolve: { noExternal: findVoidDependentPackages(root) } };
|
|
3730
|
+
}
|
|
3731
|
+
} : void 0;
|
|
3737
3732
|
return [
|
|
3738
3733
|
devTriggerSecretGuardPlugin(),
|
|
3739
3734
|
createCloudflareBuiltinsExternalPlugin(),
|
|
@@ -3743,6 +3738,7 @@ export default {
|
|
|
3743
3738
|
...astroServerEntryPlugin ? [astroServerEntryPlugin] : [],
|
|
3744
3739
|
svelteKitHooksInjectPlugin,
|
|
3745
3740
|
...svelteKitWorkerBuildPlugin ? [svelteKitWorkerBuildPlugin] : [],
|
|
3741
|
+
...svelteKitD1CasingBuildPlugin ? [svelteKitD1CasingBuildPlugin] : [],
|
|
3746
3742
|
clientStubsPlugin,
|
|
3747
3743
|
serverRuntimeOptimizerPlugin,
|
|
3748
3744
|
bindingRuntimePlugin(bindingNames),
|
|
@@ -3752,6 +3748,7 @@ export default {
|
|
|
3752
3748
|
drizzlePlugin(root, false, dialect, {
|
|
3753
3749
|
d1BindingName: bindingNames?.d1,
|
|
3754
3750
|
forceVirtualDb: bindingNames?.d1 !== void 0,
|
|
3751
|
+
casing: getDatabaseCasing(config),
|
|
3755
3752
|
localD1DatabaseId: localD1.databaseId,
|
|
3756
3753
|
localD1PersistRoot: frameworkPersistRoot,
|
|
3757
3754
|
nitroBundlesServer: detected.name === "nuxt" || detected.name === "analog"
|
|
@@ -4277,6 +4274,7 @@ function routingPlugin(root, options) {
|
|
|
4277
4274
|
const runtimeEmailPath = resolveFile("#self/email");
|
|
4278
4275
|
const compileOptions = {
|
|
4279
4276
|
honoPath: resolveFile("hono"),
|
|
4277
|
+
honoRoutePath: resolveFile("hono/route"),
|
|
4280
4278
|
runtimeEnvPath: resolveFile("#self/_env"),
|
|
4281
4279
|
emailDir,
|
|
4282
4280
|
projectRoot: root,
|
|
@@ -4325,6 +4323,7 @@ function routingPlugin(root, options) {
|
|
|
4325
4323
|
}
|
|
4326
4324
|
async function writeAuthDatabaseFiles() {
|
|
4327
4325
|
if (!compileOptions.auth) return;
|
|
4326
|
+
const { generateVoidAuthDatabaseModule, generateVoidAuthDrizzleSchema } = await import("./drizzle-9TubSZvI.mjs");
|
|
4328
4327
|
const authRuntime = {
|
|
4329
4328
|
dialect: compileOptions.auth.dialect,
|
|
4330
4329
|
providers: compileOptions.auth.providers,
|
|
@@ -4929,7 +4928,7 @@ function voidPlugin(options) {
|
|
|
4929
4928
|
const cloudflareConfigPath = projectCloudflareConfigPath && existsSync(projectCloudflareConfigPath) ? projectCloudflareConfigPath : void 0;
|
|
4930
4929
|
let previewing = false;
|
|
4931
4930
|
const restorePreviewPointer = () => {
|
|
4932
|
-
if (!existsSync(join(root, "void.config.ts"))) return;
|
|
4931
|
+
if (!existsSync(join(root, "void.config.ts")) || process.env["VOID_CLOUDFLARE_DEPLOY_BUILD"] === "1") return;
|
|
4933
4932
|
if (restoreCloudflarePreviewPointer(root) && !scheduledPreviewPointerCleanups.has(root)) {
|
|
4934
4933
|
scheduledPreviewPointerCleanups.add(root);
|
|
4935
4934
|
process.once("exit", () => {
|
|
@@ -5209,7 +5208,7 @@ function voidPlugin(options) {
|
|
|
5209
5208
|
}
|
|
5210
5209
|
};
|
|
5211
5210
|
if (framework) {
|
|
5212
|
-
workerConfig.main = getFrameworkEntry(framework, root, devTriggerToken, dialect, config.routing?.notFound);
|
|
5211
|
+
workerConfig.main = getFrameworkEntry(framework, root, devTriggerToken, dialect, config.routing?.notFound, config.cloudflare?.main);
|
|
5213
5212
|
let notFoundIgnoredWarned = false;
|
|
5214
5213
|
const frameworkBuildWrapperPlugin = {
|
|
5215
5214
|
name: "void:framework-build-wrapper",
|
|
@@ -5219,7 +5218,7 @@ function voidPlugin(options) {
|
|
|
5219
5218
|
notFoundIgnoredWarned = true;
|
|
5220
5219
|
voidWarn(`Void generates no asset routing policy for a ${framework} build, so "routing.notFound" in void.config.ts is not written to the built worker config. During a self-hosted build and direct Cloudflare deployment, it takes effect only if your own Cloudflare config declares a complete \`assets\` policy (\`binding\`, \`directory\`, \`not_found_handling\`, \`run_worker_first\`); otherwise Cloudflare's default applies. Managed \`void deploy\` supplies the policy for you.`);
|
|
5221
5220
|
}
|
|
5222
|
-
generateClassATriggerWrapper(root, framework, getOriginalFrameworkEntry(framework, root), true, dialect, resolved.build.assetsDir, config.routing?.notFound);
|
|
5221
|
+
generateClassATriggerWrapper(root, framework, getOriginalFrameworkEntry(framework, root, config.cloudflare?.main), true, dialect, resolved.build.assetsDir, config.routing?.notFound);
|
|
5223
5222
|
}
|
|
5224
5223
|
};
|
|
5225
5224
|
const existingFlags = workerConfig.compatibility_flags ?? [];
|
|
@@ -5271,6 +5270,7 @@ function voidPlugin(options) {
|
|
|
5271
5270
|
drizzlePlugin(root, false, dialect, {
|
|
5272
5271
|
d1BindingName: bindingNames?.d1,
|
|
5273
5272
|
forceVirtualDb: authEnabled || bindingNames?.d1 !== void 0,
|
|
5273
|
+
casing: getDatabaseCasing(config),
|
|
5274
5274
|
localD1DatabaseId: localD1.databaseId,
|
|
5275
5275
|
localD1PersistRoot: localD1.persistRoot,
|
|
5276
5276
|
redirectDbTypePaths
|
|
@@ -5418,6 +5418,7 @@ function voidPlugin(options) {
|
|
|
5418
5418
|
drizzlePlugin(root, true, dialect, {
|
|
5419
5419
|
d1BindingName: bindingNames?.d1,
|
|
5420
5420
|
forceVirtualDb: authEnabled || bindingNames?.d1 !== void 0,
|
|
5421
|
+
casing: getDatabaseCasing(config),
|
|
5421
5422
|
localD1DatabaseId: localD1.databaseId,
|
|
5422
5423
|
localD1PersistRoot: localD1.persistRoot
|
|
5423
5424
|
}),
|
|
@@ -1,8 +1,8 @@
|
|
|
1
1
|
import { a as join, s as relative } from "./dist-ipQi0Q8y.mjs";
|
|
2
|
-
import { a as deriveWebSocketClassNameFromName, o as inferWebSocketResourceName } from "./plugin-inference-
|
|
3
|
-
import {
|
|
4
|
-
import { d as deriveDurableResourceIdentity, f as inferDurableResourceName, t as analyzeApplicationSync } from "./application-analysis-
|
|
5
|
-
import { n as VOID_LOCK_FILE } from "./cloudflare-config-
|
|
2
|
+
import { a as deriveWebSocketClassNameFromName, o as inferWebSocketResourceName } from "./plugin-inference-DUjCd55H.mjs";
|
|
3
|
+
import { p as readConfig } from "./config-DHgSEWT7.mjs";
|
|
4
|
+
import { d as deriveDurableResourceIdentity, f as inferDurableResourceName, t as analyzeApplicationSync } from "./application-analysis-fEqoSeMp.mjs";
|
|
5
|
+
import { n as VOID_LOCK_FILE } from "./cloudflare-config-DchHxPTo.mjs";
|
|
6
6
|
import { existsSync, readFileSync } from "node:fs";
|
|
7
7
|
import { isRecord } from "@void/deploy-core";
|
|
8
8
|
//#region src/cli/info.ts
|