void 0.10.2 → 0.10.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.
Files changed (69) hide show
  1. package/dist/{auth-cmd-DLvXvN-0.mjs → auth-cmd-CblKzAdD.mjs} +2 -2
  2. package/dist/{better-auth-shared-a7H3wk9J.d.mts → better-auth-shared-jkksALri.d.mts} +2 -2
  3. package/dist/build-cmd-CJQSRupz.mjs +140 -0
  4. package/dist/{cache-CHFZmqa5.mjs → cache-CMzjhxHh.mjs} +1 -1
  5. package/dist/{cancel-deploy-BwpT4U4a.mjs → cancel-deploy-S2N8NSv6.mjs} +1 -1
  6. package/dist/cli/cli.mjs +142 -31
  7. package/dist/{client-CTHvucDv.mjs → client-YIzxv2ZO.mjs} +12 -0
  8. package/dist/{create-project-CruTH_TQ.mjs → create-project-pLQdzEPe.mjs} +1 -1
  9. package/dist/{db-BxnfKs7f.mjs → db-hAmBumot.mjs} +3 -3
  10. package/dist/{delete-IQe1O4Re.mjs → delete-CfSe3EJO.mjs} +1 -1
  11. package/dist/{deploy-CuxXxVgz.mjs → deploy-DpOdwtla.mjs} +3 -3
  12. package/dist/{domain-Bq6kzr_T.mjs → domain-CkowysQx.mjs} +1 -1
  13. package/dist/{env-BD3U_0Av.mjs → env-CIwG2y7G.mjs} +1 -1
  14. package/dist/{env-helpers-ZatKyjen.d.mts → env-helpers-B_ks681T.d.mts} +1 -1
  15. package/dist/{gen-Dgi4D7GC.mjs → gen-q6McxXgE.mjs} +1 -1
  16. package/dist/{github-cmd-CD0Z8KCF.mjs → github-cmd-D3L0f93X.mjs} +18 -7
  17. package/dist/{handler-DczZlaXR.d.mts → handler-B7rCOy21.d.mts} +3 -3
  18. package/dist/index.d.mts +3 -3
  19. package/dist/index.mjs +5 -5
  20. package/dist/{init-CTe46nIr.mjs → init-CZP69LJu.mjs} +5 -5
  21. package/dist/{link-BGFW4pHD.mjs → link-BKLElphS.mjs} +2 -2
  22. package/dist/{list-CbGxdbe7.mjs → list-B7qXBBjo.mjs} +1 -1
  23. package/dist/{login-v4wle1vn.mjs → login-B3l_sDwT.mjs} +1 -1
  24. package/dist/{logs-BFgY5Vqc.mjs → logs-AXm660MB.mjs} +1 -1
  25. package/dist/{mcp-STKL-uWs.mjs → mcp-D2plINxM.mjs} +1 -1
  26. package/dist/pages/client.d.mts +1 -1
  27. package/dist/pages/head-client.d.mts +1 -1
  28. package/dist/pages/head.d.mts +1 -1
  29. package/dist/pages/index.d.mts +2 -2
  30. package/dist/pages/islands-plugin.d.mts +1 -1
  31. package/dist/pages/protocol.d.mts +2 -2
  32. package/dist/{project-cmd-DZh-vbEL.mjs → project-cmd-InegJruy.mjs} +8 -8
  33. package/dist/{protocol-63PHtCHS.d.mts → protocol-6UZCowS1.d.mts} +3 -3
  34. package/dist/{rollback-o0M0Qo_n.mjs → rollback-CHVE-DeT.mjs} +1 -1
  35. package/dist/runtime/auth.d.mts +1 -1
  36. package/dist/runtime/better-auth-pg.d.mts +1 -1
  37. package/dist/runtime/better-auth.d.mts +1 -1
  38. package/dist/runtime/client-react.d.mts +2 -2
  39. package/dist/runtime/client-solid.d.mts +2 -2
  40. package/dist/runtime/client-svelte.d.mts +2 -2
  41. package/dist/runtime/client-vue.d.mts +2 -2
  42. package/dist/runtime/client.d.mts +2 -2
  43. package/dist/runtime/env-helpers.d.mts +1 -1
  44. package/dist/runtime/env-public-client.d.mts +1 -1
  45. package/dist/runtime/env-public.d.mts +2 -2
  46. package/dist/runtime/fetch-stream.d.mts +1 -1
  47. package/dist/runtime/fetch.d.mts +1 -1
  48. package/dist/runtime/handler.d.mts +1 -1
  49. package/dist/runtime/live.d.mts +2 -2
  50. package/dist/runtime/validator.d.mts +1 -1
  51. package/dist/runtime/ws-server.d.mts +2 -2
  52. package/dist/runtime/ws.d.mts +3 -3
  53. package/dist/{secret-gs_yyGZL.mjs → secret-CVKwIOm3.mjs} +1 -1
  54. package/package.json +2 -2
  55. package/skills/void/docs/guide/pages-routing/markdown.md +12 -0
  56. package/skills/void/docs/node_modules/void/node_modules/@void/md/README.md +2 -1
  57. package/skills/void/docs/node_modules/void/node_modules/@void/md/node_modules/markdown-it-footnote/README.md +135 -0
  58. package/skills/void/docs/reference/cli.md +53 -14
  59. /package/dist/{auth-nEUVHuFI.d.mts → auth-Dz2CCn4T.d.mts} +0 -0
  60. /package/dist/{fetch-error-BQMdPvge.d.mts → fetch-error-B6RaJ-eZ.d.mts} +0 -0
  61. /package/dist/{head-JAH2l3fg.d.mts → head-eOUCWUNy.d.mts} +0 -0
  62. /package/dist/{prepare-DH2WnEpD.mjs → prepare-DRRboRqH.mjs} +0 -0
  63. /package/dist/{providers-BkiAlEad.d.mts → providers-BJIoduK9.d.mts} +0 -0
  64. /package/dist/{runner-pg-BAheiT6v.mjs → runner-pg-EuhrFW3D.mjs} +0 -0
  65. /package/dist/{skills--OMgLmXW.mjs → skills-Dl3u05da.mjs} +0 -0
  66. /package/dist/{standard-schema-BCBv-QaP.d.mts → standard-schema-Cy0lfeWv.d.mts} +0 -0
  67. /package/dist/{subcommand-prompt-ClwpLlKD.mjs → subcommand-prompt-B8ng0FTS.mjs} +0 -0
  68. /package/dist/{types-BnHMXezo.d.mts → types-BodZGegX.d.mts} +0 -0
  69. /package/dist/{yarn-pnp-DhCHHLAz.mjs → yarn-pnp-WLW2IHUY.mjs} +0 -0
