void 0.23.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/AGENTS_TEMPLATE.md +1 -1
- package/README.md +19 -106
- package/dist/{account-cmd-C84Ee8cO.mjs → account-cmd-DcR1ywt8.mjs} +5 -5
- package/dist/{auth-CSkdO2Bb.mjs → auth-7wuZ5ob8.mjs} +22 -49
- package/dist/auth-CdgZ9uag.mjs +2 -0
- package/dist/{auth-link-CioEg6uY.mjs → auth-link-Z6E5DYvM.mjs} +5 -6
- package/dist/{auth-router-BsR981d4.mjs → auth-router-BdM4avI8.mjs} +7 -7
- package/dist/{build-cmd-LzvNJORH.mjs → build-cmd-CEE7D-hM.mjs} +7 -8
- package/dist/{cache-C4MvnrMH.mjs → cache-TcZnBLtH.mjs} +6 -7
- package/dist/{cancel-deploy-abUxpP2n.mjs → cancel-deploy-CYoZmcmR.mjs} +4 -6
- package/dist/{cf-access-P0iZnu0q.mjs → cf-access-AHKBzmuu.mjs} +4 -48
- package/dist/{cf-access-DRsQRe6k.mjs → cf-access-TWNzXltp.mjs} +3 -11
- package/dist/cf-build-output-ChY6-XWP.mjs +2 -0
- package/dist/cli/cli.mjs +49 -46
- package/dist/cli/cloudflare-operation-process.mjs +16 -7
- package/dist/cli/env-schema-probe.mjs +3 -3
- package/dist/client-B4Me-9HE.mjs +2 -0
- package/dist/{client-RV8NVeB8.mjs → client-RsPo8wsP.mjs} +129 -33
- package/dist/{cloudflare-cmd-BcrVyTmJ.mjs → cloudflare-cmd-bhwCxAN6.mjs} +2 -2
- package/dist/{cloudflare-connect-B8uPZ4nx.mjs → cloudflare-connect-CuhRgk3k.mjs} +2 -2
- package/dist/{cloudflare-operations-AiWashgg.mjs → cloudflare-operations-BhbK6yTq.mjs} +1 -1
- package/dist/{cloudflare-operations-fxHb-byx.mjs → cloudflare-operations-CjaV4lZi.mjs} +2 -2
- package/dist/{connect-Bd4kJd9U.mjs → connect-DCvUmPXY.mjs} +13 -10
- package/dist/{create-project-Boczwj5r.mjs → create-project-C734I-Mu.mjs} +1 -1
- package/dist/{create-project-bMf6ffLZ.mjs → create-project-eAPgYq35.mjs} +13 -13
- package/dist/{db-8uG64XLl.mjs → db-C07GEdKF.mjs} +27 -30
- package/dist/{delete-NvbiyeJf.mjs → delete-pKMVsrpJ.mjs} +5 -6
- package/dist/deploy-BDu1vhSH.mjs +2 -0
- package/dist/{deploy-DzAIwqNU.mjs → deploy-DfsAe-T0.mjs} +9567 -9215
- package/dist/{dev-inbox-P0u4tM8Y.mjs → dev-inbox-D64ZKUod.mjs} +5 -6
- package/dist/{domain-y5Tvydvo.mjs → domain-D3uA9ize.mjs} +8 -8
- package/dist/{email-B3umsW75.mjs → email-z3o2cwjH.mjs} +8 -8
- package/dist/{env-BS6qYHDb.mjs → env-3Q8-_2IH.mjs} +7 -9
- package/dist/{env-types-C2_bIk_b.mjs → env-types-D5kds_OZ.mjs} +1 -1
- package/dist/{env-validation-DbTg7-ar.mjs → env-validation-cZBvGWaP.mjs} +1 -1
- package/dist/{env-validation-BPn7vk-V.mjs → env-validation-vBSQ8gw5.mjs} +3 -3
- package/dist/gen-ById9r2j.mjs +2 -0
- package/dist/{gen-B580--vC.mjs → gen-NjwoG9FK.mjs} +2 -4
- package/dist/{github-cmd-v45BdfKX.mjs → github-cmd-DquUq-b1.mjs} +15 -24
- package/dist/{headers-DWi2IXWx.mjs → headers-2rKda9Y6.mjs} +1 -1
- package/dist/help-DPGBwomV.mjs +2 -0
- package/dist/{help-daGKjXGk.mjs → help-DRZXC4fj.mjs} +8 -4
- package/dist/{inbound-aVHEUhKo.mjs → inbound-fRkqcXaC.mjs} +1 -1
- package/dist/index.d.mts +18 -14
- package/dist/index.mjs +2176 -2110
- package/dist/{info-B97bTX9N.mjs → info-BmA3_IFZ.mjs} +1 -3
- package/dist/{init-Bvy7zrBo.mjs → init-DT7yuuyl.mjs} +28 -27
- package/dist/{link-CDqqCjFl.mjs → link-CXOlqh2F.mjs} +6 -7
- package/dist/{list-CZj0dzKY.mjs → list-eEWVJEPn.mjs} +8 -9
- package/dist/{local-d1-2CMnpuW_.mjs → local-d1-Df4XpwhW.mjs} +1 -1
- package/dist/log-vqY3pqwI.mjs +29 -0
- package/dist/login-C98-sw79.mjs +2 -0
- package/dist/{login-UZKFM_u7.mjs → login-pWQHYVu2.mjs} +12 -10
- package/dist/{logs-CUZ6t9t3.mjs → logs-DnxVX7TR.mjs} +11 -13
- package/dist/migrate-CEu2X5DB.mjs +2 -0
- package/dist/{migrate-DHul7PRV.mjs → migrate-CV1on-yJ.mjs} +2 -4
- package/dist/{operator-args-CLgKGlwU.mjs → operator-args-CAVcmwUt.mjs} +12 -5
- package/dist/{operator-auth-8KnOVXVd.mjs → operator-auth-CkmTE3rt.mjs} +2 -2
- package/dist/{operator-client-DUwumHpQ.mjs → operator-client-LmwjxT6q.mjs} +3 -3
- package/dist/{operator-cmd-DBA6dl0m.mjs → operator-cmd-d-IEKgNk.mjs} +6 -6
- package/dist/{output-Dm_A4Tbv.mjs → output-BBsUwdyT.mjs} +22 -14
- package/dist/pages/client.d.mts +3 -0
- package/dist/pages/client.mjs +120 -29
- package/dist/pages/index.mjs +1 -1
- package/dist/{platform-args-BJdRtlLq.mjs → platform-args-Bzf8JPc2.mjs} +11 -3
- package/dist/platform-args-Cq6EjQro.mjs +2 -0
- package/dist/{platform-auth-config-B56E9YP1.mjs → platform-auth-config-0V0lA3pF.mjs} +7 -7
- package/dist/{platform-auth-protection-BDWO_aER.mjs → platform-auth-protection-DFeJ-JkK.mjs} +9 -9
- package/dist/{platform-auth-recovery-1gg4CSRe.mjs → platform-auth-recovery-ICy4muq6.mjs} +7 -7
- package/dist/{platform-cmd-Bt-1w6pY.mjs → platform-cmd-BPySFOew.mjs} +1 -1
- package/dist/{platform-cmd-DMcQStSc.mjs → platform-cmd-D7vSWMvV.mjs} +38 -28
- package/dist/platform-discovery-DDDUvnqp.mjs +27 -0
- package/dist/{platform-domain-BNkcz0OB.mjs → platform-domain-CUdY064e.mjs} +5 -5
- package/dist/{platform-lifecycle-BE6C_jxh.mjs → platform-lifecycle-BaUdTRPU.mjs} +1 -1
- package/dist/{platform-lifecycle-9OyBALhH.mjs → platform-lifecycle-Dm09JNkn.mjs} +4404 -3297
- package/dist/{platform-management-CjwLVQwN.mjs → platform-management-BSEc_ZeG.mjs} +48 -11
- package/dist/platform-management-Bp6aoH2C.mjs +2 -0
- package/dist/{platform-plans-config-BNGKGr4P.mjs → platform-plans-config-B0pOVQyW.mjs} +3 -3
- package/dist/{platform-recovery-D6KSpuFm.mjs → platform-recovery-WOZ95Uze.mjs} +4 -4
- package/dist/{platform-registry-QBa4DK32.mjs → platform-registry-KfNEF84O.mjs} +3 -3
- package/dist/{prepare-B5Mkic5u.mjs → prepare-39EvOhI6.mjs} +2 -4
- package/dist/prepare-CnjcTV2s.mjs +2 -0
- package/dist/{prepare-DOsL0CC9.mjs → prepare-DnaKBi--.mjs} +1 -1
- package/dist/{project-C0Fqu05O.mjs → project-BkbfDs0V.mjs} +15 -82
- package/dist/project-IOjBU8R6.mjs +2 -0
- package/dist/{project-cmd-CNzrqvBv.mjs → project-cmd-Bs5A392E.mjs} +21 -22
- package/dist/{project-team-DQOWPfQT.mjs → project-team-ohAWWaew.mjs} +8 -9
- package/dist/{project-token-CTDYU0Cc.mjs → project-token-CP01Jna6.mjs} +6 -9
- package/dist/{project-zero-trust-BNAkW-_0.mjs → project-zero-trust-BzkVgx35.mjs} +5 -6
- package/dist/prompts-6OSVA7DJ.mjs +2087 -0
- package/dist/prompts-ZAuJlyCj.mjs +2 -0
- package/dist/{provision-C4ORE7G7.mjs → provision-BEv0k-qz.mjs} +1 -1
- package/dist/{provision-CJFgTZY8.mjs → provision-Btj1jppf.mjs} +5 -7
- package/dist/{requests-MhxYnau8.mjs → requests-B3PBuGlX.mjs} +5 -6
- package/dist/{rollback-CJ6iSDoU.mjs → rollback-DDub9GsO.mjs} +9 -10
- package/dist/runtime/ai.mjs +3 -5
- package/dist/runtime/email/testing.mjs +2 -2
- package/dist/runtime/email.mjs +36 -18
- package/dist/runtime/remote/index.mjs +2 -2
- package/dist/runtime/routing.mjs +1 -1
- package/dist/{secret-Dli5fP0B.mjs → secret-3c72lY1U.mjs} +15 -16
- package/dist/{skills-D1II1Juz.mjs → skills-BPQUGClu.mjs} +1 -1
- package/dist/{subcommand-prompt-CY1C4fvl.mjs → subcommand-prompt-Dhom39bd.mjs} +40 -32
- 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 +22 -23
- package/sandbox.Dockerfile +1 -1
- package/skills/void/SKILL.md +6 -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 -102
- 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/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 +24 -9
- package/skills/void/docs/guide/platform/development/schema-ci.md +7 -1
- 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 +37 -5
- package/skills/void/docs/guide/platform/installation/prerequisites.md +87 -14
- package/skills/void/docs/guide/platform/installation/setup.md +80 -10
- package/skills/void/docs/guide/quickstart.md +37 -80
- package/skills/void/docs/guide/remote-dev.md +1 -1
- 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/auth.md +4 -3
- package/skills/void/docs/reference/cli/database.md +1 -1
- package/skills/void/docs/reference/cli/deploy.md +21 -1
- package/skills/void/docs/reference/cli/platform-installation.md +42 -27
- package/skills/void/docs/reference/cli/platform-operations.md +4 -8
- package/skills/void/docs/reference/cli/platform-zero-trust.md +14 -0
- package/skills/void/docs/reference/cli/platform.md +5 -0
- package/skills/void/docs/reference/config.md +1 -1
- package/skills/void/docs/reference/resource-inference.md +11 -8
- package/dist/auth-CCjt0hcq.mjs +0 -2
- package/dist/cf-build-output-_0HNWysu.mjs +0 -2
- package/dist/client-Cu7jWiF1.mjs +0 -2
- package/dist/deploy-bjXdFCtn.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/platform-management-CnyTdcWX.mjs +0 -2
- package/dist/prepare-cgvDMtSb.mjs +0 -2
- package/dist/project-BuUwfj6f.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
|
@@ -4,10 +4,8 @@ import { m as readConfig } from "./config-Br_JZD6u.mjs";
|
|
|
4
4
|
import { a as inferDurableResourceName, i as deriveDurableResourceIdentity, t as analyzeApplicationSync } from "./application-analysis-BVsVqc11.mjs";
|
|
5
5
|
import { n as VOID_LOCK_FILE } from "./cloudflare-config-Bktvwtpf.mjs";
|
|
6
6
|
import { existsSync, readFileSync } from "node:fs";
|
|
7
|
+
import { isRecord } from "@void/deploy-core";
|
|
7
8
|
//#region src/cli/info.ts
|
|
8
|
-
function isRecord(value) {
|
|
9
|
-
return typeof value === "object" && value !== null && !Array.isArray(value);
|
|
10
|
-
}
|
|
11
9
|
function readRecordedResources(root, resources) {
|
|
12
10
|
const path = join(root, VOID_LOCK_FILE);
|
|
13
11
|
if (!existsSync(path)) return [];
|
|
@@ -2,39 +2,38 @@ import { a as join, i as isAbsolute, l as relative, n as dirname, t as basename,
|
|
|
2
2
|
import { r as detectFramework } from "./plugin-inference-CXWnn79A.mjs";
|
|
3
3
|
import { n as readProjectPaths, o as TYPED_CONFIG_FILE } from "./project-paths-GgcMozYz.mjs";
|
|
4
4
|
import { m as readConfig, u as getDatabaseDialect } from "./config-Br_JZD6u.mjs";
|
|
5
|
-
import {
|
|
6
|
-
import { d as writeProjectConfig, i as readDeploymentPlatform, l as writeDeploymentPlatform, o as readProjectConfig, t as attachSelectedPlatform } from "./project-C0Fqu05O.mjs";
|
|
5
|
+
import { l as writeProjectConfig, n as readDeploymentPlatform, r as readProjectConfig, s as writeDeploymentPlatform, t as attachSelectedPlatform } from "./project-BkbfDs0V.mjs";
|
|
7
6
|
import { r as materializeCloudflareConfig } from "./cloudflare-config-Bktvwtpf.mjs";
|
|
8
|
-
import { A as writeProvisionedWranglerConfig, i as LATEST_KNOWN_COMPAT_DATE } from "./wrangler-
|
|
9
|
-
import {
|
|
7
|
+
import { A as writeProvisionedWranglerConfig, i as LATEST_KNOWN_COMPAT_DATE } from "./wrangler-DhUerFkW.mjs";
|
|
8
|
+
import { c as getToken } from "./auth-7wuZ5ob8.mjs";
|
|
10
9
|
import { n as parseDotenvFile, t as expandDotenv } from "./dotenv-VQxupEUv.mjs";
|
|
10
|
+
import { n as ensureProjectTsconfig, t as createProjectTsconfig } from "./project-tsconfig-B8GeM0RM.mjs";
|
|
11
11
|
import { t as MagicString } from "./dist-AoCzRTJE.mjs";
|
|
12
|
-
import {
|
|
13
|
-
import { t as writeDrizzleConfig } from "./config-D8MOgiQV.mjs";
|
|
12
|
+
import { A as confirm, B as note, H as outro, K as select, L as log, O as cancel, X as text, tt as isCancel } from "./prompts-6OSVA7DJ.mjs";
|
|
14
13
|
import { n as getPackageDir, t as detectAgents } from "./agents-B_pX_HmQ.mjs";
|
|
15
|
-
import {
|
|
14
|
+
import { r as PlatformClient } from "./client-RsPo8wsP.mjs";
|
|
15
|
+
import { i as migrateFrameworkAdapterPaths, t as migrateLegacyVoidConfig } from "./migrate-CV1on-yJ.mjs";
|
|
16
16
|
import { o as formatProjectCommand } from "./cloudflare-process-B-wekeR6.mjs";
|
|
17
|
+
import { a as promptProjectSelection, r as promptAndCreateProject } from "./create-project-eAPgYq35.mjs";
|
|
18
|
+
import { t as writeDrizzleConfig } from "./config-D8MOgiQV.mjs";
|
|
17
19
|
import { n as writeVoidProjectConfig, t as canRewriteVoidProjectConfig } from "./config-write-B1f88wJA.mjs";
|
|
18
|
-
import {
|
|
19
|
-
import {
|
|
20
|
-
import {
|
|
21
|
-
import { t as promptForLoginToken } from "./login-UZKFM_u7.mjs";
|
|
22
|
-
import { i as saveDiscoveredPlatform, t as discoverPlatform } from "./platform-cmd-DMcQStSc.mjs";
|
|
23
|
-
import { t as connectCloudflare } from "./cloudflare-connect-B8uPZ4nx.mjs";
|
|
20
|
+
import { t as promptForLoginToken } from "./login-pWQHYVu2.mjs";
|
|
21
|
+
import { i as saveDiscoveredPlatform, t as discoverPlatform } from "./platform-cmd-D7vSWMvV.mjs";
|
|
22
|
+
import { t as connectCloudflare } from "./cloudflare-connect-CuhRgk3k.mjs";
|
|
24
23
|
import { n as findInstalledYarnPnpRuntime, r as hasLocalLockfile, t as buildDrizzleKitSpawnEnv } from "./yarn-pnp-BV4AzNul.mjs";
|
|
25
24
|
import { createRequire } from "node:module";
|
|
26
25
|
import { existsSync, mkdirSync, readFileSync, readdirSync, rmdirSync, unlinkSync, writeFileSync } from "node:fs";
|
|
27
26
|
import { fileURLToPath } from "node:url";
|
|
28
27
|
import { parseSync } from "vite";
|
|
29
|
-
import { spawnSync } from "node:child_process";
|
|
30
28
|
import { parse } from "jsonc-parser";
|
|
31
29
|
import { parseArgs } from "node:util";
|
|
30
|
+
import { spawnSync } from "node:child_process";
|
|
32
31
|
//#region src/cli/deploy-setup.ts
|
|
33
32
|
async function ensureToken(root) {
|
|
34
33
|
const existing = getToken(root);
|
|
35
34
|
if (existing) return existing;
|
|
36
35
|
const token = await promptForLoginToken(root);
|
|
37
|
-
log.success(
|
|
36
|
+
log.success("Token saved.");
|
|
38
37
|
return token;
|
|
39
38
|
}
|
|
40
39
|
async function maybeSetupDeployProject(root) {
|
|
@@ -1102,11 +1101,12 @@ async function resolveInitRoot(root) {
|
|
|
1102
1101
|
process.exit(0);
|
|
1103
1102
|
}
|
|
1104
1103
|
if (choice === "current") return root;
|
|
1104
|
+
const defaultFolder = "my-void-app";
|
|
1105
1105
|
const folder = await text({
|
|
1106
1106
|
message: "New project folder name:",
|
|
1107
|
-
placeholder:
|
|
1108
|
-
|
|
1109
|
-
validate: (value) => validateSubfolderName(root, value)
|
|
1107
|
+
placeholder: defaultFolder,
|
|
1108
|
+
defaultValue: defaultFolder,
|
|
1109
|
+
validate: (value) => validateSubfolderName(root, value || defaultFolder)
|
|
1110
1110
|
});
|
|
1111
1111
|
if (isCancel(folder) || typeof folder === "symbol") {
|
|
1112
1112
|
cancel("Setup cancelled.");
|
|
@@ -1932,11 +1932,11 @@ async function ensureVoidPlatformConnection(root) {
|
|
|
1932
1932
|
let selectedApiUrl = null;
|
|
1933
1933
|
let promptedForPlatform = false;
|
|
1934
1934
|
try {
|
|
1935
|
-
const { getApiUrl, getSiteDomain } = await import("./auth-
|
|
1935
|
+
const { getApiUrl, getSiteDomain } = await import("./auth-CdgZ9uag.mjs");
|
|
1936
1936
|
selectedApiUrl = getApiUrl(root);
|
|
1937
1937
|
getSiteDomain(root);
|
|
1938
1938
|
} catch (error) {
|
|
1939
|
-
if (!(error instanceof Error) || !error.message.includes("No Void platform
|
|
1939
|
+
if (!(error instanceof Error) || !error.message.includes("No Void platform connected")) throw error;
|
|
1940
1940
|
}
|
|
1941
1941
|
if (!selectedApiUrl) {
|
|
1942
1942
|
promptedForPlatform = true;
|
|
@@ -1976,7 +1976,6 @@ function getNodeVersionLine(root) {
|
|
|
1976
1976
|
if (existsSync(join(root, ".node-version"))) return "node-version-file: .node-version";
|
|
1977
1977
|
return "node-version: lts/*";
|
|
1978
1978
|
}
|
|
1979
|
-
const WORKFLOW_DEFAULT_API_URL = "https://api.void.cloud";
|
|
1980
1979
|
function getWorkflowSetupSteps(root, pm) {
|
|
1981
1980
|
const nodeVersion = getNodeVersionLine(root);
|
|
1982
1981
|
switch (pm) {
|
|
@@ -2025,7 +2024,7 @@ function getWorkflowSetupSteps(root, pm) {
|
|
|
2025
2024
|
* otherwise a `${{ vars.VOID_PROJECT }}` placeholder is emitted with a comment
|
|
2026
2025
|
* telling the user to set the repository variable.
|
|
2027
2026
|
*/
|
|
2028
|
-
function getWorkflowYaml(root, pm, slug, platform = "void", platformApiUrl
|
|
2027
|
+
function getWorkflowYaml(root, pm, slug, platform = "void", platformApiUrl) {
|
|
2029
2028
|
const { setup, install, runner } = getWorkflowSetupSteps(root, pm);
|
|
2030
2029
|
if (platform === "cloudflare") return `name: Deploy to Cloudflare
|
|
2031
2030
|
on:
|
|
@@ -2059,6 +2058,7 @@ ${install}
|
|
|
2059
2058
|
CF_ACCESS_CLIENT_SECRET: \${{ secrets.CF_ACCESS_CLIENT_SECRET }}
|
|
2060
2059
|
run: ${runner} deploy --platform cloudflare
|
|
2061
2060
|
`;
|
|
2061
|
+
if (!platformApiUrl) throw new Error("init: Connect to a Void platform before generating a deployment workflow. Run `void connect <url>` first.");
|
|
2062
2062
|
return `name: Deploy to Void
|
|
2063
2063
|
on:
|
|
2064
2064
|
push:
|
|
@@ -2094,10 +2094,12 @@ jobs:
|
|
|
2094
2094
|
${setup}
|
|
2095
2095
|
${install}
|
|
2096
2096
|
- name: Deploy
|
|
2097
|
-
run:
|
|
2097
|
+
run: |
|
|
2098
|
+
${runner} connect "$VOID_API_URL" --no-login
|
|
2099
|
+
${runner} deploy --platform void --project "$VOID_PROJECT"
|
|
2098
2100
|
`;
|
|
2099
2101
|
}
|
|
2100
|
-
function setupGithubActions(root, state, platform = "void", platformApiUrl
|
|
2102
|
+
function setupGithubActions(root, state, platform = "void", platformApiUrl) {
|
|
2101
2103
|
const workflowDir = join(root, ".github", "workflows");
|
|
2102
2104
|
const workflowPath = join(workflowDir, "void-deploy.yml");
|
|
2103
2105
|
if (existsSync(workflowPath)) {
|
|
@@ -2608,7 +2610,6 @@ function injectAgentBlock(root) {
|
|
|
2608
2610
|
}
|
|
2609
2611
|
async function runInitCommand(root, initArgs) {
|
|
2610
2612
|
console.log();
|
|
2611
|
-
intro(cliTitle("init"));
|
|
2612
2613
|
const targeted = Boolean(initArgs && (initArgs.tsconfig || initArgs.github || initArgs.agents));
|
|
2613
2614
|
if (!targeted) root = await resolveInitRoot(root);
|
|
2614
2615
|
const hadTypedConfig = existsSync(join(root, TYPED_CONFIG_FILE));
|
|
@@ -2677,7 +2678,7 @@ async function runInitCommand(root, initArgs) {
|
|
|
2677
2678
|
injectAgentBlock(root);
|
|
2678
2679
|
const agents = detectAgents(root);
|
|
2679
2680
|
if (agents.length > 0) {
|
|
2680
|
-
const { linkSkillsForSpecificAgents } = await import("./skills-
|
|
2681
|
+
const { linkSkillsForSpecificAgents } = await import("./skills-BPQUGClu.mjs");
|
|
2681
2682
|
linkSkillsForSpecificAgents(root, agents);
|
|
2682
2683
|
} else log.info("No coding agent detected; read the bundled docs linked in AGENTS.md");
|
|
2683
2684
|
}
|
|
@@ -2711,7 +2712,7 @@ async function runInitCommand(root, initArgs) {
|
|
|
2711
2712
|
let shouldSetupGithub = targeted ? initArgs?.github === true : deploymentPlatform !== "none";
|
|
2712
2713
|
if (shouldSetupGithub && !githubStepSkipForSubpackage && deploymentPlatform !== "cloudflare" && deploymentPlatform !== "none") {
|
|
2713
2714
|
if (!voidPlatformDiscovery) {
|
|
2714
|
-
const { getApiUrl } = await import("./auth-
|
|
2715
|
+
const { getApiUrl } = await import("./auth-CdgZ9uag.mjs");
|
|
2715
2716
|
voidPlatformDiscovery = await discoverPlatform(getApiUrl(root));
|
|
2716
2717
|
}
|
|
2717
2718
|
if (!voidPlatformDiscovery.capabilities.githubActions) {
|
|
@@ -1,9 +1,9 @@
|
|
|
1
|
-
import {
|
|
2
|
-
import {
|
|
3
|
-
import {
|
|
4
|
-
import {
|
|
5
|
-
import { c as import_picocolors
|
|
6
|
-
import { a as promptProjectSelection, r as promptAndCreateProject } from "./create-project-
|
|
1
|
+
import { l as writeProjectConfig, r as readProjectConfig, t as attachSelectedPlatform } from "./project-BkbfDs0V.mjs";
|
|
2
|
+
import { c as getToken, s as getSiteDomain } from "./auth-7wuZ5ob8.mjs";
|
|
3
|
+
import { H as outro, L as log, O as cancel } from "./prompts-6OSVA7DJ.mjs";
|
|
4
|
+
import { r as PlatformClient } from "./client-RsPo8wsP.mjs";
|
|
5
|
+
import { c as import_picocolors } from "./output-BBsUwdyT.mjs";
|
|
6
|
+
import { a as promptProjectSelection, r as promptAndCreateProject } from "./create-project-eAPgYq35.mjs";
|
|
7
7
|
import { r as resolveProjectBySlug } from "./resolve-project-BG5ORGID.mjs";
|
|
8
8
|
//#region src/cli/link.ts
|
|
9
9
|
function projectLabel(slug, root, url) {
|
|
@@ -13,7 +13,6 @@ function projectLabel(slug, root, url) {
|
|
|
13
13
|
}
|
|
14
14
|
async function runLink(root, slug) {
|
|
15
15
|
console.log();
|
|
16
|
-
intro(cliTitle("project link"));
|
|
17
16
|
const existing = readProjectConfig(root);
|
|
18
17
|
if (existing) {
|
|
19
18
|
log.warn(`Already linked to ${projectLabel(existing.slug, root)}`);
|
|
@@ -1,13 +1,12 @@
|
|
|
1
|
-
import {
|
|
2
|
-
import {
|
|
3
|
-
import {
|
|
4
|
-
import {
|
|
5
|
-
import { a as
|
|
1
|
+
import { n as readDeploymentPlatform, 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 { a as ensureUtc, c as import_picocolors, d as tablePrefix, i as dim, o as formatCount } from "./output-BBsUwdyT.mjs";
|
|
6
6
|
import { r as resolveProjectBySlug } from "./resolve-project-BG5ORGID.mjs";
|
|
7
7
|
//#region src/cli/list.ts
|
|
8
8
|
async function runListCommand(root, slug) {
|
|
9
9
|
console.log();
|
|
10
|
-
intro(cliTitle("project status"));
|
|
11
10
|
const platform = readDeploymentPlatform(root);
|
|
12
11
|
if (platform === "cloudflare") return showCloudflareDeployments(root, slug);
|
|
13
12
|
if (platform === "none") throw new Error("project: Deployment is disabled. Run `void init` to choose a platform.");
|
|
@@ -43,7 +42,7 @@ async function runListCommand(root, slug) {
|
|
|
43
42
|
}
|
|
44
43
|
async function showCloudflareDeployments(root, slug) {
|
|
45
44
|
if (slug) throw new Error("project: A project name selects a Void platform project and is not used for direct Cloudflare apps.");
|
|
46
|
-
const { readCloudflareWorkerStatus, resolveCloudflareOperationContext } = await import("./cloudflare-operations-
|
|
45
|
+
const { readCloudflareWorkerStatus, resolveCloudflareOperationContext } = await import("./cloudflare-operations-BhbK6yTq.mjs");
|
|
47
46
|
const status = await readCloudflareWorkerStatus(resolveCloudflareOperationContext(root));
|
|
48
47
|
if (status.versions.length === 0) {
|
|
49
48
|
outro(`No deployments for ${status.workerName}.`);
|
|
@@ -64,7 +63,7 @@ async function showCloudflareDeployments(root, slug) {
|
|
|
64
63
|
const renderedStatus = row.status === "live" ? import_picocolors.default.bold(import_picocolors.default.green(row.status)) : dim(row.status);
|
|
65
64
|
console.log(`${prefix}${row.id.padEnd(idWidth)} ${renderedStatus}${"".padEnd(statusWidth - row.status.length)} ${row.migrations.padEnd(10)} ${row.deployed}`);
|
|
66
65
|
}
|
|
67
|
-
outro(`${status.workerName} — ${rows.length
|
|
66
|
+
outro(`${status.workerName} — ${formatCount(rows.length, "version")}`);
|
|
68
67
|
}
|
|
69
68
|
async function showDeployments(client, projectId, slug) {
|
|
70
69
|
const { deployments, activeDeploymentId } = await client.listDeployments(projectId);
|
|
@@ -87,7 +86,7 @@ async function showDeployments(client, projectId, slug) {
|
|
|
87
86
|
console.log(prefix);
|
|
88
87
|
console.log(header);
|
|
89
88
|
for (const line of lines) console.log(line);
|
|
90
|
-
outro(`${slug} — ${deployments.length
|
|
89
|
+
outro(`${slug} — ${formatCount(deployments.length, "deployment")}`);
|
|
91
90
|
}
|
|
92
91
|
function computeDisplayStatus(d, activeDeploymentId) {
|
|
93
92
|
if (d.status === "failed") return "failed";
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import { a as join, i as isAbsolute, u as resolve } from "./dist-BVqXeR_h.mjs";
|
|
2
|
-
import { y as readRootWranglerConfig } from "./wrangler-
|
|
2
|
+
import { y as readRootWranglerConfig } from "./wrangler-DhUerFkW.mjs";
|
|
3
3
|
import { r as getMiniflareDatabasePath } from "./runner-Ol0TNjk6.mjs";
|
|
4
4
|
import { existsSync, mkdirSync, readFileSync, rmSync, writeFileSync } from "node:fs";
|
|
5
5
|
import { createHash } from "node:crypto";
|
|
@@ -0,0 +1,29 @@
|
|
|
1
|
+
import { n as __toESM } from "./rolldown-runtime-DXIUcv95.mjs";
|
|
2
|
+
import { t as require_picocolors } from "./picocolors-BTps1_gs.mjs";
|
|
3
|
+
//#region src/log.ts
|
|
4
|
+
var import_picocolors = /* @__PURE__ */ __toESM(require_picocolors(), 1);
|
|
5
|
+
const tag = import_picocolors.default.bold(import_picocolors.default.blue("[void]"));
|
|
6
|
+
const timeFormat = new Intl.DateTimeFormat(void 0, {
|
|
7
|
+
hour: "numeric",
|
|
8
|
+
minute: "numeric",
|
|
9
|
+
second: "numeric"
|
|
10
|
+
});
|
|
11
|
+
let showTimestamp = true;
|
|
12
|
+
function setShowTimestamp(value) {
|
|
13
|
+
showTimestamp = value;
|
|
14
|
+
}
|
|
15
|
+
function prefix() {
|
|
16
|
+
if (!showTimestamp) return tag;
|
|
17
|
+
return `${import_picocolors.default.dim(timeFormat.format())} ${tag}`;
|
|
18
|
+
}
|
|
19
|
+
function voidLog(msg) {
|
|
20
|
+
console.log(`${prefix()} ${msg}`);
|
|
21
|
+
}
|
|
22
|
+
function voidWarn(msg) {
|
|
23
|
+
console.log(`${prefix()} ${import_picocolors.default.yellow(msg)}`);
|
|
24
|
+
}
|
|
25
|
+
function voidError(msg) {
|
|
26
|
+
console.log(`${prefix()} ${import_picocolors.default.red(msg)}`);
|
|
27
|
+
}
|
|
28
|
+
//#endregion
|
|
29
|
+
export { voidWarn as i, voidError as n, voidLog as r, setShowTimestamp as t };
|
|
@@ -1,7 +1,7 @@
|
|
|
1
|
-
import {
|
|
2
|
-
import {
|
|
3
|
-
import {
|
|
4
|
-
import { c as import_picocolors,
|
|
1
|
+
import { a as getApiUrl, c as getToken, f as removeToken, g as saveToken, h as savePlatformToken, l as getTokenSource, m as runPlatformLogin, p as runLogin } from "./auth-7wuZ5ob8.mjs";
|
|
2
|
+
import { H as outro, K as select, L as log, O as cancel, tt as isCancel } from "./prompts-6OSVA7DJ.mjs";
|
|
3
|
+
import { a as isExpiredTokenError, r as PlatformClient } from "./client-RsPo8wsP.mjs";
|
|
4
|
+
import { c as import_picocolors, r as createSpinner } from "./output-BBsUwdyT.mjs";
|
|
5
5
|
//#region src/cli/login.ts
|
|
6
6
|
async function selectPlatformLoginMethod(platform, requestedId) {
|
|
7
7
|
const providers = platform?.authenticationProviders ?? ["github", "google"];
|
|
@@ -29,12 +29,12 @@ async function selectPlatformLoginMethod(platform, requestedId) {
|
|
|
29
29
|
return methods.find((method) => method.id === provider);
|
|
30
30
|
}
|
|
31
31
|
async function promptForLoginToken(root = process.cwd(), platform) {
|
|
32
|
-
const { id: provider, label: providerName } = await selectPlatformLoginMethod(platform ?? await import("./platform-cmd-
|
|
32
|
+
const { id: provider, label: providerName } = await selectPlatformLoginMethod(platform ?? await import("./platform-cmd-BPySFOew.mjs").then(({ discoverPlatform }) => discoverPlatform(getApiUrl(root))));
|
|
33
33
|
const s = createSpinner();
|
|
34
34
|
s.start(`Opening browser for ${providerName} login...`);
|
|
35
35
|
try {
|
|
36
36
|
const onUrl = (url) => {
|
|
37
|
-
s.message(`Waiting for ${providerName} login. If your browser didn't open, visit:\n${import_picocolors.default.
|
|
37
|
+
s.message(`Waiting for ${providerName} login. If your browser didn't open, visit:\n${import_picocolors.default.blue(url)}`);
|
|
38
38
|
};
|
|
39
39
|
const token = platform ? await runPlatformLogin(platform.apiUrl, provider, onUrl) : await runLogin(root, provider, onUrl);
|
|
40
40
|
if (platform) savePlatformToken(token, platform.apiUrl);
|
|
@@ -48,12 +48,14 @@ async function promptForLoginToken(root = process.cwd(), platform) {
|
|
|
48
48
|
}
|
|
49
49
|
async function runLoginCommand(root = process.cwd()) {
|
|
50
50
|
console.log();
|
|
51
|
-
intro(cliTitle("login"));
|
|
52
51
|
const existing = getToken(root);
|
|
53
52
|
let expiredEnvToken = false;
|
|
54
53
|
if (existing) {
|
|
55
54
|
const tokenSource = getTokenSource();
|
|
56
|
-
const client = new PlatformClient(existing, {
|
|
55
|
+
const client = new PlatformClient(existing, {
|
|
56
|
+
root,
|
|
57
|
+
checkPlatformVersion: false
|
|
58
|
+
});
|
|
57
59
|
try {
|
|
58
60
|
await client.whoami();
|
|
59
61
|
if (tokenSource === "ci") {
|
|
@@ -77,10 +79,10 @@ async function runLoginCommand(root = process.cwd()) {
|
|
|
77
79
|
}
|
|
78
80
|
await promptForLoginToken(root);
|
|
79
81
|
if (expiredEnvToken) {
|
|
80
|
-
outro(
|
|
82
|
+
outro("Token saved. Unset `VOID_TOKEN` to use it.");
|
|
81
83
|
return;
|
|
82
84
|
}
|
|
83
|
-
outro(
|
|
85
|
+
outro("Token saved.");
|
|
84
86
|
}
|
|
85
87
|
//#endregion
|
|
86
88
|
export { runLoginCommand as n, selectPlatformLoginMethod as r, promptForLoginToken as t };
|
|
@@ -1,15 +1,14 @@
|
|
|
1
|
-
import {
|
|
2
|
-
import {
|
|
3
|
-
import {
|
|
4
|
-
import {
|
|
5
|
-
import {
|
|
1
|
+
import { n as readDeploymentPlatform, r as readProjectConfig } from "./project-BkbfDs0V.mjs";
|
|
2
|
+
import { c as getToken } from "./auth-7wuZ5ob8.mjs";
|
|
3
|
+
import { $ as wrapTextWithPrefix, 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, o as formatCount } from "./output-BBsUwdyT.mjs";
|
|
6
6
|
//#region src/cli/logs.ts
|
|
7
7
|
async function runLogsCommand(root, filter, range, deployment, level) {
|
|
8
8
|
console.log();
|
|
9
|
-
intro(cliTitle("project logs"));
|
|
10
9
|
const platform = readDeploymentPlatform(root);
|
|
11
10
|
if (platform === "cloudflare") {
|
|
12
|
-
const { resolveCloudflareOperationContext, tailCloudflareWorker } = await import("./cloudflare-operations-
|
|
11
|
+
const { resolveCloudflareOperationContext, tailCloudflareWorker } = await import("./cloudflare-operations-BhbK6yTq.mjs");
|
|
13
12
|
if (range !== "1h") log.warn("Cloudflare tail streams live logs; --range does not select historical entries.");
|
|
14
13
|
if (level && level !== "all" && level !== "error") log.warn("Cloudflare tail cannot filter individual console levels; showing all invocation logs.");
|
|
15
14
|
await tailCloudflareWorker(resolveCloudflareOperationContext(root), {
|
|
@@ -48,7 +47,7 @@ async function runLogsCommand(root, filter, range, deployment, level) {
|
|
|
48
47
|
return;
|
|
49
48
|
}
|
|
50
49
|
for (const entry of entries) printEntry(entry);
|
|
51
|
-
outro(dim(
|
|
50
|
+
outro(dim(formatCount(entries.length, "log entry", "log entries")));
|
|
52
51
|
}
|
|
53
52
|
function printEntry(entry) {
|
|
54
53
|
const time = formatTime(entry.timestamp);
|
|
@@ -57,15 +56,14 @@ function printEntry(entry) {
|
|
|
57
56
|
const status = entry.status || "-";
|
|
58
57
|
const statusNum = parseInt(status, 10);
|
|
59
58
|
const coloredStatus = entry.outcome === "exception" || statusNum >= 500 ? import_picocolors.default.red(status) : statusNum >= 400 ? import_picocolors.default.yellow(status) : status;
|
|
60
|
-
console.log(
|
|
59
|
+
console.log(wrapTextWithPrefix(process.stdout, `${method} ${url} ${coloredStatus}`, " ".repeat(time.length + 1), `${dim(time)} `));
|
|
61
60
|
for (const l of entry.logs) {
|
|
62
61
|
const text = l.message.map(String).join(" ");
|
|
63
62
|
const level = l.level ?? "log";
|
|
64
|
-
|
|
65
|
-
|
|
66
|
-
else console.log(` ${dim(`[${level}]`)} ${text}`);
|
|
63
|
+
const marker = level === "error" ? import_picocolors.default.red(`[${level}]`) : level === "warn" ? import_picocolors.default.yellow(`[${level}]`) : dim(`[${level}]`);
|
|
64
|
+
console.log(wrapTextWithPrefix(process.stdout, text, " ".repeat(level.length + 5), ` ${marker} `));
|
|
67
65
|
}
|
|
68
|
-
for (const ex of entry.exceptions) console.log(` ${import_picocolors.default.red("[exception]")}
|
|
66
|
+
for (const ex of entry.exceptions) console.log(wrapTextWithPrefix(process.stdout, `${ex.name}: ${ex.message}`, " ".repeat(14), ` ${import_picocolors.default.red("[exception]")} `));
|
|
69
67
|
}
|
|
70
68
|
function formatTime(ts) {
|
|
71
69
|
return new Date(ts).toLocaleTimeString("en-GB", { hour12: false });
|
|
@@ -2,9 +2,8 @@ import { a as join, n as dirname } from "./dist-BVqXeR_h.mjs";
|
|
|
2
2
|
import { o as TYPED_CONFIG_FILE, s as loadTypedVoidConfigFile } from "./project-paths-GgcMozYz.mjs";
|
|
3
3
|
import { g as validateConfig } from "./config-Br_JZD6u.mjs";
|
|
4
4
|
import { n as VOID_LOCK_FILE, o as seedCloudflareConfig, s as stashCloudflareDeployPointer } from "./cloudflare-config-Bktvwtpf.mjs";
|
|
5
|
-
import "./wrangler-
|
|
6
|
-
import {
|
|
7
|
-
import { r as cliTitle } from "./output-Dm_A4Tbv.mjs";
|
|
5
|
+
import "./wrangler-DhUerFkW.mjs";
|
|
6
|
+
import { H as outro, L as log } from "./prompts-6OSVA7DJ.mjs";
|
|
8
7
|
import { existsSync, mkdirSync, readFileSync, renameSync, rmSync, unlinkSync, writeFileSync } from "node:fs";
|
|
9
8
|
import { parseSync } from "vite";
|
|
10
9
|
import { randomUUID } from "node:crypto";
|
|
@@ -302,7 +301,6 @@ function migrateLegacyVoidConfig(root) {
|
|
|
302
301
|
}
|
|
303
302
|
async function runMigrateCommand(root) {
|
|
304
303
|
console.log();
|
|
305
|
-
intro(cliTitle("migrate"));
|
|
306
304
|
if (migrateLegacyVoidConfig(root)) log.success(`Migrated project settings to ${TYPED_CONFIG_FILE}. Commit it and ${VOID_LOCK_FILE} when present.`);
|
|
307
305
|
else log.info("No legacy project configuration found.");
|
|
308
306
|
outro("Configuration migration complete.");
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { t as OPERATOR_MAX_TIMEOUT_MS } from "./operator-client-
|
|
1
|
+
import { t as OPERATOR_MAX_TIMEOUT_MS } from "./operator-client-LmwjxT6q.mjs";
|
|
2
2
|
//#region src/cli/operator-args.ts
|
|
3
3
|
const operatorCommands = [
|
|
4
4
|
{
|
|
@@ -133,7 +133,11 @@ const operatorCommands = [
|
|
|
133
133
|
policies: "Comma-separated reusable Access policy IDs",
|
|
134
134
|
"existing-projects": "Required when enabling: protected or public for existing projects"
|
|
135
135
|
},
|
|
136
|
-
booleans: [
|
|
136
|
+
booleans: [
|
|
137
|
+
"token-stdin",
|
|
138
|
+
"protect-new-projects",
|
|
139
|
+
"public-apps"
|
|
140
|
+
],
|
|
137
141
|
method: "POST"
|
|
138
142
|
},
|
|
139
143
|
{
|
|
@@ -671,11 +675,14 @@ function parseOperatorArgs(args) {
|
|
|
671
675
|
const identityProviderIds = values["identity-providers"]?.split(",").map((entry) => entry.trim()).filter(Boolean);
|
|
672
676
|
const policyIds = values.policies?.split(",").map((entry) => entry.trim()).filter(Boolean);
|
|
673
677
|
const existingProjects = values["existing-projects"];
|
|
674
|
-
|
|
678
|
+
const publicAccess = flags.has("public-apps");
|
|
679
|
+
if (publicAccess && (identityProviderIds?.length || policyIds?.length || flags.has("protect-new-projects") || existingProjects === "protected")) throw new Error("platform: --public-apps cannot include identity policies or protected project choices.");
|
|
680
|
+
if (!publicAccess && (!identityProviderIds?.length || !policyIds?.length)) throw new Error("platform: zero-trust configure requires --identity-providers and --policies.");
|
|
675
681
|
if (existingProjects !== void 0 && existingProjects !== "protected" && existingProjects !== "public") throw new Error("platform: --existing-projects must be protected or public.");
|
|
676
682
|
parsed.body = {
|
|
677
|
-
identityProviderIds,
|
|
678
|
-
policyIds,
|
|
683
|
+
identityProviderIds: identityProviderIds ?? [],
|
|
684
|
+
policyIds: policyIds ?? [],
|
|
685
|
+
...publicAccess ? { publicAccess: true } : {},
|
|
679
686
|
...existingProjects ? { existingProjects } : {},
|
|
680
687
|
protectNewProjects: flags.has("protect-new-projects")
|
|
681
688
|
};
|
|
@@ -1,5 +1,5 @@
|
|
|
1
|
-
import {
|
|
2
|
-
import { n as OperatorClient, r as OperatorClientError } from "./operator-client-
|
|
1
|
+
import { C as writeKeyringPassword, S as readKeyringPassword, c as platformCredentialAccount, o as listPlatformConnections, r as getActivePlatformConnection, s as normalizePlatformApiUrl, x as deleteKeyringPassword } from "./platform-registry-KfNEF84O.mjs";
|
|
2
|
+
import { n as OperatorClient, r as OperatorClientError } from "./operator-client-LmwjxT6q.mjs";
|
|
3
3
|
/** Operator authority never comes from repository-controlled metadata. */
|
|
4
4
|
function resolveOperatorOrigin(connection = "") {
|
|
5
5
|
if (connection) {
|
|
@@ -1,6 +1,6 @@
|
|
|
1
|
-
import {
|
|
2
|
-
import {
|
|
3
|
-
import { t as ensureCloudflaredToken } from "./cf-access-
|
|
1
|
+
import { s as normalizePlatformApiUrl } from "./platform-registry-KfNEF84O.mjs";
|
|
2
|
+
import { t as cfAccessHeaders } from "./cf-access-TWNzXltp.mjs";
|
|
3
|
+
import { t as ensureCloudflaredToken } from "./cf-access-AHKBzmuu.mjs";
|
|
4
4
|
const OPERATOR_MAX_TIMEOUT_MS = 36e5;
|
|
5
5
|
var OperatorClientError = class extends Error {
|
|
6
6
|
code;
|
|
@@ -1,5 +1,5 @@
|
|
|
1
|
-
import { n as OperatorClient, r as OperatorClientError } from "./operator-client-
|
|
2
|
-
import { a as resolveOperatorOrigin, i as removeOperatorToken, n as readOperatorApiTokenStdin, o as saveOperatorToken, r as readOperatorToken, t as exchangeOperatorSession } from "./operator-auth-
|
|
1
|
+
import { n as OperatorClient, r as OperatorClientError } from "./operator-client-LmwjxT6q.mjs";
|
|
2
|
+
import { a as resolveOperatorOrigin, i as removeOperatorToken, n as readOperatorApiTokenStdin, o as saveOperatorToken, r as readOperatorToken, t as exchangeOperatorSession } from "./operator-auth-CkmTE3rt.mjs";
|
|
3
3
|
import { createHash } from "node:crypto";
|
|
4
4
|
import { setTimeout } from "node:timers/promises";
|
|
5
5
|
import { createInterface } from "node:readline/promises";
|
|
@@ -137,9 +137,9 @@ async function runAuth(origin, args) {
|
|
|
137
137
|
if (args.action === "login" || args.action === "token" && args.tokenStdin) {
|
|
138
138
|
if (!args.tokenStdin && !process.stdin.isTTY) throw new OperatorClientError("Browser login requires an interactive terminal. Use --token-stdin to exchange an API session.", "interactive_login_required");
|
|
139
139
|
const apiToken = args.tokenStdin ? await readOperatorApiTokenStdin() : await (async () => {
|
|
140
|
-
const { discoverPlatform } = await import("./platform-cmd-
|
|
141
|
-
const { selectPlatformLoginMethod } = await import("./login-
|
|
142
|
-
const { runPlatformLogin } = await import("./auth-
|
|
140
|
+
const { discoverPlatform } = await import("./platform-cmd-BPySFOew.mjs");
|
|
141
|
+
const { selectPlatformLoginMethod } = await import("./login-C98-sw79.mjs");
|
|
142
|
+
const { runPlatformLogin } = await import("./auth-CdgZ9uag.mjs");
|
|
143
143
|
return runPlatformLogin(origin, (await selectPlatformLoginMethod(await discoverPlatform(origin), args.providerExplicit ? args.provider : void 0)).id, (url) => process.stderr.write(`Sign in at ${url}\n`));
|
|
144
144
|
})();
|
|
145
145
|
const session = await exchangeOperatorSession(origin, apiToken);
|
|
@@ -313,7 +313,7 @@ async function migrateDeploymentAssets(client, origin, args) {
|
|
|
313
313
|
}
|
|
314
314
|
async function runOperatorCommand(args) {
|
|
315
315
|
if (!args.action) {
|
|
316
|
-
const { printHelpPage } = await import("./help-
|
|
316
|
+
const { printHelpPage } = await import("./help-DPGBwomV.mjs");
|
|
317
317
|
printHelpPage(["platform", args.group]);
|
|
318
318
|
return;
|
|
319
319
|
}
|
|
@@ -1,25 +1,31 @@
|
|
|
1
1
|
import { n as __toESM } from "./rolldown-runtime-DXIUcv95.mjs";
|
|
2
2
|
import { t as require_picocolors } from "./picocolors-BTps1_gs.mjs";
|
|
3
|
-
import { L as
|
|
3
|
+
import { L as log, P as isCI, nt as settings, q as spinner } from "./prompts-6OSVA7DJ.mjs";
|
|
4
4
|
//#region src/cli/output.ts
|
|
5
5
|
var import_picocolors = /* @__PURE__ */ __toESM(require_picocolors(), 1);
|
|
6
|
+
function formatCount(count, singular, plural = `${singular}s`) {
|
|
7
|
+
return `${count} ${count === 1 ? singular : plural}`;
|
|
8
|
+
}
|
|
6
9
|
/** Keep recovery commands on the same CLI when using the local checkout launcher. */
|
|
7
10
|
function cliCommandName() {
|
|
8
11
|
const entryName = process.argv[1]?.split(/[\\/]/).at(-1);
|
|
9
12
|
return entryName === "void-dev" || entryName === "void-dev.cmd" ? "void-dev" : "void";
|
|
10
13
|
}
|
|
11
|
-
/**
|
|
12
|
-
* Terminal-safe spinner wrapper. In CI and redirected output,
|
|
13
|
-
* `@clack/prompts` spinner emits DEC Private Mode cursor hide/show codes
|
|
14
|
-
* (`\x1b[?25l` / `\x1b[?25h`) that render as text artifacts. This wrapper
|
|
15
|
-
* replaces the spinner with plain log output.
|
|
16
|
-
*/
|
|
14
|
+
/** Keep phase updates visible in static progress output, including redirected terminals. */
|
|
17
15
|
function createSpinner(options, isTerminal = process.stdout.isTTY === true) {
|
|
18
|
-
|
|
16
|
+
const accessible = settings?.accessible ?? ![
|
|
17
|
+
void 0,
|
|
18
|
+
"",
|
|
19
|
+
"0",
|
|
20
|
+
"false"
|
|
21
|
+
].includes(process.env.ACCESSIBLE);
|
|
22
|
+
if (!isCI() && isTerminal && !accessible) return spinner(options);
|
|
19
23
|
let currentMessage = "";
|
|
24
|
+
let cancelled = false;
|
|
20
25
|
return {
|
|
21
26
|
start(msg = "") {
|
|
22
27
|
currentMessage = msg;
|
|
28
|
+
cancelled = false;
|
|
23
29
|
if (msg) log.step(msg);
|
|
24
30
|
},
|
|
25
31
|
stop(msg = "") {
|
|
@@ -32,25 +38,27 @@ function createSpinner(options, isTerminal = process.stdout.isTTY === true) {
|
|
|
32
38
|
}
|
|
33
39
|
},
|
|
34
40
|
cancel(msg = "") {
|
|
41
|
+
cancelled = true;
|
|
35
42
|
if (msg) log.warn(msg);
|
|
36
43
|
},
|
|
37
44
|
error(msg = "") {
|
|
38
45
|
if (msg) log.error(msg);
|
|
39
46
|
},
|
|
47
|
+
pause() {},
|
|
48
|
+
resume(msg = "") {
|
|
49
|
+
this.message(msg);
|
|
50
|
+
},
|
|
40
51
|
clear() {},
|
|
41
52
|
get isCancelled() {
|
|
42
|
-
return
|
|
53
|
+
return cancelled;
|
|
43
54
|
}
|
|
44
55
|
};
|
|
45
56
|
}
|
|
46
|
-
function cliTitle(command) {
|
|
47
|
-
return import_picocolors.default.blue(`void ${command}`);
|
|
48
|
-
}
|
|
49
57
|
function sectionTitle(title) {
|
|
50
58
|
return import_picocolors.default.reset(import_picocolors.default.blue(title));
|
|
51
59
|
}
|
|
52
60
|
function categoryTitle(title) {
|
|
53
|
-
return import_picocolors.default.reset(import_picocolors.default.bold(
|
|
61
|
+
return import_picocolors.default.reset(import_picocolors.default.bold(title));
|
|
54
62
|
}
|
|
55
63
|
function dim(text) {
|
|
56
64
|
return import_picocolors.default.dim(text);
|
|
@@ -78,4 +86,4 @@ function ensureUtc(s) {
|
|
|
78
86
|
return s + "Z";
|
|
79
87
|
}
|
|
80
88
|
//#endregion
|
|
81
|
-
export {
|
|
89
|
+
export { ensureUtc as a, import_picocolors as c, tablePrefix as d, dim as i, sanitizeTerminalText as l, cliCommandName as n, formatCount as o, createSpinner as r, helpLine as s, categoryTitle as t, sectionTitle as u };
|
package/dist/pages/client.d.mts
CHANGED
|
@@ -106,6 +106,8 @@ type PageNavigationEngine = {
|
|
|
106
106
|
flushAll(): void;
|
|
107
107
|
setPopStateHandler(handler: (url: string, options: VisitOptions$1) => void): void;
|
|
108
108
|
start(): void;
|
|
109
|
+
/** Called after the adapter commits the initial page DOM. */
|
|
110
|
+
commitInitialRender(): void;
|
|
109
111
|
};
|
|
110
112
|
export declare function createPageNavigationEngine(config: PageNavigationEngineConfig): Promise<PageNavigationEngine>;
|
|
111
113
|
//#endregion
|
|
@@ -223,6 +225,7 @@ export declare function createVoidRouter(config: VoidRouterConfig): Promise<{
|
|
|
223
225
|
initialComponent: unknown;
|
|
224
226
|
initialLayouts: Array<unknown>;
|
|
225
227
|
start(): void;
|
|
228
|
+
commitInitialRender(): void;
|
|
226
229
|
}>;
|
|
227
230
|
export declare function scheduleHydration(el: Element, loader: () => Promise<unknown>, props: Record<string, unknown>, strategy: string, hydrateFn: (el: Element, mod: unknown, props: Record<string, unknown>) => void | Promise<void>): void;
|
|
228
231
|
export declare function initIslands(islands: Record<string, () => Promise<unknown>>, hydrateFn: (el: Element, mod: unknown, props: Record<string, unknown>) => void | Promise<void>): void;
|