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
|
@@ -1,10 +1,11 @@
|
|
|
1
1
|
import { a as join, l as toSlash, s as relative } from "./dist-ipQi0Q8y.mjs";
|
|
2
2
|
import { n as readProjectPaths } from "./project-paths-DGu_QZ_Q.mjs";
|
|
3
|
-
import { n as globSync } from "./dist-
|
|
4
|
-
import { a as isObjectExpression, i as isMemberExpression, n as isIdentifier, r as isLiteral, t as isCallExpression } from "./ast-
|
|
5
|
-
import { a as staticLiteral, n as
|
|
3
|
+
import { n as globSync } from "./dist-D15hFhP0.mjs";
|
|
4
|
+
import { a as isObjectExpression, i as isMemberExpression, n as isIdentifier, r as isLiteral, t as isCallExpression } from "./ast-CsZ_q_gc.mjs";
|
|
5
|
+
import { a as staticLiteral, n as bindingResolver, o as unwrapStaticExpression, r as walk } from "./ast-bindings-C3yaPs1y.mjs";
|
|
6
6
|
import { n as resourceNameWords, t as isResourceName } from "./resource-name-C7LVpcRm.mjs";
|
|
7
|
-
import { r as
|
|
7
|
+
import { n as parseRouteFilename, r as parseWebSocketFilename, t as isRouteEnabledForEnvironment } from "./parse-filename-DioPHiR9.mjs";
|
|
8
|
+
import { r as getSsrServerEntryPath } from "./entry-BEM8ZuGP.mjs";
|
|
8
9
|
import { existsSync, readFileSync } from "node:fs";
|
|
9
10
|
import { parseSync } from "vite";
|
|
10
11
|
//#region src/application-features.ts
|
|
@@ -31,7 +32,7 @@ function needsApplicationDatabase(bindings, migrationCount) {
|
|
|
31
32
|
//#region src/shared/convention-files.ts
|
|
32
33
|
/** Handler files under `dir`, relative to it, skipping paths with a `_`-prefixed segment. */
|
|
33
34
|
function listConventionFiles(dir) {
|
|
34
|
-
return globSync("**/*.{ts,mts,js,mjs}", { cwd: dir }).filter((filePath) => !filePath.split("/").some((segment) => segment.startsWith("_")));
|
|
35
|
+
return globSync(["**/*.{ts,mts,js,mjs}", ".well-known/**/*.{ts,mts,js,mjs}"], { cwd: dir }).filter((filePath) => !filePath.split("/").some((segment) => segment.startsWith("_")));
|
|
35
36
|
}
|
|
36
37
|
//#endregion
|
|
37
38
|
//#region src/shared/resource-definition.ts
|
|
@@ -149,193 +150,6 @@ function readResourceDefinition(filename, source, helpers) {
|
|
|
149
150
|
};
|
|
150
151
|
}
|
|
151
152
|
//#endregion
|
|
152
|
-
//#region ../../node_modules/.pnpm/estree-walker@3.0.3/node_modules/estree-walker/src/walker.js
|
|
153
|
-
/**
|
|
154
|
-
* @typedef { import('estree').Node} Node
|
|
155
|
-
* @typedef {{
|
|
156
|
-
* skip: () => void;
|
|
157
|
-
* remove: () => void;
|
|
158
|
-
* replace: (node: Node) => void;
|
|
159
|
-
* }} WalkerContext
|
|
160
|
-
*/
|
|
161
|
-
var WalkerBase = class {
|
|
162
|
-
constructor() {
|
|
163
|
-
/** @type {boolean} */
|
|
164
|
-
this.should_skip = false;
|
|
165
|
-
/** @type {boolean} */
|
|
166
|
-
this.should_remove = false;
|
|
167
|
-
/** @type {Node | null} */
|
|
168
|
-
this.replacement = null;
|
|
169
|
-
/** @type {WalkerContext} */
|
|
170
|
-
this.context = {
|
|
171
|
-
skip: () => this.should_skip = true,
|
|
172
|
-
remove: () => this.should_remove = true,
|
|
173
|
-
replace: (node) => this.replacement = node
|
|
174
|
-
};
|
|
175
|
-
}
|
|
176
|
-
/**
|
|
177
|
-
* @template {Node} Parent
|
|
178
|
-
* @param {Parent | null | undefined} parent
|
|
179
|
-
* @param {keyof Parent | null | undefined} prop
|
|
180
|
-
* @param {number | null | undefined} index
|
|
181
|
-
* @param {Node} node
|
|
182
|
-
*/
|
|
183
|
-
replace(parent, prop, index, node) {
|
|
184
|
-
if (parent && prop) {
|
|
185
|
-
if (index != null)
|
|
186
|
-
/** @type {Array<Node>} */ parent[prop][index] = node;
|
|
187
|
-
else
|
|
188
|
-
/** @type {Node} */ parent[prop] = node;
|
|
189
|
-
}
|
|
190
|
-
}
|
|
191
|
-
/**
|
|
192
|
-
* @template {Node} Parent
|
|
193
|
-
* @param {Parent | null | undefined} parent
|
|
194
|
-
* @param {keyof Parent | null | undefined} prop
|
|
195
|
-
* @param {number | null | undefined} index
|
|
196
|
-
*/
|
|
197
|
-
remove(parent, prop, index) {
|
|
198
|
-
if (parent && prop) {
|
|
199
|
-
if (index !== null && index !== void 0)
|
|
200
|
-
/** @type {Array<Node>} */ parent[prop].splice(index, 1);
|
|
201
|
-
else delete parent[prop];
|
|
202
|
-
}
|
|
203
|
-
}
|
|
204
|
-
};
|
|
205
|
-
//#endregion
|
|
206
|
-
//#region ../../node_modules/.pnpm/estree-walker@3.0.3/node_modules/estree-walker/src/sync.js
|
|
207
|
-
/**
|
|
208
|
-
* @typedef { import('estree').Node} Node
|
|
209
|
-
* @typedef { import('./walker.js').WalkerContext} WalkerContext
|
|
210
|
-
* @typedef {(
|
|
211
|
-
* this: WalkerContext,
|
|
212
|
-
* node: Node,
|
|
213
|
-
* parent: Node | null,
|
|
214
|
-
* key: string | number | symbol | null | undefined,
|
|
215
|
-
* index: number | null | undefined
|
|
216
|
-
* ) => void} SyncHandler
|
|
217
|
-
*/
|
|
218
|
-
var SyncWalker = class extends WalkerBase {
|
|
219
|
-
/**
|
|
220
|
-
*
|
|
221
|
-
* @param {SyncHandler} [enter]
|
|
222
|
-
* @param {SyncHandler} [leave]
|
|
223
|
-
*/
|
|
224
|
-
constructor(enter, leave) {
|
|
225
|
-
super();
|
|
226
|
-
/** @type {boolean} */
|
|
227
|
-
this.should_skip = false;
|
|
228
|
-
/** @type {boolean} */
|
|
229
|
-
this.should_remove = false;
|
|
230
|
-
/** @type {Node | null} */
|
|
231
|
-
this.replacement = null;
|
|
232
|
-
/** @type {WalkerContext} */
|
|
233
|
-
this.context = {
|
|
234
|
-
skip: () => this.should_skip = true,
|
|
235
|
-
remove: () => this.should_remove = true,
|
|
236
|
-
replace: (node) => this.replacement = node
|
|
237
|
-
};
|
|
238
|
-
/** @type {SyncHandler | undefined} */
|
|
239
|
-
this.enter = enter;
|
|
240
|
-
/** @type {SyncHandler | undefined} */
|
|
241
|
-
this.leave = leave;
|
|
242
|
-
}
|
|
243
|
-
/**
|
|
244
|
-
* @template {Node} Parent
|
|
245
|
-
* @param {Node} node
|
|
246
|
-
* @param {Parent | null} parent
|
|
247
|
-
* @param {keyof Parent} [prop]
|
|
248
|
-
* @param {number | null} [index]
|
|
249
|
-
* @returns {Node | null}
|
|
250
|
-
*/
|
|
251
|
-
visit(node, parent, prop, index) {
|
|
252
|
-
if (node) {
|
|
253
|
-
if (this.enter) {
|
|
254
|
-
const _should_skip = this.should_skip;
|
|
255
|
-
const _should_remove = this.should_remove;
|
|
256
|
-
const _replacement = this.replacement;
|
|
257
|
-
this.should_skip = false;
|
|
258
|
-
this.should_remove = false;
|
|
259
|
-
this.replacement = null;
|
|
260
|
-
this.enter.call(this.context, node, parent, prop, index);
|
|
261
|
-
if (this.replacement) {
|
|
262
|
-
node = this.replacement;
|
|
263
|
-
this.replace(parent, prop, index, node);
|
|
264
|
-
}
|
|
265
|
-
if (this.should_remove) this.remove(parent, prop, index);
|
|
266
|
-
const skipped = this.should_skip;
|
|
267
|
-
const removed = this.should_remove;
|
|
268
|
-
this.should_skip = _should_skip;
|
|
269
|
-
this.should_remove = _should_remove;
|
|
270
|
-
this.replacement = _replacement;
|
|
271
|
-
if (skipped) return node;
|
|
272
|
-
if (removed) return null;
|
|
273
|
-
}
|
|
274
|
-
/** @type {keyof Node} */
|
|
275
|
-
let key;
|
|
276
|
-
for (key in node) {
|
|
277
|
-
/** @type {unknown} */
|
|
278
|
-
const value = node[key];
|
|
279
|
-
if (value && typeof value === "object") {
|
|
280
|
-
if (Array.isArray(value)) {
|
|
281
|
-
const nodes = value;
|
|
282
|
-
for (let i = 0; i < nodes.length; i += 1) {
|
|
283
|
-
const item = nodes[i];
|
|
284
|
-
if (isNode(item)) {
|
|
285
|
-
if (!this.visit(item, node, key, i)) i--;
|
|
286
|
-
}
|
|
287
|
-
}
|
|
288
|
-
} else if (isNode(value)) this.visit(value, node, key, null);
|
|
289
|
-
}
|
|
290
|
-
}
|
|
291
|
-
if (this.leave) {
|
|
292
|
-
const _replacement = this.replacement;
|
|
293
|
-
const _should_remove = this.should_remove;
|
|
294
|
-
this.replacement = null;
|
|
295
|
-
this.should_remove = false;
|
|
296
|
-
this.leave.call(this.context, node, parent, prop, index);
|
|
297
|
-
if (this.replacement) {
|
|
298
|
-
node = this.replacement;
|
|
299
|
-
this.replace(parent, prop, index, node);
|
|
300
|
-
}
|
|
301
|
-
if (this.should_remove) this.remove(parent, prop, index);
|
|
302
|
-
const removed = this.should_remove;
|
|
303
|
-
this.replacement = _replacement;
|
|
304
|
-
this.should_remove = _should_remove;
|
|
305
|
-
if (removed) return null;
|
|
306
|
-
}
|
|
307
|
-
}
|
|
308
|
-
return node;
|
|
309
|
-
}
|
|
310
|
-
};
|
|
311
|
-
/**
|
|
312
|
-
* Ducktype a node.
|
|
313
|
-
*
|
|
314
|
-
* @param {unknown} value
|
|
315
|
-
* @returns {value is Node}
|
|
316
|
-
*/
|
|
317
|
-
function isNode(value) {
|
|
318
|
-
return value !== null && typeof value === "object" && "type" in value && typeof value.type === "string";
|
|
319
|
-
}
|
|
320
|
-
//#endregion
|
|
321
|
-
//#region ../../node_modules/.pnpm/estree-walker@3.0.3/node_modules/estree-walker/src/index.js
|
|
322
|
-
/**
|
|
323
|
-
* @typedef {import('estree').Node} Node
|
|
324
|
-
* @typedef {import('./sync.js').SyncHandler} SyncHandler
|
|
325
|
-
* @typedef {import('./async.js').AsyncHandler} AsyncHandler
|
|
326
|
-
*/
|
|
327
|
-
/**
|
|
328
|
-
* @param {Node} ast
|
|
329
|
-
* @param {{
|
|
330
|
-
* enter?: SyncHandler
|
|
331
|
-
* leave?: SyncHandler
|
|
332
|
-
* }} walker
|
|
333
|
-
* @returns {Node | null}
|
|
334
|
-
*/
|
|
335
|
-
function walk(ast, { enter, leave }) {
|
|
336
|
-
return new SyncWalker(enter, leave).visit(ast, null);
|
|
337
|
-
}
|
|
338
|
-
//#endregion
|
|
339
153
|
//#region src/shared/module-references.ts
|
|
340
154
|
/** Runtime imports and re-exports, in source order, including empty export lists. */
|
|
341
155
|
function staticModuleReferences(parsed, code) {
|
|
@@ -363,8 +177,105 @@ function staticModuleReferences(parsed, code) {
|
|
|
363
177
|
});
|
|
364
178
|
}
|
|
365
179
|
//#endregion
|
|
180
|
+
//#region src/inference/client-auth.ts
|
|
181
|
+
const CLIENT_MODULES = /* @__PURE__ */ new Set([
|
|
182
|
+
"void/client",
|
|
183
|
+
"void/client/react",
|
|
184
|
+
"void/client/vue",
|
|
185
|
+
"void/client/svelte",
|
|
186
|
+
"void/client/solid"
|
|
187
|
+
]);
|
|
188
|
+
function name(node) {
|
|
189
|
+
return isIdentifier(node) ? node.name : staticLiteral(node);
|
|
190
|
+
}
|
|
191
|
+
function propertyName(node) {
|
|
192
|
+
const key = node.property ?? node.key;
|
|
193
|
+
return node.computed ? staticLiteral(key) : name(key);
|
|
194
|
+
}
|
|
195
|
+
/** Detect runtime auth imports and namespace reads without confusing aliases or type names. */
|
|
196
|
+
function inferClientAuth(parsed, code) {
|
|
197
|
+
let hasNamespace = false;
|
|
198
|
+
for (const statement of parsed.module.staticImports) {
|
|
199
|
+
if (!CLIENT_MODULES.has(statement.moduleRequest.value)) continue;
|
|
200
|
+
for (const entry of statement.entries) if (!entry.isType) {
|
|
201
|
+
if (entry.importName.name === "auth") return true;
|
|
202
|
+
hasNamespace ||= entry.importName.kind === "NamespaceObject";
|
|
203
|
+
}
|
|
204
|
+
}
|
|
205
|
+
for (const statement of parsed.module.staticExports) for (const entry of statement.entries) if (!entry.isType && entry.moduleRequest && CLIENT_MODULES.has(entry.moduleRequest.value)) {
|
|
206
|
+
if (entry.importName.name === "auth" || entry.importName.kind === "All" || entry.importName.kind === "AllButDefault") return true;
|
|
207
|
+
}
|
|
208
|
+
if (!hasNamespace && parsed.module.dynamicImports.length === 0 || !/\bauth\b|\\(?:u|x|h|[0-7\r\n\u2028\u2029])/.test(code)) return false;
|
|
209
|
+
return inferNamespaceAuth(parsed.program);
|
|
210
|
+
}
|
|
211
|
+
function inferNamespaceAuth(program) {
|
|
212
|
+
const namespaces = /* @__PURE__ */ new Set();
|
|
213
|
+
for (const statement of program.body ?? []) {
|
|
214
|
+
const source = staticLiteral(statement.source);
|
|
215
|
+
if (typeof source !== "string" || !CLIENT_MODULES.has(source)) continue;
|
|
216
|
+
if (statement.importKind === "type" || statement.exportKind === "type") continue;
|
|
217
|
+
if (statement.type === "ExportAllDeclaration") return true;
|
|
218
|
+
for (const specifier of statement.specifiers ?? []) {
|
|
219
|
+
if (specifier.importKind === "type" || specifier.exportKind === "type") continue;
|
|
220
|
+
if (statement.type === "ImportDeclaration") {
|
|
221
|
+
if (specifier.type === "ImportNamespaceSpecifier") namespaces.add(specifier);
|
|
222
|
+
else if (name(specifier.imported) === "auth") return true;
|
|
223
|
+
} else if (statement.type === "ExportNamedDeclaration" && name(specifier.local) === "auth") return true;
|
|
224
|
+
}
|
|
225
|
+
}
|
|
226
|
+
const reads = [];
|
|
227
|
+
const resolve = bindingResolver(program, { visit(node) {
|
|
228
|
+
if (isMemberExpression(node) && propertyName(node) === "auth") reads.push(node.object);
|
|
229
|
+
else if ([
|
|
230
|
+
"VariableDeclarator",
|
|
231
|
+
"AssignmentExpression",
|
|
232
|
+
"AssignmentPattern"
|
|
233
|
+
].includes(node.type)) {
|
|
234
|
+
const pattern = node.id ?? node.left;
|
|
235
|
+
const value = node.init ?? node.right;
|
|
236
|
+
if (pattern?.type === "ObjectPattern" && (pattern.properties ?? []).some((property) => property.type === "Property" && propertyName(property) === "auth")) reads.push(value);
|
|
237
|
+
}
|
|
238
|
+
return isIdentifier(node);
|
|
239
|
+
} });
|
|
240
|
+
const namespaceValues = /* @__PURE__ */ new Map();
|
|
241
|
+
function isClientNamespace(node) {
|
|
242
|
+
const aliases = [];
|
|
243
|
+
let found = false;
|
|
244
|
+
while (node = unwrapStaticExpression(node)) {
|
|
245
|
+
if (node.type === "AwaitExpression") {
|
|
246
|
+
node = node.argument;
|
|
247
|
+
continue;
|
|
248
|
+
}
|
|
249
|
+
if (node.type === "ImportExpression") {
|
|
250
|
+
const source = staticLiteral(node.source);
|
|
251
|
+
found = typeof source === "string" && CLIENT_MODULES.has(source);
|
|
252
|
+
break;
|
|
253
|
+
}
|
|
254
|
+
if (!isIdentifier(node)) break;
|
|
255
|
+
const binding = resolve(node, node.name);
|
|
256
|
+
if (binding && namespaces.has(binding)) {
|
|
257
|
+
found = true;
|
|
258
|
+
break;
|
|
259
|
+
}
|
|
260
|
+
if (binding?.type !== "VariableDeclarator" || !isIdentifier(binding.id)) break;
|
|
261
|
+
const cached = namespaceValues.get(binding);
|
|
262
|
+
if (cached !== void 0) {
|
|
263
|
+
found = cached;
|
|
264
|
+
break;
|
|
265
|
+
}
|
|
266
|
+
namespaceValues.set(binding, false);
|
|
267
|
+
aliases.push(binding);
|
|
268
|
+
node = binding.init;
|
|
269
|
+
}
|
|
270
|
+
for (const alias of aliases) namespaceValues.set(alias, found);
|
|
271
|
+
return found;
|
|
272
|
+
}
|
|
273
|
+
return reads.some(isClientNamespace);
|
|
274
|
+
}
|
|
275
|
+
//#endregion
|
|
366
276
|
//#region src/inference/walk.ts
|
|
367
|
-
const ENV_BINDING_RE = /\benv\
|
|
277
|
+
const ENV_BINDING_RE = /\benv\b|\\(?:u|x|[0-7\r\n\u2028\u2029])/;
|
|
278
|
+
const RESOURCE_BINDING_RE = /\b(?:DB\b|KV\b|STORAGE\b|AI\b|SANDBOX\b|QUEUE_)|\\(?:u|x|[0-7A-Z_\r\n\u2028\u2029])/;
|
|
368
279
|
/**
|
|
369
280
|
* Infer which Cloudflare bindings a source file uses.
|
|
370
281
|
*
|
|
@@ -389,7 +300,9 @@ function inferBindingsFromSource(code, filename) {
|
|
|
389
300
|
} catch {
|
|
390
301
|
return result;
|
|
391
302
|
}
|
|
392
|
-
|
|
303
|
+
let hasClientModule = false;
|
|
304
|
+
function recordModuleReference(source) {
|
|
305
|
+
if (CLIENT_MODULES.has(source)) hasClientModule = true;
|
|
393
306
|
switch (source) {
|
|
394
307
|
case "void/db":
|
|
395
308
|
result.needsD1 = true;
|
|
@@ -415,35 +328,29 @@ function inferBindingsFromSource(code, filename) {
|
|
|
415
328
|
case "void/email":
|
|
416
329
|
result.needsEmail = true;
|
|
417
330
|
break;
|
|
418
|
-
case "void/live":
|
|
419
|
-
result.needsLive = true;
|
|
420
|
-
break;
|
|
421
|
-
case "void/client":
|
|
422
|
-
case "void/client/react":
|
|
423
|
-
case "void/client/vue":
|
|
424
|
-
case "void/client/svelte":
|
|
425
|
-
case "void/client/solid": if (/\bauth\b/.test(statement)) result.needsAuth = true;
|
|
331
|
+
case "void/live": result.needsLive = true;
|
|
426
332
|
}
|
|
427
333
|
}
|
|
428
|
-
for (const reference of staticModuleReferences(parsed, code)) recordModuleReference(reference.source
|
|
334
|
+
for (const reference of staticModuleReferences(parsed, code)) recordModuleReference(reference.source);
|
|
429
335
|
for (const reference of parsed.module.dynamicImports) {
|
|
430
336
|
const argument = code.slice(reference.moduleRequest.start, reference.moduleRequest.end);
|
|
431
337
|
const expression = parseSync(filename, `(${argument})`).program.body[0];
|
|
432
338
|
const source = expression?.type === "ExpressionStatement" ? staticLiteral(expression.expression) : void 0;
|
|
433
|
-
if (typeof source === "string") recordModuleReference(source
|
|
339
|
+
if (typeof source === "string") recordModuleReference(source);
|
|
434
340
|
}
|
|
435
|
-
if (
|
|
436
|
-
|
|
437
|
-
|
|
438
|
-
|
|
439
|
-
|
|
440
|
-
|
|
441
|
-
|
|
442
|
-
|
|
443
|
-
|
|
444
|
-
|
|
445
|
-
|
|
446
|
-
|
|
341
|
+
if (hasClientModule) result.needsAuth ||= inferClientAuth(parsed, code);
|
|
342
|
+
if (!ENV_BINDING_RE.test(code) || !RESOURCE_BINDING_RE.test(code)) return result;
|
|
343
|
+
function propertyName(node) {
|
|
344
|
+
const key = node.property ?? node.key;
|
|
345
|
+
const name = !node.computed && isIdentifier(key) ? key.name : staticLiteral(key);
|
|
346
|
+
return typeof name === "string" ? name : void 0;
|
|
347
|
+
}
|
|
348
|
+
function isEnv(node) {
|
|
349
|
+
node = unwrapStaticExpression(node);
|
|
350
|
+
return isIdentifier(node) && node.name === "env" || isMemberExpression(node) && propertyName(node) === "env";
|
|
351
|
+
}
|
|
352
|
+
function recordBinding(name) {
|
|
353
|
+
switch (name) {
|
|
447
354
|
case "DB":
|
|
448
355
|
result.needsD1 = true;
|
|
449
356
|
break;
|
|
@@ -459,8 +366,28 @@ function inferBindingsFromSource(code, filename) {
|
|
|
459
366
|
case "SANDBOX":
|
|
460
367
|
result.needsSandbox = true;
|
|
461
368
|
break;
|
|
462
|
-
default: if (
|
|
369
|
+
default: if (name?.startsWith("QUEUE_")) result.needsQueues = true;
|
|
370
|
+
}
|
|
371
|
+
}
|
|
372
|
+
function inspectPattern(pattern, fromEnv = false) {
|
|
373
|
+
if (pattern?.type === "AssignmentPattern") inspectPattern(pattern.left, fromEnv || isEnv(pattern.right));
|
|
374
|
+
else if (pattern?.type === "ObjectPattern") for (const property of pattern.properties ?? []) {
|
|
375
|
+
if (property.type !== "Property") continue;
|
|
376
|
+
const name = propertyName(property);
|
|
377
|
+
if (fromEnv) recordBinding(name);
|
|
378
|
+
inspectPattern(property.value, name === "env");
|
|
463
379
|
}
|
|
380
|
+
else if (pattern?.type === "ArrayPattern") for (const element of pattern.elements ?? []) inspectPattern(element);
|
|
381
|
+
}
|
|
382
|
+
walk(parsed.program, { enter(node) {
|
|
383
|
+
const current = node;
|
|
384
|
+
if (isMemberExpression(current) && isEnv(current.object)) recordBinding(propertyName(current));
|
|
385
|
+
else if (current.type === "VariableDeclarator" || current.type === "AssignmentExpression") inspectPattern(current.id ?? current.left, isEnv(current.init ?? current.right));
|
|
386
|
+
else if ([
|
|
387
|
+
"FunctionDeclaration",
|
|
388
|
+
"FunctionExpression",
|
|
389
|
+
"ArrowFunctionExpression"
|
|
390
|
+
].includes(current.type)) for (const parameter of current.params ?? []) inspectPattern(parameter);
|
|
464
391
|
} });
|
|
465
392
|
return result;
|
|
466
393
|
}
|
|
@@ -707,4 +634,4 @@ function inferProjectBindings(root, options, scanDirs) {
|
|
|
707
634
|
return applyBindingOverrides(mergeBindings(allBindings), options?.bindings);
|
|
708
635
|
}
|
|
709
636
|
//#endregion
|
|
710
|
-
export { deriveWebSocketClassNameFromName as a, scanWebSocketRoutesSync as c,
|
|
637
|
+
export { deriveWebSocketClassNameFromName as a, scanWebSocketRoutesSync as c, readResourceDefinition as d, listConventionFiles as f, inferProjectBindings as i, inferBindingsFromSource as l, needsApplicationDatabase as m, FRAMEWORK_SCAN_DIRS as n, inferWebSocketResourceName as o, applyBindingOverrides as p, detectFramework as r, isWebSocketPatternFile as s, DEFAULT_SCAN_DIRS as t, staticModuleReferences as u };
|
|
@@ -1,6 +1,6 @@
|
|
|
1
|
-
import { L as log } from "./dist-
|
|
2
|
-
import { m as printSuccess, p as note } from "./output-
|
|
3
|
-
import { t as prepareProject } from "./prepare-
|
|
1
|
+
import { L as log } from "./dist-Cor9XGoz.mjs";
|
|
2
|
+
import { m as printSuccess, p as note } from "./output-BpgYODYx.mjs";
|
|
3
|
+
import { t as prepareProject } from "./prepare-DA-17DhO.mjs";
|
|
4
4
|
//#region src/cli/prepare.ts
|
|
5
5
|
async function runPrepareCommand(root) {
|
|
6
6
|
console.log();
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export { t as prepareProject } from "./prepare-DA-17DhO.mjs";
|
|
@@ -1,14 +1,14 @@
|
|
|
1
1
|
import { a as join } from "./dist-ipQi0Q8y.mjs";
|
|
2
2
|
import { n as loadVoidAuthConfig } from "./config-CyUJzi3q.mjs";
|
|
3
|
-
import {
|
|
3
|
+
import { c as getDatabaseCasing, p as readConfig } from "./config-DHgSEWT7.mjs";
|
|
4
4
|
import { n as ensureProjectTsconfig, r as writeFileIfChanged } from "./project-tsconfig-Itv1f4WC.mjs";
|
|
5
5
|
import { n as generateDbDts } from "./db-types-NGxPwnlt.mjs";
|
|
6
6
|
import { t as discoverSchema } from "./discover-LaV0tbIu.mjs";
|
|
7
7
|
import { o as loadLocalEnv } from "./env-BJjULvL0.mjs";
|
|
8
|
-
import { n as findEnvFileForPaths, r as generateEnvTypes } from "./env-types-
|
|
9
|
-
import { t as analyzeApplication } from "./application-routing-
|
|
10
|
-
import { n as generateVoidAuthDrizzleSchema, t as generateVoidAuthDatabaseModule } from "./drizzle-BQfyvQKX.mjs";
|
|
8
|
+
import { n as findEnvFileForPaths, r as generateEnvTypes } from "./env-types-BicfKBhV.mjs";
|
|
9
|
+
import { t as analyzeApplication } from "./application-routing-DAhNP4u3.mjs";
|
|
11
10
|
import { n as generateQueueTypes, t as generateRouteTypes } from "./route-types-BZi26DVS.mjs";
|
|
11
|
+
import { n as generateVoidAuthDrizzleSchema, t as generateVoidAuthDatabaseModule } from "./drizzle-BQfyvQKX.mjs";
|
|
12
12
|
import { existsSync, rmSync } from "node:fs";
|
|
13
13
|
import { fileURLToPath } from "node:url";
|
|
14
14
|
//#region src/codegen/prepare.ts
|
|
@@ -40,7 +40,7 @@ async function prepareProject(root) {
|
|
|
40
40
|
if (existsSync(paths.queuesDir)) writeGeneratedFile(outDir, "queues.d.ts", generateQueueTypes(scan.queues, paths.queuesDir, outDir), written);
|
|
41
41
|
else removeGeneratedFile(outDir, "queues.d.ts", removed);
|
|
42
42
|
const schema = discoverSchema(root, paths);
|
|
43
|
-
const hasDbRuntime = schema != null || authEnabled;
|
|
43
|
+
const hasDbRuntime = schema != null || authEnabled || getDatabaseCasing(config) !== void 0;
|
|
44
44
|
if (hasDbRuntime) {
|
|
45
45
|
if (generateDbDts(outDir, schema, dialect)) written.push(join(".void", "db.d.ts"));
|
|
46
46
|
} else removeGeneratedFile(outDir, "db.d.ts", removed);
|
|
@@ -1,6 +1,8 @@
|
|
|
1
1
|
import { a as join, i as isAbsolute, n as dirname, s as relative } from "./dist-ipQi0Q8y.mjs";
|
|
2
2
|
import { mkdirSync, writeFileSync } from "node:fs";
|
|
3
|
+
import { extractPageDataFromHtml } from "@void/isr/core";
|
|
3
4
|
//#region src/prerender-render.ts
|
|
5
|
+
const PAGE_DATA_SCRIPT_ID = "__VOID_PAGE_DATA__";
|
|
4
6
|
function outputFileForPath(path) {
|
|
5
7
|
return path === "/" ? "index.html" : `${path.slice(1)}.html`;
|
|
6
8
|
}
|
|
@@ -102,13 +104,16 @@ async function renderPrerenderPaths(paths, clientDir, fetchPath, fetchPageData,
|
|
|
102
104
|
}
|
|
103
105
|
mkdirSync(dirname(outputPath), { recursive: true });
|
|
104
106
|
writeFileSync(outputPath, html);
|
|
105
|
-
|
|
107
|
+
const embeddedPageData = extractPageDataFromHtml(html);
|
|
108
|
+
let pageData;
|
|
109
|
+
if (embeddedPageData !== null) pageData = JSON.parse(embeddedPageData);
|
|
110
|
+
else if (fetchPageData && html.includes(PAGE_DATA_SCRIPT_ID)) {
|
|
106
111
|
const pageDataResponse = await fetchPageData(path);
|
|
107
|
-
if (pageDataResponse.headers.get("X-VoidPages"))
|
|
108
|
-
|
|
109
|
-
|
|
110
|
-
|
|
111
|
-
|
|
112
|
+
if (pageDataResponse.headers.get("X-VoidPages")) pageData = await pageDataResponse.json();
|
|
113
|
+
}
|
|
114
|
+
if (pageData !== void 0) {
|
|
115
|
+
mkdirSync(dirname(pageDataPath), { recursive: true });
|
|
116
|
+
writeFileSync(pageDataPath, JSON.stringify(pageData));
|
|
112
117
|
}
|
|
113
118
|
result.rendered.push(path);
|
|
114
119
|
onResult?.(path, outputFile);
|
|
@@ -1 +1 @@
|
|
|
1
|
-
export { t as outputFileForPath, n as readPrerenderPathsResponse, r as renderPrerenderPaths } from "./prerender-render-
|
|
1
|
+
export { t as outputFileForPath, n as readPrerenderPathsResponse, r as renderPrerenderPaths } from "./prerender-render-Cijv7UFo.mjs";
|
|
@@ -1,8 +1,8 @@
|
|
|
1
1
|
import { n as readDeploymentPlatform } from "./project-rqDnVsJN.mjs";
|
|
2
2
|
import { c as getToken, s as getSiteDomain } from "./auth-B6iOCjKI.mjs";
|
|
3
|
-
import { H as outro, L as log } from "./dist-
|
|
4
|
-
import {
|
|
5
|
-
import {
|
|
3
|
+
import { H as outro, L as log } from "./dist-Cor9XGoz.mjs";
|
|
4
|
+
import { r as PlatformClient } from "./client-BEkdj1kx.mjs";
|
|
5
|
+
import { _ as tablePrefix, f as import_picocolors, i as dim, l as formatUrl, o as formatCount } from "./output-BpgYODYx.mjs";
|
|
6
6
|
//#region src/cli/projects.ts
|
|
7
7
|
async function runProjectsCommand(root) {
|
|
8
8
|
console.log();
|
|
@@ -38,77 +38,77 @@ async function runProjectsCommand(root) {
|
|
|
38
38
|
async function runProjectCommand(root, args) {
|
|
39
39
|
const cloudflare = readDeploymentPlatform(root) === "cloudflare";
|
|
40
40
|
if (args.subcommand === "status") {
|
|
41
|
-
const { runListCommand } = await import("./list-
|
|
41
|
+
const { runListCommand } = await import("./list-MogaugiO.mjs");
|
|
42
42
|
return runListCommand(root, args.name || void 0);
|
|
43
43
|
}
|
|
44
44
|
if (args.subcommand === "link") {
|
|
45
45
|
if (cloudflare) throw new Error("project: Direct Cloudflare apps are identified by cloudflare.name in void.config.ts and do not need linking.");
|
|
46
|
-
const { runLink } = await import("./link-
|
|
46
|
+
const { runLink } = await import("./link-Ddmod1dZ.mjs");
|
|
47
47
|
return runLink(root, args.name || void 0);
|
|
48
48
|
}
|
|
49
49
|
if (args.subcommand === "list") {
|
|
50
50
|
if (cloudflare) {
|
|
51
|
-
const { runListCommand } = await import("./list-
|
|
51
|
+
const { runListCommand } = await import("./list-MogaugiO.mjs");
|
|
52
52
|
return runListCommand(root);
|
|
53
53
|
}
|
|
54
54
|
return runProjectsCommand(root);
|
|
55
55
|
}
|
|
56
56
|
if (args.subcommand === "token") {
|
|
57
57
|
if (cloudflare) throw new Error("project: CI deploy credentials are available only for Void platform projects.");
|
|
58
|
-
const { runProjectTokenCommand } = await import("./project-token-
|
|
58
|
+
const { runProjectTokenCommand } = await import("./project-token-CCalFyQf.mjs");
|
|
59
59
|
return runProjectTokenCommand(root, args);
|
|
60
60
|
}
|
|
61
61
|
if (args.subcommand === "team") {
|
|
62
62
|
if (args.action === "") {
|
|
63
|
-
const { printHelpPage } = await import("./help-
|
|
63
|
+
const { printHelpPage } = await import("./help-BeAFFE5C.mjs");
|
|
64
64
|
printHelpPage(["project", "team"]);
|
|
65
65
|
return;
|
|
66
66
|
}
|
|
67
67
|
const accountInvitationAction = args.action === "pending" || args.action === "accept" || args.action === "decline";
|
|
68
68
|
if (cloudflare && !accountInvitationAction) throw new Error("project: Teams are available only for projects hosted on a Void platform, not direct Cloudflare deployments.");
|
|
69
|
-
const { runProjectTeamCommand } = await import("./project-team-
|
|
69
|
+
const { runProjectTeamCommand } = await import("./project-team-CQBNveX3.mjs");
|
|
70
70
|
return runProjectTeamCommand(root, args);
|
|
71
71
|
}
|
|
72
72
|
if (args.subcommand === "zero-trust") {
|
|
73
73
|
if (cloudflare) throw new Error("project: Zero Trust overrides are available only for projects hosted on a Void platform.");
|
|
74
74
|
if (args.action === "") {
|
|
75
|
-
const { printHelpPage } = await import("./help-
|
|
75
|
+
const { printHelpPage } = await import("./help-BeAFFE5C.mjs");
|
|
76
76
|
printHelpPage(["project", "zero-trust"]);
|
|
77
77
|
return;
|
|
78
78
|
}
|
|
79
79
|
const action = args.action;
|
|
80
|
-
const { runProjectZeroTrustCommand } = await import("./project-zero-trust-
|
|
80
|
+
const { runProjectZeroTrustCommand } = await import("./project-zero-trust-DPnkiEuT.mjs");
|
|
81
81
|
return runProjectZeroTrustCommand(root, {
|
|
82
82
|
...args,
|
|
83
83
|
action
|
|
84
84
|
});
|
|
85
85
|
}
|
|
86
86
|
if (args.subcommand === "logs") {
|
|
87
|
-
const { runLogsCommand } = await import("./logs-
|
|
87
|
+
const { runLogsCommand } = await import("./logs-CAszUWZI.mjs");
|
|
88
88
|
return runLogsCommand(root, args.filter, args.range, args.deployment || void 0, args.level || void 0);
|
|
89
89
|
}
|
|
90
90
|
if (args.subcommand === "requests") {
|
|
91
91
|
if (cloudflare) throw new Error("project: Historical request analytics require the Void platform. Use `void project logs` for a live Cloudflare tail.");
|
|
92
|
-
const { runRequestsCommand } = await import("./requests-
|
|
92
|
+
const { runRequestsCommand } = await import("./requests-BpH0kImL.mjs");
|
|
93
93
|
return runRequestsCommand(root, args.range, args.status || void 0);
|
|
94
94
|
}
|
|
95
95
|
if (args.subcommand === "rollback") {
|
|
96
|
-
const { runRollbackCommand } = await import("./rollback-
|
|
96
|
+
const { runRollbackCommand } = await import("./rollback-CXS1tAa-.mjs");
|
|
97
97
|
return runRollbackCommand(root, args.deployId || void 0, args.platform);
|
|
98
98
|
}
|
|
99
99
|
if (args.subcommand === "cancel") {
|
|
100
100
|
if (cloudflare) throw new Error("project: Direct Cloudflare deploys activate only after readiness succeeds, so there is no remote build to cancel.");
|
|
101
|
-
const { runCancelDeployCommand } = await import("./cancel-deploy-
|
|
101
|
+
const { runCancelDeployCommand } = await import("./cancel-deploy-viAMD0Q_.mjs");
|
|
102
102
|
return runCancelDeployCommand(root, args.deployId || void 0);
|
|
103
103
|
}
|
|
104
104
|
if (args.subcommand === "delete") {
|
|
105
105
|
if (cloudflare) throw new Error("project: Refusing to delete Cloudflare resources through this command. Direct deployments are additive and existing resources may be shared.");
|
|
106
|
-
const { runDeleteCommand } = await import("./delete-
|
|
106
|
+
const { runDeleteCommand } = await import("./delete-BbP5eopu.mjs");
|
|
107
107
|
return runDeleteCommand(root, args.name || void 0, { force: args.force });
|
|
108
108
|
}
|
|
109
109
|
if (args.subcommand === "purge-cache") {
|
|
110
110
|
if (cloudflare) throw new Error("project: `void project purge-cache` is available only for projects hosted on a Void platform. For a direct Cloudflare deploy, redeploy or purge the configured ISR KV namespace.");
|
|
111
|
-
const { runPurgeCacheCommand } = await import("./cache-
|
|
111
|
+
const { runPurgeCacheCommand } = await import("./cache-oHzrnY3z.mjs");
|
|
112
112
|
return runPurgeCacheCommand(root, args.projectSlug || void 0);
|
|
113
113
|
}
|
|
114
114
|
}
|
|
@@ -1,9 +1,9 @@
|
|
|
1
1
|
import { r as readProjectConfig } from "./project-rqDnVsJN.mjs";
|
|
2
2
|
import { c as getToken, i as getAccountCredential } from "./auth-B6iOCjKI.mjs";
|
|
3
|
-
import { H as outro, L as log } from "./dist-
|
|
4
|
-
import {
|
|
5
|
-
import {
|
|
6
|
-
import { r as requireProjectBySlug, t as getRequestedProjectSlug } from "./resolve-project-
|
|
3
|
+
import { H as outro, L as log } from "./dist-Cor9XGoz.mjs";
|
|
4
|
+
import { c as platformErrorMessage, n as PlatformApiError, r as PlatformClient, s as parsePlatformErrorBody } from "./client-BEkdj1kx.mjs";
|
|
5
|
+
import { h as sanitizeTerminalText, l as formatUrl, m as printSuccess, o as formatCount, p as note } from "./output-BpgYODYx.mjs";
|
|
6
|
+
import { r as requireProjectBySlug, t as getRequestedProjectSlug } from "./resolve-project-Xoi6eTWY.mjs";
|
|
7
7
|
//#region src/cli/project-team.ts
|
|
8
8
|
function clean(value) {
|
|
9
9
|
return (value ?? "—").replace(/[\u0000-\u001f\u007f]/g, " ");
|
|
@@ -1,9 +1,9 @@
|
|
|
1
1
|
import { r as readProjectConfig } from "./project-rqDnVsJN.mjs";
|
|
2
2
|
import { c as getToken } from "./auth-B6iOCjKI.mjs";
|
|
3
|
-
import { H as outro, L as log } from "./dist-
|
|
4
|
-
import {
|
|
5
|
-
import {
|
|
6
|
-
import { r as requireProjectBySlug } from "./resolve-project-
|
|
3
|
+
import { H as outro, L as log } from "./dist-Cor9XGoz.mjs";
|
|
4
|
+
import { r as PlatformClient } from "./client-BEkdj1kx.mjs";
|
|
5
|
+
import { _ as tablePrefix, i as dim, m as printSuccess } from "./output-BpgYODYx.mjs";
|
|
6
|
+
import { r as requireProjectBySlug } from "./resolve-project-Xoi6eTWY.mjs";
|
|
7
7
|
//#region src/cli/project-token.ts
|
|
8
8
|
async function resolveTarget(root, args) {
|
|
9
9
|
const humanToken = getToken(root);
|
|
@@ -1,9 +1,9 @@
|
|
|
1
1
|
import { r as readProjectConfig } from "./project-rqDnVsJN.mjs";
|
|
2
2
|
import { c as getToken } from "./auth-B6iOCjKI.mjs";
|
|
3
|
-
import { H as outro, L as log } from "./dist-
|
|
4
|
-
import {
|
|
5
|
-
import {
|
|
6
|
-
import { r as requireProjectBySlug, t as getRequestedProjectSlug } from "./resolve-project-
|
|
3
|
+
import { H as outro, L as log } from "./dist-Cor9XGoz.mjs";
|
|
4
|
+
import { r as PlatformClient } from "./client-BEkdj1kx.mjs";
|
|
5
|
+
import { h as sanitizeTerminalText, m as printSuccess, p as note } from "./output-BpgYODYx.mjs";
|
|
6
|
+
import { r as requireProjectBySlug, t as getRequestedProjectSlug } from "./resolve-project-Xoi6eTWY.mjs";
|
|
7
7
|
//#region src/cli/project-zero-trust.ts
|
|
8
8
|
async function resolveTarget(root, args) {
|
|
9
9
|
const token = getToken(root);
|