@@ -1,6 +1,6 @@
1
- import { f as getToken, g as removeToken, n as PlatformClient } from "./client-CTHvucDv.mjs";
1
+ import { f as getToken, g as removeToken, n as PlatformClient } from "./client-YIzxv2ZO.mjs";
2
2
  import { c as R } from "./dist-abzUneor.mjs";
3
- import { n as runLoginCommand } from "./login-v4wle1vn.mjs";
3
+ import { n as runLoginCommand } from "./login-B3l_sDwT.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-nEUVHuFI.mjs";
2
- import { t as VoidAuthProvider } from "./providers-BkiAlEad.mjs";
1
+ import { i as VoidAuthConfig, n as AuthState } from "./auth-Dz2CCn4T.mjs";
2
+ import { t as VoidAuthProvider } from "./providers-BJIoduK9.mjs";
3
3
  import { DBFieldAttribute } from "better-auth/db";
4
4
  import { BetterAuthOptions, betterAuth } from "better-auth";
5
5
  import { Context } from "hono";
@@ -0,0 +1,140 @@
1
+ import { i as dim, n as cliTitle, s as import_picocolors } from "./output-DeiS4oEX.mjs";
2
+ import { f as getToken, n as PlatformClient, t as PlatformApiError } from "./client-YIzxv2ZO.mjs";
3
+ import { c as R, g as ge, y as ye } from "./dist-abzUneor.mjs";
4
+ import { r as readProjectConfig } from "./project-CH9pdo16.mjs";
5
+ import { r as resolveProjectBySlug, t as getRequestedProjectSlug } from "./resolve-project-D4O1_fZz.mjs";
6
+ import { appendFileSync, writeFileSync } from "node:fs";
7
+ //#region src/cli/build-cmd.ts
8
+ const POLL_MS = 1e3;
9
+ function sleep(ms) {
10
+ return new Promise((resolve) => setTimeout(resolve, ms));
11
+ }
12
+ /**
13
+ * Classifies a `getBuildLogs` failure during a follow/first-page fetch as fatal
14
+ * (surface + exit) vs transient (retry). A client error (4xx) is permanent —
15
+ * the build is gone, access was revoked, or the CLI is too old (426
16
+ * `cli_outdated`) — so retrying can't fix it; it is fatal, matching how the rest
17
+ * of the CLI surfaces 426 (see `deploy-errors.ts`, `github-cmd.ts`). The sole
18
+ * exception is 429 (rate limit), which IS transient. Everything else
19
+ * (5xx/timeout/DO-read blip) is transient and retried through.
20
+ */
21
+ function isFatalFollowError(err) {
22
+ return err instanceof PlatformApiError && err.status >= 400 && err.status < 500 && err.status !== 429;
23
+ }
24
+ /**
25
+ * Pure follow-loop: repeatedly fetch pages since a cursor, write each new
26
+ * line, and stop when the build reaches a terminal status. `fetchPage`,
27
+ * `write`, and `sleep` are injected so this is unit-testable. Returns the
28
+ * final status + terminal flag.
29
+ *
30
+ * A transient `fetchPage` failure (502/timeout/DO-read blip) must NOT kill the
31
+ * live tail: on catch we consult the injected `isFatal` — a fatal error
32
+ * (e.g. 401/403/404) rethrows, otherwise we call `onRetry` and retry from the
33
+ * SAME cursor on the next tick (no cursor advance, no write), so the tail
34
+ * survives blips instead of exiting the CLI.
35
+ */
36
+ async function followBuildLogs(opts) {
37
+ let cursor = opts.since;
38
+ let status = opts.status;
39
+ const pollMs = opts.pollMs ?? POLL_MS;
40
+ for (;;) {
41
+ await opts.sleep(pollMs);
42
+ let pageResult;
43
+ try {
44
+ pageResult = await opts.fetchPage(cursor);
45
+ } catch (err) {
46
+ if (opts.isFatal?.(err)) throw err;
47
+ opts.onRetry?.(err);
48
+ continue;
49
+ }
50
+ for (const l of pageResult.lines) opts.write(l.line);
51
+ cursor = pageResult.lastSeq;
52
+ status = pageResult.status;
53
+ if (pageResult.terminal) return {
54
+ status,
55
+ terminal: true
56
+ };
57
+ }
58
+ }
59
+ async function runBuildCommand(root, args) {
60
+ if (args.subcommand === "logs") return runBuildLogsCommand(root, args);
61
+ }
62
+ async function runBuildLogsCommand(root, args) {
63
+ console.log();
64
+ ge(cliTitle("build logs"));
65
+ const token = getToken(root);
66
+ if (!token) {
67
+ R.error("Not logged in. Run `void auth login` first.");
68
+ process.exit(1);
69
+ }
70
+ const client = new PlatformClient(token, { root });
71
+ let projectId;
72
+ const requestedSlug = getRequestedProjectSlug({ projectSlug: args.projectName });
73
+ if (requestedSlug) {
74
+ const resolved = resolveProjectBySlug(await client.listProjects(), requestedSlug);
75
+ if (!resolved) {
76
+ R.error(`build: No project found with slug '${requestedSlug}'.`);
77
+ process.exit(1);
78
+ }
79
+ projectId = resolved.projectId;
80
+ } else {
81
+ const linked = readProjectConfig(root);
82
+ if (!linked) {
83
+ R.error("build: No project specified. Pass a project with --project <slug>, set VOID_PROJECT, or link one with `void project link`.");
84
+ process.exit(1);
85
+ }
86
+ projectId = linked.projectId;
87
+ }
88
+ let buildId = args.buildId;
89
+ if (!buildId) {
90
+ const builds = await client.listBuilds(projectId, 1);
91
+ if (builds.length === 0) {
92
+ ye("No builds found. Push to your connected branch to trigger one.");
93
+ return;
94
+ }
95
+ buildId = builds[0].id;
96
+ }
97
+ const write = args.output ? (line) => appendFileSync(args.output, `${line}\n`) : (line) => console.log(line);
98
+ const onRetry = (err) => R.warn(`build: transient error while following (${err instanceof Error ? err.message : String(err)}); retrying…`);
99
+ let first;
100
+ for (;;) try {
101
+ first = await client.getBuildLogs(projectId, buildId, 0);
102
+ break;
103
+ } catch (err) {
104
+ if (isFatalFollowError(err)) {
105
+ if (err instanceof PlatformApiError && err.status === 404) R.error(`build: Build '${buildId}' not found for this project.`);
106
+ else R.error(err instanceof Error ? err.message : String(err));
107
+ process.exit(1);
108
+ }
109
+ if (!args.follow) {
110
+ R.error(err instanceof Error ? err.message : String(err));
111
+ process.exit(1);
112
+ }
113
+ onRetry(err);
114
+ await sleep(POLL_MS);
115
+ }
116
+ if (first.external) {
117
+ R.message(`This build ran on GitHub Actions. View logs:\n${import_picocolors.default.cyan(first.external)}`);
118
+ return;
119
+ }
120
+ if (args.output) writeFileSync(args.output, "");
121
+ for (const l of first.lines) write(l.line);
122
+ let status = first.status;
123
+ let terminal = first.terminal;
124
+ if (args.follow && !terminal) ({status, terminal} = await followBuildLogs({
125
+ fetchPage: (since) => client.getBuildLogs(projectId, buildId, since),
126
+ write,
127
+ sleep,
128
+ since: first.lastSeq,
129
+ status,
130
+ isFatal: isFatalFollowError,
131
+ onRetry
132
+ }));
133
+ if (!terminal) {
134
+ ye(dim("Build still running — pass -f to follow."));
135
+ return;
136
+ }
137
+ ye(dim(`Build ${status}.`));
138
+ }
139
+ //#endregion
140
+ export { runBuildCommand };
@@ -1,5 +1,5 @@
1
1
  import { i as dim, n as cliTitle, r as createSpinner } from "./output-DeiS4oEX.mjs";
