void 0.9.3 → 0.10.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.
Files changed (104) hide show
  1. package/dist/{auth-cmd-CPkWrQR9.mjs → auth-cmd-DBnbrX9Y.mjs} +2 -2
  2. package/dist/{better-auth-shared-CmEQZs1T.d.mts → better-auth-shared-a7H3wk9J.d.mts} +2 -2
  3. package/dist/{cache-1SVxZ7BK.mjs → cache-DNX0hLsO.mjs} +1 -1
  4. package/dist/{cancel-deploy-JaFClLr7.mjs → cancel-deploy-CDzkVaYZ.mjs} +1 -1
  5. package/dist/cli/cli.mjs +205 -36
  6. package/dist/{client-DIfOFf1W.mjs → client-D4awzTnj.mjs} +149 -45
  7. package/dist/{create-project-DCUrFJxa.mjs → create-project-CGodxfzH.mjs} +1 -1
  8. package/dist/{db-UW4IYQFw.mjs → db-ERzz4oly.mjs} +14 -14
  9. package/dist/{delete-CYknzwXU.mjs → delete-CJZGDLBR.mjs} +1 -1
  10. package/dist/{deploy-RQXpVBL-.mjs → deploy-Cwa5sooV.mjs} +74 -102
  11. package/dist/{domain-B7RntQ1r.mjs → domain-WvoAHE6w.mjs} +1 -1
  12. package/dist/{env-C_ZcxxED.mjs → env-Cx4czPsR.mjs} +1 -1
  13. package/dist/{env-helpers-Bd2wVdxz.d.mts → env-helpers-ZatKyjen.d.mts} +1 -1
  14. package/dist/{gen-O5mXZ76K.mjs → gen-Dgi4D7GC.mjs} +1 -1
  15. package/dist/git-metadata-Ce0AtSZL.mjs +82 -0
  16. package/dist/github-cmd-CUB041gj.mjs +308 -0
  17. package/dist/{handler-hm9KldPP.d.mts → handler-DczZlaXR.d.mts} +3 -3
  18. package/dist/index.d.mts +3 -3
  19. package/dist/index.mjs +18 -18
  20. package/dist/{init-DGrLx2ls.mjs → init-DvaRDMIc.mjs} +122 -77
  21. package/dist/{link-7MoXUMaI.mjs → link-CpbWJY3P.mjs} +2 -2
  22. package/dist/{list-N2mCHv8q.mjs → list-BkwE5vH4.mjs} +1 -1
  23. package/dist/{login-tt1OmNVg.mjs → login-Ca6mhQVI.mjs} +1 -1
  24. package/dist/{logs-Cl7q2CjZ.mjs → logs-ArQzZquo.mjs} +1 -1
  25. package/dist/{mcp-BXD35N2J.mjs → mcp-Cc2MMXdQ.mjs} +1 -1
  26. package/dist/{node-Df8UjQ2H.mjs → node-B07cZs0d.mjs} +3 -3
  27. package/dist/pages/client.d.mts +1 -1
  28. package/dist/pages/client.mjs +1 -0
  29. package/dist/pages/head-client.d.mts +1 -1
  30. package/dist/pages/head.d.mts +1 -1
  31. package/dist/pages/index.d.mts +2 -2
  32. package/dist/pages/index.mjs +1 -1
  33. package/dist/pages/islands-plugin.d.mts +1 -1
  34. package/dist/pages/protocol.d.mts +2 -2
  35. package/dist/pages/protocol.mjs +1 -1
  36. package/dist/{plugin-inference--7geW5Z2.mjs → plugin-inference-C3fLzFvP.mjs} +2 -0
  37. package/dist/{prepare-DT-7QII_.mjs → prepare-DH2WnEpD.mjs} +3 -3
  38. package/dist/{preset-2aBxMfY1.mjs → preset-B7ZQZn0u.mjs} +2 -2
  39. package/dist/{project-cmd-CLrqSbqj.mjs → project-cmd-CWZeawuN.mjs} +8 -8
  40. package/dist/{protocol-B9GZA4Bn.d.mts → protocol-63PHtCHS.d.mts} +3 -3
  41. package/dist/{rollback-CEbAwbHK.mjs → rollback-BJ60ktsW.mjs} +1 -1
  42. package/dist/{runner-DLZ9E_cX.mjs → runner-BQyKUqAL.mjs} +1 -1
  43. package/dist/runtime/ai.mjs +1 -1
  44. package/dist/runtime/auth.d.mts +1 -1
  45. package/dist/runtime/better-auth-pg.d.mts +1 -1
  46. package/dist/runtime/better-auth-pg.mjs +3 -3
  47. package/dist/runtime/better-auth.d.mts +1 -1
  48. package/dist/runtime/better-auth.mjs +2 -2
  49. package/dist/runtime/client-react.d.mts +2 -2
  50. package/dist/runtime/client-react.mjs +1 -1
  51. package/dist/runtime/client-solid.d.mts +2 -2
  52. package/dist/runtime/client-solid.mjs +1 -1
  53. package/dist/runtime/client-svelte.d.mts +2 -2
  54. package/dist/runtime/client-svelte.mjs +1 -1
  55. package/dist/runtime/client-vue.d.mts +2 -2
  56. package/dist/runtime/client-vue.mjs +1 -1
  57. package/dist/runtime/client.d.mts +2 -2
  58. package/dist/runtime/client.mjs +1 -1
  59. package/dist/runtime/env-helpers.d.mts +1 -1
  60. package/dist/runtime/env-public-client.d.mts +1 -1
  61. package/dist/runtime/env-public.d.mts +2 -2
  62. package/dist/runtime/env-public.mjs +1 -1
  63. package/dist/runtime/env.mjs +1 -1
  64. package/dist/runtime/fetch-stream.d.mts +1 -1
  65. package/dist/runtime/fetch-stream.mjs +1 -1
  66. package/dist/runtime/fetch.d.mts +1 -1
  67. package/dist/runtime/fetch.mjs +1 -1
  68. package/dist/runtime/handler.d.mts +1 -1
  69. package/dist/runtime/handler.mjs +1 -1
  70. package/dist/runtime/isr.mjs +1 -1
  71. package/dist/runtime/live.d.mts +2 -2
  72. package/dist/runtime/live.mjs +1 -1
  73. package/dist/runtime/migration-handler-pg.mjs +1 -1
  74. package/dist/runtime/sandbox.mjs +1 -1
  75. package/dist/runtime/validator.d.mts +1 -1
  76. package/dist/runtime/ws-server.d.mts +2 -2
  77. package/dist/runtime/ws.d.mts +3 -3
  78. package/dist/{scan-B2H1Vo2C.mjs → scan-DGEp1-1Q.mjs} +17 -9
  79. package/dist/{secret-C_uTY7xx.mjs → secret-BRbXyu7E.mjs} +1 -1
  80. package/package.json +2 -2
  81. package/schema.json +3 -3
  82. package/skills/void/docs/guide/deployment.md +37 -11
  83. package/skills/void/docs/guide/edge/headers.md +10 -3
  84. package/skills/void/docs/guide/edge/rewrites.md +5 -5
  85. package/skills/void/docs/reference/cli.md +65 -2
  86. /package/dist/{auth-migrations-CuQkjjWE.mjs → auth-migrations-BP-hMzYl.mjs} +0 -0
  87. /package/dist/{auth-CDeb2XAl.d.mts → auth-nEUVHuFI.d.mts} +0 -0
  88. /package/dist/{better-auth-shared-QAfk8CAS.mjs → better-auth-shared-D0Mbmx5V.mjs} +0 -0
  89. /package/dist/{defer-CouVukrf.mjs → defer-C-bdSM_b.mjs} +0 -0
  90. /package/dist/{drizzle-DYstYz0j.mjs → drizzle-DqstQTGq.mjs} +0 -0
  91. /package/dist/{env-raw-RDkMnSTC.mjs → env-raw-Dtj1UAoK.mjs} +0 -0
  92. /package/dist/{fetch-error-CimrygMq.d.mts → fetch-error-BQMdPvge.d.mts} +0 -0
  93. /package/dist/{fetch-error-BFIoojjf.mjs → fetch-error-C6qffTl2.mjs} +0 -0
  94. /package/dist/{head-BsSTGnIe.d.mts → head-JAH2l3fg.d.mts} +0 -0
  95. /package/dist/{headers-VkAnACKX.mjs → headers-BNWymgnH.mjs} +0 -0
  96. /package/dist/{package-json-B2TD0JLu.mjs → package-json-Bg_GJdJB.mjs} +0 -0
  97. /package/dist/{pg-CMZ_5wsC.mjs → pg-CempqvEJ.mjs} +0 -0
  98. /package/dist/{providers-3Kkv63Ha.d.mts → providers-BkiAlEad.d.mts} +0 -0
  99. /package/dist/{runner-pg-Cv9V7ydr.mjs → runner-pg-BAheiT6v.mjs} +0 -0
  100. /package/dist/{skills-BRKc--As.mjs → skills--OMgLmXW.mjs} +0 -0
  101. /package/dist/{standard-schema-Dnsh2vnl.d.mts → standard-schema-BCBv-QaP.d.mts} +0 -0
  102. /package/dist/{subcommand-prompt-OD-x_Tsm.mjs → subcommand-prompt-ClwpLlKD.mjs} +0 -0
  103. /package/dist/{types-DEWCqHtl.d.mts → types-BnHMXezo.d.mts} +0 -0
  104. /package/dist/{yarn-pnp-0SwYgQxx.mjs → yarn-pnp-DhCHHLAz.mjs} +0 -0
