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
package/dist/nitro.mjs
ADDED
|
@@ -0,0 +1,88 @@
|
|
|
1
|
+
import { a as join, n as dirname } from "./dist-ipQi0Q8y.mjs";
|
|
2
|
+
import { d as readConfig, s as getDatabaseDialect } from "./config-Bx_1SpnO.mjs";
|
|
3
|
+
import { r as voidDbBundlerPlugin } from "./dispatch-DrTTk8Xg.mjs";
|
|
4
|
+
import { n as bundleWorkerSqlDriver } from "./wrapper-CwhpNWtH.mjs";
|
|
5
|
+
import { fileURLToPath } from "node:url";
|
|
6
|
+
import { normalizePath } from "vite";
|
|
7
|
+
import { resolve } from "node:path/win32";
|
|
8
|
+
//#region src/nitro.ts
|
|
9
|
+
const envModuleFile = fileURLToPath(import.meta.resolve("#self/_env"));
|
|
10
|
+
const packageDistDir = `${normalizePath(dirname(dirname(envModuleFile)))}/`;
|
|
11
|
+
const REQUEST_SCOPE_PLUGIN = "#void/nitro-request-scope";
|
|
12
|
+
const NODEJS_COMPAT_FLAGS = /* @__PURE__ */ new Set(["nodejs_compat", "nodejs_compat_v2"]);
|
|
13
|
+
/**
|
|
14
|
+
* `path` as Nitro's Rollup names its modules: with backslashes on Windows, as its node-resolve
|
|
15
|
+
* plugin returns them. That plugin looks up an absolute import, such as the `global` polyfill
|
|
16
|
+
* Nitro adds to pg, by walking up from the importer to a package.json. From a module named with
|
|
17
|
+
* forward slashes there, the walk does not stop at the drive root, so it never ends when no
|
|
18
|
+
* package.json is above the module.
|
|
19
|
+
*/
|
|
20
|
+
function nitroModuleId(path) {
|
|
21
|
+
return process.platform === "win32" ? resolve(path) : path;
|
|
22
|
+
}
|
|
23
|
+
/**
|
|
24
|
+
* A Nitro runtime plugin that runs each request in Void's request scope, as the Class A wrapper
|
|
25
|
+
* does, so void/db keeps one PostgreSQL or MySQL client per request instead of one per query.
|
|
26
|
+
*/
|
|
27
|
+
function requestScopePluginSource() {
|
|
28
|
+
return `import { withRuntimeEnv } from ${JSON.stringify(envModuleFile)};
|
|
29
|
+
|
|
30
|
+
export default function voidRequestScope(nitroApp) {
|
|
31
|
+
const handler = nitroApp.h3App.handler;
|
|
32
|
+
// Nitro's Cloudflare entry and dev plugins keep the env here; a dev plugin may first set a
|
|
33
|
+
// promise of it.
|
|
34
|
+
nitroApp.h3App.handler = async (event) =>
|
|
35
|
+
withRuntimeEnv(await globalThis.__env__, () => handler(event));
|
|
36
|
+
}
|
|
37
|
+
`;
|
|
38
|
+
}
|
|
39
|
+
/**
|
|
40
|
+
* Keep Void's `node:async_hooks` imports for workerd's own module. With its `cloudflare.nodeCompat`
|
|
41
|
+
* option off, Nitro bundles a stub whose AsyncLocalStorage loses the request scope at the first
|
|
42
|
+
* await.
|
|
43
|
+
*/
|
|
44
|
+
const nativeAsyncHooksPlugin = {
|
|
45
|
+
name: "void:nitro-async-hooks",
|
|
46
|
+
resolveId(id, importer) {
|
|
47
|
+
if (id === "node:async_hooks" && importer !== void 0 && normalizePath(importer).startsWith(packageDistDir)) return {
|
|
48
|
+
id,
|
|
49
|
+
external: true
|
|
50
|
+
};
|
|
51
|
+
return null;
|
|
52
|
+
}
|
|
53
|
+
};
|
|
54
|
+
/**
|
|
55
|
+
* Nitro module for apps whose server routes Nitro bundles (Nuxt and Analog). Nitro's bundler
|
|
56
|
+
* does not run Vite plugins, so without this module `void/db` in a server route, page server
|
|
57
|
+
* load or cron job is the package's D1 client without the app's schema. Register it in the
|
|
58
|
+
* Nitro config: `modules: ['void/nitro']`.
|
|
59
|
+
*/
|
|
60
|
+
const voidNitroModule = {
|
|
61
|
+
name: "void",
|
|
62
|
+
setup(nitro) {
|
|
63
|
+
const { options } = nitro;
|
|
64
|
+
const config = readConfig(options.rootDir);
|
|
65
|
+
const dialect = getDatabaseDialect(config);
|
|
66
|
+
const workerd = !options.dev && options.exportConditions?.includes("workerd") === true;
|
|
67
|
+
const plugins = [voidDbBundlerPlugin(options.rootDir, {
|
|
68
|
+
config,
|
|
69
|
+
...workerd && { sqlDriver: async (sqlDialect, entry) => nitroModuleId(await bundleWorkerSqlDriver(sqlDialect, entry, join(options.buildDir, "void"))) }
|
|
70
|
+
})];
|
|
71
|
+
const nodeCompat = (flags) => flags?.some((flag) => NODEJS_COMPAT_FLAGS.has(flag)) === true;
|
|
72
|
+
const cloudflareFlags = config.cloudflare?.compatibility_flags;
|
|
73
|
+
if (workerd && (dialect !== "sqlite" || nodeCompat(cloudflareFlags) && nodeCompat(config.worker?.compatibility_flags ?? cloudflareFlags))) {
|
|
74
|
+
options.cloudflare ??= {};
|
|
75
|
+
options.cloudflare.nodeCompat ??= true;
|
|
76
|
+
}
|
|
77
|
+
if (dialect !== "sqlite") {
|
|
78
|
+
options.virtual[REQUEST_SCOPE_PLUGIN] = requestScopePluginSource();
|
|
79
|
+
options.plugins.push(REQUEST_SCOPE_PLUGIN);
|
|
80
|
+
if (workerd) plugins.push(nativeAsyncHooksPlugin);
|
|
81
|
+
}
|
|
82
|
+
const rollupConfig = options.rollupConfig ??= {};
|
|
83
|
+
const existing = rollupConfig.plugins;
|
|
84
|
+
rollupConfig.plugins = [...plugins, ...Array.isArray(existing) ? existing : existing ? [existing] : []];
|
|
85
|
+
}
|
|
86
|
+
};
|
|
87
|
+
//#endregion
|
|
88
|
+
export { voidNitroModule as default };
|
|
@@ -1,11 +1,11 @@
|
|
|
1
1
|
import { n as loadVoidAuthConfig, t as findVoidAuthConfig } from "./config-D0GY5ItR.mjs";
|
|
2
2
|
import { d as readConfig } from "./config-Bx_1SpnO.mjs";
|
|
3
|
-
import { r as getMiniflareDatabasePath } from "./runner-
|
|
3
|
+
import { r as getMiniflareDatabasePath } from "./runner-CabsQ-iM.mjs";
|
|
4
4
|
import { o as loadLocalEnv } from "./env-BJjULvL0.mjs";
|
|
5
5
|
import { r as resolveVoidAuthMigrationSchema } from "./drizzle-CF84FOVM.mjs";
|
|
6
6
|
import { a as pgMigrationRunner, i as mysqlMigrationRunner, n as applyPgAuthMigrations, r as applySqliteAuthMigrations, t as applyMySqlAuthMigrations } from "./auth-migrations-Cgs0k6lS.mjs";
|
|
7
7
|
//#region src/auth/node.ts
|
|
8
|
-
async function runLocalVoidAuthMigrations(root, dialect, persistRoot, databaseId, configPath = findVoidAuthConfig(root)) {
|
|
8
|
+
async function runLocalVoidAuthMigrations(root, dialect, persistRoot, databaseId, configPath = findVoidAuthConfig(root), databaseUrl) {
|
|
9
9
|
const authConfig = await loadVoidAuthConfig(configPath);
|
|
10
10
|
const runtime = {
|
|
11
11
|
dialect,
|
|
@@ -34,7 +34,7 @@ async function runLocalVoidAuthMigrations(root, dialect, persistRoot, databaseId
|
|
|
34
34
|
}
|
|
35
35
|
return;
|
|
36
36
|
}
|
|
37
|
-
const connectionString = typeof env.DATABASE_URL === "string" && env.DATABASE_URL.length > 0 ? env.DATABASE_URL : void 0;
|
|
37
|
+
const connectionString = databaseUrl ?? (typeof env.DATABASE_URL === "string" && env.DATABASE_URL.length > 0 ? env.DATABASE_URL : void 0);
|
|
38
38
|
if (!connectionString) return;
|
|
39
39
|
if (dialect === "mysql") {
|
|
40
40
|
const { createConnection } = await import("mysql2/promise");
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export { a as runOperatorCommand } from "./operator-cmd-DHieWtFp.mjs";
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { h as sanitizeTerminalText, m as printSuccess } from "./output-
|
|
1
|
+
import { h as sanitizeTerminalText, m as printSuccess } from "./output-Ba6ZbrzY.mjs";
|
|
2
2
|
import { n as OperatorClient, r as OperatorClientError } from "./operator-client-C-ROjk1I.mjs";
|
|
3
3
|
import { a as resolveOperatorOrigin, i as removeOperatorToken, n as readOperatorApiTokenStdin, o as saveOperatorToken, r as readOperatorToken, t as exchangeOperatorSession } from "./operator-auth-Cr2zCc-J.mjs";
|
|
4
4
|
import { createHash } from "node:crypto";
|
|
@@ -163,9 +163,9 @@ async function runAuth(origin, args) {
|
|
|
163
163
|
if (args.action === "login" || args.action === "token" && args.tokenStdin) {
|
|
164
164
|
if (!args.tokenStdin && !process.stdin.isTTY) throw new OperatorClientError("Browser login requires an interactive terminal. Use --token-stdin to exchange an API session.", "interactive_login_required");
|
|
165
165
|
const apiToken = args.tokenStdin ? await readOperatorApiTokenStdin() : await (async () => {
|
|
166
|
-
const { discoverPlatform } = await import("./platform-cmd-
|
|
167
|
-
const { selectPlatformLoginMethod } = await import("./login-
|
|
168
|
-
const { runPlatformLogin } = await import("./auth-
|
|
166
|
+
const { discoverPlatform } = await import("./platform-cmd-PT4YwMLM.mjs");
|
|
167
|
+
const { selectPlatformLoginMethod } = await import("./login-XD844Xs-.mjs");
|
|
168
|
+
const { runPlatformLogin } = await import("./auth-Cbqi1iVX.mjs");
|
|
169
169
|
return runPlatformLogin(origin, (await selectPlatformLoginMethod(await discoverPlatform(origin), args.provider)).id, (url) => process.stderr.write(`Sign in at ${url}\n`));
|
|
170
170
|
})();
|
|
171
171
|
const session = await exchangeOperatorSession(origin, apiToken);
|
|
@@ -344,7 +344,7 @@ async function migrateDeploymentAssets(client, origin, args) {
|
|
|
344
344
|
}
|
|
345
345
|
async function runOperatorCommand(args) {
|
|
346
346
|
if (!args.action) {
|
|
347
|
-
const { printHelpPage } = await import("./help-
|
|
347
|
+
const { printHelpPage } = await import("./help-i2YGGnTH.mjs");
|
|
348
348
|
printHelpPage(["platform", args.group]);
|
|
349
349
|
return;
|
|
350
350
|
}
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import { n as __toESM } from "./rolldown-runtime-DXIUcv95.mjs";
|
|
2
2
|
import { t as require_picocolors } from "./picocolors-BTps1_gs.mjs";
|
|
3
|
-
import { B as note$1, H as outro, L as log, P as isCI, nt as settings, q as spinner } from "./dist-
|
|
3
|
+
import { B as note$1, H as outro, L as log, P as isCI, nt as settings, q as spinner } from "./dist-BVdsO7Py.mjs";
|
|
4
4
|
import { stripVTControlCharacters } from "node:util";
|
|
5
5
|
import terminalLink from "terminal-link";
|
|
6
6
|
//#region src/cli/output.ts
|
package/dist/pages/head.mjs
CHANGED
|
@@ -1,2 +1 @@
|
|
|
1
|
-
|
|
2
|
-
export { renderBodyAttrs, renderHeadToString, renderHtmlAttrs, resolveHead };
|
|
1
|
+
export { t as renderBodyAttrs, n as renderHeadToString, r as renderHtmlAttrs, i as resolveHead } from "../head-D2VF4ApL.mjs";
|
package/dist/pages/prefetch.mjs
CHANGED
|
@@ -1,2 +1 @@
|
|
|
1
|
-
|
|
2
|
-
export { PrefetchCache, parseCacheFor };
|
|
1
|
+
export { t as PrefetchCache, n as parseCacheFor } from "../prefetch-Bsc_Pb6c.mjs";
|
package/dist/pages/serialize.mjs
CHANGED
|
@@ -1,2 +1 @@
|
|
|
1
|
-
|
|
2
|
-
export { serializePageData };
|
|
1
|
+
export { t as serializePageData } from "../serialize-BtQyaYoC.mjs";
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export { n as buildMigrationPlanBundle } from "./plan-BhLO2p4w.mjs";
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export { t as parsePlatformArgs } from "./platform-args-CaCL_1Ch.mjs";
|
|
@@ -212,7 +212,7 @@ const platformSubcommands = [
|
|
|
212
212
|
{
|
|
213
213
|
name: "repair",
|
|
214
214
|
arg: "[id]",
|
|
215
|
-
description: "Reconcile a platform
|
|
215
|
+
description: "Reconcile a platform, its dashboard origin, or unfinished login setup"
|
|
216
216
|
},
|
|
217
217
|
{
|
|
218
218
|
name: "disable",
|
|
@@ -255,6 +255,7 @@ function parseLifecycleSelector(rest, subcommand) {
|
|
|
255
255
|
const positional = [];
|
|
256
256
|
let runtime = "";
|
|
257
257
|
let fromRuntime = "";
|
|
258
|
+
let authConfig;
|
|
258
259
|
let dashboardUrl;
|
|
259
260
|
for (let index = 0; index < rest.length; index++) {
|
|
260
261
|
const arg = rest[index];
|
|
@@ -267,6 +268,10 @@ function parseLifecycleSelector(rest, subcommand) {
|
|
|
267
268
|
const [value, next] = readValue(rest, index, arg);
|
|
268
269
|
dashboardUrl = normalizePlatformDashboardUrl(value);
|
|
269
270
|
index = next;
|
|
271
|
+
} else if (arg === "--auth-config" && subcommand === "repair") {
|
|
272
|
+
const [value, next] = readValue(rest, index, arg);
|
|
273
|
+
authConfig = value;
|
|
274
|
+
index = next;
|
|
270
275
|
} else if (arg === "--from-runtime" && subcommand === "rollback") {
|
|
271
276
|
const [value, next] = readValue(rest, index, arg);
|
|
272
277
|
fromRuntime = value;
|
|
@@ -279,6 +284,7 @@ function parseLifecycleSelector(rest, subcommand) {
|
|
|
279
284
|
...parsed,
|
|
280
285
|
runtime,
|
|
281
286
|
fromRuntime,
|
|
287
|
+
...authConfig !== void 0 ? { authConfig } : {},
|
|
282
288
|
...dashboardUrl !== void 0 ? { dashboardUrl } : {}
|
|
283
289
|
};
|
|
284
290
|
}
|
|
@@ -372,7 +378,7 @@ function parsePlatformArgs(args) {
|
|
|
372
378
|
};
|
|
373
379
|
}
|
|
374
380
|
if (subcommand === "upgrade" || subcommand === "rollback" || subcommand === "repair" || subcommand === "disable" || subcommand === "enable") {
|
|
375
|
-
const { selector, plan, runtime, fromRuntime, yes, dashboardUrl } = parseLifecycleSelector(rest, subcommand);
|
|
381
|
+
const { selector, plan, runtime, fromRuntime, yes, authConfig, dashboardUrl } = parseLifecycleSelector(rest, subcommand);
|
|
376
382
|
return subcommand === "rollback" ? {
|
|
377
383
|
subcommand,
|
|
378
384
|
selector,
|
|
@@ -386,6 +392,7 @@ function parsePlatformArgs(args) {
|
|
|
386
392
|
plan,
|
|
387
393
|
runtime,
|
|
388
394
|
yes,
|
|
395
|
+
...authConfig !== void 0 ? { authConfig } : {},
|
|
389
396
|
...dashboardUrl !== void 0 ? { dashboardUrl } : {}
|
|
390
397
|
};
|
|
391
398
|
}
|
|
@@ -1,10 +1,10 @@
|
|
|
1
1
|
import { u as openBrowser } from "./auth-B6iOCjKI.mjs";
|
|
2
|
-
import { A as confirm, K as select, U as password, X as text, z as multiselect } from "./dist-
|
|
3
|
-
import { l as formatUrl, m as printSuccess } from "./output-
|
|
2
|
+
import { A as confirm, K as select, U as password, X as text, z as multiselect } from "./dist-BVdsO7Py.mjs";
|
|
3
|
+
import { l as formatUrl, m as printSuccess } from "./output-Ba6ZbrzY.mjs";
|
|
4
4
|
import { n as OperatorClient } from "./operator-client-C-ROjk1I.mjs";
|
|
5
5
|
import { a as resolveOperatorOrigin, r as readOperatorToken } from "./operator-auth-Cr2zCc-J.mjs";
|
|
6
|
-
import { i as humanLines } from "./operator-cmd-
|
|
7
|
-
import { o as platformPromptAnswer } from "./platform-setup-
|
|
6
|
+
import { i as humanLines } from "./operator-cmd-DHieWtFp.mjs";
|
|
7
|
+
import { o as platformPromptAnswer } from "./platform-setup-YvN9VQXV.mjs";
|
|
8
8
|
import { parsePlatformAdmissionPolicy, parsePlatformLoginConfiguration } from "@void/platform";
|
|
9
9
|
import { stripVTControlCharacters } from "node:util";
|
|
10
10
|
import { setTimeout } from "node:timers/promises";
|
|
@@ -142,11 +142,11 @@ async function configurationInput(args, existing) {
|
|
|
142
142
|
}
|
|
143
143
|
async function runPlatformAuthConfig(args) {
|
|
144
144
|
if (args.action === "recover") {
|
|
145
|
-
const { runPlatformAuthRecovery } = await import("./platform-auth-recovery-
|
|
145
|
+
const { runPlatformAuthRecovery } = await import("./platform-auth-recovery-CXjfqyOv.mjs");
|
|
146
146
|
return runPlatformAuthRecovery(args);
|
|
147
147
|
}
|
|
148
148
|
if (args.action === "protection") {
|
|
149
|
-
const { runPlatformProtectionConfig } = await import("./platform-auth-protection-
|
|
149
|
+
const { runPlatformProtectionConfig } = await import("./platform-auth-protection-BXwZiJSF.mjs");
|
|
150
150
|
return runPlatformProtectionConfig(args);
|
|
151
151
|
}
|
|
152
152
|
const origin = resolveOperatorOrigin(args.connection);
|
package/dist/{platform-auth-protection-D5wvsI-Y.mjs → platform-auth-protection-BXwZiJSF.mjs}
RENAMED
|
@@ -1,12 +1,12 @@
|
|
|
1
1
|
import { S as writePendingInstallationSecrets, c as normalizePlatformApiUrl, m as readInstallationRecoverySecrets, p as promoteInstallationSecrets, t as acquirePlatformLifecycleLock, v as resolveInstallationManifest, x as writeInstallationManifest } from "./platform-registry-B9mWX9LO.mjs";
|
|
2
2
|
import { t as cfAccessHeaders } from "./cf-access-BM9G0lhO.mjs";
|
|
3
3
|
import { t as ensurePlatformAccessToken } from "./cf-access-CWP4avfP.mjs";
|
|
4
|
-
import { A as confirm, tt as isCancel } from "./dist-
|
|
5
|
-
import { m as printSuccess } from "./output-
|
|
4
|
+
import { A as confirm, tt as isCancel } from "./dist-BVdsO7Py.mjs";
|
|
5
|
+
import { m as printSuccess } from "./output-Ba6ZbrzY.mjs";
|
|
6
6
|
import { n as OperatorClient } from "./operator-client-C-ROjk1I.mjs";
|
|
7
7
|
import { a as resolveOperatorOrigin, r as readOperatorToken } from "./operator-auth-Cr2zCc-J.mjs";
|
|
8
|
-
import {
|
|
9
|
-
import { d as verifyPlatformInstallationOwnership, l as selectAuthoritativePlatformManifest } from "./platform-management-
|
|
8
|
+
import { G as PlatformCloudflareClient, H as parsePlatformAccessSetupSpec, R as resolvePlatformCloudflareCredential, U as preparePlatformAccessSetup, V as checkpointPlatformAccessResources, n as resolvePlatformInstallDatabaseUrl, u as acquirePlatformDatabaseLifecycleLock } from "./platform-lifecycle-DBiS0cJd.mjs";
|
|
9
|
+
import { d as verifyPlatformInstallationOwnership, l as selectAuthoritativePlatformManifest } from "./platform-management-DhEFdQAf.mjs";
|
|
10
10
|
import { parsePlatformAccessProtection, platformProtectionProofMessage } from "@void/platform";
|
|
11
11
|
import { createHmac } from "node:crypto";
|
|
12
12
|
import { readFile } from "node:fs/promises";
|
|
@@ -1,10 +1,10 @@
|
|
|
1
1
|
import { m as readInstallationRecoverySecrets, t as acquirePlatformLifecycleLock, v as resolveInstallationManifest } from "./platform-registry-B9mWX9LO.mjs";
|
|
2
2
|
import { u as openBrowser } from "./auth-B6iOCjKI.mjs";
|
|
3
|
-
import { A as confirm, tt as isCancel } from "./dist-
|
|
4
|
-
import { l as formatUrl, m as printSuccess } from "./output-
|
|
3
|
+
import { A as confirm, tt as isCancel } from "./dist-BVdsO7Py.mjs";
|
|
4
|
+
import { l as formatUrl, m as printSuccess } from "./output-Ba6ZbrzY.mjs";
|
|
5
5
|
import { a as resolveOperatorOrigin } from "./operator-auth-Cr2zCc-J.mjs";
|
|
6
|
-
import {
|
|
7
|
-
import { d as verifyPlatformInstallationOwnership, l as selectAuthoritativePlatformManifest } from "./platform-management-
|
|
6
|
+
import { G as PlatformCloudflareClient, R as resolvePlatformCloudflareCredential, d as acquirePlatformDatabaseLifecycleLockConnection, f as platformDatabaseClientUrl, n as resolvePlatformInstallDatabaseUrl } from "./platform-lifecycle-DBiS0cJd.mjs";
|
|
7
|
+
import { d as verifyPlatformInstallationOwnership, l as selectAuthoritativePlatformManifest } from "./platform-management-DhEFdQAf.mjs";
|
|
8
8
|
import { parsePlatformAccessProtection, parsePlatformAdmissionPolicy, parsePlatformLoginConfiguration, platformAuthenticationRecoveryMessage, validatePlatformAdmissionPolicy } from "@void/platform";
|
|
9
9
|
import { createCipheriv, createDecipheriv, createHash, createHmac, hkdfSync, randomBytes, randomUUID } from "node:crypto";
|
|
10
10
|
import { setTimeout } from "node:timers/promises";
|
|
@@ -1,8 +1,8 @@
|
|
|
1
1
|
import { b as selectPlatformConnection, c as normalizePlatformApiUrl, i as getActivePlatformConnection, l as platformConnectionSlug, o as listInstallationManifests, s as listPlatformConnections, y as savePlatformConnection } from "./platform-registry-B9mWX9LO.mjs";
|
|
2
2
|
import { t as cfAccessHeaders } from "./cf-access-BM9G0lhO.mjs";
|
|
3
3
|
import { r as isCloudflareAccessChallenge, t as ensurePlatformAccessToken } from "./cf-access-CWP4avfP.mjs";
|
|
4
|
-
import { K as select, L as log, X as text, tt as isCancel } from "./dist-
|
|
5
|
-
import { f as import_picocolors, l as formatUrl, m as printSuccess } from "./output-
|
|
4
|
+
import { K as select, L as log, X as text, tt as isCancel } from "./dist-BVdsO7Py.mjs";
|
|
5
|
+
import { f as import_picocolors, l as formatUrl, m as printSuccess } from "./output-Ba6ZbrzY.mjs";
|
|
6
6
|
import { n as readPlatformDiscoveryResponse, t as PlatformDisabledError } from "./platform-discovery-CHhNs8Nn.mjs";
|
|
7
7
|
//#region src/cli/platform-cmd.ts
|
|
8
8
|
function normalizePlatformInputUrl(input) {
|
|
@@ -96,19 +96,19 @@ async function runPlatformCommand(_root, args) {
|
|
|
96
96
|
}]
|
|
97
97
|
});
|
|
98
98
|
if (isCancel(group)) return;
|
|
99
|
-
const { parsePlatformArgs } = await import("./platform-args-
|
|
99
|
+
const { parsePlatformArgs } = await import("./platform-args-B0HeTh0C.mjs");
|
|
100
100
|
return runPlatformCommand(_root, parsePlatformArgs(["config", group]));
|
|
101
101
|
}
|
|
102
|
-
const { runPlatformPlansConfig } = await import("./platform-plans-config-
|
|
102
|
+
const { runPlatformPlansConfig } = await import("./platform-plans-config-BWn1S2Rv.mjs");
|
|
103
103
|
await runPlatformPlansConfig(args);
|
|
104
104
|
return;
|
|
105
105
|
}
|
|
106
|
-
const { runPlatformAuthConfig } = await import("./platform-auth-config-
|
|
106
|
+
const { runPlatformAuthConfig } = await import("./platform-auth-config-Z16-I8nT.mjs");
|
|
107
107
|
await runPlatformAuthConfig(args);
|
|
108
108
|
return;
|
|
109
109
|
}
|
|
110
110
|
if (args.subcommand === "operator") {
|
|
111
|
-
const { runOperatorCommand } = await import("./operator-cmd-
|
|
111
|
+
const { runOperatorCommand } = await import("./operator-cmd-D6gnZsnK.mjs");
|
|
112
112
|
await runOperatorCommand(args);
|
|
113
113
|
return;
|
|
114
114
|
}
|
|
@@ -176,7 +176,7 @@ async function runPlatformCommand(_root, args) {
|
|
|
176
176
|
console.log(`Capabilities: ${Object.entries(discovery.capabilities).filter(([, enabled]) => enabled).map(([name]) => name).join(", ")}`);
|
|
177
177
|
return;
|
|
178
178
|
}
|
|
179
|
-
const { runPlatformLifecycleCommand } = await import("./platform-lifecycle-
|
|
179
|
+
const { runPlatformLifecycleCommand } = await import("./platform-lifecycle-u9pMOvxC.mjs");
|
|
180
180
|
await runPlatformLifecycleCommand(args);
|
|
181
181
|
}
|
|
182
182
|
function showSavedInstallationStatus(manifest) {
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export { t as discoverPlatform, r as runPlatformCommand } from "./platform-cmd-DaAOiWTl.mjs";
|
|
@@ -1,9 +1,9 @@
|
|
|
1
1
|
import { m as readInstallationRecoverySecrets, 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 { A as confirm, X as text, tt as isCancel } from "./dist-
|
|
4
|
-
import { m as printSuccess, p as note } from "./output-
|
|
5
|
-
import {
|
|
6
|
-
import { d as verifyPlatformInstallationOwnership, l as selectAuthoritativePlatformManifest, o as resolveInstalledPlatformManifest } from "./platform-management-
|
|
3
|
+
import { A as confirm, X as text, tt as isCancel } from "./dist-BVdsO7Py.mjs";
|
|
4
|
+
import { m as printSuccess, p as note } from "./output-Ba6ZbrzY.mjs";
|
|
5
|
+
import { G as PlatformCloudflareClient, L as assertPlatformOperatorCredentialCanApplyPlan, R as resolvePlatformCloudflareCredential, S as recordResource, T as createPlatformInstallPlan, n as resolvePlatformInstallDatabaseUrl, t as assertNoninteractivePlatformMutationAcknowledged, u as acquirePlatformDatabaseLifecycleLock, w as recordPlatformWorkerTraffic, y as createPlatformHealthProbeToken } from "./platform-lifecycle-DBiS0cJd.mjs";
|
|
6
|
+
import { d as verifyPlatformInstallationOwnership, l as selectAuthoritativePlatformManifest, o as resolveInstalledPlatformManifest } from "./platform-management-DhEFdQAf.mjs";
|
|
7
7
|
import { PLATFORM_HEALTH_HOSTNAME_LABEL, PLATFORM_REMOTE_INSTALLATION_MANIFEST_KEY, createApplicationRoutes, createPlatformDeploymentManifest, normalizeApplicationDomain } from "@void/platform";
|
|
8
8
|
//#region src/cli/platform-domain.ts
|
|
9
9
|
function platformDomainTarget(manifest, domain, zone, dedicatedZone) {
|