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
|
@@ -95,14 +95,14 @@ function readCliVersion() {
|
|
|
95
95
|
}
|
|
96
96
|
const VOID_CLI_VERSION = readCliVersion();
|
|
97
97
|
/** The oldest Void platform release this CLI supports. */
|
|
98
|
-
const MIN_PLATFORM_VERSION = "
|
|
98
|
+
const MIN_PLATFORM_VERSION = "1.1.11";
|
|
99
99
|
const RELEASE_VERSION = /^(\d+)\.(\d+)\.(\d+)(-[0-9A-Za-z.-]+)?(\+[0-9A-Za-z.-]+)?$/;
|
|
100
100
|
/**
|
|
101
|
-
*
|
|
102
|
-
* or too old) is kept for the rest of the process, so polling
|
|
103
|
-
* discovery once.
|
|
101
|
+
* Discovery probes keyed by platform base URL. Every outcome (pass,
|
|
102
|
+
* inconclusive, or too old) is kept for the rest of the process, so polling
|
|
103
|
+
* commands probe discovery once.
|
|
104
104
|
*/
|
|
105
|
-
const
|
|
105
|
+
const platformVersionProbes = /* @__PURE__ */ new Map();
|
|
106
106
|
/**
|
|
107
107
|
* Returns whether `version` is older than MIN_PLATFORM_VERSION, or null when
|
|
108
108
|
* it is not a release version. A prerelease sorts before its release.
|
|
@@ -244,15 +244,26 @@ var PlatformClient = class {
|
|
|
244
244
|
}
|
|
245
245
|
/**
|
|
246
246
|
* Checks the platform version once per process and base URL. Concurrent
|
|
247
|
-
* first requests share one
|
|
247
|
+
* first requests share one probe, and its outcome is kept for later requests.
|
|
248
248
|
*/
|
|
249
|
-
ensureSupportedPlatform() {
|
|
250
|
-
|
|
251
|
-
|
|
249
|
+
async ensureSupportedPlatform() {
|
|
250
|
+
assertSupportedPlatform(this.baseUrl, await this.platformProbe());
|
|
251
|
+
}
|
|
252
|
+
platformProbe() {
|
|
253
|
+
const cached = platformVersionProbes.get(this.baseUrl);
|
|
252
254
|
if (cached) return cached;
|
|
253
|
-
const
|
|
254
|
-
|
|
255
|
-
return
|
|
255
|
+
const probe = this.probePlatformVersion();
|
|
256
|
+
platformVersionProbes.set(this.baseUrl, probe);
|
|
257
|
+
return probe;
|
|
258
|
+
}
|
|
259
|
+
/**
|
|
260
|
+
* Whether discovery says the platform accepts Worker modules uploaded to R2.
|
|
261
|
+
* False when discovery omits the field or gave no usable answer.
|
|
262
|
+
*/
|
|
263
|
+
async supportsDirectWorkerUpload() {
|
|
264
|
+
let probe = await this.platformProbe();
|
|
265
|
+
if (probe.kind === "unknown") probe = await this.probePlatformVersion();
|
|
266
|
+
return probe.kind === "version" && probe.directWorkerUpload;
|
|
256
267
|
}
|
|
257
268
|
/** Reads the platform version from public discovery, without credentials. */
|
|
258
269
|
async probePlatformVersion() {
|
|
@@ -270,9 +281,11 @@ var PlatformClient = class {
|
|
|
270
281
|
return { kind: "missing" };
|
|
271
282
|
}
|
|
272
283
|
try {
|
|
284
|
+
const discovery = await readPlatformDiscoveryResponse(this.baseUrl, response);
|
|
273
285
|
return {
|
|
274
286
|
kind: "version",
|
|
275
|
-
version:
|
|
287
|
+
version: discovery.platformVersion,
|
|
288
|
+
directWorkerUpload: discovery.directWorkerUpload === true
|
|
276
289
|
};
|
|
277
290
|
} catch {
|
|
278
291
|
return { kind: "unknown" };
|
|
@@ -518,6 +531,38 @@ var PlatformClient = class {
|
|
|
518
531
|
if (!res.ok) await throwPlatformApiError("Failed to request upload URLs", res, "deploy");
|
|
519
532
|
return (await res.json()).urls;
|
|
520
533
|
}
|
|
534
|
+
/**
|
|
535
|
+
* Requests one presigned R2 PUT per Worker module, in `modules` order. The
|
|
536
|
+
* platform refuses a Worker over Cloudflare's size limit here (413
|
|
537
|
+
* `worker_too_large`), before any bytes are uploaded.
|
|
538
|
+
*/
|
|
539
|
+
async requestWorkerUploadUrls(projectId, modules) {
|
|
540
|
+
const url = `${this.baseUrl}/projects/${projectId}/deploy/worker-upload-urls`;
|
|
541
|
+
this.cliLog?.info("worker_upload_urls_post", {
|
|
542
|
+
url,
|
|
543
|
+
moduleCount: modules.length
|
|
544
|
+
});
|
|
545
|
+
const request = { modules };
|
|
546
|
+
const res = await this.request(url, {
|
|
547
|
+
method: "POST",
|
|
548
|
+
headers: {
|
|
549
|
+
"Content-Type": "application/json",
|
|
550
|
+
...this.authHeaders
|
|
551
|
+
},
|
|
552
|
+
body: JSON.stringify(request)
|
|
553
|
+
});
|
|
554
|
+
this.cliLog?.info("worker_upload_urls_response", {
|
|
555
|
+
status: res.status,
|
|
556
|
+
cfRay: res.headers.get("cf-ray")
|
|
557
|
+
});
|
|
558
|
+
if (!res.ok) await throwPlatformApiError("Failed to request worker upload URLs", res, "deploy");
|
|
559
|
+
const json = await res.json();
|
|
560
|
+
if (typeof json?.id !== "string" || !json.id || !Array.isArray(json.urls) || json.urls.length !== modules.length || !json.urls.every((entry) => typeof entry?.url === "string" && typeof entry.headers === "object" && !!entry.headers)) throw new Error("Invalid worker upload URLs from platform.");
|
|
561
|
+
return {
|
|
562
|
+
id: json.id,
|
|
563
|
+
urls: json.urls
|
|
564
|
+
};
|
|
565
|
+
}
|
|
521
566
|
async *finalizeDeploy(projectId, payload) {
|
|
522
567
|
const url = `${this.baseUrl}/projects/${projectId}/deploy`;
|
|
523
568
|
yield* this.streamDeployRequest(url, projectId, {
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export { r as PlatformClient } from "./client-BdzxubTS.mjs";
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { i as isCleanCloudflareExit, l as resolveCloudflareOperationArgv, n as decodeCloudflareOperationResult, r as encodeCloudflareOperation, t as createCloudflareProcessRunner } from "./cloudflare-process-
|
|
1
|
+
import { i as isCleanCloudflareExit, l as resolveCloudflareOperationArgv, n as decodeCloudflareOperationResult, r as encodeCloudflareOperation, t as createCloudflareProcessRunner } from "./cloudflare-process-CZJ4viYl.mjs";
|
|
2
2
|
import { execFile, spawn } from "node:child_process";
|
|
3
3
|
//#region src/cli/cloudflare-auth.ts
|
|
4
4
|
var CloudflareAuthenticationError = class extends Error {
|
|
@@ -1,9 +1,9 @@
|
|
|
1
1
|
import { t as basename } from "./dist-ipQi0Q8y.mjs";
|
|
2
|
-
import { b as readRootWranglerConfig } from "./wrangler-
|
|
2
|
+
import { b as readRootWranglerConfig } from "./wrangler-C9XSzrju.mjs";
|
|
3
3
|
import { L as log } from "./dist-BVdsO7Py.mjs";
|
|
4
|
-
import { m as printSuccess } from "./output-
|
|
5
|
-
import { i as isCleanCloudflareExit } from "./cloudflare-process-
|
|
6
|
-
import { a as parseCloudflareAuthSession, i as ensureCloudflareAuthentication, n as cloudflareCredentialOverrides, r as createBundledCloudflareAuthRunner } from "./cloudflare-auth-
|
|
4
|
+
import { m as printSuccess } from "./output-CKguMgr7.mjs";
|
|
5
|
+
import { i as isCleanCloudflareExit } from "./cloudflare-process-CZJ4viYl.mjs";
|
|
6
|
+
import { a as parseCloudflareAuthSession, i as ensureCloudflareAuthentication, n as cloudflareCredentialOverrides, r as createBundledCloudflareAuthRunner } from "./cloudflare-auth-DSvBc1Gu.mjs";
|
|
7
7
|
//#region src/cli/cloudflare-cmd.ts
|
|
8
8
|
async function runCloudflareCommand(root, args) {
|
|
9
9
|
const runWrangler = createBundledCloudflareAuthRunner(root);
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import { a as join } from "./dist-ipQi0Q8y.mjs";
|
|
2
|
-
import "./project-paths-
|
|
3
|
-
import { d as readConfig } from "./config-
|
|
2
|
+
import "./project-paths-DGu_QZ_Q.mjs";
|
|
3
|
+
import { d as readConfig } from "./config-D26zcdKy.mjs";
|
|
4
4
|
import { t as writeFileAtomic } from "./atomic-write-Dq6R0BPN.mjs";
|
|
5
5
|
import { t as parseJsoncObject } from "./generated-wrangler-config-DeWj5F9Y.mjs";
|
|
6
6
|
import { existsSync, mkdirSync, readFileSync, rmSync } from "node:fs";
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
import { a as join, t as basename } from "./dist-ipQi0Q8y.mjs";
|
|
2
|
-
import { b as readRootWranglerConfig, i as LATEST_KNOWN_COMPAT_DATE, j as writeProvisionedWranglerConfig } from "./wrangler-
|
|
2
|
+
import { b as readRootWranglerConfig, i as LATEST_KNOWN_COMPAT_DATE, j as writeProvisionedWranglerConfig } from "./wrangler-C9XSzrju.mjs";
|
|
3
3
|
import { K as select, L as log, tt as isCancel } from "./dist-BVdsO7Py.mjs";
|
|
4
|
-
import { i as ensureCloudflareAuthentication, r as createBundledCloudflareAuthRunner } from "./cloudflare-auth-
|
|
4
|
+
import { i as ensureCloudflareAuthentication, r as createBundledCloudflareAuthRunner } from "./cloudflare-auth-DSvBc1Gu.mjs";
|
|
5
5
|
import { existsSync } from "node:fs";
|
|
6
6
|
//#region src/cli/cloudflare-connect.ts
|
|
7
7
|
async function connectCloudflare(root, interactive = Boolean(process.stdin.isTTY)) {
|
|
@@ -1 +1 @@
|
|
|
1
|
-
export { t as activateCloudflareExistingVersion, n as applyCloudflareD1Migrations, r as changeCloudflareDomain, o as deleteCloudflareSecret, s as executeCloudflareD1Sql, c as listCloudflareDomains, l as listCloudflareSecrets, m as putCloudflareSecret, h as readCloudflareD1Migrations, g as readCloudflareWorkerStatus, _ as resolveCloudflareD1Context, v as resolveCloudflareOperationContext, y as
|
|
1
|
+
export { t as activateCloudflareExistingVersion, n as applyCloudflareD1Migrations, r as changeCloudflareDomain, o as deleteCloudflareSecret, s as executeCloudflareD1Sql, c as listCloudflareDomains, l as listCloudflareSecrets, m as putCloudflareSecret, h as readCloudflareD1Migrations, g as readCloudflareWorkerStatus, _ as resolveCloudflareD1Context, v as resolveCloudflareOperationContext, y as restoreCloudflareD1Database, b as syncCloudflareSecrets, x as tailCloudflareWorker } from "./cloudflare-operations-D5PLrOqD.mjs";
|
|
@@ -1,10 +1,10 @@
|
|
|
1
1
|
import { a as join } from "./dist-ipQi0Q8y.mjs";
|
|
2
|
-
import { i as persistCloudflareConfig, r as materializeCloudflareConfig } from "./cloudflare-config-
|
|
3
|
-
import { A as updateWranglerCustomDomain, M as writeWranglerPublishedTrafficSnapshot, S as readWranglerCustomDomains, w as readWranglerPublishedTrafficSnapshot } from "./wrangler-
|
|
4
|
-
import { u as getErrorMessage } from "./output-
|
|
5
|
-
import { t as createCloudflareProcessRunner } from "./cloudflare-process-
|
|
6
|
-
import {
|
|
7
|
-
import { a as findWranglerCiOverrideDotenvFile, i as findAmbientConfigOverride } from "./deploy-transport-
|
|
2
|
+
import { i as persistCloudflareConfig, r as materializeCloudflareConfig } from "./cloudflare-config-rdFOys4X.mjs";
|
|
3
|
+
import { A as updateWranglerCustomDomain, M as writeWranglerPublishedTrafficSnapshot, S as readWranglerCustomDomains, w as readWranglerPublishedTrafficSnapshot } from "./wrangler-C9XSzrju.mjs";
|
|
4
|
+
import { u as getErrorMessage } from "./output-CKguMgr7.mjs";
|
|
5
|
+
import { t as createCloudflareProcessRunner } from "./cloudflare-process-CZJ4viYl.mjs";
|
|
6
|
+
import { _ as provisionEnv, r as assertNoTransportRedirectInProjectDotenv, s as deleteEnvVarCaseAware, v as resolvePinnedApiBaseUrl } from "./provision-DZKYCEJg.mjs";
|
|
7
|
+
import { a as findWranglerCiOverrideDotenvFile, i as findAmbientConfigOverride } from "./deploy-transport-B3mtEi_q.mjs";
|
|
8
8
|
import { existsSync, mkdtempSync, readFileSync, rmSync, writeFileSync } from "node:fs";
|
|
9
9
|
import { tmpdir } from "node:os";
|
|
10
10
|
import { deployCloudflareVersionTraffic, encodeCloudflareVersionMessage, parseCloudflareVersionMessage, parseRootWranglerConfig, readBindingFieldPresence, readCloudflareTriggerConfig, readWranglerTopLevelString, resolveD1MigrateTarget, stabilizeCloudflareVersionTriggers } from "@void/deploy-cloudflare";
|
|
@@ -78,7 +78,7 @@ function resolveCloudflareD1Context(root, binding, runner) {
|
|
|
78
78
|
operation,
|
|
79
79
|
binding,
|
|
80
80
|
migrateToken: target.token,
|
|
81
|
-
migrationsDir: migrationsDir.present ? migrationsDir.value :
|
|
81
|
+
migrationsDir: migrationsDir.present ? migrationsDir.value : void 0,
|
|
82
82
|
migrationsTable: migrationsTable.present ? migrationsTable.value : "d1_migrations"
|
|
83
83
|
};
|
|
84
84
|
}
|
|
@@ -115,6 +115,16 @@ async function applyCloudflareD1Migrations(context) {
|
|
|
115
115
|
configPath: context.operation.configPath
|
|
116
116
|
}, { capture: false });
|
|
117
117
|
}
|
|
118
|
+
/** Restore the D1 database with Time Travel. Returns the bookmark that undoes the restore. */
|
|
119
|
+
async function restoreCloudflareD1Database(context, target) {
|
|
120
|
+
const previous = (await run(context.operation, {
|
|
121
|
+
type: "d1.time-travel.restore",
|
|
122
|
+
database: context.migrateToken,
|
|
123
|
+
target,
|
|
124
|
+
configPath: context.operation.configPath
|
|
125
|
+
})).data?.previousBookmark;
|
|
126
|
+
return typeof previous === "string" ? previous : void 0;
|
|
127
|
+
}
|
|
118
128
|
async function readCloudflareWorkerStatus(context) {
|
|
119
129
|
const [deployment, deployments, versions] = await Promise.all([
|
|
120
130
|
run(context, {
|
|
@@ -439,4 +449,4 @@ function failedOperationResult(error) {
|
|
|
439
449
|
};
|
|
440
450
|
}
|
|
441
451
|
//#endregion
|
|
442
|
-
export { resolveCloudflareD1Context as _, createCloudflareEmptyDomainPublisher as a,
|
|
452
|
+
export { resolveCloudflareD1Context as _, createCloudflareEmptyDomainPublisher as a, syncCloudflareSecrets as b, listCloudflareDomains as c, parseCloudflareDeployedVersionIds as d, parseCloudflareVersions as f, readCloudflareWorkerStatus as g, readCloudflareD1Migrations as h, createCloudflareEmptyCronPublisher as i, listCloudflareSecrets as l, putCloudflareSecret as m, applyCloudflareD1Migrations as n, deleteCloudflareSecret as o, publishEmptyCloudflareCustomDomainSet as p, changeCloudflareDomain as r, executeCloudflareD1Sql as s, activateCloudflareExistingVersion as t, parseActiveVersionId as u, resolveCloudflareOperationContext as v, tailCloudflareWorker as x, restoreCloudflareD1Database as y };
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import { a as join, c as resolve, n as dirname, s as relative } from "./dist-ipQi0Q8y.mjs";
|
|
2
|
-
import { n as readProjectPaths } from "./project-paths-
|
|
3
|
-
import { i as hasSsrEntry, r as getSsrServerEntryPath } from "./entry-
|
|
2
|
+
import { n as readProjectPaths } from "./project-paths-DGu_QZ_Q.mjs";
|
|
3
|
+
import { i as hasSsrEntry, r as getSsrServerEntryPath } from "./entry-B_0IhV64.mjs";
|
|
4
4
|
import { i as readPackageJson, n as hasPackageDependency, t as getPackageDependencies } from "./package-json-BjYqR-So.mjs";
|
|
5
5
|
import { existsSync } from "node:fs";
|
|
6
6
|
import { fileURLToPath } from "node:url";
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export { t as collectMigrations } from "./collect-Dew86qce.mjs";
|
|
@@ -16,15 +16,16 @@ function collectMigrations(migrationsDir) {
|
|
|
16
16
|
* Read `db/migrations/meta/_journal.json` if it exists. Drizzle maintains
|
|
17
17
|
* this file whenever `drizzle-kit generate` runs; every `.sql` migration
|
|
18
18
|
* under `db/migrations/` should correspond to an entry whose `tag` is the
|
|
19
|
-
* filename without the `.sql` suffix.
|
|
19
|
+
* filename without the `.sql` suffix. `sourceRelative` adds the configured
|
|
20
|
+
* `sourceDir` to the path in the parse error.
|
|
20
21
|
*/
|
|
21
|
-
function readJournal(migrationsDir) {
|
|
22
|
+
function readJournal(migrationsDir, sourceRelative = (path) => path) {
|
|
22
23
|
const journalPath = join(migrationsDir, "meta", "_journal.json");
|
|
23
24
|
if (!existsSync(journalPath)) return;
|
|
24
25
|
try {
|
|
25
26
|
return JSON.parse(readFileSync(journalPath, "utf-8"));
|
|
26
27
|
} catch (err) {
|
|
27
|
-
throw new Error(`db: Failed to parse db/migrations/meta/_journal.json: '${err.message}'.`);
|
|
28
|
+
throw new Error(`db: Failed to parse ${sourceRelative("db/migrations/meta/_journal.json")}: '${err.message}'.`);
|
|
28
29
|
}
|
|
29
30
|
}
|
|
30
31
|
/**
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { n as readProjectPaths } from "./project-paths-
|
|
1
|
+
import { n as readProjectPaths } from "./project-paths-DGu_QZ_Q.mjs";
|
|
2
2
|
import { existsSync, readFileSync } from "node:fs";
|
|
3
3
|
import { pathToFileURL } from "node:url";
|
|
4
4
|
import { parseSync } from "vite";
|
|
@@ -1,5 +1,5 @@
|
|
|
1
|
-
import { a as validateSourceDir, c as loadVoidConfig } from "./project-paths-
|
|
2
|
-
import {
|
|
1
|
+
import { a as validateSourceDir, c as loadVoidConfig } from "./project-paths-DGu_QZ_Q.mjs";
|
|
2
|
+
import { a as isVoidAuthProvider, t as VOID_AUTH_PROVIDERS } from "./providers-BUHwJlmM.mjs";
|
|
3
3
|
import { n as MimeError, s as parseAddress } from "./mime-srOklVVv.mjs";
|
|
4
4
|
import { isRecord } from "@void/deploy-core";
|
|
5
5
|
//#region src/config.ts
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import { a as join, s as relative } from "./dist-ipQi0Q8y.mjs";
|
|
2
|
-
import { n as readProjectPaths } from "./project-paths-
|
|
3
|
-
import { n as schemaSpecifier, t as discoverSchema } from "./discover-
|
|
2
|
+
import { n as readProjectPaths } from "./project-paths-DGu_QZ_Q.mjs";
|
|
3
|
+
import { n as schemaSpecifier, t as discoverSchema } from "./discover-LaV0tbIu.mjs";
|
|
4
4
|
import { mkdirSync, mkdtempSync, readFileSync, rmSync, writeFileSync } from "node:fs";
|
|
5
5
|
import { tmpdir } from "node:os";
|
|
6
6
|
//#region src/drizzle/config.ts
|
|
@@ -1 +1 @@
|
|
|
1
|
-
export { t as PLACEHOLDER_DB_URL, n as withPrivateDrizzleConfig, r as writeDrizzleConfig } from "./config-
|
|
1
|
+
export { t as PLACEHOLDER_DB_URL, n as withPrivateDrizzleConfig, r as writeDrizzleConfig } from "./config-DC5llZaI.mjs";
|
|
@@ -2,11 +2,11 @@ import { c as normalizePlatformApiUrl, s as listPlatformConnections } from "./pl
|
|
|
2
2
|
import { c as writeDeploymentPlatform, l as writePlatformSelection, n as readDeploymentPlatform } from "./project-rqDnVsJN.mjs";
|
|
3
3
|
import { d as readPlatformToken } from "./auth-B6iOCjKI.mjs";
|
|
4
4
|
import { K as select, L as log, tt as isCancel } from "./dist-BVdsO7Py.mjs";
|
|
5
|
-
import { m as printSuccess } from "./output-
|
|
6
|
-
import { a as isExpiredTokenError, r as PlatformClient } from "./client-
|
|
7
|
-
import { t as promptForLoginToken } from "./login-
|
|
8
|
-
import { i as saveDiscoveredPlatform, n as promptPlatformUrl, t as discoverPlatform } from "./platform-cmd-
|
|
9
|
-
import { t as connectCloudflare } from "./cloudflare-connect-
|
|
5
|
+
import { m as printSuccess } from "./output-CKguMgr7.mjs";
|
|
6
|
+
import { a as isExpiredTokenError, r as PlatformClient } from "./client-BdzxubTS.mjs";
|
|
7
|
+
import { t as promptForLoginToken } from "./login-f2eu2TQh.mjs";
|
|
8
|
+
import { i as saveDiscoveredPlatform, n as promptPlatformUrl, t as discoverPlatform } from "./platform-cmd-CX7phm7V.mjs";
|
|
9
|
+
import { t as connectCloudflare } from "./cloudflare-connect-BN-k2kD-.mjs";
|
|
10
10
|
//#region src/cli/connect.ts
|
|
11
11
|
async function selectVoidPlatform(interactive) {
|
|
12
12
|
if (!interactive) throw new Error("connect: Supply a Void platform URL in non-interactive mode.");
|
|
@@ -1 +1 @@
|
|
|
1
|
-
export { t as createProjectWithSlugRetry } from "./create-project-
|
|
1
|
+
export { t as createProjectWithSlugRetry } from "./create-project-D8jQTwVQ.mjs";
|
|
@@ -1,8 +1,8 @@
|
|
|
1
1
|
import { t as attachSelectedPlatform, u as writeProjectConfig } from "./project-rqDnVsJN.mjs";
|
|
2
2
|
import { s as getSiteDomain } 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, h as sanitizeTerminalText } from "./output-
|
|
5
|
-
import { n as PlatformApiError } from "./client-
|
|
4
|
+
import { f as import_picocolors, h as sanitizeTerminalText } from "./output-CKguMgr7.mjs";
|
|
5
|
+
import { n as PlatformApiError } from "./client-BdzxubTS.mjs";
|
|
6
6
|
import { t as validateProjectSlug } from "./project-slug-23TpquG4.mjs";
|
|
7
7
|
import { n as inferDefaultSlug } from "./resolve-project-WpwkCB_c.mjs";
|
|
8
8
|
//#region src/cli/prompt.ts
|
|
@@ -7,8 +7,14 @@ export type DatabaseProvisionOptions = {
|
|
|
7
7
|
signal?: AbortSignal;
|
|
8
8
|
};
|
|
9
9
|
export type DatabaseProvisionResult = {
|
|
10
|
+
/** Connection string that `void db connect` saves as `DATABASE_URL`. */
|
|
10
11
|
connectionString: string;
|
|
12
|
+
/**
|
|
13
|
+
* @deprecated Void does not read this field. Put a provider console link in
|
|
14
|
+
* `dashboardUrl` instead. Removed in the next major version.
|
|
15
|
+
*/
|
|
11
16
|
projectId?: string;
|
|
17
|
+
/** Provider console URL that `void db connect` prints after provisioning. */
|
|
12
18
|
dashboardUrl?: string;
|
|
13
19
|
};
|
|
14
20
|
export type DatabaseProviderAdapter = {
|