2
- import { f as getToken, n as PlatformClient } from "./client-CTHvucDv.mjs";
2
+ import { f as getToken, n as PlatformClient } from "./client-YIzxv2ZO.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
5
  import { r as resolveProjectBySlug, t as getRequestedProjectSlug } from "./resolve-project-D4O1_fZz.mjs";
@@ -1,5 +1,5 @@
1
1
  import { n as cliTitle } from "./output-DeiS4oEX.mjs";
2
- import { f as getToken, n as PlatformClient } from "./client-CTHvucDv.mjs";
2
+ import { f as getToken, n as PlatformClient } from "./client-YIzxv2ZO.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
@@ -74,6 +74,46 @@ function parseAuthArgs(args) {
74
74
  return { subcommand };
75
75
  }
76
76
  //#endregion
77
+ //#region src/cli/build-args.ts
78
+ const buildSubcommands = [{
79
+ name: "logs",
80
+ arg: "[build]",
81
+ description: "Stream, tail, or download logs for a build"
82
+ }];
83
+ function parseBuildArgs(args) {
84
+ const subcommand = args[0];
85
+ const rest = args.slice(1);
86
+ if (subcommand !== "logs") throw new Error("build: Usage: void build logs [build] [--follow] [--output <file>] [--project <slug>].");
87
+ let buildId;
88
+ let follow = false;
89
+ let output;
90
+ let projectName;
91
+ for (let i = 0; i < rest.length; i++) {
92
+ const arg = rest[i];
93
+ if (arg === "-f" || arg === "--follow") follow = true;
94
+ else if (arg === "-o" || arg === "--output") {
95
+ if (i + 1 >= rest.length) throw new Error("build: --output requires a value.");
96
+ const value = rest[++i];
97
+ if (value.trim() === "") throw new Error("build: --output requires a value.");
98
+ output = value;
99
+ } else if (arg === "-p" || arg === "--project") {
100
+ if (i + 1 >= rest.length) throw new Error("build: --project requires a value.");
101
+ const value = rest[++i];
102
+ if (value.trim() === "") throw new Error("build: --project requires a value.");
103
+ projectName = value;
104
+ } else if (arg.startsWith("-")) throw new Error(`build: Unexpected argument '${arg}'.`);
105
+ else if (buildId) throw new Error(`build: Unexpected argument '${arg}'.`);
106
+ else buildId = arg;
107
+ }
108
+ return {
109
+ subcommand,
110
+ buildId,
111
+ follow,
112
+ output,
113
+ projectName
114
+ };
115
+ }
116
+ //#endregion
77
117
  //#region src/cli/db-args.ts
