void 0.7.6 → 0.7.8
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/{auth-cmd-Dk0acCT5.mjs → auth-cmd-CKKnwjJr.mjs} +2 -2
- package/dist/{better-auth-shared-CZsIpjey.d.mts → better-auth-shared-HXlHRw02.d.mts} +15 -15
- package/dist/{cache-DGSZ5Bh6.mjs → cache-GQaCgNU_.mjs} +1 -1
- package/dist/{cancel-deploy-CrY3kt93.mjs → cancel-deploy-Lm-s-VNM.mjs} +1 -1
- package/dist/cli/cli.mjs +22 -22
- package/dist/{client-DCqnMpDt.mjs → client-BCHb449S.mjs} +13 -3
- package/dist/{config-BIa9HwVX.mjs → config-DqkeX_Fa.mjs} +5 -5
- package/dist/{create-project-Bg88Kq_I.mjs → create-project-B4_81uPO.mjs} +1 -1
- package/dist/{db-DvBg7Oc5.mjs → db-DEgoBwm1.mjs} +26 -22
- package/dist/{delete-DXcX1yQZ.mjs → delete-B3XRid-6.mjs} +1 -1
- package/dist/{deploy-B5rTuzXw.mjs → deploy-BVhinNvN.mjs} +35 -12
- package/dist/{domain-CDQhvYNZ.mjs → domain-CwjrEwk9.mjs} +25 -2
- package/dist/{dotenv-DwO4ti0Z.mjs → dotenv-zdFCCgFU.mjs} +26 -26
- package/dist/{env-helpers-CbeM_7-k.d.mts → env-helpers-Dw95CU8e.d.mts} +4 -4
- package/dist/{env-CnrQY2b6.mjs → env-kXobUKhc.mjs} +2 -2
- 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 +42 -33
- package/dist/{init-BiXWyKEf.mjs → init-CfdGhcG_.mjs} +5 -5
- package/dist/{link-eZ0aiHFK.mjs → link-sYAGQEVa.mjs} +2 -2
- package/dist/{list-ztyEz4TW.mjs → list-B_cMVlKj.mjs} +1 -1
- package/dist/{login-B5HHT32i.mjs → login-B-hYch9Z.mjs} +1 -1
- package/dist/{logs-J4BN0LXd.mjs → logs-JrG0_AxV.mjs} +1 -1
- package/dist/{mcp-Bdu9bnjR.mjs → mcp-BcssKxth.mjs} +1 -1
- 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 +3 -3
- package/dist/pages/islands-plugin.mjs +1 -1
- package/dist/pages/prefetch.d.mts +5 -5
- package/dist/pages/protocol.d.mts +2 -2
- package/dist/pages/protocol.mjs +2 -2
- package/dist/{prepare-BrfiJBju.mjs → prepare-CKzO06-Z.mjs} +3 -3
- package/dist/{project-cmd-DKiQYdSd.mjs → project-cmd-DDDakkqn.mjs} +8 -8
- package/dist/{protocol-COz1NHxc.d.mts → protocol-D7r_deVZ.d.mts} +5 -5
- package/dist/{rollback-ZNvT8T54.mjs → rollback-_11JdPsF.mjs} +1 -1
- 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-vv5u7rHu.mjs → scan-B8iEm8xn.mjs} +5 -5
- package/dist/{scan-Ba4hFwlH.mjs → scan-CWfLxtOe.mjs} +8 -8
- package/dist/{secret-BXHx515u.mjs → secret-DwG7uDho.mjs} +1 -1
- 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 +2 -2
- package/dist/types-D6AuY5Bf.d.mts +0 -65
|
@@ -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,6 +1,6 @@
|
|
|
1
1
|
import { c as R } from "./dist-Dayj3gCK.mjs";
|
|
2
|
-
import { c as getToken, d as removeToken, n as PlatformClient } from "./client-
|
|
3
|
-
import { n as runLoginCommand } from "./login-
|
|
2
|
+
import { c as getToken, d as removeToken, n as PlatformClient } from "./client-BCHb449S.mjs";
|
|
3
|
+
import { n as runLoginCommand } from "./login-B-hYch9Z.mjs";
|
|
4
4
|
import { execSync } from "node:child_process";
|
|
5
5
|
//#region src/cli/auth-cmd.ts
|
|
6
6
|
async function runAuthCommand(root, args) {
|
|
@@ -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 };
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
import { i as dim, n as cliTitle, r as createSpinner } from "./output-BwlcIYSR.mjs";
|
|
2
2
|
import { c as R, g as ge, y as ye } from "./dist-Dayj3gCK.mjs";
|
|
3
3
|
import { r as readProjectConfig } from "./project-TqORyHn8.mjs";
|
|
4
|
-
import { c as getToken, n as PlatformClient } from "./client-
|
|
4
|
+
import { c as getToken, n as PlatformClient } from "./client-BCHb449S.mjs";
|
|
5
5
|
import { r as resolveProjectBySlug, t as getRequestedProjectSlug } from "./resolve-project-DdjLQ2tB.mjs";
|
|
6
6
|
//#region src/cli/cache.ts
|
|
7
7
|
async function runPurgeCacheCommand(root, projectSlug) {
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
import { n as cliTitle } from "./output-BwlcIYSR.mjs";
|
|
2
2
|
import { c as R, g as ge, v as ue, x as q, y as ye } from "./dist-Dayj3gCK.mjs";
|
|
3
3
|
import { r as readProjectConfig } from "./project-TqORyHn8.mjs";
|
|
4
|
-
import { c as getToken, n as PlatformClient } from "./client-
|
|
4
|
+
import { c as getToken, n as PlatformClient } from "./client-BCHb449S.mjs";
|
|
5
5
|
//#region src/cli/cancel-deploy.ts
|
|
6
6
|
const ACTIVE_STATUSES = new Set([
|
|
7
7
|
"pending",
|
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-BVhinNvN.mjs").then((n) => n.t).then(({ runDeploy }) => {
|
|
1507
1507
|
runDeploy(root, {
|
|
1508
1508
|
projectSlug: deployArgs.projectSlug,
|
|
1509
1509
|
dir: deployArgs.dir,
|
|
@@ -1515,13 +1515,13 @@ else if (command === "deploy") {
|
|
|
1515
1515
|
process.exit(1);
|
|
1516
1516
|
});
|
|
1517
1517
|
});
|
|
1518
|
-
} else if (command === "auth") runSubcommandGroup("auth", authSubcommands, parseAuthArgs, (root, parsed) => import("../auth-cmd-
|
|
1519
|
-
else if (command === "project") runSubcommandGroup("project", projectSubcommands, parseProjectArgs, (root, parsed) => import("../project-cmd-
|
|
1520
|
-
else if (command === "secret") runSubcommandGroup("secret", secretSubcommands, parseSecretArgs, (root, parsed) => import("../secret-
|
|
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-
|
|
1518
|
+
} else if (command === "auth") runSubcommandGroup("auth", authSubcommands, parseAuthArgs, (root, parsed) => import("../auth-cmd-CKKnwjJr.mjs").then(({ runAuthCommand }) => runAuthCommand(root, parsed)));
|
|
1519
|
+
else if (command === "project") runSubcommandGroup("project", projectSubcommands, parseProjectArgs, (root, parsed) => import("../project-cmd-DDDakkqn.mjs").then(({ runProjectCommand }) => runProjectCommand(root, parsed)));
|
|
1520
|
+
else if (command === "secret") runSubcommandGroup("secret", secretSubcommands, parseSecretArgs, (root, parsed) => import("../secret-DwG7uDho.mjs").then(({ runSecretCommand }) => runSecretCommand(root, parsed)));
|
|
1521
|
+
else if (command === "domain") runSubcommandGroup("domain", domainSubcommands, parseDomainArgs, (root, parsed) => import("../domain-CwjrEwk9.mjs").then(({ runDomainCommand }) => runDomainCommand(root, parsed)));
|
|
1522
|
+
else if (command === "db") runSubcommandGroup("db", dbSubcommands, parseDbArgs, (root, parsed) => import("../db-DEgoBwm1.mjs").then(({ runDbCommand }) => runDbCommand(root, parsed)));
|
|
1523
|
+
else if (command === "env") runSubcommandGroup("env", envSubcommands, parseEnvArgs, (root, parsed) => import("../env-kXobUKhc.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-CfdGhcG_.mjs").then(({ runInitCommand, parseInitArgs }) => {
|
|
1543
1543
|
let initArgs;
|
|
1544
1544
|
try {
|
|
1545
1545
|
initArgs = parseInitArgs(args.slice(1));
|
|
@@ -1552,7 +1552,7 @@ else if (command === "prepare") {
|
|
|
1552
1552
|
process.exit(1);
|
|
1553
1553
|
});
|
|
1554
1554
|
});
|
|
1555
|
-
} else if (command === "mcp") import("../mcp-
|
|
1555
|
+
} else if (command === "mcp") import("../mcp-BcssKxth.mjs").then(({ runMcp }) => {
|
|
1556
1556
|
runMcp();
|
|
1557
1557
|
});
|
|
1558
1558
|
else if (command === "-v" || command === "--version") {
|
|
@@ -1628,29 +1628,29 @@ 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-CfdGhcG_.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-BVhinNvN.mjs").then((n) => n.t);
|
|
1637
1637
|
await runDeploy(root);
|
|
1638
1638
|
return;
|
|
1639
1639
|
}
|
|
1640
1640
|
case "mcp": {
|
|
1641
|
-
const { runMcp } = await import("../mcp-
|
|
1641
|
+
const { runMcp } = await import("../mcp-BcssKxth.mjs");
|
|
1642
1642
|
runMcp();
|
|
1643
1643
|
return;
|
|
1644
1644
|
}
|
|
1645
|
-
case "auth": return runSubcommandGroup("auth", authSubcommands, parseAuthArgs, (r, p) => import("../auth-cmd-
|
|
1646
|
-
case "project": return runSubcommandGroup("project", projectSubcommands, parseProjectArgs, (r, p) => import("../project-cmd-
|
|
1647
|
-
case "secret": return runSubcommandGroup("secret", secretSubcommands, parseSecretArgs, (r, p) => import("../secret-
|
|
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-
|
|
1645
|
+
case "auth": return runSubcommandGroup("auth", authSubcommands, parseAuthArgs, (r, p) => import("../auth-cmd-CKKnwjJr.mjs").then(({ runAuthCommand }) => runAuthCommand(r, p)));
|
|
1646
|
+
case "project": return runSubcommandGroup("project", projectSubcommands, parseProjectArgs, (r, p) => import("../project-cmd-DDDakkqn.mjs").then(({ runProjectCommand }) => runProjectCommand(r, p)));
|
|
1647
|
+
case "secret": return runSubcommandGroup("secret", secretSubcommands, parseSecretArgs, (r, p) => import("../secret-DwG7uDho.mjs").then(({ runSecretCommand }) => runSecretCommand(r, p)));
|
|
1648
|
+
case "domain": return runSubcommandGroup("domain", domainSubcommands, parseDomainArgs, (r, p) => import("../domain-CwjrEwk9.mjs").then(({ runDomainCommand }) => runDomainCommand(r, p)));
|
|
1649
|
+
case "db": return runSubcommandGroup("db", dbSubcommands, parseDbArgs, (r, p) => import("../db-DEgoBwm1.mjs").then(({ runDbCommand }) => runDbCommand(r, p)));
|
|
1650
|
+
case "env": return runSubcommandGroup("env", envSubcommands, parseEnvArgs, (r, p) => import("../env-kXobUKhc.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
|
}
|
|
@@ -5,6 +5,7 @@ import { t as isVoidInternalStaging } from "./project-TqORyHn8.mjs";
|
|
|
5
5
|
import { t as cfAccessHeaders } from "./cf-access-Dee5cXxL.mjs";
|
|
6
6
|
import { r as getPackageDir } from "./agents-DqkFfc2c.mjs";
|
|
7
7
|
import { mkdirSync, readFileSync, writeFileSync } from "node:fs";
|
|
8
|
+
import { randomBytes } from "node:crypto";
|
|
8
9
|
import { homedir } from "node:os";
|
|
9
10
|
import { Entry } from "@napi-rs/keyring";
|
|
10
11
|
import { spawnSync } from "node:child_process";
|
|
@@ -143,6 +144,7 @@ async function runLogin(root = process.cwd(), provider = "github", onUrl) {
|
|
|
143
144
|
const http = await import("node:http");
|
|
144
145
|
const { exec } = await import("node:child_process");
|
|
145
146
|
const apiUrl = getApiUrl(root);
|
|
147
|
+
const state = randomBytes(32).toString("hex");
|
|
146
148
|
return new Promise((resolve, reject) => {
|
|
147
149
|
const server = http.createServer((req, res) => {
|
|
148
150
|
const url = new URL(req.url, `http://localhost`);
|
|
@@ -151,6 +153,11 @@ async function runLogin(root = process.cwd(), provider = "github", onUrl) {
|
|
|
151
153
|
res.end("Not found");
|
|
152
154
|
return;
|
|
153
155
|
}
|
|
156
|
+
if (url.searchParams.get("state") !== state) {
|
|
157
|
+
res.writeHead(400, { "Content-Type": "text/html" });
|
|
158
|
+
res.end(page("Login failed", "Invalid login callback. Please try again."));
|
|
159
|
+
return;
|
|
160
|
+
}
|
|
154
161
|
if (url.searchParams.get("error") === "signup_restricted") {
|
|
155
162
|
res.writeHead(403, { "Content-Type": "text/html" });
|
|
156
163
|
res.end(page("Signup restricted", "Your email is not on the approved list for this environment."));
|
|
@@ -179,9 +186,12 @@ async function runLogin(root = process.cwd(), provider = "github", onUrl) {
|
|
|
179
186
|
return;
|
|
180
187
|
}
|
|
181
188
|
const redirect = `http://localhost:${addr.port}/callback`;
|
|
182
|
-
const loginUrl =
|
|
183
|
-
|
|
184
|
-
|
|
189
|
+
const loginUrl = new URL("auth/login", apiUrl.endsWith("/") ? apiUrl : `${apiUrl}/`);
|
|
190
|
+
loginUrl.searchParams.set("redirect", redirect);
|
|
191
|
+
loginUrl.searchParams.set("provider", provider);
|
|
192
|
+
loginUrl.searchParams.set("state", state);
|
|
193
|
+
onUrl?.(loginUrl.href);
|
|
194
|
+
openBrowser(loginUrl.href, exec);
|
|
185
195
|
});
|
|
186
196
|
setTimeout(() => {
|
|
187
197
|
server.close();
|
|
@@ -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
|
}
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
import { s as import_picocolors } from "./output-BwlcIYSR.mjs";
|
|
2
2
|
import { _ as me, c as R, i as Ee, l as Re, x as q } from "./dist-Dayj3gCK.mjs";
|
|
3
3
|
import { a as writeProjectConfig } from "./project-TqORyHn8.mjs";
|
|
4
|
-
import { s as getSiteDomain, t as PlatformApiError } from "./client-
|
|
4
|
+
import { s as getSiteDomain, t as PlatformApiError } from "./client-BCHb449S.mjs";
|
|
5
5
|
import { n as validateProjectSlug } from "./project-slug-KRvHQEQI.mjs";
|
|
6
6
|
import { n as inferDefaultSlug } from "./resolve-project-DdjLQ2tB.mjs";
|
|
7
7
|
//#region src/cli/prompt.ts
|
|
@@ -2,12 +2,12 @@ import { a as join, o as relative, r as extname, s as resolve } from "./pathe.M-
|
|
|
2
2
|
import { i as dim, n as cliTitle, s as import_picocolors } from "./output-BwlcIYSR.mjs";
|
|
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
|
-
import { c as getToken, n as PlatformClient } from "./client-
|
|
6
|
-
import { c as getDatabaseDialect, f as readConfig } from "./config-
|
|
5
|
+
import { c as getToken, n as PlatformClient } from "./client-BCHb449S.mjs";
|
|
6
|
+
import { c as getDatabaseDialect, f as readConfig } from "./config-DqkeX_Fa.mjs";
|
|
7
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);
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
import { n as cliTitle, r as createSpinner } from "./output-BwlcIYSR.mjs";
|
|
2
2
|
import { _ as me, c as R, g as ge, l as Re, u as Se, x as q, y as ye } from "./dist-Dayj3gCK.mjs";
|
|
3
3
|
import { i as removeProjectConfig, r as readProjectConfig } from "./project-TqORyHn8.mjs";
|
|
4
|
-
import { c as getToken, n as PlatformClient } from "./client-
|
|
4
|
+
import { c as getToken, n as PlatformClient } from "./client-BCHb449S.mjs";
|
|
5
5
|
import { r as resolveProjectBySlug } from "./resolve-project-DdjLQ2tB.mjs";
|
|
6
6
|
//#region src/cli/delete.ts
|
|
7
7
|
async function runDeleteCommand(root, slug, options) {
|
|
@@ -4,29 +4,29 @@ import { n as cliTitle, r as createSpinner, s as import_picocolors } from "./out
|
|
|
4
4
|
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
|
-
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-
|
|
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-
|
|
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-BCHb449S.mjs";
|
|
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
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-
|
|
19
|
-
import { n as promptProjectSelection, r as promptProjectSetupAction, t as promptAndCreateProject } from "./create-project-
|
|
18
|
+
import { t as scanPages } from "./scan-CWfLxtOe.mjs";
|
|
19
|
+
import { n as promptProjectSelection, r as promptProjectSetupAction, t as promptAndCreateProject } from "./create-project-B4_81uPO.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-
|
|
22
|
-
import { t as promptForLoginToken } from "./login-
|
|
21
|
+
import { n as lintDuplicateSources, r as mergeRoutingRules, t as lintDestinationSplats } from "./headers-C7Yf6_CN.mjs";
|
|
22
|
+
import { t as promptForLoginToken } from "./login-B-hYch9Z.mjs";
|
|
23
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";
|
|
27
27
|
import { build, loadEnv } from "vite";
|
|
28
|
-
import { homedir } from "node:os";
|
|
29
28
|
import { createHash } from "node:crypto";
|
|
29
|
+
import { homedir } from "node:os";
|
|
30
30
|
import { parse } from "jsonc-parser";
|
|
31
31
|
import { execFile, execFileSync, execSync, spawnSync } from "node:child_process";
|
|
32
32
|
import { hash } from "blake3-jit";
|
|
@@ -1546,8 +1546,8 @@ function computeAssetHashes(content, filePath) {
|
|
|
1546
1546
|
}
|
|
1547
1547
|
/**
|
|
1548
1548
|
* Create a filter function that excludes .assetsignore, _headers, _redirects,
|
|
1549
|
-
* OS metadata files, deploy-internal patterns, and any patterns
|
|
1550
|
-
* .assetsignore file.
|
|
1549
|
+
* OS metadata files, dotenv files, deploy-internal patterns, and any patterns
|
|
1550
|
+
* listed in a .assetsignore file.
|
|
1551
1551
|
* Matches Wrangler's createAssetsIgnoreFunction from workers-shared/utils/helpers.ts.
|
|
1552
1552
|
*/
|
|
1553
1553
|
function createAssetsIgnoreFunction(dir, extraPatterns = []) {
|
|
@@ -1556,6 +1556,8 @@ function createAssetsIgnoreFunction(dir, extraPatterns = []) {
|
|
|
1556
1556
|
"/_redirects",
|
|
1557
1557
|
"/_headers",
|
|
1558
1558
|
".DS_Store",
|
|
1559
|
+
".env",
|
|
1560
|
+
".env.*",
|
|
1559
1561
|
...extraPatterns
|
|
1560
1562
|
];
|
|
1561
1563
|
const assetsIgnorePath = join(dir, ".assetsignore");
|
|
@@ -1598,7 +1600,7 @@ async function collectAndHashAssets(dir, onProgress, opts = {}) {
|
|
|
1598
1600
|
const assetFiles = /* @__PURE__ */ new Map();
|
|
1599
1601
|
try {
|
|
1600
1602
|
const { isIgnored, assetsIgnoreFilePresent } = createAssetsIgnoreFunction(dir, opts.ignorePatterns);
|
|
1601
|
-
const files =
|
|
1603
|
+
const files = collectAssetFiles(dir);
|
|
1602
1604
|
let processed = 0;
|
|
1603
1605
|
for (const filePath of files) {
|
|
1604
1606
|
processed++;
|
|
@@ -1846,6 +1848,24 @@ function collectFiles(dir) {
|
|
|
1846
1848
|
}
|
|
1847
1849
|
return files;
|
|
1848
1850
|
}
|
|
1851
|
+
/**
|
|
1852
|
+
* Recursively collect static asset file paths, refusing symlinks so deploys
|
|
1853
|
+
* cannot publish bytes from outside the intended asset root.
|
|
1854
|
+
*/
|
|
1855
|
+
function collectAssetFiles(root, dir = root) {
|
|
1856
|
+
const files = [];
|
|
1857
|
+
const entries = readdirSync(dir, { withFileTypes: true });
|
|
1858
|
+
for (const entry of entries) {
|
|
1859
|
+
const fullPath = join(dir, entry.name);
|
|
1860
|
+
if (entry.isSymbolicLink()) {
|
|
1861
|
+
const relativePath = "/" + toSlash(relative(root, fullPath));
|
|
1862
|
+
throw new Error(`deploy: Refusing to upload symlink as an asset: ${relativePath}`);
|
|
1863
|
+
}
|
|
1864
|
+
if (entry.isDirectory()) files.push(...collectAssetFiles(root, fullPath));
|
|
1865
|
+
else files.push(fullPath);
|
|
1866
|
+
}
|
|
1867
|
+
return files;
|
|
1868
|
+
}
|
|
1849
1869
|
//#endregion
|
|
1850
1870
|
//#region src/cli/wrapper.ts
|
|
1851
1871
|
const BUNDLED_ENTRY_RE = /^index\.(?:m?js|cjs)$/;
|
|
@@ -1992,6 +2012,9 @@ function generateWrapperSource(renamedEntry, handlersModule, features, migration
|
|
|
1992
2012
|
if (needsFetchWrap) {
|
|
1993
2013
|
lines.push("async function wrappedFetch(request, env, ctx) {");
|
|
1994
2014
|
lines.push(" const url = new URL(request.url);");
|
|
2015
|
+
lines.push(" if (request.method === \"GET\" && url.pathname === \"/__void/ready\") {");
|
|
2016
|
+
lines.push(" return Response.json({ ready: true });");
|
|
2017
|
+
lines.push(" }");
|
|
1995
2018
|
if (migrations && migrations.length > 0) {
|
|
1996
2019
|
lines.push(" if (request.method === \"POST\" && url.pathname === \"/__void/migrate\") {");
|
|
1997
2020
|
lines.push(" const handler = createMigrationHandler(env, __migrations, __migrationDialect);");
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
import { s as import_picocolors } from "./output-BwlcIYSR.mjs";
|
|
2
2
|
import { c as R, u as Se } from "./dist-Dayj3gCK.mjs";
|
|
3
3
|
import { r as readProjectConfig } from "./project-TqORyHn8.mjs";
|
|
4
|
-
import { c as getToken, n as PlatformClient } from "./client-
|
|
4
|
+
import { c as getToken, n as PlatformClient } from "./client-BCHb449S.mjs";
|
|
5
5
|
//#region src/cli/domain.ts
|
|
6
6
|
async function runDomainCommand(root, args) {
|
|
7
7
|
const token = getToken(root);
|
|
@@ -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 };
|