void 0.25.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/dist/{account-cmd-DcR1ywt8.mjs → account-cmd-CDry3B5V.mjs} +4 -4
- 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-CdgZ9uag.mjs → auth-B60QDbjg.mjs} +1 -1
- package/dist/{auth-7wuZ5ob8.mjs → auth-D52yG7hl.mjs} +3 -3
- package/dist/{auth-link-Z6E5DYvM.mjs → auth-link-DjeOptYi.mjs} +4 -4
- package/dist/{auth-router-BdM4avI8.mjs → auth-router-BRxIuqDi.mjs} +5 -5
- package/dist/{build-cmd-CEE7D-hM.mjs → build-cmd-Ce3C8huo.mjs} +4 -4
- package/dist/{cache-TcZnBLtH.mjs → cache-CS8Yxr5a.mjs} +4 -4
- package/dist/{cancel-deploy-CYoZmcmR.mjs → cancel-deploy-mZsD88Xa.mjs} +3 -3
- package/dist/{cf-access-AHKBzmuu.mjs → cf-access-YTlqvAsk.mjs} +1 -1
- package/dist/cli/cli.mjs +40 -40
- package/dist/cli/cloudflare-operation-process.mjs +1 -1
- package/dist/cli/env-schema-probe.d.mts +1 -1
- package/dist/client-BxVixJBI.mjs +2 -0
- package/dist/{client-RsPo8wsP.mjs → client-mC-dFGDD.mjs} +5 -5
- package/dist/{cloudflare-operations-CjaV4lZi.mjs → cloudflare-operations-DYa3coIk.mjs} +1 -1
- package/dist/{cloudflare-operations-BhbK6yTq.mjs → cloudflare-operations-DoQrVHAt.mjs} +1 -1
- package/dist/{connect-DCvUmPXY.mjs → connect-H6EvP62X.mjs} +6 -6
- package/dist/{create-project-eAPgYq35.mjs → create-project-B2kk9Q0o.mjs} +4 -4
- package/dist/{create-project-C734I-Mu.mjs → create-project-Dbb4uiN-.mjs} +1 -1
- package/dist/{db-C07GEdKF.mjs → db-DpCKZto0.mjs} +21 -21
- package/dist/{delete-pKMVsrpJ.mjs → delete-CxlSvsvW.mjs} +6 -6
- package/dist/{deploy-DfsAe-T0.mjs → deploy-CeEbnv4b.mjs} +38 -24
- package/dist/{deploy-BDu1vhSH.mjs → deploy-qmiLE1G1.mjs} +1 -1
- package/dist/{domain-D3uA9ize.mjs → domain-B_9VgOm6.mjs} +6 -6
- package/dist/{email-z3o2cwjH.mjs → email-BokHgjKj.mjs} +6 -6
- package/dist/{env-3Q8-_2IH.mjs → env-BdTc-K2L.mjs} +6 -5
- package/dist/{env-public-BX_r8HR6.d.mts → env-public-DR7ZM6d-.d.mts} +1 -1
- package/dist/{fetch-stream-IvCYKyQL.mjs → fetch-stream-Nm3hkZbT.mjs} +8 -1
- package/dist/{gen-NjwoG9FK.mjs → gen-BhDlTpwW.mjs} +1 -1
- package/dist/gen-qCBwH3fZ.mjs +2 -0
- package/dist/{github-cmd-DquUq-b1.mjs → github-cmd-hhkTzlGS.mjs} +4 -4
- package/dist/{handler-CZ4nAylQ.d.mts → handler-BeK3weD4.d.mts} +1 -1
- package/dist/{help-DRZXC4fj.mjs → help-Bv44e2tm.mjs} +13 -9
- package/dist/help-Dw5f9Xrg.mjs +2 -0
- package/dist/index.d.mts +1 -1
- package/dist/index.mjs +30 -17
- package/dist/{info-BmA3_IFZ.mjs → info-DhtTKh65.mjs} +1 -1
- package/dist/{init-DT7yuuyl.mjs → init-BMf4T03q.mjs} +10 -9
- 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-CXOlqh2F.mjs → link-BqYsSS_I.mjs} +5 -5
- package/dist/{list-eEWVJEPn.mjs → list-_kBToO-l.mjs} +7 -6
- package/dist/{live-Chw1eIMv.d.mts → live-iAuEH1hd.d.mts} +1 -1
- package/dist/{local-d1-Df4XpwhW.mjs → local-d1-fGxYrVD6.mjs} +1 -1
- package/dist/login-D7meQg_3.mjs +2 -0
- package/dist/{login-pWQHYVu2.mjs → login-DFuo-RWO.mjs} +4 -4
- package/dist/{logs-DnxVX7TR.mjs → logs-DYgnh6dH.mjs} +5 -5
- package/dist/{node-BkyRWRx8.mjs → node-C6Q6e1Es.mjs} +1 -1
- package/dist/{operator-args-CAVcmwUt.mjs → operator-args-DdY54Bgb.mjs} +1 -1
- package/dist/{operator-auth-CkmTE3rt.mjs → operator-auth-2dsGlTT5.mjs} +4 -8
- package/dist/{operator-client-LmwjxT6q.mjs → operator-client-BFqpp6z0.mjs} +3 -3
- package/dist/{operator-cmd-d-IEKgNk.mjs → operator-cmd-CUGHXrQf.mjs} +27 -9
- package/dist/operator-cmd-DRPvhpjM.mjs +2 -0
- package/dist/{output-BBsUwdyT.mjs → output-BvdaehtE.mjs} +26 -2
- package/dist/pages/client.d.mts +1 -1
- 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-Bzf8JPc2.mjs → platform-args-DSV2p4nY.mjs} +4 -2
- package/dist/platform-args-Dcy_5b_Y.mjs +2 -0
- package/dist/{platform-auth-config-0V0lA3pF.mjs → platform-auth-config-Bosx7U1h.mjs} +18 -17
- package/dist/{platform-auth-protection-DFeJ-JkK.mjs → platform-auth-protection-DcbL_LW_.mjs} +6 -6
- package/dist/{platform-auth-recovery-ICy4muq6.mjs → platform-auth-recovery-WfTZ8K6o.mjs} +5 -5
- package/dist/{platform-cmd-D7vSWMvV.mjs → platform-cmd-DbKtQb_4.mjs} +45 -20
- package/dist/{platform-cmd-BPySFOew.mjs → platform-cmd-dyFUof0t.mjs} +1 -1
- package/dist/{platform-discovery-DDDUvnqp.mjs → platform-discovery-BC0HCKYt.mjs} +18 -4
- package/dist/{platform-domain-CUdY064e.mjs → platform-domain-Bsq43AJp.mjs} +5 -4
- package/dist/{platform-lifecycle-BaUdTRPU.mjs → platform-lifecycle--5gWmDoI.mjs} +1 -1
- package/dist/{platform-lifecycle-Dm09JNkn.mjs → platform-lifecycle-Cfi0o6xM.mjs} +863 -35
- package/dist/{platform-management-Bp6aoH2C.mjs → platform-management-Bbwf6-Dq.mjs} +1 -1
- package/dist/{platform-management-BSEc_ZeG.mjs → platform-management-BrF9STZp.mjs} +173 -30
- package/dist/{platform-plans-config-B0pOVQyW.mjs → platform-plans-config-DU-8nC2Y.mjs} +2 -2
- package/dist/{platform-recovery-WOZ95Uze.mjs → platform-recovery-DQAqAQYu.mjs} +3 -3
- package/dist/{platform-registry-KfNEF84O.mjs → platform-registry-P387v42A.mjs} +17 -10
- package/dist/prepare-BBknoZI1.mjs +2 -0
- package/dist/{prepare-39EvOhI6.mjs → prepare-BMrRWLwP.mjs} +3 -2
- package/dist/{prepare-DnaKBi--.mjs → prepare-WoUubFKL.mjs} +1 -1
- package/dist/{project-IOjBU8R6.mjs → project-BiaPQ7ur.mjs} +1 -1
- package/dist/{project-BkbfDs0V.mjs → project-DQstYTxO.mjs} +1 -1
- package/dist/{project-cmd-Bs5A392E.mjs → project-cmd-BbH2LptN.mjs} +18 -18
- package/dist/{project-team-ohAWWaew.mjs → project-team-Yiww3-go.mjs} +5 -5
- package/dist/{project-token-CP01Jna6.mjs → project-token-BrtT2NkY.mjs} +4 -4
- package/dist/{project-zero-trust-BzkVgx35.mjs → project-zero-trust-nYJ2V2nc.mjs} +5 -5
- package/dist/{protocol-CjF_iI9X.d.mts → protocol-BX8t2jiw.d.mts} +1 -1
- package/dist/{provision-BEv0k-qz.mjs → provision-DMTPG8Rh.mjs} +1 -1
- package/dist/{provision-Btj1jppf.mjs → provision-VeqAC77A.mjs} +13 -1
- package/dist/{requests-B3PBuGlX.mjs → requests-TIz_jtSu.mjs} +4 -4
- package/dist/{rollback-DDub9GsO.mjs → rollback-dBqICPzj.mjs} +5 -5
- 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/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/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-3c72lY1U.mjs → secret-AKnNXNP5.mjs} +6 -6
- package/dist/{subcommand-prompt-Dhom39bd.mjs → subcommand-prompt-B6WS9Aoz.mjs} +1 -1
- package/dist/validate-pna7R3Pv.mjs +2 -0
- package/dist/{validate-ctOrgiS3.mjs → validate-ymhap6M_.mjs} +1 -1
- package/dist/{ws-CL1w7GXU.d.mts → ws-C79j4aED.d.mts} +1 -1
- package/package.json +7 -7
- package/skills/void/SKILL.md +5 -2
- package/skills/void/docs/guide/ai.md +65 -62
- package/skills/void/docs/guide/app-types.md +1 -1
- package/skills/void/docs/guide/database.md +15 -0
- package/skills/void/docs/guide/live.md +2 -0
- package/skills/void/docs/guide/pages-routing/actions-and-forms.md +1 -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 +3 -1
- 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/sandboxes.md +39 -20
- package/skills/void/docs/reference/api/resources.md +11 -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/platform-config.md +2 -2
- package/skills/void/docs/reference/cli/platform-installation.md +14 -12
- package/skills/void/docs/reference/cli/platform.md +4 -2
- package/skills/void/docs/reference/cli.md +1 -1
- package/skills/void/docs/reference/resource-inference.md +1 -0
- package/dist/client-B4Me-9HE.mjs +0 -2
- package/dist/gen-ById9r2j.mjs +0 -2
- package/dist/help-DPGBwomV.mjs +0 -2
- package/dist/login-C98-sw79.mjs +0 -2
- package/dist/plan-D1Q5rf-r.mjs +0 -2
- package/dist/platform-args-Cq6EjQro.mjs +0 -2
- package/dist/prepare-CnjcTV2s.mjs +0 -2
- package/dist/validate-Dq_L3s0S.mjs +0 -2
|
@@ -1,12 +1,16 @@
|
|
|
1
|
-
import {
|
|
1
|
+
import { b as selectPlatformConnection, c as normalizePlatformApiUrl, i as getActivePlatformConnection, l as platformConnectionSlug, o as listInstallationManifests, s as listPlatformConnections, y as savePlatformConnection } from "./platform-registry-P387v42A.mjs";
|
|
2
2
|
import { t as cfAccessHeaders } from "./cf-access-TWNzXltp.mjs";
|
|
3
|
-
import { i as isCloudflareAccessChallenge, n as ensurePlatformAccessToken, t as ensureCloudflaredToken } from "./cf-access-
|
|
3
|
+
import { i as isCloudflareAccessChallenge, n as ensurePlatformAccessToken, t as ensureCloudflaredToken } from "./cf-access-YTlqvAsk.mjs";
|
|
4
4
|
import { K as select, L as log, X as text, tt as isCancel } from "./prompts-6OSVA7DJ.mjs";
|
|
5
|
-
import {
|
|
6
|
-
import { c as import_picocolors } from "./output-
|
|
5
|
+
import { n as readPlatformDiscoveryResponse, t as PlatformDisabledError } from "./platform-discovery-BC0HCKYt.mjs";
|
|
6
|
+
import { c as import_picocolors } from "./output-BvdaehtE.mjs";
|
|
7
7
|
//#region src/cli/platform-cmd.ts
|
|
8
|
+
function normalizePlatformInputUrl(input) {
|
|
9
|
+
const value = input.trim();
|
|
10
|
+
return normalizePlatformApiUrl(value.includes("://") ? value : `https://${value}`);
|
|
11
|
+
}
|
|
8
12
|
async function discoverPlatform(input, fetcher = fetch) {
|
|
9
|
-
const apiUrl =
|
|
13
|
+
const apiUrl = normalizePlatformInputUrl(input);
|
|
10
14
|
ensureCloudflaredToken(apiUrl);
|
|
11
15
|
const request = () => fetcher(`${apiUrl}/.well-known/void-platform`, {
|
|
12
16
|
headers: {
|
|
@@ -28,11 +32,11 @@ async function promptPlatformUrl() {
|
|
|
28
32
|
if (!process.stdin.isTTY) throw new Error("platform: A platform URL is required in non-interactive mode.");
|
|
29
33
|
const value = await text({
|
|
30
34
|
message: "Void platform API URL:",
|
|
31
|
-
placeholder: "
|
|
35
|
+
placeholder: "platform.example.com",
|
|
32
36
|
validate: (input) => {
|
|
33
37
|
if (!input) return "Enter a platform URL.";
|
|
34
38
|
try {
|
|
35
|
-
|
|
39
|
+
normalizePlatformInputUrl(input);
|
|
36
40
|
} catch (error) {
|
|
37
41
|
return error instanceof Error ? error.message : String(error);
|
|
38
42
|
}
|
|
@@ -46,7 +50,7 @@ async function resolveConnection(selector) {
|
|
|
46
50
|
const connections = listPlatformConnections();
|
|
47
51
|
if (connections.length === 0) throw new Error("platform: No platforms configured. Run `void connect <url>`.");
|
|
48
52
|
if (connections.length === 1) return selectPlatformConnection(connections[0].id);
|
|
49
|
-
if (!process.stdin.isTTY) throw new Error("platform: Multiple platforms are configured; specify
|
|
53
|
+
if (!process.stdin.isTTY) throw new Error("platform: Multiple platforms are configured; specify a slug, name, ID, or URL.");
|
|
50
54
|
const picked = await select({
|
|
51
55
|
message: "Select a Void platform:",
|
|
52
56
|
options: connections.map((connection) => ({
|
|
@@ -58,11 +62,11 @@ async function resolveConnection(selector) {
|
|
|
58
62
|
if (isCancel(picked)) throw new Error("platform: Cancelled.");
|
|
59
63
|
return selectPlatformConnection(String(picked));
|
|
60
64
|
}
|
|
61
|
-
function
|
|
62
|
-
const
|
|
63
|
-
console.log(
|
|
64
|
-
console.log(`
|
|
65
|
-
if (connection.applicationDomain) console.log(connection.applicationDomain.endsWith(".workers.dev") ? "
|
|
65
|
+
function showPlatform(connection, installations) {
|
|
66
|
+
const slug = platformConnectionSlug(connection, installations);
|
|
67
|
+
console.log(` ${import_picocolors.default.bold(connection.displayName)}${slug ? ` ${import_picocolors.default.dim(`(${slug})`)}` : ""}`);
|
|
68
|
+
console.log(` ${connection.apiUrl}`);
|
|
69
|
+
if (connection.applicationDomain) console.log(connection.applicationDomain.endsWith(".workers.dev") ? " apps: workers.dev (testing)" : ` apps: *.${connection.applicationDomain}`);
|
|
66
70
|
}
|
|
67
71
|
function saveDiscoveredPlatform(discovery) {
|
|
68
72
|
return savePlatformConnection({
|
|
@@ -91,19 +95,19 @@ async function runPlatformCommand(_root, args) {
|
|
|
91
95
|
}]
|
|
92
96
|
});
|
|
93
97
|
if (isCancel(group)) return;
|
|
94
|
-
const { parsePlatformArgs } = await import("./platform-args-
|
|
98
|
+
const { parsePlatformArgs } = await import("./platform-args-Dcy_5b_Y.mjs");
|
|
95
99
|
return runPlatformCommand(_root, parsePlatformArgs(["config", group]));
|
|
96
100
|
}
|
|
97
|
-
const { runPlatformPlansConfig } = await import("./platform-plans-config-
|
|
101
|
+
const { runPlatformPlansConfig } = await import("./platform-plans-config-DU-8nC2Y.mjs");
|
|
98
102
|
await runPlatformPlansConfig(args);
|
|
99
103
|
return;
|
|
100
104
|
}
|
|
101
|
-
const { runPlatformAuthConfig } = await import("./platform-auth-config-
|
|
105
|
+
const { runPlatformAuthConfig } = await import("./platform-auth-config-Bosx7U1h.mjs");
|
|
102
106
|
await runPlatformAuthConfig(args);
|
|
103
107
|
return;
|
|
104
108
|
}
|
|
105
109
|
if (args.subcommand === "operator") {
|
|
106
|
-
const { runOperatorCommand } = await import("./operator-cmd-
|
|
110
|
+
const { runOperatorCommand } = await import("./operator-cmd-DRPvhpjM.mjs");
|
|
107
111
|
await runOperatorCommand(args);
|
|
108
112
|
return;
|
|
109
113
|
}
|
|
@@ -113,8 +117,23 @@ async function runPlatformCommand(_root, args) {
|
|
|
113
117
|
log.info("No platforms configured. Run `void connect <url>`.");
|
|
114
118
|
return;
|
|
115
119
|
}
|
|
116
|
-
const
|
|
117
|
-
|
|
120
|
+
const active = getActivePlatformConnection();
|
|
121
|
+
const installations = listInstallationManifests();
|
|
122
|
+
if (active) {
|
|
123
|
+
console.log(import_picocolors.default.blue(import_picocolors.default.bold("Currently selected platform:")));
|
|
124
|
+
showPlatform(active, installations);
|
|
125
|
+
} else console.log("No platform selected.");
|
|
126
|
+
const others = connections.filter((connection) => connection.id !== active?.id);
|
|
127
|
+
if (others.length > 0) {
|
|
128
|
+
console.log("");
|
|
129
|
+
console.log(import_picocolors.default.blue(import_picocolors.default.bold("Other platforms:")));
|
|
130
|
+
for (const [index, connection] of others.entries()) {
|
|
131
|
+
if (index > 0) console.log("");
|
|
132
|
+
showPlatform(connection, installations);
|
|
133
|
+
}
|
|
134
|
+
console.log("");
|
|
135
|
+
console.log(import_picocolors.default.gray("run `void platform use <id>` to select one"));
|
|
136
|
+
}
|
|
118
137
|
return;
|
|
119
138
|
}
|
|
120
139
|
if (args.subcommand === "use") {
|
|
@@ -136,7 +155,13 @@ async function runPlatformCommand(_root, args) {
|
|
|
136
155
|
try {
|
|
137
156
|
discovery = await discoverPlatform(apiUrl);
|
|
138
157
|
} catch (error) {
|
|
158
|
+
if (error instanceof PlatformDisabledError && !error.maintenance) {
|
|
159
|
+
console.log("Platform: disabled (API and application traffic are paused).");
|
|
160
|
+
if (!saved?.operation) console.log(`Enable it: void platform enable${saved ? ` ${saved.id}` : ""}`);
|
|
161
|
+
return;
|
|
162
|
+
}
|
|
139
163
|
if (saved) log.info("Live availability could not be confirmed. The saved checkpoint above may be out of date.");
|
|
164
|
+
if (error instanceof PlatformDisabledError) throw new Error(`platform: Traffic at ${apiUrl} is paused for an upgrade or repair. Check again when it finishes.`, { cause: error });
|
|
140
165
|
throw error;
|
|
141
166
|
}
|
|
142
167
|
log.success(`${discovery.displayName} is reachable.`);
|
|
@@ -150,7 +175,7 @@ async function runPlatformCommand(_root, args) {
|
|
|
150
175
|
console.log(`Capabilities: ${Object.entries(discovery.capabilities).filter(([, enabled]) => enabled).map(([name]) => name).join(", ")}`);
|
|
151
176
|
return;
|
|
152
177
|
}
|
|
153
|
-
const { runPlatformLifecycleCommand } = await import("./platform-lifecycle
|
|
178
|
+
const { runPlatformLifecycleCommand } = await import("./platform-lifecycle--5gWmDoI.mjs");
|
|
154
179
|
await runPlatformLifecycleCommand(args);
|
|
155
180
|
}
|
|
156
181
|
function showSavedInstallationStatus(manifest) {
|
|
@@ -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-DbKtQb_4.mjs";
|
|
2
2
|
export { discoverPlatform, runPlatformCommand };
|
|
@@ -1,11 +1,25 @@
|
|
|
1
|
-
import {
|
|
1
|
+
import { c as normalizePlatformApiUrl } from "./platform-registry-P387v42A.mjs";
|
|
2
2
|
import { parsePlatformDiscoveryDocument } from "@void/platform";
|
|
3
3
|
//#region src/cli/platform-discovery.ts
|
|
4
|
+
/** Discovery was refused because the platform traffic gate is closed. */
|
|
5
|
+
var PlatformDisabledError = class extends Error {
|
|
6
|
+
/** True when an upgrade or repair paused traffic, not `void platform disable`. */
|
|
7
|
+
maintenance;
|
|
8
|
+
constructor(message, maintenance = false) {
|
|
9
|
+
super(message);
|
|
10
|
+
this.name = "PlatformDisabledError";
|
|
11
|
+
this.maintenance = maintenance;
|
|
12
|
+
}
|
|
13
|
+
};
|
|
4
14
|
/** Validates a `GET /.well-known/void-platform` response from `apiUrl`. */
|
|
5
15
|
async function readPlatformDiscoveryResponse(apiUrl, response) {
|
|
6
16
|
if (!response.ok) {
|
|
7
|
-
|
|
8
|
-
|
|
17
|
+
const message = `platform: Discovery failed at ${apiUrl} (HTTP ${response.status}).`;
|
|
18
|
+
if (response.status === 503) {
|
|
19
|
+
const body = await response.json().catch(() => null);
|
|
20
|
+
if (body && typeof body === "object" && body.error === "Platform disabled") throw new PlatformDisabledError(message, body.reason === "maintenance");
|
|
21
|
+
} else await response.body?.cancel();
|
|
22
|
+
throw new Error(message);
|
|
9
23
|
}
|
|
10
24
|
let value;
|
|
11
25
|
try {
|
|
@@ -24,4 +38,4 @@ async function readPlatformDiscoveryResponse(apiUrl, response) {
|
|
|
24
38
|
return discovery;
|
|
25
39
|
}
|
|
26
40
|
//#endregion
|
|
27
|
-
export { readPlatformDiscoveryResponse as t };
|
|
41
|
+
export { readPlatformDiscoveryResponse as n, PlatformDisabledError as t };
|
|
@@ -1,8 +1,9 @@
|
|
|
1
|
-
import {
|
|
1
|
+
import { m as readInstallationRecoverySecrets, t as acquirePlatformLifecycleLock, x as writeInstallationManifest, y as savePlatformConnection } from "./platform-registry-P387v42A.mjs";
|
|
2
2
|
import { t as cfAccessHeaders } from "./cf-access-TWNzXltp.mjs";
|
|
3
|
-
import { A as confirm,
|
|
4
|
-
import {
|
|
5
|
-
import {
|
|
3
|
+
import { A as confirm, L as log, X as text, tt as isCancel } from "./prompts-6OSVA7DJ.mjs";
|
|
4
|
+
import { l as note } from "./output-BvdaehtE.mjs";
|
|
5
|
+
import { B as assertPlatformOperatorCredentialCanApplyPlan, K as PlatformCloudflareClient, M as recordPlatformWorkerTraffic, O as createPlatformHealthProbeToken, P as createPlatformInstallPlan, V as resolvePlatformCloudflareCredential, j as recordResource, n as resolvePlatformInstallDatabaseUrl, s as acquirePlatformDatabaseLifecycleLock, t as assertNoninteractivePlatformMutationAcknowledged } from "./platform-lifecycle-Cfi0o6xM.mjs";
|
|
6
|
+
import { d as verifyPlatformInstallationOwnership, l as selectAuthoritativePlatformManifest, o as resolveInstalledPlatformManifest } from "./platform-management-BrF9STZp.mjs";
|
|
6
7
|
import { PLATFORM_HEALTH_HOSTNAME_LABEL, PLATFORM_REMOTE_INSTALLATION_MANIFEST_KEY, createApplicationRoutes, createPlatformDeploymentManifest, normalizeApplicationDomain } from "@void/platform";
|
|
7
8
|
//#region src/cli/platform-domain.ts
|
|
8
9
|
function platformDomainTarget(manifest, domain, zone, dedicatedZone) {
|
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
import { r as runPlatformLifecycleCommand } from "./platform-lifecycle-
|
|
1
|
+
import { r as runPlatformLifecycleCommand } from "./platform-lifecycle-Cfi0o6xM.mjs";
|
|
2
2
|
export { runPlatformLifecycleCommand };
|