@builtbyfriends/bwf 1.9.1 → 1.9.2
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/{account-cmd-Cj0I2_bJ.mjs → account-cmd-Ddt8lGeL.mjs} +2 -2
- package/dist/{auth-link-D-DddkCQ.mjs → auth-link-CCl-hJol.mjs} +2 -2
- package/dist/{auth-router-tWzIwf8f.mjs → auth-router-BG74WFUf.mjs} +2 -2
- package/dist/cli/cli.mjs +1 -1
- package/dist/cli/env-schema-probe.mjs +2 -2
- package/dist/{cli-main-HeXRQml6.mjs → cli-main-BfYf6fnB.mjs} +22 -22
- package/dist/{cloudflare-auth-jb-1e43r.mjs → cloudflare-auth-DzkU9H6r.mjs} +1 -1
- package/dist/{cloudflare-cmd-B62t8Fm-.mjs → cloudflare-cmd-Bm6UhzAQ.mjs} +3 -3
- package/dist/{cloudflare-connect-x7IsYghw.mjs → cloudflare-connect-B4ItSbJi.mjs} +2 -2
- package/dist/{cloudflare-operations-C3Uu0Emj.mjs → cloudflare-operations-BcK849ue.mjs} +1 -1
- package/dist/{cloudflare-operations-BeK7bhnP.mjs → cloudflare-operations-DGF7xH7O.mjs} +4 -4
- package/dist/{cloudflare-process-Cc6oiJqk.mjs → cloudflare-process-tThIjEB2.mjs} +1 -1
- package/dist/{connect-hLPNppu3.mjs → connect-CSNWKLzB.mjs} +4 -4
- package/dist/{db-BH_md90k.mjs → db-SOv4E9wr.mjs} +14 -14
- package/dist/deploy-BCSQoKC0.mjs +2 -0
- package/dist/{deploy-C8KHBNsh.mjs → deploy-CWJ3JJs_.mjs} +14 -14
- package/dist/deploy.mjs +2 -2
- package/dist/{domain-C4ZhEiFG.mjs → domain-BJaAbxuQ.mjs} +1 -1
- package/dist/{email-cloudflare-DuAc9zny.mjs → email-cloudflare-oXk2G1G3.mjs} +1 -1
- package/dist/{email-B3TWga7x.mjs → email-rIfZgVAB.mjs} +4 -4
- package/dist/{env-CTAo8ifZ.mjs → env-BGTu3KWZ.mjs} +2 -2
- package/dist/{env-validation-DPqDo4DU.mjs → env-validation-BlXzGgLZ.mjs} +1 -1
- package/dist/{env-validation-BufZConV.mjs → env-validation-DeqFUSKg.mjs} +1 -1
- package/dist/{handler-CVsIfRv7.d.mts → handler-B_ocHStk.d.mts} +1 -1
- package/dist/{handler-CJ7DiiRF.mjs → handler-CNq7aSs1.mjs} +1 -1
- package/dist/{help-Bpv6Qeqn.mjs → help-BK35YcRa.mjs} +2 -2
- package/dist/help-DaRezBj7.mjs +1 -0
- package/dist/index.d.mts +1 -1
- package/dist/index.mjs +8 -8
- package/dist/{init-DRUR0j8C.mjs → init-CXanf5ck.mjs} +9 -9
- package/dist/{list-B84t4BhW.mjs → list-B1WAE9Wt.mjs} +1 -1
- package/dist/{live-Dui0-aj_.d.mts → live-KkEeda1Z.d.mts} +1 -1
- package/dist/{local-d1-C3EeOV7-.mjs → local-d1-bUoAtFUe.mjs} +1 -1
- package/dist/login-BUzyiyHV.mjs +1 -0
- package/dist/{login-Bl5lH8nH.mjs → login-Dbv_T3Ru.mjs} +1 -1
- package/dist/{logs-CaT2N2f7.mjs → logs-BjMJooJQ.mjs} +1 -1
- package/dist/migrate-DjW9_-sS.mjs +1 -0
- package/dist/{migrate-CbGscX-V.mjs → migrate-DtcfKqPW.mjs} +1 -1
- package/dist/{operator-args-BFg32YyY.mjs → operator-args-BiGmSlZx.mjs} +1 -1
- package/dist/operator-cmd-BsHKYJYt.mjs +1 -0
- package/dist/{operator-cmd-C73WWJBl.mjs → operator-cmd-DTIkOAnP.mjs} +3 -3
- package/dist/{package-DO4d3Qz5.mjs → package-BX_giUBX.mjs} +4 -4
- package/dist/platform-args-C-DyuCNX.mjs +1 -0
- package/dist/{platform-args-NI_vfWvD.mjs → platform-args-CyeQWaZ7.mjs} +1 -1
- package/dist/{platform-auth-config-d-lY5-aY.mjs → platform-auth-config-BfXqKSyZ.mjs} +4 -4
- package/dist/{platform-auth-protection-Dhw7lUCk.mjs → platform-auth-protection-5FR6qoP_.mjs} +2 -2
- package/dist/{platform-auth-recovery-DaCc0tlx.mjs → platform-auth-recovery-B5ZlqA8K.mjs} +2 -2
- package/dist/{platform-cmd-5oZq91lI.mjs → platform-cmd-CcFDxtrl.mjs} +1 -1
- package/dist/{platform-cmd-5Ry-C9im.mjs → platform-cmd-ChXeBrRH.mjs} +4 -4
- package/dist/{platform-domain-DLVdGvGG.mjs → platform-domain-CwatS3cz.mjs} +2 -2
- package/dist/{platform-lifecycle-fRt5VMls.mjs → platform-lifecycle-0cXTmMsh.mjs} +20 -20
- package/dist/{platform-lifecycle-CUgjipXO.mjs → platform-lifecycle-BcoBAMux.mjs} +1 -1
- package/dist/{platform-management-Djh1hzLP.mjs → platform-management-6Wbdbob5.mjs} +2 -2
- package/dist/{platform-management-5hEsRfR2.mjs → platform-management-hhnczOzr.mjs} +1 -1
- package/dist/{platform-recovery-Cghx7FCR.mjs → platform-recovery-DgIwlqB-.mjs} +2 -2
- package/dist/{platform-setup-SfwCwnZg.mjs → platform-setup-DX8y_6Kh.mjs} +1 -1
- package/dist/{project-cmd-DTF19-fC.mjs → project-cmd-BydRwr-x.mjs} +6 -6
- package/dist/{provision-DGlFJ3T9.mjs → provision-BA59NCPO.mjs} +1 -1
- package/dist/{provision-mYVLuQiy.mjs → provision-C90fULHJ.mjs} +2 -2
- package/dist/{rollback-BvCHol52.mjs → rollback-wi6WK5T6.mjs} +1 -1
- package/dist/{runner-mysql-DrMKw203.mjs → runner-mysql-BjSoQ-mW.mjs} +1 -1
- package/dist/{runner-mysql-7aA5hGoM.mjs → runner-mysql-BmTI2EiF.mjs} +1 -1
- package/dist/runtime/handler.d.mts +1 -1
- package/dist/runtime/handler.mjs +1 -1
- package/dist/runtime/live-client.d.mts +1 -1
- package/dist/runtime/live.d.mts +1 -1
- package/dist/runtime/procedure.d.mts +1 -1
- package/dist/runtime/routing.d.mts +1 -1
- package/dist/runtime/routing.mjs +1 -1
- package/dist/runtime/validator.d.mts +1 -1
- package/dist/runtime/ws-server.d.mts +1 -1
- package/dist/runtime/ws.d.mts +1 -1
- package/dist/{secret-DCF9RXTc.mjs → secret-D5XrWshs.mjs} +2 -2
- package/dist/{version-metadata-DsSoNsKJ.mjs → version-metadata-DPhqnpaa.mjs} +1 -1
- package/dist/wrangler-C3uyPadQ.mjs +1 -0
- package/dist/{wrangler-DU784Dkf.mjs → wrangler-TqTvJFWS.mjs} +1 -1
- package/dist/{ws-Q_osq9VK.d.mts → ws-DZRiIpYw.d.mts} +1 -1
- package/docs/guide/auth.md +1 -1
- package/docs/guide/platform/administration/zero-trust.md +1 -1
- package/docs/guide/queues.md +1 -1
- package/docs/reference/cli/database.md +1 -1
- package/docs/reference/cli/platform.md +1 -1
- package/package.json +7 -7
- package/dist/deploy-DCZBr7Ey.mjs +0 -2
- package/dist/help-CfZ4Bsw5.mjs +0 -1
- package/dist/login-DoI7AsbY.mjs +0 -1
- package/dist/migrate-Ce3JKLVs.mjs +0 -1
- package/dist/operator-cmd-CdZytuAF.mjs +0 -1
- package/dist/platform-args-ZC1-A1N9.mjs +0 -1
- package/dist/wrangler-Rr9_76DQ.mjs +0 -1
|
@@ -1,14 +1,14 @@
|
|
|
1
1
|
import { L as log } from "./dist-STQXl8ck.mjs";
|
|
2
2
|
import { c as getToken, f as removeToken } from "./auth-xnkmpZUl.mjs";
|
|
3
3
|
import { r as PlatformClient } from "./client-D3D5RM5h.mjs";
|
|
4
|
-
import { n as runLoginCommand } from "./login-
|
|
4
|
+
import { n as runLoginCommand } from "./login-Dbv_T3Ru.mjs";
|
|
5
5
|
import { m as printSuccess } from "./output-Bb34lF0w.mjs";
|
|
6
6
|
import { execSync } from "node:child_process";
|
|
7
7
|
// src/cli/account-cmd.ts
|
|
8
8
|
async function runAccountCommand(root, args) {
|
|
9
9
|
switch (args.subcommand) {
|
|
10
10
|
case "login": return runLoginCommand(root);
|
|
11
|
-
case "link": return import("./auth-link-
|
|
11
|
+
case "link": return import("./auth-link-CCl-hJol.mjs").then(({ runAuthLink }) => runAuthLink(root, args.connectionId));
|
|
12
12
|
case "logout":
|
|
13
13
|
if (removeToken(root)) printSuccess("Logged out.");
|
|
14
14
|
else log.info("Not logged in.");
|
|
@@ -1,9 +1,9 @@
|
|
|
1
1
|
import { L as log } from "./dist-STQXl8ck.mjs";
|
|
2
2
|
import { a as getApiUrl, c as getToken, m as savePlatformToken, p as runPlatformLogin, u as openBrowser } from "./auth-xnkmpZUl.mjs";
|
|
3
3
|
import { r as PlatformClient } from "./client-D3D5RM5h.mjs";
|
|
4
|
-
import { r as selectPlatformLoginMethod } from "./login-
|
|
4
|
+
import { r as selectPlatformLoginMethod } from "./login-Dbv_T3Ru.mjs";
|
|
5
5
|
import { l as formatUrl } from "./output-Bb34lF0w.mjs";
|
|
6
|
-
import { t as discoverPlatform } from "./platform-cmd-
|
|
6
|
+
import { t as discoverPlatform } from "./platform-cmd-ChXeBrRH.mjs";
|
|
7
7
|
// src/cli/auth-link.ts
|
|
8
8
|
async function runAuthLink(root, connectionId) {
|
|
9
9
|
const token = getToken(root);
|
|
@@ -39,11 +39,11 @@ async function chooseDestination(root, args, interactive) {
|
|
|
39
39
|
async function runAuthRouter(root, args, interactive = Boolean(process.stdin.isTTY)) {
|
|
40
40
|
const destination = await chooseDestination(root, args, interactive);
|
|
41
41
|
if (destination.platform === "cloudflare") {
|
|
42
|
-
const { runCloudflareCommand } = await import("./cloudflare-cmd-
|
|
42
|
+
const { runCloudflareCommand } = await import("./cloudflare-cmd-Bm6UhzAQ.mjs");
|
|
43
43
|
await runCloudflareCommand(root, { subcommand: args.subcommand });
|
|
44
44
|
return;
|
|
45
45
|
}
|
|
46
|
-
const { runAccountCommand } = await import("./account-cmd-
|
|
46
|
+
const { runAccountCommand } = await import("./account-cmd-Ddt8lGeL.mjs");
|
|
47
47
|
const subcommand = args.subcommand === "status" ? "whoami" : args.subcommand;
|
|
48
48
|
if (!destination.apiUrl) {
|
|
49
49
|
await runAccountCommand(root, { subcommand });
|
package/dist/cli/cli.mjs
CHANGED
|
@@ -84,5 +84,5 @@ const message = unsupportedRuntimeMessage(process.versions, process.execPath);
|
|
|
84
84
|
if (message) {
|
|
85
85
|
process.stderr.write(`${message}\n`);
|
|
86
86
|
process.exitCode = 1;
|
|
87
|
-
} else await import("../cli-main-
|
|
87
|
+
} else await import("../cli-main-BfYf6fnB.mjs");
|
|
88
88
|
export {};
|
|
@@ -109,7 +109,7 @@ function emitResult(result) {
|
|
|
109
109
|
writeSync(RESULT_FD, JSON.stringify(result));
|
|
110
110
|
}
|
|
111
111
|
async function runFactsChild(root) {
|
|
112
|
-
const { deriveSelfHostSchemaFacts, SelfHostSchemaError } = await import("../env-validation-
|
|
112
|
+
const { deriveSelfHostSchemaFacts, SelfHostSchemaError } = await import("../env-validation-BlXzGgLZ.mjs");
|
|
113
113
|
try {
|
|
114
114
|
emitResult({
|
|
115
115
|
kind: "ok",
|
|
@@ -128,7 +128,7 @@ async function runFactsChild(root) {
|
|
|
128
128
|
}
|
|
129
129
|
/** The parent already found the emitted config, so a read failure here fails closed. */
|
|
130
130
|
async function runValidateEmittedChild(root) {
|
|
131
|
-
const { computeInvalidEmittedKeys, readEmittedWorkerVars, SelfHostSchemaError } = await import("../env-validation-
|
|
131
|
+
const { computeInvalidEmittedKeys, readEmittedWorkerVars, SelfHostSchemaError } = await import("../env-validation-BlXzGgLZ.mjs");
|
|
132
132
|
const emitted = readEmittedWorkerVars(root);
|
|
133
133
|
if (!emitted.ok) {
|
|
134
134
|
emitResult({
|
|
@@ -2,11 +2,11 @@ import { L as log } from "./dist-STQXl8ck.mjs";
|
|
|
2
2
|
import { n as getOwnVersion } from "./agents-BLiMq9E1.mjs";
|
|
3
3
|
import { t as formatCloudflareUserMessage } from "./cloudflare-user-output-CqONaAbP.mjs";
|
|
4
4
|
import { n as isD1Bookmark } from "./cf-command-values-2kOtxMo1.mjs";
|
|
5
|
-
import { i as printHelpPage, n as printBwfHeader, r as printGlobalHelp, t as getHelpPath } from "./help-
|
|
6
|
-
import { n as operatorGroups } from "./operator-args-
|
|
5
|
+
import { i as printHelpPage, n as printBwfHeader, r as printGlobalHelp, t as getHelpPath } from "./help-BK35YcRa.mjs";
|
|
6
|
+
import { n as operatorGroups } from "./operator-args-BiGmSlZx.mjs";
|
|
7
7
|
import { r as OperatorClientError } from "./operator-client-DBujdELO.mjs";
|
|
8
8
|
import { f as import_picocolors, l as formatUrl } from "./output-Bb34lF0w.mjs";
|
|
9
|
-
import { n as platformSubcommands, t as parsePlatformArgs } from "./platform-args-
|
|
9
|
+
import { n as platformSubcommands, t as parsePlatformArgs } from "./platform-args-CyeQWaZ7.mjs";
|
|
10
10
|
import { parseArgs } from "node:util";
|
|
11
11
|
// src/cli/account-args.ts
|
|
12
12
|
const accountSubcommands = [
|
|
@@ -1565,7 +1565,7 @@ async function runSubcommandGroup(command, subcommands, parse, run) {
|
|
|
1565
1565
|
const { promptSubcommand } = await import("./subcommand-prompt-B9yUo--u.mjs");
|
|
1566
1566
|
if (command === "platform" && !sub) log.info(`A bwf platform lets a team deploy bwf apps to a shared Cloudflare account.
|
|
1567
1567
|
This command sets up and manages platforms. Join with \`bwf connect <url>\`.
|
|
1568
|
-
Docs: ${formatUrl("https://
|
|
1568
|
+
Docs: ${formatUrl("https://github.com/builtbyfriends/platform/blob/main/docs/guide/self-hosted-platform.md")}`);
|
|
1569
1569
|
const result = await promptSubcommand(command, subcommands);
|
|
1570
1570
|
if (!result) process.exit(0);
|
|
1571
1571
|
await run(root, parse(buildArgs(result, args.slice(1))));
|
|
@@ -1590,16 +1590,16 @@ const args = process.argv.slice(2);
|
|
|
1590
1590
|
const command = args[0];
|
|
1591
1591
|
const helpPath = getHelpPath(args);
|
|
1592
1592
|
const subcommandGroups = {
|
|
1593
|
-
auth: () => runSubcommandGroup("auth", authSubcommands, parseAuthArgs, (root, parsed) => import("./auth-router-
|
|
1594
|
-
account: () => runSubcommandGroup("account", accountSubcommands, parseAccountArgs, (root, parsed) => import("./account-cmd-
|
|
1595
|
-
platform: () => runSubcommandGroup("platform", platformSubcommands, parsePlatformArgs, (root, parsed) => import("./platform-cmd-
|
|
1596
|
-
cloudflare: () => runSubcommandGroup("cloudflare", cloudflareSubcommands, parseCloudflareArgs, (root, parsed) => import("./cloudflare-cmd-
|
|
1597
|
-
project: () => runSubcommandGroup("project", projectSubcommands, parseProjectArgs, (root, parsed) => import("./project-cmd-
|
|
1598
|
-
secret: () => runSubcommandGroup("secret", secretSubcommands, parseSecretArgs, (root, parsed) => import("./secret-
|
|
1599
|
-
domain: () => runSubcommandGroup("domain", domainSubcommands, parseDomainArgs, (root, parsed) => import("./domain-
|
|
1600
|
-
email: () => runSubcommandGroup("email", emailSubcommands, parseEmailArgs, (root, parsed) => import("./email-
|
|
1601
|
-
db: () => runSubcommandGroup("db", dbSubcommands, parseDbArgs, (root, parsed) => import("./db-
|
|
1602
|
-
env: () => runSubcommandGroup("env", envSubcommands, parseEnvArgs, (root, parsed) => import("./env-
|
|
1593
|
+
auth: () => runSubcommandGroup("auth", authSubcommands, parseAuthArgs, (root, parsed) => import("./auth-router-BG74WFUf.mjs").then(({ runAuthRouter }) => runAuthRouter(root, parsed))),
|
|
1594
|
+
account: () => runSubcommandGroup("account", accountSubcommands, parseAccountArgs, (root, parsed) => import("./account-cmd-Ddt8lGeL.mjs").then(({ runAccountCommand }) => runAccountCommand(root, parsed))),
|
|
1595
|
+
platform: () => runSubcommandGroup("platform", platformSubcommands, parsePlatformArgs, (root, parsed) => import("./platform-cmd-CcFDxtrl.mjs").then(({ runPlatformCommand }) => runPlatformCommand(root, parsed))),
|
|
1596
|
+
cloudflare: () => runSubcommandGroup("cloudflare", cloudflareSubcommands, parseCloudflareArgs, (root, parsed) => import("./cloudflare-cmd-Bm6UhzAQ.mjs").then(({ runCloudflareCommand }) => runCloudflareCommand(root, parsed))),
|
|
1597
|
+
project: () => runSubcommandGroup("project", projectSubcommands, parseProjectArgs, (root, parsed) => import("./project-cmd-BydRwr-x.mjs").then(({ runProjectCommand }) => runProjectCommand(root, parsed))),
|
|
1598
|
+
secret: () => runSubcommandGroup("secret", secretSubcommands, parseSecretArgs, (root, parsed) => import("./secret-D5XrWshs.mjs").then(({ runSecretCommand }) => runSecretCommand(root, parsed))),
|
|
1599
|
+
domain: () => runSubcommandGroup("domain", domainSubcommands, parseDomainArgs, (root, parsed) => import("./domain-BJaAbxuQ.mjs").then(({ runDomainCommand }) => runDomainCommand(root, parsed))),
|
|
1600
|
+
email: () => runSubcommandGroup("email", emailSubcommands, parseEmailArgs, (root, parsed) => import("./email-rIfZgVAB.mjs").then(({ runEmailCommand }) => runEmailCommand(root, parsed))),
|
|
1601
|
+
db: () => runSubcommandGroup("db", dbSubcommands, parseDbArgs, (root, parsed) => import("./db-SOv4E9wr.mjs").then(({ runDbCommand }) => runDbCommand(root, parsed))),
|
|
1602
|
+
env: () => runSubcommandGroup("env", envSubcommands, parseEnvArgs, (root, parsed) => import("./env-BGTu3KWZ.mjs").then(({ runEnvCommand }) => runEnvCommand(root, parsed))),
|
|
1603
1603
|
gen: () => runSubcommandGroup("gen", genSubcommands, parseGenArgs, (root, parsed) => import("./gen-kQqhFyOP.mjs").then(({ runGenCommand }) => runGenCommand(root, parsed))),
|
|
1604
1604
|
github: () => runSubcommandGroup("github", githubSubcommands, parseGithubArgs, (root, parsed) => import("./github-cmd-DT5Onu6E.mjs").then(({ runGithubCommand }) => runGithubCommand(root, parsed))),
|
|
1605
1605
|
build: () => runSubcommandGroup("build", buildSubcommands, parseBuildArgs, (root, parsed) => import("./build-cmd-BnZezraT.mjs").then(({ runBuildCommand }) => runBuildCommand(root, parsed)))
|
|
@@ -1621,7 +1621,7 @@ if (helpPath) {
|
|
|
1621
1621
|
log.error(formatCloudflareUserMessage(err instanceof Error ? err.message : String(err)));
|
|
1622
1622
|
process.exit(1);
|
|
1623
1623
|
}
|
|
1624
|
-
import("./deploy-
|
|
1624
|
+
import("./deploy-BCSQoKC0.mjs").then(({ runDeploy }) => {
|
|
1625
1625
|
runDeploy(root, deployArgs).catch((err) => {
|
|
1626
1626
|
log.error(formatCloudflareUserMessage(err.message ?? String(err)));
|
|
1627
1627
|
process.exit(1);
|
|
@@ -1629,7 +1629,7 @@ if (helpPath) {
|
|
|
1629
1629
|
});
|
|
1630
1630
|
} else if (command === "connect") (async () => {
|
|
1631
1631
|
const parsed = parseConnectArgs(args.slice(1));
|
|
1632
|
-
const { runConnectCommand } = await import("./connect-
|
|
1632
|
+
const { runConnectCommand } = await import("./connect-CSNWKLzB.mjs");
|
|
1633
1633
|
await runConnectCommand(process.cwd(), parsed);
|
|
1634
1634
|
})().catch((err) => {
|
|
1635
1635
|
log.error(formatCloudflareUserMessage(err instanceof Error ? err.message : String(err)));
|
|
@@ -1665,7 +1665,7 @@ else if (command === "prepare") {
|
|
|
1665
1665
|
});
|
|
1666
1666
|
} else if (command === "init") {
|
|
1667
1667
|
const root = process.cwd();
|
|
1668
|
-
import("./init-
|
|
1668
|
+
import("./init-CXanf5ck.mjs").then(({ runInitCommand, parseInitArgs }) => {
|
|
1669
1669
|
let initArgs;
|
|
1670
1670
|
try {
|
|
1671
1671
|
initArgs = parseInitArgs(args.slice(1));
|
|
@@ -1683,7 +1683,7 @@ else if (command === "prepare") {
|
|
|
1683
1683
|
log.error("migrate: This command takes no arguments.");
|
|
1684
1684
|
process.exit(1);
|
|
1685
1685
|
}
|
|
1686
|
-
import("./migrate-
|
|
1686
|
+
import("./migrate-DjW9_-sS.mjs").then(({ runMigrateCommand }) => {
|
|
1687
1687
|
runMigrateCommand(process.cwd()).catch((err) => {
|
|
1688
1688
|
log.error(formatCloudflareUserMessage(err instanceof Error ? err.message : String(err)));
|
|
1689
1689
|
process.exit(1);
|
|
@@ -1805,22 +1805,22 @@ else if (command) {
|
|
|
1805
1805
|
if (Object.hasOwn(subcommandGroups, cmd)) return subcommandGroups[cmd]();
|
|
1806
1806
|
switch (cmd) {
|
|
1807
1807
|
case "connect": {
|
|
1808
|
-
const { runConnectCommand } = await import("./connect-
|
|
1808
|
+
const { runConnectCommand } = await import("./connect-CSNWKLzB.mjs");
|
|
1809
1809
|
await runConnectCommand(root, parseConnectArgs([]));
|
|
1810
1810
|
return;
|
|
1811
1811
|
}
|
|
1812
1812
|
case "init": {
|
|
1813
|
-
const { runInitCommand, parseInitArgs } = await import("./init-
|
|
1813
|
+
const { runInitCommand, parseInitArgs } = await import("./init-CXanf5ck.mjs");
|
|
1814
1814
|
await runInitCommand(root, parseInitArgs([]));
|
|
1815
1815
|
return;
|
|
1816
1816
|
}
|
|
1817
1817
|
case "migrate": {
|
|
1818
|
-
const { runMigrateCommand } = await import("./migrate-
|
|
1818
|
+
const { runMigrateCommand } = await import("./migrate-DjW9_-sS.mjs");
|
|
1819
1819
|
await runMigrateCommand(root);
|
|
1820
1820
|
return;
|
|
1821
1821
|
}
|
|
1822
1822
|
case "deploy": {
|
|
1823
|
-
const { runDeploy } = await import("./deploy-
|
|
1823
|
+
const { runDeploy } = await import("./deploy-BCSQoKC0.mjs");
|
|
1824
1824
|
await runDeploy(root);
|
|
1825
1825
|
return;
|
|
1826
1826
|
}
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { c as resolveCloudflareOperationArgv, i as isCleanCloudflareExit, n as decodeCloudflareOperationResult, r as encodeCloudflareOperation, t as createCloudflareProcessRunner } from "./cloudflare-process-
|
|
1
|
+
import { c as resolveCloudflareOperationArgv, i as isCleanCloudflareExit, n as decodeCloudflareOperationResult, r as encodeCloudflareOperation, t as createCloudflareProcessRunner } from "./cloudflare-process-tThIjEB2.mjs";
|
|
2
2
|
import { execFile, spawn } from "node:child_process";
|
|
3
3
|
// src/cli/cloudflare-auth.ts
|
|
4
4
|
var CloudflareAuthenticationError = class extends Error {
|
|
@@ -1,9 +1,9 @@
|
|
|
1
1
|
import { L as log } from "./dist-STQXl8ck.mjs";
|
|
2
2
|
import { t as basename } from "./dist-DMYe8CZJ.mjs";
|
|
3
|
-
import { a as parseCloudflareAuthSession, i as ensureCloudflareAuthentication, n as cloudflareCredentialOverrides, r as createBundledCloudflareAuthRunner } from "./cloudflare-auth-
|
|
4
|
-
import { i as isCleanCloudflareExit } from "./cloudflare-process-
|
|
3
|
+
import { a as parseCloudflareAuthSession, i as ensureCloudflareAuthentication, n as cloudflareCredentialOverrides, r as createBundledCloudflareAuthRunner } from "./cloudflare-auth-DzkU9H6r.mjs";
|
|
4
|
+
import { i as isCleanCloudflareExit } from "./cloudflare-process-tThIjEB2.mjs";
|
|
5
5
|
import { m as printSuccess } from "./output-Bb34lF0w.mjs";
|
|
6
|
-
import { v as readRootWranglerConfig } from "./wrangler-
|
|
6
|
+
import { v as readRootWranglerConfig } from "./wrangler-TqTvJFWS.mjs";
|
|
7
7
|
// src/cli/cloudflare-cmd.ts
|
|
8
8
|
async function runCloudflareCommand(root, args) {
|
|
9
9
|
const runWrangler = createBundledCloudflareAuthRunner(root);
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
import { K as select, L as log, tt as isCancel } from "./dist-STQXl8ck.mjs";
|
|
2
2
|
import { a as join, t as basename } from "./dist-DMYe8CZJ.mjs";
|
|
3
|
-
import { i as ensureCloudflareAuthentication, r as createBundledCloudflareAuthRunner } from "./cloudflare-auth-
|
|
4
|
-
import { A as writeProvisionedWranglerConfig, i as LATEST_KNOWN_COMPAT_DATE, v as readRootWranglerConfig } from "./wrangler-
|
|
3
|
+
import { i as ensureCloudflareAuthentication, r as createBundledCloudflareAuthRunner } from "./cloudflare-auth-DzkU9H6r.mjs";
|
|
4
|
+
import { A as writeProvisionedWranglerConfig, i as LATEST_KNOWN_COMPAT_DATE, v as readRootWranglerConfig } from "./wrangler-TqTvJFWS.mjs";
|
|
5
5
|
import { existsSync } from "node:fs";
|
|
6
6
|
// src/cli/cloudflare-connect.ts
|
|
7
7
|
async function connectCloudflare(root, interactive = Boolean(process.stdin.isTTY)) {
|
|
@@ -1 +1 @@
|
|
|
1
|
-
export { t as activateCloudflareExistingVersion, n as applyCloudflareD1Migrations, r as changeCloudflareDomain, o as deleteCloudflareSecret, s as executeCloudflareD1Sql, c as listCloudflareDomains, l as listCloudflareSecrets, m as putCloudflareSecret, h as readCloudflareD1Migrations, g as readCloudflareWorkerStatus, _ as resolveCloudflareD1Context, v as resolveCloudflareOperationContext, y as restoreCloudflareD1Database, b as syncCloudflareSecrets, x as tailCloudflareWorker } from "./cloudflare-operations-
|
|
1
|
+
export { t as activateCloudflareExistingVersion, n as applyCloudflareD1Migrations, r as changeCloudflareDomain, o as deleteCloudflareSecret, s as executeCloudflareD1Sql, c as listCloudflareDomains, l as listCloudflareSecrets, m as putCloudflareSecret, h as readCloudflareD1Migrations, g as readCloudflareWorkerStatus, _ as resolveCloudflareD1Context, v as resolveCloudflareOperationContext, y as restoreCloudflareD1Database, b as syncCloudflareSecrets, x as tailCloudflareWorker } from "./cloudflare-operations-DGF7xH7O.mjs";
|
|
@@ -1,13 +1,13 @@
|
|
|
1
1
|
import { a as join } from "./dist-DMYe8CZJ.mjs";
|
|
2
2
|
import { a as persistCloudflareConfig, i as materializeCloudflareConfig } from "./cloudflare-config-i8yanry0.mjs";
|
|
3
|
-
import { t as createCloudflareProcessRunner } from "./cloudflare-process-
|
|
3
|
+
import { t as createCloudflareProcessRunner } from "./cloudflare-process-tThIjEB2.mjs";
|
|
4
4
|
import { n as scanWranglerDotenvKeys } from "./dotenv-4NdUCXbB.mjs";
|
|
5
5
|
import { t as CLOUDFLARE_DEPLOY_BUILD_ENV } from "./env-DUyTzroe.mjs";
|
|
6
6
|
import { t as WRANGLER_AUTH_CREDENTIAL_ENV_VARS } from "./untrusted-env-lL7RkYiC.mjs";
|
|
7
|
-
import { t as CLOUDFLARE_PRESERVE_BINDINGS_BUILD_ENV } from "./version-metadata-
|
|
8
|
-
import { _ as provisionEnv, r as assertNoTransportRedirectInProjectDotenv, s as deleteEnvVarCaseAware, v as resolvePinnedApiBaseUrl } from "./provision-
|
|
7
|
+
import { t as CLOUDFLARE_PRESERVE_BINDINGS_BUILD_ENV } from "./version-metadata-DPhqnpaa.mjs";
|
|
8
|
+
import { _ as provisionEnv, r as assertNoTransportRedirectInProjectDotenv, s as deleteEnvVarCaseAware, v as resolvePinnedApiBaseUrl } from "./provision-C90fULHJ.mjs";
|
|
9
9
|
import { u as getErrorMessage } from "./output-Bb34lF0w.mjs";
|
|
10
|
-
import { S as readWranglerPublishedTrafficSnapshot, b as readWranglerCustomDomains, j as writeWranglerPublishedTrafficSnapshot, k as updateWranglerCustomDomain } from "./wrangler-
|
|
10
|
+
import { S as readWranglerPublishedTrafficSnapshot, b as readWranglerCustomDomains, j as writeWranglerPublishedTrafficSnapshot, k as updateWranglerCustomDomain } from "./wrangler-TqTvJFWS.mjs";
|
|
11
11
|
import { existsSync, mkdtempSync, readFileSync, rmSync, writeFileSync } from "node:fs";
|
|
12
12
|
import { tmpdir } from "node:os";
|
|
13
13
|
import { deployCloudflareVersionTraffic, encodeCloudflareVersionMessage, parseCloudflareVersionMessage, parseRootWranglerConfig, readBindingFieldPresence, readCloudflareTriggerConfig, readWranglerTopLevelString, resolveD1MigrateTarget, stabilizeCloudflareVersionTriggers } from "@builtbyfriends/deploy-cloudflare";
|
|
@@ -63,7 +63,7 @@ function resolveCloudflareOperationArgv() {
|
|
|
63
63
|
join(directory, "cloudflare-operation-process.mjs"),
|
|
64
64
|
join(directory, "cli", "cloudflare-operation-process.mjs")
|
|
65
65
|
].find((candidate) => existsSync(candidate));
|
|
66
|
-
if (!entry) throw new Error(`
|
|
66
|
+
if (!entry) throw new Error(`Platform's bundled Cloudflare tooling is unavailable. Reinstall the project's dependencies from its trusted lockfile, then retry.`);
|
|
67
67
|
return [process.execPath, entry];
|
|
68
68
|
}
|
|
69
69
|
/**
|
|
@@ -1,10 +1,10 @@
|
|
|
1
1
|
import { K as select, L as log, tt as isCancel } from "./dist-STQXl8ck.mjs";
|
|
2
2
|
import { d as readPlatformToken } from "./auth-xnkmpZUl.mjs";
|
|
3
3
|
import { a as isExpiredTokenError, r as PlatformClient } from "./client-D3D5RM5h.mjs";
|
|
4
|
-
import { t as connectCloudflare } from "./cloudflare-connect-
|
|
5
|
-
import { t as promptForLoginToken } from "./login-
|
|
4
|
+
import { t as connectCloudflare } from "./cloudflare-connect-B4ItSbJi.mjs";
|
|
5
|
+
import { t as promptForLoginToken } from "./login-Dbv_T3Ru.mjs";
|
|
6
6
|
import { m as printSuccess } from "./output-Bb34lF0w.mjs";
|
|
7
|
-
import { i as saveDiscoveredPlatform, n as promptPlatformUrl, t as discoverPlatform } from "./platform-cmd-
|
|
7
|
+
import { i as saveDiscoveredPlatform, n as promptPlatformUrl, t as discoverPlatform } from "./platform-cmd-ChXeBrRH.mjs";
|
|
8
8
|
import { c as normalizePlatformApiUrl, s as listPlatformConnections } from "./platform-registry-x1m9HBxf.mjs";
|
|
9
9
|
import { c as writePlatformSelection, n as readDeploymentPlatform, s as writeDeploymentPlatform } from "./project-CC7eN00D.mjs";
|
|
10
10
|
// src/cli/connect.ts
|
|
@@ -58,7 +58,7 @@ async function runConnectCommand(root, args, interactive = Boolean(process.stdin
|
|
|
58
58
|
hint: "Deploy to your own Cloudflare account."
|
|
59
59
|
}, {
|
|
60
60
|
value: "nosam",
|
|
61
|
-
label: "
|
|
61
|
+
label: "Platform",
|
|
62
62
|
hint: "Deploy to your company's bwf Platform."
|
|
63
63
|
}]
|
|
64
64
|
});
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
import { A as confirm, H as outro, L as log, X as text, tt as isCancel } from "./dist-STQXl8ck.mjs";
|
|
2
2
|
import { a as join, c as resolve, n as dirname, r as extname, s as relative, t as basename } from "./dist-DMYe8CZJ.mjs";
|
|
3
3
|
import { c as getDatabaseCasing, f as readConfig, l as getDatabaseDialect, p as resolveBindingNames } from "./config-tNx0HlFv.mjs";
|
|
4
|
-
import { t as resolveLocalD1Target } from "./local-d1-
|
|
4
|
+
import { t as resolveLocalD1Target } from "./local-d1-bUoAtFUe.mjs";
|
|
5
5
|
import { i as writeJournal, n as readJournal, r as stripSqlExt, t as collectMigrations } from "./collect-C6Blu9yw.mjs";
|
|
6
6
|
import { i as validateMigrations, t as assertJournalCoherence } from "./validate-B-zsjhiz.mjs";
|
|
7
7
|
import { n as readProjectPaths } from "./project-paths-iXHKRTTQ.mjs";
|
|
@@ -183,7 +183,7 @@ async function withPgClient(root, fn) {
|
|
|
183
183
|
}
|
|
184
184
|
}
|
|
185
185
|
async function withMySqlClient(root, fn, options = {}) {
|
|
186
|
-
const { toMySqlClient } = await import("./runner-mysql-
|
|
186
|
+
const { toMySqlClient } = await import("./runner-mysql-BjSoQ-mW.mjs");
|
|
187
187
|
const { createConnection } = await import("mysql2/promise");
|
|
188
188
|
const connection = await createConnection({
|
|
189
189
|
uri: getLocalDatabaseUrl(root, "mysql"),
|
|
@@ -374,7 +374,7 @@ async function runStatus(root, dialect) {
|
|
|
374
374
|
localError = error;
|
|
375
375
|
}
|
|
376
376
|
else if (dialect === "mysql") try {
|
|
377
|
-
const { readMySqlAppliedMigrations } = await import("./runner-mysql-
|
|
377
|
+
const { readMySqlAppliedMigrations } = await import("./runner-mysql-BjSoQ-mW.mjs");
|
|
378
378
|
localApplied = await withMySqlClient(root, readMySqlAppliedMigrations);
|
|
379
379
|
} catch (error) {
|
|
380
380
|
localError = error;
|
|
@@ -390,12 +390,12 @@ async function runStatus(root, dialect) {
|
|
|
390
390
|
if (dialect !== "sqlite") {
|
|
391
391
|
const databaseUrl = process.env.DATABASE_URL;
|
|
392
392
|
if (!databaseUrl) throw new Error("DATABASE_URL is not available.");
|
|
393
|
-
remoteApplied = (dialect === "postgresql" ? await (await import("./runner-pg-2pjltt0t.mjs")).getPgAppliedMigrations(databaseUrl) : await (await import("./runner-mysql-
|
|
393
|
+
remoteApplied = (dialect === "postgresql" ? await (await import("./runner-pg-2pjltt0t.mjs")).getPgAppliedMigrations(databaseUrl) : await (await import("./runner-mysql-BjSoQ-mW.mjs")).getMySqlAppliedMigrations(databaseUrl)).map((name) => ({
|
|
394
394
|
name,
|
|
395
395
|
applied_at: ""
|
|
396
396
|
}));
|
|
397
397
|
} else {
|
|
398
|
-
const { readCloudflareD1Migrations, resolveCloudflareD1Context } = await import("./cloudflare-operations-
|
|
398
|
+
const { readCloudflareD1Migrations, resolveCloudflareD1Context } = await import("./cloudflare-operations-BcK849ue.mjs");
|
|
399
399
|
remoteApplied = (await readCloudflareD1Migrations(resolveCloudflareD1Context(root, configuredD1Binding(root)))).map((name) => ({
|
|
400
400
|
name,
|
|
401
401
|
applied_at: ""
|
|
@@ -563,7 +563,7 @@ async function resetDatabase(root, dialect, yes) {
|
|
|
563
563
|
return migrations.length;
|
|
564
564
|
}
|
|
565
565
|
if (dialect === "mysql") {
|
|
566
|
-
const { applyPendingMySqlMigrations, withMySqlMigrationLock } = await import("./runner-mysql-
|
|
566
|
+
const { applyPendingMySqlMigrations, withMySqlMigrationLock } = await import("./runner-mysql-BjSoQ-mW.mjs");
|
|
567
567
|
await withMySqlClient(root, (client) => withMySqlMigrationLock(client, async () => {
|
|
568
568
|
const tables = await client.query("SELECT table_name AS table_name, table_type AS table_type FROM information_schema.tables WHERE table_schema = DATABASE() AND table_type IN ('BASE TABLE', 'VIEW')");
|
|
569
569
|
await client.query("SET FOREIGN_KEY_CHECKS = 0");
|
|
@@ -707,7 +707,7 @@ async function runExecute(root, command, file, dialect, remote) {
|
|
|
707
707
|
process.exit(0);
|
|
708
708
|
}
|
|
709
709
|
if (dialect === "sqlite") {
|
|
710
|
-
const { executeCloudflareD1Sql, resolveCloudflareD1Context } = await import("./cloudflare-operations-
|
|
710
|
+
const { executeCloudflareD1Sql, resolveCloudflareD1Context } = await import("./cloudflare-operations-BcK849ue.mjs");
|
|
711
711
|
const rows = await executeCloudflareD1Sql(resolveCloudflareD1Context(root, configuredD1Binding(root)), sql);
|
|
712
712
|
if (rows.length > 0) printTable(rows);
|
|
713
713
|
} else {
|
|
@@ -876,7 +876,7 @@ async function runMigrate(root, dialect, remote) {
|
|
|
876
876
|
appliedNames = await getPgAppliedMigrations(databaseUrl);
|
|
877
877
|
applyMigrations = () => runPgMigrations(migrationsDir, databaseUrl);
|
|
878
878
|
} else {
|
|
879
|
-
const { getMySqlAppliedMigrations, runMySqlMigrations } = await import("./runner-mysql-
|
|
879
|
+
const { getMySqlAppliedMigrations, runMySqlMigrations } = await import("./runner-mysql-BjSoQ-mW.mjs");
|
|
880
880
|
appliedNames = await getMySqlAppliedMigrations(databaseUrl);
|
|
881
881
|
applyMigrations = () => runMySqlMigrations(migrationsDir, databaseUrl);
|
|
882
882
|
}
|
|
@@ -901,7 +901,7 @@ async function runMigrate(root, dialect, remote) {
|
|
|
901
901
|
log.info(`No migration files found in ${paths.sourceRelative("db/migrations")}/`);
|
|
902
902
|
return;
|
|
903
903
|
}
|
|
904
|
-
const { applyCloudflareD1Migrations, readCloudflareD1Migrations, resolveCloudflareD1Context } = await import("./cloudflare-operations-
|
|
904
|
+
const { applyCloudflareD1Migrations, readCloudflareD1Migrations, resolveCloudflareD1Context } = await import("./cloudflare-operations-BcK849ue.mjs");
|
|
905
905
|
const binding = configuredD1Binding(root);
|
|
906
906
|
const context = resolveCloudflareD1Context(root, binding);
|
|
907
907
|
const remoteBefore = new Set(await readCloudflareD1Migrations(context));
|
|
@@ -921,7 +921,7 @@ async function runMigrate(root, dialect, remote) {
|
|
|
921
921
|
log.error(`db: D1 binding ${binding} has no "migrations_dir", so Cloudflare would apply ./migrations instead of ${dir}/. Add "migrations_dir": "./${dir}" to that D1 binding in your Cloudflare config, then run the command again.`);
|
|
922
922
|
process.exit(1);
|
|
923
923
|
}
|
|
924
|
-
const { checkWranglerMigrationApplySet, parseRootWranglerConfig } = await import("./deploy-
|
|
924
|
+
const { checkWranglerMigrationApplySet, parseRootWranglerConfig } = await import("./deploy-BCSQoKC0.mjs");
|
|
925
925
|
const applySet = await checkWranglerMigrationApplySet(context.operation.configPath, parseRootWranglerConfig(context.operation.configPath), binding, context.migrationsDir, rawMigrations, paths.sourceRelative("db/migrations"));
|
|
926
926
|
if (!applySet.ok) {
|
|
927
927
|
log.error(applySet.reason);
|
|
@@ -1002,7 +1002,7 @@ async function runMigrate(root, dialect, remote) {
|
|
|
1002
1002
|
return;
|
|
1003
1003
|
}
|
|
1004
1004
|
if (dialect === "mysql") {
|
|
1005
|
-
const { applyMySqlMigrations, readMySqlAppliedMigrations } = await import("./runner-mysql-
|
|
1005
|
+
const { applyMySqlMigrations, readMySqlAppliedMigrations } = await import("./runner-mysql-BjSoQ-mW.mjs");
|
|
1006
1006
|
const applied = await withMySqlClient(root, async (client) => {
|
|
1007
1007
|
const appliedNames = await readMySqlAppliedMigrations(client).catch(() => []);
|
|
1008
1008
|
try {
|
|
@@ -1048,7 +1048,7 @@ async function runRestore(root, dialect, { target, platform: explicitPlatform, y
|
|
|
1048
1048
|
log.error("db: `bwf db restore` restores the D1 database of a direct Cloudflare deploy. After a one-off `bwf deploy --platform cloudflare`, run it with `--platform cloudflare`.");
|
|
1049
1049
|
process.exit(1);
|
|
1050
1050
|
}
|
|
1051
|
-
const { readCloudflareD1Migrations, resolveCloudflareD1Context, restoreCloudflareD1Database } = await import("./cloudflare-operations-
|
|
1051
|
+
const { readCloudflareD1Migrations, resolveCloudflareD1Context, restoreCloudflareD1Database } = await import("./cloudflare-operations-BcK849ue.mjs");
|
|
1052
1052
|
const binding = configuredD1Binding(root);
|
|
1053
1053
|
const context = resolveCloudflareD1Context(root, binding);
|
|
1054
1054
|
const database = `D1 database ${context.migrateToken} (${binding})`;
|
|
@@ -1142,8 +1142,8 @@ async function runStudio(root, dialect, remote) {
|
|
|
1142
1142
|
}
|
|
1143
1143
|
/** A direct Cloudflare deploy records its D1 or Hyperdrive id in the checked-in Cloudflare config. */
|
|
1144
1144
|
async function hasDeployedCloudflareDatabase(root) {
|
|
1145
|
-
const { readRootWranglerConfig } = await import("./wrangler-
|
|
1146
|
-
const { isRealD1Id, isRealHyperdriveId } = await import("./provision-
|
|
1145
|
+
const { readRootWranglerConfig } = await import("./wrangler-C3uyPadQ.mjs");
|
|
1146
|
+
const { isRealD1Id, isRealHyperdriveId } = await import("./provision-BA59NCPO.mjs");
|
|
1147
1147
|
const config = readRootWranglerConfig(root)?.config;
|
|
1148
1148
|
const entries = (key) => {
|
|
1149
1149
|
const value = config?.[key];
|
|
@@ -8,30 +8,30 @@ import { a as getApiUrl, c as getToken, l as getTokenSource } from "./auth-xnkmp
|
|
|
8
8
|
import { a as isExpiredTokenError, r as PlatformClient } from "./client-D3D5RM5h.mjs";
|
|
9
9
|
import { t as writeFileAtomic } from "./atomic-write-DA6eD1Kp.mjs";
|
|
10
10
|
import { n as readDeploymentPlatform, r as readProjectConfig, s as writeDeploymentPlatform } from "./project-CC7eN00D.mjs";
|
|
11
|
-
import { a as detectPreset, c as resolveCloudflareOperationArgv, i as isCleanCloudflareExit, s as hasBackendFiles, t as createCloudflareProcessRunner } from "./cloudflare-process-
|
|
11
|
+
import { a as detectPreset, c as resolveCloudflareOperationArgv, i as isCleanCloudflareExit, s as hasBackendFiles, t as createCloudflareProcessRunner } from "./cloudflare-process-tThIjEB2.mjs";
|
|
12
12
|
import { n as redactMessage } from "./env-mask-BsHxq3R8.mjs";
|
|
13
13
|
import { a as hasSandboxSqliteMigration, c as resolveSandboxConfig, i as assertSandboxNamespaceConfig, l as sandboxContainerConfig, o as isSandboxAttached, r as SANDBOX_MIGRATION_TAG, s as requiresSandboxPlatformImage, t as analyzeApplicationSync } from "./application-analysis-C9Ck2Yeg.mjs";
|
|
14
|
-
import { A as writeProvisionedWranglerConfig, D as syncWranglerDurableObjects, O as syncWranglerWebSockets, S as readWranglerPublishedTrafficSnapshot, T as sameMigrationsDir, a as LIVE_MIGRATION_TAG, c as bindingEntriesForField, f as hasDurableObjectSqliteMigration, g as readExistingLiveBindingConfig, j as writeWranglerPublishedTrafficSnapshot, o as acknowledgeWranglerManagedQueueRemovals, p as nextDurableObjectMigrationTag, r as FRIENDLY_BINDING_NAMES, w as resolveLiveBindingConfig, x as readWranglerManagedQueueCleanupCandidates } from "./wrangler-
|
|
15
|
-
import { C as resolveDeployWorkerMain, D as resolveStaticDeployPreset, E as resolveStaticBuildCommand, O as toManifestSchedulesAndQueues, S as resolveDeployLiveBindingConfig, T as resolveFullDeployBuildCommand, _ as ensureManagedHyperdrive, a as detectNonSpaFallbackWarning, b as log$1, c as streamDirectR2Deploy, d as getDeploySchemaDriftMessage, f as hasDeploySchemaDrift, g as createProjectFromSlug, h as assertWorkerMainUploaded, i as collectWorkerFiles, k as validateDeployMigrations, l as warnUnpublishedRouting, m as assertProjectDeployAccess, n as buildStaticManifest, o as readWranglerHtmlHandling, p as assertEnvSchemaValid, r as collectAndHashAssets, s as mergeAndLintRoutingRules, t as buildBwfManifest, u as assertDeploySchemaDriftFree, v as getExitCode, w as resolveDeployWranglerCompat, x as promptDeployProjectConfig, y as getGitCommit } from "./package-
|
|
14
|
+
import { A as writeProvisionedWranglerConfig, D as syncWranglerDurableObjects, O as syncWranglerWebSockets, S as readWranglerPublishedTrafficSnapshot, T as sameMigrationsDir, a as LIVE_MIGRATION_TAG, c as bindingEntriesForField, f as hasDurableObjectSqliteMigration, g as readExistingLiveBindingConfig, j as writeWranglerPublishedTrafficSnapshot, o as acknowledgeWranglerManagedQueueRemovals, p as nextDurableObjectMigrationTag, r as FRIENDLY_BINDING_NAMES, w as resolveLiveBindingConfig, x as readWranglerManagedQueueCleanupCandidates } from "./wrangler-TqTvJFWS.mjs";
|
|
15
|
+
import { C as resolveDeployWorkerMain, D as resolveStaticDeployPreset, E as resolveStaticBuildCommand, O as toManifestSchedulesAndQueues, S as resolveDeployLiveBindingConfig, T as resolveFullDeployBuildCommand, _ as ensureManagedHyperdrive, a as detectNonSpaFallbackWarning, b as log$1, c as streamDirectR2Deploy, d as getDeploySchemaDriftMessage, f as hasDeploySchemaDrift, g as createProjectFromSlug, h as assertWorkerMainUploaded, i as collectWorkerFiles, k as validateDeployMigrations, l as warnUnpublishedRouting, m as assertProjectDeployAccess, n as buildStaticManifest, o as readWranglerHtmlHandling, p as assertEnvSchemaValid, r as collectAndHashAssets, s as mergeAndLintRoutingRules, t as buildBwfManifest, u as assertDeploySchemaDriftFree, v as getExitCode, w as resolveDeployWranglerCompat, x as promptDeployProjectConfig, y as getGitCommit } from "./package-BX_giUBX.mjs";
|
|
16
16
|
import { n as completeApplicationAnalysis, t as analyzeApplication } from "./application-routing-DbR-W5lG.mjs";
|
|
17
|
-
import { a as emailConfigInputs, c as renderAddressMap, f as otherQueueConsumers, i as createNodeEmailDns, l as renderEmailChecklist, m as scopedCloudflareQueueName, n as SEND_EMAIL_BINDING, o as preflightEmail, r as applyEmailSetup, t as EMAIL_FROM_VAR, u as chooseCloudflareQueueName } from "./email-cloudflare-
|
|
17
|
+
import { a as emailConfigInputs, c as renderAddressMap, f as otherQueueConsumers, i as createNodeEmailDns, l as renderEmailChecklist, m as scopedCloudflareQueueName, n as SEND_EMAIL_BINDING, o as preflightEmail, r as applyEmailSetup, t as EMAIL_FROM_VAR, u as chooseCloudflareQueueName } from "./email-cloudflare-oXk2G1G3.mjs";
|
|
18
18
|
import { r as hasEmailHandlers } from "./email-C_ATvNIG.mjs";
|
|
19
|
-
import { a as checkCloudflareProvisionDrift, b as resolveWorkersDevComplianceRegion, d as isQueueConfirmedAbsent, f as isRealD1Id, g as provisionCloudflareResources, i as assertValidResourceName, s as deleteEnvVarCaseAware } from "./provision-
|
|
20
|
-
import { C as buildSchemaProbeEnv, D as scrubWranglerAuthCredentials, E as scrubManagedDeployBuildMarkers, S as MANAGED_DEPLOY_BUILD_ENV, T as resolveDeployTransport, a as createCloudflareEmptyDomainPublisher, i as createCloudflareEmptyCronPublisher, w as deployChildEnv } from "./cloudflare-operations-
|
|
21
|
-
import { f as listSelfHostSecretNames, h as selfHostSchemaFailureMessage, i as SelfHostSecretListError, l as dischargeSelfHostEnvContext, n as SelfHostFirstDeployError, p as readEmittedWorkerVars, r as SelfHostSchemaError, s as deriveSelfHostEnvContextFromVars, t as SelfHostEnvValidationError } from "./env-validation-
|
|
19
|
+
import { a as checkCloudflareProvisionDrift, b as resolveWorkersDevComplianceRegion, d as isQueueConfirmedAbsent, f as isRealD1Id, g as provisionCloudflareResources, i as assertValidResourceName, s as deleteEnvVarCaseAware } from "./provision-C90fULHJ.mjs";
|
|
20
|
+
import { C as buildSchemaProbeEnv, D as scrubWranglerAuthCredentials, E as scrubManagedDeployBuildMarkers, S as MANAGED_DEPLOY_BUILD_ENV, T as resolveDeployTransport, a as createCloudflareEmptyDomainPublisher, i as createCloudflareEmptyCronPublisher, w as deployChildEnv } from "./cloudflare-operations-DGF7xH7O.mjs";
|
|
21
|
+
import { f as listSelfHostSecretNames, h as selfHostSchemaFailureMessage, i as SelfHostSecretListError, l as dischargeSelfHostEnvContext, n as SelfHostFirstDeployError, p as readEmittedWorkerVars, r as SelfHostSchemaError, s as deriveSelfHostEnvContextFromVars, t as SelfHostEnvValidationError } from "./env-validation-DeqFUSKg.mjs";
|
|
22
22
|
import { n as readGeneratedWranglerConfigFile } from "./generated-wrangler-config-CoDaaFsA.mjs";
|
|
23
23
|
import { f as import_picocolors$1, h as sanitizeTerminalText, m as printSuccess, o as formatCount, p as note, r as createSpinner, u as getErrorMessage } from "./output-Bb34lF0w.mjs";
|
|
24
24
|
import { t as collectMigrations } from "./collect-C6Blu9yw.mjs";
|
|
25
25
|
import { n as openMigrationValidationDatabase, t as SqliteMigrationError } from "./sqlite-validation-CLJXXN93.mjs";
|
|
26
26
|
import { n as CLOUDFLARE_QUEUE_NAMES_BUILD_ENV, t as CLOUDFLARE_DEPLOY_BUILD_ENV } from "./env-DUyTzroe.mjs";
|
|
27
|
-
import { n as readVersionMetadataBinding, r as selectNativeVersionMetadataBinding, t as CLOUDFLARE_PRESERVE_BINDINGS_BUILD_ENV } from "./version-metadata-
|
|
27
|
+
import { n as readVersionMetadataBinding, r as selectNativeVersionMetadataBinding, t as CLOUDFLARE_PRESERVE_BINDINGS_BUILD_ENV } from "./version-metadata-DPhqnpaa.mjs";
|
|
28
28
|
import { n as prepareCfStaticBuildOutput, t as prepareCfBuildOutput } from "./cf-build-output-DNQTwMNU.mjs";
|
|
29
29
|
import { i as validateMigrations, t as assertJournalCoherence } from "./validate-B-zsjhiz.mjs";
|
|
30
30
|
import { n as readProjectPaths, t as assertNoRootSourceConventionConflicts } from "./project-paths-iXHKRTTQ.mjs";
|
|
31
31
|
import { t as sanitizeTerminalLogText } from "./terminal-log-text-DNsWJREL.mjs";
|
|
32
|
-
import { a as runMySqlMigrations } from "./runner-mysql-
|
|
32
|
+
import { a as runMySqlMigrations } from "./runner-mysql-BmTI2EiF.mjs";
|
|
33
33
|
import { i as runPgMigrations } from "./runner-pg-mYc75KfH.mjs";
|
|
34
|
-
import { a as parseCloudflareAuthSession, i as ensureCloudflareAuthentication, n as cloudflareCredentialOverrides, t as CloudflareAuthenticationError } from "./cloudflare-auth-
|
|
34
|
+
import { a as parseCloudflareAuthSession, i as ensureCloudflareAuthentication, n as cloudflareCredentialOverrides, t as CloudflareAuthenticationError } from "./cloudflare-auth-DzkU9H6r.mjs";
|
|
35
35
|
import { r as trustedCloudflareWorkerAccessHeaders, t as cfAccessHeaders } from "./cf-access-CUP5L08W.mjs";
|
|
36
36
|
import { i as safePositional, r as readCfUploadOutput, t as CF_VERSION_SOURCE_MAX_OUTPUT_BYTES } from "./cf-command-values-2kOtxMo1.mjs";
|
|
37
37
|
import { n as record, t as migrateBuiltWranglerConfig } from "./cf-config-migrate-COOCi4Ge.mjs";
|
|
@@ -41,8 +41,8 @@ import { t as collectGitDeployMetadata } from "./git-metadata-Cukp5kV5.mjs";
|
|
|
41
41
|
import { t as ensurePlatformAccessToken } from "./cf-access-Bhz9wX6p.mjs";
|
|
42
42
|
import { r as getPackageDir } from "./agents-BLiMq9E1.mjs";
|
|
43
43
|
import { t as require_picocolors } from "./picocolors-D1NxSLw-.mjs";
|
|
44
|
-
import { t as promptForLoginToken } from "./login-
|
|
45
|
-
import { t as migrateLegacyBwfConfig } from "./migrate-
|
|
44
|
+
import { t as promptForLoginToken } from "./login-Dbv_T3Ru.mjs";
|
|
45
|
+
import { t as migrateLegacyBwfConfig } from "./migrate-DtcfKqPW.mjs";
|
|
46
46
|
import { s as listPlatformConnections } from "./platform-registry-x1m9HBxf.mjs";
|
|
47
47
|
import { t as getRequestedProjectSlug } from "./resolve-project-BCsAMDRA.mjs";
|
|
48
48
|
import { createRequire } from "node:module";
|
|
@@ -1742,7 +1742,7 @@ async function checkWranglerMigrationApplySet(configPath, config, binding, migra
|
|
|
1742
1742
|
if (extra.length > 0) lines.push(` • wrangler would ALSO apply (not validated by bwf): ${extra.join(", ")}`);
|
|
1743
1743
|
if (missing.length > 0) lines.push(` • validated by bwf but NOT in wrangler's set: ${missing.join(", ")}`);
|
|
1744
1744
|
if (changed.length > 0) lines.push(` • content differs between bwf's copy and wrangler's: ${changed.join(", ")}`);
|
|
1745
|
-
lines.push(`Only
|
|
1745
|
+
lines.push(`Only Platform-managed ${displayDir}/*.sql may be applied. Remove stray .sql (e.g. seed.sql) from migrations_dir, then rerun.`);
|
|
1746
1746
|
return {
|
|
1747
1747
|
ok: false,
|
|
1748
1748
|
reason: lines.join("\n")
|
|
@@ -1929,7 +1929,7 @@ async function buildCloudflareWorker(input) {
|
|
|
1929
1929
|
await (deps.validateAuthMigrations ?? validateAuthMigrationSchema)(root, migrations);
|
|
1930
1930
|
} catch (err) {
|
|
1931
1931
|
log$1.error([
|
|
1932
|
-
"deploy: --platform cloudflare cannot verify the
|
|
1932
|
+
"deploy: --platform cloudflare cannot verify the Platform-managed Better Auth schema.",
|
|
1933
1933
|
"The managed platform creates these tables at runtime (POST /__nosam/migrate/auth)",
|
|
1934
1934
|
"after deploy; this self-host backend only applies checked-in db/migrations/*.sql, so",
|
|
1935
1935
|
"they must already produce the Better Auth schema — tables, columns, and the primary",
|
package/dist/deploy.mjs
CHANGED
|
@@ -2,8 +2,8 @@ import { a as join, c as resolve } from "./dist-DMYe8CZJ.mjs";
|
|
|
2
2
|
import { t as analyzeApplication } from "./application-routing-DbR-W5lG.mjs";
|
|
3
3
|
import { d as hasApiRoutes, f as hasDocumentRoutes, n as resolveWorkerDirName, p as resolveAssetConfig, t as resolveDistDir } from "./build-output-dir-Clj_unKN.mjs";
|
|
4
4
|
import { t as prepareCfBuildOutput$1 } from "./cf-build-output-DNQTwMNU.mjs";
|
|
5
|
-
import { C as resolveDeployWorkerMain, D as resolveStaticDeployPreset, O as toManifestSchedulesAndQueues, h as assertWorkerMainUploaded, i as collectWorkerFiles, k as validateDeployMigrations, n as buildStaticManifest, r as collectAndHashAssets, s as mergeAndLintRoutingRules, t as buildBwfManifest, u as assertDeploySchemaDriftFree, w as resolveDeployWranglerCompat } from "./package-
|
|
6
|
-
import { a as detectPreset } from "./cloudflare-process-
|
|
5
|
+
import { C as resolveDeployWorkerMain, D as resolveStaticDeployPreset, O as toManifestSchedulesAndQueues, h as assertWorkerMainUploaded, i as collectWorkerFiles, k as validateDeployMigrations, n as buildStaticManifest, r as collectAndHashAssets, s as mergeAndLintRoutingRules, t as buildBwfManifest, u as assertDeploySchemaDriftFree, w as resolveDeployWranglerCompat } from "./package-BX_giUBX.mjs";
|
|
6
|
+
import { a as detectPreset } from "./cloudflare-process-tThIjEB2.mjs";
|
|
7
7
|
import { f as readConfig } from "./config-tNx0HlFv.mjs";
|
|
8
8
|
import { r as hasEmailHandlers } from "./email-C_ATvNIG.mjs";
|
|
9
9
|
import { existsSync } from "node:fs";
|
|
@@ -25,7 +25,7 @@ async function runDomainCommand(root, args) {
|
|
|
25
25
|
}
|
|
26
26
|
async function runCloudflareDomainCommand(root, args) {
|
|
27
27
|
if (args.projectSlug) throw new Error("domain: --project selects a bwf platform project and is not used for direct Cloudflare apps.");
|
|
28
|
-
const { changeCloudflareDomain, listCloudflareDomains } = await import("./cloudflare-operations-
|
|
28
|
+
const { changeCloudflareDomain, listCloudflareDomains } = await import("./cloudflare-operations-BcK849ue.mjs");
|
|
29
29
|
if (args.subcommand === "add") {
|
|
30
30
|
const result = await changeCloudflareDomain(root, args.hostname, "add");
|
|
31
31
|
note("Cloudflare Custom Domains manages the DNS record and TLS certificate in the zone on your account.", "Cloudflare Domain");
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { d as findBindingNameOwner } from "./wrangler-
|
|
1
|
+
import { d as findBindingNameOwner } from "./wrangler-TqTvJFWS.mjs";
|
|
2
2
|
import { n as CLOUDFLARE_QUEUE_NAMES_BUILD_ENV } from "./env-DUyTzroe.mjs";
|
|
3
3
|
import { isRecord } from "@builtbyfriends/deploy-core";
|
|
4
4
|
// src/queues/cloudflare-names.ts
|
|
@@ -5,12 +5,12 @@ import { n as readProjectPaths } from "./project-paths-iXHKRTTQ.mjs";
|
|
|
5
5
|
import { i as scanEmailHandlersSync } from "./email-C_ATvNIG.mjs";
|
|
6
6
|
import { c as getToken, u as openBrowser } from "./auth-xnkmpZUl.mjs";
|
|
7
7
|
import { n as PlatformApiError, r as PlatformClient } from "./client-D3D5RM5h.mjs";
|
|
8
|
-
import { a as createDeployWranglerRunner, i as discoverRootWranglerConfig, l as deriveWorkerName, o as isWranglerNonInteractiveOrCI, s as runWranglerAuthToken } from "./deploy-
|
|
9
|
-
import { a as emailConfigInputs, c as renderAddressMap, i as createNodeEmailDns, l as renderEmailChecklist, o as preflightEmail, r as applyEmailSetup, s as probeMx } from "./email-cloudflare-
|
|
8
|
+
import { a as createDeployWranglerRunner, i as discoverRootWranglerConfig, l as deriveWorkerName, o as isWranglerNonInteractiveOrCI, s as runWranglerAuthToken } from "./deploy-CWJ3JJs_.mjs";
|
|
9
|
+
import { a as emailConfigInputs, c as renderAddressMap, i as createNodeEmailDns, l as renderEmailChecklist, o as preflightEmail, r as applyEmailSetup, s as probeMx } from "./email-cloudflare-oXk2G1G3.mjs";
|
|
10
10
|
import { f as import_picocolors, l as formatUrl, m as printSuccess, p as note, r as createSpinner } from "./output-Bb34lF0w.mjs";
|
|
11
11
|
import { i as resolveCommandProjectId } from "./resolve-project-BCsAMDRA.mjs";
|
|
12
|
-
import { T as resolveDeployTransport } from "./cloudflare-operations-
|
|
13
|
-
import { A as writeProvisionedWranglerConfig } from "./wrangler-
|
|
12
|
+
import { T as resolveDeployTransport } from "./cloudflare-operations-DGF7xH7O.mjs";
|
|
13
|
+
import { A as writeProvisionedWranglerConfig } from "./wrangler-TqTvJFWS.mjs";
|
|
14
14
|
import { existsSync, mkdtempSync, rmSync, writeFileSync } from "node:fs";
|
|
15
15
|
import { tmpdir } from "node:os";
|
|
16
16
|
import { execSync } from "node:child_process";
|
|
@@ -3,7 +3,7 @@ import { a as join } from "./dist-DMYe8CZJ.mjs";
|
|
|
3
3
|
import { r as generateEnvTypes, t as findEnvFile } from "./env-types-Bg-dTh8u.mjs";
|
|
4
4
|
import { c as getToken } from "./auth-xnkmpZUl.mjs";
|
|
5
5
|
import { r as PlatformClient } from "./client-D3D5RM5h.mjs";
|
|
6
|
-
import { d as formatEnvReport, g as validateProdEnv, u as fetchRemoteSecretNames } from "./env-validation-
|
|
6
|
+
import { d as formatEnvReport, g as validateProdEnv, u as fetchRemoteSecretNames } from "./env-validation-DeqFUSKg.mjs";
|
|
7
7
|
import { m as printSuccess, p as note } from "./output-Bb34lF0w.mjs";
|
|
8
8
|
import { n as readDeploymentPlatform, r as readProjectConfig } from "./project-CC7eN00D.mjs";
|
|
9
9
|
import { mkdirSync, writeFileSync } from "node:fs";
|
|
@@ -25,7 +25,7 @@ async function runCheck(root, useRemoteSecrets) {
|
|
|
25
25
|
const platform = readDeploymentPlatform(root);
|
|
26
26
|
if (platform === "none") throw new Error("env: Deployment is disabled. Run `bwf init` to choose a platform.");
|
|
27
27
|
if (platform === "cloudflare") {
|
|
28
|
-
const { listCloudflareSecrets, resolveCloudflareOperationContext } = await import("./cloudflare-operations-
|
|
28
|
+
const { listCloudflareSecrets, resolveCloudflareOperationContext } = await import("./cloudflare-operations-BcK849ue.mjs");
|
|
29
29
|
remoteSecrets = await listCloudflareSecrets(resolveCloudflareOperationContext(root));
|
|
30
30
|
} else {
|
|
31
31
|
const token = getToken(root);
|
|
@@ -1 +1 @@
|
|
|
1
|
-
export { r as SelfHostSchemaError, a as computeInvalidEmittedKeys, c as deriveSelfHostSchemaFacts, p as readEmittedWorkerVars } from "./env-validation-
|
|
1
|
+
export { r as SelfHostSchemaError, a as computeInvalidEmittedKeys, c as deriveSelfHostSchemaFacts, p as readEmittedWorkerVars } from "./env-validation-DeqFUSKg.mjs";
|
|
@@ -4,7 +4,7 @@ import { t as loadUserEnvFile } from "./load-user-env-g0ahkZcj.mjs";
|
|
|
4
4
|
import { r as bwfWarn } from "./log-JDnPc0cF.mjs";
|
|
5
5
|
import { n as scanWranglerDotenvKeys } from "./dotenv-4NdUCXbB.mjs";
|
|
6
6
|
import { a as findReservedEnvKeys, c as loadLocalEnv, i as findLegacyEnvFiles, l as reservedEnvKeysMessage, o as isClientEnvKey, r as LOCAL_ENV_FILE, s as legacyEnvExampleHint } from "./env-DUyTzroe.mjs";
|
|
7
|
-
import { c as resolveCloudflareOperationArgv, n as decodeCloudflareOperationResult, r as encodeCloudflareOperation } from "./cloudflare-process-
|
|
7
|
+
import { c as resolveCloudflareOperationArgv, n as decodeCloudflareOperationResult, r as encodeCloudflareOperation } from "./cloudflare-process-tThIjEB2.mjs";
|
|
8
8
|
import { n as readGeneratedWranglerConfigFile } from "./generated-wrangler-config-CoDaaFsA.mjs";
|
|
9
9
|
import { existsSync, readFileSync } from "node:fs";
|
|
10
10
|
import { spawn } from "node:child_process";
|
|
@@ -131,7 +131,7 @@ declare module "hono" {
|
|
|
131
131
|
* Returns the URL the client actually requested — the pre-rewrite URL as
|
|
132
132
|
* a `URL` object — or `null` when the current request was not rewritten.
|
|
133
133
|
*
|
|
134
|
-
* Set on every
|
|
134
|
+
* Set on every Platform-managed request, whether the rewrite came from a
|
|
135
135
|
* static rule (`routing.rewrites`, `routing.fallbacks`, `_redirects`
|
|
136
136
|
* `200`/`200!`) or `c.rewrite()` in middleware. Useful for canonical
|
|
137
137
|
* link generation and locale negotiation that must reference the URL
|
|
@@ -49,7 +49,7 @@ async function executeComposedHandler(c, middlewares, endpoint) {
|
|
|
49
49
|
var BwfAssetRewriteError = class extends Error {
|
|
50
50
|
name = "BwfAssetRewriteError";
|
|
51
51
|
constructor(destination) {
|
|
52
|
-
super(`c.rewrite() cannot re-dispatch to a static asset path (${JSON.stringify(destination)}). Runtime rewrites only reach routes inside the worker — static asset handlers run in front of the worker. To rewrite into an asset, use a static \`routing.rewrites\` rule in bwf.config.ts or a \`200!\` entry in _redirects. See https://
|
|
52
|
+
super(`c.rewrite() cannot re-dispatch to a static asset path (${JSON.stringify(destination)}). Runtime rewrites only reach routes inside the worker — static asset handlers run in front of the worker. To rewrite into an asset, use a static \`routing.rewrites\` rule in bwf.config.ts or a \`200!\` entry in _redirects. See https://github.com/builtbyfriends/platform/blob/main/docs/guide/edge/rewrites.md#runtime-rewrites-cannot-reach-static-assets`);
|
|
53
53
|
}
|
|
54
54
|
};
|
|
55
55
|
function defineHandler(...args) {
|