void 0.10.5 → 0.10.6
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/agents-Bmr5tFFb.mjs +1454 -0
- package/dist/{auth-cmd-UoCwfDQv.mjs → auth-cmd-DlgNwByu.mjs} +10 -10
- package/dist/{better-auth-shared-D0Mbmx5V.mjs → better-auth-shared-BQooDxbw.mjs} +1 -1
- package/dist/{better-auth-shared-jkksALri.d.mts → better-auth-shared-BvnM9px6.d.mts} +2 -2
- package/dist/{build-cmd-CVyuBHjP.mjs → build-cmd-Br8qL0rA.mjs} +15 -17
- package/dist/{cache-ACORQCIq.mjs → cache-wH-mP8UE.mjs} +10 -12
- package/dist/{cancel-deploy-Gi8zmoZC.mjs → cancel-deploy-BEBOEgtu.mjs} +16 -18
- package/dist/cli/cli.mjs +47 -49
- package/dist/{client-BlbnA92X.mjs → client-Cj96iiBH.mjs} +74 -8
- package/dist/{config-8dLIngKW.mjs → config-1twldYCW.mjs} +10 -10
- package/dist/{config-CbJS4Krx.mjs → config-BdUctCZD.mjs} +4 -4
- package/dist/{create-project-LjvkYziS.mjs → create-project-DD9n8Ho-.mjs} +28 -23
- package/dist/{db-C00yjN01.mjs → db-DjKE2-A-.mjs} +147 -149
- package/dist/{delete-CplfvTgU.mjs → delete-D2kr3Kmk.mjs} +13 -15
- package/dist/{deploy-CISNL5uK.mjs → deploy-C4PbkFyE.mjs} +97 -100
- package/dist/{discover-ZWuBvt22.mjs → discover-BuVVSAum.mjs} +3 -3
- package/dist/{dist-5cGIJHQQ.mjs → dist-BuiRJkTd.mjs} +59 -27
- package/dist/{domain-B4HpcgNG.mjs → domain-_luIsM_B.mjs} +14 -16
- package/dist/{env-DNMJpeVF.mjs → env-CO5XAS9t.mjs} +23 -25
- package/dist/{env-helpers-B_ks681T.d.mts → env-helpers-z4stu8uc.d.mts} +1 -1
- package/dist/{env-types-BS8cZead.mjs → env-types-D51bnR-c.mjs} +3 -3
- package/dist/{env-validation-BxbtBbjh.mjs → env-validation-CeC2FL66.mjs} +4 -4
- package/dist/{fetch-error-C6qffTl2.mjs → fetch-error-Dj3crt0e.mjs} +3 -3
- package/dist/{gen-C0pV2gRQ.mjs → gen-Cf79J4aw.mjs} +42 -44
- package/dist/{github-cmd-CwtLD1yI.mjs → github-cmd-DnqxyOsb.mjs} +88 -90
- package/dist/{handler-B7rCOy21.d.mts → handler-imD0UVDT.d.mts} +4 -5
- package/dist/{headers-BNWymgnH.mjs → headers-BwvFGhkx.mjs} +3 -3
- package/dist/index.d.mts +3 -3
- package/dist/index.mjs +102 -83
- package/dist/{init-D58GxCtt.mjs → init-KirOzVDs.mjs} +132 -134
- package/dist/link-CUmiosyb.mjs +45 -0
- package/dist/{list-CbNNjXTm.mjs → list-3GEw7b6m.mjs} +10 -12
- package/dist/{login-CvxxF_9z.mjs → login-DJReaT_Q.mjs} +14 -15
- package/dist/{logs-BDZ9AuhM.mjs → logs-D-rQ56Lq.mjs} +9 -11
- package/dist/{magic-string.es-C1Fb0uxq.mjs → magic-string.es-ZQjdJFFn.mjs} +3 -3
- package/dist/{mcp-C8BjRt_z.mjs → mcp-D7yc0dXY.mjs} +2 -3
- package/dist/{node-B07cZs0d.mjs → node-yFFk626c.mjs} +6 -6
- package/dist/{package-json-Bg_GJdJB.mjs → package-json-B0NuUWGd.mjs} +1 -1
- package/dist/pages/client.d.mts +1 -1
- package/dist/pages/client.mjs +2 -1
- package/dist/pages/head-client.d.mts +1 -1
- package/dist/pages/head.d.mts +1 -1
- package/dist/pages/index.d.mts +2 -2
- package/dist/pages/index.mjs +5 -5
- package/dist/pages/islands-plugin.d.mts +1 -1
- package/dist/pages/islands-plugin.mjs +3 -3
- package/dist/pages/protocol.d.mts +2 -2
- package/dist/pages/protocol.mjs +5 -2
- package/dist/{plugin-inference-D04iL1mW.mjs → plugin-inference-CJxi_fWI.mjs} +3 -3
- package/dist/{prepare-DUo9q8cM.mjs → prepare-C_cVurhP.mjs} +15 -18
- package/dist/{preset-D0My64KQ.mjs → preset-CVvwCeIy.mjs} +4 -4
- package/dist/{project-cmd-Dd1gNRdd.mjs → project-cmd-DnU7u9QF.mjs} +13 -14
- package/dist/{project-paths-CCMrHYQm.mjs → project-paths-tpdR1mJR.mjs} +2 -2
- package/dist/{project-tsconfig-DMBV55K2.mjs → project-tsconfig-D9uSVVpA.mjs} +2 -2
- package/dist/{protocol-6UZCowS1.d.mts → protocol-6hTJ04T1.d.mts} +3 -3
- package/dist/{resolve-project-D4O1_fZz.mjs → resolve-project-D2HI3TrG.mjs} +2 -2
- package/dist/{rollback-DzmCCrFg.mjs → rollback-Yh7bCKob.mjs} +21 -23
- package/dist/{route-types-BpSJEW20.mjs → route-types-CfKfhbIg.mjs} +234 -3
- package/dist/{runner-BQyKUqAL.mjs → runner-h272wcPj.mjs} +4 -5
- package/dist/{runner-pg-EuhrFW3D.mjs → runner-pg-waxJOnBb.mjs} +1 -1
- package/dist/runtime/ai.mjs +2 -2
- package/dist/runtime/auth.d.mts +1 -1
- package/dist/runtime/better-auth-pg.d.mts +1 -1
- package/dist/runtime/better-auth-pg.mjs +3 -3
- package/dist/runtime/better-auth.d.mts +1 -1
- package/dist/runtime/better-auth.mjs +2 -2
- package/dist/runtime/client-react.d.mts +2 -2
- package/dist/runtime/client-react.mjs +1 -1
- package/dist/runtime/client-solid.d.mts +2 -2
- package/dist/runtime/client-solid.mjs +1 -1
- package/dist/runtime/client-svelte.d.mts +2 -2
- package/dist/runtime/client-svelte.mjs +1 -1
- package/dist/runtime/client-vue.d.mts +2 -2
- package/dist/runtime/client-vue.mjs +1 -1
- package/dist/runtime/client.d.mts +2 -2
- package/dist/runtime/client.mjs +1 -1
- package/dist/runtime/db-pg.d.mts +1 -1
- package/dist/runtime/env-helpers.d.mts +1 -1
- package/dist/runtime/env-public-client.d.mts +1 -1
- package/dist/runtime/env-public-client.mjs +2 -0
- package/dist/runtime/env-public.d.mts +3 -4
- package/dist/runtime/env-public.mjs +3 -1
- package/dist/runtime/env.mjs +1 -1
- package/dist/runtime/fetch-stream.d.mts +1 -1
- package/dist/runtime/fetch-stream.mjs +1 -1
- package/dist/runtime/fetch.d.mts +1 -1
- package/dist/runtime/fetch.mjs +1 -1
- package/dist/runtime/handler.d.mts +2 -2
- package/dist/runtime/handler.mjs +1 -1
- package/dist/runtime/isr.mjs +1 -1
- package/dist/runtime/live-server.mjs +2 -0
- package/dist/runtime/live.d.mts +2 -2
- package/dist/runtime/live.mjs +3 -1
- package/dist/runtime/migration-handler-pg.mjs +1 -1
- package/dist/runtime/migration-handler.mjs +1 -1
- package/dist/runtime/remote/index.mjs +11 -1
- package/dist/runtime/sandbox.d.mts +1 -4
- package/dist/runtime/sandbox.mjs +1 -1
- package/dist/runtime/validator.d.mts +1 -1
- package/dist/runtime/ws-server.d.mts +2 -2
- package/dist/runtime/ws-server.mjs +2 -0
- package/dist/runtime/ws.d.mts +3 -3
- package/dist/runtime/ws.mjs +2 -0
- package/dist/{scan-VCAM1oh3.mjs → scan-Dp_Gyzs3.mjs} +3 -3
- package/dist/{scan---8wfN58.mjs → scan-i7Yz54fv.mjs} +26 -8
- package/dist/{secret-CMLYWkE-.mjs → secret-u7FRvg8d.mjs} +22 -24
- package/dist/{skills-Dl3u05da.mjs → skills-DsdNDtX3.mjs} +6 -7
- package/dist/{subcommand-prompt-B8ng0FTS.mjs → subcommand-prompt-DtES-oP6.mjs} +34 -35
- package/dist/sveltekit.mjs +1 -1
- package/dist/validate-DT7nFMlf.mjs +504 -0
- package/dist/{yarn-pnp-WLW2IHUY.mjs → yarn-pnp-CW8LB6g_.mjs} +1 -1
- package/package.json +19 -19
- package/skills/void/docs/node_modules/void/node_modules/@clack/prompts/CHANGELOG.md +94 -0
- package/skills/void/docs/node_modules/void/node_modules/@clack/prompts/README.md +32 -11
- package/skills/void/docs/node_modules/void/node_modules/@cloudflare/sandbox/README.md +45 -0
- package/skills/void/docs/node_modules/void/node_modules/@electric-sql/pglite/README.md +5 -5
- package/skills/void/docs/node_modules/void/node_modules/@types/node/README.md +1 -1
- package/skills/void/docs/node_modules/void/node_modules/@void/md/node_modules/@types/node/README.md +1 -1
- package/skills/void/docs/node_modules/void/node_modules/@void/md/node_modules/markdown-exit/README.md +4 -1
- package/skills/void/docs/node_modules/void/node_modules/@void/md/node_modules/markdown-it-attrs/README.md +29 -12
- package/skills/void/docs/node_modules/void/node_modules/@void/md/node_modules/tinyglobby/README.md +1 -1
- package/skills/void/docs/node_modules/void/node_modules/@void/md/node_modules/vite-plus/AGENTS.md +1 -0
- package/skills/void/docs/node_modules/void/node_modules/@void/md/node_modules/vite-plus/README.md +18 -6
- package/skills/void/docs/node_modules/void/node_modules/@void/md/node_modules/vite-plus/docs/config/build.md +1 -1
- package/skills/void/docs/node_modules/void/node_modules/@void/md/node_modules/vite-plus/docs/config/check.md +35 -0
- package/skills/void/docs/node_modules/void/node_modules/@void/md/node_modules/vite-plus/docs/config/create.md +70 -0
- package/skills/void/docs/node_modules/void/node_modules/@void/md/node_modules/vite-plus/docs/config/fmt.md +3 -1
- package/skills/void/docs/node_modules/void/node_modules/@void/md/node_modules/vite-plus/docs/config/index.md +11 -7
- package/skills/void/docs/node_modules/void/node_modules/@void/md/node_modules/vite-plus/docs/config/lint.md +3 -1
- package/skills/void/docs/node_modules/void/node_modules/@void/md/node_modules/vite-plus/docs/config/pack.md +1 -1
- package/skills/void/docs/node_modules/void/node_modules/@void/md/node_modules/vite-plus/docs/config/run.md +141 -26
- package/skills/void/docs/node_modules/void/node_modules/@void/md/node_modules/vite-plus/docs/config/staged.md +1 -1
- package/skills/void/docs/node_modules/void/node_modules/@void/md/node_modules/vite-plus/docs/config/test.md +1 -1
- package/skills/void/docs/node_modules/void/node_modules/@void/md/node_modules/vite-plus/docs/guide/automatic-data-tracking.md +145 -0
- package/skills/void/docs/node_modules/void/node_modules/@void/md/node_modules/vite-plus/docs/guide/cache.md +16 -28
- package/skills/void/docs/node_modules/void/node_modules/@void/md/node_modules/vite-plus/docs/guide/check.md +16 -0
- package/skills/void/docs/node_modules/void/node_modules/@void/md/node_modules/vite-plus/docs/guide/ci.md +15 -17
- package/skills/void/docs/node_modules/void/node_modules/@void/md/node_modules/vite-plus/docs/guide/commit-hooks.md +9 -0
- package/skills/void/docs/node_modules/void/node_modules/@void/md/node_modules/vite-plus/docs/guide/create.md +255 -2
- package/skills/void/docs/node_modules/void/node_modules/@void/md/node_modules/vite-plus/docs/guide/docker.md +175 -0
- package/skills/void/docs/node_modules/void/node_modules/@void/md/node_modules/vite-plus/docs/guide/env.md +70 -5
- package/skills/void/docs/node_modules/void/node_modules/@void/md/node_modules/vite-plus/docs/guide/github-actions-cache.md +165 -0
- package/skills/void/docs/node_modules/void/node_modules/@void/md/node_modules/vite-plus/docs/guide/ide-integration.md +2 -2
- package/skills/void/docs/node_modules/void/node_modules/@void/md/node_modules/vite-plus/docs/guide/index.md +9 -3
- package/skills/void/docs/node_modules/void/node_modules/@void/md/node_modules/vite-plus/docs/guide/install.md +63 -11
- package/skills/void/docs/node_modules/void/node_modules/@void/md/node_modules/vite-plus/docs/guide/migrate-rules.md +347 -0
- package/skills/void/docs/node_modules/void/node_modules/@void/md/node_modules/vite-plus/docs/guide/migrate.md +27 -3
- package/skills/void/docs/node_modules/void/node_modules/@void/md/node_modules/vite-plus/docs/guide/monorepo.md +176 -0
- package/skills/void/docs/node_modules/void/node_modules/@void/md/node_modules/vite-plus/docs/guide/pack.md +8 -0
- package/skills/void/docs/node_modules/void/node_modules/@void/md/node_modules/vite-plus/docs/guide/run.md +36 -4
- package/skills/void/docs/node_modules/void/node_modules/@void/md/node_modules/vite-plus/docs/guide/troubleshooting.md +11 -35
- package/skills/void/docs/node_modules/void/node_modules/@void/md/node_modules/vite-plus/docs/guide/upgrade.md +65 -13
- package/skills/void/docs/node_modules/void/node_modules/es-module-lexer/README.md +403 -390
- package/skills/void/docs/node_modules/void/node_modules/pg/README.md +2 -1
- package/skills/void/docs/node_modules/void/node_modules/tinyglobby/README.md +1 -1
- package/skills/void/docs/node_modules/void/node_modules/vite-plus/AGENTS.md +1 -0
- package/skills/void/docs/node_modules/void/node_modules/vite-plus/README.md +18 -6
- package/skills/void/docs/node_modules/void/node_modules/vite-plus/docs/config/build.md +1 -1
- package/skills/void/docs/node_modules/void/node_modules/vite-plus/docs/config/check.md +35 -0
- package/skills/void/docs/node_modules/void/node_modules/vite-plus/docs/config/create.md +70 -0
- package/skills/void/docs/node_modules/void/node_modules/vite-plus/docs/config/fmt.md +3 -1
- package/skills/void/docs/node_modules/void/node_modules/vite-plus/docs/config/index.md +11 -7
- package/skills/void/docs/node_modules/void/node_modules/vite-plus/docs/config/lint.md +3 -1
- package/skills/void/docs/node_modules/void/node_modules/vite-plus/docs/config/pack.md +1 -1
- package/skills/void/docs/node_modules/void/node_modules/vite-plus/docs/config/run.md +141 -26
- package/skills/void/docs/node_modules/void/node_modules/vite-plus/docs/config/staged.md +1 -1
- package/skills/void/docs/node_modules/void/node_modules/vite-plus/docs/config/test.md +1 -1
- package/skills/void/docs/node_modules/void/node_modules/vite-plus/docs/guide/automatic-data-tracking.md +145 -0
- package/skills/void/docs/node_modules/void/node_modules/vite-plus/docs/guide/cache.md +16 -28
- package/skills/void/docs/node_modules/void/node_modules/vite-plus/docs/guide/check.md +16 -0
- package/skills/void/docs/node_modules/void/node_modules/vite-plus/docs/guide/ci.md +15 -17
- package/skills/void/docs/node_modules/void/node_modules/vite-plus/docs/guide/commit-hooks.md +9 -0
- package/skills/void/docs/node_modules/void/node_modules/vite-plus/docs/guide/create.md +255 -2
- package/skills/void/docs/node_modules/void/node_modules/vite-plus/docs/guide/docker.md +175 -0
- package/skills/void/docs/node_modules/void/node_modules/vite-plus/docs/guide/env.md +70 -5
- package/skills/void/docs/node_modules/void/node_modules/vite-plus/docs/guide/github-actions-cache.md +165 -0
- package/skills/void/docs/node_modules/void/node_modules/vite-plus/docs/guide/ide-integration.md +2 -2
- package/skills/void/docs/node_modules/void/node_modules/vite-plus/docs/guide/index.md +9 -3
- package/skills/void/docs/node_modules/void/node_modules/vite-plus/docs/guide/install.md +63 -11
- package/skills/void/docs/node_modules/void/node_modules/vite-plus/docs/guide/migrate-rules.md +347 -0
- package/skills/void/docs/node_modules/void/node_modules/vite-plus/docs/guide/migrate.md +27 -3
- package/skills/void/docs/node_modules/void/node_modules/vite-plus/docs/guide/monorepo.md +176 -0
- package/skills/void/docs/node_modules/void/node_modules/vite-plus/docs/guide/pack.md +8 -0
- package/skills/void/docs/node_modules/void/node_modules/vite-plus/docs/guide/run.md +36 -4
- package/skills/void/docs/node_modules/void/node_modules/vite-plus/docs/guide/troubleshooting.md +11 -35
- package/skills/void/docs/node_modules/void/node_modules/vite-plus/docs/guide/upgrade.md +65 -13
- package/skills/void/docs/reference/cli.md +5 -1
- package/dist/agents-MhSzNMiC.mjs +0 -151
- package/dist/collect-9rO3JFNM.mjs +0 -55
- package/dist/config-hhMYPVRT.mjs +0 -21
- package/dist/dist-abzUneor.mjs +0 -1287
- package/dist/drizzle-DqstQTGq.mjs +0 -232
- package/dist/link-ZFmboqY3.mjs +0 -47
- package/dist/output-DeiS4oEX.mjs +0 -139
- package/dist/plan-aD3wRDqF.mjs +0 -271
- package/dist/project-CH9pdo16.mjs +0 -72
- package/dist/project-slug-rX3kTOfY.mjs +0 -10
- package/dist/validate-CNWm-PsL.mjs +0 -186
- /package/dist/{auth-migrations-BP-hMzYl.mjs → auth-migrations-BTZ-ATvQ.mjs} +0 -0
- /package/dist/{auth-Dz2CCn4T.d.mts → auth-qgMlYp7Z.d.mts} +0 -0
- /package/dist/{canonical-json-CEyQaVDa.mjs → canonical-json-DuDiiUsQ.mjs} +0 -0
- /package/dist/{cf-access-DKDsgwOU.mjs → cf-access-Bqw81xAf.mjs} +0 -0
- /package/dist/{defer-C-bdSM_b.mjs → defer-YsYDUoii.mjs} +0 -0
- /package/dist/{dotenv-lS94ymhM.mjs → dotenv-D_UbC_vc.mjs} +0 -0
- /package/dist/{env-raw-Dtj1UAoK.mjs → env-raw-CoS20LHP.mjs} +0 -0
- /package/dist/{fetch-error-B6RaJ-eZ.d.mts → fetch-error-Sp1R4mZv.d.mts} +0 -0
- /package/dist/{git-metadata-Ce0AtSZL.mjs → git-metadata-CBKaL0v5.mjs} +0 -0
- /package/dist/{head-eOUCWUNy.d.mts → head-nmvOgFjd.d.mts} +0 -0
- /package/dist/{log-BdD_Fpms.mjs → log-ChfPKsVd.mjs} +0 -0
- /package/dist/{pathe.M-eThtNZ-BrPhGF_K.mjs → pathe.M-eThtNZ-CQzLbt4c.mjs} +0 -0
- /package/dist/{pg-CempqvEJ.mjs → pg-J2HbZIkX.mjs} +0 -0
- /package/dist/{providers-BJIoduK9.d.mts → providers-BNKRacMr.d.mts} +0 -0
- /package/dist/{providers-BwPbdHdi.mjs → providers-CJlNS3kT.mjs} +0 -0
- /package/dist/{proxy-M3pxItg2.mjs → proxy-D-3_D-Gl.mjs} +0 -0
- /package/dist/{chunk-DJd-R1mw.mjs → rolldown-runtime-DJK8HYOj.mjs} +0 -0
- /package/dist/{standard-schema-Cy0lfeWv.d.mts → standard-schema-DJ0HW7QP.d.mts} +0 -0
- /package/dist/{types-BodZGegX.d.mts → types-lLjNE9Qp.d.mts} +0 -0
|
@@ -1,9 +1,7 @@
|
|
|
1
|
-
import {
|
|
2
|
-
import { c as createCodeChallenge, f as getToken, h as openBrowser, l as createCodeVerifier, n as PlatformClient, o as parsePlatformErrorBody, s as awaitBrowserCallback, t as PlatformApiError } from "./client-
|
|
3
|
-
import {
|
|
4
|
-
import {
|
|
5
|
-
import { r as resolveProjectBySlug, t as getRequestedProjectSlug } from "./resolve-project-D4O1_fZz.mjs";
|
|
6
|
-
import { t as collectGitDeployMetadata } from "./git-metadata-Ce0AtSZL.mjs";
|
|
1
|
+
import { A as text, T as log, j as isCancel, k as select, u as import_picocolors, x as cancel } from "./agents-Bmr5tFFb.mjs";
|
|
2
|
+
import { b as readProjectConfig, c as createCodeChallenge, f as getToken, h as openBrowser, l as createCodeVerifier, n as PlatformClient, o as parsePlatformErrorBody, s as awaitBrowserCallback, t as PlatformApiError } from "./client-Cj96iiBH.mjs";
|
|
3
|
+
import { r as resolveProjectBySlug, t as getRequestedProjectSlug } from "./resolve-project-D2HI3TrG.mjs";
|
|
4
|
+
import { t as collectGitDeployMetadata } from "./git-metadata-CBKaL0v5.mjs";
|
|
7
5
|
import { randomBytes } from "node:crypto";
|
|
8
6
|
//#region src/cli/github-cmd.ts
|
|
9
7
|
/**
|
|
@@ -95,7 +93,7 @@ function formatConnection(connection) {
|
|
|
95
93
|
async function runGithubCommand(root, args) {
|
|
96
94
|
const token = getToken(root);
|
|
97
95
|
if (!token) {
|
|
98
|
-
|
|
96
|
+
log.error("Not logged in. Run `void auth login` first.");
|
|
99
97
|
process.exit(1);
|
|
100
98
|
}
|
|
101
99
|
const client = new PlatformClient(token, { root });
|
|
@@ -126,23 +124,23 @@ async function runInstall(root, client, linkIdentity = runGithubLink) {
|
|
|
126
124
|
({url} = await client.getGithubInstallUrl());
|
|
127
125
|
} catch (err) {
|
|
128
126
|
if (err instanceof PlatformApiError && err.status === 403 && err.code === "github_identity_required") {
|
|
129
|
-
|
|
127
|
+
log.message("Your Void account needs a linked GitHub identity. Starting the GitHub link…");
|
|
130
128
|
await linkIdentity(root, client);
|
|
131
129
|
try {
|
|
132
130
|
({url} = await client.getGithubInstallUrl());
|
|
133
131
|
} catch (retryErr) {
|
|
134
132
|
if (retryErr instanceof PlatformApiError && retryErr.status === 403 && retryErr.code === "github_identity_required") {
|
|
135
|
-
|
|
133
|
+
log.error("Could not start the GitHub App install after linking. Try `void github link`, then `void github install` again.");
|
|
136
134
|
process.exit(1);
|
|
137
135
|
}
|
|
138
136
|
throw retryErr;
|
|
139
137
|
}
|
|
140
138
|
} else throw err;
|
|
141
139
|
}
|
|
142
|
-
|
|
140
|
+
log.message(`Open this URL to install the Void GitHub App:\n${import_picocolors.default.cyan(url)}`);
|
|
143
141
|
const { execFile } = await import("node:child_process");
|
|
144
142
|
openBrowser(url, execFile);
|
|
145
|
-
|
|
143
|
+
log.message("After installing, run `void github connect` to link a repository to your project.");
|
|
146
144
|
}
|
|
147
145
|
/**
|
|
148
146
|
* Link the current Void account (the logged-in CLI token holder) to a GitHub
|
|
@@ -167,7 +165,7 @@ async function runGithubLink(root, client) {
|
|
|
167
165
|
return url;
|
|
168
166
|
},
|
|
169
167
|
describeError: (p) => p.get("error") ? "GitHub authorization failed." : null,
|
|
170
|
-
onUrl: (url) =>
|
|
168
|
+
onUrl: (url) => log.message(`Open this URL to link your GitHub account:\n${import_picocolors.default.cyan(url)}`),
|
|
171
169
|
finalize: async (params) => {
|
|
172
170
|
const linkCode = params.get("link_code");
|
|
173
171
|
if (!linkCode) throw new Error("github: link callback did not return a link code.");
|
|
@@ -176,17 +174,17 @@ async function runGithubLink(root, client) {
|
|
|
176
174
|
}));
|
|
177
175
|
} catch (err) {
|
|
178
176
|
if (err instanceof PlatformApiError && err.code === "github_already_linked") {
|
|
179
|
-
|
|
177
|
+
log.error("Your Void account is already linked to a different GitHub account.");
|
|
180
178
|
process.exit(1);
|
|
181
179
|
}
|
|
182
180
|
if (err instanceof PlatformApiError && (err.status === 409 || err.code === "github_identity_conflict")) {
|
|
183
|
-
|
|
181
|
+
log.error("This GitHub account is already linked to another Void account.");
|
|
184
182
|
process.exit(1);
|
|
185
183
|
}
|
|
186
184
|
throw err;
|
|
187
185
|
}
|
|
188
|
-
if (status === "already_linked")
|
|
189
|
-
else
|
|
186
|
+
if (status === "already_linked") log.success("GitHub account already linked.");
|
|
187
|
+
else log.success("GitHub account linked.");
|
|
190
188
|
}
|
|
191
189
|
/**
|
|
192
190
|
* Discover and join the shared GitHub App installations owned by the
|
|
@@ -211,7 +209,7 @@ async function runGithubJoin(root, client) {
|
|
|
211
209
|
return url;
|
|
212
210
|
},
|
|
213
211
|
describeError: (p) => p.get("error") ? "GitHub authorization failed." : null,
|
|
214
|
-
onUrl: (url) =>
|
|
212
|
+
onUrl: (url) => log.message(`Open this URL to join your organization's shared GitHub App installations:\n${import_picocolors.default.cyan(url)}`),
|
|
215
213
|
finalize: async (params) => {
|
|
216
214
|
const joinCode = params.get("join_code");
|
|
217
215
|
if (!joinCode) throw new Error("github: join callback did not return a join code.");
|
|
@@ -220,24 +218,24 @@ async function runGithubJoin(root, client) {
|
|
|
220
218
|
}));
|
|
221
219
|
} catch (err) {
|
|
222
220
|
if (err instanceof PlatformApiError && err.status === 503 && err.code === "github_oauth_not_configured") {
|
|
223
|
-
|
|
221
|
+
log.error("Organization installation sharing is not enabled on this Void instance.");
|
|
224
222
|
process.exit(1);
|
|
225
223
|
}
|
|
226
224
|
throw err;
|
|
227
225
|
}
|
|
228
|
-
if (count === 0)
|
|
226
|
+
if (count === 0) log.info("No new installations to join.");
|
|
229
227
|
else {
|
|
230
|
-
|
|
231
|
-
|
|
228
|
+
log.success(`Joined ${count} installation${count === 1 ? "" : "s"}.`);
|
|
229
|
+
log.message("Run `void github installations` to see them, then `void github connect`.");
|
|
232
230
|
}
|
|
233
231
|
}
|
|
234
232
|
async function runInstallations(client) {
|
|
235
233
|
const installations = await client.listGithubInstallations();
|
|
236
234
|
if (installations.length === 0) {
|
|
237
|
-
|
|
235
|
+
log.info("No GitHub App installations. Run `void github install` first.");
|
|
238
236
|
return;
|
|
239
237
|
}
|
|
240
|
-
|
|
238
|
+
log.message(formatInstallations(installations));
|
|
241
239
|
}
|
|
242
240
|
/**
|
|
243
241
|
* Per-repo connect authorization round-trip for a non-owner org member.
|
|
@@ -271,7 +269,7 @@ async function runGithubConnectAuthorize(client, installationId, repoFullName) {
|
|
|
271
269
|
if (e === "repo_not_accessible") return `You don't have access to ${repoFullName} under this installation on GitHub.`;
|
|
272
270
|
return e ? "GitHub authorization failed." : null;
|
|
273
271
|
},
|
|
274
|
-
onUrl: (url) =>
|
|
272
|
+
onUrl: (url) => log.message(`Open this URL to authorize access to ${repoFullName}:\n${import_picocolors.default.cyan(url)}`),
|
|
275
273
|
finalize: async (params) => {
|
|
276
274
|
const grant = params.get("connect_grant");
|
|
277
275
|
if (!grant) throw new Error("github: connect authorization did not return a grant.");
|
|
@@ -290,7 +288,7 @@ async function runConnect(root, client, args) {
|
|
|
290
288
|
if (requestedSlug) {
|
|
291
289
|
const resolved = resolveProjectBySlug(await client.listProjects(), requestedSlug);
|
|
292
290
|
if (!resolved) {
|
|
293
|
-
|
|
291
|
+
log.error(`connect: No project found with slug '${requestedSlug}'.`);
|
|
294
292
|
process.exit(1);
|
|
295
293
|
}
|
|
296
294
|
projectId = resolved.projectId;
|
|
@@ -298,23 +296,23 @@ async function runConnect(root, client, args) {
|
|
|
298
296
|
const linked = readProjectConfig(root);
|
|
299
297
|
if (linked) projectId = linked.projectId;
|
|
300
298
|
else if (!isTTY) {
|
|
301
|
-
|
|
299
|
+
log.error("connect: No project specified. Pass a project name or --project <name>, set VOID_PROJECT, or link one with `void project link`.");
|
|
302
300
|
process.exit(1);
|
|
303
301
|
} else {
|
|
304
302
|
const projects = await client.listProjects();
|
|
305
303
|
if (projects.length === 0) {
|
|
306
|
-
|
|
304
|
+
log.error("No projects found. Create one first with `void deploy`.");
|
|
307
305
|
process.exit(1);
|
|
308
306
|
}
|
|
309
|
-
const picked = await
|
|
307
|
+
const picked = await select({
|
|
310
308
|
message: "Select a project:",
|
|
311
309
|
options: projects.map((p) => ({
|
|
312
310
|
value: p.id,
|
|
313
311
|
label: p.slug
|
|
314
312
|
}))
|
|
315
313
|
});
|
|
316
|
-
if (
|
|
317
|
-
|
|
314
|
+
if (isCancel(picked)) {
|
|
315
|
+
cancel("Cancelled.");
|
|
318
316
|
process.exit(0);
|
|
319
317
|
}
|
|
320
318
|
projectId = picked;
|
|
@@ -322,31 +320,31 @@ async function runConnect(root, client, args) {
|
|
|
322
320
|
}
|
|
323
321
|
const installations = (await client.listGithubInstallations()).filter((i) => i.status === "active");
|
|
324
322
|
if (installations.length === 0) {
|
|
325
|
-
|
|
323
|
+
log.error("No active GitHub App installation. Run `void github install` first.");
|
|
326
324
|
process.exit(1);
|
|
327
325
|
}
|
|
328
326
|
let installation;
|
|
329
327
|
if (args.installationId) {
|
|
330
328
|
const found = installations.find((i) => i.installation_id === args.installationId);
|
|
331
329
|
if (!found) {
|
|
332
|
-
|
|
330
|
+
log.error(`connect: No active installation found with id '${args.installationId}'.`);
|
|
333
331
|
process.exit(1);
|
|
334
332
|
}
|
|
335
333
|
installation = found;
|
|
336
334
|
} else if (installations.length === 1) installation = installations[0];
|
|
337
335
|
else if (!isTTY) {
|
|
338
|
-
|
|
336
|
+
log.error("connect: Multiple installations found. Pass --installation <id>.");
|
|
339
337
|
process.exit(1);
|
|
340
338
|
} else {
|
|
341
|
-
const picked = await
|
|
339
|
+
const picked = await select({
|
|
342
340
|
message: "Select a GitHub App installation:",
|
|
343
341
|
options: installations.map((i) => ({
|
|
344
342
|
value: i.installation_id,
|
|
345
343
|
label: `${i.account_login} (${i.account_type}) [id: ${i.installation_id}]`
|
|
346
344
|
}))
|
|
347
345
|
});
|
|
348
|
-
if (
|
|
349
|
-
|
|
346
|
+
if (isCancel(picked)) {
|
|
347
|
+
cancel("Cancelled.");
|
|
350
348
|
process.exit(0);
|
|
351
349
|
}
|
|
352
350
|
installation = installations.find((i) => i.installation_id === picked);
|
|
@@ -354,44 +352,44 @@ async function runConnect(root, client, args) {
|
|
|
354
352
|
let repoFullName;
|
|
355
353
|
if (args.repo) repoFullName = args.repo;
|
|
356
354
|
else if (installation.repository_selection === "selected") if (installation.repositories.length === 0) {
|
|
357
|
-
|
|
355
|
+
log.error("connect: The installation has no accessible repositories. Update the GitHub App install to grant access.");
|
|
358
356
|
process.exit(1);
|
|
359
357
|
} else if (installation.repositories.length === 1) repoFullName = installation.repositories[0].full_name;
|
|
360
358
|
else if (!isTTY) {
|
|
361
|
-
|
|
359
|
+
log.error("connect: Multiple repositories available. Pass --repo <owner/repo>.");
|
|
362
360
|
process.exit(1);
|
|
363
361
|
} else {
|
|
364
|
-
const picked = await
|
|
362
|
+
const picked = await select({
|
|
365
363
|
message: "Select a repository:",
|
|
366
364
|
options: installation.repositories.map((r) => ({
|
|
367
365
|
value: r.full_name,
|
|
368
366
|
label: r.full_name
|
|
369
367
|
}))
|
|
370
368
|
});
|
|
371
|
-
if (
|
|
372
|
-
|
|
369
|
+
if (isCancel(picked)) {
|
|
370
|
+
cancel("Cancelled.");
|
|
373
371
|
process.exit(0);
|
|
374
372
|
}
|
|
375
373
|
repoFullName = picked;
|
|
376
374
|
}
|
|
377
375
|
else {
|
|
378
376
|
if (!isTTY) {
|
|
379
|
-
|
|
377
|
+
log.error("connect: --repo <owner/repo> is required in non-interactive mode for an all-repositories installation.");
|
|
380
378
|
process.exit(1);
|
|
381
379
|
}
|
|
382
380
|
const gitDefault = parseGithubRepoFullName(collectGitDeployMetadata(root, null).repositoryUrl);
|
|
383
|
-
const input = await
|
|
381
|
+
const input = await text({
|
|
384
382
|
message: "Repository (owner/repo):",
|
|
385
383
|
placeholder: gitDefault ?? "owner/repo",
|
|
386
384
|
initialValue: gitDefault ?? ""
|
|
387
385
|
});
|
|
388
|
-
if (
|
|
389
|
-
|
|
386
|
+
if (isCancel(input)) {
|
|
387
|
+
cancel("Cancelled.");
|
|
390
388
|
process.exit(0);
|
|
391
389
|
}
|
|
392
390
|
repoFullName = input.trim();
|
|
393
391
|
if (!repoFullName) {
|
|
394
|
-
|
|
392
|
+
log.error("connect: Repository is required.");
|
|
395
393
|
process.exit(1);
|
|
396
394
|
}
|
|
397
395
|
}
|
|
@@ -399,16 +397,16 @@ async function runConnect(root, client, args) {
|
|
|
399
397
|
let branch;
|
|
400
398
|
if (args.branch) branch = args.branch;
|
|
401
399
|
else if (!isTTY) {
|
|
402
|
-
|
|
400
|
+
log.error("connect: --branch is required in non-interactive mode. Pass --branch <name>.");
|
|
403
401
|
process.exit(1);
|
|
404
402
|
} else {
|
|
405
|
-
const input = await
|
|
403
|
+
const input = await text({
|
|
406
404
|
message: "Branch to deploy from:",
|
|
407
405
|
placeholder: branchDefault,
|
|
408
406
|
initialValue: branchDefault
|
|
409
407
|
});
|
|
410
|
-
if (
|
|
411
|
-
|
|
408
|
+
if (isCancel(input)) {
|
|
409
|
+
cancel("Cancelled.");
|
|
412
410
|
process.exit(0);
|
|
413
411
|
}
|
|
414
412
|
branch = input.trim() || branchDefault;
|
|
@@ -417,7 +415,7 @@ async function runConnect(root, client, args) {
|
|
|
417
415
|
if (args.executor !== void 0) executor = args.executor;
|
|
418
416
|
else if (!isTTY) executor = "container";
|
|
419
417
|
else {
|
|
420
|
-
const picked = await
|
|
418
|
+
const picked = await select({
|
|
421
419
|
message: "Build executor:",
|
|
422
420
|
options: [{
|
|
423
421
|
value: "container",
|
|
@@ -430,15 +428,15 @@ async function runConnect(root, client, args) {
|
|
|
430
428
|
}],
|
|
431
429
|
initialValue: "container"
|
|
432
430
|
});
|
|
433
|
-
if (
|
|
434
|
-
|
|
431
|
+
if (isCancel(picked)) {
|
|
432
|
+
cancel("Cancelled.");
|
|
435
433
|
process.exit(0);
|
|
436
434
|
}
|
|
437
435
|
executor = picked;
|
|
438
436
|
}
|
|
439
437
|
let workflowPath = args.workflowPath;
|
|
440
438
|
if (executor === "github_actions" && args.workflowPath === void 0 && isTTY) {
|
|
441
|
-
const input = await
|
|
439
|
+
const input = await text({
|
|
442
440
|
message: "Deploy workflow file:",
|
|
443
441
|
placeholder: DEFAULT_WORKFLOW_PATH,
|
|
444
442
|
initialValue: DEFAULT_WORKFLOW_PATH,
|
|
@@ -448,8 +446,8 @@ async function runConnect(root, client, args) {
|
|
|
448
446
|
return "Must be under .github/workflows/, end in .yml/.yaml, and not contain \"..\".";
|
|
449
447
|
}
|
|
450
448
|
});
|
|
451
|
-
if (
|
|
452
|
-
|
|
449
|
+
if (isCancel(input)) {
|
|
450
|
+
cancel("Cancelled.");
|
|
453
451
|
process.exit(0);
|
|
454
452
|
}
|
|
455
453
|
const chosen = input.trim() || ".github/workflows/void-deploy.yml";
|
|
@@ -470,7 +468,7 @@ async function runConnect(root, client, args) {
|
|
|
470
468
|
if (!(err instanceof PlatformApiError)) throw err;
|
|
471
469
|
if (err.status === 403 && err.code === "connect_authorization_required") {
|
|
472
470
|
if (!isTTY) {
|
|
473
|
-
|
|
471
|
+
log.error("connect: this installation requires per-repo authorization, which needs an interactive browser sign-in. Run `void github connect` locally to authorize, then retry.");
|
|
474
472
|
process.exit(1);
|
|
475
473
|
}
|
|
476
474
|
const grant = await runGithubConnectAuthorize(client, installation.installation_id, repoFullName);
|
|
@@ -481,7 +479,7 @@ async function runConnect(root, client, args) {
|
|
|
481
479
|
});
|
|
482
480
|
} catch (retryErr) {
|
|
483
481
|
if (retryErr instanceof PlatformApiError && retryErr.status === 403) {
|
|
484
|
-
|
|
482
|
+
log.error("connect: GitHub authorization failed or expired. Run `void github connect` again.");
|
|
485
483
|
process.exit(1);
|
|
486
484
|
}
|
|
487
485
|
throw retryErr;
|
|
@@ -491,22 +489,22 @@ async function runConnect(root, client, args) {
|
|
|
491
489
|
const code = body?.error ?? body?.message ?? "";
|
|
492
490
|
const message = describeConnectError(err.status, code);
|
|
493
491
|
if (message !== null) {
|
|
494
|
-
|
|
492
|
+
log.error(`connect: ${message}`);
|
|
495
493
|
process.exit(1);
|
|
496
494
|
}
|
|
497
495
|
throw err;
|
|
498
496
|
}
|
|
499
497
|
}
|
|
500
498
|
if (workflowPath !== void 0 && connection.workflow_path !== workflowPath) {
|
|
501
|
-
|
|
499
|
+
log.error(`connect: server did not apply workflow path ${workflowPath} (got ${connection.workflow_path ?? "none"}). The platform may be too old to support a custom workflow path.`);
|
|
502
500
|
process.exit(1);
|
|
503
501
|
}
|
|
504
|
-
|
|
502
|
+
log.success(`Connected ${repoFullName} (${branch}) → project. Push to ${branch} to deploy.`);
|
|
505
503
|
}
|
|
506
504
|
async function runGithubUpdate(root, client, args) {
|
|
507
505
|
const isTTY = process.stdin.isTTY === true;
|
|
508
506
|
if (!isTTY && args.branch === void 0 && args.executor === void 0 && args.workflowPath === void 0) {
|
|
509
|
-
|
|
507
|
+
log.error("update: Nothing to update. Pass --branch <name>, --executor <container|github_actions>, and/or --workflow <.github/workflows/...>.");
|
|
510
508
|
process.exit(1);
|
|
511
509
|
}
|
|
512
510
|
let projectId;
|
|
@@ -514,7 +512,7 @@ async function runGithubUpdate(root, client, args) {
|
|
|
514
512
|
if (requestedSlug) {
|
|
515
513
|
const resolved = resolveProjectBySlug(await client.listProjects(), requestedSlug);
|
|
516
514
|
if (!resolved) {
|
|
517
|
-
|
|
515
|
+
log.error(`update: No project found with slug '${requestedSlug}'.`);
|
|
518
516
|
process.exit(1);
|
|
519
517
|
}
|
|
520
518
|
projectId = resolved.projectId;
|
|
@@ -522,23 +520,23 @@ async function runGithubUpdate(root, client, args) {
|
|
|
522
520
|
const linked = readProjectConfig(root);
|
|
523
521
|
if (linked) projectId = linked.projectId;
|
|
524
522
|
else if (!isTTY) {
|
|
525
|
-
|
|
523
|
+
log.error("update: No project specified. Pass a project name or --project <name>, set VOID_PROJECT, or link one with `void project link`.");
|
|
526
524
|
process.exit(1);
|
|
527
525
|
} else {
|
|
528
526
|
const projects = await client.listProjects();
|
|
529
527
|
if (projects.length === 0) {
|
|
530
|
-
|
|
528
|
+
log.error("No projects found. Create one first with `void deploy`.");
|
|
531
529
|
process.exit(1);
|
|
532
530
|
}
|
|
533
|
-
const picked = await
|
|
531
|
+
const picked = await select({
|
|
534
532
|
message: "Select a project:",
|
|
535
533
|
options: projects.map((p) => ({
|
|
536
534
|
value: p.id,
|
|
537
535
|
label: p.slug
|
|
538
536
|
}))
|
|
539
537
|
});
|
|
540
|
-
if (
|
|
541
|
-
|
|
538
|
+
if (isCancel(picked)) {
|
|
539
|
+
cancel("Cancelled.");
|
|
542
540
|
process.exit(0);
|
|
543
541
|
}
|
|
544
542
|
projectId = picked;
|
|
@@ -553,7 +551,7 @@ async function runGithubUpdate(root, client, args) {
|
|
|
553
551
|
const code = body?.error ?? body?.message ?? "";
|
|
554
552
|
const message = describeUpdateError(err.status, code);
|
|
555
553
|
if (message !== null) {
|
|
556
|
-
|
|
554
|
+
log.error(`update: ${message}`);
|
|
557
555
|
process.exit(1);
|
|
558
556
|
}
|
|
559
557
|
}
|
|
@@ -565,20 +563,20 @@ async function runGithubUpdate(root, client, args) {
|
|
|
565
563
|
if (isTTY) {
|
|
566
564
|
if (args.branch !== void 0) branch = args.branch;
|
|
567
565
|
else {
|
|
568
|
-
const input = await
|
|
566
|
+
const input = await text({
|
|
569
567
|
message: "Branch to deploy from:",
|
|
570
568
|
placeholder: current.branch,
|
|
571
569
|
initialValue: current.branch
|
|
572
570
|
});
|
|
573
|
-
if (
|
|
574
|
-
|
|
571
|
+
if (isCancel(input)) {
|
|
572
|
+
cancel("Cancelled.");
|
|
575
573
|
process.exit(0);
|
|
576
574
|
}
|
|
577
575
|
branch = input.trim() || current.branch;
|
|
578
576
|
}
|
|
579
577
|
if (args.executor !== void 0) executor = args.executor;
|
|
580
578
|
else {
|
|
581
|
-
const picked = await
|
|
579
|
+
const picked = await select({
|
|
582
580
|
message: "Build executor:",
|
|
583
581
|
options: [{
|
|
584
582
|
value: "container",
|
|
@@ -589,14 +587,14 @@ async function runGithubUpdate(root, client, args) {
|
|
|
589
587
|
}],
|
|
590
588
|
initialValue: current.build_executor
|
|
591
589
|
});
|
|
592
|
-
if (
|
|
593
|
-
|
|
590
|
+
if (isCancel(picked)) {
|
|
591
|
+
cancel("Cancelled.");
|
|
594
592
|
process.exit(0);
|
|
595
593
|
}
|
|
596
594
|
executor = picked;
|
|
597
595
|
}
|
|
598
596
|
if (executor === "github_actions" && args.workflowPath === void 0) {
|
|
599
|
-
const input = await
|
|
597
|
+
const input = await text({
|
|
600
598
|
message: "Deploy workflow file:",
|
|
601
599
|
placeholder: current.workflow_path,
|
|
602
600
|
initialValue: current.workflow_path,
|
|
@@ -606,8 +604,8 @@ async function runGithubUpdate(root, client, args) {
|
|
|
606
604
|
return "Must be under .github/workflows/, end in .yml/.yaml, and not contain \"..\".";
|
|
607
605
|
}
|
|
608
606
|
});
|
|
609
|
-
if (
|
|
610
|
-
|
|
607
|
+
if (isCancel(input)) {
|
|
608
|
+
cancel("Cancelled.");
|
|
611
609
|
process.exit(0);
|
|
612
610
|
}
|
|
613
611
|
workflowPath = input.trim() || current.workflow_path;
|
|
@@ -621,7 +619,7 @@ async function runGithubUpdate(root, client, args) {
|
|
|
621
619
|
if (executor !== current.build_executor) patch.buildExecutor = executor;
|
|
622
620
|
if (workflowPath !== current.workflow_path) patch.workflowPath = workflowPath;
|
|
623
621
|
if (patch.branch === void 0 && patch.buildExecutor === void 0 && patch.workflowPath === void 0) {
|
|
624
|
-
|
|
622
|
+
log.info(`No changes. ${current.repo_full_name} already deploys from ${current.branch} via ${current.build_executor}.`);
|
|
625
623
|
return;
|
|
626
624
|
}
|
|
627
625
|
let updated;
|
|
@@ -633,7 +631,7 @@ async function runGithubUpdate(root, client, args) {
|
|
|
633
631
|
const code = body?.error ?? body?.message ?? "";
|
|
634
632
|
const message = describeUpdateError(err.status, code);
|
|
635
633
|
if (message !== null) {
|
|
636
|
-
|
|
634
|
+
log.error(`update: ${message}`);
|
|
637
635
|
process.exit(1);
|
|
638
636
|
}
|
|
639
637
|
throw err;
|
|
@@ -641,10 +639,10 @@ async function runGithubUpdate(root, client, args) {
|
|
|
641
639
|
throw err;
|
|
642
640
|
}
|
|
643
641
|
if (patch.workflowPath !== void 0 && updated.workflow_path !== patch.workflowPath) {
|
|
644
|
-
|
|
642
|
+
log.error(`update: server did not apply workflow path ${patch.workflowPath} (got ${updated.workflow_path ?? "none"}). The platform may be too old to support a custom workflow path.`);
|
|
645
643
|
process.exit(1);
|
|
646
644
|
}
|
|
647
|
-
|
|
645
|
+
log.success(`Updated ${updated.repo_full_name} → branch ${updated.branch}, executor ${updated.build_executor}, workflow ${updated.workflow_path}.`);
|
|
648
646
|
}
|
|
649
647
|
/**
|
|
650
648
|
* `void github status [project]` — print the current GitHub connection (repo,
|
|
@@ -659,7 +657,7 @@ async function runStatus(root, client, args) {
|
|
|
659
657
|
if (requestedSlug) {
|
|
660
658
|
const resolved = resolveProjectBySlug(await client.listProjects(), requestedSlug);
|
|
661
659
|
if (!resolved) {
|
|
662
|
-
|
|
660
|
+
log.error(`status: No project found with slug '${requestedSlug}'.`);
|
|
663
661
|
process.exit(1);
|
|
664
662
|
}
|
|
665
663
|
projectId = resolved.projectId;
|
|
@@ -667,23 +665,23 @@ async function runStatus(root, client, args) {
|
|
|
667
665
|
const linked = readProjectConfig(root);
|
|
668
666
|
if (linked) projectId = linked.projectId;
|
|
669
667
|
else if (!isTTY) {
|
|
670
|
-
|
|
668
|
+
log.error("status: No project specified. Pass a project name or --project <name>, set VOID_PROJECT, or link one with `void project link`.");
|
|
671
669
|
process.exit(1);
|
|
672
670
|
} else {
|
|
673
671
|
const projects = await client.listProjects();
|
|
674
672
|
if (projects.length === 0) {
|
|
675
|
-
|
|
673
|
+
log.error("No projects found. Create one first with `void deploy`.");
|
|
676
674
|
process.exit(1);
|
|
677
675
|
}
|
|
678
|
-
const picked = await
|
|
676
|
+
const picked = await select({
|
|
679
677
|
message: "Select a project:",
|
|
680
678
|
options: projects.map((p) => ({
|
|
681
679
|
value: p.id,
|
|
682
680
|
label: p.slug
|
|
683
681
|
}))
|
|
684
682
|
});
|
|
685
|
-
if (
|
|
686
|
-
|
|
683
|
+
if (isCancel(picked)) {
|
|
684
|
+
cancel("Cancelled.");
|
|
687
685
|
process.exit(0);
|
|
688
686
|
}
|
|
689
687
|
projectId = picked;
|
|
@@ -698,13 +696,13 @@ async function runStatus(root, client, args) {
|
|
|
698
696
|
const code = body?.error ?? body?.message ?? "";
|
|
699
697
|
const message = describeUpdateError(err.status, code);
|
|
700
698
|
if (message !== null) {
|
|
701
|
-
|
|
699
|
+
log.error(`status: ${message}`);
|
|
702
700
|
process.exit(1);
|
|
703
701
|
}
|
|
704
702
|
}
|
|
705
703
|
throw err;
|
|
706
704
|
}
|
|
707
|
-
|
|
705
|
+
log.message(formatConnection(connection));
|
|
708
706
|
}
|
|
709
707
|
//#endregion
|
|
710
708
|
export { runGithubCommand };
|
|
@@ -1,7 +1,6 @@
|
|
|
1
|
-
import { n as HeadDescriptor } from "./head-
|
|
2
|
-
import { r as AuthUser, t as AuthSession } from "./auth-
|
|
3
|
-
import { t as StandardSchemaV1 } from "./standard-schema-
|
|
4
|
-
import * as _$_cloudflare_sandbox0 from "@cloudflare/sandbox";
|
|
1
|
+
import { n as HeadDescriptor } from "./head-nmvOgFjd.mjs";
|
|
2
|
+
import { r as AuthUser, t as AuthSession } from "./auth-qgMlYp7Z.mjs";
|
|
3
|
+
import { t as StandardSchemaV1 } from "./standard-schema-DJ0HW7QP.mjs";
|
|
5
4
|
import { Context, Env, MiddlewareHandler } from "hono";
|
|
6
5
|
import { RewriteDestination } from "void/routes";
|
|
7
6
|
|
|
@@ -95,7 +94,7 @@ interface CloudBindings {
|
|
|
95
94
|
KV: KVNamespace;
|
|
96
95
|
STORAGE: R2Bucket;
|
|
97
96
|
AI: Ai;
|
|
98
|
-
SANDBOX: DurableObjectNamespace<
|
|
97
|
+
SANDBOX: DurableObjectNamespace<import("@cloudflare/sandbox").Sandbox>;
|
|
99
98
|
[key: string]: unknown;
|
|
100
99
|
}
|
|
101
100
|
type CloudEnv = Env & {
|
|
@@ -1,6 +1,6 @@
|
|
|
1
|
-
import { a as join } from "./pathe.M-eThtNZ-
|
|
2
|
-
import { a as convertRedirectsConfig, d as parseHostPrefixedSource, i as convertHeadersConfig, o as convertRewritesConfig, r as convertFallbacksConfig, s as countSplats, t as VALID_REDIRECT_STATUSES, u as isProtocolRelative } from "./config-
|
|
3
|
-
import { i as voidWarn } from "./log-
|
|
1
|
+
import { a as join } from "./pathe.M-eThtNZ-CQzLbt4c.mjs";
|
|
2
|
+
import { a as convertRedirectsConfig, d as parseHostPrefixedSource, i as convertHeadersConfig, o as convertRewritesConfig, r as convertFallbacksConfig, s as countSplats, t as VALID_REDIRECT_STATUSES, u as isProtocolRelative } from "./config-1twldYCW.mjs";
|
|
3
|
+
import { i as voidWarn } from "./log-ChfPKsVd.mjs";
|
|
4
4
|
import { existsSync, readFileSync } from "node:fs";
|
|
5
5
|
//#region src/cli/headers.ts
|
|
6
6
|
/**
|
package/dist/index.d.mts
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
|
-
import { n as HeadDescriptor } from "./head-
|
|
2
|
-
import { r as AuthUser } from "./auth-
|
|
3
|
-
import { C as defer, E as ValidatorSlots, S as InferProps, T as HandlerInput, _ as defineQueue, a as CloudEnv, b as Deferred, c as QueueRetryOptions, d as TypedQueueHandler, f as VoidAssetRewriteError, g as defineMiddleware, h as defineHead, i as CloudContextVariables, l as RenderAssetTags, m as defineHandler, o as QueueBatch, p as basicAuth, r as CloudContext, s as QueueMessage, t as BasicAuthOptions, u as TypedHandler, v as defineRender, x as DeferredState, y as defineScheduled } from "./handler-
|
|
1
|
+
import { n as HeadDescriptor } from "./head-nmvOgFjd.mjs";
|
|
2
|
+
import { r as AuthUser } from "./auth-qgMlYp7Z.mjs";
|
|
3
|
+
import { C as defer, E as ValidatorSlots, S as InferProps, T as HandlerInput, _ as defineQueue, a as CloudEnv, b as Deferred, c as QueueRetryOptions, d as TypedQueueHandler, f as VoidAssetRewriteError, g as defineMiddleware, h as defineHead, i as CloudContextVariables, l as RenderAssetTags, m as defineHandler, o as QueueBatch, p as basicAuth, r as CloudContext, s as QueueMessage, t as BasicAuthOptions, u as TypedHandler, v as defineRender, x as DeferredState, y as defineScheduled } from "./handler-imD0UVDT.mjs";
|
|
4
4
|
import { QueueMap } from "./runtime/queues.mjs";
|
|
5
5
|
import { PluginConfig } from "@cloudflare/vite-plugin";
|
|
6
6
|
import { Plugin } from "vite";
|