void 1.12.0 → 1.12.1
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-D_0qJ9fx.mjs → account-cmd-BU1Fy_Bf.mjs} +4 -4
- package/dist/{application-analysis-Cx2S63z5.mjs → application-analysis-DVeN8yoi.mjs} +1 -1
- package/dist/{application-routing-BAXpnawu.mjs → application-routing-KKw4Y84h.mjs} +1 -1
- package/dist/{auth-Boz0lrb3.mjs → auth-A7cZ8aXA.mjs} +1 -1
- package/dist/{auth-DlLDymuc.mjs → auth-CqwJwItO.mjs} +1 -1
- package/dist/{auth-link-C97r9p2N.mjs → auth-link-Duu2NvN5.mjs} +4 -4
- package/dist/{auth-router-BmzEgzYx.mjs → auth-router-vgtOdb9j.mjs} +1 -1
- package/dist/{build-cmd-BaFsyZrz.mjs → build-cmd-B7OJ0U5R.mjs} +2 -2
- package/dist/build-id-4IV4hC1-.mjs +13 -0
- package/dist/{cache-xO711ATQ.mjs → cache-wSpi3aeM.mjs} +2 -2
- package/dist/{cancel-deploy-Di11ynsr.mjs → cancel-deploy-DMWzkAlb.mjs} +2 -2
- package/dist/{cf-access-FaIm95jA.mjs → cf-access-DHklo7Rg.mjs} +33 -19
- package/dist/{cf-build-output-Ca201_n1.mjs → cf-build-output-Cso7Vh-t.mjs} +4 -2
- package/dist/cf-build-output-Wpk_e5CI.mjs +1 -0
- package/dist/cli/cli.mjs +1 -1
- package/dist/cli/cloudflare-operation-process.mjs +1 -1
- package/dist/cli/db-execute-process.d.mts +2 -0
- package/dist/cli/db-execute-process.mjs +57 -0
- package/dist/{cli-main-DlW6lB8s.mjs → cli-main-BrChcpE3.mjs} +37 -344
- package/dist/{client-ImIe7Mjq.mjs → client-DE2m2ldh.mjs} +4 -4
- package/dist/{client-DkYzDEC0.mjs → client-eLZwqkPH.mjs} +1 -1
- package/dist/{cloudflare-operations-BF0PSErW.mjs → cloudflare-operations-BIRQkYwL.mjs} +14 -8
- package/dist/cloudflare-operations-ByjFGats.mjs +1 -0
- package/dist/{connect-DDRQGfFE.mjs → connect-D0V0o40j.mjs} +4 -4
- package/dist/{create-project-CY7sP8sI.mjs → create-project-8FdN6D2i.mjs} +2 -2
- package/dist/{create-project-Dro3K-az.mjs → create-project-CbuDH5Hv.mjs} +1 -1
- package/dist/{db-DmlaWVBu.mjs → db-BNPIjLkK.mjs} +1348 -69
- package/dist/db-args-BvMwAber.mjs +1 -0
- package/dist/db-args-CiQVg8SJ.mjs +321 -0
- package/dist/{delete-Uuq9ch6o.mjs → delete-WtLEfap2.mjs} +2 -2
- package/dist/{deploy-B9E7_rHC.mjs → deploy-BgSbagIP.mjs} +14 -14
- package/dist/{deploy-BB3rsZbP.mjs → deploy-Do6FWqon.mjs} +1 -1
- package/dist/{deploy-managed-static-IKZyuc1W.mjs → deploy-managed-static-BWBsxOww.mjs} +5 -5
- package/dist/{deploy-security-notice-C3LalelR.mjs → deploy-security-notice-IRGy6Edf.mjs} +2 -2
- package/dist/deploy.mjs +4 -4
- package/dist/{domain-B_xY1yZ5.mjs → domain-mweyYXSw.mjs} +3 -3
- package/dist/{email-BIC15L7a.mjs → email-DcQNP40O.mjs} +5 -5
- package/dist/{email-cloudflare-C447nOqq.mjs → email-cloudflare-DeYH3Ke7.mjs} +2 -2
- package/dist/{env-DJPZYHT5.mjs → env-DaAoYR2-.mjs} +3 -3
- package/dist/{gen-DiTZlDx8.mjs → gen-aOtHhZLD.mjs} +1 -1
- package/dist/gen-vhBDHs3q.mjs +1 -0
- package/dist/{github-cmd-DPmby8x-.mjs → github-cmd-BR19Ffdz.mjs} +2 -2
- package/dist/{help-9wfMyXHb.mjs → help-DvClCzqL.mjs} +9 -1
- package/dist/help-fKPzcTJv.mjs +1 -0
- package/dist/index.mjs +16 -206
- package/dist/{info-BWEWaOBo.mjs → info-P6MBiVJi.mjs} +2 -2
- package/dist/{init-BuTPVLPO.mjs → init-C8YpkGIP.mjs} +63 -18
- package/dist/installed-packages-tfmYd-cC.mjs +198 -0
- package/dist/{link-BiesPyT4.mjs → link-Dyz9IGcM.mjs} +3 -3
- package/dist/{list-CkonftPQ.mjs → list-VGYBMjmx.mjs} +4 -4
- package/dist/{login-BSOSah1j.mjs → login-CWFr-G2I.mjs} +3 -3
- package/dist/login-DECm3e9b.mjs +1 -0
- package/dist/{logs-HOBUnroa.mjs → logs-kS1wuR4b.mjs} +3 -3
- package/dist/module-references-DWQmO6TW.mjs +27 -0
- package/dist/{mysql-sql-CB52k8tQ.mjs → mysql-lock-D8xtnI-D.mjs} +1 -118
- package/dist/mysql-sql-BIE7bc4Z.mjs +124 -0
- package/dist/{operator-ai-logging-ZDqqhnIq.mjs → operator-ai-logging-DD0n6zc2.mjs} +3 -3
- package/dist/{operator-args-DCkWbgT-.mjs → operator-args-nvetCWuz.mjs} +1 -1
- package/dist/{operator-auth-BjoPLgja.mjs → operator-auth-DMvn-y9X.mjs} +1 -1
- package/dist/{operator-client-DzebIntv.mjs → operator-client-dFNnXfyB.mjs} +4 -3
- package/dist/operator-cmd-CVfK5U0B.mjs +1 -0
- package/dist/{operator-cmd-AZoeI9Pl.mjs → operator-cmd-a7yOf2tH.mjs} +13 -9
- package/dist/{operator-security-Bo26FP01.mjs → operator-security-D5MToU0p.mjs} +1 -1
- package/dist/pages/client.mjs +77 -9
- package/dist/pages/index.d.mts +6 -0
- package/dist/pages/index.mjs +276 -6
- package/dist/pages/protocol.mjs +1 -1
- package/dist/platform-args-CMwMoiLp.mjs +1 -0
- package/dist/{platform-args-lwCyQ6Xy.mjs → platform-args-CvZSuhYS.mjs} +1 -1
- package/dist/{platform-auth-config-DLRMPw1G.mjs → platform-auth-config-CpszX-Ne.mjs} +7 -7
- package/dist/{platform-auth-protection-HSmLmD3d.mjs → platform-auth-protection-DA6Tw8Og.mjs} +5 -5
- package/dist/{platform-auth-recovery-BXPhTlKa.mjs → platform-auth-recovery-Cztrb1JC.mjs} +4 -4
- package/dist/{platform-cmd-DJ-fOYhL.mjs → platform-cmd-m6Asj6nO.mjs} +6 -6
- package/dist/{platform-cmd-CqRjxFEU.mjs → platform-cmd-u1j88ggF.mjs} +1 -1
- package/dist/{platform-domain-CRsRJOws.mjs → platform-domain-DJSznNTA.mjs} +2 -2
- package/dist/{platform-lifecycle-bx_kpqo7.mjs → platform-lifecycle-BC-9p58d.mjs} +1 -1
- package/dist/{platform-lifecycle-fau3VKv6.mjs → platform-lifecycle-GFeXv3NC.mjs} +58 -11
- package/dist/{platform-management-BRGhD-oF.mjs → platform-management-BwHkz46V.mjs} +1 -1
- package/dist/{platform-management-CnKBdDx5.mjs → platform-management-DX1zINou.mjs} +4 -4
- package/dist/{platform-plans-config-2C3_5EDs.mjs → platform-plans-config-DiydtNKY.mjs} +3 -3
- package/dist/{platform-recovery-poxgOOAY.mjs → platform-recovery-CnzBbudV.mjs} +2 -2
- package/dist/{platform-setup-DYylapHD.mjs → platform-setup-Lph9i-rh.mjs} +1 -1
- package/dist/{plugin-inference-7O11_E4H.mjs → plugin-inference-COlq96WJ.mjs} +2 -27
- package/dist/prepare-DcwigRUS.mjs +1 -0
- package/dist/{prepare-DWjn1Lzd.mjs → prepare-WvijE289.mjs} +1 -1
- package/dist/{prepare-BbvlKreR.mjs → prepare-co1o1FFd.mjs} +1 -1
- package/dist/{project-cmd-DyUEFi2b.mjs → project-cmd-BWJTplpc.mjs} +18 -18
- package/dist/{project-security-DZEQgnsS.mjs → project-security-BV1xfj1K.mjs} +1 -1
- package/dist/{project-security--tYGFPGo.mjs → project-security-CY_aahvW.mjs} +2 -2
- package/dist/{project-team-BszTHgzC.mjs → project-team-BlIFXlmT.mjs} +2 -2
- package/dist/{project-token-DBDy4NdV.mjs → project-token-CMsB7I1-.mjs} +2 -2
- package/dist/{project-zero-trust-D9sUouij.mjs → project-zero-trust-BI6pdpx4.mjs} +2 -2
- package/dist/{protocol-CE3wP-H1.mjs → protocol-4rEnumif.mjs} +10 -3
- package/dist/{redirect-DD825Stf.mjs → redirect-Dyvuil0Q.mjs} +5 -2
- package/dist/{requests-CBokjiOi.mjs → requests-CfmJxNYg.mjs} +2 -2
- package/dist/{rollback-CEeHNFUn.mjs → rollback-DL5HuAsM.mjs} +3 -3
- package/dist/{runner-mysql-3XDKrn-g.mjs → runner-mysql-D549vGGm.mjs} +2 -1
- package/dist/{runner-mysql-r688x6Y9.mjs → runner-mysql-DOjbj-N1.mjs} +1 -1
- package/dist/runtime/db/migrations/mysql-handler.mjs +2 -1
- package/dist/runtime/routing/index.mjs +2 -2
- package/dist/{secret-Deqo3n_N.mjs → secret-C-WBaUSS.mjs} +3 -3
- package/docs/guide/jobs.md +1 -1
- package/docs/guide/pages-routing/actions-and-forms.md +36 -15
- package/docs/guide/pages-routing/errors.md +3 -1
- package/docs/guide/pages-routing/overview.md +20 -0
- package/docs/guide/platform/administration/zero-trust.md +1 -1
- package/docs/guide/platform/installation/maintenance.md +3 -3
- package/docs/guide/queues.md +1 -1
- package/docs/integrations/frameworks/sveltekit.md +1 -1
- package/docs/reference/api/pages.md +4 -0
- package/docs/reference/cli/database.md +42 -6
- package/docs/reference/cli/platform-security.md +1 -1
- package/docs/reference/cli/platform-zero-trust.md +4 -3
- package/docs/reference/cli/setup.md +4 -0
- package/package.json +7 -7
- package/dist/cf-build-output-Dy7N0hQN.mjs +0 -1
- package/dist/cloudflare-operations-dpRD-2Px.mjs +0 -1
- package/dist/gen-CQDiPi8m.mjs +0 -1
- package/dist/help-Dy3w4rPq.mjs +0 -1
- package/dist/login-DWCZeCX9.mjs +0 -1
- package/dist/operator-cmd-DEnHFmJF.mjs +0 -1
- package/dist/platform-args-DNbNZ_RR.mjs +0 -1
- package/dist/prepare-BmG2E6TI.mjs +0 -1
|
@@ -1,10 +1,10 @@
|
|
|
1
1
|
import { A as confirm, tt as isCancel } from "./dist-Cr_xGE_K.mjs";
|
|
2
|
-
import { u as openBrowser } from "./auth-
|
|
3
|
-
import { a as resolveOperatorOrigin } from "./operator-auth-
|
|
2
|
+
import { u as openBrowser } from "./auth-CqwJwItO.mjs";
|
|
3
|
+
import { a as resolveOperatorOrigin } from "./operator-auth-DMvn-y9X.mjs";
|
|
4
4
|
import { f as formatUrl, y as printSuccess } from "./output-BZLnu0z8.mjs";
|
|
5
5
|
import { t as Buffer } from "./node-buffer-D7kgjaDs.mjs";
|
|
6
|
-
import { K as platformOperatorCredentialLabel, b as platformDatabaseClientUrl, et as PlatformCloudflareClient, n as resolvePlatformInstallDatabaseUrl, q as resolvePlatformCloudflareCredential, y as acquirePlatformDatabaseLifecycleLockConnection } from "./platform-lifecycle-
|
|
7
|
-
import { f as verifyPlatformInstallationOwnership, u as selectAuthoritativePlatformManifest } from "./platform-management-
|
|
6
|
+
import { K as platformOperatorCredentialLabel, b as platformDatabaseClientUrl, et as PlatformCloudflareClient, n as resolvePlatformInstallDatabaseUrl, q as resolvePlatformCloudflareCredential, y as acquirePlatformDatabaseLifecycleLockConnection } from "./platform-lifecycle-GFeXv3NC.mjs";
|
|
7
|
+
import { f as verifyPlatformInstallationOwnership, u as selectAuthoritativePlatformManifest } from "./platform-management-DX1zINou.mjs";
|
|
8
8
|
import { m as readInstallationRecoverySecrets, t as acquirePlatformLifecycleLock, v as resolveInstallationManifest } from "./platform-registry-DHH6fivm.mjs";
|
|
9
9
|
import { parsePlatformAccessProtection, parsePlatformAdmissionPolicy, parsePlatformLoginConfiguration, platformAuthenticationRecoveryMessage, validatePlatformAdmissionPolicy } from "@void/platform";
|
|
10
10
|
import { createCipheriv, createDecipheriv, createHash, createHmac, hkdfSync, randomBytes, randomUUID } from "node:crypto";
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import { K as select, L as log, X as text, tt as isCancel } from "./dist-Cr_xGE_K.mjs";
|
|
2
2
|
import { t as cfAccessHeaders } from "./cf-access-DmkKPcAI.mjs";
|
|
3
|
-
import { r as isCloudflareAccessChallenge, t as ensurePlatformAccessToken } from "./cf-access-
|
|
3
|
+
import { r as isCloudflareAccessChallenge, t as ensurePlatformAccessToken } from "./cf-access-DHklo7Rg.mjs";
|
|
4
4
|
import { f as formatUrl, h as import_picocolors, y as printSuccess } from "./output-BZLnu0z8.mjs";
|
|
5
5
|
import { n as readPlatformDiscoveryResponse, t as PlatformDisabledError } from "./platform-discovery-CLxtixHJ.mjs";
|
|
6
6
|
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-DHH6fivm.mjs";
|
|
@@ -96,19 +96,19 @@ async function runPlatformCommand(_root, args) {
|
|
|
96
96
|
}]
|
|
97
97
|
});
|
|
98
98
|
if (isCancel(group)) return;
|
|
99
|
-
const { parsePlatformArgs } = await import("./platform-args-
|
|
99
|
+
const { parsePlatformArgs } = await import("./platform-args-CMwMoiLp.mjs");
|
|
100
100
|
return runPlatformCommand(_root, parsePlatformArgs(["config", group]));
|
|
101
101
|
}
|
|
102
|
-
const { runPlatformPlansConfig } = await import("./platform-plans-config-
|
|
102
|
+
const { runPlatformPlansConfig } = await import("./platform-plans-config-DiydtNKY.mjs");
|
|
103
103
|
await runPlatformPlansConfig(args);
|
|
104
104
|
return;
|
|
105
105
|
}
|
|
106
|
-
const { runPlatformAuthConfig } = await import("./platform-auth-config-
|
|
106
|
+
const { runPlatformAuthConfig } = await import("./platform-auth-config-CpszX-Ne.mjs");
|
|
107
107
|
await runPlatformAuthConfig(args);
|
|
108
108
|
return;
|
|
109
109
|
}
|
|
110
110
|
if (args.subcommand === "operator") {
|
|
111
|
-
const { runOperatorCommand } = await import("./operator-cmd-
|
|
111
|
+
const { runOperatorCommand } = await import("./operator-cmd-CVfK5U0B.mjs");
|
|
112
112
|
await runOperatorCommand(args);
|
|
113
113
|
return;
|
|
114
114
|
}
|
|
@@ -176,7 +176,7 @@ async function runPlatformCommand(_root, args) {
|
|
|
176
176
|
console.log(`Capabilities: ${Object.entries(discovery.capabilities).filter(([, enabled]) => enabled).map(([name]) => name).join(", ")}`);
|
|
177
177
|
return;
|
|
178
178
|
}
|
|
179
|
-
const { runPlatformLifecycleCommand } = await import("./platform-lifecycle-
|
|
179
|
+
const { runPlatformLifecycleCommand } = await import("./platform-lifecycle-BC-9p58d.mjs");
|
|
180
180
|
await runPlatformLifecycleCommand(args);
|
|
181
181
|
}
|
|
182
182
|
function showSavedInstallationStatus(manifest) {
|
|
@@ -1 +1 @@
|
|
|
1
|
-
export { t as discoverPlatform, r as runPlatformCommand } from "./platform-cmd-
|
|
1
|
+
export { t as discoverPlatform, r as runPlatformCommand } from "./platform-cmd-m6Asj6nO.mjs";
|
|
@@ -1,8 +1,8 @@
|
|
|
1
1
|
import { A as confirm, X as text, tt as isCancel } from "./dist-Cr_xGE_K.mjs";
|
|
2
2
|
import { t as cfAccessHeaders } from "./cf-access-DmkKPcAI.mjs";
|
|
3
3
|
import { g as note, y as printSuccess } from "./output-BZLnu0z8.mjs";
|
|
4
|
-
import { A as recordResource, D as createPlatformHealthProbeToken, G as assertPlatformOperatorCredentialCanApplyPlan, K as platformOperatorCredentialLabel, M as recordPlatformWorkerTraffic, N as createPlatformInstallPlan, et as PlatformCloudflareClient, n as resolvePlatformInstallDatabaseUrl, q as resolvePlatformCloudflareCredential, t as assertNoninteractivePlatformMutationAcknowledged, v as acquirePlatformDatabaseLifecycleLock } from "./platform-lifecycle-
|
|
5
|
-
import { f as verifyPlatformInstallationOwnership, o as resolveInstalledPlatformManifest, u as selectAuthoritativePlatformManifest } from "./platform-management-
|
|
4
|
+
import { A as recordResource, D as createPlatformHealthProbeToken, G as assertPlatformOperatorCredentialCanApplyPlan, K as platformOperatorCredentialLabel, M as recordPlatformWorkerTraffic, N as createPlatformInstallPlan, et as PlatformCloudflareClient, n as resolvePlatformInstallDatabaseUrl, q as resolvePlatformCloudflareCredential, t as assertNoninteractivePlatformMutationAcknowledged, v as acquirePlatformDatabaseLifecycleLock } from "./platform-lifecycle-GFeXv3NC.mjs";
|
|
5
|
+
import { f as verifyPlatformInstallationOwnership, o as resolveInstalledPlatformManifest, u as selectAuthoritativePlatformManifest } from "./platform-management-DX1zINou.mjs";
|
|
6
6
|
import { m as readInstallationRecoverySecrets, t as acquirePlatformLifecycleLock, x as writeInstallationManifest, y as savePlatformConnection } from "./platform-registry-DHH6fivm.mjs";
|
|
7
7
|
import { PLATFORM_HEALTH_HOSTNAME_LABEL, PLATFORM_REMOTE_INSTALLATION_MANIFEST_KEY, createApplicationRoutes, createPlatformDeploymentManifest, normalizeApplicationDomain } from "@void/platform";
|
|
8
8
|
// src/cli/platform-domain.ts
|
|
@@ -1 +1 @@
|
|
|
1
|
-
export { r as runPlatformLifecycleCommand } from "./platform-lifecycle-
|
|
1
|
+
export { r as runPlatformLifecycleCommand } from "./platform-lifecycle-GFeXv3NC.mjs";
|
|
@@ -4,14 +4,14 @@ import { t as Buffer } from "./node-buffer-D7kgjaDs.mjs";
|
|
|
4
4
|
import { a as createSpinner, f as formatUrl, g as note, h as import_picocolors, i as cliCommandName, p as getErrorMessage, y as printSuccess } from "./output-BZLnu0z8.mjs";
|
|
5
5
|
import { t as cfAccessHeaders } from "./cf-access-DmkKPcAI.mjs";
|
|
6
6
|
import { _ as resolvePinnedApiBaseUrl, o as createDefaultRunWrangler } from "./provision-Bh44omGA.mjs";
|
|
7
|
-
import { a as platformManagementSetupPage, c as platformSetupLink, d as planWritesDns, i as platformInstallCommandArguments, l as platformSetupPages, n as formatPlatformSetupPlan, o as platformPromptAnswer, r as openPlatformSetupPage, s as platformSetupFieldHelp, t as formatPlatformInstallCommand, u as planCreatesZone } from "./platform-setup-
|
|
7
|
+
import { a as platformManagementSetupPage, c as platformSetupLink, d as planWritesDns, i as platformInstallCommandArguments, l as platformSetupPages, n as formatPlatformSetupPlan, o as platformPromptAnswer, r as openPlatformSetupPage, s as platformSetupFieldHelp, t as formatPlatformInstallCommand, u as planCreatesZone } from "./platform-setup-Lph9i-rh.mjs";
|
|
8
8
|
import { o as runCloudflareAuthCommand } from "./cloudflare-auth-eWfhdZCk.mjs";
|
|
9
9
|
import { l as resolveCloudflareOperationArgv } from "./cloudflare-process-60r4Z2Zf.mjs";
|
|
10
10
|
import { S as writePendingInstallationSecrets, a as latestPlatformWorkerCutoverGeneration, c as normalizePlatformApiUrl, d as platformRegistryDirectory, f as platformWorkerSecretUpdateIntentState, h as readPendingInstallationSecrets, m as readInstallationRecoverySecrets, n as assertPlatformInstallationSlugAvailable, o as listInstallationManifests, p as promoteInstallationSecrets, t as acquirePlatformLifecycleLock, v as resolveInstallationManifest, x as writeInstallationManifest, y as savePlatformConnection } from "./platform-registry-DHH6fivm.mjs";
|
|
11
11
|
import { t as hasOwnKey } from "./has-own-key-D9QEnAkF.mjs";
|
|
12
|
-
import { t as ensurePlatformAccessToken } from "./cf-access-
|
|
12
|
+
import { t as ensurePlatformAccessToken } from "./cf-access-DHklo7Rg.mjs";
|
|
13
13
|
import { i as updateProjectWorkerRuntimeLogs, n as assertPlatformRuntimeLogsSupported, r as shouldUpdateProjectWorkerRuntimeLogs } from "./platform-runtime-logs-CdJGnk3f.mjs";
|
|
14
|
-
import { r as assertPlatformStorageSupported, t as parsePlatformArgs } from "./platform-args-
|
|
14
|
+
import { r as assertPlatformStorageSupported, t as parsePlatformArgs } from "./platform-args-CvZSuhYS.mjs";
|
|
15
15
|
import { t as writeFileAtomic } from "./atomic-write-DA6eD1Kp.mjs";
|
|
16
16
|
import { copyFileSync, cpSync, existsSync, lstatSync, mkdirSync, mkdtempSync, readFileSync, readdirSync, rmSync, writeFileSync } from "node:fs";
|
|
17
17
|
import { fileURLToPath } from "node:url";
|
|
@@ -5985,7 +5985,7 @@ async function verifyInstalledPlatformAccessProtection(input) {
|
|
|
5985
5985
|
}
|
|
5986
5986
|
const existingWorkers = input.plan.actions.filter((action) => action.kind === "worker" && action.action === "update").map((action) => action.name);
|
|
5987
5987
|
if (existingWorkers.length) {
|
|
5988
|
-
const { verifyProtectionWorkerOrigins } = await import("./platform-auth-protection-
|
|
5988
|
+
const { verifyProtectionWorkerOrigins } = await import("./platform-auth-protection-DA6Tw8Og.mjs");
|
|
5989
5989
|
await verifyProtectionWorkerOrigins({
|
|
5990
5990
|
request: input.client.request.bind(input.client),
|
|
5991
5991
|
listWorkerDomains: input.client.listWorkerDomains.bind(input.client),
|
|
@@ -7190,6 +7190,9 @@ function securityScannerNames(installationId) {
|
|
|
7190
7190
|
worker: `void-security-scanner-${suffix}`,
|
|
7191
7191
|
application: `void-security-scanner-${suffix}`,
|
|
7192
7192
|
gate: `void-security-scanner-gate-${suffix}`,
|
|
7193
|
+
copyNamespace: `void-security-copies-${suffix}`,
|
|
7194
|
+
copySandbox: `void-security-copy-sandbox-${suffix}`,
|
|
7195
|
+
copyPrefix: `void-sec-copy-${suffix}-`,
|
|
7193
7196
|
engines: {
|
|
7194
7197
|
"engine-a": engine("engine-a"),
|
|
7195
7198
|
"engine-c": engine("engine-c")
|
|
@@ -7278,10 +7281,52 @@ async function deleteScannerImages(client, registryFetch, account, repositories,
|
|
|
7278
7281
|
}
|
|
7279
7282
|
return removed;
|
|
7280
7283
|
}
|
|
7284
|
+
const COPY_PAGE = 100;
|
|
7285
|
+
/**
|
|
7286
|
+
* The copy namespace (Cloudflare deletes any copy still in it), the stores a failed scan
|
|
7287
|
+
* left (the API's hourly sweep stops with the platform; a copy bucket may hold what the
|
|
7288
|
+
* scanned app wrote, and only an empty bucket can be deleted), then the copy sandbox, the
|
|
7289
|
+
* namespace's outbound Worker. Run after the controller, the only Worker that binds them.
|
|
7290
|
+
* The sandbox carries the ownership marker; the rest is named per installation, like the images.
|
|
7291
|
+
*/
|
|
7292
|
+
async function deleteRuntimeCopies(client, accountId, names, marker, controllerExists, kept) {
|
|
7293
|
+
const base = `/accounts/${encodeURIComponent(accountId)}`;
|
|
7294
|
+
const read = (path) => optional(() => client.request(path), !controllerExists);
|
|
7295
|
+
const sandboxPath = `${base}/workers/scripts/${names.copySandbox}`;
|
|
7296
|
+
const sandbox = await read(`${sandboxPath}/settings`);
|
|
7297
|
+
if (sandbox && plainText(sandbox.bindings) !== marker) {
|
|
7298
|
+
kept.push(`security copy sandbox ${names.copySandbox}`);
|
|
7299
|
+
return false;
|
|
7300
|
+
}
|
|
7301
|
+
const mine = (name) => typeof name === "string" && name.startsWith(names.copyPrefix);
|
|
7302
|
+
const pages = async (path, take) => {
|
|
7303
|
+
const found = [];
|
|
7304
|
+
for (let page = 1; page <= 50; page++) {
|
|
7305
|
+
const rows = await read(`${path}per_page=${COPY_PAGE}&page=${page}`) ?? [];
|
|
7306
|
+
found.push(...rows.flatMap((row) => take(row) ?? []));
|
|
7307
|
+
if (rows.length < COPY_PAGE) break;
|
|
7308
|
+
}
|
|
7309
|
+
return found;
|
|
7310
|
+
};
|
|
7311
|
+
const namespacePath = `${base}/workers/dispatch/namespaces/${names.copyNamespace}`;
|
|
7312
|
+
const namespace = await read(namespacePath);
|
|
7313
|
+
const prefix = encodeURIComponent(names.copyPrefix);
|
|
7314
|
+
const buckets = ((await read(`${base}/r2/buckets?name_contains=${prefix}&per_page=1000`))?.buckets ?? []).flatMap((bucket) => mine(bucket.name) ? [bucket.name] : []);
|
|
7315
|
+
const stores = [
|
|
7316
|
+
...await pages(`${base}/d1/database?name=${prefix}&`, (row) => mine(row.name) && typeof row.uuid === "string" ? `d1/database/${row.uuid}` : void 0),
|
|
7317
|
+
...await pages(`${base}/storage/kv/namespaces?`, (row) => mine(row.title) && typeof row.id === "string" ? `storage/kv/namespaces/${row.id}` : void 0),
|
|
7318
|
+
...buckets.map((bucket) => `r2/buckets/${bucket}`)
|
|
7319
|
+
];
|
|
7320
|
+
if (namespace !== void 0) await deleteIfPresent(client, namespacePath);
|
|
7321
|
+
for (const bucket of buckets) await client.emptyR2Bucket(accountId, bucket);
|
|
7322
|
+
for (const store of stores) await deleteIfPresent(client, `${base}/${store}`);
|
|
7323
|
+
if (sandbox) await deleteIfPresent(client, sandboxPath);
|
|
7324
|
+
return namespace !== void 0 || stores.length > 0 || sandbox !== void 0;
|
|
7325
|
+
}
|
|
7281
7326
|
/**
|
|
7282
7327
|
* Uninstall: the gate first (nothing can call in), then the container applications, the
|
|
7283
|
-
* controller Worker and the engine images.
|
|
7284
|
-
* marker; one that is not ours is left alone and reported.
|
|
7328
|
+
* controller Worker, the runtime copies and the engine images. A Worker or application must
|
|
7329
|
+
* carry this installation's ownership marker; one that is not ours is left alone and reported.
|
|
7285
7330
|
*/
|
|
7286
7331
|
async function deletePlatformSecurityScanner(client, manifest, registryFetch = (input, init) => fetch(input, init)) {
|
|
7287
7332
|
if (!manifest.deployment.capabilities.securityAudits) return {
|
|
@@ -7322,6 +7367,7 @@ async function deletePlatformSecurityScanner(client, manifest, registryFetch = (
|
|
|
7322
7367
|
const repositories = ENGINES.map((engine) => names.engines[engine.slug].repository);
|
|
7323
7368
|
if (!settings) {
|
|
7324
7369
|
for (const application of found) kept.push(`security scanner container application ${application.name}`);
|
|
7370
|
+
if (await deleteRuntimeCopies(client, manifest.account.id, names, marker, false, kept)) deleted.push("runtime copies");
|
|
7325
7371
|
if (await deleteScannerImages(client, registryFetch, manifest.account.id, repositories, false)) deleted.push("scanner images");
|
|
7326
7372
|
return {
|
|
7327
7373
|
deleted,
|
|
@@ -7347,6 +7393,7 @@ async function deletePlatformSecurityScanner(client, manifest, registryFetch = (
|
|
|
7347
7393
|
if (removedApplication) deleted.push("container application");
|
|
7348
7394
|
await deleteIfPresent(client, workerPath);
|
|
7349
7395
|
deleted.push("controller");
|
|
7396
|
+
if (await deleteRuntimeCopies(client, manifest.account.id, names, marker, true, kept)) deleted.push("runtime copies");
|
|
7350
7397
|
if (await deleteScannerImages(client, registryFetch, manifest.account.id, repositories, true)) deleted.push("scanner images");
|
|
7351
7398
|
return {
|
|
7352
7399
|
deleted,
|
|
@@ -8622,7 +8669,7 @@ const assertNewNameAvailable = (slug) => {
|
|
|
8622
8669
|
};
|
|
8623
8670
|
async function runPlatformLifecycleCommand(commandArgs) {
|
|
8624
8671
|
if (commandArgs.subcommand === "domain") {
|
|
8625
|
-
const { runPlatformDomainCommand } = await import("./platform-domain-
|
|
8672
|
+
const { runPlatformDomainCommand } = await import("./platform-domain-DJSznNTA.mjs");
|
|
8626
8673
|
await runPlatformDomainCommand(commandArgs);
|
|
8627
8674
|
return;
|
|
8628
8675
|
}
|
|
@@ -8631,7 +8678,7 @@ async function runPlatformLifecycleCommand(commandArgs) {
|
|
|
8631
8678
|
const credential = await resolvePlatformCloudflareCredential();
|
|
8632
8679
|
const client = new PlatformCloudflareClient(credential.token, { credential: platformOperatorCredentialLabel(credential) });
|
|
8633
8680
|
const accountId = await selectAccount(await withPlatformProgress("Reading Cloudflare accounts", () => readAccounts(client)), commandArgs.account);
|
|
8634
|
-
const { recoverPlatformInstallations } = await import("./platform-recovery-
|
|
8681
|
+
const { recoverPlatformInstallations } = await import("./platform-recovery-CnzBbudV.mjs");
|
|
8635
8682
|
const recovered = await withPlatformProgress("Discovering platform installations", () => recoverPlatformInstallations(client, accountId, void 0, commandArgs.selector));
|
|
8636
8683
|
if (recovered.length === 0) {
|
|
8637
8684
|
log.info(`No recoverable Void platform installations were found in ${accountId}.`);
|
|
@@ -8642,7 +8689,7 @@ async function runPlatformLifecycleCommand(commandArgs) {
|
|
|
8642
8689
|
return;
|
|
8643
8690
|
}
|
|
8644
8691
|
if (commandArgs.subcommand !== "install") {
|
|
8645
|
-
const { runInstalledPlatformCommand } = await import("./platform-management-
|
|
8692
|
+
const { runInstalledPlatformCommand } = await import("./platform-management-BwHkz46V.mjs");
|
|
8646
8693
|
await runInstalledPlatformCommand(commandArgs);
|
|
8647
8694
|
return;
|
|
8648
8695
|
}
|
|
@@ -8811,7 +8858,7 @@ async function runPlatformLifecycleCommand(commandArgs) {
|
|
|
8811
8858
|
progress?.stop("Read the saved installation.");
|
|
8812
8859
|
progress = void 0;
|
|
8813
8860
|
if (authoritative) {
|
|
8814
|
-
const { selectAuthoritativePlatformManifest } = await import("./platform-management-
|
|
8861
|
+
const { selectAuthoritativePlatformManifest } = await import("./platform-management-BwHkz46V.mjs");
|
|
8815
8862
|
const selected = selectAuthoritativePlatformManifest(existing, authoritative);
|
|
8816
8863
|
authoritativeProvisionIntents = true;
|
|
8817
8864
|
if (!args.plan && JSON.stringify(selected) !== JSON.stringify(existing)) writeInstallationManifest(selected);
|
|
@@ -9304,7 +9351,7 @@ async function runPlatformLifecycleCommand(commandArgs) {
|
|
|
9304
9351
|
})).actions.filter((action) => action.kind === "worker"),
|
|
9305
9352
|
revalidateBeforeWorkerDeploy: (manifest, action) => revalidatePlatformInstallAction(client, plan, manifest, action),
|
|
9306
9353
|
verifyExistingOwnership: async (manifest, databaseCheckpointExists) => {
|
|
9307
|
-
const { verifyPlatformInstallationOwnership } = await import("./platform-management-
|
|
9354
|
+
const { verifyPlatformInstallationOwnership } = await import("./platform-management-BwHkz46V.mjs");
|
|
9308
9355
|
const retainedReplacementKeys = new Set(plan.actions.filter((action) => {
|
|
9309
9356
|
const previous = manifest.resources.find((resource) => resource.key === action.key);
|
|
9310
9357
|
return action.action === "create" && previous && previous.name !== action.name;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
export { l as runInstalledPlatformCommand, u as selectAuthoritativePlatformManifest, f as verifyPlatformInstallationOwnership } from "./platform-management-
|
|
1
|
+
export { l as runInstalledPlatformCommand, u as selectAuthoritativePlatformManifest, f as verifyPlatformInstallationOwnership } from "./platform-management-DX1zINou.mjs";
|
|
@@ -1,11 +1,11 @@
|
|
|
1
1
|
import { A as confirm, H as outro, K as select, L as log, tt as isCancel } from "./dist-Cr_xGE_K.mjs";
|
|
2
|
-
import { t as ensurePlatformAccessToken } from "./cf-access-
|
|
2
|
+
import { t as ensurePlatformAccessToken } from "./cf-access-DHklo7Rg.mjs";
|
|
3
3
|
import { f as formatUrl, g as note, h as import_picocolors, y as printSuccess } from "./output-BZLnu0z8.mjs";
|
|
4
|
-
import { $ as PlatformCloudflareApiError, B as r2BucketConfigHash, C as assertProjectZeroTrustAllowsUninstall, D as createPlatformHealthProbeToken, E as loadPlatformRuntime, F as formatPlatformInstallPlan, G as assertPlatformOperatorCredentialCanApplyPlan, H as revalidatePlatformInstallAction, I as hasProvisionIntentStep, J as verifyPlatformCloudflareCredential, K as platformOperatorCredentialLabel, L as legacyResourceConfigHash, N as createPlatformInstallPlan, O as createPlatformInstallationSecrets, P as dnsRecordConfigHash, R as matchesRecordedR2Fingerprint, S as readPlatformProjectZeroTrustState, T as readPlatformDatabase, U as platformDatabaseNameFromOwnerUrl, V as resourceMarkerProblem, W as turnOffInstalledProjectZeroTrust, Y as activatePlatformAccessCredentials, _ as deletePlatformSecurityScanner, a as createPlatformProgress, at as verifyPlatformRuntimeTokenEmailPermissions, c as formatPlatformWorkerOutsideChanges, d as authenticationSetupRequestHash, et as PlatformCloudflareClient, f as readLoginReplacementFile, g as assertPlatformSecurityAuditsSupported, h as installPlatform, it as hyperdriveOriginMatches, j as platformTrafficAttachmentWorker, k as resolveBootstrapGitHubId, l as reviewPlatformWorkerOutsideChanges, m as REMOTE_INSTALLATION_MANIFEST_KEY, n as resolvePlatformInstallDatabaseUrl, nt as hyperdriveOriginConfigHash, o as withPlatformProgress, ot as verifyPlatformRuntimeTokenPermissions, p as replacePendingInstallationAuthentication, q as resolvePlatformCloudflareCredential, rt as hyperdriveOriginFromConnectionString, s as findPlatformWorkerOutsideChanges, st as PLATFORM_WORKERS_PERMISSION, t as assertNoninteractivePlatformMutationAcknowledged, tt as PlatformRuntimeTokenEmailPermissionError, u as uploadPlatformWorkerOutsideChanges, v as acquirePlatformDatabaseLifecycleLock, w as formatZeroTrustApplications, x as readPlatformProjectSlugs, z as platformAdoptionIntentHash } from "./platform-lifecycle-
|
|
4
|
+
import { $ as PlatformCloudflareApiError, B as r2BucketConfigHash, C as assertProjectZeroTrustAllowsUninstall, D as createPlatformHealthProbeToken, E as loadPlatformRuntime, F as formatPlatformInstallPlan, G as assertPlatformOperatorCredentialCanApplyPlan, H as revalidatePlatformInstallAction, I as hasProvisionIntentStep, J as verifyPlatformCloudflareCredential, K as platformOperatorCredentialLabel, L as legacyResourceConfigHash, N as createPlatformInstallPlan, O as createPlatformInstallationSecrets, P as dnsRecordConfigHash, R as matchesRecordedR2Fingerprint, S as readPlatformProjectZeroTrustState, T as readPlatformDatabase, U as platformDatabaseNameFromOwnerUrl, V as resourceMarkerProblem, W as turnOffInstalledProjectZeroTrust, Y as activatePlatformAccessCredentials, _ as deletePlatformSecurityScanner, a as createPlatformProgress, at as verifyPlatformRuntimeTokenEmailPermissions, c as formatPlatformWorkerOutsideChanges, d as authenticationSetupRequestHash, et as PlatformCloudflareClient, f as readLoginReplacementFile, g as assertPlatformSecurityAuditsSupported, h as installPlatform, it as hyperdriveOriginMatches, j as platformTrafficAttachmentWorker, k as resolveBootstrapGitHubId, l as reviewPlatformWorkerOutsideChanges, m as REMOTE_INSTALLATION_MANIFEST_KEY, n as resolvePlatformInstallDatabaseUrl, nt as hyperdriveOriginConfigHash, o as withPlatformProgress, ot as verifyPlatformRuntimeTokenPermissions, p as replacePendingInstallationAuthentication, q as resolvePlatformCloudflareCredential, rt as hyperdriveOriginFromConnectionString, s as findPlatformWorkerOutsideChanges, st as PLATFORM_WORKERS_PERMISSION, t as assertNoninteractivePlatformMutationAcknowledged, tt as PlatformRuntimeTokenEmailPermissionError, u as uploadPlatformWorkerOutsideChanges, v as acquirePlatformDatabaseLifecycleLock, w as formatZeroTrustApplications, x as readPlatformProjectSlugs, z as platformAdoptionIntentHash } from "./platform-lifecycle-GFeXv3NC.mjs";
|
|
5
5
|
import { a as r2ErrorCode, i as isR2CredentialRejection, n as R2_CREDENTIALS_DOCS_URL, r as R2_MALFORMED_CREDENTIAL_ERROR_CODES } from "./direct-r2-upload-DFXLWfXV.mjs";
|
|
6
6
|
import { S as writePendingInstallationSecrets, _ as removePlatformConnectionForInstallation, g as removeInstallationRecoverySecrets, h as readPendingInstallationSecrets, m as readInstallationRecoverySecrets, o as listInstallationManifests, t as acquirePlatformLifecycleLock, v as resolveInstallationManifest, x as writeInstallationManifest } from "./platform-registry-DHH6fivm.mjs";
|
|
7
7
|
import { i as updateProjectWorkerRuntimeLogs, n as assertPlatformRuntimeLogsSupported, r as shouldUpdateProjectWorkerRuntimeLogs } from "./platform-runtime-logs-CdJGnk3f.mjs";
|
|
8
|
-
import { r as assertPlatformStorageSupported } from "./platform-args-
|
|
8
|
+
import { r as assertPlatformStorageSupported } from "./platform-args-CvZSuhYS.mjs";
|
|
9
9
|
import { PLATFORM_DISABLED_KEY, PLATFORM_DISABLED_VALUE, PLATFORM_R2_OWNERSHIP_MARKER_KEY, parsePlatformInstallationManifest, recordInstallationResource, recordInstallationStep, setInstallationDesiredState, transitionInstallation } from "@void/platform";
|
|
10
10
|
import { createHash, createHmac } from "node:crypto";
|
|
11
11
|
import { setTimeout } from "node:timers/promises";
|
|
@@ -1235,7 +1235,7 @@ async function uninstallPlatform(client, initialManifest, args, dependencies = {
|
|
|
1235
1235
|
if (purgeResources) await withPlatformProgress("Checking platform projects", () => assertNoPlatformProjects(dependencies.readProjects));
|
|
1236
1236
|
if (args.plan || interactive && !args.yes) note([
|
|
1237
1237
|
...zeroTrust ? zeroTrust.turnOff.length ? ["Turn off project Zero Trust; no platform user exists yet. Delete its Access applications:", formatZeroTrustApplications(zeroTrust.turnOff)] : ["Turn off project Zero Trust; no platform user exists yet."] : [],
|
|
1238
|
-
...securityAudits ? ["Delete the security scanner Worker, its container applications, and the scanner images it copied."] : [],
|
|
1238
|
+
...securityAudits ? ["Delete the security scanner Worker, its container applications, its scan copies, and the scanner images it copied."] : [],
|
|
1239
1239
|
purgeResources ? purgeResourcesPlanText(manifest) : [
|
|
1240
1240
|
"Disable platform traffic.",
|
|
1241
1241
|
retainData ? "Keep Workers and data." : "Delete eligible data; keep Workers, R2, and AI Gateway.",
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
import { A as confirm, K as select, X as text, tt as isCancel } from "./dist-Cr_xGE_K.mjs";
|
|
2
|
-
import { a as utcTime } from "./operator-ai-logging-
|
|
3
|
-
import { a as resolveOperatorOrigin, r as readOperatorToken } from "./operator-auth-
|
|
4
|
-
import { n as OperatorClient, r as OperatorClientError } from "./operator-client-
|
|
2
|
+
import { a as utcTime } from "./operator-ai-logging-DD0n6zc2.mjs";
|
|
3
|
+
import { a as resolveOperatorOrigin, r as readOperatorToken } from "./operator-auth-DMvn-y9X.mjs";
|
|
4
|
+
import { n as OperatorClient, r as OperatorClientError } from "./operator-client-dFNnXfyB.mjs";
|
|
5
5
|
import { y as printSuccess } from "./output-BZLnu0z8.mjs";
|
|
6
6
|
import { stripVTControlCharacters } from "node:util";
|
|
7
7
|
import { readFile } from "node:fs/promises";
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import { t as cfAccessHeaders } from "./cf-access-DmkKPcAI.mjs";
|
|
2
|
-
import { N as createPlatformInstallPlan, m as REMOTE_INSTALLATION_MANIFEST_KEY } from "./platform-lifecycle-
|
|
3
|
-
import { a as recoverDurablyMarkedProvisionIntents, f as verifyPlatformInstallationOwnership, r as isPlatformManifestMonotonicExtension } from "./platform-management-
|
|
2
|
+
import { N as createPlatformInstallPlan, m as REMOTE_INSTALLATION_MANIFEST_KEY } from "./platform-lifecycle-GFeXv3NC.mjs";
|
|
3
|
+
import { a as recoverDurablyMarkedProvisionIntents, f as verifyPlatformInstallationOwnership, r as isPlatformManifestMonotonicExtension } from "./platform-management-DX1zINou.mjs";
|
|
4
4
|
import { o as listInstallationManifests, t as acquirePlatformLifecycleLock, x as writeInstallationManifest, y as savePlatformConnection } from "./platform-registry-DHH6fivm.mjs";
|
|
5
5
|
import { parsePlatformInstallationManifest, setInstallationEndpoints } from "@void/platform";
|
|
6
6
|
// src/cli/platform-recovery.ts
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import { L as log, tt as isCancel } from "./dist-Cr_xGE_K.mjs";
|
|
2
|
-
import { u as openBrowser } from "./auth-
|
|
2
|
+
import { u as openBrowser } from "./auth-CqwJwItO.mjs";
|
|
3
3
|
import { h as import_picocolors, u as formatLink } from "./output-BZLnu0z8.mjs";
|
|
4
4
|
// src/cli/platform-plan-writes.ts
|
|
5
5
|
function planCreatesZone(plan) {
|
|
@@ -2,6 +2,7 @@ import { a as join, l as toSlash, s as relative } from "./dist-DMYe8CZJ.mjs";
|
|
|
2
2
|
import { S as globSync, _ as isRouteEnabledForEnvironment, b as ROUTE_EXTENSIONS, g as compareRouteSpecificity, m as deriveFromSource, t as pageFileEnvironment, v as parseRouteFilename, y as parseWebSocketFilename } from "./scan-Ct_SEzH4.mjs";
|
|
3
3
|
import { a as unwrapStaticExpression, c as walk, i as staticLiteral, s as bindingResolver } from "./static-exports-s7P86Ngp.mjs";
|
|
4
4
|
import { a as isMemberExpression, i as isLiteral, n as isCallExpression, o as isObjectExpression, r as isIdentifier, t as asAstProgram } from "./ast-BkPQu7A0.mjs";
|
|
5
|
+
import { t as staticModuleReferences } from "./module-references-DWQmO6TW.mjs";
|
|
5
6
|
import { n as readProjectPaths } from "./project-paths-2ENfCCih.mjs";
|
|
6
7
|
import { n as resourceNameWords, t as isResourceName } from "./resource-name-DlJ9QXzg.mjs";
|
|
7
8
|
import { r as getSsrServerEntryPath } from "./entry-Bwb9ev8K.mjs";
|
|
@@ -175,32 +176,6 @@ function readResourceDefinition(filename, source, helpers) {
|
|
|
175
176
|
...name === void 0 ? {} : { name }
|
|
176
177
|
};
|
|
177
178
|
}
|
|
178
|
-
// src/shared/module-references.ts
|
|
179
|
-
/** Runtime imports and re-exports, in source order, including empty export lists. */
|
|
180
|
-
function staticModuleReferences(parsed, code) {
|
|
181
|
-
const { staticImports, staticExports } = parsed.module;
|
|
182
|
-
if (!(/\bexport\s*(?:\/|\{\s*(?:\}|\/))/.test(code) || staticImports.some((item) => item.entries.length === 0 && code.slice(item.start, item.moduleRequest.start).trim() !== "import"))) return [...staticImports.filter((item) => item.entries.length === 0 || item.entries.some((entry) => !entry.isType)).map((item) => ({
|
|
183
|
-
source: item.moduleRequest.value,
|
|
184
|
-
start: item.start,
|
|
185
|
-
end: item.end
|
|
186
|
-
})), ...staticExports.flatMap((item) => {
|
|
187
|
-
const entry = item.entries.find((entry) => !entry.isType && entry.moduleRequest);
|
|
188
|
-
return entry?.moduleRequest ? [{
|
|
189
|
-
source: entry.moduleRequest.value,
|
|
190
|
-
start: item.start,
|
|
191
|
-
end: item.end
|
|
192
|
-
}] : [];
|
|
193
|
-
})].sort((a, b) => a.start - b.start);
|
|
194
|
-
return parsed.program.body.flatMap((statement) => {
|
|
195
|
-
if (statement.type !== "ImportDeclaration" && statement.type !== "ExportNamedDeclaration" && statement.type !== "ExportAllDeclaration") return [];
|
|
196
|
-
if (!statement.source || "importKind" in statement && statement.importKind === "type" || "exportKind" in statement && statement.exportKind === "type" || "specifiers" in statement && statement.specifiers.length > 0 && statement.specifiers.every((specifier) => "importKind" in specifier && specifier.importKind === "type" || "exportKind" in specifier && specifier.exportKind === "type")) return [];
|
|
197
|
-
return [{
|
|
198
|
-
source: statement.source.value,
|
|
199
|
-
start: statement.start,
|
|
200
|
-
end: statement.end
|
|
201
|
-
}];
|
|
202
|
-
});
|
|
203
|
-
}
|
|
204
179
|
// src/inference/client-auth.ts
|
|
205
180
|
const CLIENT_MODULES = /* @__PURE__ */ new Set([
|
|
206
181
|
"void/client",
|
|
@@ -657,4 +632,4 @@ function inferProjectBindings(root, options, scanDirs) {
|
|
|
657
632
|
}
|
|
658
633
|
return applyBindingOverrides(mergeBindings(allBindings), options?.bindings);
|
|
659
634
|
}
|
|
660
|
-
export { deriveWebSocketClassNameFromName as a, scanWebSocketRoutesSync as c,
|
|
635
|
+
export { deriveWebSocketClassNameFromName as a, scanWebSocketRoutesSync as c, listConventionFiles as d, listRouteFiles as f, inferProjectBindings as i, inferBindingsFromSource as l, needsApplicationDatabase as m, FRAMEWORK_SCAN_DIRS as n, inferWebSocketResourceName as o, applyBindingOverrides as p, detectFramework as r, isWebSocketPatternFile as s, DEFAULT_SCAN_DIRS as t, readResourceDefinition as u };
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export { t as prepareProject } from "./prepare-co1o1FFd.mjs";
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import { L as log } from "./dist-Cr_xGE_K.mjs";
|
|
2
|
-
import { t as prepareProject } from "./prepare-
|
|
2
|
+
import { t as prepareProject } from "./prepare-co1o1FFd.mjs";
|
|
3
3
|
import { g as note, y as printSuccess } from "./output-BZLnu0z8.mjs";
|
|
4
4
|
// src/cli/prepare.ts
|
|
5
5
|
async function runPrepareCommand(root) {
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import { a as join } from "./dist-DMYe8CZJ.mjs";
|
|
2
|
-
import { t as analyzeApplication } from "./application-routing-
|
|
2
|
+
import { t as analyzeApplication } from "./application-routing-KKw4Y84h.mjs";
|
|
3
3
|
import { a as projectAuthConfigImporter, i as loadVoidAuthConfig } from "./config-BFX5ZB1J.mjs";
|
|
4
4
|
import { n as generateVoidAuthDrizzleSchema, t as generateVoidAuthDatabaseModule } from "./drizzle-BJDMPrj7.mjs";
|
|
5
5
|
import { c as getDatabaseCasing, p as readConfig } from "./config-Dv5jri1-.mjs";
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
import { n as readDeploymentPlatform } from "./project-dh9431bN.mjs";
|
|
2
2
|
import { H as outro, L as log } from "./dist-Cr_xGE_K.mjs";
|
|
3
|
-
import { c as getToken, s as getSiteDomain } from "./auth-
|
|
4
|
-
import { r as PlatformClient } from "./client-
|
|
3
|
+
import { c as getToken, s as getSiteDomain } from "./auth-CqwJwItO.mjs";
|
|
4
|
+
import { r as PlatformClient } from "./client-DE2m2ldh.mjs";
|
|
5
5
|
import { S as tablePrefix, c as formatCount, f as formatUrl, h as import_picocolors, o as dim } from "./output-BZLnu0z8.mjs";
|
|
6
6
|
// src/cli/projects.ts
|
|
7
7
|
async function runProjectsCommand(root) {
|
|
@@ -37,83 +37,83 @@ async function runProjectsCommand(root) {
|
|
|
37
37
|
async function runProjectCommand(root, args) {
|
|
38
38
|
const cloudflare = readDeploymentPlatform(root) === "cloudflare";
|
|
39
39
|
if (args.subcommand === "status") {
|
|
40
|
-
const { runListCommand } = await import("./list-
|
|
40
|
+
const { runListCommand } = await import("./list-VGYBMjmx.mjs");
|
|
41
41
|
return runListCommand(root, args.name || void 0);
|
|
42
42
|
}
|
|
43
43
|
if (args.subcommand === "link") {
|
|
44
44
|
if (cloudflare) throw new Error("project: Direct Cloudflare apps are identified by cloudflare.name in void.config.ts and do not need linking.");
|
|
45
|
-
const { runLink } = await import("./link-
|
|
45
|
+
const { runLink } = await import("./link-Dyz9IGcM.mjs");
|
|
46
46
|
return runLink(root, args.name || void 0);
|
|
47
47
|
}
|
|
48
48
|
if (args.subcommand === "list") {
|
|
49
49
|
if (cloudflare) {
|
|
50
|
-
const { runListCommand } = await import("./list-
|
|
50
|
+
const { runListCommand } = await import("./list-VGYBMjmx.mjs");
|
|
51
51
|
return runListCommand(root);
|
|
52
52
|
}
|
|
53
53
|
return runProjectsCommand(root);
|
|
54
54
|
}
|
|
55
55
|
if (args.subcommand === "token") {
|
|
56
56
|
if (cloudflare) throw new Error("project: CI deploy credentials are available only for Void platform projects.");
|
|
57
|
-
const { runProjectTokenCommand } = await import("./project-token-
|
|
57
|
+
const { runProjectTokenCommand } = await import("./project-token-CMsB7I1-.mjs");
|
|
58
58
|
return runProjectTokenCommand(root, args);
|
|
59
59
|
}
|
|
60
60
|
if (args.subcommand === "team") {
|
|
61
61
|
if (args.action === "") {
|
|
62
|
-
const { printHelpPage } = await import("./help-
|
|
62
|
+
const { printHelpPage } = await import("./help-fKPzcTJv.mjs");
|
|
63
63
|
printHelpPage(["project", "team"]);
|
|
64
64
|
return;
|
|
65
65
|
}
|
|
66
66
|
const accountInvitationAction = args.action === "pending" || args.action === "accept" || args.action === "decline";
|
|
67
67
|
if (cloudflare && !accountInvitationAction) throw new Error("project: Teams are available only for projects hosted on a Void platform, not direct Cloudflare deployments.");
|
|
68
|
-
const { runProjectTeamCommand } = await import("./project-team-
|
|
68
|
+
const { runProjectTeamCommand } = await import("./project-team-BlIFXlmT.mjs");
|
|
69
69
|
return runProjectTeamCommand(root, args);
|
|
70
70
|
}
|
|
71
71
|
if (args.subcommand === "zero-trust") {
|
|
72
72
|
if (cloudflare) throw new Error("project: Zero Trust overrides are available only for projects hosted on a Void platform.");
|
|
73
73
|
if (args.action === "") {
|
|
74
|
-
const { printHelpPage } = await import("./help-
|
|
74
|
+
const { printHelpPage } = await import("./help-fKPzcTJv.mjs");
|
|
75
75
|
printHelpPage(["project", "zero-trust"]);
|
|
76
76
|
return;
|
|
77
77
|
}
|
|
78
|
-
const { runProjectZeroTrustCommand } = await import("./project-zero-trust-
|
|
78
|
+
const { runProjectZeroTrustCommand } = await import("./project-zero-trust-BI6pdpx4.mjs");
|
|
79
79
|
return runProjectZeroTrustCommand(root, args);
|
|
80
80
|
}
|
|
81
81
|
if (args.subcommand === "security") {
|
|
82
82
|
if (cloudflare) throw new Error("project: Security audits are available only for projects hosted on a Void platform.");
|
|
83
83
|
if (args.action === "") {
|
|
84
|
-
const { printHelpPage } = await import("./help-
|
|
84
|
+
const { printHelpPage } = await import("./help-fKPzcTJv.mjs");
|
|
85
85
|
printHelpPage(["project", "security"]);
|
|
86
86
|
return;
|
|
87
87
|
}
|
|
88
|
-
const { runProjectSecurityCommand } = await import("./project-security-
|
|
88
|
+
const { runProjectSecurityCommand } = await import("./project-security-BV1xfj1K.mjs");
|
|
89
89
|
return runProjectSecurityCommand(root, args);
|
|
90
90
|
}
|
|
91
91
|
if (args.subcommand === "logs") {
|
|
92
|
-
const { runLogsCommand } = await import("./logs-
|
|
92
|
+
const { runLogsCommand } = await import("./logs-kS1wuR4b.mjs");
|
|
93
93
|
return runLogsCommand(root, args.filter, args.range, args.deployment || void 0, args.level || void 0);
|
|
94
94
|
}
|
|
95
95
|
if (args.subcommand === "requests") {
|
|
96
96
|
if (cloudflare) throw new Error("project: Historical request analytics require the Void platform. Use `void project logs` for a live Cloudflare tail.");
|
|
97
|
-
const { runRequestsCommand } = await import("./requests-
|
|
97
|
+
const { runRequestsCommand } = await import("./requests-CfmJxNYg.mjs");
|
|
98
98
|
return runRequestsCommand(root, args.range, args.status || void 0);
|
|
99
99
|
}
|
|
100
100
|
if (args.subcommand === "rollback") {
|
|
101
|
-
const { runRollbackCommand } = await import("./rollback-
|
|
101
|
+
const { runRollbackCommand } = await import("./rollback-DL5HuAsM.mjs");
|
|
102
102
|
return runRollbackCommand(root, args.deployId || void 0, args.platform);
|
|
103
103
|
}
|
|
104
104
|
if (args.subcommand === "cancel") {
|
|
105
105
|
if (cloudflare) throw new Error("project: Direct Cloudflare deploys activate only after readiness succeeds, so there is no remote build to cancel.");
|
|
106
|
-
const { runCancelDeployCommand } = await import("./cancel-deploy-
|
|
106
|
+
const { runCancelDeployCommand } = await import("./cancel-deploy-DMWzkAlb.mjs");
|
|
107
107
|
return runCancelDeployCommand(root, args.deployId || void 0);
|
|
108
108
|
}
|
|
109
109
|
if (args.subcommand === "delete") {
|
|
110
110
|
if (cloudflare) throw new Error("project: Refusing to delete Cloudflare resources through this command. Direct deployments are additive and existing resources may be shared.");
|
|
111
|
-
const { runDeleteCommand } = await import("./delete-
|
|
111
|
+
const { runDeleteCommand } = await import("./delete-WtLEfap2.mjs");
|
|
112
112
|
return runDeleteCommand(root, args.name || void 0, { force: args.force });
|
|
113
113
|
}
|
|
114
114
|
if (args.subcommand === "purge-cache") {
|
|
115
115
|
if (cloudflare) throw new Error("project: `void project purge-cache` is available only for projects hosted on a Void platform. For a direct Cloudflare deploy, redeploy or purge the configured ISR KV namespace.");
|
|
116
|
-
const { runPurgeCacheCommand } = await import("./cache-
|
|
116
|
+
const { runPurgeCacheCommand } = await import("./cache-wSpi3aeM.mjs");
|
|
117
117
|
return runPurgeCacheCommand(root, args.projectSlug || void 0);
|
|
118
118
|
}
|
|
119
119
|
}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
export { m as runProjectSecurityCommand } from "./project-security
|
|
1
|
+
export { m as runProjectSecurityCommand } from "./project-security-CY_aahvW.mjs";
|
|
@@ -1,8 +1,8 @@
|
|
|
1
1
|
import { t as __commonJSMin } from "./rolldown-runtime-uD8oG6U2.mjs";
|
|
2
2
|
import { A as confirm, tt as isCancel } from "./dist-Cr_xGE_K.mjs";
|
|
3
3
|
import { t as hasOwnKey } from "./has-own-key-D9QEnAkF.mjs";
|
|
4
|
-
import { c as getToken, u as openBrowser } from "./auth-
|
|
5
|
-
import { n as PlatformApiError, r as PlatformClient } from "./client-
|
|
4
|
+
import { c as getToken, u as openBrowser } from "./auth-CqwJwItO.mjs";
|
|
5
|
+
import { n as PlatformApiError, r as PlatformClient } from "./client-DE2m2ldh.mjs";
|
|
6
6
|
import { n as cleanBlock, r as cleanLine } from "./output-BZLnu0z8.mjs";
|
|
7
7
|
import { a as join } from "./dist-DMYe8CZJ.mjs";
|
|
8
8
|
import { o as uploadAssetsToR2, t as DirectR2PutError } from "./direct-r2-upload-DFXLWfXV.mjs";
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import { H as outro, L as log } from "./dist-Cr_xGE_K.mjs";
|
|
2
|
-
import { c as getToken, i as getAccountCredential } from "./auth-
|
|
3
|
-
import { c as parsePlatformErrorBody, l as platformErrorMessage, n as PlatformApiError, r as PlatformClient } from "./client-
|
|
2
|
+
import { c as getToken, i as getAccountCredential } from "./auth-CqwJwItO.mjs";
|
|
3
|
+
import { c as parsePlatformErrorBody, l as platformErrorMessage, n as PlatformApiError, r as PlatformClient } from "./client-DE2m2ldh.mjs";
|
|
4
4
|
import { b as sanitizeTerminalText, c as formatCount, f as formatUrl, g as note, y as printSuccess } from "./output-BZLnu0z8.mjs";
|
|
5
5
|
import { r as readProjectConfig } from "./project-dh9431bN.mjs";
|
|
6
6
|
import { r as requireProjectBySlug, t as getRequestedProjectSlug } from "./resolve-project-8WZ3iVmr.mjs";
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import { H as outro, L as log } from "./dist-Cr_xGE_K.mjs";
|
|
2
|
-
import { c as getToken } from "./auth-
|
|
3
|
-
import { r as PlatformClient } from "./client-
|
|
2
|
+
import { c as getToken } from "./auth-CqwJwItO.mjs";
|
|
3
|
+
import { r as PlatformClient } from "./client-DE2m2ldh.mjs";
|
|
4
4
|
import { S as tablePrefix, o as dim, y as printSuccess } from "./output-BZLnu0z8.mjs";
|
|
5
5
|
import { r as readProjectConfig } from "./project-dh9431bN.mjs";
|
|
6
6
|
import { r as requireProjectBySlug } from "./resolve-project-8WZ3iVmr.mjs";
|
|
@@ -1,8 +1,8 @@
|
|
|
1
1
|
import { H as outro, L as log } from "./dist-Cr_xGE_K.mjs";
|
|
2
2
|
import { t as hasOwnKey } from "./has-own-key-D9QEnAkF.mjs";
|
|
3
|
-
import { n as PlatformApiError } from "./client-
|
|
3
|
+
import { n as PlatformApiError } from "./client-DE2m2ldh.mjs";
|
|
4
4
|
import { b as sanitizeTerminalText, g as note, r as cleanLine, y as printSuccess } from "./output-BZLnu0z8.mjs";
|
|
5
|
-
import { a as day, d as publicRequestLines, p as resolveTarget, t as askYesNo, u as isInteractive } from "./project-security
|
|
5
|
+
import { a as day, d as publicRequestLines, p as resolveTarget, t as askYesNo, u as isInteractive } from "./project-security-CY_aahvW.mjs";
|
|
6
6
|
import { t as OPEN_PUBLIC_REQUEST_STATES } from "./security-api-types-CU7zQtr_.mjs";
|
|
7
7
|
// src/cli/project-zero-trust.ts
|
|
8
8
|
function isOpenRequest(request) {
|
|
@@ -1,9 +1,10 @@
|
|
|
1
1
|
import { a as executeComposedHandler, i as separateDeferred, n as DEFERRED, o as getHandlerComposition, t as ValidationError } from "./validation-error-CtcAvyI7.mjs";
|
|
2
2
|
import { n as isConvertedResponse } from "./response-CyXsGfOy.mjs";
|
|
3
3
|
import { a as hasActionKey, c as searchWithoutActionKey, t as decodePagePath } from "./url-DBQluotE.mjs";
|
|
4
|
+
import { n as pagesBuildId } from "./build-id-4IV4hC1-.mjs";
|
|
4
5
|
import { a as resolveHead, i as renderHtmlAttrs, n as renderBodyAttrs, r as renderHeadToString, t as absolutizeHead } from "./head-BwQ5kgqt.mjs";
|
|
5
6
|
import { a as serializePageData, o as escapeScriptJson } from "./serialize-BmB4BfKu.mjs";
|
|
6
|
-
import { PAGES_PROTOCOL_VERSION } from "@void/edge";
|
|
7
|
+
import { PAGES_BUILD_HEADER, PAGES_PROTOCOL_VERSION, buildHeaders, isStaleBuild } from "@void/edge";
|
|
7
8
|
// src/pages/not-found-context.ts
|
|
8
9
|
const loaderNotFound = /* @__PURE__ */ new WeakSet();
|
|
9
10
|
const loaderBoundaries = /* @__PURE__ */ new WeakSet();
|
|
@@ -52,7 +53,8 @@ function isPagesRequest(c) {
|
|
|
52
53
|
return c.req.header("x-voidpages") === "true";
|
|
53
54
|
}
|
|
54
55
|
function needsPageReload(c) {
|
|
55
|
-
|
|
56
|
+
if (!isPagesRequest(c)) return false;
|
|
57
|
+
return c.req.header("X-VoidPages-Version") !== PAGES_PROTOCOL_VERSION || c.req.method === "GET" && isStaleBuild(pagesBuildId(), c.req.header(PAGES_BUILD_HEADER));
|
|
56
58
|
}
|
|
57
59
|
/** Old clients reload a successful non-Pages response; form errors stay readable. */
|
|
58
60
|
function legacyPageResponse(c, errors = null) {
|
|
@@ -60,7 +62,8 @@ function legacyPageResponse(c, errors = null) {
|
|
|
60
62
|
const headers = pageResponseHeaders(c, {
|
|
61
63
|
"Content-Type": errors ? "application/json" : "text/plain; charset=utf-8",
|
|
62
64
|
"Cache-Control": "no-store",
|
|
63
|
-
Vary: "X-VoidPages, X-VoidPages-Version"
|
|
65
|
+
Vary: "X-VoidPages, X-VoidPages-Version",
|
|
66
|
+
...buildHeaders(pagesBuildId())
|
|
64
67
|
});
|
|
65
68
|
headers.delete("X-VoidPages");
|
|
66
69
|
return new Response(errors ? JSON.stringify({ errors }) : null, {
|
|
@@ -178,6 +181,7 @@ function pageJsonResponse(c, pageObj) {
|
|
|
178
181
|
headers: pageResponseHeaders(c, {
|
|
179
182
|
"X-VoidPages": "true",
|
|
180
183
|
"X-VoidPages-Version": PAGES_PROTOCOL_VERSION,
|
|
184
|
+
...buildHeaders(pagesBuildId()),
|
|
181
185
|
"Content-Type": "application/json",
|
|
182
186
|
Vary: "X-VoidPages, X-VoidPages-Version",
|
|
183
187
|
...POWERED_BY
|
|
@@ -383,6 +387,7 @@ function renderedResponse(c, result, contentType, assetTags) {
|
|
|
383
387
|
status: c.newResponse(null).status,
|
|
384
388
|
headers: adjustDevCssCsp(pageResponseHeaders(c, {
|
|
385
389
|
"content-type": contentType,
|
|
390
|
+
...buildHeaders(pagesBuildId()),
|
|
386
391
|
...POWERED_BY
|
|
387
392
|
}), assetTags?.devCssNonce)
|
|
388
393
|
});
|
|
@@ -484,6 +489,8 @@ async function runPageGet(handler, headFn, c, componentId, renderFn, getAssetTag
|
|
|
484
489
|
if (!hasDeferred) return pageJsonResponse(c, pageObj);
|
|
485
490
|
c.header("X-VoidPages", "true");
|
|
486
491
|
c.header("X-VoidPages-Version", PAGES_PROTOCOL_VERSION);
|
|
492
|
+
const build = pagesBuildId();
|
|
493
|
+
if (build !== "") c.header(PAGES_BUILD_HEADER, build);
|
|
487
494
|
return streamDeferredResponse(serializePageData(pageObj) + "\n", deferredMap, c, "application/x-ndjson", options?.dev === true, (group, data) => serializePageData({
|
|
488
495
|
__deferred: group,
|
|
489
496
|
data
|