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,14 +1,14 @@
|
|
|
1
1
|
import { c as getToken, f as removeToken } from "./auth-B6iOCjKI.mjs";
|
|
2
|
-
import { L as log } from "./dist-
|
|
3
|
-
import {
|
|
4
|
-
import {
|
|
5
|
-
import { n as runLoginCommand } from "./login-
|
|
2
|
+
import { L as log } from "./dist-Cor9XGoz.mjs";
|
|
3
|
+
import { r as PlatformClient } from "./client-BEkdj1kx.mjs";
|
|
4
|
+
import { m as printSuccess } from "./output-BpgYODYx.mjs";
|
|
5
|
+
import { n as runLoginCommand } from "./login-Cttnagmm.mjs";
|
|
6
6
|
import { execSync } from "node:child_process";
|
|
7
7
|
//#region src/cli/account-cmd.ts
|
|
8
8
|
async function runAccountCommand(root, args) {
|
|
9
9
|
switch (args.subcommand) {
|
|
10
10
|
case "login": return runLoginCommand(root);
|
|
11
|
-
case "link": return import("./auth-link-
|
|
11
|
+
case "link": return import("./auth-link-C87vGXM-.mjs").then(({ runAuthLink }) => runAuthLink(root, args.connectionId));
|
|
12
12
|
case "logout":
|
|
13
13
|
if (removeToken(root)) printSuccess("Logged out.");
|
|
14
14
|
else log.info("Not logged in.");
|
|
@@ -0,0 +1,26 @@
|
|
|
1
|
+
//#region src/pages/action-key.ts
|
|
2
|
+
const actionKeyRequests = /* @__PURE__ */ new WeakSet();
|
|
3
|
+
function markActionKey(request) {
|
|
4
|
+
actionKeyRequests.add(request);
|
|
5
|
+
}
|
|
6
|
+
function hasActionKey(request) {
|
|
7
|
+
return actionKeyRequests.has(request);
|
|
8
|
+
}
|
|
9
|
+
/** The first non-empty segment of `search` as sent: `delete` in `?delete&page=2`. */
|
|
10
|
+
function actionKeySegment(search) {
|
|
11
|
+
let start = 1;
|
|
12
|
+
while (search[start] === "&") start++;
|
|
13
|
+
const end = search.indexOf("&", start);
|
|
14
|
+
return search.slice(start, end === -1 ? search.length : end);
|
|
15
|
+
}
|
|
16
|
+
/** `search` without its first non-empty segment; the rest is kept as sent. */
|
|
17
|
+
function searchWithoutActionKey(search) {
|
|
18
|
+
let start = 1;
|
|
19
|
+
while (search[start] === "&") start++;
|
|
20
|
+
let rest = search.indexOf("&", start);
|
|
21
|
+
if (rest === -1) return "";
|
|
22
|
+
while (search[rest] === "&") rest++;
|
|
23
|
+
return rest < search.length ? "?" + search.slice(rest) : "";
|
|
24
|
+
}
|
|
25
|
+
//#endregion
|
|
26
|
+
export { searchWithoutActionKey as i, hasActionKey as n, markActionKey as r, actionKeySegment as t };
|
|
@@ -1,15 +1,16 @@
|
|
|
1
1
|
import { a as join, i as isAbsolute, t as basename } from "./dist-ipQi0Q8y.mjs";
|
|
2
|
-
import { c as scanWebSocketRoutesSync,
|
|
2
|
+
import { c as scanWebSocketRoutesSync, d as readResourceDefinition, f as listConventionFiles, i as inferProjectBindings, m as needsApplicationDatabase, n as FRAMEWORK_SCAN_DIRS, r as detectFramework, s as isWebSocketPatternFile } from "./plugin-inference-DUjCd55H.mjs";
|
|
3
3
|
import { i as resolveProjectPaths, n as readProjectPaths } from "./project-paths-DGu_QZ_Q.mjs";
|
|
4
4
|
import { t as findVoidAuthConfig } from "./config-CyUJzi3q.mjs";
|
|
5
|
-
import {
|
|
6
|
-
import { n as globSync } from "./dist-
|
|
7
|
-
import { n as isIdentifier } from "./ast-
|
|
8
|
-
import { a as staticLiteral, i as staticExportInitializers,
|
|
5
|
+
import { l as getDatabaseDialect, m as resolveBindingNames } from "./config-DHgSEWT7.mjs";
|
|
6
|
+
import { n as globSync } from "./dist-D15hFhP0.mjs";
|
|
7
|
+
import { n as isIdentifier, o as moduleExportName } from "./ast-CsZ_q_gc.mjs";
|
|
8
|
+
import { a as staticLiteral, i as staticExportInitializers, o as unwrapStaticExpression, t as bindingNames } from "./ast-bindings-C3yaPs1y.mjs";
|
|
9
9
|
import { n as resourceNameWords } from "./resource-name-C7LVpcRm.mjs";
|
|
10
10
|
import { t as collectMigrations } from "./collect-Dew86qce.mjs";
|
|
11
|
-
import {
|
|
12
|
-
import {
|
|
11
|
+
import { n as parseRouteFilename, t as isRouteEnabledForEnvironment } from "./parse-filename-DioPHiR9.mjs";
|
|
12
|
+
import { i as scanEmailHandlersSync } from "./email-B9ayYQEG.mjs";
|
|
13
|
+
import { t as scanPages } from "./scan-8IzYXiU_.mjs";
|
|
13
14
|
import { existsSync, readFileSync, readdirSync } from "node:fs";
|
|
14
15
|
import { fileURLToPath } from "node:url";
|
|
15
16
|
import { parseSync } from "vite";
|
|
@@ -160,16 +161,15 @@ function detectHttpExports(absPath) {
|
|
|
160
161
|
if (declarationNode.exportKind === "type") continue;
|
|
161
162
|
const decl = declarationNode.declaration;
|
|
162
163
|
if (decl) {
|
|
163
|
-
if (decl.type === "VariableDeclaration")
|
|
164
|
-
|
|
165
|
-
} else if (decl.type === "FunctionDeclaration") {
|
|
164
|
+
if (decl.type === "VariableDeclaration") for (const declarator of decl.declarations ?? []) methods.push(...bindingNames(declarator.id).filter((name) => HTTP_METHODS.has(name)));
|
|
165
|
+
else if (decl.type === "FunctionDeclaration") {
|
|
166
166
|
const fn = decl;
|
|
167
167
|
if (isIdentifier(fn.id) && HTTP_METHODS.has(fn.id.name)) methods.push(fn.id.name);
|
|
168
168
|
}
|
|
169
169
|
}
|
|
170
170
|
if (declarationNode.specifiers) for (const spec of declarationNode.specifiers) {
|
|
171
171
|
if (spec.exportKind === "type") continue;
|
|
172
|
-
const exported =
|
|
172
|
+
const exported = moduleExportName(spec.exported);
|
|
173
173
|
if (exported && HTTP_METHODS.has(exported)) methods.push(exported);
|
|
174
174
|
}
|
|
175
175
|
}
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { l as scanRoutes, t as analyzeApplicationSync } from "./application-analysis-
|
|
1
|
+
import { l as scanRoutes, t as analyzeApplicationSync } from "./application-analysis-fEqoSeMp.mjs";
|
|
2
2
|
//#region src/application-routing.ts
|
|
3
3
|
/** Complete route/page analysis using the same resource and handler inventories. */
|
|
4
4
|
async function completeApplicationAnalysis(analysis) {
|
|
@@ -5,6 +5,11 @@ function isIdentifier(node) {
|
|
|
5
5
|
function isLiteral(node) {
|
|
6
6
|
return node?.type === "Literal";
|
|
7
7
|
}
|
|
8
|
+
/** Module export names may be identifiers or string literals, independently of the local name. */
|
|
9
|
+
function moduleExportName(node) {
|
|
10
|
+
if (isIdentifier(node)) return node.name;
|
|
11
|
+
return isLiteral(node) && typeof node.value === "string" ? node.value : void 0;
|
|
12
|
+
}
|
|
8
13
|
function isMemberExpression(node) {
|
|
9
14
|
return node?.type === "MemberExpression";
|
|
10
15
|
}
|
|
@@ -15,4 +20,4 @@ function isObjectExpression(node) {
|
|
|
15
20
|
return node?.type === "ObjectExpression";
|
|
16
21
|
}
|
|
17
22
|
//#endregion
|
|
18
|
-
export { isObjectExpression as a, isMemberExpression as i, isIdentifier as n, isLiteral as r, isCallExpression as t };
|
|
23
|
+
export { isObjectExpression as a, isMemberExpression as i, isIdentifier as n, moduleExportName as o, isLiteral as r, isCallExpression as t };
|
|
@@ -0,0 +1,296 @@
|
|
|
1
|
+
import { n as isIdentifier } from "./ast-CsZ_q_gc.mjs";
|
|
2
|
+
import { parseSync } from "vite";
|
|
3
|
+
//#region src/shared/static-exports.ts
|
|
4
|
+
/** Read the initializer of directly exported constants without evaluating user code. */
|
|
5
|
+
function staticExportInitializers(filename, source, names) {
|
|
6
|
+
const result = /* @__PURE__ */ new Map();
|
|
7
|
+
const program = parseSync(filename, source).program;
|
|
8
|
+
for (const statement of program.body ?? []) {
|
|
9
|
+
if (statement.type !== "ExportNamedDeclaration") continue;
|
|
10
|
+
const declaration = statement.declaration;
|
|
11
|
+
if (declaration?.type !== "VariableDeclaration" || declaration.kind !== "const") continue;
|
|
12
|
+
for (const variable of declaration.declarations ?? []) if (isIdentifier(variable.id) && names.has(variable.id.name) && variable.init) result.set(variable.id.name, variable.init);
|
|
13
|
+
}
|
|
14
|
+
return result;
|
|
15
|
+
}
|
|
16
|
+
function unwrapStaticExpression(node) {
|
|
17
|
+
while (node && [
|
|
18
|
+
"ParenthesizedExpression",
|
|
19
|
+
"TSAsExpression",
|
|
20
|
+
"TSSatisfiesExpression",
|
|
21
|
+
"TSTypeAssertion"
|
|
22
|
+
].includes(node.type)) node = node.expression;
|
|
23
|
+
return node;
|
|
24
|
+
}
|
|
25
|
+
function staticLiteral(node) {
|
|
26
|
+
node = unwrapStaticExpression(node);
|
|
27
|
+
if (node?.type === "Literal") return node.value;
|
|
28
|
+
if (node?.type === "TemplateLiteral") {
|
|
29
|
+
const expressions = node.expressions;
|
|
30
|
+
const quasis = node.quasis;
|
|
31
|
+
if (expressions?.length === 0 && quasis?.length === 1) return quasis[0]?.value?.cooked;
|
|
32
|
+
}
|
|
33
|
+
}
|
|
34
|
+
//#endregion
|
|
35
|
+
//#region ../../node_modules/.pnpm/estree-walker@3.0.3/node_modules/estree-walker/src/walker.js
|
|
36
|
+
/**
|
|
37
|
+
* @typedef { import('estree').Node} Node
|
|
38
|
+
* @typedef {{
|
|
39
|
+
* skip: () => void;
|
|
40
|
+
* remove: () => void;
|
|
41
|
+
* replace: (node: Node) => void;
|
|
42
|
+
* }} WalkerContext
|
|
43
|
+
*/
|
|
44
|
+
var WalkerBase = class {
|
|
45
|
+
constructor() {
|
|
46
|
+
/** @type {boolean} */
|
|
47
|
+
this.should_skip = false;
|
|
48
|
+
/** @type {boolean} */
|
|
49
|
+
this.should_remove = false;
|
|
50
|
+
/** @type {Node | null} */
|
|
51
|
+
this.replacement = null;
|
|
52
|
+
/** @type {WalkerContext} */
|
|
53
|
+
this.context = {
|
|
54
|
+
skip: () => this.should_skip = true,
|
|
55
|
+
remove: () => this.should_remove = true,
|
|
56
|
+
replace: (node) => this.replacement = node
|
|
57
|
+
};
|
|
58
|
+
}
|
|
59
|
+
/**
|
|
60
|
+
* @template {Node} Parent
|
|
61
|
+
* @param {Parent | null | undefined} parent
|
|
62
|
+
* @param {keyof Parent | null | undefined} prop
|
|
63
|
+
* @param {number | null | undefined} index
|
|
64
|
+
* @param {Node} node
|
|
65
|
+
*/
|
|
66
|
+
replace(parent, prop, index, node) {
|
|
67
|
+
if (parent && prop) {
|
|
68
|
+
if (index != null)
|
|
69
|
+
/** @type {Array<Node>} */ parent[prop][index] = node;
|
|
70
|
+
else
|
|
71
|
+
/** @type {Node} */ parent[prop] = node;
|
|
72
|
+
}
|
|
73
|
+
}
|
|
74
|
+
/**
|
|
75
|
+
* @template {Node} Parent
|
|
76
|
+
* @param {Parent | null | undefined} parent
|
|
77
|
+
* @param {keyof Parent | null | undefined} prop
|
|
78
|
+
* @param {number | null | undefined} index
|
|
79
|
+
*/
|
|
80
|
+
remove(parent, prop, index) {
|
|
81
|
+
if (parent && prop) {
|
|
82
|
+
if (index !== null && index !== void 0)
|
|
83
|
+
/** @type {Array<Node>} */ parent[prop].splice(index, 1);
|
|
84
|
+
else delete parent[prop];
|
|
85
|
+
}
|
|
86
|
+
}
|
|
87
|
+
};
|
|
88
|
+
//#endregion
|
|
89
|
+
//#region ../../node_modules/.pnpm/estree-walker@3.0.3/node_modules/estree-walker/src/sync.js
|
|
90
|
+
/**
|
|
91
|
+
* @typedef { import('estree').Node} Node
|
|
92
|
+
* @typedef { import('./walker.js').WalkerContext} WalkerContext
|
|
93
|
+
* @typedef {(
|
|
94
|
+
* this: WalkerContext,
|
|
95
|
+
* node: Node,
|
|
96
|
+
* parent: Node | null,
|
|
97
|
+
* key: string | number | symbol | null | undefined,
|
|
98
|
+
* index: number | null | undefined
|
|
99
|
+
* ) => void} SyncHandler
|
|
100
|
+
*/
|
|
101
|
+
var SyncWalker = class extends WalkerBase {
|
|
102
|
+
/**
|
|
103
|
+
*
|
|
104
|
+
* @param {SyncHandler} [enter]
|
|
105
|
+
* @param {SyncHandler} [leave]
|
|
106
|
+
*/
|
|
107
|
+
constructor(enter, leave) {
|
|
108
|
+
super();
|
|
109
|
+
/** @type {boolean} */
|
|
110
|
+
this.should_skip = false;
|
|
111
|
+
/** @type {boolean} */
|
|
112
|
+
this.should_remove = false;
|
|
113
|
+
/** @type {Node | null} */
|
|
114
|
+
this.replacement = null;
|
|
115
|
+
/** @type {WalkerContext} */
|
|
116
|
+
this.context = {
|
|
117
|
+
skip: () => this.should_skip = true,
|
|
118
|
+
remove: () => this.should_remove = true,
|
|
119
|
+
replace: (node) => this.replacement = node
|
|
120
|
+
};
|
|
121
|
+
/** @type {SyncHandler | undefined} */
|
|
122
|
+
this.enter = enter;
|
|
123
|
+
/** @type {SyncHandler | undefined} */
|
|
124
|
+
this.leave = leave;
|
|
125
|
+
}
|
|
126
|
+
/**
|
|
127
|
+
* @template {Node} Parent
|
|
128
|
+
* @param {Node} node
|
|
129
|
+
* @param {Parent | null} parent
|
|
130
|
+
* @param {keyof Parent} [prop]
|
|
131
|
+
* @param {number | null} [index]
|
|
132
|
+
* @returns {Node | null}
|
|
133
|
+
*/
|
|
134
|
+
visit(node, parent, prop, index) {
|
|
135
|
+
if (node) {
|
|
136
|
+
if (this.enter) {
|
|
137
|
+
const _should_skip = this.should_skip;
|
|
138
|
+
const _should_remove = this.should_remove;
|
|
139
|
+
const _replacement = this.replacement;
|
|
140
|
+
this.should_skip = false;
|
|
141
|
+
this.should_remove = false;
|
|
142
|
+
this.replacement = null;
|
|
143
|
+
this.enter.call(this.context, node, parent, prop, index);
|
|
144
|
+
if (this.replacement) {
|
|
145
|
+
node = this.replacement;
|
|
146
|
+
this.replace(parent, prop, index, node);
|
|
147
|
+
}
|
|
148
|
+
if (this.should_remove) this.remove(parent, prop, index);
|
|
149
|
+
const skipped = this.should_skip;
|
|
150
|
+
const removed = this.should_remove;
|
|
151
|
+
this.should_skip = _should_skip;
|
|
152
|
+
this.should_remove = _should_remove;
|
|
153
|
+
this.replacement = _replacement;
|
|
154
|
+
if (skipped) return node;
|
|
155
|
+
if (removed) return null;
|
|
156
|
+
}
|
|
157
|
+
/** @type {keyof Node} */
|
|
158
|
+
let key;
|
|
159
|
+
for (key in node) {
|
|
160
|
+
/** @type {unknown} */
|
|
161
|
+
const value = node[key];
|
|
162
|
+
if (value && typeof value === "object") {
|
|
163
|
+
if (Array.isArray(value)) {
|
|
164
|
+
const nodes = value;
|
|
165
|
+
for (let i = 0; i < nodes.length; i += 1) {
|
|
166
|
+
const item = nodes[i];
|
|
167
|
+
if (isNode(item)) {
|
|
168
|
+
if (!this.visit(item, node, key, i)) i--;
|
|
169
|
+
}
|
|
170
|
+
}
|
|
171
|
+
} else if (isNode(value)) this.visit(value, node, key, null);
|
|
172
|
+
}
|
|
173
|
+
}
|
|
174
|
+
if (this.leave) {
|
|
175
|
+
const _replacement = this.replacement;
|
|
176
|
+
const _should_remove = this.should_remove;
|
|
177
|
+
this.replacement = null;
|
|
178
|
+
this.should_remove = false;
|
|
179
|
+
this.leave.call(this.context, node, parent, prop, index);
|
|
180
|
+
if (this.replacement) {
|
|
181
|
+
node = this.replacement;
|
|
182
|
+
this.replace(parent, prop, index, node);
|
|
183
|
+
}
|
|
184
|
+
if (this.should_remove) this.remove(parent, prop, index);
|
|
185
|
+
const removed = this.should_remove;
|
|
186
|
+
this.replacement = _replacement;
|
|
187
|
+
this.should_remove = _should_remove;
|
|
188
|
+
if (removed) return null;
|
|
189
|
+
}
|
|
190
|
+
}
|
|
191
|
+
return node;
|
|
192
|
+
}
|
|
193
|
+
};
|
|
194
|
+
/**
|
|
195
|
+
* Ducktype a node.
|
|
196
|
+
*
|
|
197
|
+
* @param {unknown} value
|
|
198
|
+
* @returns {value is Node}
|
|
199
|
+
*/
|
|
200
|
+
function isNode(value) {
|
|
201
|
+
return value !== null && typeof value === "object" && "type" in value && typeof value.type === "string";
|
|
202
|
+
}
|
|
203
|
+
//#endregion
|
|
204
|
+
//#region ../../node_modules/.pnpm/estree-walker@3.0.3/node_modules/estree-walker/src/index.js
|
|
205
|
+
/**
|
|
206
|
+
* @typedef {import('estree').Node} Node
|
|
207
|
+
* @typedef {import('./sync.js').SyncHandler} SyncHandler
|
|
208
|
+
* @typedef {import('./async.js').AsyncHandler} AsyncHandler
|
|
209
|
+
*/
|
|
210
|
+
/**
|
|
211
|
+
* @param {Node} ast
|
|
212
|
+
* @param {{
|
|
213
|
+
* enter?: SyncHandler
|
|
214
|
+
* leave?: SyncHandler
|
|
215
|
+
* }} walker
|
|
216
|
+
* @returns {Node | null}
|
|
217
|
+
*/
|
|
218
|
+
function walk(ast, { enter, leave }) {
|
|
219
|
+
return new SyncWalker(enter, leave).visit(ast, null);
|
|
220
|
+
}
|
|
221
|
+
//#endregion
|
|
222
|
+
//#region src/shared/ast-bindings.ts
|
|
223
|
+
/** Names introduced by a binding pattern, excluding keys and default expressions. */
|
|
224
|
+
function bindingNames(node) {
|
|
225
|
+
if (isIdentifier(node)) return [node.name];
|
|
226
|
+
if (node?.type === "ObjectPattern") return (node.properties ?? []).flatMap((property) => bindingNames(property.type === "RestElement" ? property.argument : property.value));
|
|
227
|
+
if (node?.type === "ArrayPattern") return (node.elements ?? []).flatMap(bindingNames);
|
|
228
|
+
if (node?.type === "AssignmentPattern" || node?.type === "RestElement") return bindingNames(node.left ?? node.argument);
|
|
229
|
+
if (node?.type === "TSParameterProperty") return bindingNames(node.parameter);
|
|
230
|
+
return [];
|
|
231
|
+
}
|
|
232
|
+
const FUNCTIONS = /* @__PURE__ */ new Set([
|
|
233
|
+
"FunctionDeclaration",
|
|
234
|
+
"FunctionExpression",
|
|
235
|
+
"ArrowFunctionExpression"
|
|
236
|
+
]);
|
|
237
|
+
/**
|
|
238
|
+
* Resolve lexical bindings after collecting declarations, including hoisted and later bindings.
|
|
239
|
+
* A visitor can collect references in the same pass; return true to retain a node's scope.
|
|
240
|
+
* Names can limit binding collection when only specific imports need resolution.
|
|
241
|
+
*/
|
|
242
|
+
function bindingResolver(program, options) {
|
|
243
|
+
const scopes = /* @__PURE__ */ new WeakMap();
|
|
244
|
+
const outerScopes = /* @__PURE__ */ new WeakMap();
|
|
245
|
+
let scope = { varScope: true };
|
|
246
|
+
const declare = (pattern, declaration, target = scope) => {
|
|
247
|
+
for (const name of bindingNames(pattern)) if (!options?.names || options.names.has(name)) (target.bindings ??= /* @__PURE__ */ new Map()).set(name, declaration);
|
|
248
|
+
};
|
|
249
|
+
walk(program, {
|
|
250
|
+
enter(raw, rawParent, key) {
|
|
251
|
+
const node = raw;
|
|
252
|
+
const parent = rawParent;
|
|
253
|
+
const outerScope = scope;
|
|
254
|
+
if (parent?.type === "SwitchStatement" && key === "discriminant") scope = scope.parent;
|
|
255
|
+
if ([
|
|
256
|
+
"FunctionDeclaration",
|
|
257
|
+
"ClassDeclaration",
|
|
258
|
+
"TSEnumDeclaration",
|
|
259
|
+
"TSModuleDeclaration"
|
|
260
|
+
].includes(node.type)) declare(node.id, node);
|
|
261
|
+
const isFunction = FUNCTIONS.has(node.type);
|
|
262
|
+
if (isFunction || node.type === "BlockStatement" || node.type === "StaticBlock" || node.type === "CatchClause" || node.type === "ForStatement" || node.type === "ForInStatement" || node.type === "ForOfStatement" || node.type === "SwitchStatement" || node.type === "ClassDeclaration" || node.type === "ClassExpression" || node.type === "TSModuleDeclaration") scope = {
|
|
263
|
+
parent: scope,
|
|
264
|
+
varScope: isFunction || node.type === "StaticBlock" || node.type === "TSModuleDeclaration" || node.type === "BlockStatement" && !!parent && FUNCTIONS.has(parent.type)
|
|
265
|
+
};
|
|
266
|
+
if (scope !== outerScope) outerScopes.set(node, outerScope);
|
|
267
|
+
if (!options?.visit || options.visit(node)) scopes.set(node, scope);
|
|
268
|
+
if (isFunction) {
|
|
269
|
+
if (node.type === "FunctionExpression") declare(node.id, node);
|
|
270
|
+
for (const parameter of node.params ?? []) declare(parameter, parameter);
|
|
271
|
+
} else if (node.type === "ClassDeclaration" || node.type === "ClassExpression") declare(node.id, node);
|
|
272
|
+
else if (node.type === "CatchClause") declare(node.param, node);
|
|
273
|
+
else if (node.type === "ImportDeclaration" && node.importKind !== "type") {
|
|
274
|
+
for (const specifier of node.specifiers ?? []) if (specifier.importKind !== "type") declare(specifier.local, specifier);
|
|
275
|
+
} else if (node.type === "VariableDeclaration") {
|
|
276
|
+
let target = scope;
|
|
277
|
+
if (node.kind === "var") while (!target.varScope && target.parent) target = target.parent;
|
|
278
|
+
for (const declaration of node.declarations ?? []) declare(declaration.id, declaration, target);
|
|
279
|
+
}
|
|
280
|
+
},
|
|
281
|
+
leave(raw) {
|
|
282
|
+
const outer = outerScopes.get(raw);
|
|
283
|
+
if (outer) scope = outer;
|
|
284
|
+
}
|
|
285
|
+
});
|
|
286
|
+
return (node, name) => {
|
|
287
|
+
let current = scopes.get(node);
|
|
288
|
+
while (current) {
|
|
289
|
+
const binding = current.bindings?.get(name);
|
|
290
|
+
if (binding) return binding;
|
|
291
|
+
current = current.parent;
|
|
292
|
+
}
|
|
293
|
+
};
|
|
294
|
+
}
|
|
295
|
+
//#endregion
|
|
296
|
+
export { staticLiteral as a, staticExportInitializers as i, bindingResolver as n, unwrapStaticExpression as o, walk as r, bindingNames as t };
|
|
@@ -1,9 +1,9 @@
|
|
|
1
1
|
import { a as getApiUrl, c as getToken, m as savePlatformToken, p as runPlatformLogin, u as openBrowser } from "./auth-B6iOCjKI.mjs";
|
|
2
|
-
import { L as log } from "./dist-
|
|
3
|
-
import {
|
|
4
|
-
import {
|
|
5
|
-
import { r as selectPlatformLoginMethod } from "./login-
|
|
6
|
-
import { t as discoverPlatform } from "./platform-cmd-
|
|
2
|
+
import { L as log } from "./dist-Cor9XGoz.mjs";
|
|
3
|
+
import { r as PlatformClient } from "./client-BEkdj1kx.mjs";
|
|
4
|
+
import { l as formatUrl } from "./output-BpgYODYx.mjs";
|
|
5
|
+
import { r as selectPlatformLoginMethod } from "./login-Cttnagmm.mjs";
|
|
6
|
+
import { t as discoverPlatform } from "./platform-cmd-D5I1beUX.mjs";
|
|
7
7
|
//#region src/cli/auth-link.ts
|
|
8
8
|
async function runAuthLink(root, connectionId) {
|
|
9
9
|
const token = getToken(root);
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import { s as listPlatformConnections } from "./platform-registry-B9mWX9LO.mjs";
|
|
2
2
|
import { n as readDeploymentPlatform } from "./project-rqDnVsJN.mjs";
|
|
3
|
-
import { K as select, tt as isCancel } from "./dist-
|
|
3
|
+
import { K as select, tt as isCancel } from "./dist-Cor9XGoz.mjs";
|
|
4
4
|
//#region src/cli/auth-router.ts
|
|
5
5
|
async function chooseDestination(root, args, interactive) {
|
|
6
6
|
const saved = readDeploymentPlatform(root);
|
|
@@ -39,11 +39,11 @@ async function chooseDestination(root, args, interactive) {
|
|
|
39
39
|
async function runAuthRouter(root, args, interactive = Boolean(process.stdin.isTTY)) {
|
|
40
40
|
const destination = await chooseDestination(root, args, interactive);
|
|
41
41
|
if (destination.platform === "cloudflare") {
|
|
42
|
-
const { runCloudflareCommand } = await import("./cloudflare-cmd-
|
|
42
|
+
const { runCloudflareCommand } = await import("./cloudflare-cmd-DMzCv12s.mjs");
|
|
43
43
|
await runCloudflareCommand(root, { subcommand: args.subcommand });
|
|
44
44
|
return;
|
|
45
45
|
}
|
|
46
|
-
const { runAccountCommand } = await import("./account-cmd-
|
|
46
|
+
const { runAccountCommand } = await import("./account-cmd-CdUll_35.mjs");
|
|
47
47
|
const subcommand = args.subcommand === "status" ? "whoami" : args.subcommand;
|
|
48
48
|
if (!destination.apiUrl) {
|
|
49
49
|
await runAccountCommand(root, { subcommand });
|
|
@@ -1,8 +1,8 @@
|
|
|
1
1
|
import { t as VoidAuthProvider } from "./providers-BNKRacMr.mjs";
|
|
2
2
|
import { i as VoidAuthConfig, n as AuthState } from "./auth-DkcFflXV.mjs";
|
|
3
|
-
import { DBFieldAttribute } from "better-auth/db";
|
|
4
3
|
import { BetterAuthOptions, betterAuth } from "better-auth";
|
|
5
4
|
import { Context } from "hono";
|
|
5
|
+
import { DBFieldAttribute } from "better-auth/db";
|
|
6
6
|
//#region src/auth/drizzle.d.ts
|
|
7
7
|
type AuthIdStrategy = "serial" | "text" | "uuid";
|
|
8
8
|
type VoidAuthMigrationField = {
|
|
@@ -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 { a as resolveProjectBySlug, t as getRequestedProjectSlug } from "./resolve-project-
|
|
3
|
+
import { H as outro, L as log } from "./dist-Cor9XGoz.mjs";
|
|
4
|
+
import { n as PlatformApiError, r as PlatformClient } from "./client-BEkdj1kx.mjs";
|
|
5
|
+
import { f as import_picocolors, i as dim, m as printSuccess } from "./output-BpgYODYx.mjs";
|
|
6
|
+
import { a as resolveProjectBySlug, t as getRequestedProjectSlug } from "./resolve-project-Xoi6eTWY.mjs";
|
|
7
7
|
import { appendFileSync, writeFileSync } from "node:fs";
|
|
8
8
|
//#region src/cli/build-cmd.ts
|
|
9
9
|
const POLL_MS = 1e3;
|
|
@@ -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 { L as log } from "./dist-
|
|
4
|
-
import {
|
|
5
|
-
import { r as
|
|
6
|
-
import { a as resolveProjectBySlug, t as getRequestedProjectSlug } from "./resolve-project-
|
|
3
|
+
import { L as log } from "./dist-Cor9XGoz.mjs";
|
|
4
|
+
import { r as PlatformClient } from "./client-BEkdj1kx.mjs";
|
|
5
|
+
import { m as printSuccess, o as formatCount, r as createSpinner } from "./output-BpgYODYx.mjs";
|
|
6
|
+
import { a as resolveProjectBySlug, t as getRequestedProjectSlug } from "./resolve-project-Xoi6eTWY.mjs";
|
|
7
7
|
//#region src/cli/cache.ts
|
|
8
8
|
async function runPurgeCacheCommand(root, projectSlug) {
|
|
9
9
|
console.log();
|
|
@@ -1,8 +1,8 @@
|
|
|
1
1
|
import { r as readProjectConfig } from "./project-rqDnVsJN.mjs";
|
|
2
2
|
import { c as getToken } from "./auth-B6iOCjKI.mjs";
|
|
3
|
-
import { A as confirm, H as outro, L as log, tt as isCancel } from "./dist-
|
|
4
|
-
import {
|
|
5
|
-
import {
|
|
3
|
+
import { A as confirm, H as outro, L as log, tt as isCancel } from "./dist-Cor9XGoz.mjs";
|
|
4
|
+
import { r as PlatformClient } from "./client-BEkdj1kx.mjs";
|
|
5
|
+
import { m as printSuccess } from "./output-BpgYODYx.mjs";
|
|
6
6
|
//#region src/cli/cancel-deploy.ts
|
|
7
7
|
const ACTIVE_STATUSES = /* @__PURE__ */ new Set([
|
|
8
8
|
"pending",
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export { t as prepareCfBuildOutput } from "./cf-build-output-BhVxldCw.mjs";
|
|
@@ -1,4 +1,5 @@
|
|
|
1
1
|
import { a as join, c as resolve, i as isAbsolute, n as dirname, r as extname, s as relative, t as basename } from "./dist-ipQi0Q8y.mjs";
|
|
2
|
+
import { n as readGeneratedWranglerConfigFile } from "./generated-wrangler-config-DeWj5F9Y.mjs";
|
|
2
3
|
import { copyFileSync, cpSync, existsSync, mkdirSync, mkdtempSync, readFileSync, readdirSync, realpathSync, rmSync, symlinkSync, writeFileSync } from "node:fs";
|
|
3
4
|
import { fileURLToPath } from "node:url";
|
|
4
5
|
import { isRecord } from "@void/deploy-core";
|
|
@@ -583,9 +584,9 @@ async function prepareCfStaticBuildOutput(options) {
|
|
|
583
584
|
}
|
|
584
585
|
/** Bundle an adapter-produced Worker and copy only its public framework assets. */
|
|
585
586
|
async function prepareCfFrameworkBuildOutput(options) {
|
|
586
|
-
const raw =
|
|
587
|
-
const assets = record(raw
|
|
588
|
-
if (
|
|
587
|
+
const raw = readGeneratedWranglerConfigFile(options.configPath);
|
|
588
|
+
const assets = record(raw.assets);
|
|
589
|
+
if (typeof raw.main !== "string" || typeof assets?.directory !== "string") return null;
|
|
589
590
|
const configDirectory = dirname(options.configPath);
|
|
590
591
|
const entry = resolve(configDirectory, raw.main);
|
|
591
592
|
const sourceAssets = resolve(configDirectory, assets.directory);
|
|
@@ -1,4 +1,5 @@
|
|
|
1
1
|
//#region src/cli/cf-command-values.ts
|
|
2
|
+
const CF_VERSION_SOURCE_MAX_OUTPUT_BYTES = 134217728;
|
|
2
3
|
/** Accept a cf positional only when it cannot be read as a flag or carry control characters. */
|
|
3
4
|
function safePositional(value) {
|
|
4
5
|
return typeof value === "string" && value.length > 0 && !value.startsWith("-") && ![...value].some((character) => {
|
|
@@ -19,4 +20,4 @@ function readCfUploadOutput(stdout) {
|
|
|
19
20
|
};
|
|
20
21
|
}
|
|
21
22
|
//#endregion
|
|
22
|
-
export {
|
|
23
|
+
export { safePositional as i, isD1Bookmark as n, readCfUploadOutput as r, CF_VERSION_SOURCE_MAX_OUTPUT_BYTES as t };
|
|
@@ -0,0 +1,37 @@
|
|
|
1
|
+
import { n as getOwnVersion } from "./agents-CuNtT0D_.mjs";
|
|
2
|
+
import { readFileSync } from "node:fs";
|
|
3
|
+
import { isRecord } from "@void/deploy-core";
|
|
4
|
+
//#region src/cli/cf-user-agent.ts
|
|
5
|
+
let voidUserAgent;
|
|
6
|
+
let cfCliVersion;
|
|
7
|
+
function getVoidUserAgent() {
|
|
8
|
+
if (voidUserAgent === void 0) voidUserAgent = `void/${getOwnVersion()}`;
|
|
9
|
+
return voidUserAgent;
|
|
10
|
+
}
|
|
11
|
+
/** cf prepends `cf-cli/` to CLI_VERSION for both API requests and uploads. */
|
|
12
|
+
function getCfCliVersion(attribution) {
|
|
13
|
+
if (cfCliVersion === void 0) cfCliVersion = `${JSON.parse(readFileSync(new URL(import.meta.resolve("cf/package.json")), "utf8")).version} ${getVoidUserAgent()}`;
|
|
14
|
+
return attribution ? `${cfCliVersion} ${attribution}` : cfCliVersion;
|
|
15
|
+
}
|
|
16
|
+
//#endregion
|
|
17
|
+
//#region src/cli/cf-worker-settings.ts
|
|
18
|
+
/** Version uploads leave Worker-wide settings untouched; publish only explicit configuration. */
|
|
19
|
+
async function publishCloudflareObservability(options) {
|
|
20
|
+
if (!isRecord(options.observability)) throw new Error("The Cloudflare Worker observability settings were not readable.");
|
|
21
|
+
const endpoint = `${options.apiBaseUrl.replace(/\/$/, "")}/accounts/${encodeURIComponent(options.accountId)}/workers/scripts/${encodeURIComponent(options.workerName)}/script-settings`;
|
|
22
|
+
const response = await fetch(endpoint, {
|
|
23
|
+
method: "PATCH",
|
|
24
|
+
headers: {
|
|
25
|
+
"User-Agent": getVoidUserAgent(),
|
|
26
|
+
...options.headers,
|
|
27
|
+
"Content-Type": "application/json"
|
|
28
|
+
},
|
|
29
|
+
body: JSON.stringify({ observability: options.observability }),
|
|
30
|
+
redirect: "error",
|
|
31
|
+
signal: AbortSignal.timeout(3e4)
|
|
32
|
+
});
|
|
33
|
+
const body = await response.json();
|
|
34
|
+
if (!response.ok || !isRecord(body) || body.success !== true) throw new Error(`Cloudflare did not update Worker observability (HTTP ${response.status}).`);
|
|
35
|
+
}
|
|
36
|
+
//#endregion
|
|
37
|
+
export { getCfCliVersion as n, getVoidUserAgent as r, publishCloudflareObservability as t };
|