void 0.24.0 → 0.25.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-DcR1ywt8.mjs} +5 -5
- package/dist/{auth-CQkSDS50.mjs → auth-7wuZ5ob8.mjs} +3 -3
- package/dist/{auth-DX3JURcX.mjs → auth-CdgZ9uag.mjs} +1 -1
- package/dist/{auth-link-D75t9wO2.mjs → auth-link-Z6E5DYvM.mjs} +5 -6
- package/dist/{auth-router-ClfhL1J7.mjs → auth-router-BdM4avI8.mjs} +7 -7
- package/dist/{build-cmd-zMi1iFnS.mjs → build-cmd-CEE7D-hM.mjs} +6 -7
- package/dist/{cache-ZtQmyxVV.mjs → cache-TcZnBLtH.mjs} +6 -7
- package/dist/{cancel-deploy-Box0kkEV.mjs → cancel-deploy-CYoZmcmR.mjs} +4 -6
- package/dist/{cf-access-BGe5sWXF.mjs → cf-access-AHKBzmuu.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 +2 -2
- package/dist/cli/env-schema-probe.mjs +2 -2
- package/dist/client-B4Me-9HE.mjs +2 -0
- package/dist/{client-DKAsFA4X.mjs → client-RsPo8wsP.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-BCdXSsmo.mjs → cloudflare-operations-BhbK6yTq.mjs} +1 -1
- package/dist/{cloudflare-operations-DzH-A966.mjs → cloudflare-operations-CjaV4lZi.mjs} +2 -2
- package/dist/{connect-B-usTnlF.mjs → connect-DCvUmPXY.mjs} +12 -9
- package/dist/{create-project-FWbf5Olo.mjs → create-project-C734I-Mu.mjs} +1 -1
- package/dist/{create-project-CYOOAYcn.mjs → create-project-eAPgYq35.mjs} +6 -6
- package/dist/{db-Ck2eZ2iB.mjs → db-C07GEdKF.mjs} +25 -28
- package/dist/{delete-sK56qtzZ.mjs → delete-pKMVsrpJ.mjs} +5 -6
- package/dist/deploy-BDu1vhSH.mjs +2 -0
- package/dist/{deploy-gCVaiJbS.mjs → deploy-DfsAe-T0.mjs} +9212 -8902
- package/dist/{dev-inbox-P0u4tM8Y.mjs → dev-inbox-D64ZKUod.mjs} +5 -6
- package/dist/{domain-DFfQE8jg.mjs → domain-D3uA9ize.mjs} +8 -8
- package/dist/{email-CdnhUHvJ.mjs → email-z3o2cwjH.mjs} +7 -7
- package/dist/{env-DmGdHi5i.mjs → env-3Q8-_2IH.mjs} +6 -8
- package/dist/{env-validation-zZOCcQVZ.mjs → env-validation-cZBvGWaP.mjs} +1 -1
- package/dist/gen-ById9r2j.mjs +2 -0
- package/dist/{gen-CshAkukR.mjs → gen-NjwoG9FK.mjs} +2 -4
- package/dist/{github-cmd-DftuEvIt.mjs → github-cmd-DquUq-b1.mjs} +7 -16
- package/dist/help-DPGBwomV.mjs +2 -0
- package/dist/{help-Dotbf6iz.mjs → help-DRZXC4fj.mjs} +3 -3
- package/dist/index.d.mts +18 -14
- package/dist/index.mjs +2166 -2096
- package/dist/{info-B97bTX9N.mjs → info-BmA3_IFZ.mjs} +1 -3
- package/dist/{init-BTQEZZGJ.mjs → init-DT7yuuyl.mjs} +16 -18
- package/dist/{link-B46sYH0K.mjs → link-CXOlqh2F.mjs} +6 -7
- package/dist/{list-BnPrIsU_.mjs → list-eEWVJEPn.mjs} +8 -9
- package/dist/{local-d1-2CMnpuW_.mjs → local-d1-Df4XpwhW.mjs} +1 -1
- package/dist/login-C98-sw79.mjs +2 -0
- package/dist/{login-BuiMyUrx.mjs → login-pWQHYVu2.mjs} +9 -7
- package/dist/{logs-CZG9d-ic.mjs → logs-DnxVX7TR.mjs} +7 -8
- package/dist/migrate-CEu2X5DB.mjs +2 -0
- package/dist/{migrate-q4_njtaW.mjs → migrate-CV1on-yJ.mjs} +2 -4
- package/dist/{operator-args-B3BTmSoi.mjs → operator-args-CAVcmwUt.mjs} +1 -1
- package/dist/{operator-auth-7erYc6Lt.mjs → operator-auth-CkmTE3rt.mjs} +2 -2
- package/dist/{operator-client-CpHjTd0t.mjs → operator-client-LmwjxT6q.mjs} +2 -2
- package/dist/{operator-cmd-DGqPJUD3.mjs → operator-cmd-d-IEKgNk.mjs} +6 -6
- package/dist/{output-CbM85T4k.mjs → output-BBsUwdyT.mjs} +5 -5
- package/dist/pages/client.d.mts +3 -0
- package/dist/pages/client.mjs +120 -29
- package/dist/{platform-args-3k8X9-H_.mjs → platform-args-Bzf8JPc2.mjs} +1 -1
- package/dist/platform-args-Cq6EjQro.mjs +2 -0
- package/dist/{platform-auth-config-DDrxUy4m.mjs → platform-auth-config-0V0lA3pF.mjs} +7 -7
- package/dist/{platform-auth-protection-BLadnnct.mjs → platform-auth-protection-DFeJ-JkK.mjs} +8 -8
- package/dist/{platform-auth-recovery-CmCzX2Fl.mjs → platform-auth-recovery-ICy4muq6.mjs} +7 -7
- package/dist/{platform-cmd-pMTRhvYs.mjs → platform-cmd-BPySFOew.mjs} +1 -1
- package/dist/{platform-cmd-DMDEc9uS.mjs → platform-cmd-D7vSWMvV.mjs} +37 -27
- package/dist/platform-discovery-DDDUvnqp.mjs +27 -0
- package/dist/{platform-domain-Di6EYrQl.mjs → platform-domain-CUdY064e.mjs} +4 -4
- package/dist/{platform-lifecycle-BFdSi9Qt.mjs → platform-lifecycle-BaUdTRPU.mjs} +1 -1
- package/dist/{platform-lifecycle-BBoNzojY.mjs → platform-lifecycle-Dm09JNkn.mjs} +3901 -3651
- package/dist/{platform-management-CWOQOWXm.mjs → platform-management-BSEc_ZeG.mjs} +47 -10
- package/dist/platform-management-Bp6aoH2C.mjs +2 -0
- package/dist/{platform-plans-config-Vl9BP3H4.mjs → platform-plans-config-B0pOVQyW.mjs} +3 -3
- package/dist/{platform-recovery-BJnQJEtQ.mjs → platform-recovery-WOZ95Uze.mjs} +3 -3
- package/dist/{prepare-CBLT3CHH.mjs → prepare-39EvOhI6.mjs} +1 -3
- package/dist/{project-DKG5Ra8p.mjs → project-BkbfDs0V.mjs} +1 -1
- package/dist/{project-DsblYifa.mjs → project-IOjBU8R6.mjs} +1 -1
- package/dist/{project-cmd-DxnXstAq.mjs → project-cmd-Bs5A392E.mjs} +21 -22
- package/dist/{project-team-BmHcaALJ.mjs → project-team-ohAWWaew.mjs} +8 -9
- package/dist/{project-token-GionZlBI.mjs → project-token-CP01Jna6.mjs} +6 -9
- package/dist/{project-zero-trust-JLCjVQA7.mjs → project-zero-trust-BzkVgx35.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/{provision-CVku1JFU.mjs → provision-BEv0k-qz.mjs} +1 -1
- package/dist/{provision-CaoxO_U7.mjs → provision-Btj1jppf.mjs} +5 -7
- package/dist/{requests-BOjIVAeF.mjs → requests-B3PBuGlX.mjs} +5 -6
- package/dist/{rollback-CwR3pLj3.mjs → rollback-DDub9GsO.mjs} +9 -10
- package/dist/runtime/email/testing.mjs +1 -1
- package/dist/runtime/email.mjs +35 -17
- package/dist/runtime/routing.mjs +1 -1
- package/dist/{secret-ByWJWBUG.mjs → secret-3c72lY1U.mjs} +15 -16
- package/dist/{skills-C1PlclPt.mjs → skills-BPQUGClu.mjs} +1 -1
- package/dist/{subcommand-prompt-klFCfcor.mjs → subcommand-prompt-Dhom39bd.mjs} +2 -2
- package/dist/sveltekit.d.mts +1 -1
- package/dist/sveltekit.mjs +4 -9
- package/dist/{wrangler-7K-bW_DL.mjs → wrangler-DhUerFkW.mjs} +10 -15
- package/package.json +21 -21
- package/sandbox.Dockerfile +1 -1
- package/skills/void/docs/guide/ai.md +24 -86
- package/skills/void/docs/guide/auth.md +0 -2
- package/skills/void/docs/guide/database/d1.md +7 -7
- 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/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/maintenance.md +30 -10
- package/skills/void/docs/guide/platform/installation/prerequisites.md +79 -7
- package/skills/void/docs/guide/quickstart.md +37 -80
- package/skills/void/docs/guide/sandboxes.md +36 -46
- 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 +27 -0
- package/skills/void/docs/reference/api.md +1 -1
- package/skills/void/docs/reference/cli/deploy.md +1 -1
- package/skills/void/docs/reference/cli/platform-operations.md +4 -8
- package/skills/void/docs/reference/cli/platform.md +5 -0
- package/skills/void/docs/reference/resource-inference.md +11 -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/platform-args-DdnM6WIf.mjs +0 -2
- package/dist/platform-management-DG47jys8.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
- package/dist/{platform-registry-DkPPXfp_.mjs → platform-registry-KfNEF84O.mjs} +1 -1
|
@@ -1,9 +1,9 @@
|
|
|
1
|
-
import { a as listInstallationManifests, f as readInstallationRecoverySecrets, g as resolveInstallationManifest, h as removePlatformConnectionForInstallation, m as removeInstallationRecoverySecrets, t as acquirePlatformLifecycleLock, y as writeInstallationManifest } from "./platform-registry-
|
|
2
|
-
import { A as confirm, B as note, H as outro, K as select, L as log, tt as isCancel } from "./prompts-
|
|
3
|
-
import {
|
|
4
|
-
import { A as PlatformCloudflareClient, C as revalidatePlatformInstallAction, E as resolvePlatformCloudflareCredential, M as hyperdriveOriginFromConnectionString, N as hyperdriveOriginMatches, P as verifyPlatformRuntimeTokenPermissions, S as platformProvisionIntentHash, T as assertPlatformOperatorCredentialCanApplyPlan, a as REMOTE_INSTALLATION_MANIFEST_KEY, b as formatPlatformInstallPlan, d as
|
|
5
|
-
import { createHash } from "node:crypto";
|
|
1
|
+
import { a as listInstallationManifests, f as readInstallationRecoverySecrets, g as resolveInstallationManifest, h as removePlatformConnectionForInstallation, m as removeInstallationRecoverySecrets, t as acquirePlatformLifecycleLock, y as writeInstallationManifest } from "./platform-registry-KfNEF84O.mjs";
|
|
2
|
+
import { A as confirm, B as note, H as outro, K as select, L as log, tt as isCancel } from "./prompts-6OSVA7DJ.mjs";
|
|
3
|
+
import { r as createSpinner } from "./output-BBsUwdyT.mjs";
|
|
4
|
+
import { A as PlatformCloudflareClient, C as revalidatePlatformInstallAction, E as resolvePlatformCloudflareCredential, M as hyperdriveOriginFromConnectionString, N as hyperdriveOriginMatches, P as verifyPlatformRuntimeTokenPermissions, S as platformProvisionIntentHash, T as assertPlatformOperatorCredentialCanApplyPlan, a as REMOTE_INSTALLATION_MANIFEST_KEY, b as formatPlatformInstallPlan, d as assertProjectZeroTrustAllowsUninstall, f as loadPlatformRuntime, h as resolveBootstrapGitHubId, j as hyperdriveOriginConfigHash, m as createPlatformInstallationSecrets, n as resolvePlatformInstallDatabaseUrl, o as installPlatform, s as acquirePlatformDatabaseLifecycleLock, t as assertNoninteractivePlatformMutationAcknowledged, u as readPlatformProjectZeroTrustState, v as trackedPlatformWorkerTraffic, w as platformDatabaseNameFromOwnerUrl, x as platformAdoptionIntentHash, y as createPlatformInstallPlan } from "./platform-lifecycle-Dm09JNkn.mjs";
|
|
6
5
|
import { PLATFORM_DISABLED_KEY, PLATFORM_DISABLED_VALUE, PLATFORM_R2_OWNERSHIP_MARKER_KEY, createPlatformResourceOwnershipMarker, parsePlatformInstallationManifest, parsePlatformResourceOwnershipMarker, recordInstallationResource, recordInstallationStep, setInstallationDesiredState, transitionInstallation } from "@void/platform";
|
|
6
|
+
import { createHash } from "node:crypto";
|
|
7
7
|
//#region src/cli/platform-management.ts
|
|
8
8
|
async function verifyPlatformInstallationOwnership(client, manifest, options = {}) {
|
|
9
9
|
const ready = manifest.resources.filter((resource) => resource.state === "ready" && isOwnershipVerifiableKind(resource.kind) && !options.retainedReplacementKeys?.has(resource.key));
|
|
@@ -23,6 +23,22 @@ function selectAuthoritativePlatformManifest(local, authoritative) {
|
|
|
23
23
|
if (authoritative.id !== local.id || authoritative.ownershipNonce !== local.ownershipNonce || authoritative.account.id !== local.account.id) throw new Error("platform: The authoritative lifecycle state belongs to another installation.");
|
|
24
24
|
return authoritative;
|
|
25
25
|
}
|
|
26
|
+
function commandArgument(value) {
|
|
27
|
+
return /^[a-zA-Z0-9_./:@-]+$/.test(value) ? value : `'${value.replaceAll("'", "'\\''")}'`;
|
|
28
|
+
}
|
|
29
|
+
function platformLifecycleResumeCommand(args, installationId) {
|
|
30
|
+
const command = [
|
|
31
|
+
"void",
|
|
32
|
+
"platform",
|
|
33
|
+
args.subcommand,
|
|
34
|
+
commandArgument(installationId)
|
|
35
|
+
];
|
|
36
|
+
if (args.runtime) command.push("--runtime", commandArgument(args.runtime));
|
|
37
|
+
if (args.subcommand === "rollback" && args.fromRuntime) command.push("--from-runtime", commandArgument(args.fromRuntime));
|
|
38
|
+
if ("dashboardUrl" in args && args.dashboardUrl) command.push("--dashboard-url", commandArgument(args.dashboardUrl));
|
|
39
|
+
if (args.yes) command.push("--yes");
|
|
40
|
+
return command.join(" ");
|
|
41
|
+
}
|
|
26
42
|
async function runInstalledPlatformCommand(args) {
|
|
27
43
|
if (args.subcommand !== "upgrade" && args.subcommand !== "rollback" && args.subcommand !== "repair" && args.subcommand !== "disable" && args.subcommand !== "enable" && args.subcommand !== "uninstall") throw new Error(`platform: Unsupported lifecycle command ${args.subcommand}.`);
|
|
28
44
|
assertNoninteractivePlatformMutationAcknowledged(args, process.stdin.isTTY === true);
|
|
@@ -94,11 +110,16 @@ async function runInstalledPlatformCommand(args) {
|
|
|
94
110
|
markPhase("plan");
|
|
95
111
|
note(formatPlatformInstallPlan(plan), args.subcommand === "upgrade" ? "Upgrade plan" : args.subcommand === "rollback" ? "Rollback plan" : args.subcommand === "enable" ? "Enable plan" : "Repair plan");
|
|
96
112
|
note([
|
|
97
|
-
`Version: ${runtime.manifest.platformVersion}`,
|
|
113
|
+
`Version: ${manifest.platformVersion} → ${runtime.manifest.platformVersion}`,
|
|
98
114
|
`Source: ${runtime.source}`,
|
|
99
115
|
`Revision: ${runtime.manifest.sourceRevision ?? "not recorded"}`,
|
|
100
116
|
`Manifest SHA-256: ${runtime.manifestSha256}`
|
|
101
117
|
].join("\n"), "Platform runtime");
|
|
118
|
+
note([
|
|
119
|
+
manifest.desiredState === "disabled" && args.subcommand !== "enable" ? "Application traffic will stay paused because this installation is disabled." : "Application traffic may pause during a safe cutover. Traffic resumes after verification.",
|
|
120
|
+
"Saved progress survives an interruption. Resume with the same runtime files.",
|
|
121
|
+
`Administrator status: ${plan.apiUrl}/admin/status`
|
|
122
|
+
].join("\n"), "Availability and progress");
|
|
102
123
|
if (args.plan) {
|
|
103
124
|
outro("No Cloudflare or local installation state was changed.");
|
|
104
125
|
return;
|
|
@@ -165,6 +186,7 @@ async function runInstalledPlatformCommand(args) {
|
|
|
165
186
|
progress?.message(message);
|
|
166
187
|
},
|
|
167
188
|
runtime,
|
|
189
|
+
operation: args.subcommand,
|
|
168
190
|
replanWorkers: async (recoveryManifest) => (await createPlatformInstallPlan(client, planInput, recoveryManifest, {
|
|
169
191
|
authoritativeProvisionIntents: true,
|
|
170
192
|
repairMissing: true,
|
|
@@ -183,14 +205,22 @@ async function runInstalledPlatformCommand(args) {
|
|
|
183
205
|
progress?.stop(result.waitingForDns || result.waitingForSandboxDrain ? "Platform operation paused; progress is saved." : `Platform ${args.subcommand} complete.`);
|
|
184
206
|
progress = void 0;
|
|
185
207
|
if (result.waitingForDns) {
|
|
186
|
-
note(`Wait for ${deployment.application.zoneName} to become active, then
|
|
208
|
+
note(`Wait for ${deployment.application.zoneName} to become active, then resume:\n${platformLifecycleResumeCommand(args, manifest.id)}`, "Waiting for nameservers");
|
|
187
209
|
return;
|
|
188
210
|
}
|
|
189
211
|
if (result.waitingForSandboxDrain) {
|
|
190
|
-
note(
|
|
212
|
+
note([
|
|
213
|
+
"Application traffic is paused. Saved progress is ready to resume.",
|
|
214
|
+
"1. Review remaining Sandbox work: void platform system sandbox-drain --plan",
|
|
215
|
+
"2. Apply: void platform system sandbox-drain --yes (follow nextCursor with --cursor '<value>' until complete: true).",
|
|
216
|
+
`3. Resume: ${platformLifecycleResumeCommand(args, manifest.id)}`,
|
|
217
|
+
`Administrator status: ${plan.apiUrl}/admin/status`
|
|
218
|
+
].join("\n"), "Waiting for managed Sandbox drain");
|
|
191
219
|
return;
|
|
192
220
|
}
|
|
193
|
-
log.success(
|
|
221
|
+
log.success(`${deployment.displayName}: runtime ${runtime.manifest.platformVersion} ${args.subcommand === "rollback" ? "restored" : "ready"}.`);
|
|
222
|
+
log.info(result.manifest.desiredState === "disabled" ? "Application traffic remains paused. Enable the installation when you are ready." : `Platform verification passed. Traffic is enabled at ${plan.apiUrl}.`);
|
|
223
|
+
if (args.subcommand === "rollback") log.info("PostgreSQL migrations were retained; rollback changes the runtime only.");
|
|
194
224
|
if (result.emailOperationId) log.info(`Shared email routing ready (operation ${result.emailOperationId}).`);
|
|
195
225
|
if (result.setupPending) {
|
|
196
226
|
const code = readInstallationRecoverySecrets(result.manifest)?.authBootstrapCode;
|
|
@@ -226,8 +256,15 @@ async function runInstalledPlatformCommand(args) {
|
|
|
226
256
|
reportResult?.();
|
|
227
257
|
markPhase("complete");
|
|
228
258
|
} catch (error) {
|
|
259
|
+
const operationStarted = progress !== void 0;
|
|
229
260
|
progress?.error(`Platform ${args.subcommand} failed.`);
|
|
230
261
|
progress = void 0;
|
|
262
|
+
if (operationStarted && args.subcommand !== "uninstall" && args.subcommand !== "disable") note([
|
|
263
|
+
"Traffic may remain paused. Inspect the saved state before continuing:",
|
|
264
|
+
`void platform status ${commandArgument(manifest.id)}`,
|
|
265
|
+
"After resolving the error, resume with the same runtime:",
|
|
266
|
+
platformLifecycleResumeCommand(args, manifest.id)
|
|
267
|
+
].join("\n"), "Recovery");
|
|
231
268
|
throw error;
|
|
232
269
|
} finally {
|
|
233
270
|
try {
|
|
@@ -791,4 +828,4 @@ async function promptForConfirmation(message, initialValue) {
|
|
|
791
828
|
return answer;
|
|
792
829
|
}
|
|
793
830
|
//#endregion
|
|
794
|
-
export {
|
|
831
|
+
export { recoverDurablyMarkedProvisionIntents as a, runInstalledPlatformCommand as c, verifyPlatformInstallationOwnership as d, platformLifecycleResumeCommand as i, selectAuthoritativePlatformManifest as l, disablePlatform as n, resolveInstalledPlatformManifest as o, isPlatformManifestMonotonicExtension as r, resolvePlatformRuntimeTokenToPreflight as s, assertPlatformRollbackCompatibility as t, uninstallPlatform as u };
|
|
@@ -0,0 +1,2 @@
|
|
|
1
|
+
import { c as runInstalledPlatformCommand, d as verifyPlatformInstallationOwnership, l as selectAuthoritativePlatformManifest } from "./platform-management-BSEc_ZeG.mjs";
|
|
2
|
+
export { runInstalledPlatformCommand, selectAuthoritativePlatformManifest, verifyPlatformInstallationOwnership };
|
|
@@ -1,6 +1,6 @@
|
|
|
1
|
-
import { A as confirm, K as select, X as text, tt as isCancel } from "./prompts-
|
|
2
|
-
import { n as OperatorClient, r as OperatorClientError } from "./operator-client-
|
|
3
|
-
import { a as resolveOperatorOrigin, r as readOperatorToken } from "./operator-auth-
|
|
1
|
+
import { A as confirm, K as select, X as text, tt as isCancel } from "./prompts-6OSVA7DJ.mjs";
|
|
2
|
+
import { n as OperatorClient, r as OperatorClientError } from "./operator-client-LmwjxT6q.mjs";
|
|
3
|
+
import { a as resolveOperatorOrigin, r as readOperatorToken } from "./operator-auth-CkmTE3rt.mjs";
|
|
4
4
|
import { stripVTControlCharacters } from "node:util";
|
|
5
5
|
import { PLAN_EDITABLE_LIMIT_KEYS, PLAN_LIMITS, parseBuildInstanceType, parsePlanLimitsPatch, parsePlanName, parsePlatformPlanId } from "@void/platform/plans";
|
|
6
6
|
import { readFile } from "node:fs/promises";
|
|
@@ -1,7 +1,7 @@
|
|
|
1
|
+
import { _ as savePlatformConnection, a as listInstallationManifests, t as acquirePlatformLifecycleLock, y as writeInstallationManifest } from "./platform-registry-KfNEF84O.mjs";
|
|
1
2
|
import { t as cfAccessHeaders } from "./cf-access-TWNzXltp.mjs";
|
|
2
|
-
import {
|
|
3
|
-
import { a as
|
|
4
|
-
import { i as recoverDurablyMarkedProvisionIntents, r as isPlatformManifestMonotonicExtension, u as verifyPlatformInstallationOwnership } from "./platform-management-CWOQOWXm.mjs";
|
|
3
|
+
import { a as REMOTE_INSTALLATION_MANIFEST_KEY, y as createPlatformInstallPlan } from "./platform-lifecycle-Dm09JNkn.mjs";
|
|
4
|
+
import { a as recoverDurablyMarkedProvisionIntents, d as verifyPlatformInstallationOwnership, r as isPlatformManifestMonotonicExtension } from "./platform-management-BSEc_ZeG.mjs";
|
|
5
5
|
import { parsePlatformInstallationManifest, setInstallationEndpoints } from "@void/platform";
|
|
6
6
|
//#region src/cli/platform-recovery.ts
|
|
7
7
|
async function recoverPlatformInstallations(client, accountId, verifyEndpoint = verifyInstallationEndpoint, selector = "") {
|
|
@@ -1,10 +1,8 @@
|
|
|
1
|
-
import { B as note, H as outro, L as log
|
|
2
|
-
import { r as cliTitle } from "./output-CbM85T4k.mjs";
|
|
1
|
+
import { B as note, H as outro, L as log } from "./prompts-6OSVA7DJ.mjs";
|
|
3
2
|
import { t as prepareProject } from "./prepare-DnaKBi--.mjs";
|
|
4
3
|
//#region src/cli/prepare.ts
|
|
5
4
|
async function runPrepareCommand(root, _args) {
|
|
6
5
|
console.log();
|
|
7
|
-
intro(cliTitle("prepare"));
|
|
8
6
|
const result = await prepareProject(root);
|
|
9
7
|
if (result.written.length > 0) note(result.written.join("\n"), "Wrote");
|
|
10
8
|
if (result.removed.length > 0) note(result.removed.join("\n"), "Removed stale files");
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import { a as join, n as dirname } from "./dist-BVqXeR_h.mjs";
|
|
2
|
-
import { o as listPlatformConnections, s as normalizePlatformApiUrl } from "./platform-registry-
|
|
2
|
+
import { o as listPlatformConnections, s as normalizePlatformApiUrl } from "./platform-registry-KfNEF84O.mjs";
|
|
3
3
|
import { mkdirSync, readFileSync, rmSync, writeFileSync } from "node:fs";
|
|
4
4
|
import { normalizeApplicationDomain } from "@void/platform";
|
|
5
5
|
//#region src/cli/project.ts
|
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
import { l as writeProjectConfig, t as attachSelectedPlatform } from "./project-
|
|
1
|
+
import { l as writeProjectConfig, t as attachSelectedPlatform } from "./project-BkbfDs0V.mjs";
|
|
2
2
|
export { attachSelectedPlatform, writeProjectConfig };
|
|
@@ -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-BkbfDs0V.mjs";
|
|
2
|
+
import { c as getToken, s as getSiteDomain } from "./auth-7wuZ5ob8.mjs";
|
|
3
|
+
import { H as outro, L as log } from "./prompts-6OSVA7DJ.mjs";
|
|
4
|
+
import { r as PlatformClient } from "./client-RsPo8wsP.mjs";
|
|
5
|
+
import { c as import_picocolors, d as tablePrefix, i as dim, o as formatCount } from "./output-BBsUwdyT.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-eEWVJEPn.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-CXOlqh2F.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-eEWVJEPn.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-CP01Jna6.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-DPGBwomV.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-ohAWWaew.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-DPGBwomV.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-BzkVgx35.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-DnxVX7TR.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-B3PBuGlX.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-DDub9GsO.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-CYoZmcmR.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-pKMVsrpJ.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-TcZnBLtH.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 { B as note, H as outro, L as log
|
|
4
|
-
import {
|
|
5
|
-
import {
|
|
1
|
+
import { r as readProjectConfig } from "./project-BkbfDs0V.mjs";
|
|
2
|
+
import { c as getToken, i as getAccountCredential } from "./auth-7wuZ5ob8.mjs";
|
|
3
|
+
import { B as note, 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-RsPo8wsP.mjs";
|
|
5
|
+
import { o as formatCount } from "./output-BBsUwdyT.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-BkbfDs0V.mjs";
|
|
2
|
+
import { c as getToken } from "./auth-7wuZ5ob8.mjs";
|
|
3
|
+
import { H as outro, L as log } from "./prompts-6OSVA7DJ.mjs";
|
|
4
|
+
import { r as PlatformClient } from "./client-RsPo8wsP.mjs";
|
|
5
|
+
import { d as tablePrefix, i as dim } from "./output-BBsUwdyT.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 { B as note, H as outro, L as log
|
|
4
|
-
import {
|
|
5
|
-
import { l as sanitizeTerminalText
|
|
1
|
+
import { r as readProjectConfig } from "./project-BkbfDs0V.mjs";
|
|
2
|
+
import { c as getToken } from "./auth-7wuZ5ob8.mjs";
|
|
3
|
+
import { B as note, H as outro, L as log } from "./prompts-6OSVA7DJ.mjs";
|
|
4
|
+
import { r as PlatformClient } from "./client-RsPo8wsP.mjs";
|
|
5
|
+
import { l as sanitizeTerminalText } from "./output-BBsUwdyT.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,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-Btj1jppf.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";
|
|
@@ -1430,9 +1431,6 @@ function parseJsonArrayStrict(value) {
|
|
|
1430
1431
|
function parseJsonObject(value) {
|
|
1431
1432
|
return isRecord(value) ? value : void 0;
|
|
1432
1433
|
}
|
|
1433
|
-
function isRecord(value) {
|
|
1434
|
-
return typeof value === "object" && value !== null && !Array.isArray(value);
|
|
1435
|
-
}
|
|
1436
1434
|
/**
|
|
1437
1435
|
* Read the single provisioned binding entry for `field`/`binding` from the resolved
|
|
1438
1436
|
* config, delegating to the STRICT canonical reader in `wrangler.ts`
|
|
@@ -1533,7 +1531,7 @@ function reconcileD1IdAliases(entry) {
|
|
|
1533
1531
|
* exact-match rule so no sibling gap remains.
|
|
1534
1532
|
*/
|
|
1535
1533
|
function normalizeD1(entry, requestedName) {
|
|
1536
|
-
if (
|
|
1534
|
+
if (entry === void 0) return { kind: "other" };
|
|
1537
1535
|
const names = [entry.name, entry.database_name].filter((value) => typeof value === "string" && value.length > 0);
|
|
1538
1536
|
if (!names.includes(requestedName)) return { kind: "other" };
|
|
1539
1537
|
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-BkbfDs0V.mjs";
|
|
2
|
+
import { c as getToken } from "./auth-7wuZ5ob8.mjs";
|
|
3
|
+
import { H as outro, L as log } from "./prompts-6OSVA7DJ.mjs";
|
|
4
|
+
import { r as PlatformClient } from "./client-RsPo8wsP.mjs";
|
|
5
|
+
import { c as import_picocolors, i as dim } from "./output-BBsUwdyT.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.");
|