void 0.10.5 → 0.10.6
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/agents-Bmr5tFFb.mjs +1454 -0
- package/dist/{auth-cmd-UoCwfDQv.mjs → auth-cmd-DlgNwByu.mjs} +10 -10
- package/dist/{better-auth-shared-D0Mbmx5V.mjs → better-auth-shared-BQooDxbw.mjs} +1 -1
- package/dist/{better-auth-shared-jkksALri.d.mts → better-auth-shared-BvnM9px6.d.mts} +2 -2
- package/dist/{build-cmd-CVyuBHjP.mjs → build-cmd-Br8qL0rA.mjs} +15 -17
- package/dist/{cache-ACORQCIq.mjs → cache-wH-mP8UE.mjs} +10 -12
- package/dist/{cancel-deploy-Gi8zmoZC.mjs → cancel-deploy-BEBOEgtu.mjs} +16 -18
- package/dist/cli/cli.mjs +47 -49
- package/dist/{client-BlbnA92X.mjs → client-Cj96iiBH.mjs} +74 -8
- package/dist/{config-8dLIngKW.mjs → config-1twldYCW.mjs} +10 -10
- package/dist/{config-CbJS4Krx.mjs → config-BdUctCZD.mjs} +4 -4
- package/dist/{create-project-LjvkYziS.mjs → create-project-DD9n8Ho-.mjs} +28 -23
- package/dist/{db-C00yjN01.mjs → db-DjKE2-A-.mjs} +147 -149
- package/dist/{delete-CplfvTgU.mjs → delete-D2kr3Kmk.mjs} +13 -15
- package/dist/{deploy-CISNL5uK.mjs → deploy-C4PbkFyE.mjs} +97 -100
- package/dist/{discover-ZWuBvt22.mjs → discover-BuVVSAum.mjs} +3 -3
- package/dist/{dist-5cGIJHQQ.mjs → dist-BuiRJkTd.mjs} +59 -27
- package/dist/{domain-B4HpcgNG.mjs → domain-_luIsM_B.mjs} +14 -16
- package/dist/{env-DNMJpeVF.mjs → env-CO5XAS9t.mjs} +23 -25
- package/dist/{env-helpers-B_ks681T.d.mts → env-helpers-z4stu8uc.d.mts} +1 -1
- package/dist/{env-types-BS8cZead.mjs → env-types-D51bnR-c.mjs} +3 -3
- package/dist/{env-validation-BxbtBbjh.mjs → env-validation-CeC2FL66.mjs} +4 -4
- package/dist/{fetch-error-C6qffTl2.mjs → fetch-error-Dj3crt0e.mjs} +3 -3
- package/dist/{gen-C0pV2gRQ.mjs → gen-Cf79J4aw.mjs} +42 -44
- package/dist/{github-cmd-CwtLD1yI.mjs → github-cmd-DnqxyOsb.mjs} +88 -90
- package/dist/{handler-B7rCOy21.d.mts → handler-imD0UVDT.d.mts} +4 -5
- package/dist/{headers-BNWymgnH.mjs → headers-BwvFGhkx.mjs} +3 -3
- package/dist/index.d.mts +3 -3
- package/dist/index.mjs +102 -83
- package/dist/{init-D58GxCtt.mjs → init-KirOzVDs.mjs} +132 -134
- package/dist/link-CUmiosyb.mjs +45 -0
- package/dist/{list-CbNNjXTm.mjs → list-3GEw7b6m.mjs} +10 -12
- package/dist/{login-CvxxF_9z.mjs → login-DJReaT_Q.mjs} +14 -15
- package/dist/{logs-BDZ9AuhM.mjs → logs-D-rQ56Lq.mjs} +9 -11
- package/dist/{magic-string.es-C1Fb0uxq.mjs → magic-string.es-ZQjdJFFn.mjs} +3 -3
- package/dist/{mcp-C8BjRt_z.mjs → mcp-D7yc0dXY.mjs} +2 -3
- package/dist/{node-B07cZs0d.mjs → node-yFFk626c.mjs} +6 -6
- package/dist/{package-json-Bg_GJdJB.mjs → package-json-B0NuUWGd.mjs} +1 -1
- package/dist/pages/client.d.mts +1 -1
- package/dist/pages/client.mjs +2 -1
- package/dist/pages/head-client.d.mts +1 -1
- package/dist/pages/head.d.mts +1 -1
- package/dist/pages/index.d.mts +2 -2
- package/dist/pages/index.mjs +5 -5
- package/dist/pages/islands-plugin.d.mts +1 -1
- package/dist/pages/islands-plugin.mjs +3 -3
- package/dist/pages/protocol.d.mts +2 -2
- package/dist/pages/protocol.mjs +5 -2
- package/dist/{plugin-inference-D04iL1mW.mjs → plugin-inference-CJxi_fWI.mjs} +3 -3
- package/dist/{prepare-DUo9q8cM.mjs → prepare-C_cVurhP.mjs} +15 -18
- package/dist/{preset-D0My64KQ.mjs → preset-CVvwCeIy.mjs} +4 -4
- package/dist/{project-cmd-Dd1gNRdd.mjs → project-cmd-DnU7u9QF.mjs} +13 -14
- package/dist/{project-paths-CCMrHYQm.mjs → project-paths-tpdR1mJR.mjs} +2 -2
- package/dist/{project-tsconfig-DMBV55K2.mjs → project-tsconfig-D9uSVVpA.mjs} +2 -2
- package/dist/{protocol-6UZCowS1.d.mts → protocol-6hTJ04T1.d.mts} +3 -3
- package/dist/{resolve-project-D4O1_fZz.mjs → resolve-project-D2HI3TrG.mjs} +2 -2
- package/dist/{rollback-DzmCCrFg.mjs → rollback-Yh7bCKob.mjs} +21 -23
- package/dist/{route-types-BpSJEW20.mjs → route-types-CfKfhbIg.mjs} +234 -3
- package/dist/{runner-BQyKUqAL.mjs → runner-h272wcPj.mjs} +4 -5
- package/dist/{runner-pg-EuhrFW3D.mjs → runner-pg-waxJOnBb.mjs} +1 -1
- package/dist/runtime/ai.mjs +2 -2
- package/dist/runtime/auth.d.mts +1 -1
- package/dist/runtime/better-auth-pg.d.mts +1 -1
- package/dist/runtime/better-auth-pg.mjs +3 -3
- package/dist/runtime/better-auth.d.mts +1 -1
- package/dist/runtime/better-auth.mjs +2 -2
- package/dist/runtime/client-react.d.mts +2 -2
- package/dist/runtime/client-react.mjs +1 -1
- package/dist/runtime/client-solid.d.mts +2 -2
- package/dist/runtime/client-solid.mjs +1 -1
- package/dist/runtime/client-svelte.d.mts +2 -2
- package/dist/runtime/client-svelte.mjs +1 -1
- package/dist/runtime/client-vue.d.mts +2 -2
- package/dist/runtime/client-vue.mjs +1 -1
- package/dist/runtime/client.d.mts +2 -2
- package/dist/runtime/client.mjs +1 -1
- package/dist/runtime/db-pg.d.mts +1 -1
- package/dist/runtime/env-helpers.d.mts +1 -1
- package/dist/runtime/env-public-client.d.mts +1 -1
- package/dist/runtime/env-public-client.mjs +2 -0
- package/dist/runtime/env-public.d.mts +3 -4
- package/dist/runtime/env-public.mjs +3 -1
- package/dist/runtime/env.mjs +1 -1
- package/dist/runtime/fetch-stream.d.mts +1 -1
- package/dist/runtime/fetch-stream.mjs +1 -1
- package/dist/runtime/fetch.d.mts +1 -1
- package/dist/runtime/fetch.mjs +1 -1
- package/dist/runtime/handler.d.mts +2 -2
- package/dist/runtime/handler.mjs +1 -1
- package/dist/runtime/isr.mjs +1 -1
- package/dist/runtime/live-server.mjs +2 -0
- package/dist/runtime/live.d.mts +2 -2
- package/dist/runtime/live.mjs +3 -1
- package/dist/runtime/migration-handler-pg.mjs +1 -1
- package/dist/runtime/migration-handler.mjs +1 -1
- package/dist/runtime/remote/index.mjs +11 -1
- package/dist/runtime/sandbox.d.mts +1 -4
- package/dist/runtime/sandbox.mjs +1 -1
- package/dist/runtime/validator.d.mts +1 -1
- package/dist/runtime/ws-server.d.mts +2 -2
- package/dist/runtime/ws-server.mjs +2 -0
- package/dist/runtime/ws.d.mts +3 -3
- package/dist/runtime/ws.mjs +2 -0
- package/dist/{scan-VCAM1oh3.mjs → scan-Dp_Gyzs3.mjs} +3 -3
- package/dist/{scan---8wfN58.mjs → scan-i7Yz54fv.mjs} +26 -8
- package/dist/{secret-CMLYWkE-.mjs → secret-u7FRvg8d.mjs} +22 -24
- package/dist/{skills-Dl3u05da.mjs → skills-DsdNDtX3.mjs} +6 -7
- package/dist/{subcommand-prompt-B8ng0FTS.mjs → subcommand-prompt-DtES-oP6.mjs} +34 -35
- package/dist/sveltekit.mjs +1 -1
- package/dist/validate-DT7nFMlf.mjs +504 -0
- package/dist/{yarn-pnp-WLW2IHUY.mjs → yarn-pnp-CW8LB6g_.mjs} +1 -1
- package/package.json +19 -19
- package/skills/void/docs/node_modules/void/node_modules/@clack/prompts/CHANGELOG.md +94 -0
- package/skills/void/docs/node_modules/void/node_modules/@clack/prompts/README.md +32 -11
- package/skills/void/docs/node_modules/void/node_modules/@cloudflare/sandbox/README.md +45 -0
- package/skills/void/docs/node_modules/void/node_modules/@electric-sql/pglite/README.md +5 -5
- package/skills/void/docs/node_modules/void/node_modules/@types/node/README.md +1 -1
- package/skills/void/docs/node_modules/void/node_modules/@void/md/node_modules/@types/node/README.md +1 -1
- package/skills/void/docs/node_modules/void/node_modules/@void/md/node_modules/markdown-exit/README.md +4 -1
- package/skills/void/docs/node_modules/void/node_modules/@void/md/node_modules/markdown-it-attrs/README.md +29 -12
- package/skills/void/docs/node_modules/void/node_modules/@void/md/node_modules/tinyglobby/README.md +1 -1
- package/skills/void/docs/node_modules/void/node_modules/@void/md/node_modules/vite-plus/AGENTS.md +1 -0
- package/skills/void/docs/node_modules/void/node_modules/@void/md/node_modules/vite-plus/README.md +18 -6
- package/skills/void/docs/node_modules/void/node_modules/@void/md/node_modules/vite-plus/docs/config/build.md +1 -1
- package/skills/void/docs/node_modules/void/node_modules/@void/md/node_modules/vite-plus/docs/config/check.md +35 -0
- package/skills/void/docs/node_modules/void/node_modules/@void/md/node_modules/vite-plus/docs/config/create.md +70 -0
- package/skills/void/docs/node_modules/void/node_modules/@void/md/node_modules/vite-plus/docs/config/fmt.md +3 -1
- package/skills/void/docs/node_modules/void/node_modules/@void/md/node_modules/vite-plus/docs/config/index.md +11 -7
- package/skills/void/docs/node_modules/void/node_modules/@void/md/node_modules/vite-plus/docs/config/lint.md +3 -1
- package/skills/void/docs/node_modules/void/node_modules/@void/md/node_modules/vite-plus/docs/config/pack.md +1 -1
- package/skills/void/docs/node_modules/void/node_modules/@void/md/node_modules/vite-plus/docs/config/run.md +141 -26
- package/skills/void/docs/node_modules/void/node_modules/@void/md/node_modules/vite-plus/docs/config/staged.md +1 -1
- package/skills/void/docs/node_modules/void/node_modules/@void/md/node_modules/vite-plus/docs/config/test.md +1 -1
- package/skills/void/docs/node_modules/void/node_modules/@void/md/node_modules/vite-plus/docs/guide/automatic-data-tracking.md +145 -0
- package/skills/void/docs/node_modules/void/node_modules/@void/md/node_modules/vite-plus/docs/guide/cache.md +16 -28
- package/skills/void/docs/node_modules/void/node_modules/@void/md/node_modules/vite-plus/docs/guide/check.md +16 -0
- package/skills/void/docs/node_modules/void/node_modules/@void/md/node_modules/vite-plus/docs/guide/ci.md +15 -17
- package/skills/void/docs/node_modules/void/node_modules/@void/md/node_modules/vite-plus/docs/guide/commit-hooks.md +9 -0
- package/skills/void/docs/node_modules/void/node_modules/@void/md/node_modules/vite-plus/docs/guide/create.md +255 -2
- package/skills/void/docs/node_modules/void/node_modules/@void/md/node_modules/vite-plus/docs/guide/docker.md +175 -0
- package/skills/void/docs/node_modules/void/node_modules/@void/md/node_modules/vite-plus/docs/guide/env.md +70 -5
- package/skills/void/docs/node_modules/void/node_modules/@void/md/node_modules/vite-plus/docs/guide/github-actions-cache.md +165 -0
- package/skills/void/docs/node_modules/void/node_modules/@void/md/node_modules/vite-plus/docs/guide/ide-integration.md +2 -2
- package/skills/void/docs/node_modules/void/node_modules/@void/md/node_modules/vite-plus/docs/guide/index.md +9 -3
- package/skills/void/docs/node_modules/void/node_modules/@void/md/node_modules/vite-plus/docs/guide/install.md +63 -11
- package/skills/void/docs/node_modules/void/node_modules/@void/md/node_modules/vite-plus/docs/guide/migrate-rules.md +347 -0
- package/skills/void/docs/node_modules/void/node_modules/@void/md/node_modules/vite-plus/docs/guide/migrate.md +27 -3
- package/skills/void/docs/node_modules/void/node_modules/@void/md/node_modules/vite-plus/docs/guide/monorepo.md +176 -0
- package/skills/void/docs/node_modules/void/node_modules/@void/md/node_modules/vite-plus/docs/guide/pack.md +8 -0
- package/skills/void/docs/node_modules/void/node_modules/@void/md/node_modules/vite-plus/docs/guide/run.md +36 -4
- package/skills/void/docs/node_modules/void/node_modules/@void/md/node_modules/vite-plus/docs/guide/troubleshooting.md +11 -35
- package/skills/void/docs/node_modules/void/node_modules/@void/md/node_modules/vite-plus/docs/guide/upgrade.md +65 -13
- package/skills/void/docs/node_modules/void/node_modules/es-module-lexer/README.md +403 -390
- package/skills/void/docs/node_modules/void/node_modules/pg/README.md +2 -1
- package/skills/void/docs/node_modules/void/node_modules/tinyglobby/README.md +1 -1
- package/skills/void/docs/node_modules/void/node_modules/vite-plus/AGENTS.md +1 -0
- package/skills/void/docs/node_modules/void/node_modules/vite-plus/README.md +18 -6
- package/skills/void/docs/node_modules/void/node_modules/vite-plus/docs/config/build.md +1 -1
- package/skills/void/docs/node_modules/void/node_modules/vite-plus/docs/config/check.md +35 -0
- package/skills/void/docs/node_modules/void/node_modules/vite-plus/docs/config/create.md +70 -0
- package/skills/void/docs/node_modules/void/node_modules/vite-plus/docs/config/fmt.md +3 -1
- package/skills/void/docs/node_modules/void/node_modules/vite-plus/docs/config/index.md +11 -7
- package/skills/void/docs/node_modules/void/node_modules/vite-plus/docs/config/lint.md +3 -1
- package/skills/void/docs/node_modules/void/node_modules/vite-plus/docs/config/pack.md +1 -1
- package/skills/void/docs/node_modules/void/node_modules/vite-plus/docs/config/run.md +141 -26
- package/skills/void/docs/node_modules/void/node_modules/vite-plus/docs/config/staged.md +1 -1
- package/skills/void/docs/node_modules/void/node_modules/vite-plus/docs/config/test.md +1 -1
- package/skills/void/docs/node_modules/void/node_modules/vite-plus/docs/guide/automatic-data-tracking.md +145 -0
- package/skills/void/docs/node_modules/void/node_modules/vite-plus/docs/guide/cache.md +16 -28
- package/skills/void/docs/node_modules/void/node_modules/vite-plus/docs/guide/check.md +16 -0
- package/skills/void/docs/node_modules/void/node_modules/vite-plus/docs/guide/ci.md +15 -17
- package/skills/void/docs/node_modules/void/node_modules/vite-plus/docs/guide/commit-hooks.md +9 -0
- package/skills/void/docs/node_modules/void/node_modules/vite-plus/docs/guide/create.md +255 -2
- package/skills/void/docs/node_modules/void/node_modules/vite-plus/docs/guide/docker.md +175 -0
- package/skills/void/docs/node_modules/void/node_modules/vite-plus/docs/guide/env.md +70 -5
- package/skills/void/docs/node_modules/void/node_modules/vite-plus/docs/guide/github-actions-cache.md +165 -0
- package/skills/void/docs/node_modules/void/node_modules/vite-plus/docs/guide/ide-integration.md +2 -2
- package/skills/void/docs/node_modules/void/node_modules/vite-plus/docs/guide/index.md +9 -3
- package/skills/void/docs/node_modules/void/node_modules/vite-plus/docs/guide/install.md +63 -11
- package/skills/void/docs/node_modules/void/node_modules/vite-plus/docs/guide/migrate-rules.md +347 -0
- package/skills/void/docs/node_modules/void/node_modules/vite-plus/docs/guide/migrate.md +27 -3
- package/skills/void/docs/node_modules/void/node_modules/vite-plus/docs/guide/monorepo.md +176 -0
- package/skills/void/docs/node_modules/void/node_modules/vite-plus/docs/guide/pack.md +8 -0
- package/skills/void/docs/node_modules/void/node_modules/vite-plus/docs/guide/run.md +36 -4
- package/skills/void/docs/node_modules/void/node_modules/vite-plus/docs/guide/troubleshooting.md +11 -35
- package/skills/void/docs/node_modules/void/node_modules/vite-plus/docs/guide/upgrade.md +65 -13
- package/skills/void/docs/reference/cli.md +5 -1
- package/dist/agents-MhSzNMiC.mjs +0 -151
- package/dist/collect-9rO3JFNM.mjs +0 -55
- package/dist/config-hhMYPVRT.mjs +0 -21
- package/dist/dist-abzUneor.mjs +0 -1287
- package/dist/drizzle-DqstQTGq.mjs +0 -232
- package/dist/link-ZFmboqY3.mjs +0 -47
- package/dist/output-DeiS4oEX.mjs +0 -139
- package/dist/plan-aD3wRDqF.mjs +0 -271
- package/dist/project-CH9pdo16.mjs +0 -72
- package/dist/project-slug-rX3kTOfY.mjs +0 -10
- package/dist/validate-CNWm-PsL.mjs +0 -186
- /package/dist/{auth-migrations-BP-hMzYl.mjs → auth-migrations-BTZ-ATvQ.mjs} +0 -0
- /package/dist/{auth-Dz2CCn4T.d.mts → auth-qgMlYp7Z.d.mts} +0 -0
- /package/dist/{canonical-json-CEyQaVDa.mjs → canonical-json-DuDiiUsQ.mjs} +0 -0
- /package/dist/{cf-access-DKDsgwOU.mjs → cf-access-Bqw81xAf.mjs} +0 -0
- /package/dist/{defer-C-bdSM_b.mjs → defer-YsYDUoii.mjs} +0 -0
- /package/dist/{dotenv-lS94ymhM.mjs → dotenv-D_UbC_vc.mjs} +0 -0
- /package/dist/{env-raw-Dtj1UAoK.mjs → env-raw-CoS20LHP.mjs} +0 -0
- /package/dist/{fetch-error-B6RaJ-eZ.d.mts → fetch-error-Sp1R4mZv.d.mts} +0 -0
- /package/dist/{git-metadata-Ce0AtSZL.mjs → git-metadata-CBKaL0v5.mjs} +0 -0
- /package/dist/{head-eOUCWUNy.d.mts → head-nmvOgFjd.d.mts} +0 -0
- /package/dist/{log-BdD_Fpms.mjs → log-ChfPKsVd.mjs} +0 -0
- /package/dist/{pathe.M-eThtNZ-BrPhGF_K.mjs → pathe.M-eThtNZ-CQzLbt4c.mjs} +0 -0
- /package/dist/{pg-CempqvEJ.mjs → pg-J2HbZIkX.mjs} +0 -0
- /package/dist/{providers-BJIoduK9.d.mts → providers-BNKRacMr.d.mts} +0 -0
- /package/dist/{providers-BwPbdHdi.mjs → providers-CJlNS3kT.mjs} +0 -0
- /package/dist/{proxy-M3pxItg2.mjs → proxy-D-3_D-Gl.mjs} +0 -0
- /package/dist/{chunk-DJd-R1mw.mjs → rolldown-runtime-DJK8HYOj.mjs} +0 -0
- /package/dist/{standard-schema-Cy0lfeWv.d.mts → standard-schema-DJ0HW7QP.d.mts} +0 -0
- /package/dist/{types-BodZGegX.d.mts → types-lLjNE9Qp.d.mts} +0 -0
|
@@ -1,38 +1,36 @@
|
|
|
1
|
-
import { a as ensureUtc,
|
|
2
|
-
import { f as getToken, n as PlatformClient } from "./client-
|
|
3
|
-
import { _ as me, c as R, g as ge, i as Ee, v as ue, x as q, y as ye } from "./dist-abzUneor.mjs";
|
|
4
|
-
import { r as readProjectConfig } from "./project-CH9pdo16.mjs";
|
|
1
|
+
import { D as outro, S as confirm, T as log, a as cliTitle, c as ensureUtc, j as isCancel, k as select, o as createSpinner, s as dim, u as import_picocolors, w as intro, x as cancel } from "./agents-Bmr5tFFb.mjs";
|
|
2
|
+
import { b as readProjectConfig, f as getToken, n as PlatformClient } from "./client-Cj96iiBH.mjs";
|
|
5
3
|
//#region src/cli/rollback.ts
|
|
6
4
|
async function runRollbackCommand(root, deployId) {
|
|
7
5
|
console.log();
|
|
8
|
-
|
|
6
|
+
intro(cliTitle("project rollback"));
|
|
9
7
|
const token = getToken(root);
|
|
10
8
|
if (!token) {
|
|
11
|
-
|
|
9
|
+
log.error("Not logged in. Run `void auth login` first.");
|
|
12
10
|
process.exit(1);
|
|
13
11
|
}
|
|
14
12
|
const linked = readProjectConfig(root);
|
|
15
13
|
if (!linked) {
|
|
16
|
-
|
|
14
|
+
log.error("No linked project. Run `void project link` first.");
|
|
17
15
|
process.exit(1);
|
|
18
16
|
}
|
|
19
17
|
const client = new PlatformClient(token, { root });
|
|
20
18
|
const { deployments, activeDeploymentId } = await client.listDeployments(linked.projectId);
|
|
21
19
|
const candidates = deployments.filter((d) => d.retained && d.status === "live" && d.id !== activeDeploymentId);
|
|
22
20
|
if (candidates.length === 0) {
|
|
23
|
-
|
|
24
|
-
|
|
21
|
+
log.warn("No retained deployments available for rollback.");
|
|
22
|
+
outro(dim("Deploy more versions to enable rollback."));
|
|
25
23
|
return;
|
|
26
24
|
}
|
|
27
25
|
let targetId;
|
|
28
26
|
if (deployId) {
|
|
29
27
|
if (!candidates.find((d) => d.id === deployId)) {
|
|
30
|
-
|
|
28
|
+
log.error(`Deployment ${deployId} is not available for rollback (not retained or not found).`);
|
|
31
29
|
process.exit(1);
|
|
32
30
|
}
|
|
33
31
|
targetId = deployId;
|
|
34
32
|
} else {
|
|
35
|
-
const result = await
|
|
33
|
+
const result = await select({
|
|
36
34
|
message: "Select a deployment to roll back to:",
|
|
37
35
|
options: candidates.map((d) => ({
|
|
38
36
|
value: d.id,
|
|
@@ -40,8 +38,8 @@ async function runRollbackCommand(root, deployId) {
|
|
|
40
38
|
hint: d.source ? `via ${d.source}` : void 0
|
|
41
39
|
}))
|
|
42
40
|
});
|
|
43
|
-
if (
|
|
44
|
-
|
|
41
|
+
if (isCancel(result)) {
|
|
42
|
+
cancel("Rollback cancelled.");
|
|
45
43
|
process.exit(0);
|
|
46
44
|
}
|
|
47
45
|
targetId = result;
|
|
@@ -52,12 +50,12 @@ async function runRollbackCommand(root, deployId) {
|
|
|
52
50
|
const targetMigrations = target.applied_migrations ? JSON.parse(target.applied_migrations) : [];
|
|
53
51
|
const migrationDiff = currentMigrations.filter((m) => !targetMigrations.includes(m));
|
|
54
52
|
if (migrationDiff.length > 0) {
|
|
55
|
-
|
|
56
|
-
for (const m of migrationDiff)
|
|
57
|
-
|
|
58
|
-
const proceed = await
|
|
59
|
-
if (
|
|
60
|
-
|
|
53
|
+
log.warn(`The current database has ${migrationDiff.length} migration(s) applied after this deployment:`);
|
|
54
|
+
for (const m of migrationDiff) log.message(` ${dim("•")} ${m}`);
|
|
55
|
+
log.message(dim("Rolling back will NOT revert these migrations. The older code will run against the current schema."));
|
|
56
|
+
const proceed = await confirm({ message: "Proceed with rollback?" });
|
|
57
|
+
if (isCancel(proceed) || !proceed) {
|
|
58
|
+
cancel("Rollback cancelled.");
|
|
61
59
|
process.exit(0);
|
|
62
60
|
}
|
|
63
61
|
}
|
|
@@ -66,17 +64,17 @@ async function runRollbackCommand(root, deployId) {
|
|
|
66
64
|
try {
|
|
67
65
|
const result = await client.rollback(linked.projectId, targetId, { allowDestructive: migrationDiff.length > 0 ? migrationDiff : void 0 });
|
|
68
66
|
s.stop("Rollback complete.");
|
|
69
|
-
if (result.ok)
|
|
67
|
+
if (result.ok) log.success(`Rolled back to ${import_picocolors.default.bold(targetId)}`);
|
|
70
68
|
else {
|
|
71
|
-
|
|
69
|
+
log.error(result.error ?? "Rollback failed.");
|
|
72
70
|
process.exit(1);
|
|
73
71
|
}
|
|
74
72
|
} catch (err) {
|
|
75
73
|
s.stop("Rollback failed.");
|
|
76
|
-
|
|
74
|
+
log.error(err instanceof Error ? err.message : String(err));
|
|
77
75
|
process.exit(1);
|
|
78
76
|
}
|
|
79
|
-
|
|
77
|
+
outro(dim("Traffic is now serving the rolled-back deployment."));
|
|
80
78
|
}
|
|
81
79
|
function formatAge(deployedAt) {
|
|
82
80
|
if (!deployedAt) return "";
|
|
@@ -1,6 +1,8 @@
|
|
|
1
|
-
import { a as join, s as relative } from "./pathe.M-eThtNZ-
|
|
2
|
-
import { r as writeFileIfChanged } from "./project-tsconfig-
|
|
1
|
+
import { a as join, s as relative } from "./pathe.M-eThtNZ-CQzLbt4c.mjs";
|
|
2
|
+
import { r as writeFileIfChanged } from "./project-tsconfig-D9uSVVpA.mjs";
|
|
3
|
+
import { a as isVoidSocialAuthProvider } from "./providers-CJlNS3kT.mjs";
|
|
3
4
|
import { mkdirSync } from "node:fs";
|
|
5
|
+
import { getAuthTables, getSchema } from "better-auth/db";
|
|
4
6
|
//#region src/codegen/db-types.ts
|
|
5
7
|
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";
|
|
6
8
|
/**
|
|
@@ -57,6 +59,235 @@ function generateDbDts(outDir, schema, dialect) {
|
|
|
57
59
|
return writeFileIfChanged(join(outDir, "db.d.ts"), lines.join("\n"));
|
|
58
60
|
}
|
|
59
61
|
//#endregion
|
|
62
|
+
//#region src/auth/drizzle.ts
|
|
63
|
+
const DEFAULT_TABLE_ORDER = Number.MAX_SAFE_INTEGER;
|
|
64
|
+
function resolveEmailAndPassword(configuredProviders) {
|
|
65
|
+
if (!configuredProviders || configuredProviders.includes("email")) return { enabled: true };
|
|
66
|
+
}
|
|
67
|
+
function resolvePlaceholderSocialProviders(configuredProviders) {
|
|
68
|
+
if (!configuredProviders) return;
|
|
69
|
+
const providers = {};
|
|
70
|
+
for (const provider of configuredProviders) {
|
|
71
|
+
if (!isVoidSocialAuthProvider(provider)) continue;
|
|
72
|
+
providers[provider] = {
|
|
73
|
+
clientId: `void-${provider}-client-id`,
|
|
74
|
+
clientSecret: `void-${provider}-client-secret`
|
|
75
|
+
};
|
|
76
|
+
}
|
|
77
|
+
return Object.keys(providers).length > 0 ? providers : void 0;
|
|
78
|
+
}
|
|
79
|
+
function resolveSchemaUserConfig(userConfig, defaults, dialect, env) {
|
|
80
|
+
if (!userConfig) return defaults;
|
|
81
|
+
if (typeof userConfig === "function") return userConfig({
|
|
82
|
+
defaults,
|
|
83
|
+
request: new Request("http://localhost/api/auth"),
|
|
84
|
+
env,
|
|
85
|
+
dialect
|
|
86
|
+
});
|
|
87
|
+
return {
|
|
88
|
+
...defaults,
|
|
89
|
+
...userConfig
|
|
90
|
+
};
|
|
91
|
+
}
|
|
92
|
+
function resolveSchemaOptions(runtime, env) {
|
|
93
|
+
const origin = "http://localhost";
|
|
94
|
+
const emailAndPassword = resolveEmailAndPassword(runtime.providers);
|
|
95
|
+
const socialProviders = resolvePlaceholderSocialProviders(runtime.providers);
|
|
96
|
+
const defaults = {
|
|
97
|
+
baseURL: origin,
|
|
98
|
+
basePath: "/api/auth",
|
|
99
|
+
secret: "void-build-better-auth-secret",
|
|
100
|
+
database: {},
|
|
101
|
+
trustedOrigins: [origin],
|
|
102
|
+
...emailAndPassword ? { emailAndPassword } : {},
|
|
103
|
+
...socialProviders ? { socialProviders } : {}
|
|
104
|
+
};
|
|
105
|
+
return resolveSchemaUserConfig(runtime.userConfig, defaults, runtime.dialect, env);
|
|
106
|
+
}
|
|
107
|
+
function resolveIdStrategy(options) {
|
|
108
|
+
const generateId = options.advanced?.database?.generateId;
|
|
109
|
+
if (generateId === "serial") return "serial";
|
|
110
|
+
if (generateId === "uuid") return "uuid";
|
|
111
|
+
return "text";
|
|
112
|
+
}
|
|
113
|
+
function sanitizeIdentifier(name) {
|
|
114
|
+
const value = name.replace(/[^A-Za-z0-9_$]/g, "_");
|
|
115
|
+
return /^[A-Za-z_$]/.test(value) ? value : `_${value}`;
|
|
116
|
+
}
|
|
117
|
+
function isJsonField(field) {
|
|
118
|
+
return field.type === "json" || field.type === "string[]" || field.type === "number[]";
|
|
119
|
+
}
|
|
120
|
+
function renderEnumValues(values) {
|
|
121
|
+
return `[${values.map((value) => JSON.stringify(value)).join(", ")}] as const`;
|
|
122
|
+
}
|
|
123
|
+
function resolveFieldName(defaultFieldName, field) {
|
|
124
|
+
return field.fieldName ?? defaultFieldName;
|
|
125
|
+
}
|
|
126
|
+
function resolveReferenceFieldName(schema, model, field) {
|
|
127
|
+
if (field === "id") return "id";
|
|
128
|
+
const referencedField = schema[model]?.fields[field];
|
|
129
|
+
return referencedField ? resolveFieldName(field, referencedField) : field;
|
|
130
|
+
}
|
|
131
|
+
function createColumnBuilder(dialect, idStrategy, fieldName, field) {
|
|
132
|
+
const useIdType = fieldName === "id" || field.references?.field === "id";
|
|
133
|
+
if (dialect === "postgresql") {
|
|
134
|
+
if (useIdType) {
|
|
135
|
+
if (idStrategy === "serial") return `integer(${JSON.stringify(fieldName)})`;
|
|
136
|
+
if (idStrategy === "uuid") return `uuid(${JSON.stringify(fieldName)})`;
|
|
137
|
+
return `text(${JSON.stringify(fieldName)})`;
|
|
138
|
+
}
|
|
139
|
+
if (Array.isArray(field.type)) return `text(${JSON.stringify(fieldName)}, { enum: ${renderEnumValues(field.type)} })`;
|
|
140
|
+
if (isJsonField(field)) return `jsonb(${JSON.stringify(fieldName)})`;
|
|
141
|
+
switch (field.type) {
|
|
142
|
+
case "boolean": return `boolean(${JSON.stringify(fieldName)})`;
|
|
143
|
+
case "date": return `timestamp(${JSON.stringify(fieldName)}, { mode: "date", withTimezone: true })`;
|
|
144
|
+
case "number": return field.bigint ? `bigint(${JSON.stringify(fieldName)}, { mode: "number" })` : `integer(${JSON.stringify(fieldName)})`;
|
|
145
|
+
case "string": return `text(${JSON.stringify(fieldName)})`;
|
|
146
|
+
default: return `text(${JSON.stringify(fieldName)})`;
|
|
147
|
+
}
|
|
148
|
+
}
|
|
149
|
+
if (useIdType) {
|
|
150
|
+
if (idStrategy === "serial") return `integer(${JSON.stringify(fieldName)})`;
|
|
151
|
+
return `text(${JSON.stringify(fieldName)})`;
|
|
152
|
+
}
|
|
153
|
+
if (Array.isArray(field.type)) return `text(${JSON.stringify(fieldName)}, { enum: ${renderEnumValues(field.type)} })`;
|
|
154
|
+
if (isJsonField(field)) return `text(${JSON.stringify(fieldName)}, { mode: "json" })`;
|
|
155
|
+
switch (field.type) {
|
|
156
|
+
case "boolean": return `integer(${JSON.stringify(fieldName)}, { mode: "boolean" })`;
|
|
157
|
+
case "date": return `integer(${JSON.stringify(fieldName)}, { mode: "timestamp_ms" })`;
|
|
158
|
+
case "number": return `integer(${JSON.stringify(fieldName)})`;
|
|
159
|
+
case "string": return `text(${JSON.stringify(fieldName)})`;
|
|
160
|
+
default: return `text(${JSON.stringify(fieldName)})`;
|
|
161
|
+
}
|
|
162
|
+
}
|
|
163
|
+
function createColumnDefinition(dialect, schema, idStrategy, defaultToVariable, defaultFieldName, field) {
|
|
164
|
+
const actualFieldName = resolveFieldName(defaultFieldName, field);
|
|
165
|
+
const parts = [createColumnBuilder(dialect, idStrategy, actualFieldName, field)];
|
|
166
|
+
if (actualFieldName === "id") parts.push(".primaryKey()");
|
|
167
|
+
if (field.required !== false || actualFieldName === "id") parts.push(".notNull()");
|
|
168
|
+
if (field.references) {
|
|
169
|
+
const referenceModel = Object.entries(schema).find(([_, value]) => value.modelName === field.references?.model)?.[0] ?? field.references.model;
|
|
170
|
+
const referenceVariable = defaultToVariable.get(referenceModel);
|
|
171
|
+
if (referenceVariable) {
|
|
172
|
+
const referenceFieldName = resolveReferenceFieldName(schema, referenceModel, field.references.field);
|
|
173
|
+
parts.push(`.references(() => ${referenceVariable}[${JSON.stringify(referenceFieldName)}], { onDelete: ${JSON.stringify(field.references.onDelete ?? "cascade")} })`);
|
|
174
|
+
}
|
|
175
|
+
}
|
|
176
|
+
if (field.unique && actualFieldName !== "id") parts.push(".unique()");
|
|
177
|
+
return parts.join("");
|
|
178
|
+
}
|
|
179
|
+
function collectCoreImports(dialect, schema, idStrategy) {
|
|
180
|
+
const imports = /* @__PURE__ */ new Set([dialect === "postgresql" ? "pgTable" : "sqliteTable", "text"]);
|
|
181
|
+
if (idStrategy === "serial") imports.add("integer");
|
|
182
|
+
if (idStrategy === "uuid" && dialect === "postgresql") imports.add("uuid");
|
|
183
|
+
for (const [, table] of Object.entries(schema)) for (const [defaultFieldName, field] of Object.entries(table.fields)) {
|
|
184
|
+
if (resolveFieldName(defaultFieldName, field) === "id" || field.references?.field === "id") {
|
|
185
|
+
if (idStrategy === "serial") imports.add("integer");
|
|
186
|
+
if (idStrategy === "uuid" && dialect === "postgresql") imports.add("uuid");
|
|
187
|
+
continue;
|
|
188
|
+
}
|
|
189
|
+
if (field.index) imports.add("index");
|
|
190
|
+
if (Array.isArray(field.type) || field.type === "string") {
|
|
191
|
+
imports.add("text");
|
|
192
|
+
continue;
|
|
193
|
+
}
|
|
194
|
+
if (isJsonField(field)) {
|
|
195
|
+
imports.add(dialect === "postgresql" ? "jsonb" : "text");
|
|
196
|
+
continue;
|
|
197
|
+
}
|
|
198
|
+
if (field.type === "boolean") {
|
|
199
|
+
imports.add(dialect === "postgresql" ? "boolean" : "integer");
|
|
200
|
+
continue;
|
|
201
|
+
}
|
|
202
|
+
if (field.type === "date") {
|
|
203
|
+
imports.add(dialect === "postgresql" ? "timestamp" : "integer");
|
|
204
|
+
continue;
|
|
205
|
+
}
|
|
206
|
+
if (field.type === "number") {
|
|
207
|
+
imports.add("integer");
|
|
208
|
+
if (field.bigint && dialect === "postgresql") imports.add("bigint");
|
|
209
|
+
}
|
|
210
|
+
}
|
|
211
|
+
return [...imports].sort();
|
|
212
|
+
}
|
|
213
|
+
function generateVoidAuthDrizzleSchema(runtime, env = {}) {
|
|
214
|
+
const options = resolveSchemaOptions(runtime, env);
|
|
215
|
+
const schema = getAuthTables(options);
|
|
216
|
+
const migrationSchema = resolveVoidAuthMigrationSchema(runtime, env);
|
|
217
|
+
const idStrategy = resolveIdStrategy(options);
|
|
218
|
+
const defaultToVariable = /* @__PURE__ */ new Map();
|
|
219
|
+
const entries = Object.entries(schema).sort(([, left], [, right]) => (left.order ?? DEFAULT_TABLE_ORDER) - (right.order ?? DEFAULT_TABLE_ORDER));
|
|
220
|
+
for (const [defaultModelName] of entries) defaultToVariable.set(defaultModelName, `${sanitizeIdentifier(defaultModelName)}Table`);
|
|
221
|
+
const tableFactory = runtime.dialect === "postgresql" ? "pgTable" : "sqliteTable";
|
|
222
|
+
const importPath = runtime.dialect === "postgresql" ? "void/schema-pg" : "void/schema-d1";
|
|
223
|
+
const lines = [
|
|
224
|
+
"// Auto-generated by void — do not edit",
|
|
225
|
+
`import { ${collectCoreImports(runtime.dialect, schema, idStrategy).join(", ")} } from ${JSON.stringify(importPath)};`,
|
|
226
|
+
""
|
|
227
|
+
];
|
|
228
|
+
for (const [defaultModelName, table] of entries) {
|
|
229
|
+
const variableName = defaultToVariable.get(defaultModelName);
|
|
230
|
+
const fieldEntries = Object.entries(table.fields);
|
|
231
|
+
const renderedFields = [` "id": ${createColumnDefinition(runtime.dialect, schema, idStrategy, defaultToVariable, "id", {
|
|
232
|
+
type: idStrategy === "serial" ? "number" : "string",
|
|
233
|
+
required: true
|
|
234
|
+
})},`, ...fieldEntries.map(([defaultFieldName, field]) => {
|
|
235
|
+
const actualFieldName = resolveFieldName(defaultFieldName, field);
|
|
236
|
+
return ` ${JSON.stringify(actualFieldName)}: ${createColumnDefinition(runtime.dialect, schema, idStrategy, defaultToVariable, defaultFieldName, field)},`;
|
|
237
|
+
})];
|
|
238
|
+
const indexedFields = fieldEntries.filter(([, field]) => field.index && !field.unique);
|
|
239
|
+
if (indexedFields.length > 0) lines.push(`export const ${variableName} = ${tableFactory}(${JSON.stringify(table.modelName)}, {`, ...renderedFields, `}, (table) => [`, ...indexedFields.map(([defaultFieldName, field]) => {
|
|
240
|
+
const actualFieldName = resolveFieldName(defaultFieldName, field);
|
|
241
|
+
return ` index(${JSON.stringify(`${table.modelName}_${actualFieldName}_idx`)}).on(table[${JSON.stringify(actualFieldName)}]),`;
|
|
242
|
+
}), `]);`);
|
|
243
|
+
else lines.push(`export const ${variableName} = ${tableFactory}(${JSON.stringify(table.modelName)}, {`, ...renderedFields, `});`);
|
|
244
|
+
lines.push("");
|
|
245
|
+
}
|
|
246
|
+
lines.push("export const schema = {");
|
|
247
|
+
for (const [defaultModelName] of entries) lines.push(` ${JSON.stringify(defaultModelName)}: ${defaultToVariable.get(defaultModelName)},`);
|
|
248
|
+
lines.push("} as const;");
|
|
249
|
+
lines.push(`export const migrationSchema = ${JSON.stringify(migrationSchema, null, 2)} as const;`);
|
|
250
|
+
lines.push("");
|
|
251
|
+
return lines.join("\n") + "\n";
|
|
252
|
+
}
|
|
253
|
+
function resolveVoidAuthMigrationSchema(runtime, env = {}) {
|
|
254
|
+
const options = resolveSchemaOptions(runtime, env);
|
|
255
|
+
const schema = getSchema(options);
|
|
256
|
+
return {
|
|
257
|
+
dialect: runtime.dialect,
|
|
258
|
+
idStrategy: resolveIdStrategy(options),
|
|
259
|
+
tables: Object.entries(schema).sort(([, left], [, right]) => (left.order ?? DEFAULT_TABLE_ORDER) - (right.order ?? DEFAULT_TABLE_ORDER)).map(([name, table]) => ({
|
|
260
|
+
name,
|
|
261
|
+
order: table.order ?? DEFAULT_TABLE_ORDER,
|
|
262
|
+
fields: Object.fromEntries(Object.entries(table.fields).map(([fieldName, field]) => [fieldName, {
|
|
263
|
+
type: field.type,
|
|
264
|
+
required: field.required !== false,
|
|
265
|
+
unique: field.unique === true,
|
|
266
|
+
index: field.index === true,
|
|
267
|
+
bigint: field.bigint === true,
|
|
268
|
+
...field.references ? { references: {
|
|
269
|
+
table: field.references.model,
|
|
270
|
+
field: field.references.field,
|
|
271
|
+
...field.references.onDelete ? { onDelete: field.references.onDelete } : {}
|
|
272
|
+
} } : {}
|
|
273
|
+
}]))
|
|
274
|
+
}))
|
|
275
|
+
};
|
|
276
|
+
}
|
|
277
|
+
function generateVoidAuthDatabaseModule(options) {
|
|
278
|
+
const schemaImport = JSON.stringify(options.schemaImportPath);
|
|
279
|
+
const provider = options.dialect === "postgresql" ? "pg" : "sqlite";
|
|
280
|
+
return [
|
|
281
|
+
"// Auto-generated by void — do not edit",
|
|
282
|
+
`import { drizzleAdapter } from ${JSON.stringify(options.drizzleAdapterPath)};`,
|
|
283
|
+
`import { db as __voidDb } from "void/db";`,
|
|
284
|
+
`import { schema as __voidAuthSchema } from ${schemaImport};`,
|
|
285
|
+
"",
|
|
286
|
+
`export const __voidAuthDatabase = drizzleAdapter(__voidDb, { provider: ${JSON.stringify(provider)}, schema: __voidAuthSchema });`,
|
|
287
|
+
""
|
|
288
|
+
].join("\n");
|
|
289
|
+
}
|
|
290
|
+
//#endregion
|
|
60
291
|
//#region src/codegen/queue-types.ts
|
|
61
292
|
/**
|
|
62
293
|
* Generate .void/queues.d.ts content.
|
|
@@ -253,4 +484,4 @@ function generateRouteTypes(scan, routesDir, outDir, pagesDir) {
|
|
|
253
484
|
return { dts: lines.join("\n") };
|
|
254
485
|
}
|
|
255
486
|
//#endregion
|
|
256
|
-
export {
|
|
487
|
+
export { resolveVoidAuthMigrationSchema as a, generateVoidAuthDrizzleSchema as i, generateQueueTypes as n, DRIZZLE_OPERATORS as o, generateVoidAuthDatabaseModule as r, generateDbDts as s, generateRouteTypes as t };
|
|
@@ -1,11 +1,10 @@
|
|
|
1
|
-
import { a as join, n as dirname } from "./pathe.M-eThtNZ-
|
|
2
|
-
import {
|
|
3
|
-
import { r as
|
|
4
|
-
import { n as hasPackageDependency, r as readNearestPackageJson } from "./package-json-Bg_GJdJB.mjs";
|
|
1
|
+
import { a as join, n as dirname } from "./pathe.M-eThtNZ-CQzLbt4c.mjs";
|
|
2
|
+
import { c as collectMigrations, o as classifyMigration } from "./validate-DT7nFMlf.mjs";
|
|
3
|
+
import { n as hasPackageDependency, r as readNearestPackageJson } from "./package-json-B0NuUWGd.mjs";
|
|
5
4
|
import { existsSync, mkdirSync } from "node:fs";
|
|
6
5
|
import { createHash, createHmac } from "node:crypto";
|
|
7
6
|
//#region src/migrations/runner.ts
|
|
8
|
-
const SQLITE_INTERNAL_TABLES = new Set([
|
|
7
|
+
const SQLITE_INTERNAL_TABLES = /* @__PURE__ */ new Set([
|
|
9
8
|
"_cf_METADATA",
|
|
10
9
|
"_migrations",
|
|
11
10
|
"_void_migrations",
|
package/dist/runtime/ai.mjs
CHANGED
|
@@ -1,5 +1,5 @@
|
|
|
1
|
-
import { t as cfAccessHeaders } from "../cf-access-
|
|
2
|
-
import { i as getRawRuntimeEnv } from "../env-raw-
|
|
1
|
+
import { t as cfAccessHeaders } from "../cf-access-Bqw81xAf.mjs";
|
|
2
|
+
import { i as getRawRuntimeEnv } from "../env-raw-CoS20LHP.mjs";
|
|
3
3
|
//#region src/runtime/ai-types.ts
|
|
4
4
|
/** Maps provider prefix to expected env var name for the API key */
|
|
5
5
|
const PROVIDER_KEY_MAP = {
|
package/dist/runtime/auth.d.mts
CHANGED
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
import { a as VoidAuthConfigContext, c as getSession, i as VoidAuthConfig, l as getUser, n as AuthState, o as authContext, r as AuthUser, s as defineAuth, t as AuthSession, u as requireAuth } from "../auth-
|
|
1
|
+
import { a as VoidAuthConfigContext, c as getSession, i as VoidAuthConfig, l as getUser, n as AuthState, o as authContext, r as AuthUser, s as defineAuth, t as AuthSession, u as requireAuth } from "../auth-qgMlYp7Z.mjs";
|
|
2
2
|
export { AuthSession, AuthState, AuthUser, VoidAuthConfig, VoidAuthConfigContext, authContext, defineAuth, getSession, getUser, requireAuth };
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { i as VoidAuthRuntimeOptions, n as VoidAuthEnv, r as VoidAuthRuntimeApi, t as VoidAuthDialect } from "../better-auth-shared-
|
|
1
|
+
import { i as VoidAuthRuntimeOptions, n as VoidAuthEnv, r as VoidAuthRuntimeApi, t as VoidAuthDialect } from "../better-auth-shared-BvnM9px6.mjs";
|
|
2
2
|
|
|
3
3
|
//#region src/runtime/better-auth-pg.d.ts
|
|
4
4
|
declare const resolveVoidAuthOptions: VoidAuthRuntimeApi["resolveVoidAuthOptions"];
|
|
@@ -1,6 +1,6 @@
|
|
|
1
|
-
import { t as applyPgAuthMigrations } from "../auth-migrations-
|
|
2
|
-
import { t as createVoidAuthRuntime } from "../better-auth-shared-
|
|
3
|
-
import { t as disablePgPassFallback } from "../pg-
|
|
1
|
+
import { t as applyPgAuthMigrations } from "../auth-migrations-BTZ-ATvQ.mjs";
|
|
2
|
+
import { t as createVoidAuthRuntime } from "../better-auth-shared-BQooDxbw.mjs";
|
|
3
|
+
import { t as disablePgPassFallback } from "../pg-J2HbZIkX.mjs";
|
|
4
4
|
//#region src/runtime/better-auth-pg.ts
|
|
5
5
|
function resolveConnectionString(env) {
|
|
6
6
|
const connectionString = typeof env.DATABASE_URL === "string" && env.DATABASE_URL.length > 0 ? env.DATABASE_URL : typeof env.HYPERDRIVE?.connectionString === "string" && env.HYPERDRIVE.connectionString.length > 0 ? env.HYPERDRIVE.connectionString : void 0;
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { i as VoidAuthRuntimeOptions, n as VoidAuthEnv, r as VoidAuthRuntimeApi, t as VoidAuthDialect } from "../better-auth-shared-
|
|
1
|
+
import { i as VoidAuthRuntimeOptions, n as VoidAuthEnv, r as VoidAuthRuntimeApi, t as VoidAuthDialect } from "../better-auth-shared-BvnM9px6.mjs";
|
|
2
2
|
|
|
3
3
|
//#region src/runtime/better-auth.d.ts
|
|
4
4
|
declare const resolveVoidAuthOptions: VoidAuthRuntimeApi["resolveVoidAuthOptions"];
|
|
@@ -1,5 +1,5 @@
|
|
|
1
|
-
import { n as applySqliteAuthMigrations } from "../auth-migrations-
|
|
2
|
-
import { t as createVoidAuthRuntime } from "../better-auth-shared-
|
|
1
|
+
import { n as applySqliteAuthMigrations } from "../auth-migrations-BTZ-ATvQ.mjs";
|
|
2
|
+
import { t as createVoidAuthRuntime } from "../better-auth-shared-BQooDxbw.mjs";
|
|
3
3
|
//#region src/runtime/better-auth.ts
|
|
4
4
|
async function resolveDatabase(env) {
|
|
5
5
|
if (!env.DB) throw new Error("auth: Better Auth requires the \"DB\" D1 binding for sqlite apps.");
|
|
@@ -1,6 +1,6 @@
|
|
|
1
|
-
import { n as AuthState, r as AuthUser, t as AuthSession } from "../auth-
|
|
1
|
+
import { n as AuthState, r as AuthUser, t as AuthSession } from "../auth-qgMlYp7Z.mjs";
|
|
2
2
|
import { auth, createAuthClient } from "./auth-client-react.mjs";
|
|
3
|
-
import { t as FetchError } from "../fetch-error-
|
|
3
|
+
import { t as FetchError } from "../fetch-error-Sp1R4mZv.mjs";
|
|
4
4
|
import { fetch } from "./fetch.mjs";
|
|
5
5
|
import { fetchStream } from "./fetch-stream.mjs";
|
|
6
6
|
export { type AuthSession, type AuthState, type AuthUser, FetchError, FetchError as StreamError, auth, createAuthClient, fetch, fetchStream };
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { t as FetchError } from "../fetch-error-
|
|
1
|
+
import { t as FetchError } from "../fetch-error-Dj3crt0e.mjs";
|
|
2
2
|
import { fetch } from "./fetch.mjs";
|
|
3
3
|
import { fetchStream } from "./fetch-stream.mjs";
|
|
4
4
|
import { auth, createAuthClient } from "./auth-client-react.mjs";
|
|
@@ -1,6 +1,6 @@
|
|
|
1
|
-
import { n as AuthState, r as AuthUser, t as AuthSession } from "../auth-
|
|
1
|
+
import { n as AuthState, r as AuthUser, t as AuthSession } from "../auth-qgMlYp7Z.mjs";
|
|
2
2
|
import { auth, createAuthClient } from "./auth-client-solid.mjs";
|
|
3
|
-
import { t as FetchError } from "../fetch-error-
|
|
3
|
+
import { t as FetchError } from "../fetch-error-Sp1R4mZv.mjs";
|
|
4
4
|
import { fetch } from "./fetch.mjs";
|
|
5
5
|
import { fetchStream } from "./fetch-stream.mjs";
|
|
6
6
|
export { type AuthSession, type AuthState, type AuthUser, FetchError, FetchError as StreamError, auth, createAuthClient, fetch, fetchStream };
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { t as FetchError } from "../fetch-error-
|
|
1
|
+
import { t as FetchError } from "../fetch-error-Dj3crt0e.mjs";
|
|
2
2
|
import { fetch } from "./fetch.mjs";
|
|
3
3
|
import { fetchStream } from "./fetch-stream.mjs";
|
|
4
4
|
import { auth, createAuthClient } from "./auth-client-solid.mjs";
|
|
@@ -1,6 +1,6 @@
|
|
|
1
|
-
import { n as AuthState, r as AuthUser, t as AuthSession } from "../auth-
|
|
1
|
+
import { n as AuthState, r as AuthUser, t as AuthSession } from "../auth-qgMlYp7Z.mjs";
|
|
2
2
|
import { auth, createAuthClient } from "./auth-client-svelte.mjs";
|
|
3
|
-
import { t as FetchError } from "../fetch-error-
|
|
3
|
+
import { t as FetchError } from "../fetch-error-Sp1R4mZv.mjs";
|
|
4
4
|
import { fetch } from "./fetch.mjs";
|
|
5
5
|
import { fetchStream } from "./fetch-stream.mjs";
|
|
6
6
|
export { type AuthSession, type AuthState, type AuthUser, FetchError, FetchError as StreamError, auth, createAuthClient, fetch, fetchStream };
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { t as FetchError } from "../fetch-error-
|
|
1
|
+
import { t as FetchError } from "../fetch-error-Dj3crt0e.mjs";
|
|
2
2
|
import { fetch } from "./fetch.mjs";
|
|
3
3
|
import { fetchStream } from "./fetch-stream.mjs";
|
|
4
4
|
import { auth, createAuthClient } from "./auth-client-svelte.mjs";
|
|
@@ -1,6 +1,6 @@
|
|
|
1
|
-
import { n as AuthState, r as AuthUser, t as AuthSession } from "../auth-
|
|
1
|
+
import { n as AuthState, r as AuthUser, t as AuthSession } from "../auth-qgMlYp7Z.mjs";
|
|
2
2
|
import { auth, createAuthClient } from "./auth-client-vue.mjs";
|
|
3
|
-
import { t as FetchError } from "../fetch-error-
|
|
3
|
+
import { t as FetchError } from "../fetch-error-Sp1R4mZv.mjs";
|
|
4
4
|
import { fetch } from "./fetch.mjs";
|
|
5
5
|
import { fetchStream } from "./fetch-stream.mjs";
|
|
6
6
|
export { type AuthSession, type AuthState, type AuthUser, FetchError, FetchError as StreamError, auth, createAuthClient, fetch, fetchStream };
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { t as FetchError } from "../fetch-error-
|
|
1
|
+
import { t as FetchError } from "../fetch-error-Dj3crt0e.mjs";
|
|
2
2
|
import { fetch } from "./fetch.mjs";
|
|
3
3
|
import { fetchStream } from "./fetch-stream.mjs";
|
|
4
4
|
import { auth, createAuthClient } from "./auth-client-vue.mjs";
|
|
@@ -1,6 +1,6 @@
|
|
|
1
|
-
import { n as AuthState, r as AuthUser, t as AuthSession } from "../auth-
|
|
1
|
+
import { n as AuthState, r as AuthUser, t as AuthSession } from "../auth-qgMlYp7Z.mjs";
|
|
2
2
|
import { auth, createAuthClient } from "./auth-client.mjs";
|
|
3
|
-
import { t as FetchError } from "../fetch-error-
|
|
3
|
+
import { t as FetchError } from "../fetch-error-Sp1R4mZv.mjs";
|
|
4
4
|
import { fetch } from "./fetch.mjs";
|
|
5
5
|
import { fetchStream } from "./fetch-stream.mjs";
|
|
6
6
|
export { type AuthSession, type AuthState, type AuthUser, FetchError, FetchError as StreamError, auth, createAuthClient, fetch, fetchStream };
|
package/dist/runtime/client.mjs
CHANGED
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { t as FetchError } from "../fetch-error-
|
|
1
|
+
import { t as FetchError } from "../fetch-error-Dj3crt0e.mjs";
|
|
2
2
|
import { fetch } from "./fetch.mjs";
|
|
3
3
|
import { fetchStream } from "./fetch-stream.mjs";
|
|
4
4
|
import { auth, createAuthClient } from "./auth-client.mjs";
|
package/dist/runtime/db-pg.d.mts
CHANGED
|
@@ -1,2 +1,2 @@
|
|
|
1
1
|
import { NodePgDatabase } from "drizzle-orm/node-postgres";
|
|
2
|
-
export {
|
|
2
|
+
export type { NodePgDatabase };
|
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
import { a as getSecretOverride, c as oneOf, i as email, l as string, n as SECRET_OVERRIDE_SYMBOL, o as json, r as boolean, s as number, t as EnvSchema, u as url } from "../env-helpers-
|
|
1
|
+
import { a as getSecretOverride, c as oneOf, i as email, l as string, n as SECRET_OVERRIDE_SYMBOL, o as json, r as boolean, s as number, t as EnvSchema, u as url } from "../env-helpers-z4stu8uc.mjs";
|
|
2
2
|
export { EnvSchema, SECRET_OVERRIDE_SYMBOL, boolean, email, getSecretOverride, json, number, oneOf, string, url };
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { c as oneOf, i as email, l as string, o as json, r as boolean, s as number, t as EnvSchema, u as url } from "../env-helpers-
|
|
1
|
+
import { c as oneOf, i as email, l as string, o as json, r as boolean, s as number, t as EnvSchema, u as url } from "../env-helpers-z4stu8uc.mjs";
|
|
2
2
|
|
|
3
3
|
//#region src/runtime/env-public-client.d.ts
|
|
4
4
|
declare const env: Record<string, unknown>;
|
|
@@ -1,7 +1,6 @@
|
|
|
1
1
|
/// <reference types="@cloudflare/workers-types" />
|
|
2
|
-
import { t as StandardSchemaV1 } from "../standard-schema-
|
|
3
|
-
import { c as oneOf, i as email, l as string, o as json, r as boolean, s as number, t as EnvSchema, u as url } from "../env-helpers-
|
|
4
|
-
import * as _$_cloudflare_sandbox0 from "@cloudflare/sandbox";
|
|
2
|
+
import { t as StandardSchemaV1 } from "../standard-schema-DJ0HW7QP.mjs";
|
|
3
|
+
import { c as oneOf, i as email, l as string, o as json, r as boolean, s as number, t as EnvSchema, u as url } from "../env-helpers-z4stu8uc.mjs";
|
|
5
4
|
|
|
6
5
|
//#region src/runtime/env-public.d.ts
|
|
7
6
|
type AnyValidator = StandardSchemaV1<unknown, unknown>;
|
|
@@ -120,7 +119,7 @@ declare global {
|
|
|
120
119
|
KV: KVNamespace;
|
|
121
120
|
STORAGE: R2Bucket;
|
|
122
121
|
AI: Ai;
|
|
123
|
-
SANDBOX: DurableObjectNamespace<
|
|
122
|
+
SANDBOX: DurableObjectNamespace<import("@cloudflare/sandbox").Sandbox>;
|
|
124
123
|
/** @internal Service binding to proxy worker (AI, revalidation, future features) */
|
|
125
124
|
__VOID_PROXY?: Fetcher;
|
|
126
125
|
/** @internal Custom proxy URL override */
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { i as getRawRuntimeEnv } from "../env-raw-
|
|
1
|
+
import { i as getRawRuntimeEnv } from "../env-raw-CoS20LHP.mjs";
|
|
2
2
|
import { getRuntimeEnv } from "./env.mjs";
|
|
3
3
|
import { boolean, email, getSecretOverride, json, number, oneOf, string, url } from "./env-helpers.mjs";
|
|
4
4
|
//#region src/shared/env-mask.ts
|
|
@@ -244,6 +244,8 @@ function _getSchemaDefaults() {
|
|
|
244
244
|
return defaults;
|
|
245
245
|
}
|
|
246
246
|
var EnvValidationError = class extends Error {
|
|
247
|
+
key;
|
|
248
|
+
issues;
|
|
247
249
|
constructor(key, issues) {
|
|
248
250
|
super(`Invalid env "${key}": ${issues.map((i) => i.message).join(", ")}`);
|
|
249
251
|
this.key = key;
|
package/dist/runtime/env.mjs
CHANGED
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { i as getRawRuntimeEnv, n as asEnv, r as envContext, t as INTERNAL_BINDING_PREFIXES } from "../env-raw-
|
|
1
|
+
import { i as getRawRuntimeEnv, n as asEnv, r as envContext, t as INTERNAL_BINDING_PREFIXES } from "../env-raw-CoS20LHP.mjs";
|
|
2
2
|
//#region src/runtime/env.ts
|
|
3
3
|
/**
|
|
4
4
|
* Public runtime env API — exposed via "void/_env".
|
package/dist/runtime/fetch.d.mts
CHANGED
package/dist/runtime/fetch.mjs
CHANGED
|
@@ -1,3 +1,3 @@
|
|
|
1
1
|
/// <reference types="@cloudflare/workers-types" />
|
|
2
|
-
import { C as defer, E as ValidatorSlots, S as InferProps, T as HandlerInput, _ as defineQueue, a as CloudEnv, b as Deferred, c as QueueRetryOptions, d as TypedQueueHandler, f as VoidAssetRewriteError, g as defineMiddleware, h as defineHead, i as CloudContextVariables, l as RenderAssetTags, m as defineHandler, n as CloudBindings, o as QueueBatch, p as basicAuth, r as CloudContext, s as QueueMessage, t as BasicAuthOptions, u as TypedHandler, v as defineRender, w as ValidationError, y as defineScheduled } from "../handler-
|
|
3
|
-
export { BasicAuthOptions, CloudBindings, CloudContext, CloudContextVariables, CloudEnv, Deferred, HandlerInput, InferProps, QueueBatch, QueueMessage, QueueRetryOptions, RenderAssetTags, TypedHandler, TypedQueueHandler, ValidationError, ValidatorSlots, VoidAssetRewriteError, basicAuth, defer, defineHandler, defineHead, defineMiddleware, defineQueue, defineRender, defineScheduled };
|
|
2
|
+
import { C as defer, E as ValidatorSlots, S as InferProps, T as HandlerInput, _ as defineQueue, a as CloudEnv, b as Deferred, c as QueueRetryOptions, d as TypedQueueHandler, f as VoidAssetRewriteError, g as defineMiddleware, h as defineHead, i as CloudContextVariables, l as RenderAssetTags, m as defineHandler, n as CloudBindings, o as QueueBatch, p as basicAuth, r as CloudContext, s as QueueMessage, t as BasicAuthOptions, u as TypedHandler, v as defineRender, w as ValidationError, y as defineScheduled } from "../handler-imD0UVDT.mjs";
|
|
3
|
+
export { BasicAuthOptions, CloudBindings, CloudContext, CloudContextVariables, CloudEnv, type Deferred, type HandlerInput, type InferProps, QueueBatch, QueueMessage, QueueRetryOptions, RenderAssetTags, TypedHandler, TypedQueueHandler, ValidationError, type ValidatorSlots, VoidAssetRewriteError, basicAuth, defer, defineHandler, defineHead, defineMiddleware, defineQueue, defineRender, defineScheduled };
|