void 0.23.0 → 0.24.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/AGENTS_TEMPLATE.md +1 -1
- package/dist/{account-cmd-C84Ee8cO.mjs → account-cmd-vJhh5lrb.mjs} +5 -5
- package/dist/{auth-CSkdO2Bb.mjs → auth-CQkSDS50.mjs} +22 -49
- package/dist/auth-DX3JURcX.mjs +2 -0
- package/dist/{auth-link-CioEg6uY.mjs → auth-link-D75t9wO2.mjs} +5 -5
- package/dist/{auth-router-BsR981d4.mjs → auth-router-ClfhL1J7.mjs} +7 -7
- package/dist/{build-cmd-LzvNJORH.mjs → build-cmd-zMi1iFnS.mjs} +6 -6
- package/dist/{cache-C4MvnrMH.mjs → cache-ZtQmyxVV.mjs} +5 -5
- package/dist/{cancel-deploy-abUxpP2n.mjs → cancel-deploy-Box0kkEV.mjs} +5 -5
- package/dist/{cf-access-P0iZnu0q.mjs → cf-access-BGe5sWXF.mjs} +4 -48
- package/dist/{cf-access-DRsQRe6k.mjs → cf-access-TWNzXltp.mjs} +3 -11
- package/dist/cli/cli.mjs +47 -44
- package/dist/cli/cloudflare-operation-process.mjs +14 -5
- package/dist/cli/env-schema-probe.mjs +3 -3
- package/dist/client-B9UBI03V.mjs +2 -0
- package/dist/{client-RV8NVeB8.mjs → client-DKAsFA4X.mjs} +33 -15
- package/dist/{cloudflare-cmd-BcrVyTmJ.mjs → cloudflare-cmd-CmY8dGkd.mjs} +1 -1
- package/dist/{cloudflare-connect-B8uPZ4nx.mjs → cloudflare-connect-IiR3ZieC.mjs} +1 -1
- package/dist/{cloudflare-operations-AiWashgg.mjs → cloudflare-operations-BCdXSsmo.mjs} +1 -1
- package/dist/{cloudflare-operations-fxHb-byx.mjs → cloudflare-operations-DzH-A966.mjs} +1 -1
- package/dist/{connect-Bd4kJd9U.mjs → connect-B-usTnlF.mjs} +9 -9
- package/dist/{create-project-bMf6ffLZ.mjs → create-project-CYOOAYcn.mjs} +12 -12
- package/dist/{create-project-Boczwj5r.mjs → create-project-FWbf5Olo.mjs} +1 -1
- package/dist/{db-8uG64XLl.mjs → db-Ck2eZ2iB.mjs} +15 -15
- package/dist/{delete-NvbiyeJf.mjs → delete-sK56qtzZ.mjs} +5 -5
- package/dist/{deploy-DzAIwqNU.mjs → deploy-gCVaiJbS.mjs} +86 -44
- package/dist/{deploy-bjXdFCtn.mjs → deploy-irP5q0-x.mjs} +1 -1
- package/dist/{domain-y5Tvydvo.mjs → domain-DFfQE8jg.mjs} +6 -6
- package/dist/{email-B3umsW75.mjs → email-CdnhUHvJ.mjs} +7 -7
- package/dist/{env-BS6qYHDb.mjs → env-DmGdHi5i.mjs} +8 -8
- package/dist/{env-types-C2_bIk_b.mjs → env-types-D5kds_OZ.mjs} +1 -1
- package/dist/{env-validation-BPn7vk-V.mjs → env-validation-C_8tPdhs.mjs} +2 -2
- package/dist/{env-validation-DbTg7-ar.mjs → env-validation-zZOCcQVZ.mjs} +1 -1
- package/dist/{gen-B580--vC.mjs → gen-CshAkukR.mjs} +2 -2
- package/dist/gen-DvQTWzDU.mjs +2 -0
- package/dist/{github-cmd-v45BdfKX.mjs → github-cmd-DftuEvIt.mjs} +13 -13
- package/dist/{headers-DWi2IXWx.mjs → headers-2rKda9Y6.mjs} +1 -1
- package/dist/{help-daGKjXGk.mjs → help-Dotbf6iz.mjs} +8 -4
- package/dist/help-mabuIV98.mjs +2 -0
- package/dist/{inbound-aVHEUhKo.mjs → inbound-fRkqcXaC.mjs} +1 -1
- package/dist/index.mjs +16 -20
- package/dist/{init-Bvy7zrBo.mjs → init-BTQEZZGJ.mjs} +25 -22
- package/dist/{link-CDqqCjFl.mjs → link-B46sYH0K.mjs} +6 -6
- package/dist/{list-CZj0dzKY.mjs → list-BnPrIsU_.mjs} +6 -6
- package/dist/log-vqY3pqwI.mjs +29 -0
- package/dist/{login-UZKFM_u7.mjs → login-BuiMyUrx.mjs} +8 -8
- package/dist/login-DIy9Sb-U.mjs +2 -0
- package/dist/{logs-CUZ6t9t3.mjs → logs-CZG9d-ic.mjs} +10 -11
- package/dist/migrate-BCiJ8w0f.mjs +2 -0
- package/dist/{migrate-DHul7PRV.mjs → migrate-q4_njtaW.mjs} +2 -2
- package/dist/{operator-args-CLgKGlwU.mjs → operator-args-B3BTmSoi.mjs} +12 -5
- package/dist/{operator-auth-8KnOVXVd.mjs → operator-auth-7erYc6Lt.mjs} +2 -2
- package/dist/{operator-client-DUwumHpQ.mjs → operator-client-CpHjTd0t.mjs} +3 -3
- package/dist/{operator-cmd-DBA6dl0m.mjs → operator-cmd-DGqPJUD3.mjs} +6 -6
- package/dist/{output-Dm_A4Tbv.mjs → output-CbM85T4k.mjs} +18 -10
- package/dist/pages/index.mjs +1 -1
- package/dist/{platform-args-BJdRtlLq.mjs → platform-args-3k8X9-H_.mjs} +11 -3
- package/dist/platform-args-DdnM6WIf.mjs +2 -0
- package/dist/{platform-auth-config-B56E9YP1.mjs → platform-auth-config-DDrxUy4m.mjs} +6 -6
- package/dist/{platform-auth-protection-BDWO_aER.mjs → platform-auth-protection-BLadnnct.mjs} +8 -8
- package/dist/{platform-auth-recovery-1gg4CSRe.mjs → platform-auth-recovery-CmCzX2Fl.mjs} +6 -6
- package/dist/{platform-cmd-DMcQStSc.mjs → platform-cmd-DMDEc9uS.mjs} +10 -10
- package/dist/{platform-cmd-Bt-1w6pY.mjs → platform-cmd-pMTRhvYs.mjs} +1 -1
- package/dist/{platform-domain-BNkcz0OB.mjs → platform-domain-Di6EYrQl.mjs} +5 -5
- package/dist/{platform-lifecycle-9OyBALhH.mjs → platform-lifecycle-BBoNzojY.mjs} +1264 -407
- package/dist/{platform-lifecycle-BE6C_jxh.mjs → platform-lifecycle-BFdSi9Qt.mjs} +1 -1
- package/dist/{platform-management-CjwLVQwN.mjs → platform-management-CWOQOWXm.mjs} +5 -5
- package/dist/{platform-management-CnyTdcWX.mjs → platform-management-DG47jys8.mjs} +1 -1
- package/dist/{platform-plans-config-BNGKGr4P.mjs → platform-plans-config-Vl9BP3H4.mjs} +3 -3
- package/dist/{platform-recovery-D6KSpuFm.mjs → platform-recovery-BJnQJEtQ.mjs} +4 -4
- package/dist/{platform-registry-QBa4DK32.mjs → platform-registry-DkPPXfp_.mjs} +2 -2
- package/dist/{prepare-B5Mkic5u.mjs → prepare-CBLT3CHH.mjs} +3 -3
- package/dist/prepare-CnjcTV2s.mjs +2 -0
- package/dist/{prepare-DOsL0CC9.mjs → prepare-DnaKBi--.mjs} +1 -1
- package/dist/{project-C0Fqu05O.mjs → project-DKG5Ra8p.mjs} +15 -82
- package/dist/project-DsblYifa.mjs +2 -0
- package/dist/{project-cmd-CNzrqvBv.mjs → project-cmd-DxnXstAq.mjs} +19 -19
- package/dist/{project-team-DQOWPfQT.mjs → project-team-BmHcaALJ.mjs} +5 -5
- package/dist/{project-token-CTDYU0Cc.mjs → project-token-GionZlBI.mjs} +5 -5
- package/dist/{project-zero-trust-BNAkW-_0.mjs → project-zero-trust-JLCjVQA7.mjs} +5 -5
- package/dist/prompts-2TGE6oXx.mjs +2 -0
- package/dist/prompts-BNUoTiaf.mjs +2044 -0
- package/dist/{provision-C4ORE7G7.mjs → provision-CVku1JFU.mjs} +1 -1
- package/dist/{provision-CJFgTZY8.mjs → provision-CaoxO_U7.mjs} +1 -1
- package/dist/{requests-MhxYnau8.mjs → requests-BOjIVAeF.mjs} +5 -5
- package/dist/{rollback-CJ6iSDoU.mjs → rollback-CwR3pLj3.mjs} +6 -6
- package/dist/runtime/ai.mjs +3 -5
- package/dist/runtime/email/testing.mjs +1 -1
- package/dist/runtime/email.mjs +1 -1
- package/dist/runtime/remote/index.mjs +2 -2
- package/dist/{secret-Dli5fP0B.mjs → secret-ByWJWBUG.mjs} +7 -7
- package/dist/{skills-D1II1Juz.mjs → skills-C1PlclPt.mjs} +1 -1
- package/dist/{subcommand-prompt-CY1C4fvl.mjs → subcommand-prompt-klFCfcor.mjs} +40 -32
- package/package.json +8 -9
- package/skills/void/SKILL.md +6 -1
- package/skills/void/docs/guide/deployment.md +22 -0
- package/skills/void/docs/guide/edge/headers.md +1 -1
- package/skills/void/docs/guide/email/domains.md +5 -1
- package/skills/void/docs/guide/email/sending.md +1 -1
- package/skills/void/docs/guide/platform/administration/zero-trust.md +27 -9
- package/skills/void/docs/guide/platform/installation/ci.md +1 -1
- package/skills/void/docs/guide/platform/installation/credentials.md +10 -3
- package/skills/void/docs/guide/platform/installation/domains.md +8 -3
- package/skills/void/docs/guide/platform/installation/first-deployment.md +2 -2
- package/skills/void/docs/guide/platform/installation/maintenance.md +12 -0
- package/skills/void/docs/guide/platform/installation/prerequisites.md +8 -7
- package/skills/void/docs/guide/platform/installation/setup.md +80 -10
- package/skills/void/docs/guide/remote-dev.md +1 -1
- package/skills/void/docs/reference/cli/auth.md +4 -3
- package/skills/void/docs/reference/cli/database.md +1 -1
- package/skills/void/docs/reference/cli/deploy.md +20 -0
- package/skills/void/docs/reference/cli/platform-installation.md +42 -27
- package/skills/void/docs/reference/cli/platform-zero-trust.md +14 -0
- package/skills/void/docs/reference/config.md +1 -1
- package/dist/auth-CCjt0hcq.mjs +0 -2
- package/dist/client-Cu7jWiF1.mjs +0 -2
- package/dist/dist-BuDuKZJv.mjs +0 -2
- package/dist/dist-CTBk70IR.mjs +0 -1310
- package/dist/gen-BVaUUumi.mjs +0 -2
- package/dist/help-DofyZuY7.mjs +0 -2
- package/dist/log-ChfPKsVd.mjs +0 -26
- package/dist/login-DYt_An22.mjs +0 -2
- package/dist/migrate-8_2u55MD.mjs +0 -2
- package/dist/platform-args-D3RXyR6h.mjs +0 -2
- package/dist/prepare-cgvDMtSb.mjs +0 -2
- package/dist/project-BuUwfj6f.mjs +0 -2
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
import { r as runPlatformLifecycleCommand } from "./platform-lifecycle-
|
|
1
|
+
import { r as runPlatformLifecycleCommand } from "./platform-lifecycle-BBoNzojY.mjs";
|
|
2
2
|
export { runPlatformLifecycleCommand };
|
|
@@ -1,7 +1,7 @@
|
|
|
1
|
-
import { a as listInstallationManifests,
|
|
2
|
-
import {
|
|
3
|
-
import { i as createSpinner } from "./output-
|
|
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 loadPlatformRuntime, g as assertProjectZeroTrustAllowsUninstall, h as resolveBootstrapGitHubId, j as hyperdriveOriginConfigHash, l as createPlatformInstallationSecrets, n as resolvePlatformInstallDatabaseUrl, o as acquirePlatformDatabaseLifecycleLock, p as readPlatformProjectZeroTrustState, t as assertNoninteractivePlatformMutationAcknowledged, u as installPlatform, v as trackedPlatformWorkerTraffic, w as platformDatabaseNameFromOwnerUrl, x as platformAdoptionIntentHash, y as createPlatformInstallPlan } from "./platform-lifecycle-
|
|
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-DkPPXfp_.mjs";
|
|
2
|
+
import { A as confirm, B as note, H as outro, K as select, L as log, tt as isCancel } from "./prompts-BNUoTiaf.mjs";
|
|
3
|
+
import { i as createSpinner } from "./output-CbM85T4k.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 loadPlatformRuntime, g as assertProjectZeroTrustAllowsUninstall, h as resolveBootstrapGitHubId, j as hyperdriveOriginConfigHash, l as createPlatformInstallationSecrets, n as resolvePlatformInstallDatabaseUrl, o as acquirePlatformDatabaseLifecycleLock, p as readPlatformProjectZeroTrustState, t as assertNoninteractivePlatformMutationAcknowledged, u as installPlatform, v as trackedPlatformWorkerTraffic, w as platformDatabaseNameFromOwnerUrl, x as platformAdoptionIntentHash, y as createPlatformInstallPlan } from "./platform-lifecycle-BBoNzojY.mjs";
|
|
5
5
|
import { createHash } from "node:crypto";
|
|
6
6
|
import { PLATFORM_DISABLED_KEY, PLATFORM_DISABLED_VALUE, PLATFORM_R2_OWNERSHIP_MARKER_KEY, createPlatformResourceOwnershipMarker, parsePlatformInstallationManifest, parsePlatformResourceOwnershipMarker, recordInstallationResource, recordInstallationStep, setInstallationDesiredState, transitionInstallation } from "@void/platform";
|
|
7
7
|
//#region src/cli/platform-management.ts
|
|
@@ -35,7 +35,7 @@ async function runInstalledPlatformCommand(args) {
|
|
|
35
35
|
timingPrevious = current;
|
|
36
36
|
};
|
|
37
37
|
const manifest = await resolveInstalledPlatformManifest(args.selector);
|
|
38
|
-
const operatorCredential = await resolvePlatformCloudflareCredential();
|
|
38
|
+
const operatorCredential = await resolvePlatformCloudflareCredential({ savedManagementToken: readInstallationRecoverySecrets(manifest)?.managementApiToken });
|
|
39
39
|
const operatorClient = new PlatformCloudflareClient(operatorCredential.token);
|
|
40
40
|
const runtime = args.subcommand === "uninstall" || args.subcommand === "disable" ? null : loadPlatformRuntime(args.runtime);
|
|
41
41
|
const rollbackSourceRuntime = args.subcommand === "rollback" ? loadPlatformRuntime(args.fromRuntime) : null;
|
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
import { c as selectAuthoritativePlatformManifest, s as runInstalledPlatformCommand, u as verifyPlatformInstallationOwnership } from "./platform-management-
|
|
1
|
+
import { c as selectAuthoritativePlatformManifest, s as runInstalledPlatformCommand, u as verifyPlatformInstallationOwnership } from "./platform-management-CWOQOWXm.mjs";
|
|
2
2
|
export { runInstalledPlatformCommand, selectAuthoritativePlatformManifest, verifyPlatformInstallationOwnership };
|
|
@@ -1,6 +1,6 @@
|
|
|
1
|
-
import {
|
|
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-BNUoTiaf.mjs";
|
|
2
|
+
import { n as OperatorClient, r as OperatorClientError } from "./operator-client-CpHjTd0t.mjs";
|
|
3
|
+
import { a as resolveOperatorOrigin, r as readOperatorToken } from "./operator-auth-7erYc6Lt.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 { t as cfAccessHeaders } from "./cf-access-
|
|
2
|
-
import {
|
|
3
|
-
import { a as REMOTE_INSTALLATION_MANIFEST_KEY, y as createPlatformInstallPlan } from "./platform-lifecycle-
|
|
4
|
-
import { i as recoverDurablyMarkedProvisionIntents, r as isPlatformManifestMonotonicExtension, u as verifyPlatformInstallationOwnership } from "./platform-management-
|
|
1
|
+
import { t as cfAccessHeaders } from "./cf-access-TWNzXltp.mjs";
|
|
2
|
+
import { _ as savePlatformConnection, a as listInstallationManifests, t as acquirePlatformLifecycleLock, y as writeInstallationManifest } from "./platform-registry-DkPPXfp_.mjs";
|
|
3
|
+
import { a as REMOTE_INSTALLATION_MANIFEST_KEY, y as createPlatformInstallPlan } from "./platform-lifecycle-BBoNzojY.mjs";
|
|
4
|
+
import { i as recoverDurablyMarkedProvisionIntents, r as isPlatformManifestMonotonicExtension, u as verifyPlatformInstallationOwnership } from "./platform-management-CWOQOWXm.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 = "") {
|
|
@@ -66,7 +66,7 @@ function parseConnection(value) {
|
|
|
66
66
|
const lastUsedAt = String(entry.lastUsedAt ?? "");
|
|
67
67
|
if (!Number.isFinite(Date.parse(lastUsedAt))) throw new Error("platform: Invalid connection timestamp in the local registry.");
|
|
68
68
|
const optionalString = (input) => typeof input === "string" && input !== "" ? input : null;
|
|
69
|
-
const proxyUrl = optionalString(entry.proxyUrl)
|
|
69
|
+
const proxyUrl = optionalString(entry.proxyUrl);
|
|
70
70
|
return {
|
|
71
71
|
accountId: optionalString(entry.accountId),
|
|
72
72
|
apiUrl,
|
|
@@ -428,4 +428,4 @@ function removePlatformConnectionForInstallation(installationId, directory = pla
|
|
|
428
428
|
});
|
|
429
429
|
}
|
|
430
430
|
//#endregion
|
|
431
|
-
export { writeKeyringPassword as S,
|
|
431
|
+
export { writeKeyringPassword as C, readKeyringPassword as S, savePlatformConnection as _, listInstallationManifests as a, writePendingInstallationSecrets as b, platformCredentialAccount as c, promoteInstallationSecrets as d, readInstallationRecoverySecrets as f, resolveInstallationManifest as g, removePlatformConnectionForInstallation as h, latestPlatformWorkerCutoverGeneration as i, platformRegistryDirectory as l, removeInstallationRecoverySecrets as m, assertPlatformInstallationSlugAvailable as n, listPlatformConnections as o, readPendingInstallationSecrets as p, getActivePlatformConnection as r, normalizePlatformApiUrl as s, acquirePlatformLifecycleLock as t, platformWorkerSecretUpdateIntentState as u, selectPlatformConnection as v, deleteKeyringPassword as x, writeInstallationManifest as y };
|
|
@@ -1,6 +1,6 @@
|
|
|
1
|
-
import {
|
|
2
|
-
import { r as cliTitle } from "./output-
|
|
3
|
-
import { t as prepareProject } from "./prepare-
|
|
1
|
+
import { B as note, H as outro, L as log, N as intro } from "./prompts-BNUoTiaf.mjs";
|
|
2
|
+
import { r as cliTitle } from "./output-CbM85T4k.mjs";
|
|
3
|
+
import { t as prepareProject } from "./prepare-DnaKBi--.mjs";
|
|
4
4
|
//#region src/cli/prepare.ts
|
|
5
5
|
async function runPrepareCommand(root, _args) {
|
|
6
6
|
console.log();
|
|
@@ -4,7 +4,7 @@ import { m as readConfig } from "./config-Br_JZD6u.mjs";
|
|
|
4
4
|
import { n as ensureProjectTsconfig, r as writeFileIfChanged } from "./project-tsconfig-B8GeM0RM.mjs";
|
|
5
5
|
import { i as generateDbDts, n as generateQueueTypes, t as generateRouteTypes } from "./route-types-Clm4WD0B.mjs";
|
|
6
6
|
import { t as discoverSchema } from "./discover-BcPPiF1o.mjs";
|
|
7
|
-
import { r as generateEnvTypes, t as findEnvFile } from "./env-types-
|
|
7
|
+
import { r as generateEnvTypes, t as findEnvFile } from "./env-types-D5kds_OZ.mjs";
|
|
8
8
|
import { a as loadLocalEnv } from "./env-_v349JBd.mjs";
|
|
9
9
|
import { t as analyzeApplication } from "./application-routing-B7QEjqSR.mjs";
|
|
10
10
|
import { n as generateVoidAuthDrizzleSchema, t as generateVoidAuthDatabaseModule } from "./drizzle-Beb2Am5S.mjs";
|
|
@@ -1,60 +1,7 @@
|
|
|
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-DkPPXfp_.mjs";
|
|
3
3
|
import { mkdirSync, readFileSync, rmSync, writeFileSync } from "node:fs";
|
|
4
|
-
import { homedir } from "node:os";
|
|
5
4
|
import { normalizeApplicationDomain } from "@void/platform";
|
|
6
|
-
//#region src/cli/hosted-platform.ts
|
|
7
|
-
const VOID_CLOUD_PLATFORM = Object.freeze({
|
|
8
|
-
apiUrl: "https://api.void.cloud",
|
|
9
|
-
applicationDomain: "void.app",
|
|
10
|
-
displayName: "Void Cloud",
|
|
11
|
-
proxyUrl: "https://proxy.void.cloud"
|
|
12
|
-
});
|
|
13
|
-
const VOID_CLOUD_STAGING_PLATFORM = Object.freeze({
|
|
14
|
-
apiUrl: "https://api.staging.void.cloud",
|
|
15
|
-
applicationDomain: "staging.void.app",
|
|
16
|
-
displayName: "Void Cloud staging",
|
|
17
|
-
proxyUrl: "https://proxy.staging.void.cloud"
|
|
18
|
-
});
|
|
19
|
-
const HOSTED_PLATFORMS = [VOID_CLOUD_PLATFORM, VOID_CLOUD_STAGING_PLATFORM];
|
|
20
|
-
function hostedPlatformForApiUrl(apiUrl) {
|
|
21
|
-
if (typeof apiUrl !== "string") return null;
|
|
22
|
-
let normalized;
|
|
23
|
-
try {
|
|
24
|
-
const parsed = new URL(apiUrl);
|
|
25
|
-
if (parsed.protocol !== "https:" || parsed.username || parsed.password || parsed.search || parsed.hash || parsed.pathname !== "/" && parsed.pathname !== "") return null;
|
|
26
|
-
normalized = parsed.origin;
|
|
27
|
-
} catch {
|
|
28
|
-
return null;
|
|
29
|
-
}
|
|
30
|
-
return HOSTED_PLATFORMS.find((platform) => platform.apiUrl === normalized) ?? null;
|
|
31
|
-
}
|
|
32
|
-
/** Resolve an old ~/.void/config.json selection without returning credential values. */
|
|
33
|
-
function readLegacyHostedPlatformSelection(configPath = join(homedir(), ".void", "config.json")) {
|
|
34
|
-
let value = {};
|
|
35
|
-
try {
|
|
36
|
-
value = JSON.parse(readFileSync(configPath, "utf8"));
|
|
37
|
-
} catch {
|
|
38
|
-
return null;
|
|
39
|
-
}
|
|
40
|
-
if (value.api !== void 0) {
|
|
41
|
-
const platform = hostedPlatformForApiUrl(value.api);
|
|
42
|
-
return platform ? {
|
|
43
|
-
...platform,
|
|
44
|
-
source: "configured-api"
|
|
45
|
-
} : null;
|
|
46
|
-
}
|
|
47
|
-
if (typeof value.token === "string" && value.token !== "") return {
|
|
48
|
-
...VOID_CLOUD_PLATFORM,
|
|
49
|
-
source: "legacy-credential"
|
|
50
|
-
};
|
|
51
|
-
if (typeof value.stagingToken === "string" && value.stagingToken !== "") return {
|
|
52
|
-
...VOID_CLOUD_STAGING_PLATFORM,
|
|
53
|
-
source: "legacy-credential"
|
|
54
|
-
};
|
|
55
|
-
return null;
|
|
56
|
-
}
|
|
57
|
-
//#endregion
|
|
58
5
|
//#region src/cli/project.ts
|
|
59
6
|
const PROJECT_FILE = ".void/project.json";
|
|
60
7
|
function readProjectConfigFile(root) {
|
|
@@ -83,7 +30,6 @@ function readProjectConfig(root) {
|
|
|
83
30
|
if (typeof config.platformUrl === "string") result.platformUrl = normalizePlatformApiUrl(config.platformUrl);
|
|
84
31
|
if (typeof config.applicationDomain === "string") result.applicationDomain = normalizeApplicationDomain(config.applicationDomain);
|
|
85
32
|
if (typeof config.proxyUrl === "string") result.proxyUrl = normalizePlatformApiUrl(config.proxyUrl);
|
|
86
|
-
if (config.voidInternalStaging === true) result.voidInternalStaging = true;
|
|
87
33
|
return result;
|
|
88
34
|
}
|
|
89
35
|
/**
|
|
@@ -112,7 +58,6 @@ function writeDeploymentPlatform(root, platform) {
|
|
|
112
58
|
if (typeof existing?.applicationDomain === "string") next.applicationDomain = existing.applicationDomain;
|
|
113
59
|
if (typeof existing?.proxyUrl === "string") next.proxyUrl = existing.proxyUrl;
|
|
114
60
|
if (typeof existing?.slug === "string") next.slug = existing.slug;
|
|
115
|
-
if (existing?.voidInternalStaging === true) next.voidInternalStaging = true;
|
|
116
61
|
mkdirSync(dirname(filePath), { recursive: true });
|
|
117
62
|
writeFileSync(filePath, JSON.stringify(next, null, 2) + "\n");
|
|
118
63
|
}
|
|
@@ -120,12 +65,18 @@ function writeDeploymentPlatform(root, platform) {
|
|
|
120
65
|
function writePlatformSelection(root, connection) {
|
|
121
66
|
const existing = readProjectConfigFile(root);
|
|
122
67
|
const linked = readProjectConfig(root);
|
|
123
|
-
const pinnedUrl =
|
|
68
|
+
const pinnedUrl = linked?.platformUrl;
|
|
124
69
|
if (pinnedUrl && pinnedUrl !== connection.apiUrl) return false;
|
|
70
|
+
const metadata = { ...existing };
|
|
71
|
+
delete metadata.voidInternalStaging;
|
|
72
|
+
if (linked && !pinnedUrl) {
|
|
73
|
+
delete metadata.projectId;
|
|
74
|
+
delete metadata.slug;
|
|
75
|
+
}
|
|
125
76
|
const filePath = join(root, PROJECT_FILE);
|
|
126
77
|
mkdirSync(dirname(filePath), { recursive: true });
|
|
127
78
|
writeFileSync(filePath, JSON.stringify({
|
|
128
|
-
...
|
|
79
|
+
...metadata,
|
|
129
80
|
platform: "void",
|
|
130
81
|
platformUrl: normalizePlatformApiUrl(connection.apiUrl),
|
|
131
82
|
applicationDomain: normalizeApplicationDomain(connection.applicationDomain),
|
|
@@ -133,32 +84,19 @@ function writePlatformSelection(root, connection) {
|
|
|
133
84
|
}, null, 2) + "\n");
|
|
134
85
|
return true;
|
|
135
86
|
}
|
|
136
|
-
/**
|
|
137
|
-
* Internal-only platform developers' staging switch.
|
|
138
|
-
* This intentionally lives with the project link state, not public void.json.
|
|
139
|
-
*/
|
|
140
|
-
function isVoidInternalStaging(root) {
|
|
141
|
-
return readProjectConfigFile(root)?.voidInternalStaging === true;
|
|
142
|
-
}
|
|
143
87
|
function readProjectPlatformUrl(root) {
|
|
144
88
|
const value = readProjectConfigFile(root)?.platformUrl;
|
|
145
89
|
return typeof value === "string" && value !== "" ? normalizePlatformApiUrl(value) : null;
|
|
146
90
|
}
|
|
147
|
-
|
|
148
|
-
|
|
149
|
-
|
|
91
|
+
/** A deploy can establish a first link, but must never replace a saved destination. */
|
|
92
|
+
function shouldLinkDeployProject(root, apiUrl) {
|
|
93
|
+
const platform = readDeploymentPlatform(root);
|
|
94
|
+
const selectedUrl = readProjectPlatformUrl(root);
|
|
95
|
+
return !readProjectConfig(root) && platform !== "cloudflare" && platform !== "none" && (!selectedUrl || selectedUrl === normalizePlatformApiUrl(apiUrl));
|
|
150
96
|
}
|
|
151
97
|
/** Resolve the immutable platform identity that every newly linked project records. */
|
|
152
98
|
function attachSelectedPlatform(root, config, platformApiUrl) {
|
|
153
99
|
const apiUrl = normalizePlatformApiUrl(platformApiUrl);
|
|
154
|
-
const hosted = hostedPlatformForApiUrl(apiUrl);
|
|
155
|
-
if (hosted) return {
|
|
156
|
-
...config,
|
|
157
|
-
applicationDomain: hosted.applicationDomain,
|
|
158
|
-
platformUrl: hosted.apiUrl,
|
|
159
|
-
proxyUrl: hosted.proxyUrl,
|
|
160
|
-
...isVoidInternalStaging(root) && hosted.apiUrl === VOID_CLOUD_STAGING_PLATFORM.apiUrl ? { voidInternalStaging: true } : {}
|
|
161
|
-
};
|
|
162
100
|
const connection = listPlatformConnections().find((entry) => entry.apiUrl === apiUrl);
|
|
163
101
|
if (connection?.applicationDomain && connection.proxyUrl) return {
|
|
164
102
|
...config,
|
|
@@ -168,10 +106,6 @@ function attachSelectedPlatform(root, config, platformApiUrl) {
|
|
|
168
106
|
};
|
|
169
107
|
throw new Error(`platform: No verified metadata is registered for ${apiUrl}. Run \`void connect ${apiUrl}\` before linking a project.`);
|
|
170
108
|
}
|
|
171
|
-
function isLegacyVoidCloudProject(root) {
|
|
172
|
-
const config = readProjectConfigFile(root);
|
|
173
|
-
return typeof config?.projectId === "string" && typeof config.slug === "string" && typeof config.platformUrl !== "string";
|
|
174
|
-
}
|
|
175
109
|
/**
|
|
176
110
|
* Write the project config to the project root.
|
|
177
111
|
*/
|
|
@@ -189,7 +123,6 @@ function writeProjectConfig(root, config) {
|
|
|
189
123
|
else if (typeof existing?.applicationDomain === "string") next.applicationDomain = existing.applicationDomain;
|
|
190
124
|
if (config.proxyUrl) next.proxyUrl = normalizePlatformApiUrl(config.proxyUrl);
|
|
191
125
|
else if (typeof existing?.proxyUrl === "string") next.proxyUrl = existing.proxyUrl;
|
|
192
|
-
if (config.voidInternalStaging === true || existing?.voidInternalStaging === true) next.voidInternalStaging = true;
|
|
193
126
|
mkdirSync(dirname(filePath), { recursive: true });
|
|
194
127
|
writeFileSync(filePath, JSON.stringify(next, null, 2) + "\n");
|
|
195
128
|
}
|
|
@@ -206,4 +139,4 @@ function removeProjectConfig(root) {
|
|
|
206
139
|
}
|
|
207
140
|
}
|
|
208
141
|
//#endregion
|
|
209
|
-
export {
|
|
142
|
+
export { removeProjectConfig as a, writePlatformSelection as c, readProjectPlatformUrl as i, writeProjectConfig as l, readDeploymentPlatform as n, shouldLinkDeployProject as o, readProjectConfig as r, writeDeploymentPlatform as s, attachSelectedPlatform as t };
|
|
@@ -1,8 +1,8 @@
|
|
|
1
|
-
import {
|
|
2
|
-
import {
|
|
3
|
-
import {
|
|
4
|
-
import { n as PlatformClient } from "./client-
|
|
5
|
-
import { a as dim, c as import_picocolors, d as tablePrefix, r as cliTitle } from "./output-
|
|
1
|
+
import { n as readDeploymentPlatform } from "./project-DKG5Ra8p.mjs";
|
|
2
|
+
import { c as getToken, s as getSiteDomain } from "./auth-CQkSDS50.mjs";
|
|
3
|
+
import { H as outro, L as log, N as intro } from "./prompts-BNUoTiaf.mjs";
|
|
4
|
+
import { n as PlatformClient } from "./client-DKAsFA4X.mjs";
|
|
5
|
+
import { a as dim, c as import_picocolors, d as tablePrefix, r as cliTitle } from "./output-CbM85T4k.mjs";
|
|
6
6
|
//#region src/cli/projects.ts
|
|
7
7
|
async function runProjectsCommand(root) {
|
|
8
8
|
console.log();
|
|
@@ -39,77 +39,77 @@ async function runProjectsCommand(root) {
|
|
|
39
39
|
async function runProjectCommand(root, args) {
|
|
40
40
|
const cloudflare = readDeploymentPlatform(root) === "cloudflare";
|
|
41
41
|
if (args.subcommand === "status") {
|
|
42
|
-
const { runListCommand } = await import("./list-
|
|
42
|
+
const { runListCommand } = await import("./list-BnPrIsU_.mjs");
|
|
43
43
|
return runListCommand(root, args.name || void 0);
|
|
44
44
|
}
|
|
45
45
|
if (args.subcommand === "link") {
|
|
46
46
|
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-
|
|
47
|
+
const { runLink } = await import("./link-B46sYH0K.mjs");
|
|
48
48
|
return runLink(root, args.name || void 0);
|
|
49
49
|
}
|
|
50
50
|
if (args.subcommand === "list") {
|
|
51
51
|
if (cloudflare) {
|
|
52
|
-
const { runListCommand } = await import("./list-
|
|
52
|
+
const { runListCommand } = await import("./list-BnPrIsU_.mjs");
|
|
53
53
|
return runListCommand(root);
|
|
54
54
|
}
|
|
55
55
|
return runProjectsCommand(root);
|
|
56
56
|
}
|
|
57
57
|
if (args.subcommand === "token") {
|
|
58
58
|
if (cloudflare) throw new Error("project: CI deploy credentials are available only for Void platform projects.");
|
|
59
|
-
const { runProjectTokenCommand } = await import("./project-token-
|
|
59
|
+
const { runProjectTokenCommand } = await import("./project-token-GionZlBI.mjs");
|
|
60
60
|
return runProjectTokenCommand(root, args);
|
|
61
61
|
}
|
|
62
62
|
if (args.subcommand === "team") {
|
|
63
63
|
if (args.action === "") {
|
|
64
|
-
const { printHelpPage } = await import("./help-
|
|
64
|
+
const { printHelpPage } = await import("./help-mabuIV98.mjs");
|
|
65
65
|
printHelpPage(["project", "team"]);
|
|
66
66
|
return;
|
|
67
67
|
}
|
|
68
68
|
const accountInvitationAction = args.action === "pending" || args.action === "accept" || args.action === "decline";
|
|
69
69
|
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-
|
|
70
|
+
const { runProjectTeamCommand } = await import("./project-team-BmHcaALJ.mjs");
|
|
71
71
|
return runProjectTeamCommand(root, args);
|
|
72
72
|
}
|
|
73
73
|
if (args.subcommand === "zero-trust") {
|
|
74
74
|
if (cloudflare) throw new Error("project: Zero Trust overrides are available only for projects hosted on a Void platform.");
|
|
75
75
|
if (args.action === "") {
|
|
76
|
-
const { printHelpPage } = await import("./help-
|
|
76
|
+
const { printHelpPage } = await import("./help-mabuIV98.mjs");
|
|
77
77
|
printHelpPage(["project", "zero-trust"]);
|
|
78
78
|
return;
|
|
79
79
|
}
|
|
80
80
|
const action = args.action;
|
|
81
|
-
const { runProjectZeroTrustCommand } = await import("./project-zero-trust-
|
|
81
|
+
const { runProjectZeroTrustCommand } = await import("./project-zero-trust-JLCjVQA7.mjs");
|
|
82
82
|
return runProjectZeroTrustCommand(root, {
|
|
83
83
|
...args,
|
|
84
84
|
action
|
|
85
85
|
});
|
|
86
86
|
}
|
|
87
87
|
if (args.subcommand === "logs") {
|
|
88
|
-
const { runLogsCommand } = await import("./logs-
|
|
88
|
+
const { runLogsCommand } = await import("./logs-CZG9d-ic.mjs");
|
|
89
89
|
return runLogsCommand(root, args.filter, args.range, args.deployment || void 0, args.level || void 0);
|
|
90
90
|
}
|
|
91
91
|
if (args.subcommand === "requests") {
|
|
92
92
|
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-
|
|
93
|
+
const { runRequestsCommand } = await import("./requests-BOjIVAeF.mjs");
|
|
94
94
|
return runRequestsCommand(root, args.range, args.status || void 0);
|
|
95
95
|
}
|
|
96
96
|
if (args.subcommand === "rollback") {
|
|
97
|
-
const { runRollbackCommand } = await import("./rollback-
|
|
97
|
+
const { runRollbackCommand } = await import("./rollback-CwR3pLj3.mjs");
|
|
98
98
|
return runRollbackCommand(root, args.deployId || void 0);
|
|
99
99
|
}
|
|
100
100
|
if (args.subcommand === "cancel") {
|
|
101
101
|
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-
|
|
102
|
+
const { runCancelDeployCommand } = await import("./cancel-deploy-Box0kkEV.mjs");
|
|
103
103
|
return runCancelDeployCommand(root, args.deployId || void 0);
|
|
104
104
|
}
|
|
105
105
|
if (args.subcommand === "delete") {
|
|
106
106
|
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-
|
|
107
|
+
const { runDeleteCommand } = await import("./delete-sK56qtzZ.mjs");
|
|
108
108
|
return runDeleteCommand(root, args.name || void 0, { force: args.force });
|
|
109
109
|
}
|
|
110
110
|
if (args.subcommand === "purge-cache") {
|
|
111
111
|
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-
|
|
112
|
+
const { runPurgeCacheCommand } = await import("./cache-ZtQmyxVV.mjs");
|
|
113
113
|
return runPurgeCacheCommand(root, args.projectSlug || void 0);
|
|
114
114
|
}
|
|
115
115
|
}
|
|
@@ -1,8 +1,8 @@
|
|
|
1
|
-
import {
|
|
2
|
-
import {
|
|
3
|
-
import {
|
|
4
|
-
import { n as PlatformClient, o as parsePlatformErrorBody, s as platformErrorMessage, t as PlatformApiError } from "./client-
|
|
5
|
-
import { r as cliTitle } from "./output-
|
|
1
|
+
import { r as readProjectConfig } from "./project-DKG5Ra8p.mjs";
|
|
2
|
+
import { c as getToken, i as getAccountCredential } from "./auth-CQkSDS50.mjs";
|
|
3
|
+
import { B as note, H as outro, L as log, N as intro } from "./prompts-BNUoTiaf.mjs";
|
|
4
|
+
import { n as PlatformClient, o as parsePlatformErrorBody, s as platformErrorMessage, t as PlatformApiError } from "./client-DKAsFA4X.mjs";
|
|
5
|
+
import { r as cliTitle } from "./output-CbM85T4k.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) {
|
|
@@ -1,8 +1,8 @@
|
|
|
1
|
-
import {
|
|
2
|
-
import {
|
|
3
|
-
import {
|
|
4
|
-
import { n as PlatformClient } from "./client-
|
|
5
|
-
import { a as dim, d as tablePrefix, r as cliTitle } from "./output-
|
|
1
|
+
import { r as readProjectConfig } from "./project-DKG5Ra8p.mjs";
|
|
2
|
+
import { c as getToken } from "./auth-CQkSDS50.mjs";
|
|
3
|
+
import { H as outro, L as log, N as intro } from "./prompts-BNUoTiaf.mjs";
|
|
4
|
+
import { n as PlatformClient } from "./client-DKAsFA4X.mjs";
|
|
5
|
+
import { a as dim, d as tablePrefix, r as cliTitle } from "./output-CbM85T4k.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) {
|
|
@@ -1,8 +1,8 @@
|
|
|
1
|
-
import {
|
|
2
|
-
import {
|
|
3
|
-
import {
|
|
4
|
-
import { n as PlatformClient } from "./client-
|
|
5
|
-
import { l as sanitizeTerminalText, r as cliTitle } from "./output-
|
|
1
|
+
import { r as readProjectConfig } from "./project-DKG5Ra8p.mjs";
|
|
2
|
+
import { c as getToken } from "./auth-CQkSDS50.mjs";
|
|
3
|
+
import { B as note, H as outro, L as log, N as intro } from "./prompts-BNUoTiaf.mjs";
|
|
4
|
+
import { n as PlatformClient } from "./client-DKAsFA4X.mjs";
|
|
5
|
+
import { l as sanitizeTerminalText, r as cliTitle } from "./output-CbM85T4k.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) {
|