void 0.7.5 → 0.7.7
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/{auth-DrfOTMmr.d.mts → auth-DmuALf16.d.mts} +4 -4
- package/dist/{better-auth-shared-CZsIpjey.d.mts → better-auth-shared-HXlHRw02.d.mts} +15 -15
- package/dist/cli/cli.mjs +14 -14
- package/dist/{config-BIa9HwVX.mjs → config-DqkeX_Fa.mjs} +5 -5
- package/dist/{db-RqxhOT2E.mjs → db-BnKZW1J7.mjs} +26 -22
- package/dist/{deploy-CRIz77mw.mjs → deploy-D3t53kng.mjs} +46 -16
- package/dist/{domain-CDQhvYNZ.mjs → domain-ClDdX9I1.mjs} +24 -1
- package/dist/{dotenv-DwO4ti0Z.mjs → dotenv-zdFCCgFU.mjs} +26 -26
- package/dist/{env-CnrQY2b6.mjs → env-CU97_4YK.mjs} +1 -1
- package/dist/{env-helpers-CbeM_7-k.d.mts → env-helpers-Dw95CU8e.d.mts} +4 -4
- package/dist/{env-validation-DJKjR_8q.mjs → env-validation-Bc_aiBUm.mjs} +1 -1
- package/dist/{fetch-error-DflegrF3.d.mts → fetch-error-DZ868Xq4.d.mts} +4 -4
- package/dist/{gen-C0EY2k27.mjs → gen-CpeKIqlM.mjs} +2 -2
- package/dist/{handler-dKQWyF-G.d.mts → handler-DJTuxB10.d.mts} +24 -27
- package/dist/{head-CZGAunBV.d.mts → head-C7QW7UY1.d.mts} +5 -6
- package/dist/{headers-YVkHjOyq.mjs → headers-C7Yf6_CN.mjs} +1 -1
- package/dist/index.d.mts +3 -3
- package/dist/index.mjs +501 -63
- package/dist/{init-FMZ29UZW.mjs → init-CTtDfVVo.mjs} +4 -4
- package/dist/{node-DFqMcZR1.mjs → node-DHVCtkgt.mjs} +1 -1
- package/dist/pages/client.d.mts +35 -41
- package/dist/pages/head-client.d.mts +1 -1
- package/dist/pages/head.d.mts +1 -1
- package/dist/pages/head.mjs +4 -4
- package/dist/pages/index.d.mts +6 -6
- package/dist/pages/index.mjs +6 -6
- package/dist/pages/islands-plugin.d.mts +4 -13
- package/dist/pages/islands-plugin.mjs +2 -64
- package/dist/pages/prefetch.d.mts +5 -5
- package/dist/pages/protocol.d.mts +2 -2
- package/dist/pages/protocol.mjs +98 -14
- package/dist/plugin-inference-CXUuq0aC.mjs +577 -0
- package/dist/{prepare-PqAbhLte.mjs → prepare-CKzO06-Z.mjs} +4 -4
- package/dist/{preset-jKn1hQwP.mjs → preset-BhnZpb7t.mjs} +1 -1
- package/dist/{protocol-DxGzKEz2.d.mts → protocol-D7r_deVZ.d.mts} +7 -4
- package/dist/{route-types-DReF1gUY.mjs → route-types-Cnqj_8a7.mjs} +2 -2
- package/dist/runtime/ai.d.mts +33 -40
- package/dist/runtime/auth.d.mts +1 -1
- package/dist/runtime/better-auth-pg.d.mts +1 -1
- package/dist/runtime/better-auth.d.mts +1 -1
- package/dist/runtime/client.d.mts +2 -2
- package/dist/runtime/env-helpers.d.mts +1 -1
- package/dist/runtime/env-helpers.mjs +3 -3
- package/dist/runtime/env-public-client.d.mts +3 -3
- package/dist/runtime/env-public.d.mts +7 -7
- package/dist/runtime/fetch-stream.d.mts +1 -1
- package/dist/runtime/fetch.d.mts +1 -1
- package/dist/runtime/handler.d.mts +1 -1
- package/dist/runtime/handler.mjs +3 -3
- package/dist/runtime/isr.d.mts +2 -2
- package/dist/runtime/kv.d.mts +12 -12
- package/dist/runtime/live-server.d.mts +4 -4
- package/dist/runtime/live.d.mts +2 -2
- package/dist/runtime/migration-handler.d.mts +6 -6
- package/dist/runtime/seed.d.mts +4 -4
- package/dist/runtime/validator.d.mts +1 -1
- package/dist/runtime/ws-server.d.mts +8 -8
- package/dist/runtime/ws.d.mts +21 -21
- package/dist/{scan-QtRTdh94.mjs → scan-B8iEm8xn.mjs} +6 -6
- package/dist/{scan-Ba4hFwlH.mjs → scan-CWfLxtOe.mjs} +8 -8
- package/dist/{standard-schema-BfGDWXff.d.mts → standard-schema-D2qvCEYV.d.mts} +14 -14
- package/dist/sveltekit.d.mts +3 -5
- package/dist/types-DG_Ynnyd.d.mts +42 -0
- package/package.json +3 -3
- package/dist/plugin-inference-CCtRkt9O.mjs +0 -2476
- package/dist/types-AdKzPp2C.d.mts +0 -57
|
@@ -5,16 +5,16 @@ import { Context, Env } from "hono";
|
|
|
5
5
|
//#region src/runtime/auth.d.ts
|
|
6
6
|
type AuthUser = User;
|
|
7
7
|
type AuthSession = Session;
|
|
8
|
-
|
|
8
|
+
type AuthState = {
|
|
9
9
|
session: AuthSession;
|
|
10
10
|
user: AuthUser;
|
|
11
|
-
}
|
|
12
|
-
|
|
11
|
+
};
|
|
12
|
+
type VoidAuthConfigContext = {
|
|
13
13
|
defaults: BetterAuthOptions;
|
|
14
14
|
env: Record<string, unknown>;
|
|
15
15
|
dialect: "sqlite" | "postgresql";
|
|
16
16
|
request: Request;
|
|
17
|
-
}
|
|
17
|
+
};
|
|
18
18
|
type VoidAuthConfig = BetterAuthOptions | ((ctx: VoidAuthConfigContext) => BetterAuthOptions);
|
|
19
19
|
/**
|
|
20
20
|
* Shared AsyncLocalStorage that holds the authenticated Better Auth state for the
|
|
@@ -1,11 +1,11 @@
|
|
|
1
|
-
import { i as VoidAuthConfig, n as AuthState } from "./auth-
|
|
1
|
+
import { i as VoidAuthConfig, n as AuthState } from "./auth-DmuALf16.mjs";
|
|
2
2
|
import { DBFieldAttribute } from "better-auth/db";
|
|
3
3
|
import { BetterAuthOptions, betterAuth } from "better-auth";
|
|
4
4
|
import { Context } from "hono";
|
|
5
5
|
|
|
6
6
|
//#region src/auth/drizzle.d.ts
|
|
7
7
|
type AuthIdStrategy = "serial" | "text" | "uuid";
|
|
8
|
-
|
|
8
|
+
type VoidAuthMigrationField = {
|
|
9
9
|
type: DBFieldAttribute["type"];
|
|
10
10
|
required: boolean;
|
|
11
11
|
unique: boolean;
|
|
@@ -16,17 +16,17 @@ interface VoidAuthMigrationField {
|
|
|
16
16
|
field: string;
|
|
17
17
|
onDelete?: "no action" | "restrict" | "cascade" | "set null" | "set default";
|
|
18
18
|
};
|
|
19
|
-
}
|
|
20
|
-
|
|
19
|
+
};
|
|
20
|
+
type VoidAuthMigrationTable = {
|
|
21
21
|
name: string;
|
|
22
22
|
order: number;
|
|
23
23
|
fields: Record<string, VoidAuthMigrationField>;
|
|
24
|
-
}
|
|
25
|
-
|
|
24
|
+
};
|
|
25
|
+
type VoidAuthMigrationSchema = {
|
|
26
26
|
dialect: "sqlite" | "postgresql";
|
|
27
27
|
idStrategy: AuthIdStrategy;
|
|
28
|
-
tables:
|
|
29
|
-
}
|
|
28
|
+
tables: Array<VoidAuthMigrationTable>;
|
|
29
|
+
};
|
|
30
30
|
//#endregion
|
|
31
31
|
//#region src/auth/providers.d.ts
|
|
32
32
|
declare const VOID_SOCIAL_AUTH_PROVIDERS: readonly ["apple", "atlassian", "cognito", "discord", "dropbox", "facebook", "figma", "github", "gitlab", "google", "huggingface", "kakao", "kick", "line", "linear", "linkedin", "microsoft", "naver", "notion", "paybin", "paypal", "polar", "railway", "reddit", "roblox", "salesforce", "slack", "spotify", "tiktok", "twitch", "twitter", "vercel", "vk", "zoom"];
|
|
@@ -36,12 +36,12 @@ type VoidAuthProvider = (typeof VOID_AUTH_PROVIDERS)[number];
|
|
|
36
36
|
//#endregion
|
|
37
37
|
//#region src/runtime/better-auth-shared.d.ts
|
|
38
38
|
type VoidAuthDialect = "sqlite" | "postgresql";
|
|
39
|
-
|
|
39
|
+
type VoidAuthRuntimeOptions = {
|
|
40
40
|
dialect: VoidAuthDialect;
|
|
41
|
-
providers:
|
|
41
|
+
providers: Array<VoidAuthProvider> | null;
|
|
42
42
|
userConfig?: VoidAuthConfig;
|
|
43
|
-
}
|
|
44
|
-
|
|
43
|
+
};
|
|
44
|
+
type VoidAuthEnv = Record<string, unknown> & {
|
|
45
45
|
DB?: D1Database;
|
|
46
46
|
DATABASE_URL?: string;
|
|
47
47
|
HYPERDRIVE?: {
|
|
@@ -52,8 +52,8 @@ interface VoidAuthEnv extends Record<string, unknown> {
|
|
|
52
52
|
GITHUB_OAUTH_SECRET?: string;
|
|
53
53
|
GOOGLE_OAUTH_ID?: string;
|
|
54
54
|
GOOGLE_OAUTH_SECRET?: string;
|
|
55
|
-
}
|
|
56
|
-
|
|
55
|
+
};
|
|
56
|
+
type VoidAuthRuntimeApi = {
|
|
57
57
|
resolveVoidAuthOptions(request: Request, env: VoidAuthEnv, runtime: VoidAuthRuntimeOptions, databaseOverride?: NonNullable<BetterAuthOptions["database"]>, disposeOverride?: () => Promise<void>): Promise<{
|
|
58
58
|
options: BetterAuthOptions;
|
|
59
59
|
dispose(): Promise<void>;
|
|
@@ -66,6 +66,6 @@ interface VoidAuthRuntimeApi {
|
|
|
66
66
|
runVoidAuthMiddleware(c: Context, next: () => Promise<void>, runtime: VoidAuthRuntimeOptions, databaseOverride?: NonNullable<BetterAuthOptions["database"]>, disposeOverride?: () => Promise<void>): Promise<void>;
|
|
67
67
|
handleVoidAuthRequest(c: Context, runtime: VoidAuthRuntimeOptions, databaseOverride?: NonNullable<BetterAuthOptions["database"]>, disposeOverride?: () => Promise<void>): Promise<Response>;
|
|
68
68
|
runVoidAuthMigrations(request: Request, env: VoidAuthEnv, runtime: VoidAuthRuntimeOptions, migrationSchema: VoidAuthMigrationSchema): Promise<void>;
|
|
69
|
-
}
|
|
69
|
+
};
|
|
70
70
|
//#endregion
|
|
71
71
|
export { VoidAuthRuntimeOptions as i, VoidAuthEnv as n, VoidAuthRuntimeApi as r, VoidAuthDialect as t };
|
package/dist/cli/cli.mjs
CHANGED
|
@@ -1503,7 +1503,7 @@ else if (command === "deploy") {
|
|
|
1503
1503
|
R.error(err instanceof Error ? err.message : String(err));
|
|
1504
1504
|
process.exit(1);
|
|
1505
1505
|
}
|
|
1506
|
-
import("../deploy-
|
|
1506
|
+
import("../deploy-D3t53kng.mjs").then((n) => n.t).then(({ runDeploy }) => {
|
|
1507
1507
|
runDeploy(root, {
|
|
1508
1508
|
projectSlug: deployArgs.projectSlug,
|
|
1509
1509
|
dir: deployArgs.dir,
|
|
@@ -1518,10 +1518,10 @@ else if (command === "deploy") {
|
|
|
1518
1518
|
} else if (command === "auth") runSubcommandGroup("auth", authSubcommands, parseAuthArgs, (root, parsed) => import("../auth-cmd-Dk0acCT5.mjs").then(({ runAuthCommand }) => runAuthCommand(root, parsed)));
|
|
1519
1519
|
else if (command === "project") runSubcommandGroup("project", projectSubcommands, parseProjectArgs, (root, parsed) => import("../project-cmd-DKiQYdSd.mjs").then(({ runProjectCommand }) => runProjectCommand(root, parsed)));
|
|
1520
1520
|
else if (command === "secret") runSubcommandGroup("secret", secretSubcommands, parseSecretArgs, (root, parsed) => import("../secret-BXHx515u.mjs").then(({ runSecretCommand }) => runSecretCommand(root, parsed)));
|
|
1521
|
-
else if (command === "domain") runSubcommandGroup("domain", domainSubcommands, parseDomainArgs, (root, parsed) => import("../domain-
|
|
1522
|
-
else if (command === "db") runSubcommandGroup("db", dbSubcommands, parseDbArgs, (root, parsed) => import("../db-
|
|
1523
|
-
else if (command === "env") runSubcommandGroup("env", envSubcommands, parseEnvArgs, (root, parsed) => import("../env-
|
|
1524
|
-
else if (command === "gen") runSubcommandGroup("gen", genSubcommands, parseGenArgs, (root, parsed) => import("../gen-
|
|
1521
|
+
else if (command === "domain") runSubcommandGroup("domain", domainSubcommands, parseDomainArgs, (root, parsed) => import("../domain-ClDdX9I1.mjs").then(({ runDomainCommand }) => runDomainCommand(root, parsed)));
|
|
1522
|
+
else if (command === "db") runSubcommandGroup("db", dbSubcommands, parseDbArgs, (root, parsed) => import("../db-BnKZW1J7.mjs").then(({ runDbCommand }) => runDbCommand(root, parsed)));
|
|
1523
|
+
else if (command === "env") runSubcommandGroup("env", envSubcommands, parseEnvArgs, (root, parsed) => import("../env-CU97_4YK.mjs").then(({ runEnvCommand }) => runEnvCommand(root, parsed)));
|
|
1524
|
+
else if (command === "gen") runSubcommandGroup("gen", genSubcommands, parseGenArgs, (root, parsed) => import("../gen-CpeKIqlM.mjs").then(({ runGenCommand }) => runGenCommand(root, parsed)));
|
|
1525
1525
|
else if (command === "prepare") {
|
|
1526
1526
|
const root = process.cwd();
|
|
1527
1527
|
let prepareArgs;
|
|
@@ -1531,7 +1531,7 @@ else if (command === "prepare") {
|
|
|
1531
1531
|
R.error(err instanceof Error ? err.message : String(err));
|
|
1532
1532
|
process.exit(1);
|
|
1533
1533
|
}
|
|
1534
|
-
import("../prepare-
|
|
1534
|
+
import("../prepare-CKzO06-Z.mjs").then(({ runPrepareCommand }) => {
|
|
1535
1535
|
runPrepareCommand(root, prepareArgs).catch((err) => {
|
|
1536
1536
|
R.error(err.message ?? err);
|
|
1537
1537
|
process.exit(1);
|
|
@@ -1539,7 +1539,7 @@ else if (command === "prepare") {
|
|
|
1539
1539
|
});
|
|
1540
1540
|
} else if (command === "init") {
|
|
1541
1541
|
const root = process.cwd();
|
|
1542
|
-
import("../init-
|
|
1542
|
+
import("../init-CTtDfVVo.mjs").then(({ runInitCommand, parseInitArgs }) => {
|
|
1543
1543
|
let initArgs;
|
|
1544
1544
|
try {
|
|
1545
1545
|
initArgs = parseInitArgs(args.slice(1));
|
|
@@ -1628,12 +1628,12 @@ else if (command === "-v" || command === "--version") {
|
|
|
1628
1628
|
const root = process.cwd();
|
|
1629
1629
|
switch (cmd) {
|
|
1630
1630
|
case "init": {
|
|
1631
|
-
const { runInitCommand, parseInitArgs } = await import("../init-
|
|
1631
|
+
const { runInitCommand, parseInitArgs } = await import("../init-CTtDfVVo.mjs");
|
|
1632
1632
|
await runInitCommand(root, parseInitArgs([]));
|
|
1633
1633
|
return;
|
|
1634
1634
|
}
|
|
1635
1635
|
case "deploy": {
|
|
1636
|
-
const { runDeploy } = await import("../deploy-
|
|
1636
|
+
const { runDeploy } = await import("../deploy-D3t53kng.mjs").then((n) => n.t);
|
|
1637
1637
|
await runDeploy(root);
|
|
1638
1638
|
return;
|
|
1639
1639
|
}
|
|
@@ -1645,12 +1645,12 @@ else if (command === "-v" || command === "--version") {
|
|
|
1645
1645
|
case "auth": return runSubcommandGroup("auth", authSubcommands, parseAuthArgs, (r, p) => import("../auth-cmd-Dk0acCT5.mjs").then(({ runAuthCommand }) => runAuthCommand(r, p)));
|
|
1646
1646
|
case "project": return runSubcommandGroup("project", projectSubcommands, parseProjectArgs, (r, p) => import("../project-cmd-DKiQYdSd.mjs").then(({ runProjectCommand }) => runProjectCommand(r, p)));
|
|
1647
1647
|
case "secret": return runSubcommandGroup("secret", secretSubcommands, parseSecretArgs, (r, p) => import("../secret-BXHx515u.mjs").then(({ runSecretCommand }) => runSecretCommand(r, p)));
|
|
1648
|
-
case "domain": return runSubcommandGroup("domain", domainSubcommands, parseDomainArgs, (r, p) => import("../domain-
|
|
1649
|
-
case "db": return runSubcommandGroup("db", dbSubcommands, parseDbArgs, (r, p) => import("../db-
|
|
1650
|
-
case "env": return runSubcommandGroup("env", envSubcommands, parseEnvArgs, (r, p) => import("../env-
|
|
1651
|
-
case "gen": return runSubcommandGroup("gen", genSubcommands, parseGenArgs, (r, p) => import("../gen-
|
|
1648
|
+
case "domain": return runSubcommandGroup("domain", domainSubcommands, parseDomainArgs, (r, p) => import("../domain-ClDdX9I1.mjs").then(({ runDomainCommand }) => runDomainCommand(r, p)));
|
|
1649
|
+
case "db": return runSubcommandGroup("db", dbSubcommands, parseDbArgs, (r, p) => import("../db-BnKZW1J7.mjs").then(({ runDbCommand }) => runDbCommand(r, p)));
|
|
1650
|
+
case "env": return runSubcommandGroup("env", envSubcommands, parseEnvArgs, (r, p) => import("../env-CU97_4YK.mjs").then(({ runEnvCommand }) => runEnvCommand(r, p)));
|
|
1651
|
+
case "gen": return runSubcommandGroup("gen", genSubcommands, parseGenArgs, (r, p) => import("../gen-CpeKIqlM.mjs").then(({ runGenCommand }) => runGenCommand(r, p)));
|
|
1652
1652
|
case "prepare": {
|
|
1653
|
-
const { runPrepareCommand } = await import("../prepare-
|
|
1653
|
+
const { runPrepareCommand } = await import("../prepare-CKzO06-Z.mjs");
|
|
1654
1654
|
await runPrepareCommand(root, parsePrepareArgs([]));
|
|
1655
1655
|
return;
|
|
1656
1656
|
}
|
|
@@ -105,16 +105,16 @@ function assertSingleSplat(source, kind) {
|
|
|
105
105
|
function assertUniqueCaptureNames(source, kind) {
|
|
106
106
|
const seen = /* @__PURE__ */ new Set();
|
|
107
107
|
const dups = /* @__PURE__ */ new Set();
|
|
108
|
-
const
|
|
109
|
-
let
|
|
110
|
-
while ((
|
|
111
|
-
const name =
|
|
108
|
+
const captureNameRe = /:([A-Za-z0-9_]+)\*?/g;
|
|
109
|
+
let captureMatch;
|
|
110
|
+
while ((captureMatch = captureNameRe.exec(source)) !== null) {
|
|
111
|
+
const name = captureMatch[1];
|
|
112
112
|
if (seen.has(name)) dups.add(name);
|
|
113
113
|
seen.add(name);
|
|
114
114
|
}
|
|
115
115
|
if (countSplats(source) >= 1 && seen.has("splat")) dups.add("splat");
|
|
116
116
|
if (dups.size > 0) {
|
|
117
|
-
const names = [...dups].map((
|
|
117
|
+
const names = [...dups].map((name) => `:${name}`).join(", ");
|
|
118
118
|
throw new Error(`${kind} source "${source}" in ${CONFIG_FILE} has duplicate capture group name(s) (${names}); each :name token must be unique within a pattern, and :splat collides with a bare "*"`);
|
|
119
119
|
}
|
|
120
120
|
}
|
|
@@ -3,11 +3,11 @@ import { i as dim, n as cliTitle, s as import_picocolors } from "./output-BwlcIY
|
|
|
3
3
|
import { c as R, g as ge, y as ye } from "./dist-Dayj3gCK.mjs";
|
|
4
4
|
import { r as readProjectConfig } from "./project-TqORyHn8.mjs";
|
|
5
5
|
import { c as getToken, n as PlatformClient } from "./client-DCqnMpDt.mjs";
|
|
6
|
-
import { c as getDatabaseDialect, f as readConfig } from "./config-
|
|
7
|
-
import { r as detectFramework } from "./plugin-inference-
|
|
6
|
+
import { c as getDatabaseDialect, f as readConfig } from "./config-DqkeX_Fa.mjs";
|
|
7
|
+
import { r as detectFramework } from "./plugin-inference-CXUuq0aC.mjs";
|
|
8
8
|
import { a as writeJournal, i as stripSqlExt, r as readJournal, t as collectMigrations } from "./collect-CjeZgz5D.mjs";
|
|
9
9
|
import { n as listDrizzleArtifacts, r as validateMigrations, t as assertJournalCoherence } from "./validate-CaMavMxu.mjs";
|
|
10
|
-
import { formatTimestamp } from "./gen-
|
|
10
|
+
import { formatTimestamp } from "./gen-CpeKIqlM.mjs";
|
|
11
11
|
import { existsSync, readFileSync, readdirSync, renameSync, rmSync, writeFileSync } from "node:fs";
|
|
12
12
|
import { fileURLToPath, pathToFileURL } from "node:url";
|
|
13
13
|
import { execFileSync } from "node:child_process";
|
|
@@ -298,8 +298,8 @@ function printTable(rows) {
|
|
|
298
298
|
}
|
|
299
299
|
return max;
|
|
300
300
|
});
|
|
301
|
-
const lines = [cols.map((col,
|
|
302
|
-
for (const row of rows) lines.push(cols.map((col,
|
|
301
|
+
const lines = [cols.map((col, columnIndex) => col.padEnd(widths[columnIndex])).join(" "), widths.map((width) => "─".repeat(width)).join("──")];
|
|
302
|
+
for (const row of rows) lines.push(cols.map((col, columnIndex) => String(row[col] ?? "NULL").padEnd(widths[columnIndex])).join(" "));
|
|
303
303
|
console.log(lines.join("\n"));
|
|
304
304
|
}
|
|
305
305
|
async function runMigrate(root, dialect, remote) {
|
|
@@ -469,15 +469,19 @@ async function runRenameMigrations(root, dialect) {
|
|
|
469
469
|
let baseTime;
|
|
470
470
|
if (timestampFiles.length > 0) {
|
|
471
471
|
const earliest = timestampFiles[0].slice(0, 14);
|
|
472
|
-
const
|
|
473
|
-
const
|
|
474
|
-
|
|
472
|
+
const year = +earliest.slice(0, 4);
|
|
473
|
+
const monthIndex = +earliest.slice(4, 6) - 1;
|
|
474
|
+
const day = +earliest.slice(6, 8);
|
|
475
|
+
const hour = +earliest.slice(8, 10);
|
|
476
|
+
const minute = +earliest.slice(10, 12);
|
|
477
|
+
const second = +earliest.slice(12, 14);
|
|
478
|
+
baseTime = new Date(Date.UTC(year, monthIndex, day, hour, minute, second - oldStyleFiles.length));
|
|
475
479
|
} else baseTime = /* @__PURE__ */ new Date(Date.now() - oldStyleFiles.length * 1e3);
|
|
476
480
|
const renames = [];
|
|
477
|
-
for (let
|
|
478
|
-
const oldName = oldStyleFiles[
|
|
481
|
+
for (let fileIndex = 0; fileIndex < oldStyleFiles.length; fileIndex++) {
|
|
482
|
+
const oldName = oldStyleFiles[fileIndex];
|
|
479
483
|
const description = oldName.replace(/^\d+_/, "");
|
|
480
|
-
const newName = `${formatTs(new Date(baseTime.getTime() +
|
|
484
|
+
const newName = `${formatTs(new Date(baseTime.getTime() + fileIndex * 1e3))}_${description}`;
|
|
481
485
|
renames.push({
|
|
482
486
|
from: oldName,
|
|
483
487
|
to: newName
|
|
@@ -695,11 +699,11 @@ async function runExport(root, args, dialect) {
|
|
|
695
699
|
const rows = await client.query(`SELECT * FROM "${table}"`);
|
|
696
700
|
for (const row of rows.rows) {
|
|
697
701
|
const cols = Object.keys(row);
|
|
698
|
-
const vals = cols.map((
|
|
699
|
-
const
|
|
700
|
-
if (
|
|
701
|
-
if (typeof
|
|
702
|
-
return `'${String(
|
|
702
|
+
const vals = cols.map((column) => {
|
|
703
|
+
const value = row[column];
|
|
704
|
+
if (value === null) return "NULL";
|
|
705
|
+
if (typeof value === "number") return String(value);
|
|
706
|
+
return `'${String(value).replace(/'/g, "''")}'`;
|
|
703
707
|
});
|
|
704
708
|
parts.push(`INSERT INTO "${table}" (${cols.join(", ")}) VALUES (${vals.join(", ")});`);
|
|
705
709
|
}
|
|
@@ -741,11 +745,11 @@ async function runExport(root, args, dialect) {
|
|
|
741
745
|
const rows = db.prepare(`SELECT * FROM "${table}"`).all();
|
|
742
746
|
for (const row of rows) {
|
|
743
747
|
const cols = Object.keys(row);
|
|
744
|
-
const vals = cols.map((
|
|
745
|
-
const
|
|
746
|
-
if (
|
|
747
|
-
if (typeof
|
|
748
|
-
return `'${String(
|
|
748
|
+
const vals = cols.map((column) => {
|
|
749
|
+
const value = row[column];
|
|
750
|
+
if (value === null) return "NULL";
|
|
751
|
+
if (typeof value === "number") return String(value);
|
|
752
|
+
return `'${String(value).replace(/'/g, "''")}'`;
|
|
749
753
|
});
|
|
750
754
|
parts.push(`INSERT INTO "${table}" (${cols.join(", ")}) VALUES (${vals.join(", ")});`);
|
|
751
755
|
}
|
|
@@ -763,7 +767,7 @@ async function runExport(root, args, dialect) {
|
|
|
763
767
|
}
|
|
764
768
|
}
|
|
765
769
|
async function runSetUrl(root) {
|
|
766
|
-
const { readConfig: readVoidConfig, getDatabaseDialect: getDialect } = await import("./config-
|
|
770
|
+
const { readConfig: readVoidConfig, getDatabaseDialect: getDialect } = await import("./config-DqkeX_Fa.mjs").then((n) => n.n);
|
|
767
771
|
if (getDialect(readVoidConfig(root)) !== "postgresql") {
|
|
768
772
|
R.error("db: This command is only for PostgreSQL projects. Set \"database\": \"pg\" in void.json.");
|
|
769
773
|
process.exit(1);
|
|
@@ -5,22 +5,22 @@ import { t as findVoidAuthConfig } from "./config-CvHtTM0q.mjs";
|
|
|
5
5
|
import { c as R, g as ge, u as Se, v as ue, x as q, y as ye } from "./dist-Dayj3gCK.mjs";
|
|
6
6
|
import { a as writeProjectConfig, r as readProjectConfig } from "./project-TqORyHn8.mjs";
|
|
7
7
|
import { a as isExpiredTokenError, c as getToken, i as isCliOutdatedError, l as getTokenSource, n as PlatformClient, o as parsePlatformErrorBody, t as PlatformApiError, u as isStagingMode } from "./client-DCqnMpDt.mjs";
|
|
8
|
-
import { c as getDatabaseDialect, f as readConfig, l as isNodeTarget, p as resolveBindingNames } from "./config-
|
|
9
|
-
import { i as scanJobsSync, n as scanWebSocketRoutesSync, r as scanQueuesSync, t as scanRoutes } from "./scan-
|
|
10
|
-
import { i as inferProjectBindings, l as validateSsrEntry, n as FRAMEWORK_SCAN_DIRS, r as detectFramework } from "./plugin-inference-
|
|
8
|
+
import { c as getDatabaseDialect, f as readConfig, l as isNodeTarget, p as resolveBindingNames } from "./config-DqkeX_Fa.mjs";
|
|
9
|
+
import { i as scanJobsSync, n as scanWebSocketRoutesSync, r as scanQueuesSync, t as scanRoutes } from "./scan-B8iEm8xn.mjs";
|
|
10
|
+
import { i as inferProjectBindings, l as validateSsrEntry, n as FRAMEWORK_SCAN_DIRS, r as detectFramework } from "./plugin-inference-CXUuq0aC.mjs";
|
|
11
11
|
import { i as voidWarn, r as voidLog } from "./log-DXdqnmhF.mjs";
|
|
12
12
|
import { t as discoverSchema } from "./discover-B7FkXBLB.mjs";
|
|
13
13
|
import { t as findEnvFile } from "./env-types-DknSA4SO.mjs";
|
|
14
|
-
import { i as validateProdEnv, n as formatEnvReport, r as getDeployEnvDefaults, t as fetchRemoteSecretNames } from "./env-validation-
|
|
14
|
+
import { i as validateProdEnv, n as formatEnvReport, r as getDeployEnvDefaults, t as fetchRemoteSecretNames } from "./env-validation-Bc_aiBUm.mjs";
|
|
15
15
|
import { n as writeDrizzleConfig } from "./config-BzM9Dy7T.mjs";
|
|
16
16
|
import { t as collectMigrations } from "./collect-CjeZgz5D.mjs";
|
|
17
17
|
import { r as validateMigrations, t as assertJournalCoherence } from "./validate-CaMavMxu.mjs";
|
|
18
|
-
import { t as scanPages } from "./scan-
|
|
18
|
+
import { t as scanPages } from "./scan-CWfLxtOe.mjs";
|
|
19
19
|
import { n as promptProjectSelection, r as promptProjectSetupAction, t as promptAndCreateProject } from "./create-project-Bg88Kq_I.mjs";
|
|
20
20
|
import { r as resolveProjectBySlug, t as getRequestedProjectSlug } from "./resolve-project-DdjLQ2tB.mjs";
|
|
21
|
-
import { n as lintDuplicateSources, r as mergeRoutingRules, t as lintDestinationSplats } from "./headers-
|
|
21
|
+
import { n as lintDuplicateSources, r as mergeRoutingRules, t as lintDestinationSplats } from "./headers-C7Yf6_CN.mjs";
|
|
22
22
|
import { t as promptForLoginToken } from "./login-B5HHT32i.mjs";
|
|
23
|
-
import { i as resolveProjectCommand, n as detectPreset, r as formatProjectCommand, t as FRAMEWORK_PRESETS } from "./preset-
|
|
23
|
+
import { i as resolveProjectCommand, n as detectPreset, r as formatProjectCommand, t as FRAMEWORK_PRESETS } from "./preset-BhnZpb7t.mjs";
|
|
24
24
|
import { createRequire } from "node:module";
|
|
25
25
|
import { copyFileSync, cpSync, createWriteStream, existsSync, mkdirSync, mkdtempSync, readFileSync, readdirSync, renameSync, rmSync, unlinkSync, writeFileSync } from "node:fs";
|
|
26
26
|
import { fileURLToPath, pathToFileURL } from "node:url";
|
|
@@ -149,17 +149,33 @@ function resolveGeneratedName(base, used, kind) {
|
|
|
149
149
|
}
|
|
150
150
|
}
|
|
151
151
|
/**
|
|
152
|
-
* Read compatibility settings from `wrangler.jsonc`/`wrangler.json
|
|
153
|
-
* `void.json`, with priority:
|
|
152
|
+
* Read compatibility settings from `wrangler.jsonc`/`wrangler.json`,
|
|
153
|
+
* `void.json`, and build output, with priority:
|
|
154
|
+
* void.json > wrangler.jsonc > build output > latest known-good date.
|
|
154
155
|
*
|
|
155
|
-
*
|
|
156
|
-
*
|
|
156
|
+
* This function is read-only: when no explicit `compatibility_date` exists, it
|
|
157
|
+
* returns the latest known-good date without writing it anywhere. Use
|
|
158
|
+
* `ensureWranglerCompat()` when the caller is in a real dev/build/deploy
|
|
159
|
+
* lifecycle and wants to persist the default in `void.json`.
|
|
157
160
|
*
|
|
158
161
|
* @param buildOutputDir - Optional path to the build output directory (e.g.
|
|
159
162
|
* `dist/ssr`) which may contain a plugin-generated `wrangler.json` with the
|
|
160
163
|
* correct compat settings for the built worker.
|
|
161
164
|
*/
|
|
162
165
|
function readWranglerCompat(root, config, buildOutputDir) {
|
|
166
|
+
return resolveWranglerCompat(readWranglerCompatFields(root, config, buildOutputDir));
|
|
167
|
+
}
|
|
168
|
+
/**
|
|
169
|
+
* Read compatibility settings and ensure the default date is pinned in
|
|
170
|
+
* `void.json` when no explicit date exists in void.json, wrangler config, or
|
|
171
|
+
* build output.
|
|
172
|
+
*/
|
|
173
|
+
function ensureWranglerCompat(root, config, buildOutputDir) {
|
|
174
|
+
const fields = readWranglerCompatFields(root, config, buildOutputDir);
|
|
175
|
+
const defaultDate = fields.voidDate ?? fields.wranglerDate ?? fields.buildDate ? void 0 : ensureVoidCompatibilityDate(root, fields.voidConfig);
|
|
176
|
+
return resolveWranglerCompat(fields, defaultDate ? { defaultDate } : void 0);
|
|
177
|
+
}
|
|
178
|
+
function readWranglerCompatFields(root, config, buildOutputDir) {
|
|
163
179
|
const voidConfig = config ?? readVoidConfigIfExists(root);
|
|
164
180
|
let raw;
|
|
165
181
|
for (const name of ["wrangler.jsonc", "wrangler.json"]) try {
|
|
@@ -190,8 +206,19 @@ function readWranglerCompat(root, config, buildOutputDir) {
|
|
|
190
206
|
const voidDate = voidConfig?.worker?.compatibility_date;
|
|
191
207
|
const voidFlags = voidConfig?.worker?.compatibility_flags;
|
|
192
208
|
if (voidDate !== void 0) validateCompatDate(voidDate, "void.json worker config");
|
|
193
|
-
|
|
194
|
-
|
|
209
|
+
return {
|
|
210
|
+
voidConfig,
|
|
211
|
+
voidDate,
|
|
212
|
+
voidFlags,
|
|
213
|
+
wranglerDate,
|
|
214
|
+
wranglerFlags,
|
|
215
|
+
buildDate,
|
|
216
|
+
buildFlags
|
|
217
|
+
};
|
|
218
|
+
}
|
|
219
|
+
function resolveWranglerCompat(fields, options) {
|
|
220
|
+
const result = { compatibilityDate: fields.voidDate ?? fields.wranglerDate ?? fields.buildDate ?? options?.defaultDate ?? "2026-02-24" };
|
|
221
|
+
const flags = fields.voidFlags ?? fields.wranglerFlags ?? fields.buildFlags;
|
|
195
222
|
if (flags && flags.length > 0) result.compatibilityFlags = flags;
|
|
196
223
|
return result;
|
|
197
224
|
}
|
|
@@ -633,7 +660,7 @@ async function createCloudflarePrerenderRunner(options) {
|
|
|
633
660
|
const wranglerPath = join(workerDir, "wrangler.json");
|
|
634
661
|
if (!existsSync(wranglerPath)) throw new Error(`prerender: wrangler.json not found in '${workerDir}'.`);
|
|
635
662
|
const wranglerConfig = JSON.parse(readFileSync(wranglerPath, "utf-8"));
|
|
636
|
-
const wranglerCompat =
|
|
663
|
+
const wranglerCompat = ensureWranglerCompat(root, readConfig(root), workerDir);
|
|
637
664
|
const workerMain = wranglerConfig.main ?? "index.js";
|
|
638
665
|
const env = filterLoadedEnv(loadEnv("production", root, ""));
|
|
639
666
|
const voidToken = getToken(root);
|
|
@@ -1965,6 +1992,9 @@ function generateWrapperSource(renamedEntry, handlersModule, features, migration
|
|
|
1965
1992
|
if (needsFetchWrap) {
|
|
1966
1993
|
lines.push("async function wrappedFetch(request, env, ctx) {");
|
|
1967
1994
|
lines.push(" const url = new URL(request.url);");
|
|
1995
|
+
lines.push(" if (request.method === \"GET\" && url.pathname === \"/__void/ready\") {");
|
|
1996
|
+
lines.push(" return Response.json({ ready: true });");
|
|
1997
|
+
lines.push(" }");
|
|
1968
1998
|
if (migrations && migrations.length > 0) {
|
|
1969
1999
|
lines.push(" if (request.method === \"POST\" && url.pathname === \"/__void/migrate\") {");
|
|
1970
2000
|
lines.push(" const handler = createMigrationHandler(env, __migrations, __migrationDialect);");
|
|
@@ -2155,7 +2185,7 @@ function getExitCode(error) {
|
|
|
2155
2185
|
}
|
|
2156
2186
|
function resolveDeployWranglerCompat(root, config, buildOutputDir, requirements) {
|
|
2157
2187
|
if (isNodeTarget(config.target)) return;
|
|
2158
|
-
const compat =
|
|
2188
|
+
const compat = ensureWranglerCompat(root, config, buildOutputDir);
|
|
2159
2189
|
const compatibilityFlags = normalizeWranglerCompatibilityFlags(compat.compatibilityFlags, { needsNodejsCompat: requirements?.authEnabled === true || requirements?.dialect === "postgresql" || requirements?.needsSandbox === true });
|
|
2160
2190
|
return compatibilityFlags === compat.compatibilityFlags ? compat : {
|
|
2161
2191
|
...compat,
|
|
@@ -3311,4 +3341,4 @@ function resolveWorkerDirName(distDir, fwPreset, buildCommand) {
|
|
|
3311
3341
|
throw new Error("deploy: Worker output not found. Expected dist/ssr/ or dist/rsc/.");
|
|
3312
3342
|
}
|
|
3313
3343
|
//#endregion
|
|
3314
|
-
export {
|
|
3344
|
+
export { isSandboxEnabled as C, SANDBOX_MIGRATION_TAG as S, normalizeWranglerCompatibilityFlags as _, prerenderPagesNode as a, resolveLiveBindingConfig as b, filterLoadedEnv as c, LIVE_MIGRATION_TAG as d, ensureWranglerCompat as f, nextDurableObjectMigrationTag as g, hasDurableObjectSqliteMigration as h, prerenderPages as i, resolveRemoteMode as l, ensureWranglerNodejsAlsFlag as m, resolveDistDir as n, DEFAULT_PROXY_URL as o, ensureWranglerCompatibilityDate as p, resolveWorkerDirName as r, STAGING_PROXY_URL as s, deploy_exports as t, stripInternalEnvKeys as u, readExistingLiveBindingConfig as v, resolveSandboxConfig as w, syncWranglerBindings as x, readWranglerCompat as y };
|
|
@@ -37,7 +37,15 @@ async function runDomainCommand(root, args) {
|
|
|
37
37
|
async function domainAdd(client, projectId, hostname) {
|
|
38
38
|
const domain = await client.addDomain(projectId, hostname);
|
|
39
39
|
R.success(`Domain ${hostname} added (status: ${domain.status})`);
|
|
40
|
-
|
|
40
|
+
const sections = [];
|
|
41
|
+
if (domain.cname_target) sections.push(`CNAME (traffic)\n ${hostname} → ${domain.cname_target}`);
|
|
42
|
+
if (domain.ownership_verification) sections.push(`TXT (ownership verification)\n ${domain.ownership_verification.name} → ${domain.ownership_verification.value}`);
|
|
43
|
+
const sslRecords = (domain.ssl_validation_records ?? []).filter((r) => Boolean(r.txt_name) && Boolean(r.txt_value));
|
|
44
|
+
if (sslRecords.length > 0) {
|
|
45
|
+
const lines = sslRecords.map((r) => ` ${r.txt_name} → ${r.txt_value}`).join("\n");
|
|
46
|
+
sections.push(`TXT (SSL validation)\n${lines}`);
|
|
47
|
+
}
|
|
48
|
+
if (sections.length > 0) Se(sections.join("\n\n"), "DNS Setup");
|
|
41
49
|
R.info("Run `void domain status " + hostname + "` to check verification progress.");
|
|
42
50
|
}
|
|
43
51
|
async function domainRemove(client, projectId, hostname) {
|
|
@@ -72,8 +80,23 @@ async function domainStatus(client, projectId, hostname) {
|
|
|
72
80
|
`Status: ${status.status}`,
|
|
73
81
|
`SSL Status: ${status.ssl_status}`
|
|
74
82
|
];
|
|
83
|
+
if (status.ownership_verification) lines.push(`Ownership: pending`);
|
|
75
84
|
if (status.verification_errors && status.verification_errors.length > 0) lines.push(`Errors: ${status.verification_errors.join(", ")}`);
|
|
76
85
|
Se(lines.join("\n"), "Domain Status");
|
|
86
|
+
const ownershipPending = Boolean(status.ownership_verification);
|
|
87
|
+
const sslPending = status.ssl_status !== "active";
|
|
88
|
+
if (ownershipPending || sslPending) {
|
|
89
|
+
const pendingSections = [];
|
|
90
|
+
if (ownershipPending && status.ownership_verification) pendingSections.push(`TXT (ownership verification)\n ${status.ownership_verification.name} → ${status.ownership_verification.value}`);
|
|
91
|
+
if (sslPending) {
|
|
92
|
+
const sslRecords = (status.ssl_validation_records ?? []).filter((r) => Boolean(r.txt_name) && Boolean(r.txt_value) && r.status !== "active");
|
|
93
|
+
if (sslRecords.length > 0) {
|
|
94
|
+
const lines = sslRecords.map((r) => ` ${r.txt_name} → ${r.txt_value}`).join("\n");
|
|
95
|
+
pendingSections.push(`TXT (SSL validation)\n${lines}`);
|
|
96
|
+
}
|
|
97
|
+
}
|
|
98
|
+
if (pendingSections.length > 0) Se(pendingSections.join("\n\n"), "Add these DNS records to your provider");
|
|
99
|
+
}
|
|
77
100
|
}
|
|
78
101
|
//#endregion
|
|
79
102
|
export { runDomainCommand };
|
|
@@ -36,10 +36,10 @@ const VALID_KEY = /^[A-Za-z_][A-Za-z0-9_]*$/;
|
|
|
36
36
|
function parseDotenvLine(line) {
|
|
37
37
|
const trimmed = line.trim();
|
|
38
38
|
if (!trimmed || trimmed.startsWith("#")) return null;
|
|
39
|
-
const
|
|
40
|
-
if (
|
|
41
|
-
const key = trimmed.slice(0,
|
|
42
|
-
let value = trimmed.slice(
|
|
39
|
+
const equalsIndex = trimmed.indexOf("=");
|
|
40
|
+
if (equalsIndex === -1) return null;
|
|
41
|
+
const key = trimmed.slice(0, equalsIndex).trim();
|
|
42
|
+
let value = trimmed.slice(equalsIndex + 1).trim();
|
|
43
43
|
if (value.startsWith("\"") && value.endsWith("\"") || value.startsWith("'") && value.endsWith("'")) value = value.slice(1, -1);
|
|
44
44
|
return {
|
|
45
45
|
key,
|
|
@@ -118,43 +118,43 @@ function expandDotenv(input, options = {}) {
|
|
|
118
118
|
*/
|
|
119
119
|
function expandValue(value, resolve) {
|
|
120
120
|
let result = "";
|
|
121
|
-
let
|
|
122
|
-
while (
|
|
123
|
-
const
|
|
124
|
-
if (
|
|
121
|
+
let cursor = 0;
|
|
122
|
+
while (cursor < value.length) {
|
|
123
|
+
const character = value[cursor];
|
|
124
|
+
if (character === "\\" && cursor + 1 < value.length && value[cursor + 1] === "$") {
|
|
125
125
|
result += "$";
|
|
126
|
-
|
|
126
|
+
cursor += 2;
|
|
127
127
|
continue;
|
|
128
128
|
}
|
|
129
|
-
if (
|
|
130
|
-
result +=
|
|
131
|
-
|
|
129
|
+
if (character !== "$") {
|
|
130
|
+
result += character;
|
|
131
|
+
cursor++;
|
|
132
132
|
continue;
|
|
133
133
|
}
|
|
134
|
-
const next = value[
|
|
134
|
+
const next = value[cursor + 1];
|
|
135
135
|
if (next === "{") {
|
|
136
|
-
const
|
|
137
|
-
if (
|
|
138
|
-
result +=
|
|
139
|
-
|
|
136
|
+
const endIndex = value.indexOf("}", cursor + 2);
|
|
137
|
+
if (endIndex === -1) {
|
|
138
|
+
result += character;
|
|
139
|
+
cursor++;
|
|
140
140
|
continue;
|
|
141
141
|
}
|
|
142
|
-
const key = value.slice(
|
|
142
|
+
const key = value.slice(cursor + 2, endIndex);
|
|
143
143
|
if (VALID_KEY.test(key)) result += resolve(key);
|
|
144
|
-
else result += value.slice(
|
|
145
|
-
|
|
144
|
+
else result += value.slice(cursor, endIndex + 1);
|
|
145
|
+
cursor = endIndex + 1;
|
|
146
146
|
continue;
|
|
147
147
|
}
|
|
148
148
|
if (next && /[A-Za-z_]/.test(next)) {
|
|
149
|
-
let
|
|
150
|
-
while (
|
|
151
|
-
const key = value.slice(
|
|
149
|
+
let keyEndIndex = cursor + 1;
|
|
150
|
+
while (keyEndIndex < value.length && /[A-Za-z0-9_]/.test(value[keyEndIndex])) keyEndIndex++;
|
|
151
|
+
const key = value.slice(cursor + 1, keyEndIndex);
|
|
152
152
|
result += resolve(key);
|
|
153
|
-
|
|
153
|
+
cursor = keyEndIndex;
|
|
154
154
|
continue;
|
|
155
155
|
}
|
|
156
|
-
result +=
|
|
157
|
-
|
|
156
|
+
result += character;
|
|
157
|
+
cursor++;
|
|
158
158
|
}
|
|
159
159
|
return result;
|
|
160
160
|
}
|
|
@@ -4,7 +4,7 @@ import { c as R, g as ge, u as Se, y as ye } from "./dist-Dayj3gCK.mjs";
|
|
|
4
4
|
import { r as readProjectConfig } from "./project-TqORyHn8.mjs";
|
|
5
5
|
import { c as getToken, n as PlatformClient } from "./client-DCqnMpDt.mjs";
|
|
6
6
|
import { n as generateEnvTypes, t as findEnvFile } from "./env-types-DknSA4SO.mjs";
|
|
7
|
-
import { a as loadUserEnvFile, i as validateProdEnv, n as formatEnvReport, t as fetchRemoteSecretNames } from "./env-validation-
|
|
7
|
+
import { a as loadUserEnvFile, i as validateProdEnv, n as formatEnvReport, t as fetchRemoteSecretNames } from "./env-validation-Bc_aiBUm.mjs";
|
|
8
8
|
import { existsSync, mkdirSync, readFileSync, writeFileSync } from "node:fs";
|
|
9
9
|
//#region src/cli/env-example.ts
|
|
10
10
|
/**
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { t as StandardSchemaV1 } from "./standard-schema-
|
|
1
|
+
import { t as StandardSchemaV1 } from "./standard-schema-D2qvCEYV.mjs";
|
|
2
2
|
|
|
3
3
|
//#region src/shared/env-mask.d.ts
|
|
4
4
|
/** Per-key override set by `.secret()` / `.public()` on built-in helpers. */
|
|
@@ -20,7 +20,7 @@ declare const SECRET_OVERRIDE_SYMBOL: unique symbol;
|
|
|
20
20
|
declare function getSecretOverride(validator: {
|
|
21
21
|
[SECRET_OVERRIDE_SYMBOL]?: SecretOverride;
|
|
22
22
|
} | unknown): SecretOverride;
|
|
23
|
-
|
|
23
|
+
type EnvSchema<T> = StandardSchemaV1<unknown, T> & {
|
|
24
24
|
optional(): EnvSchema<T | undefined>;
|
|
25
25
|
default(value: NonNullable<T>): EnvSchema<NonNullable<T>>;
|
|
26
26
|
/**
|
|
@@ -33,7 +33,7 @@ interface EnvSchema<T> extends StandardSchemaV1<unknown, T> {
|
|
|
33
33
|
* titles) that happens to match the heuristic (`PUBLIC_KEY`, `…_TOKEN_URL`).
|
|
34
34
|
*/
|
|
35
35
|
public(): EnvSchema<T>;
|
|
36
|
-
}
|
|
36
|
+
};
|
|
37
37
|
/** Required string env value. */
|
|
38
38
|
declare function string(): EnvSchema<string>;
|
|
39
39
|
/** Numeric env value. Parses with `Number(raw)`; rejects NaN. */
|
|
@@ -45,7 +45,7 @@ declare function url(): EnvSchema<string>;
|
|
|
45
45
|
/** Email string — basic shape validation. */
|
|
46
46
|
declare function email(): EnvSchema<string>;
|
|
47
47
|
/** One of a fixed set of literal string values. */
|
|
48
|
-
declare function oneOf<const Values extends
|
|
48
|
+
declare function oneOf<const Values extends Array<string>>(values: Values): EnvSchema<Values[number]>;
|
|
49
49
|
/** JSON-parsed env value. Specify `T` to type the parsed result. */
|
|
50
50
|
declare function json<T = unknown>(): EnvSchema<T>;
|
|
51
51
|
//#endregion
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import { a as join } from "./pathe.M-eThtNZ-D-kmWkCS.mjs";
|
|
2
2
|
import { i as voidWarn } from "./log-DXdqnmhF.mjs";
|
|
3
|
-
import { n as mergeAndExpand, r as parseDotenvFile } from "./dotenv-
|
|
3
|
+
import { n as mergeAndExpand, r as parseDotenvFile } from "./dotenv-zdFCCgFU.mjs";
|
|
4
4
|
import { t as findEnvFile } from "./env-types-DknSA4SO.mjs";
|
|
5
5
|
import { pathToFileURL } from "node:url";
|
|
6
6
|
//#region src/host/load-user-env.ts
|
|
@@ -1,8 +1,8 @@
|
|
|
1
1
|
//#region src/runtime/fetch-error.d.ts
|
|
2
|
-
|
|
2
|
+
type FetchResponse<T = unknown> = Response & {
|
|
3
3
|
_data?: T;
|
|
4
|
-
}
|
|
5
|
-
|
|
4
|
+
};
|
|
5
|
+
type FetchError<T = unknown> = Error & {
|
|
6
6
|
request?: RequestInfo;
|
|
7
7
|
options?: RequestInit & Record<string, unknown>;
|
|
8
8
|
response?: FetchResponse<T>;
|
|
@@ -11,7 +11,7 @@ interface FetchError<T = unknown> extends Error {
|
|
|
11
11
|
statusText?: string;
|
|
12
12
|
statusCode?: number;
|
|
13
13
|
statusMessage?: string;
|
|
14
|
-
}
|
|
14
|
+
};
|
|
15
15
|
type FetchErrorConstructor = new <T = unknown>(message: string, opts?: {
|
|
16
16
|
cause: unknown;
|
|
17
17
|
}) => FetchError<T>;
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
import { a as join, n as dirname, o as relative } from "./pathe.M-eThtNZ-D-kmWkCS.mjs";
|
|
2
2
|
import { n as cliTitle } from "./output-BwlcIYSR.mjs";
|
|
3
3
|
import { _ as me, c as R, g as ge, i as Ee, x as q, y as ye } from "./dist-Dayj3gCK.mjs";
|
|
4
|
-
import { c as getDatabaseDialect, f as readConfig } from "./config-
|
|
4
|
+
import { c as getDatabaseDialect, f as readConfig } from "./config-DqkeX_Fa.mjs";
|
|
5
5
|
import { n as ensureProjectTsconfig } from "./project-tsconfig-DfkESbDL.mjs";
|
|
6
6
|
import { n as writeDrizzleConfig } from "./config-BzM9Dy7T.mjs";
|
|
7
7
|
import { r as readJournal, t as collectMigrations } from "./collect-CjeZgz5D.mjs";
|
|
@@ -535,7 +535,7 @@ export default defineScheduled(async (controller, env) => {
|
|
|
535
535
|
function runQueue(root, name) {
|
|
536
536
|
writeIfNotExists(join(root, "queues", name + ".ts"), `import { defineQueue } from "void";
|
|
537
537
|
|
|
538
|
-
|
|
538
|
+
type Message = {};
|
|
539
539
|
|
|
540
540
|
// export const maxBatchSize = 10;
|
|
541
541
|
// export const maxBatchTimeout = 5;
|