78
118
  const dbSubcommands = [
79
119
  {
@@ -593,7 +633,7 @@ const githubSubcommands = [
593
633
  {
594
634
  name: "update",
595
635
  arg: "[project]",
596
- description: "Update an existing connection's branch or build executor"
636
+ description: "Update an existing connection's branch, build executor, or deploy workflow"
597
637
  },
598
638
  {
599
639
  name: "link",
@@ -620,6 +660,7 @@ function parseGithubArgs(args) {
620
660
  let repo;
621
661
  let branch;
622
662
  let executor;
663
+ let workflowPath;
623
664
  for (let i = 0; i < rest.length; i++) {
624
665
  const arg = rest[i];
625
666
  if (arg === "--installation") {
@@ -649,6 +690,11 @@ function parseGithubArgs(args) {
649
690
  if (value.trim() === "") throw new Error("github: --executor requires a value.");
650
691
  if (value !== "container" && value !== "github_actions") throw new Error("github: invalid --executor (expected container|github_actions).");
651
692
  executor = value;
693
+ } else if (arg === "--workflow") {
694
+ if (i + 1 >= rest.length) throw new Error("github: --workflow requires a value.");
695
+ const value = rest[++i];
696
+ if (value.trim() === "") throw new Error("github: --workflow requires a value.");
697
+ workflowPath = value.trim();
652
698
  } else if (arg.startsWith("-")) throw new Error(`github: Unexpected argument '${arg}'.`);
653
699
  else if (projectName) throw new Error(`github: Unexpected argument '${arg}'.`);
654
700
  else projectName = arg;
@@ -659,13 +705,15 @@ function parseGithubArgs(args) {
659
705
  installationId,
660
706
  repo,
661
707
  branch,
662
- executor
708
+ executor,
709
+ workflowPath
663
710
  };
664
711
  }
665
712
  if (subcommand === "update") {
666
713
  let projectName = "";
667
714
  let branch;
668
715
  let executor;
716
+ let workflowPath;
669
717
  for (let i = 0; i < rest.length; i++) {
670
718
  const arg = rest[i];
671
719
  if (arg === "--branch") {
@@ -685,6 +733,11 @@ function parseGithubArgs(args) {
685
733
  if (value.trim() === "") throw new Error("github: --executor requires a value.");
686
734
  if (value !== "container" && value !== "github_actions") throw new Error("github: invalid --executor (expected container|github_actions).");
687
735
  executor = value;
736
+ } else if (arg === "--workflow") {
737
+ if (i + 1 >= rest.length) throw new Error("github: --workflow requires a value.");
738
+ const value = rest[++i];
739
+ if (value.trim() === "") throw new Error("github: --workflow requires a value.");
740
+ workflowPath = value.trim();
688
741
  } else if (arg.startsWith("-")) throw new Error(`github: Unexpected argument '${arg}'.`);
689
742
  else if (projectName) throw new Error(`github: Unexpected argument '${arg}'.`);
690
743
  else projectName = arg;
@@ -693,7 +746,8 @@ function parseGithubArgs(args) {
693
746
  subcommand,
694
747
  projectName,
695
748
  branch,
696
- executor
749
+ executor,
750
+ workflowPath
697
751
  };
698
752
  }
699
753
  throw new Error("github: Usage: void github <install|installations|connect|update|link>.");
@@ -1008,7 +1062,7 @@ const HELP_TREE = {
1008
1062
  },
1009
1063
  {
1010
1064
  command: "update [project]",
1011
- description: "Update an existing connection's branch or build executor"
1065
+ description: "Update an existing connection's branch, build executor, or deploy workflow"
1012
1066
  },
1013
1067
  {
1014
1068
  command: "link",
@@ -1042,6 +1096,10 @@ const HELP_TREE = {
1042
1096
  {
1043
1097
  command: "--executor <type>",
1044
1098
  description: "Build executor: container (default) | github_actions"
1099
+ },
1100
+ {
1101
+ command: "--workflow <path>",
1102
+ description: "Authorized deploy workflow file (default .github/workflows/void-deploy.yml)"
1045
1103
  }
1046
1104
  ],
1047
1105
  examples: [{
@@ -1053,7 +1111,7 @@ const HELP_TREE = {
1053
1111
  }]
1054
1112
  },
1055
1113
  update: {
1056
- summary: "Update an existing connection's branch or build executor.",
1114
+ summary: "Update an existing connection's branch, build executor, or deploy workflow.",
1057
1115
  usage: ["void github update [project] [options]"],
1058
1116
  options: [
1059
1117
  {
@@ -1067,6 +1125,10 @@ const HELP_TREE = {
1067
1125
  {
1068
1126
  command: "--executor <type>",
1069
1127
  description: "New build executor: container | github_actions"
1128
+ },
1129
+ {
1130
+ command: "--workflow <path>",
1131
+ description: "New authorized deploy workflow file (under .github/workflows/)"
1070
1132
  }
1071
1133
  ],
1072
1134
  examples: [{
@@ -1079,6 +1141,46 @@ const HELP_TREE = {
1079
1141
  }
1080
1142
  }
1081
1143
  },
1144
+ build: {
1145
+ summary: "Inspect remote builds.",
1146
+ usage: ["void build <command>"],
1147
+ commands: [{
1148
+ command: "logs [build]",
1149
+ description: "Stream, tail, or download logs for a build"
1150
+ }],
1151
+ children: { logs: {
1152
+ summary: "Stream, tail, or download logs for a build.",
1153
+ usage: ["void build logs [build] [options]"],
1154
+ options: [
1155
+ {
1156
+ command: "--follow, -f",
1157
+ description: "Live-tail until the build finishes"
1158
+ },
1159
+ {
1160
+ command: "--output <file>, -o",
1161
+ description: "Write logs to a file instead of stdout"
1162
+ },
1163
+ {
1164
+ command: "--project <slug>, -p",
1165
+ description: "Target project (else linked / VOID_PROJECT)"
1166
+ }
1167
+ ],
1168
+ examples: [
1169
+ {
1170
+ command: "void build logs",
1171
+ description: "Print the latest build's logs"
1172
+ },
1173
+ {
1174
+ command: "void build logs -f",
1175
+ description: "Follow the latest build until it finishes"
1176
+ },
1177
+ {
1178
+ command: "void build logs bld_123 -o build.log",
1179
+ description: "Download a build's logs to a file"
1180
+ }
1181
+ ]
1182
+ } }
1183
+ },
1082
1184
  db: {
1083
1185
  summary: "Manage local and remote database state.",
1084
1186
  usage: ["void db <command>"],
@@ -1387,6 +1489,8 @@ function printGlobalHelp() {
1387
1489
  "",
1388
1490
  ...globalCommandGroup("github"),
1389
1491
  "",
1492
+ ...globalCommandGroup("build"),
1493
+ "",
1390
1494
  categoryTitle("database"),
1391
1495
  ...globalCommandLines("db", {
1392
1496
  execute: "execute <sql>",
@@ -1754,7 +1858,7 @@ async function runSubcommandGroup(command, subcommands, parse, run) {
1754
1858
  const sub = args[1];
1755
1859
  try {
1756
1860
  if ((!sub || sub.startsWith("-")) && process.stdin.isTTY) {
1757
- const { promptSubcommand } = await import("../subcommand-prompt-ClwpLlKD.mjs");
1861
+ const { promptSubcommand } = await import("../subcommand-prompt-B8ng0FTS.mjs");
1758
1862
  const result = await promptSubcommand(command, subcommands);
1759
1863
  if (!result) process.exit(0);
1760
1864
  await run(root, parse(buildArgs(result, args.slice(1))));
@@ -1783,7 +1887,7 @@ else if (command === "deploy") {
1783
1887
  R.error(err instanceof Error ? err.message : String(err));
1784
1888
  process.exit(1);
1785
1889
  }
1786
- import("../deploy-CuxXxVgz.mjs").then((n) => n.t).then(({ runDeploy }) => {
1890
+ import("../deploy-DpOdwtla.mjs").then((n) => n.t).then(({ runDeploy }) => {
1787
1891
  runDeploy(root, {
1788
1892
  projectSlug: deployArgs.projectSlug,
1789
1893
  dir: deployArgs.dir,
@@ -1795,14 +1899,15 @@ else if (command === "deploy") {
1795
1899
  process.exit(1);
1796
1900
  });
1797
1901
  });
1798
- } else if (command === "auth") runSubcommandGroup("auth", authSubcommands, parseAuthArgs, (root, parsed) => import("../auth-cmd-DLvXvN-0.mjs").then(({ runAuthCommand }) => runAuthCommand(root, parsed)));
1799
- else if (command === "project") runSubcommandGroup("project", projectSubcommands, parseProjectArgs, (root, parsed) => import("../project-cmd-DZh-vbEL.mjs").then(({ runProjectCommand }) => runProjectCommand(root, parsed)));
1800
- else if (command === "secret") runSubcommandGroup("secret", secretSubcommands, parseSecretArgs, (root, parsed) => import("../secret-gs_yyGZL.mjs").then(({ runSecretCommand }) => runSecretCommand(root, parsed)));
1801
- else if (command === "domain") runSubcommandGroup("domain", domainSubcommands, parseDomainArgs, (root, parsed) => import("../domain-Bq6kzr_T.mjs").then(({ runDomainCommand }) => runDomainCommand(root, parsed)));
1802
- else if (command === "db") runSubcommandGroup("db", dbSubcommands, parseDbArgs, (root, parsed) => import("../db-BxnfKs7f.mjs").then(({ runDbCommand }) => runDbCommand(root, parsed)));
1803
- else if (command === "env") runSubcommandGroup("env", envSubcommands, parseEnvArgs, (root, parsed) => import("../env-BD3U_0Av.mjs").then(({ runEnvCommand }) => runEnvCommand(root, parsed)));
1804
- else if (command === "gen") runSubcommandGroup("gen", genSubcommands, parseGenArgs, (root, parsed) => import("../gen-Dgi4D7GC.mjs").then(({ runGenCommand }) => runGenCommand(root, parsed)));
1805
- else if (command === "github") runSubcommandGroup("github", githubSubcommands, parseGithubArgs, (root, parsed) => import("../github-cmd-CD0Z8KCF.mjs").then(({ runGithubCommand }) => runGithubCommand(root, parsed)));
1902
+ } else if (command === "auth") runSubcommandGroup("auth", authSubcommands, parseAuthArgs, (root, parsed) => import("../auth-cmd-CblKzAdD.mjs").then(({ runAuthCommand }) => runAuthCommand(root, parsed)));
1903
+ else if (command === "project") runSubcommandGroup("project", projectSubcommands, parseProjectArgs, (root, parsed) => import("../project-cmd-InegJruy.mjs").then(({ runProjectCommand }) => runProjectCommand(root, parsed)));
1904
+ else if (command === "secret") runSubcommandGroup("secret", secretSubcommands, parseSecretArgs, (root, parsed) => import("../secret-CVKwIOm3.mjs").then(({ runSecretCommand }) => runSecretCommand(root, parsed)));
1905
+ else if (command === "domain") runSubcommandGroup("domain", domainSubcommands, parseDomainArgs, (root, parsed) => import("../domain-CkowysQx.mjs").then(({ runDomainCommand }) => runDomainCommand(root, parsed)));
1906
+ else if (command === "db") runSubcommandGroup("db", dbSubcommands, parseDbArgs, (root, parsed) => import("../db-hAmBumot.mjs").then(({ runDbCommand }) => runDbCommand(root, parsed)));
1907
+ else if (command === "env") runSubcommandGroup("env", envSubcommands, parseEnvArgs, (root, parsed) => import("../env-CIwG2y7G.mjs").then(({ runEnvCommand }) => runEnvCommand(root, parsed)));
1908
+ else if (command === "gen") runSubcommandGroup("gen", genSubcommands, parseGenArgs, (root, parsed) => import("../gen-q6McxXgE.mjs").then(({ runGenCommand }) => runGenCommand(root, parsed)));
1909
+ else if (command === "github") runSubcommandGroup("github", githubSubcommands, parseGithubArgs, (root, parsed) => import("../github-cmd-D3L0f93X.mjs").then(({ runGithubCommand }) => runGithubCommand(root, parsed)));
1910
+ else if (command === "build") runSubcommandGroup("build", buildSubcommands, parseBuildArgs, (root, parsed) => import("../build-cmd-CJQSRupz.mjs").then(({ runBuildCommand }) => runBuildCommand(root, parsed)));
1806
1911
  else if (command === "prepare") {
1807
1912
  const root = process.cwd();
1808
1913
  let prepareArgs;
@@ -1812,7 +1917,7 @@ else if (command === "prepare") {
1812
1917
  R.error(err instanceof Error ? err.message : String(err));
1813
1918
  process.exit(1);
1814
1919
  }
1815
- import("../prepare-DH2WnEpD.mjs").then(({ runPrepareCommand }) => {
1920
+ import("../prepare-DRRboRqH.mjs").then(({ runPrepareCommand }) => {
1816
1921
  runPrepareCommand(root, prepareArgs).catch((err) => {
1817
1922
  R.error(err.message ?? err);
1818
1923
  process.exit(1);
@@ -1820,7 +1925,7 @@ else if (command === "prepare") {
1820
1925
  });
1821
1926
  } else if (command === "init") {
1822
1927
  const root = process.cwd();
1823
- import("../init-CTe46nIr.mjs").then(({ runInitCommand, parseInitArgs }) => {
1928
+ import("../init-CZP69LJu.mjs").then(({ runInitCommand, parseInitArgs }) => {
1824
1929
  let initArgs;
1825
1930
  try {
1826
1931
  initArgs = parseInitArgs(args.slice(1));
@@ -1833,7 +1938,7 @@ else if (command === "prepare") {
1833
1938
  process.exit(1);
1834
1939
  });
1835
1940
  });
1836
- } else if (command === "mcp") import("../mcp-STKL-uWs.mjs").then(({ runMcp }) => {
1941
+ } else if (command === "mcp") import("../mcp-D2plINxM.mjs").then(({ runMcp }) => {
1837
1942
  runMcp();
1838
1943
  });
1839
1944
  else if (command === "-v" || command === "--version") {
@@ -1877,6 +1982,11 @@ else if (command === "-v" || command === "--version") {
1877
1982
  hint: "install | installations | connect | update | link",
1878
1983
  description: "Connect a GitHub repository for automatic deploys"
1879
1984
  },
1985
+ {
1986
+ name: "build",
1987
+ hint: "logs",
1988
+ description: "Inspect remote builds"
1989
+ },
1880
1990
  {
1881
1991
  name: "db",
1882
1992
  hint: "status | reset | seed | execute | migrate | studio | export | rename-migrations",
@@ -1907,37 +2017,38 @@ else if (command === "-v" || command === "--version") {
1907
2017
  ];
1908
2018
  (async () => {
1909
2019
  printVoidHeader();
1910
- const { promptSubcommand } = await import("../subcommand-prompt-ClwpLlKD.mjs");
2020
+ const { promptSubcommand } = await import("../subcommand-prompt-B8ng0FTS.mjs");
1911
2021
  const result = await promptSubcommand("", topLevelCommands);
1912
2022
  if (!result) process.exit(0);
1913
2023
  const cmd = result.subcommand;
1914
2024
  const root = process.cwd();
1915
2025
  switch (cmd) {
1916
2026
  case "init": {
1917
- const { runInitCommand, parseInitArgs } = await import("../init-CTe46nIr.mjs");
2027
+ const { runInitCommand, parseInitArgs } = await import("../init-CZP69LJu.mjs");
1918
2028
  await runInitCommand(root, parseInitArgs([]));
1919
2029
  return;
1920
2030
  }
1921
2031
  case "deploy": {
1922
- const { runDeploy } = await import("../deploy-CuxXxVgz.mjs").then((n) => n.t);
2032
+ const { runDeploy } = await import("../deploy-DpOdwtla.mjs").then((n) => n.t);
1923
2033
  await runDeploy(root);
1924
2034
  return;
1925
2035
  }
1926
2036
  case "mcp": {
1927
- const { runMcp } = await import("../mcp-STKL-uWs.mjs");
2037
+ const { runMcp } = await import("../mcp-D2plINxM.mjs");
1928
2038
  runMcp();
1929
2039
  return;
1930
2040
  }
1931
- case "auth": return runSubcommandGroup("auth", authSubcommands, parseAuthArgs, (r, p) => import("../auth-cmd-DLvXvN-0.mjs").then(({ runAuthCommand }) => runAuthCommand(r, p)));
1932
- case "project": return runSubcommandGroup("project", projectSubcommands, parseProjectArgs, (r, p) => import("../project-cmd-DZh-vbEL.mjs").then(({ runProjectCommand }) => runProjectCommand(r, p)));
1933
- case "secret": return runSubcommandGroup("secret", secretSubcommands, parseSecretArgs, (r, p) => import("../secret-gs_yyGZL.mjs").then(({ runSecretCommand }) => runSecretCommand(r, p)));
1934
- case "domain": return runSubcommandGroup("domain", domainSubcommands, parseDomainArgs, (r, p) => import("../domain-Bq6kzr_T.mjs").then(({ runDomainCommand }) => runDomainCommand(r, p)));
1935
- case "github": return runSubcommandGroup("github", githubSubcommands, parseGithubArgs, (r, p) => import("../github-cmd-CD0Z8KCF.mjs").then(({ runGithubCommand }) => runGithubCommand(r, p)));
1936
- case "db": return runSubcommandGroup("db", dbSubcommands, parseDbArgs, (r, p) => import("../db-BxnfKs7f.mjs").then(({ runDbCommand }) => runDbCommand(r, p)));
1937
- case "env": return runSubcommandGroup("env", envSubcommands, parseEnvArgs, (r, p) => import("../env-BD3U_0Av.mjs").then(({ runEnvCommand }) => runEnvCommand(r, p)));
1938
- case "gen": return runSubcommandGroup("gen", genSubcommands, parseGenArgs, (r, p) => import("../gen-Dgi4D7GC.mjs").then(({ runGenCommand }) => runGenCommand(r, p)));
2041
+ case "auth": return runSubcommandGroup("auth", authSubcommands, parseAuthArgs, (r, p) => import("../auth-cmd-CblKzAdD.mjs").then(({ runAuthCommand }) => runAuthCommand(r, p)));
2042
+ case "project": return runSubcommandGroup("project", projectSubcommands, parseProjectArgs, (r, p) => import("../project-cmd-InegJruy.mjs").then(({ runProjectCommand }) => runProjectCommand(r, p)));
2043
+ case "secret": return runSubcommandGroup("secret", secretSubcommands, parseSecretArgs, (r, p) => import("../secret-CVKwIOm3.mjs").then(({ runSecretCommand }) => runSecretCommand(r, p)));
2044
+ case "domain": return runSubcommandGroup("domain", domainSubcommands, parseDomainArgs, (r, p) => import("../domain-CkowysQx.mjs").then(({ runDomainCommand }) => runDomainCommand(r, p)));
2045
+ case "github": return runSubcommandGroup("github", githubSubcommands, parseGithubArgs, (r, p) => import("../github-cmd-D3L0f93X.mjs").then(({ runGithubCommand }) => runGithubCommand(r, p)));
2046
+ case "build": return runSubcommandGroup("build", buildSubcommands, parseBuildArgs, (r, p) => import("../build-cmd-CJQSRupz.mjs").then(({ runBuildCommand }) => runBuildCommand(r, p)));
2047
+ case "db": return runSubcommandGroup("db", dbSubcommands, parseDbArgs, (r, p) => import("../db-hAmBumot.mjs").then(({ runDbCommand }) => runDbCommand(r, p)));
2048
+ case "env": return runSubcommandGroup("env", envSubcommands, parseEnvArgs, (r, p) => import("../env-CIwG2y7G.mjs").then(({ runEnvCommand }) => runEnvCommand(r, p)));
2049
+ case "gen": return runSubcommandGroup("gen", genSubcommands, parseGenArgs, (r, p) => import("../gen-q6McxXgE.mjs").then(({ runGenCommand }) => runGenCommand(r, p)));
1939
2050
  case "prepare": {
1940
- const { runPrepareCommand } = await import("../prepare-DH2WnEpD.mjs");
2051
+ const { runPrepareCommand } = await import("../prepare-DRRboRqH.mjs");
1941
2052
  await runPrepareCommand(root, parsePrepareArgs([]));
1942
2053
  return;
1943
2054
  }
@@ -839,6 +839,18 @@ var PlatformClient = class {
839
839
  if (!res.ok) await throwPlatformApiError("Failed to fetch logs", res);
840
840
  return (await res.json()).data;
841
841
  }
842
+ async listBuilds(projectId, limit = 20) {
843
+ const params = new URLSearchParams({ limit: String(limit) });
844
+ const res = await fetch(`${this.baseUrl}/projects/${projectId}/builds?${params}`, { headers: { ...this.authHeaders } });
845
+ if (!res.ok) await throwPlatformApiError("Failed to list builds", res);
846
+ return (await res.json()).builds;
847
+ }
848
+ async getBuildLogs(projectId, buildId, since = 0) {
849
+ const params = new URLSearchParams({ since: String(since) });
850
+ const res = await fetch(`${this.baseUrl}/projects/${projectId}/builds/${buildId}/logs?${params}`, { headers: { ...this.authHeaders } });
851
+ if (!res.ok) await throwPlatformApiError("Failed to fetch build logs", res);
852
+ return res.json();
853
+ }
842
854
  async getGithubInstallUrl() {
843
855
  const res = await fetch(`${this.baseUrl}/github/install-url`, { headers: { ...this.authHeaders } });
844
856
  if (!res.ok) await throwPlatformApiError("Failed to get GitHub install URL", res);
@@ -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 { d as getSiteDomain, t as PlatformApiError } from "./client-CTHvucDv.mjs";
3
+ import { d as getSiteDomain, t as PlatformApiError } from "./client-YIzxv2ZO.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,7 +2,7 @@ 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 { f as getToken, m as isStagingMode, n as PlatformClient, t as PlatformApiError } from "./client-CTHvucDv.mjs";
5
+ import { f as getToken, m as isStagingMode, n as PlatformClient, t as PlatformApiError } from "./client-YIzxv2ZO.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";
@@ -10,7 +10,7 @@ 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-Dgi4D7GC.mjs";
13
+ import { formatTimestamp } from "./gen-q6McxXgE.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";
@@ -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-BAheiT6v.mjs");
515
+ const { applyPgMigrations } = await import("./runner-pg-EuhrFW3D.mjs");
516
516
  const applied = await withPgClient(root, async (client) => {
517
517
  let existingRows = [];
518
518
  try {
@@ -1,5 +1,5 @@
1
1
  import { n as cliTitle, r as createSpinner } from "./output-DeiS4oEX.mjs";
2
- import { f as getToken, n as PlatformClient } from "./client-CTHvucDv.mjs";
2
+ import { f as getToken, n as PlatformClient } from "./client-YIzxv2ZO.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";
@@ -4,7 +4,7 @@ import { n as cliTitle, r as createSpinner, s as import_picocolors } from "./out
4
4
  import { i as resolveProjectPaths, n as readProjectPaths } from "./project-paths-CCMrHYQm.mjs";
5
5
  import { t as findVoidAuthConfig } from "./config-hhMYPVRT.mjs";
6
6
  import { t as cfAccessHeaders } from "./cf-access-DKDsgwOU.mjs";
7
- import { a as isExpiredTokenError, f as getToken, i as isCliOutdatedError, m as isStagingMode, n as PlatformClient, o as parsePlatformErrorBody, p as getTokenSource, t as PlatformApiError, u as getApiUrl, y as ensureCloudflaredToken } from "./client-CTHvucDv.mjs";
7
+ import { a as isExpiredTokenError, f as getToken, i as isCliOutdatedError, m as isStagingMode, n as PlatformClient, o as parsePlatformErrorBody, p as getTokenSource, t as PlatformApiError, u as getApiUrl, y as ensureCloudflaredToken } from "./client-YIzxv2ZO.mjs";
8
8
  import { c as R, g as ge, u as Se, v as ue, x as q, y as ye } from "./dist-abzUneor.mjs";
9
9
  import { a as writeProjectConfig, r as readProjectConfig } from "./project-CH9pdo16.mjs";
10
10
  import { c as getDatabaseDialect, f as readConfig, l as isNodeTarget, p as resolveBindingNames } from "./config-8dLIngKW.mjs";
@@ -20,11 +20,11 @@ import { n as buildMigrationPlanBundle } from "./plan-aD3wRDqF.mjs";
20
20
  import { r as validateMigrations, t as assertJournalCoherence } from "./validate-CNWm-PsL.mjs";
21
21
  import { t as scanPages } from "./scan-VCAM1oh3.mjs";
22
22
  import { n as STAGING_PROXY_URL, t as DEFAULT_PROXY_URL } from "./proxy-M3pxItg2.mjs";
23
- import { i as promptProjectSetupAction, n as promptAndCreateProject, r as promptProjectSelection } from "./create-project-CruTH_TQ.mjs";
23
+ import { i as promptProjectSetupAction, n as promptAndCreateProject, r as promptProjectSelection } from "./create-project-pLQdzEPe.mjs";
24
24
  import { r as resolveProjectBySlug, t as getRequestedProjectSlug } from "./resolve-project-D4O1_fZz.mjs";
25
25
  import { t as collectGitDeployMetadata } from "./git-metadata-Ce0AtSZL.mjs";
26
26
  import { n as lintDuplicateSources, r as mergeRoutingRules, t as lintDestinationSplats } from "./headers-BNWymgnH.mjs";
27
- import { t as promptForLoginToken } from "./login-v4wle1vn.mjs";
27
+ import { t as promptForLoginToken } from "./login-B3l_sDwT.mjs";
28
28
  import { i as resolveProjectCommand, n as detectPreset, r as formatProjectCommand, t as FRAMEWORK_PRESETS } from "./preset-B7ZQZn0u.mjs";
29
29
  import { createRequire } from "node:module";
30
30
  import { copyFileSync, cpSync, createWriteStream, existsSync, mkdirSync, mkdtempSync, readFileSync, readdirSync, renameSync, rmSync, unlinkSync, writeFileSync } from "node:fs";
@@ -1,5 +1,5 @@
1
1
  import { s as import_picocolors } from "./output-DeiS4oEX.mjs";
2
- import { f as getToken, n as PlatformClient } from "./client-CTHvucDv.mjs";
2
+ import { f as getToken, n as PlatformClient } from "./client-YIzxv2ZO.mjs";
3
3
  import { c as R, u as Se } from "./dist-abzUneor.mjs";
4
4
  import { r as readProjectConfig } from "./project-CH9pdo16.mjs";
5
5
  //#region src/cli/domain.ts
@@ -1,6 +1,6 @@
1
1
  import { a as join } from "./pathe.M-eThtNZ-BrPhGF_K.mjs";
2
2
  import { n as cliTitle } from "./output-DeiS4oEX.mjs";
3
- import { f as getToken, n as PlatformClient } from "./client-CTHvucDv.mjs";
3
+ import { f as getToken, n as PlatformClient } from "./client-YIzxv2ZO.mjs";
4
4
  import { c as R, g as ge, u as Se, y as ye } from "./dist-abzUneor.mjs";
5
5
  import { r as readProjectConfig } from "./project-CH9pdo16.mjs";
6
6
  import { r as generateEnvTypes, t as findEnvFile } from "./env-types-CaJaIRXU.mjs";
@@ -1,4 +1,4 @@
1
- import { t as StandardSchemaV1 } from "./standard-schema-BCBv-QaP.mjs";
1
+ import { t as StandardSchemaV1 } from "./standard-schema-Cy0lfeWv.mjs";
2
2
 
3
3
  //#region src/shared/env-mask.d.ts
4
4
  /** Per-key override set by `.secret()` / `.public()` on built-in helpers. */
@@ -7,7 +7,7 @@ import { c as getDatabaseDialect, f as readConfig } from "./config-8dLIngKW.mjs"
7
7
  import { n as writeDrizzleConfig } from "./config--wXmVOoe.mjs";
8
8
  import { r as readJournal, t as collectMigrations } from "./collect-9rO3JFNM.mjs";
9
9
  import { n as listDrizzleArtifacts, t as assertJournalCoherence } from "./validate-CNWm-PsL.mjs";
10
- import { t as buildDrizzleKitSpawnEnv } from "./yarn-pnp-DhCHHLAz.mjs";
10
+ import { t as buildDrizzleKitSpawnEnv } from "./yarn-pnp-WLW2IHUY.mjs";
11
11
  import { existsSync, mkdirSync, readFileSync, readdirSync, unlinkSync, writeFileSync } from "node:fs";
12
12
  import { fileURLToPath } from "node:url";
13
13
  import { spawnSync } from "node:child_process";