void 0.21.9 → 0.22.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/dist/{account-cmd-DZZGK80W.mjs → account-cmd-CjyxcGkM.mjs} +4 -4
- package/dist/{auth-link-B_CeugBw.mjs → auth-link-BLO4ptzo.mjs} +4 -4
- package/dist/{auth-router-BgEFRuvZ.mjs → auth-router-ZUg9MF_U.mjs} +5 -5
- package/dist/{build-cmd-Dpt0jd-x.mjs → build-cmd-BxR5FROK.mjs} +3 -3
- package/dist/{cache-7_UeZdTk.mjs → cache-D0sWhgKI.mjs} +3 -3
- package/dist/{cancel-deploy-D23R1RXT.mjs → cancel-deploy-D4NUqFbi.mjs} +3 -3
- package/dist/{cf-build-output-CGT03qCD.mjs → cf-build-output-BJ6yGEIS.mjs} +139 -62
- package/dist/cli/cf-compat.mjs +164 -50
- package/dist/cli/cli.mjs +73 -44
- package/dist/cli/env-schema-probe.d.mts +1 -1
- package/dist/{client-QTl6ko_D.mjs → client-BTZ3XkrB.mjs} +25 -0
- package/dist/client-Czz8o5jP.mjs +2 -0
- package/dist/{cloudflare-auth-C4_GPZr0.mjs → cloudflare-auth-DQkqoMYa.mjs} +1 -6
- package/dist/{cloudflare-cmd-bSmZ1d5L.mjs → cloudflare-cmd-BKlfGHAy.mjs} +6 -7
- package/dist/{cloudflare-connect-jAwacxxP.mjs → cloudflare-connect-Ctmrw579.mjs} +3 -3
- package/dist/{cloudflare-operations-sMZXpk_S.mjs → cloudflare-operations-B9tzgjmf.mjs} +10 -39
- package/dist/{cloudflare-operations-BipGMJ5O.mjs → cloudflare-operations-BT6OWFBk.mjs} +1 -1
- package/dist/{config-CafTW6Cz.mjs → config-Br_JZD6u.mjs} +2 -7
- package/dist/{config-s7Xj7tPb.mjs → config-CyQ-wVd7.mjs} +1 -1
- package/dist/{config-CF69HgXc.d.mts → config-VavjpDnp.d.mts} +1 -2
- package/dist/config-entry.d.mts +1 -1
- package/dist/{config-write-BSduPMY8.mjs → config-write-B1f88wJA.mjs} +1 -1
- package/dist/{connect-BsUSRzln.mjs → connect-Dg-WkW-C.mjs} +5 -5
- package/dist/{create-project-BniEV0OW.mjs → create-project-DdoqwFLF.mjs} +1 -1
- package/dist/{create-project-DBfFSZKY.mjs → create-project-l9J7pbtm.mjs} +8 -4
- package/dist/{db-hRrvZaq_.mjs → db-gp2sCXyN.mjs} +14 -14
- package/dist/{delete-D6dZ9B6B.mjs → delete-TTedbH6B.mjs} +3 -3
- package/dist/{deploy-DDz7c8LK.mjs → deploy-B19L2Bra.mjs} +1 -1
- package/dist/{deploy-WaAQez1O.mjs → deploy-CH-o2CaZ.mjs} +47 -36
- package/dist/{dist-BR1quN_w.mjs → dist-AoCzRTJE.mjs} +226 -60
- package/dist/{dist-C5fND3R0.mjs → dist-BuDuKZJv.mjs} +1 -1
- package/dist/{dist-Dn6nn2IU.mjs → dist-CTBk70IR.mjs} +42 -42
- package/dist/{domain-Dmhvb2oU.mjs → domain-JRF59P_r.mjs} +4 -4
- package/dist/{email-DFi-s2t4.mjs → email-Bo6G9LOZ.mjs} +6 -6
- package/dist/{env-Csi-tMbT.mjs → env-BYOrWQnv.mjs} +4 -4
- package/dist/{env-public-D_6u46fX.d.mts → env-public-BxU_0yTL.d.mts} +2 -1
- package/dist/gen-CNJ62MM7.mjs +2 -0
- package/dist/{gen-Dz3X1Qab.mjs → gen-sCtlCOdA.mjs} +3 -3
- package/dist/{github-cmd-BED3_9JD.mjs → github-cmd-0-7PexDq.mjs} +5 -7
- package/dist/{handler-BXJTXd02.d.mts → handler-HEcZsaij.d.mts} +2 -1
- package/dist/{headers-BOg_velo.mjs → headers-DWi2IXWx.mjs} +1 -1
- package/dist/help-CmZzxUba.mjs +2 -0
- package/dist/{help-DC7gdz7L.mjs → help-GKtwl07I.mjs} +124 -4
- package/dist/index.d.mts +1 -1
- package/dist/index.mjs +53 -24
- package/dist/{init-WO0JlPx8.mjs → init-FZx3Elvz.mjs} +13 -13
- package/dist/{link-CsHOinF7.mjs → link-BrQfb_CU.mjs} +4 -4
- package/dist/{list-CDb-4bZ1.mjs → list-D44jmIAM.mjs} +4 -4
- package/dist/{live-CKiJilLr.d.mts → live-CKJlvlNp.d.mts} +1 -1
- package/dist/{local-d1-CC8sKFGu.mjs → local-d1-Bg9OzEEO.mjs} +1 -1
- package/dist/{login-DvqXsfGs.mjs → login-CAsAsQ-_.mjs} +4 -4
- package/dist/login-CGcRKEoi.mjs +2 -0
- package/dist/{logs-BdfiOezj.mjs → logs-BjKvFnVM.mjs} +4 -4
- package/dist/{migrate-B8KuoYsO.mjs → migrate-BPITvDJN.mjs} +4 -4
- package/dist/migrate-CYfbKkXh.mjs +2 -0
- package/dist/{node-BM43oz4G.mjs → node-Dt7z256D.mjs} +1 -1
- package/dist/{operator-cmd-03819ATr.mjs → operator-cmd-BK5CCiT9.mjs} +4 -4
- package/dist/output-Dm_A4Tbv.mjs +81 -0
- package/dist/pages/client.d.mts +1 -1
- package/dist/pages/index.d.mts +1 -1
- package/dist/pages/index.mjs +2 -2
- package/dist/pages/islands-plugin.d.mts +16 -6
- package/dist/pages/islands-plugin.mjs +1 -1
- package/dist/pages/protocol.d.mts +2 -2
- package/dist/{output-CCH48AMM.mjs → picocolors-BTps1_gs.mjs} +2 -76
- package/dist/{platform-auth-config-z92h63q5.mjs → platform-auth-config-BlN8xTdD.mjs} +3 -3
- package/dist/{platform-auth-protection-DeE3yr2R.mjs → platform-auth-protection-7d5aV2Jg.mjs} +3 -3
- package/dist/{platform-auth-recovery-o_340Ixx.mjs → platform-auth-recovery-Dxij8ZbR.mjs} +3 -3
- package/dist/{platform-cmd-DNl8WosH.mjs → platform-cmd-B3hwKrFK.mjs} +5 -5
- package/dist/{platform-cmd-C4ZV3Vpy.mjs → platform-cmd-E0FuL212.mjs} +1 -1
- package/dist/{platform-domain-CU1JtJkW.mjs → platform-domain-D6Xcy9ZX.mjs} +36 -9
- package/dist/{platform-lifecycle-Bs2qx1E3.mjs → platform-lifecycle-DMh_qrry.mjs} +1 -1
- package/dist/{platform-lifecycle-Bc047IeT.mjs → platform-lifecycle-k0E0xoxx.mjs} +548 -86
- package/dist/{platform-management-CVpGI9Y5.mjs → platform-management-Brz_BDiT.mjs} +54 -9
- package/dist/{platform-management-C8tt6D8h.mjs → platform-management-DOtss0BN.mjs} +1 -1
- package/dist/{platform-recovery-dvUaptLr.mjs → platform-recovery-BvtcXON5.mjs} +2 -2
- package/dist/prepare-Bm3iq-u4.mjs +2 -0
- package/dist/{prepare-DyZ-Yok5.mjs → prepare-C-6YZyyg.mjs} +3 -3
- package/dist/{prepare-C3kt3Rst.mjs → prepare-CRhJbVrG.mjs} +1 -1
- package/dist/{project-cmd-B44I8J_W.mjs → project-cmd-BZLCqOqw.mjs} +29 -15
- package/dist/{project-team-BkbYIsXN.mjs → project-team-BvgM0WoX.mjs} +3 -3
- package/dist/{project-token-C8xEEQnB.mjs → project-token-l5DqK6Az.mjs} +3 -3
- package/dist/project-zero-trust-v6Mvpp8y.mjs +63 -0
- package/dist/{protocol-ZH3jP4a7.d.mts → protocol-BBa6cstI.d.mts} +1 -1
- package/dist/{provision-BhreDAOS.mjs → provision-C4IGqkBf.mjs} +24 -19
- package/dist/{provision-DNtrtaVD.mjs → provision-Fr9pRqce.mjs} +1 -1
- package/dist/{requests-DFyhBMaf.mjs → requests-DN-BbNiM.mjs} +3 -3
- package/dist/{rollback-DHHxXZiS.mjs → rollback-D7rzSaZM.mjs} +4 -4
- package/dist/runtime/env-public.d.mts +1 -1
- package/dist/runtime/handler.d.mts +1 -1
- package/dist/runtime/live-client.d.mts +1 -1
- package/dist/runtime/live.d.mts +1 -1
- package/dist/runtime/sandbox-container.d.mts +3 -0
- package/dist/runtime/sandbox-container.mjs +2 -0
- package/dist/runtime/sandbox.d.mts +4 -32
- package/dist/runtime/sandbox.mjs +118 -72
- 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-container-4fdqLnyb.mjs +279 -0
- package/dist/sandbox-container-DdNEBfCc.d.mts +72 -0
- package/dist/sandbox-qpNBT8a3.d.mts +49 -0
- package/dist/{secret-DN9sSNiV.mjs → secret-BOtOl_cb.mjs} +4 -4
- package/dist/{skills-O6FUaizK.mjs → skills-D1II1Juz.mjs} +1 -1
- package/dist/{subcommand-prompt-BuGYkAkC.mjs → subcommand-prompt-CY1C4fvl.mjs} +2 -2
- package/dist/{wrangler-BymcxrRa.mjs → wrangler-DQF1vKyf.mjs} +37 -27
- package/dist/{ws-BwcqizuH.d.mts → ws-BoY7vQML.d.mts} +1 -1
- package/package.json +40 -32
- package/sandbox.Dockerfile +4 -0
- package/schema.json +10 -22
- package/skills/void/SKILL.md +2 -0
- package/skills/void/docs/guide/deployment.md +1 -1
- package/skills/void/docs/guide/edge/revalidation.md +1 -1
- package/skills/void/docs/guide/edge/static-assets.md +1 -0
- package/skills/void/docs/guide/platform/administration/zero-trust.md +318 -0
- package/skills/void/docs/guide/platform/development/local.md +2 -2
- package/skills/void/docs/guide/platform/installation/domains.md +1 -1
- package/skills/void/docs/guide/platform/installation/first-deployment.md +4 -0
- package/skills/void/docs/guide/platform/installation/prerequisites.md +1 -1
- package/skills/void/docs/guide/platform/installation/uninstall.md +17 -2
- package/skills/void/docs/guide/platform-administration.md +1 -0
- package/skills/void/docs/guide/sandboxes.md +70 -41
- package/skills/void/docs/integrations/cloudflare.md +1 -1
- package/skills/void/docs/reference/api.md +35 -35
- package/skills/void/docs/reference/cli.md +68 -6
- package/skills/void/docs/reference/config.md +16 -16
- package/dist/client-4cDVv7BO.mjs +0 -2
- package/dist/gen-Vnv2f65C.mjs +0 -2
- package/dist/help-DQMfeKMz.mjs +0 -2
- package/dist/login-DFQk7rbW.mjs +0 -2
- package/dist/migrate-TsHGBnDA.mjs +0 -2
- package/dist/prepare-BZXkjdNe.mjs +0 -2
|
@@ -1,5 +1,4 @@
|
|
|
1
|
-
import {
|
|
2
|
-
import { L as spinner, j as log, k as isCI } from "./dist-Dn6nn2IU.mjs";
|
|
1
|
+
import { t as __commonJSMin } from "./rolldown-runtime-DXIUcv95.mjs";
|
|
3
2
|
//#region ../../node_modules/.pnpm/picocolors@1.1.1/node_modules/picocolors/picocolors.js
|
|
4
3
|
var require_picocolors = /* @__PURE__ */ __commonJSMin(((exports, module) => {
|
|
5
4
|
let p = process || {};
|
|
@@ -70,77 +69,4 @@ var require_picocolors = /* @__PURE__ */ __commonJSMin(((exports, module) => {
|
|
|
70
69
|
module.exports.createColors = createColors;
|
|
71
70
|
}));
|
|
72
71
|
//#endregion
|
|
73
|
-
|
|
74
|
-
var import_picocolors = /* @__PURE__ */ __toESM(require_picocolors(), 1);
|
|
75
|
-
/** Keep recovery commands on the same CLI when using the local checkout launcher. */
|
|
76
|
-
function cliCommandName() {
|
|
77
|
-
const entryName = process.argv[1]?.split(/[\\/]/).at(-1);
|
|
78
|
-
return entryName === "void-dev" || entryName === "void-dev.cmd" ? "void-dev" : "void";
|
|
79
|
-
}
|
|
80
|
-
/**
|
|
81
|
-
* Terminal-safe spinner wrapper. In CI and redirected output,
|
|
82
|
-
* `@clack/prompts` spinner emits DEC Private Mode cursor hide/show codes
|
|
83
|
-
* (`\x1b[?25l` / `\x1b[?25h`) that render as text artifacts. This wrapper
|
|
84
|
-
* replaces the spinner with plain log output.
|
|
85
|
-
*/
|
|
86
|
-
function createSpinner(options, isTerminal = process.stdout.isTTY === true) {
|
|
87
|
-
if (!isCI() && isTerminal) return spinner(options);
|
|
88
|
-
let currentMessage = "";
|
|
89
|
-
return {
|
|
90
|
-
start(msg = "") {
|
|
91
|
-
currentMessage = msg;
|
|
92
|
-
if (msg) log.step(msg);
|
|
93
|
-
},
|
|
94
|
-
stop(msg = "") {
|
|
95
|
-
if (msg) log.info(msg);
|
|
96
|
-
},
|
|
97
|
-
message(msg = "") {
|
|
98
|
-
if (msg && msg !== currentMessage) {
|
|
99
|
-
currentMessage = msg;
|
|
100
|
-
log.step(msg);
|
|
101
|
-
}
|
|
102
|
-
},
|
|
103
|
-
cancel(msg = "") {
|
|
104
|
-
if (msg) log.warn(msg);
|
|
105
|
-
},
|
|
106
|
-
error(msg = "") {
|
|
107
|
-
if (msg) log.error(msg);
|
|
108
|
-
},
|
|
109
|
-
clear() {},
|
|
110
|
-
get isCancelled() {
|
|
111
|
-
return false;
|
|
112
|
-
}
|
|
113
|
-
};
|
|
114
|
-
}
|
|
115
|
-
function cliTitle(command) {
|
|
116
|
-
return import_picocolors.default.blue(`void ${command}`);
|
|
117
|
-
}
|
|
118
|
-
function sectionTitle(title) {
|
|
119
|
-
return import_picocolors.default.reset(import_picocolors.default.blue(title));
|
|
120
|
-
}
|
|
121
|
-
function categoryTitle(title) {
|
|
122
|
-
return import_picocolors.default.reset(import_picocolors.default.bold(import_picocolors.default.cyan(title)));
|
|
123
|
-
}
|
|
124
|
-
function dim(text) {
|
|
125
|
-
return import_picocolors.default.dim(text);
|
|
126
|
-
}
|
|
127
|
-
function tablePrefix() {
|
|
128
|
-
return `${import_picocolors.default.gray("│")} `;
|
|
129
|
-
}
|
|
130
|
-
function helpLine(command, description) {
|
|
131
|
-
return `${import_picocolors.default.reset(command.padEnd(34))} ${import_picocolors.default.dim(description)}`;
|
|
132
|
-
}
|
|
133
|
-
/**
|
|
134
|
-
* Ensure a timestamp string will be parsed as UTC by `new Date()`.
|
|
135
|
-
* DB timestamps lack timezone info — appends 'Z' only when no
|
|
136
|
-
* existing indicator (Z, z, or numeric offset) is present.
|
|
137
|
-
*/
|
|
138
|
-
function ensureUtc(s) {
|
|
139
|
-
const last = s.at(-1);
|
|
140
|
-
if (last === "Z" || last === "z") return s;
|
|
141
|
-
if (s.includes("+", 10)) return s;
|
|
142
|
-
if (s.lastIndexOf("-") > 9) return s;
|
|
143
|
-
return s + "Z";
|
|
144
|
-
}
|
|
145
|
-
//#endregion
|
|
146
|
-
export { dim as a, import_picocolors as c, require_picocolors as d, createSpinner as i, sectionTitle as l, cliCommandName as n, ensureUtc as o, cliTitle as r, helpLine as s, categoryTitle as t, tablePrefix as u };
|
|
72
|
+
export { require_picocolors as t };
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import { d as openBrowser } from "./auth-DLNN0D3Z.mjs";
|
|
2
|
-
import { B as text, E as confirm, F as password, I as select, M as multiselect, W as isCancel } from "./dist-
|
|
2
|
+
import { B as text, E as confirm, F as password, I as select, M as multiselect, W as isCancel } from "./dist-CTBk70IR.mjs";
|
|
3
3
|
import { n as OperatorClient } from "./operator-client-DUwumHpQ.mjs";
|
|
4
4
|
import { a as resolveOperatorOrigin, r as readOperatorToken } from "./operator-auth-8KnOVXVd.mjs";
|
|
5
5
|
import { execFile } from "node:child_process";
|
|
@@ -140,11 +140,11 @@ async function configurationInput(args, existing) {
|
|
|
140
140
|
}
|
|
141
141
|
async function runPlatformAuthConfig(args) {
|
|
142
142
|
if (args.action === "recover") {
|
|
143
|
-
const { runPlatformAuthRecovery } = await import("./platform-auth-recovery-
|
|
143
|
+
const { runPlatformAuthRecovery } = await import("./platform-auth-recovery-Dxij8ZbR.mjs");
|
|
144
144
|
return runPlatformAuthRecovery(args);
|
|
145
145
|
}
|
|
146
146
|
if (args.action === "protection") {
|
|
147
|
-
const { runPlatformProtectionConfig } = await import("./platform-auth-protection-
|
|
147
|
+
const { runPlatformProtectionConfig } = await import("./platform-auth-protection-7d5aV2Jg.mjs");
|
|
148
148
|
return runPlatformProtectionConfig(args);
|
|
149
149
|
}
|
|
150
150
|
const origin = resolveOperatorOrigin(args.connection);
|
package/dist/{platform-auth-protection-DeE3yr2R.mjs → platform-auth-protection-7d5aV2Jg.mjs}
RENAMED
|
@@ -1,11 +1,11 @@
|
|
|
1
1
|
import { t as cfAccessHeaders } from "./cf-access-DRsQRe6k.mjs";
|
|
2
2
|
import { d as readInstallationRecoverySecrets, h as resolveInstallationManifest, s as normalizePlatformApiUrl, t as acquirePlatformLifecycleLock, u as promoteInstallationSecrets, v as writeInstallationManifest, y as writePendingInstallationSecrets } from "./platform-registry-QBa4DK32.mjs";
|
|
3
3
|
import { n as ensurePlatformAccessToken } from "./cf-access-P0iZnu0q.mjs";
|
|
4
|
-
import { E as confirm, W as isCancel } from "./dist-
|
|
4
|
+
import { E as confirm, W as isCancel } from "./dist-CTBk70IR.mjs";
|
|
5
5
|
import { n as OperatorClient } from "./operator-client-DUwumHpQ.mjs";
|
|
6
6
|
import { a as resolveOperatorOrigin, r as readOperatorToken } from "./operator-auth-8KnOVXVd.mjs";
|
|
7
|
-
import { D as
|
|
8
|
-
import { c as selectAuthoritativePlatformManifest, u as verifyPlatformInstallationOwnership } from "./platform-management-
|
|
7
|
+
import { A as PlatformCloudflareClient, D as checkpointPlatformAccessResources, E as resolvePlatformCloudflareCredential, O as parsePlatformAccessSetupSpec, k as preparePlatformAccessSetup, n as resolvePlatformInstallDatabaseUrl, o as acquirePlatformDatabaseLifecycleLock } from "./platform-lifecycle-k0E0xoxx.mjs";
|
|
8
|
+
import { c as selectAuthoritativePlatformManifest, u as verifyPlatformInstallationOwnership } from "./platform-management-Brz_BDiT.mjs";
|
|
9
9
|
import { createHmac } from "node:crypto";
|
|
10
10
|
import { parsePlatformAccessProtection, platformProtectionProofMessage } from "@void/platform";
|
|
11
11
|
import { readFile } from "node:fs/promises";
|
|
@@ -1,9 +1,9 @@
|
|
|
1
1
|
import { d as openBrowser } from "./auth-DLNN0D3Z.mjs";
|
|
2
2
|
import { d as readInstallationRecoverySecrets, h as resolveInstallationManifest, t as acquirePlatformLifecycleLock } from "./platform-registry-QBa4DK32.mjs";
|
|
3
|
-
import { E as confirm, W as isCancel } from "./dist-
|
|
3
|
+
import { E as confirm, W as isCancel } from "./dist-CTBk70IR.mjs";
|
|
4
4
|
import { a as resolveOperatorOrigin } from "./operator-auth-8KnOVXVd.mjs";
|
|
5
|
-
import {
|
|
6
|
-
import { c as selectAuthoritativePlatformManifest, u as verifyPlatformInstallationOwnership } from "./platform-management-
|
|
5
|
+
import { A as PlatformCloudflareClient, E as resolvePlatformCloudflareCredential, f as platformDatabaseClientUrl, n as resolvePlatformInstallDatabaseUrl, s as acquirePlatformDatabaseLifecycleLockConnection } from "./platform-lifecycle-k0E0xoxx.mjs";
|
|
6
|
+
import { c as selectAuthoritativePlatformManifest, u as verifyPlatformInstallationOwnership } from "./platform-management-Brz_BDiT.mjs";
|
|
7
7
|
import { createCipheriv, createDecipheriv, createHash, createHmac, hkdfSync, randomBytes, randomUUID } from "node:crypto";
|
|
8
8
|
import { execFile } from "node:child_process";
|
|
9
9
|
import { parsePlatformAccessProtection, parsePlatformAdmissionPolicy, parsePlatformLoginConfiguration, platformAuthenticationRecoveryMessage, validatePlatformAdmissionPolicy } from "@void/platform";
|
|
@@ -1,8 +1,8 @@
|
|
|
1
|
-
import { c as import_picocolors } from "./output-CCH48AMM.mjs";
|
|
2
1
|
import { t as cfAccessHeaders } from "./cf-access-DRsQRe6k.mjs";
|
|
3
2
|
import { _ as selectPlatformConnection, g as savePlatformConnection, o as listPlatformConnections, r as getActivePlatformConnection, s as normalizePlatformApiUrl } from "./platform-registry-QBa4DK32.mjs";
|
|
4
3
|
import { i as isCloudflareAccessChallenge, n as ensurePlatformAccessToken, t as ensureCloudflaredToken } from "./cf-access-P0iZnu0q.mjs";
|
|
5
|
-
import { B as text, I as select, W as isCancel, j as log } from "./dist-
|
|
4
|
+
import { B as text, I as select, W as isCancel, j as log } from "./dist-CTBk70IR.mjs";
|
|
5
|
+
import { c as import_picocolors } from "./output-Dm_A4Tbv.mjs";
|
|
6
6
|
import { parsePlatformDiscoveryDocument } from "@void/platform";
|
|
7
7
|
//#region src/cli/platform-cmd.ts
|
|
8
8
|
async function discoverPlatform(input, fetcher = fetch) {
|
|
@@ -92,12 +92,12 @@ function saveDiscoveredPlatform(discovery) {
|
|
|
92
92
|
}
|
|
93
93
|
async function runPlatformCommand(_root, args) {
|
|
94
94
|
if (args.subcommand === "config") {
|
|
95
|
-
const { runPlatformAuthConfig } = await import("./platform-auth-config-
|
|
95
|
+
const { runPlatformAuthConfig } = await import("./platform-auth-config-BlN8xTdD.mjs");
|
|
96
96
|
await runPlatformAuthConfig(args);
|
|
97
97
|
return;
|
|
98
98
|
}
|
|
99
99
|
if (args.subcommand === "operator") {
|
|
100
|
-
const { runOperatorCommand } = await import("./operator-cmd-
|
|
100
|
+
const { runOperatorCommand } = await import("./operator-cmd-BK5CCiT9.mjs");
|
|
101
101
|
await runOperatorCommand(args);
|
|
102
102
|
return;
|
|
103
103
|
}
|
|
@@ -129,7 +129,7 @@ async function runPlatformCommand(_root, args) {
|
|
|
129
129
|
console.log(`Capabilities: ${Object.entries(discovery.capabilities).filter(([, enabled]) => enabled).map(([name]) => name).join(", ")}`);
|
|
130
130
|
return;
|
|
131
131
|
}
|
|
132
|
-
const { runPlatformLifecycleCommand } = await import("./platform-lifecycle-
|
|
132
|
+
const { runPlatformLifecycleCommand } = await import("./platform-lifecycle-DMh_qrry.mjs");
|
|
133
133
|
await runPlatformLifecycleCommand(args);
|
|
134
134
|
}
|
|
135
135
|
//#endregion
|
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
import { r as runPlatformCommand, t as discoverPlatform } from "./platform-cmd-
|
|
1
|
+
import { r as runPlatformCommand, t as discoverPlatform } from "./platform-cmd-B3hwKrFK.mjs";
|
|
2
2
|
export { discoverPlatform, runPlatformCommand };
|
|
@@ -1,10 +1,9 @@
|
|
|
1
1
|
import { t as cfAccessHeaders } from "./cf-access-DRsQRe6k.mjs";
|
|
2
2
|
import { d as readInstallationRecoverySecrets, g as savePlatformConnection, t as acquirePlatformLifecycleLock, v as writeInstallationManifest } from "./platform-registry-QBa4DK32.mjs";
|
|
3
|
-
import { B as text, E as confirm, N as note, W as isCancel, j as log } from "./dist-
|
|
4
|
-
import {
|
|
5
|
-
import { a as resolveInstalledPlatformManifest, c as selectAuthoritativePlatformManifest, u as verifyPlatformInstallationOwnership } from "./platform-management-
|
|
6
|
-
import {
|
|
7
|
-
import { PLATFORM_APPLICATION_KEY, PLATFORM_REMOTE_INSTALLATION_MANIFEST_KEY, createApplicationRoutes, createPlatformDeploymentManifest, normalizeApplicationDomain } from "@void/platform";
|
|
3
|
+
import { B as text, E as confirm, N as note, W as isCancel, j as log } from "./dist-CTBk70IR.mjs";
|
|
4
|
+
import { A as PlatformCloudflareClient, E as resolvePlatformCloudflareCredential, T as assertPlatformOperatorCredentialCanApplyPlan, _ as recordPlatformWorkerTraffic, c as createPlatformHealthProbeToken, m as recordResource, n as resolvePlatformInstallDatabaseUrl, o as acquirePlatformDatabaseLifecycleLock, t as assertNoninteractivePlatformMutationAcknowledged, y as createPlatformInstallPlan } from "./platform-lifecycle-k0E0xoxx.mjs";
|
|
5
|
+
import { a as resolveInstalledPlatformManifest, c as selectAuthoritativePlatformManifest, u as verifyPlatformInstallationOwnership } from "./platform-management-Brz_BDiT.mjs";
|
|
6
|
+
import { PLATFORM_HEALTH_HOSTNAME_LABEL, PLATFORM_REMOTE_INSTALLATION_MANIFEST_KEY, createApplicationRoutes, createPlatformDeploymentManifest, normalizeApplicationDomain } from "@void/platform";
|
|
8
7
|
//#region src/cli/platform-domain.ts
|
|
9
8
|
function platformDomainTarget(manifest, domain, zone, dedicatedZone) {
|
|
10
9
|
const current = manifest.deployment.application;
|
|
@@ -44,6 +43,7 @@ async function applyPlatformDomain(client, original, target, plan, dependencies)
|
|
|
44
43
|
if (zone.status !== "active") return {
|
|
45
44
|
manifest,
|
|
46
45
|
waitingForDns: true,
|
|
46
|
+
waitingForProtection: false,
|
|
47
47
|
nameServers: zone.nameServers
|
|
48
48
|
};
|
|
49
49
|
await dependencies.verifyRuntimeToken(zone.id);
|
|
@@ -80,11 +80,15 @@ async function applyPlatformDomain(client, original, target, plan, dependencies)
|
|
|
80
80
|
resources: observed.resources,
|
|
81
81
|
updatedAt: now()
|
|
82
82
|
});
|
|
83
|
-
await (dependencies.probe ?? probePlatformDomain)(
|
|
83
|
+
await (dependencies.probe ?? probePlatformDomain)(`${PLATFORM_HEALTH_HOSTNAME_LABEL}.${target.baseDomain}`, manifest);
|
|
84
84
|
await dependencies.verifyOwnership(manifest);
|
|
85
|
-
|
|
86
|
-
if (!
|
|
87
|
-
|
|
85
|
+
if (!manifest.resources.find((resource) => resource.key === "routing-kv" && resource.state === "ready")) throw new Error("platform: Routing storage is missing. Run platform repair first.");
|
|
86
|
+
if (!await (dependencies.activate ?? activatePlatformDomain)(deployment.application, manifest)) return {
|
|
87
|
+
manifest,
|
|
88
|
+
waitingForDns: false,
|
|
89
|
+
waitingForProtection: true,
|
|
90
|
+
nameServers: []
|
|
91
|
+
};
|
|
88
92
|
const { pendingDomain: _pending, ...ready } = manifest;
|
|
89
93
|
await save({
|
|
90
94
|
...ready,
|
|
@@ -94,9 +98,28 @@ async function applyPlatformDomain(client, original, target, plan, dependencies)
|
|
|
94
98
|
return {
|
|
95
99
|
manifest,
|
|
96
100
|
waitingForDns: false,
|
|
101
|
+
waitingForProtection: false,
|
|
97
102
|
nameServers: []
|
|
98
103
|
};
|
|
99
104
|
}
|
|
105
|
+
async function activatePlatformDomain(application, manifest) {
|
|
106
|
+
const url = `${manifest.endpoints.apiUrl}/internal/platform/domain-activate`;
|
|
107
|
+
const response = await fetch(url, {
|
|
108
|
+
method: "POST",
|
|
109
|
+
redirect: "manual",
|
|
110
|
+
signal: AbortSignal.timeout(12e4),
|
|
111
|
+
headers: {
|
|
112
|
+
"Content-Type": "application/json",
|
|
113
|
+
"X-Void-Platform-Probe": createPlatformHealthProbeToken(manifest.ownershipNonce),
|
|
114
|
+
...cfAccessHeaders(process.env, url)
|
|
115
|
+
},
|
|
116
|
+
body: JSON.stringify({ application })
|
|
117
|
+
});
|
|
118
|
+
const body = await response.json().catch(() => null);
|
|
119
|
+
if (!body || typeof body !== "object" || response.status === 404) throw new Error(`platform: The running platform cannot activate this domain (HTTP ${response.status}). Update the platform runtime with \`void platform upgrade ${manifest.id}\` (or repair it with \`void platform repair ${manifest.id}\`), then rerun this command.`);
|
|
120
|
+
if (!response.ok || body.ok !== true || body.installationId !== manifest.id || typeof body.ready !== "boolean") throw new Error(`platform: ${body.error ?? "The running platform could not prepare domain protection. Update or repair the platform, then rerun this command."}`);
|
|
121
|
+
return body.ready;
|
|
122
|
+
}
|
|
100
123
|
async function probePlatformDomain(hostname, manifest) {
|
|
101
124
|
const url = `https://${hostname}/health`;
|
|
102
125
|
try {
|
|
@@ -195,6 +218,10 @@ async function runPlatformDomainCommand(args) {
|
|
|
195
218
|
note(`Set the domain's nameservers at its registrar to:\n${result.nameServers.join("\n")}\nThen rerun: void platform domain set ${domain}`, "Waiting for DNS");
|
|
196
219
|
return;
|
|
197
220
|
}
|
|
221
|
+
if (result.waitingForProtection) {
|
|
222
|
+
note(`Domain protection is still being prepared. Existing workers.dev URLs remain active. Rerun: void platform domain set ${domain}`, "Preparing application domain");
|
|
223
|
+
return;
|
|
224
|
+
}
|
|
198
225
|
savePlatformConnection({
|
|
199
226
|
accountId: manifest.account.id,
|
|
200
227
|
apiUrl: manifest.endpoints.apiUrl,
|
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
import { r as runPlatformLifecycleCommand } from "./platform-lifecycle-
|
|
1
|
+
import { r as runPlatformLifecycleCommand } from "./platform-lifecycle-k0E0xoxx.mjs";
|
|
2
2
|
export { runPlatformLifecycleCommand };
|