void 0.20.1 → 0.20.3
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/README.md +5 -1
- package/dist/{auth-W9WII-mN.mjs → auth-DPl6kck4.mjs} +46 -26
- package/dist/{auth-cmd-CAH62yDU.mjs → auth-cmd-CzwquNiP.mjs} +5 -4
- package/dist/auth-link-ElDTgF7j.mjs +28 -0
- package/dist/{build-cmd-CJvZvPQO.mjs → build-cmd-BpJe6boP.mjs} +3 -3
- package/dist/{cache-BlNeQjuP.mjs → cache-D98YTqeE.mjs} +3 -3
- package/dist/{cancel-deploy-CmlAZ9P6.mjs → cancel-deploy-CPbEQLMG.mjs} +3 -3
- package/dist/cf-access-DRsQRe6k.mjs +75 -0
- package/dist/cli/cli.mjs +309 -1958
- package/dist/cli/env-schema-probe.mjs +11 -2
- package/dist/client-BQBrZoCX.mjs +989 -0
- package/dist/{cloudflare-auth-B1QtTO1b.mjs → cloudflare-auth-6M5llVPC.mjs} +2 -2
- package/dist/{cloudflare-cmd-B6_OZx2V.mjs → cloudflare-cmd-4RPGN3KB.mjs} +2 -2
- package/dist/{cloudflare-connect-j5D4hhrG.mjs → cloudflare-connect-t1UU5svD.mjs} +2 -2
- package/dist/{cloudflare-operations-CPTpRW6d.mjs → cloudflare-operations-BzWnlC1_.mjs} +1 -1
- package/dist/{config-BQFq7QvD.mjs → config-uNGuFsI2.mjs} +1 -1
- package/dist/{connect-C04Wdy_h.mjs → connect-WCQZ_u3m.mjs} +6 -6
- package/dist/{create-project-ChGZ1DFd.mjs → create-project-D0oXA090.mjs} +7 -7
- package/dist/{db-D2d_mUsB.mjs → db-DJ-9qs3S.mjs} +47 -30
- package/dist/{delete-D8GigDk8.mjs → delete-BZ4-WaGm.mjs} +3 -3
- package/dist/{deploy-iXZ3F0N6.mjs → deploy-BAhhcg5q.mjs} +135 -117
- package/dist/{dev-inbox-DkgRWLkW.mjs → dev-inbox-P0u4tM8Y.mjs} +1 -1
- package/dist/{domain-B1VmoSr0.mjs → domain-BxAyhxXN.mjs} +4 -4
- package/dist/email-Bj7Cvdwp.mjs +795 -0
- package/dist/{env-D4Emu-M_.mjs → env-DBKmK4vc.mjs} +1 -0
- package/dist/{env-BcQzYgoG.mjs → env-DP_EErve.mjs} +5 -5
- package/dist/{env-validation-ENpMy6Ez.mjs → env-validation-CF6KvTRf.mjs} +3 -1
- package/dist/{gen-DI2YwdBM.mjs → gen-B_wPnVTK.mjs} +2 -2
- package/dist/{github-cmd-xItS5Zwf.mjs → github-cmd-C-z_xRrQ.mjs} +15 -21
- package/dist/{headers-D8QfRX9Y.mjs → headers-BAHwgHdW.mjs} +1 -1
- package/dist/help-CwOX-zmI.mjs +2216 -0
- package/dist/{inbound-afAcWeQ9.d.mts → inbound-CH5Mksyy.d.mts} +34 -48
- package/dist/{inbound-2d0zi2yS.mjs → inbound-aVHEUhKo.mjs} +130 -100
- package/dist/index.mjs +54 -17
- package/dist/{init-BD-9THgn.mjs → init-BGktCXgA.mjs} +11 -11
- package/dist/{link-RMdgjF1v.mjs → link-D2kbqhWb.mjs} +4 -4
- package/dist/{list-3F52R_yO.mjs → list-CvkK_G7k.mjs} +4 -4
- package/dist/{login-pV69H-ZO.mjs → login-WIjNc77c.mjs} +28 -10
- package/dist/{logs-DFHHD6wE.mjs → logs-dLUFCapG.mjs} +4 -4
- package/dist/{mime-BJD7d_qL.mjs → mime-D5Nmdzf7.mjs} +23 -9
- package/dist/{node-Dk3H2jmU.mjs → node-Ez5KW5rn.mjs} +2 -2
- package/dist/operator-auth-B3e08unv.mjs +52 -0
- package/dist/operator-client-LUZnlnYk.mjs +82 -0
- package/dist/{operator-cmd-DYWRbWUA.mjs → operator-cmd-CKJ7xIRs.mjs} +35 -55
- package/dist/{output-tFQLLj26.mjs → output-B0cfNSx5.mjs} +316 -2
- package/dist/pages/index.mjs +2 -2
- package/dist/platform-auth-config-CdVWRRJr.mjs +368 -0
- package/dist/platform-auth-protection-Drl0qhrn.mjs +219 -0
- package/dist/platform-auth-recovery-CmKEWpDo.mjs +310 -0
- package/dist/{platform-cmd-DxJ2FRwR.mjs → platform-cmd-5q_k56xS.mjs} +16 -6
- package/dist/{platform-domain-ChvbJkdy.mjs → platform-domain-4GiDlcqx.mjs} +4 -4
- package/dist/{platform-lifecycle-DN4MzJF_.mjs → platform-lifecycle-R9xAxvtG.mjs} +1716 -204
- package/dist/{platform-management-Db2PXw0B.mjs → platform-management-BfWsXHEW.mjs} +35 -7
- package/dist/{platform-recovery-C_YO-tIs.mjs → platform-recovery-CbK-I1FB.mjs} +6 -5
- package/dist/{prepare-CBetXvsN.mjs → prepare-CtDJjoOj.mjs} +2 -2
- package/dist/{prepare-BfJvFUtJ.mjs → prepare-blNRQvQl.mjs} +2 -2
- package/dist/prerender-render.d.mts +11 -0
- package/dist/prerender-render.mjs +111 -0
- package/dist/{project-cmd-Mo0V9yKS.mjs → project-cmd-CTdmnzvc.mjs} +32 -14
- package/dist/project-team-CGxsQe3_.mjs +132 -0
- package/dist/project-token-Cirx7uwZ.mjs +75 -0
- package/dist/{provision-Blnstcm2.mjs → provision-CSJOjjQk.mjs} +2 -0
- package/dist/{requests-BcKOVpRg.mjs → requests-4Nq59hOr.mjs} +3 -3
- package/dist/{rollback-Bx85-0xh.mjs → rollback-Dr7u0Ljx.mjs} +4 -4
- package/dist/runtime/ai.mjs +3 -2
- package/dist/runtime/email/testing.d.mts +1 -1
- package/dist/runtime/email/testing.mjs +3 -3
- package/dist/runtime/email-protocol.d.mts +15 -0
- package/dist/runtime/email-protocol.mjs +70 -0
- package/dist/runtime/email.d.mts +2 -2
- package/dist/runtime/email.mjs +189 -96
- package/dist/runtime/remote/index.mjs +54 -11
- package/dist/runtime/sandbox.d.mts +4 -56
- package/dist/runtime/sandbox.mjs +81 -220
- package/dist/{secret-ByhJ9AMl.mjs → secret-AcPi-FoA.mjs} +5 -5
- package/dist/{skills-Q46GZMO-.mjs → skills-C0RvGjeE.mjs} +1 -1
- package/dist/{subcommand-prompt-WfySCQ7S.mjs → subcommand-prompt-Bmyn5Rlc.mjs} +1 -1
- package/package.json +12 -7
- package/skills/void/SKILL.md +35 -4
- package/skills/void/docs/guide/deployment.md +16 -14
- package/skills/void/docs/guide/email.md +114 -120
- package/skills/void/docs/guide/platform/administration/access.md +163 -0
- package/skills/void/docs/guide/platform/administration/email.md +121 -0
- package/skills/void/docs/guide/platform/administration/operations.md +97 -0
- package/skills/void/docs/guide/platform/administration/projects.md +54 -0
- package/skills/void/docs/guide/platform/development/local.md +119 -0
- package/skills/void/docs/guide/platform/development/runtime.md +124 -0
- package/skills/void/docs/guide/platform/development/schema-ci.md +95 -0
- package/skills/void/docs/guide/platform/installation/ci.md +55 -0
- package/skills/void/docs/guide/platform/installation/credentials.md +80 -0
- package/skills/void/docs/guide/platform/installation/domains.md +68 -0
- package/skills/void/docs/guide/platform/installation/first-deployment.md +82 -0
- package/skills/void/docs/guide/platform/installation/maintenance.md +137 -0
- package/skills/void/docs/guide/platform/installation/prerequisites.md +86 -0
- package/skills/void/docs/guide/platform/installation/setup.md +169 -0
- package/skills/void/docs/guide/platform/installation/uninstall.md +54 -0
- package/skills/void/docs/guide/platform-administration.md +6 -202
- package/skills/void/docs/guide/platform-development.md +5 -254
- package/skills/void/docs/guide/project-collaboration.md +94 -0
- package/skills/void/docs/guide/sandboxes.md +9 -24
- package/skills/void/docs/guide/self-hosted-platform.md +13 -542
- package/skills/void/docs/reference/api.md +34 -34
- package/skills/void/docs/reference/cli.md +276 -31
- package/skills/void/docs/reference/config.md +1 -1
- package/skills/void/docs/reference/resource-inference.md +10 -10
- package/dist/cf-access-AJ1ehiFR.mjs +0 -42
- package/dist/cf-access-DsSsZUPr.mjs +0 -67
- package/dist/client-Clirrol3.mjs +0 -705
- package/dist/email-uKyQYUVY.mjs +0 -1016
|
@@ -1,37 +1,37 @@
|
|
|
1
1
|
import { n as __exportAll, r as __toESM, t as __commonJSMin } from "./rolldown-runtime-rQ84J-ij.mjs";
|
|
2
2
|
import { c as relative, i as extname, l as resolve, n as dirname, o as join, s as normalize, t as basename } from "./dist-BrsS7cai.mjs";
|
|
3
|
-
import { D as log$1, E as intro,
|
|
3
|
+
import { A as outro, B as ensureCloudflaredToken, D as log$1, E as intro, H as ensurePlatformProxyAccess, I as isCancel, M as select, c as import_picocolors$1, d as formatCloudflareUserMessage, ft as require_picocolors, i as createSpinner, k as note, r as cliTitle, w as confirm } from "./output-B0cfNSx5.mjs";
|
|
4
4
|
import { i as resolveProjectPaths, n as readProjectPaths, t as assertNoRootSourceConventionConflicts } from "./project-paths-SK8nMHPp.mjs";
|
|
5
5
|
import { a as scanQueuesSync, i as scanWebSocketRoutesSync, o as scanJobsSync, r as scanRoutes, s as findVoidAuthConfig } from "./scan-BMH4rzlv.mjs";
|
|
6
|
-
import {
|
|
7
|
-
import {
|
|
8
|
-
import { t as ensureCloudflaredToken } from "./cf-access-DsSsZUPr.mjs";
|
|
6
|
+
import { i as trustedCloudflareWorkerAccessHeaders, r as scopedAccessCredentials, t as cfAccessHeaders } from "./cf-access-DRsQRe6k.mjs";
|
|
7
|
+
import { E as writeProjectConfig, S as readProjectConfig, d as isStagingMode, l as getToken, o as getApiUrl, s as getProxyUrl, u as getTokenSource, w as writeDeploymentPlatform, x as readDeploymentPlatform, y as attachSelectedPlatform } from "./auth-DPl6kck4.mjs";
|
|
9
8
|
import { A as writeWranglerPublishedTrafficSnapshot, D as syncWranglerWebSockets, E as syncWranglerDurableObjects, M as isSandboxEnabled, N as requiresSandboxPlatformImage, P as resolveSandboxConfig, S as readWranglerPublishedTrafficSnapshot, T as syncWranglerBindings, a as LIVE_MIGRATION_TAG, c as bindingEntriesForField, f as findBindingNameOwner, g as readExistingLiveBindingConfig, h as normalizeWranglerCompatibilityFlags, k as writeProvisionedWranglerConfig, l as ensureWranglerCompat, o as acknowledgeWranglerManagedQueueRemovals, r as FRIENDLY_BINDING_NAMES, w as resolveLiveBindingConfig, x as readWranglerManagedQueueCleanupCandidates } from "./wrangler--imS8n0d.mjs";
|
|
10
|
-
import { c as getDatabaseDialect, f as readConfig, l as isNodeTarget, p as resolveBindingNames } from "./config-
|
|
9
|
+
import { c as getDatabaseDialect, f as readConfig, l as isNodeTarget, p as resolveBindingNames } from "./config-uNGuFsI2.mjs";
|
|
11
10
|
import { i as voidWarn, r as voidLog } from "./log-ChfPKsVd.mjs";
|
|
12
|
-
import { n as lintDuplicateSources, r as mergeRoutingRules, t as lintDestinationSplats } from "./headers-
|
|
11
|
+
import { n as lintDuplicateSources, r as mergeRoutingRules, t as lintDestinationSplats } from "./headers-BAHwgHdW.mjs";
|
|
13
12
|
import { i as inferProjectBindings, n as FRAMEWORK_SCAN_DIRS, r as detectFramework } from "./plugin-inference-BDRfZngg.mjs";
|
|
14
13
|
import { o as validateSsrEntry } from "./entry-DU3oDoQ3.mjs";
|
|
15
14
|
import { a as buildMigrationPlanBundle, c as collectMigrations, r as validateMigrations, t as assertJournalCoherence } from "./validate-tBBN_dXH.mjs";
|
|
16
15
|
import { r as scanWranglerDotenvKeys } from "./dotenv-VQxupEUv.mjs";
|
|
17
16
|
import { t as discoverSchema } from "./discover-xvfrgJeo.mjs";
|
|
18
17
|
import { t as findEnvFile } from "./env-types-BNPhro-M.mjs";
|
|
19
|
-
import { a as deriveSelfHostEnvContextFromVars, c as fetchRemoteSecretNames, d as readEmittedWorkerVars, f as selfHostSchemaFailureMessage, i as SelfHostSecretListError, l as formatEnvReport, n as SelfHostFirstDeployError, o as dischargeSelfHostEnvContext, p as validateProdEnv, r as SelfHostSchemaError, t as SelfHostEnvValidationError, u as listSelfHostSecretNames } from "./env-validation-
|
|
20
|
-
import { n as CLOUDFLARE_DEPLOY_BUILD_ENV, o as resolveRemoteMode, s as stripInternalEnvKeys } from "./env-
|
|
18
|
+
import { a as deriveSelfHostEnvContextFromVars, c as fetchRemoteSecretNames, d as readEmittedWorkerVars, f as selfHostSchemaFailureMessage, i as SelfHostSecretListError, l as formatEnvReport, n as SelfHostFirstDeployError, o as dischargeSelfHostEnvContext, p as validateProdEnv, r as SelfHostSchemaError, t as SelfHostEnvValidationError, u as listSelfHostSecretNames } from "./env-validation-CF6KvTRf.mjs";
|
|
19
|
+
import { n as CLOUDFLARE_DEPLOY_BUILD_ENV, o as resolveRemoteMode, s as stripInternalEnvKeys } from "./env-DBKmK4vc.mjs";
|
|
21
20
|
import { n as writeDrizzleConfig } from "./config-NOG_U1aK.mjs";
|
|
22
21
|
import { t as runMySqlMigrations } from "./runner-mysql-7BPUNGmL.mjs";
|
|
23
22
|
import { t as runPgMigrations } from "./runner-pg-BkEza-dX.mjs";
|
|
24
23
|
import { n as openMigrationValidationDatabase, t as SqliteMigrationError } from "./sqlite-validation-BzKMWnO4.mjs";
|
|
25
24
|
import { t as scanPages } from "./scan-CpK-57ug.mjs";
|
|
25
|
+
import { renderPrerenderPaths } from "./prerender-render.mjs";
|
|
26
26
|
import { a as scanEmailHandlersSync, r as hasEmailHandlers } from "./email-Ce6SQq-i.mjs";
|
|
27
|
-
import { a as isExpiredTokenError, i as isCliOutdatedError, n as PlatformClient, o as parsePlatformErrorBody, t as PlatformApiError } from "./client-
|
|
27
|
+
import { a as isExpiredTokenError, i as isCliOutdatedError, n as PlatformClient, o as parsePlatformErrorBody, s as platformErrorMessage, t as PlatformApiError } from "./client-BQBrZoCX.mjs";
|
|
28
28
|
import { a as resolveProjectCommand, i as hasBackendFiles, n as detectPreset, o as resolveWranglerArgv, r as formatProjectCommand, t as FRAMEWORK_PRESETS } from "./preset-lAy0B0BQ.mjs";
|
|
29
|
-
import { i as cloudflareKeyringNeedsTerminal, s as ensureCloudflareAuthentication, t as CloudflareAuthenticationError } from "./cloudflare-auth-
|
|
30
|
-
import { n as createCloudflareEmptyDomainPublisher } from "./cloudflare-operations-
|
|
31
|
-
import { i as promptProjectSetupAction, n as promptAndCreateProject, r as promptProjectSelection } from "./create-project-
|
|
29
|
+
import { i as cloudflareKeyringNeedsTerminal, s as ensureCloudflareAuthentication, t as CloudflareAuthenticationError } from "./cloudflare-auth-6M5llVPC.mjs";
|
|
30
|
+
import { n as createCloudflareEmptyDomainPublisher } from "./cloudflare-operations-BzWnlC1_.mjs";
|
|
31
|
+
import { i as promptProjectSetupAction, n as promptAndCreateProject, r as promptProjectSelection } from "./create-project-D0oXA090.mjs";
|
|
32
32
|
import { r as resolveProjectBySlug, t as getRequestedProjectSlug } from "./resolve-project--Vxawf7z.mjs";
|
|
33
33
|
import { t as collectGitDeployMetadata } from "./git-metadata-D-gurjzG.mjs";
|
|
34
|
-
import {
|
|
34
|
+
import { n as promptForLoginToken } from "./login-WIjNc77c.mjs";
|
|
35
35
|
import { createRequire } from "node:module";
|
|
36
36
|
import { copyFileSync, cpSync, createWriteStream, existsSync, mkdirSync, mkdtempSync, readFileSync, readdirSync, renameSync, rmSync, unlinkSync, writeFileSync } from "node:fs";
|
|
37
37
|
import { fileURLToPath, pathToFileURL } from "node:url";
|
|
@@ -43,7 +43,7 @@ import { applyEdits, modify, parse } from "jsonc-parser";
|
|
|
43
43
|
import { build } from "vite";
|
|
44
44
|
import { Minimatch } from "minimatch";
|
|
45
45
|
import { isDeepStrictEqual } from "node:util";
|
|
46
|
-
import { activateCloudflareVersion, assertCloudflareBindingsPreserved, assertCloudflareDurableObjectLifecycleSupported, assertExistingCloudflareConfig, encodeCloudflareVersionMessage, extractWorkersDevSubdomain, normalizeWorkersDevSubdomain, parseRootWranglerConfig, parseRootWranglerConfig as parseRootWranglerConfig$1, readBindingFieldPresence, readCloudflareTriggerConfig, readConfigEntryString, readExistingCloudflareWorker, readStoredResourceName, readWranglerTopLevelString, renderCloudflareStaticEntry, resolveD1MigrateTarget, stageCloudflareStaticAssets, writeCloudflareFrameworkDeployConfig, writeCloudflareStaticDeployConfig } from "@void/deploy-cloudflare";
|
|
46
|
+
import { activateCloudflareVersion, assertCloudflareBindingsPreserved, assertCloudflareDurableObjectLifecycleSupported, assertExistingCloudflareConfig, createCloudflareMetadataRunner, encodeCloudflareVersionMessage, extractWorkersDevSubdomain, normalizeWorkersDevSubdomain, parseRootWranglerConfig, parseRootWranglerConfig as parseRootWranglerConfig$1, readBindingFieldPresence, readCloudflareTriggerConfig, readConfigEntryString, readExistingCloudflareWorker, readStoredResourceName, readWranglerTopLevelString, renderCloudflareStaticEntry, resolveD1MigrateTarget, stageCloudflareStaticAssets, writeCloudflareFrameworkDeployConfig, writeCloudflareStaticDeployConfig } from "@void/deploy-cloudflare";
|
|
47
47
|
import { hash } from "blake3-jit";
|
|
48
48
|
import ignore from "ignore";
|
|
49
49
|
//#region src/asset-routing.ts
|
|
@@ -597,7 +597,7 @@ async function preflightEmail(inputs) {
|
|
|
597
597
|
status: settings.status,
|
|
598
598
|
enabled: settings.enabled
|
|
599
599
|
};
|
|
600
|
-
if (
|
|
600
|
+
if (settings.status === "unlocked") block("all", `Email Routing on ${apex} is ${settings.status} — fix it in the Cloudflare dashboard; Void never re-locks records you unlocked`);
|
|
601
601
|
}
|
|
602
602
|
}
|
|
603
603
|
if (pre.routing.state !== "ready") {
|
|
@@ -1507,6 +1507,8 @@ const UNTRUSTED_PROJECT_CODE_ENV_VARS = [
|
|
|
1507
1507
|
...WRANGLER_AUTH_CREDENTIAL_ENV_VARS,
|
|
1508
1508
|
"CF_ACCESS_CLIENT_ID",
|
|
1509
1509
|
"CF_ACCESS_CLIENT_SECRET",
|
|
1510
|
+
"VOID_ACCESS_CREDENTIALS",
|
|
1511
|
+
"VOID_ACCESS_ORIGIN",
|
|
1510
1512
|
"VOID_TOKEN",
|
|
1511
1513
|
"DATABASE_URL",
|
|
1512
1514
|
"ACTIONS_ID_TOKEN_REQUEST_URL",
|
|
@@ -1534,61 +1536,16 @@ function buildEnv(extra, options) {
|
|
|
1534
1536
|
//#endregion
|
|
1535
1537
|
//#region src/prerender.ts
|
|
1536
1538
|
const PRERENDER_PATHS_ENDPOINT = "/__void/prerender-paths";
|
|
1537
|
-
const
|
|
1539
|
+
const nodeRendererUrl = new URL(import.meta.url.endsWith(".ts") ? "./prerender-render.ts" : "./prerender-render.mjs", import.meta.url).href;
|
|
1538
1540
|
function outputFileForPath(path) {
|
|
1539
1541
|
return path === "/" ? "index.html" : `${path.slice(1)}.html`;
|
|
1540
1542
|
}
|
|
1541
|
-
function pageDataFileForPath(path) {
|
|
1542
|
-
return path === "/" ? `${STATIC_PAGE_DATA_DIR}/index.json` : `${STATIC_PAGE_DATA_DIR}/${path.slice(1)}.json`;
|
|
1543
|
-
}
|
|
1544
1543
|
async function readPrerenderPathsResponse(response) {
|
|
1545
1544
|
if (!response.ok) throw new Error(`prerender: Failed to collect prerender paths. HTTP ${response.status}.`);
|
|
1546
1545
|
const payload = await response.json();
|
|
1547
1546
|
if (!Array.isArray(payload.paths) || !payload.paths.every((path) => typeof path === "string")) throw new Error("prerender: Failed to collect prerender paths. Response payload is invalid.");
|
|
1548
1547
|
return payload.paths;
|
|
1549
1548
|
}
|
|
1550
|
-
async function renderPrerenderPaths(paths, clientDir, fetchPath, fetchPageData) {
|
|
1551
|
-
const result = {
|
|
1552
|
-
rendered: [],
|
|
1553
|
-
failed: []
|
|
1554
|
-
};
|
|
1555
|
-
for (const path of paths) try {
|
|
1556
|
-
const response = await fetchPath(path);
|
|
1557
|
-
const html = await response.text();
|
|
1558
|
-
if (!response.ok) {
|
|
1559
|
-
result.failed.push({
|
|
1560
|
-
path,
|
|
1561
|
-
error: `HTTP ${response.status}`
|
|
1562
|
-
});
|
|
1563
|
-
voidWarn(`prerender ${path} failed: HTTP ${response.status}`);
|
|
1564
|
-
continue;
|
|
1565
|
-
}
|
|
1566
|
-
const outputFile = outputFileForPath(path);
|
|
1567
|
-
const outputPath = join(clientDir, outputFile);
|
|
1568
|
-
mkdirSync(dirname(outputPath), { recursive: true });
|
|
1569
|
-
writeFileSync(outputPath, html);
|
|
1570
|
-
if (fetchPageData) {
|
|
1571
|
-
const pageDataResponse = await fetchPageData(path);
|
|
1572
|
-
if (pageDataResponse.headers.get("X-VoidPages")) {
|
|
1573
|
-
const pageData = await pageDataResponse.json();
|
|
1574
|
-
const pageDataFile = pageDataFileForPath(path);
|
|
1575
|
-
const pageDataPath = join(clientDir, pageDataFile);
|
|
1576
|
-
mkdirSync(dirname(pageDataPath), { recursive: true });
|
|
1577
|
-
writeFileSync(pageDataPath, JSON.stringify(pageData));
|
|
1578
|
-
}
|
|
1579
|
-
}
|
|
1580
|
-
result.rendered.push(path);
|
|
1581
|
-
voidLog(`prerender \x1b[36m${outputFile}\x1b[39m`);
|
|
1582
|
-
} catch (err) {
|
|
1583
|
-
const error = err instanceof Error ? err.message : String(err);
|
|
1584
|
-
result.failed.push({
|
|
1585
|
-
path,
|
|
1586
|
-
error
|
|
1587
|
-
});
|
|
1588
|
-
voidWarn(`prerender ${path} failed: ${error}`);
|
|
1589
|
-
}
|
|
1590
|
-
return result;
|
|
1591
|
-
}
|
|
1592
1549
|
function normalizeWorkerModulePath(path) {
|
|
1593
1550
|
return path.replace(/\\/g, "/").replace(/^\.\//, "");
|
|
1594
1551
|
}
|
|
@@ -1646,6 +1603,8 @@ function buildPrerenderBindings(input) {
|
|
|
1646
1603
|
voidBindings.__VOID_PROJECT_ID = input.voidProjectId;
|
|
1647
1604
|
if (input.voidStaging) voidBindings.__VOID_STAGING = "1";
|
|
1648
1605
|
voidBindings.__VOID_PROXY_URL = input.voidProxyUrl ?? (input.voidStaging ? "https://proxy.staging.void.cloud" : "https://proxy.void.cloud");
|
|
1606
|
+
const access = scopedAccessCredentials(input.accessEnv ?? {}, voidBindings.__VOID_PROXY_URL);
|
|
1607
|
+
if (access) voidBindings.__VOID_ACCESS_CREDENTIALS = access;
|
|
1649
1608
|
if (input.remoteMode) voidBindings.__VOID_REMOTE = "1";
|
|
1650
1609
|
}
|
|
1651
1610
|
return {
|
|
@@ -1673,7 +1632,9 @@ async function createCloudflarePrerenderRunner(options) {
|
|
|
1673
1632
|
const voidToken = voidProjectId ? options.voidToken ?? getToken(root) : null;
|
|
1674
1633
|
const voidStaging = isStagingMode(root);
|
|
1675
1634
|
const voidProxyUrl = voidToken && voidProjectId ? getProxyUrl(root) : void 0;
|
|
1635
|
+
if (voidProxyUrl) ensurePlatformProxyAccess(getApiUrl(root), voidProxyUrl);
|
|
1676
1636
|
const bindings = buildPrerenderBindings({
|
|
1637
|
+
accessEnv: process.env,
|
|
1677
1638
|
wranglerVars: wranglerConfig.vars,
|
|
1678
1639
|
env,
|
|
1679
1640
|
voidToken,
|
|
@@ -1771,7 +1732,10 @@ async function prerenderPages(options) {
|
|
|
1771
1732
|
};
|
|
1772
1733
|
return {
|
|
1773
1734
|
paths,
|
|
1774
|
-
...await renderPrerenderPaths(paths, options.clientDir, (path) => runner.fetchPath(path), (path) => runner.fetchPageData(path))
|
|
1735
|
+
...await renderPrerenderPaths(paths, options.clientDir, (path) => runner.fetchPath(path), (path) => runner.fetchPageData(path), (path, outputFile, error) => {
|
|
1736
|
+
if (error !== void 0) voidWarn(`prerender ${path} failed: ${error}`);
|
|
1737
|
+
else voidLog(`prerender \x1b[36m${outputFile}\x1b[39m`);
|
|
1738
|
+
})
|
|
1775
1739
|
};
|
|
1776
1740
|
} finally {
|
|
1777
1741
|
await runner.close();
|
|
@@ -1783,7 +1747,7 @@ async function runNodePrerenderRunner(root, config) {
|
|
|
1783
1747
|
writeFileSync(runnerPath, `
|
|
1784
1748
|
import { pathToFileURL } from "node:url";
|
|
1785
1749
|
import { dirname, join } from "node:path";
|
|
1786
|
-
import {
|
|
1750
|
+
import { renderPrerenderPaths } from ${JSON.stringify(nodeRendererUrl)};
|
|
1787
1751
|
|
|
1788
1752
|
const config = JSON.parse(process.argv[2]);
|
|
1789
1753
|
const { mode, ssrDir, clientDir } = config;
|
|
@@ -1814,37 +1778,13 @@ async function collectPaths() {
|
|
|
1814
1778
|
|
|
1815
1779
|
async function renderPaths(paths) {
|
|
1816
1780
|
if (!clientDir) return { rendered: [], failed: [] };
|
|
1817
|
-
|
|
1818
|
-
|
|
1819
|
-
|
|
1820
|
-
|
|
1821
|
-
|
|
1822
|
-
|
|
1823
|
-
|
|
1824
|
-
result.failed.push({ path, error: "HTTP " + response.status });
|
|
1825
|
-
continue;
|
|
1826
|
-
}
|
|
1827
|
-
const outputFile = path === "/" ? "index.html" : path.slice(1) + ".html";
|
|
1828
|
-
const outputPath = join(clientDir, outputFile);
|
|
1829
|
-
mkdirSync(dirname(outputPath), { recursive: true });
|
|
1830
|
-
writeFileSync(outputPath, html);
|
|
1831
|
-
const pageDataResponse = await fetch(new Request("http://localhost" + path, {
|
|
1832
|
-
headers: { "Accept": "application/json", "Purpose": "prefetch", "X-VoidPages": "true" },
|
|
1833
|
-
}));
|
|
1834
|
-
if (pageDataResponse.headers.get("X-VoidPages")) {
|
|
1835
|
-
const pageData = await pageDataResponse.json();
|
|
1836
|
-
const pageDataFile = path === "/" ? "_void/pages/index.json" : "_void/pages/" + path.slice(1) + ".json";
|
|
1837
|
-
const pageDataPath = join(clientDir, pageDataFile);
|
|
1838
|
-
mkdirSync(dirname(pageDataPath), { recursive: true });
|
|
1839
|
-
writeFileSync(pageDataPath, JSON.stringify(pageData));
|
|
1840
|
-
}
|
|
1841
|
-
result.rendered.push(path);
|
|
1842
|
-
} catch (err) {
|
|
1843
|
-
result.failed.push({ path, error: err instanceof Error ? err.message : String(err) });
|
|
1844
|
-
}
|
|
1845
|
-
}
|
|
1846
|
-
|
|
1847
|
-
return result;
|
|
1781
|
+
return renderPrerenderPaths(
|
|
1782
|
+
paths, clientDir,
|
|
1783
|
+
(path) => fetch(new Request("http://localhost" + path)),
|
|
1784
|
+
(path) => fetch(new Request("http://localhost" + path, {
|
|
1785
|
+
headers: { "Accept": "application/json", "Purpose": "prefetch", "X-VoidPages": "true" },
|
|
1786
|
+
})),
|
|
1787
|
+
);
|
|
1848
1788
|
}
|
|
1849
1789
|
|
|
1850
1790
|
if (mode === "collect") {
|
|
@@ -2183,8 +2123,8 @@ function formatConnectionLostMessage(deploymentId, logPath) {
|
|
|
2183
2123
|
* Three cases:
|
|
2184
2124
|
* 1. `PlatformApiError` with 409 + a JSON body carrying `{error, deployment}`
|
|
2185
2125
|
* — surface the server-supplied error and prefer the body's deployment id.
|
|
2186
|
-
* 2. Any other `PlatformApiError` —
|
|
2187
|
-
*
|
|
2126
|
+
* 2. Any other `PlatformApiError` — retain the client's actionable message and
|
|
2127
|
+
* structured error fields; opaque provider failures use a trimmed body snippet.
|
|
2188
2128
|
* 3. Anything else — preserve the original message under a `Connection lost
|
|
2189
2129
|
* during deploy: <original>` prefix so the caller can still tell network,
|
|
2190
2130
|
* parse, and transport errors apart.
|
|
@@ -2192,13 +2132,19 @@ function formatConnectionLostMessage(deploymentId, logPath) {
|
|
|
2192
2132
|
function formatStreamDeployError(err, deploymentId, logPath) {
|
|
2193
2133
|
if (err instanceof PlatformApiError) {
|
|
2194
2134
|
const parsed = parsePlatformErrorBody(err.body);
|
|
2195
|
-
const parsedError = parsed
|
|
2135
|
+
const parsedError = platformErrorMessage(parsed) ?? parsed?.error ?? null;
|
|
2196
2136
|
const effectiveDeploymentId = parsed?.deployment ?? null ?? deploymentId;
|
|
2197
|
-
if (isCliOutdatedError(err) && parsed?.message)
|
|
2198
|
-
|
|
2137
|
+
if (isCliOutdatedError(err) && parsed?.message) {
|
|
2138
|
+
err.message = appendTrailingLines(err.message, effectiveDeploymentId, logPath);
|
|
2139
|
+
return err;
|
|
2140
|
+
}
|
|
2141
|
+
if (parsedError || err.status === 401 || err.status === 403 || parsed !== null) {
|
|
2142
|
+
err.message = appendTrailingLines(`deploy: ${err.message}`, effectiveDeploymentId, logPath);
|
|
2143
|
+
return err;
|
|
2144
|
+
}
|
|
2199
2145
|
const detail = parsedError ?? trimSnippet(err.body);
|
|
2200
|
-
|
|
2201
|
-
return
|
|
2146
|
+
err.message = appendTrailingLines(detail ? `deploy: Deploy failed (HTTP ${err.status}): ${detail}` : `deploy: Deploy failed (HTTP ${err.status}).`, effectiveDeploymentId, logPath);
|
|
2147
|
+
return err;
|
|
2202
2148
|
}
|
|
2203
2149
|
const original = err instanceof Error ? err.message : String(err);
|
|
2204
2150
|
return new Error(appendTrailingLines(`deploy: Connection lost during deploy: '${original}'.`, deploymentId, logPath));
|
|
@@ -2410,7 +2356,10 @@ async function requestGithubOidcToken(requestUrl, requestToken) {
|
|
|
2410
2356
|
url.searchParams.set("audience", OIDC_AUDIENCE);
|
|
2411
2357
|
let res;
|
|
2412
2358
|
try {
|
|
2413
|
-
res = await fetch(url, {
|
|
2359
|
+
res = await fetch(url, {
|
|
2360
|
+
headers: { Authorization: `Bearer ${requestToken}` },
|
|
2361
|
+
redirect: "manual"
|
|
2362
|
+
});
|
|
2414
2363
|
} catch (err) {
|
|
2415
2364
|
throw new Error(`github-oidc: Failed to reach the GitHub OIDC token endpoint: ${errText(err)}`);
|
|
2416
2365
|
}
|
|
@@ -2443,7 +2392,8 @@ async function exchangeOidcTokenAtApi(apiUrl, project, oidcToken) {
|
|
|
2443
2392
|
body: JSON.stringify({
|
|
2444
2393
|
oidcToken,
|
|
2445
2394
|
project
|
|
2446
|
-
})
|
|
2395
|
+
}),
|
|
2396
|
+
redirect: "manual"
|
|
2447
2397
|
});
|
|
2448
2398
|
} catch (err) {
|
|
2449
2399
|
throw new Error(`github-oidc: Failed to reach ${url}: ${errText(err)}`);
|
|
@@ -3114,6 +3064,7 @@ function toWebSocketManifest(routes) {
|
|
|
3114
3064
|
}
|
|
3115
3065
|
function toSandboxManifest(sandbox) {
|
|
3116
3066
|
return {
|
|
3067
|
+
controllerProtocol: 1,
|
|
3117
3068
|
bindingName: sandbox.binding,
|
|
3118
3069
|
className: sandbox.className,
|
|
3119
3070
|
containerName: sandbox.containerName,
|
|
@@ -3169,6 +3120,7 @@ function buildVoidManifest(opts) {
|
|
|
3169
3120
|
assetManifestVersion: 2,
|
|
3170
3121
|
bindings: {}
|
|
3171
3122
|
};
|
|
3123
|
+
if (opts.hasEmailHandlers) manifest.emailProtocolVersion = 1;
|
|
3172
3124
|
if (bindings.needsAuth) manifest.auth = true;
|
|
3173
3125
|
const hasMigrations = migrations && migrations.length > 0;
|
|
3174
3126
|
if (bindings.needsD1 || bindings.needsAuth || hasMigrations) {
|
|
@@ -3899,7 +3851,7 @@ let loadedProvisionModule;
|
|
|
3899
3851
|
* so a managed deploy never imports it — and thus never loads `proper-lockfile`.
|
|
3900
3852
|
*/
|
|
3901
3853
|
async function loadProvisionModule() {
|
|
3902
|
-
loadedProvisionModule ??= await import("./provision-
|
|
3854
|
+
loadedProvisionModule ??= await import("./provision-CSJOjjQk.mjs").then((n) => n.a);
|
|
3903
3855
|
return loadedProvisionModule;
|
|
3904
3856
|
}
|
|
3905
3857
|
/**
|
|
@@ -5809,14 +5761,27 @@ async function runWranglerAuthToken(runWrangler, configPath) {
|
|
|
5809
5761
|
return (type === "oauth" || type === "api_token") && typeof token === "string" && token.length > 0 ? token : null;
|
|
5810
5762
|
}
|
|
5811
5763
|
/**
|
|
5764
|
+
* Immediately after setup, the local resolver can retain ENODATA while Cloudflare's public DNS
|
|
5765
|
+
* already serves the new subdomain MX. When the committed config is exactly setup's plan and
|
|
5766
|
+
* every other inbound prerequisite is still ready, DNS is ambiguous: deleting `addresses`
|
|
5767
|
+
* destroys the handoff, while deploying it could fail after upload if routing is genuinely off.
|
|
5768
|
+
*/
|
|
5769
|
+
function isCommittedSubdomainPlanWaitingForDns(pre, rootConfig) {
|
|
5770
|
+
if (pre.mode !== "subdomain" || pre.domainMx.state !== "empty" && pre.domainMx.state !== "unknown" || pre.routing.enabled !== true || pre.subaddressing.state !== "on" || pre.binding.state !== "present" || pre.sender.state !== "ready" || pre.addressesOwnership.state !== "mine" || pre.addressesStale || pre.rules.state === "unknown" || pre.rules.foreign.length > 0 || !Array.isArray(rootConfig.addresses) || rootConfig.addresses.length === 0) return false;
|
|
5771
|
+
const allBlockers = pre.blockers.filter((blocker) => blocker.scope === "all");
|
|
5772
|
+
if (pre.domainMx.state === "empty") return allBlockers.length === 0;
|
|
5773
|
+
return allBlockers.length === 1;
|
|
5774
|
+
}
|
|
5775
|
+
/**
|
|
5812
5776
|
* Step 3b-ii — Mode B email on the developer's own account (design doc 0078, "One keystroke").
|
|
5813
5777
|
* Preflight is read-only; the checklist is shown; ONE `confirm` (default Yes) authorizes the
|
|
5814
5778
|
* apply, which runs only the rows not ready and returns the root-config patch this writes.
|
|
5815
|
-
*
|
|
5816
|
-
*
|
|
5817
|
-
*
|
|
5818
|
-
*
|
|
5819
|
-
* module borrows it through `getSessionBearer` inside its
|
|
5779
|
+
* Most branches that cannot finish return `satisfied: false`, leaving `--require-email` to
|
|
5780
|
+
* decide whether deployment continues. One ambiguous handoff fails closed for every deploy:
|
|
5781
|
+
* an exact committed subdomain plan whose new MX is still empty or unreadable. It is preserved,
|
|
5782
|
+
* and the caller stops before build/upload until DNS can be verified. No output of this step
|
|
5783
|
+
* ever contains the session bearer: the module borrows it through `getSessionBearer` inside its
|
|
5784
|
+
* own closures and drops it.
|
|
5820
5785
|
*/
|
|
5821
5786
|
async function runCloudflareEmailStep(input) {
|
|
5822
5787
|
const without = {
|
|
@@ -5905,6 +5870,19 @@ async function runCloudflareEmailStep(input) {
|
|
|
5905
5870
|
};
|
|
5906
5871
|
}
|
|
5907
5872
|
log.message(renderEmailChecklist(pre));
|
|
5873
|
+
if (isCommittedSubdomainPlanWaitingForDns(pre, rootConfig)) {
|
|
5874
|
+
const dnsState = pre.domainMx.state === "empty" ? "this resolver sees no MX records yet" : "the MX lookup failed";
|
|
5875
|
+
log.error([
|
|
5876
|
+
`deploy: cannot verify Email Routing on ${pre.domain} because ${dnsState}.`,
|
|
5877
|
+
`The existing addresses plan in ${configName} is preserved. DNS may still be propagating after \`void email setup\`; run \`void email status --platform cloudflare\` and retry the deploy when this resolver sees Cloudflare's MX records.`,
|
|
5878
|
+
"Nothing was built or uploaded."
|
|
5879
|
+
].join("\n"));
|
|
5880
|
+
return {
|
|
5881
|
+
...without,
|
|
5882
|
+
abortDeploy: true,
|
|
5883
|
+
map: mapFor(existingAddresses(rootConfig, pre), pre.sending.state === "ready")
|
|
5884
|
+
};
|
|
5885
|
+
}
|
|
5908
5886
|
const shipsBinding = pre.binding.state === "present";
|
|
5909
5887
|
const leaveAccount = (reason) => {
|
|
5910
5888
|
let configWritten = false;
|
|
@@ -6159,6 +6137,7 @@ async function runCloudflareDeploy(root, options, cliLog, deps = {}) {
|
|
|
6159
6137
|
fetchImpl: deps.emailFetch ?? fetch,
|
|
6160
6138
|
dns: deps.emailDns ?? await createNodeEmailDns()
|
|
6161
6139
|
});
|
|
6140
|
+
if (email.abortDeploy) return exit(1);
|
|
6162
6141
|
if (options.requireEmail && !email.satisfied) {
|
|
6163
6142
|
log.error(["deploy: --require-email — email is not fully set up for this deploy (see above); refusing to deploy.", "Nothing was built or uploaded. Set email up, or drop --require-email."].join("\n"));
|
|
6164
6143
|
return exit(1);
|
|
@@ -6711,8 +6690,18 @@ async function runCloudflareDeploy(root, options, cliLog, deps = {}) {
|
|
|
6711
6690
|
const queueConsumerCleanup = readWranglerManagedQueueCleanupCandidates(configPath);
|
|
6712
6691
|
if (existingWorker) assertCloudflareLinkUnchanged(root, pinnedHandoffLink);
|
|
6713
6692
|
const candidateReceipt = pinnedHandoffLink?.candidateReceipt;
|
|
6714
|
-
const
|
|
6693
|
+
const activationRunner = preBuildRootConfig.compliance_region ? runWrangler : createCloudflareMetadataRunner({
|
|
6715
6694
|
runWrangler,
|
|
6695
|
+
accountId,
|
|
6696
|
+
apiBaseUrl,
|
|
6697
|
+
workerName,
|
|
6698
|
+
configPath: generatedConfigPath,
|
|
6699
|
+
fetch: deps.metadataFetch,
|
|
6700
|
+
verifyUploader: assertUploaderStillPinned,
|
|
6701
|
+
getToken: () => runWranglerAuthToken(runWrangler, generatedConfigPath)
|
|
6702
|
+
});
|
|
6703
|
+
const execution = await (deps.activateVersion ?? activateCloudflareVersion)({
|
|
6704
|
+
runWrangler: activationRunner,
|
|
6716
6705
|
verifyUploader: assertUploaderStillPinned,
|
|
6717
6706
|
workerName,
|
|
6718
6707
|
configPath: generatedConfigPath,
|
|
@@ -7103,8 +7092,18 @@ async function runCloudflareStaticDeploy(root, options, voidConfig, preset, cliL
|
|
|
7103
7092
|
const queueConsumerCleanup = readWranglerManagedQueueCleanupCandidates(configPath);
|
|
7104
7093
|
if (existingWorker) assertCloudflareLinkUnchanged(root, pinnedHandoffLink);
|
|
7105
7094
|
const candidateReceipt = pinnedHandoffLink?.candidateReceipt;
|
|
7106
|
-
const
|
|
7095
|
+
const activationRunner = rootConfig.compliance_region ? runWrangler : createCloudflareMetadataRunner({
|
|
7107
7096
|
runWrangler,
|
|
7097
|
+
accountId,
|
|
7098
|
+
apiBaseUrl,
|
|
7099
|
+
workerName,
|
|
7100
|
+
configPath: staticConfigPath,
|
|
7101
|
+
fetch: deps.metadataFetch,
|
|
7102
|
+
verifyUploader: uploaderIsPinned,
|
|
7103
|
+
getToken: () => runWranglerAuthToken(runWrangler, staticConfigPath)
|
|
7104
|
+
});
|
|
7105
|
+
const execution = await (deps.activateVersion ?? activateCloudflareVersion)({
|
|
7106
|
+
runWrangler: activationRunner,
|
|
7108
7107
|
verifyUploader: uploaderIsPinned,
|
|
7109
7108
|
configPath: staticConfigPath,
|
|
7110
7109
|
preserveTriggers: existingWorker !== null,
|
|
@@ -7270,6 +7269,7 @@ async function runManagedDeploy(root, options, cliLog) {
|
|
|
7270
7269
|
let config = null;
|
|
7271
7270
|
if (requestedProjectSlug) {
|
|
7272
7271
|
const projects = await client.listProjects();
|
|
7272
|
+
assertProjectDeployAccess(projects.find((project) => project.slug === requestedProjectSlug));
|
|
7273
7273
|
config = resolveProjectBySlug(projects, requestedProjectSlug);
|
|
7274
7274
|
if (!config) {
|
|
7275
7275
|
if (!process.stdin.isTTY) config = await createProjectFromSlug(root, client, requestedProjectSlug, cliLog);
|
|
@@ -7282,7 +7282,16 @@ async function runManagedDeploy(root, options, cliLog) {
|
|
|
7282
7282
|
config = await createProjectFromSlug(root, client, requestedProjectSlug, cliLog);
|
|
7283
7283
|
}
|
|
7284
7284
|
}
|
|
7285
|
-
} else
|
|
7285
|
+
} else {
|
|
7286
|
+
config = readProjectConfig(root);
|
|
7287
|
+
if (config) {
|
|
7288
|
+
const projects = await client.listProjects();
|
|
7289
|
+
const { projectId, slug } = config;
|
|
7290
|
+
const project = projects.find((project) => project.id === projectId);
|
|
7291
|
+
if (!project) throw new Error(`deploy: The linked project "${slug}" is unavailable or you no longer have access. Ask a project admin or owner to restore access, or choose another project with \`--project <slug>\`.`);
|
|
7292
|
+
assertProjectDeployAccess(project);
|
|
7293
|
+
}
|
|
7294
|
+
}
|
|
7286
7295
|
if (!config && !process.stdin.isTTY) {
|
|
7287
7296
|
log.error("No project specified. Set `VOID_PROJECT`, pass `--project <slug>`, or commit `.void/project.json`.");
|
|
7288
7297
|
process.exit(1);
|
|
@@ -7345,10 +7354,15 @@ async function runManagedDeploy(root, options, cliLog) {
|
|
|
7345
7354
|
throw error;
|
|
7346
7355
|
}
|
|
7347
7356
|
}
|
|
7357
|
+
function assertProjectDeployAccess(project) {
|
|
7358
|
+
if (project?.role === "reader") throw new Error(`deploy: You have reader access to "${project.slug}" and cannot deploy. Ask a project admin or owner to grant collaborator access, or choose another project with \`--project <slug>\`.`);
|
|
7359
|
+
}
|
|
7348
7360
|
async function promptDeployProjectConfig(root, client, cliLog) {
|
|
7349
7361
|
const projects = await client.listProjects();
|
|
7350
|
-
|
|
7351
|
-
|
|
7362
|
+
const deployableProjects = projects.filter((project) => project.role !== "reader");
|
|
7363
|
+
if (deployableProjects.length !== projects.length) log.warn("Projects with reader access are hidden from deploy selection. Ask a project admin or owner to grant collaborator access to deploy to them.");
|
|
7364
|
+
if (await promptProjectSetupAction("Set up a Void project for deploy:", { includeLink: deployableProjects.length > 0 }) === "create") return promptAndCreateProject(root, client);
|
|
7365
|
+
const result = await promptProjectSelection(deployableProjects, "Select a project to deploy to:", root, {
|
|
7352
7366
|
confirmExisting: true,
|
|
7353
7367
|
includeCreate: false
|
|
7354
7368
|
});
|
|
@@ -7645,7 +7659,10 @@ async function streamDirectR2Deploy(client, projectId, manifest, assetManifest,
|
|
|
7645
7659
|
await uploadAssetsToR2(items, cliLog, void 0, (item) => {
|
|
7646
7660
|
assetFiles.delete(item.path);
|
|
7647
7661
|
});
|
|
7648
|
-
} else
|
|
7662
|
+
} else {
|
|
7663
|
+
assetFiles.clear();
|
|
7664
|
+
cliLog?.info("presign_skipped", { reason: "no_needed_assets" });
|
|
7665
|
+
}
|
|
7649
7666
|
let encodedWorkerFiles;
|
|
7650
7667
|
if (workerFiles && workerFiles.size > 0) {
|
|
7651
7668
|
encodedWorkerFiles = {};
|
|
@@ -7894,7 +7911,7 @@ async function runFrameworkDeploy(root, config, client, detected, fwPreset, void
|
|
|
7894
7911
|
} catch {}
|
|
7895
7912
|
if (resources) {
|
|
7896
7913
|
if (!resources.some((resource) => resource.type === "hyperdrive")) {
|
|
7897
|
-
const { text: promptText, isCancel: isCancelPrompt } = await import("./output-
|
|
7914
|
+
const { text: promptText, isCancel: isCancelPrompt } = await import("./output-B0cfNSx5.mjs").then((n) => n.T);
|
|
7898
7915
|
const connectionString = await promptText({
|
|
7899
7916
|
message: `Your project uses ${dialect === "mysql" ? "MySQL" : "PostgreSQL"}. Enter your connection string:`,
|
|
7900
7917
|
placeholder: dialect === "mysql" ? "mysql://user:pass@host:3306/dbname" : "postgresql://user:pass@host:5432/dbname",
|
|
@@ -8140,7 +8157,7 @@ async function runFullDeploy(root, config, client, voidConfig, fwPreset, skipBui
|
|
|
8140
8157
|
} catch {}
|
|
8141
8158
|
if (resources) {
|
|
8142
8159
|
if (!resources.some((resource) => resource.type === "hyperdrive")) {
|
|
8143
|
-
const { text: promptText, isCancel: isCancelPrompt } = await import("./output-
|
|
8160
|
+
const { text: promptText, isCancel: isCancelPrompt } = await import("./output-B0cfNSx5.mjs").then((n) => n.T);
|
|
8144
8161
|
const connectionString = await promptText({
|
|
8145
8162
|
message: `Your project uses ${dialect === "mysql" ? "MySQL" : "PostgreSQL"}. Enter your connection string:`,
|
|
8146
8163
|
placeholder: dialect === "mysql" ? "mysql://user:pass@host:3306/dbname" : "postgresql://user:pass@host:5432/dbname",
|
|
@@ -8296,6 +8313,7 @@ async function runFullDeploy(root, config, client, voidConfig, fwPreset, skipBui
|
|
|
8296
8313
|
...effectiveBindings,
|
|
8297
8314
|
needsLive: true
|
|
8298
8315
|
} : effectiveBindings,
|
|
8316
|
+
hasEmailHandlers: !isFrameworkMode && routeScan.email !== void 0 && hasEmailHandlers(routeScan.email),
|
|
8299
8317
|
migrations: validatedMigrations,
|
|
8300
8318
|
schedules,
|
|
8301
8319
|
ssr: isSsr || hasRoutes || hasMiddleware || hasWebSockets || authEnabled,
|
|
@@ -1,6 +1,6 @@
|
|
|
1
|
-
import { D as log,
|
|
2
|
-
import {
|
|
3
|
-
import { n as PlatformClient } from "./client-
|
|
1
|
+
import { D as log, c as import_picocolors, k as note } from "./output-B0cfNSx5.mjs";
|
|
2
|
+
import { S as readProjectConfig, l as getToken, x as readDeploymentPlatform } from "./auth-DPl6kck4.mjs";
|
|
3
|
+
import { n as PlatformClient } from "./client-BQBrZoCX.mjs";
|
|
4
4
|
//#region src/cli/domain.ts
|
|
5
5
|
async function runDomainCommand(root, args) {
|
|
6
6
|
const platform = readDeploymentPlatform(root);
|
|
@@ -38,7 +38,7 @@ async function runDomainCommand(root, args) {
|
|
|
38
38
|
}
|
|
39
39
|
async function runCloudflareDomainCommand(root, args) {
|
|
40
40
|
if (args.projectSlug) throw new Error("domain: --project selects a Void platform project and is not used for direct Cloudflare apps.");
|
|
41
|
-
const { changeCloudflareDomain, listCloudflareDomains } = await import("./cloudflare-operations-
|
|
41
|
+
const { changeCloudflareDomain, listCloudflareDomains } = await import("./cloudflare-operations-BzWnlC1_.mjs").then((n) => n.t);
|
|
42
42
|
if (args.subcommand === "add") {
|
|
43
43
|
const result = await changeCloudflareDomain(root, args.hostname, "add");
|
|
44
44
|
log.success(result.modified ? `Domain ${args.hostname} added and activated on Cloudflare.` : `Domain ${args.hostname} is already configured.`);
|