void 1.1.0 → 1.1.12
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-BTcUzv9L.mjs → account-cmd-Cj6sCMTk.mjs} +4 -4
- package/dist/{application-analysis-AB_YYWgH.mjs → application-analysis-D7nNmNJb.mjs} +6 -6
- package/dist/{application-routing-L7V-TFhZ.mjs → application-routing-CZH66gXn.mjs} +1 -1
- package/dist/{auth-link-DUJuvRx5.mjs → auth-link-Dj7lAC_K.mjs} +4 -4
- package/dist/{auth-migrations-Cgs0k6lS.mjs → auth-migrations-BO27GDNr.mjs} +38 -2
- package/dist/{auth-router-CIxiMG7i.mjs → auth-router-CNsMOFCa.mjs} +5 -4
- package/dist/{better-auth-shared-B74NJIus.d.mts → better-auth-shared-Bv18bB-l.d.mts} +2 -0
- package/dist/{better-auth-shared-CMXlZG7W.mjs → better-auth-shared-D-6z0q0f.mjs} +28 -1
- package/dist/{build-cmd-BkIv25PA.mjs → build-cmd-ByhegwRC.mjs} +2 -2
- package/dist/{cache-Ctzfig-W.mjs → cache-CEFb5ban.mjs} +2 -2
- package/dist/{cancel-deploy-CD9o-SsC.mjs → cancel-deploy-CaARY26n.mjs} +2 -2
- package/dist/{cf-build-output-Bc8i3dzE.mjs → cf-build-output-ChEKWan2.mjs} +71 -7
- package/dist/cf-build-output-Dcmxa-Zm.mjs +1 -0
- package/dist/{cf-user-agent-ChjQp2MU.mjs → cf-command-values-b8OqDoo9.mjs} +5 -16
- package/dist/cf-user-agent-BkEHPDLA.mjs +16 -0
- package/dist/cli/cli.mjs +180 -57
- package/dist/cli/cloudflare-operation-process.mjs +46 -9
- package/dist/cli/env-schema-probe.mjs +3 -3
- package/dist/{client-DM9Kcf4e.mjs → client-BdzxubTS.mjs} +58 -13
- package/dist/client-DAnfyMe9.mjs +1 -0
- package/dist/{cloudflare-auth-CqFBDo52.mjs → cloudflare-auth-DSvBc1Gu.mjs} +1 -1
- package/dist/{cloudflare-cmd-BIAF_BIY.mjs → cloudflare-cmd-D_2-Q-_i.mjs} +4 -4
- package/dist/{cloudflare-config-DV60XFFK.mjs → cloudflare-config-rdFOys4X.mjs} +2 -2
- package/dist/{cloudflare-connect-WjwnVOJA.mjs → cloudflare-connect-BN-k2kD-.mjs} +2 -2
- package/dist/{cloudflare-operations-CrSUFRzJ.mjs → cloudflare-operations-BFLCpUCV.mjs} +1 -1
- package/dist/{cloudflare-operations-B42EZeJy.mjs → cloudflare-operations-D5PLrOqD.mjs} +18 -8
- package/dist/{cloudflare-process-CeDWJRhj.mjs → cloudflare-process-CZJ4viYl.mjs} +2 -2
- package/dist/collect-BWhkgtAn.mjs +1 -0
- package/dist/{collect-xjffdCdk.mjs → collect-Dew86qce.mjs} +4 -3
- package/dist/{config-D0GY5ItR.mjs → config-CyUJzi3q.mjs} +1 -1
- package/dist/{config-Bx_1SpnO.mjs → config-D26zcdKy.mjs} +2 -2
- package/dist/{config-BEm9vRvS.mjs → config-DC5llZaI.mjs} +2 -2
- package/dist/{config-QrJWu0IX.mjs → config-DYJV8aEH.mjs} +1 -1
- package/dist/{connect-CKtk-EZe.mjs → connect-C4_m2moF.mjs} +5 -5
- package/dist/{create-project-B-ewF_Af.mjs → create-project-CvuYDD-l.mjs} +1 -1
- package/dist/{create-project-yInGo72M.mjs → create-project-D8jQTwVQ.mjs} +2 -2
- package/dist/database-provider.d.mts +6 -0
- package/dist/{db-7I_gfdVq.mjs → db-BsiOAa0A.mjs} +306 -111
- package/dist/{db-types-Bb4WBWIs.mjs → db-types-NGxPwnlt.mjs} +1 -1
- package/dist/{delete-Cy-M1u-r.mjs → delete-CAma7nFi.mjs} +2 -2
- package/dist/{deploy-BYYlnsiy.mjs → deploy-D1gIPiAq.mjs} +148 -64
- package/dist/deploy-Dc0XsCQj.mjs +2 -0
- package/dist/{deploy-managed-static-Ca4TFdmx.mjs → deploy-managed-static-B9KVxY3X.mjs} +80 -34
- package/dist/{deploy-transport-DWlWBe6M.mjs → deploy-transport-B3mtEi_q.mjs} +2 -2
- package/dist/deploy.d.mts +22 -1
- package/dist/deploy.mjs +49 -8
- package/dist/discover-D4TPKo57.mjs +1 -0
- package/dist/{discover-D2PGT63u.mjs → discover-LaV0tbIu.mjs} +1 -1
- package/dist/{dispatch-DrTTk8Xg.mjs → dispatch-BAbbn3jg.mjs} +6 -6
- package/dist/{domain-CZGxPv9u.mjs → domain-BAdwm-QS.mjs} +3 -3
- package/dist/{drizzle-CF84FOVM.mjs → drizzle-BQfyvQKX.mjs} +13 -2
- package/dist/{email-DzyNVuoU.mjs → email-MwjA7kaL.mjs} +11 -12
- package/dist/{email-cloudflare-DfG6UEMm.mjs → email-cloudflare-etpKiITL.mjs} +7 -10
- package/dist/{entry-ehmBvs5w.mjs → entry-B_0IhV64.mjs} +1 -1
- package/dist/{env-Nx3yf50r.mjs → env-B163-G1s.mjs} +5 -5
- package/dist/{env-types-DS2_y4X8.mjs → env-types-GRchm5dw.mjs} +1 -1
- package/dist/{env-validation-BT7z-qpQ.mjs → env-validation-CuGfWRJd.mjs} +1 -1
- package/dist/{env-validation-DYxjz_Wo.mjs → env-validation-D_KyMdab.mjs} +2 -2
- package/dist/{fetch-BPCYVi3H.d.mts → fetch-CUX0tB78.d.mts} +16 -3
- 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-obvZ7fvO.d.mts → fetch-stream-DfkAzZf-.d.mts} +1 -1
- package/dist/{gen-CufHEf42.mjs → gen-CYN3wiov.mjs} +26 -20
- package/dist/gen-Cf-RBVg4.mjs +1 -0
- package/dist/{generate-Dat0UTry.mjs → generate-B1m4Cm4n.mjs} +1 -1
- package/dist/{generate-ClI89brV.mjs → generate-DkEb9rL-.mjs} +1 -1
- package/dist/{github-cmd-FU8EjFyU.mjs → github-cmd-C8QsnJQs.mjs} +2 -2
- package/dist/{handler-_PqY82xe.d.mts → handler-D5K_yP6T.d.mts} +1 -1
- package/dist/{headers-Di1FsD3e.mjs → headers-Bi4bOAwp.mjs} +1 -1
- package/dist/{help-BT2hovNI.mjs → help-B2sFwn9b.mjs} +60 -15
- package/dist/help-w-xlx_kq.mjs +1 -0
- package/dist/{inbound-brj2-TM5.d.mts → inbound-Da7XsjH3.d.mts} +6 -12
- package/dist/index.d.mts +1 -1
- package/dist/index.mjs +139 -126
- package/dist/{info-l249eUdH.mjs → info-Bxunp14X.mjs} +4 -4
- package/dist/{init-D0A6M64Q.mjs → init-DGFQMnbk.mjs} +51 -28
- package/dist/{link-WMoJFf4i.mjs → link-CwrfpjIM.mjs} +3 -3
- package/dist/{list-CQ2EQEHL.mjs → list-hKoW5z-b.mjs} +3 -3
- package/dist/{live-DJONVlQK.d.mts → live-JheIDZKc.d.mts} +1 -1
- package/dist/{local-d1-BxvQYEFi.mjs → local-d1-CpaPbd_L.mjs} +5 -5
- package/dist/login-08mBwZfI.mjs +1 -0
- package/dist/{login-C2T1oVG-.mjs → login-f2eu2TQh.mjs} +3 -3
- package/dist/{logs-DnC1d7xB.mjs → logs-CEWqD-_B.mjs} +3 -3
- package/dist/{migrate-BDIprOYd.mjs → migrate-DYfdWBXt.mjs} +5 -5
- package/dist/migrate-Di-4EuoE.mjs +1 -0
- package/dist/{neon-n74ta1Pr.mjs → neon-DTZr7Bu7.mjs} +0 -1
- package/dist/nitro.mjs +3 -3
- package/dist/{node-cPadMgUO.mjs → node-uN8_zxJr.mjs} +15 -9
- package/dist/operator-cmd-Bv20yLu2.mjs +1 -0
- package/dist/{operator-cmd-DHieWtFp.mjs → operator-cmd-DCr_QGMH.mjs} +4 -4
- package/dist/{output-Ba6ZbrzY.mjs → output-CKguMgr7.mjs} +13 -1
- package/dist/pages/client.d.mts +2 -2
- package/dist/pages/client.mjs +18 -5
- package/dist/pages/index.d.mts +2 -2
- package/dist/pages/index.mjs +5 -5
- package/dist/pages/islands-plugin.d.mts +44 -6
- package/dist/pages/islands-plugin.mjs +99 -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/{platform-args-CaCL_1Ch.mjs → platform-args-B7ke06up.mjs} +1 -4
- package/dist/platform-args-B_LrqEZB.mjs +1 -0
- package/dist/{platform-auth-config-Z16-I8nT.mjs → platform-auth-config-qGvEuns3.mjs} +5 -5
- package/dist/{platform-auth-protection-BXwZiJSF.mjs → platform-auth-protection-CyLcD6ot.mjs} +3 -3
- package/dist/{platform-auth-recovery-CXjfqyOv.mjs → platform-auth-recovery-B2LKI8V2.mjs} +3 -3
- package/dist/{platform-cmd-PT4YwMLM.mjs → platform-cmd-B2ec5eFg.mjs} +1 -1
- package/dist/{platform-cmd-DaAOiWTl.mjs → platform-cmd-CX7phm7V.mjs} +6 -6
- package/dist/{platform-domain-CxpvUeo0.mjs → platform-domain-DDNK2y-4.mjs} +3 -3
- package/dist/{platform-lifecycle-DBiS0cJd.mjs → platform-lifecycle-3CR98Tg2.mjs} +399 -40
- package/dist/{platform-lifecycle-u9pMOvxC.mjs → platform-lifecycle-CWc5gr6c.mjs} +1 -1
- package/dist/{platform-management-DvBS83rC.mjs → platform-management-DAE6g2QU.mjs} +1 -1
- package/dist/{platform-management-DhEFdQAf.mjs → platform-management-o3LCCeE4.mjs} +40 -4
- package/dist/{platform-plans-config-BWn1S2Rv.mjs → platform-plans-config-CBMZxCep.mjs} +1 -1
- package/dist/{platform-recovery-BUGOB4RC.mjs → platform-recovery-Dmsg7lWA.mjs} +2 -2
- package/dist/{platform-setup-YvN9VQXV.mjs → platform-setup-hFbnWAVQ.mjs} +1 -1
- package/dist/{plugin-inference-DsARdQKE.mjs → plugin-inference-Bekzjuqw.mjs} +2 -2
- package/dist/{prepare-DEB5SeVJ.mjs → prepare-DepAGBcV.mjs} +9 -9
- package/dist/prepare-EVEbQ9n2.mjs +1 -0
- package/dist/{prepare-PQCgsny0.mjs → prepare-HKo7Rh5V.mjs} +2 -2
- package/dist/{project-cmd-DVatD8Ev.mjs → project-cmd-8ylYGx-O.mjs} +18 -18
- package/dist/{project-paths-DMvEeSau.mjs → project-paths-DGu_QZ_Q.mjs} +1 -1
- package/dist/{project-team-DJrWEAG1.mjs → project-team-Bvpl78we.mjs} +2 -2
- package/dist/{project-token-CBgLBuL6.mjs → project-token-QWHoJH2t.mjs} +2 -2
- package/dist/{project-tsconfig-bveqhlYA.mjs → project-tsconfig-Itv1f4WC.mjs} +1 -1
- package/dist/{project-zero-trust-92gLtZ25.mjs → project-zero-trust-8tJ-RFvu.mjs} +2 -2
- package/dist/{protocol-4H7V_3Os.d.mts → protocol-Ssc_LhHj.d.mts} +2 -2
- package/dist/{protocol-RNP0u7UY.mjs → protocol-bAUUkx70.mjs} +1 -1
- package/dist/{providers-BXuhmuub.mjs → providers-BUHwJlmM.mjs} +10 -1
- package/dist/provision-BgXFDv0d.mjs +1 -0
- package/dist/{provision-BnSSkiED.mjs → provision-DZKYCEJg.mjs} +66 -66
- package/dist/r2-conditions-B8xUgJRc.mjs +61 -0
- package/dist/{requests-7W1Pygt2.mjs → requests-Vk5Zyhcy.mjs} +2 -2
- package/dist/{rollback-BcASVnwP.mjs → rollback-CH4yMQys.mjs} +9 -8
- package/dist/{runner-CabsQ-iM.mjs → runner-3uGC-oLF.mjs} +9 -7
- package/dist/{runner-So9mYfcm.mjs → runner-WCdfeI0q.mjs} +1 -1
- package/dist/{runner-mysql-BhRaONkO.mjs → runner-mysql-BWmbk5IE.mjs} +1 -1
- package/dist/{runner-mysql-DWwE8jKi.mjs → runner-mysql-BcHnLUuM.mjs} +1 -1
- package/dist/{runner-pg-_Xncr3H5.mjs → runner-pg-Cgp-cr_p.mjs} +1 -1
- package/dist/{runner-pg-BRemq_GX.mjs → runner-pg-Cr3qrqi4.mjs} +1 -1
- package/dist/runtime/ai.d.mts +4 -0
- package/dist/runtime/ai.mjs +2 -37
- package/dist/runtime/better-auth-mysql.d.mts +1 -1
- package/dist/runtime/better-auth-mysql.mjs +2 -2
- package/dist/runtime/better-auth-pg.d.mts +1 -1
- package/dist/runtime/better-auth-pg.mjs +2 -2
- package/dist/runtime/better-auth.d.mts +1 -1
- package/dist/runtime/better-auth.mjs +2 -2
- 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.d.mts +1 -1
- package/dist/runtime/email.d.mts +2 -3
- package/dist/runtime/email.mjs +2 -3
- 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/migration-handler-mysql.mjs +4 -4
- package/dist/runtime/migration-handler-pg.mjs +9 -1
- package/dist/runtime/remote/binding-handler.mjs +25 -25
- package/dist/runtime/remote/index.d.mts +3 -0
- package/dist/runtime/remote/index.mjs +86 -23
- package/dist/runtime/routing.d.mts +2 -2
- package/dist/runtime/routing.mjs +1 -1
- package/dist/runtime/sse-client.d.mts +4 -0
- 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-C0BMdmEd.mjs → scan-D2-FcLHs.mjs} +13 -5
- package/dist/{secret-bg73f1Ge.mjs → secret-wr6Sn4Xa.mjs} +4 -4
- package/dist/serialize-DtR8Vwa_.d.mts +18 -0
- package/dist/serialize-YHvlcG3Q.mjs +31 -0
- package/dist/{subcommand-prompt-Bm3ZlYgA.mjs → subcommand-prompt-CNZc4XUd.mjs} +1 -1
- package/dist/{types-BAp5AEBU.d.mts → types-7AIz0OZu.d.mts} +1 -1
- package/dist/{validate-CheZGRE7.mjs → validate-CnZPMq4q.mjs} +22 -17
- package/dist/validate-D7Wn8PUX.mjs +1 -0
- package/dist/{version-metadata-DIrqEHQo.mjs → version-metadata-B1Bm2wSq.mjs} +1 -1
- package/dist/{wrangler-BYs07Rxy.mjs → wrangler-C9XSzrju.mjs} +3 -3
- package/dist/wrangler-DAdxHEzh.mjs +1 -0
- package/dist/{wrapper-CwhpNWtH.mjs → wrapper-DGsYwNi6.mjs} +6 -4
- package/dist/{ws-aKVYB-fA.d.mts → ws-nnFnAyQb.d.mts} +6 -1
- package/docs/guide/auth.md +1 -1
- package/docs/guide/database/d1.md +2 -2
- package/docs/guide/database/mysql.md +1 -1
- package/docs/guide/deployment.md +2 -0
- package/docs/guide/edge/headers.md +10 -2
- package/docs/guide/edge/revalidation.md +2 -0
- package/docs/guide/email/receiving.md +1 -1
- package/docs/guide/email/sending.md +3 -3
- package/docs/guide/pages-routing/islands.md +2 -2
- package/docs/guide/pages-routing/markdown.md +3 -1
- package/docs/guide/platform/administration/connected-apps.md +18 -2
- 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 +23 -5
- package/docs/guide/platform/installation/maintenance.md +32 -2
- package/docs/guide/platform/installation/setup.md +1 -1
- package/docs/guide/remote-dev.md +2 -0
- package/docs/guide/typed-fetch.md +1 -1
- package/docs/guide/websockets.md +2 -2
- package/docs/index.md +78 -22
- package/docs/integrations/cloudflare.md +1 -1
- package/docs/integrations/frameworks/tanstack-start.md +25 -0
- package/docs/reference/api/deploy.md +35 -3
- package/docs/reference/api/pages.md +7 -5
- package/docs/reference/api.md +2 -0
- package/docs/reference/cli/database.md +22 -5
- package/docs/reference/cli/deploy.md +12 -10
- package/docs/reference/cli/email.md +1 -1
- package/docs/reference/cli/generate.md +1 -1
- package/docs/reference/cli/platform-installation.md +4 -2
- package/docs/reference/cli/project.md +8 -4
- package/docs/reference/cli.md +2 -1
- package/docs/reference/config.md +12 -2
- package/package.json +8 -7
- package/dist/cf-build-output-BU3hqdHu.mjs +0 -1
- package/dist/client-B60PwCC4.mjs +0 -1
- package/dist/collect-Cae8A7Zr.mjs +0 -1
- package/dist/deploy-9lgfhrXS.mjs +0 -2
- package/dist/discover-ClzFSwns.mjs +0 -1
- package/dist/fetch-sAcwjzLO.mjs +0 -18
- package/dist/gen-sXyp5DFO.mjs +0 -1
- package/dist/help-i2YGGnTH.mjs +0 -1
- package/dist/login-XD844Xs-.mjs +0 -1
- package/dist/migrate-BRwU-blY.mjs +0 -1
- package/dist/operator-cmd-D6gnZsnK.mjs +0 -1
- package/dist/platform-args-B0HeTh0C.mjs +0 -1
- package/dist/prepare-CYT6tAzD.mjs +0 -1
- package/dist/r2-conditions-D1Wk8i7b.mjs +0 -30
- package/dist/serialize-BtQyaYoC.mjs +0 -20
- package/dist/serialize-CfSwWfF2.d.mts +0 -10
- package/dist/validate-BQFdf0Pi.mjs +0 -1
package/dist/index.mjs
CHANGED
|
@@ -1,43 +1,43 @@
|
|
|
1
1
|
import { n as __toESM } from "./rolldown-runtime-DXIUcv95.mjs";
|
|
2
|
-
import { a as join, c as resolve, n as dirname, o as normalize, s as relative } from "./dist-ipQi0Q8y.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
3
|
import { t as require_picocolors } from "./picocolors-BTps1_gs.mjs";
|
|
4
|
-
import { d as walk, l as inferBindingsFromSource, m as applyBindingOverrides, n as FRAMEWORK_SCAN_DIRS, t as DEFAULT_SCAN_DIRS, u as staticModuleReferences } from "./plugin-inference-
|
|
5
|
-
import { n as readProjectPaths, t as assertNoRootSourceConventionConflicts } from "./project-paths-
|
|
6
|
-
import { n as loadVoidAuthConfig } from "./config-
|
|
7
|
-
import { c as isNodeTarget, d as readConfig, s as getDatabaseDialect } from "./config-
|
|
4
|
+
import { d as walk, l as inferBindingsFromSource, m as applyBindingOverrides, n as FRAMEWORK_SCAN_DIRS, t as DEFAULT_SCAN_DIRS, u as staticModuleReferences } from "./plugin-inference-Bekzjuqw.mjs";
|
|
5
|
+
import { n as readProjectPaths, t as assertNoRootSourceConventionConflicts } from "./project-paths-DGu_QZ_Q.mjs";
|
|
6
|
+
import { n as loadVoidAuthConfig } from "./config-CyUJzi3q.mjs";
|
|
7
|
+
import { c as isNodeTarget, d as readConfig, s as getDatabaseDialect } from "./config-D26zcdKy.mjs";
|
|
8
8
|
import { i as isMemberExpression, n as isIdentifier, r as isLiteral } from "./ast-CPGPjb0V.mjs";
|
|
9
9
|
import { t as isRouteEnabledForEnvironment } from "./parse-filename-CUbj-1MP.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-
|
|
11
|
-
import { a as validateSsrEntries, n as SSR_SERVER_ENTRY_RELATIVE_PATHS, o as validateSsrEntry, t as SSR_CLIENT_ENTRY_RELATIVE_PATHS } from "./entry-
|
|
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-D7nNmNJb.mjs";
|
|
11
|
+
import { a as validateSsrEntries, n as SSR_SERVER_ENTRY_RELATIVE_PATHS, o as validateSsrEntry, t as SSR_CLIENT_ENTRY_RELATIVE_PATHS } from "./entry-B_0IhV64.mjs";
|
|
12
12
|
import { r as hasEmailHandlers } from "./email-BcjSyAL0.mjs";
|
|
13
|
+
import { i as voidWarn, n as voidError, r as voidLog, t as setShowTimestamp } from "./log-vqY3pqwI.mjs";
|
|
13
14
|
import { t as MagicString } from "./dist-Cegxq8gs.mjs";
|
|
14
|
-
import { i as resolveLayoutIds } from "./scan-
|
|
15
|
+
import { i as resolveLayoutIds } from "./scan-D2-FcLHs.mjs";
|
|
15
16
|
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";
|
|
16
|
-
import {
|
|
17
|
-
import { n as mergeRoutingRules, t as lintRoutingPhases } from "./headers-Di1FsD3e.mjs";
|
|
17
|
+
import { n as mergeRoutingRules, t as lintRoutingPhases } from "./headers-Bi4bOAwp.mjs";
|
|
18
18
|
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 { D as syncWranglerBindings, E as resolveLiveBindingConfig, O as syncWranglerDurableObjects, T as readWranglerWebSocketTombstones, a as LIVE_MIGRATION_TAG, d as ensureWranglerCompatibilityDate, f as ensureWranglerNodejsAlsFlag, g as normalizeWranglerCompatibilityFlags, h as nextDurableObjectMigrationTag, k as syncWranglerWebSockets, m as hasDurableObjectSqliteMigration, p as findBindingNameOwner, u as ensureWranglerCompat, v as readExistingLiveBindingConfig, x as readWranglerCompat } from "./wrangler-
|
|
21
|
-
import { n as writeLocalD1PersistState, t as resolveLocalD1Target } from "./local-d1-
|
|
19
|
+
import { a as restoreCloudflarePreviewPointer, r as materializeCloudflareConfig, s as stashCloudflareDeployPointer } from "./cloudflare-config-rdFOys4X.mjs";
|
|
20
|
+
import { D as syncWranglerBindings, E as resolveLiveBindingConfig, O as syncWranglerDurableObjects, 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 syncWranglerWebSockets, m as hasDurableObjectSqliteMigration, p as findBindingNameOwner, u as ensureWranglerCompat, v as readExistingLiveBindingConfig, x as readWranglerCompat } from "./wrangler-C9XSzrju.mjs";
|
|
21
|
+
import { n as writeLocalD1PersistState, t as resolveLocalD1Target } from "./local-d1-CpaPbd_L.mjs";
|
|
22
22
|
import { n as scopedAccessCredentials } from "./cf-access-BM9G0lhO.mjs";
|
|
23
23
|
import { n as ensurePlatformProxyAccess } from "./cf-access-CWP4avfP.mjs";
|
|
24
24
|
import { a as getApiUrl, c as getToken, o as getProxyUrl } from "./auth-B6iOCjKI.mjs";
|
|
25
|
-
import { m as printSuccess } from "./output-
|
|
26
|
-
import { r as writeFileIfChanged } from "./project-tsconfig-
|
|
27
|
-
import { n as drizzlePlugin, t as generateQueueResolverSource } from "./dispatch-
|
|
25
|
+
import { m as printSuccess } from "./output-CKguMgr7.mjs";
|
|
26
|
+
import { r as writeFileIfChanged } from "./project-tsconfig-Itv1f4WC.mjs";
|
|
27
|
+
import { n as drizzlePlugin, t as generateQueueResolverSource } from "./dispatch-BAbbn3jg.mjs";
|
|
28
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-Rd6j_8vM.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-GRchm5dw.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
34
|
import { t as ASSET_EXTENSIONS } from "./routing-assets-VkrKIbxE.mjs";
|
|
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-
|
|
35
|
+
import { r as selectNativeVersionMetadataBinding, t as CLOUDFLARE_PRESERVE_BINDINGS_BUILD_ENV } from "./version-metadata-B1Bm2wSq.mjs";
|
|
36
|
+
import { f as prerenderPages, n as SEND_EMAIL_BINDING, p as prerenderPagesNode } from "./email-cloudflare-etpKiITL.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-
|
|
38
|
+
import { i as safeJsonStringify } from "./protocol-bAUUkx70.mjs";
|
|
39
|
+
import { n as completeApplicationAnalysis } from "./application-routing-CZH66gXn.mjs";
|
|
40
|
+
import { n as generateVoidAuthDrizzleSchema, t as generateVoidAuthDatabaseModule } from "./drizzle-BQfyvQKX.mjs";
|
|
41
41
|
import { n as generateQueueTypes, t as generateRouteTypes } from "./route-types-BZi26DVS.mjs";
|
|
42
42
|
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
43
|
import module, { builtinModules, createRequire } from "node:module";
|
|
@@ -490,7 +490,7 @@ function readVoidDevCredentials(root) {
|
|
|
490
490
|
*/
|
|
491
491
|
async function runAiSetupPrompt(root, token, apiUrl, server) {
|
|
492
492
|
const { select, text, isCancel, log } = await import("./dist-CfgIkieS.mjs");
|
|
493
|
-
const { PlatformClient } = await import("./client-
|
|
493
|
+
const { PlatformClient } = await import("./client-DAnfyMe9.mjs");
|
|
494
494
|
const { attachSelectedPlatform, writeProjectConfig } = await import("./project-zdB3fs9G.mjs");
|
|
495
495
|
const { inferDefaultSlug } = await import("./resolve-project-PnhzMtY6.mjs");
|
|
496
496
|
const client = new PlatformClient(token, { apiUrl });
|
|
@@ -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-CvuYDD-l.mjs");
|
|
523
523
|
let created;
|
|
524
524
|
try {
|
|
525
525
|
created = await createProjectWithSlugRetry(client, inferDefaultSlug(root), async (defaultSlug) => {
|
|
@@ -1645,9 +1645,9 @@ function writeFrameworkTriggersDispatch(root, devTriggerToken) {
|
|
|
1645
1645
|
/**
|
|
1646
1646
|
* Writes a real file at `<root>/.void/dev-triggers.ts` exporting
|
|
1647
1647
|
* `handleDevTrigger(request, env, ctx)`. We use a real file (not a Vite
|
|
1648
|
-
* virtual module) because Nitro
|
|
1649
|
-
*
|
|
1650
|
-
*
|
|
1648
|
+
* virtual module) because Nitro has its own server bundler that doesn't go
|
|
1649
|
+
* through Vite's plugin pipeline. The framework injection code imports
|
|
1650
|
+
* this path at runtime to dispatch cron and queue handlers
|
|
1651
1651
|
* with the framework adapter's real bindings.
|
|
1652
1652
|
*/
|
|
1653
1653
|
function frameworkTriggersPlugin(root, options) {
|
|
@@ -2041,13 +2041,34 @@ function astroMiddlewareClaims() {
|
|
|
2041
2041
|
return store[ASTRO_MIDDLEWARE_CLAIMS] ??= /* @__PURE__ */ new Map();
|
|
2042
2042
|
}
|
|
2043
2043
|
/**
|
|
2044
|
+
* Whether the Astro app has middleware that Void did not write. Void cannot add its dev trigger
|
|
2045
|
+
* middleware then, so the wrapper around Astro's Cloudflare server entry answers the triggers.
|
|
2046
|
+
*/
|
|
2047
|
+
function hasOwnAstroMiddleware(root) {
|
|
2048
|
+
const middlewarePath = join(root, ASTRO_MIDDLEWARE_RELATIVE);
|
|
2049
|
+
if (existsSync(middlewarePath)) return !astroMiddlewareClaims().has(middlewarePath);
|
|
2050
|
+
return existsSync(join(root, "src", "middleware", "index.ts"));
|
|
2051
|
+
}
|
|
2052
|
+
/** The Worker entry from the app's Cloudflare config, unless it is Astro's server entry. */
|
|
2053
|
+
function customAstroWorkerEntry(root) {
|
|
2054
|
+
let main;
|
|
2055
|
+
try {
|
|
2056
|
+
main = readRootWranglerConfig(root)?.config.main;
|
|
2057
|
+
} catch {
|
|
2058
|
+
return;
|
|
2059
|
+
}
|
|
2060
|
+
return typeof main === "string" && !/^@astrojs\/cloudflare\/entrypoints\/server(?:\.js)?$/.test(main) ? main : void 0;
|
|
2061
|
+
}
|
|
2062
|
+
/**
|
|
2044
2063
|
* Writes a tiny Astro middleware to the user's project so
|
|
2045
2064
|
* `/__void/scheduled` and `/__void/queue` are intercepted inside Astro's
|
|
2046
|
-
* request pipeline, with bindings from `cloudflare:workers`.
|
|
2065
|
+
* request pipeline, with bindings from `cloudflare:workers`. Astro runs
|
|
2066
|
+
* middleware for a custom Worker entry too.
|
|
2047
2067
|
*
|
|
2048
2068
|
* Astro middleware lives at a single discoverable entry, so if the user
|
|
2049
|
-
* already has `src/middleware.ts` we don't overwrite it
|
|
2050
|
-
*
|
|
2069
|
+
* already has `src/middleware.ts` we don't overwrite it. The wrapper around
|
|
2070
|
+
* Astro's Cloudflare server entry answers the triggers then. A custom Worker
|
|
2071
|
+
* entry can skip that server entry, so we warn when the app sets one.
|
|
2051
2072
|
*
|
|
2052
2073
|
* If we wrote the file we remove it when the last dev server using it closes,
|
|
2053
2074
|
* so the user's source tree stays clean. `src/middleware.ts` belongs to the
|
|
@@ -2056,19 +2077,21 @@ function astroMiddlewareClaims() {
|
|
|
2056
2077
|
*/
|
|
2057
2078
|
function astroDevTriggerInjectPlugin(root) {
|
|
2058
2079
|
const middlewarePath = join(root, ASTRO_MIDDLEWARE_RELATIVE);
|
|
2059
|
-
const middlewareDirIndexPath = join(root, "src", "middleware", "index.ts");
|
|
2060
2080
|
const claims = astroMiddlewareClaims();
|
|
2061
2081
|
/** Whether the dev server being set up now holds the middleware Void wrote. */
|
|
2062
2082
|
const ensureFile = () => {
|
|
2083
|
+
if (hasOwnAstroMiddleware(root)) {
|
|
2084
|
+
const entry = customAstroWorkerEntry(root);
|
|
2085
|
+
if (entry) voidWarn(`Your Astro app has its own middleware and its own Worker entry (${entry}).\n In dev, /__void/scheduled and /__void/queue do not work if this entry calls
|
|
2086
|
+
handle() from @astrojs/cloudflare/handler. To use them, call fetch() on the
|
|
2087
|
+
default export of @astrojs/cloudflare/entrypoints/server instead.`);
|
|
2088
|
+
return false;
|
|
2089
|
+
}
|
|
2063
2090
|
const claim = claims.get(middlewarePath);
|
|
2064
2091
|
if (claim && existsSync(middlewarePath)) {
|
|
2065
2092
|
claim.servers++;
|
|
2066
2093
|
return true;
|
|
2067
2094
|
}
|
|
2068
|
-
if (existsSync(middlewarePath) || existsSync(middlewareDirIndexPath)) {
|
|
2069
|
-
voidWarn("Astro middleware already exists. To enable /__void/scheduled and /__void/queue,\n add the Void dev-trigger middleware to your existing onRequest sequence.\n See https://void.cloud/guide/jobs#local-development.");
|
|
2070
|
-
return false;
|
|
2071
|
-
}
|
|
2072
2095
|
mkdirSync(dirname(middlewarePath), { recursive: true });
|
|
2073
2096
|
writeFileSync(middlewarePath, astroMiddlewareSource(frameworkTriggersDispatchPath(root)));
|
|
2074
2097
|
if (claim) claim.servers++;
|
|
@@ -2104,7 +2127,7 @@ function astroDevTriggerInjectPlugin(root) {
|
|
|
2104
2127
|
}
|
|
2105
2128
|
//#endregion
|
|
2106
2129
|
//#region src/router/compile.ts
|
|
2107
|
-
const
|
|
2130
|
+
const FETCH_SERVER_PATH = fileURLToPath(import.meta.resolve("#self/runtime/fetch-server"));
|
|
2108
2131
|
const ROUTING_RUNTIME_PATH = fileURLToPath(import.meta.resolve("#self/runtime/routing"));
|
|
2109
2132
|
function pushDefaultErrorPageHelpers(lines, options) {
|
|
2110
2133
|
lines.push(`const __errorRenderer = __createErrorRenderer(${JSON.stringify({
|
|
@@ -2873,68 +2896,17 @@ function compileHeaderMiddleware(lines, rules) {
|
|
|
2873
2896
|
/** Generate the server-side fetch client, which calls `app.fetch()` with the current request's credentials. */
|
|
2874
2897
|
function compileWorkerClient(authClientPath, nodeTarget = false) {
|
|
2875
2898
|
const envImport = nodeTarget ? "" : "import { env } from \"cloudflare:workers\";\n";
|
|
2876
|
-
const dispatch = nodeTarget ? "
|
|
2899
|
+
const dispatch = nodeTarget ? "app.fetch(request)" : "app.fetch(request, env, store?.executionCtx ?? { waitUntil() {}, passThroughOnException() {} })";
|
|
2877
2900
|
return `import app, { requestContext } from "virtual:void-routes";
|
|
2878
|
-
import {
|
|
2901
|
+
import { createServerFetch } from ${JSON.stringify(FETCH_SERVER_PATH)};
|
|
2902
|
+
export { FetchError } from ${JSON.stringify(FETCH_SERVER_PATH)};
|
|
2879
2903
|
${envImport}export { auth, createAuthClient } from ${JSON.stringify(authClientPath)};
|
|
2880
2904
|
|
|
2881
|
-
export
|
|
2882
|
-
|
|
2883
|
-
|
|
2884
|
-
|
|
2885
|
-
|
|
2886
|
-
this.statusText = statusText;
|
|
2887
|
-
this.data = data;
|
|
2888
|
-
}
|
|
2889
|
-
}
|
|
2890
|
-
|
|
2891
|
-
export async function fetch(path, options) {
|
|
2892
|
-
let url = interpolateRouteParams(path, options?.params);
|
|
2893
|
-
|
|
2894
|
-
if (options?.query) {
|
|
2895
|
-
const qs = new URLSearchParams(options.query).toString();
|
|
2896
|
-
if (qs) url += "?" + qs;
|
|
2897
|
-
}
|
|
2898
|
-
|
|
2899
|
-
const method = options?.method ?? "GET";
|
|
2900
|
-
const headers = new Headers(options?.headers);
|
|
2901
|
-
|
|
2902
|
-
const store = requestContext.getStore();
|
|
2903
|
-
if (store?.request) {
|
|
2904
|
-
const outerReq = store.request;
|
|
2905
|
-
if (!headers.has("cookie")) {
|
|
2906
|
-
const cookie = outerReq.headers.get("cookie");
|
|
2907
|
-
if (cookie) headers.set("cookie", cookie);
|
|
2908
|
-
}
|
|
2909
|
-
if (!headers.has("authorization")) {
|
|
2910
|
-
const auth = outerReq.headers.get("authorization");
|
|
2911
|
-
if (auth) headers.set("authorization", auth);
|
|
2912
|
-
}
|
|
2913
|
-
}
|
|
2914
|
-
|
|
2915
|
-
if (options?.body != null && !headers.has("content-type")) {
|
|
2916
|
-
headers.set("content-type", "application/json");
|
|
2917
|
-
}
|
|
2918
|
-
|
|
2919
|
-
const request = new Request("${nodeTarget ? "http://localhost" : "http://worker.local"}" + url, {
|
|
2920
|
-
method,
|
|
2921
|
-
headers,
|
|
2922
|
-
body: options?.body != null ? JSON.stringify(options.body) : undefined,
|
|
2923
|
-
});
|
|
2924
|
-
|
|
2925
|
-
${dispatch}
|
|
2926
|
-
|
|
2927
|
-
if (response.status === 204) return undefined;
|
|
2928
|
-
|
|
2929
|
-
const contentType = response.headers.get("content-type") ?? "";
|
|
2930
|
-
const data = contentType.includes("application/json") ? await response.json() : await response.text();
|
|
2931
|
-
|
|
2932
|
-
if (!response.ok) {
|
|
2933
|
-
throw new FetchError(response.status, response.statusText, data);
|
|
2934
|
-
}
|
|
2935
|
-
|
|
2936
|
-
return data;
|
|
2937
|
-
}
|
|
2905
|
+
export const fetch = createServerFetch(
|
|
2906
|
+
(request, store) => ${dispatch},
|
|
2907
|
+
() => requestContext.getStore(),
|
|
2908
|
+
"${nodeTarget ? "http://localhost" : "http://worker.local"}",
|
|
2909
|
+
);
|
|
2938
2910
|
`;
|
|
2939
2911
|
}
|
|
2940
2912
|
//#endregion
|
|
@@ -2947,15 +2919,32 @@ export async function fetch(path, options) {
|
|
|
2947
2919
|
* (see `generateClassATriggerWrapper`). Production deploys go through
|
|
2948
2920
|
* `cli/wrapper.ts` instead.
|
|
2949
2921
|
*/
|
|
2950
|
-
function getFrameworkEntry(framework, root, devTriggerToken, dialect, notFound) {
|
|
2922
|
+
function getFrameworkEntry(framework, root, devTriggerToken, dialect, notFound, configuredMain) {
|
|
2951
2923
|
const isBuild = isViteBuildOrPreview();
|
|
2952
2924
|
if (!isBuild) writeFrameworkTriggersDispatch(root, devTriggerToken);
|
|
2953
|
-
return generateClassATriggerWrapper(root, framework, getOriginalFrameworkEntry(framework, root), isBuild, dialect, void 0, notFound);
|
|
2925
|
+
return generateClassATriggerWrapper(root, framework, getOriginalFrameworkEntry(framework, root, configuredMain), isBuild, dialect, void 0, notFound);
|
|
2926
|
+
}
|
|
2927
|
+
const TANSTACK_SERVER_ENTRY = "@tanstack/react-start/server-entry";
|
|
2928
|
+
/**
|
|
2929
|
+
* Whether `main` names a file in the app rather than a package. A migrated TanStack config keeps
|
|
2930
|
+
* `main: "@tanstack/react-start/server-entry"`, and a package subpath may end in `.js`, so a
|
|
2931
|
+
* bare name counts as a file only when it exists in the app.
|
|
2932
|
+
*/
|
|
2933
|
+
function isFileEntry(root, main) {
|
|
2934
|
+
if (main.startsWith(".") || isAbsolute(main)) return true;
|
|
2935
|
+
return statSync(resolve(root, main), { throwIfNoEntry: false })?.isFile() === true;
|
|
2954
2936
|
}
|
|
2955
2937
|
/** The framework's own server entry, before our trigger wrapper. */
|
|
2956
|
-
function getOriginalFrameworkEntry(framework, root) {
|
|
2938
|
+
function getOriginalFrameworkEntry(framework, root, configuredMain) {
|
|
2957
2939
|
switch (framework) {
|
|
2958
|
-
case "tanstack-start":
|
|
2940
|
+
case "tanstack-start": {
|
|
2941
|
+
if (configuredMain === void 0 || configuredMain === TANSTACK_SERVER_ENTRY || configuredMain === `${TANSTACK_SERVER_ENTRY}.js`) return TANSTACK_SERVER_ENTRY;
|
|
2942
|
+
if (typeof configuredMain !== "string" || configuredMain.trim() === "") throw new Error("config: cloudflare.main must be a non-empty Worker entry path.");
|
|
2943
|
+
if (!isFileEntry(root, configuredMain)) return configuredMain;
|
|
2944
|
+
const original = resolve(root, configuredMain);
|
|
2945
|
+
if (original === resolve(root, ".void", "tanstack-start-trigger-wrapper.ts")) throw new Error("config: cloudflare.main cannot point to Void's generated framework wrapper.");
|
|
2946
|
+
return original;
|
|
2947
|
+
}
|
|
2959
2948
|
case "react-router": return generateReactRouterEntry(root);
|
|
2960
2949
|
case "vinext-app": return "vinext/server/app-router-entry";
|
|
2961
2950
|
case "vinext-pages": return generateVinextPagesEntry(root);
|
|
@@ -3007,6 +2996,7 @@ ${fetchBody}
|
|
|
3007
2996
|
},`;
|
|
3008
2997
|
const body = `// @ts-nocheck — Auto-generated by Void ${isBuild ? "for vite build" : "in dev"}. Do NOT edit.
|
|
3009
2998
|
import original from ${JSON.stringify(original)};
|
|
2999
|
+
export * from ${JSON.stringify(original)};
|
|
3010
3000
|
${scoped ? "import { withRuntimeEnv } from \"void/_env\";\n" : ""}
|
|
3011
3001
|
export default {
|
|
3012
3002
|
...original,
|
|
@@ -3262,9 +3252,12 @@ function findDependencyClosure(name, fromDir) {
|
|
|
3262
3252
|
function readDatabaseUrl(root) {
|
|
3263
3253
|
return loadLocalEnv(root).DATABASE_URL;
|
|
3264
3254
|
}
|
|
3265
|
-
/**
|
|
3255
|
+
/**
|
|
3256
|
+
* DATABASE_URL as Better Auth's local migrations read it: the shell before `.env`. An empty
|
|
3257
|
+
* shell value counts as unset.
|
|
3258
|
+
*/
|
|
3266
3259
|
function readAuthDatabaseUrl(root) {
|
|
3267
|
-
return
|
|
3260
|
+
return process.env.DATABASE_URL || readDatabaseUrl(root) || void 0;
|
|
3268
3261
|
}
|
|
3269
3262
|
/**
|
|
3270
3263
|
* Vite plugin that runs local migrations on dev server startup.
|
|
@@ -3276,25 +3269,32 @@ function migrationPlugin(root, dialect, databaseId = "local", persistRoot = join
|
|
|
3276
3269
|
name: "void:migrations",
|
|
3277
3270
|
apply: "serve",
|
|
3278
3271
|
async configureServer(server) {
|
|
3279
|
-
const
|
|
3272
|
+
const paths = readProjectPaths(root);
|
|
3273
|
+
const migrationsDir = paths.migrationsDir;
|
|
3280
3274
|
const hasSqlMigrations = existsSync(migrationsDir);
|
|
3281
3275
|
if (!hasSqlMigrations && !auth?.enabled) return;
|
|
3282
3276
|
const migrateAuth = async (databaseUrl) => {
|
|
3283
|
-
const { runLocalVoidAuthMigrations } = await import("./node-
|
|
3277
|
+
const { runLocalVoidAuthMigrations } = await import("./node-uN8_zxJr.mjs");
|
|
3284
3278
|
await runLocalVoidAuthMigrations(root, dialect, persistRoot, databaseId, auth?.configPath, databaseUrl);
|
|
3285
3279
|
};
|
|
3286
3280
|
const mysqlAuth = dialect === "mysql" && auth?.enabled === true;
|
|
3287
3281
|
const logApplied = (applied) => {
|
|
3288
3282
|
if (applied.length > 0) voidLog(`Applied ${applied.length} migration(s): ${applied.join(", ")}`);
|
|
3289
3283
|
};
|
|
3284
|
+
const refuse = (err) => {
|
|
3285
|
+
afterServerReady(server, () => {
|
|
3286
|
+
console.log();
|
|
3287
|
+
voidError(`${err instanceof Error ? err.message : String(err)}\nNo migrations were applied. Fix the files, then restart the dev server.`);
|
|
3288
|
+
});
|
|
3289
|
+
};
|
|
3290
3290
|
try {
|
|
3291
3291
|
if (dialect !== "sqlite") {
|
|
3292
|
-
const { collectMigrations } = await import("./collect-
|
|
3292
|
+
const { collectMigrations } = await import("./collect-BWhkgtAn.mjs");
|
|
3293
3293
|
const allMigrations = collectMigrations(migrationsDir);
|
|
3294
3294
|
const runFiles = dialect === "mysql" ? allMigrations.length > 0 : hasSqlMigrations;
|
|
3295
3295
|
const url = runFiles ? readDatabaseUrl(root) : void 0;
|
|
3296
3296
|
const authUrl = mysqlAuth ? readAuthDatabaseUrl(root) : void 0;
|
|
3297
|
-
if (runFiles && !url ||
|
|
3297
|
+
if (runFiles && !url || auth?.enabled && !readAuthDatabaseUrl(root)) {
|
|
3298
3298
|
afterServerReady(server, () => {
|
|
3299
3299
|
console.log();
|
|
3300
3300
|
voidError(`DATABASE_URL not found in .env — skipping ${dialect === "mysql" ? "MySQL" : "PostgreSQL"} migrations.`);
|
|
@@ -3303,29 +3303,30 @@ function migrationPlugin(root, dialect, databaseId = "local", persistRoot = join
|
|
|
3303
3303
|
}
|
|
3304
3304
|
const authWithFiles = authUrl !== void 0 && authUrl === url;
|
|
3305
3305
|
if (url) {
|
|
3306
|
-
const { validateMigrations } = await import("./validate-
|
|
3307
|
-
const appliedNames = dialect === "mysql" ? await import("./runner-mysql-
|
|
3306
|
+
const { validateMigrations } = await import("./validate-D7Wn8PUX.mjs");
|
|
3307
|
+
const appliedNames = dialect === "mysql" ? await import("./runner-mysql-BcHnLUuM.mjs").then((runner) => runner.getMySqlAppliedMigrations(url)) : await import("./runner-pg-Cgp-cr_p.mjs").then((runner) => runner.getPgAppliedMigrations(url));
|
|
3308
3308
|
const appliedSet = new Set(appliedNames);
|
|
3309
3309
|
const pending = allMigrations.filter((migration) => !appliedSet.has(migration.name));
|
|
3310
3310
|
if (pending.length > 0) try {
|
|
3311
3311
|
validateMigrations(pending);
|
|
3312
3312
|
} catch (err) {
|
|
3313
|
-
|
|
3313
|
+
refuse(err);
|
|
3314
|
+
return;
|
|
3314
3315
|
}
|
|
3315
|
-
const applied = dialect === "mysql" ? await import("./runner-mysql-
|
|
3316
|
+
const applied = dialect === "mysql" ? await import("./runner-mysql-BcHnLUuM.mjs").then((runner) => runner.runMySqlMigrations(migrationsDir, url, authWithFiles ? async (names) => {
|
|
3316
3317
|
logApplied(names);
|
|
3317
3318
|
await migrateAuth(url);
|
|
3318
|
-
} : void 0)) : await import("./runner-pg-
|
|
3319
|
+
} : void 0)) : await import("./runner-pg-Cgp-cr_p.mjs").then((runner) => runner.runPgMigrations(migrationsDir, url));
|
|
3319
3320
|
if (!authWithFiles) logApplied(applied);
|
|
3320
3321
|
}
|
|
3321
3322
|
if (authUrl && !authWithFiles) {
|
|
3322
|
-
const { withMySqlMigrationLockAt } = await import("./runner-mysql-
|
|
3323
|
+
const { withMySqlMigrationLockAt } = await import("./runner-mysql-BcHnLUuM.mjs");
|
|
3323
3324
|
await withMySqlMigrationLockAt(authUrl, () => migrateAuth(authUrl));
|
|
3324
3325
|
}
|
|
3325
3326
|
} else if (hasSqlMigrations) {
|
|
3326
|
-
const { runMigrations, getMiniflareDatabasePath, getAppliedMigrations } = await import("./runner-
|
|
3327
|
-
const { collectMigrations } = await import("./collect-
|
|
3328
|
-
const { validateMigrations } = await import("./validate-
|
|
3327
|
+
const { runMigrations, getMiniflareDatabasePath, getAppliedMigrations } = await import("./runner-WCdfeI0q.mjs");
|
|
3328
|
+
const { collectMigrations } = await import("./collect-BWhkgtAn.mjs");
|
|
3329
|
+
const { validateMigrations } = await import("./validate-D7Wn8PUX.mjs");
|
|
3329
3330
|
const dbPath = getMiniflareDatabasePath(persistRoot, databaseId);
|
|
3330
3331
|
const allMigrations = collectMigrations(migrationsDir);
|
|
3331
3332
|
const appliedRows = await getAppliedMigrations(dbPath);
|
|
@@ -3334,9 +3335,10 @@ function migrationPlugin(root, dialect, databaseId = "local", persistRoot = join
|
|
|
3334
3335
|
if (pending.length > 0) try {
|
|
3335
3336
|
validateMigrations(pending);
|
|
3336
3337
|
} catch (err) {
|
|
3337
|
-
|
|
3338
|
+
refuse(err);
|
|
3339
|
+
return;
|
|
3338
3340
|
}
|
|
3339
|
-
const applied = await runMigrations(migrationsDir, dbPath);
|
|
3341
|
+
const applied = await runMigrations(migrationsDir, dbPath, paths.sourceRelative);
|
|
3340
3342
|
if (applied.length > 0) voidLog(`Applied ${applied.length} migration(s): ${applied.join(", ")}`);
|
|
3341
3343
|
}
|
|
3342
3344
|
if (auth?.enabled) {
|
|
@@ -3631,27 +3633,38 @@ function createFrameworkPlugins(input) {
|
|
|
3631
3633
|
return injectSvelteKitHooks(code, id, frameworkTriggersDispatchPath(root));
|
|
3632
3634
|
}
|
|
3633
3635
|
};
|
|
3634
|
-
const
|
|
3635
|
-
|
|
3636
|
+
const scopeAstroRequests = dialect !== "sqlite";
|
|
3637
|
+
let astroDevTriggers = false;
|
|
3638
|
+
const astroServerEntryPlugin = detected.name === "astro" ? {
|
|
3639
|
+
name: "void:astro-server-entry",
|
|
3636
3640
|
enforce: "pre",
|
|
3641
|
+
configResolved(resolvedConfig) {
|
|
3642
|
+
astroDevTriggers = resolvedConfig.command === "serve" && hasOwnAstroMiddleware(root);
|
|
3643
|
+
},
|
|
3637
3644
|
resolveId: {
|
|
3638
3645
|
filter: { id: /^@astrojs\/cloudflare\/entrypoints\/server(?:\.js)?$/ },
|
|
3639
3646
|
handler(_id, importer) {
|
|
3640
|
-
if (importer === ASTRO_SCOPED_SERVER_ENTRY || this.environment?.name === "client") return;
|
|
3647
|
+
if (!scopeAstroRequests && !astroDevTriggers || importer === ASTRO_SCOPED_SERVER_ENTRY || this.environment?.name === "client") return;
|
|
3641
3648
|
return ASTRO_SCOPED_SERVER_ENTRY;
|
|
3642
3649
|
}
|
|
3643
3650
|
},
|
|
3644
3651
|
load: {
|
|
3645
3652
|
filter: { id: /^\0void:astro-server-entry$/ },
|
|
3646
3653
|
handler() {
|
|
3647
|
-
|
|
3648
|
-
import
|
|
3654
|
+
const imports = [
|
|
3655
|
+
`import original from ${JSON.stringify(ASTRO_SERVER_ENTRY)};`,
|
|
3656
|
+
...scopeAstroRequests ? [`import { withRuntimeEnv } from ${JSON.stringify(envModuleFile)};`] : [],
|
|
3657
|
+
...astroDevTriggers ? [`import { handleDevTrigger } from ${JSON.stringify(frameworkTriggersDispatchPath(root))};`] : []
|
|
3658
|
+
];
|
|
3659
|
+
const handle = astroDevTriggers ? "async () => (await handleDevTrigger(request, env, ctx)) ?? original.fetch(request, env, ctx)" : "() => original.fetch(request, env, ctx)";
|
|
3660
|
+
return `${imports.join("\n")}
|
|
3649
3661
|
export * from ${JSON.stringify(ASTRO_SERVER_ENTRY)};
|
|
3650
3662
|
|
|
3651
3663
|
export default {
|
|
3652
3664
|
...original,
|
|
3653
3665
|
fetch(request, env, ctx) {
|
|
3654
|
-
|
|
3666
|
+
const handle = ${handle};
|
|
3667
|
+
return ${scopeAstroRequests ? "withRuntimeEnv(env, handle)" : "handle()"};
|
|
3655
3668
|
},
|
|
3656
3669
|
};
|
|
3657
3670
|
`;
|
|
@@ -3694,7 +3707,7 @@ export default {
|
|
|
3694
3707
|
wranglerCompatPlugin,
|
|
3695
3708
|
wranglerSyncPlugin,
|
|
3696
3709
|
...nuxtVite8WebSocketCompatPlugin ? [nuxtVite8WebSocketCompatPlugin] : [],
|
|
3697
|
-
...
|
|
3710
|
+
...astroServerEntryPlugin ? [astroServerEntryPlugin] : [],
|
|
3698
3711
|
svelteKitHooksInjectPlugin,
|
|
3699
3712
|
...svelteKitWorkerBuildPlugin ? [svelteKitWorkerBuildPlugin] : [],
|
|
3700
3713
|
clientStubsPlugin,
|
|
@@ -4456,7 +4469,7 @@ function routingPlugin(root, options) {
|
|
|
4456
4469
|
if (!options.target) {
|
|
4457
4470
|
const migrationsDir = paths.migrationsDir;
|
|
4458
4471
|
if (existsSync(migrationsDir) || compileOptions.auth) {
|
|
4459
|
-
const { collectMigrations } = await import("./collect-
|
|
4472
|
+
const { collectMigrations } = await import("./collect-BWhkgtAn.mjs");
|
|
4460
4473
|
const { buildMigrationPlanBundle } = await import("./plan-CKX_jWnD.mjs");
|
|
4461
4474
|
const migrations = existsSync(migrationsDir) ? collectMigrations(migrationsDir) : [];
|
|
4462
4475
|
const dialect = getDatabaseDialect(readConfig(root));
|
|
@@ -5163,7 +5176,7 @@ function voidPlugin(options) {
|
|
|
5163
5176
|
}
|
|
5164
5177
|
};
|
|
5165
5178
|
if (framework) {
|
|
5166
|
-
workerConfig.main = getFrameworkEntry(framework, root, devTriggerToken, dialect, config.routing?.notFound);
|
|
5179
|
+
workerConfig.main = getFrameworkEntry(framework, root, devTriggerToken, dialect, config.routing?.notFound, config.cloudflare?.main);
|
|
5167
5180
|
let notFoundIgnoredWarned = false;
|
|
5168
5181
|
const frameworkBuildWrapperPlugin = {
|
|
5169
5182
|
name: "void:framework-build-wrapper",
|
|
@@ -5173,7 +5186,7 @@ function voidPlugin(options) {
|
|
|
5173
5186
|
notFoundIgnoredWarned = true;
|
|
5174
5187
|
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.`);
|
|
5175
5188
|
}
|
|
5176
|
-
generateClassATriggerWrapper(root, framework, getOriginalFrameworkEntry(framework, root), true, dialect, resolved.build.assetsDir, config.routing?.notFound);
|
|
5189
|
+
generateClassATriggerWrapper(root, framework, getOriginalFrameworkEntry(framework, root, config.cloudflare?.main), true, dialect, resolved.build.assetsDir, config.routing?.notFound);
|
|
5177
5190
|
}
|
|
5178
5191
|
};
|
|
5179
5192
|
const existingFlags = workerConfig.compatibility_flags ?? [];
|
|
@@ -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 { d as readConfig } from "./config-
|
|
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-Bekzjuqw.mjs";
|
|
3
|
+
import { d as readConfig } from "./config-D26zcdKy.mjs";
|
|
4
|
+
import { d as deriveDurableResourceIdentity, f as inferDurableResourceName, t as analyzeApplicationSync } from "./application-analysis-D7nNmNJb.mjs";
|
|
5
|
+
import { n as VOID_LOCK_FILE } from "./cloudflare-config-rdFOys4X.mjs";
|
|
6
6
|
import { existsSync, readFileSync } from "node:fs";
|
|
7
7
|
import { isRecord } from "@void/deploy-core";
|
|
8
8
|
//#region src/cli/info.ts
|
|
@@ -1,28 +1,28 @@
|
|
|
1
1
|
import { a as join, c as resolve, i as isAbsolute, n as dirname, s as relative, t as basename } from "./dist-ipQi0Q8y.mjs";
|
|
2
|
-
import { r as detectFramework } from "./plugin-inference-
|
|
3
|
-
import { n as readProjectPaths, o as TYPED_CONFIG_FILE } from "./project-paths-
|
|
4
|
-
import { d as readConfig, s as getDatabaseDialect } from "./config-
|
|
2
|
+
import { r as detectFramework } from "./plugin-inference-Bekzjuqw.mjs";
|
|
3
|
+
import { n as readProjectPaths, o as TYPED_CONFIG_FILE } from "./project-paths-DGu_QZ_Q.mjs";
|
|
4
|
+
import { d as readConfig, s as getDatabaseDialect } from "./config-D26zcdKy.mjs";
|
|
5
5
|
import { t as MagicString } from "./dist-Cegxq8gs.mjs";
|
|
6
6
|
import { c as writeDeploymentPlatform, n as readDeploymentPlatform, r as readProjectConfig, t as attachSelectedPlatform, u as writeProjectConfig } from "./project-rqDnVsJN.mjs";
|
|
7
|
-
import { r as materializeCloudflareConfig } from "./cloudflare-config-
|
|
8
|
-
import { i as LATEST_KNOWN_COMPAT_DATE, j as writeProvisionedWranglerConfig } from "./wrangler-
|
|
7
|
+
import { r as materializeCloudflareConfig } from "./cloudflare-config-rdFOys4X.mjs";
|
|
8
|
+
import { i as LATEST_KNOWN_COMPAT_DATE, j as writeProvisionedWranglerConfig } from "./wrangler-C9XSzrju.mjs";
|
|
9
9
|
import { i as readPackageJson, n as hasPackageDependency } from "./package-json-BjYqR-So.mjs";
|
|
10
10
|
import { c as getToken } from "./auth-B6iOCjKI.mjs";
|
|
11
11
|
import { A as confirm, K as select, L as log, O as cancel, X as text, tt as isCancel } from "./dist-BVdsO7Py.mjs";
|
|
12
|
-
import { l as formatUrl, m as printSuccess, p as note } from "./output-
|
|
13
|
-
import { n as ensureProjectTsconfig, t as createProjectTsconfig } from "./project-tsconfig-
|
|
12
|
+
import { l as formatUrl, m as printSuccess, p as note } from "./output-CKguMgr7.mjs";
|
|
13
|
+
import { n as ensureProjectTsconfig, t as createProjectTsconfig } from "./project-tsconfig-Itv1f4WC.mjs";
|
|
14
14
|
import { t as parseDotenvFile } from "./dotenv-CNazY3-w.mjs";
|
|
15
|
-
import { r as writeDrizzleConfig, t as PLACEHOLDER_DB_URL } from "./config-
|
|
15
|
+
import { r as writeDrizzleConfig, t as PLACEHOLDER_DB_URL } from "./config-DC5llZaI.mjs";
|
|
16
16
|
import { n as getOwnVersion, r as getPackageDir, t as detectAgents } from "./agents-CuNtT0D_.mjs";
|
|
17
|
-
import { r as PlatformClient } from "./client-
|
|
18
|
-
import { a as promptProjectSelection, r as promptAndCreateProject } from "./create-project-
|
|
19
|
-
import { s as formatProjectCommand } from "./cloudflare-process-
|
|
17
|
+
import { r as PlatformClient } from "./client-BdzxubTS.mjs";
|
|
18
|
+
import { a as promptProjectSelection, r as promptAndCreateProject } from "./create-project-D8jQTwVQ.mjs";
|
|
19
|
+
import { s as formatProjectCommand } from "./cloudflare-process-CZJ4viYl.mjs";
|
|
20
20
|
import { i as hasLocalLockfile, n as drizzleKitBin, r as findInstalledYarnPnpRuntime, t as buildDrizzleKitSpawnEnv } from "./yarn-pnp-DLbEFMT0.mjs";
|
|
21
|
-
import { t as promptForLoginToken } from "./login-
|
|
22
|
-
import { i as saveDiscoveredPlatform, t as discoverPlatform } from "./platform-cmd-
|
|
23
|
-
import { t as connectCloudflare } from "./cloudflare-connect-
|
|
24
|
-
import { n as snapshotDrizzleOutputs } from "./generate-
|
|
25
|
-
import { i as writeVoidProjectConfig, o as migrateFrameworkAdapterPaths, r as canRewriteVoidProjectConfig, t as migrateLegacyVoidConfig } from "./migrate-
|
|
21
|
+
import { t as promptForLoginToken } from "./login-f2eu2TQh.mjs";
|
|
22
|
+
import { i as saveDiscoveredPlatform, t as discoverPlatform } from "./platform-cmd-CX7phm7V.mjs";
|
|
23
|
+
import { t as connectCloudflare } from "./cloudflare-connect-BN-k2kD-.mjs";
|
|
24
|
+
import { n as snapshotDrizzleOutputs } from "./generate-B1m4Cm4n.mjs";
|
|
25
|
+
import { i as writeVoidProjectConfig, o as migrateFrameworkAdapterPaths, r as canRewriteVoidProjectConfig, t as migrateLegacyVoidConfig } from "./migrate-DYfdWBXt.mjs";
|
|
26
26
|
import { createRequire } from "node:module";
|
|
27
27
|
import { existsSync, mkdirSync, readFileSync, readdirSync, writeFileSync } from "node:fs";
|
|
28
28
|
import { parseSync } from "vite";
|
|
@@ -2318,15 +2318,27 @@ function setupExistingProject(root, framework) {
|
|
|
2318
2318
|
ensureExistingProjectViteConfig(root, framework);
|
|
2319
2319
|
return dependencyAdded;
|
|
2320
2320
|
}
|
|
2321
|
-
/**
|
|
2322
|
-
|
|
2323
|
-
|
|
2324
|
-
|
|
2325
|
-
|
|
2326
|
-
|
|
2327
|
-
|
|
2328
|
-
|
|
2329
|
-
|
|
2321
|
+
/** The demo `posts` table for the database dialect that init configured. */
|
|
2322
|
+
function demoSchemaSource(dialect) {
|
|
2323
|
+
if (dialect === "postgresql") return `import { pgTable, serial, text, timestamp } from "void/schema-pg";
|
|
2324
|
+
|
|
2325
|
+
export const posts = pgTable("posts", {
|
|
2326
|
+
id: serial("id").primaryKey(),
|
|
2327
|
+
title: text("title").notNull(),
|
|
2328
|
+
body: text("body").notNull(),
|
|
2329
|
+
createdAt: timestamp("created_at").notNull().defaultNow(),
|
|
2330
|
+
});
|
|
2331
|
+
`;
|
|
2332
|
+
if (dialect === "mysql") return `import { int, mysqlTable, text, timestamp } from "void/schema-mysql";
|
|
2333
|
+
|
|
2334
|
+
export const posts = mysqlTable("posts", {
|
|
2335
|
+
id: int("id").autoincrement().primaryKey(),
|
|
2336
|
+
title: text("title").notNull(),
|
|
2337
|
+
body: text("body").notNull(),
|
|
2338
|
+
createdAt: timestamp("created_at").notNull().defaultNow(),
|
|
2339
|
+
});
|
|
2340
|
+
`;
|
|
2341
|
+
return `import { sql } from "void/db";
|
|
2330
2342
|
import { integer, sqliteTable, text } from "void/schema-d1";
|
|
2331
2343
|
|
|
2332
2344
|
export const posts = sqliteTable("posts", {
|
|
@@ -2335,7 +2347,17 @@ export const posts = sqliteTable("posts", {
|
|
|
2335
2347
|
body: text("body").notNull(),
|
|
2336
2348
|
createdAt: text("created_at").notNull().default(sql\`(datetime('now'))\`),
|
|
2337
2349
|
});
|
|
2338
|
-
|
|
2350
|
+
`;
|
|
2351
|
+
}
|
|
2352
|
+
/**
|
|
2353
|
+
* Scaffolds the "SQL → types → handler → fetch" demo into an existing project.
|
|
2354
|
+
* `setupExistingProject` has already declared `void` in `package.json`.
|
|
2355
|
+
*/
|
|
2356
|
+
function scaffoldDemo(root, dialect) {
|
|
2357
|
+
const devCommand = getDevCommand(root);
|
|
2358
|
+
const paths = readProjectPaths(root);
|
|
2359
|
+
mkdirSync(paths.dbDir, { recursive: true });
|
|
2360
|
+
writeFileSync(paths.schemaFile, demoSchemaSource(dialect));
|
|
2339
2361
|
log.step("Created db/schema.ts");
|
|
2340
2362
|
mkdirSync(join(paths.routesDir, "api"), { recursive: true });
|
|
2341
2363
|
writeFileSync(join(paths.routesDir, "api", "posts.ts"), `import { defineHandler } from "void";
|
|
@@ -2495,14 +2517,15 @@ async function runInitCommand(root, initArgs) {
|
|
|
2495
2517
|
process.exit(0);
|
|
2496
2518
|
}
|
|
2497
2519
|
if (scaffold) {
|
|
2498
|
-
|
|
2520
|
+
const demoDialect = getDatabaseDialect(readConfig(root));
|
|
2521
|
+
scaffoldDemo(root, demoDialect);
|
|
2499
2522
|
const voidResolvable = isVoidResolvableFrom(root);
|
|
2500
2523
|
const deferral = resolveWorkspaceDeferral(root, readPackageJson(root));
|
|
2501
2524
|
if (deferral && !voidResolvable) {
|
|
2502
2525
|
const relRoot = relative(deferral.workspaceRoot, root) || ".";
|
|
2503
2526
|
note(`Scaffolded the starter demo in ./${relRoot}.\n\nRun your workspace install from ${deferral.workspaceRoot} to pick up the new \`void\` dep,\nthen run \`void db generate\` from ./${relRoot} to create the initial migration.`, "Workspace subpackage");
|
|
2504
2527
|
}
|
|
2505
|
-
scaffoldedStarterMode =
|
|
2528
|
+
scaffoldedStarterMode = demoDialect;
|
|
2506
2529
|
}
|
|
2507
2530
|
}
|
|
2508
2531
|
}
|
|
@@ -1,9 +1,9 @@
|
|
|
1
1
|
import { r as readProjectConfig, t as attachSelectedPlatform, u as writeProjectConfig } from "./project-rqDnVsJN.mjs";
|
|
2
2
|
import { c as getToken, s as getSiteDomain } from "./auth-B6iOCjKI.mjs";
|
|
3
3
|
import { H as outro, L as log, O as cancel } from "./dist-BVdsO7Py.mjs";
|
|
4
|
-
import { f as import_picocolors, m as printSuccess } from "./output-
|
|
5
|
-
import { r as PlatformClient } from "./client-
|
|
6
|
-
import { a as promptProjectSelection, r as promptAndCreateProject } from "./create-project-
|
|
4
|
+
import { f as import_picocolors, m as printSuccess } from "./output-CKguMgr7.mjs";
|
|
5
|
+
import { r as PlatformClient } from "./client-BdzxubTS.mjs";
|
|
6
|
+
import { a as promptProjectSelection, r as promptAndCreateProject } from "./create-project-D8jQTwVQ.mjs";
|
|
7
7
|
import { a as resolveProjectBySlug } from "./resolve-project-WpwkCB_c.mjs";
|
|
8
8
|
//#region src/cli/link.ts
|
|
9
9
|
function projectLabel(slug, root, url) {
|