void 1.1.11 → 1.1.12
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-R35a4Oa8.mjs → account-cmd-Cj6sCMTk.mjs} +4 -4
- package/dist/{auth-link-VHmiKZmP.mjs → auth-link-Dj7lAC_K.mjs} +4 -4
- package/dist/{auth-router-O_Wrs5kg.mjs → auth-router-CNsMOFCa.mjs} +2 -2
- package/dist/{build-cmd-CMZiMn46.mjs → build-cmd-ByhegwRC.mjs} +2 -2
- package/dist/{cache-TZ5Ab3d7.mjs → cache-CEFb5ban.mjs} +2 -2
- package/dist/{cancel-deploy-DXoR6oC3.mjs → cancel-deploy-CaARY26n.mjs} +2 -2
- package/dist/{cf-build-output-Bc8i3dzE.mjs → cf-build-output-ChEKWan2.mjs} +71 -7
- package/dist/cf-build-output-Dcmxa-Zm.mjs +1 -0
- package/dist/{cf-user-agent-ChjQp2MU.mjs → cf-command-values-b8OqDoo9.mjs} +5 -16
- package/dist/cf-user-agent-BkEHPDLA.mjs +16 -0
- package/dist/cli/cli.mjs +135 -31
- package/dist/cli/cloudflare-operation-process.mjs +46 -9
- package/dist/{client-GuSO3v_x.mjs → client-BdzxubTS.mjs} +57 -12
- package/dist/client-DAnfyMe9.mjs +1 -0
- package/dist/{cloudflare-cmd-ZSErUl6Y.mjs → cloudflare-cmd-D_2-Q-_i.mjs} +1 -1
- package/dist/{cloudflare-operations-Cm8lVx7W.mjs → cloudflare-operations-BFLCpUCV.mjs} +1 -1
- package/dist/{cloudflare-operations-DH3GedbV.mjs → cloudflare-operations-D5PLrOqD.mjs} +14 -4
- package/dist/{connect-yQuLbuiJ.mjs → connect-C4_m2moF.mjs} +4 -4
- package/dist/{create-project-CGOo_OL_.mjs → create-project-CvuYDD-l.mjs} +1 -1
- package/dist/{create-project-DEEWJX_M.mjs → create-project-D8jQTwVQ.mjs} +2 -2
- package/dist/{db-COI-yTJE.mjs → db-BsiOAa0A.mjs} +58 -8
- package/dist/{delete-PgN6L_9N.mjs → delete-CAma7nFi.mjs} +2 -2
- package/dist/{deploy-DsW-PrRQ.mjs → deploy-D1gIPiAq.mjs} +118 -36
- package/dist/deploy-Dc0XsCQj.mjs +2 -0
- package/dist/{deploy-managed-static-Dqz06S2u.mjs → deploy-managed-static-B9KVxY3X.mjs} +64 -18
- package/dist/{deploy-transport-nY3vLXPL.mjs → deploy-transport-B3mtEi_q.mjs} +1 -1
- package/dist/deploy.d.mts +22 -1
- package/dist/deploy.mjs +45 -4
- package/dist/{domain-DKlNI0SR.mjs → domain-BAdwm-QS.mjs} +3 -3
- package/dist/{email-C0s3OvJk.mjs → email-MwjA7kaL.mjs} +4 -4
- package/dist/{env-BX2JFsgF.mjs → env-B163-G1s.mjs} +3 -3
- package/dist/{fetch-DHLOuPyk.d.mts → fetch-CUX0tB78.d.mts} +14 -1
- package/dist/fetch-CtESUYWd.mjs +26 -0
- package/dist/{fetch-error-Dj3crt0e.mjs → fetch-error-Bw0n-IY-.mjs} +1 -1
- package/dist/{fetch-stream-PGgz4uGz.mjs → fetch-stream-BspOeTAI.mjs} +1 -1
- package/dist/{fetch-stream-CNxOrBdP.d.mts → fetch-stream-DfkAzZf-.d.mts} +1 -1
- package/dist/{gen-Bj6ZkOcI.mjs → gen-CYN3wiov.mjs} +1 -1
- package/dist/gen-Cf-RBVg4.mjs +1 -0
- package/dist/{github-cmd-DQDryS-5.mjs → github-cmd-C8QsnJQs.mjs} +2 -2
- package/dist/{handler-_PqY82xe.d.mts → handler-D5K_yP6T.d.mts} +1 -1
- package/dist/{help-D49SL_lN.mjs → help-B2sFwn9b.mjs} +44 -3
- package/dist/help-w-xlx_kq.mjs +1 -0
- package/dist/index.d.mts +1 -1
- package/dist/index.mjs +38 -71
- package/dist/{init-DyTEY04s.mjs → init-DGFQMnbk.mjs} +6 -6
- package/dist/{link-CgOVn9EC.mjs → link-CwrfpjIM.mjs} +3 -3
- package/dist/{list-CUfD9RSb.mjs → list-hKoW5z-b.mjs} +3 -3
- package/dist/{live-DJONVlQK.d.mts → live-JheIDZKc.d.mts} +1 -1
- package/dist/login-08mBwZfI.mjs +1 -0
- package/dist/{login-BJvGW5Eu.mjs → login-f2eu2TQh.mjs} +3 -3
- package/dist/{logs-DeizBI4j.mjs → logs-CEWqD-_B.mjs} +3 -3
- package/dist/{migrate-8rk56vV8.mjs → migrate-DYfdWBXt.mjs} +1 -1
- package/dist/migrate-Di-4EuoE.mjs +1 -0
- package/dist/nitro.mjs +1 -1
- package/dist/operator-cmd-Bv20yLu2.mjs +1 -0
- package/dist/{operator-cmd-CA5QQyvE.mjs → operator-cmd-DCr_QGMH.mjs} +4 -4
- package/dist/{output-Ba6ZbrzY.mjs → output-CKguMgr7.mjs} +13 -1
- package/dist/pages/client.d.mts +2 -2
- package/dist/pages/client.mjs +18 -5
- package/dist/pages/index.d.mts +1 -1
- package/dist/pages/index.mjs +1 -1
- package/dist/pages/islands-plugin.d.mts +43 -5
- package/dist/pages/islands-plugin.mjs +98 -27
- package/dist/pages/protocol.d.mts +2 -2
- package/dist/pages/protocol.mjs +1 -1
- package/dist/pages/serialize.d.mts +2 -2
- package/dist/pages/serialize.mjs +1 -1
- package/dist/{platform-auth-config-CZaY812e.mjs → platform-auth-config-qGvEuns3.mjs} +5 -5
- package/dist/{platform-auth-protection-U9HCqoXv.mjs → platform-auth-protection-CyLcD6ot.mjs} +3 -3
- package/dist/{platform-auth-recovery-B0BV2hfV.mjs → platform-auth-recovery-B2LKI8V2.mjs} +3 -3
- package/dist/{platform-cmd-D9lwFpcl.mjs → platform-cmd-B2ec5eFg.mjs} +1 -1
- package/dist/{platform-cmd-CXrjk4fb.mjs → platform-cmd-CX7phm7V.mjs} +5 -5
- package/dist/{platform-domain-CXyq-68_.mjs → platform-domain-DDNK2y-4.mjs} +3 -3
- package/dist/{platform-lifecycle-D0TdyXbN.mjs → platform-lifecycle-3CR98Tg2.mjs} +386 -36
- package/dist/{platform-lifecycle-Dz2cJsLX.mjs → platform-lifecycle-CWc5gr6c.mjs} +1 -1
- package/dist/{platform-management-BvgbusqL.mjs → platform-management-DAE6g2QU.mjs} +1 -1
- package/dist/{platform-management-CnXhgxTM.mjs → platform-management-o3LCCeE4.mjs} +40 -2
- package/dist/{platform-plans-config-BWn1S2Rv.mjs → platform-plans-config-CBMZxCep.mjs} +1 -1
- package/dist/{platform-recovery-CH_fThW6.mjs → platform-recovery-Dmsg7lWA.mjs} +2 -2
- package/dist/{platform-setup-YvN9VQXV.mjs → platform-setup-hFbnWAVQ.mjs} +1 -1
- package/dist/{prepare-2XD6kh77.mjs → prepare-HKo7Rh5V.mjs} +1 -1
- package/dist/{project-cmd-CpLYflCH.mjs → project-cmd-8ylYGx-O.mjs} +17 -17
- package/dist/{project-team-CTSY7W7Q.mjs → project-team-Bvpl78we.mjs} +2 -2
- package/dist/{project-token-Cybtlfbl.mjs → project-token-QWHoJH2t.mjs} +2 -2
- package/dist/{project-zero-trust-DKOtqyvu.mjs → project-zero-trust-8tJ-RFvu.mjs} +2 -2
- package/dist/{protocol-B8sI8dRD.d.mts → protocol-Ssc_LhHj.d.mts} +1 -1
- package/dist/{protocol-RNP0u7UY.mjs → protocol-bAUUkx70.mjs} +1 -1
- package/dist/{provision-UcYjpTRh.mjs → provision-BgXFDv0d.mjs} +1 -1
- package/dist/{provision-BuifYvLc.mjs → provision-DZKYCEJg.mjs} +3 -2
- package/dist/{requests-Ryiazz9i.mjs → requests-Vk5Zyhcy.mjs} +2 -2
- package/dist/{rollback-Or0EV3rP.mjs → rollback-CH4yMQys.mjs} +9 -8
- package/dist/runtime/client-react.d.mts +2 -2
- package/dist/runtime/client-react.mjs +3 -3
- package/dist/runtime/client-solid.d.mts +2 -2
- package/dist/runtime/client-solid.mjs +3 -3
- package/dist/runtime/client-svelte.d.mts +2 -2
- package/dist/runtime/client-svelte.mjs +3 -3
- package/dist/runtime/client-vue.d.mts +2 -2
- package/dist/runtime/client-vue.mjs +3 -3
- package/dist/runtime/client.d.mts +2 -2
- package/dist/runtime/client.mjs +3 -3
- package/dist/runtime/fetch-server.d.mts +8 -0
- package/dist/runtime/fetch-server.mjs +30 -0
- package/dist/runtime/fetch-stream.d.mts +2 -2
- package/dist/runtime/fetch-stream.mjs +2 -2
- package/dist/runtime/fetch.d.mts +2 -2
- package/dist/runtime/fetch.mjs +3 -3
- package/dist/runtime/handler.d.mts +1 -1
- package/dist/runtime/live-client.d.mts +1 -1
- package/dist/runtime/live.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-CClHaFxm.mjs → secret-wr6Sn4Xa.mjs} +3 -3
- package/dist/serialize-DtR8Vwa_.d.mts +18 -0
- package/dist/serialize-YHvlcG3Q.mjs +31 -0
- package/dist/{subcommand-prompt-Bm3ZlYgA.mjs → subcommand-prompt-CNZc4XUd.mjs} +1 -1
- package/dist/{wrapper-BOigE1xJ.mjs → wrapper-DGsYwNi6.mjs} +2 -0
- package/dist/{ws-CsBNxv86.d.mts → ws-nnFnAyQb.d.mts} +1 -1
- package/docs/guide/deployment.md +2 -0
- package/docs/guide/edge/headers.md +1 -1
- package/docs/guide/email/receiving.md +1 -1
- package/docs/guide/email/sending.md +3 -3
- package/docs/guide/pages-routing/markdown.md +3 -1
- package/docs/guide/platform/administration/email.md +7 -1
- package/docs/guide/platform/installation/ci.md +2 -0
- package/docs/guide/platform/installation/credentials.md +23 -5
- package/docs/guide/platform/installation/maintenance.md +32 -2
- package/docs/guide/platform/installation/setup.md +1 -1
- package/docs/guide/typed-fetch.md +1 -1
- package/docs/integrations/cloudflare.md +1 -1
- package/docs/integrations/frameworks/tanstack-start.md +25 -0
- package/docs/reference/api/deploy.md +35 -3
- package/docs/reference/cli/database.md +15 -0
- package/docs/reference/cli/platform-installation.md +2 -0
- package/docs/reference/cli/project.md +4 -2
- package/docs/reference/cli.md +1 -0
- package/docs/reference/config.md +1 -1
- package/package.json +8 -7
- package/dist/cf-build-output-BU3hqdHu.mjs +0 -1
- package/dist/client-DrdeJgHR.mjs +0 -1
- package/dist/deploy-CxNgEYr4.mjs +0 -2
- package/dist/fetch-sAcwjzLO.mjs +0 -18
- package/dist/gen-DsCukhuw.mjs +0 -1
- package/dist/help-DOFygYi4.mjs +0 -1
- package/dist/login-alAlxw4S.mjs +0 -1
- package/dist/migrate-D2odrAmh.mjs +0 -1
- package/dist/operator-cmd-D7toMPJ9.mjs +0 -1
- package/dist/serialize-BtQyaYoC.mjs +0 -20
- package/dist/serialize-CfSwWfF2.d.mts +0 -10
|
@@ -1,14 +1,14 @@
|
|
|
1
1
|
import { c as getToken, f as removeToken } from "./auth-B6iOCjKI.mjs";
|
|
2
2
|
import { L as log } from "./dist-BVdsO7Py.mjs";
|
|
3
|
-
import { m as printSuccess } from "./output-
|
|
4
|
-
import { r as PlatformClient } from "./client-
|
|
5
|
-
import { n as runLoginCommand } from "./login-
|
|
3
|
+
import { m as printSuccess } from "./output-CKguMgr7.mjs";
|
|
4
|
+
import { r as PlatformClient } from "./client-BdzxubTS.mjs";
|
|
5
|
+
import { n as runLoginCommand } from "./login-f2eu2TQh.mjs";
|
|
6
6
|
import { execSync } from "node:child_process";
|
|
7
7
|
//#region 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-Dj7lAC_K.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 { a as getApiUrl, c as getToken, m as savePlatformToken, p as runPlatformLogin, u as openBrowser } from "./auth-B6iOCjKI.mjs";
|
|
2
2
|
import { L as log } from "./dist-BVdsO7Py.mjs";
|
|
3
|
-
import { l as formatUrl } from "./output-
|
|
4
|
-
import { r as PlatformClient } from "./client-
|
|
5
|
-
import { r as selectPlatformLoginMethod } from "./login-
|
|
6
|
-
import { t as discoverPlatform } from "./platform-cmd-
|
|
3
|
+
import { l as formatUrl } from "./output-CKguMgr7.mjs";
|
|
4
|
+
import { r as PlatformClient } from "./client-BdzxubTS.mjs";
|
|
5
|
+
import { r as selectPlatformLoginMethod } from "./login-f2eu2TQh.mjs";
|
|
6
|
+
import { t as discoverPlatform } from "./platform-cmd-CX7phm7V.mjs";
|
|
7
7
|
//#region 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-D_2-Q-_i.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-Cj6sCMTk.mjs");
|
|
47
47
|
const subcommand = args.subcommand === "status" ? "whoami" : args.subcommand;
|
|
48
48
|
if (!destination.apiUrl) {
|
|
49
49
|
await runAccountCommand(root, { subcommand });
|
|
@@ -1,8 +1,8 @@
|
|
|
1
1
|
import { r as readProjectConfig } from "./project-rqDnVsJN.mjs";
|
|
2
2
|
import { c as getToken } from "./auth-B6iOCjKI.mjs";
|
|
3
3
|
import { H as outro, L as log } from "./dist-BVdsO7Py.mjs";
|
|
4
|
-
import { f as import_picocolors, i as dim, m as printSuccess } from "./output-
|
|
5
|
-
import { n as PlatformApiError, r as PlatformClient } from "./client-
|
|
4
|
+
import { f as import_picocolors, i as dim, m as printSuccess } from "./output-CKguMgr7.mjs";
|
|
5
|
+
import { n as PlatformApiError, r as PlatformClient } from "./client-BdzxubTS.mjs";
|
|
6
6
|
import { a as resolveProjectBySlug, t as getRequestedProjectSlug } from "./resolve-project-WpwkCB_c.mjs";
|
|
7
7
|
import { appendFileSync, writeFileSync } from "node:fs";
|
|
8
8
|
//#region src/cli/build-cmd.ts
|
|
@@ -1,8 +1,8 @@
|
|
|
1
1
|
import { r as readProjectConfig } from "./project-rqDnVsJN.mjs";
|
|
2
2
|
import { c as getToken } from "./auth-B6iOCjKI.mjs";
|
|
3
3
|
import { L as log } from "./dist-BVdsO7Py.mjs";
|
|
4
|
-
import { m as printSuccess, o as formatCount, r as createSpinner } from "./output-
|
|
5
|
-
import { r as PlatformClient } from "./client-
|
|
4
|
+
import { m as printSuccess, o as formatCount, r as createSpinner } from "./output-CKguMgr7.mjs";
|
|
5
|
+
import { r as PlatformClient } from "./client-BdzxubTS.mjs";
|
|
6
6
|
import { a as resolveProjectBySlug, t as getRequestedProjectSlug } from "./resolve-project-WpwkCB_c.mjs";
|
|
7
7
|
//#region src/cli/cache.ts
|
|
8
8
|
async function runPurgeCacheCommand(root, projectSlug) {
|
|
@@ -1,8 +1,8 @@
|
|
|
1
1
|
import { r as readProjectConfig } from "./project-rqDnVsJN.mjs";
|
|
2
2
|
import { c as getToken } from "./auth-B6iOCjKI.mjs";
|
|
3
3
|
import { A as confirm, H as outro, L as log, tt as isCancel } from "./dist-BVdsO7Py.mjs";
|
|
4
|
-
import { m as printSuccess } from "./output-
|
|
5
|
-
import { r as PlatformClient } from "./client-
|
|
4
|
+
import { m as printSuccess } from "./output-CKguMgr7.mjs";
|
|
5
|
+
import { r as PlatformClient } from "./client-BdzxubTS.mjs";
|
|
6
6
|
//#region src/cli/cancel-deploy.ts
|
|
7
7
|
const ACTIVE_STATUSES = /* @__PURE__ */ new Set([
|
|
8
8
|
"pending",
|
|
@@ -6,9 +6,9 @@ import { randomUUID } from "node:crypto";
|
|
|
6
6
|
import { tmpdir } from "node:os";
|
|
7
7
|
import { isDeepStrictEqual } from "node:util";
|
|
8
8
|
import { spawn, spawnSync } from "node:child_process";
|
|
9
|
-
import
|
|
10
|
-
import { getWorkerBundleDir, normalizeDirectoryName, readBuildOutput, writeAssets, writeContainerConfig, writeRootConfig, writeWorkerConfig } from "@cloudflare/build-output-utils";
|
|
9
|
+
import { getRootConfigPath, getWorkerAssetsDir, getWorkerBundleDir, getWorkerConfigPath, normalizeDirectoryName, readBuildOutput, writeAssets, writeContainerConfig, writeRootConfig, writeWorkerConfig } from "@cloudflare/build-output-utils";
|
|
11
10
|
import { InputConfigSchema, OutputContainerSchema } from "@cloudflare/config";
|
|
11
|
+
import ignore from "ignore";
|
|
12
12
|
//#region src/cli/cf-config-migrate.ts
|
|
13
13
|
function record(value) {
|
|
14
14
|
return isRecord(value) ? value : null;
|
|
@@ -363,6 +363,14 @@ function isInside(directory, path) {
|
|
|
363
363
|
const child = relative(directory, path);
|
|
364
364
|
return child !== "" && child !== ".." && !child.startsWith("../") && !isAbsolute(child);
|
|
365
365
|
}
|
|
366
|
+
/** Asset copies follow symlinks, so a link may not reach outside the asset directory. */
|
|
367
|
+
function assertAssetSymlinksInside(directory) {
|
|
368
|
+
const realDirectory = realpathSync(directory);
|
|
369
|
+
for (const entry of readdirSync(directory, {
|
|
370
|
+
recursive: true,
|
|
371
|
+
withFileTypes: true
|
|
372
|
+
})) if (entry.isSymbolicLink() && !isInside(realDirectory, realpathSync(join(entry.parentPath, entry.name)))) throw new Error("The Worker assets contain a symlink outside the asset directory.");
|
|
373
|
+
}
|
|
366
374
|
function copyBundle(source, destination) {
|
|
367
375
|
const modules = {};
|
|
368
376
|
for (const entry of readdirSync(source, {
|
|
@@ -384,12 +392,14 @@ function copyBundle(source, destination) {
|
|
|
384
392
|
}
|
|
385
393
|
return modules;
|
|
386
394
|
}
|
|
387
|
-
/** Create a
|
|
388
|
-
async function prepareCfBuildOutput(workerDirectory, accountId) {
|
|
395
|
+
/** Create a disposable cf Build Output tree from an existing Cloudflare Worker build. */
|
|
396
|
+
async function prepareCfBuildOutput(workerDirectory, accountId, mode) {
|
|
389
397
|
const source = resolve(workerDirectory);
|
|
398
|
+
if (existsSync(getRootConfigPath(source))) return prepareNativeBuildOutput(source, accountId, mode);
|
|
399
|
+
if (!existsSync(join(source, "wrangler.json"))) throw new Error(`No Cloudflare Worker build found in ${source}. Pass the project root that contains .cloudflare/output/v0, or the Worker output directory that contains wrangler.json.`);
|
|
390
400
|
const raw = record(JSON.parse(readFileSync(join(source, "wrangler.json"), "utf8")));
|
|
391
401
|
if (!raw) return null;
|
|
392
|
-
if (typeof raw.account_id === "string" && raw.account_id !== accountId) return null;
|
|
402
|
+
if (typeof raw.account_id === "string" && accountId !== void 0 && raw.account_id !== accountId) return null;
|
|
393
403
|
const config = migrateBuiltWranglerConfig(raw);
|
|
394
404
|
if (!config.worker) throw new Error("cf did not produce a Worker configuration.");
|
|
395
405
|
if (typeof raw.main !== "string" || !raw.main) throw new Error("The built Worker configuration is missing its main entry. Rebuild the app.");
|
|
@@ -412,9 +422,10 @@ async function prepareCfBuildOutput(workerDirectory, accountId) {
|
|
|
412
422
|
const bundle = getWorkerBundleDir(directory);
|
|
413
423
|
mkdirSync(bundle, { recursive: true });
|
|
414
424
|
const modules = copyBundle(source, bundle);
|
|
415
|
-
|
|
425
|
+
const configuredAccountId = accountId ?? raw.account_id;
|
|
426
|
+
await writeRootConfig(directory, typeof configuredAccountId === "string" ? { accountId: configuredAccountId } : {}, {
|
|
416
427
|
isPreview: false,
|
|
417
|
-
mode: "production"
|
|
428
|
+
mode: mode ?? "production"
|
|
418
429
|
});
|
|
419
430
|
await writeWorkerConfig({
|
|
420
431
|
root: directory,
|
|
@@ -448,6 +459,7 @@ async function prepareCfBuildOutput(workerDirectory, accountId) {
|
|
|
448
459
|
await dispose();
|
|
449
460
|
return null;
|
|
450
461
|
}
|
|
462
|
+
assertAssetSymlinksInside(assetPath);
|
|
451
463
|
await writeAssets({
|
|
452
464
|
root: directory,
|
|
453
465
|
sourceDirectory: assetPath
|
|
@@ -464,6 +476,58 @@ async function prepareCfBuildOutput(workerDirectory, accountId) {
|
|
|
464
476
|
throw error;
|
|
465
477
|
}
|
|
466
478
|
}
|
|
479
|
+
/** Copy and complete the native artifact without changing the Vite build's inputs or metadata. */
|
|
480
|
+
async function prepareNativeBuildOutput(source, accountId, mode) {
|
|
481
|
+
const built = await readBuildOutput(source);
|
|
482
|
+
if (accountId !== void 0 && built.rootConfig.accountId !== void 0 && accountId !== built.rootConfig.accountId || mode !== void 0 && mode !== built.rootConfig.buildContext.mode) return null;
|
|
483
|
+
const directory = mkdtempSync(join(tmpdir(), "void-cf-native-"));
|
|
484
|
+
const dispose = async () => {
|
|
485
|
+
rmSync(directory, {
|
|
486
|
+
recursive: true,
|
|
487
|
+
force: true
|
|
488
|
+
});
|
|
489
|
+
};
|
|
490
|
+
try {
|
|
491
|
+
await writeRootConfig(directory, {
|
|
492
|
+
accountId: accountId ?? built.rootConfig.accountId,
|
|
493
|
+
complianceRegion: built.rootConfig.complianceRegion
|
|
494
|
+
}, {
|
|
495
|
+
...built.rootConfig.buildContext,
|
|
496
|
+
mode: built.rootConfig.buildContext.mode
|
|
497
|
+
});
|
|
498
|
+
for (const [name, worker] of Object.entries(built.workers)) {
|
|
499
|
+
if (worker.bundleDir && (!worker.config.manifest || worker.config.manifest.modules[worker.config.manifest.mainModule]?.type !== "esm")) throw new Error("The native Worker build must declare its main ES module.");
|
|
500
|
+
const configPath = getWorkerConfigPath(directory, name);
|
|
501
|
+
mkdirSync(dirname(configPath), { recursive: true });
|
|
502
|
+
writeFileSync(configPath, JSON.stringify(worker.config));
|
|
503
|
+
if (worker.bundleDir && worker.config.manifest) {
|
|
504
|
+
const bundle = getWorkerBundleDir(directory, name);
|
|
505
|
+
for (const module of Object.keys(worker.config.manifest.modules)) {
|
|
506
|
+
const destination = join(bundle, module);
|
|
507
|
+
if (module.includes("\\") || module.includes(":") || !isInside(bundle, resolve(bundle, module)) || !isInside(worker.bundleDir, resolve(worker.bundleDir, module))) throw new Error("Native Worker modules must stay inside the build bundle.");
|
|
508
|
+
if (!existsSync(join(worker.bundleDir, module))) throw new Error(`Native Worker module ${module} is missing from the build bundle.`);
|
|
509
|
+
mkdirSync(dirname(destination), { recursive: true });
|
|
510
|
+
copyFileSync(join(worker.bundleDir, module), destination);
|
|
511
|
+
}
|
|
512
|
+
}
|
|
513
|
+
if (worker.assetsDir) cpSync(worker.assetsDir, getWorkerAssetsDir(directory, name), { recursive: true });
|
|
514
|
+
}
|
|
515
|
+
for (const container of built.containers) await writeContainerConfig({
|
|
516
|
+
root: directory,
|
|
517
|
+
config: container.config,
|
|
518
|
+
directoryName: basename(dirname(container.configPath))
|
|
519
|
+
});
|
|
520
|
+
await readBuildOutput(directory);
|
|
521
|
+
return {
|
|
522
|
+
directory,
|
|
523
|
+
...built.workers.default.assetsDir ? { assetsDirectory: built.workers.default.assetsDir } : {},
|
|
524
|
+
dispose
|
|
525
|
+
};
|
|
526
|
+
} catch (error) {
|
|
527
|
+
await dispose();
|
|
528
|
+
throw error;
|
|
529
|
+
}
|
|
530
|
+
}
|
|
467
531
|
/** Bundle a generated Worker entry with Vite, then hand the result to `prepareCfBuildOutput`. */
|
|
468
532
|
async function prepareBundledBuildOutput(options) {
|
|
469
533
|
const scratch = mkdtempSync(join(tmpdir(), options.scratchPrefix));
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export { t as prepareCfBuildOutput } from "./cf-build-output-ChEKWan2.mjs";
|
|
@@ -1,5 +1,3 @@
|
|
|
1
|
-
import { n as getOwnVersion } from "./agents-CuNtT0D_.mjs";
|
|
2
|
-
import { readFileSync } from "node:fs";
|
|
3
1
|
//#region src/cli/cf-command-values.ts
|
|
4
2
|
/** Accept a cf positional only when it cannot be read as a flag or carry control characters. */
|
|
5
3
|
function safePositional(value) {
|
|
@@ -8,6 +6,10 @@ function safePositional(value) {
|
|
|
8
6
|
return code < 32 || code === 127;
|
|
9
7
|
});
|
|
10
8
|
}
|
|
9
|
+
/** Accept only Cloudflare's hex-segment D1 Time Travel bookmarks; Void prints them as commands to copy. */
|
|
10
|
+
function isD1Bookmark(value) {
|
|
11
|
+
return typeof value === "string" && /^[0-9a-f]+(?:-[0-9a-f]+)+$/i.test(value);
|
|
12
|
+
}
|
|
11
13
|
/** Read the version ID and URLs that cf prints after a prebuilt upload. */
|
|
12
14
|
function readCfUploadOutput(stdout) {
|
|
13
15
|
return {
|
|
@@ -17,17 +19,4 @@ function readCfUploadOutput(stdout) {
|
|
|
17
19
|
};
|
|
18
20
|
}
|
|
19
21
|
//#endregion
|
|
20
|
-
|
|
21
|
-
let voidUserAgent;
|
|
22
|
-
let cfCliVersion;
|
|
23
|
-
function getVoidUserAgent() {
|
|
24
|
-
if (voidUserAgent === void 0) voidUserAgent = `void/${getOwnVersion()}`;
|
|
25
|
-
return voidUserAgent;
|
|
26
|
-
}
|
|
27
|
-
/** cf prepends `cf-cli/` to CLI_VERSION for both API requests and uploads. */
|
|
28
|
-
function getCfCliVersion(attribution) {
|
|
29
|
-
if (cfCliVersion === void 0) cfCliVersion = `${JSON.parse(readFileSync(new URL(import.meta.resolve("cf/package.json")), "utf8")).version} ${getVoidUserAgent()}`;
|
|
30
|
-
return attribution ? `${cfCliVersion} ${attribution}` : cfCliVersion;
|
|
31
|
-
}
|
|
32
|
-
//#endregion
|
|
33
|
-
export { safePositional as i, getVoidUserAgent as n, readCfUploadOutput as r, getCfCliVersion as t };
|
|
22
|
+
export { readCfUploadOutput as n, safePositional as r, isD1Bookmark as t };
|
|
@@ -0,0 +1,16 @@
|
|
|
1
|
+
import { n as getOwnVersion } from "./agents-CuNtT0D_.mjs";
|
|
2
|
+
import { readFileSync } from "node:fs";
|
|
3
|
+
//#region src/cli/cf-user-agent.ts
|
|
4
|
+
let voidUserAgent;
|
|
5
|
+
let cfCliVersion;
|
|
6
|
+
function getVoidUserAgent() {
|
|
7
|
+
if (voidUserAgent === void 0) voidUserAgent = `void/${getOwnVersion()}`;
|
|
8
|
+
return voidUserAgent;
|
|
9
|
+
}
|
|
10
|
+
/** cf prepends `cf-cli/` to CLI_VERSION for both API requests and uploads. */
|
|
11
|
+
function getCfCliVersion(attribution) {
|
|
12
|
+
if (cfCliVersion === void 0) cfCliVersion = `${JSON.parse(readFileSync(new URL(import.meta.resolve("cf/package.json")), "utf8")).version} ${getVoidUserAgent()}`;
|
|
13
|
+
return attribution ? `${cfCliVersion} ${attribution}` : cfCliVersion;
|
|
14
|
+
}
|
|
15
|
+
//#endregion
|
|
16
|
+
export { getVoidUserAgent as n, getCfCliVersion as t };
|
package/dist/cli/cli.mjs
CHANGED
|
@@ -1,9 +1,10 @@
|
|
|
1
1
|
#!/usr/bin/env node
|
|
2
2
|
import { L as log } from "../dist-BVdsO7Py.mjs";
|
|
3
|
-
import { f as import_picocolors, l as formatUrl } from "../output-
|
|
3
|
+
import { f as import_picocolors, l as formatUrl } from "../output-CKguMgr7.mjs";
|
|
4
4
|
import { t as formatCloudflareUserMessage } from "../cloudflare-user-output-Q-k0QoNQ.mjs";
|
|
5
5
|
import { n as getOwnVersion } from "../agents-CuNtT0D_.mjs";
|
|
6
|
-
import {
|
|
6
|
+
import { t as isD1Bookmark } from "../cf-command-values-b8OqDoo9.mjs";
|
|
7
|
+
import { i as printVoidHeader, n as printGlobalHelp, r as printHelpPage, t as getHelpPath } from "../help-B2sFwn9b.mjs";
|
|
7
8
|
import { r as OperatorClientError } from "../operator-client-C-ROjk1I.mjs";
|
|
8
9
|
import { n as operatorGroups } from "../operator-args-UnE8Y2eK.mjs";
|
|
9
10
|
import { n as platformSubcommands, t as parsePlatformArgs } from "../platform-args-B7ke06up.mjs";
|
|
@@ -324,6 +325,31 @@ const dbSubcommands = [
|
|
|
324
325
|
}
|
|
325
326
|
]
|
|
326
327
|
},
|
|
328
|
+
{
|
|
329
|
+
name: "restore",
|
|
330
|
+
description: "Restore the deployed D1 database to an earlier point (direct Cloudflare)",
|
|
331
|
+
flags: [
|
|
332
|
+
{
|
|
333
|
+
name: "--bookmark",
|
|
334
|
+
arg: "<bookmark>",
|
|
335
|
+
description: "Restore point printed by deploy (or use --timestamp)"
|
|
336
|
+
},
|
|
337
|
+
{
|
|
338
|
+
name: "--timestamp",
|
|
339
|
+
arg: "<iso-time>",
|
|
340
|
+
description: "Time to restore to, with Z or an offset (or use --bookmark)"
|
|
341
|
+
},
|
|
342
|
+
{
|
|
343
|
+
name: "--platform",
|
|
344
|
+
arg: "cloudflare",
|
|
345
|
+
description: "Restore after a one-off deploy with --platform cloudflare"
|
|
346
|
+
},
|
|
347
|
+
{
|
|
348
|
+
name: "--yes",
|
|
349
|
+
description: "Skip the confirmation prompt"
|
|
350
|
+
}
|
|
351
|
+
]
|
|
352
|
+
},
|
|
327
353
|
{
|
|
328
354
|
name: "rename-migrations",
|
|
329
355
|
description: "Rename migrations to timestamp-based format"
|
|
@@ -364,6 +390,7 @@ const MAX_POSITIONALS = {
|
|
|
364
390
|
studio: 0,
|
|
365
391
|
"set-url": 0,
|
|
366
392
|
connect: 1,
|
|
393
|
+
restore: 0,
|
|
367
394
|
"rename-migrations": 0,
|
|
368
395
|
export: 0
|
|
369
396
|
};
|
|
@@ -383,6 +410,12 @@ const ACTION_FLAGS = {
|
|
|
383
410
|
"region",
|
|
384
411
|
"local-only"
|
|
385
412
|
],
|
|
413
|
+
restore: [
|
|
414
|
+
"bookmark",
|
|
415
|
+
"timestamp",
|
|
416
|
+
"platform",
|
|
417
|
+
"yes"
|
|
418
|
+
],
|
|
386
419
|
"rename-migrations": [],
|
|
387
420
|
export: [
|
|
388
421
|
"output",
|
|
@@ -391,6 +424,26 @@ const ACTION_FLAGS = {
|
|
|
391
424
|
"table"
|
|
392
425
|
]
|
|
393
426
|
};
|
|
427
|
+
/**
|
|
428
|
+
* Read a restore time as a UTC ISO string. A time without a zone would depend on where the
|
|
429
|
+
* command runs, `new Date` rolls impossible dates over (Feb 30 becomes Mar 2), and it keeps only
|
|
430
|
+
* milliseconds, so all three are rejected instead of restoring to a moment the user did not write.
|
|
431
|
+
*/
|
|
432
|
+
function parseRestoreTime(value) {
|
|
433
|
+
const match = /^(\d{4})-(\d{2})-(\d{2})T(\d{2}):(\d{2})(?::(\d{2})(?:\.\d{1,3})?)?(?:Z|([+-])(\d{2}):(\d{2}))$/i.exec(value);
|
|
434
|
+
const time = new Date(value);
|
|
435
|
+
if (!match || Number.isNaN(time.getTime())) return;
|
|
436
|
+
const offsetMinutes = match[7] ? (match[7] === "-" ? -1 : 1) * (Number(match[8]) * 60 + Number(match[9])) : 0;
|
|
437
|
+
const written = new Date(time.getTime() + offsetMinutes * 6e4);
|
|
438
|
+
return [
|
|
439
|
+
written.getUTCFullYear(),
|
|
440
|
+
written.getUTCMonth() + 1,
|
|
441
|
+
written.getUTCDate(),
|
|
442
|
+
written.getUTCHours(),
|
|
443
|
+
written.getUTCMinutes(),
|
|
444
|
+
written.getUTCSeconds()
|
|
445
|
+
].every((field, index) => field === Number(match[index + 1] ?? 0)) ? time.toISOString() : void 0;
|
|
446
|
+
}
|
|
394
447
|
function isDbAction(value) {
|
|
395
448
|
return value !== void 0 && Object.hasOwn(MAX_POSITIONALS, value);
|
|
396
449
|
}
|
|
@@ -408,13 +461,16 @@ function parseDbArgs(args) {
|
|
|
408
461
|
name: { type: "string" },
|
|
409
462
|
region: { type: "string" },
|
|
410
463
|
"local-only": { type: "boolean" },
|
|
411
|
-
yes: { type: "boolean" }
|
|
464
|
+
yes: { type: "boolean" },
|
|
465
|
+
bookmark: { type: "string" },
|
|
466
|
+
timestamp: { type: "string" },
|
|
467
|
+
platform: { type: "string" }
|
|
412
468
|
},
|
|
413
469
|
allowPositionals: true,
|
|
414
470
|
strict: true
|
|
415
471
|
});
|
|
416
472
|
const [action, ...rest] = positionals;
|
|
417
|
-
if (!isDbAction(action)) throw new Error("db: Usage: void db <push|generate|status|reset|seed|execute|migrate|studio|export|connect|set-url|rename-migrations>.");
|
|
473
|
+
if (!isDbAction(action)) throw new Error("db: Usage: void db <push|generate|status|reset|seed|execute|migrate|studio|export|connect|set-url|restore|rename-migrations>.");
|
|
418
474
|
if (action === "export" && values.remote) throw new Error("db: `void db export` reads only the local database; --remote is not supported.");
|
|
419
475
|
const unsupported = Object.keys(values).find((flag) => !ACTION_FLAGS[action].includes(flag));
|
|
420
476
|
if (unsupported) throw new Error(`db: \`void db ${action}\` does not support --${unsupported}.`);
|
|
@@ -458,6 +514,32 @@ function parseDbArgs(args) {
|
|
|
458
514
|
localOnly: values["local-only"]
|
|
459
515
|
};
|
|
460
516
|
}
|
|
517
|
+
case "restore": {
|
|
518
|
+
if (values.platform !== void 0 && values.platform !== "cloudflare") throw new Error("db: `void db restore --platform` accepts only 'cloudflare'.");
|
|
519
|
+
const platform = values.platform;
|
|
520
|
+
const bookmark = values.bookmark?.trim();
|
|
521
|
+
const timestamp = values.timestamp?.trim();
|
|
522
|
+
if (bookmark && !timestamp) {
|
|
523
|
+
if (!isD1Bookmark(bookmark)) throw new Error("db: --bookmark must be a D1 restore point printed by `void deploy`, for example 00000085-0000024c-00004ef2.");
|
|
524
|
+
return {
|
|
525
|
+
action,
|
|
526
|
+
target: { bookmark },
|
|
527
|
+
platform,
|
|
528
|
+
yes: values.yes
|
|
529
|
+
};
|
|
530
|
+
}
|
|
531
|
+
if (timestamp && !bookmark) {
|
|
532
|
+
const time = parseRestoreTime(timestamp);
|
|
533
|
+
if (!time) throw new Error("db: --timestamp must be a valid ISO 8601 time with Z or an offset and at most millisecond precision, for example 2026-10-16T09:30:00Z.");
|
|
534
|
+
return {
|
|
535
|
+
action,
|
|
536
|
+
target: { timestamp: time },
|
|
537
|
+
platform,
|
|
538
|
+
yes: values.yes
|
|
539
|
+
};
|
|
540
|
+
}
|
|
541
|
+
throw new Error("db: Usage: void db restore --bookmark <bookmark> or void db restore --timestamp <iso-time>.");
|
|
542
|
+
}
|
|
461
543
|
case "export": return {
|
|
462
544
|
action,
|
|
463
545
|
output: values.output,
|
|
@@ -1139,7 +1221,12 @@ const projectSubcommands = [
|
|
|
1139
1221
|
{
|
|
1140
1222
|
name: "rollback",
|
|
1141
1223
|
arg: "[deployId]",
|
|
1142
|
-
description: "Roll back to a previous deployment"
|
|
1224
|
+
description: "Roll back to a previous deployment",
|
|
1225
|
+
flags: [{
|
|
1226
|
+
name: "--platform",
|
|
1227
|
+
arg: "cloudflare",
|
|
1228
|
+
description: "Roll back after a one-off deploy with --platform cloudflare"
|
|
1229
|
+
}]
|
|
1143
1230
|
},
|
|
1144
1231
|
{
|
|
1145
1232
|
name: "cancel",
|
|
@@ -1266,7 +1353,24 @@ function parseProjectArgs(args) {
|
|
|
1266
1353
|
range
|
|
1267
1354
|
};
|
|
1268
1355
|
}
|
|
1269
|
-
if (subcommand === "rollback"
|
|
1356
|
+
if (subcommand === "rollback") {
|
|
1357
|
+
let platform;
|
|
1358
|
+
const positional = [];
|
|
1359
|
+
for (let i = 0; i < rest.length; i++) {
|
|
1360
|
+
const arg = rest[i];
|
|
1361
|
+
if (arg === "--platform" || arg.startsWith("--platform=")) {
|
|
1362
|
+
const value = arg === "--platform" ? rest[++i] : arg.slice(11);
|
|
1363
|
+
if (value !== "cloudflare") throw new Error(`project: \`rollback --platform\` accepts only 'cloudflare', got '${value ?? ""}'.`);
|
|
1364
|
+
platform = "cloudflare";
|
|
1365
|
+
} else positional.push(arg);
|
|
1366
|
+
}
|
|
1367
|
+
return {
|
|
1368
|
+
subcommand,
|
|
1369
|
+
deployId: parseOptionalPositional(positional),
|
|
1370
|
+
...platform ? { platform } : {}
|
|
1371
|
+
};
|
|
1372
|
+
}
|
|
1373
|
+
if (subcommand === "cancel") return {
|
|
1270
1374
|
subcommand,
|
|
1271
1375
|
deployId: parseOptionalPositional(rest)
|
|
1272
1376
|
};
|
|
@@ -1500,7 +1604,7 @@ async function runSubcommandGroup(command, subcommands, parse, run) {
|
|
|
1500
1604
|
const hasNamedSubcommand = args.slice(1).some((arg) => subcommands.some(({ name }) => name === arg));
|
|
1501
1605
|
try {
|
|
1502
1606
|
if ((!sub || sub.startsWith("-") && !hasNamedSubcommand) && process.stdin.isTTY) {
|
|
1503
|
-
const { promptSubcommand } = await import("../subcommand-prompt-
|
|
1607
|
+
const { promptSubcommand } = await import("../subcommand-prompt-CNZc4XUd.mjs");
|
|
1504
1608
|
if (command === "platform" && !sub) log.info(`A Void platform lets a team deploy Void apps to a shared Cloudflare account.
|
|
1505
1609
|
This command sets up and manages platforms. Join with \`void connect <url>\`.
|
|
1506
1610
|
Docs: ${formatUrl("https://void.cloud/guide/self-hosted-platform")}`);
|
|
@@ -1528,19 +1632,19 @@ const args = process.argv.slice(2);
|
|
|
1528
1632
|
const command = args[0];
|
|
1529
1633
|
const helpPath = getHelpPath(args);
|
|
1530
1634
|
const subcommandGroups = {
|
|
1531
|
-
auth: () => runSubcommandGroup("auth", authSubcommands, parseAuthArgs, (root, parsed) => import("../auth-router-
|
|
1532
|
-
account: () => runSubcommandGroup("account", accountSubcommands, parseAccountArgs, (root, parsed) => import("../account-cmd-
|
|
1533
|
-
platform: () => runSubcommandGroup("platform", platformSubcommands, parsePlatformArgs, (root, parsed) => import("../platform-cmd-
|
|
1534
|
-
cloudflare: () => runSubcommandGroup("cloudflare", cloudflareSubcommands, parseCloudflareArgs, (root, parsed) => import("../cloudflare-cmd-
|
|
1535
|
-
project: () => runSubcommandGroup("project", projectSubcommands, parseProjectArgs, (root, parsed) => import("../project-cmd-
|
|
1536
|
-
secret: () => runSubcommandGroup("secret", secretSubcommands, parseSecretArgs, (root, parsed) => import("../secret-
|
|
1537
|
-
domain: () => runSubcommandGroup("domain", domainSubcommands, parseDomainArgs, (root, parsed) => import("../domain-
|
|
1538
|
-
email: () => runSubcommandGroup("email", emailSubcommands, parseEmailArgs, (root, parsed) => import("../email-
|
|
1539
|
-
db: () => runSubcommandGroup("db", dbSubcommands, parseDbArgs, (root, parsed) => import("../db-
|
|
1540
|
-
env: () => runSubcommandGroup("env", envSubcommands, parseEnvArgs, (root, parsed) => import("../env-
|
|
1541
|
-
gen: () => runSubcommandGroup("gen", genSubcommands, parseGenArgs, (root, parsed) => import("../gen-
|
|
1542
|
-
github: () => runSubcommandGroup("github", githubSubcommands, parseGithubArgs, (root, parsed) => import("../github-cmd-
|
|
1543
|
-
build: () => runSubcommandGroup("build", buildSubcommands, parseBuildArgs, (root, parsed) => import("../build-cmd-
|
|
1635
|
+
auth: () => runSubcommandGroup("auth", authSubcommands, parseAuthArgs, (root, parsed) => import("../auth-router-CNsMOFCa.mjs").then(({ runAuthRouter }) => runAuthRouter(root, parsed))),
|
|
1636
|
+
account: () => runSubcommandGroup("account", accountSubcommands, parseAccountArgs, (root, parsed) => import("../account-cmd-Cj6sCMTk.mjs").then(({ runAccountCommand }) => runAccountCommand(root, parsed))),
|
|
1637
|
+
platform: () => runSubcommandGroup("platform", platformSubcommands, parsePlatformArgs, (root, parsed) => import("../platform-cmd-B2ec5eFg.mjs").then(({ runPlatformCommand }) => runPlatformCommand(root, parsed))),
|
|
1638
|
+
cloudflare: () => runSubcommandGroup("cloudflare", cloudflareSubcommands, parseCloudflareArgs, (root, parsed) => import("../cloudflare-cmd-D_2-Q-_i.mjs").then(({ runCloudflareCommand }) => runCloudflareCommand(root, parsed))),
|
|
1639
|
+
project: () => runSubcommandGroup("project", projectSubcommands, parseProjectArgs, (root, parsed) => import("../project-cmd-8ylYGx-O.mjs").then(({ runProjectCommand }) => runProjectCommand(root, parsed))),
|
|
1640
|
+
secret: () => runSubcommandGroup("secret", secretSubcommands, parseSecretArgs, (root, parsed) => import("../secret-wr6Sn4Xa.mjs").then(({ runSecretCommand }) => runSecretCommand(root, parsed))),
|
|
1641
|
+
domain: () => runSubcommandGroup("domain", domainSubcommands, parseDomainArgs, (root, parsed) => import("../domain-BAdwm-QS.mjs").then(({ runDomainCommand }) => runDomainCommand(root, parsed))),
|
|
1642
|
+
email: () => runSubcommandGroup("email", emailSubcommands, parseEmailArgs, (root, parsed) => import("../email-MwjA7kaL.mjs").then(({ runEmailCommand }) => runEmailCommand(root, parsed))),
|
|
1643
|
+
db: () => runSubcommandGroup("db", dbSubcommands, parseDbArgs, (root, parsed) => import("../db-BsiOAa0A.mjs").then(({ runDbCommand }) => runDbCommand(root, parsed))),
|
|
1644
|
+
env: () => runSubcommandGroup("env", envSubcommands, parseEnvArgs, (root, parsed) => import("../env-B163-G1s.mjs").then(({ runEnvCommand }) => runEnvCommand(root, parsed))),
|
|
1645
|
+
gen: () => runSubcommandGroup("gen", genSubcommands, parseGenArgs, (root, parsed) => import("../gen-Cf-RBVg4.mjs").then(({ runGenCommand }) => runGenCommand(root, parsed))),
|
|
1646
|
+
github: () => runSubcommandGroup("github", githubSubcommands, parseGithubArgs, (root, parsed) => import("../github-cmd-C8QsnJQs.mjs").then(({ runGithubCommand }) => runGithubCommand(root, parsed))),
|
|
1647
|
+
build: () => runSubcommandGroup("build", buildSubcommands, parseBuildArgs, (root, parsed) => import("../build-cmd-ByhegwRC.mjs").then(({ runBuildCommand }) => runBuildCommand(root, parsed)))
|
|
1544
1648
|
};
|
|
1545
1649
|
if (helpPath) {
|
|
1546
1650
|
if (helpPath.length === 0) printGlobalHelp();
|
|
@@ -1559,7 +1663,7 @@ if (helpPath) {
|
|
|
1559
1663
|
log.error(formatCloudflareUserMessage(err instanceof Error ? err.message : String(err)));
|
|
1560
1664
|
process.exit(1);
|
|
1561
1665
|
}
|
|
1562
|
-
import("../deploy-
|
|
1666
|
+
import("../deploy-Dc0XsCQj.mjs").then(({ runDeploy }) => {
|
|
1563
1667
|
runDeploy(root, deployArgs).catch((err) => {
|
|
1564
1668
|
log.error(formatCloudflareUserMessage(err.message ?? String(err)));
|
|
1565
1669
|
process.exit(1);
|
|
@@ -1567,7 +1671,7 @@ if (helpPath) {
|
|
|
1567
1671
|
});
|
|
1568
1672
|
} else if (command === "connect") (async () => {
|
|
1569
1673
|
const parsed = parseConnectArgs(args.slice(1));
|
|
1570
|
-
const { runConnectCommand } = await import("../connect-
|
|
1674
|
+
const { runConnectCommand } = await import("../connect-C4_m2moF.mjs");
|
|
1571
1675
|
await runConnectCommand(process.cwd(), parsed);
|
|
1572
1676
|
})().catch((err) => {
|
|
1573
1677
|
log.error(formatCloudflareUserMessage(err instanceof Error ? err.message : String(err)));
|
|
@@ -1595,7 +1699,7 @@ else if (command === "prepare") {
|
|
|
1595
1699
|
log.error(formatCloudflareUserMessage(err instanceof Error ? err.message : String(err)));
|
|
1596
1700
|
process.exit(1);
|
|
1597
1701
|
}
|
|
1598
|
-
import("../prepare-
|
|
1702
|
+
import("../prepare-HKo7Rh5V.mjs").then(({ runPrepareCommand }) => {
|
|
1599
1703
|
runPrepareCommand(root).catch((err) => {
|
|
1600
1704
|
log.error(formatCloudflareUserMessage(err.message ?? String(err)));
|
|
1601
1705
|
process.exit(1);
|
|
@@ -1603,7 +1707,7 @@ else if (command === "prepare") {
|
|
|
1603
1707
|
});
|
|
1604
1708
|
} else if (command === "init") {
|
|
1605
1709
|
const root = process.cwd();
|
|
1606
|
-
import("../init-
|
|
1710
|
+
import("../init-DGFQMnbk.mjs").then(({ runInitCommand, parseInitArgs }) => {
|
|
1607
1711
|
let initArgs;
|
|
1608
1712
|
try {
|
|
1609
1713
|
initArgs = parseInitArgs(args.slice(1));
|
|
@@ -1621,7 +1725,7 @@ else if (command === "prepare") {
|
|
|
1621
1725
|
log.error("migrate: This command takes no arguments.");
|
|
1622
1726
|
process.exit(1);
|
|
1623
1727
|
}
|
|
1624
|
-
import("../migrate-
|
|
1728
|
+
import("../migrate-Di-4EuoE.mjs").then(({ runMigrateCommand }) => {
|
|
1625
1729
|
runMigrateCommand(process.cwd()).catch((err) => {
|
|
1626
1730
|
log.error(formatCloudflareUserMessage(err instanceof Error ? err.message : String(err)));
|
|
1627
1731
|
process.exit(1);
|
|
@@ -1735,7 +1839,7 @@ else if (command) {
|
|
|
1735
1839
|
];
|
|
1736
1840
|
(async () => {
|
|
1737
1841
|
printVoidHeader();
|
|
1738
|
-
const { promptSubcommand } = await import("../subcommand-prompt-
|
|
1842
|
+
const { promptSubcommand } = await import("../subcommand-prompt-CNZc4XUd.mjs");
|
|
1739
1843
|
const result = await promptSubcommand("", topLevelCommands);
|
|
1740
1844
|
if (!result) process.exit(0);
|
|
1741
1845
|
const cmd = result.subcommand;
|
|
@@ -1743,22 +1847,22 @@ else if (command) {
|
|
|
1743
1847
|
if (Object.hasOwn(subcommandGroups, cmd)) return subcommandGroups[cmd]();
|
|
1744
1848
|
switch (cmd) {
|
|
1745
1849
|
case "connect": {
|
|
1746
|
-
const { runConnectCommand } = await import("../connect-
|
|
1850
|
+
const { runConnectCommand } = await import("../connect-C4_m2moF.mjs");
|
|
1747
1851
|
await runConnectCommand(root, parseConnectArgs([]));
|
|
1748
1852
|
return;
|
|
1749
1853
|
}
|
|
1750
1854
|
case "init": {
|
|
1751
|
-
const { runInitCommand, parseInitArgs } = await import("../init-
|
|
1855
|
+
const { runInitCommand, parseInitArgs } = await import("../init-DGFQMnbk.mjs");
|
|
1752
1856
|
await runInitCommand(root, parseInitArgs([]));
|
|
1753
1857
|
return;
|
|
1754
1858
|
}
|
|
1755
1859
|
case "migrate": {
|
|
1756
|
-
const { runMigrateCommand } = await import("../migrate-
|
|
1860
|
+
const { runMigrateCommand } = await import("../migrate-Di-4EuoE.mjs");
|
|
1757
1861
|
await runMigrateCommand(root);
|
|
1758
1862
|
return;
|
|
1759
1863
|
}
|
|
1760
1864
|
case "deploy": {
|
|
1761
|
-
const { runDeploy } = await import("../deploy-
|
|
1865
|
+
const { runDeploy } = await import("../deploy-Dc0XsCQj.mjs");
|
|
1762
1866
|
await runDeploy(root);
|
|
1763
1867
|
return;
|
|
1764
1868
|
}
|
|
@@ -1768,7 +1872,7 @@ else if (command) {
|
|
|
1768
1872
|
return;
|
|
1769
1873
|
}
|
|
1770
1874
|
case "prepare": {
|
|
1771
|
-
const { runPrepareCommand } = await import("../prepare-
|
|
1875
|
+
const { runPrepareCommand } = await import("../prepare-HKo7Rh5V.mjs");
|
|
1772
1876
|
await runPrepareCommand(root);
|
|
1773
1877
|
return;
|
|
1774
1878
|
}
|