void 0.21.2 → 0.21.4
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-D8OC-U7y.mjs → account-cmd-DGt9cpRe.mjs} +4 -4
- package/dist/{agents-gni4eqBu.mjs → agents-B_pX_HmQ.mjs} +1 -1
- package/dist/ast-CPGPjb0V.mjs +18 -0
- package/dist/{auth-CAw7zHqj.mjs → auth-CZuiVsFh.mjs} +1 -1
- package/dist/{auth-B9_D6ygs.mjs → auth-DLNN0D3Z.mjs} +4 -4
- package/dist/{auth-link-BYFeMJAp.mjs → auth-link-Cl9vOuf7.mjs} +4 -4
- package/dist/{auth-router-OHZNmrb_.mjs → auth-router-D4ZcMUSf.mjs} +6 -6
- package/dist/{better-auth-shared-BoVwA5Vm.d.mts → better-auth-shared-BVkjZ3vM.d.mts} +1 -0
- package/dist/{better-auth-shared-syGYYmnY.mjs → better-auth-shared-rsBGBvWJ.mjs} +3 -6
- package/dist/{build-cmd-Bft7EY51.mjs → build-cmd-Dpt0jd-x.mjs} +4 -4
- package/dist/{cache-CKV1Gz2w.mjs → cache-7_UeZdTk.mjs} +4 -4
- package/dist/{cancel-deploy-BAKmkX4f.mjs → cancel-deploy-D23R1RXT.mjs} +3 -3
- package/dist/{cf-access-rAZxzMkL.mjs → cf-access-P0iZnu0q.mjs} +1 -1
- package/dist/{cf-build-output-CTdlo6Rt.mjs → cf-build-output-CGT03qCD.mjs} +2 -2
- package/dist/cli/cf-compat.mjs +2 -2
- package/dist/cli/cli.mjs +47 -43
- package/dist/cli/env-schema-probe.mjs +3 -3
- package/dist/client-4cDVv7BO.mjs +2 -0
- package/dist/{client-PdAJ-F0t.mjs → client-QTl6ko_D.mjs} +28 -5
- package/dist/{cloudflare-auth-BCmTc1X_.mjs → cloudflare-auth-B9jPCkV2.mjs} +1 -1
- package/dist/{cloudflare-cmd-D6PrKn7o.mjs → cloudflare-cmd-BjNxR1XF.mjs} +3 -3
- package/dist/{cloudflare-connect-DloREDlc.mjs → cloudflare-connect-CCUozPOe.mjs} +3 -3
- package/dist/{cloudflare-operations-BHNJVDbN.mjs → cloudflare-operations-BipGMJ5O.mjs} +1 -1
- package/dist/{cloudflare-operations-CPEdHYhM.mjs → cloudflare-operations-sMZXpk_S.mjs} +4 -4
- package/dist/collect-DLyFDiKW.mjs +2 -0
- package/dist/{collect-DXHNWHcT.mjs → collect-DiTn9yr6.mjs} +1 -1
- package/dist/config-0acf1oys.mjs +2 -0
- package/dist/{config-DywxBLQC.d.mts → config-CF69HgXc.d.mts} +7 -0
- package/dist/{config-Dxr6cTXn.mjs → config-CafTW6Cz.mjs} +12 -1
- package/dist/{config-BSe70f4T.mjs → config-D8MOgiQV.mjs} +3 -3
- package/dist/config-DPByhVck.mjs +32 -0
- package/dist/config-entry.d.mts +1 -1
- package/dist/{config--T87TD8T.mjs → config-s7Xj7tPb.mjs} +1 -1
- package/dist/{config-write-y3CBI_ux.mjs → config-write-BSduPMY8.mjs} +3 -3
- package/dist/{connect-DLx1pRYk.mjs → connect-4Ph5Y0QE.mjs} +7 -7
- package/dist/{create-project-JV9-6ICF.mjs → create-project-BniEV0OW.mjs} +1 -1
- package/dist/{create-project-BZBl_gQ0.mjs → create-project-DBfFSZKY.mjs} +4 -4
- package/dist/{db-B98_UV4H.mjs → db-CTXIWD42.mjs} +123 -55
- package/dist/{delete-BEEyqlwd.mjs → delete-D6dZ9B6B.mjs} +4 -4
- package/dist/deploy-BVwow28d.mjs +2 -0
- package/dist/{deploy-Bsymb0_c.mjs → deploy-F1exK5F4.mjs} +567 -263
- package/dist/discover-AMCBXivQ.mjs +2 -0
- package/dist/{discover-C4O6YxVS.mjs → discover-BcPPiF1o.mjs} +2 -2
- package/dist/{dist-4WkAWhWx.mjs → dist-BVqXeR_h.mjs} +9 -1
- package/dist/dist-_UUlL6bg.mjs +2 -0
- package/dist/{domain-Av2AkLQP.mjs → domain-Dmhvb2oU.mjs} +4 -4
- package/dist/{email-C5kaZXzJ.mjs → email--tEtMoj_.mjs} +1 -1
- package/dist/{email-CUqa6TtH.mjs → email-BxHabktK.mjs} +9 -9
- package/dist/{entry-DdRFGK0y.mjs → entry-CF5wvH4w.mjs} +4 -21
- package/dist/{env-D4RIGEzz.mjs → env-Csi-tMbT.mjs} +7 -7
- package/dist/{env-Yz4HcvHs.mjs → env-D5liuQYR.mjs} +5 -2
- package/dist/{env-DX_v-Q-v.mjs → env-_v349JBd.mjs} +1 -1
- package/dist/{env-types-CWDtqHgw.mjs → env-types-C2_bIk_b.mjs} +2 -2
- package/dist/{env-validation-BsFEXps5.mjs → env-validation-BB4GkLxn.mjs} +4 -4
- package/dist/{env-validation-DIDGM7h4.mjs → env-validation-BXge7uyK.mjs} +1 -1
- package/dist/{gen-pg-Ojg8Y.mjs → gen-Dz3X1Qab.mjs} +8 -8
- package/dist/gen-Vnv2f65C.mjs +2 -0
- package/dist/{generate-C0VY6RVf.mjs → generate-GDbL7sUr.mjs} +2 -2
- package/dist/{github-cmd-BEK4VprE.mjs → github-cmd-BED3_9JD.mjs} +4 -4
- package/dist/{headers-B_HBMgi0.mjs → headers-BOg_velo.mjs} +2 -2
- package/dist/{help-iQOt7WHk.mjs → help-DC7gdz7L.mjs} +7 -3
- package/dist/help-DQMfeKMz.mjs +2 -0
- package/dist/index.mjs +132 -158
- package/dist/{init-D5niUPAz.mjs → init-CRGDXzVC.mjs} +105 -289
- package/dist/{link-3lGrfXzd.mjs → link-CsHOinF7.mjs} +5 -5
- package/dist/{list-CVjGr_C6.mjs → list-CDb-4bZ1.mjs} +5 -5
- package/dist/{local-d1-DzykTWY8.mjs → local-d1-CC8sKFGu.mjs} +3 -3
- package/dist/{login-BgQJzxAl.mjs → login-BQyISZuW.mjs} +3 -3
- package/dist/login-r2gL8l7B.mjs +2 -0
- package/dist/{logs-DbzD-QDf.mjs → logs-BdfiOezj.mjs} +4 -4
- package/dist/{migrate-BV8qHiCb.mjs → migrate-B8KuoYsO.mjs} +69 -44
- package/dist/migrate-TsHGBnDA.mjs +2 -0
- package/dist/{node-Cupyf7-s.mjs → node-BM43oz4G.mjs} +5 -5
- package/dist/{operator-auth-BkVgJqv-.mjs → operator-auth-8KnOVXVd.mjs} +2 -2
- package/dist/{operator-client-A0iex2yi.mjs → operator-client-DUwumHpQ.mjs} +2 -2
- package/dist/{operator-cmd-CR6Lxzt0.mjs → operator-cmd-Co-PeaeD.mjs} +6 -6
- package/dist/{package-json-iCbMg5XF.mjs → package-json-DXfiT1jV.mjs} +1 -1
- package/dist/pages/index.d.mts +1 -1
- package/dist/pages/index.mjs +11 -6
- package/dist/pages/islands-plugin.d.mts +271 -1
- package/dist/pages/islands-plugin.mjs +95 -18
- package/dist/parse-filename-DioPHiR9.mjs +77 -0
- package/dist/{platform-auth-config-De7BqRJm.mjs → platform-auth-config-TSw8edHw.mjs} +5 -5
- package/dist/{platform-auth-protection-Dcat-6zu.mjs → platform-auth-protection-Ba1XqGhn.mjs} +6 -6
- package/dist/{platform-auth-recovery-C9gsM640.mjs → platform-auth-recovery-BkT3EsF2.mjs} +5 -5
- package/dist/{platform-cmd-Cl9Uhzru.mjs → platform-cmd-C8OqhqPt.mjs} +1 -1
- package/dist/{platform-cmd-CudokNIg.mjs → platform-cmd-CRSKfu8k.mjs} +5 -5
- package/dist/{platform-domain-Ckpd2kXw.mjs → platform-domain-j9YCXRm6.mjs} +3 -3
- package/dist/{platform-lifecycle-DVzM2T4j.mjs → platform-lifecycle-78H0XQUA.mjs} +277 -229
- package/dist/{platform-lifecycle-DlpiGcjr.mjs → platform-lifecycle-DDc9zCeJ.mjs} +1 -1
- package/dist/{platform-management-ibuS1as0.mjs → platform-management-6w8-DUjC.mjs} +2 -2
- package/dist/{platform-management-44Bxd3YC.mjs → platform-management-DzKNsMlt.mjs} +1 -1
- package/dist/{platform-recovery-D_KmvdSk.mjs → platform-recovery-Do8VOyDE.mjs} +3 -3
- package/dist/{platform-registry-BJbgZLS1.mjs → platform-registry-QBa4DK32.mjs} +1 -1
- package/dist/{plugin-inference-DsvtJLll.mjs → plugin-inference-BMfKRSqE.mjs} +188 -85
- package/dist/prepare-BZXkjdNe.mjs +2 -0
- package/dist/{prepare-pcWcxSCh.mjs → prepare-C3kt3Rst.mjs} +11 -11
- package/dist/{prepare-_T-Haxrr.mjs → prepare-DyZ-Yok5.mjs} +1 -1
- package/dist/{prerender-render-Cf_WDE9W.mjs → prerender-render-D9qbLs2f.mjs} +1 -1
- package/dist/prerender-render.mjs +1 -1
- package/dist/{preset-Dowh9tTt.mjs → preset-UHj9ARyP.mjs} +4 -4
- package/dist/{project-BEBFDFLz.mjs → project-BuUwfj6f.mjs} +1 -1
- package/dist/{project-CWNIPoXc.mjs → project-C0Fqu05O.mjs} +2 -2
- package/dist/{project-cmd-BuF9doku.mjs → project-cmd-B44I8J_W.mjs} +15 -15
- package/dist/{project-paths-CKQ-Q5JS.mjs → project-paths-GgcMozYz.mjs} +1 -1
- package/dist/{project-team-B1Tia8vd.mjs → project-team-BkbYIsXN.mjs} +4 -4
- package/dist/{project-token-Bwxjf4y6.mjs → project-token-C8xEEQnB.mjs} +4 -4
- package/dist/{project-tsconfig-CwfqUnVp.mjs → project-tsconfig-B8GeM0RM.mjs} +2 -2
- package/dist/{provision-Cck2m3jJ.mjs → provision-BhreDAOS.mjs} +141 -78
- package/dist/provision-DNtrtaVD.mjs +3 -0
- package/dist/{requests-CphRF98D.mjs → requests-DFyhBMaf.mjs} +3 -3
- package/dist/{resolve-project-Xvis70DG.mjs → resolve-project-BG5ORGID.mjs} +1 -1
- package/dist/resolve-project-DtbidV4y.mjs +2 -0
- package/dist/{rollback-BYHJV2yD.mjs → rollback-DHHxXZiS.mjs} +4 -4
- package/dist/{route-types-Id82-veQ.mjs → route-types-Clm4WD0B.mjs} +39 -16
- package/dist/{runner-CQs_cDSG.mjs → runner-B8wXwWlo.mjs} +1 -1
- package/dist/{runner-mysql-1o47achK.mjs → runner-mysql-CEG5JozK.mjs} +1 -1
- package/dist/{runner-mysql-BhwMk2Bm.mjs → runner-mysql-DmWchSWJ.mjs} +1 -1
- package/dist/{runner-BGVsGgkb.mjs → runner-p-dMs2UN.mjs} +3 -3
- package/dist/{runner-pg-D7z01mQS.mjs → runner-pg-Bh4AgZdj.mjs} +1 -1
- package/dist/{runner-pg-CJ_JeGF6.mjs → runner-pg-D4OPlil-.mjs} +1 -1
- package/dist/runtime/better-auth-mysql.d.mts +1 -1
- package/dist/runtime/better-auth-mysql.mjs +1 -1
- package/dist/runtime/better-auth-pg.d.mts +1 -1
- package/dist/runtime/better-auth-pg.mjs +1 -1
- package/dist/runtime/better-auth.d.mts +1 -1
- package/dist/runtime/better-auth.mjs +2 -2
- package/dist/runtime/db.mjs +8 -5
- package/dist/runtime/durable.mjs +1 -1
- package/dist/runtime/email/testing.mjs +1 -1
- package/dist/runtime/env-public.mjs +1 -1
- package/dist/runtime/env.d.mts +1 -1
- package/dist/runtime/env.mjs +1 -1
- package/dist/runtime/kv.mjs +1 -1
- package/dist/runtime/live-server.mjs +38 -23
- package/dist/runtime/queues.mjs +1 -1
- package/dist/runtime/sandbox.mjs +1 -1
- package/dist/runtime/storage.mjs +1 -1
- package/dist/runtime/ws-server.d.mts +1 -1
- package/dist/runtime/ws-server.mjs +1 -1
- package/dist/{scan-DJbooZm2.mjs → scan-4tfN-PSn.mjs} +113 -99
- package/dist/{scan-DdDvRCU1.mjs → scan-ClYmX3sa.mjs} +35 -137
- package/dist/{secret-Rt9c4Ttw.mjs → secret-DN9sSNiV.mjs} +6 -6
- package/dist/{skills-B-690E7h.mjs → skills-O6FUaizK.mjs} +2 -2
- package/dist/sveltekit.mjs +1 -1
- package/dist/{validate-qNhV00PD.mjs → validate-CIUwFpjB.mjs} +2 -2
- package/dist/validate-EKmJWxmy.mjs +2 -0
- package/dist/{wrangler-D01qs6VB.mjs → wrangler-BymcxrRa.mjs} +3 -3
- package/dist/{yarn-pnp-CVEc3gE7.mjs → yarn-pnp-BV4AzNul.mjs} +1 -1
- package/package.json +7 -7
- package/schema.json +18 -0
- package/skills/void/docs/guide/app-types.md +1 -1
- package/skills/void/docs/guide/auth.md +2 -2
- package/skills/void/docs/guide/database/d1.md +6 -0
- package/skills/void/docs/guide/durable-state.md +1 -1
- package/skills/void/docs/guide/edge/rewrites.md +2 -3
- package/skills/void/docs/guide/env-migration.md +1 -1
- package/skills/void/docs/guide/pages-routing/markdown.md +1 -1
- package/skills/void/docs/guide/platform/development/local.md +1 -1
- package/skills/void/docs/guide/platform/installation/prerequisites.md +2 -2
- package/skills/void/docs/guide/platform/installation/setup.md +1 -1
- package/skills/void/docs/guide/server-routing.md +2 -3
- package/skills/void/docs/guide/ssr.md +4 -10
- package/skills/void/docs/guide/websockets.md +1 -1
- package/skills/void/docs/integrations/cloudflare.md +3 -0
- package/skills/void/docs/reference/api.md +1 -1
- package/skills/void/docs/reference/cli.md +10 -3
- package/skills/void/docs/reference/config.md +11 -0
- package/skills/void/docs/reference/resource-inference.md +1 -1
- package/dist/client-DAAivdid.mjs +0 -2
- package/dist/collect-DAUItMDS.mjs +0 -2
- package/dist/config-DDIFxQYx.mjs +0 -2
- package/dist/config-uP7ZDtVZ.mjs +0 -21
- package/dist/deploy-CsjbRNyv.mjs +0 -2
- package/dist/discover-BBzDZe_o.mjs +0 -2
- package/dist/dist-D7-nEOXi.mjs +0 -2
- package/dist/gen-B87rlalt.mjs +0 -2
- package/dist/help-r_vrpH_d.mjs +0 -2
- package/dist/login-Bz0zEPoy.mjs +0 -2
- package/dist/migrate-BXY3B3m7.mjs +0 -2
- package/dist/prepare-D4CkM3_v.mjs +0 -2
- package/dist/provision-CNgEBkVA.mjs +0 -3
- package/dist/resolve-project-BTotl8Nn.mjs +0 -2
- package/dist/validate-DqJ33oHj.mjs +0 -2
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
import { i as createSpinner } from "./output-CCH48AMM.mjs";
|
|
2
|
-
import { a as listInstallationManifests, d as readInstallationRecoverySecrets, h as resolveInstallationManifest, m as removePlatformConnectionForInstallation, p as removeInstallationRecoverySecrets, t as acquirePlatformLifecycleLock, v as writeInstallationManifest } from "./platform-registry-
|
|
2
|
+
import { a as listInstallationManifests, d as readInstallationRecoverySecrets, h as resolveInstallationManifest, m as removePlatformConnectionForInstallation, p as removeInstallationRecoverySecrets, t as acquirePlatformLifecycleLock, v as writeInstallationManifest } from "./platform-registry-QBa4DK32.mjs";
|
|
3
3
|
import { E as confirm, I as select, N as note, P as outro, W as isCancel, j as log } from "./dist-Dn6nn2IU.mjs";
|
|
4
|
-
import { A as hyperdriveOriginFromConnectionString, C as assertPlatformOperatorCredentialCanApplyPlan, M as verifyPlatformRuntimeTokenPermissions, O as PlatformCloudflareClient, S as platformDatabaseNameFromOwnerUrl, _ as createPlatformInstallPlan, a as REMOTE_INSTALLATION_MANIFEST_KEY, b as platformProvisionIntentHash, d as loadPlatformRuntime, g as trackedPlatformWorkerTraffic, j as hyperdriveOriginMatches, k as hyperdriveOriginConfigHash, l as createPlatformInstallationSecrets, m as resolveBootstrapGitHubId, n as resolvePlatformInstallDatabaseUrl, o as acquirePlatformDatabaseLifecycleLock, t as assertNoninteractivePlatformMutationAcknowledged, u as installPlatform, v as formatPlatformInstallPlan, w as resolvePlatformCloudflareCredential, x as revalidatePlatformInstallAction, y as platformAdoptionIntentHash } from "./platform-lifecycle-
|
|
4
|
+
import { A as hyperdriveOriginFromConnectionString, C as assertPlatformOperatorCredentialCanApplyPlan, M as verifyPlatformRuntimeTokenPermissions, O as PlatformCloudflareClient, S as platformDatabaseNameFromOwnerUrl, _ as createPlatformInstallPlan, a as REMOTE_INSTALLATION_MANIFEST_KEY, b as platformProvisionIntentHash, d as loadPlatformRuntime, g as trackedPlatformWorkerTraffic, j as hyperdriveOriginMatches, k as hyperdriveOriginConfigHash, l as createPlatformInstallationSecrets, m as resolveBootstrapGitHubId, n as resolvePlatformInstallDatabaseUrl, o as acquirePlatformDatabaseLifecycleLock, t as assertNoninteractivePlatformMutationAcknowledged, u as installPlatform, v as formatPlatformInstallPlan, w as resolvePlatformCloudflareCredential, x as revalidatePlatformInstallAction, y as platformAdoptionIntentHash } from "./platform-lifecycle-78H0XQUA.mjs";
|
|
5
5
|
import { createHash } from "node:crypto";
|
|
6
6
|
import { PLATFORM_DISABLED_KEY, PLATFORM_DISABLED_VALUE, PLATFORM_R2_OWNERSHIP_MARKER_KEY, createPlatformResourceOwnershipMarker, parsePlatformInstallationManifest, parsePlatformResourceOwnershipMarker, recordInstallationResource, recordInstallationStep, setInstallationDesiredState, transitionInstallation } from "@void/platform";
|
|
7
7
|
//#region src/cli/platform-management.ts
|
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
import { c as selectAuthoritativePlatformManifest, s as runInstalledPlatformCommand, u as verifyPlatformInstallationOwnership } from "./platform-management-
|
|
1
|
+
import { c as selectAuthoritativePlatformManifest, s as runInstalledPlatformCommand, u as verifyPlatformInstallationOwnership } from "./platform-management-6w8-DUjC.mjs";
|
|
2
2
|
export { runInstalledPlatformCommand, selectAuthoritativePlatformManifest, verifyPlatformInstallationOwnership };
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
import { t as cfAccessHeaders } from "./cf-access-DRsQRe6k.mjs";
|
|
2
|
-
import { a as listInstallationManifests, g as savePlatformConnection, t as acquirePlatformLifecycleLock, v as writeInstallationManifest } from "./platform-registry-
|
|
3
|
-
import { _ as createPlatformInstallPlan, a as REMOTE_INSTALLATION_MANIFEST_KEY } from "./platform-lifecycle-
|
|
4
|
-
import { i as recoverDurablyMarkedProvisionIntents, r as isPlatformManifestMonotonicExtension, u as verifyPlatformInstallationOwnership } from "./platform-management-
|
|
2
|
+
import { a as listInstallationManifests, g as savePlatformConnection, t as acquirePlatformLifecycleLock, v as writeInstallationManifest } from "./platform-registry-QBa4DK32.mjs";
|
|
3
|
+
import { _ as createPlatformInstallPlan, a as REMOTE_INSTALLATION_MANIFEST_KEY } from "./platform-lifecycle-78H0XQUA.mjs";
|
|
4
|
+
import { i as recoverDurablyMarkedProvisionIntents, r as isPlatformManifestMonotonicExtension, u as verifyPlatformInstallationOwnership } from "./platform-management-6w8-DUjC.mjs";
|
|
5
5
|
import { parsePlatformInstallationManifest, setInstallationEndpoints } from "@void/platform";
|
|
6
6
|
//#region src/cli/platform-recovery.ts
|
|
7
7
|
async function recoverPlatformInstallations(client, accountId, verifyEndpoint = verifyInstallationEndpoint, selector = "") {
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { a as join, u as resolve } from "./dist-
|
|
1
|
+
import { a as join, u as resolve } from "./dist-BVqXeR_h.mjs";
|
|
2
2
|
import { closeSync, mkdirSync, openSync, readFileSync, readdirSync, renameSync, rmSync, statSync, writeFileSync } from "node:fs";
|
|
3
3
|
import { createCipheriv, createDecipheriv, createHash, randomBytes } from "node:crypto";
|
|
4
4
|
import { homedir, hostname } from "node:os";
|
|
@@ -1,10 +1,12 @@
|
|
|
1
|
-
import { a as join } from "./dist-
|
|
2
|
-
import { n as readProjectPaths } from "./project-paths-
|
|
3
|
-
import { n as globSync } from "./dist-Bn8Kodjp.mjs";
|
|
4
|
-
import {
|
|
1
|
+
import { a as join, d as toSlash, l as relative } from "./dist-BVqXeR_h.mjs";
|
|
2
|
+
import { n as readProjectPaths } from "./project-paths-GgcMozYz.mjs";
|
|
3
|
+
import { n as globSync, t as glob } from "./dist-Bn8Kodjp.mjs";
|
|
4
|
+
import { a as isObjectExpression, i as isMemberExpression, n as isIdentifier, r as isLiteral, t as isCallExpression } from "./ast-CPGPjb0V.mjs";
|
|
5
|
+
import { n as parseRouteFilename, r as parseWebSocketFilename, t as isRouteEnabledForEnvironment } from "./parse-filename-DioPHiR9.mjs";
|
|
6
|
+
import { r as getSsrServerEntryPath } from "./entry-CF5wvH4w.mjs";
|
|
5
7
|
import { existsSync, readFileSync } from "node:fs";
|
|
6
|
-
import { parse } from "es-module-lexer/js";
|
|
7
8
|
import { parseSync } from "vite";
|
|
9
|
+
import { parse } from "es-module-lexer/js";
|
|
8
10
|
//#region ../../node_modules/.pnpm/estree-walker@3.0.3/node_modules/estree-walker/src/walker.js
|
|
9
11
|
/**
|
|
10
12
|
* @typedef { import('estree').Node} Node
|
|
@@ -198,7 +200,8 @@ const ENV_BINDING_RE = /\benv\s*\.\s*(DB|KV|STORAGE|QUEUE_\w+|AI|SANDBOX)\b/;
|
|
|
198
200
|
* Infer which Cloudflare bindings a source file uses.
|
|
199
201
|
*
|
|
200
202
|
* Uses a tiered approach for performance:
|
|
201
|
-
* Tier 1: es-module-lexer to extract import sources (fast, asm.js, no init)
|
|
203
|
+
* Tier 1: es-module-lexer to extract import sources (fast, asm.js, no init),
|
|
204
|
+
* with a TSX parser fallback when the lexer cannot parse JSX
|
|
202
205
|
* Tier 2: Regex check for env.DB/KV/STORAGE patterns
|
|
203
206
|
* Tier 3: Full AST walk only when regex matches (to confirm member expressions)
|
|
204
207
|
*/
|
|
@@ -214,71 +217,68 @@ function inferBindingsFromSource(code, filename) {
|
|
|
214
217
|
needsLive: false,
|
|
215
218
|
needsEmail: false
|
|
216
219
|
};
|
|
220
|
+
const moduleReferences = [];
|
|
221
|
+
let parsedProgram;
|
|
217
222
|
try {
|
|
218
223
|
const [imports] = parse(code);
|
|
219
|
-
for (const imp of imports) {
|
|
220
|
-
|
|
221
|
-
|
|
222
|
-
|
|
223
|
-
case "void/db":
|
|
224
|
-
result.needsD1 = true;
|
|
225
|
-
break;
|
|
226
|
-
case "void/kv":
|
|
227
|
-
result.needsKV = true;
|
|
228
|
-
break;
|
|
229
|
-
case "void/storage":
|
|
230
|
-
result.needsR2 = true;
|
|
231
|
-
break;
|
|
232
|
-
case "void/auth":
|
|
233
|
-
result.needsAuth = true;
|
|
234
|
-
break;
|
|
235
|
-
case "void/queues":
|
|
236
|
-
result.needsQueues = true;
|
|
237
|
-
break;
|
|
238
|
-
case "void/ai":
|
|
239
|
-
result.needsAI = true;
|
|
240
|
-
break;
|
|
241
|
-
case "void/sandbox":
|
|
242
|
-
result.needsSandbox = true;
|
|
243
|
-
break;
|
|
244
|
-
case "void/email":
|
|
245
|
-
if (!isTypeOnlyImportStatement(code.slice(imp.importStart, imp.importEnd + 1))) result.needsEmail = true;
|
|
246
|
-
break;
|
|
247
|
-
case "void/live":
|
|
248
|
-
if (!isTypeOnlyImportStatement(code.slice(imp.importStart, imp.importEnd + 1))) result.needsLive = true;
|
|
249
|
-
break;
|
|
250
|
-
case "void/client":
|
|
251
|
-
case "void/client/react":
|
|
252
|
-
case "void/client/vue":
|
|
253
|
-
case "void/client/svelte":
|
|
254
|
-
case "void/client/solid": {
|
|
255
|
-
const stmt = code.slice(imp.importStart, imp.importEnd + 1);
|
|
256
|
-
if (/\bauth\b/.test(stmt)) result.needsAuth = true;
|
|
257
|
-
break;
|
|
258
|
-
}
|
|
259
|
-
}
|
|
260
|
-
}
|
|
224
|
+
for (const imp of imports) if (imp.specifier) moduleReferences.push({
|
|
225
|
+
source: imp.specifier,
|
|
226
|
+
statement: code.slice(imp.importStart, imp.importEnd + 1)
|
|
227
|
+
});
|
|
261
228
|
} catch {
|
|
262
|
-
|
|
263
|
-
|
|
264
|
-
|
|
265
|
-
|
|
266
|
-
|
|
267
|
-
|
|
268
|
-
|
|
269
|
-
|
|
270
|
-
|
|
271
|
-
if (
|
|
229
|
+
try {
|
|
230
|
+
parsedProgram = parseSync(filename, code).program;
|
|
231
|
+
for (const node of parsedProgram.body) if ((node.type === "ImportDeclaration" || node.type === "ExportNamedDeclaration" || node.type === "ExportAllDeclaration") && typeof node.source?.value === "string") moduleReferences.push({
|
|
232
|
+
source: node.source.value,
|
|
233
|
+
statement: code.slice(node.start, node.end)
|
|
234
|
+
});
|
|
235
|
+
} catch {}
|
|
236
|
+
}
|
|
237
|
+
for (const { source, statement } of moduleReferences) {
|
|
238
|
+
if (isTypeOnlyModuleStatement(statement)) continue;
|
|
239
|
+
switch (source) {
|
|
240
|
+
case "void/db":
|
|
241
|
+
result.needsD1 = true;
|
|
242
|
+
break;
|
|
243
|
+
case "void/kv":
|
|
244
|
+
result.needsKV = true;
|
|
245
|
+
break;
|
|
246
|
+
case "void/storage":
|
|
247
|
+
result.needsR2 = true;
|
|
248
|
+
break;
|
|
249
|
+
case "void/auth":
|
|
250
|
+
result.needsAuth = true;
|
|
251
|
+
break;
|
|
252
|
+
case "void/queues":
|
|
253
|
+
result.needsQueues = true;
|
|
254
|
+
break;
|
|
255
|
+
case "void/ai":
|
|
256
|
+
result.needsAI = true;
|
|
257
|
+
break;
|
|
258
|
+
case "void/sandbox":
|
|
259
|
+
result.needsSandbox = true;
|
|
260
|
+
break;
|
|
261
|
+
case "void/email":
|
|
262
|
+
result.needsEmail = true;
|
|
263
|
+
break;
|
|
264
|
+
case "void/live":
|
|
265
|
+
result.needsLive = true;
|
|
266
|
+
break;
|
|
267
|
+
case "void/client":
|
|
268
|
+
case "void/client/react":
|
|
269
|
+
case "void/client/vue":
|
|
270
|
+
case "void/client/svelte":
|
|
271
|
+
case "void/client/solid": if (/\bauth\b/.test(statement)) result.needsAuth = true;
|
|
272
|
+
}
|
|
272
273
|
}
|
|
273
274
|
if (result.needsD1 && result.needsKV && result.needsR2 && result.needsAI && result.needsSandbox && result.needsLive) return result;
|
|
274
275
|
if (!ENV_BINDING_RE.test(code)) return result;
|
|
275
|
-
let
|
|
276
|
-
try {
|
|
277
|
-
|
|
276
|
+
let program = parsedProgram;
|
|
277
|
+
if (!program) try {
|
|
278
|
+
program = parseSync(filename, code).program;
|
|
278
279
|
} catch {
|
|
279
280
|
return result;
|
|
280
281
|
}
|
|
281
|
-
const program = parsed.program;
|
|
282
282
|
walk(program, { enter(node) {
|
|
283
283
|
const current = node;
|
|
284
284
|
if (!isMemberExpression(current)) return;
|
|
@@ -310,25 +310,16 @@ function inferBindingsFromSource(code, filename) {
|
|
|
310
310
|
} });
|
|
311
311
|
return result;
|
|
312
312
|
}
|
|
313
|
-
function
|
|
314
|
-
if (/^\s*import\s+type\b/.test(statement)) return true;
|
|
313
|
+
function isTypeOnlyModuleStatement(statement) {
|
|
314
|
+
if (/^\s*(?:import|export)\s+type\b/.test(statement)) return true;
|
|
315
315
|
const specifierStart = statement.indexOf("{");
|
|
316
316
|
const specifierEnd = statement.lastIndexOf("}");
|
|
317
317
|
if (specifierStart === -1 || specifierEnd === -1 || specifierEnd < specifierStart) return false;
|
|
318
318
|
const beforeSpecifiers = statement.slice(0, specifierStart);
|
|
319
|
-
if (!/^\s*import\s*$/.test(beforeSpecifiers)) return false;
|
|
319
|
+
if (!/^\s*(?:import|export)\s*$/.test(beforeSpecifiers)) return false;
|
|
320
320
|
const specifiers = statement.slice(specifierStart + 1, specifierEnd).split(",").map((specifier) => specifier.trim()).filter(Boolean);
|
|
321
321
|
return specifiers.length > 0 && specifiers.every((specifier) => specifier.startsWith("type "));
|
|
322
322
|
}
|
|
323
|
-
function hasRuntimeImportFrom(code, source) {
|
|
324
|
-
const escapedSource = source.replaceAll("/", "\\/");
|
|
325
|
-
const importRe = new RegExp(`\\bimport\\s+(?:[\\s\\S]*?\\bfrom\\s+)?["']${escapedSource}["']\\s*;?`, "g");
|
|
326
|
-
for (const match of code.matchAll(importRe)) {
|
|
327
|
-
const statement = match[0];
|
|
328
|
-
if (!isTypeOnlyImportStatement(statement)) return true;
|
|
329
|
-
}
|
|
330
|
-
return false;
|
|
331
|
-
}
|
|
332
323
|
/**
|
|
333
324
|
* Merge multiple InferredBindings into a single result (union).
|
|
334
325
|
*/
|
|
@@ -346,6 +337,113 @@ function mergeBindings(bindings) {
|
|
|
346
337
|
};
|
|
347
338
|
}
|
|
348
339
|
//#endregion
|
|
340
|
+
//#region src/router/websocket.ts
|
|
341
|
+
const HANDLER_EXTENSIONS = [
|
|
342
|
+
"ts",
|
|
343
|
+
"mts",
|
|
344
|
+
"js",
|
|
345
|
+
"mjs"
|
|
346
|
+
];
|
|
347
|
+
const WEBSOCKET_ROUTE_RE = /(?:\.(?:dev|prod))?\.ws\.(?:ts|mts|js|mjs)$/;
|
|
348
|
+
function isWebSocketRouteFile(filePath) {
|
|
349
|
+
return WEBSOCKET_ROUTE_RE.test(filePath.replace(/\\/g, "/"));
|
|
350
|
+
}
|
|
351
|
+
function toIdentifierPart(segment) {
|
|
352
|
+
return segment.replace(/^\(\s*|\s*\)$/g, "").replace(/^\[\.\.\.(.+)\]$/, "$1").replace(/^\[(.+)\]$/, "$1").replace(/\.ws$/, "").replace(/\.(dev|prod)$/, "").replace(/[^a-zA-Z0-9]+/g, " ").split(" ").filter(Boolean).map((part) => part[0].toUpperCase() + part.slice(1)).join("");
|
|
353
|
+
}
|
|
354
|
+
function deriveWebSocketClassName(filePath) {
|
|
355
|
+
const parts = filePath.replace(/\\/g, "/").replace(/\.(ts|mts|js|mjs)$/, "").split("/").filter((segment) => segment.length > 0 && !(segment.startsWith("(") && segment.endsWith(")"))).map(toIdentifierPart).filter(Boolean);
|
|
356
|
+
return (parts.length > 0 ? parts.join("") : "WebSocket") + "Ws";
|
|
357
|
+
}
|
|
358
|
+
function getPropertyName(node) {
|
|
359
|
+
if (!node) return null;
|
|
360
|
+
if (isIdentifier(node)) return node.name;
|
|
361
|
+
if (isLiteral(node) && typeof node.value === "string") return node.value;
|
|
362
|
+
return null;
|
|
363
|
+
}
|
|
364
|
+
function extractDefinition(call) {
|
|
365
|
+
if (!isCallExpression(call)) return null;
|
|
366
|
+
if (!isIdentifier(call.callee)) return null;
|
|
367
|
+
const calleeName = call.callee.name;
|
|
368
|
+
if (calleeName !== "defineRoom" && calleeName !== "defineWebSocket") return null;
|
|
369
|
+
let hasAuthGate = false;
|
|
370
|
+
const options = call.arguments?.[0];
|
|
371
|
+
if (isObjectExpression(options)) for (const property of options.properties ?? []) {
|
|
372
|
+
if (property.type !== "Property") continue;
|
|
373
|
+
if (getPropertyName(property.key) === "onBeforeConnect") {
|
|
374
|
+
hasAuthGate = true;
|
|
375
|
+
break;
|
|
376
|
+
}
|
|
377
|
+
}
|
|
378
|
+
return {
|
|
379
|
+
mode: calleeName === "defineRoom" ? "room" : "socket",
|
|
380
|
+
hasAuthGate
|
|
381
|
+
};
|
|
382
|
+
}
|
|
383
|
+
function detectWebSocketDefinition(absPath) {
|
|
384
|
+
const code = readFileSync(absPath, "utf-8");
|
|
385
|
+
const filename = absPath.split("/").pop() ?? absPath;
|
|
386
|
+
let parsed;
|
|
387
|
+
try {
|
|
388
|
+
parsed = parseSync(filename, code);
|
|
389
|
+
} catch {
|
|
390
|
+
return null;
|
|
391
|
+
}
|
|
392
|
+
const program = parsed.program;
|
|
393
|
+
const variableInitializers = /* @__PURE__ */ new Map();
|
|
394
|
+
for (const node of program.body ?? []) if (node.type === "VariableDeclaration") {
|
|
395
|
+
for (const declarator of node.declarations ?? []) if (isIdentifier(declarator.id) && declarator.init) variableInitializers.set(declarator.id.name, declarator.init);
|
|
396
|
+
}
|
|
397
|
+
for (const node of program.body ?? []) {
|
|
398
|
+
if (node.type !== "ExportDefaultDeclaration") continue;
|
|
399
|
+
const declaration = node.declaration;
|
|
400
|
+
if (isIdentifier(declaration)) return extractDefinition(variableInitializers.get(declaration.name));
|
|
401
|
+
return extractDefinition(declaration);
|
|
402
|
+
}
|
|
403
|
+
return null;
|
|
404
|
+
}
|
|
405
|
+
function buildWebSocketRoute(root, filePath, paths = readProjectPaths(root)) {
|
|
406
|
+
const parsed = parseWebSocketFilename(filePath);
|
|
407
|
+
const info = detectWebSocketDefinition(join(paths.routesDir, filePath));
|
|
408
|
+
const className = deriveWebSocketClassName(filePath);
|
|
409
|
+
return {
|
|
410
|
+
...parsed,
|
|
411
|
+
className,
|
|
412
|
+
bindingName: className,
|
|
413
|
+
mode: info?.mode ?? "socket",
|
|
414
|
+
hasAuthGate: info?.hasAuthGate ?? false
|
|
415
|
+
};
|
|
416
|
+
}
|
|
417
|
+
function parseWebSocketFiles(root, files, paths = readProjectPaths(root), environment) {
|
|
418
|
+
return files.filter((f) => isWebSocketRouteFile(f)).filter((f) => !f.split("/").some((segment) => segment.startsWith("_"))).filter((filePath) => isRouteEnabledForEnvironment(parseWebSocketFilename(filePath), environment)).map((filePath) => buildWebSocketRoute(root, filePath, paths)).sort((a, b) => {
|
|
419
|
+
if (a.catchAll !== b.catchAll) return a.catchAll ? 1 : -1;
|
|
420
|
+
return a.pattern.localeCompare(b.pattern);
|
|
421
|
+
});
|
|
422
|
+
}
|
|
423
|
+
async function scanWebSocketRoutes(root, paths = readProjectPaths(root), environment) {
|
|
424
|
+
const pattern = `**/*.{${HANDLER_EXTENSIONS.join(",")}}`;
|
|
425
|
+
return parseWebSocketFiles(root, await glob(pattern, {
|
|
426
|
+
cwd: paths.routesDir,
|
|
427
|
+
absolute: false
|
|
428
|
+
}).catch(() => []), paths, environment);
|
|
429
|
+
}
|
|
430
|
+
function scanWebSocketRoutesSync(root, paths = readProjectPaths(root), environment) {
|
|
431
|
+
const pattern = `**/*.{${HANDLER_EXTENSIONS.join(",")}}`;
|
|
432
|
+
let files;
|
|
433
|
+
try {
|
|
434
|
+
files = globSync(pattern, {
|
|
435
|
+
cwd: paths.routesDir,
|
|
436
|
+
absolute: false
|
|
437
|
+
});
|
|
438
|
+
} catch {
|
|
439
|
+
files = [];
|
|
440
|
+
}
|
|
441
|
+
return parseWebSocketFiles(root, files, paths, environment);
|
|
442
|
+
}
|
|
443
|
+
function isWebSocketPatternFile(filePath) {
|
|
444
|
+
return isWebSocketRouteFile(filePath);
|
|
445
|
+
}
|
|
446
|
+
//#endregion
|
|
349
447
|
//#region src/plugin-inference.ts
|
|
350
448
|
const SOURCE_GLOB = "**/*.{ts,tsx,mts,js,jsx,mjs,astro}";
|
|
351
449
|
/** Directories to scan for binding inference in framework mode. */
|
|
@@ -445,8 +543,8 @@ function inferBindingsFromFile(file, code) {
|
|
|
445
543
|
* Synchronously infer which Cloudflare bindings the project needs
|
|
446
544
|
* by scanning route/middleware files and optional src/main.ssr.ts with oxc-parser.
|
|
447
545
|
*
|
|
448
|
-
*
|
|
449
|
-
*
|
|
546
|
+
* Without an environment this scans the full source superset, which is used
|
|
547
|
+
* during plugin construction for binding-name reservation and plugin setup.
|
|
450
548
|
*
|
|
451
549
|
* @param scanDirs - Override the default scan directories (e.g., for framework mode)
|
|
452
550
|
*/
|
|
@@ -465,6 +563,17 @@ function inferProjectBindings(root, options, scanDirs) {
|
|
|
465
563
|
const paths = options?.paths ?? readProjectPaths(root);
|
|
466
564
|
const dirs = scanDirs ?? (paths.sourceDir ? [paths.sourceDir] : DEFAULT_SCAN_DIRS);
|
|
467
565
|
const allBindings = [];
|
|
566
|
+
const routesPrefix = `${toSlash(paths.routesDir).replace(/\/$/, "")}/`;
|
|
567
|
+
const addFile = (file) => {
|
|
568
|
+
const normalizedFile = toSlash(file);
|
|
569
|
+
if (options?.environment && normalizedFile.startsWith(routesPrefix) && /\.(?:ts|mts|js|mjs)$/.test(normalizedFile)) {
|
|
570
|
+
const routePath = relative(paths.routesDir, normalizedFile);
|
|
571
|
+
const route = isWebSocketPatternFile(routePath) ? parseWebSocketFilename(routePath) : parseRouteFilename(routePath);
|
|
572
|
+
if (!isRouteEnabledForEnvironment(route, options.environment)) return;
|
|
573
|
+
}
|
|
574
|
+
const code = readFileSync(file, "utf-8");
|
|
575
|
+
allBindings.push(inferBindingsFromFile(file, code));
|
|
576
|
+
};
|
|
468
577
|
for (const dir of dirs) {
|
|
469
578
|
const dirPath = join(root, dir);
|
|
470
579
|
let files;
|
|
@@ -476,10 +585,7 @@ function inferProjectBindings(root, options, scanDirs) {
|
|
|
476
585
|
} catch {
|
|
477
586
|
continue;
|
|
478
587
|
}
|
|
479
|
-
for (const file of files)
|
|
480
|
-
const code = readFileSync(file, "utf-8");
|
|
481
|
-
allBindings.push(inferBindingsFromFile(file, code));
|
|
482
|
-
}
|
|
588
|
+
for (const file of files) addFile(file);
|
|
483
589
|
}
|
|
484
590
|
const ssrEntry = getSsrServerEntryPath(root, paths);
|
|
485
591
|
if (ssrEntry) {
|
|
@@ -500,12 +606,9 @@ function inferProjectBindings(root, options, scanDirs) {
|
|
|
500
606
|
} catch {
|
|
501
607
|
srcFiles = [];
|
|
502
608
|
}
|
|
503
|
-
for (const file of srcFiles)
|
|
504
|
-
const code = readFileSync(file, "utf-8");
|
|
505
|
-
allBindings.push(inferBindingsFromFile(file, code));
|
|
506
|
-
}
|
|
609
|
+
for (const file of srcFiles) addFile(file);
|
|
507
610
|
}
|
|
508
611
|
return mergeBindings(allBindings);
|
|
509
612
|
}
|
|
510
613
|
//#endregion
|
|
511
|
-
export {
|
|
614
|
+
export { isWebSocketPatternFile as a, inferBindingsFromSource as c, inferProjectBindings as i, walk as l, FRAMEWORK_SCAN_DIRS as n, scanWebSocketRoutes as o, detectFramework as r, scanWebSocketRoutesSync as s, DEFAULT_SCAN_DIRS as t };
|
|
@@ -1,14 +1,14 @@
|
|
|
1
|
-
import { a as join } from "./dist-
|
|
2
|
-
import { i as resolveProjectPaths } from "./project-paths-
|
|
3
|
-
import { n as loadVoidAuthConfig, t as findVoidAuthConfig } from "./config-
|
|
4
|
-
import { m as readConfig, u as getDatabaseDialect } from "./config-
|
|
5
|
-
import { n as ensureProjectTsconfig, r as writeFileIfChanged } from "./project-tsconfig-
|
|
6
|
-
import { r as scanRoutes } from "./scan-
|
|
7
|
-
import { i as inferProjectBindings, n as FRAMEWORK_SCAN_DIRS, r as detectFramework } from "./plugin-inference-
|
|
8
|
-
import { i as generateDbDts, n as generateQueueTypes, t as generateRouteTypes } from "./route-types-
|
|
9
|
-
import { t as discoverSchema } from "./discover-
|
|
10
|
-
import { r as generateEnvTypes, t as findEnvFile } from "./env-types-
|
|
11
|
-
import { a as loadLocalEnv } from "./env-
|
|
1
|
+
import { a as join } from "./dist-BVqXeR_h.mjs";
|
|
2
|
+
import { i as resolveProjectPaths } from "./project-paths-GgcMozYz.mjs";
|
|
3
|
+
import { n as loadVoidAuthConfig, t as findVoidAuthConfig } from "./config-DPByhVck.mjs";
|
|
4
|
+
import { m as readConfig, u as getDatabaseDialect } from "./config-CafTW6Cz.mjs";
|
|
5
|
+
import { n as ensureProjectTsconfig, r as writeFileIfChanged } from "./project-tsconfig-B8GeM0RM.mjs";
|
|
6
|
+
import { r as scanRoutes } from "./scan-ClYmX3sa.mjs";
|
|
7
|
+
import { i as inferProjectBindings, n as FRAMEWORK_SCAN_DIRS, r as detectFramework } from "./plugin-inference-BMfKRSqE.mjs";
|
|
8
|
+
import { i as generateDbDts, n as generateQueueTypes, t as generateRouteTypes } from "./route-types-Clm4WD0B.mjs";
|
|
9
|
+
import { t as discoverSchema } from "./discover-BcPPiF1o.mjs";
|
|
10
|
+
import { r as generateEnvTypes, t as findEnvFile } from "./env-types-C2_bIk_b.mjs";
|
|
11
|
+
import { a as loadLocalEnv } from "./env-_v349JBd.mjs";
|
|
12
12
|
import { n as generateVoidAuthDrizzleSchema, t as generateVoidAuthDatabaseModule } from "./drizzle-Beb2Am5S.mjs";
|
|
13
13
|
import { existsSync, mkdirSync, rmSync } from "node:fs";
|
|
14
14
|
import { fileURLToPath } from "node:url";
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import { r as cliTitle } from "./output-CCH48AMM.mjs";
|
|
2
2
|
import { N as note, O as intro, P as outro, j as log } from "./dist-Dn6nn2IU.mjs";
|
|
3
|
-
import { t as prepareProject } from "./prepare-
|
|
3
|
+
import { t as prepareProject } from "./prepare-C3kt3Rst.mjs";
|
|
4
4
|
//#region src/cli/prepare.ts
|
|
5
5
|
async function runPrepareCommand(root, _args) {
|
|
6
6
|
console.log();
|
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
import { t as renderPrerenderPaths } from "./prerender-render-
|
|
1
|
+
import { t as renderPrerenderPaths } from "./prerender-render-D9qbLs2f.mjs";
|
|
2
2
|
export { renderPrerenderPaths };
|
|
@@ -1,7 +1,7 @@
|
|
|
1
|
-
import { a as join, l as relative, n as dirname, u as resolve } from "./dist-
|
|
2
|
-
import { n as readProjectPaths } from "./project-paths-
|
|
3
|
-
import { i as
|
|
4
|
-
import { i as
|
|
1
|
+
import { a as join, l as relative, n as dirname, u as resolve } from "./dist-BVqXeR_h.mjs";
|
|
2
|
+
import { n as readProjectPaths } from "./project-paths-GgcMozYz.mjs";
|
|
3
|
+
import { i as readPackageJson, n as hasPackageDependency, t as getPackageDependencies } from "./package-json-DXfiT1jV.mjs";
|
|
4
|
+
import { i as hasSsrEntry, r as getSsrServerEntryPath } from "./entry-CF5wvH4w.mjs";
|
|
5
5
|
import { existsSync } from "node:fs";
|
|
6
6
|
import { fileURLToPath } from "node:url";
|
|
7
7
|
//#region src/cli/preset.ts
|
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
import { d as writeProjectConfig, t as attachSelectedPlatform } from "./project-
|
|
1
|
+
import { d as writeProjectConfig, t as attachSelectedPlatform } from "./project-C0Fqu05O.mjs";
|
|
2
2
|
export { attachSelectedPlatform, writeProjectConfig };
|
|
@@ -1,5 +1,5 @@
|
|
|
1
|
-
import { a as join, n as dirname } from "./dist-
|
|
2
|
-
import { o as listPlatformConnections, s as normalizePlatformApiUrl } from "./platform-registry-
|
|
1
|
+
import { a as join, n as dirname } from "./dist-BVqXeR_h.mjs";
|
|
2
|
+
import { o as listPlatformConnections, s as normalizePlatformApiUrl } from "./platform-registry-QBa4DK32.mjs";
|
|
3
3
|
import { mkdirSync, readFileSync, rmSync, writeFileSync } from "node:fs";
|
|
4
4
|
import { homedir } from "node:os";
|
|
5
5
|
import { normalizeApplicationDomain } from "@void/platform";
|
|
@@ -1,8 +1,8 @@
|
|
|
1
1
|
import { a as dim, c as import_picocolors, r as cliTitle, u as tablePrefix } from "./output-CCH48AMM.mjs";
|
|
2
|
-
import { c as getToken, s as getSiteDomain } from "./auth-
|
|
3
|
-
import { i as readDeploymentPlatform } from "./project-
|
|
2
|
+
import { c as getToken, s as getSiteDomain } from "./auth-DLNN0D3Z.mjs";
|
|
3
|
+
import { i as readDeploymentPlatform } from "./project-C0Fqu05O.mjs";
|
|
4
4
|
import { O as intro, P as outro, j as log } from "./dist-Dn6nn2IU.mjs";
|
|
5
|
-
import { n as PlatformClient } from "./client-
|
|
5
|
+
import { n as PlatformClient } from "./client-QTl6ko_D.mjs";
|
|
6
6
|
//#region src/cli/projects.ts
|
|
7
7
|
async function runProjectsCommand(root) {
|
|
8
8
|
console.log();
|
|
@@ -39,63 +39,63 @@ async function runProjectsCommand(root) {
|
|
|
39
39
|
async function runProjectCommand(root, args) {
|
|
40
40
|
const cloudflare = readDeploymentPlatform(root) === "cloudflare";
|
|
41
41
|
if (args.subcommand === "status") {
|
|
42
|
-
const { runListCommand } = await import("./list-
|
|
42
|
+
const { runListCommand } = await import("./list-CDb-4bZ1.mjs");
|
|
43
43
|
return runListCommand(root, args.name || void 0);
|
|
44
44
|
}
|
|
45
45
|
if (args.subcommand === "link") {
|
|
46
46
|
if (cloudflare) throw new Error("project: Direct Cloudflare apps are identified by cloudflare.name in void.config.ts and do not need linking.");
|
|
47
|
-
const { runLink } = await import("./link-
|
|
47
|
+
const { runLink } = await import("./link-CsHOinF7.mjs");
|
|
48
48
|
return runLink(root, args.name || void 0);
|
|
49
49
|
}
|
|
50
50
|
if (args.subcommand === "list") {
|
|
51
51
|
if (cloudflare) {
|
|
52
|
-
const { runListCommand } = await import("./list-
|
|
52
|
+
const { runListCommand } = await import("./list-CDb-4bZ1.mjs");
|
|
53
53
|
return runListCommand(root);
|
|
54
54
|
}
|
|
55
55
|
return runProjectsCommand(root);
|
|
56
56
|
}
|
|
57
57
|
if (args.subcommand === "token") {
|
|
58
58
|
if (cloudflare) throw new Error("project: CI deploy credentials are available only for Void platform projects.");
|
|
59
|
-
const { runProjectTokenCommand } = await import("./project-token-
|
|
59
|
+
const { runProjectTokenCommand } = await import("./project-token-C8xEEQnB.mjs");
|
|
60
60
|
return runProjectTokenCommand(root, args);
|
|
61
61
|
}
|
|
62
62
|
if (args.subcommand === "team") {
|
|
63
63
|
if (args.action === "") {
|
|
64
|
-
const { printHelpPage } = await import("./help-
|
|
64
|
+
const { printHelpPage } = await import("./help-DQMfeKMz.mjs");
|
|
65
65
|
printHelpPage(["project", "team"]);
|
|
66
66
|
return;
|
|
67
67
|
}
|
|
68
68
|
const accountInvitationAction = args.action === "pending" || args.action === "accept" || args.action === "decline";
|
|
69
69
|
if (cloudflare && !accountInvitationAction) throw new Error("project: Teams are available only for projects hosted on a Void platform, not direct Cloudflare deployments.");
|
|
70
|
-
const { runProjectTeamCommand } = await import("./project-team-
|
|
70
|
+
const { runProjectTeamCommand } = await import("./project-team-BkbYIsXN.mjs");
|
|
71
71
|
return runProjectTeamCommand(root, args);
|
|
72
72
|
}
|
|
73
73
|
if (args.subcommand === "logs") {
|
|
74
|
-
const { runLogsCommand } = await import("./logs-
|
|
74
|
+
const { runLogsCommand } = await import("./logs-BdfiOezj.mjs");
|
|
75
75
|
return runLogsCommand(root, args.filter, args.range, args.deployment || void 0, args.level || void 0);
|
|
76
76
|
}
|
|
77
77
|
if (args.subcommand === "requests") {
|
|
78
78
|
if (cloudflare) throw new Error("project: Historical request analytics require the Void platform. Use `void project logs` for a live Cloudflare tail.");
|
|
79
|
-
const { runRequestsCommand } = await import("./requests-
|
|
79
|
+
const { runRequestsCommand } = await import("./requests-DFyhBMaf.mjs");
|
|
80
80
|
return runRequestsCommand(root, args.range, args.status || void 0);
|
|
81
81
|
}
|
|
82
82
|
if (args.subcommand === "rollback") {
|
|
83
|
-
const { runRollbackCommand } = await import("./rollback-
|
|
83
|
+
const { runRollbackCommand } = await import("./rollback-DHHxXZiS.mjs");
|
|
84
84
|
return runRollbackCommand(root, args.deployId || void 0);
|
|
85
85
|
}
|
|
86
86
|
if (args.subcommand === "cancel") {
|
|
87
87
|
if (cloudflare) throw new Error("project: Direct Cloudflare deploys activate only after readiness succeeds, so there is no remote build to cancel.");
|
|
88
|
-
const { runCancelDeployCommand } = await import("./cancel-deploy-
|
|
88
|
+
const { runCancelDeployCommand } = await import("./cancel-deploy-D23R1RXT.mjs");
|
|
89
89
|
return runCancelDeployCommand(root, args.deployId || void 0);
|
|
90
90
|
}
|
|
91
91
|
if (args.subcommand === "delete") {
|
|
92
92
|
if (cloudflare) throw new Error("project: Refusing to delete Cloudflare resources through this command. Direct deployments are additive and existing resources may be shared.");
|
|
93
|
-
const { runDeleteCommand } = await import("./delete-
|
|
93
|
+
const { runDeleteCommand } = await import("./delete-D6dZ9B6B.mjs");
|
|
94
94
|
return runDeleteCommand(root, args.name || void 0, { force: args.force });
|
|
95
95
|
}
|
|
96
96
|
if (args.subcommand === "purge-cache") {
|
|
97
97
|
if (cloudflare) throw new Error("project: Direct Cloudflare ISR cache purge is not available yet; redeploy or purge the configured KV namespace explicitly.");
|
|
98
|
-
const { runPurgeCacheCommand } = await import("./cache-
|
|
98
|
+
const { runPurgeCacheCommand } = await import("./cache-7_UeZdTk.mjs");
|
|
99
99
|
return runPurgeCacheCommand(root, args.projectSlug || void 0);
|
|
100
100
|
}
|
|
101
101
|
}
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { a as join, i as isAbsolute, l as relative, o as normalize } from "./dist-
|
|
1
|
+
import { a as join, i as isAbsolute, l as relative, o as normalize } from "./dist-BVqXeR_h.mjs";
|
|
2
2
|
import { existsSync, readFileSync } from "node:fs";
|
|
3
3
|
import { fileURLToPath } from "node:url";
|
|
4
4
|
import { createJiti } from "jiti";
|
|
@@ -1,9 +1,9 @@
|
|
|
1
1
|
import { r as cliTitle } from "./output-CCH48AMM.mjs";
|
|
2
|
-
import { c as getToken, i as getAccountCredential } from "./auth-
|
|
3
|
-
import { o as readProjectConfig } from "./project-
|
|
2
|
+
import { c as getToken, i as getAccountCredential } from "./auth-DLNN0D3Z.mjs";
|
|
3
|
+
import { o as readProjectConfig } from "./project-C0Fqu05O.mjs";
|
|
4
4
|
import { N as note, O as intro, P as outro, j as log } from "./dist-Dn6nn2IU.mjs";
|
|
5
|
-
import { n as PlatformClient, o as parsePlatformErrorBody, s as platformErrorMessage, t as PlatformApiError } from "./client-
|
|
6
|
-
import { r as resolveProjectBySlug, t as getRequestedProjectSlug } from "./resolve-project-
|
|
5
|
+
import { n as PlatformClient, o as parsePlatformErrorBody, s as platformErrorMessage, t as PlatformApiError } from "./client-QTl6ko_D.mjs";
|
|
6
|
+
import { r as resolveProjectBySlug, t as getRequestedProjectSlug } from "./resolve-project-BG5ORGID.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 { a as dim, r as cliTitle, u as tablePrefix } from "./output-CCH48AMM.mjs";
|
|
2
|
-
import { c as getToken } from "./auth-
|
|
3
|
-
import { o as readProjectConfig } from "./project-
|
|
2
|
+
import { c as getToken } from "./auth-DLNN0D3Z.mjs";
|
|
3
|
+
import { o as readProjectConfig } from "./project-C0Fqu05O.mjs";
|
|
4
4
|
import { O as intro, P as outro, j as log } from "./dist-Dn6nn2IU.mjs";
|
|
5
|
-
import { n as PlatformClient } from "./client-
|
|
6
|
-
import { r as resolveProjectBySlug } from "./resolve-project-
|
|
5
|
+
import { n as PlatformClient } from "./client-QTl6ko_D.mjs";
|
|
6
|
+
import { r as resolveProjectBySlug } from "./resolve-project-BG5ORGID.mjs";
|
|
7
7
|
//#region src/cli/project-token.ts
|
|
8
8
|
async function resolveTarget(root, args) {
|
|
9
9
|
const humanToken = getToken(root);
|
|
@@ -1,5 +1,5 @@
|
|
|
1
|
-
import { a as join, l as relative, n as dirname } from "./dist-
|
|
2
|
-
import { n as readProjectPaths } from "./project-paths-
|
|
1
|
+
import { a as join, l as relative, n as dirname } from "./dist-BVqXeR_h.mjs";
|
|
2
|
+
import { n as readProjectPaths } from "./project-paths-GgcMozYz.mjs";
|
|
3
3
|
import { existsSync, mkdirSync, readFileSync, writeFileSync } from "node:fs";
|
|
4
4
|
//#region src/codegen/write-if-changed.ts
|
|
5
5
|
function writeFileIfChanged(path, content) {
|