void 0.24.0 → 0.26.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/README.md +19 -106
- package/dist/{account-cmd-vJhh5lrb.mjs → account-cmd-CDry3B5V.mjs} +5 -5
- package/dist/{application-analysis-BVsVqc11.mjs → application-analysis-DC2yPvzY.mjs} +1 -1
- package/dist/{application-routing-B7QEjqSR.mjs → application-routing-C9khgLiS.mjs} +1 -1
- package/dist/{auth-DX3JURcX.mjs → auth-B60QDbjg.mjs} +1 -1
- package/dist/{auth-CQkSDS50.mjs → auth-D52yG7hl.mjs} +3 -3
- package/dist/{auth-link-D75t9wO2.mjs → auth-link-DjeOptYi.mjs} +5 -6
- package/dist/{auth-router-ClfhL1J7.mjs → auth-router-BRxIuqDi.mjs} +7 -7
- package/dist/{build-cmd-zMi1iFnS.mjs → build-cmd-Ce3C8huo.mjs} +6 -7
- package/dist/{cache-ZtQmyxVV.mjs → cache-CS8Yxr5a.mjs} +6 -7
- package/dist/{cancel-deploy-Box0kkEV.mjs → cancel-deploy-mZsD88Xa.mjs} +4 -6
- package/dist/{cf-access-BGe5sWXF.mjs → cf-access-YTlqvAsk.mjs} +1 -1
- package/dist/cf-build-output-ChY6-XWP.mjs +2 -0
- package/dist/cli/cli.mjs +45 -45
- package/dist/cli/cloudflare-operation-process.mjs +3 -3
- package/dist/cli/env-schema-probe.d.mts +1 -1
- package/dist/cli/env-schema-probe.mjs +2 -2
- package/dist/client-BxVixJBI.mjs +2 -0
- package/dist/{client-DKAsFA4X.mjs → client-mC-dFGDD.mjs} +103 -25
- package/dist/{cloudflare-cmd-CmY8dGkd.mjs → cloudflare-cmd-bhwCxAN6.mjs} +2 -2
- package/dist/{cloudflare-connect-IiR3ZieC.mjs → cloudflare-connect-CuhRgk3k.mjs} +2 -2
- package/dist/{cloudflare-operations-DzH-A966.mjs → cloudflare-operations-DYa3coIk.mjs} +2 -2
- package/dist/{cloudflare-operations-BCdXSsmo.mjs → cloudflare-operations-DoQrVHAt.mjs} +1 -1
- package/dist/{connect-B-usTnlF.mjs → connect-H6EvP62X.mjs} +12 -9
- package/dist/{create-project-CYOOAYcn.mjs → create-project-B2kk9Q0o.mjs} +6 -6
- package/dist/{create-project-FWbf5Olo.mjs → create-project-Dbb4uiN-.mjs} +1 -1
- package/dist/{db-Ck2eZ2iB.mjs → db-DpCKZto0.mjs} +35 -38
- package/dist/{delete-sK56qtzZ.mjs → delete-CxlSvsvW.mjs} +6 -7
- package/dist/{deploy-gCVaiJbS.mjs → deploy-CeEbnv4b.mjs} +9249 -8925
- package/dist/deploy-qmiLE1G1.mjs +2 -0
- package/dist/{dev-inbox-P0u4tM8Y.mjs → dev-inbox-D64ZKUod.mjs} +5 -6
- package/dist/{domain-DFfQE8jg.mjs → domain-B_9VgOm6.mjs} +8 -8
- package/dist/{email-CdnhUHvJ.mjs → email-BokHgjKj.mjs} +7 -7
- package/dist/{env-DmGdHi5i.mjs → env-BdTc-K2L.mjs} +7 -8
- package/dist/{env-public-BX_r8HR6.d.mts → env-public-DR7ZM6d-.d.mts} +1 -1
- package/dist/{env-validation-zZOCcQVZ.mjs → env-validation-cZBvGWaP.mjs} +1 -1
- package/dist/{fetch-stream-IvCYKyQL.mjs → fetch-stream-Nm3hkZbT.mjs} +8 -1
- package/dist/{gen-CshAkukR.mjs → gen-BhDlTpwW.mjs} +2 -4
- package/dist/gen-qCBwH3fZ.mjs +2 -0
- package/dist/{github-cmd-DftuEvIt.mjs → github-cmd-hhkTzlGS.mjs} +7 -16
- package/dist/{handler-CZ4nAylQ.d.mts → handler-BeK3weD4.d.mts} +1 -1
- package/dist/{help-Dotbf6iz.mjs → help-Bv44e2tm.mjs} +13 -9
- package/dist/help-Dw5f9Xrg.mjs +2 -0
- package/dist/index.d.mts +19 -15
- package/dist/index.mjs +2225 -2142
- package/dist/{info-B97bTX9N.mjs → info-DhtTKh65.mjs} +2 -4
- package/dist/{init-BTQEZZGJ.mjs → init-BMf4T03q.mjs} +17 -18
- package/dist/{limits-Bq5LG8Id.d.mts → limits-CFsDKQvU.d.mts} +1 -10
- package/dist/{limits-Cjuk2VPm.mjs → limits-D0vD1M9A.mjs} +1 -22
- package/dist/{link-B46sYH0K.mjs → link-BqYsSS_I.mjs} +6 -7
- package/dist/{list-BnPrIsU_.mjs → list-_kBToO-l.mjs} +10 -10
- package/dist/{live-Chw1eIMv.d.mts → live-iAuEH1hd.d.mts} +1 -1
- package/dist/{local-d1-2CMnpuW_.mjs → local-d1-fGxYrVD6.mjs} +2 -2
- package/dist/login-D7meQg_3.mjs +2 -0
- package/dist/{login-BuiMyUrx.mjs → login-DFuo-RWO.mjs} +9 -7
- package/dist/{logs-CZG9d-ic.mjs → logs-DYgnh6dH.mjs} +7 -8
- package/dist/migrate-CEu2X5DB.mjs +2 -0
- package/dist/{migrate-q4_njtaW.mjs → migrate-CV1on-yJ.mjs} +2 -4
- package/dist/{node-BkyRWRx8.mjs → node-C6Q6e1Es.mjs} +1 -1
- package/dist/{operator-args-B3BTmSoi.mjs → operator-args-DdY54Bgb.mjs} +1 -1
- package/dist/{operator-auth-7erYc6Lt.mjs → operator-auth-2dsGlTT5.mjs} +4 -8
- package/dist/{operator-client-CpHjTd0t.mjs → operator-client-BFqpp6z0.mjs} +3 -3
- package/dist/{operator-cmd-DGqPJUD3.mjs → operator-cmd-CUGHXrQf.mjs} +27 -9
- package/dist/operator-cmd-DRPvhpjM.mjs +2 -0
- package/dist/{output-CbM85T4k.mjs → output-BvdaehtE.mjs} +28 -4
- package/dist/pages/client.d.mts +4 -1
- package/dist/pages/client.mjs +120 -29
- package/dist/pages/index.mjs +1 -1
- package/dist/pages/islands-plugin.mjs +1 -1
- package/dist/pages/protocol.d.mts +2 -2
- package/dist/{plan-NPpwZ_kc.mjs → plan-CJGEeTEI.mjs} +2 -2
- package/dist/plan-COtUvdMA.mjs +2 -0
- package/dist/{platform-args-3k8X9-H_.mjs → platform-args-DSV2p4nY.mjs} +4 -2
- package/dist/platform-args-Dcy_5b_Y.mjs +2 -0
- package/dist/{platform-auth-config-DDrxUy4m.mjs → platform-auth-config-Bosx7U1h.mjs} +20 -19
- package/dist/{platform-auth-protection-BLadnnct.mjs → platform-auth-protection-DcbL_LW_.mjs} +8 -8
- package/dist/{platform-auth-recovery-CmCzX2Fl.mjs → platform-auth-recovery-WfTZ8K6o.mjs} +7 -7
- package/dist/{platform-cmd-DMDEc9uS.mjs → platform-cmd-DbKtQb_4.mjs} +73 -38
- package/dist/{platform-cmd-pMTRhvYs.mjs → platform-cmd-dyFUof0t.mjs} +1 -1
- package/dist/platform-discovery-BC0HCKYt.mjs +41 -0
- package/dist/{platform-domain-Di6EYrQl.mjs → platform-domain-Bsq43AJp.mjs} +5 -4
- package/dist/{platform-lifecycle-BFdSi9Qt.mjs → platform-lifecycle--5gWmDoI.mjs} +1 -1
- package/dist/{platform-lifecycle-BBoNzojY.mjs → platform-lifecycle-Cfi0o6xM.mjs} +4605 -3527
- package/dist/platform-management-Bbwf6-Dq.mjs +2 -0
- package/dist/{platform-management-CWOQOWXm.mjs → platform-management-BrF9STZp.mjs} +211 -31
- package/dist/{platform-plans-config-Vl9BP3H4.mjs → platform-plans-config-DU-8nC2Y.mjs} +3 -3
- package/dist/{platform-recovery-BJnQJEtQ.mjs → platform-recovery-DQAqAQYu.mjs} +3 -3
- package/dist/{platform-registry-DkPPXfp_.mjs → platform-registry-P387v42A.mjs} +18 -11
- package/dist/prepare-BBknoZI1.mjs +2 -0
- package/dist/{prepare-CBLT3CHH.mjs → prepare-BMrRWLwP.mjs} +3 -4
- package/dist/{prepare-DnaKBi--.mjs → prepare-WoUubFKL.mjs} +1 -1
- package/dist/{project-DsblYifa.mjs → project-BiaPQ7ur.mjs} +1 -1
- package/dist/{project-DKG5Ra8p.mjs → project-DQstYTxO.mjs} +1 -1
- package/dist/{project-cmd-DxnXstAq.mjs → project-cmd-BbH2LptN.mjs} +21 -22
- package/dist/{project-team-BmHcaALJ.mjs → project-team-Yiww3-go.mjs} +8 -9
- package/dist/{project-token-GionZlBI.mjs → project-token-BrtT2NkY.mjs} +6 -9
- package/dist/{project-zero-trust-JLCjVQA7.mjs → project-zero-trust-nYJ2V2nc.mjs} +5 -6
- package/dist/{prompts-BNUoTiaf.mjs → prompts-6OSVA7DJ.mjs} +58 -15
- package/dist/{prompts-2TGE6oXx.mjs → prompts-ZAuJlyCj.mjs} +1 -1
- package/dist/{protocol-CjF_iI9X.d.mts → protocol-BX8t2jiw.d.mts} +1 -1
- package/dist/{provision-CVku1JFU.mjs → provision-DMTPG8Rh.mjs} +1 -1
- package/dist/{provision-CaoxO_U7.mjs → provision-VeqAC77A.mjs} +18 -8
- package/dist/{requests-BOjIVAeF.mjs → requests-TIz_jtSu.mjs} +5 -6
- package/dist/{rollback-CwR3pLj3.mjs → rollback-dBqICPzj.mjs} +9 -10
- package/dist/{runner-Ol0TNjk6.mjs → runner--2KF6Kua.mjs} +1 -1
- package/dist/{runner-CXA9Fh8h.mjs → runner-voIltZrY.mjs} +1 -1
- package/dist/runtime/ai.d.mts +10 -11
- package/dist/runtime/ai.mjs +13 -18
- package/dist/runtime/client-react.mjs +1 -1
- package/dist/runtime/client-solid.mjs +1 -1
- package/dist/runtime/client-svelte.mjs +1 -1
- package/dist/runtime/client-vue.mjs +1 -1
- package/dist/runtime/client.mjs +1 -1
- package/dist/runtime/email/testing.mjs +1 -1
- package/dist/runtime/email.mjs +35 -17
- package/dist/runtime/env-public.d.mts +1 -1
- package/dist/runtime/fetch-stream.mjs +1 -1
- package/dist/runtime/handler.d.mts +1 -1
- package/dist/runtime/limits.d.mts +2 -2
- package/dist/runtime/limits.mjs +2 -2
- package/dist/runtime/live-client.d.mts +1 -1
- package/dist/runtime/live.d.mts +1 -1
- package/dist/runtime/migration-handler.mjs +33 -7
- package/dist/runtime/routing.d.mts +1 -1
- package/dist/runtime/routing.mjs +1 -1
- package/dist/runtime/sandbox.d.mts +1 -1
- package/dist/runtime/sandbox.mjs +12 -22
- package/dist/runtime/validator.d.mts +1 -1
- package/dist/runtime/ws-server.d.mts +1 -1
- package/dist/runtime/ws.d.mts +1 -1
- package/dist/{sandbox-XZAqzFlG.d.mts → sandbox-C5LFoJMf.d.mts} +7 -7
- package/dist/{scan-C7okrLyM.mjs → scan-C8dA7iM4.mjs} +10 -6
- package/dist/{secret-ByWJWBUG.mjs → secret-AKnNXNP5.mjs} +15 -16
- package/dist/{skills-C1PlclPt.mjs → skills-BPQUGClu.mjs} +1 -1
- package/dist/{subcommand-prompt-klFCfcor.mjs → subcommand-prompt-B6WS9Aoz.mjs} +2 -2
- package/dist/sveltekit.d.mts +1 -1
- package/dist/sveltekit.mjs +4 -9
- package/dist/validate-pna7R3Pv.mjs +2 -0
- package/dist/{validate-ctOrgiS3.mjs → validate-ymhap6M_.mjs} +1 -1
- package/dist/{wrangler-7K-bW_DL.mjs → wrangler-DhUerFkW.mjs} +10 -15
- package/dist/{ws-CL1w7GXU.d.mts → ws-C79j4aED.d.mts} +1 -1
- package/package.json +21 -21
- package/sandbox.Dockerfile +1 -1
- package/skills/void/SKILL.md +5 -2
- package/skills/void/docs/guide/ai.md +78 -137
- package/skills/void/docs/guide/app-types.md +1 -1
- package/skills/void/docs/guide/auth.md +0 -2
- package/skills/void/docs/guide/database/d1.md +7 -7
- package/skills/void/docs/guide/database.md +15 -0
- package/skills/void/docs/guide/deployment.md +58 -124
- 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/live.md +2 -0
- 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 +1 -4
- package/skills/void/docs/guide/platform/development/schema-ci.md +7 -1
- package/skills/void/docs/guide/platform/installation/credentials.md +2 -2
- package/skills/void/docs/guide/platform/installation/first-deployment.md +5 -1
- package/skills/void/docs/guide/platform/installation/maintenance.md +33 -11
- package/skills/void/docs/guide/platform/installation/prerequisites.md +79 -7
- package/skills/void/docs/guide/platform/installation/setup.md +1 -1
- package/skills/void/docs/guide/platform/installation/uninstall.md +44 -11
- package/skills/void/docs/guide/quickstart.md +37 -80
- package/skills/void/docs/guide/sandboxes.md +75 -66
- 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 +38 -14
- package/skills/void/docs/reference/api.md +35 -34
- package/skills/void/docs/reference/cli/auth.md +3 -1
- package/skills/void/docs/reference/cli/deploy.md +1 -1
- package/skills/void/docs/reference/cli/platform-config.md +2 -2
- package/skills/void/docs/reference/cli/platform-installation.md +14 -12
- package/skills/void/docs/reference/cli/platform-operations.md +4 -8
- package/skills/void/docs/reference/cli/platform.md +9 -2
- package/skills/void/docs/reference/cli.md +1 -1
- package/skills/void/docs/reference/resource-inference.md +12 -8
- package/dist/cf-build-output-_0HNWysu.mjs +0 -2
- package/dist/client-B9UBI03V.mjs +0 -2
- package/dist/deploy-irP5q0-x.mjs +0 -2
- package/dist/gen-DvQTWzDU.mjs +0 -2
- package/dist/help-mabuIV98.mjs +0 -2
- package/dist/login-DIy9Sb-U.mjs +0 -2
- package/dist/migrate-BCiJ8w0f.mjs +0 -2
- package/dist/plan-D1Q5rf-r.mjs +0 -2
- package/dist/platform-args-DdnM6WIf.mjs +0 -2
- package/dist/platform-management-DG47jys8.mjs +0 -2
- package/dist/prepare-CnjcTV2s.mjs +0 -2
- package/dist/validate-Dq_L3s0S.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
- package/dist/{env-validation-C_8tPdhs.mjs → env-validation-vBSQ8gw5.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 { n as readDeploymentPlatform, r as readProjectConfig } from "./project-
|
|
2
|
-
import { c as getToken } from "./auth-
|
|
3
|
-
import {
|
|
4
|
-
import {
|
|
5
|
-
import { c as import_picocolors } from "./output-
|
|
1
|
+
import { n as readDeploymentPlatform, r as readProjectConfig } from "./project-DQstYTxO.mjs";
|
|
2
|
+
import { c as getToken } from "./auth-D52yG7hl.mjs";
|
|
3
|
+
import { L as log } from "./prompts-6OSVA7DJ.mjs";
|
|
4
|
+
import { r as PlatformClient } from "./client-mC-dFGDD.mjs";
|
|
5
|
+
import { c as import_picocolors, l as note } from "./output-BvdaehtE.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-DoQrVHAt.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 { r as readProjectConfig } from "./project-
|
|
7
|
-
import {
|
|
8
|
-
import {
|
|
9
|
-
import { A as confirm,
|
|
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-CeEbnv4b.mjs";
|
|
6
|
+
import { r as readProjectConfig } from "./project-DQstYTxO.mjs";
|
|
7
|
+
import { A as writeProvisionedWranglerConfig } from "./wrangler-DhUerFkW.mjs";
|
|
8
|
+
import { c as getToken, u as openBrowser } from "./auth-D52yG7hl.mjs";
|
|
9
|
+
import { A as confirm, L as log, U as password, tt as isCancel } from "./prompts-6OSVA7DJ.mjs";
|
|
10
|
+
import { n as PlatformApiError, r as PlatformClient } from "./client-mC-dFGDD.mjs";
|
|
11
|
+
import { c as import_picocolors, l as note, r as createSpinner } from "./output-BvdaehtE.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";
|
|
@@ -1,16 +1,15 @@
|
|
|
1
1
|
import { a as join } from "./dist-BVqXeR_h.mjs";
|
|
2
|
-
import { n as readDeploymentPlatform, r as readProjectConfig } from "./project-
|
|
3
|
-
import { c as getToken } from "./auth-
|
|
2
|
+
import { n as readDeploymentPlatform, r as readProjectConfig } from "./project-DQstYTxO.mjs";
|
|
3
|
+
import { c as getToken } from "./auth-D52yG7hl.mjs";
|
|
4
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-
|
|
6
|
-
import {
|
|
7
|
-
import {
|
|
8
|
-
import {
|
|
5
|
+
import { d as formatEnvReport, g as validateProdEnv, u as fetchRemoteSecretNames } from "./env-validation-vBSQ8gw5.mjs";
|
|
6
|
+
import { H as outro, L as log } from "./prompts-6OSVA7DJ.mjs";
|
|
7
|
+
import { r as PlatformClient } from "./client-mC-dFGDD.mjs";
|
|
8
|
+
import { l as note } from "./output-BvdaehtE.mjs";
|
|
9
9
|
import { mkdirSync, writeFileSync } from "node:fs";
|
|
10
10
|
//#region src/cli/env.ts
|
|
11
11
|
async function runEnvCommand(root, args) {
|
|
12
12
|
console.log();
|
|
13
|
-
intro(cliTitle(`env ${args.subcommand}`));
|
|
14
13
|
if (args.subcommand === "check") {
|
|
15
14
|
await runCheck(root, args.useRemoteSecrets);
|
|
16
15
|
return;
|
|
@@ -26,7 +25,7 @@ async function runCheck(root, useRemoteSecrets) {
|
|
|
26
25
|
const platform = readDeploymentPlatform(root);
|
|
27
26
|
if (platform === "none") throw new Error("env: Deployment is disabled. Run `void init` to choose a platform.");
|
|
28
27
|
if (platform === "cloudflare") {
|
|
29
|
-
const { listCloudflareSecrets, resolveCloudflareOperationContext } = await import("./cloudflare-operations-
|
|
28
|
+
const { listCloudflareSecrets, resolveCloudflareOperationContext } = await import("./cloudflare-operations-DoQrVHAt.mjs");
|
|
30
29
|
remoteSecrets = await listCloudflareSecrets(resolveCloudflareOperationContext(root));
|
|
31
30
|
} else {
|
|
32
31
|
const token = getToken(root);
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { l as VoidPlatformSandbox } from "./sandbox-
|
|
1
|
+
import { l as VoidPlatformSandbox } from "./sandbox-C5LFoJMf.mjs";
|
|
2
2
|
import { t as StandardSchemaV1 } from "./standard-schema-Fo_vCAZh.mjs";
|
|
3
3
|
//#region src/runtime/env-public.d.ts
|
|
4
4
|
type AnyValidator = StandardSchemaV1<unknown, unknown>;
|
|
@@ -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,5 +1,6 @@
|
|
|
1
1
|
import { n as ofetch, t as FetchError } from "./fetch-error-Dj3crt0e.mjs";
|
|
2
2
|
import { t as interpolateRouteParams } from "./route-url-CG7U-cRN.mjs";
|
|
3
|
+
import { n as asUsageLimit, r as limitFromResponse } from "./limits-D0vD1M9A.mjs";
|
|
3
4
|
//#region src/runtime/fetch-stream.ts
|
|
4
5
|
/**
|
|
5
6
|
* Consume an SSE endpoint as an async generator of text chunks.
|
|
@@ -30,6 +31,10 @@ async function* fetchStream(path, options) {
|
|
|
30
31
|
signal: options?.signal,
|
|
31
32
|
baseURL: options?.baseURL,
|
|
32
33
|
responseType: "stream"
|
|
34
|
+
}).catch(async (error) => {
|
|
35
|
+
const response = error && typeof error === "object" && "response" in error ? error.response : null;
|
|
36
|
+
if (response instanceof Response) throw await limitFromResponse(response, "ai") ?? error;
|
|
37
|
+
throw error;
|
|
33
38
|
}))._data;
|
|
34
39
|
if (!body) return;
|
|
35
40
|
const reader = body.getReader();
|
|
@@ -39,11 +44,13 @@ async function* fetchStream(path, options) {
|
|
|
39
44
|
const terminal = (data) => {
|
|
40
45
|
if (event !== "void:error" && event !== "void:limit") return;
|
|
41
46
|
let message = "Generation was interrupted.";
|
|
47
|
+
let limit = null;
|
|
42
48
|
try {
|
|
43
49
|
const body = JSON.parse(data);
|
|
50
|
+
if (event === "void:limit") limit = asUsageLimit(body);
|
|
44
51
|
if (typeof body.message === "string") message = body.message;
|
|
45
52
|
} catch {}
|
|
46
|
-
throw new FetchError(message);
|
|
53
|
+
throw limit ?? new FetchError(message);
|
|
47
54
|
};
|
|
48
55
|
try {
|
|
49
56
|
while (true) {
|
|
@@ -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 { H as outro, K as select, L as log,
|
|
6
|
+
import { H as outro, K as select, L as log, O as cancel, tt as isCancel } from "./prompts-6OSVA7DJ.mjs";
|
|
7
|
+
import { r as listDrizzleArtifacts, t as assertJournalCoherence } from "./validate-ymhap6M_.mjs";
|
|
7
8
|
import { t as writeDrizzleConfig } from "./config-D8MOgiQV.mjs";
|
|
8
|
-
import { r as listDrizzleArtifacts, t as assertJournalCoherence } from "./validate-ctOrgiS3.mjs";
|
|
9
|
-
import { r as cliTitle } from "./output-CbM85T4k.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 { r as readProjectConfig } from "./project-
|
|
2
|
-
import { c as getToken, n as createCodeChallenge, r as createCodeVerifier, t as awaitBrowserCallback, u as openBrowser } from "./auth-
|
|
3
|
-
import { A as confirm, K as select, L as log, O as cancel, X as text, tt as isCancel } from "./prompts-
|
|
4
|
-
import {
|
|
5
|
-
import { c as import_picocolors } from "./output-
|
|
1
|
+
import { r as readProjectConfig } from "./project-DQstYTxO.mjs";
|
|
2
|
+
import { c as getToken, n as createCodeChallenge, r as createCodeVerifier, t as awaitBrowserCallback, u as openBrowser } from "./auth-D52yG7hl.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-mC-dFGDD.mjs";
|
|
5
|
+
import { c as import_picocolors } from "./output-BvdaehtE.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";
|
|
@@ -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,4 +1,4 @@
|
|
|
1
|
-
import { l as VoidPlatformSandbox } from "./sandbox-
|
|
1
|
+
import { l as VoidPlatformSandbox } from "./sandbox-C5LFoJMf.mjs";
|
|
2
2
|
import { t as StandardSchemaV1 } from "./standard-schema-Fo_vCAZh.mjs";
|
|
3
3
|
import { n as HeadDescriptor } from "./head-Do8P4puT.mjs";
|
|
4
4
|
import { r as AuthUser, t as AuthSession } from "./auth-DkcFflXV.mjs";
|
|
@@ -1,8 +1,8 @@
|
|
|
1
1
|
import { a as join } from "./dist-BVqXeR_h.mjs";
|
|
2
|
-
import {
|
|
2
|
+
import { 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,
|
|
5
|
-
import { n as operatorGroups, t as operatorCommands } from "./operator-args-
|
|
4
|
+
import { c as import_picocolors, d as sectionTitle, l as note, s as helpLine, t as categoryTitle } from "./output-BvdaehtE.mjs";
|
|
5
|
+
import { n as operatorGroups, t as operatorCommands } from "./operator-args-DdY54Bgb.mjs";
|
|
6
6
|
import { readFileSync } from "node:fs";
|
|
7
7
|
//#region src/cli/ascii.ts
|
|
8
8
|
const asciiArts = [
|
|
@@ -42,7 +42,7 @@ function operatorHelpTree() {
|
|
|
42
42
|
usage: entry.usage ?? [`void platform ${group} ${entry.action}${entry.positional?.map((name) => entry.optionalPositional ? ` [${name}]` : ` <${name}>`).join("") ?? ""} [options]`],
|
|
43
43
|
options: [
|
|
44
44
|
{
|
|
45
|
-
command: "--connection <
|
|
45
|
+
command: "--connection <slug-or-url>",
|
|
46
46
|
description: "Choose a registered connection; otherwise use VOID_API_URL or the active connection"
|
|
47
47
|
},
|
|
48
48
|
{
|
|
@@ -91,7 +91,7 @@ function operatorHelpTree() {
|
|
|
91
91
|
}
|
|
92
92
|
const HELP_TREE = {
|
|
93
93
|
connect: {
|
|
94
|
-
summary: "Connect this project to Cloudflare or an existing Void platform.",
|
|
94
|
+
summary: "Connect this project to Cloudflare or an existing Void platform. Platform hostnames default to HTTPS.",
|
|
95
95
|
usage: ["void connect [url] [--platform <cloudflare|void>] [--no-login]"],
|
|
96
96
|
options: [{
|
|
97
97
|
command: "--platform <cloudflare|void>",
|
|
@@ -106,7 +106,7 @@ const HELP_TREE = {
|
|
|
106
106
|
description: "Choose a destination and sign in"
|
|
107
107
|
},
|
|
108
108
|
{
|
|
109
|
-
command: "void connect
|
|
109
|
+
command: "void connect platform.example.com",
|
|
110
110
|
description: "Join a Void platform"
|
|
111
111
|
},
|
|
112
112
|
{
|
|
@@ -416,7 +416,7 @@ const HELP_TREE = {
|
|
|
416
416
|
],
|
|
417
417
|
options: [
|
|
418
418
|
{
|
|
419
|
-
command: "--connection <
|
|
419
|
+
command: "--connection <slug-or-url>",
|
|
420
420
|
description: "Select a registered platform"
|
|
421
421
|
},
|
|
422
422
|
{
|
|
@@ -504,7 +504,7 @@ const HELP_TREE = {
|
|
|
504
504
|
],
|
|
505
505
|
options: [
|
|
506
506
|
{
|
|
507
|
-
command: "--connection <
|
|
507
|
+
command: "--connection <slug-or-url>",
|
|
508
508
|
description: "Select a registered platform"
|
|
509
509
|
},
|
|
510
510
|
{
|
|
@@ -574,7 +574,7 @@ const HELP_TREE = {
|
|
|
574
574
|
} }
|
|
575
575
|
},
|
|
576
576
|
list: basicSubcommand("List installed and connected platforms.", "void platform list"),
|
|
577
|
-
use: basicSubcommand("Select the default Void platform.", "void platform use [id]"),
|
|
577
|
+
use: basicSubcommand("Select the default Void platform by installation slug, name, saved ID, or API URL.", "void platform use [id]"),
|
|
578
578
|
status: basicSubcommand("Inspect a platform and its health.", "void platform status [id]"),
|
|
579
579
|
discover: {
|
|
580
580
|
summary: "Recover owned platform installations from Cloudflare.",
|
|
@@ -719,6 +719,10 @@ const HELP_TREE = {
|
|
|
719
719
|
command: "--purge-data",
|
|
720
720
|
description: "Delete installer-owned data even when it contains apps"
|
|
721
721
|
},
|
|
722
|
+
{
|
|
723
|
+
command: "--purge-resources",
|
|
724
|
+
description: "Delete every resource the installation created (includes --purge-data); keeps zones, adopted resources, and PostgreSQL"
|
|
725
|
+
},
|
|
722
726
|
{
|
|
723
727
|
command: "--keep-zone",
|
|
724
728
|
description: "Explicitly retain an installer-created zone"
|
package/dist/index.d.mts
CHANGED
|
@@ -1,26 +1,13 @@
|
|
|
1
1
|
import { n as HeadDescriptor } from "./head-Do8P4puT.mjs";
|
|
2
2
|
import { r as AuthUser } from "./auth-DkcFflXV.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-
|
|
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-BeK3weD4.mjs";
|
|
4
4
|
import { t as QueueMap } from "./queues-BWKt1Xo4.mjs";
|
|
5
5
|
import { PluginConfig } from "@cloudflare/vite-plugin";
|
|
6
6
|
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"];
|