void 0.24.0 → 0.26.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/README.md +19 -106
- package/dist/{account-cmd-vJhh5lrb.mjs → account-cmd-CDry3B5V.mjs} +5 -5
- package/dist/{application-analysis-BVsVqc11.mjs → application-analysis-DC2yPvzY.mjs} +1 -1
- package/dist/{application-routing-B7QEjqSR.mjs → application-routing-C9khgLiS.mjs} +1 -1
- package/dist/{auth-DX3JURcX.mjs → auth-B60QDbjg.mjs} +1 -1
- package/dist/{auth-CQkSDS50.mjs → auth-D52yG7hl.mjs} +3 -3
- package/dist/{auth-link-D75t9wO2.mjs → auth-link-DjeOptYi.mjs} +5 -6
- package/dist/{auth-router-ClfhL1J7.mjs → auth-router-BRxIuqDi.mjs} +7 -7
- package/dist/{build-cmd-zMi1iFnS.mjs → build-cmd-Ce3C8huo.mjs} +6 -7
- package/dist/{cache-ZtQmyxVV.mjs → cache-CS8Yxr5a.mjs} +6 -7
- package/dist/{cancel-deploy-Box0kkEV.mjs → cancel-deploy-mZsD88Xa.mjs} +4 -6
- package/dist/{cf-access-BGe5sWXF.mjs → cf-access-YTlqvAsk.mjs} +1 -1
- package/dist/cf-build-output-ChY6-XWP.mjs +2 -0
- package/dist/cli/cli.mjs +45 -45
- package/dist/cli/cloudflare-operation-process.mjs +3 -3
- package/dist/cli/env-schema-probe.d.mts +1 -1
- package/dist/cli/env-schema-probe.mjs +2 -2
- package/dist/client-BxVixJBI.mjs +2 -0
- package/dist/{client-DKAsFA4X.mjs → client-mC-dFGDD.mjs} +103 -25
- package/dist/{cloudflare-cmd-CmY8dGkd.mjs → cloudflare-cmd-bhwCxAN6.mjs} +2 -2
- package/dist/{cloudflare-connect-IiR3ZieC.mjs → cloudflare-connect-CuhRgk3k.mjs} +2 -2
- package/dist/{cloudflare-operations-DzH-A966.mjs → cloudflare-operations-DYa3coIk.mjs} +2 -2
- package/dist/{cloudflare-operations-BCdXSsmo.mjs → cloudflare-operations-DoQrVHAt.mjs} +1 -1
- package/dist/{connect-B-usTnlF.mjs → connect-H6EvP62X.mjs} +12 -9
- package/dist/{create-project-CYOOAYcn.mjs → create-project-B2kk9Q0o.mjs} +6 -6
- package/dist/{create-project-FWbf5Olo.mjs → create-project-Dbb4uiN-.mjs} +1 -1
- package/dist/{db-Ck2eZ2iB.mjs → db-DpCKZto0.mjs} +35 -38
- package/dist/{delete-sK56qtzZ.mjs → delete-CxlSvsvW.mjs} +6 -7
- package/dist/{deploy-gCVaiJbS.mjs → deploy-CeEbnv4b.mjs} +9249 -8925
- package/dist/deploy-qmiLE1G1.mjs +2 -0
- package/dist/{dev-inbox-P0u4tM8Y.mjs → dev-inbox-D64ZKUod.mjs} +5 -6
- package/dist/{domain-DFfQE8jg.mjs → domain-B_9VgOm6.mjs} +8 -8
- package/dist/{email-CdnhUHvJ.mjs → email-BokHgjKj.mjs} +7 -7
- package/dist/{env-DmGdHi5i.mjs → env-BdTc-K2L.mjs} +7 -8
- package/dist/{env-public-BX_r8HR6.d.mts → env-public-DR7ZM6d-.d.mts} +1 -1
- package/dist/{env-validation-zZOCcQVZ.mjs → env-validation-cZBvGWaP.mjs} +1 -1
- package/dist/{fetch-stream-IvCYKyQL.mjs → fetch-stream-Nm3hkZbT.mjs} +8 -1
- package/dist/{gen-CshAkukR.mjs → gen-BhDlTpwW.mjs} +2 -4
- package/dist/gen-qCBwH3fZ.mjs +2 -0
- package/dist/{github-cmd-DftuEvIt.mjs → github-cmd-hhkTzlGS.mjs} +7 -16
- package/dist/{handler-CZ4nAylQ.d.mts → handler-BeK3weD4.d.mts} +1 -1
- package/dist/{help-Dotbf6iz.mjs → help-Bv44e2tm.mjs} +13 -9
- package/dist/help-Dw5f9Xrg.mjs +2 -0
- package/dist/index.d.mts +19 -15
- package/dist/index.mjs +2225 -2142
- package/dist/{info-B97bTX9N.mjs → info-DhtTKh65.mjs} +2 -4
- package/dist/{init-BTQEZZGJ.mjs → init-BMf4T03q.mjs} +17 -18
- package/dist/{limits-Bq5LG8Id.d.mts → limits-CFsDKQvU.d.mts} +1 -10
- package/dist/{limits-Cjuk2VPm.mjs → limits-D0vD1M9A.mjs} +1 -22
- package/dist/{link-B46sYH0K.mjs → link-BqYsSS_I.mjs} +6 -7
- package/dist/{list-BnPrIsU_.mjs → list-_kBToO-l.mjs} +10 -10
- package/dist/{live-Chw1eIMv.d.mts → live-iAuEH1hd.d.mts} +1 -1
- package/dist/{local-d1-2CMnpuW_.mjs → local-d1-fGxYrVD6.mjs} +2 -2
- package/dist/login-D7meQg_3.mjs +2 -0
- package/dist/{login-BuiMyUrx.mjs → login-DFuo-RWO.mjs} +9 -7
- package/dist/{logs-CZG9d-ic.mjs → logs-DYgnh6dH.mjs} +7 -8
- package/dist/migrate-CEu2X5DB.mjs +2 -0
- package/dist/{migrate-q4_njtaW.mjs → migrate-CV1on-yJ.mjs} +2 -4
- package/dist/{node-BkyRWRx8.mjs → node-C6Q6e1Es.mjs} +1 -1
- package/dist/{operator-args-B3BTmSoi.mjs → operator-args-DdY54Bgb.mjs} +1 -1
- package/dist/{operator-auth-7erYc6Lt.mjs → operator-auth-2dsGlTT5.mjs} +4 -8
- package/dist/{operator-client-CpHjTd0t.mjs → operator-client-BFqpp6z0.mjs} +3 -3
- package/dist/{operator-cmd-DGqPJUD3.mjs → operator-cmd-CUGHXrQf.mjs} +27 -9
- package/dist/operator-cmd-DRPvhpjM.mjs +2 -0
- package/dist/{output-CbM85T4k.mjs → output-BvdaehtE.mjs} +28 -4
- package/dist/pages/client.d.mts +4 -1
- package/dist/pages/client.mjs +120 -29
- package/dist/pages/index.mjs +1 -1
- package/dist/pages/islands-plugin.mjs +1 -1
- package/dist/pages/protocol.d.mts +2 -2
- package/dist/{plan-NPpwZ_kc.mjs → plan-CJGEeTEI.mjs} +2 -2
- package/dist/plan-COtUvdMA.mjs +2 -0
- package/dist/{platform-args-3k8X9-H_.mjs → platform-args-DSV2p4nY.mjs} +4 -2
- package/dist/platform-args-Dcy_5b_Y.mjs +2 -0
- package/dist/{platform-auth-config-DDrxUy4m.mjs → platform-auth-config-Bosx7U1h.mjs} +20 -19
- package/dist/{platform-auth-protection-BLadnnct.mjs → platform-auth-protection-DcbL_LW_.mjs} +8 -8
- package/dist/{platform-auth-recovery-CmCzX2Fl.mjs → platform-auth-recovery-WfTZ8K6o.mjs} +7 -7
- package/dist/{platform-cmd-DMDEc9uS.mjs → platform-cmd-DbKtQb_4.mjs} +73 -38
- package/dist/{platform-cmd-pMTRhvYs.mjs → platform-cmd-dyFUof0t.mjs} +1 -1
- package/dist/platform-discovery-BC0HCKYt.mjs +41 -0
- package/dist/{platform-domain-Di6EYrQl.mjs → platform-domain-Bsq43AJp.mjs} +5 -4
- package/dist/{platform-lifecycle-BFdSi9Qt.mjs → platform-lifecycle--5gWmDoI.mjs} +1 -1
- package/dist/{platform-lifecycle-BBoNzojY.mjs → platform-lifecycle-Cfi0o6xM.mjs} +4605 -3527
- package/dist/platform-management-Bbwf6-Dq.mjs +2 -0
- package/dist/{platform-management-CWOQOWXm.mjs → platform-management-BrF9STZp.mjs} +211 -31
- package/dist/{platform-plans-config-Vl9BP3H4.mjs → platform-plans-config-DU-8nC2Y.mjs} +3 -3
- package/dist/{platform-recovery-BJnQJEtQ.mjs → platform-recovery-DQAqAQYu.mjs} +3 -3
- package/dist/{platform-registry-DkPPXfp_.mjs → platform-registry-P387v42A.mjs} +18 -11
- package/dist/prepare-BBknoZI1.mjs +2 -0
- package/dist/{prepare-CBLT3CHH.mjs → prepare-BMrRWLwP.mjs} +3 -4
- package/dist/{prepare-DnaKBi--.mjs → prepare-WoUubFKL.mjs} +1 -1
- package/dist/{project-DsblYifa.mjs → project-BiaPQ7ur.mjs} +1 -1
- package/dist/{project-DKG5Ra8p.mjs → project-DQstYTxO.mjs} +1 -1
- package/dist/{project-cmd-DxnXstAq.mjs → project-cmd-BbH2LptN.mjs} +21 -22
- package/dist/{project-team-BmHcaALJ.mjs → project-team-Yiww3-go.mjs} +8 -9
- package/dist/{project-token-GionZlBI.mjs → project-token-BrtT2NkY.mjs} +6 -9
- package/dist/{project-zero-trust-JLCjVQA7.mjs → project-zero-trust-nYJ2V2nc.mjs} +5 -6
- package/dist/{prompts-BNUoTiaf.mjs → prompts-6OSVA7DJ.mjs} +58 -15
- package/dist/{prompts-2TGE6oXx.mjs → prompts-ZAuJlyCj.mjs} +1 -1
- package/dist/{protocol-CjF_iI9X.d.mts → protocol-BX8t2jiw.d.mts} +1 -1
- package/dist/{provision-CVku1JFU.mjs → provision-DMTPG8Rh.mjs} +1 -1
- package/dist/{provision-CaoxO_U7.mjs → provision-VeqAC77A.mjs} +18 -8
- package/dist/{requests-BOjIVAeF.mjs → requests-TIz_jtSu.mjs} +5 -6
- package/dist/{rollback-CwR3pLj3.mjs → rollback-dBqICPzj.mjs} +9 -10
- package/dist/{runner-Ol0TNjk6.mjs → runner--2KF6Kua.mjs} +1 -1
- package/dist/{runner-CXA9Fh8h.mjs → runner-voIltZrY.mjs} +1 -1
- package/dist/runtime/ai.d.mts +10 -11
- package/dist/runtime/ai.mjs +13 -18
- package/dist/runtime/client-react.mjs +1 -1
- package/dist/runtime/client-solid.mjs +1 -1
- package/dist/runtime/client-svelte.mjs +1 -1
- package/dist/runtime/client-vue.mjs +1 -1
- package/dist/runtime/client.mjs +1 -1
- package/dist/runtime/email/testing.mjs +1 -1
- package/dist/runtime/email.mjs +35 -17
- package/dist/runtime/env-public.d.mts +1 -1
- package/dist/runtime/fetch-stream.mjs +1 -1
- package/dist/runtime/handler.d.mts +1 -1
- package/dist/runtime/limits.d.mts +2 -2
- package/dist/runtime/limits.mjs +2 -2
- package/dist/runtime/live-client.d.mts +1 -1
- package/dist/runtime/live.d.mts +1 -1
- package/dist/runtime/migration-handler.mjs +33 -7
- package/dist/runtime/routing.d.mts +1 -1
- package/dist/runtime/routing.mjs +1 -1
- package/dist/runtime/sandbox.d.mts +1 -1
- package/dist/runtime/sandbox.mjs +12 -22
- package/dist/runtime/validator.d.mts +1 -1
- package/dist/runtime/ws-server.d.mts +1 -1
- package/dist/runtime/ws.d.mts +1 -1
- package/dist/{sandbox-XZAqzFlG.d.mts → sandbox-C5LFoJMf.d.mts} +7 -7
- package/dist/{scan-C7okrLyM.mjs → scan-C8dA7iM4.mjs} +10 -6
- package/dist/{secret-ByWJWBUG.mjs → secret-AKnNXNP5.mjs} +15 -16
- package/dist/{skills-C1PlclPt.mjs → skills-BPQUGClu.mjs} +1 -1
- package/dist/{subcommand-prompt-klFCfcor.mjs → subcommand-prompt-B6WS9Aoz.mjs} +2 -2
- package/dist/sveltekit.d.mts +1 -1
- package/dist/sveltekit.mjs +4 -9
- package/dist/validate-pna7R3Pv.mjs +2 -0
- package/dist/{validate-ctOrgiS3.mjs → validate-ymhap6M_.mjs} +1 -1
- package/dist/{wrangler-7K-bW_DL.mjs → wrangler-DhUerFkW.mjs} +10 -15
- package/dist/{ws-CL1w7GXU.d.mts → ws-C79j4aED.d.mts} +1 -1
- package/package.json +21 -21
- package/sandbox.Dockerfile +1 -1
- package/skills/void/SKILL.md +5 -2
- package/skills/void/docs/guide/ai.md +78 -137
- package/skills/void/docs/guide/app-types.md +1 -1
- package/skills/void/docs/guide/auth.md +0 -2
- package/skills/void/docs/guide/database/d1.md +7 -7
- package/skills/void/docs/guide/database.md +15 -0
- package/skills/void/docs/guide/deployment.md +58 -124
- package/skills/void/docs/guide/env-vars.md +1 -5
- package/skills/void/docs/guide/index.md +19 -18
- package/skills/void/docs/guide/kv.md +0 -2
- package/skills/void/docs/guide/live.md +2 -0
- package/skills/void/docs/guide/pages-routing/actions-and-forms.md +49 -47
- package/skills/void/docs/guide/pages-routing/overview.md +2 -2
- package/skills/void/docs/guide/platform/administration/email.md +0 -2
- package/skills/void/docs/guide/platform/administration/operations.md +11 -22
- package/skills/void/docs/guide/platform/administration/plans.md +1 -5
- package/skills/void/docs/guide/platform/administration/zero-trust.md +1 -4
- package/skills/void/docs/guide/platform/development/schema-ci.md +7 -1
- package/skills/void/docs/guide/platform/installation/credentials.md +2 -2
- package/skills/void/docs/guide/platform/installation/first-deployment.md +5 -1
- package/skills/void/docs/guide/platform/installation/maintenance.md +33 -11
- package/skills/void/docs/guide/platform/installation/prerequisites.md +79 -7
- package/skills/void/docs/guide/platform/installation/setup.md +1 -1
- package/skills/void/docs/guide/platform/installation/uninstall.md +44 -11
- package/skills/void/docs/guide/quickstart.md +37 -80
- package/skills/void/docs/guide/sandboxes.md +75 -66
- package/skills/void/docs/guide/self-hosted-platform.md +20 -0
- package/skills/void/docs/guide/websockets.md +0 -2
- package/skills/void/docs/integrations/frameworks/overview.md +2 -2
- package/skills/void/docs/integrations/frameworks/sveltekit.md +40 -25
- package/skills/void/docs/integrations/nodejs-bun-deno.md +7 -2
- package/skills/void/docs/reference/api/resources.md +38 -14
- package/skills/void/docs/reference/api.md +35 -34
- package/skills/void/docs/reference/cli/auth.md +3 -1
- package/skills/void/docs/reference/cli/deploy.md +1 -1
- package/skills/void/docs/reference/cli/platform-config.md +2 -2
- package/skills/void/docs/reference/cli/platform-installation.md +14 -12
- package/skills/void/docs/reference/cli/platform-operations.md +4 -8
- package/skills/void/docs/reference/cli/platform.md +9 -2
- package/skills/void/docs/reference/cli.md +1 -1
- package/skills/void/docs/reference/resource-inference.md +12 -8
- package/dist/cf-build-output-_0HNWysu.mjs +0 -2
- package/dist/client-B9UBI03V.mjs +0 -2
- package/dist/deploy-irP5q0-x.mjs +0 -2
- package/dist/gen-DvQTWzDU.mjs +0 -2
- package/dist/help-mabuIV98.mjs +0 -2
- package/dist/login-DIy9Sb-U.mjs +0 -2
- package/dist/migrate-BCiJ8w0f.mjs +0 -2
- package/dist/plan-D1Q5rf-r.mjs +0 -2
- package/dist/platform-args-DdnM6WIf.mjs +0 -2
- package/dist/platform-management-DG47jys8.mjs +0 -2
- package/dist/prepare-CnjcTV2s.mjs +0 -2
- package/dist/validate-Dq_L3s0S.mjs +0 -2
- package/skills/void/docs/guide/env-migration.md +0 -109
- package/dist/{cf-build-output-BPqOT964.mjs → cf-build-output-U8o1Gl6X.mjs} +1 -1
- package/dist/{env-validation-C_8tPdhs.mjs → env-validation-vBSQ8gw5.mjs} +1 -1
|
@@ -1,13 +1,11 @@
|
|
|
1
1
|
import { a as join, l as relative } from "./dist-BVqXeR_h.mjs";
|
|
2
2
|
import { a as deriveWebSocketClassNameFromName, o as inferWebSocketResourceName } from "./plugin-inference-CXWnn79A.mjs";
|
|
3
3
|
import { m as readConfig } from "./config-Br_JZD6u.mjs";
|
|
4
|
-
import { a as inferDurableResourceName, i as deriveDurableResourceIdentity, t as analyzeApplicationSync } from "./application-analysis-
|
|
4
|
+
import { a as inferDurableResourceName, i as deriveDurableResourceIdentity, t as analyzeApplicationSync } from "./application-analysis-DC2yPvzY.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,33 +2,33 @@ 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 { l as writeProjectConfig, n as readDeploymentPlatform, r as readProjectConfig, s as writeDeploymentPlatform, t as attachSelectedPlatform } from "./project-
|
|
6
|
-
import { c as getToken } from "./auth-CQkSDS50.mjs";
|
|
5
|
+
import { l as writeProjectConfig, n as readDeploymentPlatform, r as readProjectConfig, s as writeDeploymentPlatform, t as attachSelectedPlatform } from "./project-DQstYTxO.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-D52yG7hl.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 { A as confirm,
|
|
13
|
-
import { t as writeDrizzleConfig } from "./config-D8MOgiQV.mjs";
|
|
12
|
+
import { A as confirm, 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-mC-dFGDD.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 { l as note } from "./output-BvdaehtE.mjs";
|
|
18
|
+
import { a as promptProjectSelection, r as promptAndCreateProject } from "./create-project-B2kk9Q0o.mjs";
|
|
19
|
+
import { t as writeDrizzleConfig } from "./config-D8MOgiQV.mjs";
|
|
17
20
|
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-BuiMyUrx.mjs";
|
|
22
|
-
import { i as saveDiscoveredPlatform, t as discoverPlatform } from "./platform-cmd-DMDEc9uS.mjs";
|
|
23
|
-
import { t as connectCloudflare } from "./cloudflare-connect-IiR3ZieC.mjs";
|
|
21
|
+
import { t as promptForLoginToken } from "./login-DFuo-RWO.mjs";
|
|
22
|
+
import { i as saveDiscoveredPlatform, t as discoverPlatform } from "./platform-cmd-DbKtQb_4.mjs";
|
|
23
|
+
import { t as connectCloudflare } from "./cloudflare-connect-CuhRgk3k.mjs";
|
|
24
24
|
import { n as findInstalledYarnPnpRuntime, r as hasLocalLockfile, t as buildDrizzleKitSpawnEnv } from "./yarn-pnp-BV4AzNul.mjs";
|
|
25
25
|
import { createRequire } from "node:module";
|
|
26
26
|
import { existsSync, mkdirSync, readFileSync, readdirSync, rmdirSync, unlinkSync, writeFileSync } from "node:fs";
|
|
27
27
|
import { fileURLToPath } from "node:url";
|
|
28
28
|
import { parseSync } from "vite";
|
|
29
|
-
import { spawnSync } from "node:child_process";
|
|
30
29
|
import { parse } from "jsonc-parser";
|
|
31
30
|
import { parseArgs } from "node:util";
|
|
31
|
+
import { spawnSync } from "node:child_process";
|
|
32
32
|
//#region src/cli/deploy-setup.ts
|
|
33
33
|
async function ensureToken(root) {
|
|
34
34
|
const existing = getToken(root);
|
|
@@ -1933,7 +1933,7 @@ async function ensureVoidPlatformConnection(root) {
|
|
|
1933
1933
|
let selectedApiUrl = null;
|
|
1934
1934
|
let promptedForPlatform = false;
|
|
1935
1935
|
try {
|
|
1936
|
-
const { getApiUrl, getSiteDomain } = await import("./auth-
|
|
1936
|
+
const { getApiUrl, getSiteDomain } = await import("./auth-B60QDbjg.mjs");
|
|
1937
1937
|
selectedApiUrl = getApiUrl(root);
|
|
1938
1938
|
getSiteDomain(root);
|
|
1939
1939
|
} catch (error) {
|
|
@@ -2611,7 +2611,6 @@ function injectAgentBlock(root) {
|
|
|
2611
2611
|
}
|
|
2612
2612
|
async function runInitCommand(root, initArgs) {
|
|
2613
2613
|
console.log();
|
|
2614
|
-
intro(cliTitle("init"));
|
|
2615
2614
|
const targeted = Boolean(initArgs && (initArgs.tsconfig || initArgs.github || initArgs.agents));
|
|
2616
2615
|
if (!targeted) root = await resolveInitRoot(root);
|
|
2617
2616
|
const hadTypedConfig = existsSync(join(root, TYPED_CONFIG_FILE));
|
|
@@ -2680,7 +2679,7 @@ async function runInitCommand(root, initArgs) {
|
|
|
2680
2679
|
injectAgentBlock(root);
|
|
2681
2680
|
const agents = detectAgents(root);
|
|
2682
2681
|
if (agents.length > 0) {
|
|
2683
|
-
const { linkSkillsForSpecificAgents } = await import("./skills-
|
|
2682
|
+
const { linkSkillsForSpecificAgents } = await import("./skills-BPQUGClu.mjs");
|
|
2684
2683
|
linkSkillsForSpecificAgents(root, agents);
|
|
2685
2684
|
} else log.info("No coding agent detected; read the bundled docs linked in AGENTS.md");
|
|
2686
2685
|
}
|
|
@@ -2714,7 +2713,7 @@ async function runInitCommand(root, initArgs) {
|
|
|
2714
2713
|
let shouldSetupGithub = targeted ? initArgs?.github === true : deploymentPlatform !== "none";
|
|
2715
2714
|
if (shouldSetupGithub && !githubStepSkipForSubpackage && deploymentPlatform !== "cloudflare" && deploymentPlatform !== "none") {
|
|
2716
2715
|
if (!voidPlatformDiscovery) {
|
|
2717
|
-
const { getApiUrl } = await import("./auth-
|
|
2716
|
+
const { getApiUrl } = await import("./auth-B60QDbjg.mjs");
|
|
2718
2717
|
voidPlatformDiscovery = await discoverPlatform(getApiUrl(root));
|
|
2719
2718
|
}
|
|
2720
2719
|
if (!voidPlatformDiscovery.capabilities.githubActions) {
|
|
@@ -12,16 +12,7 @@ declare class UsageLimit extends Error {
|
|
|
12
12
|
}): Response;
|
|
13
13
|
getResponse(): Response;
|
|
14
14
|
}
|
|
15
|
-
type LimitHandlers<T, R, L> = {
|
|
16
|
-
ok(value: T): R | Promise<R>;
|
|
17
|
-
limited(limit: UsageLimit): L | Promise<L>;
|
|
18
|
-
};
|
|
19
|
-
interface LimitOperation<T> {
|
|
20
|
-
match<R, L>(handlers: LimitHandlers<T, R, L>): Promise<R | L>;
|
|
21
|
-
}
|
|
22
|
-
/** Lazy, single-execution operation. Quota callbacks never catch failures from the user's ok handler. */
|
|
23
|
-
declare function limitOperation<T>(execute: () => Promise<T>, classify?: (error: unknown) => UsageLimit | null, prepare?: (value: T, limited: (limit: UsageLimit) => unknown) => T): LimitOperation<T>;
|
|
24
15
|
declare function asUsageLimit(error: unknown): UsageLimit | null;
|
|
25
16
|
declare function limitFromResponse(response: Response, resource: UsageLimitData["resource"]): Promise<UsageLimit | null>;
|
|
26
17
|
//#endregion
|
|
27
|
-
export {
|
|
18
|
+
export { readUsageLimit$1 as a, limitFromResponse as i, UsageLimitData$1 as n, asUsageLimit as r, UsageLimit as t };
|
|
@@ -25,27 +25,6 @@ var UsageLimit = class extends Error {
|
|
|
25
25
|
return this.response();
|
|
26
26
|
}
|
|
27
27
|
};
|
|
28
|
-
/** Lazy, single-execution operation. Quota callbacks never catch failures from the user's ok handler. */
|
|
29
|
-
function limitOperation(execute, classify = asUsageLimit, prepare) {
|
|
30
|
-
let result;
|
|
31
|
-
return Object.freeze({
|
|
32
|
-
get then() {
|
|
33
|
-
throw new TypeError("Use .match({ ok, limited }) to execute this operation.");
|
|
34
|
-
},
|
|
35
|
-
async match(handlers) {
|
|
36
|
-
if (typeof handlers?.ok !== "function" || typeof handlers?.limited !== "function") throw new TypeError("Both ok and limited handlers are required.");
|
|
37
|
-
let value;
|
|
38
|
-
try {
|
|
39
|
-
value = await (result ??= Promise.resolve().then(execute));
|
|
40
|
-
} catch (error) {
|
|
41
|
-
const limit = classify(error);
|
|
42
|
-
if (limit) return handlers.limited(limit);
|
|
43
|
-
throw error;
|
|
44
|
-
}
|
|
45
|
-
return handlers.ok(prepare ? prepare(value, handlers.limited) : value);
|
|
46
|
-
}
|
|
47
|
-
});
|
|
48
|
-
}
|
|
49
28
|
function asUsageLimit(error) {
|
|
50
29
|
if (error instanceof UsageLimit) return error;
|
|
51
30
|
const data = readUsageLimit(error);
|
|
@@ -65,4 +44,4 @@ async function limitFromResponse(response, resource) {
|
|
|
65
44
|
});
|
|
66
45
|
}
|
|
67
46
|
//#endregion
|
|
68
|
-
export { readUsageLimit$1 as
|
|
47
|
+
export { readUsageLimit$1 as i, asUsageLimit as n, limitFromResponse as r, UsageLimit as t };
|
|
@@ -1,9 +1,9 @@
|
|
|
1
|
-
import { l as writeProjectConfig, r as readProjectConfig, t as attachSelectedPlatform } from "./project-
|
|
2
|
-
import { c as getToken, s as getSiteDomain } from "./auth-
|
|
3
|
-
import { H as outro, L as log,
|
|
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-DQstYTxO.mjs";
|
|
2
|
+
import { c as getToken, s as getSiteDomain } from "./auth-D52yG7hl.mjs";
|
|
3
|
+
import { H as outro, L as log, O as cancel } from "./prompts-6OSVA7DJ.mjs";
|
|
4
|
+
import { r as PlatformClient } from "./client-mC-dFGDD.mjs";
|
|
5
|
+
import { c as import_picocolors } from "./output-BvdaehtE.mjs";
|
|
6
|
+
import { a as promptProjectSelection, r as promptAndCreateProject } from "./create-project-B2kk9Q0o.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 { n as readDeploymentPlatform, r as readProjectConfig } from "./project-
|
|
2
|
-
import { c as getToken } from "./auth-
|
|
3
|
-
import { H as outro, L as log
|
|
4
|
-
import {
|
|
5
|
-
import { a as
|
|
1
|
+
import { n as readDeploymentPlatform, r as readProjectConfig } from "./project-DQstYTxO.mjs";
|
|
2
|
+
import { c as getToken } from "./auth-D52yG7hl.mjs";
|
|
3
|
+
import { H as outro, L as log } from "./prompts-6OSVA7DJ.mjs";
|
|
4
|
+
import { r as PlatformClient } from "./client-mC-dFGDD.mjs";
|
|
5
|
+
import { a as ensureUtc, c as import_picocolors, f as tablePrefix, i as dim, o as formatCount } from "./output-BvdaehtE.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-DoQrVHAt.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";
|
|
@@ -113,7 +112,8 @@ function formatDeploymentRow(d, activeDeploymentId) {
|
|
|
113
112
|
manifest = JSON.parse(d.manifest);
|
|
114
113
|
} catch {}
|
|
115
114
|
const appType = manifest?.type ?? (manifest?.framework ? "framework" : "void");
|
|
116
|
-
const
|
|
115
|
+
const pathRuleCount = Object.keys(manifest?.pathRevalidate ?? {}).length;
|
|
116
|
+
const isr = manifest?.revalidate && manifest.revalidate > 0 ? `${manifest.revalidate}s` : pathRuleCount > 0 ? formatCount(pathRuleCount, "rule") : "-";
|
|
117
117
|
const source = d.source ?? "-";
|
|
118
118
|
const commit = d.commit ? d.commit.slice(0, 7) : "-";
|
|
119
119
|
const statusRaw = computeDisplayStatus(d, activeDeploymentId);
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import { r as AuthUser } from "./auth-DkcFflXV.mjs";
|
|
2
|
-
import { a as CloudEnv, r as CloudContext } from "./handler-
|
|
2
|
+
import { a as CloudEnv, r as CloudContext } from "./handler-BeK3weD4.mjs";
|
|
3
3
|
//#region src/runtime/live.d.ts
|
|
4
4
|
type MaybePromise<T> = T | Promise<T>;
|
|
5
5
|
type LiveControlRequest = {
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import { a as join, i as isAbsolute, u as resolve } from "./dist-BVqXeR_h.mjs";
|
|
2
|
-
import { y as readRootWranglerConfig } from "./wrangler-
|
|
3
|
-
import { r as getMiniflareDatabasePath } from "./runner
|
|
2
|
+
import { y as readRootWranglerConfig } from "./wrangler-DhUerFkW.mjs";
|
|
3
|
+
import { r as getMiniflareDatabasePath } from "./runner--2KF6Kua.mjs";
|
|
4
4
|
import { existsSync, mkdirSync, readFileSync, rmSync, writeFileSync } from "node:fs";
|
|
5
5
|
import { createHash } from "node:crypto";
|
|
6
6
|
//#region src/local-d1.ts
|
|
@@ -1,7 +1,7 @@
|
|
|
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-
|
|
2
|
-
import { H as outro, K as select, L as log,
|
|
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-D52yG7hl.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-mC-dFGDD.mjs";
|
|
4
|
+
import { c as import_picocolors, r as createSpinner } from "./output-BvdaehtE.mjs";
|
|
5
5
|
//#region src/cli/login.ts
|
|
6
6
|
async function selectPlatformLoginMethod(platform, requestedId) {
|
|
7
7
|
const providers = platform?.authenticationProviders ?? ["github", "google"];
|
|
@@ -29,7 +29,7 @@ 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-dyFUof0t.mjs").then(({ discoverPlatform }) => discoverPlatform(getApiUrl(root))));
|
|
33
33
|
const s = createSpinner();
|
|
34
34
|
s.start(`Opening browser for ${providerName} login...`);
|
|
35
35
|
try {
|
|
@@ -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") {
|
|
@@ -1,15 +1,14 @@
|
|
|
1
|
-
import { n as readDeploymentPlatform, r as readProjectConfig } from "./project-
|
|
2
|
-
import { c as getToken } from "./auth-
|
|
3
|
-
import { $ as wrapTextWithPrefix, H as outro, L as log
|
|
4
|
-
import {
|
|
5
|
-
import {
|
|
1
|
+
import { n as readDeploymentPlatform, r as readProjectConfig } from "./project-DQstYTxO.mjs";
|
|
2
|
+
import { c as getToken } from "./auth-D52yG7hl.mjs";
|
|
3
|
+
import { $ as wrapTextWithPrefix, H as outro, L as log } from "./prompts-6OSVA7DJ.mjs";
|
|
4
|
+
import { r as PlatformClient } from "./client-mC-dFGDD.mjs";
|
|
5
|
+
import { c as import_picocolors, i as dim, o as formatCount } from "./output-BvdaehtE.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-DoQrVHAt.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);
|
|
@@ -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 { H as outro, L as log
|
|
7
|
-
import { r as cliTitle } from "./output-CbM85T4k.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,7 +1,7 @@
|
|
|
1
1
|
import { a as join } from "./dist-BVqXeR_h.mjs";
|
|
2
2
|
import { n as loadVoidAuthConfig, t as findVoidAuthConfig } from "./config-DPByhVck.mjs";
|
|
3
3
|
import { m as readConfig } from "./config-Br_JZD6u.mjs";
|
|
4
|
-
import { r as getMiniflareDatabasePath } from "./runner
|
|
4
|
+
import { r as getMiniflareDatabasePath } from "./runner--2KF6Kua.mjs";
|
|
5
5
|
import { a as loadLocalEnv } from "./env-_v349JBd.mjs";
|
|
6
6
|
import { r as resolveVoidAuthMigrationSchema } from "./drizzle-Beb2Am5S.mjs";
|
|
7
7
|
import { n as applyPgAuthMigrations, r as applySqliteAuthMigrations, t as applyMySqlAuthMigrations } from "./auth-migrations-9vif1uj8.mjs";
|
|
@@ -1,14 +1,10 @@
|
|
|
1
|
-
import { C as
|
|
2
|
-
import { n as OperatorClient, r as OperatorClientError } from "./operator-client-
|
|
1
|
+
import { C as deleteKeyringPassword, T as writeKeyringPassword, c as normalizePlatformApiUrl, i as getActivePlatformConnection, r as findPlatformConnections, u as platformCredentialAccount, w as readKeyringPassword } from "./platform-registry-P387v42A.mjs";
|
|
2
|
+
import { n as OperatorClient, r as OperatorClientError } from "./operator-client-BFqpp6z0.mjs";
|
|
3
3
|
/** Operator authority never comes from repository-controlled metadata. */
|
|
4
4
|
function resolveOperatorOrigin(connection = "") {
|
|
5
5
|
if (connection) {
|
|
6
|
-
|
|
7
|
-
|
|
8
|
-
normalized = normalizePlatformApiUrl(connection);
|
|
9
|
-
} catch {}
|
|
10
|
-
const matches = listPlatformConnections().filter((entry) => entry.id === connection || entry.installationId === connection || entry.apiUrl === normalized);
|
|
11
|
-
if (matches.length !== 1) throw new OperatorClientError("Select a registered platform connection ID or URL. Run `void connect <url> --no-login` to register it first.", "invalid_connection");
|
|
6
|
+
const matches = findPlatformConnections(connection);
|
|
7
|
+
if (matches.length !== 1) throw new OperatorClientError("Select a registered platform slug or URL. Run `void connect <url> --no-login` to register it first.", "invalid_connection");
|
|
12
8
|
return matches[0].apiUrl;
|
|
13
9
|
}
|
|
14
10
|
if (process.env.VOID_API_URL) return normalizePlatformApiUrl(process.env.VOID_API_URL);
|
|
@@ -1,6 +1,6 @@
|
|
|
1
|
+
import { c as normalizePlatformApiUrl } from "./platform-registry-P387v42A.mjs";
|
|
1
2
|
import { t as cfAccessHeaders } from "./cf-access-TWNzXltp.mjs";
|
|
2
|
-
import {
|
|
3
|
-
import { t as ensureCloudflaredToken } from "./cf-access-BGe5sWXF.mjs";
|
|
3
|
+
import { t as ensureCloudflaredToken } from "./cf-access-YTlqvAsk.mjs";
|
|
4
4
|
const OPERATOR_MAX_TIMEOUT_MS = 36e5;
|
|
5
5
|
var OperatorClientError = class extends Error {
|
|
6
6
|
code;
|
|
@@ -71,7 +71,7 @@ var OperatorClient = class {
|
|
|
71
71
|
}
|
|
72
72
|
if (!data || typeof data !== "object" || Array.isArray(data)) throw new OperatorClientError("Operator API returned an invalid response object.", "invalid_response", response.status);
|
|
73
73
|
const result = data;
|
|
74
|
-
if (!response.ok) throw new OperatorClientError(typeof result.message === "string" ? result.message : `Operator request failed (HTTP ${response.status}).`, typeof result.error === "string" ? result.error : "request_failed", response.status, result.details);
|
|
74
|
+
if (!response.ok) throw new OperatorClientError(typeof result.message === "string" ? result.message : typeof result.error === "string" ? result.error === "Platform disabled" && result.reason === "maintenance" ? `Operator request failed (HTTP ${response.status}): the platform is paused for an upgrade or repair. Retry when it finishes.` : `Operator request failed (HTTP ${response.status}): ${result.error}.${result.error === "Platform disabled" ? " Run `void platform enable`." : ""}` : `Operator request failed (HTTP ${response.status}).`, typeof result.error === "string" ? result.error : "request_failed", response.status, result.details);
|
|
75
75
|
if (result.partial === true || result.ok === false) throw new OperatorClientError("The operation did not fully complete. Inspect the partial result before retrying.", "partial_failure", response.status, result);
|
|
76
76
|
return result;
|
|
77
77
|
} finally {
|
|
@@ -1,10 +1,11 @@
|
|
|
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-BFqpp6z0.mjs";
|
|
2
|
+
import { a as resolveOperatorOrigin, i as removeOperatorToken, n as readOperatorApiTokenStdin, o as saveOperatorToken, r as readOperatorToken, t as exchangeOperatorSession } from "./operator-auth-2dsGlTT5.mjs";
|
|
3
3
|
import { createHash } from "node:crypto";
|
|
4
4
|
import { setTimeout } from "node:timers/promises";
|
|
5
5
|
import { createInterface } from "node:readline/promises";
|
|
6
6
|
//#region src/cli/operator-cmd.ts
|
|
7
7
|
const MAX_RUNTIME_FOLLOW_ROWS = 1e4;
|
|
8
|
+
const BUILD_LOG_DRAIN_TIMEOUT_MS = 12e4;
|
|
8
9
|
function printable(value) {
|
|
9
10
|
if (value === null || value === void 0) return "—";
|
|
10
11
|
if (typeof value === "string") return value.replace(/[\u0000-\u001f\u007f]/g, " ");
|
|
@@ -42,11 +43,28 @@ function eventLines(events, indent) {
|
|
|
42
43
|
if (!events.length) return [`${indent}(none)`];
|
|
43
44
|
return events.flatMap((event, index) => [`${indent}${index + 1}.`, ...humanLines(event, `${indent} `)]);
|
|
44
45
|
}
|
|
46
|
+
const LABEL_WORDS = {
|
|
47
|
+
api: "API",
|
|
48
|
+
dns: "DNS",
|
|
49
|
+
github: "GitHub",
|
|
50
|
+
http: "HTTP",
|
|
51
|
+
id: "ID",
|
|
52
|
+
ids: "IDs",
|
|
53
|
+
oauth: "OAuth",
|
|
54
|
+
oidc: "OIDC",
|
|
55
|
+
url: "URL",
|
|
56
|
+
urls: "URLs"
|
|
57
|
+
};
|
|
58
|
+
function fieldLabel(key) {
|
|
59
|
+
const words = key.replace(/([a-z0-9])([A-Z])/g, "$1 $2").split(/[\s_-]+/).filter(Boolean).map((word) => LABEL_WORDS[word.toLowerCase()] ?? word.toLowerCase());
|
|
60
|
+
if (words[0]) words[0] = words[0][0].toUpperCase() + words[0].slice(1);
|
|
61
|
+
return words.join(" ");
|
|
62
|
+
}
|
|
45
63
|
function humanLines(value, indent = "") {
|
|
46
64
|
if (Array.isArray(value)) return table(value, indent);
|
|
47
65
|
if (!value || typeof value !== "object") return [`${indent}${printable(value)}`];
|
|
48
66
|
return Object.entries(value).flatMap(([key, item]) => {
|
|
49
|
-
const label = key
|
|
67
|
+
const label = fieldLabel(key);
|
|
50
68
|
if (Array.isArray(item)) return [`${indent}${label}:`, ...key === "events" ? eventLines(item, `${indent} `) : table(item, `${indent} `)];
|
|
51
69
|
if (item && typeof item === "object") return [`${indent}${label}:`, ...humanLines(item, `${indent} `)];
|
|
52
70
|
return [`${indent}${label}: ${printable(item)}`];
|
|
@@ -137,9 +155,9 @@ async function runAuth(origin, args) {
|
|
|
137
155
|
if (args.action === "login" || args.action === "token" && args.tokenStdin) {
|
|
138
156
|
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
157
|
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-
|
|
158
|
+
const { discoverPlatform } = await import("./platform-cmd-dyFUof0t.mjs");
|
|
159
|
+
const { selectPlatformLoginMethod } = await import("./login-D7meQg_3.mjs");
|
|
160
|
+
const { runPlatformLogin } = await import("./auth-B60QDbjg.mjs");
|
|
143
161
|
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
162
|
})();
|
|
145
163
|
const session = await exchangeOperatorSession(origin, apiToken);
|
|
@@ -313,7 +331,7 @@ async function migrateDeploymentAssets(client, origin, args) {
|
|
|
313
331
|
}
|
|
314
332
|
async function runOperatorCommand(args) {
|
|
315
333
|
if (!args.action) {
|
|
316
|
-
const { printHelpPage } = await import("./help-
|
|
334
|
+
const { printHelpPage } = await import("./help-Dw5f9Xrg.mjs");
|
|
317
335
|
printHelpPage(["platform", args.group]);
|
|
318
336
|
return;
|
|
319
337
|
}
|
|
@@ -363,7 +381,7 @@ async function runOperatorCommand(args) {
|
|
|
363
381
|
if (args.action === "logs" && args.group !== "email") outputLogs(result, args.json);
|
|
364
382
|
else if (args.group === "system" && args.action === "asset-migrations" && !args.json && Array.isArray(result.deployments)) console.log([
|
|
365
383
|
...humanLines({ pagination: result.pagination }),
|
|
366
|
-
"
|
|
384
|
+
"Deployments:",
|
|
367
385
|
...eventLines(result.deployments, " ")
|
|
368
386
|
].join("\n"));
|
|
369
387
|
else output(result, args.json);
|
|
@@ -371,4 +389,4 @@ async function runOperatorCommand(args) {
|
|
|
371
389
|
}
|
|
372
390
|
}
|
|
373
391
|
//#endregion
|
|
374
|
-
export { runOperatorCommand };
|
|
392
|
+
export { runOperatorCommand as a, humanLines as i, confirmOperatorMutation as n, followOperatorLogs as r, BUILD_LOG_DRAIN_TIMEOUT_MS as t };
|
|
@@ -1,8 +1,11 @@
|
|
|
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 log, P as isCI, nt as settings, q as spinner } from "./prompts-
|
|
3
|
+
import { B as note$1, 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);
|
|
@@ -51,8 +54,29 @@ function createSpinner(options, isTerminal = process.stdout.isTTY === true) {
|
|
|
51
54
|
}
|
|
52
55
|
};
|
|
53
56
|
}
|
|
54
|
-
|
|
55
|
-
|
|
57
|
+
/** Narrowest terminal the shared box renderer can draw a note in, guide bar included. */
|
|
58
|
+
const MIN_NOTE_COLUMNS = 6;
|
|
59
|
+
/**
|
|
60
|
+
* The shared box renderer throws when the terminal is narrower than its smallest box (a 0x0 pty
|
|
61
|
+
* reports 0 columns). Treat a non-positive width as unknown, like `stdout.columns || 80` elsewhere
|
|
62
|
+
* in the CLI, and draw tiny terminals at the narrowest width the box supports.
|
|
63
|
+
*/
|
|
64
|
+
function note(...args) {
|
|
65
|
+
const [message, title, opts] = args;
|
|
66
|
+
const output = opts?.output ?? process.stdout;
|
|
67
|
+
const columns = output.columns;
|
|
68
|
+
if (typeof columns !== "number" || columns >= MIN_NOTE_COLUMNS) {
|
|
69
|
+
note$1(...args);
|
|
70
|
+
return;
|
|
71
|
+
}
|
|
72
|
+
const sized = {
|
|
73
|
+
columns: columns > 0 ? MIN_NOTE_COLUMNS : 80,
|
|
74
|
+
write: (chunk) => output.write(chunk)
|
|
75
|
+
};
|
|
76
|
+
note$1(message, title, {
|
|
77
|
+
...opts,
|
|
78
|
+
output: sized
|
|
79
|
+
});
|
|
56
80
|
}
|
|
57
81
|
function sectionTitle(title) {
|
|
58
82
|
return import_picocolors.default.reset(import_picocolors.default.blue(title));
|
|
@@ -86,4 +110,4 @@ function ensureUtc(s) {
|
|
|
86
110
|
return s + "Z";
|
|
87
111
|
}
|
|
88
112
|
//#endregion
|
|
89
|
-
export {
|
|
113
|
+
export { ensureUtc as a, import_picocolors as c, sectionTitle as d, tablePrefix as f, dim as i, note as l, cliCommandName as n, formatCount as o, createSpinner as r, helpLine as s, categoryTitle as t, sanitizeTerminalText as u };
|
package/dist/pages/client.d.mts
CHANGED
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { t as PageObject } from "../protocol-
|
|
1
|
+
import { t as PageObject } from "../protocol-BX8t2jiw.mjs";
|
|
2
2
|
import { n as CacheForInput, r as CacheForResult } from "../prefetch-Ce6la4EI.mjs";
|
|
3
3
|
import { UsageLimitData } from "@void/edge";
|
|
4
4
|
import { ActionUrl, ResolveActionBody, ResolveActionParams } from "void/routes";
|
|
@@ -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;
|