void 0.21.1 → 0.21.3
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/README.md +3 -2
- package/dist/{auth-cmd-g_ymMkUe.mjs → account-cmd-DGt9cpRe.mjs} +10 -10
- 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-DFvxIyZi.mjs → auth-link-Cl9vOuf7.mjs} +5 -5
- package/dist/auth-router-D4ZcMUSf.mjs +74 -0
- 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-wJAv808h.mjs → build-cmd-Dpt0jd-x.mjs} +5 -5
- package/dist/{cache-Be0Fu5Ka.mjs → cache-7_UeZdTk.mjs} +5 -5
- package/dist/{cancel-deploy-BgmyOwhe.mjs → cancel-deploy-D23R1RXT.mjs} +4 -4
- 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 +122 -66
- 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-LnvW4HKx.mjs → connect-4Ph5Y0QE.mjs} +8 -8
- 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-Mzv88E1C.mjs → db-DzJRn-qz.mjs} +128 -60
- package/dist/{delete-Ri6JemSU.mjs → delete-D6dZ9B6B.mjs} +5 -5
- package/dist/deploy-BH0grP4y.mjs +2 -0
- package/dist/{deploy-DEsMVrCY.mjs → deploy-CsMJrPfM.mjs} +522 -262
- 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-BA37Ye7T.mjs → domain-Dmhvb2oU.mjs} +5 -5
- package/dist/{email-C5kaZXzJ.mjs → email--tEtMoj_.mjs} +1 -1
- package/dist/{email-C5NsxrQG.mjs → email-BRKOG2RG.mjs} +10 -10
- package/dist/{entry-DdRFGK0y.mjs → entry-CF5wvH4w.mjs} +4 -21
- package/dist/{env-U_ohASB0.mjs → env-Csi-tMbT.mjs} +8 -8
- 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-DsrkweIl.mjs → github-cmd-BED3_9JD.mjs} +7 -7
- package/dist/{headers-B_HBMgi0.mjs → headers-BOg_velo.mjs} +2 -2
- package/dist/{help-sBhFH6pi.mjs → help-DC7gdz7L.mjs} +46 -11
- package/dist/help-DQMfeKMz.mjs +2 -0
- package/dist/index.mjs +134 -160
- package/dist/{init-C--Yyj1b.mjs → init-CRGDXzVC.mjs} +105 -289
- package/dist/{link-BC-mNG9-.mjs → link-CsHOinF7.mjs} +6 -6
- package/dist/{list-DHU1Wj6c.mjs → list-CDb-4bZ1.mjs} +6 -6
- package/dist/{local-d1-DzykTWY8.mjs → local-d1-CC8sKFGu.mjs} +3 -3
- package/dist/{login-jKe_0QZL.mjs → login-BQyISZuW.mjs} +4 -4
- package/dist/login-r2gL8l7B.mjs +2 -0
- package/dist/{logs-BG11f5PR.mjs → logs-BdfiOezj.mjs} +5 -5
- 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-BwAS2XZt.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-C-hv-_Ok.mjs → platform-auth-config-TSw8edHw.mjs} +5 -5
- package/dist/{platform-auth-protection-DjTE5Hj-.mjs → platform-auth-protection-Ba1XqGhn.mjs} +6 -6
- package/dist/{platform-auth-recovery-Cr0r8TEb.mjs → platform-auth-recovery-BkT3EsF2.mjs} +5 -5
- package/dist/{platform-cmd-DE6dw45v.mjs → platform-cmd-C8OqhqPt.mjs} +1 -1
- package/dist/{platform-cmd-0tEh2ZtA.mjs → platform-cmd-CRSKfu8k.mjs} +5 -5
- package/dist/{platform-domain-B_7x6Iqx.mjs → platform-domain-j9YCXRm6.mjs} +3 -3
- package/dist/{platform-lifecycle-Di0LbhPM.mjs → platform-lifecycle-78H0XQUA.mjs} +278 -230
- package/dist/{platform-lifecycle-Dhx9Pnub.mjs → platform-lifecycle-DDc9zCeJ.mjs} +1 -1
- package/dist/{platform-management-eaiaU3uM.mjs → platform-management-6w8-DUjC.mjs} +2 -2
- package/dist/{platform-management-B9LUtMt9.mjs → platform-management-DzKNsMlt.mjs} +1 -1
- package/dist/{platform-recovery-BxfA8E5C.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-DrnRJdep.mjs → project-cmd-B44I8J_W.mjs} +16 -16
- package/dist/{project-paths-CKQ-Q5JS.mjs → project-paths-GgcMozYz.mjs} +1 -1
- package/dist/{project-team-CzRbO_kA.mjs → project-team-BkbYIsXN.mjs} +6 -6
- 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-DwrqUQZ8.mjs → requests-DFyhBMaf.mjs} +4 -4
- package/dist/{resolve-project-Xvis70DG.mjs → resolve-project-BG5ORGID.mjs} +1 -1
- package/dist/resolve-project-DtbidV4y.mjs +2 -0
- package/dist/{rollback-B4tFWmkN.mjs → rollback-DHHxXZiS.mjs} +5 -5
- 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-UtrRjhEO.mjs → secret-DN9sSNiV.mjs} +7 -7
- 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/migrate-vite-cloudflare-to-void/SKILL.md +1 -1
- package/skills/void/SKILL.md +4 -2
- 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/administration/access.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/project-collaboration.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 +2 -0
- package/skills/void/docs/reference/api.md +1 -1
- package/skills/void/docs/reference/cli.md +34 -13
- package/skills/void/docs/reference/config.md +12 -1
- 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-DAH2-m_-.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-B403BLBB.mjs +0 -2
- package/dist/login-BwiopVdg.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
package/README.md
CHANGED
|
@@ -11,7 +11,7 @@ for every command.
|
|
|
11
11
|
|
|
12
12
|
Use `void platform config auth` to manage login methods and company signup.
|
|
13
13
|
Cloudflare Access protection has separate create/connect controls. Users can
|
|
14
|
-
link another enabled login to their account with `void
|
|
14
|
+
link another enabled login to their account with `void account link`.
|
|
15
15
|
|
|
16
16
|
## What It Covers
|
|
17
17
|
|
|
@@ -57,7 +57,8 @@ export default defineConfig({
|
|
|
57
57
|
|
|
58
58
|
- `voidPlugin()` — Vite integration, routing, pages mode, codegen, migrations, packaging
|
|
59
59
|
- `void prepare` — generate `.void` artifacts for CI, editors, and fresh clones
|
|
60
|
-
- `void auth login` —
|
|
60
|
+
- `void auth login` — sign in to the project's saved Cloudflare or Void destination
|
|
61
|
+
- `void account login` — platform auth
|
|
61
62
|
- `void connect [url]` — choose Cloudflare or a Void platform, sign in, and save the deployment destination
|
|
62
63
|
- `void platform *` — list, select, inspect, install, recover, repair, upgrade, disable, and safely uninstall a company platform
|
|
63
64
|
- `void deploy` — build and deploy to the saved Cloudflare or Void target
|
|
@@ -1,13 +1,13 @@
|
|
|
1
|
-
import { c as getToken, p as removeToken } from "./auth-
|
|
1
|
+
import { c as getToken, p as removeToken } from "./auth-DLNN0D3Z.mjs";
|
|
2
2
|
import { j as log } from "./dist-Dn6nn2IU.mjs";
|
|
3
|
-
import { n as PlatformClient } from "./client-
|
|
4
|
-
import { n as runLoginCommand } from "./login-
|
|
3
|
+
import { n as PlatformClient } from "./client-QTl6ko_D.mjs";
|
|
4
|
+
import { n as runLoginCommand } from "./login-BQyISZuW.mjs";
|
|
5
5
|
import { execSync } from "node:child_process";
|
|
6
|
-
//#region src/cli/
|
|
7
|
-
async function
|
|
6
|
+
//#region src/cli/account-cmd.ts
|
|
7
|
+
async function runAccountCommand(root, args) {
|
|
8
8
|
switch (args.subcommand) {
|
|
9
9
|
case "login": return runLoginCommand(root);
|
|
10
|
-
case "link": return import("./auth-link-
|
|
10
|
+
case "link": return import("./auth-link-Cl9vOuf7.mjs").then(({ runAuthLink }) => runAuthLink(root, args.connectionId));
|
|
11
11
|
case "logout":
|
|
12
12
|
if (removeToken(root)) log.success("Logged out.");
|
|
13
13
|
else log.info("Not logged in.");
|
|
@@ -15,7 +15,7 @@ async function runAuthCommand(root, args) {
|
|
|
15
15
|
case "whoami": {
|
|
16
16
|
const token = getToken(root);
|
|
17
17
|
if (!token) {
|
|
18
|
-
log.error("Not logged in. Run `void
|
|
18
|
+
log.error("Not logged in. Run `void account login` first.");
|
|
19
19
|
process.exit(1);
|
|
20
20
|
}
|
|
21
21
|
const user = await new PlatformClient(token, { root }).whoami();
|
|
@@ -26,7 +26,7 @@ async function runAuthCommand(root, args) {
|
|
|
26
26
|
if (!getToken(root)) await runLoginCommand(root);
|
|
27
27
|
const token = getToken(root);
|
|
28
28
|
if (!token) {
|
|
29
|
-
log.error("Login failed. Run `void
|
|
29
|
+
log.error("Login failed. Run `void account login` to try again.");
|
|
30
30
|
process.exit(1);
|
|
31
31
|
}
|
|
32
32
|
const platform = process.platform;
|
|
@@ -35,11 +35,11 @@ async function runAuthCommand(root, args) {
|
|
|
35
35
|
execSync(cmd, { input: token });
|
|
36
36
|
log.success("Token copied to clipboard.");
|
|
37
37
|
} catch {
|
|
38
|
-
log.warn("Could not copy to clipboard.
|
|
38
|
+
log.warn("Could not copy to clipboard. Run `void account token` again.");
|
|
39
39
|
}
|
|
40
40
|
return;
|
|
41
41
|
}
|
|
42
42
|
}
|
|
43
43
|
}
|
|
44
44
|
//#endregion
|
|
45
|
-
export {
|
|
45
|
+
export { runAccountCommand };
|
|
@@ -0,0 +1,18 @@
|
|
|
1
|
+
//#region src/shared/ast.ts
|
|
2
|
+
function isIdentifier(node) {
|
|
3
|
+
return node?.type === "Identifier" && typeof node.name === "string";
|
|
4
|
+
}
|
|
5
|
+
function isLiteral(node) {
|
|
6
|
+
return node?.type === "Literal";
|
|
7
|
+
}
|
|
8
|
+
function isMemberExpression(node) {
|
|
9
|
+
return node?.type === "MemberExpression";
|
|
10
|
+
}
|
|
11
|
+
function isCallExpression(node) {
|
|
12
|
+
return node?.type === "CallExpression";
|
|
13
|
+
}
|
|
14
|
+
function isObjectExpression(node) {
|
|
15
|
+
return node?.type === "ObjectExpression";
|
|
16
|
+
}
|
|
17
|
+
//#endregion
|
|
18
|
+
export { isObjectExpression as a, isMemberExpression as i, isIdentifier as n, isLiteral as r, isCallExpression as t };
|
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
import { a as getApiUrl, h as runPlatformLogin, s as getSiteDomain } from "./auth-
|
|
1
|
+
import { a as getApiUrl, h as runPlatformLogin, s as getSiteDomain } from "./auth-DLNN0D3Z.mjs";
|
|
2
2
|
export { getApiUrl, getSiteDomain, runPlatformLogin };
|
|
@@ -1,8 +1,8 @@
|
|
|
1
|
-
import { a as join } from "./dist-
|
|
1
|
+
import { a as join } from "./dist-BVqXeR_h.mjs";
|
|
2
2
|
import { t as cfAccessHeaders } from "./cf-access-DRsQRe6k.mjs";
|
|
3
|
-
import { S as writeKeyringPassword, b as deleteKeyringPassword, c as platformCredentialAccount, o as listPlatformConnections, r as getActivePlatformConnection, s as normalizePlatformApiUrl, x as readKeyringPassword } from "./platform-registry-
|
|
4
|
-
import { t as ensureCloudflaredToken } from "./cf-access-
|
|
5
|
-
import { a as readProjectApplicationDomain, f as VOID_CLOUD_PLATFORM, m as readLegacyHostedPlatformSelection, n as isLegacyVoidCloudProject, p as VOID_CLOUD_STAGING_PLATFORM, r as isVoidInternalStaging, s as readProjectPlatformUrl } from "./project-
|
|
3
|
+
import { S as writeKeyringPassword, b as deleteKeyringPassword, c as platformCredentialAccount, o as listPlatformConnections, r as getActivePlatformConnection, s as normalizePlatformApiUrl, x as readKeyringPassword } from "./platform-registry-QBa4DK32.mjs";
|
|
4
|
+
import { t as ensureCloudflaredToken } from "./cf-access-P0iZnu0q.mjs";
|
|
5
|
+
import { a as readProjectApplicationDomain, f as VOID_CLOUD_PLATFORM, m as readLegacyHostedPlatformSelection, n as isLegacyVoidCloudProject, p as VOID_CLOUD_STAGING_PLATFORM, r as isVoidInternalStaging, s as readProjectPlatformUrl } from "./project-C0Fqu05O.mjs";
|
|
6
6
|
import { mkdirSync, readFileSync, writeFileSync } from "node:fs";
|
|
7
7
|
import { createHash, randomBytes } from "node:crypto";
|
|
8
8
|
import { homedir } from "node:os";
|
|
@@ -1,13 +1,13 @@
|
|
|
1
|
-
import { a as getApiUrl, c as getToken, d as openBrowser, g as savePlatformToken, h as runPlatformLogin } from "./auth-
|
|
1
|
+
import { a as getApiUrl, c as getToken, d as openBrowser, g as savePlatformToken, h as runPlatformLogin } from "./auth-DLNN0D3Z.mjs";
|
|
2
2
|
import { j as log } from "./dist-Dn6nn2IU.mjs";
|
|
3
|
-
import { n as PlatformClient } from "./client-
|
|
4
|
-
import { r as selectPlatformLoginMethod } from "./login-
|
|
5
|
-
import { t as discoverPlatform } from "./platform-cmd-
|
|
3
|
+
import { n as PlatformClient } from "./client-QTl6ko_D.mjs";
|
|
4
|
+
import { r as selectPlatformLoginMethod } from "./login-BQyISZuW.mjs";
|
|
5
|
+
import { t as discoverPlatform } from "./platform-cmd-CRSKfu8k.mjs";
|
|
6
6
|
import { execFile } from "node:child_process";
|
|
7
7
|
//#region src/cli/auth-link.ts
|
|
8
8
|
async function runAuthLink(root, connectionId) {
|
|
9
9
|
const token = getToken(root);
|
|
10
|
-
if (!token) throw new Error("auth: Sign in to your existing account with `void
|
|
10
|
+
if (!token) throw new Error("auth: Sign in to your existing account with `void account login` first.");
|
|
11
11
|
const apiUrl = getApiUrl(root);
|
|
12
12
|
const platform = await discoverPlatform(apiUrl);
|
|
13
13
|
if (!platform.authentication) throw new Error("auth: This platform must be upgraded before linking login methods.");
|
|
@@ -0,0 +1,74 @@
|
|
|
1
|
+
import { o as listPlatformConnections } from "./platform-registry-QBa4DK32.mjs";
|
|
2
|
+
import { i as readDeploymentPlatform } from "./project-C0Fqu05O.mjs";
|
|
3
|
+
import { I as select, W as isCancel } from "./dist-Dn6nn2IU.mjs";
|
|
4
|
+
//#region src/cli/auth-router.ts
|
|
5
|
+
async function chooseDestination(root, args, interactive) {
|
|
6
|
+
const saved = readDeploymentPlatform(root);
|
|
7
|
+
const platform = args.platform ?? (saved === "none" ? null : saved);
|
|
8
|
+
if (platform) return { platform };
|
|
9
|
+
if (!interactive) throw new Error("auth: No deployment destination is saved. Use `void auth login --platform cloudflare|void`, `void account login`, or `void cloudflare login`.");
|
|
10
|
+
const connections = listPlatformConnections();
|
|
11
|
+
const options = [
|
|
12
|
+
{
|
|
13
|
+
value: "cloudflare",
|
|
14
|
+
label: "Cloudflare",
|
|
15
|
+
hint: "Your own Cloudflare account"
|
|
16
|
+
},
|
|
17
|
+
...connections.map((connection) => ({
|
|
18
|
+
value: connection.apiUrl,
|
|
19
|
+
label: connection.displayName,
|
|
20
|
+
hint: connection.apiUrl
|
|
21
|
+
})),
|
|
22
|
+
...connections.length === 0 ? [{
|
|
23
|
+
value: "void",
|
|
24
|
+
label: "Void platform",
|
|
25
|
+
hint: "Use the current Void account origin"
|
|
26
|
+
}] : []
|
|
27
|
+
];
|
|
28
|
+
const selected = await select({
|
|
29
|
+
message: "Where do you want to authenticate?",
|
|
30
|
+
options
|
|
31
|
+
});
|
|
32
|
+
if (isCancel(selected) || typeof selected !== "string") throw new Error("auth: Cancelled.");
|
|
33
|
+
return selected === "cloudflare" ? { platform: "cloudflare" } : {
|
|
34
|
+
platform: "void",
|
|
35
|
+
...selected === "void" ? {} : { apiUrl: selected }
|
|
36
|
+
};
|
|
37
|
+
}
|
|
38
|
+
async function runAuthRouter(root, args, interactive = Boolean(process.stdin.isTTY)) {
|
|
39
|
+
if (args.subcommand === "link") {
|
|
40
|
+
const { runAccountCommand } = await import("./account-cmd-DGt9cpRe.mjs");
|
|
41
|
+
await runAccountCommand(root, {
|
|
42
|
+
subcommand: "link",
|
|
43
|
+
...args.connectionId ? { connectionId: args.connectionId } : {}
|
|
44
|
+
});
|
|
45
|
+
return;
|
|
46
|
+
}
|
|
47
|
+
if (args.subcommand === "token") {
|
|
48
|
+
const { runAccountCommand } = await import("./account-cmd-DGt9cpRe.mjs");
|
|
49
|
+
await runAccountCommand(root, { subcommand: "token" });
|
|
50
|
+
return;
|
|
51
|
+
}
|
|
52
|
+
const destination = await chooseDestination(root, args, interactive);
|
|
53
|
+
if (destination.platform === "cloudflare") {
|
|
54
|
+
const { runCloudflareCommand } = await import("./cloudflare-cmd-BjNxR1XF.mjs");
|
|
55
|
+
await runCloudflareCommand(root, { subcommand: args.subcommand === "whoami" || args.subcommand === "status" ? "status" : args.subcommand });
|
|
56
|
+
return;
|
|
57
|
+
}
|
|
58
|
+
const { runAccountCommand } = await import("./account-cmd-DGt9cpRe.mjs");
|
|
59
|
+
const subcommand = args.subcommand === "status" ? "whoami" : args.subcommand;
|
|
60
|
+
if (!destination.apiUrl) {
|
|
61
|
+
await runAccountCommand(root, { subcommand });
|
|
62
|
+
return;
|
|
63
|
+
}
|
|
64
|
+
const previous = process.env.VOID_API_URL;
|
|
65
|
+
process.env.VOID_API_URL = destination.apiUrl;
|
|
66
|
+
try {
|
|
67
|
+
await runAccountCommand(root, { subcommand });
|
|
68
|
+
} finally {
|
|
69
|
+
if (previous === void 0) delete process.env.VOID_API_URL;
|
|
70
|
+
else process.env.VOID_API_URL = previous;
|
|
71
|
+
}
|
|
72
|
+
}
|
|
73
|
+
//#endregion
|
|
74
|
+
export { runAuthRouter };
|
|
@@ -3,13 +3,10 @@ import { t as authContext } from "./auth-3sGB0zJ1.mjs";
|
|
|
3
3
|
import { randomBytes, scrypt, timingSafeEqual } from "node:crypto";
|
|
4
4
|
import { betterAuth } from "better-auth";
|
|
5
5
|
//#region src/runtime/better-auth-shared.ts
|
|
6
|
-
function
|
|
7
|
-
return hostname === "localhost" || hostname === "127.0.0.1" || hostname.endsWith(".local");
|
|
8
|
-
}
|
|
9
|
-
function resolveSecret(request, env) {
|
|
6
|
+
function resolveSecret(env, dev) {
|
|
10
7
|
const explicit = typeof env.BETTER_AUTH_SECRET === "string" && env.BETTER_AUTH_SECRET.length > 0 ? env.BETTER_AUTH_SECRET : void 0;
|
|
11
8
|
if (explicit) return explicit;
|
|
12
|
-
if (
|
|
9
|
+
if (dev) return "void-dev-better-auth-secret-1234567890";
|
|
13
10
|
throw new Error("auth: Missing Better Auth secret. Set BETTER_AUTH_SECRET.");
|
|
14
11
|
}
|
|
15
12
|
function readEnvString(env, ...keys) {
|
|
@@ -125,7 +122,7 @@ function createVoidAuthRuntime(dialect, resolveDatabase, runVoidAuthMigrations)
|
|
|
125
122
|
const defaults = {
|
|
126
123
|
baseURL: origin,
|
|
127
124
|
basePath: "/api/auth",
|
|
128
|
-
secret: resolveSecret(
|
|
125
|
+
secret: resolveSecret(env, runtime.dev === true),
|
|
129
126
|
database,
|
|
130
127
|
...emailAndPassword ? { emailAndPassword } : {},
|
|
131
128
|
...socialProviders ? { socialProviders } : {},
|
|
@@ -1,9 +1,9 @@
|
|
|
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 { 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, t as PlatformApiError } from "./client-
|
|
6
|
-
import { r as resolveProjectBySlug, t as getRequestedProjectSlug } from "./resolve-project-
|
|
5
|
+
import { n as PlatformClient, t as PlatformApiError } from "./client-QTl6ko_D.mjs";
|
|
6
|
+
import { r as resolveProjectBySlug, t as getRequestedProjectSlug } from "./resolve-project-BG5ORGID.mjs";
|
|
7
7
|
import { appendFileSync, writeFileSync } from "node:fs";
|
|
8
8
|
//#region src/cli/build-cmd.ts
|
|
9
9
|
const POLL_MS = 1e3;
|
|
@@ -65,7 +65,7 @@ async function runBuildLogsCommand(root, args) {
|
|
|
65
65
|
intro(cliTitle("build logs"));
|
|
66
66
|
const token = getToken(root);
|
|
67
67
|
if (!token) {
|
|
68
|
-
log.error("Not logged in. Run `void
|
|
68
|
+
log.error("Not logged in. Run `void account login` first.");
|
|
69
69
|
process.exit(1);
|
|
70
70
|
}
|
|
71
71
|
const client = new PlatformClient(token, { root });
|
|
@@ -1,16 +1,16 @@
|
|
|
1
1
|
import { a as dim, i as createSpinner, r as cliTitle } 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, t as getRequestedProjectSlug } from "./resolve-project-
|
|
5
|
+
import { n as PlatformClient } from "./client-QTl6ko_D.mjs";
|
|
6
|
+
import { r as resolveProjectBySlug, t as getRequestedProjectSlug } from "./resolve-project-BG5ORGID.mjs";
|
|
7
7
|
//#region src/cli/cache.ts
|
|
8
8
|
async function runPurgeCacheCommand(root, projectSlug) {
|
|
9
9
|
console.log();
|
|
10
10
|
intro(cliTitle("project purge-cache"));
|
|
11
11
|
const token = getToken(root);
|
|
12
12
|
if (!token) {
|
|
13
|
-
log.error("Not logged in. Run `void
|
|
13
|
+
log.error("Not logged in. Run `void account login` first.");
|
|
14
14
|
process.exit(1);
|
|
15
15
|
}
|
|
16
16
|
const requestedSlug = getRequestedProjectSlug({ projectSlug });
|
|
@@ -1,8 +1,8 @@
|
|
|
1
1
|
import { r as cliTitle } 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 { E as confirm, O as intro, P as outro, W as isCancel, 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/cancel-deploy.ts
|
|
7
7
|
const ACTIVE_STATUSES = /* @__PURE__ */ new Set([
|
|
8
8
|
"pending",
|
|
@@ -15,7 +15,7 @@ async function runCancelDeployCommand(root, deployId) {
|
|
|
15
15
|
intro(cliTitle("project cancel"));
|
|
16
16
|
const token = getToken(root);
|
|
17
17
|
if (!token) {
|
|
18
|
-
log.error("Not logged in. Run `void
|
|
18
|
+
log.error("Not logged in. Run `void account login` first.");
|
|
19
19
|
process.exit(1);
|
|
20
20
|
}
|
|
21
21
|
const linked = readProjectConfig(root);
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import { n as isVoidAccessGatedUrl, t as cfAccessHeaders } from "./cf-access-DRsQRe6k.mjs";
|
|
2
|
-
import { S as writeKeyringPassword, c as platformCredentialAccount, s as normalizePlatformApiUrl, x as readKeyringPassword } from "./platform-registry-
|
|
2
|
+
import { S as writeKeyringPassword, c as platformCredentialAccount, s as normalizePlatformApiUrl, x as readKeyringPassword } from "./platform-registry-QBa4DK32.mjs";
|
|
3
3
|
import { spawnSync } from "node:child_process";
|
|
4
4
|
//#region src/cli/cf-access.ts
|
|
5
5
|
const ACCESS_KEYRING_SERVICE = "dev.void.cli.access";
|
|
@@ -1,10 +1,10 @@
|
|
|
1
|
-
import { a as join, i as isAbsolute, l as relative, n as dirname, r as extname, t as basename, u as resolve } from "./dist-
|
|
1
|
+
import { a as join, i as isAbsolute, l as relative, n as dirname, r as extname, t as basename, u as resolve } from "./dist-BVqXeR_h.mjs";
|
|
2
2
|
import { copyFileSync, cpSync, existsSync, mkdirSync, mkdtempSync, readFileSync, readdirSync, realpathSync, rmSync, symlinkSync, writeFileSync } from "node:fs";
|
|
3
3
|
import { fileURLToPath, pathToFileURL } from "node:url";
|
|
4
|
+
import { build } from "vite";
|
|
4
5
|
import { tmpdir } from "node:os";
|
|
5
6
|
import { spawnSync } from "node:child_process";
|
|
6
7
|
import { isDeepStrictEqual } from "node:util";
|
|
7
|
-
import { build } from "vite";
|
|
8
8
|
import { getWorkerBundleDir, normalizeDirectoryName, readBuildOutput, writeAssets, writeContainerConfig, writeRootConfig, writeWorkerConfig } from "@cloudflare/build-output-utils";
|
|
9
9
|
import { InputConfigSchema, OutputContainerSchema } from "@cloudflare/config";
|
|
10
10
|
import ignore from "ignore";
|
package/dist/cli/cf-compat.mjs
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
#!/usr/bin/env node
|
|
2
|
-
import { a as join, n as dirname, u as resolve } from "../dist-
|
|
3
|
-
import { t as prepareCfBuildOutput } from "../cf-build-output-
|
|
2
|
+
import { a as join, n as dirname, u as resolve } from "../dist-BVqXeR_h.mjs";
|
|
3
|
+
import { t as prepareCfBuildOutput } from "../cf-build-output-CGT03qCD.mjs";
|
|
4
4
|
import { copyFileSync, mkdtempSync, readFileSync, rmSync, writeFileSync } from "node:fs";
|
|
5
5
|
import { fileURLToPath } from "node:url";
|
|
6
6
|
import { tmpdir } from "node:os";
|