void 0.24.0 → 0.26.0
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/README.md +19 -106
- package/dist/{account-cmd-vJhh5lrb.mjs → account-cmd-CDry3B5V.mjs} +5 -5
- package/dist/{application-analysis-BVsVqc11.mjs → application-analysis-DC2yPvzY.mjs} +1 -1
- package/dist/{application-routing-B7QEjqSR.mjs → application-routing-C9khgLiS.mjs} +1 -1
- package/dist/{auth-DX3JURcX.mjs → auth-B60QDbjg.mjs} +1 -1
- package/dist/{auth-CQkSDS50.mjs → auth-D52yG7hl.mjs} +3 -3
- package/dist/{auth-link-D75t9wO2.mjs → auth-link-DjeOptYi.mjs} +5 -6
- package/dist/{auth-router-ClfhL1J7.mjs → auth-router-BRxIuqDi.mjs} +7 -7
- package/dist/{build-cmd-zMi1iFnS.mjs → build-cmd-Ce3C8huo.mjs} +6 -7
- package/dist/{cache-ZtQmyxVV.mjs → cache-CS8Yxr5a.mjs} +6 -7
- package/dist/{cancel-deploy-Box0kkEV.mjs → cancel-deploy-mZsD88Xa.mjs} +4 -6
- package/dist/{cf-access-BGe5sWXF.mjs → cf-access-YTlqvAsk.mjs} +1 -1
- package/dist/cf-build-output-ChY6-XWP.mjs +2 -0
- package/dist/cli/cli.mjs +45 -45
- package/dist/cli/cloudflare-operation-process.mjs +3 -3
- package/dist/cli/env-schema-probe.d.mts +1 -1
- package/dist/cli/env-schema-probe.mjs +2 -2
- package/dist/client-BxVixJBI.mjs +2 -0
- package/dist/{client-DKAsFA4X.mjs → client-mC-dFGDD.mjs} +103 -25
- package/dist/{cloudflare-cmd-CmY8dGkd.mjs → cloudflare-cmd-bhwCxAN6.mjs} +2 -2
- package/dist/{cloudflare-connect-IiR3ZieC.mjs → cloudflare-connect-CuhRgk3k.mjs} +2 -2
- package/dist/{cloudflare-operations-DzH-A966.mjs → cloudflare-operations-DYa3coIk.mjs} +2 -2
- package/dist/{cloudflare-operations-BCdXSsmo.mjs → cloudflare-operations-DoQrVHAt.mjs} +1 -1
- package/dist/{connect-B-usTnlF.mjs → connect-H6EvP62X.mjs} +12 -9
- package/dist/{create-project-CYOOAYcn.mjs → create-project-B2kk9Q0o.mjs} +6 -6
- package/dist/{create-project-FWbf5Olo.mjs → create-project-Dbb4uiN-.mjs} +1 -1
- package/dist/{db-Ck2eZ2iB.mjs → db-DpCKZto0.mjs} +35 -38
- package/dist/{delete-sK56qtzZ.mjs → delete-CxlSvsvW.mjs} +6 -7
- package/dist/{deploy-gCVaiJbS.mjs → deploy-CeEbnv4b.mjs} +9249 -8925
- package/dist/deploy-qmiLE1G1.mjs +2 -0
- package/dist/{dev-inbox-P0u4tM8Y.mjs → dev-inbox-D64ZKUod.mjs} +5 -6
- package/dist/{domain-DFfQE8jg.mjs → domain-B_9VgOm6.mjs} +8 -8
- package/dist/{email-CdnhUHvJ.mjs → email-BokHgjKj.mjs} +7 -7
- package/dist/{env-DmGdHi5i.mjs → env-BdTc-K2L.mjs} +7 -8
- package/dist/{env-public-BX_r8HR6.d.mts → env-public-DR7ZM6d-.d.mts} +1 -1
- package/dist/{env-validation-zZOCcQVZ.mjs → env-validation-cZBvGWaP.mjs} +1 -1
- package/dist/{fetch-stream-IvCYKyQL.mjs → fetch-stream-Nm3hkZbT.mjs} +8 -1
- package/dist/{gen-CshAkukR.mjs → gen-BhDlTpwW.mjs} +2 -4
- package/dist/gen-qCBwH3fZ.mjs +2 -0
- package/dist/{github-cmd-DftuEvIt.mjs → github-cmd-hhkTzlGS.mjs} +7 -16
- package/dist/{handler-CZ4nAylQ.d.mts → handler-BeK3weD4.d.mts} +1 -1
- package/dist/{help-Dotbf6iz.mjs → help-Bv44e2tm.mjs} +13 -9
- package/dist/help-Dw5f9Xrg.mjs +2 -0
- package/dist/index.d.mts +19 -15
- package/dist/index.mjs +2225 -2142
- package/dist/{info-B97bTX9N.mjs → info-DhtTKh65.mjs} +2 -4
- package/dist/{init-BTQEZZGJ.mjs → init-BMf4T03q.mjs} +17 -18
- package/dist/{limits-Bq5LG8Id.d.mts → limits-CFsDKQvU.d.mts} +1 -10
- package/dist/{limits-Cjuk2VPm.mjs → limits-D0vD1M9A.mjs} +1 -22
- package/dist/{link-B46sYH0K.mjs → link-BqYsSS_I.mjs} +6 -7
- package/dist/{list-BnPrIsU_.mjs → list-_kBToO-l.mjs} +10 -10
- package/dist/{live-Chw1eIMv.d.mts → live-iAuEH1hd.d.mts} +1 -1
- package/dist/{local-d1-2CMnpuW_.mjs → local-d1-fGxYrVD6.mjs} +2 -2
- package/dist/login-D7meQg_3.mjs +2 -0
- package/dist/{login-BuiMyUrx.mjs → login-DFuo-RWO.mjs} +9 -7
- package/dist/{logs-CZG9d-ic.mjs → logs-DYgnh6dH.mjs} +7 -8
- package/dist/migrate-CEu2X5DB.mjs +2 -0
- package/dist/{migrate-q4_njtaW.mjs → migrate-CV1on-yJ.mjs} +2 -4
- package/dist/{node-BkyRWRx8.mjs → node-C6Q6e1Es.mjs} +1 -1
- package/dist/{operator-args-B3BTmSoi.mjs → operator-args-DdY54Bgb.mjs} +1 -1
- package/dist/{operator-auth-7erYc6Lt.mjs → operator-auth-2dsGlTT5.mjs} +4 -8
- package/dist/{operator-client-CpHjTd0t.mjs → operator-client-BFqpp6z0.mjs} +3 -3
- package/dist/{operator-cmd-DGqPJUD3.mjs → operator-cmd-CUGHXrQf.mjs} +27 -9
- package/dist/operator-cmd-DRPvhpjM.mjs +2 -0
- package/dist/{output-CbM85T4k.mjs → output-BvdaehtE.mjs} +28 -4
- package/dist/pages/client.d.mts +4 -1
- package/dist/pages/client.mjs +120 -29
- package/dist/pages/index.mjs +1 -1
- package/dist/pages/islands-plugin.mjs +1 -1
- package/dist/pages/protocol.d.mts +2 -2
- package/dist/{plan-NPpwZ_kc.mjs → plan-CJGEeTEI.mjs} +2 -2
- package/dist/plan-COtUvdMA.mjs +2 -0
- package/dist/{platform-args-3k8X9-H_.mjs → platform-args-DSV2p4nY.mjs} +4 -2
- package/dist/platform-args-Dcy_5b_Y.mjs +2 -0
- package/dist/{platform-auth-config-DDrxUy4m.mjs → platform-auth-config-Bosx7U1h.mjs} +20 -19
- package/dist/{platform-auth-protection-BLadnnct.mjs → platform-auth-protection-DcbL_LW_.mjs} +8 -8
- package/dist/{platform-auth-recovery-CmCzX2Fl.mjs → platform-auth-recovery-WfTZ8K6o.mjs} +7 -7
- package/dist/{platform-cmd-DMDEc9uS.mjs → platform-cmd-DbKtQb_4.mjs} +73 -38
- package/dist/{platform-cmd-pMTRhvYs.mjs → platform-cmd-dyFUof0t.mjs} +1 -1
- package/dist/platform-discovery-BC0HCKYt.mjs +41 -0
- package/dist/{platform-domain-Di6EYrQl.mjs → platform-domain-Bsq43AJp.mjs} +5 -4
- package/dist/{platform-lifecycle-BFdSi9Qt.mjs → platform-lifecycle--5gWmDoI.mjs} +1 -1
- package/dist/{platform-lifecycle-BBoNzojY.mjs → platform-lifecycle-Cfi0o6xM.mjs} +4605 -3527
- package/dist/platform-management-Bbwf6-Dq.mjs +2 -0
- package/dist/{platform-management-CWOQOWXm.mjs → platform-management-BrF9STZp.mjs} +211 -31
- package/dist/{platform-plans-config-Vl9BP3H4.mjs → platform-plans-config-DU-8nC2Y.mjs} +3 -3
- package/dist/{platform-recovery-BJnQJEtQ.mjs → platform-recovery-DQAqAQYu.mjs} +3 -3
- package/dist/{platform-registry-DkPPXfp_.mjs → platform-registry-P387v42A.mjs} +18 -11
- package/dist/prepare-BBknoZI1.mjs +2 -0
- package/dist/{prepare-CBLT3CHH.mjs → prepare-BMrRWLwP.mjs} +3 -4
- package/dist/{prepare-DnaKBi--.mjs → prepare-WoUubFKL.mjs} +1 -1
- package/dist/{project-DsblYifa.mjs → project-BiaPQ7ur.mjs} +1 -1
- package/dist/{project-DKG5Ra8p.mjs → project-DQstYTxO.mjs} +1 -1
- package/dist/{project-cmd-DxnXstAq.mjs → project-cmd-BbH2LptN.mjs} +21 -22
- package/dist/{project-team-BmHcaALJ.mjs → project-team-Yiww3-go.mjs} +8 -9
- package/dist/{project-token-GionZlBI.mjs → project-token-BrtT2NkY.mjs} +6 -9
- package/dist/{project-zero-trust-JLCjVQA7.mjs → project-zero-trust-nYJ2V2nc.mjs} +5 -6
- package/dist/{prompts-BNUoTiaf.mjs → prompts-6OSVA7DJ.mjs} +58 -15
- package/dist/{prompts-2TGE6oXx.mjs → prompts-ZAuJlyCj.mjs} +1 -1
- package/dist/{protocol-CjF_iI9X.d.mts → protocol-BX8t2jiw.d.mts} +1 -1
- package/dist/{provision-CVku1JFU.mjs → provision-DMTPG8Rh.mjs} +1 -1
- package/dist/{provision-CaoxO_U7.mjs → provision-VeqAC77A.mjs} +18 -8
- package/dist/{requests-BOjIVAeF.mjs → requests-TIz_jtSu.mjs} +5 -6
- package/dist/{rollback-CwR3pLj3.mjs → rollback-dBqICPzj.mjs} +9 -10
- package/dist/{runner-Ol0TNjk6.mjs → runner--2KF6Kua.mjs} +1 -1
- package/dist/{runner-CXA9Fh8h.mjs → runner-voIltZrY.mjs} +1 -1
- package/dist/runtime/ai.d.mts +10 -11
- package/dist/runtime/ai.mjs +13 -18
- package/dist/runtime/client-react.mjs +1 -1
- package/dist/runtime/client-solid.mjs +1 -1
- package/dist/runtime/client-svelte.mjs +1 -1
- package/dist/runtime/client-vue.mjs +1 -1
- package/dist/runtime/client.mjs +1 -1
- package/dist/runtime/email/testing.mjs +1 -1
- package/dist/runtime/email.mjs +35 -17
- package/dist/runtime/env-public.d.mts +1 -1
- package/dist/runtime/fetch-stream.mjs +1 -1
- package/dist/runtime/handler.d.mts +1 -1
- package/dist/runtime/limits.d.mts +2 -2
- package/dist/runtime/limits.mjs +2 -2
- package/dist/runtime/live-client.d.mts +1 -1
- package/dist/runtime/live.d.mts +1 -1
- package/dist/runtime/migration-handler.mjs +33 -7
- package/dist/runtime/routing.d.mts +1 -1
- package/dist/runtime/routing.mjs +1 -1
- package/dist/runtime/sandbox.d.mts +1 -1
- package/dist/runtime/sandbox.mjs +12 -22
- 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/{sandbox-XZAqzFlG.d.mts → sandbox-C5LFoJMf.d.mts} +7 -7
- package/dist/{scan-C7okrLyM.mjs → scan-C8dA7iM4.mjs} +10 -6
- package/dist/{secret-ByWJWBUG.mjs → secret-AKnNXNP5.mjs} +15 -16
- package/dist/{skills-C1PlclPt.mjs → skills-BPQUGClu.mjs} +1 -1
- package/dist/{subcommand-prompt-klFCfcor.mjs → subcommand-prompt-B6WS9Aoz.mjs} +2 -2
- package/dist/sveltekit.d.mts +1 -1
- package/dist/sveltekit.mjs +4 -9
- package/dist/validate-pna7R3Pv.mjs +2 -0
- package/dist/{validate-ctOrgiS3.mjs → validate-ymhap6M_.mjs} +1 -1
- package/dist/{wrangler-7K-bW_DL.mjs → wrangler-DhUerFkW.mjs} +10 -15
- package/dist/{ws-CL1w7GXU.d.mts → ws-C79j4aED.d.mts} +1 -1
- package/package.json +21 -21
- package/sandbox.Dockerfile +1 -1
- package/skills/void/SKILL.md +5 -2
- package/skills/void/docs/guide/ai.md +78 -137
- package/skills/void/docs/guide/app-types.md +1 -1
- package/skills/void/docs/guide/auth.md +0 -2
- package/skills/void/docs/guide/database/d1.md +7 -7
- package/skills/void/docs/guide/database.md +15 -0
- package/skills/void/docs/guide/deployment.md +58 -124
- package/skills/void/docs/guide/env-vars.md +1 -5
- package/skills/void/docs/guide/index.md +19 -18
- package/skills/void/docs/guide/kv.md +0 -2
- package/skills/void/docs/guide/live.md +2 -0
- package/skills/void/docs/guide/pages-routing/actions-and-forms.md +49 -47
- package/skills/void/docs/guide/pages-routing/overview.md +2 -2
- package/skills/void/docs/guide/platform/administration/email.md +0 -2
- package/skills/void/docs/guide/platform/administration/operations.md +11 -22
- package/skills/void/docs/guide/platform/administration/plans.md +1 -5
- package/skills/void/docs/guide/platform/administration/zero-trust.md +1 -4
- package/skills/void/docs/guide/platform/development/schema-ci.md +7 -1
- package/skills/void/docs/guide/platform/installation/credentials.md +2 -2
- package/skills/void/docs/guide/platform/installation/first-deployment.md +5 -1
- package/skills/void/docs/guide/platform/installation/maintenance.md +33 -11
- package/skills/void/docs/guide/platform/installation/prerequisites.md +79 -7
- package/skills/void/docs/guide/platform/installation/setup.md +1 -1
- package/skills/void/docs/guide/platform/installation/uninstall.md +44 -11
- package/skills/void/docs/guide/quickstart.md +37 -80
- package/skills/void/docs/guide/sandboxes.md +75 -66
- package/skills/void/docs/guide/self-hosted-platform.md +20 -0
- package/skills/void/docs/guide/websockets.md +0 -2
- package/skills/void/docs/integrations/frameworks/overview.md +2 -2
- package/skills/void/docs/integrations/frameworks/sveltekit.md +40 -25
- package/skills/void/docs/integrations/nodejs-bun-deno.md +7 -2
- package/skills/void/docs/reference/api/resources.md +38 -14
- package/skills/void/docs/reference/api.md +35 -34
- package/skills/void/docs/reference/cli/auth.md +3 -1
- package/skills/void/docs/reference/cli/deploy.md +1 -1
- package/skills/void/docs/reference/cli/platform-config.md +2 -2
- package/skills/void/docs/reference/cli/platform-installation.md +14 -12
- package/skills/void/docs/reference/cli/platform-operations.md +4 -8
- package/skills/void/docs/reference/cli/platform.md +9 -2
- package/skills/void/docs/reference/cli.md +1 -1
- package/skills/void/docs/reference/resource-inference.md +12 -8
- package/dist/cf-build-output-_0HNWysu.mjs +0 -2
- package/dist/client-B9UBI03V.mjs +0 -2
- package/dist/deploy-irP5q0-x.mjs +0 -2
- package/dist/gen-DvQTWzDU.mjs +0 -2
- package/dist/help-mabuIV98.mjs +0 -2
- package/dist/login-DIy9Sb-U.mjs +0 -2
- package/dist/migrate-BCiJ8w0f.mjs +0 -2
- package/dist/plan-D1Q5rf-r.mjs +0 -2
- package/dist/platform-args-DdnM6WIf.mjs +0 -2
- package/dist/platform-management-DG47jys8.mjs +0 -2
- package/dist/prepare-CnjcTV2s.mjs +0 -2
- package/dist/validate-Dq_L3s0S.mjs +0 -2
- package/skills/void/docs/guide/env-migration.md +0 -109
- package/dist/{cf-build-output-BPqOT964.mjs → cf-build-output-U8o1Gl6X.mjs} +1 -1
- package/dist/{env-validation-C_8tPdhs.mjs → env-validation-vBSQ8gw5.mjs} +1 -1
|
@@ -1,12 +1,11 @@
|
|
|
1
|
-
import { n as readDeploymentPlatform } from "./project-
|
|
2
|
-
import { c as getToken, s as getSiteDomain } from "./auth-
|
|
3
|
-
import { H as outro, L as log
|
|
4
|
-
import {
|
|
5
|
-
import {
|
|
1
|
+
import { n as readDeploymentPlatform } from "./project-DQstYTxO.mjs";
|
|
2
|
+
import { c as getToken, s as getSiteDomain } from "./auth-D52yG7hl.mjs";
|
|
3
|
+
import { H as outro, L as log } from "./prompts-6OSVA7DJ.mjs";
|
|
4
|
+
import { r as PlatformClient } from "./client-mC-dFGDD.mjs";
|
|
5
|
+
import { c as import_picocolors, f as tablePrefix, i as dim, o as formatCount } from "./output-BvdaehtE.mjs";
|
|
6
6
|
//#region src/cli/projects.ts
|
|
7
7
|
async function runProjectsCommand(root) {
|
|
8
8
|
console.log();
|
|
9
|
-
intro(cliTitle("project list"));
|
|
10
9
|
const token = getToken(root);
|
|
11
10
|
if (!token) {
|
|
12
11
|
log.error("Not logged in. Run `void account login` first.");
|
|
@@ -19,7 +18,7 @@ async function runProjectsCommand(root) {
|
|
|
19
18
|
}
|
|
20
19
|
const rows = projects.map((p) => ({
|
|
21
20
|
slug: p.slug,
|
|
22
|
-
role: p.role
|
|
21
|
+
role: p.role,
|
|
23
22
|
appType: p.type ?? "worker",
|
|
24
23
|
url: p.custom_domain ? `https://${p.custom_domain}` : p.url ?? `https://${p.slug}.${getSiteDomain(root)}`
|
|
25
24
|
}));
|
|
@@ -32,84 +31,84 @@ async function runProjectsCommand(root) {
|
|
|
32
31
|
console.log(prefix);
|
|
33
32
|
console.log(header);
|
|
34
33
|
for (const line of lines) console.log(line);
|
|
35
|
-
outro(
|
|
34
|
+
outro(formatCount(projects.length, "project"));
|
|
36
35
|
}
|
|
37
36
|
//#endregion
|
|
38
37
|
//#region src/cli/project-cmd.ts
|
|
39
38
|
async function runProjectCommand(root, args) {
|
|
40
39
|
const cloudflare = readDeploymentPlatform(root) === "cloudflare";
|
|
41
40
|
if (args.subcommand === "status") {
|
|
42
|
-
const { runListCommand } = await import("./list-
|
|
41
|
+
const { runListCommand } = await import("./list-_kBToO-l.mjs");
|
|
43
42
|
return runListCommand(root, args.name || void 0);
|
|
44
43
|
}
|
|
45
44
|
if (args.subcommand === "link") {
|
|
46
45
|
if (cloudflare) throw new Error("project: Direct Cloudflare apps are identified by cloudflare.name in void.config.ts and do not need linking.");
|
|
47
|
-
const { runLink } = await import("./link-
|
|
46
|
+
const { runLink } = await import("./link-BqYsSS_I.mjs");
|
|
48
47
|
return runLink(root, args.name || void 0);
|
|
49
48
|
}
|
|
50
49
|
if (args.subcommand === "list") {
|
|
51
50
|
if (cloudflare) {
|
|
52
|
-
const { runListCommand } = await import("./list-
|
|
51
|
+
const { runListCommand } = await import("./list-_kBToO-l.mjs");
|
|
53
52
|
return runListCommand(root);
|
|
54
53
|
}
|
|
55
54
|
return runProjectsCommand(root);
|
|
56
55
|
}
|
|
57
56
|
if (args.subcommand === "token") {
|
|
58
57
|
if (cloudflare) throw new Error("project: CI deploy credentials are available only for Void platform projects.");
|
|
59
|
-
const { runProjectTokenCommand } = await import("./project-token-
|
|
58
|
+
const { runProjectTokenCommand } = await import("./project-token-BrtT2NkY.mjs");
|
|
60
59
|
return runProjectTokenCommand(root, args);
|
|
61
60
|
}
|
|
62
61
|
if (args.subcommand === "team") {
|
|
63
62
|
if (args.action === "") {
|
|
64
|
-
const { printHelpPage } = await import("./help-
|
|
63
|
+
const { printHelpPage } = await import("./help-Dw5f9Xrg.mjs");
|
|
65
64
|
printHelpPage(["project", "team"]);
|
|
66
65
|
return;
|
|
67
66
|
}
|
|
68
67
|
const accountInvitationAction = args.action === "pending" || args.action === "accept" || args.action === "decline";
|
|
69
68
|
if (cloudflare && !accountInvitationAction) throw new Error("project: Teams are available only for projects hosted on a Void platform, not direct Cloudflare deployments.");
|
|
70
|
-
const { runProjectTeamCommand } = await import("./project-team-
|
|
69
|
+
const { runProjectTeamCommand } = await import("./project-team-Yiww3-go.mjs");
|
|
71
70
|
return runProjectTeamCommand(root, args);
|
|
72
71
|
}
|
|
73
72
|
if (args.subcommand === "zero-trust") {
|
|
74
73
|
if (cloudflare) throw new Error("project: Zero Trust overrides are available only for projects hosted on a Void platform.");
|
|
75
74
|
if (args.action === "") {
|
|
76
|
-
const { printHelpPage } = await import("./help-
|
|
75
|
+
const { printHelpPage } = await import("./help-Dw5f9Xrg.mjs");
|
|
77
76
|
printHelpPage(["project", "zero-trust"]);
|
|
78
77
|
return;
|
|
79
78
|
}
|
|
80
79
|
const action = args.action;
|
|
81
|
-
const { runProjectZeroTrustCommand } = await import("./project-zero-trust-
|
|
80
|
+
const { runProjectZeroTrustCommand } = await import("./project-zero-trust-nYJ2V2nc.mjs");
|
|
82
81
|
return runProjectZeroTrustCommand(root, {
|
|
83
82
|
...args,
|
|
84
83
|
action
|
|
85
84
|
});
|
|
86
85
|
}
|
|
87
86
|
if (args.subcommand === "logs") {
|
|
88
|
-
const { runLogsCommand } = await import("./logs-
|
|
87
|
+
const { runLogsCommand } = await import("./logs-DYgnh6dH.mjs");
|
|
89
88
|
return runLogsCommand(root, args.filter, args.range, args.deployment || void 0, args.level || void 0);
|
|
90
89
|
}
|
|
91
90
|
if (args.subcommand === "requests") {
|
|
92
91
|
if (cloudflare) throw new Error("project: Historical request analytics require the Void platform. Use `void project logs` for a live Cloudflare tail.");
|
|
93
|
-
const { runRequestsCommand } = await import("./requests-
|
|
92
|
+
const { runRequestsCommand } = await import("./requests-TIz_jtSu.mjs");
|
|
94
93
|
return runRequestsCommand(root, args.range, args.status || void 0);
|
|
95
94
|
}
|
|
96
95
|
if (args.subcommand === "rollback") {
|
|
97
|
-
const { runRollbackCommand } = await import("./rollback-
|
|
96
|
+
const { runRollbackCommand } = await import("./rollback-dBqICPzj.mjs");
|
|
98
97
|
return runRollbackCommand(root, args.deployId || void 0);
|
|
99
98
|
}
|
|
100
99
|
if (args.subcommand === "cancel") {
|
|
101
100
|
if (cloudflare) throw new Error("project: Direct Cloudflare deploys activate only after readiness succeeds, so there is no remote build to cancel.");
|
|
102
|
-
const { runCancelDeployCommand } = await import("./cancel-deploy-
|
|
101
|
+
const { runCancelDeployCommand } = await import("./cancel-deploy-mZsD88Xa.mjs");
|
|
103
102
|
return runCancelDeployCommand(root, args.deployId || void 0);
|
|
104
103
|
}
|
|
105
104
|
if (args.subcommand === "delete") {
|
|
106
105
|
if (cloudflare) throw new Error("project: Refusing to delete Cloudflare resources through this command. Direct deployments are additive and existing resources may be shared.");
|
|
107
|
-
const { runDeleteCommand } = await import("./delete-
|
|
106
|
+
const { runDeleteCommand } = await import("./delete-CxlSvsvW.mjs");
|
|
108
107
|
return runDeleteCommand(root, args.name || void 0, { force: args.force });
|
|
109
108
|
}
|
|
110
109
|
if (args.subcommand === "purge-cache") {
|
|
111
110
|
if (cloudflare) throw new Error("project: Direct Cloudflare ISR cache purge is not available yet; redeploy or purge the configured KV namespace explicitly.");
|
|
112
|
-
const { runPurgeCacheCommand } = await import("./cache-
|
|
111
|
+
const { runPurgeCacheCommand } = await import("./cache-CS8Yxr5a.mjs");
|
|
113
112
|
return runPurgeCacheCommand(root, args.projectSlug || void 0);
|
|
114
113
|
}
|
|
115
114
|
}
|
|
@@ -1,8 +1,8 @@
|
|
|
1
|
-
import { r as readProjectConfig } from "./project-
|
|
2
|
-
import { c as getToken, i as getAccountCredential } from "./auth-
|
|
3
|
-
import {
|
|
4
|
-
import {
|
|
5
|
-
import {
|
|
1
|
+
import { r as readProjectConfig } from "./project-DQstYTxO.mjs";
|
|
2
|
+
import { c as getToken, i as getAccountCredential } from "./auth-D52yG7hl.mjs";
|
|
3
|
+
import { H as outro, L as log } from "./prompts-6OSVA7DJ.mjs";
|
|
4
|
+
import { c as platformErrorMessage, n as PlatformApiError, r as PlatformClient, s as parsePlatformErrorBody } from "./client-mC-dFGDD.mjs";
|
|
5
|
+
import { l as note, o as formatCount } from "./output-BvdaehtE.mjs";
|
|
6
6
|
import { r as resolveProjectBySlug, t as getRequestedProjectSlug } from "./resolve-project-BG5ORGID.mjs";
|
|
7
7
|
//#region src/cli/project-team.ts
|
|
8
8
|
function clean(value) {
|
|
@@ -56,7 +56,6 @@ function invitationResponseError(error, apiUrl) {
|
|
|
56
56
|
}
|
|
57
57
|
async function runProjectTeamCommand(root, args) {
|
|
58
58
|
console.log();
|
|
59
|
-
intro(cliTitle(`project team ${args.action}`));
|
|
60
59
|
const { apiUrl, token } = args.action === "pending" || args.action === "accept" || args.action === "decline" ? getAccountCredential() : {
|
|
61
60
|
apiUrl: void 0,
|
|
62
61
|
token: getToken(root)
|
|
@@ -74,7 +73,7 @@ async function runProjectTeamCommand(root, args) {
|
|
|
74
73
|
return;
|
|
75
74
|
}
|
|
76
75
|
note(invitationLines(invitations, true), "Pending Project Invitations");
|
|
77
|
-
outro(
|
|
76
|
+
outro(formatCount(invitations.length, "invitation"));
|
|
78
77
|
return;
|
|
79
78
|
}
|
|
80
79
|
if (args.action === "accept" || args.action === "decline") {
|
|
@@ -91,7 +90,7 @@ async function runProjectTeamCommand(root, args) {
|
|
|
91
90
|
if (args.action === "list") {
|
|
92
91
|
const members = await client.listProjectMembers(projectId);
|
|
93
92
|
note(memberLines(members), "Project Team");
|
|
94
|
-
outro(
|
|
93
|
+
outro(formatCount(members.length, "member"));
|
|
95
94
|
return;
|
|
96
95
|
}
|
|
97
96
|
if (args.action === "invitations") {
|
|
@@ -101,7 +100,7 @@ async function runProjectTeamCommand(root, args) {
|
|
|
101
100
|
return;
|
|
102
101
|
}
|
|
103
102
|
note(invitationLines(invitations, false), "Project Invitations");
|
|
104
|
-
outro(
|
|
103
|
+
outro(formatCount(invitations.length, "invitation"));
|
|
105
104
|
return;
|
|
106
105
|
}
|
|
107
106
|
if (args.action === "invite") {
|
|
@@ -1,8 +1,8 @@
|
|
|
1
|
-
import { r as readProjectConfig } from "./project-
|
|
2
|
-
import { c as getToken } from "./auth-
|
|
3
|
-
import { H as outro, L as log
|
|
4
|
-
import {
|
|
5
|
-
import {
|
|
1
|
+
import { r as readProjectConfig } from "./project-DQstYTxO.mjs";
|
|
2
|
+
import { c as getToken } from "./auth-D52yG7hl.mjs";
|
|
3
|
+
import { H as outro, L as log } from "./prompts-6OSVA7DJ.mjs";
|
|
4
|
+
import { r as PlatformClient } from "./client-mC-dFGDD.mjs";
|
|
5
|
+
import { f as tablePrefix, i as dim } from "./output-BvdaehtE.mjs";
|
|
6
6
|
import { r as resolveProjectBySlug } from "./resolve-project-BG5ORGID.mjs";
|
|
7
7
|
//#region src/cli/project-token.ts
|
|
8
8
|
async function resolveTarget(root, args) {
|
|
@@ -39,10 +39,7 @@ function printIssued(args, result, apiUrl) {
|
|
|
39
39
|
console.log(`\nVOID_TOKEN=${result.token}\nVOID_API_URL=${apiUrl}\n`);
|
|
40
40
|
}
|
|
41
41
|
async function runProjectTokenCommand(root, args) {
|
|
42
|
-
if (!args.json)
|
|
43
|
-
console.log();
|
|
44
|
-
intro(cliTitle(`project token ${args.action}`));
|
|
45
|
-
}
|
|
42
|
+
if (!args.json) console.log();
|
|
46
43
|
const { client, projectId, slug } = await resolveTarget(root, args);
|
|
47
44
|
if (args.action === "create") printIssued(args, await client.createProjectToken(projectId, {
|
|
48
45
|
...args.name ? { name: args.name } : {},
|
|
@@ -1,8 +1,8 @@
|
|
|
1
|
-
import { r as readProjectConfig } from "./project-
|
|
2
|
-
import { c as getToken } from "./auth-
|
|
3
|
-
import {
|
|
4
|
-
import {
|
|
5
|
-
import { l as
|
|
1
|
+
import { r as readProjectConfig } from "./project-DQstYTxO.mjs";
|
|
2
|
+
import { c as getToken } from "./auth-D52yG7hl.mjs";
|
|
3
|
+
import { H as outro, L as log } from "./prompts-6OSVA7DJ.mjs";
|
|
4
|
+
import { r as PlatformClient } from "./client-mC-dFGDD.mjs";
|
|
5
|
+
import { l as note, u as sanitizeTerminalText } from "./output-BvdaehtE.mjs";
|
|
6
6
|
import { r as resolveProjectBySlug, t as getRequestedProjectSlug } from "./resolve-project-BG5ORGID.mjs";
|
|
7
7
|
//#region src/cli/project-zero-trust.ts
|
|
8
8
|
async function resolveTarget(root, args) {
|
|
@@ -44,7 +44,6 @@ function statusLines(result) {
|
|
|
44
44
|
}
|
|
45
45
|
async function runProjectZeroTrustCommand(root, args) {
|
|
46
46
|
console.log();
|
|
47
|
-
intro(cliTitle(`project zero-trust ${args.action}`));
|
|
48
47
|
const { client, projectId, slug } = await resolveTarget(root, args);
|
|
49
48
|
if (args.action === "status") {
|
|
50
49
|
note(statusLines(await client.getProjectZeroTrust(projectId)), slug);
|
|
@@ -125,8 +125,8 @@ const fastStringWidth$2 = (input, options = {}) => {
|
|
|
125
125
|
};
|
|
126
126
|
//#endregion
|
|
127
127
|
//#region ../../node_modules/.pnpm/fast-wrap-ansi@0.2.2/node_modules/fast-wrap-ansi/lib/main.js
|
|
128
|
-
const ESC$
|
|
129
|
-
const CSI$
|
|
128
|
+
const ESC$2 = "\x1B";
|
|
129
|
+
const CSI$2 = "";
|
|
130
130
|
const END_CODE$1 = 39;
|
|
131
131
|
const ANSI_ESCAPE_BELL$1 = "\x07";
|
|
132
132
|
const ANSI_CSI$1 = "[";
|
|
@@ -147,8 +147,8 @@ const getClosingCode$1 = (openingCode) => {
|
|
|
147
147
|
if (openingCode === 9) return 29;
|
|
148
148
|
if (openingCode === 0) return 0;
|
|
149
149
|
};
|
|
150
|
-
const wrapAnsiCode$1 = (code) => `${ESC$
|
|
151
|
-
const wrapAnsiHyperlink$1 = (url) => `${ESC$
|
|
150
|
+
const wrapAnsiCode$1 = (code) => `${ESC$2}${ANSI_CSI$1}${code}${ANSI_SGR_TERMINATOR$1}`;
|
|
151
|
+
const wrapAnsiHyperlink$1 = (url) => `${ESC$2}${ANSI_ESCAPE_LINK$1}${url}${ANSI_ESCAPE_BELL$1}`;
|
|
152
152
|
const wrapWord$1 = (rows, word, columns) => {
|
|
153
153
|
const characters = word[Symbol.iterator]();
|
|
154
154
|
let isInsideEscape = false;
|
|
@@ -166,7 +166,7 @@ const wrapWord$1 = (rows, word, columns) => {
|
|
|
166
166
|
rows.push(character);
|
|
167
167
|
visible = 0;
|
|
168
168
|
}
|
|
169
|
-
if (character === ESC$
|
|
169
|
+
if (character === ESC$2 || character === CSI$2) {
|
|
170
170
|
isInsideEscape = true;
|
|
171
171
|
isInsideLinkEscape = word.startsWith(ANSI_ESCAPE_LINK$1, rawCharacterIndex + 1);
|
|
172
172
|
}
|
|
@@ -265,7 +265,7 @@ const exec$1 = (string, columns, options = {}) => {
|
|
|
265
265
|
inSurrogate = character >= "\ud800" && character <= "\udbff";
|
|
266
266
|
if (inSurrogate) continue;
|
|
267
267
|
} else inSurrogate = false;
|
|
268
|
-
if (character === ESC$
|
|
268
|
+
if (character === ESC$2 || character === CSI$2) {
|
|
269
269
|
GROUP_REGEX$1.lastIndex = i + 1;
|
|
270
270
|
const groups = GROUP_REGEX$1.exec(preString)?.groups;
|
|
271
271
|
if (groups?.code !== void 0) {
|
|
@@ -803,8 +803,51 @@ var n = class extends y {
|
|
|
803
803
|
}
|
|
804
804
|
};
|
|
805
805
|
//#endregion
|
|
806
|
-
//#region
|
|
806
|
+
//#region ../../node_modules/.pnpm/sisteransi@2.0.0/node_modules/sisteransi/dist/index.js
|
|
807
807
|
var import_picocolors = /* @__PURE__ */ __toESM(require_picocolors(), 1);
|
|
808
|
+
const ESC$1 = "\x1B";
|
|
809
|
+
const CSI$1 = `${ESC$1}[`;
|
|
810
|
+
const cursor = {
|
|
811
|
+
to(x, y) {
|
|
812
|
+
if (!y) return `${CSI$1}${x + 1}G`;
|
|
813
|
+
return `${CSI$1}${y + 1};${x + 1}H`;
|
|
814
|
+
},
|
|
815
|
+
move(x, y) {
|
|
816
|
+
let ret = "";
|
|
817
|
+
if (x < 0) ret += `${CSI$1}${-x}D`;
|
|
818
|
+
else if (x > 0) ret += `${CSI$1}${x}C`;
|
|
819
|
+
if (y < 0) ret += `${CSI$1}${-y}A`;
|
|
820
|
+
else if (y > 0) ret += `${CSI$1}${y}B`;
|
|
821
|
+
return ret;
|
|
822
|
+
},
|
|
823
|
+
up: (count = 1) => `${CSI$1}${count}A`,
|
|
824
|
+
down: (count = 1) => `${CSI$1}${count}B`,
|
|
825
|
+
forward: (count = 1) => `${CSI$1}${count}C`,
|
|
826
|
+
backward: (count = 1) => `${CSI$1}${count}D`,
|
|
827
|
+
nextLine: (count = 1) => `${CSI$1}E`.repeat(count),
|
|
828
|
+
prevLine: (count = 1) => `${CSI$1}F`.repeat(count),
|
|
829
|
+
left: `${CSI$1}G`,
|
|
830
|
+
hide: `${CSI$1}?25l`,
|
|
831
|
+
show: `${CSI$1}?25h`,
|
|
832
|
+
save: `${ESC$1}7`,
|
|
833
|
+
restore: `${ESC$1}8`
|
|
834
|
+
};
|
|
835
|
+
const erase = {
|
|
836
|
+
screen: `${CSI$1}2J`,
|
|
837
|
+
up: (count = 1) => `${CSI$1}1J`.repeat(count),
|
|
838
|
+
down: (count = 1) => `${CSI$1}J`.repeat(count),
|
|
839
|
+
line: `${CSI$1}2K`,
|
|
840
|
+
lineEnd: `${CSI$1}K`,
|
|
841
|
+
lineStart: `${CSI$1}1K`,
|
|
842
|
+
lines(count) {
|
|
843
|
+
let clear = "";
|
|
844
|
+
for (let i = 0; i < count; i++) clear += this.line + (i < count - 1 ? cursor.up() : "");
|
|
845
|
+
if (count) clear += cursor.left;
|
|
846
|
+
return clear;
|
|
847
|
+
}
|
|
848
|
+
};
|
|
849
|
+
//#endregion
|
|
850
|
+
//#region ../prompts/index.mjs
|
|
808
851
|
const isAmbiguous = (x) => {
|
|
809
852
|
return x === 161 || x === 164 || x === 167 || x === 168 || x === 170 || x === 173 || x === 174 || x >= 176 && x <= 180 || x >= 182 && x <= 186 || x >= 188 && x <= 191 || x === 198 || x === 208 || x === 215 || x === 216 || x >= 222 && x <= 225 || x === 230 || x >= 232 && x <= 234 || x === 236 || x === 237 || x === 240 || x === 242 || x === 243 || x >= 247 && x <= 250 || x === 252 || x === 254 || x === 257 || x === 273 || x === 275 || x === 283 || x === 294 || x === 295 || x === 299 || x >= 305 && x <= 307 || x === 312 || x >= 319 && x <= 322 || x === 324 || x >= 328 && x <= 331 || x === 333 || x === 338 || x === 339 || x === 358 || x === 359 || x === 363 || x === 462 || x === 464 || x === 466 || x === 468 || x === 470 || x === 472 || x === 474 || x === 476 || x === 593 || x === 609 || x === 708 || x === 711 || x >= 713 && x <= 715 || x === 717 || x === 720 || x >= 728 && x <= 731 || x === 733 || x === 735 || x >= 768 && x <= 879 || x >= 913 && x <= 929 || x >= 931 && x <= 937 || x >= 945 && x <= 961 || x >= 963 && x <= 969 || x === 1025 || x >= 1040 && x <= 1103 || x === 1105 || x === 8208 || x >= 8211 && x <= 8214 || x === 8216 || x === 8217 || x === 8220 || x === 8221 || x >= 8224 && x <= 8226 || x >= 8228 && x <= 8231 || x === 8240 || x === 8242 || x === 8243 || x === 8245 || x === 8251 || x === 8254 || x === 8308 || x === 8319 || x >= 8321 && x <= 8324 || x === 8364 || x === 8451 || x === 8453 || x === 8457 || x === 8467 || x === 8470 || x === 8481 || x === 8482 || x === 8486 || x === 8491 || x === 8531 || x === 8532 || x >= 8539 && x <= 8542 || x >= 8544 && x <= 8555 || x >= 8560 && x <= 8569 || x === 8585 || x >= 8592 && x <= 8601 || x === 8632 || x === 8633 || x === 8658 || x === 8660 || x === 8679 || x === 8704 || x === 8706 || x === 8707 || x === 8711 || x === 8712 || x === 8715 || x === 8719 || x === 8721 || x === 8725 || x === 8730 || x >= 8733 && x <= 8736 || x === 8739 || x === 8741 || x >= 8743 && x <= 8748 || x === 8750 || x >= 8756 && x <= 8759 || x === 8764 || x === 8765 || x === 8776 || x === 8780 || x === 8786 || x === 8800 || x === 8801 || x >= 8804 && x <= 8807 || x === 8810 || x === 8811 || x === 8814 || x === 8815 || x === 8834 || x === 8835 || x === 8838 || x === 8839 || x === 8853 || x === 8857 || x === 8869 || x === 8895 || x === 8978 || x >= 9312 && x <= 9449 || x >= 9451 && x <= 9547 || x >= 9552 && x <= 9587 || x >= 9600 && x <= 9615 || x >= 9618 && x <= 9621 || x === 9632 || x === 9633 || x >= 9635 && x <= 9641 || x === 9650 || x === 9651 || x === 9654 || x === 9655 || x === 9660 || x === 9661 || x === 9664 || x === 9665 || x >= 9670 && x <= 9672 || x === 9675 || x >= 9678 && x <= 9681 || x >= 9698 && x <= 9701 || x === 9711 || x === 9733 || x === 9734 || x === 9737 || x === 9742 || x === 9743 || x === 9756 || x === 9758 || x === 9792 || x === 9794 || x === 9824 || x === 9825 || x >= 9827 && x <= 9829 || x >= 9831 && x <= 9834 || x === 9836 || x === 9837 || x === 9839 || x === 9886 || x === 9887 || x === 9919 || x >= 9926 && x <= 9933 || x >= 9935 && x <= 9939 || x >= 9941 && x <= 9953 || x === 9955 || x === 9960 || x === 9961 || x >= 9963 && x <= 9969 || x === 9972 || x >= 9974 && x <= 9977 || x === 9979 || x === 9980 || x === 9982 || x === 9983 || x === 10045 || x >= 10102 && x <= 10111 || x >= 11094 && x <= 11097 || x >= 12872 && x <= 12879 || x >= 57344 && x <= 63743 || x >= 65024 && x <= 65039 || x === 65533 || x >= 127232 && x <= 127242 || x >= 127248 && x <= 127277 || x >= 127280 && x <= 127337 || x >= 127344 && x <= 127373 || x === 127375 || x === 127376 || x >= 127387 && x <= 127404 || x >= 917760 && x <= 917999 || x >= 983040 && x <= 1048573 || x >= 1048576 && x <= 1114109;
|
|
810
853
|
};
|
|
@@ -1573,9 +1616,9 @@ const log = {
|
|
|
1573
1616
|
const parts = [];
|
|
1574
1617
|
const hasGuide = getGuide({ withGuide });
|
|
1575
1618
|
const spacingString = !hasGuide ? "" : secondarySymbol;
|
|
1576
|
-
const prefix = symbol ? `${symbol}
|
|
1619
|
+
const prefix = symbol ? `${symbol} ` : hasGuide ? `${secondarySymbol} ` : "";
|
|
1577
1620
|
const marker = symbol ?? secondarySymbol;
|
|
1578
|
-
const secondaryPrefix = hasGuide ? `${secondarySymbol}
|
|
1621
|
+
const secondaryPrefix = hasGuide ? `${secondarySymbol} ` : symbol ? " " : "";
|
|
1579
1622
|
for (let i = 0; i < spacing; i++) parts.push(spacingString);
|
|
1580
1623
|
const messageParts = Array.isArray(message) ? message : message.split("\n");
|
|
1581
1624
|
if (messageParts.length > 0) {
|
|
@@ -1842,9 +1885,9 @@ const spinner = ({ indicator = "dots", onCancel, output = process.stdout, cancel
|
|
|
1842
1885
|
hard: true,
|
|
1843
1886
|
trim: false
|
|
1844
1887
|
}).split("\n");
|
|
1845
|
-
if (prevLines.length > 1) output.write(
|
|
1846
|
-
output.write(
|
|
1847
|
-
output.write(
|
|
1888
|
+
if (prevLines.length > 1) output.write(cursor.up(prevLines.length - 1));
|
|
1889
|
+
output.write(cursor.to(0));
|
|
1890
|
+
output.write(erase.down());
|
|
1848
1891
|
};
|
|
1849
1892
|
const hasGuide = getGuide(opts);
|
|
1850
1893
|
const startLoop = () => {
|
|
@@ -1861,11 +1904,11 @@ const spinner = ({ indicator = "dots", onCancel, output = process.stdout, cancel
|
|
|
1861
1904
|
clearPrevMessage();
|
|
1862
1905
|
const frame = styleFn(frames[frameIndex] ?? (unicode ? "◒" : "o"));
|
|
1863
1906
|
let outputMessage;
|
|
1864
|
-
if (isCI$1) outputMessage = `${frame}
|
|
1865
|
-
else if (indicator === "timer") outputMessage = `${frame}
|
|
1907
|
+
if (isCI$1) outputMessage = `${frame} ${_message}...`;
|
|
1908
|
+
else if (indicator === "timer") outputMessage = `${frame} ${_message} ${formatTimer(getElapsedMs())}`;
|
|
1866
1909
|
else {
|
|
1867
1910
|
const loadingDots = ".".repeat(Math.floor(indicatorTimer)).slice(0, 3);
|
|
1868
|
-
outputMessage = `${frame}
|
|
1911
|
+
outputMessage = `${frame} ${_message}${loadingDots}`;
|
|
1869
1912
|
}
|
|
1870
1913
|
const wrapped = wrapAnsi(outputMessage, columns, {
|
|
1871
1914
|
hard: true,
|
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
import { K as select, L as log, X as text, tt as isCancel } from "./prompts-
|
|
1
|
+
import { K as select, L as log, X as text, tt as isCancel } from "./prompts-6OSVA7DJ.mjs";
|
|
2
2
|
export { isCancel, log, select, text };
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import { n as HeadDescriptor, t as HeadConfig } from "./head-Do8P4puT.mjs";
|
|
2
|
-
import { n as CloudBindings, r as CloudContext } from "./handler-
|
|
2
|
+
import { n as CloudBindings, r as CloudContext } from "./handler-BeK3weD4.mjs";
|
|
3
3
|
import { a as PageRenderMode, t as DevCssAsset } from "./types-BAp5AEBU.mjs";
|
|
4
4
|
//#region src/pages/protocol.d.ts
|
|
5
5
|
/** Escape characters that are unsafe inside inline <script> tags to prevent XSS. */
|
|
@@ -1,3 +1,3 @@
|
|
|
1
1
|
import { r as scanWranglerDotenvKeys } from "./dotenv-VQxupEUv.mjs";
|
|
2
|
-
import { _ as resolvePinnedApiBaseUrl, a as checkCloudflareProvisionDrift, c as enableD1ReadReplicationViaApi, d as isQueueConfirmedAbsent, f as isRealD1Id, g as provisionEnv, h as provisionCloudflareResources, i as assertValidResourceName, l as isAlreadyGoneKillError, m as normalizeRunWranglerResult, n as acquireProvisionLock, o as createDefaultRunWrangler, p as isRealKvId, r as assertNoTransportRedirectInProjectDotenv, s as deleteEnvVarCaseAware, t as WranglerQuarantineError, u as isQuarantineError, v as resolveProperLockfileKey } from "./provision-
|
|
2
|
+
import { _ as resolvePinnedApiBaseUrl, a as checkCloudflareProvisionDrift, c as enableD1ReadReplicationViaApi, d as isQueueConfirmedAbsent, f as isRealD1Id, g as provisionEnv, h as provisionCloudflareResources, i as assertValidResourceName, l as isAlreadyGoneKillError, m as normalizeRunWranglerResult, n as acquireProvisionLock, o as createDefaultRunWrangler, p as isRealKvId, r as assertNoTransportRedirectInProjectDotenv, s as deleteEnvVarCaseAware, t as WranglerQuarantineError, u as isQuarantineError, v as resolveProperLockfileKey } from "./provision-VeqAC77A.mjs";
|
|
3
3
|
export { WranglerQuarantineError, acquireProvisionLock, assertNoTransportRedirectInProjectDotenv, assertValidResourceName, checkCloudflareProvisionDrift, createDefaultRunWrangler, deleteEnvVarCaseAware, enableD1ReadReplicationViaApi, isAlreadyGoneKillError, isQuarantineError, isQueueConfirmedAbsent, isRealD1Id, isRealKvId, normalizeRunWranglerResult, provisionCloudflareResources, provisionEnv, resolvePinnedApiBaseUrl, resolveProperLockfileKey, scanWranglerDotenvKeys };
|
|
@@ -1,15 +1,16 @@
|
|
|
1
1
|
import { a as join, n as dirname, o as normalize, t as basename, u as resolve$2 } from "./dist-BVqXeR_h.mjs";
|
|
2
|
-
import { i as persistCloudflareConfig } from "./cloudflare-config-Bktvwtpf.mjs";
|
|
3
|
-
import { A as writeProvisionedWranglerConfig, s as assertNoDuplicateMembers, v as readProvisionedBindingEntry } from "./wrangler-7K-bW_DL.mjs";
|
|
4
2
|
import { i as voidWarn, r as voidLog } from "./log-vqY3pqwI.mjs";
|
|
3
|
+
import { i as persistCloudflareConfig } from "./cloudflare-config-Bktvwtpf.mjs";
|
|
4
|
+
import { A as writeProvisionedWranglerConfig, s as assertNoDuplicateMembers, v as readProvisionedBindingEntry } from "./wrangler-DhUerFkW.mjs";
|
|
5
5
|
import { r as scanWranglerDotenvKeys } from "./dotenv-VQxupEUv.mjs";
|
|
6
6
|
import { c as resolveCloudflareOperationArgv, n as decodeCloudflareOperationResult, r as encodeCloudflareOperation } from "./cloudflare-process-B-wekeR6.mjs";
|
|
7
7
|
import { createRequire } from "node:module";
|
|
8
8
|
import { closeSync, existsSync, fsyncSync, lstatSync, openSync, readFileSync, readlinkSync, realpathSync, renameSync, unlinkSync, writeSync } from "node:fs";
|
|
9
|
+
import { isRecord } from "@void/deploy-core";
|
|
9
10
|
import { randomUUID } from "node:crypto";
|
|
10
|
-
import { spawn } from "node:child_process";
|
|
11
11
|
import { parse } from "jsonc-parser";
|
|
12
12
|
import { types } from "node:util";
|
|
13
|
+
import { spawn } from "node:child_process";
|
|
13
14
|
import { resolve } from "node:path/posix";
|
|
14
15
|
import { resolve as resolve$1 } from "node:path/win32";
|
|
15
16
|
import lockfile from "proper-lockfile";
|
|
@@ -331,6 +332,17 @@ function provisionEnv(ctx) {
|
|
|
331
332
|
scrub("CLOUDFLARE_ACCOUNT_ID");
|
|
332
333
|
env.CLOUDFLARE_ACCOUNT_ID = ctx.accountId;
|
|
333
334
|
}
|
|
335
|
+
if (ctx?.apiToken) {
|
|
336
|
+
for (const name of [
|
|
337
|
+
"CLOUDFLARE_API_TOKEN",
|
|
338
|
+
"CF_API_TOKEN",
|
|
339
|
+
"CLOUDFLARE_API_KEY",
|
|
340
|
+
"CF_API_KEY",
|
|
341
|
+
"CLOUDFLARE_EMAIL",
|
|
342
|
+
"CF_EMAIL"
|
|
343
|
+
]) scrub(name);
|
|
344
|
+
env.CLOUDFLARE_API_TOKEN = ctx.apiToken;
|
|
345
|
+
}
|
|
334
346
|
return env;
|
|
335
347
|
}
|
|
336
348
|
/**
|
|
@@ -635,7 +647,8 @@ function createDefaultRunWrangler(root, options) {
|
|
|
635
647
|
env: {
|
|
636
648
|
...provisionEnv({
|
|
637
649
|
accountId: opts.accountId,
|
|
638
|
-
apiBaseUrl: opts.apiBaseUrl
|
|
650
|
+
apiBaseUrl: opts.apiBaseUrl,
|
|
651
|
+
apiToken: opts.apiToken
|
|
639
652
|
}),
|
|
640
653
|
...opts.suppressLogs ? { WRANGLER_WRITE_LOGS: "false" } : {}
|
|
641
654
|
},
|
|
@@ -1430,9 +1443,6 @@ function parseJsonArrayStrict(value) {
|
|
|
1430
1443
|
function parseJsonObject(value) {
|
|
1431
1444
|
return isRecord(value) ? value : void 0;
|
|
1432
1445
|
}
|
|
1433
|
-
function isRecord(value) {
|
|
1434
|
-
return typeof value === "object" && value !== null && !Array.isArray(value);
|
|
1435
|
-
}
|
|
1436
1446
|
/**
|
|
1437
1447
|
* Read the single provisioned binding entry for `field`/`binding` from the resolved
|
|
1438
1448
|
* config, delegating to the STRICT canonical reader in `wrangler.ts`
|
|
@@ -1533,7 +1543,7 @@ function reconcileD1IdAliases(entry) {
|
|
|
1533
1543
|
* exact-match rule so no sibling gap remains.
|
|
1534
1544
|
*/
|
|
1535
1545
|
function normalizeD1(entry, requestedName) {
|
|
1536
|
-
if (
|
|
1546
|
+
if (entry === void 0) return { kind: "other" };
|
|
1537
1547
|
const names = [entry.name, entry.database_name].filter((value) => typeof value === "string" && value.length > 0);
|
|
1538
1548
|
if (!names.includes(requestedName)) return { kind: "other" };
|
|
1539
1549
|
if (new Set(names).size > 1) return { kind: "claimed-but-invalid" };
|
|
@@ -1,12 +1,11 @@
|
|
|
1
|
-
import { r as readProjectConfig } from "./project-
|
|
2
|
-
import { c as getToken } from "./auth-
|
|
3
|
-
import { H as outro, L as log
|
|
4
|
-
import {
|
|
5
|
-
import {
|
|
1
|
+
import { r as readProjectConfig } from "./project-DQstYTxO.mjs";
|
|
2
|
+
import { c as getToken } from "./auth-D52yG7hl.mjs";
|
|
3
|
+
import { H as outro, L as log } from "./prompts-6OSVA7DJ.mjs";
|
|
4
|
+
import { r as PlatformClient } from "./client-mC-dFGDD.mjs";
|
|
5
|
+
import { c as import_picocolors, i as dim } from "./output-BvdaehtE.mjs";
|
|
6
6
|
//#region src/cli/requests.ts
|
|
7
7
|
async function runRequestsCommand(root, range, status) {
|
|
8
8
|
console.log();
|
|
9
|
-
intro(cliTitle("project requests"));
|
|
10
9
|
const token = getToken(root);
|
|
11
10
|
if (!token) {
|
|
12
11
|
log.error("Not logged in. Run `void account login` first.");
|
|
@@ -1,12 +1,11 @@
|
|
|
1
|
-
import { n as readDeploymentPlatform, r as readProjectConfig } from "./project-
|
|
2
|
-
import { c as getToken } from "./auth-
|
|
3
|
-
import { A as confirm, H as outro, K as select, L as log,
|
|
4
|
-
import {
|
|
5
|
-
import { a as
|
|
1
|
+
import { n as readDeploymentPlatform, r as readProjectConfig } from "./project-DQstYTxO.mjs";
|
|
2
|
+
import { c as getToken } from "./auth-D52yG7hl.mjs";
|
|
3
|
+
import { A as confirm, H as outro, K as select, L as log, O as cancel, tt as isCancel } from "./prompts-6OSVA7DJ.mjs";
|
|
4
|
+
import { r as PlatformClient } from "./client-mC-dFGDD.mjs";
|
|
5
|
+
import { a as ensureUtc, c as import_picocolors, i as dim, o as formatCount, r as createSpinner } from "./output-BvdaehtE.mjs";
|
|
6
6
|
//#region src/cli/rollback.ts
|
|
7
7
|
async function runRollbackCommand(root, deployId) {
|
|
8
8
|
console.log();
|
|
9
|
-
intro(cliTitle("project rollback"));
|
|
10
9
|
const platform = readDeploymentPlatform(root);
|
|
11
10
|
if (platform === "cloudflare") return runCloudflareRollback(root, deployId);
|
|
12
11
|
if (platform === "none") throw new Error("rollback: Deployment is disabled. Run `void init` to choose a platform.");
|
|
@@ -56,7 +55,7 @@ async function runRollbackCommand(root, deployId) {
|
|
|
56
55
|
const targetMigrations = target.applied_migrations ? JSON.parse(target.applied_migrations) : [];
|
|
57
56
|
const migrationDiff = currentMigrations.filter((m) => !targetMigrations.includes(m));
|
|
58
57
|
if (migrationDiff.length > 0) {
|
|
59
|
-
log.warn(`The current database has ${migrationDiff.length
|
|
58
|
+
log.warn(`The current database has ${formatCount(migrationDiff.length, "migration")} applied after this deployment:`);
|
|
60
59
|
for (const m of migrationDiff) log.message(` ${dim("•")} ${m}`);
|
|
61
60
|
log.message(dim("Rolling back will NOT revert these migrations. The older code will run against the current schema."));
|
|
62
61
|
const proceed = await confirm({ message: "Proceed with rollback?" });
|
|
@@ -83,7 +82,7 @@ async function runRollbackCommand(root, deployId) {
|
|
|
83
82
|
outro(dim("Traffic is now serving the rolled-back deployment."));
|
|
84
83
|
}
|
|
85
84
|
async function runCloudflareRollback(root, deployId) {
|
|
86
|
-
const { activateCloudflareExistingVersion, readCloudflareWorkerStatus, resolveCloudflareOperationContext } = await import("./cloudflare-operations-
|
|
85
|
+
const { activateCloudflareExistingVersion, readCloudflareWorkerStatus, resolveCloudflareOperationContext } = await import("./cloudflare-operations-DoQrVHAt.mjs");
|
|
87
86
|
const context = resolveCloudflareOperationContext(root);
|
|
88
87
|
const status = await readCloudflareWorkerStatus(context);
|
|
89
88
|
const deployedVersionIds = new Set(status.deployedVersionIds);
|
|
@@ -109,7 +108,7 @@ async function runCloudflareRollback(root, deployId) {
|
|
|
109
108
|
options: candidates.map((version) => ({
|
|
110
109
|
value: version.id,
|
|
111
110
|
label: `${version.id} ${dim(formatAge(version.createdAt))}`,
|
|
112
|
-
hint: version.metadata ?
|
|
111
|
+
hint: version.metadata ? formatCount(version.metadata.migrations.length, "migration") : "migration state unknown"
|
|
113
112
|
}))
|
|
114
113
|
});
|
|
115
114
|
if (isCancel(result)) {
|
|
@@ -131,7 +130,7 @@ async function runCloudflareRollback(root, deployId) {
|
|
|
131
130
|
const targetSet = new Set(target.metadata.migrations);
|
|
132
131
|
const migrationDiff = current.metadata.migrations.filter((migration) => !targetSet.has(migration));
|
|
133
132
|
if (migrationDiff.length > 0) {
|
|
134
|
-
log.warn(`The current database has ${migrationDiff.length
|
|
133
|
+
log.warn(`The current database has ${formatCount(migrationDiff.length, "migration")} applied after this version:`);
|
|
135
134
|
for (const migration of migrationDiff) log.message(` ${dim("•")} ${migration}`);
|
|
136
135
|
log.message(dim("Rolling back will NOT revert these migrations. The older code will run against the current schema."));
|
|
137
136
|
const proceed = await confirm({ message: "Proceed with rollback?" });
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
import { a as join, n as dirname } from "./dist-BVqXeR_h.mjs";
|
|
2
2
|
import { t as collectMigrations } from "./collect-DiTn9yr6.mjs";
|
|
3
3
|
import { n as hasPackageDependency, r as readNearestPackageJson } from "./package-json-DXfiT1jV.mjs";
|
|
4
|
-
import { r as classifyMigration } from "./plan-
|
|
4
|
+
import { r as classifyMigration } from "./plan-CJGEeTEI.mjs";
|
|
5
5
|
import { existsSync, mkdirSync } from "node:fs";
|
|
6
6
|
import { createHash, createHmac } from "node:crypto";
|
|
7
7
|
//#region src/migrations/runner.ts
|
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
import { i as openSqliteDatabase, n as getAppliedMigrations, o as runMigrations, r as getMiniflareDatabasePath, t as getApplicationTables } from "./runner
|
|
1
|
+
import { i as openSqliteDatabase, n as getAppliedMigrations, o as runMigrations, r as getMiniflareDatabasePath, t as getApplicationTables } from "./runner--2KF6Kua.mjs";
|
|
2
2
|
export { getApplicationTables, getAppliedMigrations, getMiniflareDatabasePath, openSqliteDatabase, runMigrations };
|
package/dist/runtime/ai.d.mts
CHANGED
|
@@ -1,4 +1,3 @@
|
|
|
1
|
-
import { n as LimitOperation } from "../limits-Bq5LG8Id.mjs";
|
|
2
1
|
//#region src/runtime/ai-types.d.ts
|
|
3
2
|
type AiProviderName = "openai" | "anthropic" | "google-ai-studio" | "groq" | "mistral" | "grok" | "deepseek" | "openrouter" | "perplexity" | "cohere" | "cerebras" | "huggingface" | "replicate" | "baseten" | "cartesia" | "deepgram" | "elevenlabs" | "fal" | "ideogram" | "parallel";
|
|
4
3
|
type AiProvider = AiProviderName | (string & {});
|
|
@@ -26,25 +25,25 @@ type AiProviderFetchInit = {
|
|
|
26
25
|
* in a `Response` with SSE headers — ready to return from a route handler.
|
|
27
26
|
*/
|
|
28
27
|
export type VoidAi = {
|
|
29
|
-
models(...args: Parameters<Ai["models"]>):
|
|
30
|
-
toMarkdown(files: Array<Parameters<Ai["toMarkdown"]>[0]>, options?: Parameters<Ai["toMarkdown"]>[1]):
|
|
31
|
-
toMarkdown(...args: Parameters<Ai["toMarkdown"]>):
|
|
28
|
+
models(...args: Parameters<Ai["models"]>): Promise<Awaited<ReturnType<Ai["models"]>>>;
|
|
29
|
+
toMarkdown(files: Array<Parameters<Ai["toMarkdown"]>[0]>, options?: Parameters<Ai["toMarkdown"]>[1]): Promise<Array<Awaited<ReturnType<Ai["toMarkdown"]>>>>;
|
|
30
|
+
toMarkdown(...args: Parameters<Ai["toMarkdown"]>): Promise<Awaited<ReturnType<Ai["toMarkdown"]>>>;
|
|
32
31
|
/** Workers AI inference (existing) */
|
|
33
|
-
run<Name extends keyof AiModels>(model: Name, inputs: AiModels[Name]["inputs"], options?: AiOptions):
|
|
32
|
+
run<Name extends keyof AiModels>(model: Name, inputs: AiModels[Name]["inputs"], options?: AiOptions): Promise<AiModels[Name]["postProcessedOutputs"]>;
|
|
34
33
|
/** Cloudflare AI Gateway model inference. Accepts Cloudflare model IDs unchanged. */
|
|
35
|
-
run(model: string, inputs: unknown, options?: AiOptions):
|
|
34
|
+
run(model: string, inputs: unknown, options?: AiOptions): Promise<unknown>;
|
|
36
35
|
/** Image generation. Returns the proxy response so callers can return or parse it. */
|
|
37
|
-
image<Name extends keyof AiModels>(model: Name, inputs: AiModels[Name]["inputs"], options?: AiOptions):
|
|
36
|
+
image<Name extends keyof AiModels>(model: Name, inputs: AiModels[Name]["inputs"], options?: AiOptions): Promise<Response>;
|
|
38
37
|
/** Cloudflare AI Gateway model inference returned as a Response. */
|
|
39
|
-
image(model: string, inputs: unknown, options?: AiOptions):
|
|
38
|
+
image(model: string, inputs: unknown, options?: AiOptions): Promise<Response>;
|
|
40
39
|
/** Provider-native AI Gateway requests using a project secret for the provider API key. */
|
|
41
40
|
provider(provider: AiProvider, options?: AiProviderOptions): {
|
|
42
|
-
fetch(path: string, init?: AiProviderFetchInit):
|
|
41
|
+
fetch(path: string, init?: AiProviderFetchInit): Promise<Response>;
|
|
43
42
|
};
|
|
44
43
|
/** Stream Workers AI response as SSE */
|
|
45
|
-
stream<Name extends keyof AiModels>(model: Name, inputs: Omit<AiModels[Name]["inputs"], "stream">, options?: AiOptions):
|
|
44
|
+
stream<Name extends keyof AiModels>(model: Name, inputs: Omit<AiModels[Name]["inputs"], "stream">, options?: AiOptions): Promise<Response>;
|
|
46
45
|
/** Stream any Cloudflare AI Gateway model response as SSE */
|
|
47
|
-
stream(model: string, inputs: Record<string, unknown>, options?: AiOptions):
|
|
46
|
+
stream(model: string, inputs: Record<string, unknown>, options?: AiOptions): Promise<Response>;
|
|
48
47
|
};
|
|
49
48
|
export declare const ai: VoidAi;
|
|
50
49
|
//#endregion
|