void 0.23.0 → 0.25.0
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/AGENTS_TEMPLATE.md +1 -1
- package/README.md +19 -106
- package/dist/{account-cmd-C84Ee8cO.mjs → account-cmd-DcR1ywt8.mjs} +5 -5
- package/dist/{auth-CSkdO2Bb.mjs → auth-7wuZ5ob8.mjs} +22 -49
- package/dist/auth-CdgZ9uag.mjs +2 -0
- package/dist/{auth-link-CioEg6uY.mjs → auth-link-Z6E5DYvM.mjs} +5 -6
- package/dist/{auth-router-BsR981d4.mjs → auth-router-BdM4avI8.mjs} +7 -7
- package/dist/{build-cmd-LzvNJORH.mjs → build-cmd-CEE7D-hM.mjs} +7 -8
- package/dist/{cache-C4MvnrMH.mjs → cache-TcZnBLtH.mjs} +6 -7
- package/dist/{cancel-deploy-abUxpP2n.mjs → cancel-deploy-CYoZmcmR.mjs} +4 -6
- package/dist/{cf-access-P0iZnu0q.mjs → cf-access-AHKBzmuu.mjs} +4 -48
- package/dist/{cf-access-DRsQRe6k.mjs → cf-access-TWNzXltp.mjs} +3 -11
- package/dist/cf-build-output-ChY6-XWP.mjs +2 -0
- package/dist/cli/cli.mjs +49 -46
- package/dist/cli/cloudflare-operation-process.mjs +16 -7
- package/dist/cli/env-schema-probe.mjs +3 -3
- package/dist/client-B4Me-9HE.mjs +2 -0
- package/dist/{client-RV8NVeB8.mjs → client-RsPo8wsP.mjs} +129 -33
- package/dist/{cloudflare-cmd-BcrVyTmJ.mjs → cloudflare-cmd-bhwCxAN6.mjs} +2 -2
- package/dist/{cloudflare-connect-B8uPZ4nx.mjs → cloudflare-connect-CuhRgk3k.mjs} +2 -2
- package/dist/{cloudflare-operations-AiWashgg.mjs → cloudflare-operations-BhbK6yTq.mjs} +1 -1
- package/dist/{cloudflare-operations-fxHb-byx.mjs → cloudflare-operations-CjaV4lZi.mjs} +2 -2
- package/dist/{connect-Bd4kJd9U.mjs → connect-DCvUmPXY.mjs} +13 -10
- package/dist/{create-project-Boczwj5r.mjs → create-project-C734I-Mu.mjs} +1 -1
- package/dist/{create-project-bMf6ffLZ.mjs → create-project-eAPgYq35.mjs} +13 -13
- package/dist/{db-8uG64XLl.mjs → db-C07GEdKF.mjs} +27 -30
- package/dist/{delete-NvbiyeJf.mjs → delete-pKMVsrpJ.mjs} +5 -6
- package/dist/deploy-BDu1vhSH.mjs +2 -0
- package/dist/{deploy-DzAIwqNU.mjs → deploy-DfsAe-T0.mjs} +9567 -9215
- package/dist/{dev-inbox-P0u4tM8Y.mjs → dev-inbox-D64ZKUod.mjs} +5 -6
- package/dist/{domain-y5Tvydvo.mjs → domain-D3uA9ize.mjs} +8 -8
- package/dist/{email-B3umsW75.mjs → email-z3o2cwjH.mjs} +8 -8
- package/dist/{env-BS6qYHDb.mjs → env-3Q8-_2IH.mjs} +7 -9
- package/dist/{env-types-C2_bIk_b.mjs → env-types-D5kds_OZ.mjs} +1 -1
- package/dist/{env-validation-DbTg7-ar.mjs → env-validation-cZBvGWaP.mjs} +1 -1
- package/dist/{env-validation-BPn7vk-V.mjs → env-validation-vBSQ8gw5.mjs} +3 -3
- package/dist/gen-ById9r2j.mjs +2 -0
- package/dist/{gen-B580--vC.mjs → gen-NjwoG9FK.mjs} +2 -4
- package/dist/{github-cmd-v45BdfKX.mjs → github-cmd-DquUq-b1.mjs} +15 -24
- package/dist/{headers-DWi2IXWx.mjs → headers-2rKda9Y6.mjs} +1 -1
- package/dist/help-DPGBwomV.mjs +2 -0
- package/dist/{help-daGKjXGk.mjs → help-DRZXC4fj.mjs} +8 -4
- package/dist/{inbound-aVHEUhKo.mjs → inbound-fRkqcXaC.mjs} +1 -1
- package/dist/index.d.mts +18 -14
- package/dist/index.mjs +2176 -2110
- package/dist/{info-B97bTX9N.mjs → info-BmA3_IFZ.mjs} +1 -3
- package/dist/{init-Bvy7zrBo.mjs → init-DT7yuuyl.mjs} +28 -27
- package/dist/{link-CDqqCjFl.mjs → link-CXOlqh2F.mjs} +6 -7
- package/dist/{list-CZj0dzKY.mjs → list-eEWVJEPn.mjs} +8 -9
- package/dist/{local-d1-2CMnpuW_.mjs → local-d1-Df4XpwhW.mjs} +1 -1
- package/dist/log-vqY3pqwI.mjs +29 -0
- package/dist/login-C98-sw79.mjs +2 -0
- package/dist/{login-UZKFM_u7.mjs → login-pWQHYVu2.mjs} +12 -10
- package/dist/{logs-CUZ6t9t3.mjs → logs-DnxVX7TR.mjs} +11 -13
- package/dist/migrate-CEu2X5DB.mjs +2 -0
- package/dist/{migrate-DHul7PRV.mjs → migrate-CV1on-yJ.mjs} +2 -4
- package/dist/{operator-args-CLgKGlwU.mjs → operator-args-CAVcmwUt.mjs} +12 -5
- package/dist/{operator-auth-8KnOVXVd.mjs → operator-auth-CkmTE3rt.mjs} +2 -2
- package/dist/{operator-client-DUwumHpQ.mjs → operator-client-LmwjxT6q.mjs} +3 -3
- package/dist/{operator-cmd-DBA6dl0m.mjs → operator-cmd-d-IEKgNk.mjs} +6 -6
- package/dist/{output-Dm_A4Tbv.mjs → output-BBsUwdyT.mjs} +22 -14
- package/dist/pages/client.d.mts +3 -0
- package/dist/pages/client.mjs +120 -29
- package/dist/pages/index.mjs +1 -1
- package/dist/{platform-args-BJdRtlLq.mjs → platform-args-Bzf8JPc2.mjs} +11 -3
- package/dist/platform-args-Cq6EjQro.mjs +2 -0
- package/dist/{platform-auth-config-B56E9YP1.mjs → platform-auth-config-0V0lA3pF.mjs} +7 -7
- package/dist/{platform-auth-protection-BDWO_aER.mjs → platform-auth-protection-DFeJ-JkK.mjs} +9 -9
- package/dist/{platform-auth-recovery-1gg4CSRe.mjs → platform-auth-recovery-ICy4muq6.mjs} +7 -7
- package/dist/{platform-cmd-Bt-1w6pY.mjs → platform-cmd-BPySFOew.mjs} +1 -1
- package/dist/{platform-cmd-DMcQStSc.mjs → platform-cmd-D7vSWMvV.mjs} +38 -28
- package/dist/platform-discovery-DDDUvnqp.mjs +27 -0
- package/dist/{platform-domain-BNkcz0OB.mjs → platform-domain-CUdY064e.mjs} +5 -5
- package/dist/{platform-lifecycle-BE6C_jxh.mjs → platform-lifecycle-BaUdTRPU.mjs} +1 -1
- package/dist/{platform-lifecycle-9OyBALhH.mjs → platform-lifecycle-Dm09JNkn.mjs} +4404 -3297
- package/dist/{platform-management-CjwLVQwN.mjs → platform-management-BSEc_ZeG.mjs} +48 -11
- package/dist/platform-management-Bp6aoH2C.mjs +2 -0
- package/dist/{platform-plans-config-BNGKGr4P.mjs → platform-plans-config-B0pOVQyW.mjs} +3 -3
- package/dist/{platform-recovery-D6KSpuFm.mjs → platform-recovery-WOZ95Uze.mjs} +4 -4
- package/dist/{platform-registry-QBa4DK32.mjs → platform-registry-KfNEF84O.mjs} +3 -3
- package/dist/{prepare-B5Mkic5u.mjs → prepare-39EvOhI6.mjs} +2 -4
- package/dist/prepare-CnjcTV2s.mjs +2 -0
- package/dist/{prepare-DOsL0CC9.mjs → prepare-DnaKBi--.mjs} +1 -1
- package/dist/{project-C0Fqu05O.mjs → project-BkbfDs0V.mjs} +15 -82
- package/dist/project-IOjBU8R6.mjs +2 -0
- package/dist/{project-cmd-CNzrqvBv.mjs → project-cmd-Bs5A392E.mjs} +21 -22
- package/dist/{project-team-DQOWPfQT.mjs → project-team-ohAWWaew.mjs} +8 -9
- package/dist/{project-token-CTDYU0Cc.mjs → project-token-CP01Jna6.mjs} +6 -9
- package/dist/{project-zero-trust-BNAkW-_0.mjs → project-zero-trust-BzkVgx35.mjs} +5 -6
- package/dist/prompts-6OSVA7DJ.mjs +2087 -0
- package/dist/prompts-ZAuJlyCj.mjs +2 -0
- package/dist/{provision-C4ORE7G7.mjs → provision-BEv0k-qz.mjs} +1 -1
- package/dist/{provision-CJFgTZY8.mjs → provision-Btj1jppf.mjs} +5 -7
- package/dist/{requests-MhxYnau8.mjs → requests-B3PBuGlX.mjs} +5 -6
- package/dist/{rollback-CJ6iSDoU.mjs → rollback-DDub9GsO.mjs} +9 -10
- package/dist/runtime/ai.mjs +3 -5
- package/dist/runtime/email/testing.mjs +2 -2
- package/dist/runtime/email.mjs +36 -18
- package/dist/runtime/remote/index.mjs +2 -2
- package/dist/runtime/routing.mjs +1 -1
- package/dist/{secret-Dli5fP0B.mjs → secret-3c72lY1U.mjs} +15 -16
- package/dist/{skills-D1II1Juz.mjs → skills-BPQUGClu.mjs} +1 -1
- package/dist/{subcommand-prompt-CY1C4fvl.mjs → subcommand-prompt-Dhom39bd.mjs} +40 -32
- package/dist/sveltekit.d.mts +1 -1
- package/dist/sveltekit.mjs +4 -9
- package/dist/{wrangler-7K-bW_DL.mjs → wrangler-DhUerFkW.mjs} +10 -15
- package/package.json +22 -23
- package/sandbox.Dockerfile +1 -1
- package/skills/void/SKILL.md +6 -1
- package/skills/void/docs/guide/ai.md +24 -86
- package/skills/void/docs/guide/auth.md +0 -2
- package/skills/void/docs/guide/database/d1.md +7 -7
- package/skills/void/docs/guide/deployment.md +58 -102
- package/skills/void/docs/guide/edge/headers.md +1 -1
- package/skills/void/docs/guide/email/domains.md +5 -1
- package/skills/void/docs/guide/email/sending.md +1 -1
- package/skills/void/docs/guide/env-vars.md +1 -5
- package/skills/void/docs/guide/index.md +19 -18
- package/skills/void/docs/guide/kv.md +0 -2
- package/skills/void/docs/guide/pages-routing/actions-and-forms.md +49 -47
- package/skills/void/docs/guide/pages-routing/overview.md +2 -2
- package/skills/void/docs/guide/platform/administration/email.md +0 -2
- package/skills/void/docs/guide/platform/administration/operations.md +11 -22
- package/skills/void/docs/guide/platform/administration/plans.md +1 -5
- package/skills/void/docs/guide/platform/administration/zero-trust.md +24 -9
- package/skills/void/docs/guide/platform/development/schema-ci.md +7 -1
- package/skills/void/docs/guide/platform/installation/ci.md +1 -1
- package/skills/void/docs/guide/platform/installation/credentials.md +10 -3
- package/skills/void/docs/guide/platform/installation/domains.md +8 -3
- package/skills/void/docs/guide/platform/installation/first-deployment.md +2 -2
- package/skills/void/docs/guide/platform/installation/maintenance.md +37 -5
- package/skills/void/docs/guide/platform/installation/prerequisites.md +87 -14
- package/skills/void/docs/guide/platform/installation/setup.md +80 -10
- package/skills/void/docs/guide/quickstart.md +37 -80
- package/skills/void/docs/guide/remote-dev.md +1 -1
- package/skills/void/docs/guide/sandboxes.md +36 -46
- package/skills/void/docs/guide/self-hosted-platform.md +20 -0
- package/skills/void/docs/guide/websockets.md +0 -2
- package/skills/void/docs/integrations/frameworks/overview.md +2 -2
- package/skills/void/docs/integrations/frameworks/sveltekit.md +40 -25
- package/skills/void/docs/integrations/nodejs-bun-deno.md +7 -2
- package/skills/void/docs/reference/api/resources.md +27 -0
- package/skills/void/docs/reference/api.md +1 -1
- package/skills/void/docs/reference/cli/auth.md +4 -3
- package/skills/void/docs/reference/cli/database.md +1 -1
- package/skills/void/docs/reference/cli/deploy.md +21 -1
- package/skills/void/docs/reference/cli/platform-installation.md +42 -27
- package/skills/void/docs/reference/cli/platform-operations.md +4 -8
- package/skills/void/docs/reference/cli/platform-zero-trust.md +14 -0
- package/skills/void/docs/reference/cli/platform.md +5 -0
- package/skills/void/docs/reference/config.md +1 -1
- package/skills/void/docs/reference/resource-inference.md +11 -8
- package/dist/auth-CCjt0hcq.mjs +0 -2
- package/dist/cf-build-output-_0HNWysu.mjs +0 -2
- package/dist/client-Cu7jWiF1.mjs +0 -2
- package/dist/deploy-bjXdFCtn.mjs +0 -2
- package/dist/dist-BuDuKZJv.mjs +0 -2
- package/dist/dist-CTBk70IR.mjs +0 -1310
- package/dist/gen-BVaUUumi.mjs +0 -2
- package/dist/help-DofyZuY7.mjs +0 -2
- package/dist/log-ChfPKsVd.mjs +0 -26
- package/dist/login-DYt_An22.mjs +0 -2
- package/dist/migrate-8_2u55MD.mjs +0 -2
- package/dist/platform-args-D3RXyR6h.mjs +0 -2
- package/dist/platform-management-CnyTdcWX.mjs +0 -2
- package/dist/prepare-cgvDMtSb.mjs +0 -2
- package/dist/project-BuUwfj6f.mjs +0 -2
- package/skills/void/docs/guide/env-migration.md +0 -109
- package/dist/{cf-build-output-BPqOT964.mjs → cf-build-output-U8o1Gl6X.mjs} +1 -1
|
@@ -207,12 +207,12 @@ const DEFAULT_BUFFER_LIMIT = 100;
|
|
|
207
207
|
* workerd — so that is the dev server's own heap.
|
|
208
208
|
*/
|
|
209
209
|
const DEFAULT_BUFFER_BYTES = 67108864;
|
|
210
|
+
const inboxGlobal = globalThis;
|
|
210
211
|
function registry() {
|
|
211
|
-
|
|
212
|
-
let r = g[SINK_KEY];
|
|
212
|
+
let r = inboxGlobal[SINK_KEY];
|
|
213
213
|
if (!r) {
|
|
214
214
|
r = { sinks: /* @__PURE__ */ new Set() };
|
|
215
|
-
|
|
215
|
+
inboxGlobal[SINK_KEY] = r;
|
|
216
216
|
}
|
|
217
217
|
return r;
|
|
218
218
|
}
|
|
@@ -236,15 +236,14 @@ function hasActiveSink() {
|
|
|
236
236
|
}
|
|
237
237
|
/** Get or create the shared dev-server ring buffer. */
|
|
238
238
|
function getDevBuffer(limit = DEFAULT_BUFFER_LIMIT) {
|
|
239
|
-
|
|
240
|
-
let b = g[BUFFER_KEY];
|
|
239
|
+
let b = inboxGlobal[BUFFER_KEY];
|
|
241
240
|
if (!b) {
|
|
242
241
|
b = {
|
|
243
242
|
limit,
|
|
244
243
|
bytes: 0,
|
|
245
244
|
items: []
|
|
246
245
|
};
|
|
247
|
-
|
|
246
|
+
inboxGlobal[BUFFER_KEY] = b;
|
|
248
247
|
}
|
|
249
248
|
return b;
|
|
250
249
|
}
|
|
@@ -1,8 +1,8 @@
|
|
|
1
|
-
import {
|
|
2
|
-
import {
|
|
3
|
-
import {
|
|
4
|
-
import {
|
|
5
|
-
import { c as import_picocolors } from "./output-
|
|
1
|
+
import { n as readDeploymentPlatform, r as readProjectConfig } from "./project-BkbfDs0V.mjs";
|
|
2
|
+
import { c as getToken } from "./auth-7wuZ5ob8.mjs";
|
|
3
|
+
import { B as note, L as log } from "./prompts-6OSVA7DJ.mjs";
|
|
4
|
+
import { r as PlatformClient } from "./client-RsPo8wsP.mjs";
|
|
5
|
+
import { c as import_picocolors } from "./output-BBsUwdyT.mjs";
|
|
6
6
|
//#region src/cli/domain.ts
|
|
7
7
|
async function runDomainCommand(root, args) {
|
|
8
8
|
const platform = readDeploymentPlatform(root);
|
|
@@ -40,7 +40,7 @@ async function runDomainCommand(root, args) {
|
|
|
40
40
|
}
|
|
41
41
|
async function runCloudflareDomainCommand(root, args) {
|
|
42
42
|
if (args.projectSlug) throw new Error("domain: --project selects a Void platform project and is not used for direct Cloudflare apps.");
|
|
43
|
-
const { changeCloudflareDomain, listCloudflareDomains } = await import("./cloudflare-operations-
|
|
43
|
+
const { changeCloudflareDomain, listCloudflareDomains } = await import("./cloudflare-operations-BhbK6yTq.mjs");
|
|
44
44
|
if (args.subcommand === "add") {
|
|
45
45
|
const result = await changeCloudflareDomain(root, args.hostname, "add");
|
|
46
46
|
log.success(result.modified ? `Domain ${args.hostname} added and activated on Cloudflare.` : `Domain ${args.hostname} is already configured.`);
|
|
@@ -123,7 +123,7 @@ function computeRollup(status) {
|
|
|
123
123
|
};
|
|
124
124
|
if (status.cf_status === "pending_issuance" || status.cf_status === "active" && status.ssl_status !== "active") return {
|
|
125
125
|
state: "issuing_cert",
|
|
126
|
-
diagnostic:
|
|
126
|
+
diagnostic: "Cloudflare is issuing the SSL certificate automatically (typically <5 minutes). If this persists, confirm the traffic CNAME below is published."
|
|
127
127
|
};
|
|
128
128
|
if (status.cf_status === "pending_deployment") return {
|
|
129
129
|
state: "deploying_cert",
|
|
@@ -157,7 +157,7 @@ async function domainStatus(client, projectId, hostname, verbose) {
|
|
|
157
157
|
note(rollupLines.join("\n"), "Domain Status");
|
|
158
158
|
let cnameSection;
|
|
159
159
|
let ownershipSection;
|
|
160
|
-
if (status.
|
|
160
|
+
if (status.ssl_status !== "active") cnameSection = `CNAME (traffic)\n ${status.hostname} → ${status.cname_target}`;
|
|
161
161
|
if (status.ownership_verification) ownershipSection = `TXT (ownership verification)\n ${status.ownership_verification.name} → ${status.ownership_verification.value}`;
|
|
162
162
|
const pendingRecords = [cnameSection, ownershipSection].filter((s) => s !== void 0);
|
|
163
163
|
if (pendingRecords.length > 0) note(pendingRecords.join("\n\n"), pendingRecords.length === 1 ? "Add this DNS record to your provider" : "Add these DNS records to your provider");
|
|
@@ -2,13 +2,13 @@ import { a as join } from "./dist-BVqXeR_h.mjs";
|
|
|
2
2
|
import { n as readProjectPaths } from "./project-paths-GgcMozYz.mjs";
|
|
3
3
|
import { m as readConfig } from "./config-Br_JZD6u.mjs";
|
|
4
4
|
import { a as scanEmailHandlersSync } from "./email--tEtMoj_.mjs";
|
|
5
|
-
import {
|
|
6
|
-
import {
|
|
7
|
-
import {
|
|
8
|
-
import {
|
|
9
|
-
import {
|
|
10
|
-
import { n as
|
|
11
|
-
import { c as import_picocolors,
|
|
5
|
+
import { B as resolveDeployTransport, F as isWranglerNonInteractiveOrCI, G as deriveWorkerName, I as runWranglerAuthToken, N as createDeployWranglerRunner, d as applyEmailSetup, f as createNodeEmailDns, g as renderEmailChecklist, h as renderAddressMap, j as discoverRootWranglerConfig, m as preflightEmail, p as findEmailConfigConflicts, q as loadProvisionModule } from "./deploy-DfsAe-T0.mjs";
|
|
6
|
+
import { r as readProjectConfig } from "./project-BkbfDs0V.mjs";
|
|
7
|
+
import { A as writeProvisionedWranglerConfig } from "./wrangler-DhUerFkW.mjs";
|
|
8
|
+
import { c as getToken, u as openBrowser } from "./auth-7wuZ5ob8.mjs";
|
|
9
|
+
import { A as confirm, B as note, L as log, U as password, tt as isCancel } from "./prompts-6OSVA7DJ.mjs";
|
|
10
|
+
import { n as PlatformApiError, r as PlatformClient } from "./client-RsPo8wsP.mjs";
|
|
11
|
+
import { c as import_picocolors, r as createSpinner } from "./output-BBsUwdyT.mjs";
|
|
12
12
|
import { existsSync, mkdtempSync, rmSync, writeFileSync } from "node:fs";
|
|
13
13
|
import { tmpdir } from "node:os";
|
|
14
14
|
import { execSync } from "node:child_process";
|
|
@@ -387,7 +387,7 @@ async function emailDomainAdd(client, projectId, rawDomain, subdomain, deps = {}
|
|
|
387
387
|
"Create the token in three clicks: Continue to summary → Create Token → Copy.",
|
|
388
388
|
"Watching the clipboard for it — nothing is read until you copy, and it is cleared afterwards.",
|
|
389
389
|
"(Enter pastes it yourself instead.)",
|
|
390
|
-
`If the browser didn't open, visit:\n${import_picocolors.default.
|
|
390
|
+
`If the browser didn't open, visit:\n${import_picocolors.default.blue(url)}`
|
|
391
391
|
].join("\n"));
|
|
392
392
|
const spinner = watchSpinner;
|
|
393
393
|
const deadline = Date.now() + (deps.watchTimeoutMs ?? 6e5);
|
|
@@ -1,16 +1,14 @@
|
|
|
1
1
|
import { a as join } from "./dist-BVqXeR_h.mjs";
|
|
2
|
-
import {
|
|
3
|
-
import {
|
|
4
|
-
import { r as generateEnvTypes, t as findEnvFile } from "./env-types-
|
|
5
|
-
import { d as formatEnvReport, g as validateProdEnv, u as fetchRemoteSecretNames } from "./env-validation-
|
|
6
|
-
import {
|
|
7
|
-
import {
|
|
8
|
-
import { r as cliTitle } from "./output-Dm_A4Tbv.mjs";
|
|
2
|
+
import { n as readDeploymentPlatform, r as readProjectConfig } from "./project-BkbfDs0V.mjs";
|
|
3
|
+
import { c as getToken } from "./auth-7wuZ5ob8.mjs";
|
|
4
|
+
import { r as generateEnvTypes, t as findEnvFile } from "./env-types-D5kds_OZ.mjs";
|
|
5
|
+
import { d as formatEnvReport, g as validateProdEnv, u as fetchRemoteSecretNames } from "./env-validation-vBSQ8gw5.mjs";
|
|
6
|
+
import { B as note, H as outro, L as log } from "./prompts-6OSVA7DJ.mjs";
|
|
7
|
+
import { r as PlatformClient } from "./client-RsPo8wsP.mjs";
|
|
9
8
|
import { mkdirSync, writeFileSync } from "node:fs";
|
|
10
9
|
//#region src/cli/env.ts
|
|
11
10
|
async function runEnvCommand(root, args) {
|
|
12
11
|
console.log();
|
|
13
|
-
intro(cliTitle(`env ${args.subcommand}`));
|
|
14
12
|
if (args.subcommand === "check") {
|
|
15
13
|
await runCheck(root, args.useRemoteSecrets);
|
|
16
14
|
return;
|
|
@@ -26,7 +24,7 @@ async function runCheck(root, useRemoteSecrets) {
|
|
|
26
24
|
const platform = readDeploymentPlatform(root);
|
|
27
25
|
if (platform === "none") throw new Error("env: Deployment is disabled. Run `void init` to choose a platform.");
|
|
28
26
|
if (platform === "cloudflare") {
|
|
29
|
-
const { listCloudflareSecrets, resolveCloudflareOperationContext } = await import("./cloudflare-operations-
|
|
27
|
+
const { listCloudflareSecrets, resolveCloudflareOperationContext } = await import("./cloudflare-operations-BhbK6yTq.mjs");
|
|
30
28
|
remoteSecrets = await listCloudflareSecrets(resolveCloudflareOperationContext(root));
|
|
31
29
|
} else {
|
|
32
30
|
const token = getToken(root);
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import { l as relative } from "./dist-BVqXeR_h.mjs";
|
|
2
2
|
import { n as readProjectPaths } from "./project-paths-GgcMozYz.mjs";
|
|
3
|
-
import { i as voidWarn } from "./log-
|
|
3
|
+
import { i as voidWarn } from "./log-vqY3pqwI.mjs";
|
|
4
4
|
import { existsSync } from "node:fs";
|
|
5
5
|
//#region src/codegen/env-types.ts
|
|
6
6
|
/** Roots already warned about duplicate env.ts files — dedupes noisy repeat calls. */
|
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
import { a as computeInvalidEmittedKeys, c as deriveSelfHostSchemaFacts, p as readEmittedWorkerVars, r as SelfHostSchemaError } from "./env-validation-
|
|
1
|
+
import { a as computeInvalidEmittedKeys, c as deriveSelfHostSchemaFacts, p as readEmittedWorkerVars, r as SelfHostSchemaError } from "./env-validation-vBSQ8gw5.mjs";
|
|
2
2
|
export { SelfHostSchemaError, computeInvalidEmittedKeys, deriveSelfHostSchemaFacts, readEmittedWorkerVars };
|
|
@@ -1,12 +1,12 @@
|
|
|
1
1
|
import { a as join, n as dirname, u as resolve } from "./dist-BVqXeR_h.mjs";
|
|
2
|
-
import { i as voidWarn } from "./log-
|
|
3
|
-
import { t as findEnvFile } from "./env-types-
|
|
2
|
+
import { i as voidWarn } from "./log-vqY3pqwI.mjs";
|
|
3
|
+
import { t as findEnvFile } from "./env-types-D5kds_OZ.mjs";
|
|
4
4
|
import { a as loadLocalEnv, i as isClientEnvKey, r as findLegacyEnvFiles } from "./env-_v349JBd.mjs";
|
|
5
5
|
import { c as resolveCloudflareOperationArgv, n as decodeCloudflareOperationResult, r as encodeCloudflareOperation } from "./cloudflare-process-B-wekeR6.mjs";
|
|
6
6
|
import { existsSync, readFileSync } from "node:fs";
|
|
7
7
|
import { pathToFileURL } from "node:url";
|
|
8
|
-
import { spawn } from "node:child_process";
|
|
9
8
|
import { parse } from "jsonc-parser";
|
|
9
|
+
import { spawn } from "node:child_process";
|
|
10
10
|
//#region src/host/load-user-env.ts
|
|
11
11
|
/**
|
|
12
12
|
* Loader for the user's `env.ts`.
|
|
@@ -3,10 +3,9 @@ import { n as readProjectPaths } from "./project-paths-GgcMozYz.mjs";
|
|
|
3
3
|
import { m as readConfig, u as getDatabaseDialect } from "./config-Br_JZD6u.mjs";
|
|
4
4
|
import { n as readJournal, t as collectMigrations } from "./collect-DiTn9yr6.mjs";
|
|
5
5
|
import { n as ensureProjectTsconfig } from "./project-tsconfig-B8GeM0RM.mjs";
|
|
6
|
-
import {
|
|
7
|
-
import { t as writeDrizzleConfig } from "./config-D8MOgiQV.mjs";
|
|
6
|
+
import { H as outro, K as select, L as log, O as cancel, tt as isCancel } from "./prompts-6OSVA7DJ.mjs";
|
|
8
7
|
import { r as listDrizzleArtifacts, t as assertJournalCoherence } from "./validate-ctOrgiS3.mjs";
|
|
9
|
-
import {
|
|
8
|
+
import { t as writeDrizzleConfig } from "./config-D8MOgiQV.mjs";
|
|
10
9
|
import { t as buildDrizzleKitSpawnEnv } from "./yarn-pnp-BV4AzNul.mjs";
|
|
11
10
|
import { existsSync, mkdirSync, readFileSync, readdirSync, unlinkSync, writeFileSync } from "node:fs";
|
|
12
11
|
import { fileURLToPath } from "node:url";
|
|
@@ -15,7 +14,6 @@ import { spawnSync } from "node:child_process";
|
|
|
15
14
|
const drizzleKitBin = join(fileURLToPath(import.meta.resolve("drizzle-kit")), "..", "bin.cjs");
|
|
16
15
|
async function runGenCommand(root, args) {
|
|
17
16
|
console.log();
|
|
18
|
-
intro(cliTitle("gen"));
|
|
19
17
|
if (args.subcommand === "model") await runModel(root, args.name, args.columns);
|
|
20
18
|
else if (args.subcommand === "migration") runMigration(root, args.name);
|
|
21
19
|
else if (args.subcommand === "route") runRoute(root, args.path, args.methods);
|
|
@@ -1,8 +1,8 @@
|
|
|
1
|
-
import {
|
|
2
|
-
import {
|
|
3
|
-
import {
|
|
4
|
-
import {
|
|
5
|
-
import { c as import_picocolors } from "./output-
|
|
1
|
+
import { r as readProjectConfig } from "./project-BkbfDs0V.mjs";
|
|
2
|
+
import { c as getToken, n as createCodeChallenge, r as createCodeVerifier, t as awaitBrowserCallback, u as openBrowser } from "./auth-7wuZ5ob8.mjs";
|
|
3
|
+
import { A as confirm, K as select, L as log, O as cancel, X as text, tt as isCancel } from "./prompts-6OSVA7DJ.mjs";
|
|
4
|
+
import { c as platformErrorMessage, n as PlatformApiError, r as PlatformClient, s as parsePlatformErrorBody } from "./client-RsPo8wsP.mjs";
|
|
5
|
+
import { c as import_picocolors } from "./output-BBsUwdyT.mjs";
|
|
6
6
|
import { r as resolveProjectBySlug, t as getRequestedProjectSlug } from "./resolve-project-BG5ORGID.mjs";
|
|
7
7
|
import { t as collectGitDeployMetadata } from "./git-metadata-D-gurjzG.mjs";
|
|
8
8
|
import { randomBytes } from "node:crypto";
|
|
@@ -145,7 +145,7 @@ async function runInstall(root, client, linkIdentity = runGithubLink) {
|
|
|
145
145
|
}
|
|
146
146
|
} else throw err;
|
|
147
147
|
}
|
|
148
|
-
log.message(`Open this URL to install the Void GitHub App:\n${import_picocolors.default.
|
|
148
|
+
log.message(`Open this URL to install the Void GitHub App:\n${import_picocolors.default.blue(url)}`);
|
|
149
149
|
const { execFile } = await import("node:child_process");
|
|
150
150
|
openBrowser(url, execFile);
|
|
151
151
|
log.message("After installing, run `void github connect` to link a repository to your project.");
|
|
@@ -173,7 +173,7 @@ async function runGithubLink(root, client) {
|
|
|
173
173
|
return url;
|
|
174
174
|
},
|
|
175
175
|
describeError: (p) => p.get("error") ? "GitHub authorization failed." : null,
|
|
176
|
-
onUrl: (url) => log.message(`Open this URL to link your GitHub account:\n${import_picocolors.default.
|
|
176
|
+
onUrl: (url) => log.message(`Open this URL to link your GitHub account:\n${import_picocolors.default.blue(url)}`),
|
|
177
177
|
finalize: async (params) => {
|
|
178
178
|
const linkCode = params.get("link_code");
|
|
179
179
|
if (!linkCode) throw new Error("github: link callback did not return a link code.");
|
|
@@ -214,7 +214,7 @@ async function performGithubJoin(client) {
|
|
|
214
214
|
return url;
|
|
215
215
|
},
|
|
216
216
|
describeError: (p) => p.get("error") ? "GitHub authorization failed." : null,
|
|
217
|
-
onUrl: (url) => log.message(`Open this URL to join your organization's shared GitHub App installations:\n${import_picocolors.default.
|
|
217
|
+
onUrl: (url) => log.message(`Open this URL to join your organization's shared GitHub App installations:\n${import_picocolors.default.blue(url)}`),
|
|
218
218
|
finalize: async (params) => {
|
|
219
219
|
const joinCode = params.get("join_code");
|
|
220
220
|
if (!joinCode) throw new Error("github: join callback did not return a join code.");
|
|
@@ -280,7 +280,7 @@ async function runGithubConnectAuthorize(client, installationId, repoFullName) {
|
|
|
280
280
|
if (e === "repo_not_accessible") return `You don't have access to ${repoFullName} under this installation on GitHub.`;
|
|
281
281
|
return e ? "GitHub authorization failed." : null;
|
|
282
282
|
},
|
|
283
|
-
onUrl: (url) => log.message(`Open this URL to authorize access to ${repoFullName}:\n${import_picocolors.default.
|
|
283
|
+
onUrl: (url) => log.message(`Open this URL to authorize access to ${repoFullName}:\n${import_picocolors.default.blue(url)}`),
|
|
284
284
|
finalize: async (params) => {
|
|
285
285
|
const grant = params.get("connect_grant");
|
|
286
286
|
if (!grant) throw new Error("github: connect authorization did not return a grant.");
|
|
@@ -303,8 +303,8 @@ async function promptRepoFullName(root) {
|
|
|
303
303
|
const input = await text({
|
|
304
304
|
message: "Repository (owner/repo):",
|
|
305
305
|
placeholder: gitDefault ?? "owner/repo",
|
|
306
|
-
|
|
307
|
-
validate: (value) => /^[^/\s]+\/[^/\s]+$/.test((value
|
|
306
|
+
defaultValue: gitDefault ?? void 0,
|
|
307
|
+
validate: (value) => /^[^/\s]+\/[^/\s]+$/.test((value || gitDefault || "").trim()) ? void 0 : "Enter the repository as owner/repo."
|
|
308
308
|
});
|
|
309
309
|
if (isCancel(input)) {
|
|
310
310
|
cancel("Cancelled.");
|
|
@@ -447,7 +447,7 @@ async function runConnect(root, client, args) {
|
|
|
447
447
|
const input = await text({
|
|
448
448
|
message: "Branch to deploy from:",
|
|
449
449
|
placeholder: branchDefault,
|
|
450
|
-
|
|
450
|
+
defaultValue: branchDefault
|
|
451
451
|
});
|
|
452
452
|
if (isCancel(input)) {
|
|
453
453
|
cancel("Cancelled.");
|
|
@@ -483,7 +483,7 @@ async function runConnect(root, client, args) {
|
|
|
483
483
|
const input = await text({
|
|
484
484
|
message: "Deploy workflow file:",
|
|
485
485
|
placeholder: DEFAULT_WORKFLOW_PATH,
|
|
486
|
-
|
|
486
|
+
defaultValue: DEFAULT_WORKFLOW_PATH,
|
|
487
487
|
validate(value) {
|
|
488
488
|
const v = (value ?? "").trim();
|
|
489
489
|
if (v.length === 0 || isValidWorkflowPath(v)) return;
|
|
@@ -505,9 +505,8 @@ async function runConnect(root, client, args) {
|
|
|
505
505
|
workflowPath,
|
|
506
506
|
...extra
|
|
507
507
|
});
|
|
508
|
-
let connection;
|
|
509
508
|
try {
|
|
510
|
-
|
|
509
|
+
await attemptConnect();
|
|
511
510
|
} catch (err) {
|
|
512
511
|
if (!(err instanceof PlatformApiError)) throw err;
|
|
513
512
|
if (err.status === 403 && err.code === "connect_authorization_required") {
|
|
@@ -517,7 +516,7 @@ async function runConnect(root, client, args) {
|
|
|
517
516
|
}
|
|
518
517
|
const grant = await runGithubConnectAuthorize(client, installation.installation_id, repoFullName);
|
|
519
518
|
try {
|
|
520
|
-
|
|
519
|
+
await attemptConnect({
|
|
521
520
|
connectGrant: grant.connectGrant,
|
|
522
521
|
codeVerifier: grant.codeVerifier
|
|
523
522
|
});
|
|
@@ -537,10 +536,6 @@ async function runConnect(root, client, args) {
|
|
|
537
536
|
throw err;
|
|
538
537
|
}
|
|
539
538
|
}
|
|
540
|
-
if (workflowPath !== void 0 && connection.workflow_path !== workflowPath) {
|
|
541
|
-
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.`);
|
|
542
|
-
process.exit(1);
|
|
543
|
-
}
|
|
544
539
|
log.success(`Connected ${repoFullName} (${branch}) → project. Push to ${branch} to deploy.`);
|
|
545
540
|
}
|
|
546
541
|
async function runGithubUpdate(root, client, args) {
|
|
@@ -677,10 +672,6 @@ async function runGithubUpdate(root, client, args) {
|
|
|
677
672
|
}
|
|
678
673
|
throw err;
|
|
679
674
|
}
|
|
680
|
-
if (patch.workflowPath !== void 0 && updated.workflow_path !== patch.workflowPath) {
|
|
681
|
-
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.`);
|
|
682
|
-
process.exit(1);
|
|
683
|
-
}
|
|
684
675
|
log.success(`Updated ${updated.repo_full_name} → branch ${updated.branch}, executor ${updated.build_executor}, workflow ${updated.workflow_path}.`);
|
|
685
676
|
}
|
|
686
677
|
/**
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import { a as join } from "./dist-BVqXeR_h.mjs";
|
|
2
2
|
import { a as convertFallbacksConfig, c as convertRewritesConfig, f as isProtocolRelative, l as countSplats, n as VALID_REDIRECT_STATUSES, o as convertHeadersConfig, p as parseHostPrefixedSource, s as convertRedirectsConfig } from "./config-Br_JZD6u.mjs";
|
|
3
|
-
import { i as voidWarn } from "./log-
|
|
3
|
+
import { i as voidWarn } from "./log-vqY3pqwI.mjs";
|
|
4
4
|
import { existsSync, readFileSync } from "node:fs";
|
|
5
5
|
//#region src/cli/headers.ts
|
|
6
6
|
/**
|
|
@@ -1,8 +1,8 @@
|
|
|
1
1
|
import { a as join } from "./dist-BVqXeR_h.mjs";
|
|
2
|
-
import {
|
|
2
|
+
import { B as note, H as outro } from "./prompts-6OSVA7DJ.mjs";
|
|
3
3
|
import { n as getPackageDir } from "./agents-B_pX_HmQ.mjs";
|
|
4
|
-
import { c as import_picocolors, s as helpLine, t as categoryTitle, u as sectionTitle } from "./output-
|
|
5
|
-
import { n as operatorGroups, t as operatorCommands } from "./operator-args-
|
|
4
|
+
import { c as import_picocolors, s as helpLine, t as categoryTitle, u as sectionTitle } from "./output-BBsUwdyT.mjs";
|
|
5
|
+
import { n as operatorGroups, t as operatorCommands } from "./operator-args-CAVcmwUt.mjs";
|
|
6
6
|
import { readFileSync } from "node:fs";
|
|
7
7
|
//#region src/cli/ascii.ts
|
|
8
8
|
const asciiArts = [
|
|
@@ -82,7 +82,7 @@ function operatorHelpTree() {
|
|
|
82
82
|
})),
|
|
83
83
|
...(entry.booleans ?? []).map((flag) => ({
|
|
84
84
|
command: `--${flag}`,
|
|
85
|
-
description: flag === "follow" ? "Poll new logs until interrupted or the build ends" : flag === "ended" ? "Attest that the original provider execution has ended" : flag === "protect-new-projects" ? "Protect newly created projects by default" : flag === "check" && group === "zero-trust" ? "Also check the saved settings against Cloudflare Access (several API calls)" : flag === "token-stdin" && group === "zero-trust" ? "Read the Access management API token from stdin" : flag === "token-stdin" && group === "email" ? entry.action === "domain-remove" ? "Read a replacement Cloudflare token for blocked project cleanup from stdin" : "Read a scoped Cloudflare API token from stdin" : "Read a full API session from stdin for explicit operator session exchange"
|
|
85
|
+
description: flag === "follow" ? "Poll new logs until interrupted or the build ends" : flag === "ended" ? "Attest that the original provider execution has ended" : flag === "public-apps" ? "Manage public app rules without identity policies" : flag === "protect-new-projects" ? "Protect newly created projects by default" : flag === "check" && group === "zero-trust" ? "Also check the saved settings against Cloudflare Access (several API calls)" : flag === "token-stdin" && group === "zero-trust" ? "Read the Access management API token from stdin" : flag === "token-stdin" && group === "email" ? entry.action === "domain-remove" ? "Read a replacement Cloudflare token for blocked project cleanup from stdin" : "Read a scoped Cloudflare API token from stdin" : "Read a full API session from stdin for explicit operator session exchange"
|
|
86
86
|
}))
|
|
87
87
|
]
|
|
88
88
|
}]))
|
|
@@ -607,6 +607,10 @@ const HELP_TREE = {
|
|
|
607
607
|
command: "--no-access-protection",
|
|
608
608
|
description: "Skip Cloudflare Access protection"
|
|
609
609
|
},
|
|
610
|
+
{
|
|
611
|
+
command: "--app-access <public|platform|custom>",
|
|
612
|
+
description: "Choose public apps, reuse platform Access, or select separate app policies"
|
|
613
|
+
},
|
|
610
614
|
{
|
|
611
615
|
command: "--hyperdrive <create|id>",
|
|
612
616
|
description: "Create Hyperdrive or use the specified existing configuration"
|
|
@@ -91,7 +91,7 @@ async function parseEmail(message) {
|
|
|
91
91
|
const proxyRawCache = /* @__PURE__ */ new WeakMap();
|
|
92
92
|
/**
|
|
93
93
|
* Remove the platform-injected `<slug>+` prefix from a recipient address.
|
|
94
|
-
* The platform's shared sender (e.g. `mail.
|
|
94
|
+
* The platform's shared sender (e.g. `mail.example.com`) rewrites every recipient to
|
|
95
95
|
* `<slug>+<tag>@<domain>`; user handlers expect `<tag>@<domain>`. If the
|
|
96
96
|
* slug is unknown, missing, or doesn't match the local-part prefix, the
|
|
97
97
|
* address is returned unchanged so callers without slug context (e.g. the
|
package/dist/index.d.mts
CHANGED
|
@@ -7,20 +7,7 @@ import { Plugin } from "vite";
|
|
|
7
7
|
//#region src/router/parse-filename.d.ts
|
|
8
8
|
type RouteEnvironment = "dev" | "prod";
|
|
9
9
|
//#endregion
|
|
10
|
-
//#region src/
|
|
11
|
-
/**
|
|
12
|
-
* Decide whether to inject a Workers AI binding into the built wrangler config.
|
|
13
|
-
*
|
|
14
|
-
* Builds use the production binding. During dev, a project explicitly saved
|
|
15
|
-
* with the direct Cloudflare destination uses Cloudflare's remote binding;
|
|
16
|
-
* managed and unsaved projects keep using the Void HTTPS proxy.
|
|
17
|
-
*
|
|
18
|
-
* `!resolvedAi` is load-bearing: mergeBindings' return is defu-merged over the
|
|
19
|
-
* resolved root-wrangler config and wins, so skipping when the user already
|
|
20
|
-
* declared an `ai` binding avoids clobbering theirs. `!resultAi` is harmless
|
|
21
|
-
* defense-in-depth (nothing else in mergeBindings sets `result.ai`).
|
|
22
|
-
*/
|
|
23
|
-
export declare function shouldBindWorkersAi(command: string, needsAI: boolean, resolvedAi: unknown, resultAi: unknown, directCloudflareDev?: boolean): boolean;
|
|
10
|
+
//#region src/plugin-binding-utils.d.ts
|
|
24
11
|
/**
|
|
25
12
|
* Decide whether to inject the `void dev` email-inbox loopback var.
|
|
26
13
|
*
|
|
@@ -43,8 +30,25 @@ export declare function shouldBindWorkersAi(command: string, needsAI: boolean, r
|
|
|
43
30
|
* only arm a path that must then fail; gate on it instead.
|
|
44
31
|
*/
|
|
45
32
|
export declare function shouldInjectEmailDevInboxVar(routeEnvironment: RouteEnvironment, needsEmail: boolean | undefined, assetsBinding: string | undefined): boolean;
|
|
33
|
+
//#endregion
|
|
34
|
+
//#region src/plugin-ai-setup.d.ts
|
|
35
|
+
/**
|
|
36
|
+
* Decide whether to inject a Workers AI binding into the built wrangler config.
|
|
37
|
+
*
|
|
38
|
+
* Builds use the production binding. During dev, a project explicitly saved
|
|
39
|
+
* with the direct Cloudflare destination uses Cloudflare's remote binding;
|
|
40
|
+
* managed and unsaved projects keep using the Void HTTPS proxy.
|
|
41
|
+
*
|
|
42
|
+
* `!resolvedAi` is load-bearing: mergeBindings' return is defu-merged over the
|
|
43
|
+
* resolved root-wrangler config and wins, so skipping when the user already
|
|
44
|
+
* declared an `ai` binding avoids clobbering theirs. `!resultAi` is harmless
|
|
45
|
+
* defense-in-depth (nothing else in mergeBindings sets `result.ai`).
|
|
46
|
+
*/
|
|
47
|
+
export declare function shouldBindWorkersAi(command: string, needsAI: boolean, resolvedAi: unknown, resultAi: unknown, directCloudflareDev?: boolean): boolean;
|
|
46
48
|
/** Resolve the runtime Workers AI binding, preserving a root Wrangler declaration. */
|
|
47
49
|
export declare function resolveWorkersAiBindingName(resolvedAi: unknown, configuredName?: string): string;
|
|
50
|
+
//#endregion
|
|
51
|
+
//#region src/index.d.ts
|
|
48
52
|
export declare function voidPlugin(options?: {
|
|
49
53
|
persistTo?: string;
|
|
50
54
|
auxiliaryWorkers?: PluginConfig["auxiliaryWorkers"];
|