void 1.5.0 → 1.6.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/{account-cmd-ChVKPZ-w.mjs → account-cmd-DRhmCWcm.mjs} +3 -3
- package/dist/{application-analysis-2vGZrKzg.mjs → application-analysis-HRFsZOv3.mjs} +3 -3
- package/dist/{application-routing-DnUQoOJD.mjs → application-routing-P4TggvWp.mjs} +1 -1
- package/dist/{auth-link-D4uMdOsw.mjs → auth-link-CVXP1G6G.mjs} +3 -3
- package/dist/{auth-router-62dna450.mjs → auth-router-D1pGdbvB.mjs} +2 -2
- package/dist/{better-auth-shared-CiclgPde.mjs → better-auth-shared-C958aM7W.mjs} +28 -3
- package/dist/{build-cmd-D93K_4Sa.mjs → build-cmd-DmjbuT6d.mjs} +1 -1
- package/dist/{cache-CiIzEED4.mjs → cache-2khBO1MR.mjs} +1 -1
- package/dist/{cancel-deploy-BNoGfn2e.mjs → cancel-deploy-_itbbvY3.mjs} +1 -1
- package/dist/cli/cli.mjs +27 -27
- package/dist/client-CEtr5UOR.mjs +1 -0
- package/dist/{client-Qayy9xEh.mjs → client-CoxPEhJq.mjs} +6 -2
- package/dist/{cloudflare-cmd-DiFGaLow.mjs → cloudflare-cmd-fZ6AMSWk.mjs} +1 -1
- package/dist/{cloudflare-config-Chet188_.mjs → cloudflare-config-eQunqX6A.mjs} +1 -1
- package/dist/{cloudflare-connect-BdgAQBc7.mjs → cloudflare-connect-9OZe4XVQ.mjs} +1 -1
- package/dist/{cloudflare-operations-CWA24vCh.mjs → cloudflare-operations-CrskD4_O.mjs} +4 -4
- package/dist/{cloudflare-operations-D8MoezuN.mjs → cloudflare-operations-oLvAd9Nd.mjs} +1 -1
- package/dist/{config-Bt4rw93x.mjs → config-BBlVXZCU.mjs} +1 -1
- package/dist/{config-DkA9jYF2.mjs → config-BITKQ3O6.mjs} +2 -1
- package/dist/{config-BszFVhpk.mjs → config-BgysUhnm.mjs} +1 -1
- package/dist/{config-CzsNzGVH.d.mts → config-CPxJmt4M.d.mts} +2 -0
- package/dist/config-entry.d.mts +1 -1
- package/dist/{connect-b9mJbb6X.mjs → connect-CKvmkl2R.mjs} +4 -4
- package/dist/{create-project-rnjum4_V.mjs → create-project-BiMmR5wA.mjs} +1 -1
- package/dist/{create-project-eomwm0wa.mjs → create-project-Bq0M8MtO.mjs} +1 -1
- package/dist/{db-UPWmiSk1.mjs → db-cq5RW4Vy.mjs} +17 -17
- package/dist/{delete-BeeYi1WO.mjs → delete-CY4L8fi2.mjs} +1 -1
- package/dist/deploy-B029oHlE.mjs +2 -0
- package/dist/{deploy-CwmCcTlq.mjs → deploy-D_gEojD2.mjs} +79 -42
- package/dist/{deploy-managed-static-gPDxyp3v.mjs → deploy-managed-static-BHVbB_-A.mjs} +11 -11
- package/dist/{deploy-transport-L6zzPE9T.mjs → deploy-transport-DEyOUfac.mjs} +2 -2
- package/dist/deploy.mjs +5 -4
- package/dist/{dev-inbox-CwH5VuZj.mjs → dev-inbox-CUUS6iUg.mjs} +1 -1
- package/dist/{dispatch-CiJ1Xrba.mjs → dispatch-BNLB5_Gm.mjs} +1 -1
- package/dist/{domain-3xdH9p2L.mjs → domain-BlH90Ods.mjs} +2 -2
- package/dist/{email-Du3YRnM5.mjs → email-Bkq8ZL1p.mjs} +6 -6
- package/dist/{email-cloudflare-CtD8qE13.mjs → email-cloudflare-MvJIxrwx.mjs} +5 -107
- package/dist/{env-Cnvp0pGy.mjs → env-AvuCSeCH.mjs} +2 -2
- package/dist/{gen-BvVmpZ5f.mjs → gen-BD-dfjxY.mjs} +3 -3
- package/dist/gen-CIHXh9I8.mjs +1 -0
- package/dist/{github-cmd-X2GKiLi-.mjs → github-cmd-CA-lBdkn.mjs} +1 -1
- package/dist/{handler-Drm_lyrV.d.mts → handler-BR6Tvjkp.d.mts} +8 -3
- package/dist/{handler-xmzz0U38.mjs → handler-CKeTtYID.mjs} +2 -12
- package/dist/headers-CuTEdP9C.mjs +445 -0
- package/dist/{help-EWDNxST-.mjs → help-1OCFDsRr.mjs} +9 -1
- package/dist/help-Ba8Dq5-r.mjs +1 -0
- package/dist/{inbound-DSKSHDUj.d.mts → inbound-BHt4dIlL.d.mts} +16 -5
- package/dist/{inbound-DQfekMtz.mjs → inbound-CdO-qY0w.mjs} +2 -76
- package/dist/index.d.mts +1 -1
- package/dist/index.mjs +65 -37
- package/dist/{info-jW8_d3VI.mjs → info-CJxua_db.mjs} +4 -4
- package/dist/{init-jDQ5G9QC.mjs → init-B-4CluYx.mjs} +12 -11
- package/dist/{isr-config-DhBkzCdY.mjs → isr-config-Czzb4mIq.mjs} +1 -47
- package/dist/{link-DOyxX5Xs.mjs → link-DAXOT-G_.mjs} +2 -2
- package/dist/{list-C9pTYDtl.mjs → list-BYSOo9fm.mjs} +2 -2
- package/dist/{live-CDBHyYiR.d.mts → live-0xrcVpyq.d.mts} +1 -1
- package/dist/{local-d1-CKfek6Z4.mjs → local-d1-BLgsNUj9.mjs} +1 -1
- package/dist/login-BpbYeu-n.mjs +1 -0
- package/dist/{login-koQbjzPd.mjs → login-CJopTWX4.mjs} +2 -2
- package/dist/{logs-cTU5TsRW.mjs → logs-DE0weBsR.mjs} +13 -11
- package/dist/{migrate-C62pGTfr.mjs → migrate-ChHHZBTi.mjs} +3 -3
- package/dist/migrate-HdA6Kh2p.mjs +1 -0
- package/dist/{mime-DKkO7ZtA.mjs → mime-CtP6-qAF.mjs} +143 -15
- package/dist/nitro.mjs +3 -3
- package/dist/{node-BfAt2rz8.mjs → node-CZ6lGNLn.mjs} +1 -1
- package/dist/{operator-cmd-CnAvSqJ5.mjs → operator-cmd-BUqsdk2K.mjs} +28 -10
- package/dist/operator-cmd-wBYyp8iQ.mjs +1 -0
- package/dist/pages/client.d.mts +143 -11
- package/dist/pages/client.mjs +173 -12
- package/dist/pages/index.d.mts +22 -3
- package/dist/pages/index.mjs +18 -4
- package/dist/pages/islands-plugin.d.mts +46 -2
- package/dist/pages/islands-plugin.mjs +91 -5
- package/dist/pages/prefetch.d.mts +2 -2
- package/dist/pages/prefetch.mjs +1 -1
- package/dist/pages/protocol.d.mts +2 -2
- package/dist/pages/protocol.mjs +2 -2
- package/dist/platform-args-C7XUw9mw.mjs +1 -0
- package/dist/{platform-args-Bv9hoLEL.mjs → platform-args-Cx1M-7bq.mjs} +18 -4
- package/dist/{platform-auth-config-CLj0EvnB.mjs → platform-auth-config-K4m_LE8b.mjs} +4 -4
- package/dist/{platform-auth-protection-DQDSxVhr.mjs → platform-auth-protection-KF5Vo-1I.mjs} +2 -2
- package/dist/{platform-auth-recovery-DD3oLerq.mjs → platform-auth-recovery-BOdFrl7R.mjs} +2 -2
- package/dist/{platform-cmd-WnOmdLzR.mjs → platform-cmd-DpCHawGF.mjs} +1 -1
- package/dist/{platform-cmd-PLNLg-2N.mjs → platform-cmd-Ds3EAV5t.mjs} +5 -4
- package/dist/{platform-domain-Bnq0vg0q.mjs → platform-domain-rWJshybd.mjs} +2 -2
- package/dist/{platform-lifecycle-BQiN9HN5.mjs → platform-lifecycle-BH34I0rh.mjs} +1 -1
- package/dist/{platform-lifecycle-BCsFg1Tl.mjs → platform-lifecycle-D9RdGub1.mjs} +66 -31
- package/dist/{platform-management-nzCDwtiN.mjs → platform-management-BRefdHGD.mjs} +21 -3
- package/dist/{platform-management-CMJR8Zi-.mjs → platform-management-BfLW0Zlo.mjs} +1 -1
- package/dist/{platform-recovery-DBNoME3I.mjs → platform-recovery-DZuZGJtt.mjs} +2 -2
- package/dist/platform-runtime-logs-CdJGnk3f.mjs +68 -0
- package/dist/{platform-setup-VEcHu0Vq.mjs → platform-setup-Vw1AaUN8.mjs} +15 -2
- package/dist/{plugin-inference-DmwjC3y2.mjs → plugin-inference-CdLbxZL_.mjs} +1 -1
- package/dist/{prefetch-L93_1Jk7.mjs → prefetch-Dx2jIbtg.mjs} +19 -1
- package/dist/{prefetch-CG0K6JPd.d.mts → prefetch-NdNeubbH.d.mts} +7 -1
- package/dist/{prepare-pfl2LIMy.mjs → prepare-BJW-f1f1.mjs} +4 -4
- package/dist/{prepare-BPsfLWaW.mjs → prepare-BMGeKL16.mjs} +1 -1
- package/dist/prepare-BdxJJCMv.mjs +1 -0
- package/dist/{project-cmd-5Izu4Pg3.mjs → project-cmd-B_bUyZ3J.mjs} +15 -15
- package/dist/{project-team-DSUyjZFh.mjs → project-team-MjT5K4rQ.mjs} +1 -1
- package/dist/{project-token-wj09YQSB.mjs → project-token-BKHGwY3k.mjs} +1 -1
- package/dist/{project-zero-trust-BMHf2YF0.mjs → project-zero-trust-Bzdd05-h.mjs} +1 -1
- package/dist/{protocol-0-lp9ZYx.mjs → protocol-COyySMki.mjs} +130 -107
- package/dist/{protocol-xdrl-In0.d.mts → protocol-CkwjASep.d.mts} +2 -2
- package/dist/{provision-CRiNnlfE.mjs → provision-BbCzpbXs.mjs} +1 -1
- package/dist/{provision-CxHIGBIZ.mjs → provision-DQF6Kw-6.mjs} +1 -1
- package/dist/{requests-DicgB5jU.mjs → requests-daJmVpjk.mjs} +1 -1
- package/dist/{rollback-DrDZOKNE.mjs → rollback-BgL0wY1J.mjs} +2 -2
- package/dist/{route-types-irZc1txT.mjs → route-types-CZc1YXjF.mjs} +40 -4
- package/dist/route-url-C_YIH_zO.d.mts +37 -0
- package/dist/routes-stub.d.mts +6 -2
- package/dist/runtime/better-auth-mysql.mjs +1 -1
- package/dist/runtime/better-auth-pg.mjs +1 -1
- package/dist/runtime/better-auth.mjs +1 -1
- package/dist/runtime/email/testing.d.mts +1 -1
- package/dist/runtime/email/testing.mjs +3 -3
- package/dist/runtime/email.d.mts +1 -1
- package/dist/runtime/email.mjs +3 -3
- package/dist/runtime/handler.d.mts +1 -1
- package/dist/runtime/handler.mjs +2 -2
- package/dist/runtime/live-client.d.mts +1 -1
- package/dist/runtime/live.d.mts +1 -1
- package/dist/runtime/route-url.d.mts +2 -2
- package/dist/runtime/routing.d.mts +3 -3
- package/dist/runtime/routing.mjs +37 -16
- package/dist/runtime/validator.d.mts +1 -1
- package/dist/runtime/ws-server.d.mts +1 -1
- package/dist/runtime/ws.d.mts +1 -1
- package/dist/{scan-DSQtH3oS.mjs → scan-X2rDDRNa.mjs} +18 -10
- package/dist/{secret-C_QtTzJG.mjs → secret-CPq-B_vp.mjs} +2 -2
- package/dist/{static-asset-marker-NR1XS2z5.mjs → static-asset-marker-DsQKz6lt.mjs} +8 -1
- package/dist/validation-error-uAAjlsiW.mjs +82 -0
- package/dist/{version-metadata-Blf5H9BQ.mjs → version-metadata-C8hLzQkv.mjs} +1 -1
- package/dist/{wrangler-p-kLCJqF.mjs → wrangler-DESSbN8L.mjs} +2 -2
- package/dist/wrangler-DUB3MGHV.mjs +1 -0
- package/dist/{wrapper-iejSJDwL.mjs → wrapper-C9SUxoj7.mjs} +2 -2
- package/dist/{ws-DzBD-NUj.d.mts → ws-Dmjg5NH2.d.mts} +1 -1
- package/docs/guide/edge/headers.md +2 -0
- package/docs/guide/edge/rewrites.md +1 -1
- package/docs/guide/email/receiving.md +1 -1
- package/docs/guide/email/sending.md +42 -12
- package/docs/guide/pages-routing/actions-and-forms.md +21 -1
- package/docs/guide/pages-routing/islands.md +3 -3
- package/docs/guide/pages-routing/layouts.md +16 -2
- package/docs/guide/pages-routing/loaders.md +2 -2
- package/docs/guide/pages-routing/markdown.md +1 -1
- package/docs/guide/pages-routing/overview.md +103 -0
- package/docs/guide/platform/administration/connected-apps.md +4 -2
- package/docs/guide/platform/installation/credentials.md +6 -4
- package/docs/guide/platform/installation/maintenance.md +13 -0
- package/docs/guide/platform/installation/setup.md +22 -1
- package/docs/guide/ssg.md +3 -3
- package/docs/guide/type-safety.md +42 -1
- package/docs/integrations/frameworks/astro.md +17 -12
- package/docs/integrations/frameworks/overview.md +2 -2
- package/docs/reference/api/pages.md +101 -50
- package/docs/reference/api/rewrites.md +4 -1
- package/docs/reference/api/types.md +14 -10
- package/docs/reference/api.md +1 -1
- package/docs/reference/cli/platform-installation.md +4 -1
- package/docs/reference/cli/setup.md +1 -1
- package/docs/reference/config.md +10 -0
- package/package.json +8 -7
- package/schema.json +4 -0
- package/skills/void/SKILL.md +5 -0
- package/dist/client-DVtAKeUm.mjs +0 -1
- package/dist/deploy-CfU7CR-b.mjs +0 -2
- package/dist/gen-i61rdQgg.mjs +0 -1
- package/dist/headers-DEUBAM6W.mjs +0 -225
- package/dist/help-BcZDUcTw.mjs +0 -1
- package/dist/login-C0MiQrYs.mjs +0 -1
- package/dist/migrate-BG09-KOv.mjs +0 -1
- package/dist/operator-cmd-BhHXIL2G.mjs +0 -1
- package/dist/platform-args-C1kqYUen.mjs +0 -1
- package/dist/prepare-BJMmfq3W.mjs +0 -1
- package/dist/route-url-BGOiyKNz.d.mts +0 -24
- package/dist/validation-error-rDVbUJet.mjs +0 -47
- package/dist/wrangler-CPRX2d9A.mjs +0 -1
package/dist/index.mjs
CHANGED
|
@@ -1,26 +1,25 @@
|
|
|
1
1
|
import { n as __toESM } from "./rolldown-runtime-uD8oG6U2.mjs";
|
|
2
2
|
import { a as join, c as resolve, i as isAbsolute, n as dirname, o as normalize, s as relative, t as basename } from "./dist-DMYe8CZJ.mjs";
|
|
3
3
|
import { t as require_picocolors } from "./picocolors-D1NxSLw-.mjs";
|
|
4
|
-
import { l as inferBindingsFromSource, m as applyBindingOverrides, n as FRAMEWORK_SCAN_DIRS, t as DEFAULT_SCAN_DIRS, u as staticModuleReferences } from "./plugin-inference-
|
|
4
|
+
import { l as inferBindingsFromSource, m as applyBindingOverrides, n as FRAMEWORK_SCAN_DIRS, t as DEFAULT_SCAN_DIRS, u as staticModuleReferences } from "./plugin-inference-CdLbxZL_.mjs";
|
|
5
5
|
import { n as readProjectPaths, t as assertNoRootSourceConventionConflicts } from "./project-paths-CdGv9Tmi.mjs";
|
|
6
6
|
import { i as loadVoidAuthConfig, n as devAuthConfigImporter, o as viteAuthConfigImporter, t as AUTH_CONFIG_ENVIRONMENT } from "./config-WlvEcL82.mjs";
|
|
7
|
-
import { c as getDatabaseCasing, l as getDatabaseDialect, p as readConfig, u as isNodeTarget } from "./config-
|
|
8
|
-
import { f as invalidateSourceAnalysis, o as resolveLayoutIds, p as isRouteEnabledForEnvironment } from "./scan-
|
|
7
|
+
import { c as getDatabaseCasing, l as getDatabaseDialect, p as readConfig, u as isNodeTarget } from "./config-BITKQ3O6.mjs";
|
|
8
|
+
import { f as invalidateSourceAnalysis, o as resolveLayoutIds, p as isRouteEnabledForEnvironment } from "./scan-X2rDDRNa.mjs";
|
|
9
9
|
import { i as isMemberExpression, n as isIdentifier, r as isLiteral } from "./ast-Cv0JwXqb.mjs";
|
|
10
10
|
import { n as bindingResolver } from "./ast-bindings-BkivMJIo.mjs";
|
|
11
|
-
import { a as hasSandboxSqliteMigration, c as sandboxContainerConfig, i as assertSandboxNamespaceConfig, n as DEFAULT_SANDBOX_CLASS_NAME, p as scanJobsSync, r as SANDBOX_MIGRATION_TAG, s as resolveSandboxConfig, t as analyzeApplicationSync, u as scanQueuesSync } from "./application-analysis-
|
|
11
|
+
import { a as hasSandboxSqliteMigration, c as sandboxContainerConfig, i as assertSandboxNamespaceConfig, n as DEFAULT_SANDBOX_CLASS_NAME, p as scanJobsSync, r as SANDBOX_MIGRATION_TAG, s as resolveSandboxConfig, t as analyzeApplicationSync, u as scanQueuesSync } from "./application-analysis-HRFsZOv3.mjs";
|
|
12
12
|
import { i as voidWarn, n as voidError, r as voidLog, t as setShowTimestamp } from "./log-D9hwSySP.mjs";
|
|
13
13
|
import { t as MagicString } from "./dist-B6eN80gc.mjs";
|
|
14
14
|
import { a as validateSsrEntries, n as SSR_SERVER_ENTRY_RELATIVE_PATHS, o as validateSsrEntry, t as SSR_CLIENT_ENTRY_RELATIVE_PATHS } from "./entry-CBZsCy3O.mjs";
|
|
15
15
|
import { r as hasEmailHandlers } from "./email-BHY72ixO.mjs";
|
|
16
|
-
import { a as
|
|
17
|
-
import { n as mergeRoutingRules, t as lintRoutingPhases } from "./headers-DEUBAM6W.mjs";
|
|
16
|
+
import { a as isAssetBypassRule, d as hasDocumentRoutes, l as edgeRulesNeedWorker, n as mergeRoutingRules, o as isGeneratedAssetHeaders, p as resolveAssetRoutingPolicy, s as resolveAssetWorkerBypass, t as lintRoutingPhases, u as hasApiRoutes } from "./headers-CuTEdP9C.mjs";
|
|
18
17
|
import { t as writeFileAtomic } from "./atomic-write-DA6eD1Kp.mjs";
|
|
19
18
|
import { n as readDeploymentPlatform, r as readProjectConfig } from "./project-CLwxcEdq.mjs";
|
|
20
19
|
import { n as readGeneratedWranglerConfigFile } from "./generated-wrangler-config-CoDaaFsA.mjs";
|
|
21
|
-
import { c as stashCloudflareDeployPointer, i as materializeCloudflareConfig, l as ensureGitignoreLines, o as restoreCloudflarePreviewPointer } from "./cloudflare-config-
|
|
22
|
-
import { A as syncWranglerWebSockets, E as resolveLiveBindingConfig, O as syncWranglerBindings, T as readWranglerWebSocketTombstones, a as LIVE_MIGRATION_TAG, b as readRootWranglerConfig, d as ensureWranglerCompatibilityDate, f as ensureWranglerNodejsAlsFlag, g as normalizeWranglerCompatibilityFlags, h as nextDurableObjectMigrationTag, k as syncWranglerDurableObjects, m as hasDurableObjectSqliteMigration, p as findBindingNameOwner, u as ensureWranglerCompat, v as readExistingLiveBindingConfig, x as readWranglerCompat } from "./wrangler-
|
|
23
|
-
import { n as writeLocalD1PersistState, t as resolveLocalD1Target } from "./local-d1-
|
|
20
|
+
import { c as stashCloudflareDeployPointer, i as materializeCloudflareConfig, l as ensureGitignoreLines, o as restoreCloudflarePreviewPointer } from "./cloudflare-config-eQunqX6A.mjs";
|
|
21
|
+
import { A as syncWranglerWebSockets, E as resolveLiveBindingConfig, O as syncWranglerBindings, T as readWranglerWebSocketTombstones, a as LIVE_MIGRATION_TAG, b as readRootWranglerConfig, d as ensureWranglerCompatibilityDate, f as ensureWranglerNodejsAlsFlag, g as normalizeWranglerCompatibilityFlags, h as nextDurableObjectMigrationTag, k as syncWranglerDurableObjects, m as hasDurableObjectSqliteMigration, p as findBindingNameOwner, u as ensureWranglerCompat, v as readExistingLiveBindingConfig, x as readWranglerCompat } from "./wrangler-DESSbN8L.mjs";
|
|
22
|
+
import { n as writeLocalD1PersistState, t as resolveLocalD1Target } from "./local-d1-BLgsNUj9.mjs";
|
|
24
23
|
import { n as scopedAccessCredentials } from "./cf-access-pejlJmuy.mjs";
|
|
25
24
|
import { n as ensurePlatformProxyAccess } from "./cf-access-BmBT2h8_.mjs";
|
|
26
25
|
import { a as getApiUrl, c as getToken, o as getProxyUrl } from "./auth-Dy8svcqQ.mjs";
|
|
@@ -28,20 +27,21 @@ import { t as migrateBuiltWranglerConfig } from "./cf-config-migrate-Dy8MrKgF.mj
|
|
|
28
27
|
import { n as scanWranglerDotenvKeys } from "./dotenv-CEI8hapP.mjs";
|
|
29
28
|
import { a as findReservedEnvKeys, c as reservedEnvKeysMessage, i as findLegacyEnvFiles, l as resolveRemoteMode, o as isClientEnvKey, r as LOCAL_ENV_FILE, s as loadLocalEnv } from "./env-CuzZZyjB.mjs";
|
|
30
29
|
import { i as writeFileIfChanged, r as syncAuthTypesInProjectTsconfig } from "./project-tsconfig-Cf2NFjlM.mjs";
|
|
31
|
-
import { a as readDeployBuildQueueNames, r as cloudflareQueueName, s as drizzlePlugin, t as generateQueueResolverSource } from "./dispatch-
|
|
32
|
-
import { _ as parseCapturedMessage, a as DEV_INBOX_ENV_VAR, c as DEV_INBOX_TOKEN_ENV_VAR, f as clearDevBuffer, g as listDevMessages, l as DEV_INBOX_TOKEN_HEADER, m as findDevMessage, n as DEV_INBOX_ACK_VALUE, o as DEV_INBOX_MAX_CAPTURE_BYTES, s as DEV_INBOX_PREFIX, t as DEV_INBOX_ACK_HEADER, u as DEV_INBOX_TOKEN_QUERY, v as pushToDevBuffer } from "./dev-inbox-
|
|
30
|
+
import { a as readDeployBuildQueueNames, r as cloudflareQueueName, s as drizzlePlugin, t as generateQueueResolverSource } from "./dispatch-BNLB5_Gm.mjs";
|
|
31
|
+
import { _ as parseCapturedMessage, a as DEV_INBOX_ENV_VAR, c as DEV_INBOX_TOKEN_ENV_VAR, f as clearDevBuffer, g as listDevMessages, l as DEV_INBOX_TOKEN_HEADER, m as findDevMessage, n as DEV_INBOX_ACK_VALUE, o as DEV_INBOX_MAX_CAPTURE_BYTES, s as DEV_INBOX_PREFIX, t as DEV_INBOX_ACK_HEADER, u as DEV_INBOX_TOKEN_QUERY, v as pushToDevBuffer } from "./dev-inbox-CUUS6iUg.mjs";
|
|
33
32
|
import { n as findEnvFileForPaths, r as generateEnvTypes, t as findEnvFile } from "./env-types-DqzVBKnS.mjs";
|
|
34
33
|
import { t as loadUserEnvFile } from "./load-user-env-CSwdofj0.mjs";
|
|
35
34
|
import { n as INTERNAL_BINDING_PREFIXES, t as INTERNAL_BINDING_EXACT_NAMES } from "./env-raw-e8qgqAzQ.mjs";
|
|
36
35
|
import { t as ASSET_EXTENSIONS } from "./routing-assets-DJIVOrCh.mjs";
|
|
36
|
+
import { a as resolveDistDir, n as collectRevalidate, o as resolveWorkerDirName, r as hasRevalidate, t as collectPages } from "./isr-config-Czzb4mIq.mjs";
|
|
37
37
|
import { t as assertNoPrerenderFailures } from "./prerender-render-RlAj6hh8.mjs";
|
|
38
|
-
import { r as selectNativeVersionMetadataBinding, t as CLOUDFLARE_PRESERVE_BINDINGS_BUILD_ENV } from "./version-metadata-
|
|
39
|
-
import {
|
|
40
|
-
import { r as defer } from "./validation-error-
|
|
41
|
-
import { i as safeJsonStringify } from "./protocol-
|
|
42
|
-
import { n as completeApplicationAnalysis } from "./application-routing-
|
|
43
|
-
import { a as syncAuthTypesFile, i as removeAuthTypesIfPresent, n as generateQueueTypes, t as generateRouteTypes } from "./route-types-
|
|
44
|
-
import { a as defineMiddleware, c as defineScheduled, i as defineHead, n as basicAuth, o as defineQueue, r as defineHandler, s as defineRender, t as VoidAssetRewriteError } from "./handler-
|
|
38
|
+
import { r as selectNativeVersionMetadataBinding, t as CLOUDFLARE_PRESERVE_BINDINGS_BUILD_ENV } from "./version-metadata-C8hLzQkv.mjs";
|
|
39
|
+
import { f as prerenderPages, n as SEND_EMAIL_BINDING, p as prerenderPagesNode } from "./email-cloudflare-MvJIxrwx.mjs";
|
|
40
|
+
import { r as defer } from "./validation-error-uAAjlsiW.mjs";
|
|
41
|
+
import { i as safeJsonStringify } from "./protocol-COyySMki.mjs";
|
|
42
|
+
import { n as completeApplicationAnalysis } from "./application-routing-P4TggvWp.mjs";
|
|
43
|
+
import { a as syncAuthTypesFile, i as removeAuthTypesIfPresent, n as generateQueueTypes, t as generateRouteTypes } from "./route-types-CZc1YXjF.mjs";
|
|
44
|
+
import { a as defineMiddleware, c as defineScheduled, i as defineHead, n as basicAuth, o as defineQueue, r as defineHandler, s as defineRender, t as VoidAssetRewriteError } from "./handler-CKeTtYID.mjs";
|
|
45
45
|
import module, { builtinModules, createRequire } from "node:module";
|
|
46
46
|
import { chmodSync, closeSync, cpSync, existsSync, mkdirSync, mkdtempSync, openSync, readFileSync, realpathSync, rmSync, statSync, writeFileSync, writeSync } from "node:fs";
|
|
47
47
|
import { createRunnableDevEnvironment, defaultServerConditions, isRunnableDevEnvironment, loadEnv, normalizePath, parseSync, resolveEnvPrefix } from "vite";
|
|
@@ -494,7 +494,7 @@ function readVoidDevCredentials(root) {
|
|
|
494
494
|
*/
|
|
495
495
|
async function runAiSetupPrompt(root, token, apiUrl, server) {
|
|
496
496
|
const { select, text, isCancel, log } = await import("./dist-eV_Ep60B.mjs");
|
|
497
|
-
const { PlatformClient } = await import("./client-
|
|
497
|
+
const { PlatformClient } = await import("./client-CEtr5UOR.mjs");
|
|
498
498
|
const { attachSelectedPlatform, writeProjectConfig } = await import("./project-DVsTAWFh.mjs");
|
|
499
499
|
const { inferDefaultSlug } = await import("./resolve-project-CgfjtOwz.mjs");
|
|
500
500
|
const { printSuccess } = await import("./output-E6gecbbV.mjs");
|
|
@@ -524,7 +524,7 @@ async function runAiSetupPrompt(root, token, apiUrl, server) {
|
|
|
524
524
|
let slug;
|
|
525
525
|
if (result === "__create__") {
|
|
526
526
|
const { validateProjectSlug } = await import("./project-slug-BUy0lmyR.mjs");
|
|
527
|
-
const { createProjectWithSlugRetry } = await import("./create-project-
|
|
527
|
+
const { createProjectWithSlugRetry } = await import("./create-project-BiMmR5wA.mjs");
|
|
528
528
|
let created;
|
|
529
529
|
try {
|
|
530
530
|
created = await createProjectWithSlugRetry(client, inferDefaultSlug(root), async (defaultSlug) => {
|
|
@@ -724,6 +724,25 @@ function toNativeCloudflareConfig(raw, root) {
|
|
|
724
724
|
worker: config.worker
|
|
725
725
|
};
|
|
726
726
|
}
|
|
727
|
+
/**
|
|
728
|
+
* Give Container Durable Objects a regular binding in the dev server. Their unsafe
|
|
729
|
+
* binding from `migrateBuiltWranglerConfig()` exists only for the Worker upload, and
|
|
730
|
+
* Miniflare skips unsafe bindings without a dev plugin. Match only that generated form:
|
|
731
|
+
* any other unsafe binding comes from the user's config and may name another Worker,
|
|
732
|
+
* even one with a class of the same name, so it stays as written.
|
|
733
|
+
*/
|
|
734
|
+
function restoreLocalContainerBindings(worker) {
|
|
735
|
+
for (const [name, binding] of Object.entries(worker.env ?? {})) {
|
|
736
|
+
if (binding.type !== "unsafe:durable_object_namespace" || Object.keys(binding).some((key) => !["type", "class_name"].includes(key))) continue;
|
|
737
|
+
const className = binding.class_name;
|
|
738
|
+
const declaration = worker.exports?.[className];
|
|
739
|
+
if (declaration && "container" in declaration) worker.env[name] = {
|
|
740
|
+
type: "durable-object",
|
|
741
|
+
worker: worker.name,
|
|
742
|
+
exportName: className
|
|
743
|
+
};
|
|
744
|
+
}
|
|
745
|
+
}
|
|
727
746
|
function nativeAuxiliaryWorkers(workers, root) {
|
|
728
747
|
return workers?.map(({ configPath, config, ...options }) => ({
|
|
729
748
|
...options,
|
|
@@ -828,7 +847,7 @@ function cloudflare$1(options) {
|
|
|
828
847
|
if (environment.command === "build" && native.containers.length > 0) {
|
|
829
848
|
pluginNative.containers = [];
|
|
830
849
|
for (const declaration of Object.values(pluginNative.worker?.exports ?? {})) if ("container" in declaration) delete declaration.container;
|
|
831
|
-
}
|
|
850
|
+
} else if (environment.command === "serve") restoreLocalContainerBindings(pluginNative.worker);
|
|
832
851
|
}
|
|
833
852
|
};
|
|
834
853
|
const directories = {
|
|
@@ -2476,17 +2495,20 @@ function compileRouteTable(scan, routesDir, middlewareDir, jobsDir, queuesDir, s
|
|
|
2476
2495
|
const emitEdgeRules = !managedDispatch;
|
|
2477
2496
|
const fallbackRulesJson = JSON.stringify(emitEdgeRules && options.fallbackRules?.length ? options.dev ? options.fallbackRules : stripOriginForProd(options.fallbackRules) : void 0);
|
|
2478
2497
|
if (emitEdgeRules && options.redirectRules?.length) compileRoutingRulesMiddleware(lines, options.redirectRules, options.dev === true);
|
|
2479
|
-
if (emitEdgeRules && options.headerRules?.length) compileHeaderMiddleware(lines, options.headerRules);
|
|
2480
2498
|
if (pages && scan.pages.pages.some((page) => page.methods.includes("actions"))) {
|
|
2481
2499
|
lines.push(`import { matchedRoutes as __matchedRoutes } from ${JSON.stringify(options.honoRoutePath)};`);
|
|
2482
2500
|
lines.push("app.use(__createNamedActionMarker(__matchedRoutes));");
|
|
2483
2501
|
}
|
|
2502
|
+
const headerRules = emitEdgeRules ? options.headerRules : void 0;
|
|
2503
|
+
if (headerRules?.length) lines.push(`const __headerRules = ${JSON.stringify(headerRules)};`);
|
|
2484
2504
|
if (auth) {
|
|
2505
|
+
if (headerRules?.length) lines.push("app.use(\"*\", __routingRuntime.headerMiddleware(__headerRules, \"auth-error\"));");
|
|
2485
2506
|
lines.push("app.use(async (c, next) => {");
|
|
2486
2507
|
lines.push(" return runVoidAuthMiddleware(c, next, __voidAuthOptions, __voidAuthDatabase);");
|
|
2487
2508
|
lines.push("});");
|
|
2488
2509
|
lines.push("");
|
|
2489
2510
|
}
|
|
2511
|
+
if (headerRules?.length) lines.push("app.use(\"*\", __routingRuntime.headerMiddleware(__headerRules));");
|
|
2490
2512
|
for (let i = 0; i < scan.middleware.length; i++) lines.push(`app.use(middleware${i});`);
|
|
2491
2513
|
if (scan.middleware.length > 0) lines.push("");
|
|
2492
2514
|
for (let i = 0; i < webSockets.length; i++) {
|
|
@@ -3174,11 +3196,6 @@ function compileRoutingRulesMiddleware(lines, rules, dev) {
|
|
|
3174
3196
|
lines.push(`const __routingRules = ${JSON.stringify(dev ? rules : stripOriginForProd(rules))};`);
|
|
3175
3197
|
lines.push("app.use(\"*\", __routingRuntime.routingMiddleware(__routingRules));");
|
|
3176
3198
|
}
|
|
3177
|
-
function compileHeaderMiddleware(lines, rules) {
|
|
3178
|
-
lines.push("// Header rules (applied to responses)");
|
|
3179
|
-
lines.push(`const __headerRules = ${JSON.stringify(rules)};`);
|
|
3180
|
-
lines.push("app.use(\"*\", __routingRuntime.headerMiddleware(__headerRules));");
|
|
3181
|
-
}
|
|
3182
3199
|
/** Generate the server-side fetch client, which calls `app.fetch()` with the current request's credentials. */
|
|
3183
3200
|
function compileWorkerClient(authClientPath, nodeTarget = false) {
|
|
3184
3201
|
const envImport = nodeTarget ? "" : "import { env } from \"cloudflare:workers\";\n";
|
|
@@ -3557,7 +3574,7 @@ function migrationPlugin(root, dialect, databaseId = "local", persistRoot = join
|
|
|
3557
3574
|
const hasSqlMigrations = existsSync(migrationsDir);
|
|
3558
3575
|
if (!hasSqlMigrations && !auth?.enabled) return;
|
|
3559
3576
|
const migrateAuth = async (databaseUrl) => {
|
|
3560
|
-
const { runLocalVoidAuthMigrations } = await import("./node-
|
|
3577
|
+
const { runLocalVoidAuthMigrations } = await import("./node-CZ6lGNLn.mjs");
|
|
3561
3578
|
await runLocalVoidAuthMigrations(root, dialect, persistRoot, databaseId, auth?.configPath, databaseUrl, devAuthConfigImporter(server));
|
|
3562
3579
|
};
|
|
3563
3580
|
const mysqlAuth = dialect === "mysql" && auth?.enabled === true;
|
|
@@ -4481,6 +4498,7 @@ function routingPlugin(root, options) {
|
|
|
4481
4498
|
let previewing = false;
|
|
4482
4499
|
let ssr = null;
|
|
4483
4500
|
let authConfigPath = null;
|
|
4501
|
+
let output;
|
|
4484
4502
|
const routeInputsKey = () => JSON.stringify([
|
|
4485
4503
|
scan,
|
|
4486
4504
|
authConfigPath,
|
|
@@ -4523,7 +4541,7 @@ function routingPlugin(root, options) {
|
|
|
4523
4541
|
}
|
|
4524
4542
|
function writeRouteTypes() {
|
|
4525
4543
|
if (!scan) return;
|
|
4526
|
-
const { dts } = generateRouteTypes(scan, routesDir, outDir, pagesDir);
|
|
4544
|
+
const { dts } = generateRouteTypes(scan, routesDir, outDir, pagesDir, { typedRoutes: options.routing?.typedRoutes });
|
|
4527
4545
|
writeFileIfChanged(join(outDir, "routes.d.ts"), dts);
|
|
4528
4546
|
}
|
|
4529
4547
|
function writeQueueTypes() {
|
|
@@ -4537,6 +4555,7 @@ function routingPlugin(root, options) {
|
|
|
4537
4555
|
const entries = validateSsrEntries(root, paths);
|
|
4538
4556
|
scan = nextScan;
|
|
4539
4557
|
authConfigPath = analysis.authConfigPath;
|
|
4558
|
+
output = analysis.config.output;
|
|
4540
4559
|
ssr = entries ? {
|
|
4541
4560
|
serverEntryPath: entries.server.absolutePath,
|
|
4542
4561
|
clientEntryRelativePath: entries.client.relativePath
|
|
@@ -4753,33 +4772,39 @@ function routingPlugin(root, options) {
|
|
|
4753
4772
|
}
|
|
4754
4773
|
const assets = wrangler?.assets;
|
|
4755
4774
|
if (!assets || typeof assets !== "object" || typeof assets.directory !== "string" || resolve(dirname(wranglerPath), assets.directory) !== clientDir) return null;
|
|
4775
|
+
const { pages } = scan.pages;
|
|
4776
|
+
const workerBuildRule = pages.length > 0 || isAssetBypassRule(assets.run_worker_first, assetsDir) ? ["/**"] : assets.run_worker_first;
|
|
4777
|
+
const routePatterns = [...scan.routes, ...scan.websockets ?? []].map((route) => route.pattern);
|
|
4778
|
+
const needsWorker = (page) => page.serverPath !== null || !page.shouldPrerender || page.params.length > 0 || page.catchAll;
|
|
4756
4779
|
const revalidate = options.routing?.revalidate;
|
|
4757
4780
|
const facts = {
|
|
4758
|
-
runWorkerFirst:
|
|
4781
|
+
runWorkerFirst: workerBuildRule,
|
|
4759
4782
|
notFoundHandling: assets.not_found_handling,
|
|
4760
4783
|
base: resolvedConfig.base,
|
|
4761
4784
|
hasMiddleware: scan.middleware.length > 0,
|
|
4762
4785
|
authEnabled: compileOptions.auth !== null,
|
|
4786
|
+
liveEnabled: options.live !== void 0,
|
|
4787
|
+
alwaysUseHttps: options.routing?.alwaysUseHttps === true,
|
|
4763
4788
|
headerRuleCount: compileOptions.headerRules?.length ?? 0,
|
|
4764
4789
|
redirectRuleCount: compileOptions.redirectRules?.length ?? 0,
|
|
4765
4790
|
fallbackRuleCount: compileOptions.fallbackRules?.length ?? 0,
|
|
4766
4791
|
publicEdgeFiles: publicDir !== null && (existsSync(join(publicDir, "_headers")) || existsSync(join(publicDir, "_redirects"))),
|
|
4767
4792
|
patterns: [
|
|
4768
|
-
...
|
|
4769
|
-
...
|
|
4770
|
-
...(scan.websockets ?? []).map((route) => route.pattern),
|
|
4793
|
+
...routePatterns,
|
|
4794
|
+
...pages.map((page) => page.pattern),
|
|
4771
4795
|
...(options.prerenderPaths ?? []).filter((path) => typeof path === "string"),
|
|
4772
4796
|
...revalidate && typeof revalidate === "object" ? Object.keys(revalidate) : []
|
|
4773
4797
|
],
|
|
4774
4798
|
assetsDir,
|
|
4775
|
-
immutableFiles: clientImmutableFiles
|
|
4799
|
+
immutableFiles: clientImmutableFiles,
|
|
4800
|
+
serverPatterns: output === "static" && pages.length > 0 && !ssr ? [...routePatterns, ...pages.filter(needsWorker).map((page) => page.pattern)] : void 0
|
|
4776
4801
|
};
|
|
4777
4802
|
const bypass = userHeaders ? null : resolveAssetWorkerBypass(facts);
|
|
4778
|
-
const runWorkerFirst = bypass?.runWorkerFirst ??
|
|
4803
|
+
const runWorkerFirst = bypass?.runWorkerFirst ?? workerBuildRule;
|
|
4779
4804
|
return {
|
|
4780
4805
|
headers: bypass?.headers ?? null,
|
|
4781
4806
|
wranglerPath,
|
|
4782
|
-
wranglerText: runWorkerFirst
|
|
4807
|
+
wranglerText: isDeepStrictEqual(runWorkerFirst, assets.run_worker_first) ? null : JSON.stringify({
|
|
4783
4808
|
...wrangler,
|
|
4784
4809
|
assets: {
|
|
4785
4810
|
...assets,
|
|
@@ -5819,7 +5844,10 @@ function voidPlugin(options) {
|
|
|
5819
5844
|
dir: assetRoutingPublicDir,
|
|
5820
5845
|
routing: config.routing
|
|
5821
5846
|
});
|
|
5822
|
-
if (!managedCloudflareBuild && (
|
|
5847
|
+
if (!managedCloudflareBuild && edgeRulesNeedWorker({
|
|
5848
|
+
...rules,
|
|
5849
|
+
alwaysUseHttps: config.routing?.alwaysUseHttps
|
|
5850
|
+
})) {
|
|
5823
5851
|
policy.assetConfig.run_worker_first = ["/**"];
|
|
5824
5852
|
if (rules.fallbackRules?.length && policy.assetConfig.not_found_handling === "single-page-application") {
|
|
5825
5853
|
policy.assetConfig.not_found_handling = "none";
|
|
@@ -1,8 +1,8 @@
|
|
|
1
1
|
import { a as join, s as relative } from "./dist-DMYe8CZJ.mjs";
|
|
2
|
-
import { a as deriveWebSocketClassNameFromName, o as inferWebSocketResourceName } from "./plugin-inference-
|
|
3
|
-
import { p as readConfig } from "./config-
|
|
4
|
-
import { d as deriveDurableResourceIdentity, f as inferDurableResourceName, t as analyzeApplicationSync } from "./application-analysis-
|
|
5
|
-
import { n as VOID_LOCK_FILE } from "./cloudflare-config-
|
|
2
|
+
import { a as deriveWebSocketClassNameFromName, o as inferWebSocketResourceName } from "./plugin-inference-CdLbxZL_.mjs";
|
|
3
|
+
import { p as readConfig } from "./config-BITKQ3O6.mjs";
|
|
4
|
+
import { d as deriveDurableResourceIdentity, f as inferDurableResourceName, t as analyzeApplicationSync } from "./application-analysis-HRFsZOv3.mjs";
|
|
5
|
+
import { n as VOID_LOCK_FILE } from "./cloudflare-config-eQunqX6A.mjs";
|
|
6
6
|
import { existsSync, readFileSync } from "node:fs";
|
|
7
7
|
import { isRecord } from "@void/deploy-core";
|
|
8
8
|
// src/cli/info.ts
|
|
@@ -1,28 +1,28 @@
|
|
|
1
1
|
import { a as join, c as resolve, i as isAbsolute, n as dirname, s as relative, t as basename } from "./dist-DMYe8CZJ.mjs";
|
|
2
|
-
import { r as detectFramework } from "./plugin-inference-
|
|
2
|
+
import { r as detectFramework } from "./plugin-inference-CdLbxZL_.mjs";
|
|
3
3
|
import { n as readProjectPaths, o as TYPED_CONFIG_FILE } from "./project-paths-CdGv9Tmi.mjs";
|
|
4
|
-
import { c as getDatabaseCasing, l as getDatabaseDialect, p as readConfig, s as databaseConfigValue } from "./config-
|
|
4
|
+
import { c as getDatabaseCasing, l as getDatabaseDialect, p as readConfig, s as databaseConfigValue } from "./config-BITKQ3O6.mjs";
|
|
5
5
|
import { t as MagicString } from "./dist-B6eN80gc.mjs";
|
|
6
6
|
import { c as writeDeploymentPlatform, n as readDeploymentPlatform, r as readProjectConfig, t as attachSelectedPlatform, u as writeProjectConfig } from "./project-CLwxcEdq.mjs";
|
|
7
|
-
import { i as materializeCloudflareConfig, l as ensureGitignoreLines } from "./cloudflare-config-
|
|
8
|
-
import { F as canRewriteVoidProjectConfig, L as writeVoidProjectConfig, M as writeProvisionedWranglerConfig, i as LATEST_KNOWN_COMPAT_DATE } from "./wrangler-
|
|
7
|
+
import { i as materializeCloudflareConfig, l as ensureGitignoreLines } from "./cloudflare-config-eQunqX6A.mjs";
|
|
8
|
+
import { F as canRewriteVoidProjectConfig, I as renderVoidConfig, L as writeVoidProjectConfig, M as writeProvisionedWranglerConfig, i as LATEST_KNOWN_COMPAT_DATE } from "./wrangler-DESSbN8L.mjs";
|
|
9
9
|
import { i as readPackageJson, n as hasPackageDependency } from "./package-json-DvS6IFRv.mjs";
|
|
10
10
|
import { c as getToken } from "./auth-Dy8svcqQ.mjs";
|
|
11
11
|
import { t as parseDotenvFile } from "./dotenv-CEI8hapP.mjs";
|
|
12
12
|
import { n as ensureProjectTsconfig, t as createProjectTsconfig } from "./project-tsconfig-Cf2NFjlM.mjs";
|
|
13
|
-
import { r as writeDrizzleConfig, t as PLACEHOLDER_DB_URL } from "./config-
|
|
13
|
+
import { r as writeDrizzleConfig, t as PLACEHOLDER_DB_URL } from "./config-BBlVXZCU.mjs";
|
|
14
14
|
import { A as confirm, K as select, L as log, O as cancel, X as text, tt as isCancel } from "./dist-D23AAMxT.mjs";
|
|
15
15
|
import { n as getOwnVersion, r as getPackageDir, t as detectAgents } from "./agents-DRo8gzni.mjs";
|
|
16
|
-
import { r as PlatformClient } from "./client-
|
|
16
|
+
import { r as PlatformClient } from "./client-CoxPEhJq.mjs";
|
|
17
17
|
import { l as formatUrl, m as printSuccess, p as note } from "./output-BCdLioKP.mjs";
|
|
18
|
-
import { a as promptProjectSelection, r as promptAndCreateProject } from "./create-project-
|
|
18
|
+
import { a as promptProjectSelection, r as promptAndCreateProject } from "./create-project-Bq0M8MtO.mjs";
|
|
19
19
|
import { s as formatProjectCommand } from "./cloudflare-process-DjJ638A-.mjs";
|
|
20
20
|
import { i as hasLocalLockfile, n as drizzleKitBin, r as findInstalledYarnPnpRuntime, t as buildDrizzleKitSpawnEnv } from "./yarn-pnp-DgWbE7z5.mjs";
|
|
21
|
-
import { t as promptForLoginToken } from "./login-
|
|
22
|
-
import { i as saveDiscoveredPlatform, t as discoverPlatform } from "./platform-cmd-
|
|
23
|
-
import { t as connectCloudflare } from "./cloudflare-connect-
|
|
21
|
+
import { t as promptForLoginToken } from "./login-CJopTWX4.mjs";
|
|
22
|
+
import { i as saveDiscoveredPlatform, t as discoverPlatform } from "./platform-cmd-Ds3EAV5t.mjs";
|
|
23
|
+
import { t as connectCloudflare } from "./cloudflare-connect-9OZe4XVQ.mjs";
|
|
24
24
|
import { n as snapshotDrizzleOutputs } from "./generate-CWb8aOsm.mjs";
|
|
25
|
-
import { i as migrateFrameworkAdapterPaths, t as migrateLegacyVoidConfig } from "./migrate-
|
|
25
|
+
import { i as migrateFrameworkAdapterPaths, t as migrateLegacyVoidConfig } from "./migrate-ChHHZBTi.mjs";
|
|
26
26
|
import { createRequire } from "node:module";
|
|
27
27
|
import { existsSync, mkdirSync, readFileSync, readdirSync, writeFileSync } from "node:fs";
|
|
28
28
|
import { parseSync } from "vite";
|
|
@@ -332,6 +332,7 @@ function createPagesStarterTemplate(options) {
|
|
|
332
332
|
const config = SCAFFOLD_FRAMEWORKS[framework];
|
|
333
333
|
const assets = join(getPackageDir(), "templates", "assets");
|
|
334
334
|
const files = {
|
|
335
|
+
"void.config.ts": renderVoidConfig({ routing: { typedRoutes: true } }, "// Generated by void init."),
|
|
335
336
|
"vite.config.ts": getViteConfig(framework, config),
|
|
336
337
|
[`pages/index.${config.pageExtension}`]: getIndexPage(framework, starterMode),
|
|
337
338
|
"pages/style.css": starter_ui_default,
|
|
@@ -1,51 +1,5 @@
|
|
|
1
1
|
import { a as join } from "./dist-DMYe8CZJ.mjs";
|
|
2
2
|
import { existsSync, readdirSync } from "node:fs";
|
|
3
|
-
// src/asset-routing.ts
|
|
4
|
-
function isApiRoutePattern(pattern) {
|
|
5
|
-
return pattern === "/api" || pattern.startsWith("/api/");
|
|
6
|
-
}
|
|
7
|
-
function hasDocumentRoutes(routes) {
|
|
8
|
-
return routes.some((route) => !isApiRoutePattern(route.pattern));
|
|
9
|
-
}
|
|
10
|
-
function hasApiRoutes(routes) {
|
|
11
|
-
return routes.some((route) => isApiRoutePattern(route.pattern));
|
|
12
|
-
}
|
|
13
|
-
/**
|
|
14
|
-
* Returns true when browser document navigations must reach the worker before
|
|
15
|
-
* a static asset fallback can serve HTML.
|
|
16
|
-
*/
|
|
17
|
-
function workerOwnsHtmlRouting(inputs) {
|
|
18
|
-
return inputs.isSsr || inputs.hasPages || inputs.hasDocumentRoutes || inputs.hasMiddleware || inputs.hasWebSockets === true || inputs.liveEnabled === true;
|
|
19
|
-
}
|
|
20
|
-
function resolveAssetConfig(inputs) {
|
|
21
|
-
return resolveAssetRoutingPolicy(inputs).assetConfig;
|
|
22
|
-
}
|
|
23
|
-
const VOID_INTERNAL_WORKER_FIRST = ["/__void", "/__void/*"];
|
|
24
|
-
function resolveAssetRoutingPolicy(inputs) {
|
|
25
|
-
const workerFirst = workerOwnsHtmlRouting(inputs);
|
|
26
|
-
const apiWorkerFirst = !workerFirst && (inputs.hasApiRoutes === true || inputs.authEnabled === true);
|
|
27
|
-
const assetConfig = workerFirst ? {
|
|
28
|
-
not_found_handling: "none",
|
|
29
|
-
run_worker_first: ["/**"]
|
|
30
|
-
} : apiWorkerFirst ? {
|
|
31
|
-
not_found_handling: "single-page-application",
|
|
32
|
-
run_worker_first: [
|
|
33
|
-
"/api",
|
|
34
|
-
"/api/*",
|
|
35
|
-
...VOID_INTERNAL_WORKER_FIRST
|
|
36
|
-
]
|
|
37
|
-
} : {
|
|
38
|
-
not_found_handling: "single-page-application",
|
|
39
|
-
run_worker_first: [...VOID_INTERNAL_WORKER_FIRST]
|
|
40
|
-
};
|
|
41
|
-
if (inputs.notFound !== void 0) assetConfig.not_found_handling = inputs.notFound;
|
|
42
|
-
return {
|
|
43
|
-
assetConfig,
|
|
44
|
-
apiWorkerFirst,
|
|
45
|
-
workerFirst,
|
|
46
|
-
workerSpaFallback: workerFirst && !inputs.isSsr && !inputs.hasPages && (inputs.notFound === void 0 || inputs.notFound === "single-page-application")
|
|
47
|
-
};
|
|
48
|
-
}
|
|
49
3
|
// src/cli/build-output-dir.ts
|
|
50
4
|
/**
|
|
51
5
|
* Resolve the top-level build output directory: the first segment of a
|
|
@@ -158,4 +112,4 @@ function collectPages(pageScan, revalidateConfig, isrEnabled = true) {
|
|
|
158
112
|
};
|
|
159
113
|
});
|
|
160
114
|
}
|
|
161
|
-
export { resolveDistDir as a,
|
|
115
|
+
export { resolveDistDir as a, collectFiles as i, collectRevalidate as n, resolveWorkerDirName as o, hasRevalidate as r, collectPages as t };
|
|
@@ -1,9 +1,9 @@
|
|
|
1
1
|
import { r as readProjectConfig, t as attachSelectedPlatform, u as writeProjectConfig } from "./project-CLwxcEdq.mjs";
|
|
2
2
|
import { c as getToken, s as getSiteDomain } from "./auth-Dy8svcqQ.mjs";
|
|
3
3
|
import { H as outro, L as log, O as cancel } from "./dist-D23AAMxT.mjs";
|
|
4
|
-
import { r as PlatformClient } from "./client-
|
|
4
|
+
import { r as PlatformClient } from "./client-CoxPEhJq.mjs";
|
|
5
5
|
import { f as import_picocolors, m as printSuccess } from "./output-BCdLioKP.mjs";
|
|
6
|
-
import { a as promptProjectSelection, r as promptAndCreateProject } from "./create-project-
|
|
6
|
+
import { a as promptProjectSelection, r as promptAndCreateProject } from "./create-project-Bq0M8MtO.mjs";
|
|
7
7
|
import { a as resolveProjectBySlug } from "./resolve-project-D0YNnJfm.mjs";
|
|
8
8
|
// src/cli/link.ts
|
|
9
9
|
function projectLabel(slug, root, url) {
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
import { n as readDeploymentPlatform, r as readProjectConfig } from "./project-CLwxcEdq.mjs";
|
|
2
2
|
import { c as getToken } from "./auth-Dy8svcqQ.mjs";
|
|
3
3
|
import { H as outro, L as log } from "./dist-D23AAMxT.mjs";
|
|
4
|
-
import { r as PlatformClient } from "./client-
|
|
4
|
+
import { r as PlatformClient } from "./client-CoxPEhJq.mjs";
|
|
5
5
|
import { _ as tablePrefix, c as formatRelativeTime, f as import_picocolors, h as sanitizeTerminalText, i as dim, o as formatCount } from "./output-BCdLioKP.mjs";
|
|
6
6
|
import { a as resolveProjectBySlug } from "./resolve-project-D0YNnJfm.mjs";
|
|
7
7
|
// src/cli/list.ts
|
|
@@ -42,7 +42,7 @@ async function runListCommand(root, slug) {
|
|
|
42
42
|
}
|
|
43
43
|
async function showCloudflareDeployments(root, slug) {
|
|
44
44
|
if (slug) throw new Error("project: A project name selects a Void platform project and is not used for direct Cloudflare apps.");
|
|
45
|
-
const { readCloudflareWorkerStatus, resolveCloudflareOperationContext } = await import("./cloudflare-operations-
|
|
45
|
+
const { readCloudflareWorkerStatus, resolveCloudflareOperationContext } = await import("./cloudflare-operations-oLvAd9Nd.mjs");
|
|
46
46
|
const status = await readCloudflareWorkerStatus(resolveCloudflareOperationContext(root));
|
|
47
47
|
if (status.versions.length === 0) {
|
|
48
48
|
outro(`No deployments for ${status.workerName}.`);
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import { r as AuthUser } from "./auth-CH4PLAX1.mjs";
|
|
2
|
-
import { a as CloudEnv, r as CloudContext } from "./handler-
|
|
2
|
+
import { a as CloudEnv, r as CloudContext } from "./handler-BR6Tvjkp.mjs";
|
|
3
3
|
type MaybePromise<T> = T | Promise<T>;
|
|
4
4
|
type LiveControlRequest = {
|
|
5
5
|
connectionId: string;
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import { a as join, c as resolve, i as isAbsolute } from "./dist-DMYe8CZJ.mjs";
|
|
2
|
-
import { b as readRootWranglerConfig } from "./wrangler-
|
|
2
|
+
import { b as readRootWranglerConfig } from "./wrangler-DESSbN8L.mjs";
|
|
3
3
|
import { r as getMiniflareDatabasePath } from "./runner-5MCSimKx.mjs";
|
|
4
4
|
import { existsSync, mkdirSync, readFileSync, rmSync, writeFileSync } from "node:fs";
|
|
5
5
|
import { createHash } from "node:crypto";
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export { r as selectPlatformLoginMethod } from "./login-CJopTWX4.mjs";
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import { a as getApiUrl, c as getToken, f as removeToken, l as getTokenSource, m as savePlatformToken, p as runPlatformLogin } from "./auth-Dy8svcqQ.mjs";
|
|
2
2
|
import { H as outro, K as select, L as log, O as cancel, tt as isCancel } from "./dist-D23AAMxT.mjs";
|
|
3
|
-
import { a as isExpiredTokenError, r as PlatformClient } from "./client-
|
|
3
|
+
import { a as isExpiredTokenError, r as PlatformClient } from "./client-CoxPEhJq.mjs";
|
|
4
4
|
import { f as import_picocolors, l as formatUrl, m as printSuccess, r as createSpinner } from "./output-BCdLioKP.mjs";
|
|
5
5
|
// src/cli/login.ts
|
|
6
6
|
async function selectPlatformLoginMethod(platform, requestedId) {
|
|
@@ -30,7 +30,7 @@ async function selectPlatformLoginMethod(platform, requestedId) {
|
|
|
30
30
|
}
|
|
31
31
|
async function promptForLoginToken(root = process.cwd(), platform) {
|
|
32
32
|
const apiUrl = platform?.apiUrl ?? getApiUrl(root);
|
|
33
|
-
const { id: provider, label: providerName } = await selectPlatformLoginMethod(platform ?? await (await import("./platform-cmd-
|
|
33
|
+
const { id: provider, label: providerName } = await selectPlatformLoginMethod(platform ?? await (await import("./platform-cmd-DpCHawGF.mjs")).discoverPlatform(apiUrl));
|
|
34
34
|
const s = createSpinner();
|
|
35
35
|
s.start(`Opening browser for ${providerName} login...`);
|
|
36
36
|
try {
|
|
@@ -1,15 +1,16 @@
|
|
|
1
1
|
import { n as readDeploymentPlatform, r as readProjectConfig } from "./project-CLwxcEdq.mjs";
|
|
2
2
|
import { c as getToken } from "./auth-Dy8svcqQ.mjs";
|
|
3
3
|
import { $ as wrapTextWithPrefix, H as outro, L as log } from "./dist-D23AAMxT.mjs";
|
|
4
|
-
import { r as PlatformClient } from "./client-
|
|
4
|
+
import { r as PlatformClient } from "./client-CoxPEhJq.mjs";
|
|
5
5
|
import { a as errorStackFrames, f as import_picocolors, i as dim, o as formatCount } from "./output-BCdLioKP.mjs";
|
|
6
6
|
import { t as sanitizeTerminalLogText } from "./terminal-log-text-DNsWJREL.mjs";
|
|
7
|
+
import { t as MINIMAL_RUNTIME_LOGS_NOTE } from "./platform-runtime-logs-CdJGnk3f.mjs";
|
|
7
8
|
// src/cli/logs.ts
|
|
8
9
|
async function runLogsCommand(root, filter, range, deployment, level) {
|
|
9
10
|
console.log();
|
|
10
11
|
const platform = readDeploymentPlatform(root);
|
|
11
12
|
if (platform === "cloudflare") {
|
|
12
|
-
const { resolveCloudflareOperationContext, tailCloudflareWorker } = await import("./cloudflare-operations-
|
|
13
|
+
const { resolveCloudflareOperationContext, tailCloudflareWorker } = await import("./cloudflare-operations-oLvAd9Nd.mjs");
|
|
13
14
|
if (range !== "1h") log.warn("Cloudflare tail streams live logs; --range does not select historical entries.");
|
|
14
15
|
if (level && level !== "all" && level !== "error") log.warn("Cloudflare tail cannot filter individual console levels; showing all invocation logs.");
|
|
15
16
|
await tailCloudflareWorker(resolveCloudflareOperationContext(root), {
|
|
@@ -35,36 +36,37 @@ async function runLogsCommand(root, filter, range, deployment, level) {
|
|
|
35
36
|
process.exit(1);
|
|
36
37
|
}
|
|
37
38
|
const client = new PlatformClient(token, { root });
|
|
38
|
-
let
|
|
39
|
+
let result;
|
|
39
40
|
try {
|
|
40
|
-
|
|
41
|
+
result = await client.getLogs(linked.projectId, range, 200, deployment || void 0, level || void 0);
|
|
41
42
|
} catch (err) {
|
|
42
43
|
log.error(err instanceof Error ? err.message : String(err));
|
|
43
44
|
process.exit(1);
|
|
44
45
|
}
|
|
45
|
-
entries = filterLogEntries(entries, level, filter);
|
|
46
|
+
const entries = filterLogEntries(result.entries, level, filter);
|
|
47
|
+
if (result.runtimeLogs === "minimal") console.log(dim(MINIMAL_RUNTIME_LOGS_NOTE));
|
|
46
48
|
if (entries.length === 0) {
|
|
47
49
|
outro(`No logs found in the last ${range}.`);
|
|
48
50
|
return;
|
|
49
51
|
}
|
|
50
|
-
for (const entry of entries) printEntry(entry);
|
|
52
|
+
for (const entry of entries) printEntry(entry, result.runtimeLogs === "minimal");
|
|
51
53
|
outro(dim(formatCount(entries.length, "log entry", "log entries")));
|
|
52
54
|
}
|
|
53
|
-
function printEntry(entry) {
|
|
55
|
+
function printEntry(entry, minimal) {
|
|
54
56
|
const time = formatTime(entry.timestamp);
|
|
55
57
|
const method = sanitizeTerminalLogText(entry.method || "-");
|
|
56
|
-
const url = sanitizeTerminalLogText(entry.url || "-");
|
|
58
|
+
const url = minimal ? "" : sanitizeTerminalLogText(entry.url || "-");
|
|
57
59
|
const status = sanitizeTerminalLogText(entry.status || "-");
|
|
58
60
|
const statusNum = parseInt(status, 10);
|
|
59
61
|
const coloredStatus = entry.outcome === "exception" || statusNum >= 500 ? import_picocolors.default.red(status) : statusNum >= 400 ? import_picocolors.default.yellow(status) : status;
|
|
60
|
-
console.log(wrapTextWithPrefix(process.stdout, `${method} ${url} ${coloredStatus}`, " ".repeat(time.length + 1), `${dim(time)} `));
|
|
62
|
+
console.log(wrapTextWithPrefix(process.stdout, url ? `${method} ${url} ${coloredStatus}` : `${method} ${coloredStatus}`, " ".repeat(time.length + 1), `${dim(time)} `));
|
|
61
63
|
for (const l of entry.logs) {
|
|
62
64
|
const text = formatLogMessage(l);
|
|
63
65
|
const level = l.level ?? "log";
|
|
64
66
|
const marker = level === "error" ? import_picocolors.default.red(`[${level}]`) : level === "warn" ? import_picocolors.default.yellow(`[${level}]`) : dim(`[${level}]`);
|
|
65
|
-
console.log(wrapTextWithPrefix(process.stdout, text, " ".repeat(level.length + 5), ` ${marker} `));
|
|
67
|
+
console.log(text || !minimal ? wrapTextWithPrefix(process.stdout, text, " ".repeat(level.length + 5), ` ${marker} `) : ` ${marker}`);
|
|
66
68
|
}
|
|
67
|
-
for (const ex of entry.exceptions) console.log(wrapTextWithPrefix(process.stdout, [sanitizeTerminalLogText(`${ex.name}: ${ex.message}`), ...errorStackFrames(ex).map((frame) => dim(sanitizeTerminalLogText(frame)))].join("\n"), " ".repeat(14), ` ${import_picocolors.default.red("[exception]")} `));
|
|
69
|
+
for (const ex of entry.exceptions) console.log(wrapTextWithPrefix(process.stdout, [sanitizeTerminalLogText(minimal && !ex.message ? ex.name : `${ex.name}: ${ex.message}`), ...errorStackFrames(ex).map((frame) => dim(sanitizeTerminalLogText(frame)))].join("\n"), " ".repeat(14), ` ${import_picocolors.default.red("[exception]")} `));
|
|
68
70
|
}
|
|
69
71
|
/**
|
|
70
72
|
* Join a console call's arguments; an argument that was an `Error` is followed
|
|
@@ -1,9 +1,9 @@
|
|
|
1
1
|
import { a as join, n as dirname } from "./dist-DMYe8CZJ.mjs";
|
|
2
2
|
import { o as TYPED_CONFIG_FILE, s as loadTypedVoidConfigFile } from "./project-paths-CdGv9Tmi.mjs";
|
|
3
|
-
import { h as validateConfig } from "./config-
|
|
3
|
+
import { h as validateConfig } from "./config-BITKQ3O6.mjs";
|
|
4
4
|
import { t as parseJsoncObject } from "./generated-wrangler-config-CoDaaFsA.mjs";
|
|
5
|
-
import { c as stashCloudflareDeployPointer, l as ensureGitignoreLines, n as VOID_LOCK_FILE, r as ignoreMaterializedCloudflareConfig, s as seedCloudflareConfig } from "./cloudflare-config-
|
|
6
|
-
import { I as renderVoidConfig, P as GENERATED_MARKERS } from "./wrangler-
|
|
5
|
+
import { c as stashCloudflareDeployPointer, l as ensureGitignoreLines, n as VOID_LOCK_FILE, r as ignoreMaterializedCloudflareConfig, s as seedCloudflareConfig } from "./cloudflare-config-eQunqX6A.mjs";
|
|
6
|
+
import { I as renderVoidConfig, P as GENERATED_MARKERS } from "./wrangler-DESSbN8L.mjs";
|
|
7
7
|
import { L as log } from "./dist-D23AAMxT.mjs";
|
|
8
8
|
import { m as printSuccess } from "./output-BCdLioKP.mjs";
|
|
9
9
|
import { existsSync, mkdirSync, readFileSync, renameSync, rmSync, unlinkSync, writeFileSync } from "node:fs";
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export { n as runMigrateCommand } from "./migrate-ChHHZBTi.mjs";
|