void 1.1.12 → 1.2.1
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-Cj6sCMTk.mjs → account-cmd-CdUll_35.mjs} +5 -5
- package/dist/action-key-XZ9HkWAO.mjs +26 -0
- package/dist/{application-analysis-D7nNmNJb.mjs → application-analysis-fEqoSeMp.mjs} +11 -11
- package/dist/{application-routing-CZH66gXn.mjs → application-routing-DAhNP4u3.mjs} +1 -1
- package/dist/{ast-CPGPjb0V.mjs → ast-CsZ_q_gc.mjs} +6 -1
- package/dist/ast-bindings-C3yaPs1y.mjs +296 -0
- package/dist/{auth-link-Dj7lAC_K.mjs → auth-link-C87vGXM-.mjs} +5 -5
- package/dist/{auth-router-CNsMOFCa.mjs → auth-router-6I81r-ix.mjs} +3 -3
- package/dist/{better-auth-shared-Bv18bB-l.d.mts → better-auth-shared-DVk2DkTW.d.mts} +1 -1
- package/dist/{build-cmd-ByhegwRC.mjs → build-cmd-ex1g-j_e.mjs} +4 -4
- package/dist/{cache-CEFb5ban.mjs → cache-oHzrnY3z.mjs} +4 -4
- package/dist/{cancel-deploy-CaARY26n.mjs → cancel-deploy-viAMD0Q_.mjs} +3 -3
- package/dist/cf-build-output-BJHuSsVN.mjs +1 -0
- package/dist/{cf-build-output-ChEKWan2.mjs → cf-build-output-BhVxldCw.mjs} +4 -3
- package/dist/{cf-command-values-b8OqDoo9.mjs → cf-command-values-ByHk0xg4.mjs} +2 -1
- package/dist/cf-worker-settings-BECvvTVd.mjs +37 -0
- package/dist/cli/cli.mjs +32 -32
- package/dist/cli/cloudflare-operation-process.mjs +23 -13
- package/dist/cli/env-schema-probe.d.mts +1 -1
- package/dist/cli/env-schema-probe.mjs +3 -3
- package/dist/{client-BdzxubTS.mjs → client-BEkdj1kx.mjs} +1 -1
- package/dist/client-BiRDZTSd.mjs +1 -0
- package/dist/{cloudflare-auth-DSvBc1Gu.mjs → cloudflare-auth-Byo_0_N9.mjs} +1 -1
- package/dist/{cloudflare-cmd-D_2-Q-_i.mjs → cloudflare-cmd-DMzCv12s.mjs} +5 -5
- package/dist/{cloudflare-config-rdFOys4X.mjs → cloudflare-config-DchHxPTo.mjs} +1 -1
- package/dist/{cloudflare-connect-BN-k2kD-.mjs → cloudflare-connect-CCRTVg-I.mjs} +3 -3
- package/dist/{cloudflare-operations-D5PLrOqD.mjs → cloudflare-operations-Dh9dEHJj.mjs} +6 -6
- package/dist/{cloudflare-operations-BFLCpUCV.mjs → cloudflare-operations-DsSaw2BT.mjs} +1 -1
- package/dist/{cloudflare-process-CZJ4viYl.mjs → cloudflare-process-8jEYIeim.mjs} +3 -2
- package/dist/{config-DC5llZaI.mjs → config-BIaXIkkv.mjs} +8 -3
- package/dist/{config-DYJV8aEH.mjs → config-BU6hMu1W.mjs} +1 -1
- package/dist/{config-D26zcdKy.mjs → config-DHgSEWT7.mjs} +39 -6
- package/dist/{config-7qoq2p9v.d.mts → config-DQfHOKh9.d.mts} +10 -1
- package/dist/config-entry.d.mts +1 -1
- package/dist/{connect-C4_m2moF.mjs → connect-k7R2rPVA.mjs} +6 -6
- package/dist/{create-project-CvuYDD-l.mjs → create-project-DTuy-l0z.mjs} +1 -1
- package/dist/{create-project-D8jQTwVQ.mjs → create-project-DV71ol5d.mjs} +4 -4
- package/dist/{db-BsiOAa0A.mjs → db-DVOkLH5X.mjs} +30 -24
- package/dist/{delete-CAma7nFi.mjs → delete-BbP5eopu.mjs} +4 -4
- package/dist/{deploy-D1gIPiAq.mjs → deploy-7H32EnUs.mjs} +114 -71
- package/dist/deploy-CE0Ev0Ob.mjs +2 -0
- package/dist/{deploy-managed-static-B9KVxY3X.mjs → deploy-managed-static-DlvcvnQT.mjs} +15 -15
- package/dist/{deploy-transport-B3mtEi_q.mjs → deploy-transport-BzGEj0Ge.mjs} +2 -2
- package/dist/deploy.mjs +7 -7
- package/dist/{dev-inbox-Rd6j_8vM.mjs → dev-inbox-D0jxye_D.mjs} +1 -1
- package/dist/{dispatch-BAbbn3jg.mjs → dispatch-DoUnxTNo.mjs} +15 -11
- package/dist/{dist-CfgIkieS.mjs → dist-B1PLt4_8.mjs} +1 -1
- package/dist/{dist-BVdsO7Py.mjs → dist-Cor9XGoz.mjs} +94 -200
- package/dist/{dist-Bn8Kodjp.mjs → dist-D15hFhP0.mjs} +1 -1
- package/dist/{domain-BAdwm-QS.mjs → domain-CA2wBgra.mjs} +5 -5
- package/dist/drizzle-9TubSZvI.mjs +1 -0
- package/dist/{email-BcjSyAL0.mjs → email-B9ayYQEG.mjs} +1 -1
- package/dist/{email-MwjA7kaL.mjs → email-DXpCc77w.mjs} +10 -10
- package/dist/{email-cloudflare-etpKiITL.mjs → email-cloudflare-D03g2TkS.mjs} +7 -7
- package/dist/{entry-B_0IhV64.mjs → entry-BEM8ZuGP.mjs} +40 -12
- package/dist/{env-B163-G1s.mjs → env-DgOQ9_8S.mjs} +6 -6
- package/dist/{env-public-CCdykygU.d.mts → env-public-6lqiSD2b.d.mts} +1 -0
- package/dist/{env-types-GRchm5dw.mjs → env-types-BicfKBhV.mjs} +1 -1
- package/dist/{env-validation-CuGfWRJd.mjs → env-validation-BmsdCZEk.mjs} +1 -1
- package/dist/{env-validation-D_KyMdab.mjs → env-validation-Dwq3PJzK.mjs} +3 -3
- package/dist/{gen-CYN3wiov.mjs → gen-BfmcIi2g.mjs} +5 -5
- package/dist/gen-NrOlWZaG.mjs +1 -0
- package/dist/{github-cmd-C8QsnJQs.mjs → github-cmd-CY9LUqLh.mjs} +4 -4
- package/dist/{handler-D5K_yP6T.d.mts → handler-BbkSPzGF.d.mts} +90 -8
- package/dist/{headers-Bi4bOAwp.mjs → headers-D522zd0A.mjs} +2 -2
- package/dist/help-BeAFFE5C.mjs +1 -0
- package/dist/{help-B2sFwn9b.mjs → help-CxSlPpzJ.mjs} +40 -10
- package/dist/{inbound-BuTfm11U.mjs → inbound-VrOLqwZY.mjs} +1 -1
- package/dist/index.d.mts +1 -1
- package/dist/index.mjs +91 -57
- package/dist/{info-Bxunp14X.mjs → info-7VDlhtyy.mjs} +4 -4
- package/dist/{init-DGFQMnbk.mjs → init-DxYyOs4-.mjs} +103 -43
- package/dist/{link-CwrfpjIM.mjs → link-Ddmod1dZ.mjs} +5 -5
- package/dist/{list-hKoW5z-b.mjs → list-MogaugiO.mjs} +5 -5
- package/dist/{live-JheIDZKc.d.mts → live-Bt8Y_0bg.d.mts} +1 -1
- package/dist/{local-d1-CpaPbd_L.mjs → local-d1-BHBnKWRb.mjs} +1 -1
- package/dist/{log-vqY3pqwI.mjs → log-BMwmN5Ae.mjs} +2 -2
- package/dist/{login-f2eu2TQh.mjs → login-Cttnagmm.mjs} +4 -4
- package/dist/login-DgDwlKc_.mjs +1 -0
- package/dist/{logs-CEWqD-_B.mjs → logs-CAszUWZI.mjs} +4 -4
- package/dist/{migrate-DYfdWBXt.mjs → migrate-DyT2jJ8y.mjs} +5 -5
- package/dist/migrate-n49ZeS1X.mjs +1 -0
- package/dist/{mime-srOklVVv.mjs → mime-BAyHPskU.mjs} +1 -1
- package/dist/nitro.mjs +3 -3
- package/dist/{node-uN8_zxJr.mjs → node-WB7c2N4L.mjs} +2 -2
- package/dist/operator-cmd-d2MvJOrl.mjs +1 -0
- package/dist/{operator-cmd-DCr_QGMH.mjs → operator-cmd-skshjMGl.mjs} +4 -4
- package/dist/output-BW9uK099.mjs +1 -0
- package/dist/{output-CKguMgr7.mjs → output-BpgYODYx.mjs} +3 -3
- package/dist/pages/client.d.mts +5 -1
- package/dist/pages/client.mjs +47 -30
- package/dist/pages/index.d.mts +1 -1
- package/dist/pages/index.mjs +3 -3
- package/dist/pages/islands-plugin.mjs +2 -1
- package/dist/pages/protocol.d.mts +2 -2
- package/dist/pages/protocol.mjs +1 -1
- package/dist/{parse-filename-CUbj-1MP.mjs → parse-filename-DioPHiR9.mjs} +1 -35
- package/dist/{picocolors-BTps1_gs.mjs → picocolors-BsDfhxIw.mjs} +1 -1
- package/dist/{platform-args-B7ke06up.mjs → platform-args-DVbVClZl.mjs} +12 -4
- package/dist/platform-args-kQrgxScY.mjs +1 -0
- package/dist/{platform-auth-config-qGvEuns3.mjs → platform-auth-config-C-pm5Qzx.mjs} +6 -6
- package/dist/{platform-auth-protection-CyLcD6ot.mjs → platform-auth-protection-SHhvim1L.mjs} +4 -4
- package/dist/{platform-auth-recovery-B2LKI8V2.mjs → platform-auth-recovery-DXVWs-wA.mjs} +4 -4
- package/dist/{platform-cmd-CX7phm7V.mjs → platform-cmd-D5I1beUX.mjs} +7 -7
- package/dist/{platform-cmd-B2ec5eFg.mjs → platform-cmd-PiNRkopU.mjs} +1 -1
- package/dist/{platform-domain-DDNK2y-4.mjs → platform-domain-jpmBfZeb.mjs} +4 -4
- package/dist/{platform-lifecycle-CWc5gr6c.mjs → platform-lifecycle-DH3Yr1qQ.mjs} +1 -1
- package/dist/{platform-lifecycle-3CR98Tg2.mjs → platform-lifecycle-DyKmuNY6.mjs} +28 -17
- package/dist/{platform-management-o3LCCeE4.mjs → platform-management--vDwSn35.mjs} +11 -5
- package/dist/{platform-management-DAE6g2QU.mjs → platform-management-7m-PLaPJ.mjs} +1 -1
- package/dist/{platform-plans-config-CBMZxCep.mjs → platform-plans-config-CeydDSj0.mjs} +2 -2
- package/dist/{platform-recovery-Dmsg7lWA.mjs → platform-recovery-BiNpZZab.mjs} +2 -2
- package/dist/{platform-setup-hFbnWAVQ.mjs → platform-setup-Ca53gtt0.mjs} +3 -2
- package/dist/{plugin-inference-Bekzjuqw.mjs → plugin-inference-DUjCd55H.mjs} +145 -218
- package/dist/{prepare-HKo7Rh5V.mjs → prepare-BcAE5Sdj.mjs} +3 -3
- package/dist/prepare-C4I0f--h.mjs +1 -0
- package/dist/{prepare-DepAGBcV.mjs → prepare-DA-17DhO.mjs} +5 -5
- package/dist/{prerender-render-Bfsumdkv.mjs → prerender-render-Cijv7UFo.mjs} +11 -6
- package/dist/prerender-render.mjs +1 -1
- package/dist/{project-cmd-8ylYGx-O.mjs → project-cmd-DA4K5faU.mjs} +17 -17
- package/dist/{project-team-Bvpl78we.mjs → project-team-CQBNveX3.mjs} +4 -4
- package/dist/{project-token-QWHoJH2t.mjs → project-token-CCalFyQf.mjs} +4 -4
- package/dist/{project-zero-trust-8tJ-RFvu.mjs → project-zero-trust-DPnkiEuT.mjs} +4 -4
- package/dist/{protocol-Ssc_LhHj.d.mts → protocol-BBDpJz3G.d.mts} +3 -1
- package/dist/{protocol-bAUUkx70.mjs → protocol-DimNxVRr.mjs} +41 -16
- package/dist/{provision-BgXFDv0d.mjs → provision-BFLCrnUp.mjs} +1 -1
- package/dist/{provision-DZKYCEJg.mjs → provision-DtROpNNI.mjs} +3 -3
- package/dist/{requests-Vk5Zyhcy.mjs → requests-BpH0kImL.mjs} +3 -3
- package/dist/resolve-project-DD1vu8s9.mjs +1 -0
- package/dist/{resolve-project-WpwkCB_c.mjs → resolve-project-Xoi6eTWY.mjs} +1 -1
- package/dist/{rollback-CH4yMQys.mjs → rollback-CXS1tAa-.mjs} +4 -4
- package/dist/{rolldown-runtime-DXIUcv95.mjs → rolldown-runtime-3h0WiCiA.mjs} +1 -1
- package/dist/{routing-assets-VkrKIbxE.mjs → routing-assets-DdSFxoLp.mjs} +10 -4
- package/dist/runtime/better-auth-mysql.d.mts +1 -1
- package/dist/runtime/better-auth-pg.d.mts +1 -1
- package/dist/runtime/better-auth.d.mts +1 -1
- package/dist/runtime/email/testing.mjs +4 -4
- package/dist/runtime/email.mjs +3 -3
- package/dist/runtime/env-public.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/routing.d.mts +17 -76
- package/dist/runtime/routing.mjs +277 -216
- package/dist/runtime/validator.d.mts +1 -1
- package/dist/runtime/ws-server.d.mts +2 -2
- package/dist/runtime/ws.d.mts +1 -1
- package/dist/{scan-D2-FcLHs.mjs → scan-8IzYXiU_.mjs} +12 -11
- package/dist/{secret-wr6Sn4Xa.mjs → secret-BbXHfLAt.mjs} +6 -6
- package/dist/{skills-C_yRTg0g.mjs → skills-CrUO3PJ0.mjs} +1 -1
- package/dist/{subcommand-prompt-CNZc4XUd.mjs → subcommand-prompt-D9OhhbGG.mjs} +2 -2
- package/dist/{version-metadata-B1Bm2wSq.mjs → version-metadata-tS39iW09.mjs} +1 -1
- package/dist/wrangler-BLb3_luP.mjs +1 -0
- package/dist/{wrangler-C9XSzrju.mjs → wrangler-F96NnLyb.mjs} +13 -5
- package/dist/{wrapper-DGsYwNi6.mjs → wrapper-D3sZyh2C.mjs} +3 -3
- package/dist/{ws-nnFnAyQb.d.mts → ws-BH-im_tX.d.mts} +1 -1
- package/docs/guide/ai.md +1 -1
- package/docs/guide/database/postgresql.md +1 -1
- package/docs/guide/database.md +26 -0
- package/docs/guide/email/domains.md +1 -1
- package/docs/guide/pages-routing/actions-and-forms.md +1 -1
- package/docs/guide/pages-routing/overview.md +1 -1
- package/docs/guide/platform/installation/credentials.md +1 -1
- package/docs/guide/platform/installation/domains.md +16 -0
- package/docs/guide/quickstart.md +26 -1
- package/docs/guide/sandboxes.md +2 -2
- package/docs/guide/self-hosted-platform.md +1 -1
- package/docs/guide/server-routing.md +1 -1
- package/docs/integrations/cloudflare.md +1 -0
- package/docs/reference/api/env.md +1 -1
- package/docs/reference/api/rewrites.md +1 -1
- package/docs/reference/api/types.md +1 -0
- package/docs/reference/cli/platform-installation.md +3 -2
- package/docs/reference/cli/setup.md +17 -0
- package/docs/reference/cli.md +1 -1
- package/docs/reference/config.md +13 -0
- package/docs/reference/resource-inference.md +4 -0
- package/package.json +22 -22
- package/sandbox.Dockerfile +2 -2
- package/schema.json +23 -3
- package/dist/cf-build-output-Dcmxa-Zm.mjs +0 -1
- package/dist/cf-user-agent-BkEHPDLA.mjs +0 -16
- package/dist/client-DAnfyMe9.mjs +0 -1
- package/dist/deploy-Dc0XsCQj.mjs +0 -2
- package/dist/gen-Cf-RBVg4.mjs +0 -1
- package/dist/help-w-xlx_kq.mjs +0 -1
- package/dist/login-08mBwZfI.mjs +0 -1
- package/dist/migrate-Di-4EuoE.mjs +0 -1
- package/dist/operator-cmd-Bv20yLu2.mjs +0 -1
- package/dist/platform-args-B_LrqEZB.mjs +0 -1
- package/dist/prepare-EVEbQ9n2.mjs +0 -1
- package/dist/resolve-project-PnhzMtY6.mjs +0 -1
- package/dist/wrangler-DAdxHEzh.mjs +0 -1
package/dist/cli/cli.mjs
CHANGED
|
@@ -1,13 +1,13 @@
|
|
|
1
1
|
#!/usr/bin/env node
|
|
2
|
-
import { L as log } from "../dist-
|
|
3
|
-
import { f as import_picocolors, l as formatUrl } from "../output-CKguMgr7.mjs";
|
|
2
|
+
import { L as log } from "../dist-Cor9XGoz.mjs";
|
|
4
3
|
import { t as formatCloudflareUserMessage } from "../cloudflare-user-output-Q-k0QoNQ.mjs";
|
|
5
4
|
import { n as getOwnVersion } from "../agents-CuNtT0D_.mjs";
|
|
6
|
-
import {
|
|
7
|
-
import {
|
|
5
|
+
import { f as import_picocolors, l as formatUrl } from "../output-BpgYODYx.mjs";
|
|
6
|
+
import { n as isD1Bookmark } from "../cf-command-values-ByHk0xg4.mjs";
|
|
7
|
+
import { i as printVoidHeader, n as printGlobalHelp, r as printHelpPage, t as getHelpPath } from "../help-CxSlPpzJ.mjs";
|
|
8
8
|
import { r as OperatorClientError } from "../operator-client-C-ROjk1I.mjs";
|
|
9
9
|
import { n as operatorGroups } from "../operator-args-UnE8Y2eK.mjs";
|
|
10
|
-
import { n as platformSubcommands, t as parsePlatformArgs } from "../platform-args-
|
|
10
|
+
import { n as platformSubcommands, t as parsePlatformArgs } from "../platform-args-DVbVClZl.mjs";
|
|
11
11
|
import { parseArgs } from "node:util";
|
|
12
12
|
//#region src/cli/account-args.ts
|
|
13
13
|
const accountSubcommands = [
|
|
@@ -1604,7 +1604,7 @@ async function runSubcommandGroup(command, subcommands, parse, run) {
|
|
|
1604
1604
|
const hasNamedSubcommand = args.slice(1).some((arg) => subcommands.some(({ name }) => name === arg));
|
|
1605
1605
|
try {
|
|
1606
1606
|
if ((!sub || sub.startsWith("-") && !hasNamedSubcommand) && process.stdin.isTTY) {
|
|
1607
|
-
const { promptSubcommand } = await import("../subcommand-prompt-
|
|
1607
|
+
const { promptSubcommand } = await import("../subcommand-prompt-D9OhhbGG.mjs");
|
|
1608
1608
|
if (command === "platform" && !sub) log.info(`A Void platform lets a team deploy Void apps to a shared Cloudflare account.
|
|
1609
1609
|
This command sets up and manages platforms. Join with \`void connect <url>\`.
|
|
1610
1610
|
Docs: ${formatUrl("https://void.cloud/guide/self-hosted-platform")}`);
|
|
@@ -1632,19 +1632,19 @@ const args = process.argv.slice(2);
|
|
|
1632
1632
|
const command = args[0];
|
|
1633
1633
|
const helpPath = getHelpPath(args);
|
|
1634
1634
|
const subcommandGroups = {
|
|
1635
|
-
auth: () => runSubcommandGroup("auth", authSubcommands, parseAuthArgs, (root, parsed) => import("../auth-router-
|
|
1636
|
-
account: () => runSubcommandGroup("account", accountSubcommands, parseAccountArgs, (root, parsed) => import("../account-cmd-
|
|
1637
|
-
platform: () => runSubcommandGroup("platform", platformSubcommands, parsePlatformArgs, (root, parsed) => import("../platform-cmd-
|
|
1638
|
-
cloudflare: () => runSubcommandGroup("cloudflare", cloudflareSubcommands, parseCloudflareArgs, (root, parsed) => import("../cloudflare-cmd-
|
|
1639
|
-
project: () => runSubcommandGroup("project", projectSubcommands, parseProjectArgs, (root, parsed) => import("../project-cmd-
|
|
1640
|
-
secret: () => runSubcommandGroup("secret", secretSubcommands, parseSecretArgs, (root, parsed) => import("../secret-
|
|
1641
|
-
domain: () => runSubcommandGroup("domain", domainSubcommands, parseDomainArgs, (root, parsed) => import("../domain-
|
|
1642
|
-
email: () => runSubcommandGroup("email", emailSubcommands, parseEmailArgs, (root, parsed) => import("../email-
|
|
1643
|
-
db: () => runSubcommandGroup("db", dbSubcommands, parseDbArgs, (root, parsed) => import("../db-
|
|
1644
|
-
env: () => runSubcommandGroup("env", envSubcommands, parseEnvArgs, (root, parsed) => import("../env-
|
|
1645
|
-
gen: () => runSubcommandGroup("gen", genSubcommands, parseGenArgs, (root, parsed) => import("../gen-
|
|
1646
|
-
github: () => runSubcommandGroup("github", githubSubcommands, parseGithubArgs, (root, parsed) => import("../github-cmd-
|
|
1647
|
-
build: () => runSubcommandGroup("build", buildSubcommands, parseBuildArgs, (root, parsed) => import("../build-cmd-
|
|
1635
|
+
auth: () => runSubcommandGroup("auth", authSubcommands, parseAuthArgs, (root, parsed) => import("../auth-router-6I81r-ix.mjs").then(({ runAuthRouter }) => runAuthRouter(root, parsed))),
|
|
1636
|
+
account: () => runSubcommandGroup("account", accountSubcommands, parseAccountArgs, (root, parsed) => import("../account-cmd-CdUll_35.mjs").then(({ runAccountCommand }) => runAccountCommand(root, parsed))),
|
|
1637
|
+
platform: () => runSubcommandGroup("platform", platformSubcommands, parsePlatformArgs, (root, parsed) => import("../platform-cmd-PiNRkopU.mjs").then(({ runPlatformCommand }) => runPlatformCommand(root, parsed))),
|
|
1638
|
+
cloudflare: () => runSubcommandGroup("cloudflare", cloudflareSubcommands, parseCloudflareArgs, (root, parsed) => import("../cloudflare-cmd-DMzCv12s.mjs").then(({ runCloudflareCommand }) => runCloudflareCommand(root, parsed))),
|
|
1639
|
+
project: () => runSubcommandGroup("project", projectSubcommands, parseProjectArgs, (root, parsed) => import("../project-cmd-DA4K5faU.mjs").then(({ runProjectCommand }) => runProjectCommand(root, parsed))),
|
|
1640
|
+
secret: () => runSubcommandGroup("secret", secretSubcommands, parseSecretArgs, (root, parsed) => import("../secret-BbXHfLAt.mjs").then(({ runSecretCommand }) => runSecretCommand(root, parsed))),
|
|
1641
|
+
domain: () => runSubcommandGroup("domain", domainSubcommands, parseDomainArgs, (root, parsed) => import("../domain-CA2wBgra.mjs").then(({ runDomainCommand }) => runDomainCommand(root, parsed))),
|
|
1642
|
+
email: () => runSubcommandGroup("email", emailSubcommands, parseEmailArgs, (root, parsed) => import("../email-DXpCc77w.mjs").then(({ runEmailCommand }) => runEmailCommand(root, parsed))),
|
|
1643
|
+
db: () => runSubcommandGroup("db", dbSubcommands, parseDbArgs, (root, parsed) => import("../db-DVOkLH5X.mjs").then(({ runDbCommand }) => runDbCommand(root, parsed))),
|
|
1644
|
+
env: () => runSubcommandGroup("env", envSubcommands, parseEnvArgs, (root, parsed) => import("../env-DgOQ9_8S.mjs").then(({ runEnvCommand }) => runEnvCommand(root, parsed))),
|
|
1645
|
+
gen: () => runSubcommandGroup("gen", genSubcommands, parseGenArgs, (root, parsed) => import("../gen-NrOlWZaG.mjs").then(({ runGenCommand }) => runGenCommand(root, parsed))),
|
|
1646
|
+
github: () => runSubcommandGroup("github", githubSubcommands, parseGithubArgs, (root, parsed) => import("../github-cmd-CY9LUqLh.mjs").then(({ runGithubCommand }) => runGithubCommand(root, parsed))),
|
|
1647
|
+
build: () => runSubcommandGroup("build", buildSubcommands, parseBuildArgs, (root, parsed) => import("../build-cmd-ex1g-j_e.mjs").then(({ runBuildCommand }) => runBuildCommand(root, parsed)))
|
|
1648
1648
|
};
|
|
1649
1649
|
if (helpPath) {
|
|
1650
1650
|
if (helpPath.length === 0) printGlobalHelp();
|
|
@@ -1663,7 +1663,7 @@ if (helpPath) {
|
|
|
1663
1663
|
log.error(formatCloudflareUserMessage(err instanceof Error ? err.message : String(err)));
|
|
1664
1664
|
process.exit(1);
|
|
1665
1665
|
}
|
|
1666
|
-
import("../deploy-
|
|
1666
|
+
import("../deploy-CE0Ev0Ob.mjs").then(({ runDeploy }) => {
|
|
1667
1667
|
runDeploy(root, deployArgs).catch((err) => {
|
|
1668
1668
|
log.error(formatCloudflareUserMessage(err.message ?? String(err)));
|
|
1669
1669
|
process.exit(1);
|
|
@@ -1671,14 +1671,14 @@ if (helpPath) {
|
|
|
1671
1671
|
});
|
|
1672
1672
|
} else if (command === "connect") (async () => {
|
|
1673
1673
|
const parsed = parseConnectArgs(args.slice(1));
|
|
1674
|
-
const { runConnectCommand } = await import("../connect-
|
|
1674
|
+
const { runConnectCommand } = await import("../connect-k7R2rPVA.mjs");
|
|
1675
1675
|
await runConnectCommand(process.cwd(), parsed);
|
|
1676
1676
|
})().catch((err) => {
|
|
1677
1677
|
log.error(formatCloudflareUserMessage(err instanceof Error ? err.message : String(err)));
|
|
1678
1678
|
process.exit(1);
|
|
1679
1679
|
});
|
|
1680
1680
|
else if (command && Object.hasOwn(subcommandGroups, command)) subcommandGroups[command]();
|
|
1681
|
-
else if (command === "info") import("../info-
|
|
1681
|
+
else if (command === "info") import("../info-7VDlhtyy.mjs").then(async ({ runInfoCommand }) => {
|
|
1682
1682
|
try {
|
|
1683
1683
|
await runInfoCommand(process.cwd(), parseInfoArgs(args.slice(1)));
|
|
1684
1684
|
} catch (err) {
|
|
@@ -1699,7 +1699,7 @@ else if (command === "prepare") {
|
|
|
1699
1699
|
log.error(formatCloudflareUserMessage(err instanceof Error ? err.message : String(err)));
|
|
1700
1700
|
process.exit(1);
|
|
1701
1701
|
}
|
|
1702
|
-
import("../prepare-
|
|
1702
|
+
import("../prepare-BcAE5Sdj.mjs").then(({ runPrepareCommand }) => {
|
|
1703
1703
|
runPrepareCommand(root).catch((err) => {
|
|
1704
1704
|
log.error(formatCloudflareUserMessage(err.message ?? String(err)));
|
|
1705
1705
|
process.exit(1);
|
|
@@ -1707,7 +1707,7 @@ else if (command === "prepare") {
|
|
|
1707
1707
|
});
|
|
1708
1708
|
} else if (command === "init") {
|
|
1709
1709
|
const root = process.cwd();
|
|
1710
|
-
import("../init-
|
|
1710
|
+
import("../init-DxYyOs4-.mjs").then(({ runInitCommand, parseInitArgs }) => {
|
|
1711
1711
|
let initArgs;
|
|
1712
1712
|
try {
|
|
1713
1713
|
initArgs = parseInitArgs(args.slice(1));
|
|
@@ -1725,7 +1725,7 @@ else if (command === "prepare") {
|
|
|
1725
1725
|
log.error("migrate: This command takes no arguments.");
|
|
1726
1726
|
process.exit(1);
|
|
1727
1727
|
}
|
|
1728
|
-
import("../migrate-
|
|
1728
|
+
import("../migrate-n49ZeS1X.mjs").then(({ runMigrateCommand }) => {
|
|
1729
1729
|
runMigrateCommand(process.cwd()).catch((err) => {
|
|
1730
1730
|
log.error(formatCloudflareUserMessage(err instanceof Error ? err.message : String(err)));
|
|
1731
1731
|
process.exit(1);
|
|
@@ -1839,7 +1839,7 @@ else if (command) {
|
|
|
1839
1839
|
];
|
|
1840
1840
|
(async () => {
|
|
1841
1841
|
printVoidHeader();
|
|
1842
|
-
const { promptSubcommand } = await import("../subcommand-prompt-
|
|
1842
|
+
const { promptSubcommand } = await import("../subcommand-prompt-D9OhhbGG.mjs");
|
|
1843
1843
|
const result = await promptSubcommand("", topLevelCommands);
|
|
1844
1844
|
if (!result) process.exit(0);
|
|
1845
1845
|
const cmd = result.subcommand;
|
|
@@ -1847,32 +1847,32 @@ else if (command) {
|
|
|
1847
1847
|
if (Object.hasOwn(subcommandGroups, cmd)) return subcommandGroups[cmd]();
|
|
1848
1848
|
switch (cmd) {
|
|
1849
1849
|
case "connect": {
|
|
1850
|
-
const { runConnectCommand } = await import("../connect-
|
|
1850
|
+
const { runConnectCommand } = await import("../connect-k7R2rPVA.mjs");
|
|
1851
1851
|
await runConnectCommand(root, parseConnectArgs([]));
|
|
1852
1852
|
return;
|
|
1853
1853
|
}
|
|
1854
1854
|
case "init": {
|
|
1855
|
-
const { runInitCommand, parseInitArgs } = await import("../init-
|
|
1855
|
+
const { runInitCommand, parseInitArgs } = await import("../init-DxYyOs4-.mjs");
|
|
1856
1856
|
await runInitCommand(root, parseInitArgs([]));
|
|
1857
1857
|
return;
|
|
1858
1858
|
}
|
|
1859
1859
|
case "migrate": {
|
|
1860
|
-
const { runMigrateCommand } = await import("../migrate-
|
|
1860
|
+
const { runMigrateCommand } = await import("../migrate-n49ZeS1X.mjs");
|
|
1861
1861
|
await runMigrateCommand(root);
|
|
1862
1862
|
return;
|
|
1863
1863
|
}
|
|
1864
1864
|
case "deploy": {
|
|
1865
|
-
const { runDeploy } = await import("../deploy-
|
|
1865
|
+
const { runDeploy } = await import("../deploy-CE0Ev0Ob.mjs");
|
|
1866
1866
|
await runDeploy(root);
|
|
1867
1867
|
return;
|
|
1868
1868
|
}
|
|
1869
1869
|
case "info": {
|
|
1870
|
-
const { runInfoCommand } = await import("../info-
|
|
1870
|
+
const { runInfoCommand } = await import("../info-7VDlhtyy.mjs");
|
|
1871
1871
|
await runInfoCommand(root, parseInfoArgs([]));
|
|
1872
1872
|
return;
|
|
1873
1873
|
}
|
|
1874
1874
|
case "prepare": {
|
|
1875
|
-
const { runPrepareCommand } = await import("../prepare-
|
|
1875
|
+
const { runPrepareCommand } = await import("../prepare-BcAE5Sdj.mjs");
|
|
1876
1876
|
await runPrepareCommand(root);
|
|
1877
1877
|
return;
|
|
1878
1878
|
}
|
|
@@ -1,10 +1,10 @@
|
|
|
1
1
|
#!/usr/bin/env node
|
|
2
|
-
import { n as __toESM } from "../rolldown-runtime-
|
|
2
|
+
import { n as __toESM } from "../rolldown-runtime-3h0WiCiA.mjs";
|
|
3
3
|
import { a as join, c as resolve, n as dirname } from "../dist-ipQi0Q8y.mjs";
|
|
4
|
-
import { t as require_picocolors } from "../picocolors-
|
|
5
|
-
import { l as formatUrl } from "../output-
|
|
6
|
-
import { n as
|
|
7
|
-
import { n as getVoidUserAgent, t as
|
|
4
|
+
import { t as require_picocolors } from "../picocolors-BsDfhxIw.mjs";
|
|
5
|
+
import { l as formatUrl } from "../output-BpgYODYx.mjs";
|
|
6
|
+
import { i as safePositional, n as isD1Bookmark, r as readCfUploadOutput, t as CF_VERSION_SOURCE_MAX_OUTPUT_BYTES } from "../cf-command-values-ByHk0xg4.mjs";
|
|
7
|
+
import { n as getCfCliVersion, r as getVoidUserAgent, t as publishCloudflareObservability } from "../cf-worker-settings-BECvvTVd.mjs";
|
|
8
8
|
import { t as sanitizeTerminalLogText } from "../terminal-log-text-D9ACPOuG.mjs";
|
|
9
9
|
import { copyFileSync, mkdtempSync, readFileSync, rmSync, writeFileSync } from "node:fs";
|
|
10
10
|
import { fileURLToPath } from "node:url";
|
|
@@ -254,7 +254,7 @@ async function withBuildOutput(raw, sourceMain, action) {
|
|
|
254
254
|
}), { mode: 384 });
|
|
255
255
|
const accountId = process.env.CLOUDFLARE_ACCOUNT_ID ?? raw.account_id;
|
|
256
256
|
if (typeof accountId !== "string" || !accountId) throw new Error("Cloudflare account is not pinned for Worker deployment.");
|
|
257
|
-
const { prepareCfBuildOutput } = await import("../cf-build-output-
|
|
257
|
+
const { prepareCfBuildOutput } = await import("../cf-build-output-BJHuSsVN.mjs");
|
|
258
258
|
const output = await prepareCfBuildOutput(scratch, accountId);
|
|
259
259
|
if (!output) throw new Error("Could not prepare the Cloudflare Worker build output.");
|
|
260
260
|
try {
|
|
@@ -915,7 +915,7 @@ async function workerHistory() {
|
|
|
915
915
|
...operation.includeSource ? ["--include", "modules"] : []
|
|
916
916
|
], process.cwd(), operation.includeSource ? {
|
|
917
917
|
timeoutMs: 3e4,
|
|
918
|
-
maxOutputBytes:
|
|
918
|
+
maxOutputBytes: CF_VERSION_SOURCE_MAX_OUTPUT_BYTES
|
|
919
919
|
} : void 0);
|
|
920
920
|
if (called.status !== 0) return called;
|
|
921
921
|
const version = object(parsedJson(called.stdout));
|
|
@@ -995,12 +995,22 @@ async function workerChanges() {
|
|
|
995
995
|
if (raw.account_id !== void 0 && raw.account_id !== accountId()) throw new Error("Cloudflare trigger target changed.");
|
|
996
996
|
return operation.type === "triggers.clear-crons" ? clearWorkerCronSchedules(name) : clearWorkerCustomDomains(name);
|
|
997
997
|
}
|
|
998
|
-
if (operation.type === "triggers.deploy")
|
|
999
|
-
|
|
1000
|
-
|
|
1001
|
-
|
|
1002
|
-
|
|
1003
|
-
|
|
998
|
+
if (operation.type === "triggers.deploy") {
|
|
999
|
+
const deployed = await withBuildOutput(raw, null, (directory) => runCf([
|
|
1000
|
+
"workers",
|
|
1001
|
+
"triggers",
|
|
1002
|
+
"deploy",
|
|
1003
|
+
"--prebuilt"
|
|
1004
|
+
], directory));
|
|
1005
|
+
if (deployed.status === 0 && raw.observability !== void 0) await publishCloudflareObservability({
|
|
1006
|
+
apiBaseUrl: apiBaseUrl(),
|
|
1007
|
+
accountId: accountId(),
|
|
1008
|
+
workerName: name,
|
|
1009
|
+
observability: raw.observability,
|
|
1010
|
+
headers: await apiHeaders()
|
|
1011
|
+
});
|
|
1012
|
+
return deployed;
|
|
1013
|
+
}
|
|
1004
1014
|
if (operation.type === "versions.upload" || operation.type === "worker.deploy") {
|
|
1005
1015
|
const path = configPath();
|
|
1006
1016
|
if (typeof raw.main !== "string" || !raw.main || raw.no_bundle !== true) throw new Error("Cloudflare Worker upload requires a prebuilt platform Worker.");
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { t as findEnvFile } from "../env-types-
|
|
1
|
+
import { t as findEnvFile } from "../env-types-BicfKBhV.mjs";
|
|
2
2
|
import { writeSync } from "node:fs";
|
|
3
3
|
import { fileURLToPath } from "node:url";
|
|
4
4
|
import { spawnSync } from "node:child_process";
|
|
@@ -109,7 +109,7 @@ function emitResult(result) {
|
|
|
109
109
|
writeSync(RESULT_FD, JSON.stringify(result));
|
|
110
110
|
}
|
|
111
111
|
async function runFactsChild(root) {
|
|
112
|
-
const { deriveSelfHostSchemaFacts, SelfHostSchemaError } = await import("../env-validation-
|
|
112
|
+
const { deriveSelfHostSchemaFacts, SelfHostSchemaError } = await import("../env-validation-BmsdCZEk.mjs");
|
|
113
113
|
try {
|
|
114
114
|
emitResult({
|
|
115
115
|
kind: "ok",
|
|
@@ -128,7 +128,7 @@ async function runFactsChild(root) {
|
|
|
128
128
|
}
|
|
129
129
|
/** The parent already found the emitted config, so a read failure here fails closed. */
|
|
130
130
|
async function runValidateEmittedChild(root) {
|
|
131
|
-
const { computeInvalidEmittedKeys, readEmittedWorkerVars, SelfHostSchemaError } = await import("../env-validation-
|
|
131
|
+
const { computeInvalidEmittedKeys, readEmittedWorkerVars, SelfHostSchemaError } = await import("../env-validation-BmsdCZEk.mjs");
|
|
132
132
|
const emitted = readEmittedWorkerVars(root);
|
|
133
133
|
if (!emitted.ok) {
|
|
134
134
|
emitResult({
|
|
@@ -95,7 +95,7 @@ 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 = "1.
|
|
98
|
+
const MIN_PLATFORM_VERSION = "1.2.0";
|
|
99
99
|
const RELEASE_VERSION = /^(\d+)\.(\d+)\.(\d+)(-[0-9A-Za-z.-]+)?(\+[0-9A-Za-z.-]+)?$/;
|
|
100
100
|
/**
|
|
101
101
|
* Discovery probes keyed by platform base URL. Every outcome (pass,
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export { r as PlatformClient } from "./client-BEkdj1kx.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-8jEYIeim.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-
|
|
3
|
-
import { L as log } from "./dist-
|
|
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-
|
|
2
|
+
import { b as readRootWranglerConfig } from "./wrangler-F96NnLyb.mjs";
|
|
3
|
+
import { L as log } from "./dist-Cor9XGoz.mjs";
|
|
4
|
+
import { m as printSuccess } from "./output-BpgYODYx.mjs";
|
|
5
|
+
import { i as isCleanCloudflareExit } from "./cloudflare-process-8jEYIeim.mjs";
|
|
6
|
+
import { a as parseCloudflareAuthSession, i as ensureCloudflareAuthentication, n as cloudflareCredentialOverrides, r as createBundledCloudflareAuthRunner } from "./cloudflare-auth-Byo_0_N9.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
2
|
import "./project-paths-DGu_QZ_Q.mjs";
|
|
3
|
-
import {
|
|
3
|
+
import { p as readConfig } from "./config-DHgSEWT7.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 {
|
|
3
|
-
import { K as select, L as log, tt as isCancel } from "./dist-
|
|
4
|
-
import { i as ensureCloudflareAuthentication, r as createBundledCloudflareAuthRunner } from "./cloudflare-auth-
|
|
2
|
+
import { M as writeProvisionedWranglerConfig, b as readRootWranglerConfig, i as LATEST_KNOWN_COMPAT_DATE } from "./wrangler-F96NnLyb.mjs";
|
|
3
|
+
import { K as select, L as log, tt as isCancel } from "./dist-Cor9XGoz.mjs";
|
|
4
|
+
import { i as ensureCloudflareAuthentication, r as createBundledCloudflareAuthRunner } from "./cloudflare-auth-Byo_0_N9.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,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 {
|
|
4
|
-
import { u as getErrorMessage } from "./output-
|
|
5
|
-
import { t as createCloudflareProcessRunner } from "./cloudflare-process-
|
|
6
|
-
import { _ as provisionEnv, r as assertNoTransportRedirectInProjectDotenv, s as deleteEnvVarCaseAware, v as resolvePinnedApiBaseUrl } from "./provision-
|
|
7
|
-
import { a as findWranglerCiOverrideDotenvFile, i as findAmbientConfigOverride } from "./deploy-transport-
|
|
2
|
+
import { i as persistCloudflareConfig, r as materializeCloudflareConfig } from "./cloudflare-config-DchHxPTo.mjs";
|
|
3
|
+
import { N as writeWranglerPublishedTrafficSnapshot, S as readWranglerCustomDomains, j as updateWranglerCustomDomain, w as readWranglerPublishedTrafficSnapshot } from "./wrangler-F96NnLyb.mjs";
|
|
4
|
+
import { u as getErrorMessage } from "./output-BpgYODYx.mjs";
|
|
5
|
+
import { t as createCloudflareProcessRunner } from "./cloudflare-process-8jEYIeim.mjs";
|
|
6
|
+
import { _ as provisionEnv, r as assertNoTransportRedirectInProjectDotenv, s as deleteEnvVarCaseAware, v as resolvePinnedApiBaseUrl } from "./provision-DtROpNNI.mjs";
|
|
7
|
+
import { a as findWranglerCiOverrideDotenvFile, i as findAmbientConfigOverride } from "./deploy-transport-BzGEj0Ge.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";
|
|
@@ -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 restoreCloudflareD1Database, b as syncCloudflareSecrets, x as tailCloudflareWorker } from "./cloudflare-operations-
|
|
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-Dh9dEHJj.mjs";
|
|
@@ -1,7 +1,8 @@
|
|
|
1
1
|
import { a as join, c as resolve, n as dirname, s as relative } from "./dist-ipQi0Q8y.mjs";
|
|
2
2
|
import { n as readProjectPaths } from "./project-paths-DGu_QZ_Q.mjs";
|
|
3
|
-
import { i as hasSsrEntry, r as getSsrServerEntryPath } from "./entry-
|
|
3
|
+
import { i as hasSsrEntry, r as getSsrServerEntryPath } from "./entry-BEM8ZuGP.mjs";
|
|
4
4
|
import { i as readPackageJson, n as hasPackageDependency, t as getPackageDependencies } from "./package-json-BjYqR-So.mjs";
|
|
5
|
+
import { t as CF_VERSION_SOURCE_MAX_OUTPUT_BYTES } from "./cf-command-values-ByHk0xg4.mjs";
|
|
5
6
|
import { existsSync } from "node:fs";
|
|
6
7
|
import { fileURLToPath } from "node:url";
|
|
7
8
|
import { spawnSync } from "node:child_process";
|
|
@@ -364,7 +365,7 @@ function createCloudflareProcessRunner(options) {
|
|
|
364
365
|
encoding: "utf8",
|
|
365
366
|
shell: false,
|
|
366
367
|
windowsHide: true,
|
|
367
|
-
maxBuffer: 33554432,
|
|
368
|
+
maxBuffer: operation.type === "versions.view" && operation.includeSource ? CF_VERSION_SOURCE_MAX_OUTPUT_BYTES : 33554432,
|
|
368
369
|
timeout: options.timeoutMs,
|
|
369
370
|
stdio: streaming ? [
|
|
370
371
|
"inherit",
|
|
@@ -1,5 +1,6 @@
|
|
|
1
1
|
import { a as join, s as relative } from "./dist-ipQi0Q8y.mjs";
|
|
2
|
-
import {
|
|
2
|
+
import { i as resolveProjectPaths } from "./project-paths-DGu_QZ_Q.mjs";
|
|
3
|
+
import { c as getDatabaseCasing, p as readConfig } from "./config-DHgSEWT7.mjs";
|
|
3
4
|
import { n as schemaSpecifier, t as discoverSchema } from "./discover-LaV0tbIu.mjs";
|
|
4
5
|
import { mkdirSync, mkdtempSync, readFileSync, rmSync, writeFileSync } from "node:fs";
|
|
5
6
|
import { tmpdir } from "node:os";
|
|
@@ -15,14 +16,17 @@ const PLACEHOLDER_DB_URL = {
|
|
|
15
16
|
* Schema and migration paths are relative to the project root: drizzle-kit
|
|
16
17
|
* resolves them against its working directory, and `void db` always runs it
|
|
17
18
|
* with `cwd` set to the project root, so the config file itself may live
|
|
18
|
-
* anywhere (see `outDir`).
|
|
19
|
+
* anywhere (see `outDir`). It carries `database.casing` from the project's
|
|
20
|
+
* config, which `void/db` also passes to drizzle.
|
|
19
21
|
*
|
|
20
22
|
* @param options.outDir Directory for the config file. When set, the file is
|
|
21
23
|
* written readable by the owner only.
|
|
22
24
|
* @returns Absolute path to the written config file.
|
|
23
25
|
*/
|
|
24
26
|
function writeDrizzleConfig(root, dbPath, dialect = "sqlite", options) {
|
|
25
|
-
const
|
|
27
|
+
const projectConfig = readConfig(root);
|
|
28
|
+
const paths = resolveProjectPaths(root, projectConfig);
|
|
29
|
+
const casing = getDatabaseCasing(projectConfig);
|
|
26
30
|
const schema = discoverSchema(root, paths);
|
|
27
31
|
const schemaPaths = [...schema ? [schemaSpecifier(schema, root)] : [], ...(options?.additionalSchemas ?? []).map((path) => `./${relative(root, path)}`)];
|
|
28
32
|
if (schemaPaths.length === 0) throw new Error(`db: No Drizzle schema found. Create ${paths.sourceRelative("db/schema.ts")} or run \`void gen model <name>\`.`);
|
|
@@ -30,6 +34,7 @@ function writeDrizzleConfig(root, dbPath, dialect = "sqlite", options) {
|
|
|
30
34
|
mkdirSync(outDir, { recursive: true });
|
|
31
35
|
const config = {
|
|
32
36
|
dialect,
|
|
37
|
+
...casing ? { casing } : {},
|
|
33
38
|
schema: schemaPaths.length === 1 ? schemaPaths[0] : schemaPaths,
|
|
34
39
|
out: `./${relative(root, paths.migrationsDir)}`,
|
|
35
40
|
migrations: { prefix: "timestamp" },
|
|
@@ -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-BIaXIkkv.mjs";
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import { a as validateSourceDir, c as loadVoidConfig } from "./project-paths-DGu_QZ_Q.mjs";
|
|
2
2
|
import { a as isVoidAuthProvider, t as VOID_AUTH_PROVIDERS } from "./providers-BUHwJlmM.mjs";
|
|
3
|
-
import { n as MimeError, s as parseAddress } from "./mime-
|
|
3
|
+
import { n as MimeError, s as parseAddress } from "./mime-BAyHPskU.mjs";
|
|
4
4
|
import { isRecord } from "@void/deploy-core";
|
|
5
5
|
//#region src/config.ts
|
|
6
6
|
const CONFIG_FILE = "void.json";
|
|
@@ -40,6 +40,12 @@ const VALID_REDIRECT_STATUSES = /* @__PURE__ */ new Set([
|
|
|
40
40
|
308
|
|
41
41
|
]);
|
|
42
42
|
const VALID_DATABASE_VALUES = /* @__PURE__ */ new Set(["pg", "mysql"]);
|
|
43
|
+
const VALID_DATABASE_DIALECTS = /* @__PURE__ */ new Set([
|
|
44
|
+
"sqlite",
|
|
45
|
+
"pg",
|
|
46
|
+
"mysql"
|
|
47
|
+
]);
|
|
48
|
+
const VALID_DATABASE_CASINGS = /* @__PURE__ */ new Set(["snake_case", "camelCase"]);
|
|
43
49
|
/** Cloudflare's hard maximum for Workers CPU time per request (5 minutes). */
|
|
44
50
|
const MAX_WORKER_CPU_MS = 3e5;
|
|
45
51
|
const VALID_SANDBOX_INSTANCE_TYPES = /* @__PURE__ */ new Set([
|
|
@@ -361,7 +367,12 @@ function validateConfigObject(obj) {
|
|
|
361
367
|
}
|
|
362
368
|
}
|
|
363
369
|
if (obj.database !== void 0) {
|
|
364
|
-
if (
|
|
370
|
+
if (isRecord(obj.database)) {
|
|
371
|
+
const databaseCfg = obj.database;
|
|
372
|
+
for (const key of Object.keys(databaseCfg)) if (key !== "dialect" && key !== "casing") throw new Error(`config: Unknown key 'database.${key}' in ${CONFIG_FILE}. Valid: dialect, casing.`);
|
|
373
|
+
if (databaseCfg.dialect !== void 0 && (typeof databaseCfg.dialect !== "string" || !VALID_DATABASE_DIALECTS.has(databaseCfg.dialect))) throw new Error(`config: "database.dialect" in ${CONFIG_FILE} must be "sqlite", "pg" or "mysql".`);
|
|
374
|
+
if (databaseCfg.casing !== void 0 && (typeof databaseCfg.casing !== "string" || !VALID_DATABASE_CASINGS.has(databaseCfg.casing))) throw new Error(`config: "database.casing" in ${CONFIG_FILE} must be "snake_case" or "camelCase".`);
|
|
375
|
+
} else if (typeof obj.database !== "string" || !VALID_DATABASE_VALUES.has(obj.database)) throw new Error(`config: "database" in ${CONFIG_FILE} must be "pg", "mysql" or an object with "dialect" and "casing".`);
|
|
365
376
|
}
|
|
366
377
|
if (obj.ai !== void 0) {
|
|
367
378
|
if (!isRecord(obj.ai)) throw new Error(`config: "ai" in ${CONFIG_FILE} must be an object.`);
|
|
@@ -428,14 +439,36 @@ function resolveBindingNames(bindings) {
|
|
|
428
439
|
return hasCustom ? names : void 0;
|
|
429
440
|
}
|
|
430
441
|
/**
|
|
431
|
-
* Get the database dialect from config. Defaults to "sqlite".
|
|
442
|
+
* Get the database dialect from config, in its string or object form. Defaults to "sqlite".
|
|
432
443
|
*/
|
|
433
444
|
function getDatabaseDialect(config) {
|
|
434
|
-
|
|
435
|
-
|
|
445
|
+
const database = config.database;
|
|
446
|
+
const value = typeof database === "object" && database !== null ? database.dialect : database;
|
|
447
|
+
if (value === "pg") return "postgresql";
|
|
448
|
+
if (value === "mysql") return "mysql";
|
|
436
449
|
return "sqlite";
|
|
437
450
|
}
|
|
438
451
|
/**
|
|
452
|
+
* Get Drizzle's `casing` from config. Undefined when unset: callers then pass no casing,
|
|
453
|
+
* so Drizzle keeps its default of naming a column after its key.
|
|
454
|
+
*/
|
|
455
|
+
function getDatabaseCasing(config) {
|
|
456
|
+
const database = config.database;
|
|
457
|
+
return typeof database === "object" && database !== null ? database.casing : void 0;
|
|
458
|
+
}
|
|
459
|
+
/**
|
|
460
|
+
* The `database` value for a dialect that keeps the configured casing. Without casing it is
|
|
461
|
+
* the string shorthand, or undefined for the default D1 (SQLite).
|
|
462
|
+
*/
|
|
463
|
+
function databaseConfigValue(dialect, casing) {
|
|
464
|
+
const shorthand = dialect === "postgresql" ? "pg" : dialect === "mysql" ? "mysql" : void 0;
|
|
465
|
+
if (casing === void 0) return shorthand;
|
|
466
|
+
return shorthand ? {
|
|
467
|
+
dialect: shorthand,
|
|
468
|
+
casing
|
|
469
|
+
} : { casing };
|
|
470
|
+
}
|
|
471
|
+
/**
|
|
439
472
|
* Convert the `headers` config field into `HeaderRule[]` for the deploy manifest.
|
|
440
473
|
*
|
|
441
474
|
* Each key is a URL pattern (e.g. "/assets/*") and each value is an array of
|
|
@@ -537,4 +570,4 @@ function convertRewriteRules(caller, entries, field, force) {
|
|
|
537
570
|
return rules.length > 0 ? rules : void 0;
|
|
538
571
|
}
|
|
539
572
|
//#endregion
|
|
540
|
-
export { convertRewritesConfig as a,
|
|
573
|
+
export { convertRewritesConfig as a, getDatabaseCasing as c, isProtocolRelative as d, parseHostPrefixedSource as f, validateConfig as h, convertRedirectsConfig as i, getDatabaseDialect as l, resolveBindingNames as m, convertFallbacksConfig as n, countSplats as o, readConfig as p, convertHeadersConfig as r, databaseConfigValue as s, VALID_REDIRECT_STATUSES as t, isNodeTarget as u };
|
|
@@ -21,6 +21,15 @@ type RedirectDestination = string | {
|
|
|
21
21
|
to: string;
|
|
22
22
|
status?: 301 | 302 | 303 | 307 | 308;
|
|
23
23
|
};
|
|
24
|
+
/** Drizzle's `casing`: how a column declared without a name is named in the database. */
|
|
25
|
+
type DatabaseCasing = "snake_case" | "camelCase";
|
|
26
|
+
/** Object form of `database`, for options next to the dialect. */
|
|
27
|
+
type DatabaseConfig = {
|
|
28
|
+
/** Database backend. Defaults to `"sqlite"` (D1). */
|
|
29
|
+
dialect?: "sqlite" | "pg" | "mysql";
|
|
30
|
+
/** Column naming for keys without an explicit column name, as in Drizzle's `casing` option. */
|
|
31
|
+
casing?: DatabaseCasing;
|
|
32
|
+
};
|
|
24
33
|
/** Curated Worker fields accepted by the `worker` config field. */
|
|
25
34
|
type WranglerConfig = {
|
|
26
35
|
compatibility_date?: string;
|
|
@@ -184,7 +193,7 @@ type VoidConfig = {
|
|
|
184
193
|
worker?: WranglerConfig;
|
|
185
194
|
cloudflare?: CloudflareConfig;
|
|
186
195
|
deploy?: DeployConfig;
|
|
187
|
-
database?: "pg" | "mysql";
|
|
196
|
+
database?: "pg" | "mysql" | DatabaseConfig;
|
|
188
197
|
ai?: AiConfig;
|
|
189
198
|
email?: EmailConfig;
|
|
190
199
|
};
|
package/dist/config-entry.d.mts
CHANGED
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { t as VoidConfig } from "./config-
|
|
1
|
+
import { t as VoidConfig } from "./config-DQfHOKh9.mjs";
|
|
2
2
|
//#region src/config-entry.d.ts
|
|
3
3
|
/** Define a typed Void project configuration without loading the Vite plugin. */
|
|
4
4
|
export declare function defineConfig<const T extends VoidConfig>(config: T): T;
|
|
@@ -1,12 +1,12 @@
|
|
|
1
1
|
import { c as normalizePlatformApiUrl, s as listPlatformConnections } from "./platform-registry-B9mWX9LO.mjs";
|
|
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
|
-
import { K as select, L as log, tt as isCancel } from "./dist-
|
|
5
|
-
import {
|
|
6
|
-
import {
|
|
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-
|
|
4
|
+
import { K as select, L as log, tt as isCancel } from "./dist-Cor9XGoz.mjs";
|
|
5
|
+
import { a as isExpiredTokenError, r as PlatformClient } from "./client-BEkdj1kx.mjs";
|
|
6
|
+
import { m as printSuccess } from "./output-BpgYODYx.mjs";
|
|
7
|
+
import { t as promptForLoginToken } from "./login-Cttnagmm.mjs";
|
|
8
|
+
import { i as saveDiscoveredPlatform, n as promptPlatformUrl, t as discoverPlatform } from "./platform-cmd-D5I1beUX.mjs";
|
|
9
|
+
import { t as connectCloudflare } from "./cloudflare-connect-CCRTVg-I.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-DV71ol5d.mjs";
|
|
@@ -1,10 +1,10 @@
|
|
|
1
1
|
import { t as attachSelectedPlatform, u as writeProjectConfig } from "./project-rqDnVsJN.mjs";
|
|
2
2
|
import { s as getSiteDomain } from "./auth-B6iOCjKI.mjs";
|
|
3
|
-
import { A as confirm, K as select, L as log, O as cancel, X as text, tt as isCancel } from "./dist-
|
|
4
|
-
import {
|
|
5
|
-
import {
|
|
3
|
+
import { A as confirm, K as select, L as log, O as cancel, X as text, tt as isCancel } from "./dist-Cor9XGoz.mjs";
|
|
4
|
+
import { n as PlatformApiError } from "./client-BEkdj1kx.mjs";
|
|
5
|
+
import { f as import_picocolors, h as sanitizeTerminalText } from "./output-BpgYODYx.mjs";
|
|
6
6
|
import { t as validateProjectSlug } from "./project-slug-23TpquG4.mjs";
|
|
7
|
-
import { n as inferDefaultSlug } from "./resolve-project-
|
|
7
|
+
import { n as inferDefaultSlug } from "./resolve-project-Xoi6eTWY.mjs";
|
|
8
8
|
//#region src/cli/prompt.ts
|
|
9
9
|
async function promptProjectSetupAction(message = "Set up a Void project:", options = {}) {
|
|
10
10
|
const result = await select({
|