void 0.23.0 → 0.24.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/AGENTS_TEMPLATE.md +1 -1
- package/dist/{account-cmd-C84Ee8cO.mjs → account-cmd-vJhh5lrb.mjs} +5 -5
- package/dist/{auth-CSkdO2Bb.mjs → auth-CQkSDS50.mjs} +22 -49
- package/dist/auth-DX3JURcX.mjs +2 -0
- package/dist/{auth-link-CioEg6uY.mjs → auth-link-D75t9wO2.mjs} +5 -5
- package/dist/{auth-router-BsR981d4.mjs → auth-router-ClfhL1J7.mjs} +7 -7
- package/dist/{build-cmd-LzvNJORH.mjs → build-cmd-zMi1iFnS.mjs} +6 -6
- package/dist/{cache-C4MvnrMH.mjs → cache-ZtQmyxVV.mjs} +5 -5
- package/dist/{cancel-deploy-abUxpP2n.mjs → cancel-deploy-Box0kkEV.mjs} +5 -5
- package/dist/{cf-access-P0iZnu0q.mjs → cf-access-BGe5sWXF.mjs} +4 -48
- package/dist/{cf-access-DRsQRe6k.mjs → cf-access-TWNzXltp.mjs} +3 -11
- package/dist/cli/cli.mjs +47 -44
- package/dist/cli/cloudflare-operation-process.mjs +14 -5
- package/dist/cli/env-schema-probe.mjs +3 -3
- package/dist/client-B9UBI03V.mjs +2 -0
- package/dist/{client-RV8NVeB8.mjs → client-DKAsFA4X.mjs} +33 -15
- package/dist/{cloudflare-cmd-BcrVyTmJ.mjs → cloudflare-cmd-CmY8dGkd.mjs} +1 -1
- package/dist/{cloudflare-connect-B8uPZ4nx.mjs → cloudflare-connect-IiR3ZieC.mjs} +1 -1
- package/dist/{cloudflare-operations-AiWashgg.mjs → cloudflare-operations-BCdXSsmo.mjs} +1 -1
- package/dist/{cloudflare-operations-fxHb-byx.mjs → cloudflare-operations-DzH-A966.mjs} +1 -1
- package/dist/{connect-Bd4kJd9U.mjs → connect-B-usTnlF.mjs} +9 -9
- package/dist/{create-project-bMf6ffLZ.mjs → create-project-CYOOAYcn.mjs} +12 -12
- package/dist/{create-project-Boczwj5r.mjs → create-project-FWbf5Olo.mjs} +1 -1
- package/dist/{db-8uG64XLl.mjs → db-Ck2eZ2iB.mjs} +15 -15
- package/dist/{delete-NvbiyeJf.mjs → delete-sK56qtzZ.mjs} +5 -5
- package/dist/{deploy-DzAIwqNU.mjs → deploy-gCVaiJbS.mjs} +86 -44
- package/dist/{deploy-bjXdFCtn.mjs → deploy-irP5q0-x.mjs} +1 -1
- package/dist/{domain-y5Tvydvo.mjs → domain-DFfQE8jg.mjs} +6 -6
- package/dist/{email-B3umsW75.mjs → email-CdnhUHvJ.mjs} +7 -7
- package/dist/{env-BS6qYHDb.mjs → env-DmGdHi5i.mjs} +8 -8
- package/dist/{env-types-C2_bIk_b.mjs → env-types-D5kds_OZ.mjs} +1 -1
- package/dist/{env-validation-BPn7vk-V.mjs → env-validation-C_8tPdhs.mjs} +2 -2
- package/dist/{env-validation-DbTg7-ar.mjs → env-validation-zZOCcQVZ.mjs} +1 -1
- package/dist/{gen-B580--vC.mjs → gen-CshAkukR.mjs} +2 -2
- package/dist/gen-DvQTWzDU.mjs +2 -0
- package/dist/{github-cmd-v45BdfKX.mjs → github-cmd-DftuEvIt.mjs} +13 -13
- package/dist/{headers-DWi2IXWx.mjs → headers-2rKda9Y6.mjs} +1 -1
- package/dist/{help-daGKjXGk.mjs → help-Dotbf6iz.mjs} +8 -4
- package/dist/help-mabuIV98.mjs +2 -0
- package/dist/{inbound-aVHEUhKo.mjs → inbound-fRkqcXaC.mjs} +1 -1
- package/dist/index.mjs +16 -20
- package/dist/{init-Bvy7zrBo.mjs → init-BTQEZZGJ.mjs} +25 -22
- package/dist/{link-CDqqCjFl.mjs → link-B46sYH0K.mjs} +6 -6
- package/dist/{list-CZj0dzKY.mjs → list-BnPrIsU_.mjs} +6 -6
- package/dist/log-vqY3pqwI.mjs +29 -0
- package/dist/{login-UZKFM_u7.mjs → login-BuiMyUrx.mjs} +8 -8
- package/dist/login-DIy9Sb-U.mjs +2 -0
- package/dist/{logs-CUZ6t9t3.mjs → logs-CZG9d-ic.mjs} +10 -11
- package/dist/migrate-BCiJ8w0f.mjs +2 -0
- package/dist/{migrate-DHul7PRV.mjs → migrate-q4_njtaW.mjs} +2 -2
- package/dist/{operator-args-CLgKGlwU.mjs → operator-args-B3BTmSoi.mjs} +12 -5
- package/dist/{operator-auth-8KnOVXVd.mjs → operator-auth-7erYc6Lt.mjs} +2 -2
- package/dist/{operator-client-DUwumHpQ.mjs → operator-client-CpHjTd0t.mjs} +3 -3
- package/dist/{operator-cmd-DBA6dl0m.mjs → operator-cmd-DGqPJUD3.mjs} +6 -6
- package/dist/{output-Dm_A4Tbv.mjs → output-CbM85T4k.mjs} +18 -10
- package/dist/pages/index.mjs +1 -1
- package/dist/{platform-args-BJdRtlLq.mjs → platform-args-3k8X9-H_.mjs} +11 -3
- package/dist/platform-args-DdnM6WIf.mjs +2 -0
- package/dist/{platform-auth-config-B56E9YP1.mjs → platform-auth-config-DDrxUy4m.mjs} +6 -6
- package/dist/{platform-auth-protection-BDWO_aER.mjs → platform-auth-protection-BLadnnct.mjs} +8 -8
- package/dist/{platform-auth-recovery-1gg4CSRe.mjs → platform-auth-recovery-CmCzX2Fl.mjs} +6 -6
- package/dist/{platform-cmd-DMcQStSc.mjs → platform-cmd-DMDEc9uS.mjs} +10 -10
- package/dist/{platform-cmd-Bt-1w6pY.mjs → platform-cmd-pMTRhvYs.mjs} +1 -1
- package/dist/{platform-domain-BNkcz0OB.mjs → platform-domain-Di6EYrQl.mjs} +5 -5
- package/dist/{platform-lifecycle-9OyBALhH.mjs → platform-lifecycle-BBoNzojY.mjs} +1264 -407
- package/dist/{platform-lifecycle-BE6C_jxh.mjs → platform-lifecycle-BFdSi9Qt.mjs} +1 -1
- package/dist/{platform-management-CjwLVQwN.mjs → platform-management-CWOQOWXm.mjs} +5 -5
- package/dist/{platform-management-CnyTdcWX.mjs → platform-management-DG47jys8.mjs} +1 -1
- package/dist/{platform-plans-config-BNGKGr4P.mjs → platform-plans-config-Vl9BP3H4.mjs} +3 -3
- package/dist/{platform-recovery-D6KSpuFm.mjs → platform-recovery-BJnQJEtQ.mjs} +4 -4
- package/dist/{platform-registry-QBa4DK32.mjs → platform-registry-DkPPXfp_.mjs} +2 -2
- package/dist/{prepare-B5Mkic5u.mjs → prepare-CBLT3CHH.mjs} +3 -3
- package/dist/prepare-CnjcTV2s.mjs +2 -0
- package/dist/{prepare-DOsL0CC9.mjs → prepare-DnaKBi--.mjs} +1 -1
- package/dist/{project-C0Fqu05O.mjs → project-DKG5Ra8p.mjs} +15 -82
- package/dist/project-DsblYifa.mjs +2 -0
- package/dist/{project-cmd-CNzrqvBv.mjs → project-cmd-DxnXstAq.mjs} +19 -19
- package/dist/{project-team-DQOWPfQT.mjs → project-team-BmHcaALJ.mjs} +5 -5
- package/dist/{project-token-CTDYU0Cc.mjs → project-token-GionZlBI.mjs} +5 -5
- package/dist/{project-zero-trust-BNAkW-_0.mjs → project-zero-trust-JLCjVQA7.mjs} +5 -5
- package/dist/prompts-2TGE6oXx.mjs +2 -0
- package/dist/prompts-BNUoTiaf.mjs +2044 -0
- package/dist/{provision-C4ORE7G7.mjs → provision-CVku1JFU.mjs} +1 -1
- package/dist/{provision-CJFgTZY8.mjs → provision-CaoxO_U7.mjs} +1 -1
- package/dist/{requests-MhxYnau8.mjs → requests-BOjIVAeF.mjs} +5 -5
- package/dist/{rollback-CJ6iSDoU.mjs → rollback-CwR3pLj3.mjs} +6 -6
- package/dist/runtime/ai.mjs +3 -5
- package/dist/runtime/email/testing.mjs +1 -1
- package/dist/runtime/email.mjs +1 -1
- package/dist/runtime/remote/index.mjs +2 -2
- package/dist/{secret-Dli5fP0B.mjs → secret-ByWJWBUG.mjs} +7 -7
- package/dist/{skills-D1II1Juz.mjs → skills-C1PlclPt.mjs} +1 -1
- package/dist/{subcommand-prompt-CY1C4fvl.mjs → subcommand-prompt-klFCfcor.mjs} +40 -32
- package/package.json +8 -9
- package/skills/void/SKILL.md +6 -1
- package/skills/void/docs/guide/deployment.md +22 -0
- package/skills/void/docs/guide/edge/headers.md +1 -1
- package/skills/void/docs/guide/email/domains.md +5 -1
- package/skills/void/docs/guide/email/sending.md +1 -1
- package/skills/void/docs/guide/platform/administration/zero-trust.md +27 -9
- package/skills/void/docs/guide/platform/installation/ci.md +1 -1
- package/skills/void/docs/guide/platform/installation/credentials.md +10 -3
- package/skills/void/docs/guide/platform/installation/domains.md +8 -3
- package/skills/void/docs/guide/platform/installation/first-deployment.md +2 -2
- package/skills/void/docs/guide/platform/installation/maintenance.md +12 -0
- package/skills/void/docs/guide/platform/installation/prerequisites.md +8 -7
- package/skills/void/docs/guide/platform/installation/setup.md +80 -10
- package/skills/void/docs/guide/remote-dev.md +1 -1
- package/skills/void/docs/reference/cli/auth.md +4 -3
- package/skills/void/docs/reference/cli/database.md +1 -1
- package/skills/void/docs/reference/cli/deploy.md +20 -0
- package/skills/void/docs/reference/cli/platform-installation.md +42 -27
- package/skills/void/docs/reference/cli/platform-zero-trust.md +14 -0
- package/skills/void/docs/reference/config.md +1 -1
- package/dist/auth-CCjt0hcq.mjs +0 -2
- package/dist/client-Cu7jWiF1.mjs +0 -2
- package/dist/dist-BuDuKZJv.mjs +0 -2
- package/dist/dist-CTBk70IR.mjs +0 -1310
- package/dist/gen-BVaUUumi.mjs +0 -2
- package/dist/help-DofyZuY7.mjs +0 -2
- package/dist/log-ChfPKsVd.mjs +0 -26
- package/dist/login-DYt_An22.mjs +0 -2
- package/dist/migrate-8_2u55MD.mjs +0 -2
- package/dist/platform-args-D3RXyR6h.mjs +0 -2
- package/dist/prepare-cgvDMtSb.mjs +0 -2
- package/dist/project-BuUwfj6f.mjs +0 -2
package/dist/index.mjs
CHANGED
|
@@ -12,15 +12,15 @@ import { a as validateSsrEntries, n as SSR_SERVER_ENTRY_RELATIVE_PATHS, o as val
|
|
|
12
12
|
import { r as hasEmailHandlers } from "./email--tEtMoj_.mjs";
|
|
13
13
|
import { i as resolveLayoutIds } from "./scan-C7okrLyM.mjs";
|
|
14
14
|
import { a as hasSandboxSqliteMigration, c as resolveSandboxConfig, i as assertSandboxNamespaceConfig, l as sandboxContainerConfig, n as DEFAULT_SANDBOX_CLASS_NAME, r as SANDBOX_MIGRATION_TAG } from "./config-C_XRIPx2.mjs";
|
|
15
|
-
import { Ct as hasDocumentRoutes, G as resolveWorkerDirName, St as hasApiRoutes, Tt as resolveAssetRoutingPolicy, V as resolveDistDir, ct as selectNativeVersionMetadataBinding, ft as collectPages, ht as SEND_EMAIL_BINDING, lt as prerenderPages, mt as hasRevalidate, ot as generateQueueResolverSource, pt as collectRevalidate, st as CLOUDFLARE_PRESERVE_BINDINGS_BUILD_ENV, ut as prerenderPagesNode } from "./deploy-
|
|
16
|
-
import {
|
|
17
|
-
import {
|
|
18
|
-
import { r as
|
|
19
|
-
import {
|
|
15
|
+
import { Ct as hasDocumentRoutes, G as resolveWorkerDirName, St as hasApiRoutes, Tt as resolveAssetRoutingPolicy, V as resolveDistDir, ct as selectNativeVersionMetadataBinding, ft as collectPages, ht as SEND_EMAIL_BINDING, lt as prerenderPages, mt as hasRevalidate, ot as generateQueueResolverSource, pt as collectRevalidate, st as CLOUDFLARE_PRESERVE_BINDINGS_BUILD_ENV, ut as prerenderPagesNode } from "./deploy-gCVaiJbS.mjs";
|
|
16
|
+
import { n as scopedAccessCredentials } from "./cf-access-TWNzXltp.mjs";
|
|
17
|
+
import { r as ensurePlatformProxyAccess } from "./cf-access-BGe5sWXF.mjs";
|
|
18
|
+
import { n as readDeploymentPlatform, r as readProjectConfig } from "./project-DKG5Ra8p.mjs";
|
|
19
|
+
import { a as getApiUrl, c as getToken, o as getProxyUrl } from "./auth-CQkSDS50.mjs";
|
|
20
20
|
import { a as restoreCloudflarePreviewPointer, r as materializeCloudflareConfig, s as stashCloudflareDeployPointer } from "./cloudflare-config-Bktvwtpf.mjs";
|
|
21
21
|
import { D as syncWranglerDurableObjects, E as syncWranglerBindings, O as syncWranglerWebSockets, T as resolveLiveBindingConfig, _ as readExistingLiveBindingConfig, a as LIVE_MIGRATION_TAG, b as readWranglerCompat, d as ensureWranglerCompatibilityDate, f as ensureWranglerNodejsAlsFlag, g as normalizeWranglerCompatibilityFlags, h as nextDurableObjectMigrationTag, m as hasDurableObjectSqliteMigration, p as findBindingNameOwner, u as ensureWranglerCompat, w as readWranglerWebSocketTombstones } from "./wrangler-7K-bW_DL.mjs";
|
|
22
|
-
import { i as voidWarn, n as voidError, r as voidLog, t as setShowTimestamp } from "./log-
|
|
23
|
-
import { n as lintDuplicateSources, r as mergeRoutingRules, t as lintDestinationSplats } from "./headers-
|
|
22
|
+
import { i as voidWarn, n as voidError, r as voidLog, t as setShowTimestamp } from "./log-vqY3pqwI.mjs";
|
|
23
|
+
import { n as lintDuplicateSources, r as mergeRoutingRules, t as lintDestinationSplats } from "./headers-2rKda9Y6.mjs";
|
|
24
24
|
import { n as ensureProjectTsconfig, r as writeFileIfChanged } from "./project-tsconfig-B8GeM0RM.mjs";
|
|
25
25
|
import { n as writeLocalD1PersistState, t as resolveLocalD1Target } from "./local-d1-2CMnpuW_.mjs";
|
|
26
26
|
import { n as parseDotenvFile } from "./dotenv-VQxupEUv.mjs";
|
|
@@ -28,8 +28,8 @@ import { i as generateDbDts, n as generateQueueTypes, r as DRIZZLE_OPERATORS, t
|
|
|
28
28
|
import { t as discoverSchema } from "./discover-BcPPiF1o.mjs";
|
|
29
29
|
import { _ as parseCapturedMessage, a as DEV_INBOX_ENV_VAR, c as DEV_INBOX_TOKEN_ENV_VAR, f as clearDevBuffer, g as listDevMessages, l as DEV_INBOX_TOKEN_HEADER, m as findDevMessage, n as DEV_INBOX_ACK_VALUE, o as DEV_INBOX_MAX_CAPTURE_BYTES, s as DEV_INBOX_PREFIX, t as DEV_INBOX_ACK_HEADER, u as DEV_INBOX_TOKEN_QUERY, v as pushToDevBuffer, y as registerEmailSink } from "./dev-inbox-P0u4tM8Y.mjs";
|
|
30
30
|
import { t as MagicString } from "./dist-AoCzRTJE.mjs";
|
|
31
|
-
import { n as findEnvFileForPaths, r as generateEnvTypes, t as findEnvFile } from "./env-types-
|
|
32
|
-
import { y as loadUserEnvFile } from "./env-validation-
|
|
31
|
+
import { n as findEnvFileForPaths, r as generateEnvTypes, t as findEnvFile } from "./env-types-D5kds_OZ.mjs";
|
|
32
|
+
import { y as loadUserEnvFile } from "./env-validation-C_8tPdhs.mjs";
|
|
33
33
|
import { a as loadLocalEnv, o as resolveRemoteMode, r as findLegacyEnvFiles, s as stripInternalEnvKeys, t as CLIENT_ENV_PREFIX$2 } from "./env-_v349JBd.mjs";
|
|
34
34
|
import { n as completeApplicationAnalysis } from "./application-routing-B7QEjqSR.mjs";
|
|
35
35
|
import { n as generateVoidAuthDrizzleSchema, t as generateVoidAuthDatabaseModule } from "./drizzle-Beb2Am5S.mjs";
|
|
@@ -4310,14 +4310,12 @@ function createWranglerCompatPersistPlugin(root, config) {
|
|
|
4310
4310
|
function readVoidDevCredentials(root) {
|
|
4311
4311
|
const token = getToken(root);
|
|
4312
4312
|
if (!token) return { status: "no-token" };
|
|
4313
|
-
const staging = isStagingMode(root) || void 0;
|
|
4314
4313
|
const apiUrl = getApiUrl(root);
|
|
4315
4314
|
const project = readProjectConfig(root);
|
|
4316
4315
|
if (!project) return {
|
|
4317
4316
|
status: "no-project",
|
|
4318
4317
|
apiUrl,
|
|
4319
|
-
token
|
|
4320
|
-
staging
|
|
4318
|
+
token
|
|
4321
4319
|
};
|
|
4322
4320
|
const proxyUrl = getProxyUrl(root);
|
|
4323
4321
|
ensurePlatformProxyAccess(apiUrl, proxyUrl);
|
|
@@ -4326,8 +4324,7 @@ function readVoidDevCredentials(root) {
|
|
|
4326
4324
|
token,
|
|
4327
4325
|
projectId: project.projectId,
|
|
4328
4326
|
proxyUrl,
|
|
4329
|
-
accessCredentials: scopedAccessCredentials(process.env, proxyUrl)
|
|
4330
|
-
staging
|
|
4327
|
+
accessCredentials: scopedAccessCredentials(process.env, proxyUrl)
|
|
4331
4328
|
};
|
|
4332
4329
|
}
|
|
4333
4330
|
/**
|
|
@@ -4336,9 +4333,9 @@ function readVoidDevCredentials(root) {
|
|
|
4336
4333
|
* block the server. On completion, writes project.json and restarts the server.
|
|
4337
4334
|
*/
|
|
4338
4335
|
async function runAiSetupPrompt(root, token, apiUrl, server) {
|
|
4339
|
-
const { select, text, isCancel, log } = await import("./
|
|
4340
|
-
const { PlatformClient } = await import("./client-
|
|
4341
|
-
const { attachSelectedPlatform, writeProjectConfig } = await import("./project-
|
|
4336
|
+
const { select, text, isCancel, log } = await import("./prompts-2TGE6oXx.mjs");
|
|
4337
|
+
const { PlatformClient } = await import("./client-B9UBI03V.mjs");
|
|
4338
|
+
const { attachSelectedPlatform, writeProjectConfig } = await import("./project-DsblYifa.mjs");
|
|
4342
4339
|
const { inferDefaultSlug } = await import("./resolve-project-DtbidV4y.mjs");
|
|
4343
4340
|
const client = new PlatformClient(token, apiUrl);
|
|
4344
4341
|
let projects;
|
|
@@ -4366,7 +4363,7 @@ async function runAiSetupPrompt(root, token, apiUrl, server) {
|
|
|
4366
4363
|
let slug;
|
|
4367
4364
|
if (result === "__create__") {
|
|
4368
4365
|
const { validateProjectSlug } = await import("./project-slug-DofjTFd-.mjs");
|
|
4369
|
-
const { createProjectWithSlugRetry } = await import("./create-project-
|
|
4366
|
+
const { createProjectWithSlugRetry } = await import("./create-project-FWbf5Olo.mjs");
|
|
4370
4367
|
let created;
|
|
4371
4368
|
try {
|
|
4372
4369
|
created = await createProjectWithSlugRetry(client, inferDefaultSlug(root), async (defaultSlug) => {
|
|
@@ -4876,7 +4873,6 @@ function voidPlugin(options) {
|
|
|
4876
4873
|
vars.__VOID_PROJECT_ID = credentials.projectId;
|
|
4877
4874
|
vars.__VOID_PROXY_URL = credentials.proxyUrl;
|
|
4878
4875
|
if (credentials.accessCredentials) vars.__VOID_ACCESS_CREDENTIALS = credentials.accessCredentials;
|
|
4879
|
-
if (credentials.staging) vars.__VOID_STAGING = "1";
|
|
4880
4876
|
result.vars = vars;
|
|
4881
4877
|
}
|
|
4882
4878
|
}
|
|
@@ -4972,7 +4968,7 @@ function voidPlugin(options) {
|
|
|
4972
4968
|
if (remoteMode && (bindings.needsD1 || bindings.needsKV || bindings.needsR2)) {
|
|
4973
4969
|
const credentials = readVoidDevCredentials(root);
|
|
4974
4970
|
if (credentials.status === "ok") {
|
|
4975
|
-
const lines = ["
|
|
4971
|
+
const lines = [import_picocolors.default.blue("Remote bindings active")];
|
|
4976
4972
|
if (bindings.needsD1) lines.push(" DB \x1B[2m→ remote D1\x1B[22m");
|
|
4977
4973
|
if (bindings.needsKV) lines.push(" KV \x1B[2m→ remote KV\x1B[22m");
|
|
4978
4974
|
if (bindings.needsR2) lines.push(" STORAGE \x1B[2m→ remote R2\x1B[22m");
|
|
@@ -2,25 +2,25 @@ 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 {
|
|
5
|
+
import { l as writeProjectConfig, n as readDeploymentPlatform, r as readProjectConfig, s as writeDeploymentPlatform, t as attachSelectedPlatform } from "./project-DKG5Ra8p.mjs";
|
|
6
|
+
import { c as getToken } from "./auth-CQkSDS50.mjs";
|
|
7
7
|
import { r as materializeCloudflareConfig } from "./cloudflare-config-Bktvwtpf.mjs";
|
|
8
8
|
import { A as writeProvisionedWranglerConfig, i as LATEST_KNOWN_COMPAT_DATE } from "./wrangler-7K-bW_DL.mjs";
|
|
9
9
|
import { n as ensureProjectTsconfig, t as createProjectTsconfig } from "./project-tsconfig-B8GeM0RM.mjs";
|
|
10
10
|
import { n as parseDotenvFile, t as expandDotenv } from "./dotenv-VQxupEUv.mjs";
|
|
11
11
|
import { t as MagicString } from "./dist-AoCzRTJE.mjs";
|
|
12
|
-
import {
|
|
12
|
+
import { A as confirm, B as note, H as outro, K as select, L as log, N as intro, O as cancel, X as text, tt as isCancel } from "./prompts-BNUoTiaf.mjs";
|
|
13
13
|
import { t as writeDrizzleConfig } from "./config-D8MOgiQV.mjs";
|
|
14
14
|
import { n as getPackageDir, t as detectAgents } from "./agents-B_pX_HmQ.mjs";
|
|
15
|
-
import { n as PlatformClient } from "./client-
|
|
15
|
+
import { n as PlatformClient } from "./client-DKAsFA4X.mjs";
|
|
16
16
|
import { o as formatProjectCommand } from "./cloudflare-process-B-wekeR6.mjs";
|
|
17
17
|
import { n as writeVoidProjectConfig, t as canRewriteVoidProjectConfig } from "./config-write-B1f88wJA.mjs";
|
|
18
|
-
import { i as migrateFrameworkAdapterPaths, t as migrateLegacyVoidConfig } from "./migrate-
|
|
19
|
-
import { r as cliTitle } from "./output-
|
|
20
|
-
import { a as promptProjectSelection, r as promptAndCreateProject } from "./create-project-
|
|
21
|
-
import { t as promptForLoginToken } from "./login-
|
|
22
|
-
import { i as saveDiscoveredPlatform, t as discoverPlatform } from "./platform-cmd-
|
|
23
|
-
import { t as connectCloudflare } from "./cloudflare-connect-
|
|
18
|
+
import { i as migrateFrameworkAdapterPaths, t as migrateLegacyVoidConfig } from "./migrate-q4_njtaW.mjs";
|
|
19
|
+
import { r as cliTitle } from "./output-CbM85T4k.mjs";
|
|
20
|
+
import { a as promptProjectSelection, r as promptAndCreateProject } from "./create-project-CYOOAYcn.mjs";
|
|
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";
|
|
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";
|
|
@@ -34,7 +34,7 @@ async function ensureToken(root) {
|
|
|
34
34
|
const existing = getToken(root);
|
|
35
35
|
if (existing) return existing;
|
|
36
36
|
const token = await promptForLoginToken(root);
|
|
37
|
-
log.success(
|
|
37
|
+
log.success("Token saved.");
|
|
38
38
|
return token;
|
|
39
39
|
}
|
|
40
40
|
async function maybeSetupDeployProject(root) {
|
|
@@ -1102,11 +1102,12 @@ async function resolveInitRoot(root) {
|
|
|
1102
1102
|
process.exit(0);
|
|
1103
1103
|
}
|
|
1104
1104
|
if (choice === "current") return root;
|
|
1105
|
+
const defaultFolder = "my-void-app";
|
|
1105
1106
|
const folder = await text({
|
|
1106
1107
|
message: "New project folder name:",
|
|
1107
|
-
placeholder:
|
|
1108
|
-
|
|
1109
|
-
validate: (value) => validateSubfolderName(root, value)
|
|
1108
|
+
placeholder: defaultFolder,
|
|
1109
|
+
defaultValue: defaultFolder,
|
|
1110
|
+
validate: (value) => validateSubfolderName(root, value || defaultFolder)
|
|
1110
1111
|
});
|
|
1111
1112
|
if (isCancel(folder) || typeof folder === "symbol") {
|
|
1112
1113
|
cancel("Setup cancelled.");
|
|
@@ -1932,11 +1933,11 @@ async function ensureVoidPlatformConnection(root) {
|
|
|
1932
1933
|
let selectedApiUrl = null;
|
|
1933
1934
|
let promptedForPlatform = false;
|
|
1934
1935
|
try {
|
|
1935
|
-
const { getApiUrl, getSiteDomain } = await import("./auth-
|
|
1936
|
+
const { getApiUrl, getSiteDomain } = await import("./auth-DX3JURcX.mjs");
|
|
1936
1937
|
selectedApiUrl = getApiUrl(root);
|
|
1937
1938
|
getSiteDomain(root);
|
|
1938
1939
|
} catch (error) {
|
|
1939
|
-
if (!(error instanceof Error) || !error.message.includes("No Void platform
|
|
1940
|
+
if (!(error instanceof Error) || !error.message.includes("No Void platform connected")) throw error;
|
|
1940
1941
|
}
|
|
1941
1942
|
if (!selectedApiUrl) {
|
|
1942
1943
|
promptedForPlatform = true;
|
|
@@ -1976,7 +1977,6 @@ function getNodeVersionLine(root) {
|
|
|
1976
1977
|
if (existsSync(join(root, ".node-version"))) return "node-version-file: .node-version";
|
|
1977
1978
|
return "node-version: lts/*";
|
|
1978
1979
|
}
|
|
1979
|
-
const WORKFLOW_DEFAULT_API_URL = "https://api.void.cloud";
|
|
1980
1980
|
function getWorkflowSetupSteps(root, pm) {
|
|
1981
1981
|
const nodeVersion = getNodeVersionLine(root);
|
|
1982
1982
|
switch (pm) {
|
|
@@ -2025,7 +2025,7 @@ function getWorkflowSetupSteps(root, pm) {
|
|
|
2025
2025
|
* otherwise a `${{ vars.VOID_PROJECT }}` placeholder is emitted with a comment
|
|
2026
2026
|
* telling the user to set the repository variable.
|
|
2027
2027
|
*/
|
|
2028
|
-
function getWorkflowYaml(root, pm, slug, platform = "void", platformApiUrl
|
|
2028
|
+
function getWorkflowYaml(root, pm, slug, platform = "void", platformApiUrl) {
|
|
2029
2029
|
const { setup, install, runner } = getWorkflowSetupSteps(root, pm);
|
|
2030
2030
|
if (platform === "cloudflare") return `name: Deploy to Cloudflare
|
|
2031
2031
|
on:
|
|
@@ -2059,6 +2059,7 @@ ${install}
|
|
|
2059
2059
|
CF_ACCESS_CLIENT_SECRET: \${{ secrets.CF_ACCESS_CLIENT_SECRET }}
|
|
2060
2060
|
run: ${runner} deploy --platform cloudflare
|
|
2061
2061
|
`;
|
|
2062
|
+
if (!platformApiUrl) throw new Error("init: Connect to a Void platform before generating a deployment workflow. Run `void connect <url>` first.");
|
|
2062
2063
|
return `name: Deploy to Void
|
|
2063
2064
|
on:
|
|
2064
2065
|
push:
|
|
@@ -2094,10 +2095,12 @@ jobs:
|
|
|
2094
2095
|
${setup}
|
|
2095
2096
|
${install}
|
|
2096
2097
|
- name: Deploy
|
|
2097
|
-
run:
|
|
2098
|
+
run: |
|
|
2099
|
+
${runner} connect "$VOID_API_URL" --no-login
|
|
2100
|
+
${runner} deploy --platform void --project "$VOID_PROJECT"
|
|
2098
2101
|
`;
|
|
2099
2102
|
}
|
|
2100
|
-
function setupGithubActions(root, state, platform = "void", platformApiUrl
|
|
2103
|
+
function setupGithubActions(root, state, platform = "void", platformApiUrl) {
|
|
2101
2104
|
const workflowDir = join(root, ".github", "workflows");
|
|
2102
2105
|
const workflowPath = join(workflowDir, "void-deploy.yml");
|
|
2103
2106
|
if (existsSync(workflowPath)) {
|
|
@@ -2677,7 +2680,7 @@ async function runInitCommand(root, initArgs) {
|
|
|
2677
2680
|
injectAgentBlock(root);
|
|
2678
2681
|
const agents = detectAgents(root);
|
|
2679
2682
|
if (agents.length > 0) {
|
|
2680
|
-
const { linkSkillsForSpecificAgents } = await import("./skills-
|
|
2683
|
+
const { linkSkillsForSpecificAgents } = await import("./skills-C1PlclPt.mjs");
|
|
2681
2684
|
linkSkillsForSpecificAgents(root, agents);
|
|
2682
2685
|
} else log.info("No coding agent detected; read the bundled docs linked in AGENTS.md");
|
|
2683
2686
|
}
|
|
@@ -2711,7 +2714,7 @@ async function runInitCommand(root, initArgs) {
|
|
|
2711
2714
|
let shouldSetupGithub = targeted ? initArgs?.github === true : deploymentPlatform !== "none";
|
|
2712
2715
|
if (shouldSetupGithub && !githubStepSkipForSubpackage && deploymentPlatform !== "cloudflare" && deploymentPlatform !== "none") {
|
|
2713
2716
|
if (!voidPlatformDiscovery) {
|
|
2714
|
-
const { getApiUrl } = await import("./auth-
|
|
2717
|
+
const { getApiUrl } = await import("./auth-DX3JURcX.mjs");
|
|
2715
2718
|
voidPlatformDiscovery = await discoverPlatform(getApiUrl(root));
|
|
2716
2719
|
}
|
|
2717
2720
|
if (!voidPlatformDiscovery.capabilities.githubActions) {
|
|
@@ -1,9 +1,9 @@
|
|
|
1
|
-
import {
|
|
2
|
-
import {
|
|
3
|
-
import {
|
|
4
|
-
import { n as PlatformClient } from "./client-
|
|
5
|
-
import { c as import_picocolors, r as cliTitle } from "./output-
|
|
6
|
-
import { a as promptProjectSelection, r as promptAndCreateProject } from "./create-project-
|
|
1
|
+
import { l as writeProjectConfig, r as readProjectConfig, t as attachSelectedPlatform } from "./project-DKG5Ra8p.mjs";
|
|
2
|
+
import { c as getToken, s as getSiteDomain } from "./auth-CQkSDS50.mjs";
|
|
3
|
+
import { H as outro, L as log, N as intro, O as cancel } from "./prompts-BNUoTiaf.mjs";
|
|
4
|
+
import { n as PlatformClient } from "./client-DKAsFA4X.mjs";
|
|
5
|
+
import { c as import_picocolors, r as cliTitle } from "./output-CbM85T4k.mjs";
|
|
6
|
+
import { a as promptProjectSelection, r as promptAndCreateProject } from "./create-project-CYOOAYcn.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) {
|
|
@@ -1,8 +1,8 @@
|
|
|
1
|
-
import {
|
|
2
|
-
import {
|
|
3
|
-
import {
|
|
4
|
-
import { n as PlatformClient } from "./client-
|
|
5
|
-
import { a as dim, c as import_picocolors, d as tablePrefix, o as ensureUtc, r as cliTitle } from "./output-
|
|
1
|
+
import { n as readDeploymentPlatform, r as readProjectConfig } from "./project-DKG5Ra8p.mjs";
|
|
2
|
+
import { c as getToken } from "./auth-CQkSDS50.mjs";
|
|
3
|
+
import { H as outro, L as log, N as intro } from "./prompts-BNUoTiaf.mjs";
|
|
4
|
+
import { n as PlatformClient } from "./client-DKAsFA4X.mjs";
|
|
5
|
+
import { a as dim, c as import_picocolors, d as tablePrefix, o as ensureUtc, r as cliTitle } from "./output-CbM85T4k.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) {
|
|
@@ -43,7 +43,7 @@ async function runListCommand(root, slug) {
|
|
|
43
43
|
}
|
|
44
44
|
async function showCloudflareDeployments(root, slug) {
|
|
45
45
|
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-
|
|
46
|
+
const { readCloudflareWorkerStatus, resolveCloudflareOperationContext } = await import("./cloudflare-operations-BCdXSsmo.mjs");
|
|
47
47
|
const status = await readCloudflareWorkerStatus(resolveCloudflareOperationContext(root));
|
|
48
48
|
if (status.versions.length === 0) {
|
|
49
49
|
outro(`No deployments for ${status.workerName}.`);
|
|
@@ -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 { i as isExpiredTokenError, n as PlatformClient } from "./client-
|
|
4
|
-
import { c as import_picocolors, i as createSpinner, r as cliTitle } from "./output-
|
|
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-CQkSDS50.mjs";
|
|
2
|
+
import { H as outro, K as select, L as log, N as intro, O as cancel, tt as isCancel } from "./prompts-BNUoTiaf.mjs";
|
|
3
|
+
import { i as isExpiredTokenError, n as PlatformClient } from "./client-DKAsFA4X.mjs";
|
|
4
|
+
import { c as import_picocolors, i as createSpinner, r as cliTitle } from "./output-CbM85T4k.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-pMTRhvYs.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);
|
|
@@ -77,10 +77,10 @@ async function runLoginCommand(root = process.cwd()) {
|
|
|
77
77
|
}
|
|
78
78
|
await promptForLoginToken(root);
|
|
79
79
|
if (expiredEnvToken) {
|
|
80
|
-
outro(
|
|
80
|
+
outro("Token saved. Unset `VOID_TOKEN` to use it.");
|
|
81
81
|
return;
|
|
82
82
|
}
|
|
83
|
-
outro(
|
|
83
|
+
outro("Token saved.");
|
|
84
84
|
}
|
|
85
85
|
//#endregion
|
|
86
86
|
export { runLoginCommand as n, selectPlatformLoginMethod as r, promptForLoginToken as t };
|
|
@@ -1,15 +1,15 @@
|
|
|
1
|
-
import {
|
|
2
|
-
import {
|
|
3
|
-
import {
|
|
4
|
-
import { n as PlatformClient } from "./client-
|
|
5
|
-
import { a as dim, c as import_picocolors, r as cliTitle } from "./output-
|
|
1
|
+
import { n as readDeploymentPlatform, r as readProjectConfig } from "./project-DKG5Ra8p.mjs";
|
|
2
|
+
import { c as getToken } from "./auth-CQkSDS50.mjs";
|
|
3
|
+
import { $ as wrapTextWithPrefix, H as outro, L as log, N as intro } from "./prompts-BNUoTiaf.mjs";
|
|
4
|
+
import { n as PlatformClient } from "./client-DKAsFA4X.mjs";
|
|
5
|
+
import { a as dim, c as import_picocolors, r as cliTitle } from "./output-CbM85T4k.mjs";
|
|
6
6
|
//#region src/cli/logs.ts
|
|
7
7
|
async function runLogsCommand(root, filter, range, deployment, level) {
|
|
8
8
|
console.log();
|
|
9
9
|
intro(cliTitle("project logs"));
|
|
10
10
|
const platform = readDeploymentPlatform(root);
|
|
11
11
|
if (platform === "cloudflare") {
|
|
12
|
-
const { resolveCloudflareOperationContext, tailCloudflareWorker } = await import("./cloudflare-operations-
|
|
12
|
+
const { resolveCloudflareOperationContext, tailCloudflareWorker } = await import("./cloudflare-operations-BCdXSsmo.mjs");
|
|
13
13
|
if (range !== "1h") log.warn("Cloudflare tail streams live logs; --range does not select historical entries.");
|
|
14
14
|
if (level && level !== "all" && level !== "error") log.warn("Cloudflare tail cannot filter individual console levels; showing all invocation logs.");
|
|
15
15
|
await tailCloudflareWorker(resolveCloudflareOperationContext(root), {
|
|
@@ -57,15 +57,14 @@ function printEntry(entry) {
|
|
|
57
57
|
const status = entry.status || "-";
|
|
58
58
|
const statusNum = parseInt(status, 10);
|
|
59
59
|
const coloredStatus = entry.outcome === "exception" || statusNum >= 500 ? import_picocolors.default.red(status) : statusNum >= 400 ? import_picocolors.default.yellow(status) : status;
|
|
60
|
-
console.log(
|
|
60
|
+
console.log(wrapTextWithPrefix(process.stdout, `${method} ${url} ${coloredStatus}`, " ".repeat(time.length + 1), `${dim(time)} `));
|
|
61
61
|
for (const l of entry.logs) {
|
|
62
62
|
const text = l.message.map(String).join(" ");
|
|
63
63
|
const level = l.level ?? "log";
|
|
64
|
-
|
|
65
|
-
|
|
66
|
-
else console.log(` ${dim(`[${level}]`)} ${text}`);
|
|
64
|
+
const marker = level === "error" ? import_picocolors.default.red(`[${level}]`) : level === "warn" ? import_picocolors.default.yellow(`[${level}]`) : dim(`[${level}]`);
|
|
65
|
+
console.log(wrapTextWithPrefix(process.stdout, text, " ".repeat(level.length + 5), ` ${marker} `));
|
|
67
66
|
}
|
|
68
|
-
for (const ex of entry.exceptions) console.log(` ${import_picocolors.default.red("[exception]")}
|
|
67
|
+
for (const ex of entry.exceptions) console.log(wrapTextWithPrefix(process.stdout, `${ex.name}: ${ex.message}`, " ".repeat(14), ` ${import_picocolors.default.red("[exception]")} `));
|
|
69
68
|
}
|
|
70
69
|
function formatTime(ts) {
|
|
71
70
|
return new Date(ts).toLocaleTimeString("en-GB", { hour12: false });
|
|
@@ -3,8 +3,8 @@ import { o as TYPED_CONFIG_FILE, s as loadTypedVoidConfigFile } from "./project-
|
|
|
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
5
|
import "./wrangler-7K-bW_DL.mjs";
|
|
6
|
-
import {
|
|
7
|
-
import { r as cliTitle } from "./output-
|
|
6
|
+
import { H as outro, L as log, N as intro } from "./prompts-BNUoTiaf.mjs";
|
|
7
|
+
import { r as cliTitle } from "./output-CbM85T4k.mjs";
|
|
8
8
|
import { existsSync, mkdirSync, readFileSync, renameSync, rmSync, unlinkSync, writeFileSync } from "node:fs";
|
|
9
9
|
import { parseSync } from "vite";
|
|
10
10
|
import { randomUUID } from "node:crypto";
|
|
@@ -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-CpHjTd0t.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-DkPPXfp_.mjs";
|
|
2
|
+
import { n as OperatorClient, r as OperatorClientError } from "./operator-client-CpHjTd0t.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 { t as cfAccessHeaders } from "./cf-access-
|
|
2
|
-
import { s as normalizePlatformApiUrl } from "./platform-registry-
|
|
3
|
-
import { t as ensureCloudflaredToken } from "./cf-access-
|
|
1
|
+
import { t as cfAccessHeaders } from "./cf-access-TWNzXltp.mjs";
|
|
2
|
+
import { s as normalizePlatformApiUrl } from "./platform-registry-DkPPXfp_.mjs";
|
|
3
|
+
import { t as ensureCloudflaredToken } from "./cf-access-BGe5sWXF.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-CpHjTd0t.mjs";
|
|
2
|
+
import { a as resolveOperatorOrigin, i as removeOperatorToken, n as readOperatorApiTokenStdin, o as saveOperatorToken, r as readOperatorToken, t as exchangeOperatorSession } from "./operator-auth-7erYc6Lt.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-pMTRhvYs.mjs");
|
|
141
|
+
const { selectPlatformLoginMethod } = await import("./login-DIy9Sb-U.mjs");
|
|
142
|
+
const { runPlatformLogin } = await import("./auth-DX3JURcX.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-mabuIV98.mjs");
|
|
317
317
|
printHelpPage(["platform", args.group]);
|
|
318
318
|
return;
|
|
319
319
|
}
|
|
@@ -1,6 +1,6 @@
|
|
|
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-BNUoTiaf.mjs";
|
|
4
4
|
//#region src/cli/output.ts
|
|
5
5
|
var import_picocolors = /* @__PURE__ */ __toESM(require_picocolors(), 1);
|
|
6
6
|
/** Keep recovery commands on the same CLI when using the local checkout launcher. */
|
|
@@ -8,18 +8,21 @@ function cliCommandName() {
|
|
|
8
8
|
const entryName = process.argv[1]?.split(/[\\/]/).at(-1);
|
|
9
9
|
return entryName === "void-dev" || entryName === "void-dev.cmd" ? "void-dev" : "void";
|
|
10
10
|
}
|
|
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
|
-
*/
|
|
11
|
+
/** Keep phase updates visible in static progress output, including redirected terminals. */
|
|
17
12
|
function createSpinner(options, isTerminal = process.stdout.isTTY === true) {
|
|
18
|
-
|
|
13
|
+
const accessible = settings?.accessible ?? ![
|
|
14
|
+
void 0,
|
|
15
|
+
"",
|
|
16
|
+
"0",
|
|
17
|
+
"false"
|
|
18
|
+
].includes(process.env.ACCESSIBLE);
|
|
19
|
+
if (!isCI() && isTerminal && !accessible) return spinner(options);
|
|
19
20
|
let currentMessage = "";
|
|
21
|
+
let cancelled = false;
|
|
20
22
|
return {
|
|
21
23
|
start(msg = "") {
|
|
22
24
|
currentMessage = msg;
|
|
25
|
+
cancelled = false;
|
|
23
26
|
if (msg) log.step(msg);
|
|
24
27
|
},
|
|
25
28
|
stop(msg = "") {
|
|
@@ -32,14 +35,19 @@ function createSpinner(options, isTerminal = process.stdout.isTTY === true) {
|
|
|
32
35
|
}
|
|
33
36
|
},
|
|
34
37
|
cancel(msg = "") {
|
|
38
|
+
cancelled = true;
|
|
35
39
|
if (msg) log.warn(msg);
|
|
36
40
|
},
|
|
37
41
|
error(msg = "") {
|
|
38
42
|
if (msg) log.error(msg);
|
|
39
43
|
},
|
|
44
|
+
pause() {},
|
|
45
|
+
resume(msg = "") {
|
|
46
|
+
this.message(msg);
|
|
47
|
+
},
|
|
40
48
|
clear() {},
|
|
41
49
|
get isCancelled() {
|
|
42
|
-
return
|
|
50
|
+
return cancelled;
|
|
43
51
|
}
|
|
44
52
|
};
|
|
45
53
|
}
|
|
@@ -50,7 +58,7 @@ 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);
|
package/dist/pages/index.mjs
CHANGED
|
@@ -2,7 +2,7 @@ import { a as join } from "../dist-BVqXeR_h.mjs";
|
|
|
2
2
|
import { r as resolvePagesDir } from "../project-paths-GgcMozYz.mjs";
|
|
3
3
|
import { m as readConfig } from "../config-Br_JZD6u.mjs";
|
|
4
4
|
import { a as resolveNamedLayout, i as resolveLayoutIds, n as resolveEffectiveLayoutChain, r as resolveLayoutChain, t as scanPages } from "../scan-C7okrLyM.mjs";
|
|
5
|
-
import { i as parseRedirectsFile } from "../headers-
|
|
5
|
+
import { i as parseRedirectsFile } from "../headers-2rKda9Y6.mjs";
|
|
6
6
|
import { i as resolveHead, n as renderHeadToString, r as renderHtmlAttrs, t as renderBodyAttrs } from "../head-D_QRR5Yd.mjs";
|
|
7
7
|
import { t as serializePageData } from "../serialize-BPvnNQuA.mjs";
|
|
8
8
|
//#region src/pages/manifest.ts
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { n as operatorGroups, r as parseOperatorArgs } from "./operator-args-
|
|
1
|
+
import { n as operatorGroups, r as parseOperatorArgs } from "./operator-args-B3BTmSoi.mjs";
|
|
2
2
|
import { PLATFORM_LOGIN_KINDS, normalizePlatformDashboardUrl, parsePlatformLoginId } from "@void/platform";
|
|
3
3
|
import { parsePlatformPlanId } from "@void/platform/plans";
|
|
4
4
|
//#region src/cli/platform-config-args.ts
|
|
@@ -212,8 +212,8 @@ const platformSubcommands = [
|
|
|
212
212
|
},
|
|
213
213
|
{
|
|
214
214
|
name: "install",
|
|
215
|
-
hint: "Preview choices with --plan, then
|
|
216
|
-
description: "Install a Void platform
|
|
215
|
+
hint: "Preview and save choices with --plan, then select the saved plan to install",
|
|
216
|
+
description: "Install a Void platform and choose who can access its apps"
|
|
217
217
|
},
|
|
218
218
|
{
|
|
219
219
|
name: "upgrade",
|
|
@@ -442,6 +442,7 @@ function parsePlatformArgs(args) {
|
|
|
442
442
|
"--account",
|
|
443
443
|
"--auth-config",
|
|
444
444
|
"--login-methods",
|
|
445
|
+
"--app-access",
|
|
445
446
|
"--hyperdrive",
|
|
446
447
|
"--application-domain",
|
|
447
448
|
"--control-plane-domain",
|
|
@@ -474,6 +475,12 @@ function parsePlatformArgs(args) {
|
|
|
474
475
|
if (noControlPlaneDomain && values.has("--control-plane-domain")) throw new Error("platform: Choose either --control-plane-domain or --no-control-plane-domain.");
|
|
475
476
|
if (noDedicatedZone && dedicatedZone) throw new Error("platform: Choose either --dedicated-zone or --no-dedicated-zone.");
|
|
476
477
|
if (values.has("--auth-config") && (values.has("--login-methods") || accessProtection !== void 0)) throw new Error("platform: --auth-config cannot be combined with login or Access protection options.");
|
|
478
|
+
const appAccess = values.get("--app-access");
|
|
479
|
+
if (appAccess !== void 0 && ![
|
|
480
|
+
"public",
|
|
481
|
+
"platform",
|
|
482
|
+
"custom"
|
|
483
|
+
].includes(appAccess)) throw new Error("platform: --app-access accepts public, platform, or custom.");
|
|
477
484
|
const loginMethods = values.get("--login-methods")?.split(",");
|
|
478
485
|
if (loginMethods && loginMethods.some((method) => !PLATFORM_LOGIN_KINDS.includes(method))) throw new Error("platform: --login-methods accepts github, google, oidc, and cloudflare-access.");
|
|
479
486
|
if (workersDev && (values.has("--application-domain") || values.has("--zone") || dedicatedZone)) throw new Error("platform: --workers-dev cannot be combined with a domain, zone, or --dedicated-zone.");
|
|
@@ -484,6 +491,7 @@ function parsePlatformArgs(args) {
|
|
|
484
491
|
...values.has("--hyperdrive") ? { hyperdrive: values.get("--hyperdrive") } : {},
|
|
485
492
|
...loginMethods ? { loginMethods: [...new Set(loginMethods)] } : {},
|
|
486
493
|
...accessProtection !== void 0 ? { accessProtection } : {},
|
|
494
|
+
...appAccess !== void 0 ? { appAccess } : {},
|
|
487
495
|
...workersDev ? { workersDev: true } : {},
|
|
488
496
|
...values.has("--auth-config") ? { authConfig: values.get("--auth-config") } : {},
|
|
489
497
|
account: values.get("--account") ?? "",
|