void 0.7.9 → 0.7.10

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.
@@ -1,6 +1,6 @@
1
1
  import { c as R } from "./dist-Dayj3gCK.mjs";
2
- import { c as getToken, d as removeToken, n as PlatformClient } from "./client-Dw8roLzc.mjs";
3
- import { n as runLoginCommand } from "./login-21aIqVPD.mjs";
2
+ import { c as getToken, d as removeToken, n as PlatformClient } from "./client-BollDL7Y.mjs";
3
+ import { n as runLoginCommand } from "./login-wdS4k9e-.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,7 +1,7 @@
1
1
  import { i as dim, n as cliTitle, r as createSpinner } from "./output-BwlcIYSR.mjs";
2
2
  import { c as R, g as ge, y as ye } from "./dist-Dayj3gCK.mjs";
3
3
  import { r as readProjectConfig } from "./project-TqORyHn8.mjs";
4
- import { c as getToken, n as PlatformClient } from "./client-Dw8roLzc.mjs";
4
+ import { c as getToken, n as PlatformClient } from "./client-BollDL7Y.mjs";
5
5
  import { r as resolveProjectBySlug, t as getRequestedProjectSlug } from "./resolve-project-DdjLQ2tB.mjs";
6
6
  //#region src/cli/cache.ts
7
7
  async function runPurgeCacheCommand(root, projectSlug) {
@@ -1,7 +1,7 @@
1
1
  import { n as cliTitle } from "./output-BwlcIYSR.mjs";
2
2
  import { c as R, g as ge, v as ue, x as q, y as ye } from "./dist-Dayj3gCK.mjs";
3
3
  import { r as readProjectConfig } from "./project-TqORyHn8.mjs";
4
- import { c as getToken, n as PlatformClient } from "./client-Dw8roLzc.mjs";
4
+ import { c as getToken, n as PlatformClient } from "./client-BollDL7Y.mjs";
5
5
  //#region src/cli/cancel-deploy.ts
6
6
  const ACTIVE_STATUSES = new Set([
7
7
  "pending",
package/dist/cli/cli.mjs CHANGED
@@ -1503,7 +1503,7 @@ else if (command === "deploy") {
1503
1503
  R.error(err instanceof Error ? err.message : String(err));
1504
1504
  process.exit(1);
1505
1505
  }
1506
- import("../deploy-Bfn434ed.mjs").then((n) => n.t).then(({ runDeploy }) => {
1506
+ import("../deploy-BoivjIGQ.mjs").then((n) => n.t).then(({ runDeploy }) => {
1507
1507
  runDeploy(root, {
1508
1508
  projectSlug: deployArgs.projectSlug,
1509
1509
  dir: deployArgs.dir,
@@ -1515,12 +1515,12 @@ else if (command === "deploy") {
1515
1515
  process.exit(1);
1516
1516
  });
1517
1517
  });
1518
- } else if (command === "auth") runSubcommandGroup("auth", authSubcommands, parseAuthArgs, (root, parsed) => import("../auth-cmd-D3DNf9j9.mjs").then(({ runAuthCommand }) => runAuthCommand(root, parsed)));
1519
- else if (command === "project") runSubcommandGroup("project", projectSubcommands, parseProjectArgs, (root, parsed) => import("../project-cmd-qzFonrph.mjs").then(({ runProjectCommand }) => runProjectCommand(root, parsed)));
1520
- else if (command === "secret") runSubcommandGroup("secret", secretSubcommands, parseSecretArgs, (root, parsed) => import("../secret-DAfThcYQ.mjs").then(({ runSecretCommand }) => runSecretCommand(root, parsed)));
1521
- else if (command === "domain") runSubcommandGroup("domain", domainSubcommands, parseDomainArgs, (root, parsed) => import("../domain-DUFBO_ob.mjs").then(({ runDomainCommand }) => runDomainCommand(root, parsed)));
1522
- else if (command === "db") runSubcommandGroup("db", dbSubcommands, parseDbArgs, (root, parsed) => import("../db-Daa0zMHP.mjs").then(({ runDbCommand }) => runDbCommand(root, parsed)));
1523
- else if (command === "env") runSubcommandGroup("env", envSubcommands, parseEnvArgs, (root, parsed) => import("../env-Bt-92Ji0.mjs").then(({ runEnvCommand }) => runEnvCommand(root, parsed)));
1518
+ } else if (command === "auth") runSubcommandGroup("auth", authSubcommands, parseAuthArgs, (root, parsed) => import("../auth-cmd-wVm1oBDB.mjs").then(({ runAuthCommand }) => runAuthCommand(root, parsed)));
1519
+ else if (command === "project") runSubcommandGroup("project", projectSubcommands, parseProjectArgs, (root, parsed) => import("../project-cmd-i9Kvz4KZ.mjs").then(({ runProjectCommand }) => runProjectCommand(root, parsed)));
1520
+ else if (command === "secret") runSubcommandGroup("secret", secretSubcommands, parseSecretArgs, (root, parsed) => import("../secret-BeBmBxwf.mjs").then(({ runSecretCommand }) => runSecretCommand(root, parsed)));
1521
+ else if (command === "domain") runSubcommandGroup("domain", domainSubcommands, parseDomainArgs, (root, parsed) => import("../domain-BvO6J5pb.mjs").then(({ runDomainCommand }) => runDomainCommand(root, parsed)));
1522
+ else if (command === "db") runSubcommandGroup("db", dbSubcommands, parseDbArgs, (root, parsed) => import("../db-DotnZ8gC.mjs").then(({ runDbCommand }) => runDbCommand(root, parsed)));
1523
+ else if (command === "env") runSubcommandGroup("env", envSubcommands, parseEnvArgs, (root, parsed) => import("../env-D5rCrXsJ.mjs").then(({ runEnvCommand }) => runEnvCommand(root, parsed)));
1524
1524
  else if (command === "gen") runSubcommandGroup("gen", genSubcommands, parseGenArgs, (root, parsed) => import("../gen-CpeKIqlM.mjs").then(({ runGenCommand }) => runGenCommand(root, parsed)));
1525
1525
  else if (command === "prepare") {
1526
1526
  const root = process.cwd();
@@ -1539,7 +1539,7 @@ else if (command === "prepare") {
1539
1539
  });
1540
1540
  } else if (command === "init") {
1541
1541
  const root = process.cwd();
1542
- import("../init-DwJ0Z0SL.mjs").then(({ runInitCommand, parseInitArgs }) => {
1542
+ import("../init-XYRQUhxJ.mjs").then(({ runInitCommand, parseInitArgs }) => {
1543
1543
  let initArgs;
1544
1544
  try {
1545
1545
  initArgs = parseInitArgs(args.slice(1));
@@ -1552,7 +1552,7 @@ else if (command === "prepare") {
1552
1552
  process.exit(1);
1553
1553
  });
1554
1554
  });
1555
- } else if (command === "mcp") import("../mcp-CJduPlRn.mjs").then(({ runMcp }) => {
1555
+ } else if (command === "mcp") import("../mcp-CVKEl-Sc.mjs").then(({ runMcp }) => {
1556
1556
  runMcp();
1557
1557
  });
1558
1558
  else if (command === "-v" || command === "--version") {
@@ -1628,26 +1628,26 @@ else if (command === "-v" || command === "--version") {
1628
1628
  const root = process.cwd();
1629
1629
  switch (cmd) {
1630
1630
  case "init": {
1631
- const { runInitCommand, parseInitArgs } = await import("../init-DwJ0Z0SL.mjs");
1631
+ const { runInitCommand, parseInitArgs } = await import("../init-XYRQUhxJ.mjs");
1632
1632
  await runInitCommand(root, parseInitArgs([]));
1633
1633
  return;
1634
1634
  }
1635
1635
  case "deploy": {
1636
- const { runDeploy } = await import("../deploy-Bfn434ed.mjs").then((n) => n.t);
1636
+ const { runDeploy } = await import("../deploy-BoivjIGQ.mjs").then((n) => n.t);
1637
1637
  await runDeploy(root);
1638
1638
  return;
1639
1639
  }
1640
1640
  case "mcp": {
1641
- const { runMcp } = await import("../mcp-CJduPlRn.mjs");
1641
+ const { runMcp } = await import("../mcp-CVKEl-Sc.mjs");
1642
1642
  runMcp();
1643
1643
  return;
1644
1644
  }
1645
- case "auth": return runSubcommandGroup("auth", authSubcommands, parseAuthArgs, (r, p) => import("../auth-cmd-D3DNf9j9.mjs").then(({ runAuthCommand }) => runAuthCommand(r, p)));
1646
- case "project": return runSubcommandGroup("project", projectSubcommands, parseProjectArgs, (r, p) => import("../project-cmd-qzFonrph.mjs").then(({ runProjectCommand }) => runProjectCommand(r, p)));
1647
- case "secret": return runSubcommandGroup("secret", secretSubcommands, parseSecretArgs, (r, p) => import("../secret-DAfThcYQ.mjs").then(({ runSecretCommand }) => runSecretCommand(r, p)));
1648
- case "domain": return runSubcommandGroup("domain", domainSubcommands, parseDomainArgs, (r, p) => import("../domain-DUFBO_ob.mjs").then(({ runDomainCommand }) => runDomainCommand(r, p)));
1649
- case "db": return runSubcommandGroup("db", dbSubcommands, parseDbArgs, (r, p) => import("../db-Daa0zMHP.mjs").then(({ runDbCommand }) => runDbCommand(r, p)));
1650
- case "env": return runSubcommandGroup("env", envSubcommands, parseEnvArgs, (r, p) => import("../env-Bt-92Ji0.mjs").then(({ runEnvCommand }) => runEnvCommand(r, p)));
1645
+ case "auth": return runSubcommandGroup("auth", authSubcommands, parseAuthArgs, (r, p) => import("../auth-cmd-wVm1oBDB.mjs").then(({ runAuthCommand }) => runAuthCommand(r, p)));
1646
+ case "project": return runSubcommandGroup("project", projectSubcommands, parseProjectArgs, (r, p) => import("../project-cmd-i9Kvz4KZ.mjs").then(({ runProjectCommand }) => runProjectCommand(r, p)));
1647
+ case "secret": return runSubcommandGroup("secret", secretSubcommands, parseSecretArgs, (r, p) => import("../secret-BeBmBxwf.mjs").then(({ runSecretCommand }) => runSecretCommand(r, p)));
1648
+ case "domain": return runSubcommandGroup("domain", domainSubcommands, parseDomainArgs, (r, p) => import("../domain-BvO6J5pb.mjs").then(({ runDomainCommand }) => runDomainCommand(r, p)));
1649
+ case "db": return runSubcommandGroup("db", dbSubcommands, parseDbArgs, (r, p) => import("../db-DotnZ8gC.mjs").then(({ runDbCommand }) => runDbCommand(r, p)));
1650
+ case "env": return runSubcommandGroup("env", envSubcommands, parseEnvArgs, (r, p) => import("../env-D5rCrXsJ.mjs").then(({ runEnvCommand }) => runEnvCommand(r, p)));
1651
1651
  case "gen": return runSubcommandGroup("gen", genSubcommands, parseGenArgs, (r, p) => import("../gen-CpeKIqlM.mjs").then(({ runGenCommand }) => runGenCommand(r, p)));
1652
1652
  case "prepare": {
1653
1653
  const { runPrepareCommand } = await import("../prepare-CKzO06-Z.mjs");
@@ -5,7 +5,7 @@ import { t as isVoidInternalStaging } from "./project-TqORyHn8.mjs";
5
5
  import { t as cfAccessHeaders } from "./cf-access-Dee5cXxL.mjs";
6
6
  import { r as getPackageDir } from "./agents-DqkFfc2c.mjs";
7
7
  import { mkdirSync, readFileSync, writeFileSync } from "node:fs";
8
- import { randomBytes } from "node:crypto";
8
+ import { createHash, randomBytes } from "node:crypto";
9
9
  import { homedir } from "node:os";
10
10
  import { Entry } from "@napi-rs/keyring";
11
11
  import { spawnSync } from "node:child_process";
@@ -103,6 +103,36 @@ function removeToken(root = process.cwd()) {
103
103
  }
104
104
  const DEFAULT_API_URL = "https://api.void.cloud";
105
105
  const STAGING_API_URL = "https://api.staging.void.cloud";
106
+ function base64Url(buffer) {
107
+ return buffer.toString("base64").replaceAll("+", "-").replaceAll("/", "_").replaceAll("=", "");
108
+ }
109
+ function createCodeVerifier() {
110
+ return base64Url(randomBytes(32));
111
+ }
112
+ function createCodeChallenge(verifier) {
113
+ return base64Url(createHash("sha256").update(verifier).digest());
114
+ }
115
+ async function exchangeLoginCode(apiUrl, code, state, codeVerifier) {
116
+ const base = apiUrl.endsWith("/") ? apiUrl : `${apiUrl}/`;
117
+ const res = await fetch(new URL("auth/cli/token", base), {
118
+ method: "POST",
119
+ headers: { "Content-Type": "application/json" },
120
+ body: JSON.stringify({
121
+ code,
122
+ state,
123
+ code_verifier: codeVerifier
124
+ })
125
+ });
126
+ if (!res.ok) throw new Error(`auth: Failed to exchange login code (${res.status}). Try logging in again.`);
127
+ let body;
128
+ try {
129
+ body = await res.json();
130
+ } catch {
131
+ throw new Error("auth: Login code exchange returned an invalid response.");
132
+ }
133
+ if (!body || typeof body !== "object" || !("token" in body) || typeof body.token !== "string" || body.token.length === 0) throw new Error("auth: Login code exchange did not return a token.");
134
+ return body.token;
135
+ }
106
136
  /**
107
137
  * Read the API URL from environment or config file.
108
138
  * Priority: VOID_API_URL env var > ~/.void/config.json > default
@@ -134,7 +164,8 @@ function openBrowser(url, exec) {
134
164
  }
135
165
  /**
136
166
  * Start a local HTTP server, open the browser to the platform login page,
137
- * and wait for the OAuth callback with a JWT token.
167
+ * and wait for the OAuth callback with a short-lived code. The CLI exchanges
168
+ * the code itself so the localhost callback never accepts bearer tokens.
138
169
  *
139
170
  * `onUrl` is invoked with the login URL once the local server is listening,
140
171
  * so callers can show the URL to the user as a manual fallback when the
@@ -145,8 +176,23 @@ async function runLogin(root = process.cwd(), provider = "github", onUrl) {
145
176
  const { exec } = await import("node:child_process");
146
177
  const apiUrl = getApiUrl(root);
147
178
  const state = randomBytes(32).toString("hex");
179
+ const codeVerifier = createCodeVerifier();
180
+ const codeChallenge = createCodeChallenge(codeVerifier);
148
181
  return new Promise((resolve, reject) => {
149
- const server = http.createServer((req, res) => {
182
+ let settled = false;
183
+ const fail = (error) => {
184
+ if (settled) return;
185
+ settled = true;
186
+ server.close();
187
+ reject(error);
188
+ };
189
+ const succeed = (token) => {
190
+ if (settled) return;
191
+ settled = true;
192
+ server.close();
193
+ resolve(token);
194
+ };
195
+ const server = http.createServer(async (req, res) => {
150
196
  const url = new URL(req.url, `http://localhost`);
151
197
  if (url.pathname !== "/callback") {
152
198
  res.writeHead(404);
@@ -161,22 +207,32 @@ async function runLogin(root = process.cwd(), provider = "github", onUrl) {
161
207
  if (url.searchParams.get("error") === "signup_restricted") {
162
208
  res.writeHead(403, { "Content-Type": "text/html" });
163
209
  res.end(page("Signup restricted", "Your email is not on the approved list for this environment."));
164
- server.close();
165
- reject(/* @__PURE__ */ new Error("Signup restricted: your email is not on the approved list for this environment."));
210
+ fail(/* @__PURE__ */ new Error("Signup restricted: your email is not on the approved list for this environment."));
211
+ return;
212
+ }
213
+ if (url.searchParams.has("token")) {
214
+ res.writeHead(400, { "Content-Type": "text/html" });
215
+ res.end(page("Login failed", "Invalid login callback. Please try again."));
216
+ return;
217
+ }
218
+ const code = url.searchParams.get("code");
219
+ if (!code) {
220
+ res.writeHead(400, { "Content-Type": "text/html" });
221
+ res.end(page("Login failed", "No authorization code received. Please try again."));
166
222
  return;
167
223
  }
168
- const token = url.searchParams.get("token");
169
- if (!token) {
224
+ let token;
225
+ try {
226
+ token = await exchangeLoginCode(apiUrl, code, state, codeVerifier);
227
+ } catch (err) {
170
228
  res.writeHead(400, { "Content-Type": "text/html" });
171
- res.end(page("Login failed", "No token received. Please try again."));
172
- server.close();
173
- reject(/* @__PURE__ */ new Error("auth: No token received from callback. Try logging in again."));
229
+ res.end(page("Login failed", "Could not complete login. Please try again."));
230
+ fail(err instanceof Error ? err : /* @__PURE__ */ new Error("auth: Failed to complete login."));
174
231
  return;
175
232
  }
176
233
  res.writeHead(200, { "Content-Type": "text/html" });
177
234
  res.end(page("Login successful!", "You can close this tab and return to the terminal."));
178
- server.close();
179
- resolve(token);
235
+ succeed(token);
180
236
  });
181
237
  server.on("connection", (socket) => socket.unref());
182
238
  server.listen(0, "127.0.0.1", () => {
@@ -191,12 +247,13 @@ async function runLogin(root = process.cwd(), provider = "github", onUrl) {
191
247
  const loginUrl = new URL("auth/login", apiUrl.endsWith("/") ? apiUrl : `${apiUrl}/`);
192
248
  loginUrl.searchParams.set("redirect", redirect.href);
193
249
  loginUrl.searchParams.set("provider", provider);
250
+ loginUrl.searchParams.set("code_challenge", codeChallenge);
251
+ loginUrl.searchParams.set("code_challenge_method", "S256");
194
252
  onUrl?.(loginUrl.href);
195
253
  openBrowser(loginUrl.href, exec);
196
254
  });
197
255
  setTimeout(() => {
198
- server.close();
199
- reject(/* @__PURE__ */ new Error("auth: Login timed out after 5 minutes. Try again."));
256
+ fail(/* @__PURE__ */ new Error("auth: Login timed out after 5 minutes. Try again."));
200
257
  }, 300 * 1e3).unref();
201
258
  });
202
259
  }
@@ -1,7 +1,7 @@
1
1
  import { s as import_picocolors } from "./output-BwlcIYSR.mjs";
2
2
  import { _ as me, c as R, i as Ee, l as Re, x as q } from "./dist-Dayj3gCK.mjs";
3
3
  import { a as writeProjectConfig } from "./project-TqORyHn8.mjs";
4
- import { s as getSiteDomain, t as PlatformApiError } from "./client-Dw8roLzc.mjs";
4
+ import { s as getSiteDomain, t as PlatformApiError } from "./client-BollDL7Y.mjs";
5
5
  import { n as validateProjectSlug } from "./project-slug-KRvHQEQI.mjs";
6
6
  import { n as inferDefaultSlug } from "./resolve-project-DdjLQ2tB.mjs";
7
7
  //#region src/cli/prompt.ts
@@ -2,7 +2,7 @@ import { a as join, o as relative, r as extname, s as resolve } from "./pathe.M-
2
2
  import { i as dim, n as cliTitle, s as import_picocolors } from "./output-BwlcIYSR.mjs";
3
3
  import { c as R, g as ge, y as ye } from "./dist-Dayj3gCK.mjs";
4
4
  import { r as readProjectConfig } from "./project-TqORyHn8.mjs";
5
- import { c as getToken, n as PlatformClient } from "./client-Dw8roLzc.mjs";
5
+ import { c as getToken, n as PlatformClient } from "./client-BollDL7Y.mjs";
6
6
  import { c as getDatabaseDialect, f as readConfig } from "./config-DqkeX_Fa.mjs";
7
7
  import { r as detectFramework } from "./plugin-inference-CXUuq0aC.mjs";
8
8
  import { a as writeJournal, i as stripSqlExt, r as readJournal, t as collectMigrations } from "./collect-CjeZgz5D.mjs";
@@ -1,7 +1,7 @@
1
1
  import { n as cliTitle, r as createSpinner } from "./output-BwlcIYSR.mjs";
2
2
  import { _ as me, c as R, g as ge, l as Re, u as Se, x as q, y as ye } from "./dist-Dayj3gCK.mjs";
3
3
  import { i as removeProjectConfig, r as readProjectConfig } from "./project-TqORyHn8.mjs";
4
- import { c as getToken, n as PlatformClient } from "./client-Dw8roLzc.mjs";
4
+ import { c as getToken, n as PlatformClient } from "./client-BollDL7Y.mjs";
5
5
  import { r as resolveProjectBySlug } from "./resolve-project-DdjLQ2tB.mjs";
6
6
  //#region src/cli/delete.ts
7
7
  async function runDeleteCommand(root, slug, options) {
@@ -4,7 +4,7 @@ import { n as cliTitle, r as createSpinner, s as import_picocolors } from "./out
4
4
  import { t as findVoidAuthConfig } from "./config-CvHtTM0q.mjs";
5
5
  import { c as R, g as ge, u as Se, v as ue, x as q, y as ye } from "./dist-Dayj3gCK.mjs";
6
6
  import { a as writeProjectConfig, r as readProjectConfig } from "./project-TqORyHn8.mjs";
7
- import { a as isExpiredTokenError, c as getToken, i as isCliOutdatedError, l as getTokenSource, n as PlatformClient, o as parsePlatformErrorBody, t as PlatformApiError, u as isStagingMode } from "./client-Dw8roLzc.mjs";
7
+ import { a as isExpiredTokenError, c as getToken, i as isCliOutdatedError, l as getTokenSource, n as PlatformClient, o as parsePlatformErrorBody, t as PlatformApiError, u as isStagingMode } from "./client-BollDL7Y.mjs";
8
8
  import { c as getDatabaseDialect, f as readConfig, l as isNodeTarget, p as resolveBindingNames } from "./config-DqkeX_Fa.mjs";
9
9
  import { i as scanJobsSync, n as scanWebSocketRoutesSync, r as scanQueuesSync, t as scanRoutes } from "./scan-B8iEm8xn.mjs";
10
10
  import { i as inferProjectBindings, l as validateSsrEntry, n as FRAMEWORK_SCAN_DIRS, r as detectFramework } from "./plugin-inference-CXUuq0aC.mjs";
@@ -16,10 +16,10 @@ import { n as writeDrizzleConfig } from "./config-BzM9Dy7T.mjs";
16
16
  import { t as collectMigrations } from "./collect-CjeZgz5D.mjs";
17
17
  import { r as validateMigrations, t as assertJournalCoherence } from "./validate-CaMavMxu.mjs";
18
18
  import { t as scanPages } from "./scan-CWfLxtOe.mjs";
19
- import { n as promptProjectSelection, r as promptProjectSetupAction, t as promptAndCreateProject } from "./create-project-CcPOkfA4.mjs";
19
+ import { n as promptProjectSelection, r as promptProjectSetupAction, t as promptAndCreateProject } from "./create-project-C6c0tsda.mjs";
20
20
  import { r as resolveProjectBySlug, t as getRequestedProjectSlug } from "./resolve-project-DdjLQ2tB.mjs";
21
21
  import { n as lintDuplicateSources, r as mergeRoutingRules, t as lintDestinationSplats } from "./headers-C7Yf6_CN.mjs";
22
- import { t as promptForLoginToken } from "./login-21aIqVPD.mjs";
22
+ import { t as promptForLoginToken } from "./login-wdS4k9e-.mjs";
23
23
  import { i as resolveProjectCommand, n as detectPreset, r as formatProjectCommand, t as FRAMEWORK_PRESETS } from "./preset-BhnZpb7t.mjs";
24
24
  import { createRequire } from "node:module";
25
25
  import { copyFileSync, cpSync, createWriteStream, existsSync, mkdirSync, mkdtempSync, readFileSync, readdirSync, renameSync, rmSync, unlinkSync, writeFileSync } from "node:fs";
@@ -1,7 +1,7 @@
1
1
  import { s as import_picocolors } from "./output-BwlcIYSR.mjs";
2
2
  import { c as R, u as Se } from "./dist-Dayj3gCK.mjs";
3
3
  import { r as readProjectConfig } from "./project-TqORyHn8.mjs";
4
- import { c as getToken, n as PlatformClient } from "./client-Dw8roLzc.mjs";
4
+ import { c as getToken, n as PlatformClient } from "./client-BollDL7Y.mjs";
5
5
  //#region src/cli/domain.ts
6
6
  async function runDomainCommand(root, args) {
7
7
  const token = getToken(root);
@@ -2,7 +2,7 @@ import { a as join } from "./pathe.M-eThtNZ-D-kmWkCS.mjs";
2
2
  import { n as cliTitle } from "./output-BwlcIYSR.mjs";
3
3
  import { c as R, g as ge, u as Se, y as ye } from "./dist-Dayj3gCK.mjs";
4
4
  import { r as readProjectConfig } from "./project-TqORyHn8.mjs";
5
- import { c as getToken, n as PlatformClient } from "./client-Dw8roLzc.mjs";
5
+ import { c as getToken, n as PlatformClient } from "./client-BollDL7Y.mjs";
6
6
  import { n as generateEnvTypes, t as findEnvFile } from "./env-types-DknSA4SO.mjs";
7
7
  import { a as loadUserEnvFile, i as validateProdEnv, n as formatEnvReport, t as fetchRemoteSecretNames } from "./env-validation-Bc_aiBUm.mjs";
8
8
  import { existsSync, mkdirSync, readFileSync, writeFileSync } from "node:fs";
package/dist/index.mjs CHANGED
@@ -3,8 +3,8 @@ import { a as join, n as dirname, o as relative } from "./pathe.M-eThtNZ-D-kmWkC
3
3
  import { u as require_picocolors } from "./output-BwlcIYSR.mjs";
4
4
  import { n as loadVoidAuthConfig, t as findVoidAuthConfig } from "./config-CvHtTM0q.mjs";
5
5
  import { r as readProjectConfig } from "./project-TqORyHn8.mjs";
6
- import { c as getToken, u as isStagingMode } from "./client-Dw8roLzc.mjs";
7
- import { C as isSandboxEnabled, S as SANDBOX_MIGRATION_TAG, _ as normalizeWranglerCompatibilityFlags, a as prerenderPagesNode, b as resolveLiveBindingConfig, c as filterLoadedEnv, d as LIVE_MIGRATION_TAG, f as ensureWranglerCompat, g as nextDurableObjectMigrationTag, h as hasDurableObjectSqliteMigration, i as prerenderPages, l as resolveRemoteMode, m as ensureWranglerNodejsAlsFlag, n as resolveDistDir, o as DEFAULT_PROXY_URL, p as ensureWranglerCompatibilityDate, r as resolveWorkerDirName, s as STAGING_PROXY_URL, u as stripInternalEnvKeys, v as readExistingLiveBindingConfig, w as resolveSandboxConfig, x as syncWranglerBindings, y as readWranglerCompat } from "./deploy-Bfn434ed.mjs";
6
+ import { c as getToken, u as isStagingMode } from "./client-BollDL7Y.mjs";
7
+ import { C as isSandboxEnabled, S as SANDBOX_MIGRATION_TAG, _ as normalizeWranglerCompatibilityFlags, a as prerenderPagesNode, b as resolveLiveBindingConfig, c as filterLoadedEnv, d as LIVE_MIGRATION_TAG, f as ensureWranglerCompat, g as nextDurableObjectMigrationTag, h as hasDurableObjectSqliteMigration, i as prerenderPages, l as resolveRemoteMode, m as ensureWranglerNodejsAlsFlag, n as resolveDistDir, o as DEFAULT_PROXY_URL, p as ensureWranglerCompatibilityDate, r as resolveWorkerDirName, s as STAGING_PROXY_URL, u as stripInternalEnvKeys, v as readExistingLiveBindingConfig, w as resolveSandboxConfig, x as syncWranglerBindings, y as readWranglerCompat } from "./deploy-BoivjIGQ.mjs";
8
8
  import { c as getDatabaseDialect, f as readConfig, l as isNodeTarget, p as resolveBindingNames } from "./config-DqkeX_Fa.mjs";
9
9
  import { i as scanJobsSync, n as scanWebSocketRoutesSync, r as scanQueuesSync, t as scanRoutes } from "./scan-B8iEm8xn.mjs";
10
10
  import { a as SSR_CLIENT_ENTRY_RELATIVE_PATHS, c as validateSsrEntries, f as isIdentifier, g as walk, i as inferProjectBindings, l as validateSsrEntry, m as isMemberExpression, n as FRAMEWORK_SCAN_DIRS, o as SSR_SERVER_ENTRY_RELATIVE_PATHS, p as isLiteral, r as detectFramework, t as DEFAULT_SCAN_DIRS, u as inferBindingsFromSource } from "./plugin-inference-CXUuq0aC.mjs";
@@ -4597,7 +4597,7 @@ const STAGING_API_URL = "https://api.staging.void.cloud";
4597
4597
  */
4598
4598
  async function runAiSetupPrompt(root, token, staging, server) {
4599
4599
  const { select, text, isCancel, log } = await import("./dist-Dayj3gCK.mjs").then((n) => n.p);
4600
- const { PlatformClient } = await import("./client-Dw8roLzc.mjs").then((n) => n.r);
4600
+ const { PlatformClient } = await import("./client-BollDL7Y.mjs").then((n) => n.r);
4601
4601
  const { writeProjectConfig } = await import("./project-TqORyHn8.mjs").then((n) => n.n);
4602
4602
  const { inferDefaultSlug } = await import("./resolve-project-DdjLQ2tB.mjs").then((n) => n.i);
4603
4603
  const client = new PlatformClient(token, staging ? STAGING_API_URL : DEFAULT_API_URL);
@@ -2,7 +2,7 @@ import { a as join, i as isAbsolute, n as dirname, o as relative, s as resolve,
2
2
  import { n as cliTitle } from "./output-BwlcIYSR.mjs";
3
3
  import { _ as me, c as R, g as ge, i as Ee, u as Se, v as ue, x as q, y as ye } from "./dist-Dayj3gCK.mjs";
4
4
  import { a as writeProjectConfig, r as readProjectConfig } from "./project-TqORyHn8.mjs";
5
- import { c as getToken, n as PlatformClient, u as isStagingMode } from "./client-Dw8roLzc.mjs";
5
+ import { c as getToken, n as PlatformClient, u as isStagingMode } from "./client-BollDL7Y.mjs";
6
6
  import { c as getDatabaseDialect, f as readConfig } from "./config-DqkeX_Fa.mjs";
7
7
  import { r as detectFramework } from "./plugin-inference-CXUuq0aC.mjs";
8
8
  import { r as parseDotenvFile, t as expandDotenv } from "./dotenv-zdFCCgFU.mjs";
@@ -10,8 +10,8 @@ import { n as ensureProjectTsconfig, t as createProjectTsconfig } from "./projec
10
10
  import { t as MagicString } from "./magic-string.es-D6g9UnIy.mjs";
11
11
  import { n as writeDrizzleConfig } from "./config-BzM9Dy7T.mjs";
12
12
  import { n as getAgentById, r as getPackageDir, t as detectAgents } from "./agents-DqkFfc2c.mjs";
13
- import { n as promptProjectSelection, t as promptAndCreateProject } from "./create-project-CcPOkfA4.mjs";
14
- import { t as promptForLoginToken } from "./login-21aIqVPD.mjs";
13
+ import { n as promptProjectSelection, t as promptAndCreateProject } from "./create-project-C6c0tsda.mjs";
14
+ import { t as promptForLoginToken } from "./login-wdS4k9e-.mjs";
15
15
  import { r as formatProjectCommand } from "./preset-BhnZpb7t.mjs";
16
16
  import { n as findInstalledYarnPnpRuntime, r as hasLocalLockfile, t as buildDrizzleKitSpawnEnv } from "./yarn-pnp-6LD6_3Ej.mjs";
17
17
  import { createRequire } from "node:module";
@@ -1,8 +1,8 @@
1
1
  import { n as cliTitle, s as import_picocolors } from "./output-BwlcIYSR.mjs";
2
2
  import { _ as me, c as R, g as ge, y as ye } from "./dist-Dayj3gCK.mjs";
3
3
  import { a as writeProjectConfig, r as readProjectConfig } from "./project-TqORyHn8.mjs";
4
- import { c as getToken, n as PlatformClient, s as getSiteDomain } from "./client-Dw8roLzc.mjs";
5
- import { n as promptProjectSelection, t as promptAndCreateProject } from "./create-project-CcPOkfA4.mjs";
4
+ import { c as getToken, n as PlatformClient, s as getSiteDomain } from "./client-BollDL7Y.mjs";
5
+ import { n as promptProjectSelection, t as promptAndCreateProject } from "./create-project-C6c0tsda.mjs";
6
6
  //#region src/cli/link.ts
7
7
  async function runLink(root, slug) {
8
8
  console.log();
@@ -1,7 +1,7 @@
1
1
  import { a as ensureUtc, i as dim, l as tablePrefix, n as cliTitle, s as import_picocolors } from "./output-BwlcIYSR.mjs";
2
2
  import { c as R, g as ge, y as ye } from "./dist-Dayj3gCK.mjs";
3
3
  import { r as readProjectConfig } from "./project-TqORyHn8.mjs";
4
- import { c as getToken, n as PlatformClient } from "./client-Dw8roLzc.mjs";
4
+ import { c as getToken, n as PlatformClient } from "./client-BollDL7Y.mjs";
5
5
  import { r as resolveProjectBySlug } from "./resolve-project-DdjLQ2tB.mjs";
6
6
  //#region src/cli/list.ts
7
7
  async function runListCommand(root, slug) {
@@ -1,6 +1,6 @@
1
1
  import { n as cliTitle, r as createSpinner, s as import_picocolors } from "./output-BwlcIYSR.mjs";
2
2
  import { _ as me, c as R, g as ge, i as Ee, x as q, y as ye } from "./dist-Dayj3gCK.mjs";
3
- import { a as isExpiredTokenError, c as getToken, d as removeToken, f as runLogin, l as getTokenSource, n as PlatformClient, p as saveToken, u as isStagingMode } from "./client-Dw8roLzc.mjs";
3
+ import { a as isExpiredTokenError, c as getToken, d as removeToken, f as runLogin, l as getTokenSource, n as PlatformClient, p as saveToken, u as isStagingMode } from "./client-BollDL7Y.mjs";
4
4
  //#region src/cli/login.ts
5
5
  async function promptForLoginToken(root = process.cwd()) {
6
6
  const provider = await Ee({
@@ -1,7 +1,7 @@
1
1
  import { i as dim, n as cliTitle, s as import_picocolors } from "./output-BwlcIYSR.mjs";
2
2
  import { c as R, g as ge, y as ye } from "./dist-Dayj3gCK.mjs";
3
3
  import { r as readProjectConfig } from "./project-TqORyHn8.mjs";
4
- import { c as getToken, n as PlatformClient } from "./client-Dw8roLzc.mjs";
4
+ import { c as getToken, n as PlatformClient } from "./client-BollDL7Y.mjs";
5
5
  //#region src/cli/logs.ts
6
6
  async function runLogsCommand(root, filter, range, deployment, level) {
7
7
  console.log();
@@ -1,6 +1,6 @@
1
1
  import { a as join, n as dirname } from "./pathe.M-eThtNZ-D-kmWkCS.mjs";
2
2
  import { a as writeProjectConfig } from "./project-TqORyHn8.mjs";
3
- import { c as getToken, n as PlatformClient } from "./client-Dw8roLzc.mjs";
3
+ import { c as getToken, n as PlatformClient } from "./client-BollDL7Y.mjs";
4
4
  import { existsSync, readFileSync, readdirSync } from "node:fs";
5
5
  import { fileURLToPath } from "node:url";
6
6
  import { createInterface } from "node:readline";
@@ -1,6 +1,6 @@
1
1
  import { i as dim, l as tablePrefix, n as cliTitle, s as import_picocolors } from "./output-BwlcIYSR.mjs";
2
2
  import { c as R, g as ge, y as ye } from "./dist-Dayj3gCK.mjs";
3
- import { c as getToken, n as PlatformClient, s as getSiteDomain } from "./client-Dw8roLzc.mjs";
3
+ import { c as getToken, n as PlatformClient, s as getSiteDomain } from "./client-BollDL7Y.mjs";
4
4
  //#region src/cli/projects.ts
5
5
  async function runProjectsCommand(root) {
6
6
  console.log();
@@ -34,32 +34,32 @@ async function runProjectsCommand(root) {
34
34
  //#region src/cli/project-cmd.ts
35
35
  async function runProjectCommand(root, args) {
36
36
  if (args.subcommand === "status") {
37
- const { runListCommand } = await import("./list-BZI7LKvX.mjs");
37
+ const { runListCommand } = await import("./list-DEUWWBKk.mjs");
38
38
  return runListCommand(root, args.name || void 0);
39
39
  }
40
40
  if (args.subcommand === "link") {
41
- const { runLink } = await import("./link-wKnJUEcY.mjs");
41
+ const { runLink } = await import("./link-CTw4KItw.mjs");
42
42
  return runLink(root, args.name || void 0);
43
43
  }
44
44
  if (args.subcommand === "list") return runProjectsCommand(root);
45
45
  if (args.subcommand === "logs") {
46
- const { runLogsCommand } = await import("./logs-CFJ8deEd.mjs");
46
+ const { runLogsCommand } = await import("./logs-BoZ4ZWnl.mjs");
47
47
  return runLogsCommand(root, args.filter, args.range, args.deployment || void 0, args.level || void 0);
48
48
  }
49
49
  if (args.subcommand === "rollback") {
50
- const { runRollbackCommand } = await import("./rollback-CyLJaSSS.mjs");
50
+ const { runRollbackCommand } = await import("./rollback-CGsGd4ti.mjs");
51
51
  return runRollbackCommand(root, args.deployId || void 0);
52
52
  }
53
53
  if (args.subcommand === "cancel") {
54
- const { runCancelDeployCommand } = await import("./cancel-deploy-CrMlOCW0.mjs");
54
+ const { runCancelDeployCommand } = await import("./cancel-deploy-Ues45U-R.mjs");
55
55
  return runCancelDeployCommand(root, args.deployId || void 0);
56
56
  }
57
57
  if (args.subcommand === "delete") {
58
- const { runDeleteCommand } = await import("./delete-C96_gt6q.mjs");
58
+ const { runDeleteCommand } = await import("./delete-DGBvVhNi.mjs");
59
59
  return runDeleteCommand(root, args.name || void 0, { force: args.force });
60
60
  }
61
61
  if (args.subcommand === "purge-cache") {
62
- const { runPurgeCacheCommand } = await import("./cache-DcDAmion.mjs");
62
+ const { runPurgeCacheCommand } = await import("./cache-DQ0nyYqX.mjs");
63
63
  return runPurgeCacheCommand(root, args.projectSlug || void 0);
64
64
  }
65
65
  }
@@ -1,7 +1,7 @@
1
1
  import { a as ensureUtc, i as dim, n as cliTitle, r as createSpinner, s as import_picocolors } from "./output-BwlcIYSR.mjs";
2
2
  import { _ as me, c as R, g as ge, i as Ee, v as ue, x as q, y as ye } from "./dist-Dayj3gCK.mjs";
3
3
  import { r as readProjectConfig } from "./project-TqORyHn8.mjs";
4
- import { c as getToken, n as PlatformClient } from "./client-Dw8roLzc.mjs";
4
+ import { c as getToken, n as PlatformClient } from "./client-BollDL7Y.mjs";
5
5
  //#region src/cli/rollback.ts
6
6
  async function runRollbackCommand(root, deployId) {
7
7
  console.log();
@@ -1,7 +1,7 @@
1
1
  import { n as cliTitle } from "./output-BwlcIYSR.mjs";
2
2
  import { _ as me, c as R, g as ge, n as Ce, u as Se, v as ue, x as q, y as ye } from "./dist-Dayj3gCK.mjs";
3
3
  import { r as readProjectConfig } from "./project-TqORyHn8.mjs";
4
- import { c as getToken, n as PlatformClient } from "./client-Dw8roLzc.mjs";
4
+ import { c as getToken, n as PlatformClient } from "./client-BollDL7Y.mjs";
5
5
  import { r as resolveProjectBySlug, t as getRequestedProjectSlug } from "./resolve-project-DdjLQ2tB.mjs";
6
6
  import { readFileSync } from "node:fs";
7
7
  //#region src/cli/secret.ts
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "void",
3
- "version": "0.7.9",
3
+ "version": "0.7.10",
4
4
  "repository": {
5
5
  "type": "git",
6
6
  "url": "git+https://github.com/voidzero-dev/void.git",
@@ -332,7 +332,7 @@
332
332
  "valibot": ">=1.0.0-beta.7",
333
333
  "vite": "^8.0.0",
334
334
  "zod": "^3.25.0 || ^4.0.0",
335
- "@void/md": "0.7.9"
335
+ "@void/md": "0.7.10"
336
336
  },
337
337
  "peerDependenciesMeta": {
338
338
  "@void/md": {