@@ -223,37 +223,58 @@ function page(title, message) {
223
223
  <style>:root{color-scheme:light dark}*{margin:0;padding:0;box-sizing:border-box}body{font-family:system-ui,-apple-system,sans-serif;min-height:100vh;display:flex;align-items:center;justify-content:center;background:#fafafa;color:#111}.card{text-align:center;padding:3rem}h1{font-size:1.5rem;font-weight:600;margin-bottom:.75rem}p{color:#666;font-size:1rem}@media (prefers-color-scheme:dark){body{background:#0a0a0a;color:#fafafa}p{color:#a3a3a3}}</style>
224
224
  </head><body><div class="card"><h1>${title}</h1><p>${message}</p></div></body></html>`;
225
225
  }
226
- function openBrowser(url, exec) {
226
+ function openBrowser(url, execFile) {
227
+ const ignore = () => {};
227
228
  if (process.platform === "win32") {
228
- exec(`start "" "${url}"`);
229
+ execFile("cmd.exe", [
230
+ "/c",
231
+ "start",
232
+ "",
233
+ url
234
+ ], ignore);
229
235
  return;
230
236
  }
231
237
  if (process.platform === "darwin") {
232
- exec(`open "${url}"`);
238
+ execFile("open", [url], ignore);
233
239
  return;
234
240
  }
235
241
  if (process.env.WSL_DISTRO_NAME || process.env.WSL_INTEROP) {
236
- exec(`wslview "${url}" 2>/dev/null || cmd.exe /c start "" "${url}" 2>/dev/null`);
242
+ execFile("wslview", [url], (error) => {
243
+ if (error) execFile("cmd.exe", [
244
+ "/c",
245
+ "start",
246
+ "",
247
+ url
248
+ ], ignore);
249
+ });
237
250
  return;
238
251
  }
239
- exec(`xdg-open "${url}"`);
252
+ execFile("xdg-open", [url], ignore);
240
253
  }
241
254
  /**
242
- * Start a local HTTP server, open the browser to the platform login page,
243
- * and wait for the OAuth callback with a short-lived code. The CLI exchanges
244
- * the code itself so the localhost callback never accepts bearer tokens.
255
+ * Start a local HTTP callback server, open the browser to a caller-built
256
+ * authorize URL, and wait for the redirect back to `http://localhost:PORT/callback`.
245
257
  *
246
- * `onUrl` is invoked with the login URL once the local server is listening,
247
- * so callers can show the URL to the user as a manual fallback when the
248
- * browser fails to open (common on WSL2, headless SSH, Docker, etc.).
258
+ * The server validates the `state` it appended to the callback URL against the
259
+ * incoming request, then runs the caller's `finalize` hook INSIDE the request
260
+ * handler (so the browser only ever sees the success page after the underlying
261
+ * exchange/link actually succeeded). On finalize success it renders the success
262
+ * HTML and resolves with finalize's return value; on finalize failure it
263
+ * renders the same "could not complete" failure page the login flow uses and
264
+ * rejects with the thrown error. The server is always closed before settling.
265
+ *
266
+ * `onUrl` is invoked with the authorize URL once the local server is listening,
267
+ * so callers can show the URL to the user as a manual fallback when the browser
268
+ * fails to open (common on WSL2, headless SSH, Docker, etc.). To match the
269
+ * login flow it fires immediately before the browser is opened.
270
+ *
271
+ * `execFile` is injectable so tests can avoid launching a real browser.
249
272
  */
250
- async function runLogin(root = process.cwd(), provider = "github", onUrl) {
273
+ async function awaitBrowserCallback(options) {
251
274
  const http = await import("node:http");
252
- const { exec } = await import("node:child_process");
253
- const apiUrl = getApiUrl(root);
254
- const state = randomBytes(32).toString("hex");
255
- const codeVerifier = createCodeVerifier();
256
- const codeChallenge = createCodeChallenge(codeVerifier);
275
+ const { state, buildAuthUrl, finalize, describeError, validate, onUrl } = options;
276
+ const timeoutMs = options.timeoutMs ?? 300 * 1e3;
277
+ const execFile = options.execFile ?? (await import("node:child_process")).execFile;
257
278
  return new Promise((resolve, reject) => {
258
279
  let settled = false;
259
280
  const fail = (error) => {
@@ -262,11 +283,11 @@ async function runLogin(root = process.cwd(), provider = "github", onUrl) {
262
283
  server.close();
263
284
  reject(error);
264
285
  };
265
- const succeed = (token) => {
286
+ const succeed = (result) => {
266
287
  if (settled) return;
267
288
  settled = true;
268
289
  server.close();
269
- resolve(token);
290
+ resolve(result);
270
291
  };
271
292
  const server = http.createServer(async (req, res) => {
272
293
  const url = new URL(req.url, `http://localhost`);
@@ -280,57 +301,93 @@ async function runLogin(root = process.cwd(), provider = "github", onUrl) {
280
301
  res.end(page("Login failed", "Invalid login callback. Please try again."));
281
302
  return;
282
303
  }
283
- if (url.searchParams.get("error") === "signup_restricted") {
304
+ const errorMessage = describeError?.(url.searchParams);
305
+ if (errorMessage) {
284
306
  res.writeHead(403, { "Content-Type": "text/html" });
285
- res.end(page("Signup restricted", "Your email is not on the approved list for this environment."));
286
- fail(/* @__PURE__ */ new Error("Signup restricted: your email is not on the approved list for this environment."));
287
- return;
288
- }
289
- if (url.searchParams.has("token")) {
290
- res.writeHead(400, { "Content-Type": "text/html" });
291
- res.end(page("Login failed", "Invalid login callback. Please try again."));
307
+ res.end(page("Login failed", errorMessage));
308
+ fail(new Error(errorMessage));
292
309
  return;
293
310
  }
294
- const code = url.searchParams.get("code");
295
- if (!code) {
311
+ const invalidMessage = validate?.(url.searchParams);
312
+ if (invalidMessage) {
296
313
  res.writeHead(400, { "Content-Type": "text/html" });
297
- res.end(page("Login failed", "No authorization code received. Please try again."));
314
+ res.end(page("Login failed", invalidMessage));
298
315
  return;
299
316
  }
300
- let token;
317
+ let result;
301
318
  try {
302
- token = await exchangeLoginCode(apiUrl, code, state, codeVerifier);
319
+ result = await finalize(url.searchParams);
303
320
  } catch (err) {
321
+ if (settled) return;
304
322
  res.writeHead(400, { "Content-Type": "text/html" });
305
323
  res.end(page("Login failed", "Could not complete login. Please try again."));
306
324
  fail(err instanceof Error ? err : /* @__PURE__ */ new Error("auth: Failed to complete login."));
307
325
  return;
308
326
  }
327
+ if (settled) return;
309
328
  res.writeHead(200, { "Content-Type": "text/html" });
310
329
  res.end(page("Login successful!", "You can close this tab and return to the terminal."));
311
- succeed(token);
330
+ succeed(result);
312
331
  });
313
332
  server.on("connection", (socket) => socket.unref());
314
- server.listen(0, "127.0.0.1", () => {
333
+ server.listen(0, "127.0.0.1", async () => {
315
334
  const addr = server.address();
316
335
  if (!addr || typeof addr === "string") {
317
- reject(/* @__PURE__ */ new Error("auth: Failed to start local callback server."));
336
+ fail(/* @__PURE__ */ new Error("auth: Failed to start local callback server."));
318
337
  return;
319
338
  }
320
339
  const port = addr.port;
321
- const redirect = new URL(`http://localhost:${port}/callback`);
322
- redirect.searchParams.set("state", state);
340
+ const callback = new URL(`http://localhost:${port}/callback`);
341
+ callback.searchParams.set("state", state);
342
+ let authUrl;
343
+ try {
344
+ authUrl = await buildAuthUrl(callback);
345
+ } catch (err) {
346
+ fail(err instanceof Error ? err : /* @__PURE__ */ new Error("auth: Failed to build authorize URL."));
347
+ return;
348
+ }
349
+ onUrl?.(authUrl);
350
+ openBrowser(authUrl, execFile);
351
+ });
352
+ setTimeout(() => {
353
+ fail(/* @__PURE__ */ new Error("auth: Login timed out after 5 minutes. Try again."));
354
+ }, timeoutMs).unref();
355
+ });
356
+ }
357
+ /**
358
+ * Start a local HTTP server, open the browser to the platform login page,
359
+ * and wait for the OAuth callback with a short-lived code. The CLI exchanges
360
+ * the code itself so the localhost callback never accepts bearer tokens.
361
+ *
362
+ * `onUrl` is invoked with the login URL once the local server is listening,
363
+ * so callers can show the URL to the user as a manual fallback when the
364
+ * browser fails to open (common on WSL2, headless SSH, Docker, etc.).
365
+ */
366
+ async function runLogin(root = process.cwd(), provider = "github", onUrl) {
367
+ const { execFile } = await import("node:child_process");
368
+ const apiUrl = getApiUrl(root);
369
+ const state = randomBytes(32).toString("hex");
370
+ const codeVerifier = createCodeVerifier();
371
+ const codeChallenge = createCodeChallenge(codeVerifier);
372
+ return awaitBrowserCallback({
373
+ state,
374
+ execFile,
375
+ onUrl,
376
+ buildAuthUrl: (callback) => {
323
377
  const loginUrl = new URL("auth/login", apiUrl.endsWith("/") ? apiUrl : `${apiUrl}/`);
324
- loginUrl.searchParams.set("redirect", redirect.href);
378
+ loginUrl.searchParams.set("redirect", callback.href);
325
379
  loginUrl.searchParams.set("provider", provider);
326
380
  loginUrl.searchParams.set("code_challenge", codeChallenge);
327
381
  loginUrl.searchParams.set("code_challenge_method", "S256");
328
- onUrl?.(loginUrl.href);
329
- openBrowser(loginUrl.href, exec);
330
- });
331
- setTimeout(() => {
332
- fail(/* @__PURE__ */ new Error("auth: Login timed out after 5 minutes. Try again."));
333
- }, 300 * 1e3).unref();
382
+ return loginUrl.href;
383
+ },
384
+ describeError: (p) => p.get("error") === "signup_restricted" ? "Signup restricted: your email is not on the approved list for this environment." : null,
385
+ validate: (p) => {
386
+ if (p.has("token")) return "Invalid login callback. Please try again.";
387
+ if (!p.get("code")) return "No authorization code received. Please try again.";
388
+ return null;
389
+ },
390
+ finalize: (params) => exchangeLoginCode(apiUrl, params.get("code"), state, codeVerifier)
334
391
  });
335
392
  }
336
393
  //#endregion
@@ -782,6 +839,53 @@ var PlatformClient = class {
782
839
  if (!res.ok) await throwPlatformApiError("Failed to fetch logs", res);
783
840
  return (await res.json()).data;
784
841
  }
842
+ async getGithubInstallUrl() {
843
+ const res = await fetch(`${this.baseUrl}/github/install-url`, { headers: { ...this.authHeaders } });
844
+ if (!res.ok) await throwPlatformApiError("Failed to get GitHub install URL", res);
845
+ return res.json();
846
+ }
847
+ async listGithubInstallations() {
848
+ const res = await fetch(`${this.baseUrl}/github/installations`, { headers: { ...this.authHeaders } });
849
+ if (!res.ok) await throwPlatformApiError("Failed to list GitHub installations", res);
850
+ return res.json();
851
+ }
852
+ async connectGithub(projectId, body) {
853
+ const res = await fetch(`${this.baseUrl}/projects/${projectId}/github`, {
854
+ method: "POST",
855
+ headers: {
856
+ "Content-Type": "application/json",
857
+ ...this.authHeaders
858
+ },
859
+ body: JSON.stringify(body)
860
+ });
861
+ if (!res.ok) await throwPlatformApiError("Failed to connect GitHub repository", res);
862
+ return res.json();
863
+ }
864
+ async getGithubLinkUrl(redirect, codeChallenge) {
865
+ const params = new URLSearchParams({
866
+ redirect,
867
+ code_challenge: codeChallenge,
868
+ code_challenge_method: "S256"
869
+ });
870
+ const res = await fetch(`${this.baseUrl}/github/link-url?${params}`, { headers: { ...this.authHeaders } });
871
+ if (!res.ok) await throwPlatformApiError("Failed to start GitHub link", res);
872
+ return res.json();
873
+ }
874
+ async completeGithubLink(linkCode, codeVerifier) {
875
+ const res = await fetch(`${this.baseUrl}/github/link/complete`, {
876
+ method: "POST",
877
+ headers: {
878
+ "Content-Type": "application/json",
879
+ ...this.authHeaders
880
+ },
881
+ body: JSON.stringify({
882
+ link_code: linkCode,
883
+ code_verifier: codeVerifier
884
+ })
885
+ });
886
+ if (!res.ok) await throwPlatformApiError("Failed to complete GitHub link", res);
887
+ return res.json();
888
+ }
785
889
  };
786
890
  //#endregion
787
- export { isExpiredTokenError as a, getToken as c, removeToken as d, runLogin as f, isCliOutdatedError as i, getTokenSource as l, PlatformClient as n, parsePlatformErrorBody as o, saveToken as p, client_exports as r, getSiteDomain as s, PlatformApiError as t, isStagingMode as u };
891
+ export { saveToken as _, isExpiredTokenError as a, createCodeChallenge as c, getToken as d, getTokenSource as f, runLogin as g, removeToken as h, isCliOutdatedError as i, createCodeVerifier as l, openBrowser as m, PlatformClient as n, parsePlatformErrorBody as o, isStagingMode as p, client_exports as r, awaitBrowserCallback as s, PlatformApiError as t, getSiteDomain as u };
@@ -1,6 +1,6 @@
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-DIfOFf1W.mjs";
3
+ import { t as PlatformApiError, u as getSiteDomain } from "./client-D4awzTnj.mjs";
4
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
6
  import { n as validateProjectSlug } from "./project-slug-rX3kTOfY.mjs";
@@ -2,15 +2,15 @@ import { a as join, c as resolve, r as extname, s as relative } from "./pathe.M-
2
2
  import { i as dim, n as cliTitle, s as import_picocolors } from "./output-DeiS4oEX.mjs";
3
3
  import { n as readProjectPaths } from "./project-paths-CCMrHYQm.mjs";
4
4
  import { t as cfAccessHeaders } from "./cf-access-DKDsgwOU.mjs";
5
- import { c as getToken, n as PlatformClient, t as PlatformApiError, u as isStagingMode } from "./client-DIfOFf1W.mjs";
5
+ import { d as getToken, n as PlatformClient, p as isStagingMode, t as PlatformApiError } from "./client-D4awzTnj.mjs";
6
6
  import { c as R, g as ge, v as ue, x as q, y as ye } from "./dist-abzUneor.mjs";
7
7
  import { r as readProjectConfig } from "./project-CH9pdo16.mjs";
8
8
  import { c as getDatabaseDialect, f as readConfig, p as resolveBindingNames } from "./config-8dLIngKW.mjs";
9
- import { r as detectFramework } from "./plugin-inference--7geW5Z2.mjs";
9
+ import { r as detectFramework } from "./plugin-inference-C3fLzFvP.mjs";
10
10
  import { a as writeJournal, i as stripSqlExt, r as readJournal, t as collectMigrations } from "./collect-9rO3JFNM.mjs";
11
11
  import { n as listDrizzleArtifacts, r as validateMigrations, t as assertJournalCoherence } from "./validate-CNWm-PsL.mjs";
12
12
  import { n as STAGING_PROXY_URL, t as DEFAULT_PROXY_URL } from "./proxy-M3pxItg2.mjs";
13
- import { formatTimestamp } from "./gen-O5mXZ76K.mjs";
13
+ import { formatTimestamp } from "./gen-Dgi4D7GC.mjs";
14
14
  import { existsSync, readFileSync, readdirSync, renameSync, rmSync, writeFileSync } from "node:fs";
15
15
  import { fileURLToPath, pathToFileURL } from "node:url";
16
16
  import { execFileSync } from "node:child_process";
@@ -103,7 +103,7 @@ async function runPush(root, dialect) {
103
103
  else {
104
104
  const { mkdirSync } = await import("node:fs");
105
105
  const { dirname } = await import("node:path");
106
- const { getMiniflareDatabasePath } = await import("./runner-DLZ9E_cX.mjs");
106
+ const { getMiniflareDatabasePath } = await import("./runner-BQyKUqAL.mjs");
107
107
  const dbPath = getMiniflareDatabasePath(getLocalD1PersistRoot(root), "local");
108
108
  mkdirSync(dirname(dbPath), { recursive: true });
109
109
  configPath = writeDrizzleConfig(root, dbPath);
@@ -161,7 +161,7 @@ async function runStatus(root, dialect) {
161
161
  localApplied = [];
162
162
  }
163
163
  else {
164
- const { getMiniflareDatabasePath, getAppliedMigrations } = await import("./runner-DLZ9E_cX.mjs");
164
+ const { getMiniflareDatabasePath, getAppliedMigrations } = await import("./runner-BQyKUqAL.mjs");
165
165
  localApplied = await getAppliedMigrations(getMiniflareDatabasePath(getLocalD1PersistRoot(root), "local"));
166
166
  }
167
167
  const localSet = new Set(localApplied.map((m) => m.name));
@@ -219,7 +219,7 @@ async function resetDatabase(root, dialect) {
219
219
  });
220
220
  return migrations.length;
221
221
  }
222
- const { getMiniflareDatabasePath, runMigrations } = await import("./runner-DLZ9E_cX.mjs");
222
+ const { getMiniflareDatabasePath, runMigrations } = await import("./runner-BQyKUqAL.mjs");
223
223
  const dbPath = getMiniflareDatabasePath(getLocalD1PersistRoot(root), "local");
224
224
  rmSync(dbPath, { force: true });
225
225
  rmSync(dbPath + "-wal", { force: true });
@@ -246,7 +246,7 @@ async function runSeed(root, file, dialect) {
246
246
  ye("Done.");
247
247
  return;
248
248
  }
249
- const { getMiniflareDatabasePath, openSqliteDatabase } = await import("./runner-DLZ9E_cX.mjs");
249
+ const { getMiniflareDatabasePath, openSqliteDatabase } = await import("./runner-BQyKUqAL.mjs");
250
250
  const db = await openSqliteDatabase(getMiniflareDatabasePath(getLocalD1PersistRoot(root), "local"));
251
251
  try {
252
252
  db.exec(sql);
@@ -409,7 +409,7 @@ async function runExecute(root, command, file, dialect, remote) {
409
409
  ye("Done.");
410
410
  return;
411
411
  }
412
- const { getMiniflareDatabasePath, openSqliteDatabase } = await import("./runner-DLZ9E_cX.mjs");
412
+ const { getMiniflareDatabasePath, openSqliteDatabase } = await import("./runner-BQyKUqAL.mjs");
413
413
  const dbPath = getMiniflareDatabasePath(getLocalD1PersistRoot(root), "local");
414
414
  if (!existsSync(dbPath)) {
415
415
  R.error("No local database found. Run `void dev` first.");
@@ -512,7 +512,7 @@ async function runMigrate(root, dialect, remote) {
512
512
  return;
513
513
  }
514
514
  if (dialect === "postgresql") {
515
- const { applyPgMigrations } = await import("./runner-pg-Cv9V7ydr.mjs");
515
+ const { applyPgMigrations } = await import("./runner-pg-BAheiT6v.mjs");
516
516
  const applied = await withPgClient(root, async (client) => {
517
517
  let existingRows = [];
518
518
  try {
@@ -536,7 +536,7 @@ async function runMigrate(root, dialect, remote) {
536
536
  ye("Done.");
537
537
  return;
538
538
  }
539
- const { getMiniflareDatabasePath, getAppliedMigrations, runMigrations } = await import("./runner-DLZ9E_cX.mjs");
539
+ const { getMiniflareDatabasePath, getAppliedMigrations, runMigrations } = await import("./runner-BQyKUqAL.mjs");
540
540
  const dbPath = getMiniflareDatabasePath(getLocalD1PersistRoot(root), "local");
541
541
  try {
542
542
  const existingRows = await getAppliedMigrations(dbPath);
@@ -601,7 +601,7 @@ async function runStudio(root, dialect, remote) {
601
601
  return;
602
602
  }
603
603
  const { writeDrizzleConfig } = await import("./config--wXmVOoe.mjs").then((n) => n.t);
604
- const { getMiniflareDatabasePath } = await import("./runner-DLZ9E_cX.mjs");
604
+ const { getMiniflareDatabasePath } = await import("./runner-BQyKUqAL.mjs");
605
605
  const dbPath = getMiniflareDatabasePath(getLocalD1PersistRoot(root), "local");
606
606
  if (!existsSync(dbPath)) {
607
607
  R.error("No local database found. Run `void dev` first.");
@@ -821,7 +821,7 @@ async function runRenameMigrations(root, dialect) {
821
821
  process.exit(1);
822
822
  }
823
823
  else {
824
- const { getMiniflareDatabasePath, openSqliteDatabase } = await import("./runner-DLZ9E_cX.mjs");
824
+ const { getMiniflareDatabasePath, openSqliteDatabase } = await import("./runner-BQyKUqAL.mjs");
825
825
  const dbPath = getMiniflareDatabasePath(getLocalD1PersistRoot(root), "local");
826
826
  if (existsSync(dbPath)) try {
827
827
  const db = await openSqliteDatabase(dbPath);
@@ -899,7 +899,7 @@ async function runExport(root, args, dialect) {
899
899
  } else process.stdout.write(output);
900
900
  return;
901
901
  }
902
- const { getMiniflareDatabasePath, openSqliteDatabase } = await import("./runner-DLZ9E_cX.mjs");
902
+ const { getMiniflareDatabasePath, openSqliteDatabase } = await import("./runner-BQyKUqAL.mjs");
903
903
  const dbPath = getMiniflareDatabasePath(getLocalD1PersistRoot(root), "local");
904
904
  if (!existsSync(dbPath)) {
905
905
  R.error("No local database found. Run `void dev` first.");
@@ -1027,7 +1027,7 @@ async function runSeedModule(root, seedPath, dialect) {
1027
1027
  return;
1028
1028
  }
1029
1029
  const { drizzle } = await import("drizzle-orm/better-sqlite3");
1030
- const { getMiniflareDatabasePath, openSqliteDatabase } = await import("./runner-DLZ9E_cX.mjs");
1030
+ const { getMiniflareDatabasePath, openSqliteDatabase } = await import("./runner-BQyKUqAL.mjs");
1031
1031
  const sqlite = await openSqliteDatabase(getMiniflareDatabasePath(getLocalD1PersistRoot(root), "local"));
1032
1032
  try {
1033
1033
  const options = getDrizzleSchemaOptions(schema);
@@ -1,5 +1,5 @@
1
1
  import { n as cliTitle, r as createSpinner } from "./output-DeiS4oEX.mjs";
2
- import { c as getToken, n as PlatformClient } from "./client-DIfOFf1W.mjs";
2
+ import { d as getToken, n as PlatformClient } from "./client-D4awzTnj.mjs";
3
3
  import { _ as me, c as R, g as ge, l as Re, u as Se, x as q, y as ye } from "./dist-abzUneor.mjs";
4
4
  import { i as removeProjectConfig, r as readProjectConfig } from "./project-CH9pdo16.mjs";
5
5
  import { r as resolveProjectBySlug } from "./resolve-project-D4O1_fZz.mjs";