void 1.2.1 → 1.4.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/{account-cmd-CdUll_35.mjs → account-cmd-HP8bixYo.mjs} +3 -3
- package/dist/{application-analysis-fEqoSeMp.mjs → application-analysis-DDOQwiXk.mjs} +18 -12
- package/dist/{application-routing-DAhNP4u3.mjs → application-routing-4719u_kf.mjs} +3 -1
- package/dist/auth-g2TQbDLD.d.mts +70 -0
- package/dist/{auth-link-C87vGXM-.mjs → auth-link-CedYpDCy.mjs} +3 -3
- package/dist/{auth-router-6I81r-ix.mjs → auth-router-vafo7x8w.mjs} +11 -6
- package/dist/{better-auth-shared-D-6z0q0f.mjs → better-auth-shared-7FM3Uk2N.mjs} +48 -2
- package/dist/{better-auth-shared-DVk2DkTW.d.mts → better-auth-shared-BHB8kiTE.d.mts} +1 -1
- package/dist/{build-cmd-ex1g-j_e.mjs → build-cmd-9vUAQ1_V.mjs} +1 -1
- package/dist/{cache-oHzrnY3z.mjs → cache-jvwLNb0h.mjs} +1 -1
- package/dist/{cancel-deploy-viAMD0Q_.mjs → cancel-deploy-Dw0UmWKO.mjs} +1 -1
- package/dist/{cf-build-output-BhVxldCw.mjs → cf-build-output-XpNR9zoh.mjs} +122 -5
- package/dist/cf-build-output-bd8Uwv1P.mjs +1 -0
- package/dist/{cf-worker-settings-BECvvTVd.mjs → cf-worker-settings-Dg27RzyT.mjs} +11 -5
- package/dist/cli/cli.mjs +41 -32
- package/dist/cli/cloudflare-operation-process.mjs +35 -8
- package/dist/cli/env-schema-probe.mjs +2 -2
- package/dist/{client-BEkdj1kx.mjs → client-B3LnB_bE.mjs} +8 -1
- package/dist/client-BZb9j66F.mjs +1 -0
- package/dist/{cloudflare-auth-Byo_0_N9.mjs → cloudflare-auth-DyD_kVFr.mjs} +1 -1
- package/dist/{cloudflare-cmd-DMzCv12s.mjs → cloudflare-cmd-D-b_u3T4.mjs} +2 -2
- package/dist/{cloudflare-config-DchHxPTo.mjs → cloudflare-config-CH1AylZT.mjs} +14 -3
- package/dist/{cloudflare-connect-CCRTVg-I.mjs → cloudflare-connect-zTJh8UnN.mjs} +2 -2
- package/dist/{cloudflare-operations-Dh9dEHJj.mjs → cloudflare-operations-Bc-7fN44.mjs} +4 -4
- package/dist/{cloudflare-operations-DsSaw2BT.mjs → cloudflare-operations-BtulCNOg.mjs} +1 -1
- package/dist/{config-BU6hMu1W.mjs → config-BV2ASlpn.mjs} +1 -1
- package/dist/{config-DQfHOKh9.d.mts → config-CAdZVTLN.d.mts} +4 -1
- package/dist/config-D-6q7EBH.mjs +87 -0
- package/dist/{config-DHgSEWT7.mjs → config-OFOAimzt.mjs} +5 -3
- package/dist/config-entry.d.mts +1 -1
- package/dist/{config-BIaXIkkv.mjs → config-tqMM6DwY.mjs} +1 -1
- package/dist/{connect-k7R2rPVA.mjs → connect-BOM6zvFX.mjs} +4 -4
- package/dist/{create-project-DV71ol5d.mjs → create-project-Bxd02EHN.mjs} +1 -1
- package/dist/{create-project-DTuy-l0z.mjs → create-project-C2K0DN2O.mjs} +1 -1
- package/dist/{db-DVOkLH5X.mjs → db-Cdvr3zwG.mjs} +18 -18
- package/dist/{db-types-NGxPwnlt.mjs → db-types-0eCiqYb1.mjs} +1 -1
- package/dist/{delete-BbP5eopu.mjs → delete-lETE6Tpt.mjs} +1 -1
- package/dist/deploy-CX94CmKa.mjs +2 -0
- package/dist/{deploy-7H32EnUs.mjs → deploy-CdM-LAxX.mjs} +473 -148
- package/dist/{deploy-managed-static-DlvcvnQT.mjs → deploy-managed-static-DjeBFG2c.mjs} +43 -20
- package/dist/{deploy-transport-BzGEj0Ge.mjs → deploy-transport-DIq_gFTP.mjs} +14 -13
- package/dist/deploy.d.mts +2 -0
- package/dist/deploy.mjs +8 -5
- package/dist/{dispatch-DoUnxTNo.mjs → dispatch-CLa2LThw.mjs} +76 -7
- package/dist/{domain-CA2wBgra.mjs → domain-DyhNtdYf.mjs} +2 -2
- package/dist/{email-DXpCc77w.mjs → email-DM2wDcBN.mjs} +59 -10
- package/dist/{email-cloudflare-D03g2TkS.mjs → email-cloudflare-PMbAev9Q.mjs} +124 -10
- package/dist/{env-DgOQ9_8S.mjs → env-78hbN-oI.mjs} +3 -3
- package/dist/{env-BJjULvL0.mjs → env-BaMz0j7H.mjs} +6 -1
- package/dist/{env-validation-Dwq3PJzK.mjs → env-validation-B3VobvXm.mjs} +2 -1
- package/dist/{env-validation-BmsdCZEk.mjs → env-validation-BUfFZ6bt.mjs} +1 -1
- package/dist/error-pages-CLIJ7aYq.mjs +37 -0
- package/dist/gen-BhWBT4iu.mjs +1 -0
- package/dist/{gen-BfmcIi2g.mjs → gen-CFmsUsW1.mjs} +3 -3
- package/dist/{github-cmd-CY9LUqLh.mjs → github-cmd-De-_IWbM.mjs} +1 -1
- package/dist/{handler-BbkSPzGF.d.mts → handler-BHktmuTL.d.mts} +4 -2
- package/dist/{headers-D522zd0A.mjs → headers--vaK_chu.mjs} +1 -1
- package/dist/{help-CxSlPpzJ.mjs → help-CKbrhZha.mjs} +16 -1
- package/dist/help-qOZr3wng.mjs +1 -0
- package/dist/index.d.mts +3 -5
- package/dist/index.mjs +370 -140
- package/dist/{info-7VDlhtyy.mjs → info-Yg0-V5Rs.mjs} +4 -4
- package/dist/{init-DxYyOs4-.mjs → init-CDiJQycf.mjs} +241 -206
- package/dist/{link-Ddmod1dZ.mjs → link-Dllip08S.mjs} +2 -2
- package/dist/{list-MogaugiO.mjs → list-BYRP6am0.mjs} +2 -2
- package/dist/{live-Bt8Y_0bg.d.mts → live-BllfDuzA.d.mts} +2 -2
- package/dist/{local-d1-BHBnKWRb.mjs → local-d1-CAwAs9GH.mjs} +1 -1
- package/dist/login-BAPmYnb7.mjs +1 -0
- package/dist/{login-Cttnagmm.mjs → login-PcFy5mlC.mjs} +2 -2
- package/dist/{logs-CAszUWZI.mjs → logs-DmJTBhed.mjs} +2 -2
- package/dist/{migrate-DyT2jJ8y.mjs → migrate-B8S2xTcb.mjs} +5 -66
- package/dist/migrate-BIYTPQE6.mjs +1 -0
- package/dist/nitro.mjs +4 -4
- package/dist/{node-WB7c2N4L.mjs → node-CDOPrGSl.mjs} +5 -5
- package/dist/{operator-args-UnE8Y2eK.mjs → operator-args-BsJIYXaT.mjs} +8 -1
- package/dist/operator-cmd-CjazwOyb.mjs +1 -0
- package/dist/{operator-cmd-skshjMGl.mjs → operator-cmd-DmkmS2wL.mjs} +4 -3
- package/dist/pages/client.d.mts +32 -4
- package/dist/pages/client.mjs +186 -29
- package/dist/pages/index.d.mts +34 -2
- package/dist/pages/index.mjs +96 -55
- package/dist/pages/islands-plugin.d.mts +1 -1
- package/dist/pages/islands-plugin.mjs +9 -3
- package/dist/pages/protocol.d.mts +2 -2
- package/dist/platform-args-BC8_hsDj.mjs +1 -0
- package/dist/{platform-args-DVbVClZl.mjs → platform-args-BMD2gjc_.mjs} +1 -1
- package/dist/{platform-auth-config-C-pm5Qzx.mjs → platform-auth-config-CImnfohz.mjs} +3 -3
- package/dist/{platform-auth-protection-SHhvim1L.mjs → platform-auth-protection-BogLhtHi.mjs} +2 -2
- package/dist/{platform-auth-recovery-DXVWs-wA.mjs → platform-auth-recovery-B-mEaWEi.mjs} +2 -2
- package/dist/{platform-cmd-PiNRkopU.mjs → platform-cmd-CV8NxIIn.mjs} +1 -1
- package/dist/{platform-cmd-D5I1beUX.mjs → platform-cmd-DZK2ixMl.mjs} +4 -4
- package/dist/{platform-domain-jpmBfZeb.mjs → platform-domain-CRvelPGE.mjs} +2 -2
- package/dist/{platform-lifecycle-DyKmuNY6.mjs → platform-lifecycle-CPYY7E9B.mjs} +103 -41
- package/dist/{platform-lifecycle-DH3Yr1qQ.mjs → platform-lifecycle-DwXq7kZt.mjs} +1 -1
- package/dist/{platform-management--vDwSn35.mjs → platform-management-BOnGbMSM.mjs} +1 -1
- package/dist/{platform-management-7m-PLaPJ.mjs → platform-management-lXdgGgAM.mjs} +1 -1
- package/dist/{platform-recovery-BiNpZZab.mjs → platform-recovery-noaALXnE.mjs} +2 -2
- package/dist/{plugin-inference-DUjCd55H.mjs → plugin-inference-CeiB6BG5.mjs} +53 -18
- package/dist/{prepare-BcAE5Sdj.mjs → prepare-BuOS18AM.mjs} +1 -1
- package/dist/{prepare-DA-17DhO.mjs → prepare-D604Yiyr.mjs} +12 -8
- package/dist/prepare-DU-tOpS5.mjs +1 -0
- package/dist/{prerender-render-Cijv7UFo.mjs → prerender-render-CaShbHJ3.mjs} +13 -1
- package/dist/prerender-render.d.mts +1 -0
- package/dist/prerender-render.mjs +1 -1
- package/dist/{project-cmd-DA4K5faU.mjs → project-cmd-DBYqAIbe.mjs} +15 -15
- package/dist/{project-team-CQBNveX3.mjs → project-team-BjCLgTRC.mjs} +1 -1
- package/dist/{project-token-CCalFyQf.mjs → project-token-BB6PwaA9.mjs} +1 -1
- package/dist/{project-tsconfig-Itv1f4WC.mjs → project-tsconfig-CVvk6Z_e.mjs} +24 -2
- package/dist/{project-zero-trust-DPnkiEuT.mjs → project-zero-trust-CWDh1P_t.mjs} +1 -1
- package/dist/{protocol-BBDpJz3G.d.mts → protocol-D5XDySYu.d.mts} +2 -2
- package/dist/{provision-BFLCrnUp.mjs → provision-DfxLCg-d.mjs} +1 -1
- package/dist/{provision-DtROpNNI.mjs → provision-DztLJ97X.mjs} +24 -8
- package/dist/{requests-BpH0kImL.mjs → requests-D_pbzDyz.mjs} +1 -1
- package/dist/{rollback-CXS1tAa-.mjs → rollback-CjfIYsJx.mjs} +2 -2
- package/dist/{route-types-BZi26DVS.mjs → route-types-DvEGmPif.mjs} +109 -30
- package/dist/routes-stub.d.mts +22 -13
- package/dist/runtime/auth.d.mts +2 -2
- package/dist/runtime/better-auth-mysql.d.mts +1 -1
- package/dist/runtime/better-auth-mysql.mjs +1 -1
- package/dist/runtime/better-auth-pg.d.mts +1 -1
- package/dist/runtime/better-auth-pg.mjs +1 -1
- package/dist/runtime/better-auth.d.mts +1 -1
- package/dist/runtime/better-auth.mjs +1 -1
- package/dist/runtime/client-react.d.mts +1 -1
- package/dist/runtime/client-solid.d.mts +1 -1
- package/dist/runtime/client-svelte.d.mts +1 -1
- package/dist/runtime/client-vue.d.mts +1 -1
- package/dist/runtime/client.d.mts +1 -1
- 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/log.mjs +19 -1
- package/dist/runtime/routing.d.mts +5 -4
- package/dist/runtime/routing.mjs +14 -73
- package/dist/runtime/validator.d.mts +1 -1
- package/dist/runtime/ws-server.d.mts +3 -3
- package/dist/runtime/ws.d.mts +1 -1
- package/dist/runtime/ws.mjs +4 -2
- package/dist/{scan-8IzYXiU_.mjs → scan-N9WzdcAl.mjs} +302 -23
- package/dist/{secret-BbXHfLAt.mjs → secret-3X0PxmuX.mjs} +9 -12
- package/dist/static-asset-marker-Btf-6oCD.mjs +32 -0
- package/dist/{types-7AIz0OZu.d.mts → types-w72dljaA.d.mts} +6 -1
- package/dist/{version-metadata-tS39iW09.mjs → version-metadata-D2vfMQzv.mjs} +2 -1
- package/dist/worker-conditions-AWFRcFxR.mjs +11 -0
- package/dist/{wrangler-F96NnLyb.mjs → wrangler-I-scB_1t.mjs} +82 -13
- package/dist/wrangler-UnwdISay.mjs +1 -0
- package/dist/{wrapper-D3sZyh2C.mjs → wrapper-BBl1rC32.mjs} +8 -12
- package/dist/{ws-BH-im_tX.d.mts → ws-B3ClMVDh.d.mts} +3 -2
- package/docs/guide/auth.md +4 -2
- package/docs/guide/edge/redirects.md +22 -0
- package/docs/guide/edge/static-assets.md +10 -0
- package/docs/guide/email/domains.md +1 -1
- package/docs/guide/email/receiving.md +2 -0
- package/docs/guide/email/sending.md +1 -1
- package/docs/guide/pages-routing/actions-and-forms.md +43 -13
- package/docs/guide/pages-routing/markdown.md +2 -0
- package/docs/guide/pages-routing/overview.md +33 -2
- package/docs/guide/platform/administration/email.md +18 -0
- package/docs/guide/platform/installation/maintenance.md +3 -1
- package/docs/guide/platform/installation/prerequisites.md +9 -4
- package/docs/guide/platform/installation/uninstall.md +2 -0
- package/docs/guide/queues.md +13 -1
- package/docs/guide/server-routing.md +40 -2
- package/docs/guide/ssg.md +8 -0
- package/docs/guide/type-safety.md +7 -7
- package/docs/guide/websockets.md +4 -2
- package/docs/integrations/cloudflare.md +16 -7
- package/docs/reference/api/auth.md +6 -2
- package/docs/reference/api/deploy.md +9 -5
- package/docs/reference/api/pages.md +6 -4
- package/docs/reference/cli/deploy.md +10 -9
- package/docs/reference/cli/email.md +13 -0
- package/docs/reference/cli/platform-email.md +2 -2
- package/docs/reference/cli.md +1 -0
- package/docs/reference/config.md +11 -1
- package/docs/reference/structure.md +3 -1
- package/package.json +9 -7
- package/schema.json +4 -0
- package/skills/void/SKILL.md +1 -1
- package/templates/assets/icons.svg +49 -0
- package/templates/assets/react.svg +1 -0
- package/templates/assets/solid.svg +1 -0
- package/templates/assets/stack.svg +35 -0
- package/templates/assets/svelte.svg +1 -0
- package/templates/assets/void.svg +5 -0
- package/templates/assets/vue.svg +1 -0
- package/dist/auth-DkcFflXV.d.mts +0 -42
- package/dist/cf-build-output-BJHuSsVN.mjs +0 -1
- package/dist/client-BiRDZTSd.mjs +0 -1
- package/dist/config-CyUJzi3q.mjs +0 -32
- package/dist/deploy-CE0Ev0Ob.mjs +0 -2
- package/dist/gen-NrOlWZaG.mjs +0 -1
- package/dist/help-BeAFFE5C.mjs +0 -1
- package/dist/login-DgDwlKc_.mjs +0 -1
- package/dist/migrate-n49ZeS1X.mjs +0 -1
- package/dist/operator-cmd-d2MvJOrl.mjs +0 -1
- package/dist/parse-filename-DioPHiR9.mjs +0 -77
- package/dist/platform-args-kQrgxScY.mjs +0 -1
- package/dist/prepare-C4I0f--h.mjs +0 -1
- package/dist/wrangler-BLb3_luP.mjs +0 -1
|
@@ -1,29 +1,29 @@
|
|
|
1
1
|
import { a as join, c as resolve, n as dirname, r as extname, s as relative } from "./dist-ipQi0Q8y.mjs";
|
|
2
|
-
import {
|
|
2
|
+
import { h as needsApplicationDatabase } from "./plugin-inference-CeiB6BG5.mjs";
|
|
3
3
|
import { n as readProjectPaths } from "./project-paths-DGu_QZ_Q.mjs";
|
|
4
|
-
import {
|
|
4
|
+
import { t as discoverSchema } from "./discover-LaV0tbIu.mjs";
|
|
5
|
+
import { u as isNodeTarget } from "./config-OFOAimzt.mjs";
|
|
5
6
|
import { t as collectMigrations } from "./collect-Dew86qce.mjs";
|
|
6
7
|
import { i as collectFiles, t as collectPages } from "./isr-config-fZaJJ8t7.mjs";
|
|
7
|
-
import { n as mergeRoutingRules, t as lintRoutingPhases } from "./headers
|
|
8
|
+
import { n as mergeRoutingRules, t as lintRoutingPhases } from "./headers--vaK_chu.mjs";
|
|
8
9
|
import { s as shouldLinkDeployProject, t as attachSelectedPlatform, u as writeProjectConfig } from "./project-rqDnVsJN.mjs";
|
|
9
|
-
import { E as resolveLiveBindingConfig, O as syncWranglerBindings, a as LIVE_MIGRATION_TAG, g as normalizeWranglerCompatibilityFlags, u as ensureWranglerCompat, v as readExistingLiveBindingConfig } from "./wrangler-
|
|
10
|
+
import { E as resolveLiveBindingConfig, O as syncWranglerBindings, a as LIVE_MIGRATION_TAG, g as normalizeWranglerCompatibilityFlags, u as ensureWranglerCompat, v as readExistingLiveBindingConfig } from "./wrangler-I-scB_1t.mjs";
|
|
10
11
|
import { n as buildMigrationPlanBundle } from "./plan-BhLO2p4w.mjs";
|
|
11
12
|
import { l as getTokenSource } from "./auth-B6iOCjKI.mjs";
|
|
12
|
-
import { t as discoverSchema } from "./discover-LaV0tbIu.mjs";
|
|
13
13
|
import { t as findEnvFile } from "./env-types-BicfKBhV.mjs";
|
|
14
|
-
import { a as buildEnv } from "./version-metadata-
|
|
15
|
-
import { r as writeDrizzleConfig, t as PLACEHOLDER_DB_URL } from "./config-
|
|
14
|
+
import { a as buildEnv } from "./version-metadata-D2vfMQzv.mjs";
|
|
15
|
+
import { r as writeDrizzleConfig, t as PLACEHOLDER_DB_URL } from "./config-tqMM6DwY.mjs";
|
|
16
16
|
import { i as validateMigrations, r as listDrizzleArtifacts, t as assertJournalCoherence } from "./validate-CnZPMq4q.mjs";
|
|
17
17
|
import { L as log$1, N as intro, X as text, tt as isCancel } from "./dist-Cor9XGoz.mjs";
|
|
18
18
|
import { t as formatCloudflareUserMessage } from "./cloudflare-user-output-Q-k0QoNQ.mjs";
|
|
19
|
-
import { c as platformErrorMessage, i as isCliOutdatedError, n as PlatformApiError, o as isHeadersTimeoutError, s as parsePlatformErrorBody } from "./client-
|
|
19
|
+
import { c as platformErrorMessage, i as isCliOutdatedError, n as PlatformApiError, o as isHeadersTimeoutError, s as parsePlatformErrorBody } from "./client-B3LnB_bE.mjs";
|
|
20
20
|
import { f as import_picocolors, h as sanitizeTerminalText, m as printSuccess, o as formatCount, p as note, r as createSpinner, u as getErrorMessage } from "./output-BpgYODYx.mjs";
|
|
21
|
-
import { a as promptProjectSelection, i as reportProjectCreationWarnings, o as promptProjectSetupAction, r as promptAndCreateProject } from "./create-project-
|
|
21
|
+
import { a as promptProjectSelection, i as reportProjectCreationWarnings, o as promptProjectSetupAction, r as promptAndCreateProject } from "./create-project-Bxd02EHN.mjs";
|
|
22
22
|
import { o as detectPreset, s as formatProjectCommand, u as resolveProjectCommand } from "./cloudflare-process-8jEYIeim.mjs";
|
|
23
|
-
import { d as formatEnvReport, g as validateProdEnv, u as fetchRemoteSecretNames } from "./env-validation-
|
|
24
|
-
import { a as needsWrapper, i as generateWrapper } from "./wrapper-
|
|
23
|
+
import { d as formatEnvReport, g as validateProdEnv, u as fetchRemoteSecretNames } from "./env-validation-B3VobvXm.mjs";
|
|
24
|
+
import { a as needsWrapper, i as generateWrapper } from "./wrapper-BBl1rC32.mjs";
|
|
25
25
|
import { n as drizzleKitBin } from "./yarn-pnp-DLbEFMT0.mjs";
|
|
26
|
-
import { t as MANAGED_DEPLOY_BUILD_ENV } from "./deploy-transport-
|
|
26
|
+
import { t as MANAGED_DEPLOY_BUILD_ENV } from "./deploy-transport-DIq_gFTP.mjs";
|
|
27
27
|
import { cpSync, existsSync, mkdirSync, mkdtempSync, readFileSync, readdirSync, rmSync } from "node:fs";
|
|
28
28
|
import { createDeployArtifact, createDeployUploadPayload } from "@void/deploy-core";
|
|
29
29
|
import { createHash } from "node:crypto";
|
|
@@ -168,14 +168,14 @@ function resolveStaticBuildCommand(preset, buildOverride, hasExplicitDir = false
|
|
|
168
168
|
* the user's own text and is used verbatim for both, so what is printed is
|
|
169
169
|
* exactly what is executed.
|
|
170
170
|
*/
|
|
171
|
-
function resolveFullDeployBuildCommand(root, buildOverride) {
|
|
171
|
+
function resolveFullDeployBuildCommand(root, buildOverride, fallbackBuildCommand = "vite build") {
|
|
172
172
|
if (buildOverride) return {
|
|
173
173
|
label: buildOverride,
|
|
174
174
|
command: buildOverride
|
|
175
175
|
};
|
|
176
176
|
return {
|
|
177
|
-
label: formatProjectCommand(root,
|
|
178
|
-
command: resolveProjectCommand(root,
|
|
177
|
+
label: formatProjectCommand(root, fallbackBuildCommand),
|
|
178
|
+
command: resolveProjectCommand(root, fallbackBuildCommand)
|
|
179
179
|
};
|
|
180
180
|
}
|
|
181
181
|
/**
|
|
@@ -336,7 +336,9 @@ function toManifestSchedulesAndQueues(jobs, queues) {
|
|
|
336
336
|
name: q.name,
|
|
337
337
|
bindingName: q.bindingName,
|
|
338
338
|
...q.maxBatchSize != null && { maxBatchSize: q.maxBatchSize },
|
|
339
|
-
...q.maxBatchTimeout != null && { maxBatchTimeout: q.maxBatchTimeout }
|
|
339
|
+
...q.maxBatchTimeout != null && { maxBatchTimeout: q.maxBatchTimeout },
|
|
340
|
+
...q.maxRetries != null && { maxRetries: q.maxRetries },
|
|
341
|
+
...q.retryDelay != null && { retryDelay: q.retryDelay }
|
|
340
342
|
}))
|
|
341
343
|
};
|
|
342
344
|
}
|
|
@@ -1382,6 +1384,7 @@ function buildVoidManifest(opts) {
|
|
|
1382
1384
|
assetManifestVersion: 2,
|
|
1383
1385
|
bindings: {}
|
|
1384
1386
|
};
|
|
1387
|
+
if (opts.alwaysUseHttps !== void 0) manifest.alwaysUseHttps = opts.alwaysUseHttps;
|
|
1385
1388
|
if (opts.durableObjects?.length) {
|
|
1386
1389
|
manifest.version = 4;
|
|
1387
1390
|
manifest.durableObjects = { bindings: opts.durableObjects.map(({ bindingName, className }) => ({
|
|
@@ -1459,18 +1462,36 @@ function collectWorkerFiles(workerDir) {
|
|
|
1459
1462
|
}
|
|
1460
1463
|
return out;
|
|
1461
1464
|
}
|
|
1465
|
+
const WRANGLER_HTML_HANDLING = /* @__PURE__ */ new Set([
|
|
1466
|
+
"auto-trailing-slash",
|
|
1467
|
+
"force-trailing-slash",
|
|
1468
|
+
"drop-trailing-slash",
|
|
1469
|
+
"none"
|
|
1470
|
+
]);
|
|
1471
|
+
/** Read `assets.html_handling` from a materialized root Wrangler config object. */
|
|
1472
|
+
function readWranglerHtmlHandling(rootConfig) {
|
|
1473
|
+
const assets = rootConfig.assets;
|
|
1474
|
+
if (typeof assets !== "object" || assets === null || Array.isArray(assets)) return;
|
|
1475
|
+
const value = assets.html_handling;
|
|
1476
|
+
return typeof value === "string" && WRANGLER_HTML_HANDLING.has(value) ? value : void 0;
|
|
1477
|
+
}
|
|
1462
1478
|
/**
|
|
1463
1479
|
* Build a static-deploy manifest. Pure shape transformation — no I/O.
|
|
1464
1480
|
*/
|
|
1465
1481
|
function buildStaticManifest(opts) {
|
|
1466
|
-
const { appType, hashedAssetsPrefix, headerRules, redirectRules, fallbackRules, notFound } = opts;
|
|
1482
|
+
const { appType, hashedAssetsPrefix, headerRules, redirectRules, fallbackRules, notFound, html_handling } = opts;
|
|
1467
1483
|
const { assetConfig, fallbackRules: resolvedFallbackRules } = resolveSpaFallbackChain(appType, fallbackRules, notFound);
|
|
1484
|
+
const resolvedAssetConfig = html_handling === void 0 ? assetConfig : {
|
|
1485
|
+
...assetConfig,
|
|
1486
|
+
html_handling
|
|
1487
|
+
};
|
|
1468
1488
|
const manifest = {
|
|
1469
1489
|
version: 3,
|
|
1470
1490
|
assetManifestVersion: 2,
|
|
1471
1491
|
bindings: {},
|
|
1472
1492
|
type: appType,
|
|
1473
|
-
|
|
1493
|
+
...opts.alwaysUseHttps !== void 0 ? { alwaysUseHttps: opts.alwaysUseHttps } : {},
|
|
1494
|
+
assetConfig: resolvedAssetConfig
|
|
1474
1495
|
};
|
|
1475
1496
|
if (hashedAssetsPrefix) manifest.hashedAssetsPrefix = hashedAssetsPrefix;
|
|
1476
1497
|
if (headerRules && headerRules.length > 0) manifest.headerRules = headerRules;
|
|
@@ -1489,6 +1510,7 @@ function buildFrameworkManifest(opts) {
|
|
|
1489
1510
|
assetManifestVersion: 2,
|
|
1490
1511
|
bindings: {}
|
|
1491
1512
|
};
|
|
1513
|
+
if (opts.alwaysUseHttps !== void 0) manifest.alwaysUseHttps = opts.alwaysUseHttps;
|
|
1492
1514
|
applyResourceBindings(manifest, opts.bindings, opts.migrations?.length ?? 0, dialect, po?.bindingNames);
|
|
1493
1515
|
if (opts.migrations && opts.migrations.length > 0) manifest.migrations = toMigrationsManifest(opts.migrations, dialect);
|
|
1494
1516
|
if (opts.schedules && opts.schedules.length > 0) manifest.schedules = opts.schedules;
|
|
@@ -1561,7 +1583,7 @@ function assembleVoidManifest(pageScan, isFrameworkMode, opts, revalidateConfig,
|
|
|
1561
1583
|
pathRevalidate: !isrEnabled || isFrameworkMode || revalidateConfig == null || typeof revalidateConfig !== "object" ? void 0 : revalidateConfig
|
|
1562
1584
|
});
|
|
1563
1585
|
}
|
|
1564
|
-
async function runStaticDeploy(root, config, client, preset, skipBuild, gitMetadata, hashedAssetsPrefix, headerRules, redirectRules, fallbackRules, routing, cliLog, notFound) {
|
|
1586
|
+
async function runStaticDeploy(root, config, client, preset, skipBuild, gitMetadata, hashedAssetsPrefix, headerRules, redirectRules, fallbackRules, routing, cliLog, notFound, alwaysUseHttps) {
|
|
1565
1587
|
const typeLabel = preset.appType === "spa" ? "Static SPA" : "Static Site";
|
|
1566
1588
|
log.info(`${typeLabel} deploy`);
|
|
1567
1589
|
cliLog?.info("deploy_mode", {
|
|
@@ -1607,6 +1629,7 @@ async function runStaticDeploy(root, config, client, preset, skipBuild, gitMetad
|
|
|
1607
1629
|
const packageStartedAt = Date.now();
|
|
1608
1630
|
const manifest = buildStaticManifest({
|
|
1609
1631
|
appType: preset.appType,
|
|
1632
|
+
alwaysUseHttps: alwaysUseHttps ?? routing?.alwaysUseHttps,
|
|
1610
1633
|
hashedAssetsPrefix: hashedAssetsPrefix ?? "assets",
|
|
1611
1634
|
headerRules,
|
|
1612
1635
|
redirectRules,
|
|
@@ -1638,4 +1661,4 @@ async function runStaticDeploy(root, config, client, preset, skipBuild, gitMetad
|
|
|
1638
1661
|
printDeploySuccess(result.published !== false);
|
|
1639
1662
|
}
|
|
1640
1663
|
//#endregion
|
|
1641
|
-
export {
|
|
1664
|
+
export { promptDeployProjectConfig as A, ensureManagedHyperdrive as C, hasNonPageBackend as D, getGitCommit as E, resolveStaticBuildCommand as F, resolveStaticDeployPreset as I, toManifestSchedulesAndQueues as L, resolveDeployWorkerMain as M, resolveDeployWranglerCompat as N, hasPrerenderSources as O, resolveFullDeployBuildCommand as P, validateDeployMigrations as R, createProjectFromSlug as S, getExitCode as T, getDeploySchemaDriftMessage as _, collectAndHashAssets as a, assertProjectDeployAccess as b, readWranglerHtmlHandling as c, printDeploySuccess as d, mergeAndLintRoutingRules as f, assertDeploySchemaDriftFree as g, warnUnpublishedRouting as h, buildStaticManifest as i, resolveDeployLiveBindingConfig as j, log as k, formatDeploySummary as l, warnIgnoredNotFoundForFramework as m, runStaticDeploy as n, collectWorkerFiles as o, streamDirectR2Deploy as p, buildFrameworkManifest as r, detectNonSpaFallbackWarning as s, assembleVoidManifest as t, printDeployContext as u, hasDeploySchemaDrift as v, generateDeployWrapperIfNeeded as w, assertWorkerMainUploaded as x, assertEnvSchemaValid as y };
|
|
@@ -1,8 +1,8 @@
|
|
|
1
1
|
import { a as join } from "./dist-ipQi0Q8y.mjs";
|
|
2
2
|
import { n as scanWranglerDotenvKeys } from "./dotenv-CNazY3-w.mjs";
|
|
3
|
-
import { t as CLOUDFLARE_DEPLOY_BUILD_ENV } from "./env-
|
|
4
|
-
import { i as WRANGLER_AUTH_CREDENTIAL_ENV_VARS, t as CLOUDFLARE_PRESERVE_BINDINGS_BUILD_ENV } from "./version-metadata-
|
|
5
|
-
import { _ as provisionEnv, r as assertNoTransportRedirectInProjectDotenv, s as deleteEnvVarCaseAware, v as resolvePinnedApiBaseUrl } from "./provision-
|
|
3
|
+
import { t as CLOUDFLARE_DEPLOY_BUILD_ENV } from "./env-BaMz0j7H.mjs";
|
|
4
|
+
import { i as WRANGLER_AUTH_CREDENTIAL_ENV_VARS, t as CLOUDFLARE_PRESERVE_BINDINGS_BUILD_ENV } from "./version-metadata-D2vfMQzv.mjs";
|
|
5
|
+
import { _ as provisionEnv, r as assertNoTransportRedirectInProjectDotenv, s as deleteEnvVarCaseAware, v as resolvePinnedApiBaseUrl } from "./provision-DztLJ97X.mjs";
|
|
6
6
|
import { readWranglerTopLevelString } from "@void/deploy-cloudflare";
|
|
7
7
|
//#region src/cli/deploy-transport.ts
|
|
8
8
|
/**
|
|
@@ -36,20 +36,21 @@ function scrubManagedDeployBuildMarkers(env) {
|
|
|
36
36
|
* top-level config this flow provisions + preflights. Scrubbed from every child env
|
|
37
37
|
* and fenced in the project dotenv (see below), on top of the provisioner's transport
|
|
38
38
|
* scrub/fence which owns the endpoint-redirect + `CLOUDFLARE_ENV` vars:
|
|
39
|
-
* - `WRANGLER_CI_OVERRIDE_NAME` —
|
|
40
|
-
*
|
|
41
|
-
* bare
|
|
42
|
-
* validated.
|
|
39
|
+
* - `WRANGLER_CI_OVERRIDE_NAME` — the Cloudflare tooling (wrangler and the `cf` CLI)
|
|
40
|
+
* applies it AFTER config load (`getCIOverrideName()`), REPLACING the upload name, so a
|
|
41
|
+
* bare deploy uploads a worker whose name the generated-config check never validated.
|
|
43
42
|
* - `CLOUDFLARE_VITE_WRANGLER_CONFIG_PATH` — the CF Vite plugin points the build at an
|
|
44
43
|
* ALTERNATE wrangler config, flattening a different binding set into
|
|
45
44
|
* `dist/ssr/wrangler.json`.
|
|
46
45
|
*/
|
|
47
46
|
const DEPLOY_CONFIG_OVERRIDE_ENV_VARS = ["WRANGLER_CI_OVERRIDE_NAME", "CLOUDFLARE_VITE_WRANGLER_CONFIG_PATH"];
|
|
48
47
|
/**
|
|
49
|
-
* The dotenv files wrangler
|
|
50
|
-
*
|
|
51
|
-
*
|
|
52
|
-
*
|
|
48
|
+
* The dotenv files wrangler loads into `process.env` (`override: true`) when no
|
|
49
|
+
* `--env` is named (`getDefaultEnvFiles("")`). Void runs its deploy steps through the
|
|
50
|
+
* `cf` CLI, not wrangler, but this set is kept for a user who runs `wrangler deploy` on
|
|
51
|
+
* the same config. It also covers the `.env` / `.env.local` files `cf` reads. A repo
|
|
52
|
+
* dotenv here would bring back `WRANGLER_CI_OVERRIDE_NAME` after the child-env scrub
|
|
53
|
+
* removed it.
|
|
53
54
|
*/
|
|
54
55
|
const DEPLOY_WRANGLER_DOTENV_FILES = [
|
|
55
56
|
".env",
|
|
@@ -61,7 +62,7 @@ const DEPLOY_WRANGLER_DOTENV_FILES = [
|
|
|
61
62
|
* The dotenv files Vite's `loadEnv(mode, …)` reads for a production `vite build`
|
|
62
63
|
* (`.env`, `.env.local`, `.env.production`, `.env.production.local`), where the CF Vite
|
|
63
64
|
* plugin picks up `CLOUDFLARE_ENV` / `CLOUDFLARE_VITE_WRANGLER_CONFIG_PATH` — a set
|
|
64
|
-
*
|
|
65
|
+
* that differs from the wrangler dotenv files above, so it is fenced separately for the build.
|
|
65
66
|
*/
|
|
66
67
|
const DEPLOY_VITE_DOTENV_FILES = [
|
|
67
68
|
".env",
|
|
@@ -100,7 +101,7 @@ function findWranglerCiOverrideDotenvFile(root, platform = process.platform) {
|
|
|
100
101
|
* FAIL CLOSED when the project's dotenv files declare a deploy-time config-override
|
|
101
102
|
* selector. wrangler / Vite reload dotenv on every command, so a repo dotenv would
|
|
102
103
|
* reintroduce a scrubbed var AFTER the child-env scrub — reselecting the upload worker
|
|
103
|
-
* name (wrangler
|
|
104
|
+
* name (the wrangler dotenv files) or the build's wrangler config (Vite production files).
|
|
104
105
|
* The provisioner's transport fence ({@link assertNoTransportRedirectInProjectDotenv})
|
|
105
106
|
* owns `CLOUDFLARE_ENV` + the endpoint-redirect vars; this closes the deploy-specific
|
|
106
107
|
* name/config-path selectors it does not cover, across BOTH consumers' file sets.
|
package/dist/deploy.d.mts
CHANGED
|
@@ -11,6 +11,8 @@ export type CfBuildOutput = {
|
|
|
11
11
|
dispose(): Promise<void>;
|
|
12
12
|
};
|
|
13
13
|
export type PrepareCfBuildOutputOptions = {
|
|
14
|
+
/** The app's package root. Defaults to the input directory. */
|
|
15
|
+
projectRoot?: string;
|
|
14
16
|
/** The Cloudflare account the build must target. */
|
|
15
17
|
accountId?: string;
|
|
16
18
|
/** The Vite build mode. Native output must match it; legacy output defaults to production. */
|
package/dist/deploy.mjs
CHANGED
|
@@ -1,12 +1,12 @@
|
|
|
1
1
|
import { a as join, c as resolve } from "./dist-ipQi0Q8y.mjs";
|
|
2
|
-
import { p as readConfig, u as isNodeTarget } from "./config-
|
|
2
|
+
import { p as readConfig, u as isNodeTarget } from "./config-OFOAimzt.mjs";
|
|
3
3
|
import { o as validateSsrEntry } from "./entry-BEM8ZuGP.mjs";
|
|
4
4
|
import { r as hasEmailHandlers } from "./email-B9ayYQEG.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 { t as prepareCfBuildOutput$1 } from "./cf-build-output-
|
|
6
|
+
import { t as analyzeApplication } from "./application-routing-4719u_kf.mjs";
|
|
7
|
+
import { t as prepareCfBuildOutput$1 } from "./cf-build-output-XpNR9zoh.mjs";
|
|
8
8
|
import { o as detectPreset } from "./cloudflare-process-8jEYIeim.mjs";
|
|
9
|
-
import {
|
|
9
|
+
import { I as resolveStaticDeployPreset, L as toManifestSchedulesAndQueues, M as resolveDeployWorkerMain, N as resolveDeployWranglerCompat, R as validateDeployMigrations, a as collectAndHashAssets, f as mergeAndLintRoutingRules, g as assertDeploySchemaDriftFree, i as buildStaticManifest, o as collectWorkerFiles, t as assembleVoidManifest, x as assertWorkerMainUploaded } from "./deploy-managed-static-DjeBFG2c.mjs";
|
|
10
10
|
import { existsSync } from "node:fs";
|
|
11
11
|
import { createDeployArtifact } from "@void/deploy-core";
|
|
12
12
|
//#region src/deploy.ts
|
|
@@ -15,7 +15,7 @@ import { createDeployArtifact } from "@void/deploy-core";
|
|
|
15
15
|
* Experimental. Returns null for an unsupported build or a conflicting account or mode.
|
|
16
16
|
*/
|
|
17
17
|
async function prepareCfBuildOutput(directory, options = {}) {
|
|
18
|
-
const prepared = await prepareCfBuildOutput$1(directory, options.accountId, options.mode);
|
|
18
|
+
const prepared = await prepareCfBuildOutput$1(directory, options.accountId, options.mode, options.projectRoot);
|
|
19
19
|
return prepared && {
|
|
20
20
|
directory: prepared.directory,
|
|
21
21
|
...prepared.assetsDirectory ? { assetsDirectory: prepared.assetsDirectory } : {},
|
|
@@ -45,6 +45,7 @@ async function prepareDeployArtifact(root = process.cwd()) {
|
|
|
45
45
|
artifact: createDeployArtifact({
|
|
46
46
|
manifest: buildStaticManifest({
|
|
47
47
|
appType: preset.appType,
|
|
48
|
+
alwaysUseHttps: config.routing?.alwaysUseHttps,
|
|
48
49
|
hashedAssetsPrefix: "assets",
|
|
49
50
|
notFound: config.routing?.notFound,
|
|
50
51
|
...rules
|
|
@@ -80,6 +81,8 @@ async function prepareDeployArtifact(root = process.cwd()) {
|
|
|
80
81
|
const rules = mergeAndLintRoutingRules(clientDir, config.routing);
|
|
81
82
|
const manifest = assembleVoidManifest(pages ? scan.pages : null, false, {
|
|
82
83
|
bindings,
|
|
84
|
+
alwaysUseHttps: config.routing?.alwaysUseHttps,
|
|
85
|
+
vars: config.worker?.vars,
|
|
83
86
|
hasEmailHandlers: scan.email !== void 0 && hasEmailHandlers(scan.email),
|
|
84
87
|
migrations,
|
|
85
88
|
schedules,
|
|
@@ -1,14 +1,15 @@
|
|
|
1
1
|
import { a as join, i as isAbsolute, n as dirname, s as relative } from "./dist-ipQi0Q8y.mjs";
|
|
2
2
|
import { i as resolveProjectPaths, n as readProjectPaths } from "./project-paths-DGu_QZ_Q.mjs";
|
|
3
|
-
import { c as getDatabaseCasing, l as getDatabaseDialect, m as resolveBindingNames, p as readConfig } from "./config-DHgSEWT7.mjs";
|
|
4
|
-
import { i as voidWarn } from "./log-BMwmN5Ae.mjs";
|
|
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
3
|
import { t as discoverSchema } from "./discover-LaV0tbIu.mjs";
|
|
4
|
+
import { c as getDatabaseCasing, l as getDatabaseDialect, m as resolveBindingNames, p as readConfig } from "./config-OFOAimzt.mjs";
|
|
5
|
+
import { i as voidWarn } from "./log-BMwmN5Ae.mjs";
|
|
6
|
+
import { n as ensureProjectTsconfig } from "./project-tsconfig-CVvk6Z_e.mjs";
|
|
7
|
+
import { n as generateDbDts, t as DRIZZLE_OPERATORS } from "./db-types-0eCiqYb1.mjs";
|
|
8
|
+
import { n as CLOUDFLARE_QUEUE_NAMES_BUILD_ENV } from "./env-BaMz0j7H.mjs";
|
|
8
9
|
import { createRequire } from "node:module";
|
|
9
10
|
import { existsSync, readFileSync, readdirSync } from "node:fs";
|
|
10
|
-
import { fileURLToPath } from "node:url";
|
|
11
11
|
import { normalizePath } from "vite";
|
|
12
|
+
import { fileURLToPath } from "node:url";
|
|
12
13
|
//#region src/plugin-drizzle.ts
|
|
13
14
|
const drizzleD1Resolved = fileURLToPath(import.meta.resolve("drizzle-orm/d1"));
|
|
14
15
|
const drizzleOrmResolved = fileURLToPath(import.meta.resolve("drizzle-orm"));
|
|
@@ -403,14 +404,82 @@ function resolvePackageEntry(name, file) {
|
|
|
403
404
|
}
|
|
404
405
|
}
|
|
405
406
|
//#endregion
|
|
407
|
+
//#region src/queues/cloudflare-names.ts
|
|
408
|
+
/** `workerPrefix` is the Worker name in resource-name form (lowercase, `_` as `-`). */
|
|
409
|
+
function scopedCloudflareQueueName(workerPrefix, queueName) {
|
|
410
|
+
return `${workerPrefix}-${queueName}`;
|
|
411
|
+
}
|
|
412
|
+
const consumedBy = (state, workerName) => state?.consumers.includes(workerName) ?? false;
|
|
413
|
+
/**
|
|
414
|
+
* Pick the Cloudflare name for one queue: its scoped name, or its plain name
|
|
415
|
+
* when this Worker already consumes that queue. `plain` may be `undefined`
|
|
416
|
+
* when it was not looked up, which is only needed when the Worker does not
|
|
417
|
+
* already consume the scoped queue.
|
|
418
|
+
*/
|
|
419
|
+
function chooseCloudflareQueueName(input) {
|
|
420
|
+
if (!consumedBy(input.scoped, input.workerName) && consumedBy(input.plain ?? null, input.workerName)) return {
|
|
421
|
+
name: input.queueName,
|
|
422
|
+
kept: true
|
|
423
|
+
};
|
|
424
|
+
return {
|
|
425
|
+
name: input.scopedName,
|
|
426
|
+
kept: false
|
|
427
|
+
};
|
|
428
|
+
}
|
|
429
|
+
/** Consumers of a queue other than this Worker. A queue has one consumer. */
|
|
430
|
+
function otherQueueConsumers(state, workerName) {
|
|
431
|
+
return state?.consumers.filter((consumer) => consumer !== workerName) ?? [];
|
|
432
|
+
}
|
|
433
|
+
/**
|
|
434
|
+
* The names `void deploy` chose, read inside its Vite build. Returns undefined
|
|
435
|
+
* outside that build, where queues keep their plain names.
|
|
436
|
+
*/
|
|
437
|
+
function readDeployBuildQueueNames() {
|
|
438
|
+
if (process.env["VOID_CLOUDFLARE_DEPLOY_BUILD"] !== "1") return;
|
|
439
|
+
const raw = process.env[CLOUDFLARE_QUEUE_NAMES_BUILD_ENV];
|
|
440
|
+
if (raw === void 0) return;
|
|
441
|
+
let parsed;
|
|
442
|
+
try {
|
|
443
|
+
parsed = JSON.parse(raw);
|
|
444
|
+
} catch {
|
|
445
|
+
parsed = void 0;
|
|
446
|
+
}
|
|
447
|
+
if (typeof parsed !== "object" || parsed === null || Array.isArray(parsed) || Object.values(parsed).some((name) => typeof name !== "string" || name === "")) throw new Error(`queue: ${CLOUDFLARE_QUEUE_NAMES_BUILD_ENV} is not a valid queue name map.`);
|
|
448
|
+
return parsed;
|
|
449
|
+
}
|
|
450
|
+
/** The Cloudflare name of a queue: the deploy's choice, or its plain name. */
|
|
451
|
+
function cloudflareQueueName(queueName, names) {
|
|
452
|
+
return names && Object.hasOwn(names, queueName) ? names[queueName] : queueName;
|
|
453
|
+
}
|
|
454
|
+
//#endregion
|
|
406
455
|
//#region src/queues/dispatch.ts
|
|
407
456
|
/**
|
|
408
457
|
* Emit the queue-name resolver used by generated native workers and framework
|
|
409
458
|
* wrappers. Hosted relays send the exact logical name. Native Queue events may
|
|
410
459
|
* expose a project-prefixed physical name, so fallback matching selects the
|
|
411
460
|
* unique longest known `-name` suffix. Unknown or ambiguous inputs fail closed.
|
|
461
|
+
*
|
|
462
|
+
* `cloudflareNames` (aligned with `queueNames`) comes from
|
|
463
|
+
* `void deploy --platform cloudflare`, which knows each queue's exact name.
|
|
464
|
+
* Its events then match exactly: a suffix could pick the wrong queue, as
|
|
465
|
+
* `app-jobs` would for queues `jobs` and `app-jobs` in Worker `app`. Logical
|
|
466
|
+
* names still match, for the trigger endpoint.
|
|
412
467
|
*/
|
|
413
|
-
function generateQueueResolverSource(queueNames) {
|
|
468
|
+
function generateQueueResolverSource(queueNames, cloudflareNames) {
|
|
469
|
+
if (cloudflareNames) {
|
|
470
|
+
const indexByName = {};
|
|
471
|
+
cloudflareNames.forEach((name, index) => {
|
|
472
|
+
indexByName[name] = index;
|
|
473
|
+
});
|
|
474
|
+
queueNames.forEach((name, index) => {
|
|
475
|
+
if (!Object.hasOwn(indexByName, name)) indexByName[name] = index;
|
|
476
|
+
});
|
|
477
|
+
return `const __queueIndexByName = ${JSON.stringify(indexByName)};
|
|
478
|
+
function __resolveQueueIndex(queueName) {
|
|
479
|
+
if (typeof queueName !== "string" || !Object.hasOwn(__queueIndexByName, queueName)) return -1;
|
|
480
|
+
return __queueIndexByName[queueName];
|
|
481
|
+
}`;
|
|
482
|
+
}
|
|
414
483
|
return `const __queueNames = ${JSON.stringify(queueNames)};
|
|
415
484
|
function __resolveQueueIndex(queueName) {
|
|
416
485
|
if (typeof queueName !== "string") return -1;
|
|
@@ -432,4 +501,4 @@ function __resolveQueueIndex(queueName) {
|
|
|
432
501
|
}`;
|
|
433
502
|
}
|
|
434
503
|
//#endregion
|
|
435
|
-
export {
|
|
504
|
+
export { readDeployBuildQueueNames as a, voidDbBundlerPlugin as c, otherQueueConsumers as i, chooseCloudflareQueueName as n, scopedCloudflareQueueName as o, cloudflareQueueName as r, drizzlePlugin as s, generateQueueResolverSource as t };
|
|
@@ -1,7 +1,7 @@
|
|
|
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-Cor9XGoz.mjs";
|
|
4
|
-
import { r as PlatformClient } from "./client-
|
|
4
|
+
import { r as PlatformClient } from "./client-B3LnB_bE.mjs";
|
|
5
5
|
import { f as import_picocolors, m as printSuccess, p as note } from "./output-BpgYODYx.mjs";
|
|
6
6
|
import { i as resolveCommandProjectId } from "./resolve-project-Xoi6eTWY.mjs";
|
|
7
7
|
//#region src/cli/domain.ts
|
|
@@ -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-BtulCNOg.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,16 +1,16 @@
|
|
|
1
1
|
import { a as join } from "./dist-ipQi0Q8y.mjs";
|
|
2
2
|
import { n as readProjectPaths } from "./project-paths-DGu_QZ_Q.mjs";
|
|
3
|
-
import { p as readConfig } from "./config-
|
|
3
|
+
import { p as readConfig } from "./config-OFOAimzt.mjs";
|
|
4
4
|
import { i as scanEmailHandlersSync } from "./email-B9ayYQEG.mjs";
|
|
5
|
-
import { M as writeProvisionedWranglerConfig } from "./wrangler-
|
|
5
|
+
import { M as writeProvisionedWranglerConfig } from "./wrangler-I-scB_1t.mjs";
|
|
6
6
|
import { c as getToken, u as openBrowser } from "./auth-B6iOCjKI.mjs";
|
|
7
|
-
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-
|
|
7
|
+
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-PMbAev9Q.mjs";
|
|
8
8
|
import { A as confirm, L as log, U as password, tt as isCancel } from "./dist-Cor9XGoz.mjs";
|
|
9
|
-
import { n as PlatformApiError, r as PlatformClient } from "./client-
|
|
9
|
+
import { n as PlatformApiError, r as PlatformClient } from "./client-B3LnB_bE.mjs";
|
|
10
10
|
import { f as import_picocolors, l as formatUrl, m as printSuccess, p as note, r as createSpinner } from "./output-BpgYODYx.mjs";
|
|
11
11
|
import { i as resolveCommandProjectId } from "./resolve-project-Xoi6eTWY.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-DIq_gFTP.mjs";
|
|
13
|
+
import { a as discoverRootWranglerConfig, c as runWranglerAuthToken, l as deriveWorkerName, o as createDeployWranglerRunner, s as isWranglerNonInteractiveOrCI } from "./deploy-CdM-LAxX.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";
|
|
@@ -20,7 +20,7 @@ import { setTimeout as setTimeout$1 } from "node:timers/promises";
|
|
|
20
20
|
async function runEmailCommand(root, args) {
|
|
21
21
|
if (args.platform === "cloudflare") return runEmailCloudflareCommand(root, args);
|
|
22
22
|
if (args.subcommand === "setup") {
|
|
23
|
-
log.error("email: `void email setup` sets email up on your OWN Cloudflare account — run it with `--platform cloudflare`. The Void platform needs no setup: deploy, and `void email
|
|
23
|
+
log.error("email: `void email setup` sets email up on your OWN Cloudflare account — run it with `--platform cloudflare`. The Void platform needs no setup: deploy, and `void email alias` shows your address.");
|
|
24
24
|
process.exit(1);
|
|
25
25
|
}
|
|
26
26
|
if (args.subcommand === "status") {
|
|
@@ -40,6 +40,7 @@ async function runEmailCommand(root, args) {
|
|
|
40
40
|
case "destinations": return emailDestinations(client, projectId);
|
|
41
41
|
case "allow": return emailAllow(client, projectId, args.address);
|
|
42
42
|
case "disallow": return emailDisallow(client, projectId, args.address);
|
|
43
|
+
case "alias": return emailAlias(client, projectId, args.address, { yes: args.yes === true });
|
|
43
44
|
case "domain": return runEmailDomainCommand(client, projectId, args);
|
|
44
45
|
}
|
|
45
46
|
}
|
|
@@ -54,6 +55,54 @@ async function emailUsage(client, projectId) {
|
|
|
54
55
|
];
|
|
55
56
|
note(lines.join("\n"), "Email Usage");
|
|
56
57
|
}
|
|
58
|
+
async function emailAlias(client, projectId, name, opts = { yes: false }) {
|
|
59
|
+
if (!name) {
|
|
60
|
+
const settings = await client.getEmailSettings(projectId);
|
|
61
|
+
const shared = settings.sharedInbound;
|
|
62
|
+
const domain = settings.sharedDomain ?? (shared ? shared.recipient.slice(shared.recipient.lastIndexOf("@") + 1) : null);
|
|
63
|
+
const name = settings.emailAlias ?? settings.domains.projectSlug;
|
|
64
|
+
if (!domain || !name) {
|
|
65
|
+
log.info("This platform has no shared mail domain.");
|
|
66
|
+
return;
|
|
67
|
+
}
|
|
68
|
+
const address = `${name}@${domain}`;
|
|
69
|
+
const lines = [`Address: ${address}`, `Inbound: ${inboundLine(shared, address)}`];
|
|
70
|
+
if (settings.emailAlias && settings.domains.projectSlug) lines.push(`Also: ${settings.domains.projectSlug}@${domain} (the project slug)`);
|
|
71
|
+
note(lines.join("\n"), "Shared mail address");
|
|
72
|
+
if (!settings.emailAlias) log.info("Run `void email alias <name>` to give this address a shorter, permanent name.");
|
|
73
|
+
return;
|
|
74
|
+
}
|
|
75
|
+
if (!opts.yes) {
|
|
76
|
+
if (!(opts.isInteractive ?? (process.stdin.isTTY && process.stdout.isTTY))) {
|
|
77
|
+
log.error("email: the alias is permanent. Pass --yes to set it without a prompt.");
|
|
78
|
+
process.exit(1);
|
|
79
|
+
}
|
|
80
|
+
const ok = await confirm({
|
|
81
|
+
message: `Set the permanent email alias "${name}"? It cannot be changed or removed later; the slug address keeps working.`,
|
|
82
|
+
initialValue: false
|
|
83
|
+
});
|
|
84
|
+
if (isCancel(ok) || !ok) {
|
|
85
|
+
log.info("Cancelled. No alias was set.");
|
|
86
|
+
return;
|
|
87
|
+
}
|
|
88
|
+
}
|
|
89
|
+
const result = await client.setEmailAlias(projectId, name);
|
|
90
|
+
printSuccess(`Email alias set: ${result.address}`);
|
|
91
|
+
const status = result.sharedInbound?.status;
|
|
92
|
+
if (status && status !== "ready") {
|
|
93
|
+
const other = result.sharedInbound.recipient === result.address ? "" : ` at ${result.sharedInbound.recipient}`;
|
|
94
|
+
log.info(`Inbound mail${other} is ${status}${result.sharedInbound?.reason ? `: ${result.sharedInbound.reason}` : ""}. It starts working once the project has an email handler deployed and routing is ready; check with \`void email alias\`.`);
|
|
95
|
+
}
|
|
96
|
+
}
|
|
97
|
+
/**
|
|
98
|
+
* The inbound status covers every name of the project, so name the address
|
|
99
|
+
* it belongs to when that is not the one shown (the slug row can be the one
|
|
100
|
+
* not ready yet).
|
|
101
|
+
*/
|
|
102
|
+
function inboundLine(shared, address) {
|
|
103
|
+
if (!shared) return "not set up on this platform";
|
|
104
|
+
return shared.recipient === address ? shared.status : `${shared.status} (${shared.recipient})`;
|
|
105
|
+
}
|
|
57
106
|
async function emailDestinations(client, projectId) {
|
|
58
107
|
const rows = await client.listEmailDestinations(projectId);
|
|
59
108
|
if (rows.length === 0) {
|
|
@@ -301,10 +350,10 @@ async function emailDomainAdd(client, projectId, rawDomain, deps = {}) {
|
|
|
301
350
|
const domain = normalizeEmailDomainInput(rawDomain);
|
|
302
351
|
if (!isValidEmailDomainInput(domain)) return fail(`email: invalid domain '${rawDomain}'.`);
|
|
303
352
|
const dns = deps.dns ?? await createNodeEmailDns();
|
|
304
|
-
const checkApexMx = async () => {
|
|
353
|
+
const checkApexMx = async (adminProject) => {
|
|
305
354
|
const mx = await probeMx(dns, domain);
|
|
306
355
|
if (mx.state === "unknown") log.info(`MX could not read ${domain}'s MX from here — the platform decides over public DNS.`);
|
|
307
|
-
else if (mx.state === "foreign") fail(`email: ${domain} already receives mail from another provider. Platform custom inbound email requires an unused Cloudflare zone apex; choose another apex or use the platform shared mail address
|
|
356
|
+
else if (mx.state === "foreign") fail(`email: ${domain} already receives mail from another provider. Platform custom inbound email requires an unused Cloudflare zone apex; choose another apex or use the platform shared mail address.${adminProject ? ` To only send from ${domain}, ask your administrator to run \`void platform email domain-add ${domain} --project ${adminProject} --outbound-only\`.` : ""}`);
|
|
308
357
|
else log.info(`MX using the requested apex ${domain}`);
|
|
309
358
|
};
|
|
310
359
|
let renewal = false;
|
|
@@ -312,8 +361,8 @@ async function emailDomainAdd(client, projectId, rawDomain, deps = {}) {
|
|
|
312
361
|
if (settings.domains.management === "admin") {
|
|
313
362
|
renewal = (await client.listEmailDomains(projectId)).some((row) => row.domain === domain && row.managed_by !== "admin");
|
|
314
363
|
if (!renewal) {
|
|
315
|
-
await checkApexMx();
|
|
316
364
|
const project = settings.domains.projectSlug ?? projectId;
|
|
365
|
+
await checkApexMx(project);
|
|
317
366
|
log.info([
|
|
318
367
|
"Email domains on this platform are managed by its administrator.",
|
|
319
368
|
"Ask them to run:",
|