void 0.8.11 → 0.9.1
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/{auth-cmd-DE2YDAk0.mjs → auth-cmd-CPkWrQR9.mjs} +2 -2
- package/dist/{better-auth-shared-BXdg2Sur.d.mts → better-auth-shared-CmEQZs1T.d.mts} +2 -2
- package/dist/{cache-ChOUXuMY.mjs → cache-1SVxZ7BK.mjs} +2 -2
- package/dist/{cancel-deploy-g6bC-mpl.mjs → cancel-deploy-JaFClLr7.mjs} +1 -1
- package/dist/cli/cli.mjs +77 -40
- package/dist/{client-CCOKwNUz.mjs → client-DIfOFf1W.mjs} +6 -1
- package/dist/{create-project-DmGoYMqF.mjs → create-project-DCUrFJxa.mjs} +13 -5
- package/dist/{db-CSn2p-PN.mjs → db-DiddQC2v.mjs} +192 -20
- package/dist/{delete-D446r1rC.mjs → delete-CYknzwXU.mjs} +2 -2
- package/dist/{deploy-OPo_tSWl.mjs → deploy-CRU9fGjE.mjs} +22 -22
- package/dist/{domain-Digh83lu.mjs → domain-DxTc6HDn.mjs} +1 -1
- package/dist/{env-CJMOHUbW.mjs → env-Bvw0wMTI.mjs} +1 -1
- package/dist/{env-helpers-GICENGaN.d.mts → env-helpers-Bd2wVdxz.d.mts} +1 -1
- package/dist/{gen-DVPMPTL1.mjs → gen-CZdNWIaA.mjs} +1 -1
- package/dist/{handler-2mA_-sst.d.mts → handler-xflsMwWM.d.mts} +3 -3
- package/dist/index.d.mts +3 -3
- package/dist/index.mjs +242 -107
- package/dist/{init-BaXYK2PD.mjs → init-BHupO7Fm.mjs} +9 -9
- package/dist/{link-PClO4q2M.mjs → link-7MoXUMaI.mjs} +8 -10
- package/dist/{list-G03-pEN-.mjs → list-N2mCHv8q.mjs} +2 -2
- package/dist/{login-BZ1Yk9Xw.mjs → login-tt1OmNVg.mjs} +1 -1
- package/dist/{logs-D0a_HhLn.mjs → logs-Cl7q2CjZ.mjs} +1 -1
- package/dist/{mcp-BLsmImuJ.mjs → mcp-BXD35N2J.mjs} +1 -1
- package/dist/{node-x1AzR6Yf.mjs → node-CHWVVjO6.mjs} +3 -3
- package/dist/package-json-B2TD0JLu.mjs +44 -0
- package/dist/pages/client.d.mts +1 -1
- package/dist/pages/head-client.d.mts +1 -1
- package/dist/pages/head.d.mts +1 -1
- package/dist/pages/index.d.mts +2 -2
- package/dist/pages/index.mjs +1 -1
- package/dist/pages/islands-plugin.d.mts +1 -1
- package/dist/pages/protocol.d.mts +2 -2
- package/dist/pages/protocol.mjs +1 -1
- package/dist/{plugin-inference-Ba1uGdIy.mjs → plugin-inference-BUBhHt_1.mjs} +6 -2
- package/dist/{prepare-D8znEv3-.mjs → prepare-CrlAVbWS.mjs} +3 -3
- package/dist/{preset-BRsCi8ZB.mjs → preset-CIJG2O7a.mjs} +6 -21
- package/dist/{project-cmd-CErG1vM7.mjs → project-cmd-CLrqSbqj.mjs} +8 -8
- package/dist/{protocol-DXs_1QcC.d.mts → protocol-DYca39yJ.d.mts} +3 -3
- package/dist/proxy-M3pxItg2.mjs +5 -0
- package/dist/{rollback-BtiabraI.mjs → rollback-CEbAwbHK.mjs} +1 -1
- package/dist/{runner-DCYwTlee.mjs → runner-DLZ9E_cX.mjs} +11 -3
- package/dist/runtime/ai.mjs +1 -1
- package/dist/runtime/auth.d.mts +1 -1
- package/dist/runtime/better-auth-pg.d.mts +1 -1
- package/dist/runtime/better-auth-pg.mjs +3 -3
- package/dist/runtime/better-auth.d.mts +1 -1
- package/dist/runtime/better-auth.mjs +2 -2
- package/dist/runtime/client-react.d.mts +6 -0
- package/dist/runtime/client-react.mjs +5 -0
- package/dist/runtime/client-solid.d.mts +6 -0
- package/dist/runtime/client-solid.mjs +5 -0
- package/dist/runtime/client-svelte.d.mts +6 -0
- package/dist/runtime/client-svelte.mjs +5 -0
- package/dist/runtime/client-vue.d.mts +6 -0
- package/dist/runtime/client-vue.mjs +5 -0
- package/dist/runtime/client.d.mts +2 -2
- package/dist/runtime/client.mjs +1 -1
- package/dist/runtime/env-helpers.d.mts +1 -1
- package/dist/runtime/env-public-client.d.mts +1 -1
- package/dist/runtime/env-public.d.mts +2 -2
- package/dist/runtime/env-public.mjs +1 -1
- package/dist/runtime/env.mjs +1 -1
- package/dist/runtime/fetch-stream.d.mts +1 -1
- package/dist/runtime/fetch-stream.mjs +1 -1
- package/dist/runtime/fetch.d.mts +1 -1
- package/dist/runtime/fetch.mjs +1 -1
- package/dist/runtime/handler.d.mts +1 -1
- package/dist/runtime/handler.mjs +1 -1
- package/dist/runtime/isr.mjs +1 -1
- package/dist/runtime/live.d.mts +2 -2
- package/dist/runtime/live.mjs +1 -1
- package/dist/runtime/migration-handler-pg.mjs +1 -1
- package/dist/runtime/remote/index.d.mts +5 -1
- package/dist/runtime/remote/index.mjs +7 -4
- package/dist/runtime/sandbox.mjs +1 -1
- package/dist/runtime/validator.d.mts +1 -1
- package/dist/runtime/ws-server.d.mts +2 -2
- package/dist/runtime/ws.d.mts +3 -3
- package/dist/{scan-DzzHqtiT.mjs → scan-BNC_1OsY.mjs} +1 -1
- package/dist/{secret-CNnequJa.mjs → secret-C_uTY7xx.mjs} +2 -2
- package/dist/{skills-C38GxuGT.mjs → skills-BRKc--As.mjs} +1 -1
- package/package.json +22 -2
- package/skills/void/docs/guide/auth.md +3 -3
- package/skills/void/docs/guide/env-vars.md +4 -1
- package/skills/void/docs/integrations/cloudflare.md +3 -2
- package/skills/void/docs/reference/api.md +42 -30
- package/skills/void/docs/reference/cli.md +46 -28
- package/skills/void/docs/reference/config.md +1 -1
- package/skills/void/docs/reference/resource-inference.md +11 -11
- /package/dist/{agents-Dkgafwfr.mjs → agents-MhSzNMiC.mjs} +0 -0
- /package/dist/{auth-CHfPhSta.d.mts → auth-CDeb2XAl.d.mts} +0 -0
- /package/dist/{auth-migrations-BqJoGqGQ.mjs → auth-migrations-CuQkjjWE.mjs} +0 -0
- /package/dist/{better-auth-shared-CbAF6sOM.mjs → better-auth-shared-ChVbrq52.mjs} +0 -0
- /package/dist/{defer-DkoEwda-.mjs → defer-CouVukrf.mjs} +0 -0
- /package/dist/{drizzle-DmaANP4-.mjs → drizzle-2fs1qTgy.mjs} +0 -0
- /package/dist/{env-raw-zk5JQKZe.mjs → env-raw-RDkMnSTC.mjs} +0 -0
- /package/dist/{fetch-error-rXermVU3.mjs → fetch-error-BFIoojjf.mjs} +0 -0
- /package/dist/{fetch-error-7aWl0RiD.d.mts → fetch-error-CimrygMq.d.mts} +0 -0
- /package/dist/{head-DnTAP4p-.d.mts → head-BsSTGnIe.d.mts} +0 -0
- /package/dist/{headers-wAPJigtE.mjs → headers-Y0jshugF.mjs} +0 -0
- /package/dist/{pg-BDQxUp3Q.mjs → pg-CMZ_5wsC.mjs} +0 -0
- /package/dist/{project-slug-De4UjtD9.mjs → project-slug-rX3kTOfY.mjs} +0 -0
- /package/dist/{providers--6L9uf7j.d.mts → providers-3Kkv63Ha.d.mts} +0 -0
- /package/dist/{resolve-project-CNpUbUHd.mjs → resolve-project-D4O1_fZz.mjs} +0 -0
- /package/dist/{runner-pg-CJ04wNk5.mjs → runner-pg-Cv9V7ydr.mjs} +0 -0
- /package/dist/{standard-schema-BDiIJgp5.d.mts → standard-schema-Dnsh2vnl.d.mts} +0 -0
- /package/dist/{subcommand-prompt-BLewBtNI.mjs → subcommand-prompt-OD-x_Tsm.mjs} +0 -0
- /package/dist/{types-C0AOcrPN.d.mts → types-Dm9kep2X.d.mts} +0 -0
- /package/dist/{yarn-pnp-CLFC1T3p.mjs → yarn-pnp-0SwYgQxx.mjs} +0 -0
|
@@ -1,6 +1,6 @@
|
|
|
1
|
-
import { c as getToken, d as removeToken, n as PlatformClient } from "./client-
|
|
1
|
+
import { c as getToken, d as removeToken, n as PlatformClient } from "./client-DIfOFf1W.mjs";
|
|
2
2
|
import { c as R } from "./dist-abzUneor.mjs";
|
|
3
|
-
import { n as runLoginCommand } from "./login-
|
|
3
|
+
import { n as runLoginCommand } from "./login-tt1OmNVg.mjs";
|
|
4
4
|
import { execSync } from "node:child_process";
|
|
5
5
|
//#region src/cli/auth-cmd.ts
|
|
6
6
|
async function runAuthCommand(root, args) {
|
|
@@ -1,5 +1,5 @@
|
|
|
1
|
-
import { i as VoidAuthConfig, n as AuthState } from "./auth-
|
|
2
|
-
import { t as VoidAuthProvider } from "./providers
|
|
1
|
+
import { i as VoidAuthConfig, n as AuthState } from "./auth-CDeb2XAl.mjs";
|
|
2
|
+
import { t as VoidAuthProvider } from "./providers-3Kkv63Ha.mjs";
|
|
3
3
|
import { DBFieldAttribute } from "better-auth/db";
|
|
4
4
|
import { BetterAuthOptions, betterAuth } from "better-auth";
|
|
5
5
|
import { Context } from "hono";
|
|
@@ -1,8 +1,8 @@
|
|
|
1
1
|
import { i as dim, n as cliTitle, r as createSpinner } from "./output-DeiS4oEX.mjs";
|
|
2
|
-
import { c as getToken, n as PlatformClient } from "./client-
|
|
2
|
+
import { c as getToken, n as PlatformClient } from "./client-DIfOFf1W.mjs";
|
|
3
3
|
import { c as R, g as ge, y as ye } from "./dist-abzUneor.mjs";
|
|
4
4
|
import { r as readProjectConfig } from "./project-CH9pdo16.mjs";
|
|
5
|
-
import { r as resolveProjectBySlug, t as getRequestedProjectSlug } from "./resolve-project-
|
|
5
|
+
import { r as resolveProjectBySlug, t as getRequestedProjectSlug } from "./resolve-project-D4O1_fZz.mjs";
|
|
6
6
|
//#region src/cli/cache.ts
|
|
7
7
|
async function runPurgeCacheCommand(root, projectSlug) {
|
|
8
8
|
console.log();
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import { n as cliTitle } from "./output-DeiS4oEX.mjs";
|
|
2
|
-
import { c as getToken, n as PlatformClient } from "./client-
|
|
2
|
+
import { c as getToken, n as PlatformClient } from "./client-DIfOFf1W.mjs";
|
|
3
3
|
import { c as R, g as ge, v as ue, x as q, y as ye } from "./dist-abzUneor.mjs";
|
|
4
4
|
import { r as readProjectConfig } from "./project-CH9pdo16.mjs";
|
|
5
5
|
//#region src/cli/cancel-deploy.ts
|
package/dist/cli/cli.mjs
CHANGED
|
@@ -2,7 +2,7 @@
|
|
|
2
2
|
import { a as join } from "../pathe.M-eThtNZ-BrPhGF_K.mjs";
|
|
3
3
|
import { c as sectionTitle, o as helpLine, s as import_picocolors, t as categoryTitle } from "../output-DeiS4oEX.mjs";
|
|
4
4
|
import { c as R, u as Se, y as ye } from "../dist-abzUneor.mjs";
|
|
5
|
-
import { r as getPackageDir } from "../agents-
|
|
5
|
+
import { r as getPackageDir } from "../agents-MhSzNMiC.mjs";
|
|
6
6
|
import { readFileSync } from "node:fs";
|
|
7
7
|
import { parseArgs } from "node:util";
|
|
8
8
|
//#region src/cli/args.ts
|
|
@@ -104,7 +104,11 @@ const dbSubcommands = [
|
|
|
104
104
|
{
|
|
105
105
|
name: "execute",
|
|
106
106
|
arg: "<sql>",
|
|
107
|
-
description: "Run SQL against the
|
|
107
|
+
description: "Run SQL against the database (use --remote for the deployed database)",
|
|
108
|
+
flags: [{
|
|
109
|
+
name: "--remote",
|
|
110
|
+
description: "Run against the deployed database"
|
|
111
|
+
}]
|
|
108
112
|
},
|
|
109
113
|
{
|
|
110
114
|
name: "migrate",
|
|
@@ -116,7 +120,11 @@ const dbSubcommands = [
|
|
|
116
120
|
},
|
|
117
121
|
{
|
|
118
122
|
name: "studio",
|
|
119
|
-
description: "Open Drizzle Studio for the
|
|
123
|
+
description: "Open Drizzle Studio against the database (use --remote for the deployed PostgreSQL database)",
|
|
124
|
+
flags: [{
|
|
125
|
+
name: "--remote",
|
|
126
|
+
description: "Open Studio against the deployed database"
|
|
127
|
+
}]
|
|
120
128
|
},
|
|
121
129
|
{
|
|
122
130
|
name: "set-url",
|
|
@@ -198,7 +206,8 @@ function parseDbArgs(args) {
|
|
|
198
206
|
return {
|
|
199
207
|
action,
|
|
200
208
|
command,
|
|
201
|
-
file
|
|
209
|
+
file,
|
|
210
|
+
remote: parsed.values.remote === true ? true : void 0
|
|
202
211
|
};
|
|
203
212
|
}
|
|
204
213
|
if (action === "migrate") {
|
|
@@ -210,7 +219,10 @@ function parseDbArgs(args) {
|
|
|
210
219
|
}
|
|
211
220
|
if (action === "studio") {
|
|
212
221
|
if (rest.length > 0) throw new Error(`db: Unexpected argument '${rest[0]}'.`);
|
|
213
|
-
return {
|
|
222
|
+
return {
|
|
223
|
+
action,
|
|
224
|
+
remote: parsed.values.remote === true ? true : void 0
|
|
225
|
+
};
|
|
214
226
|
}
|
|
215
227
|
if (action === "set-url") {
|
|
216
228
|
if (rest.length > 0) throw new Error(`db: Unexpected argument '${rest[0]}'.`);
|
|
@@ -221,6 +233,7 @@ function parseDbArgs(args) {
|
|
|
221
233
|
return { action };
|
|
222
234
|
}
|
|
223
235
|
if (action === "export") {
|
|
236
|
+
if (parsed.values.remote === true) throw new Error("`void db export --remote` is not yet supported. Local export only for now.");
|
|
224
237
|
if (rest.length > 0) throw new Error(`db: Unexpected argument '${rest[0]}'.`);
|
|
225
238
|
return {
|
|
226
239
|
action,
|
|
@@ -868,7 +881,7 @@ const HELP_TREE = {
|
|
|
868
881
|
},
|
|
869
882
|
{
|
|
870
883
|
command: "execute <sql>",
|
|
871
|
-
description: "Run SQL against the
|
|
884
|
+
description: "Run SQL against the database (--remote for deployed)"
|
|
872
885
|
},
|
|
873
886
|
{
|
|
874
887
|
command: "migrate",
|
|
@@ -876,7 +889,7 @@ const HELP_TREE = {
|
|
|
876
889
|
},
|
|
877
890
|
{
|
|
878
891
|
command: "studio",
|
|
879
|
-
description: "Open Drizzle Studio for
|
|
892
|
+
description: "Open Drizzle Studio (--remote for deployed PG)"
|
|
880
893
|
},
|
|
881
894
|
{
|
|
882
895
|
command: "export",
|
|
@@ -905,19 +918,29 @@ const HELP_TREE = {
|
|
|
905
918
|
}]
|
|
906
919
|
},
|
|
907
920
|
execute: {
|
|
908
|
-
summary: "Run SQL against the local database.",
|
|
921
|
+
summary: "Run SQL against the database (local by default; use --remote for the deployed database).",
|
|
909
922
|
usage: ["void db execute <sql>", "void db execute --file <path>"],
|
|
910
923
|
options: [{
|
|
911
924
|
command: "--file <path>",
|
|
912
925
|
description: "Run SQL from a file instead"
|
|
913
|
-
}],
|
|
914
|
-
examples: [{
|
|
915
|
-
command: "void db execute \"select * from users\"",
|
|
916
|
-
description: "Run inline SQL"
|
|
917
926
|
}, {
|
|
918
|
-
command: "
|
|
919
|
-
description: "Run
|
|
920
|
-
}]
|
|
927
|
+
command: "--remote",
|
|
928
|
+
description: "Run against the deployed database (D1 via proxy; PostgreSQL via direct connection)"
|
|
929
|
+
}],
|
|
930
|
+
examples: [
|
|
931
|
+
{
|
|
932
|
+
command: "void db execute \"select * from users\"",
|
|
933
|
+
description: "Run inline SQL"
|
|
934
|
+
},
|
|
935
|
+
{
|
|
936
|
+
command: "void db execute --file query.sql",
|
|
937
|
+
description: "Run SQL from a file"
|
|
938
|
+
},
|
|
939
|
+
{
|
|
940
|
+
command: "void db execute --remote \"select count(*) from users\"",
|
|
941
|
+
description: "Query the deployed database"
|
|
942
|
+
}
|
|
943
|
+
]
|
|
921
944
|
},
|
|
922
945
|
migrate: {
|
|
923
946
|
summary: "Apply pending migrations.",
|
|
@@ -927,7 +950,21 @@ const HELP_TREE = {
|
|
|
927
950
|
description: "Apply to the remote database"
|
|
928
951
|
}]
|
|
929
952
|
},
|
|
930
|
-
studio:
|
|
953
|
+
studio: {
|
|
954
|
+
summary: "Open Drizzle Studio against the database (local by default; use --remote for the deployed PostgreSQL database; D1 remote not yet supported).",
|
|
955
|
+
usage: ["void db studio [options]"],
|
|
956
|
+
options: [{
|
|
957
|
+
command: "--remote",
|
|
958
|
+
description: "Open Studio against the deployed PostgreSQL database (D1 remote not yet supported)"
|
|
959
|
+
}],
|
|
960
|
+
examples: [{
|
|
961
|
+
command: "void db studio",
|
|
962
|
+
description: "Open Studio for the local database"
|
|
963
|
+
}, {
|
|
964
|
+
command: "void db studio --remote",
|
|
965
|
+
description: "Open Studio against the deployed PostgreSQL database"
|
|
966
|
+
}]
|
|
967
|
+
},
|
|
931
968
|
export: {
|
|
932
969
|
summary: "Export local database contents as SQL.",
|
|
933
970
|
usage: ["void db export [options]"],
|
|
@@ -1487,7 +1524,7 @@ async function runSubcommandGroup(command, subcommands, parse, run) {
|
|
|
1487
1524
|
const sub = args[1];
|
|
1488
1525
|
try {
|
|
1489
1526
|
if ((!sub || sub.startsWith("-")) && process.stdin.isTTY) {
|
|
1490
|
-
const { promptSubcommand } = await import("../subcommand-prompt-
|
|
1527
|
+
const { promptSubcommand } = await import("../subcommand-prompt-OD-x_Tsm.mjs");
|
|
1491
1528
|
const result = await promptSubcommand(command, subcommands);
|
|
1492
1529
|
if (!result) process.exit(0);
|
|
1493
1530
|
await run(root, parse(buildArgs(result, args.slice(1))));
|
|
@@ -1516,7 +1553,7 @@ else if (command === "deploy") {
|
|
|
1516
1553
|
R.error(err instanceof Error ? err.message : String(err));
|
|
1517
1554
|
process.exit(1);
|
|
1518
1555
|
}
|
|
1519
|
-
import("../deploy-
|
|
1556
|
+
import("../deploy-CRU9fGjE.mjs").then((n) => n.t).then(({ runDeploy }) => {
|
|
1520
1557
|
runDeploy(root, {
|
|
1521
1558
|
projectSlug: deployArgs.projectSlug,
|
|
1522
1559
|
dir: deployArgs.dir,
|
|
@@ -1528,13 +1565,13 @@ else if (command === "deploy") {
|
|
|
1528
1565
|
process.exit(1);
|
|
1529
1566
|
});
|
|
1530
1567
|
});
|
|
1531
|
-
} else if (command === "auth") runSubcommandGroup("auth", authSubcommands, parseAuthArgs, (root, parsed) => import("../auth-cmd-
|
|
1532
|
-
else if (command === "project") runSubcommandGroup("project", projectSubcommands, parseProjectArgs, (root, parsed) => import("../project-cmd-
|
|
1533
|
-
else if (command === "secret") runSubcommandGroup("secret", secretSubcommands, parseSecretArgs, (root, parsed) => import("../secret-
|
|
1534
|
-
else if (command === "domain") runSubcommandGroup("domain", domainSubcommands, parseDomainArgs, (root, parsed) => import("../domain-
|
|
1535
|
-
else if (command === "db") runSubcommandGroup("db", dbSubcommands, parseDbArgs, (root, parsed) => import("../db-
|
|
1536
|
-
else if (command === "env") runSubcommandGroup("env", envSubcommands, parseEnvArgs, (root, parsed) => import("../env-
|
|
1537
|
-
else if (command === "gen") runSubcommandGroup("gen", genSubcommands, parseGenArgs, (root, parsed) => import("../gen-
|
|
1568
|
+
} else if (command === "auth") runSubcommandGroup("auth", authSubcommands, parseAuthArgs, (root, parsed) => import("../auth-cmd-CPkWrQR9.mjs").then(({ runAuthCommand }) => runAuthCommand(root, parsed)));
|
|
1569
|
+
else if (command === "project") runSubcommandGroup("project", projectSubcommands, parseProjectArgs, (root, parsed) => import("../project-cmd-CLrqSbqj.mjs").then(({ runProjectCommand }) => runProjectCommand(root, parsed)));
|
|
1570
|
+
else if (command === "secret") runSubcommandGroup("secret", secretSubcommands, parseSecretArgs, (root, parsed) => import("../secret-C_uTY7xx.mjs").then(({ runSecretCommand }) => runSecretCommand(root, parsed)));
|
|
1571
|
+
else if (command === "domain") runSubcommandGroup("domain", domainSubcommands, parseDomainArgs, (root, parsed) => import("../domain-DxTc6HDn.mjs").then(({ runDomainCommand }) => runDomainCommand(root, parsed)));
|
|
1572
|
+
else if (command === "db") runSubcommandGroup("db", dbSubcommands, parseDbArgs, (root, parsed) => import("../db-DiddQC2v.mjs").then(({ runDbCommand }) => runDbCommand(root, parsed)));
|
|
1573
|
+
else if (command === "env") runSubcommandGroup("env", envSubcommands, parseEnvArgs, (root, parsed) => import("../env-Bvw0wMTI.mjs").then(({ runEnvCommand }) => runEnvCommand(root, parsed)));
|
|
1574
|
+
else if (command === "gen") runSubcommandGroup("gen", genSubcommands, parseGenArgs, (root, parsed) => import("../gen-CZdNWIaA.mjs").then(({ runGenCommand }) => runGenCommand(root, parsed)));
|
|
1538
1575
|
else if (command === "prepare") {
|
|
1539
1576
|
const root = process.cwd();
|
|
1540
1577
|
let prepareArgs;
|
|
@@ -1544,7 +1581,7 @@ else if (command === "prepare") {
|
|
|
1544
1581
|
R.error(err instanceof Error ? err.message : String(err));
|
|
1545
1582
|
process.exit(1);
|
|
1546
1583
|
}
|
|
1547
|
-
import("../prepare-
|
|
1584
|
+
import("../prepare-CrlAVbWS.mjs").then(({ runPrepareCommand }) => {
|
|
1548
1585
|
runPrepareCommand(root, prepareArgs).catch((err) => {
|
|
1549
1586
|
R.error(err.message ?? err);
|
|
1550
1587
|
process.exit(1);
|
|
@@ -1552,7 +1589,7 @@ else if (command === "prepare") {
|
|
|
1552
1589
|
});
|
|
1553
1590
|
} else if (command === "init") {
|
|
1554
1591
|
const root = process.cwd();
|
|
1555
|
-
import("../init-
|
|
1592
|
+
import("../init-BHupO7Fm.mjs").then(({ runInitCommand, parseInitArgs }) => {
|
|
1556
1593
|
let initArgs;
|
|
1557
1594
|
try {
|
|
1558
1595
|
initArgs = parseInitArgs(args.slice(1));
|
|
@@ -1565,7 +1602,7 @@ else if (command === "prepare") {
|
|
|
1565
1602
|
process.exit(1);
|
|
1566
1603
|
});
|
|
1567
1604
|
});
|
|
1568
|
-
} else if (command === "mcp") import("../mcp-
|
|
1605
|
+
} else if (command === "mcp") import("../mcp-BXD35N2J.mjs").then(({ runMcp }) => {
|
|
1569
1606
|
runMcp();
|
|
1570
1607
|
});
|
|
1571
1608
|
else if (command === "-v" || command === "--version") {
|
|
@@ -1634,36 +1671,36 @@ else if (command === "-v" || command === "--version") {
|
|
|
1634
1671
|
];
|
|
1635
1672
|
(async () => {
|
|
1636
1673
|
printVoidHeader();
|
|
1637
|
-
const { promptSubcommand } = await import("../subcommand-prompt-
|
|
1674
|
+
const { promptSubcommand } = await import("../subcommand-prompt-OD-x_Tsm.mjs");
|
|
1638
1675
|
const result = await promptSubcommand("", topLevelCommands);
|
|
1639
1676
|
if (!result) process.exit(0);
|
|
1640
1677
|
const cmd = result.subcommand;
|
|
1641
1678
|
const root = process.cwd();
|
|
1642
1679
|
switch (cmd) {
|
|
1643
1680
|
case "init": {
|
|
1644
|
-
const { runInitCommand, parseInitArgs } = await import("../init-
|
|
1681
|
+
const { runInitCommand, parseInitArgs } = await import("../init-BHupO7Fm.mjs");
|
|
1645
1682
|
await runInitCommand(root, parseInitArgs([]));
|
|
1646
1683
|
return;
|
|
1647
1684
|
}
|
|
1648
1685
|
case "deploy": {
|
|
1649
|
-
const { runDeploy } = await import("../deploy-
|
|
1686
|
+
const { runDeploy } = await import("../deploy-CRU9fGjE.mjs").then((n) => n.t);
|
|
1650
1687
|
await runDeploy(root);
|
|
1651
1688
|
return;
|
|
1652
1689
|
}
|
|
1653
1690
|
case "mcp": {
|
|
1654
|
-
const { runMcp } = await import("../mcp-
|
|
1691
|
+
const { runMcp } = await import("../mcp-BXD35N2J.mjs");
|
|
1655
1692
|
runMcp();
|
|
1656
1693
|
return;
|
|
1657
1694
|
}
|
|
1658
|
-
case "auth": return runSubcommandGroup("auth", authSubcommands, parseAuthArgs, (r, p) => import("../auth-cmd-
|
|
1659
|
-
case "project": return runSubcommandGroup("project", projectSubcommands, parseProjectArgs, (r, p) => import("../project-cmd-
|
|
1660
|
-
case "secret": return runSubcommandGroup("secret", secretSubcommands, parseSecretArgs, (r, p) => import("../secret-
|
|
1661
|
-
case "domain": return runSubcommandGroup("domain", domainSubcommands, parseDomainArgs, (r, p) => import("../domain-
|
|
1662
|
-
case "db": return runSubcommandGroup("db", dbSubcommands, parseDbArgs, (r, p) => import("../db-
|
|
1663
|
-
case "env": return runSubcommandGroup("env", envSubcommands, parseEnvArgs, (r, p) => import("../env-
|
|
1664
|
-
case "gen": return runSubcommandGroup("gen", genSubcommands, parseGenArgs, (r, p) => import("../gen-
|
|
1695
|
+
case "auth": return runSubcommandGroup("auth", authSubcommands, parseAuthArgs, (r, p) => import("../auth-cmd-CPkWrQR9.mjs").then(({ runAuthCommand }) => runAuthCommand(r, p)));
|
|
1696
|
+
case "project": return runSubcommandGroup("project", projectSubcommands, parseProjectArgs, (r, p) => import("../project-cmd-CLrqSbqj.mjs").then(({ runProjectCommand }) => runProjectCommand(r, p)));
|
|
1697
|
+
case "secret": return runSubcommandGroup("secret", secretSubcommands, parseSecretArgs, (r, p) => import("../secret-C_uTY7xx.mjs").then(({ runSecretCommand }) => runSecretCommand(r, p)));
|
|
1698
|
+
case "domain": return runSubcommandGroup("domain", domainSubcommands, parseDomainArgs, (r, p) => import("../domain-DxTc6HDn.mjs").then(({ runDomainCommand }) => runDomainCommand(r, p)));
|
|
1699
|
+
case "db": return runSubcommandGroup("db", dbSubcommands, parseDbArgs, (r, p) => import("../db-DiddQC2v.mjs").then(({ runDbCommand }) => runDbCommand(r, p)));
|
|
1700
|
+
case "env": return runSubcommandGroup("env", envSubcommands, parseEnvArgs, (r, p) => import("../env-Bvw0wMTI.mjs").then(({ runEnvCommand }) => runEnvCommand(r, p)));
|
|
1701
|
+
case "gen": return runSubcommandGroup("gen", genSubcommands, parseGenArgs, (r, p) => import("../gen-CZdNWIaA.mjs").then(({ runGenCommand }) => runGenCommand(r, p)));
|
|
1665
1702
|
case "prepare": {
|
|
1666
|
-
const { runPrepareCommand } = await import("../prepare-
|
|
1703
|
+
const { runPrepareCommand } = await import("../prepare-CrlAVbWS.mjs");
|
|
1667
1704
|
await runPrepareCommand(root, parsePrepareArgs([]));
|
|
1668
1705
|
return;
|
|
1669
1706
|
}
|
|
@@ -3,7 +3,7 @@ import { a as join } from "./pathe.M-eThtNZ-BrPhGF_K.mjs";
|
|
|
3
3
|
import { s as import_picocolors } from "./output-DeiS4oEX.mjs";
|
|
4
4
|
import { t as cfAccessHeaders } from "./cf-access-DKDsgwOU.mjs";
|
|
5
5
|
import { t as isVoidInternalStaging } from "./project-CH9pdo16.mjs";
|
|
6
|
-
import { r as getPackageDir } from "./agents-
|
|
6
|
+
import { r as getPackageDir } from "./agents-MhSzNMiC.mjs";
|
|
7
7
|
import { mkdirSync, readFileSync, writeFileSync } from "node:fs";
|
|
8
8
|
import { createHash, randomBytes } from "node:crypto";
|
|
9
9
|
import { homedir } from "node:os";
|
|
@@ -754,6 +754,11 @@ var PlatformClient = class {
|
|
|
754
754
|
if (!res.ok) await throwPlatformApiError("Failed to update database URL", res);
|
|
755
755
|
return res.json();
|
|
756
756
|
}
|
|
757
|
+
async getDatabaseUrl(projectId) {
|
|
758
|
+
const res = await fetch(`${this.baseUrl}/projects/${projectId}/database-url`, { headers: { ...this.authHeaders } });
|
|
759
|
+
if (!res.ok) await throwPlatformApiError("Failed to fetch database URL", res);
|
|
760
|
+
return res.json();
|
|
761
|
+
}
|
|
757
762
|
async purgeCache(projectId) {
|
|
758
763
|
const res = await fetch(`${this.baseUrl}/projects/${projectId}/revalidate`, {
|
|
759
764
|
method: "POST",
|
|
@@ -1,10 +1,10 @@
|
|
|
1
1
|
import { n as __exportAll } from "./chunk-DJd-R1mw.mjs";
|
|
2
2
|
import { s as import_picocolors } from "./output-DeiS4oEX.mjs";
|
|
3
|
-
import { s as getSiteDomain, t as PlatformApiError } from "./client-
|
|
4
|
-
import { _ as me, c as R, i as Ee, l as Re, x as q } from "./dist-abzUneor.mjs";
|
|
3
|
+
import { s as getSiteDomain, t as PlatformApiError } from "./client-DIfOFf1W.mjs";
|
|
4
|
+
import { _ as me, c as R, i as Ee, l as Re, v as ue, x as q } from "./dist-abzUneor.mjs";
|
|
5
5
|
import { a as writeProjectConfig } from "./project-CH9pdo16.mjs";
|
|
6
|
-
import { n as validateProjectSlug } from "./project-slug-
|
|
7
|
-
import { n as inferDefaultSlug } from "./resolve-project-
|
|
6
|
+
import { n as validateProjectSlug } from "./project-slug-rX3kTOfY.mjs";
|
|
7
|
+
import { n as inferDefaultSlug } from "./resolve-project-D4O1_fZz.mjs";
|
|
8
8
|
//#region src/cli/prompt.ts
|
|
9
9
|
async function promptProjectSetupAction(message = "Set up a Void project:", options = {}) {
|
|
10
10
|
const result = await Ee({
|
|
@@ -39,9 +39,17 @@ async function promptProjectSelection(projects, message = "Select a project:", r
|
|
|
39
39
|
process.exit(0);
|
|
40
40
|
}
|
|
41
41
|
if (result === "__create__") return { action: "create" };
|
|
42
|
+
const project = projects.find((p) => p.id === result);
|
|
43
|
+
if (options.confirmExisting) {
|
|
44
|
+
const confirmed = await ue({ message: `Linking to an existing project. Running \`void deploy\` will overwrite the current deployment of ${project.slug}.${getSiteDomain(root)}. Continue?` });
|
|
45
|
+
if (q(confirmed) || !confirmed) {
|
|
46
|
+
me("Project link cancelled.");
|
|
47
|
+
process.exit(0);
|
|
48
|
+
}
|
|
49
|
+
}
|
|
42
50
|
return {
|
|
43
51
|
action: "select",
|
|
44
|
-
project
|
|
52
|
+
project
|
|
45
53
|
};
|
|
46
54
|
}
|
|
47
55
|
async function promptProjectSlug(defaultSlug) {
|