void 0.28.0 → 1.0.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/dist/{account-cmd-Ci00cncT.mjs → account-cmd-BTcUzv9L.mjs} +4 -4
- package/dist/{application-analysis-D72ZQfMZ.mjs → application-analysis-AB_YYWgH.mjs} +1 -1
- package/dist/{application-routing-Dy589Vgn.mjs → application-routing-L7V-TFhZ.mjs} +1 -1
- package/dist/auth-Cbqi1iVX.mjs +1 -0
- package/dist/{auth-link-DWr6Afao.mjs → auth-link-DUJuvRx5.mjs} +4 -4
- package/dist/{auth-router-DP14wVkZ.mjs → auth-router-CIxiMG7i.mjs} +3 -3
- package/dist/{build-cmd-Cr3FJxv0.mjs → build-cmd-BkIv25PA.mjs} +3 -3
- package/dist/{cache-D0Tt28cn.mjs → cache-Ctzfig-W.mjs} +3 -3
- package/dist/{cancel-deploy-CJKvk7AN.mjs → cancel-deploy-CD9o-SsC.mjs} +2 -2
- package/dist/cf-build-output-BU3hqdHu.mjs +1 -0
- package/dist/cli/cli.mjs +31 -31
- package/dist/cli/cloudflare-operation-process.mjs +2 -2
- package/dist/cli/env-schema-probe.d.mts +2 -1
- package/dist/cli/env-schema-probe.mjs +2 -2
- package/dist/client-B60PwCC4.mjs +1 -0
- package/dist/{cloudflare-cmd-CTrn-lXJ.mjs → cloudflare-cmd-BIAF_BIY.mjs} +2 -2
- package/dist/{cloudflare-connect-BosmCNlq.mjs → cloudflare-connect-WjwnVOJA.mjs} +1 -1
- package/dist/{cloudflare-operations-BKdSfNBN.mjs → cloudflare-operations-B42EZeJy.mjs} +3 -3
- package/dist/cloudflare-operations-CrSUFRzJ.mjs +1 -0
- package/dist/collect-Cae8A7Zr.mjs +1 -0
- package/dist/config-QrJWu0IX.mjs +1 -0
- package/dist/{connect-nukQSoEO.mjs → connect-CKtk-EZe.mjs} +5 -5
- package/dist/create-project-B-ewF_Af.mjs +1 -0
- package/dist/{create-project-D4APeBwX.mjs → create-project-yInGo72M.mjs} +3 -3
- package/dist/database-provider.mjs +1 -2
- package/dist/{db-27RztQLy.mjs → db-7I_gfdVq.mjs} +37 -38
- package/dist/db-types-Bb4WBWIs.mjs +49 -0
- package/dist/{delete-BbsZFZIw.mjs → delete-Cy-M1u-r.mjs} +3 -3
- package/dist/deploy-9lgfhrXS.mjs +2 -0
- package/dist/{deploy-B06EQq4t.mjs → deploy-BYYlnsiy.mjs} +176 -21
- package/dist/{deploy-managed-static-CGswbcay.mjs → deploy-managed-static-Ca4TFdmx.mjs} +24 -706
- package/dist/{deploy-transport-BiicfoQW.mjs → deploy-transport-DWlWBe6M.mjs} +1 -1
- package/dist/deploy.mjs +4 -4
- package/dist/discover-ClzFSwns.mjs +1 -0
- package/dist/dispatch-DrTTk8Xg.mjs +431 -0
- package/dist/{dist-D3m88sjf.mjs → dist-BVdsO7Py.mjs} +5 -6
- package/dist/dist-CfgIkieS.mjs +1 -0
- package/dist/{domain-Bfq9n03H.mjs → domain-CZGxPv9u.mjs} +4 -4
- package/dist/edge.mjs +1 -2
- package/dist/{email-DIwaQU4P.mjs → email-DzyNVuoU.mjs} +6 -6
- package/dist/{email-cloudflare-CH053RxK.mjs → email-cloudflare-DfG6UEMm.mjs} +1 -1
- package/dist/{env-BhdWMrNy.mjs → env-0jrMQJI_.mjs} +5 -2
- package/dist/{env-C6ipBLp3.mjs → env-Nx3yf50r.mjs} +4 -4
- package/dist/{env-raw-Cklzcde3.mjs → env-raw-D74P4ebM.mjs} +12 -1
- package/dist/env-validation-BT7z-qpQ.mjs +1 -0
- package/dist/{env-validation-cE0zcmzO.mjs → env-validation-DYxjz_Wo.mjs} +2 -0
- package/dist/{gen-CnN1Xidx.mjs → gen-CufHEf42.mjs} +2 -2
- package/dist/gen-sXyp5DFO.mjs +1 -0
- package/dist/generate-ClI89brV.mjs +1 -0
- package/dist/{github-cmd-BdkU4Nhe.mjs → github-cmd-FU8EjFyU.mjs} +3 -3
- package/dist/{help-Bug7pyK_.mjs → help-BT2hovNI.mjs} +9 -5
- package/dist/help-i2YGGnTH.mjs +1 -0
- package/dist/{inbound-DmkTQeWp.mjs → inbound-BuTfm11U.mjs} +1 -1
- package/dist/index.mjs +551 -303
- package/dist/{info-CujPwtMe.mjs → info-l249eUdH.mjs} +1 -1
- package/dist/{init-ZWOJvc-Z.mjs → init-D0A6M64Q.mjs} +60 -14
- package/dist/{isr-config-DPjXM8J2.mjs → isr-config-fZaJJ8t7.mjs} +1 -30
- package/dist/{link-UEc7bnF4.mjs → link-WMoJFf4i.mjs} +4 -4
- package/dist/{list-CuWeOnzk.mjs → list-CQ2EQEHL.mjs} +4 -4
- package/dist/{live-BxLX-JqJ.mjs → live-BcHoTDFe.mjs} +1 -1
- package/dist/{local-d1-BM3p74mm.mjs → local-d1-BxvQYEFi.mjs} +1 -1
- package/dist/{login-CZ2Cqa-D.mjs → login-C2T1oVG-.mjs} +3 -3
- package/dist/login-XD844Xs-.mjs +1 -0
- package/dist/{logs-TihRcLTk.mjs → logs-DnC1d7xB.mjs} +3 -3
- package/dist/{migrate-uFwojusJ.mjs → migrate-BDIprOYd.mjs} +2 -2
- package/dist/migrate-BRwU-blY.mjs +1 -0
- package/dist/mysql-migration-sql-BIS5vbNk.mjs +241 -0
- package/dist/nitro.d.mts +30 -0
- package/dist/nitro.mjs +88 -0
- package/dist/{node-DoKbo1SZ.mjs → node-cPadMgUO.mjs} +3 -3
- package/dist/operator-cmd-D6gnZsnK.mjs +1 -0
- package/dist/{operator-cmd-C5lCctnc.mjs → operator-cmd-DHieWtFp.mjs} +5 -5
- package/dist/{output-FNHKw5Ac.mjs → output-Ba6ZbrzY.mjs} +1 -1
- package/dist/pages/head.mjs +1 -2
- package/dist/pages/prefetch.mjs +1 -2
- package/dist/pages/serialize.mjs +1 -2
- package/dist/plan-CKX_jWnD.mjs +1 -0
- package/dist/platform-args-B0HeTh0C.mjs +1 -0
- package/dist/{platform-args-C6Mb_I3a.mjs → platform-args-CaCL_1Ch.mjs} +9 -2
- package/dist/{platform-auth-config-CJmNkFT2.mjs → platform-auth-config-Z16-I8nT.mjs} +6 -6
- package/dist/{platform-auth-protection-D5wvsI-Y.mjs → platform-auth-protection-BXwZiJSF.mjs} +4 -4
- package/dist/{platform-auth-recovery-D_0I3n-1.mjs → platform-auth-recovery-CXjfqyOv.mjs} +4 -4
- package/dist/{platform-cmd-DxxZO6e5.mjs → platform-cmd-DaAOiWTl.mjs} +7 -7
- package/dist/platform-cmd-PT4YwMLM.mjs +1 -0
- package/dist/{platform-domain-zLXnW1G_.mjs → platform-domain-CxpvUeo0.mjs} +4 -4
- package/dist/{platform-lifecycle-DOW-wLfx.mjs → platform-lifecycle-DBiS0cJd.mjs} +317 -99
- package/dist/platform-lifecycle-u9pMOvxC.mjs +1 -0
- package/dist/{platform-management-t7HKy4-U.mjs → platform-management-DhEFdQAf.mjs} +67 -9
- package/dist/platform-management-DvBS83rC.mjs +1 -0
- package/dist/{platform-plans-config-CNH6zbPX.mjs → platform-plans-config-BWn1S2Rv.mjs} +2 -2
- package/dist/{platform-recovery-DeucI7A9.mjs → platform-recovery-BUGOB4RC.mjs} +2 -2
- package/dist/{platform-setup-CTf6MMT9.mjs → platform-setup-YvN9VQXV.mjs} +3 -3
- package/dist/prepare-CYT6tAzD.mjs +1 -0
- package/dist/{prepare-CSH9dKTI.mjs → prepare-DEB5SeVJ.mjs} +3 -2
- package/dist/{prepare-C4zfwks4.mjs → prepare-PQCgsny0.mjs} +3 -3
- package/dist/prerender-render.mjs +1 -2
- package/dist/{project-cmd-Dq75AXzy.mjs → project-cmd-DVatD8Ev.mjs} +16 -16
- package/dist/project-slug-6cyz8E7k.mjs +1 -0
- package/dist/{project-team-B3_QcStG.mjs → project-team-DJrWEAG1.mjs} +3 -3
- package/dist/{project-token-CvsRvv2I.mjs → project-token-CBgLBuL6.mjs} +3 -3
- package/dist/project-zdB3fs9G.mjs +1 -0
- package/dist/{project-zero-trust-D1ICiwN_.mjs → project-zero-trust-92gLtZ25.mjs} +3 -3
- package/dist/{provision-DDh7ITVS.mjs → provision-BnSSkiED.mjs} +1 -1
- package/dist/{requests-3CL3BuZh.mjs → requests-7W1Pygt2.mjs} +2 -2
- package/dist/resolve-project-PnhzMtY6.mjs +1 -0
- package/dist/{resolve-project-C_Cu7E8a.mjs → resolve-project-WpwkCB_c.mjs} +1 -1
- package/dist/{rollback-Ce1d_0J9.mjs → rollback-BcASVnwP.mjs} +3 -3
- package/dist/{route-types-IrBuwJ7u.mjs → route-types-BZi26DVS.mjs} +2 -49
- package/dist/{runner-DcVDrzuR.mjs → runner-CabsQ-iM.mjs} +15 -6
- package/dist/runner-So9mYfcm.mjs +1 -0
- package/dist/runner-mysql-BhRaONkO.mjs +146 -0
- package/dist/runner-mysql-DWwE8jKi.mjs +1 -0
- package/dist/{runner-pg-CPd-CB_F.mjs → runner-pg-BRemq_GX.mjs} +2 -2
- package/dist/runner-pg-_Xncr3H5.mjs +1 -0
- package/dist/runtime/ai.mjs +15 -4
- package/dist/runtime/auth-client-react.mjs +1 -2
- package/dist/runtime/auth-client-solid.mjs +1 -2
- package/dist/runtime/auth-client-svelte.mjs +1 -2
- package/dist/runtime/auth-client-vue.mjs +1 -2
- package/dist/runtime/auth-client.mjs +1 -2
- package/dist/runtime/auth.mjs +1 -2
- package/dist/runtime/better-auth-mysql.mjs +4 -1
- package/dist/runtime/db.mjs +6 -2
- package/dist/runtime/durable.d.mts +2 -1
- package/dist/runtime/durable.mjs +1 -1
- package/dist/runtime/email/testing.mjs +1 -1
- package/dist/runtime/email-protocol.mjs +1 -2
- package/dist/runtime/email.mjs +1 -1
- package/dist/runtime/env-public.mjs +2 -2
- package/dist/runtime/env.mjs +1 -2
- package/dist/runtime/isr.mjs +1 -1
- package/dist/runtime/kv.mjs +1 -1
- package/dist/runtime/limits.mjs +1 -2
- package/dist/runtime/live-client.d.mts +2 -1
- package/dist/runtime/live-server.d.mts +2 -1
- package/dist/runtime/live-server.mjs +1 -1
- package/dist/runtime/live.mjs +1 -2
- package/dist/runtime/log.d.mts +2 -1
- package/dist/runtime/migration-handler-mysql.mjs +38 -8
- package/dist/runtime/migration-handler.mjs +1 -2
- package/dist/runtime/queues.mjs +1 -1
- package/dist/runtime/response.mjs +1 -2
- package/dist/runtime/route-url.mjs +1 -2
- package/dist/runtime/routing.d.mts +2 -1
- package/dist/runtime/sandbox-container.mjs +1 -2
- package/dist/runtime/sandbox.mjs +3 -3
- package/dist/runtime/seed.d.mts +2 -1
- package/dist/runtime/sse.mjs +1 -2
- package/dist/runtime/storage.mjs +1 -1
- package/dist/runtime/validator.mjs +1 -2
- package/dist/runtime/ws-server.d.mts +2 -1
- package/dist/runtime/ws-server.mjs +1 -1
- package/dist/{secret-B5J8bBsI.mjs → secret-bg73f1Ge.mjs} +5 -5
- package/dist/{skills-BJsan98C.mjs → skills-C_yRTg0g.mjs} +1 -1
- package/dist/{subcommand-prompt-gQ-NDA-u.mjs → subcommand-prompt-Bm3ZlYgA.mjs} +2 -2
- package/dist/sveltekit.d.mts +2 -1
- package/dist/validate-BQFdf0Pi.mjs +1 -0
- package/dist/wrapper-CwhpNWtH.mjs +663 -0
- package/docs/guide/ai.md +8 -2
- package/docs/guide/database/mysql.md +14 -3
- package/docs/guide/database.md +1 -5
- package/docs/guide/durable-state.md +9 -5
- package/docs/guide/platform/installation/credentials.md +18 -2
- package/docs/guide/platform/installation/domains.md +1 -1
- package/docs/guide/platform/installation/maintenance.md +38 -1
- package/docs/guide/platform/installation/prerequisites.md +6 -2
- package/docs/guide/platform/installation/setup.md +23 -1
- package/docs/guide/platform/installation/uninstall.md +6 -1
- package/docs/guide/sandboxes.md +1 -1
- package/docs/guide/self-hosted-platform.md +1 -1
- package/docs/integrations/cloudflare.md +2 -2
- package/docs/integrations/frameworks/analog.md +3 -11
- package/docs/integrations/frameworks/nuxt.md +7 -10
- package/docs/integrations/nodejs-bun-deno.md +2 -0
- package/docs/reference/api.md +1 -0
- package/docs/reference/cli/platform-installation.md +18 -6
- package/docs/reference/config.md +2 -0
- package/package.json +34 -28
- package/sandbox.Dockerfile +1 -1
- package/skills/void/SKILL.md +1 -1
- package/dist/auth-wn6F8dB8.mjs +0 -2
- package/dist/cf-build-output-2u583yJK.mjs +0 -2
- package/dist/client-C1BjRn3g.mjs +0 -2
- package/dist/cloudflare-operations-Ds-lX3Ts.mjs +0 -2
- package/dist/collect-NUlJMpLY.mjs +0 -2
- package/dist/config-CNnrSMYm.mjs +0 -2
- package/dist/create-project-DL7YXpjj.mjs +0 -2
- package/dist/deploy-Db2ALnQP.mjs +0 -3
- package/dist/discover-CTUiSsfG.mjs +0 -2
- package/dist/dist-Bx1z6Eva.mjs +0 -2
- package/dist/env-validation-CTn-HhG1.mjs +0 -2
- package/dist/gen-F8pSZnhc.mjs +0 -2
- package/dist/generate-Rii9klHB.mjs +0 -2
- package/dist/help-s9q7LTcu.mjs +0 -2
- package/dist/login-DhK7o1oJ.mjs +0 -2
- package/dist/migrate-BgT-hmu8.mjs +0 -2
- package/dist/operator-cmd-Cjk5DiRx.mjs +0 -2
- package/dist/plan-CH2G51je.mjs +0 -2
- package/dist/platform-args-Cm7x-fot.mjs +0 -2
- package/dist/platform-cmd-Cuj4oUVo.mjs +0 -2
- package/dist/platform-lifecycle-_gfnjUBr.mjs +0 -2
- package/dist/platform-management-CYrLvTGH.mjs +0 -2
- package/dist/prepare-dr9uxQSV.mjs +0 -2
- package/dist/project-DiiOBZPF.mjs +0 -2
- package/dist/project-slug-DofjTFd-.mjs +0 -2
- package/dist/resolve-project-B9Hr0D3n.mjs +0 -2
- package/dist/runner-B5huK2eC.mjs +0 -2
- package/dist/runner-mysql-CCtyI0p6.mjs +0 -55
- package/dist/runner-mysql-CaJq-hd6.mjs +0 -2
- package/dist/runner-pg-BJhFZZG4.mjs +0 -2
- package/dist/validate-C9xtFOYR.mjs +0 -2
- package/dist/{sandbox-container-DBKIqDEK.mjs → sandbox-container-a9LRUtii.mjs} +1 -1
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export { r as runPlatformLifecycleCommand } from "./platform-lifecycle-DBiS0cJd.mjs";
|
|
@@ -1,7 +1,8 @@
|
|
|
1
|
-
import { _ as removePlatformConnectionForInstallation, g as removeInstallationRecoverySecrets, m as readInstallationRecoverySecrets, o as listInstallationManifests, t as acquirePlatformLifecycleLock, v as resolveInstallationManifest, x as writeInstallationManifest } from "./platform-registry-B9mWX9LO.mjs";
|
|
2
|
-
import {
|
|
3
|
-
import {
|
|
4
|
-
import {
|
|
1
|
+
import { S as writePendingInstallationSecrets, _ as removePlatformConnectionForInstallation, g as removeInstallationRecoverySecrets, h as readPendingInstallationSecrets, m as readInstallationRecoverySecrets, o as listInstallationManifests, t as acquirePlatformLifecycleLock, v as resolveInstallationManifest, x as writeInstallationManifest } from "./platform-registry-B9mWX9LO.mjs";
|
|
2
|
+
import { t as ensurePlatformAccessToken } from "./cf-access-CWP4avfP.mjs";
|
|
3
|
+
import { A as confirm, H as outro, K as select, L as log, tt as isCancel } from "./dist-BVdsO7Py.mjs";
|
|
4
|
+
import { f as import_picocolors, l as formatUrl, m as printSuccess, p as note, r as createSpinner } from "./output-Ba6ZbrzY.mjs";
|
|
5
|
+
import { A as matchesRecordedR2Fingerprint, B as activatePlatformAccessCredentials, C as platformTrafficAttachmentWorker, D as formatPlatformInstallPlan, E as dnsRecordConfigHash, F as platformDatabaseNameFromOwnerUrl, G as PlatformCloudflareClient, I as turnOffInstalledProjectZeroTrust, J as hyperdriveOriginMatches, K as hyperdriveOriginConfigHash, L as assertPlatformOperatorCredentialCanApplyPlan, M as r2BucketConfigHash, N as resourceMarkerProblem, O as hasProvisionIntentStep, P as revalidatePlatformInstallAction, R as resolvePlatformCloudflareCredential, T as createPlatformInstallPlan, W as PlatformCloudflareApiError, Y as verifyPlatformRuntimeTokenPermissions, _ as readPlatformDatabase, a as authenticationSetupRequestHash, b as createPlatformInstallationSecrets, c as REMOTE_INSTALLATION_MANIFEST_KEY, g as formatZeroTrustApplications, h as assertProjectZeroTrustAllowsUninstall, j as platformAdoptionIntentHash, k as legacyResourceConfigHash, l as installPlatform, m as readPlatformProjectZeroTrustState, n as resolvePlatformInstallDatabaseUrl, o as readLoginReplacementFile, p as readPlatformProjectSlugs, q as hyperdriveOriginFromConnectionString, s as replacePendingInstallationAuthentication, t as assertNoninteractivePlatformMutationAcknowledged, u as acquirePlatformDatabaseLifecycleLock, v as loadPlatformRuntime, x as resolveBootstrapGitHubId, y as createPlatformHealthProbeToken, z as verifyPlatformCloudflareCredential } from "./platform-lifecycle-DBiS0cJd.mjs";
|
|
5
6
|
import { PLATFORM_DISABLED_KEY, PLATFORM_DISABLED_VALUE, PLATFORM_R2_OWNERSHIP_MARKER_KEY, parsePlatformInstallationManifest, recordInstallationResource, recordInstallationStep, setInstallationDesiredState, transitionInstallation } from "@void/platform";
|
|
6
7
|
import { setTimeout } from "node:timers/promises";
|
|
7
8
|
//#region src/cli/platform-teardown.ts
|
|
@@ -665,6 +666,8 @@ async function runInstalledPlatformCommand(args) {
|
|
|
665
666
|
return;
|
|
666
667
|
}
|
|
667
668
|
if (args.subcommand === "uninstall") {
|
|
669
|
+
const apiUrl = manifest.endpoints.apiUrl;
|
|
670
|
+
const appAccessSetupToken = recovery?.appAccessSetupToken;
|
|
668
671
|
await uninstallPlatform(client, manifest, args, {
|
|
669
672
|
checkpoint: databaseLock?.checkpoint,
|
|
670
673
|
databaseUrl,
|
|
@@ -676,7 +679,19 @@ async function runInstalledPlatformCommand(args) {
|
|
|
676
679
|
credential: {
|
|
677
680
|
source: operatorCredential.source,
|
|
678
681
|
aiGatewayToken: !!gatewayToken
|
|
679
|
-
}
|
|
682
|
+
},
|
|
683
|
+
...apiUrl && appAccessSetupToken ? { turnOffProjectZeroTrust: async () => {
|
|
684
|
+
const saved = recovery?.accessCredentialsJson ? JSON.parse(recovery.accessCredentialsJson) : {};
|
|
685
|
+
if (saved && typeof saved === "object" && apiUrl in saved) activatePlatformAccessCredentials(JSON.stringify({ [apiUrl]: saved[apiUrl] }), [apiUrl]);
|
|
686
|
+
if (manifest.deployment.authentication.accessProtection) ensurePlatformAccessToken(apiUrl, false, true);
|
|
687
|
+
await turnOffInstalledProjectZeroTrust({
|
|
688
|
+
apiUrl,
|
|
689
|
+
installationId: manifest.id,
|
|
690
|
+
probeToken: createPlatformHealthProbeToken(manifest.ownershipNonce),
|
|
691
|
+
setupToken: appAccessSetupToken,
|
|
692
|
+
updateCommand: readPendingInstallationSecrets(manifest) ? `void platform install --resume --name ${commandArgument(manifest.id)}` : `void platform upgrade ${commandArgument(manifest.id)}`
|
|
693
|
+
});
|
|
694
|
+
} } : {}
|
|
680
695
|
});
|
|
681
696
|
return;
|
|
682
697
|
}
|
|
@@ -684,6 +699,13 @@ async function runInstalledPlatformCommand(args) {
|
|
|
684
699
|
log.info(`${manifest.deployment.displayName} is already enabled.`);
|
|
685
700
|
return;
|
|
686
701
|
}
|
|
702
|
+
const loginFile = args.subcommand === "repair" ? args.authConfig : void 0;
|
|
703
|
+
if (loginFile !== void 0) {
|
|
704
|
+
if (manifest.desiredState === "disabled") throw new Error(`platform: This platform is disabled. Run \`void platform enable ${commandArgument(manifest.id)}\` first, then repair to change the login settings.`);
|
|
705
|
+
if (!manifest.deployment.authentication.configurable) throw new Error("platform: This installation signs in with the GitHub OAuth App from its installation settings. Set VOID_PLATFORM_GITHUB_CLIENT_ID and VOID_PLATFORM_GITHUB_CLIENT_SECRET when running repair to replace it.");
|
|
706
|
+
if (!recovery?.authenticationSetupJson || !recovery.authSetupToken) throw new Error("platform: Changing the login settings needs the setup authority saved on the computer that installed the platform. Run this repair there.");
|
|
707
|
+
await readLoginReplacementFile(loginFile, manifest.deployment.authentication, recovery.authenticationSetupJson);
|
|
708
|
+
}
|
|
687
709
|
const deployment = manifest.deployment;
|
|
688
710
|
const planInput = {
|
|
689
711
|
accountId: manifest.account.id,
|
|
@@ -715,6 +737,7 @@ async function runInstalledPlatformCommand(args) {
|
|
|
715
737
|
].join("\n"), "Platform runtime");
|
|
716
738
|
log.info(manifest.desiredState === "disabled" && args.subcommand !== "enable" ? "Application traffic will stay paused because this installation is disabled." : "Application traffic may pause briefly during a safe cutover.");
|
|
717
739
|
if (args.plan) {
|
|
740
|
+
if (loginFile !== void 0) log.info(`Login settings will be replaced from ${loginFile}; a new setup code is printed at the end.`);
|
|
718
741
|
outro("No Cloudflare or local installation state was changed.");
|
|
719
742
|
return;
|
|
720
743
|
}
|
|
@@ -726,6 +749,21 @@ async function runInstalledPlatformCommand(args) {
|
|
|
726
749
|
databaseUrl
|
|
727
750
|
});
|
|
728
751
|
markPhase("ownership");
|
|
752
|
+
let replacedLogin;
|
|
753
|
+
if (args.subcommand === "repair" && (loginFile !== void 0 || process.stdin.isTTY && !args.yes) && manifest.desiredState !== "disabled" && manifest.deployment.authentication.configurable && recovery?.authenticationSetupJson && recovery.authSetupToken) {
|
|
754
|
+
const setup = await databaseLock?.readAdministratorSetup?.();
|
|
755
|
+
if (loginFile !== void 0) {
|
|
756
|
+
if (!setup) throw new Error("platform: The database lifecycle lock cannot read the administrator setup.");
|
|
757
|
+
if (setup.usersExist || setup.requestHash !== null && !setup.pending) throw new Error("platform: The first administrator has already signed in. Change login methods with `void platform config auth`.");
|
|
758
|
+
if (setup.requestHash === null) throw new Error(`platform: Administrator setup was never started. Resume the install with \`void platform install --resume --name ${commandArgument(manifest.id)}\`.`);
|
|
759
|
+
}
|
|
760
|
+
if (setup?.pending && !setup.usersExist && (loginFile !== void 0 || await promptForConfirmation("First administrator setup is not finished. Change the login settings before continuing?", false))) replacedLogin = await replacePendingInstallationAuthentication({
|
|
761
|
+
...loginFile !== void 0 ? { file: loginFile } : {},
|
|
762
|
+
authentication: manifest.deployment.authentication,
|
|
763
|
+
setupJson: recovery.authenticationSetupJson,
|
|
764
|
+
apiUrl: plan.apiUrl
|
|
765
|
+
});
|
|
766
|
+
}
|
|
729
767
|
const installation = args.subcommand === "enable" ? setInstallationDesiredState(manifest, "enabled", (/* @__PURE__ */ new Date()).toISOString()) : manifest;
|
|
730
768
|
const bootstrapGitHubLogin = process.env.VOID_PLATFORM_ADMIN_GITHUB_LOGIN || recovery?.bootstrapGitHubLogin || "";
|
|
731
769
|
const bootstrapGitHubId = process.env.VOID_PLATFORM_ADMIN_GITHUB_ID || recovery?.bootstrapGitHubId || (bootstrapGitHubLogin ? await resolveBootstrapGitHubId(bootstrapGitHubLogin) : "");
|
|
@@ -747,7 +785,8 @@ async function runInstalledPlatformCommand(args) {
|
|
|
747
785
|
projectSecretKeysJson: process.env.VOID_PLATFORM_PROJECT_SECRET_KEYS_JSON || "",
|
|
748
786
|
projectSecretActiveKeyVersion: process.env.VOID_PLATFORM_PROJECT_SECRET_ACTIVE_KEY_VERSION || "",
|
|
749
787
|
r2AccessKeyId: process.env.VOID_PLATFORM_R2_ACCESS_KEY_ID || "",
|
|
750
|
-
r2SecretAccessKey: process.env.VOID_PLATFORM_R2_SECRET_ACCESS_KEY || ""
|
|
788
|
+
r2SecretAccessKey: process.env.VOID_PLATFORM_R2_SECRET_ACCESS_KEY || "",
|
|
789
|
+
...replacedLogin
|
|
751
790
|
});
|
|
752
791
|
const runtimeTokenToPreflight = resolvePlatformRuntimeTokenToPreflight(plan, secrets);
|
|
753
792
|
if (runtimeTokenToPreflight) await verifyPlatformRuntimeTokenPermissions(new PlatformCloudflareClient(runtimeTokenToPreflight), {
|
|
@@ -763,6 +802,17 @@ async function runInstalledPlatformCommand(args) {
|
|
|
763
802
|
} });
|
|
764
803
|
progress.start(args.subcommand === "upgrade" ? "Upgrading the platform" : args.subcommand === "rollback" ? "Rolling back the platform" : args.subcommand === "enable" ? "Enabling the platform" : "Repairing the platform");
|
|
765
804
|
if (installation !== manifest) writeInstallationManifest(installation);
|
|
805
|
+
const keepAcceptedLogin = async (error) => {
|
|
806
|
+
const after = replacedLogin ? await databaseLock?.readAdministratorSetup?.().catch(() => void 0) : void 0;
|
|
807
|
+
if (!after || !recovery?.authenticationSetupJson || after.requestHash !== authenticationSetupRequestHash(recovery.authenticationSetupJson) || !after.usersExist && after.pending) return error;
|
|
808
|
+
const pending = readPendingInstallationSecrets(installation);
|
|
809
|
+
if (pending) writePendingInstallationSecrets(installation, {
|
|
810
|
+
...pending,
|
|
811
|
+
authenticationSetupJson: recovery.authenticationSetupJson,
|
|
812
|
+
...recovery.authBootstrapCode ? { authBootstrapCode: recovery.authBootstrapCode } : {}
|
|
813
|
+
});
|
|
814
|
+
return new Error("platform: The first administrator signed in before the new login settings were applied. Nothing changed. Change login methods with `void platform config auth`.", { cause: error });
|
|
815
|
+
};
|
|
766
816
|
const result = await installPlatform(plan, secrets, installation, {
|
|
767
817
|
acquireDatabaseLifecycleLock: async () => Object.assign(async () => {}, {
|
|
768
818
|
checkpoint: databaseLock?.checkpoint,
|
|
@@ -793,6 +843,8 @@ async function runInstalledPlatformCommand(args) {
|
|
|
793
843
|
repairMissing: args.subcommand === "repair",
|
|
794
844
|
stableWorkerUpdate: args.subcommand === "upgrade"
|
|
795
845
|
})
|
|
846
|
+
}).catch(async (error) => {
|
|
847
|
+
throw await keepAcceptedLogin(error);
|
|
796
848
|
});
|
|
797
849
|
progress.message("Finalizing platform changes");
|
|
798
850
|
markPhase("installer complete");
|
|
@@ -821,6 +873,8 @@ async function runInstalledPlatformCommand(args) {
|
|
|
821
873
|
if (code) {
|
|
822
874
|
log.info(`First administrator setup: ${formatUrl(`${plan.apiUrl}/setup`)}`);
|
|
823
875
|
console.log(`One-time administrator setup code: ${code}`);
|
|
876
|
+
log.info(`Login callback URL: ${formatUrl(`${plan.apiUrl}/auth/callback`)}`);
|
|
877
|
+
log.info(`If sign-in fails, run \`void platform repair ${commandArgument(manifest.id)}\` to change the login settings.`);
|
|
824
878
|
}
|
|
825
879
|
}
|
|
826
880
|
printSuccess(`${deployment.displayName}: runtime ${runtime.manifest.platformVersion} ${args.subcommand === "rollback" ? "restored" : "ready"}.`);
|
|
@@ -957,14 +1011,14 @@ async function uninstallPlatform(client, initialManifest, args, dependencies = {
|
|
|
957
1011
|
const interactive = dependencies.interactive ?? process.stdin.isTTY;
|
|
958
1012
|
const confirmAction = dependencies.confirm ?? promptForConfirmation;
|
|
959
1013
|
if (createdZone && args.deleteZone === true) throw new Error(`platform: Refusing to delete Cloudflare zone ${JSON.stringify(createdZone.name)} automatically. A zone can contain unrelated DNS, settings, and products that the installer cannot exhaustively prove ownership of. Uninstall with --keep-zone, inspect the retained zone in Cloudflare, and delete it manually if appropriate.`);
|
|
960
|
-
await assertProjectZeroTrustAllowsUninstall(dependencies.readProjectZeroTrust);
|
|
1014
|
+
const zeroTrust = await assertProjectZeroTrustAllowsUninstall(dependencies.readProjectZeroTrust, { canTurnOff: !!dependencies.turnOffProjectZeroTrust });
|
|
961
1015
|
if (purgeResources) await assertNoPlatformProjects(dependencies.readProjects);
|
|
962
|
-
if (args.plan || interactive && !args.yes) note(purgeResources ? purgeResourcesPlanText(manifest) : [
|
|
1016
|
+
if (args.plan || interactive && !args.yes) note([...zeroTrust ? zeroTrust.turnOff.length ? ["Turn off project Zero Trust; no platform user exists yet. Delete its Access applications:", formatZeroTrustApplications(zeroTrust.turnOff)] : ["Turn off project Zero Trust; no platform user exists yet."] : [], purgeResources ? purgeResourcesPlanText(manifest) : [
|
|
963
1017
|
"Disable platform traffic.",
|
|
964
1018
|
retainData ? "Keep Workers and data." : "Delete eligible data; keep Workers, R2, and AI Gateway.",
|
|
965
1019
|
"Delete unused Queues.",
|
|
966
1020
|
...describeKeptResources(manifest, plannedKeptResources(manifest, retainData, hasRoutingCheckpoint), "Keep for manual cleanup:", "Keep Access resources:")
|
|
967
|
-
].join("\n"), import_picocolors.default.bold("Uninstall plan"));
|
|
1021
|
+
].join("\n")].join("\n"), import_picocolors.default.bold("Uninstall plan"));
|
|
968
1022
|
if (purgeResources) {
|
|
969
1023
|
const credentialCheck = checkPurgeResourcesCredentials(client, manifest, dependencies.credential ?? {
|
|
970
1024
|
source: "environment",
|
|
@@ -1013,6 +1067,10 @@ async function uninstallPlatform(client, initialManifest, args, dependencies = {
|
|
|
1013
1067
|
}
|
|
1014
1068
|
const { fenceProjectZeroTrust, liftProjectZeroTrustFence, lockProjectZeroTrust } = dependencies;
|
|
1015
1069
|
if (!lockProjectZeroTrust || !fenceProjectZeroTrust || !liftProjectZeroTrustFence) throw new Error("platform: Refusing to uninstall because no platform database connection is available to hold off project Zero Trust changes.");
|
|
1070
|
+
if (zeroTrust) {
|
|
1071
|
+
log.step("Turning off project Zero Trust");
|
|
1072
|
+
await dependencies.turnOffProjectZeroTrust();
|
|
1073
|
+
}
|
|
1016
1074
|
const releaseProjectZeroTrust = await lockProjectZeroTrust();
|
|
1017
1075
|
let fenced = false;
|
|
1018
1076
|
let disablingTraffic = false;
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export { c as runInstalledPlatformCommand, l as selectAuthoritativePlatformManifest, d as verifyPlatformInstallationOwnership } from "./platform-management-DhEFdQAf.mjs";
|
|
@@ -1,5 +1,5 @@
|
|
|
1
|
-
import { A as confirm, K as select, X as text, tt as isCancel } from "./dist-
|
|
2
|
-
import { m as printSuccess } from "./output-
|
|
1
|
+
import { A as confirm, K as select, X as text, tt as isCancel } from "./dist-BVdsO7Py.mjs";
|
|
2
|
+
import { m as printSuccess } from "./output-Ba6ZbrzY.mjs";
|
|
3
3
|
import { n as OperatorClient, r as OperatorClientError } from "./operator-client-C-ROjk1I.mjs";
|
|
4
4
|
import { a as resolveOperatorOrigin, r as readOperatorToken } from "./operator-auth-Cr2zCc-J.mjs";
|
|
5
5
|
import { stripVTControlCharacters } from "node:util";
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
import { o as listInstallationManifests, t as acquirePlatformLifecycleLock, x as writeInstallationManifest, y as savePlatformConnection } from "./platform-registry-B9mWX9LO.mjs";
|
|
2
2
|
import { t as cfAccessHeaders } from "./cf-access-BM9G0lhO.mjs";
|
|
3
|
-
import {
|
|
4
|
-
import { a as recoverDurablyMarkedProvisionIntents, d as verifyPlatformInstallationOwnership, r as isPlatformManifestMonotonicExtension } from "./platform-management-
|
|
3
|
+
import { T as createPlatformInstallPlan, c as REMOTE_INSTALLATION_MANIFEST_KEY } from "./platform-lifecycle-DBiS0cJd.mjs";
|
|
4
|
+
import { a as recoverDurablyMarkedProvisionIntents, d as verifyPlatformInstallationOwnership, r as isPlatformManifestMonotonicExtension } from "./platform-management-DhEFdQAf.mjs";
|
|
5
5
|
import { parsePlatformInstallationManifest, setInstallationEndpoints } from "@void/platform";
|
|
6
6
|
//#region src/cli/platform-recovery.ts
|
|
7
7
|
async function recoverPlatformInstallations(client, accountId, verifyEndpoint = verifyInstallationEndpoint, selector = "") {
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import { u as openBrowser } from "./auth-B6iOCjKI.mjs";
|
|
2
|
-
import { L as log, tt as isCancel } from "./dist-
|
|
3
|
-
import { f as import_picocolors, s as formatLink } from "./output-
|
|
2
|
+
import { L as log, tt as isCancel } from "./dist-BVdsO7Py.mjs";
|
|
3
|
+
import { f as import_picocolors, s as formatLink } from "./output-Ba6ZbrzY.mjs";
|
|
4
4
|
//#region src/cli/platform-setup.ts
|
|
5
5
|
/** Return a prompt answer, or stop the platform command when the prompt was cancelled. */
|
|
6
6
|
function platformPromptAnswer(value) {
|
|
@@ -228,7 +228,7 @@ function formatPlatformSetupPlan(plan, options = {}) {
|
|
|
228
228
|
...plan.deployment.authentication.providers.filter((provider) => provider !== "github").map((provider) => (provider === "google" ? "Google OAuth" : provider === "oidc" ? "OIDC" : "Cloudflare Access OIDC") + " client ID and secret"),
|
|
229
229
|
...plan.deployment.authentication.accessProtection ? ["Cloudflare Access application and installer credentials"] : [],
|
|
230
230
|
...plan.deployment.appAccess ? ["Cloudflare Access check and app-management token when needed (stored encrypted)"] : [],
|
|
231
|
-
"JWT signing key and project encryption key"
|
|
231
|
+
...process.stdin.isTTY ? [] : ["JWT signing key and project encryption key for non-interactive installs"]
|
|
232
232
|
].map((credential) => `• ${credential}`)
|
|
233
233
|
].join("\n");
|
|
234
234
|
}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export { t as prepareProject } from "./prepare-DEB5SeVJ.mjs";
|
|
@@ -2,12 +2,13 @@ import { a as join } from "./dist-ipQi0Q8y.mjs";
|
|
|
2
2
|
import { n as loadVoidAuthConfig } from "./config-D0GY5ItR.mjs";
|
|
3
3
|
import { d as readConfig } from "./config-Bx_1SpnO.mjs";
|
|
4
4
|
import { n as ensureProjectTsconfig, r as writeFileIfChanged } from "./project-tsconfig-bveqhlYA.mjs";
|
|
5
|
-
import {
|
|
5
|
+
import { n as generateDbDts } from "./db-types-Bb4WBWIs.mjs";
|
|
6
6
|
import { t as discoverSchema } from "./discover-D2PGT63u.mjs";
|
|
7
7
|
import { o as loadLocalEnv } from "./env-BJjULvL0.mjs";
|
|
8
8
|
import { n as findEnvFileForPaths, r as generateEnvTypes } from "./env-types-DS2_y4X8.mjs";
|
|
9
|
-
import { t as analyzeApplication } from "./application-routing-
|
|
9
|
+
import { t as analyzeApplication } from "./application-routing-L7V-TFhZ.mjs";
|
|
10
10
|
import { n as generateVoidAuthDrizzleSchema, t as generateVoidAuthDatabaseModule } from "./drizzle-CF84FOVM.mjs";
|
|
11
|
+
import { n as generateQueueTypes, t as generateRouteTypes } from "./route-types-BZi26DVS.mjs";
|
|
11
12
|
import { existsSync, rmSync } from "node:fs";
|
|
12
13
|
import { fileURLToPath } from "node:url";
|
|
13
14
|
//#region src/codegen/prepare.ts
|
|
@@ -1,6 +1,6 @@
|
|
|
1
|
-
import { L as log } from "./dist-
|
|
2
|
-
import { m as printSuccess, p as note } from "./output-
|
|
3
|
-
import { t as prepareProject } from "./prepare-
|
|
1
|
+
import { L as log } from "./dist-BVdsO7Py.mjs";
|
|
2
|
+
import { m as printSuccess, p as note } from "./output-Ba6ZbrzY.mjs";
|
|
3
|
+
import { t as prepareProject } from "./prepare-DEB5SeVJ.mjs";
|
|
4
4
|
//#region src/cli/prepare.ts
|
|
5
5
|
async function runPrepareCommand(root) {
|
|
6
6
|
console.log();
|
|
@@ -1,2 +1 @@
|
|
|
1
|
-
|
|
2
|
-
export { outputFileForPath, readPrerenderPathsResponse, renderPrerenderPaths };
|
|
1
|
+
export { t as outputFileForPath, n as readPrerenderPathsResponse, r as renderPrerenderPaths } from "./prerender-render-Bfsumdkv.mjs";
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
import { n as readDeploymentPlatform } from "./project-rqDnVsJN.mjs";
|
|
2
2
|
import { c as getToken, s as getSiteDomain } from "./auth-B6iOCjKI.mjs";
|
|
3
|
-
import { H as outro, L as log } from "./dist-
|
|
4
|
-
import { _ as tablePrefix, f as import_picocolors, i as dim, l as formatUrl, o as formatCount } from "./output-
|
|
3
|
+
import { H as outro, L as log } from "./dist-BVdsO7Py.mjs";
|
|
4
|
+
import { _ as tablePrefix, f as import_picocolors, i as dim, l as formatUrl, o as formatCount } from "./output-Ba6ZbrzY.mjs";
|
|
5
5
|
import { r as PlatformClient } from "./client-DM9Kcf4e.mjs";
|
|
6
6
|
//#region src/cli/projects.ts
|
|
7
7
|
async function runProjectsCommand(root) {
|
|
@@ -38,77 +38,77 @@ async function runProjectsCommand(root) {
|
|
|
38
38
|
async function runProjectCommand(root, args) {
|
|
39
39
|
const cloudflare = readDeploymentPlatform(root) === "cloudflare";
|
|
40
40
|
if (args.subcommand === "status") {
|
|
41
|
-
const { runListCommand } = await import("./list-
|
|
41
|
+
const { runListCommand } = await import("./list-CQ2EQEHL.mjs");
|
|
42
42
|
return runListCommand(root, args.name || void 0);
|
|
43
43
|
}
|
|
44
44
|
if (args.subcommand === "link") {
|
|
45
45
|
if (cloudflare) throw new Error("project: Direct Cloudflare apps are identified by cloudflare.name in void.config.ts and do not need linking.");
|
|
46
|
-
const { runLink } = await import("./link-
|
|
46
|
+
const { runLink } = await import("./link-WMoJFf4i.mjs");
|
|
47
47
|
return runLink(root, args.name || void 0);
|
|
48
48
|
}
|
|
49
49
|
if (args.subcommand === "list") {
|
|
50
50
|
if (cloudflare) {
|
|
51
|
-
const { runListCommand } = await import("./list-
|
|
51
|
+
const { runListCommand } = await import("./list-CQ2EQEHL.mjs");
|
|
52
52
|
return runListCommand(root);
|
|
53
53
|
}
|
|
54
54
|
return runProjectsCommand(root);
|
|
55
55
|
}
|
|
56
56
|
if (args.subcommand === "token") {
|
|
57
57
|
if (cloudflare) throw new Error("project: CI deploy credentials are available only for Void platform projects.");
|
|
58
|
-
const { runProjectTokenCommand } = await import("./project-token-
|
|
58
|
+
const { runProjectTokenCommand } = await import("./project-token-CBgLBuL6.mjs");
|
|
59
59
|
return runProjectTokenCommand(root, args);
|
|
60
60
|
}
|
|
61
61
|
if (args.subcommand === "team") {
|
|
62
62
|
if (args.action === "") {
|
|
63
|
-
const { printHelpPage } = await import("./help-
|
|
63
|
+
const { printHelpPage } = await import("./help-i2YGGnTH.mjs");
|
|
64
64
|
printHelpPage(["project", "team"]);
|
|
65
65
|
return;
|
|
66
66
|
}
|
|
67
67
|
const accountInvitationAction = args.action === "pending" || args.action === "accept" || args.action === "decline";
|
|
68
68
|
if (cloudflare && !accountInvitationAction) throw new Error("project: Teams are available only for projects hosted on a Void platform, not direct Cloudflare deployments.");
|
|
69
|
-
const { runProjectTeamCommand } = await import("./project-team-
|
|
69
|
+
const { runProjectTeamCommand } = await import("./project-team-DJrWEAG1.mjs");
|
|
70
70
|
return runProjectTeamCommand(root, args);
|
|
71
71
|
}
|
|
72
72
|
if (args.subcommand === "zero-trust") {
|
|
73
73
|
if (cloudflare) throw new Error("project: Zero Trust overrides are available only for projects hosted on a Void platform.");
|
|
74
74
|
if (args.action === "") {
|
|
75
|
-
const { printHelpPage } = await import("./help-
|
|
75
|
+
const { printHelpPage } = await import("./help-i2YGGnTH.mjs");
|
|
76
76
|
printHelpPage(["project", "zero-trust"]);
|
|
77
77
|
return;
|
|
78
78
|
}
|
|
79
79
|
const action = args.action;
|
|
80
|
-
const { runProjectZeroTrustCommand } = await import("./project-zero-trust-
|
|
80
|
+
const { runProjectZeroTrustCommand } = await import("./project-zero-trust-92gLtZ25.mjs");
|
|
81
81
|
return runProjectZeroTrustCommand(root, {
|
|
82
82
|
...args,
|
|
83
83
|
action
|
|
84
84
|
});
|
|
85
85
|
}
|
|
86
86
|
if (args.subcommand === "logs") {
|
|
87
|
-
const { runLogsCommand } = await import("./logs-
|
|
87
|
+
const { runLogsCommand } = await import("./logs-DnC1d7xB.mjs");
|
|
88
88
|
return runLogsCommand(root, args.filter, args.range, args.deployment || void 0, args.level || void 0);
|
|
89
89
|
}
|
|
90
90
|
if (args.subcommand === "requests") {
|
|
91
91
|
if (cloudflare) throw new Error("project: Historical request analytics require the Void platform. Use `void project logs` for a live Cloudflare tail.");
|
|
92
|
-
const { runRequestsCommand } = await import("./requests-
|
|
92
|
+
const { runRequestsCommand } = await import("./requests-7W1Pygt2.mjs");
|
|
93
93
|
return runRequestsCommand(root, args.range, args.status || void 0);
|
|
94
94
|
}
|
|
95
95
|
if (args.subcommand === "rollback") {
|
|
96
|
-
const { runRollbackCommand } = await import("./rollback-
|
|
96
|
+
const { runRollbackCommand } = await import("./rollback-BcASVnwP.mjs");
|
|
97
97
|
return runRollbackCommand(root, args.deployId || void 0);
|
|
98
98
|
}
|
|
99
99
|
if (args.subcommand === "cancel") {
|
|
100
100
|
if (cloudflare) throw new Error("project: Direct Cloudflare deploys activate only after readiness succeeds, so there is no remote build to cancel.");
|
|
101
|
-
const { runCancelDeployCommand } = await import("./cancel-deploy-
|
|
101
|
+
const { runCancelDeployCommand } = await import("./cancel-deploy-CD9o-SsC.mjs");
|
|
102
102
|
return runCancelDeployCommand(root, args.deployId || void 0);
|
|
103
103
|
}
|
|
104
104
|
if (args.subcommand === "delete") {
|
|
105
105
|
if (cloudflare) throw new Error("project: Refusing to delete Cloudflare resources through this command. Direct deployments are additive and existing resources may be shared.");
|
|
106
|
-
const { runDeleteCommand } = await import("./delete-
|
|
106
|
+
const { runDeleteCommand } = await import("./delete-Cy-M1u-r.mjs");
|
|
107
107
|
return runDeleteCommand(root, args.name || void 0, { force: args.force });
|
|
108
108
|
}
|
|
109
109
|
if (args.subcommand === "purge-cache") {
|
|
110
110
|
if (cloudflare) throw new Error("project: Direct Cloudflare ISR cache purge is not available yet; redeploy or purge the configured KV namespace explicitly.");
|
|
111
|
-
const { runPurgeCacheCommand } = await import("./cache-
|
|
111
|
+
const { runPurgeCacheCommand } = await import("./cache-Ctzfig-W.mjs");
|
|
112
112
|
return runPurgeCacheCommand(root, args.projectSlug || void 0);
|
|
113
113
|
}
|
|
114
114
|
}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export { t as validateProjectSlug } from "./project-slug-23TpquG4.mjs";
|
|
@@ -1,9 +1,9 @@
|
|
|
1
1
|
import { r as readProjectConfig } from "./project-rqDnVsJN.mjs";
|
|
2
2
|
import { c as getToken, i as getAccountCredential } from "./auth-B6iOCjKI.mjs";
|
|
3
|
-
import { H as outro, L as log } from "./dist-
|
|
4
|
-
import { h as sanitizeTerminalText, l as formatUrl, m as printSuccess, o as formatCount, p as note } from "./output-
|
|
3
|
+
import { H as outro, L as log } from "./dist-BVdsO7Py.mjs";
|
|
4
|
+
import { h as sanitizeTerminalText, l as formatUrl, m as printSuccess, o as formatCount, p as note } from "./output-Ba6ZbrzY.mjs";
|
|
5
5
|
import { c as platformErrorMessage, n as PlatformApiError, r as PlatformClient, s as parsePlatformErrorBody } from "./client-DM9Kcf4e.mjs";
|
|
6
|
-
import { r as requireProjectBySlug, t as getRequestedProjectSlug } from "./resolve-project-
|
|
6
|
+
import { r as requireProjectBySlug, t as getRequestedProjectSlug } from "./resolve-project-WpwkCB_c.mjs";
|
|
7
7
|
//#region src/cli/project-team.ts
|
|
8
8
|
function clean(value) {
|
|
9
9
|
return (value ?? "—").replace(/[\u0000-\u001f\u007f]/g, " ");
|
|
@@ -1,9 +1,9 @@
|
|
|
1
1
|
import { r as readProjectConfig } from "./project-rqDnVsJN.mjs";
|
|
2
2
|
import { c as getToken } from "./auth-B6iOCjKI.mjs";
|
|
3
|
-
import { H as outro, L as log } from "./dist-
|
|
4
|
-
import { _ as tablePrefix, i as dim, m as printSuccess } from "./output-
|
|
3
|
+
import { H as outro, L as log } from "./dist-BVdsO7Py.mjs";
|
|
4
|
+
import { _ as tablePrefix, i as dim, m as printSuccess } from "./output-Ba6ZbrzY.mjs";
|
|
5
5
|
import { r as PlatformClient } from "./client-DM9Kcf4e.mjs";
|
|
6
|
-
import { r as requireProjectBySlug } from "./resolve-project-
|
|
6
|
+
import { r as requireProjectBySlug } from "./resolve-project-WpwkCB_c.mjs";
|
|
7
7
|
//#region src/cli/project-token.ts
|
|
8
8
|
async function resolveTarget(root, args) {
|
|
9
9
|
const humanToken = getToken(root);
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export { t as attachSelectedPlatform, u as writeProjectConfig } from "./project-rqDnVsJN.mjs";
|
|
@@ -1,9 +1,9 @@
|
|
|
1
1
|
import { r as readProjectConfig } from "./project-rqDnVsJN.mjs";
|
|
2
2
|
import { c as getToken } from "./auth-B6iOCjKI.mjs";
|
|
3
|
-
import { H as outro, L as log } from "./dist-
|
|
4
|
-
import { h as sanitizeTerminalText, m as printSuccess, p as note } from "./output-
|
|
3
|
+
import { H as outro, L as log } from "./dist-BVdsO7Py.mjs";
|
|
4
|
+
import { h as sanitizeTerminalText, m as printSuccess, p as note } from "./output-Ba6ZbrzY.mjs";
|
|
5
5
|
import { r as PlatformClient } from "./client-DM9Kcf4e.mjs";
|
|
6
|
-
import { r as requireProjectBySlug, t as getRequestedProjectSlug } from "./resolve-project-
|
|
6
|
+
import { r as requireProjectBySlug, t as getRequestedProjectSlug } from "./resolve-project-WpwkCB_c.mjs";
|
|
7
7
|
//#region src/cli/project-zero-trust.ts
|
|
8
8
|
async function resolveTarget(root, args) {
|
|
9
9
|
const token = getToken(root);
|
|
@@ -1469,7 +1469,7 @@ async function reconcileD1(desired, configPath, runWrangler, write, persistCreat
|
|
|
1469
1469
|
const parsed = isCleanSuccess(auth) && isRecord(auth.data) ? auth.data : void 0;
|
|
1470
1470
|
if ((parsed?.type === "oauth" || parsed?.type === "api_token") && typeof parsed.token === "string") token = parsed.token;
|
|
1471
1471
|
}
|
|
1472
|
-
if (!token) throw new Error("provision: D1 read replication requires a Cloudflare API bearer with D1 Edit permission.
|
|
1472
|
+
if (!token) throw new Error("provision: D1 read replication requires a Cloudflare API bearer with D1 Edit permission. Run `void cloudflare login`, or set CLOUDFLARE_API_TOKEN, then retry.");
|
|
1473
1473
|
await enableD1ReadReplicationViaApi(context, token);
|
|
1474
1474
|
}
|
|
1475
1475
|
}
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
import { r as readProjectConfig } from "./project-rqDnVsJN.mjs";
|
|
2
2
|
import { c as getToken } from "./auth-B6iOCjKI.mjs";
|
|
3
|
-
import { H as outro, L as log } from "./dist-
|
|
4
|
-
import { f as import_picocolors, i as dim } from "./output-
|
|
3
|
+
import { H as outro, L as log } from "./dist-BVdsO7Py.mjs";
|
|
4
|
+
import { f as import_picocolors, i as dim } from "./output-Ba6ZbrzY.mjs";
|
|
5
5
|
import { r as PlatformClient } from "./client-DM9Kcf4e.mjs";
|
|
6
6
|
//#region src/cli/requests.ts
|
|
7
7
|
async function runRequestsCommand(root, range, status) {
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export { n as inferDefaultSlug } from "./resolve-project-WpwkCB_c.mjs";
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import { a as join } from "./dist-ipQi0Q8y.mjs";
|
|
2
2
|
import { r as readProjectConfig } from "./project-rqDnVsJN.mjs";
|
|
3
|
-
import { L as log } from "./dist-
|
|
3
|
+
import { L as log } from "./dist-BVdsO7Py.mjs";
|
|
4
4
|
import { readFileSync } from "node:fs";
|
|
5
5
|
//#region src/cli/resolve-project.ts
|
|
6
6
|
function getRequestedProjectSlug(options) {
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
import { n as readDeploymentPlatform, r as readProjectConfig } from "./project-rqDnVsJN.mjs";
|
|
2
2
|
import { c as getToken } from "./auth-B6iOCjKI.mjs";
|
|
3
|
-
import { A as confirm, H as outro, K as select, L as log, O as cancel, tt as isCancel } from "./dist-
|
|
4
|
-
import { c as formatRelativeTime, i as dim, m as printSuccess, o as formatCount, r as createSpinner } from "./output-
|
|
3
|
+
import { A as confirm, H as outro, K as select, L as log, O as cancel, tt as isCancel } from "./dist-BVdsO7Py.mjs";
|
|
4
|
+
import { c as formatRelativeTime, i as dim, m as printSuccess, o as formatCount, r as createSpinner } from "./output-Ba6ZbrzY.mjs";
|
|
5
5
|
import { r as PlatformClient } from "./client-DM9Kcf4e.mjs";
|
|
6
6
|
//#region src/cli/rollback.ts
|
|
7
7
|
async function runRollbackCommand(root, deployId) {
|
|
@@ -74,7 +74,7 @@ async function runRollbackCommand(root, deployId) {
|
|
|
74
74
|
}
|
|
75
75
|
}
|
|
76
76
|
async function runCloudflareRollback(root, deployId) {
|
|
77
|
-
const { activateCloudflareExistingVersion, readCloudflareWorkerStatus, resolveCloudflareOperationContext } = await import("./cloudflare-operations-
|
|
77
|
+
const { activateCloudflareExistingVersion, readCloudflareWorkerStatus, resolveCloudflareOperationContext } = await import("./cloudflare-operations-CrSUFRzJ.mjs");
|
|
78
78
|
const context = resolveCloudflareOperationContext(root);
|
|
79
79
|
const status = await readCloudflareWorkerStatus(context);
|
|
80
80
|
const deployedVersionIds = new Set(status.deployedVersionIds);
|
|
@@ -1,51 +1,4 @@
|
|
|
1
|
-
import {
|
|
2
|
-
import { r as writeFileIfChanged } from "./project-tsconfig-bveqhlYA.mjs";
|
|
3
|
-
//#region src/codegen/db-types.ts
|
|
4
|
-
const DRIZZLE_OPERATORS = "sql, eq, ne, gt, gte, lt, lte, and, or, not, desc, asc, like, ilike, notLike, inArray, notInArray, isNull, isNotNull, between, notBetween, exists, notExists, count, sum, avg, min, max";
|
|
5
|
-
const DIALECT_DB_TYPES = {
|
|
6
|
-
sqlite: {
|
|
7
|
-
type: "DrizzleD1Database",
|
|
8
|
-
from: "void/_db",
|
|
9
|
-
arg: "d1: D1Database"
|
|
10
|
-
},
|
|
11
|
-
postgresql: {
|
|
12
|
-
type: "NodePgDatabase",
|
|
13
|
-
from: "void/_db-pg",
|
|
14
|
-
arg: "connectionString: string"
|
|
15
|
-
},
|
|
16
|
-
mysql: {
|
|
17
|
-
type: "MySql2Database",
|
|
18
|
-
from: "void/_db-mysql",
|
|
19
|
-
arg: "connectionString: string"
|
|
20
|
-
}
|
|
21
|
-
};
|
|
22
|
-
/**
|
|
23
|
-
* Generate `.void/db.d.ts` with Drizzle types referencing the user's schema.
|
|
24
|
-
*
|
|
25
|
-
* This is a proper module file (not `declare module`) whose types override
|
|
26
|
-
* the base `void/db` package via a tsconfig `paths` redirect:
|
|
27
|
-
* "void/db": ["./.void/db.d.ts"]
|
|
28
|
-
*
|
|
29
|
-
* Imports reference `void/_db` (internal subpath pointing at the same
|
|
30
|
-
* base module) to avoid circular resolution through the paths redirect.
|
|
31
|
-
*/
|
|
32
|
-
function generateDbDts(outDir, schema, dialect) {
|
|
33
|
-
const { type, from, arg } = DIALECT_DB_TYPES[dialect];
|
|
34
|
-
const schemaType = schema ? "Schema" : "Record<string, never>";
|
|
35
|
-
const lines = [
|
|
36
|
-
"// Auto-generated by void — do not edit",
|
|
37
|
-
...dialect === "sqlite" ? ["/// <reference types=\"@cloudflare/workers-types\" />"] : [],
|
|
38
|
-
`import type { ${type} } from "${from}";`,
|
|
39
|
-
...schema ? ["import type * as schema from \"@schema\";", "type Schema = typeof schema;"] : [],
|
|
40
|
-
`export declare const db: ${type}<${schemaType}>;`,
|
|
41
|
-
`export declare function createDb(${arg}): ${type}<${schemaType}>;`,
|
|
42
|
-
`export { ${DRIZZLE_OPERATORS} } from "void/_db";`,
|
|
43
|
-
`export type { ${type} } from "${from}";`,
|
|
44
|
-
""
|
|
45
|
-
];
|
|
46
|
-
return writeFileIfChanged(join(outDir, "db.d.ts"), lines.join("\n"));
|
|
47
|
-
}
|
|
48
|
-
//#endregion
|
|
1
|
+
import { s as relative } from "./dist-ipQi0Q8y.mjs";
|
|
49
2
|
//#region src/codegen/queue-types.ts
|
|
50
3
|
/**
|
|
51
4
|
* Generate .void/queues.d.ts content.
|
|
@@ -265,4 +218,4 @@ function generateRouteTypes(scan, routesDir, outDir, pagesDir) {
|
|
|
265
218
|
return { dts: lines.join("\n") };
|
|
266
219
|
}
|
|
267
220
|
//#endregion
|
|
268
|
-
export {
|
|
221
|
+
export { generateQueueTypes as n, generateRouteTypes as t };
|
|
@@ -138,12 +138,21 @@ async function runMigrations(migrationsDir, dbPath) {
|
|
|
138
138
|
const insertStmt = db.prepare("INSERT INTO _void_migrations (name) VALUES (?)");
|
|
139
139
|
const checkStmt = db.prepare("SELECT 1 FROM _void_migrations WHERE name = ?");
|
|
140
140
|
const appliedNames = [];
|
|
141
|
-
for (const migration of pending)
|
|
142
|
-
|
|
143
|
-
|
|
144
|
-
|
|
145
|
-
|
|
146
|
-
|
|
141
|
+
for (const migration of pending) {
|
|
142
|
+
const tx = db.transaction(() => {
|
|
143
|
+
if (checkStmt.get(migration.name)) return false;
|
|
144
|
+
db.exec(migration.sql);
|
|
145
|
+
insertStmt.run(migration.name);
|
|
146
|
+
return true;
|
|
147
|
+
});
|
|
148
|
+
let applied;
|
|
149
|
+
try {
|
|
150
|
+
applied = tx.immediate();
|
|
151
|
+
} catch (err) {
|
|
152
|
+
throw new Error(`migration ${migration.name} failed: ${err instanceof Error ? err.message : String(err)}`, { cause: err });
|
|
153
|
+
}
|
|
154
|
+
if (applied) appliedNames.push(migration.name);
|
|
155
|
+
}
|
|
147
156
|
return appliedNames;
|
|
148
157
|
} finally {
|
|
149
158
|
db.close();
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export { t as getApplicationTables, n as getAppliedMigrations, r as getMiniflareDatabasePath, i as openSqliteDatabase, a as runMigrations } from "./runner-CabsQ-iM.mjs";
|