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,29 +1,30 @@
|
|
|
1
|
-
import { a as join, i as isAbsolute, l as relative, n as dirname, t as basename, u as resolve } from "./dist-
|
|
1
|
+
import { a as join, i as isAbsolute, l as relative, n as dirname, t as basename, u as resolve } from "./dist-BVqXeR_h.mjs";
|
|
2
2
|
import { r as cliTitle } from "./output-CCH48AMM.mjs";
|
|
3
|
-
import { n as readProjectPaths, o as TYPED_CONFIG_FILE } from "./project-paths-
|
|
4
|
-
import { c as getToken, u as isStagingMode } from "./auth-
|
|
5
|
-
import { d as writeProjectConfig, i as readDeploymentPlatform, l as writeDeploymentPlatform, o as readProjectConfig, t as attachSelectedPlatform } from "./project-
|
|
6
|
-
import { m as readConfig, u as getDatabaseDialect } from "./config-
|
|
7
|
-
import { L as materializeCloudflareConfig, i as LATEST_KNOWN_COMPAT_DATE, k as writeProvisionedWranglerConfig } from "./wrangler-
|
|
8
|
-
import { n as ensureProjectTsconfig, t as createProjectTsconfig } from "./project-tsconfig-
|
|
9
|
-
import { r as detectFramework } from "./plugin-inference-
|
|
3
|
+
import { n as readProjectPaths, o as TYPED_CONFIG_FILE } from "./project-paths-GgcMozYz.mjs";
|
|
4
|
+
import { c as getToken, u as isStagingMode } from "./auth-DLNN0D3Z.mjs";
|
|
5
|
+
import { d as writeProjectConfig, i as readDeploymentPlatform, l as writeDeploymentPlatform, o as readProjectConfig, t as attachSelectedPlatform } from "./project-C0Fqu05O.mjs";
|
|
6
|
+
import { m as readConfig, u as getDatabaseDialect } from "./config-CafTW6Cz.mjs";
|
|
7
|
+
import { L as materializeCloudflareConfig, i as LATEST_KNOWN_COMPAT_DATE, k as writeProvisionedWranglerConfig } from "./wrangler-BymcxrRa.mjs";
|
|
8
|
+
import { n as ensureProjectTsconfig, t as createProjectTsconfig } from "./project-tsconfig-B8GeM0RM.mjs";
|
|
9
|
+
import { r as detectFramework } from "./plugin-inference-BMfKRSqE.mjs";
|
|
10
10
|
import { n as parseDotenvFile, t as expandDotenv } from "./dotenv-VQxupEUv.mjs";
|
|
11
11
|
import { t as MagicString } from "./dist-BR1quN_w.mjs";
|
|
12
12
|
import { B as text, E as confirm, I as select, N as note, O as intro, P as outro, T as cancel, W as isCancel, j as log } from "./dist-Dn6nn2IU.mjs";
|
|
13
|
-
import { t as writeDrizzleConfig } from "./config-
|
|
14
|
-
import { n as getPackageDir, t as detectAgents } from "./agents-
|
|
15
|
-
import { n as PlatformClient } from "./client-
|
|
16
|
-
import { r as formatProjectCommand } from "./preset-
|
|
17
|
-
import { n as writeVoidProjectConfig, t as canRewriteVoidProjectConfig } from "./config-write-
|
|
18
|
-
import { i as migrateFrameworkAdapterPaths, t as migrateLegacyVoidConfig } from "./migrate-
|
|
19
|
-
import { i as promptProjectSelection, r as promptAndCreateProject } from "./create-project-
|
|
20
|
-
import { t as promptForLoginToken } from "./login-
|
|
21
|
-
import { i as saveDiscoveredPlatform, t as discoverPlatform } from "./platform-cmd-
|
|
22
|
-
import { t as connectCloudflare } from "./cloudflare-connect-
|
|
23
|
-
import { n as findInstalledYarnPnpRuntime, r as hasLocalLockfile, t as buildDrizzleKitSpawnEnv } from "./yarn-pnp-
|
|
13
|
+
import { t as writeDrizzleConfig } from "./config-D8MOgiQV.mjs";
|
|
14
|
+
import { n as getPackageDir, t as detectAgents } from "./agents-B_pX_HmQ.mjs";
|
|
15
|
+
import { n as PlatformClient } from "./client-QTl6ko_D.mjs";
|
|
16
|
+
import { r as formatProjectCommand } from "./preset-UHj9ARyP.mjs";
|
|
17
|
+
import { n as writeVoidProjectConfig, t as canRewriteVoidProjectConfig } from "./config-write-BSduPMY8.mjs";
|
|
18
|
+
import { i as migrateFrameworkAdapterPaths, t as migrateLegacyVoidConfig } from "./migrate-B8KuoYsO.mjs";
|
|
19
|
+
import { i as promptProjectSelection, r as promptAndCreateProject } from "./create-project-DBfFSZKY.mjs";
|
|
20
|
+
import { t as promptForLoginToken } from "./login-BQyISZuW.mjs";
|
|
21
|
+
import { i as saveDiscoveredPlatform, t as discoverPlatform } from "./platform-cmd-CRSKfu8k.mjs";
|
|
22
|
+
import { t as connectCloudflare } from "./cloudflare-connect-CCUozPOe.mjs";
|
|
23
|
+
import { n as findInstalledYarnPnpRuntime, r as hasLocalLockfile, t as buildDrizzleKitSpawnEnv } from "./yarn-pnp-BV4AzNul.mjs";
|
|
24
24
|
import { createRequire } from "node:module";
|
|
25
25
|
import { existsSync, mkdirSync, readFileSync, readdirSync, rmdirSync, unlinkSync, writeFileSync } from "node:fs";
|
|
26
26
|
import { fileURLToPath } from "node:url";
|
|
27
|
+
import { parseSync } from "vite";
|
|
27
28
|
import { spawnSync } from "node:child_process";
|
|
28
29
|
import { parse } from "jsonc-parser";
|
|
29
30
|
import { parseArgs } from "node:util";
|
|
@@ -654,6 +655,88 @@ export default function HomePage(props: Props) {
|
|
|
654
655
|
}
|
|
655
656
|
}
|
|
656
657
|
//#endregion
|
|
658
|
+
//#region src/cli/vite-config-patch.ts
|
|
659
|
+
function unwrap(node) {
|
|
660
|
+
while (node && [
|
|
661
|
+
"TSAsExpression",
|
|
662
|
+
"TSSatisfiesExpression",
|
|
663
|
+
"ParenthesizedExpression",
|
|
664
|
+
"TSTypeAssertion"
|
|
665
|
+
].includes(node.type)) node = node.expression;
|
|
666
|
+
return node;
|
|
667
|
+
}
|
|
668
|
+
function configObject(program) {
|
|
669
|
+
const declaration = program.body?.find((node) => node.type === "ExportDefaultDeclaration")?.declaration;
|
|
670
|
+
const exported = unwrap(declaration);
|
|
671
|
+
if (exported?.type === "ObjectExpression") return exported;
|
|
672
|
+
if (exported?.type === "CallExpression" && exported.callee?.name === "defineConfig") {
|
|
673
|
+
const firstArgument = unwrap(exported.arguments?.[0]);
|
|
674
|
+
if (firstArgument?.type === "ObjectExpression") return firstArgument;
|
|
675
|
+
}
|
|
676
|
+
}
|
|
677
|
+
function propertyName(property) {
|
|
678
|
+
if (property.type !== "Property" || property.computed || property.kind !== "init") return;
|
|
679
|
+
return property.key?.name ?? (typeof property.key?.value === "string" ? property.key.value : void 0);
|
|
680
|
+
}
|
|
681
|
+
function nodeValue(node) {
|
|
682
|
+
const value = node?.value;
|
|
683
|
+
return value !== null && typeof value === "object" && "type" in value ? value : void 0;
|
|
684
|
+
}
|
|
685
|
+
function lineIndent(code, index) {
|
|
686
|
+
const lineStart = code.lastIndexOf("\n", index) + 1;
|
|
687
|
+
return code.slice(lineStart, index).match(/^\s*/)?.[0] ?? "";
|
|
688
|
+
}
|
|
689
|
+
/** Add the plugin only when the exported Vite configuration has an editable object and array. */
|
|
690
|
+
function patchViteConfigWithVoidPlugin(filePath, code) {
|
|
691
|
+
if (filePath.endsWith(".cjs") || filePath.endsWith(".cts")) return;
|
|
692
|
+
let program;
|
|
693
|
+
try {
|
|
694
|
+
program = parseSync(filePath, code).program;
|
|
695
|
+
} catch {
|
|
696
|
+
return;
|
|
697
|
+
}
|
|
698
|
+
const object = configObject(program);
|
|
699
|
+
if (!object) return;
|
|
700
|
+
const pluginProperties = object.properties?.filter((property) => propertyName(property) === "plugins") ?? [];
|
|
701
|
+
if (pluginProperties.length > 1 || nodeValue(pluginProperties[0])?.type !== "ArrayExpression") {
|
|
702
|
+
if (pluginProperties.length > 0) return;
|
|
703
|
+
}
|
|
704
|
+
const imports = program.body?.filter((node) => node.type === "ImportDeclaration") ?? [];
|
|
705
|
+
const importedName = imports.filter((node) => node.source?.value === "void").flatMap((node) => node.specifiers ?? []).find((node) => node.type === "ImportSpecifier" && node.imported?.name === "voidPlugin")?.local?.name;
|
|
706
|
+
const pluginName = importedName ?? "voidPlugin";
|
|
707
|
+
const plugins = nodeValue(pluginProperties[0]);
|
|
708
|
+
if (plugins?.elements?.some((element) => element?.type === "CallExpression" && element.callee?.name === pluginName)) return code;
|
|
709
|
+
const ms = new MagicString(code);
|
|
710
|
+
if (plugins) {
|
|
711
|
+
const insertAt = plugins.start + 1;
|
|
712
|
+
if (code.slice(insertAt, plugins.end - 1).trim() === "") {
|
|
713
|
+
if (insertAt === plugins.end - 1) ms.appendLeft(insertAt, `${pluginName}()`);
|
|
714
|
+
else ms.overwrite(insertAt, plugins.end - 1, `${pluginName}()`);
|
|
715
|
+
} else {
|
|
716
|
+
const indent = lineIndent(code, pluginProperties[0].start);
|
|
717
|
+
const next = code[insertAt];
|
|
718
|
+
ms.appendLeft(insertAt, next === "\n" || next === "\r" ? `\n${indent} ${pluginName}(),` : `${pluginName}(), `);
|
|
719
|
+
}
|
|
720
|
+
} else {
|
|
721
|
+
if (object.properties?.some((property) => property.type === "SpreadElement")) return;
|
|
722
|
+
if (code.slice(object.start + 1, object.end - 1).trim() === "") {
|
|
723
|
+
const replacement = ` plugins: [${pluginName}()] `;
|
|
724
|
+
if (object.start + 1 === object.end - 1) ms.appendLeft(object.start + 1, replacement);
|
|
725
|
+
else ms.overwrite(object.start + 1, object.end - 1, replacement);
|
|
726
|
+
} else {
|
|
727
|
+
const indent = lineIndent(code, object.start);
|
|
728
|
+
const next = code[object.start + 1];
|
|
729
|
+
ms.appendLeft(object.start + 1, next === "\n" || next === "\r" ? `\n${indent} plugins: [${pluginName}()],` : ` plugins: [${pluginName}()],`);
|
|
730
|
+
}
|
|
731
|
+
}
|
|
732
|
+
if (!importedName) {
|
|
733
|
+
const insertAt = imports.length > 0 ? imports[imports.length - 1].end : code.startsWith("#!") ? code.indexOf("\n") + 1 : 0;
|
|
734
|
+
const prefix = insertAt > 0 && code[insertAt - 1] !== "\n" ? "\n" : "";
|
|
735
|
+
ms.appendLeft(insertAt, `${prefix}import { voidPlugin } from "void";\n`);
|
|
736
|
+
}
|
|
737
|
+
return ms.toString();
|
|
738
|
+
}
|
|
739
|
+
//#endregion
|
|
657
740
|
//#region src/cli/init.ts
|
|
658
741
|
function parseInitArgs(args) {
|
|
659
742
|
let parsed;
|
|
@@ -1818,7 +1901,7 @@ async function ensureVoidPlatformConnection(root) {
|
|
|
1818
1901
|
let selectedApiUrl = null;
|
|
1819
1902
|
let promptedForPlatform = false;
|
|
1820
1903
|
try {
|
|
1821
|
-
const { getApiUrl, getSiteDomain } = await import("./auth-
|
|
1904
|
+
const { getApiUrl, getSiteDomain } = await import("./auth-CZuiVsFh.mjs");
|
|
1822
1905
|
selectedApiUrl = getApiUrl(root);
|
|
1823
1906
|
getSiteDomain(root);
|
|
1824
1907
|
} catch (error) {
|
|
@@ -2291,273 +2374,6 @@ function ensureExistingProjectPackage(root, options = {}) {
|
|
|
2291
2374
|
packageJsonMutated: changed || pnpmConfigChanged
|
|
2292
2375
|
};
|
|
2293
2376
|
}
|
|
2294
|
-
function insertVoidImport(code) {
|
|
2295
|
-
if (/import\s*\{[^}]*\bvoidPlugin\b[^}]*\}\s*from\s*["']void["']/.test(code)) return code;
|
|
2296
|
-
const importLine = "import { voidPlugin } from \"void\";\n";
|
|
2297
|
-
const lines = code.split(/(?<=\n)/);
|
|
2298
|
-
let insertAt = 0;
|
|
2299
|
-
for (let i = 0; i < lines.length; i++) if (/^\s*import\b/.test(lines[i])) insertAt = i + 1;
|
|
2300
|
-
lines.splice(insertAt, 0, importLine);
|
|
2301
|
-
return lines.join("");
|
|
2302
|
-
}
|
|
2303
|
-
function isIdentifierStart(char) {
|
|
2304
|
-
return char !== void 0 && /[$A-Za-z_]/.test(char);
|
|
2305
|
-
}
|
|
2306
|
-
function isIdentifierPart(char) {
|
|
2307
|
-
return char !== void 0 && /[$0-9A-Za-z_]/.test(char);
|
|
2308
|
-
}
|
|
2309
|
-
function isKeywordAt(code, index, keyword) {
|
|
2310
|
-
return code.startsWith(keyword, index) && !isIdentifierPart(code[index - 1]) && !isIdentifierPart(code[index + keyword.length]);
|
|
2311
|
-
}
|
|
2312
|
-
function skipStringLiteral(code, index) {
|
|
2313
|
-
const quote = code[index];
|
|
2314
|
-
let i = index + 1;
|
|
2315
|
-
while (i < code.length) {
|
|
2316
|
-
const char = code[i];
|
|
2317
|
-
if (char === "\\") {
|
|
2318
|
-
i += 2;
|
|
2319
|
-
continue;
|
|
2320
|
-
}
|
|
2321
|
-
if (char === quote) return i + 1;
|
|
2322
|
-
i++;
|
|
2323
|
-
}
|
|
2324
|
-
return code.length;
|
|
2325
|
-
}
|
|
2326
|
-
function skipTemplateLiteral(code, index) {
|
|
2327
|
-
let i = index + 1;
|
|
2328
|
-
while (i < code.length) {
|
|
2329
|
-
const char = code[i];
|
|
2330
|
-
if (char === "\\") {
|
|
2331
|
-
i += 2;
|
|
2332
|
-
continue;
|
|
2333
|
-
}
|
|
2334
|
-
if (char === "`") return i + 1;
|
|
2335
|
-
i++;
|
|
2336
|
-
}
|
|
2337
|
-
return code.length;
|
|
2338
|
-
}
|
|
2339
|
-
function skipIgnored(code, index) {
|
|
2340
|
-
const char = code[index];
|
|
2341
|
-
if (char === "\"" || char === "'") return skipStringLiteral(code, index);
|
|
2342
|
-
if (char === "`") return skipTemplateLiteral(code, index);
|
|
2343
|
-
if (char === "/" && code[index + 1] === "/") {
|
|
2344
|
-
const newline = code.indexOf("\n", index + 2);
|
|
2345
|
-
return newline === -1 ? code.length : newline + 1;
|
|
2346
|
-
}
|
|
2347
|
-
if (char === "/" && code[index + 1] === "*") {
|
|
2348
|
-
const end = code.indexOf("*/", index + 2);
|
|
2349
|
-
return end === -1 ? code.length : end + 2;
|
|
2350
|
-
}
|
|
2351
|
-
return index;
|
|
2352
|
-
}
|
|
2353
|
-
function skipTrivia(code, index) {
|
|
2354
|
-
let i = index;
|
|
2355
|
-
while (i < code.length) {
|
|
2356
|
-
if (/\s/.test(code[i])) {
|
|
2357
|
-
i++;
|
|
2358
|
-
continue;
|
|
2359
|
-
}
|
|
2360
|
-
const next = skipIgnored(code, i);
|
|
2361
|
-
if (next === i) return i;
|
|
2362
|
-
i = next;
|
|
2363
|
-
}
|
|
2364
|
-
return i;
|
|
2365
|
-
}
|
|
2366
|
-
function skipIdentifier(code, index) {
|
|
2367
|
-
let i = index;
|
|
2368
|
-
while (isIdentifierPart(code[i])) i++;
|
|
2369
|
-
return i;
|
|
2370
|
-
}
|
|
2371
|
-
function skipBalanced(code, start, open, close) {
|
|
2372
|
-
let depth = 1;
|
|
2373
|
-
let i = start + 1;
|
|
2374
|
-
while (i < code.length) {
|
|
2375
|
-
const ignored = skipIgnored(code, i);
|
|
2376
|
-
if (ignored !== i) {
|
|
2377
|
-
i = ignored;
|
|
2378
|
-
continue;
|
|
2379
|
-
}
|
|
2380
|
-
const char = code[i];
|
|
2381
|
-
if (char === open) depth++;
|
|
2382
|
-
else if (char === close) {
|
|
2383
|
-
depth--;
|
|
2384
|
-
if (depth === 0) return i;
|
|
2385
|
-
}
|
|
2386
|
-
i++;
|
|
2387
|
-
}
|
|
2388
|
-
}
|
|
2389
|
-
function skipTypeArguments(code, index) {
|
|
2390
|
-
const start = skipTrivia(code, index);
|
|
2391
|
-
if (code[start] !== "<") return start;
|
|
2392
|
-
const end = skipBalanced(code, start, "<", ">");
|
|
2393
|
-
return end === void 0 ? start : skipTrivia(code, end + 1);
|
|
2394
|
-
}
|
|
2395
|
-
function findTopLevelConfigObject(code) {
|
|
2396
|
-
let braceDepth = 0;
|
|
2397
|
-
let bracketDepth = 0;
|
|
2398
|
-
let parenDepth = 0;
|
|
2399
|
-
let i = 0;
|
|
2400
|
-
while (i < code.length) {
|
|
2401
|
-
const ignored = skipIgnored(code, i);
|
|
2402
|
-
if (ignored !== i) {
|
|
2403
|
-
i = ignored;
|
|
2404
|
-
continue;
|
|
2405
|
-
}
|
|
2406
|
-
if (braceDepth === 0 && bracketDepth === 0 && parenDepth === 0 && isKeywordAt(code, i, "export")) {
|
|
2407
|
-
const defaultIndex = skipTrivia(code, i + 6);
|
|
2408
|
-
if (!isKeywordAt(code, defaultIndex, "default")) {
|
|
2409
|
-
i++;
|
|
2410
|
-
continue;
|
|
2411
|
-
}
|
|
2412
|
-
let expressionStart = skipTrivia(code, defaultIndex + 7);
|
|
2413
|
-
if (code[expressionStart] === "{") {
|
|
2414
|
-
const end = skipBalanced(code, expressionStart, "{", "}");
|
|
2415
|
-
return end === void 0 ? void 0 : {
|
|
2416
|
-
start: expressionStart,
|
|
2417
|
-
end
|
|
2418
|
-
};
|
|
2419
|
-
}
|
|
2420
|
-
if (!isKeywordAt(code, expressionStart, "defineConfig")) return;
|
|
2421
|
-
expressionStart = skipTypeArguments(code, expressionStart + 12);
|
|
2422
|
-
if (code[expressionStart] !== "(") return;
|
|
2423
|
-
const firstArgumentStart = skipTrivia(code, expressionStart + 1);
|
|
2424
|
-
if (code[firstArgumentStart] !== "{") return;
|
|
2425
|
-
const end = skipBalanced(code, firstArgumentStart, "{", "}");
|
|
2426
|
-
return end === void 0 ? void 0 : {
|
|
2427
|
-
start: firstArgumentStart,
|
|
2428
|
-
end
|
|
2429
|
-
};
|
|
2430
|
-
}
|
|
2431
|
-
const char = code[i];
|
|
2432
|
-
if (char === "{") braceDepth++;
|
|
2433
|
-
else if (char === "}") braceDepth = Math.max(0, braceDepth - 1);
|
|
2434
|
-
else if (char === "[") bracketDepth++;
|
|
2435
|
-
else if (char === "]") bracketDepth = Math.max(0, bracketDepth - 1);
|
|
2436
|
-
else if (char === "(") parenDepth++;
|
|
2437
|
-
else if (char === ")") parenDepth = Math.max(0, parenDepth - 1);
|
|
2438
|
-
i++;
|
|
2439
|
-
}
|
|
2440
|
-
}
|
|
2441
|
-
function readPropertyName(code, index) {
|
|
2442
|
-
const char = code[index];
|
|
2443
|
-
if (isIdentifierStart(char)) {
|
|
2444
|
-
const end = skipIdentifier(code, index);
|
|
2445
|
-
return {
|
|
2446
|
-
name: code.slice(index, end),
|
|
2447
|
-
end
|
|
2448
|
-
};
|
|
2449
|
-
}
|
|
2450
|
-
if (char === "\"" || char === "'") {
|
|
2451
|
-
const end = skipStringLiteral(code, index);
|
|
2452
|
-
return {
|
|
2453
|
-
name: code.slice(index + 1, end - 1),
|
|
2454
|
-
end
|
|
2455
|
-
};
|
|
2456
|
-
}
|
|
2457
|
-
}
|
|
2458
|
-
function skipPropertyValue(code, index, objectEnd) {
|
|
2459
|
-
let braceDepth = 0;
|
|
2460
|
-
let bracketDepth = 0;
|
|
2461
|
-
let parenDepth = 0;
|
|
2462
|
-
let i = index;
|
|
2463
|
-
while (i < objectEnd) {
|
|
2464
|
-
const ignored = skipIgnored(code, i);
|
|
2465
|
-
if (ignored !== i) {
|
|
2466
|
-
i = ignored;
|
|
2467
|
-
continue;
|
|
2468
|
-
}
|
|
2469
|
-
const char = code[i];
|
|
2470
|
-
if (braceDepth === 0 && bracketDepth === 0 && parenDepth === 0 && char === ",") return i + 1;
|
|
2471
|
-
if (char === "{") braceDepth++;
|
|
2472
|
-
else if (char === "}") {
|
|
2473
|
-
if (braceDepth === 0) return i;
|
|
2474
|
-
braceDepth--;
|
|
2475
|
-
} else if (char === "[") bracketDepth++;
|
|
2476
|
-
else if (char === "]") {
|
|
2477
|
-
if (bracketDepth === 0) return i;
|
|
2478
|
-
bracketDepth--;
|
|
2479
|
-
} else if (char === "(") parenDepth++;
|
|
2480
|
-
else if (char === ")") {
|
|
2481
|
-
if (parenDepth === 0) return i;
|
|
2482
|
-
parenDepth--;
|
|
2483
|
-
}
|
|
2484
|
-
i++;
|
|
2485
|
-
}
|
|
2486
|
-
return i;
|
|
2487
|
-
}
|
|
2488
|
-
function findTopLevelPluginsProperty(code, object) {
|
|
2489
|
-
let i = object.start + 1;
|
|
2490
|
-
while (i < object.end) {
|
|
2491
|
-
i = skipTrivia(code, i);
|
|
2492
|
-
if (code[i] === ",") {
|
|
2493
|
-
i++;
|
|
2494
|
-
continue;
|
|
2495
|
-
}
|
|
2496
|
-
const propertyStart = i;
|
|
2497
|
-
const propertyName = readPropertyName(code, i);
|
|
2498
|
-
if (!propertyName) {
|
|
2499
|
-
i = skipPropertyValue(code, i, object.end);
|
|
2500
|
-
continue;
|
|
2501
|
-
}
|
|
2502
|
-
const colon = skipTrivia(code, propertyName.end);
|
|
2503
|
-
if (code[colon] !== ":") {
|
|
2504
|
-
i = skipPropertyValue(code, propertyName.end, object.end);
|
|
2505
|
-
continue;
|
|
2506
|
-
}
|
|
2507
|
-
const valueStart = skipTrivia(code, colon + 1);
|
|
2508
|
-
if (propertyName.name === "plugins") {
|
|
2509
|
-
if (code[valueStart] !== "[") return "unsupported";
|
|
2510
|
-
const arrayEnd = skipBalanced(code, valueStart, "[", "]");
|
|
2511
|
-
return arrayEnd === void 0 ? "unsupported" : {
|
|
2512
|
-
arrayStart: valueStart,
|
|
2513
|
-
arrayEnd,
|
|
2514
|
-
propertyStart
|
|
2515
|
-
};
|
|
2516
|
-
}
|
|
2517
|
-
i = skipPropertyValue(code, valueStart, object.end);
|
|
2518
|
-
}
|
|
2519
|
-
}
|
|
2520
|
-
function getLineIndent(code, index) {
|
|
2521
|
-
const lineStart = code.lastIndexOf("\n", index) + 1;
|
|
2522
|
-
return code.slice(lineStart, index).match(/^\s*/)?.[0] ?? "";
|
|
2523
|
-
}
|
|
2524
|
-
function insertVoidPluginIntoTopLevelConfig(code) {
|
|
2525
|
-
const object = findTopLevelConfigObject(code);
|
|
2526
|
-
if (!object) return;
|
|
2527
|
-
const pluginsProperty = findTopLevelPluginsProperty(code, object);
|
|
2528
|
-
const ms = new MagicString(code);
|
|
2529
|
-
if (pluginsProperty === "unsupported") return;
|
|
2530
|
-
if (pluginsProperty) {
|
|
2531
|
-
const arrayContent = code.slice(pluginsProperty.arrayStart + 1, pluginsProperty.arrayEnd);
|
|
2532
|
-
if (/^\s*$/.test(arrayContent)) {
|
|
2533
|
-
ms.overwrite(pluginsProperty.arrayStart + 1, pluginsProperty.arrayEnd, "voidPlugin()");
|
|
2534
|
-
return ms.toString();
|
|
2535
|
-
}
|
|
2536
|
-
const propIndent = getLineIndent(code, pluginsProperty.propertyStart);
|
|
2537
|
-
const insertAt = pluginsProperty.arrayStart + 1;
|
|
2538
|
-
const next = code[insertAt];
|
|
2539
|
-
const insertion = next === "\n" || next === "\r" ? `\n${propIndent} voidPlugin(),` : "voidPlugin(), ";
|
|
2540
|
-
ms.appendLeft(insertAt, insertion);
|
|
2541
|
-
return ms.toString();
|
|
2542
|
-
}
|
|
2543
|
-
const objectContent = code.slice(object.start + 1, object.end);
|
|
2544
|
-
if (/^\s*$/.test(objectContent)) {
|
|
2545
|
-
ms.overwrite(object.start + 1, object.end, " plugins: [voidPlugin()] ");
|
|
2546
|
-
return ms.toString();
|
|
2547
|
-
}
|
|
2548
|
-
const baseIndent = getLineIndent(code, object.start);
|
|
2549
|
-
const next = code[object.start + 1];
|
|
2550
|
-
const insertion = next === "\n" || next === "\r" ? `\n${baseIndent} plugins: [voidPlugin()],` : " plugins: [voidPlugin()],";
|
|
2551
|
-
ms.appendLeft(object.start + 1, insertion);
|
|
2552
|
-
return ms.toString();
|
|
2553
|
-
}
|
|
2554
|
-
function patchViteConfigWithVoidPlugin(filePath, code) {
|
|
2555
|
-
if (/\bvoidPlugin\s*\(/.test(code)) return code;
|
|
2556
|
-
if (filePath.endsWith(".cjs") || filePath.endsWith(".cts")) return;
|
|
2557
|
-
const withPlugin = insertVoidPluginIntoTopLevelConfig(code);
|
|
2558
|
-
if (!withPlugin) return;
|
|
2559
|
-
return insertVoidImport(withPlugin);
|
|
2560
|
-
}
|
|
2561
2377
|
function getBasicVoidViteConfig() {
|
|
2562
2378
|
return `import { defineConfig } from "vite";
|
|
2563
2379
|
import { voidPlugin } from "void";
|
|
@@ -2830,7 +2646,7 @@ async function runInitCommand(root, initArgs) {
|
|
|
2830
2646
|
injectAgentBlock(root);
|
|
2831
2647
|
const agents = detectAgents(root);
|
|
2832
2648
|
if (agents.length > 0) {
|
|
2833
|
-
const { linkSkillsForSpecificAgents } = await import("./skills-
|
|
2649
|
+
const { linkSkillsForSpecificAgents } = await import("./skills-O6FUaizK.mjs");
|
|
2834
2650
|
linkSkillsForSpecificAgents(root, agents);
|
|
2835
2651
|
} else log.info("No coding agent detected; read the bundled docs linked in AGENTS.md");
|
|
2836
2652
|
}
|
|
@@ -2864,7 +2680,7 @@ async function runInitCommand(root, initArgs) {
|
|
|
2864
2680
|
let shouldSetupGithub = targeted ? initArgs?.github === true : deploymentPlatform !== "none";
|
|
2865
2681
|
if (shouldSetupGithub && !githubStepSkipForSubpackage && deploymentPlatform !== "cloudflare" && deploymentPlatform !== "none") {
|
|
2866
2682
|
if (!voidPlatformDiscovery) {
|
|
2867
|
-
const { getApiUrl } = await import("./auth-
|
|
2683
|
+
const { getApiUrl } = await import("./auth-CZuiVsFh.mjs");
|
|
2868
2684
|
voidPlatformDiscovery = await discoverPlatform(getApiUrl(root));
|
|
2869
2685
|
}
|
|
2870
2686
|
if (!voidPlatformDiscovery.capabilities.githubActions) {
|
|
@@ -1,10 +1,10 @@
|
|
|
1
1
|
import { c as import_picocolors, r as cliTitle } from "./output-CCH48AMM.mjs";
|
|
2
|
-
import { c as getToken, s as getSiteDomain } from "./auth-
|
|
3
|
-
import { d as writeProjectConfig, o as readProjectConfig, t as attachSelectedPlatform } from "./project-
|
|
2
|
+
import { c as getToken, s as getSiteDomain } from "./auth-DLNN0D3Z.mjs";
|
|
3
|
+
import { d as writeProjectConfig, o as readProjectConfig, t as attachSelectedPlatform } from "./project-C0Fqu05O.mjs";
|
|
4
4
|
import { O as intro, P as outro, T as cancel, j as log } from "./dist-Dn6nn2IU.mjs";
|
|
5
|
-
import { n as PlatformClient } from "./client-
|
|
6
|
-
import { i as promptProjectSelection, r as promptAndCreateProject } from "./create-project-
|
|
7
|
-
import { r as resolveProjectBySlug } from "./resolve-project-
|
|
5
|
+
import { n as PlatformClient } from "./client-QTl6ko_D.mjs";
|
|
6
|
+
import { i as promptProjectSelection, r as promptAndCreateProject } from "./create-project-DBfFSZKY.mjs";
|
|
7
|
+
import { r as resolveProjectBySlug } from "./resolve-project-BG5ORGID.mjs";
|
|
8
8
|
//#region src/cli/link.ts
|
|
9
9
|
function projectLabel(slug, root, url) {
|
|
10
10
|
if (url) return url;
|
|
@@ -1,9 +1,9 @@
|
|
|
1
1
|
import { a as dim, c as import_picocolors, o as ensureUtc, r as cliTitle, u as tablePrefix } from "./output-CCH48AMM.mjs";
|
|
2
|
-
import { c as getToken } from "./auth-
|
|
3
|
-
import { i as readDeploymentPlatform, o as readProjectConfig } from "./project-
|
|
2
|
+
import { c as getToken } from "./auth-DLNN0D3Z.mjs";
|
|
3
|
+
import { i as readDeploymentPlatform, 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/list.ts
|
|
8
8
|
async function runListCommand(root, slug) {
|
|
9
9
|
console.log();
|
|
@@ -43,7 +43,7 @@ async function runListCommand(root, slug) {
|
|
|
43
43
|
}
|
|
44
44
|
async function showCloudflareDeployments(root, slug) {
|
|
45
45
|
if (slug) throw new Error("project: A project name selects a Void platform project and is not used for direct Cloudflare apps.");
|
|
46
|
-
const { readCloudflareWorkerStatus, resolveCloudflareOperationContext } = await import("./cloudflare-operations-
|
|
46
|
+
const { readCloudflareWorkerStatus, resolveCloudflareOperationContext } = await import("./cloudflare-operations-BipGMJ5O.mjs");
|
|
47
47
|
const status = await readCloudflareWorkerStatus(resolveCloudflareOperationContext(root));
|
|
48
48
|
if (status.versions.length === 0) {
|
|
49
49
|
outro(`No deployments for ${status.workerName}.`);
|
|
@@ -1,6 +1,6 @@
|
|
|
1
|
-
import { a as join, i as isAbsolute, u as resolve } from "./dist-
|
|
2
|
-
import { v as readRootWranglerConfig } from "./wrangler-
|
|
3
|
-
import { r as getMiniflareDatabasePath } from "./runner-
|
|
1
|
+
import { a as join, i as isAbsolute, u as resolve } from "./dist-BVqXeR_h.mjs";
|
|
2
|
+
import { v as readRootWranglerConfig } from "./wrangler-BymcxrRa.mjs";
|
|
3
|
+
import { r as getMiniflareDatabasePath } from "./runner-p-dMs2UN.mjs";
|
|
4
4
|
import { existsSync, mkdirSync, readFileSync, rmSync, writeFileSync } from "node:fs";
|
|
5
5
|
import { createHash } from "node:crypto";
|
|
6
6
|
//#region src/local-d1.ts
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
import { c as import_picocolors, i as createSpinner, r as cliTitle } from "./output-CCH48AMM.mjs";
|
|
2
|
-
import { _ as saveToken, a as getApiUrl, c as getToken, g as savePlatformToken, h as runPlatformLogin, l as getTokenSource, m as runLogin, p as removeToken, u as isStagingMode } from "./auth-
|
|
2
|
+
import { _ as saveToken, a as getApiUrl, c as getToken, g as savePlatformToken, h as runPlatformLogin, l as getTokenSource, m as runLogin, p as removeToken, u as isStagingMode } from "./auth-DLNN0D3Z.mjs";
|
|
3
3
|
import { I as select, O as intro, P as outro, T as cancel, W as isCancel, j as log } from "./dist-Dn6nn2IU.mjs";
|
|
4
|
-
import { i as isExpiredTokenError, n as PlatformClient } from "./client-
|
|
4
|
+
import { i as isExpiredTokenError, n as PlatformClient } from "./client-QTl6ko_D.mjs";
|
|
5
5
|
//#region src/cli/login.ts
|
|
6
6
|
async function selectPlatformLoginMethod(platform, requestedId) {
|
|
7
7
|
const providers = platform?.authenticationProviders ?? ["github", "google"];
|
|
@@ -29,7 +29,7 @@ async function selectPlatformLoginMethod(platform, requestedId) {
|
|
|
29
29
|
return methods.find((method) => method.id === provider);
|
|
30
30
|
}
|
|
31
31
|
async function promptForLoginToken(root = process.cwd(), platform) {
|
|
32
|
-
const { id: provider, label: providerName } = await selectPlatformLoginMethod(platform ?? await import("./platform-cmd-
|
|
32
|
+
const { id: provider, label: providerName } = await selectPlatformLoginMethod(platform ?? await import("./platform-cmd-C8OqhqPt.mjs").then(({ discoverPlatform }) => discoverPlatform(getApiUrl(root))));
|
|
33
33
|
const s = createSpinner();
|
|
34
34
|
s.start(`Opening browser for ${providerName} login...`);
|
|
35
35
|
try {
|
|
@@ -1,15 +1,15 @@
|
|
|
1
1
|
import { a as dim, c as import_picocolors, r as cliTitle } from "./output-CCH48AMM.mjs";
|
|
2
|
-
import { c as getToken } from "./auth-
|
|
3
|
-
import { i as readDeploymentPlatform, o as readProjectConfig } from "./project-
|
|
2
|
+
import { c as getToken } from "./auth-DLNN0D3Z.mjs";
|
|
3
|
+
import { i as readDeploymentPlatform, 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-
|
|
5
|
+
import { n as PlatformClient } from "./client-QTl6ko_D.mjs";
|
|
6
6
|
//#region src/cli/logs.ts
|
|
7
7
|
async function runLogsCommand(root, filter, range, deployment, level) {
|
|
8
8
|
console.log();
|
|
9
9
|
intro(cliTitle("project logs"));
|
|
10
10
|
const platform = readDeploymentPlatform(root);
|
|
11
11
|
if (platform === "cloudflare") {
|
|
12
|
-
const { resolveCloudflareOperationContext, tailCloudflareWorker } = await import("./cloudflare-operations-
|
|
12
|
+
const { resolveCloudflareOperationContext, tailCloudflareWorker } = await import("./cloudflare-operations-BipGMJ5O.mjs");
|
|
13
13
|
if (range !== "1h") log.warn("Cloudflare tail streams live logs; --range does not select historical entries.");
|
|
14
14
|
if (level && level !== "all" && level !== "error") log.warn("Cloudflare tail cannot filter individual console levels; showing all invocation logs.");
|
|
15
15
|
await tailCloudflareWorker(resolveCloudflareOperationContext(root), {
|