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/deploy.d.mts
CHANGED
|
@@ -1,10 +1,31 @@
|
|
|
1
1
|
import { DeployArtifact } from "@void/deploy-core";
|
|
2
2
|
//#region src/deploy.d.ts
|
|
3
|
+
/**
|
|
4
|
+
* A disposable Cloudflare Build Output directory. Experimental: it follows Cloudflare's draft
|
|
5
|
+
* Build Output format, which can change between Void releases.
|
|
6
|
+
*/
|
|
7
|
+
export type CfBuildOutput = {
|
|
8
|
+
directory: string;
|
|
9
|
+
/** The input's static assets, when the Worker has any. */
|
|
10
|
+
assetsDirectory?: string;
|
|
11
|
+
dispose(): Promise<void>;
|
|
12
|
+
};
|
|
13
|
+
export type PrepareCfBuildOutputOptions = {
|
|
14
|
+
/** The Cloudflare account the build must target. */
|
|
15
|
+
accountId?: string;
|
|
16
|
+
/** The Vite build mode. Native output must match it; legacy output defaults to production. */
|
|
17
|
+
mode?: string;
|
|
18
|
+
};
|
|
19
|
+
/**
|
|
20
|
+
* Convert an existing Cloudflare Worker build into a disposable Cloudflare Build Output directory.
|
|
21
|
+
* Experimental. Returns null for an unsupported build or a conflicting account or mode.
|
|
22
|
+
*/
|
|
23
|
+
export declare function prepareCfBuildOutput(directory: string, options?: PrepareCfBuildOutputOptions): Promise<CfBuildOutput | null>;
|
|
3
24
|
export type PreparedDeployArtifact = {
|
|
4
25
|
artifact: DeployArtifact;
|
|
5
26
|
/** Static asset bytes keyed by URL path, encoded as base64. */
|
|
6
27
|
assets: Record<string, string>;
|
|
7
28
|
};
|
|
8
|
-
/** Package an already-built
|
|
29
|
+
/** Package an already-built app for managed deployment, without platform credentials. */
|
|
9
30
|
export declare function prepareDeployArtifact(root?: string): Promise<PreparedDeployArtifact>;
|
|
10
31
|
//#endregion
|
package/dist/deploy.mjs
CHANGED
|
@@ -1,19 +1,60 @@
|
|
|
1
1
|
import { a as join, c as resolve } from "./dist-ipQi0Q8y.mjs";
|
|
2
|
-
import { c as isNodeTarget, d as readConfig } from "./config-
|
|
3
|
-
import { o as validateSsrEntry } from "./entry-
|
|
2
|
+
import { c as isNodeTarget, d as readConfig } from "./config-D26zcdKy.mjs";
|
|
3
|
+
import { o as validateSsrEntry } from "./entry-B_0IhV64.mjs";
|
|
4
4
|
import { r as hasEmailHandlers } from "./email-BcjSyAL0.mjs";
|
|
5
5
|
import { a as resolveDistDir, c as hasDocumentRoutes, l as resolveAssetConfig, n as collectRevalidate, o as resolveWorkerDirName, s as hasApiRoutes } from "./isr-config-fZaJJ8t7.mjs";
|
|
6
|
-
import { t as analyzeApplication } from "./application-routing-
|
|
7
|
-
import {
|
|
6
|
+
import { t as analyzeApplication } from "./application-routing-CZH66gXn.mjs";
|
|
7
|
+
import { t as prepareCfBuildOutput$1 } from "./cf-build-output-ChEKWan2.mjs";
|
|
8
|
+
import { o as detectPreset } from "./cloudflare-process-CZJ4viYl.mjs";
|
|
9
|
+
import { F as resolveStaticDeployPreset, I as toManifestSchedulesAndQueues, L as validateDeployMigrations, M as resolveDeployWranglerCompat, a as collectAndHashAssets, b as assertWorkerMainUploaded, d as mergeAndLintRoutingRules, h as assertDeploySchemaDriftFree, i as buildStaticManifest, j as resolveDeployWorkerMain, o as collectWorkerFiles, t as assembleVoidManifest } from "./deploy-managed-static-B9KVxY3X.mjs";
|
|
8
10
|
import { existsSync } from "node:fs";
|
|
9
11
|
import { createDeployArtifact } from "@void/deploy-core";
|
|
10
12
|
//#region src/deploy.ts
|
|
11
|
-
/**
|
|
13
|
+
/**
|
|
14
|
+
* Convert an existing Cloudflare Worker build into a disposable Cloudflare Build Output directory.
|
|
15
|
+
* Experimental. Returns null for an unsupported build or a conflicting account or mode.
|
|
16
|
+
*/
|
|
17
|
+
async function prepareCfBuildOutput(directory, options = {}) {
|
|
18
|
+
const prepared = await prepareCfBuildOutput$1(directory, options.accountId, options.mode);
|
|
19
|
+
return prepared && {
|
|
20
|
+
directory: prepared.directory,
|
|
21
|
+
...prepared.assetsDirectory ? { assetsDirectory: prepared.assetsDirectory } : {},
|
|
22
|
+
dispose: prepared.dispose
|
|
23
|
+
};
|
|
24
|
+
}
|
|
25
|
+
/** Package an already-built app for managed deployment, without platform credentials. */
|
|
12
26
|
async function prepareDeployArtifact(root = process.cwd()) {
|
|
13
27
|
root = resolve(root);
|
|
14
28
|
const config = readConfig(root);
|
|
15
29
|
if (isNodeTarget(config.target) || config.output === "static") throw new Error("Artifact preparation requires a Void Cloudflare Worker build.");
|
|
16
|
-
|
|
30
|
+
let preset = resolveStaticDeployPreset(root, config);
|
|
31
|
+
let analysis;
|
|
32
|
+
if (!preset) {
|
|
33
|
+
analysis = await analyzeApplication(root, {
|
|
34
|
+
config,
|
|
35
|
+
environment: "prod"
|
|
36
|
+
});
|
|
37
|
+
if (!config.inference?.appType && !analysis.framework && !analysis.durableObjects.length && !analysis.websockets.length && !Object.values(analysis.bindings).some(Boolean)) preset = detectPreset(root, { strictBackend: true });
|
|
38
|
+
}
|
|
39
|
+
if (preset) {
|
|
40
|
+
if (!existsSync(preset.outputDir)) throw new Error("Static build output is missing. Run the app build first.");
|
|
41
|
+
const rules = mergeAndLintRoutingRules(preset.outputDir, config.routing);
|
|
42
|
+
const { assetManifest, assetFiles } = await collectAndHashAssets(preset.outputDir);
|
|
43
|
+
if (!assetFiles.size) throw new Error("Static build output is empty. Run the app build first.");
|
|
44
|
+
return {
|
|
45
|
+
artifact: createDeployArtifact({
|
|
46
|
+
manifest: buildStaticManifest({
|
|
47
|
+
appType: preset.appType,
|
|
48
|
+
hashedAssetsPrefix: "assets",
|
|
49
|
+
notFound: config.routing?.notFound,
|
|
50
|
+
...rules
|
|
51
|
+
}),
|
|
52
|
+
assetManifest
|
|
53
|
+
}),
|
|
54
|
+
assets: Object.fromEntries([...assetFiles].map(([path, bytes]) => [path, bytes.toString("base64")]))
|
|
55
|
+
};
|
|
56
|
+
}
|
|
57
|
+
analysis ??= await analyzeApplication(root, {
|
|
17
58
|
config,
|
|
18
59
|
environment: "prod"
|
|
19
60
|
});
|
|
@@ -24,7 +65,7 @@ async function prepareDeployArtifact(root = process.cwd()) {
|
|
|
24
65
|
const clientDir = join(dist, "client");
|
|
25
66
|
const { paths, dialect, bindings, authEnabled, scan, websockets } = analysis;
|
|
26
67
|
assertDeploySchemaDriftFree(root, dialect);
|
|
27
|
-
const migrations = validateDeployMigrations(paths.migrationsDir, analysis.migrations);
|
|
68
|
+
const migrations = validateDeployMigrations(paths.migrationsDir, analysis.migrations, paths.sourceRelative);
|
|
28
69
|
const { schedules, queues } = toManifestSchedulesAndQueues(analysis.jobs, analysis.queues);
|
|
29
70
|
const pages = existsSync(paths.pagesDir);
|
|
30
71
|
const ssr = Boolean(validateSsrEntry(root, paths)) || pages;
|
|
@@ -79,4 +120,4 @@ async function prepareDeployArtifact(root = process.cwd()) {
|
|
|
79
120
|
};
|
|
80
121
|
}
|
|
81
122
|
//#endregion
|
|
82
|
-
export { prepareDeployArtifact };
|
|
123
|
+
export { prepareCfBuildOutput, prepareDeployArtifact };
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export { t as discoverSchema } from "./discover-LaV0tbIu.mjs";
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import { s as relative } from "./dist-ipQi0Q8y.mjs";
|
|
2
|
-
import { n as readProjectPaths } from "./project-paths-
|
|
2
|
+
import { n as readProjectPaths } from "./project-paths-DGu_QZ_Q.mjs";
|
|
3
3
|
import { existsSync, statSync } from "node:fs";
|
|
4
4
|
//#region src/drizzle/discover.ts
|
|
5
5
|
/**
|
|
@@ -1,10 +1,10 @@
|
|
|
1
1
|
import { a as join, i as isAbsolute, n as dirname, s as relative } from "./dist-ipQi0Q8y.mjs";
|
|
2
|
-
import { i as resolveProjectPaths, n as readProjectPaths } from "./project-paths-
|
|
3
|
-
import { d as readConfig, f as resolveBindingNames, s as getDatabaseDialect } from "./config-
|
|
2
|
+
import { i as resolveProjectPaths, n as readProjectPaths } from "./project-paths-DGu_QZ_Q.mjs";
|
|
3
|
+
import { d as readConfig, f as resolveBindingNames, s as getDatabaseDialect } from "./config-D26zcdKy.mjs";
|
|
4
4
|
import { i as voidWarn } from "./log-vqY3pqwI.mjs";
|
|
5
|
-
import { n as ensureProjectTsconfig } from "./project-tsconfig-
|
|
6
|
-
import { n as generateDbDts, t as DRIZZLE_OPERATORS } from "./db-types-
|
|
7
|
-
import { t as discoverSchema } from "./discover-
|
|
5
|
+
import { n as ensureProjectTsconfig } from "./project-tsconfig-Itv1f4WC.mjs";
|
|
6
|
+
import { n as generateDbDts, t as DRIZZLE_OPERATORS } from "./db-types-NGxPwnlt.mjs";
|
|
7
|
+
import { t as discoverSchema } from "./discover-LaV0tbIu.mjs";
|
|
8
8
|
import { createRequire } from "node:module";
|
|
9
9
|
import { existsSync, readFileSync, readdirSync } from "node:fs";
|
|
10
10
|
import { fileURLToPath } from "node:url";
|
|
@@ -282,7 +282,7 @@ function drizzlePlugin(root, hasRouteTypes, dialect = "sqlite", options = {}) {
|
|
|
282
282
|
const migrationsDir = paths.migrationsDir;
|
|
283
283
|
if (!(existsSync(migrationsDir) && readdirSync(migrationsDir).some((f) => f.endsWith(".sql")))) {
|
|
284
284
|
if (dialect === "sqlite") {
|
|
285
|
-
const { getApplicationTables, getMiniflareDatabasePath } = await import("./runner-
|
|
285
|
+
const { getApplicationTables, getMiniflareDatabasePath } = await import("./runner-WCdfeI0q.mjs");
|
|
286
286
|
if ((await getApplicationTables(getMiniflareDatabasePath(options.localD1PersistRoot ?? join(root, ".void"), options.localD1DatabaseId ?? "local")).catch(() => [])).length > 0) return;
|
|
287
287
|
}
|
|
288
288
|
voidWarn(`Schema found but no migrations in ${paths.sourceRelative("db/migrations")}/.\n \`void db push\` syncs the schema to your local DB without creating migration files.
|
|
@@ -1,8 +1,8 @@
|
|
|
1
1
|
import { n as readDeploymentPlatform } from "./project-rqDnVsJN.mjs";
|
|
2
2
|
import { c as getToken } from "./auth-B6iOCjKI.mjs";
|
|
3
3
|
import { L as log } from "./dist-BVdsO7Py.mjs";
|
|
4
|
-
import { f as import_picocolors, m as printSuccess, p as note } from "./output-
|
|
5
|
-
import { r as PlatformClient } from "./client-
|
|
4
|
+
import { f as import_picocolors, m as printSuccess, p as note } from "./output-CKguMgr7.mjs";
|
|
5
|
+
import { r as PlatformClient } from "./client-BdzxubTS.mjs";
|
|
6
6
|
import { i as resolveCommandProjectId } from "./resolve-project-WpwkCB_c.mjs";
|
|
7
7
|
//#region src/cli/domain.ts
|
|
8
8
|
async function runDomainCommand(root, args) {
|
|
@@ -25,7 +25,7 @@ async function runDomainCommand(root, args) {
|
|
|
25
25
|
}
|
|
26
26
|
async function runCloudflareDomainCommand(root, args) {
|
|
27
27
|
if (args.projectSlug) throw new Error("domain: --project selects a Void platform project and is not used for direct Cloudflare apps.");
|
|
28
|
-
const { changeCloudflareDomain, listCloudflareDomains } = await import("./cloudflare-operations-
|
|
28
|
+
const { changeCloudflareDomain, listCloudflareDomains } = await import("./cloudflare-operations-BFLCpUCV.mjs");
|
|
29
29
|
if (args.subcommand === "add") {
|
|
30
30
|
const result = await changeCloudflareDomain(root, args.hostname, "add");
|
|
31
31
|
note("Cloudflare Custom Domains manages the DNS record and TLS certificate in the zone on your account.", "Cloudflare Domain");
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import {
|
|
1
|
+
import { o as isVoidSocialAuthProvider } from "./providers-BUHwJlmM.mjs";
|
|
2
2
|
import { getAuthTables, getSchema } from "better-auth/db";
|
|
3
3
|
//#region src/auth/drizzle.ts
|
|
4
4
|
const DEFAULT_TABLE_ORDER = Number.MAX_SAFE_INTEGER;
|
|
@@ -75,6 +75,15 @@ const UNBOUNDED_MYSQL_AUTH_FIELDS = /* @__PURE__ */ new Set([
|
|
|
75
75
|
function usesUnboundedMySqlText(defaultModelName, defaultFieldName, field) {
|
|
76
76
|
return field.type === "string" && !field.unique && !field.index && !field.references && !field.sortable && UNBOUNDED_MYSQL_AUTH_FIELDS.has(`${defaultModelName}.${defaultFieldName}`);
|
|
77
77
|
}
|
|
78
|
+
/**
|
|
79
|
+
* The default of a required field when the database can store it as a literal.
|
|
80
|
+
* Function, date and JSON defaults have none.
|
|
81
|
+
*/
|
|
82
|
+
function resolveFixedDefault(field) {
|
|
83
|
+
if (field.required === false || field.type === "date" || isJsonField(field)) return {};
|
|
84
|
+
const value = field.defaultValue;
|
|
85
|
+
return typeof value === "string" || typeof value === "boolean" || typeof value === "number" && Number.isFinite(value) ? { defaultValue: value } : {};
|
|
86
|
+
}
|
|
78
87
|
function resolveReferenceFieldName(schema, model, field) {
|
|
79
88
|
if (field === "id") return "id";
|
|
80
89
|
const referencedField = schema[model]?.fields[field];
|
|
@@ -127,6 +136,8 @@ function createColumnDefinition(dialect, schema, idStrategy, defaultToVariable,
|
|
|
127
136
|
if (actualFieldName === "id") {
|
|
128
137
|
parts.push(".primaryKey()");
|
|
129
138
|
if (dialect === "mysql" && idStrategy === "serial") parts.push(".autoincrement()");
|
|
139
|
+
if (dialect === "postgresql" && idStrategy === "serial") parts.push(".generatedByDefaultAsIdentity()");
|
|
140
|
+
if (dialect === "postgresql" && idStrategy === "uuid") parts.push(".defaultRandom()");
|
|
130
141
|
}
|
|
131
142
|
if (field.required !== false || actualFieldName === "id") parts.push(".notNull()");
|
|
132
143
|
if (field.references) {
|
|
@@ -146,7 +157,6 @@ function collectCoreImports(dialect, schema, idStrategy) {
|
|
|
146
157
|
if (idStrategy === "uuid" && dialect === "postgresql") imports.add("uuid");
|
|
147
158
|
for (const [defaultModelName, table] of Object.entries(schema)) for (const [defaultFieldName, field] of Object.entries(table.fields)) {
|
|
148
159
|
if (resolveFieldName(defaultFieldName, field) === "id" || field.references?.field === "id") {
|
|
149
|
-
if (idStrategy === "serial") imports.add("integer");
|
|
150
160
|
if (idStrategy === "uuid" && dialect === "postgresql") imports.add("uuid");
|
|
151
161
|
continue;
|
|
152
162
|
}
|
|
@@ -237,6 +247,7 @@ function resolveVoidAuthMigrationSchema(runtime, env = {}) {
|
|
|
237
247
|
index: field.index === true,
|
|
238
248
|
bigint: field.bigint === true,
|
|
239
249
|
...unboundedMySqlFields.has(`${name}\0${fieldName}`) ? { unbounded: true } : {},
|
|
250
|
+
...resolveFixedDefault(field),
|
|
240
251
|
...field.references ? { references: {
|
|
241
252
|
table: field.references.model,
|
|
242
253
|
field: field.references.field,
|
|
@@ -1,16 +1,16 @@
|
|
|
1
1
|
import { a as join } from "./dist-ipQi0Q8y.mjs";
|
|
2
|
-
import { n as readProjectPaths } from "./project-paths-
|
|
3
|
-
import { d as readConfig } from "./config-
|
|
2
|
+
import { n as readProjectPaths } from "./project-paths-DGu_QZ_Q.mjs";
|
|
3
|
+
import { d as readConfig } from "./config-D26zcdKy.mjs";
|
|
4
4
|
import { i as scanEmailHandlersSync } from "./email-BcjSyAL0.mjs";
|
|
5
|
-
import { j as writeProvisionedWranglerConfig } from "./wrangler-
|
|
5
|
+
import { j as writeProvisionedWranglerConfig } from "./wrangler-C9XSzrju.mjs";
|
|
6
6
|
import { c as getToken, u as openBrowser } from "./auth-B6iOCjKI.mjs";
|
|
7
7
|
import { A as confirm, L as log, U as password, tt as isCancel } from "./dist-BVdsO7Py.mjs";
|
|
8
|
-
import { f as import_picocolors, l as formatUrl, m as printSuccess, p as note, r as createSpinner } from "./output-
|
|
9
|
-
import { a as emailConfigInputs, c as renderAddressMap, i as createNodeEmailDns, l as renderEmailChecklist, o as preflightEmail, r as applyEmailSetup, s as probeMx } from "./email-cloudflare-
|
|
10
|
-
import { n as PlatformApiError, r as PlatformClient } from "./client-
|
|
8
|
+
import { f as import_picocolors, l as formatUrl, m as printSuccess, p as note, r as createSpinner } from "./output-CKguMgr7.mjs";
|
|
9
|
+
import { a as emailConfigInputs, c as renderAddressMap, i as createNodeEmailDns, l as renderEmailChecklist, o as preflightEmail, r as applyEmailSetup, s as probeMx } from "./email-cloudflare-etpKiITL.mjs";
|
|
10
|
+
import { n as PlatformApiError, r as PlatformClient } from "./client-BdzxubTS.mjs";
|
|
11
11
|
import { i as resolveCommandProjectId } from "./resolve-project-WpwkCB_c.mjs";
|
|
12
|
-
import { o as resolveDeployTransport } from "./deploy-transport-
|
|
13
|
-
import { a as discoverRootWranglerConfig, c as runWranglerAuthToken, l as deriveWorkerName, o as createDeployWranglerRunner, s as isWranglerNonInteractiveOrCI } from "./deploy-
|
|
12
|
+
import { o as resolveDeployTransport } from "./deploy-transport-B3mtEi_q.mjs";
|
|
13
|
+
import { a as discoverRootWranglerConfig, c as runWranglerAuthToken, l as deriveWorkerName, o as createDeployWranglerRunner, s as isWranglerNonInteractiveOrCI } from "./deploy-D1gIPiAq.mjs";
|
|
14
14
|
import { existsSync, mkdtempSync, rmSync, writeFileSync } from "node:fs";
|
|
15
15
|
import { tmpdir } from "node:os";
|
|
16
16
|
import { execSync } from "node:child_process";
|
|
@@ -24,7 +24,7 @@ async function runEmailCommand(root, args) {
|
|
|
24
24
|
process.exit(1);
|
|
25
25
|
}
|
|
26
26
|
if (args.subcommand === "status") {
|
|
27
|
-
log.error("email: `void email status`
|
|
27
|
+
log.error("email: `void email status` checks email on your own Cloudflare account. Run it with `--platform cloudflare`. On the Void platform, use `void email usage` and `void email destinations`.");
|
|
28
28
|
process.exit(1);
|
|
29
29
|
}
|
|
30
30
|
const token = getToken(root);
|
|
@@ -292,7 +292,7 @@ async function reconcileEmailOperation(error, client, projectId, attemptId, titl
|
|
|
292
292
|
return operation;
|
|
293
293
|
}
|
|
294
294
|
}
|
|
295
|
-
async function emailDomainAdd(client, projectId, rawDomain, deps = {}
|
|
295
|
+
async function emailDomainAdd(client, projectId, rawDomain, deps = {}) {
|
|
296
296
|
const exit = deps.exit ?? ((code) => process.exit(code));
|
|
297
297
|
const fail = (message) => {
|
|
298
298
|
log.error(message);
|
|
@@ -300,7 +300,6 @@ async function emailDomainAdd(client, projectId, rawDomain, deps = {}, subdomain
|
|
|
300
300
|
};
|
|
301
301
|
const domain = normalizeEmailDomainInput(rawDomain);
|
|
302
302
|
if (!isValidEmailDomainInput(domain)) return fail(`email: invalid domain '${rawDomain}'.`);
|
|
303
|
-
if (subdomain !== void 0) return fail("email: Platform-managed custom email requires a Cloudflare zone apex because inbound email uses its catch-all. Omit --subdomain, choose an unused zone apex, or use the platform shared mail address.");
|
|
304
303
|
const dns = deps.dns ?? await createNodeEmailDns();
|
|
305
304
|
const checkApexMx = async () => {
|
|
306
305
|
const mx = await probeMx(dns, domain);
|
|
@@ -519,7 +518,7 @@ async function emailDomainRemove(client, projectId, rawDomain, options = {}) {
|
|
|
519
518
|
}
|
|
520
519
|
async function runEmailDomainCommand(client, projectId, args) {
|
|
521
520
|
switch (args.domainVerb) {
|
|
522
|
-
case "add": return emailDomainAdd(client, projectId, args.domain
|
|
521
|
+
case "add": return emailDomainAdd(client, projectId, args.domain);
|
|
523
522
|
case "status": return emailDomainStatus(client, projectId, args.domain);
|
|
524
523
|
case "list": return emailDomainList(client, projectId);
|
|
525
524
|
case "sync": return emailDomainSync(client, projectId, args.domain);
|
|
@@ -1,17 +1,17 @@
|
|
|
1
1
|
import { n as __toESM } from "./rolldown-runtime-DXIUcv95.mjs";
|
|
2
2
|
import { a as join, n as dirname, s as relative } from "./dist-ipQi0Q8y.mjs";
|
|
3
3
|
import { t as require_picocolors } from "./picocolors-BTps1_gs.mjs";
|
|
4
|
-
import { d as readConfig } from "./config-
|
|
5
|
-
import { i as collectFiles } from "./isr-config-fZaJJ8t7.mjs";
|
|
4
|
+
import { d as readConfig } from "./config-D26zcdKy.mjs";
|
|
6
5
|
import { i as voidWarn, r as voidLog } from "./log-vqY3pqwI.mjs";
|
|
6
|
+
import { i as collectFiles } from "./isr-config-fZaJJ8t7.mjs";
|
|
7
7
|
import { i as readProjectIdField } from "./project-rqDnVsJN.mjs";
|
|
8
|
-
import { p as findBindingNameOwner, u as ensureWranglerCompat } from "./wrangler-
|
|
8
|
+
import { p as findBindingNameOwner, u as ensureWranglerCompat } from "./wrangler-C9XSzrju.mjs";
|
|
9
9
|
import { n as scopedAccessCredentials } from "./cf-access-BM9G0lhO.mjs";
|
|
10
10
|
import { n as ensurePlatformProxyAccess } from "./cf-access-CWP4avfP.mjs";
|
|
11
11
|
import { a as getApiUrl, c as getToken, o as getProxyUrl } from "./auth-B6iOCjKI.mjs";
|
|
12
12
|
import { l as stripInternalEnvKeys } from "./env-BJjULvL0.mjs";
|
|
13
13
|
import { n as readPrerenderPathsResponse, r as renderPrerenderPaths, t as outputFileForPath } from "./prerender-render-Bfsumdkv.mjs";
|
|
14
|
-
import { a as buildEnv } from "./version-metadata-
|
|
14
|
+
import { a as buildEnv } from "./version-metadata-B1Bm2wSq.mjs";
|
|
15
15
|
import { existsSync, mkdirSync, readFileSync, unlinkSync, writeFileSync } from "node:fs";
|
|
16
16
|
import { isRecord } from "@void/deploy-core";
|
|
17
17
|
import { execFile } from "node:child_process";
|
|
@@ -557,10 +557,7 @@ async function preflightEmail(inputs) {
|
|
|
557
557
|
mode: null,
|
|
558
558
|
workerName: inputs.workerName,
|
|
559
559
|
accountId: inputs.accountId,
|
|
560
|
-
usage: {
|
|
561
|
-
handlers: usageHandlers,
|
|
562
|
-
sendEmailFiles: inputs.sendEmailFiles
|
|
563
|
-
},
|
|
560
|
+
usage: { handlers: usageHandlers },
|
|
564
561
|
session: {
|
|
565
562
|
state: "unknown",
|
|
566
563
|
missingScopes: []
|
|
@@ -843,8 +840,8 @@ function pad(text, width) {
|
|
|
843
840
|
function renderEmailChecklist(pre) {
|
|
844
841
|
const apex = pre.apex ?? "?";
|
|
845
842
|
const lines = [];
|
|
846
|
-
const inUse =
|
|
847
|
-
lines.push(` Email in use ${inUse
|
|
843
|
+
const inUse = pre.usage.handlers.length > 0 ? pre.usage.handlers.join(" · ") : "sending only (no email/ handlers)";
|
|
844
|
+
lines.push(` Email in use ${inUse}`);
|
|
848
845
|
const row = (label, value, note = "") => {
|
|
849
846
|
lines.push(` ${pad(label, 10)}${note ? `${pad(value, 23)}${note}` : value}`);
|
|
850
847
|
};
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import { a as join, s as relative } from "./dist-ipQi0Q8y.mjs";
|
|
2
|
-
import { n as readProjectPaths } from "./project-paths-
|
|
2
|
+
import { n as readProjectPaths } from "./project-paths-DGu_QZ_Q.mjs";
|
|
3
3
|
import { n as isIdentifier } from "./ast-CPGPjb0V.mjs";
|
|
4
4
|
import { existsSync, readFileSync } from "node:fs";
|
|
5
5
|
import { parseSync } from "vite";
|
|
@@ -2,10 +2,10 @@ import { a as join } from "./dist-ipQi0Q8y.mjs";
|
|
|
2
2
|
import { n as readDeploymentPlatform, r as readProjectConfig } from "./project-rqDnVsJN.mjs";
|
|
3
3
|
import { c as getToken } from "./auth-B6iOCjKI.mjs";
|
|
4
4
|
import { H as outro, L as log } from "./dist-BVdsO7Py.mjs";
|
|
5
|
-
import { m as printSuccess, p as note } from "./output-
|
|
6
|
-
import { r as generateEnvTypes, t as findEnvFile } from "./env-types-
|
|
7
|
-
import { r as PlatformClient } from "./client-
|
|
8
|
-
import { d as formatEnvReport, g as validateProdEnv, u as fetchRemoteSecretNames } from "./env-validation-
|
|
5
|
+
import { m as printSuccess, p as note } from "./output-CKguMgr7.mjs";
|
|
6
|
+
import { r as generateEnvTypes, t as findEnvFile } from "./env-types-GRchm5dw.mjs";
|
|
7
|
+
import { r as PlatformClient } from "./client-BdzxubTS.mjs";
|
|
8
|
+
import { d as formatEnvReport, g as validateProdEnv, u as fetchRemoteSecretNames } from "./env-validation-D_KyMdab.mjs";
|
|
9
9
|
import { mkdirSync, writeFileSync } from "node:fs";
|
|
10
10
|
//#region src/cli/env.ts
|
|
11
11
|
async function runEnvCommand(root, args) {
|
|
@@ -25,7 +25,7 @@ async function runCheck(root, useRemoteSecrets) {
|
|
|
25
25
|
const platform = readDeploymentPlatform(root);
|
|
26
26
|
if (platform === "none") throw new Error("env: Deployment is disabled. Run `void init` to choose a platform.");
|
|
27
27
|
if (platform === "cloudflare") {
|
|
28
|
-
const { listCloudflareSecrets, resolveCloudflareOperationContext } = await import("./cloudflare-operations-
|
|
28
|
+
const { listCloudflareSecrets, resolveCloudflareOperationContext } = await import("./cloudflare-operations-BFLCpUCV.mjs");
|
|
29
29
|
remoteSecrets = await listCloudflareSecrets(resolveCloudflareOperationContext(root));
|
|
30
30
|
} else {
|
|
31
31
|
const token = getToken(root);
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import { s as relative } from "./dist-ipQi0Q8y.mjs";
|
|
2
|
-
import { n as readProjectPaths } from "./project-paths-
|
|
2
|
+
import { n as readProjectPaths } from "./project-paths-DGu_QZ_Q.mjs";
|
|
3
3
|
import { i as voidWarn } from "./log-vqY3pqwI.mjs";
|
|
4
4
|
import { existsSync } from "node:fs";
|
|
5
5
|
//#region src/codegen/env-types.ts
|
|
@@ -1 +1 @@
|
|
|
1
|
-
export { r as SelfHostSchemaError, a as computeInvalidEmittedKeys, c as deriveSelfHostSchemaFacts, p as readEmittedWorkerVars } from "./env-validation-
|
|
1
|
+
export { r as SelfHostSchemaError, a as computeInvalidEmittedKeys, c as deriveSelfHostSchemaFacts, p as readEmittedWorkerVars } from "./env-validation-D_KyMdab.mjs";
|
|
@@ -3,9 +3,9 @@ import { i as voidWarn } from "./log-vqY3pqwI.mjs";
|
|
|
3
3
|
import { n as readGeneratedWranglerConfigFile } from "./generated-wrangler-config-DeWj5F9Y.mjs";
|
|
4
4
|
import { n as scanWranglerDotenvKeys } from "./dotenv-CNazY3-w.mjs";
|
|
5
5
|
import { a as isClientEnvKey, i as findReservedEnvKeys, n as LOCAL_ENV_FILE, o as loadLocalEnv, r as findLegacyEnvFiles, s as reservedEnvKeysMessage } from "./env-BJjULvL0.mjs";
|
|
6
|
-
import { t as findEnvFile } from "./env-types-
|
|
6
|
+
import { t as findEnvFile } from "./env-types-GRchm5dw.mjs";
|
|
7
7
|
import { t as loadUserEnvFile } from "./load-user-env-DD5qveNU.mjs";
|
|
8
|
-
import { l as resolveCloudflareOperationArgv, n as decodeCloudflareOperationResult, r as encodeCloudflareOperation } from "./cloudflare-process-
|
|
8
|
+
import { l as resolveCloudflareOperationArgv, n as decodeCloudflareOperationResult, r as encodeCloudflareOperation } from "./cloudflare-process-CZJ4viYl.mjs";
|
|
9
9
|
import { existsSync, readFileSync } from "node:fs";
|
|
10
10
|
import { spawn } from "node:child_process";
|
|
11
11
|
import { parseRootWranglerConfig, readWranglerTopLevelString } from "@void/deploy-cloudflare";
|
|
@@ -57,11 +57,22 @@ type FetchOptions<P extends keyof RouteMap, M extends MethodsOf<P>> = BodyOption
|
|
|
57
57
|
retry?: number;
|
|
58
58
|
timeout?: number;
|
|
59
59
|
};
|
|
60
|
+
type UntypedFetchOptions = {
|
|
61
|
+
method?: string;
|
|
62
|
+
params?: Record<string, string>;
|
|
63
|
+
body?: unknown;
|
|
64
|
+
query?: Record<string, string>;
|
|
65
|
+
headers?: HeadersInit;
|
|
66
|
+
signal?: AbortSignal;
|
|
67
|
+
baseURL?: string;
|
|
68
|
+
retry?: number;
|
|
69
|
+
timeout?: number;
|
|
70
|
+
};
|
|
60
71
|
/**
|
|
61
72
|
* Typed fetch client for Void API routes.
|
|
62
73
|
*
|
|
63
|
-
* Built on
|
|
64
|
-
*
|
|
74
|
+
* Built on ofetch. Supports `method`, `params`, `query`, `body`, `headers`,
|
|
75
|
+
* `signal`, `baseURL`, `retry` and `timeout`, with full route type safety.
|
|
65
76
|
*
|
|
66
77
|
* ```ts
|
|
67
78
|
* import { fetch } from "void/client";
|
|
@@ -72,5 +83,7 @@ type FetchOptions<P extends keyof RouteMap, M extends MethodsOf<P>> = BodyOption
|
|
|
72
83
|
*/
|
|
73
84
|
declare function fetch<P extends keyof RouteMap & string>(path: HasRequiredInput<P, DefaultMethod<P>> extends false ? P : never): Promise<OutputOf<P, DefaultMethod<P>>>;
|
|
74
85
|
declare function fetch<P extends keyof RouteMap & string, M extends MethodsOf<P> = DefaultMethod<P>>(path: P, options: FetchOptions<P, M>): Promise<OutputOf<P, M>>;
|
|
86
|
+
/** Apply the same route interpolation and request options to browser and server transports. */
|
|
87
|
+
declare function createRouteFetch(transport: typeof globalThis.fetch): (path: string, options?: UntypedFetchOptions) => Promise<unknown>;
|
|
75
88
|
//#endregion
|
|
76
|
-
export {
|
|
89
|
+
export { UntypedFetchOptions as a, FetchError as c, QueryOption as i, MethodsOf as n, createRouteFetch as o, ParamsOption as r, fetch as s, BodyOption as t };
|
|
@@ -0,0 +1,26 @@
|
|
|
1
|
+
import { n as createFetch } from "./fetch-error-Bw0n-IY-.mjs";
|
|
2
|
+
import { t as interpolateRouteParams } from "./route-url-BjGv_KKY.mjs";
|
|
3
|
+
//#region src/runtime/fetch.ts
|
|
4
|
+
const browserFetch = createRouteFetch((...args) => globalThis.fetch(...args));
|
|
5
|
+
async function fetch(path, options) {
|
|
6
|
+
return browserFetch(path, options);
|
|
7
|
+
}
|
|
8
|
+
/** Apply the same route interpolation and request options to browser and server transports. */
|
|
9
|
+
function createRouteFetch(transport) {
|
|
10
|
+
const client = createFetch({ fetch: transport });
|
|
11
|
+
return async (path, options) => {
|
|
12
|
+
const url = interpolateRouteParams(path, options?.params);
|
|
13
|
+
return client(url, {
|
|
14
|
+
method: options?.method ?? "GET",
|
|
15
|
+
body: options?.body,
|
|
16
|
+
query: options?.query,
|
|
17
|
+
headers: options?.headers,
|
|
18
|
+
signal: options?.signal,
|
|
19
|
+
baseURL: options?.baseURL,
|
|
20
|
+
retry: options?.retry,
|
|
21
|
+
timeout: options?.timeout
|
|
22
|
+
});
|
|
23
|
+
};
|
|
24
|
+
}
|
|
25
|
+
//#endregion
|
|
26
|
+
export { fetch as n, createRouteFetch as t };
|
|
@@ -263,4 +263,4 @@ const ofetch = createFetch({ fetch: globalThis.fetch ? (...args) => globalThis.f
|
|
|
263
263
|
//#region src/runtime/fetch-error.ts
|
|
264
264
|
const FetchError = FetchError$1;
|
|
265
265
|
//#endregion
|
|
266
|
-
export {
|
|
266
|
+
export { createFetch as n, ofetch as r, FetchError as t };
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import {
|
|
1
|
+
import { r as ofetch, t as FetchError } from "./fetch-error-Bw0n-IY-.mjs";
|
|
2
2
|
import { t as interpolateRouteParams } from "./route-url-BjGv_KKY.mjs";
|
|
3
3
|
import { n as asUsageLimit, r as limitFromResponse } from "./limits-D0vD1M9A.mjs";
|
|
4
4
|
//#region src/runtime/fetch-stream.ts
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { i as QueryOption, n as MethodsOf, r as ParamsOption, t as BodyOption } from "./fetch-
|
|
1
|
+
import { i as QueryOption, n as MethodsOf, r as ParamsOption, t as BodyOption } from "./fetch-CUX0tB78.mjs";
|
|
2
2
|
import { RouteMap } from "void/routes";
|
|
3
3
|
//#region src/runtime/fetch-stream.d.ts
|
|
4
4
|
type InputOf<P extends keyof RouteMap, M extends MethodsOf<P>> = RouteMap[P][M] extends {
|
|
@@ -1,14 +1,13 @@
|
|
|
1
1
|
import { a as join, n as dirname, s as relative } from "./dist-ipQi0Q8y.mjs";
|
|
2
|
-
import { n as readProjectPaths } from "./project-paths-
|
|
3
|
-
import { d as readConfig, s as getDatabaseDialect } from "./config-
|
|
4
|
-
import { n as readJournal, t as collectMigrations } from "./collect-
|
|
2
|
+
import { n as readProjectPaths } from "./project-paths-DGu_QZ_Q.mjs";
|
|
3
|
+
import { d as readConfig, s as getDatabaseDialect } from "./config-D26zcdKy.mjs";
|
|
4
|
+
import { n as readJournal, t as collectMigrations } from "./collect-Dew86qce.mjs";
|
|
5
5
|
import { K as select, L as log, O as cancel, tt as isCancel } from "./dist-BVdsO7Py.mjs";
|
|
6
|
-
import { m as printSuccess } from "./output-
|
|
7
|
-
import {
|
|
8
|
-
import {
|
|
9
|
-
import { t as assertJournalCoherence } from "./validate-CheZGRE7.mjs";
|
|
6
|
+
import { m as printSuccess } from "./output-CKguMgr7.mjs";
|
|
7
|
+
import { r as writeDrizzleConfig, t as PLACEHOLDER_DB_URL } from "./config-DC5llZaI.mjs";
|
|
8
|
+
import { t as assertJournalCoherence } from "./validate-CnZPMq4q.mjs";
|
|
10
9
|
import { n as drizzleKitBin, t as buildDrizzleKitSpawnEnv } from "./yarn-pnp-DLbEFMT0.mjs";
|
|
11
|
-
import { n as snapshotDrizzleOutputs } from "./generate-
|
|
10
|
+
import { n as snapshotDrizzleOutputs } from "./generate-B1m4Cm4n.mjs";
|
|
12
11
|
import { existsSync, mkdirSync, readFileSync, readdirSync, writeFileSync } from "node:fs";
|
|
13
12
|
import { spawnSync } from "node:child_process";
|
|
14
13
|
//#region src/cli/gen.ts
|
|
@@ -330,7 +329,8 @@ async function runModel(root, name, columns) {
|
|
|
330
329
|
const existing = readFileSync(barrelPath, "utf-8");
|
|
331
330
|
if (!existing.includes(exportLine)) writeFileSync(barrelPath, existing.trimEnd() + "\n" + exportLine + "\n");
|
|
332
331
|
} else writeFileSync(barrelPath, exportLine + "\n");
|
|
333
|
-
|
|
332
|
+
const { prepareProject } = await import("./prepare-EVEbQ9n2.mjs");
|
|
333
|
+
await prepareProject(root);
|
|
334
334
|
log.step(`Created ${relative(root, modelPath)}`);
|
|
335
335
|
log.step(`Updated ${relative(root, barrelPath)}`);
|
|
336
336
|
writeIfNotExists(join(paths.routesDir, "api", name, "index.ts"), generateIndexRoute(name, columns, validator));
|
|
@@ -338,28 +338,34 @@ async function runModel(root, name, columns) {
|
|
|
338
338
|
printSuccess("Model scaffolding complete. Run `void db push` to apply.");
|
|
339
339
|
}
|
|
340
340
|
function runMigration(root, name) {
|
|
341
|
-
const
|
|
341
|
+
const paths = readProjectPaths(root);
|
|
342
|
+
const migrationsDir = paths.migrationsDir;
|
|
343
|
+
const dir = paths.sourceRelative("db/migrations");
|
|
342
344
|
mkdirSync(migrationsDir, { recursive: true });
|
|
343
345
|
const currentMigrations = collectMigrations(migrationsDir);
|
|
344
346
|
try {
|
|
345
|
-
assertJournalCoherence(migrationsDir, currentMigrations);
|
|
347
|
+
assertJournalCoherence(migrationsDir, currentMigrations, paths.sourceRelative);
|
|
346
348
|
} catch (err) {
|
|
347
349
|
log.error(err instanceof Error ? err.message : String(err));
|
|
348
350
|
process.exit(1);
|
|
349
351
|
}
|
|
350
352
|
const bundlePath = join(migrationsDir, "migrations.js");
|
|
351
353
|
if (existsSync(bundlePath)) {
|
|
352
|
-
log.error(
|
|
354
|
+
log.error(`Your project uses Drizzle's bundled migration format (${dir}/migrations.js).\n\`void gen migration\` cannot add custom hand-written migrations to a bundled project
|
|
355
|
+
because the bundle must be regenerated by drizzle-kit.
|
|
356
|
+
|
|
357
|
+
Either run \`drizzle-kit generate\` to regenerate the bundle, or migrate away from
|
|
358
|
+
bundled mode by deleting ${dir}/migrations.js and re-running \`void db generate\`.`);
|
|
353
359
|
process.exit(1);
|
|
354
360
|
}
|
|
355
|
-
const existingJournal = readJournal(migrationsDir);
|
|
361
|
+
const existingJournal = readJournal(migrationsDir, paths.sourceRelative);
|
|
356
362
|
if (existingJournal !== void 0 && existingJournal.entries.length > 0) {
|
|
357
363
|
const lastEntry = existingJournal.entries[existingJournal.entries.length - 1];
|
|
358
364
|
const metaDir = join(migrationsDir, "meta");
|
|
359
365
|
const lastSnapshotPrefix = lastEntry.tag.split("_")[0];
|
|
360
366
|
const prevSnapshotPath = join(metaDir, `${lastSnapshotPrefix}_snapshot.json`);
|
|
361
367
|
if (!existsSync(prevSnapshotPath)) {
|
|
362
|
-
log.error(
|
|
368
|
+
log.error(`${dir}/meta/_journal.json's last entry is \`${lastEntry.tag}\` but the matching snapshot \`${lastSnapshotPrefix}_snapshot.json\` is missing under meta/.`);
|
|
363
369
|
log.error("Restore the snapshot from version control, or regenerate migrations with `void db generate` before running `void gen migration`.");
|
|
364
370
|
process.exit(1);
|
|
365
371
|
}
|
|
@@ -370,14 +376,14 @@ function runMigration(root, name) {
|
|
|
370
376
|
else if (existingJournal.dialect === "postgresql") journalDialect = "postgresql";
|
|
371
377
|
else if (existingJournal.dialect === "mysql") journalDialect = "mysql";
|
|
372
378
|
else {
|
|
373
|
-
log.error(
|
|
374
|
-
log.error(
|
|
379
|
+
log.error(`${dir}/meta/_journal.json has an unsupported dialect: \`${existingJournal.dialect}\`.`);
|
|
380
|
+
log.error(`void supports \`sqlite\`, \`postgresql\`, and \`mysql\` only. Restore the journal from version control, or drop ${dir}/ and regenerate from scratch.`);
|
|
375
381
|
process.exit(1);
|
|
376
382
|
}
|
|
377
383
|
const configDialect = getDatabaseDialect(readConfig(root));
|
|
378
384
|
if (configDialect !== journalDialect) {
|
|
379
|
-
log.error(
|
|
380
|
-
log.error(`Generating a new custom migration now would append a snapshot in the wrong dialect. Revert void.config.ts's \`database\` field to ${journalDialect}, or drop
|
|
385
|
+
log.error(`${dir}/meta/_journal.json was generated for ${journalDialect}, but void.config.ts is configured for ${configDialect}.`);
|
|
386
|
+
log.error(`Generating a new custom migration now would append a snapshot in the wrong dialect. Revert void.config.ts's \`database\` field to ${journalDialect}, or drop ${dir}/ and regenerate from scratch.`);
|
|
381
387
|
process.exit(1);
|
|
382
388
|
}
|
|
383
389
|
const authSchemaPath = join(root, ".void", "better-auth-schema.ts");
|
|
@@ -404,12 +410,12 @@ function runMigration(root, name) {
|
|
|
404
410
|
`Failed to run \`drizzle-kit generate --custom --name ${name}\`.`,
|
|
405
411
|
...detail ? [detail] : [],
|
|
406
412
|
"",
|
|
407
|
-
|
|
413
|
+
`This is usually a schema-compilation error. Fix any TypeScript errors in ${paths.sourceRelative("db/schema.ts")} and try again.`
|
|
408
414
|
].join("\n"));
|
|
409
415
|
process.exit(1);
|
|
410
416
|
}
|
|
411
417
|
const newSqlFile = readdirSync(migrationsDir).filter((f) => f.endsWith(".sql")).find((f) => !sqlFilesBefore.has(f));
|
|
412
|
-
if (newSqlFile) log.step(`Created
|
|
418
|
+
if (newSqlFile) log.step(`Created ${dir}/${newSqlFile}`);
|
|
413
419
|
printSuccess("Migration created and journal updated.");
|
|
414
420
|
return;
|
|
415
421
|
}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export { r as runGenCommand } from "./gen-CYN3wiov.mjs";
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import { a as join, n as dirname } from "./dist-ipQi0Q8y.mjs";
|
|
2
|
-
import { t as collectMigrations } from "./collect-
|
|
2
|
+
import { t as collectMigrations } from "./collect-Dew86qce.mjs";
|
|
3
3
|
import { n as openMigrationValidationDatabase } from "./sqlite-validation-BzKMWnO4.mjs";
|
|
4
4
|
import { existsSync, mkdirSync, readFileSync, readdirSync, rmSync, unlinkSync, writeFileSync } from "node:fs";
|
|
5
5
|
//#region src/drizzle/generate.ts
|
|
@@ -1 +1 @@
|
|
|
1
|
-
export { t as generateValidatedSqliteMigrations } from "./generate-
|
|
1
|
+
export { t as generateValidatedSqliteMigrations } from "./generate-B1m4Cm4n.mjs";
|
|
@@ -1,8 +1,8 @@
|
|
|
1
1
|
import { r as readProjectConfig } from "./project-rqDnVsJN.mjs";
|
|
2
2
|
import { c as getToken, n as createCodeChallenge, r as createCodeVerifier, t as awaitBrowserCallback, u as openBrowser } from "./auth-B6iOCjKI.mjs";
|
|
3
3
|
import { A as confirm, K as select, L as log, O as cancel, X as text, tt as isCancel } from "./dist-BVdsO7Py.mjs";
|
|
4
|
-
import { f as import_picocolors, l as formatUrl, m as printSuccess } from "./output-
|
|
5
|
-
import { c as platformErrorMessage, n as PlatformApiError, r as PlatformClient, s as parsePlatformErrorBody } from "./client-
|
|
4
|
+
import { f as import_picocolors, l as formatUrl, m as printSuccess } from "./output-CKguMgr7.mjs";
|
|
5
|
+
import { c as platformErrorMessage, n as PlatformApiError, r as PlatformClient, s as parsePlatformErrorBody } from "./client-BdzxubTS.mjs";
|
|
6
6
|
import { a as resolveProjectBySlug, t as getRequestedProjectSlug } from "./resolve-project-WpwkCB_c.mjs";
|
|
7
7
|
import { t as collectGitDeployMetadata } from "./git-metadata-D-gurjzG.mjs";
|
|
8
8
|
import { randomBytes } from "node:crypto";
|
|
@@ -246,7 +246,7 @@ declare function defineHandler(firstMiddleware: MiddlewareFn, secondMiddleware:
|
|
|
246
246
|
* ```
|
|
247
247
|
*/
|
|
248
248
|
declare namespace defineHandler {
|
|
249
|
-
function withValidator<V extends ValidatorSlots>(validators: V): <R>(handler: (c: CloudContext, input: HandlerInput<V>) => R) => TypedHandler<V, R
|
|
249
|
+
function withValidator<V extends ValidatorSlots>(validators: V): <R>(handler: (c: CloudContext, input: HandlerInput<V>) => R) => TypedHandler<V, Exclude<Awaited<R>, Response>>;
|
|
250
250
|
}
|
|
251
251
|
/**
|
|
252
252
|
* Identity function that provides type inference for middleware.
|