void 1.3.0 → 1.4.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/dist/{account-cmd-B4i71m7k.mjs → account-cmd-HP8bixYo.mjs} +3 -3
- package/dist/{application-analysis-DYdVoMAY.mjs → application-analysis-DDOQwiXk.mjs} +11 -7
- package/dist/{application-routing-C8EqRDfv.mjs → application-routing-4719u_kf.mjs} +1 -1
- package/dist/auth-g2TQbDLD.d.mts +70 -0
- package/dist/{auth-link-BKwHPbdv.mjs → auth-link-CedYpDCy.mjs} +3 -3
- package/dist/{auth-router-DqLx8E0F.mjs → auth-router-vafo7x8w.mjs} +11 -6
- package/dist/{better-auth-shared-DVk2DkTW.d.mts → better-auth-shared-BHB8kiTE.d.mts} +1 -1
- package/dist/{build-cmd-Dy4psnt1.mjs → build-cmd-9vUAQ1_V.mjs} +1 -1
- package/dist/{cache-DV37S6dl.mjs → cache-jvwLNb0h.mjs} +1 -1
- package/dist/{cancel-deploy-DMPyu1Vt.mjs → cancel-deploy-Dw0UmWKO.mjs} +1 -1
- package/dist/{cf-build-output-Bapzc_8Z.mjs → cf-build-output-XpNR9zoh.mjs} +20 -4
- package/dist/cf-build-output-bd8Uwv1P.mjs +1 -0
- package/dist/{cf-worker-settings-BECvvTVd.mjs → cf-worker-settings-Dg27RzyT.mjs} +11 -5
- package/dist/cli/cli.mjs +25 -25
- package/dist/cli/cloudflare-operation-process.mjs +9 -3
- package/dist/cli/env-schema-probe.mjs +2 -2
- package/dist/{client-BEMtySaV.mjs → client-B3LnB_bE.mjs} +1 -1
- package/dist/client-BZb9j66F.mjs +1 -0
- package/dist/{cloudflare-auth-Byo_0_N9.mjs → cloudflare-auth-DyD_kVFr.mjs} +1 -1
- package/dist/{cloudflare-cmd-BaqIigwI.mjs → cloudflare-cmd-D-b_u3T4.mjs} +2 -2
- package/dist/{cloudflare-config-DchHxPTo.mjs → cloudflare-config-CH1AylZT.mjs} +14 -3
- package/dist/{cloudflare-connect-pNLQmr_e.mjs → cloudflare-connect-zTJh8UnN.mjs} +2 -2
- package/dist/{cloudflare-operations-vP3b5CQf.mjs → cloudflare-operations-Bc-7fN44.mjs} +4 -4
- package/dist/{cloudflare-operations-PCM4wucv.mjs → cloudflare-operations-BtulCNOg.mjs} +1 -1
- package/dist/{config-BU6hMu1W.mjs → config-BV2ASlpn.mjs} +1 -1
- package/dist/{config-Du88-7Y8.d.mts → config-CAdZVTLN.d.mts} +2 -0
- package/dist/config-D-6q7EBH.mjs +87 -0
- package/dist/{config-DHgSEWT7.mjs → config-OFOAimzt.mjs} +5 -3
- package/dist/config-entry.d.mts +1 -1
- package/dist/{config-BIaXIkkv.mjs → config-tqMM6DwY.mjs} +1 -1
- package/dist/{connect-DwVsBvVh.mjs → connect-BOM6zvFX.mjs} +4 -4
- package/dist/{create-project-CjzbBlTv.mjs → create-project-Bxd02EHN.mjs} +1 -1
- package/dist/{create-project-CgrnvzyA.mjs → create-project-C2K0DN2O.mjs} +1 -1
- package/dist/{db-rvo64snS.mjs → db-Cdvr3zwG.mjs} +16 -16
- package/dist/{db-types-NGxPwnlt.mjs → db-types-0eCiqYb1.mjs} +1 -1
- package/dist/{delete-DWX6dP4M.mjs → delete-lETE6Tpt.mjs} +1 -1
- package/dist/deploy-CX94CmKa.mjs +2 -0
- package/dist/{deploy-hRPvw8ci.mjs → deploy-CdM-LAxX.mjs} +260 -95
- package/dist/{deploy-managed-static-CDYA2p3L.mjs → deploy-managed-static-DjeBFG2c.mjs} +24 -17
- package/dist/{deploy-transport-JCxw7QDi.mjs → deploy-transport-DIq_gFTP.mjs} +13 -12
- package/dist/deploy.d.mts +2 -0
- package/dist/deploy.mjs +7 -5
- package/dist/{dispatch-OVLeWW8K.mjs → dispatch-CLa2LThw.mjs} +5 -5
- package/dist/{domain-CH5iBD9Y.mjs → domain-DyhNtdYf.mjs} +2 -2
- package/dist/{email-CbTO1l78.mjs → email-DM2wDcBN.mjs} +6 -6
- package/dist/{email-cloudflare-B8-pq_-W.mjs → email-cloudflare-PMbAev9Q.mjs} +20 -7
- package/dist/{env-BBdw236G.mjs → env-78hbN-oI.mjs} +3 -3
- package/dist/{env-validation-XcukUlFM.mjs → env-validation-B3VobvXm.mjs} +1 -0
- package/dist/{env-validation-BfBVvBNe.mjs → env-validation-BUfFZ6bt.mjs} +1 -1
- package/dist/error-pages-CLIJ7aYq.mjs +37 -0
- package/dist/gen-BhWBT4iu.mjs +1 -0
- package/dist/{gen-CCx3t2Ju.mjs → gen-CFmsUsW1.mjs} +3 -3
- package/dist/{github-cmd-BzkRLkbg.mjs → github-cmd-De-_IWbM.mjs} +1 -1
- package/dist/{handler-CQv5YDS0.d.mts → handler-BHktmuTL.d.mts} +3 -1
- package/dist/{headers-D522zd0A.mjs → headers--vaK_chu.mjs} +1 -1
- package/dist/index.d.mts +2 -2
- package/dist/index.mjs +68 -33
- package/dist/{info-oBm8yK8J.mjs → info-Yg0-V5Rs.mjs} +3 -3
- package/dist/{init-CBp_uMve.mjs → init-CDiJQycf.mjs} +31 -16
- package/dist/{link-Dt_QXmM4.mjs → link-Dllip08S.mjs} +2 -2
- package/dist/{list-DF6asTdt.mjs → list-BYRP6am0.mjs} +2 -2
- package/dist/{live-CXJ9yC98.d.mts → live-BllfDuzA.d.mts} +2 -2
- package/dist/{local-d1-CUhH3qtj.mjs → local-d1-CAwAs9GH.mjs} +1 -1
- package/dist/login-BAPmYnb7.mjs +1 -0
- package/dist/{login-BjSyhXlT.mjs → login-PcFy5mlC.mjs} +2 -2
- package/dist/{logs-DmvBl6xA.mjs → logs-DmJTBhed.mjs} +2 -2
- package/dist/{migrate-BXRHpYwR.mjs → migrate-B8S2xTcb.mjs} +5 -66
- package/dist/migrate-BIYTPQE6.mjs +1 -0
- package/dist/nitro.mjs +4 -4
- package/dist/{node-DtD7ZiPf.mjs → node-CDOPrGSl.mjs} +3 -3
- package/dist/operator-cmd-CjazwOyb.mjs +1 -0
- package/dist/{operator-cmd-DjZKGGgN.mjs → operator-cmd-DmkmS2wL.mjs} +2 -2
- package/dist/pages/client.d.mts +17 -2
- package/dist/pages/client.mjs +26 -1
- package/dist/pages/index.d.mts +17 -1
- package/dist/pages/index.mjs +95 -4
- package/dist/pages/protocol.d.mts +2 -2
- package/dist/{platform-auth-config-BgnuMbml.mjs → platform-auth-config-CImnfohz.mjs} +3 -3
- package/dist/{platform-auth-protection-NjRejttU.mjs → platform-auth-protection-BogLhtHi.mjs} +2 -2
- package/dist/{platform-auth-recovery-Ug12d9W5.mjs → platform-auth-recovery-B-mEaWEi.mjs} +2 -2
- package/dist/{platform-cmd-BYKLMPCn.mjs → platform-cmd-CV8NxIIn.mjs} +1 -1
- package/dist/{platform-cmd-HByuZAO7.mjs → platform-cmd-DZK2ixMl.mjs} +3 -3
- package/dist/{platform-domain-DLSQ8GF8.mjs → platform-domain-CRvelPGE.mjs} +2 -2
- package/dist/{platform-lifecycle-3dwFJmnq.mjs → platform-lifecycle-CPYY7E9B.mjs} +8 -8
- package/dist/{platform-lifecycle-BRqcxerG.mjs → platform-lifecycle-DwXq7kZt.mjs} +1 -1
- package/dist/{platform-management-ZZ6bQM5j.mjs → platform-management-BOnGbMSM.mjs} +1 -1
- package/dist/{platform-management-ZK6XcbCo.mjs → platform-management-lXdgGgAM.mjs} +1 -1
- package/dist/{platform-recovery-8vNE5dNN.mjs → platform-recovery-noaALXnE.mjs} +2 -2
- package/dist/{prepare-5BR7Splm.mjs → prepare-BuOS18AM.mjs} +1 -1
- package/dist/{prepare-Dseww74N.mjs → prepare-D604Yiyr.mjs} +11 -7
- package/dist/prepare-DU-tOpS5.mjs +1 -0
- package/dist/{project-cmd-CjLNNxwe.mjs → project-cmd-DBYqAIbe.mjs} +13 -13
- package/dist/{project-team-DE5drjcl.mjs → project-team-BjCLgTRC.mjs} +1 -1
- package/dist/{project-token-XEYEXfiJ.mjs → project-token-BB6PwaA9.mjs} +1 -1
- package/dist/{project-tsconfig-Itv1f4WC.mjs → project-tsconfig-CVvk6Z_e.mjs} +24 -2
- package/dist/{project-zero-trust-6VPU8zmV.mjs → project-zero-trust-CWDh1P_t.mjs} +1 -1
- package/dist/{protocol-BekmFxCI.d.mts → protocol-D5XDySYu.d.mts} +1 -1
- package/dist/{provision-Chq0NRAV.mjs → provision-DfxLCg-d.mjs} +1 -1
- package/dist/{provision-B7UFrBH7.mjs → provision-DztLJ97X.mjs} +24 -8
- package/dist/{requests-CG-Pj8ze.mjs → requests-D_pbzDyz.mjs} +1 -1
- package/dist/{rollback-CIrm2txZ.mjs → rollback-CjfIYsJx.mjs} +2 -2
- package/dist/{route-types--PAOzHlH.mjs → route-types-DvEGmPif.mjs} +61 -3
- package/dist/runtime/auth.d.mts +2 -2
- package/dist/runtime/better-auth-mysql.d.mts +1 -1
- package/dist/runtime/better-auth-pg.d.mts +1 -1
- package/dist/runtime/better-auth.d.mts +1 -1
- package/dist/runtime/client-react.d.mts +1 -1
- package/dist/runtime/client-solid.d.mts +1 -1
- package/dist/runtime/client-svelte.d.mts +1 -1
- package/dist/runtime/client-vue.d.mts +1 -1
- package/dist/runtime/client.d.mts +1 -1
- package/dist/runtime/handler.d.mts +1 -1
- package/dist/runtime/live-client.d.mts +1 -1
- package/dist/runtime/live.d.mts +1 -1
- package/dist/runtime/routing.d.mts +5 -4
- package/dist/runtime/routing.mjs +10 -70
- package/dist/runtime/validator.d.mts +1 -1
- package/dist/runtime/ws-server.d.mts +3 -3
- package/dist/runtime/ws.d.mts +1 -1
- package/dist/runtime/ws.mjs +4 -2
- package/dist/{secret-BL6g7mF5.mjs → secret-3X0PxmuX.mjs} +9 -12
- package/dist/{version-metadata-DmaZNTYW.mjs → version-metadata-D2vfMQzv.mjs} +2 -1
- package/dist/{wrangler-CDiEBCdS.mjs → wrangler-I-scB_1t.mjs} +80 -12
- package/dist/wrangler-UnwdISay.mjs +1 -0
- package/dist/{wrapper-CEiDeCqD.mjs → wrapper-BBl1rC32.mjs} +3 -3
- package/dist/{ws-D1zWiB_P.d.mts → ws-B3ClMVDh.d.mts} +3 -2
- package/docs/guide/auth.md +1 -1
- package/docs/guide/edge/redirects.md +22 -0
- package/docs/guide/pages-routing/actions-and-forms.md +24 -0
- package/docs/guide/platform/installation/maintenance.md +3 -1
- package/docs/guide/server-routing.md +2 -0
- package/docs/guide/ssg.md +8 -0
- package/docs/integrations/cloudflare.md +16 -7
- package/docs/reference/api/auth.md +6 -2
- package/docs/reference/api/deploy.md +9 -5
- package/docs/reference/api/pages.md +2 -0
- package/docs/reference/cli/deploy.md +10 -9
- package/docs/reference/config.md +11 -1
- package/package.json +8 -7
- package/schema.json +4 -0
- package/skills/void/SKILL.md +1 -1
- package/dist/auth-DkcFflXV.d.mts +0 -42
- package/dist/cf-build-output-DlBkWdNU.mjs +0 -1
- package/dist/client-DyxPQnF_.mjs +0 -1
- package/dist/config-BTu1o3Dc.mjs +0 -49
- package/dist/deploy-CtHE2A3R.mjs +0 -2
- package/dist/gen-TgXy93Rr.mjs +0 -1
- package/dist/login-Cdo8Aco1.mjs +0 -1
- package/dist/migrate-COPncCGx.mjs +0 -1
- package/dist/operator-cmd-DDiX7Y3f.mjs +0 -1
- package/dist/prepare-B3VrSF1Z.mjs +0 -1
- package/dist/wrangler-DOPr4jyI.mjs +0 -1
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import { n as dirname } from "./dist-ipQi0Q8y.mjs";
|
|
2
|
-
import { i as loadVoidAuthConfig, r as findVoidAuthConfig } from "./config-
|
|
3
|
-
import { p as readConfig } from "./config-
|
|
2
|
+
import { a as projectAuthConfigImporter, i as loadVoidAuthConfig, r as findVoidAuthConfig } from "./config-D-6q7EBH.mjs";
|
|
3
|
+
import { p as readConfig } from "./config-OFOAimzt.mjs";
|
|
4
4
|
import { r as getMiniflareDatabasePath } from "./runner-3uGC-oLF.mjs";
|
|
5
5
|
import { s as loadLocalEnv } from "./env-BaMz0j7H.mjs";
|
|
6
6
|
import { a as pgMigrationRunner, i as mysqlMigrationRunner, n as applyPgAuthMigrations, r as applySqliteAuthMigrations, t as applyMySqlAuthMigrations } from "./auth-migrations-BO27GDNr.mjs";
|
|
@@ -8,7 +8,7 @@ import { r as resolveVoidAuthMigrationSchema } from "./drizzle-BQfyvQKX.mjs";
|
|
|
8
8
|
import { mkdirSync } from "node:fs";
|
|
9
9
|
//#region src/auth/node.ts
|
|
10
10
|
async function runLocalVoidAuthMigrations(root, dialect, persistRoot, databaseId, configPath = findVoidAuthConfig(root), databaseUrl, importModule) {
|
|
11
|
-
const authConfig = await loadVoidAuthConfig(configPath, importModule);
|
|
11
|
+
const authConfig = await loadVoidAuthConfig(configPath, importModule ?? projectAuthConfigImporter(root));
|
|
12
12
|
const runtime = {
|
|
13
13
|
dialect,
|
|
14
14
|
providers: readConfig(root).auth?.providers ?? null,
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export { a as runOperatorCommand } from "./operator-cmd-DmkmS2wL.mjs";
|
|
@@ -163,8 +163,8 @@ async function runAuth(origin, args) {
|
|
|
163
163
|
if (args.action === "login" || args.action === "token" && args.tokenStdin) {
|
|
164
164
|
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");
|
|
165
165
|
const apiToken = args.tokenStdin ? await readOperatorApiTokenStdin() : await (async () => {
|
|
166
|
-
const { discoverPlatform } = await import("./platform-cmd-
|
|
167
|
-
const { selectPlatformLoginMethod } = await import("./login-
|
|
166
|
+
const { discoverPlatform } = await import("./platform-cmd-CV8NxIIn.mjs");
|
|
167
|
+
const { selectPlatformLoginMethod } = await import("./login-BAPmYnb7.mjs");
|
|
168
168
|
const { runPlatformLogin } = await import("./auth-Cbqi1iVX.mjs");
|
|
169
169
|
return runPlatformLogin(origin, (await selectPlatformLoginMethod(await discoverPlatform(origin), args.provider)).id, (url) => process.stderr.write(`Sign in at ${url}\n`));
|
|
170
170
|
})();
|
package/dist/pages/client.d.mts
CHANGED
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import { t as interpolateRouteParams } from "../route-url-BgPja1GS.mjs";
|
|
2
|
-
import { t as PageObject } from "../protocol-
|
|
2
|
+
import { t as PageObject } from "../protocol-D5XDySYu.mjs";
|
|
3
3
|
import { n as CacheForInput, r as CacheForResult } from "../prefetch-Ce6la4EI.mjs";
|
|
4
4
|
import { UsageLimitData } from "@void/edge";
|
|
5
5
|
import { ActionUrl, ResolveActionBody, ResolveActionParams } from "void/routes";
|
|
@@ -124,6 +124,21 @@ export declare function getValidationErrors(body: unknown): Record<string, strin
|
|
|
124
124
|
export declare function mergeDataIntoHref(href: string, data?: Record<string, unknown>): string;
|
|
125
125
|
export declare function isModifiedEvent(e: Pick<MouseEvent, "currentTarget" | "ctrlKey" | "metaKey" | "shiftKey" | "altKey" | "button">): boolean;
|
|
126
126
|
//#endregion
|
|
127
|
+
//#region src/pages/island-action.d.ts
|
|
128
|
+
type IslandActionResult = {
|
|
129
|
+
kind: "redirect";
|
|
130
|
+
url: string;
|
|
131
|
+
} | {
|
|
132
|
+
kind: "success";
|
|
133
|
+
} | {
|
|
134
|
+
kind: "validation";
|
|
135
|
+
errors: Record<string, string>;
|
|
136
|
+
} | {
|
|
137
|
+
kind: "error";
|
|
138
|
+
error: VoidActionError;
|
|
139
|
+
};
|
|
140
|
+
export declare function submitIslandAction(url: string, method: string, data: Record<string, unknown>): Promise<IslandActionResult>;
|
|
141
|
+
//#endregion
|
|
127
142
|
//#region src/pages/form-value-equality.d.ts
|
|
128
143
|
export declare function isEqualFormValue(a: unknown, b: unknown): boolean;
|
|
129
144
|
//#endregion
|
|
@@ -215,4 +230,4 @@ export declare function createVoidRouter(config: VoidRouterConfig): Promise<{
|
|
|
215
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;
|
|
216
231
|
export declare function initIslands(islands: Record<string, () => Promise<unknown>>, hydrateFn: (el: Element, mod: unknown, props: Record<string, unknown>, frontmatter: Record<string, unknown>) => void | Promise<void>): void;
|
|
217
232
|
//#endregion
|
|
218
|
-
export { type ActionErrorHandlingScope, type ActionResult, type FormMethod, type FormModel, type FormResetOptions, type PageNavigationEngine, type PageNavigationResource, type PageNavigationResult, type PrefetchOptions, type VisitOptions, interpolateRouteParams };
|
|
233
|
+
export { type ActionErrorHandlingScope, type ActionResult, type FormMethod, type FormModel, type FormResetOptions, type IslandActionResult, type PageNavigationEngine, type PageNavigationResource, type PageNavigationResult, type PrefetchOptions, type VisitOptions, interpolateRouteParams };
|
package/dist/pages/client.mjs
CHANGED
|
@@ -973,6 +973,31 @@ function isModifiedEvent(e) {
|
|
|
973
973
|
return target !== null && target !== "_self" || e.ctrlKey || e.metaKey || e.shiftKey || e.altKey || e.button !== 0;
|
|
974
974
|
}
|
|
975
975
|
//#endregion
|
|
976
|
+
//#region src/pages/island-action.ts
|
|
977
|
+
async function submitIslandAction(url, method, data) {
|
|
978
|
+
const response = await fetch(url, {
|
|
979
|
+
method,
|
|
980
|
+
headers: { "Content-Type": "application/json" },
|
|
981
|
+
body: JSON.stringify(data)
|
|
982
|
+
});
|
|
983
|
+
if (response.redirected) return {
|
|
984
|
+
kind: "redirect",
|
|
985
|
+
url: response.url
|
|
986
|
+
};
|
|
987
|
+
if (response.ok) return { kind: "success" };
|
|
988
|
+
const error = await createActionErrorFromResponse(response, url);
|
|
989
|
+
const errors = response.status === 422 ? getValidationErrors(error.body) : null;
|
|
990
|
+
if (errors) return {
|
|
991
|
+
kind: "validation",
|
|
992
|
+
errors
|
|
993
|
+
};
|
|
994
|
+
if (categorizeActionError(response.status) === "boundary") throw error;
|
|
995
|
+
return {
|
|
996
|
+
kind: "error",
|
|
997
|
+
error
|
|
998
|
+
};
|
|
999
|
+
}
|
|
1000
|
+
//#endregion
|
|
976
1001
|
//#region src/pages/form-value-equality.ts
|
|
977
1002
|
function isPlainObject(value) {
|
|
978
1003
|
if (value === null || typeof value !== "object") return false;
|
|
@@ -1377,4 +1402,4 @@ function initIslands(islands, hydrateFn) {
|
|
|
1377
1402
|
});
|
|
1378
1403
|
}
|
|
1379
1404
|
//#endregion
|
|
1380
|
-
export { VoidActionError, categorizeActionError, cloneFormValue, createActionClient, createPageNavigationEngine, createRouterFacade, createSsrRouter, createVoidRouter, formErrorMessage, formRetryMessage, formSubmissionBlocked, getValidationErrors, hasFiles, idleNavigationState, initIslands, interpolateRouteParams, isAbortError, isCallSiteActionError, isEqualFormValue, isFile, isFormResetOptions, isModifiedEvent, mergeDataIntoHref, objectToFormData, parseFormResetArgs, refreshPage, scheduleFormRetry, scheduleHydration, ssrProxy, submitAction };
|
|
1405
|
+
export { VoidActionError, categorizeActionError, cloneFormValue, createActionClient, createPageNavigationEngine, createRouterFacade, createSsrRouter, createVoidRouter, formErrorMessage, formRetryMessage, formSubmissionBlocked, getValidationErrors, hasFiles, idleNavigationState, initIslands, interpolateRouteParams, isAbortError, isCallSiteActionError, isEqualFormValue, isFile, isFormResetOptions, isModifiedEvent, mergeDataIntoHref, objectToFormData, parseFormResetArgs, refreshPage, scheduleFormRetry, scheduleHydration, ssrProxy, submitAction, submitIslandAction };
|
package/dist/pages/index.d.mts
CHANGED
|
@@ -1,7 +1,8 @@
|
|
|
1
1
|
import { a as renderHtmlAttrs, i as renderHeadToString, n as HeadDescriptor, o as resolveHead, r as renderBodyAttrs, t as HeadConfig } from "../head-C8K_iGe6.mjs";
|
|
2
|
-
import "../config-
|
|
2
|
+
import "../config-CAdZVTLN.mjs";
|
|
3
3
|
import { i as PageDefinition, n as LayoutDefinition, o as PageScanResult, r as NamedLayoutDefinition, s as RouteEnvironment } from "../types-w72dljaA.mjs";
|
|
4
4
|
import { r as serializePageData } from "../serialize-DtR8Vwa_.mjs";
|
|
5
|
+
import { Plugin, UserConfig } from "vite";
|
|
5
6
|
//#region src/project-paths.d.ts
|
|
6
7
|
type ProjectPaths = {
|
|
7
8
|
root: string;
|
|
@@ -77,4 +78,19 @@ type ResolveStaticPageDataBuildOptionsInput = {
|
|
|
77
78
|
};
|
|
78
79
|
export declare function resolveStaticPageDataBuildOptions(root: string, options?: ResolveStaticPageDataBuildOptionsInput): StaticPageDataBuildOptions;
|
|
79
80
|
//#endregion
|
|
81
|
+
//#region src/pages/plugin.d.ts
|
|
82
|
+
type PagesPluginContext = {
|
|
83
|
+
isDev: boolean;
|
|
84
|
+
scan: () => Promise<PageScanResult | null>;
|
|
85
|
+
};
|
|
86
|
+
type PagesPluginOptions = {
|
|
87
|
+
name: string;
|
|
88
|
+
root?: string;
|
|
89
|
+
generateRenderer: (scan: PageScanResult, isDev: boolean) => string;
|
|
90
|
+
generateClient: (scan: PageScanResult, staticPageData: StaticPageDataBuildOptions) => string;
|
|
91
|
+
config: (context: PagesPluginContext) => UserConfig | void | Promise<UserConfig | void>;
|
|
92
|
+
};
|
|
93
|
+
/** Shared Vite lifecycle; adapters own their generated code and environment configuration. */
|
|
94
|
+
export declare function createPagesPlugin(pagesDir: string, options: PagesPluginOptions): Plugin;
|
|
95
|
+
//#endregion
|
|
80
96
|
export { type HeadConfig, type HeadDescriptor, type LayoutDefinition, type NamedLayoutDefinition, type PageDefinition, type PageScanResult, type StaticPageDataBuildOptions, renderBodyAttrs, renderHeadToString, renderHtmlAttrs, resolveHead, serializePageData };
|
package/dist/pages/index.mjs
CHANGED
|
@@ -1,10 +1,12 @@
|
|
|
1
|
-
import { a as join } from "../dist-ipQi0Q8y.mjs";
|
|
1
|
+
import { a as join, n as dirname } from "../dist-ipQi0Q8y.mjs";
|
|
2
2
|
import { r as resolvePagesDir } from "../project-paths-DGu_QZ_Q.mjs";
|
|
3
|
-
import { p as readConfig } from "../config-
|
|
3
|
+
import { p as readConfig } from "../config-OFOAimzt.mjs";
|
|
4
4
|
import { a as resolveLayoutChain, i as resolveEffectiveLayoutChain, n as scanPages, r as generateComponentManifest, s as resolveNamedLayout, t as pageFileEnvironment } from "../scan-N9WzdcAl.mjs";
|
|
5
|
-
import { r as parseRedirectsFile } from "../headers
|
|
5
|
+
import { r as parseRedirectsFile } from "../headers--vaK_chu.mjs";
|
|
6
6
|
import { i as resolveHead, n as renderHeadToString, r as renderHtmlAttrs, t as renderBodyAttrs } from "../head-D2VF4ApL.mjs";
|
|
7
7
|
import { r as serializePageData } from "../serialize-YHvlcG3Q.mjs";
|
|
8
|
+
import { existsSync } from "node:fs";
|
|
9
|
+
import { normalizePath } from "vite";
|
|
8
10
|
//#region src/pages/static-data.ts
|
|
9
11
|
function resolveStaticPageDataBuildOptions(root, options = {}) {
|
|
10
12
|
const config = readConfig(root);
|
|
@@ -23,4 +25,93 @@ function resolveStaticPageDataBuildOptions(root, options = {}) {
|
|
|
23
25
|
};
|
|
24
26
|
}
|
|
25
27
|
//#endregion
|
|
26
|
-
|
|
28
|
+
//#region src/pages/plugin.ts
|
|
29
|
+
const RENDERER_ID = "virtual:void-pages-renderer";
|
|
30
|
+
const CLIENT_ENTRY_ID = "virtual:void-pages-client";
|
|
31
|
+
/** Shared Vite lifecycle; adapters own their generated code and environment configuration. */
|
|
32
|
+
function createPagesPlugin(pagesDir, options) {
|
|
33
|
+
let pageScan = null;
|
|
34
|
+
let isDev = false;
|
|
35
|
+
let viteConfig;
|
|
36
|
+
const root = options.root ?? dirname(pagesDir);
|
|
37
|
+
const normalizedPagesDir = normalizePath(pagesDir);
|
|
38
|
+
let pendingRescan = null;
|
|
39
|
+
async function rescanPages() {
|
|
40
|
+
pageScan = existsSync(pagesDir) ? await scanPages(root, {
|
|
41
|
+
pagesDir,
|
|
42
|
+
environment: isDev ? "dev" : "prod"
|
|
43
|
+
}) : null;
|
|
44
|
+
}
|
|
45
|
+
function runRescan() {
|
|
46
|
+
pendingRescan ??= rescanPages().finally(() => {
|
|
47
|
+
pendingRescan = null;
|
|
48
|
+
});
|
|
49
|
+
return pendingRescan;
|
|
50
|
+
}
|
|
51
|
+
return {
|
|
52
|
+
name: options.name,
|
|
53
|
+
async buildStart() {
|
|
54
|
+
await runRescan();
|
|
55
|
+
},
|
|
56
|
+
resolveId: {
|
|
57
|
+
filter: { id: /^virtual:void-pages-(renderer|client)$/ },
|
|
58
|
+
handler(id) {
|
|
59
|
+
return "\0" + id;
|
|
60
|
+
}
|
|
61
|
+
},
|
|
62
|
+
load: {
|
|
63
|
+
filter: { id: /^\0virtual:void-pages-(renderer|client)$/ },
|
|
64
|
+
async handler(id) {
|
|
65
|
+
if (isDev && pendingRescan) await pendingRescan;
|
|
66
|
+
if (!pageScan && existsSync(pagesDir)) await runRescan();
|
|
67
|
+
if (id === "\0" + RENDERER_ID) {
|
|
68
|
+
if (!pageScan) return "export function renderPage() { throw new Error('No pages found'); }";
|
|
69
|
+
return options.generateRenderer(pageScan, isDev);
|
|
70
|
+
}
|
|
71
|
+
if (id === "\0" + CLIENT_ENTRY_ID) {
|
|
72
|
+
if (!pageScan) return "";
|
|
73
|
+
return options.generateClient(pageScan, resolveStaticPageDataBuildOptions(root, { publicDir: viteConfig?.publicDir }));
|
|
74
|
+
}
|
|
75
|
+
}
|
|
76
|
+
},
|
|
77
|
+
configureServer(server) {
|
|
78
|
+
async function handlePagesChange(path, event) {
|
|
79
|
+
const normalizedPath = normalizePath(path);
|
|
80
|
+
if (normalizedPath !== normalizedPagesDir && !normalizedPath.startsWith(normalizedPagesDir + "/")) return;
|
|
81
|
+
if (event === "change" && !normalizedPath.endsWith(".md")) return;
|
|
82
|
+
try {
|
|
83
|
+
await runRescan();
|
|
84
|
+
} catch (error) {
|
|
85
|
+
server.config.logger.error(error instanceof Error ? error.message : String(error), {
|
|
86
|
+
error: error instanceof Error ? error : void 0,
|
|
87
|
+
timestamp: true
|
|
88
|
+
});
|
|
89
|
+
return;
|
|
90
|
+
}
|
|
91
|
+
for (const env of Object.values(server.environments)) for (const id of ["\0" + RENDERER_ID, "\0" + CLIENT_ENTRY_ID]) {
|
|
92
|
+
const mod = env.moduleGraph.getModuleById(id);
|
|
93
|
+
if (mod) env.moduleGraph.invalidateModule(mod);
|
|
94
|
+
}
|
|
95
|
+
}
|
|
96
|
+
server.watcher.on("add", (path) => handlePagesChange(path, "add"));
|
|
97
|
+
server.watcher.on("change", (path) => handlePagesChange(path, "change"));
|
|
98
|
+
server.watcher.on("unlink", (path) => handlePagesChange(path, "unlink"));
|
|
99
|
+
},
|
|
100
|
+
configResolved(config) {
|
|
101
|
+
viteConfig = config;
|
|
102
|
+
},
|
|
103
|
+
config(_, env) {
|
|
104
|
+
isDev = env.command === "serve";
|
|
105
|
+
if (!existsSync(pagesDir)) return;
|
|
106
|
+
return options.config({
|
|
107
|
+
isDev,
|
|
108
|
+
async scan() {
|
|
109
|
+
await runRescan();
|
|
110
|
+
return pageScan;
|
|
111
|
+
}
|
|
112
|
+
});
|
|
113
|
+
}
|
|
114
|
+
};
|
|
115
|
+
}
|
|
116
|
+
//#endregion
|
|
117
|
+
export { createPagesPlugin, generateComponentManifest, pageFileEnvironment, renderBodyAttrs, renderHeadToString, renderHtmlAttrs, resolveEffectiveLayoutChain, resolveHead, resolveLayoutChain, resolveNamedLayout, resolvePagesDir, resolveStaticPageDataBuildOptions, scanPages, serializePageData };
|
|
@@ -1,3 +1,3 @@
|
|
|
1
|
-
import { w as ValidationError } from "../handler-
|
|
2
|
-
import { a as handlePageMutation, i as handlePageGet, n as PageRenderResult, o as safeJsonStringify, r as flattenValidationErrors, t as PageObject } from "../protocol-
|
|
1
|
+
import { w as ValidationError } from "../handler-BHktmuTL.mjs";
|
|
2
|
+
import { a as handlePageMutation, i as handlePageGet, n as PageRenderResult, o as safeJsonStringify, r as flattenValidationErrors, t as PageObject } from "../protocol-D5XDySYu.mjs";
|
|
3
3
|
export { PageObject, PageRenderResult, ValidationError, flattenValidationErrors, handlePageGet, handlePageMutation, safeJsonStringify };
|
|
@@ -3,7 +3,7 @@ import { A as confirm, K as select, U as password, X as text, z as multiselect }
|
|
|
3
3
|
import { l as formatUrl, m as printSuccess } from "./output-BpgYODYx.mjs";
|
|
4
4
|
import { n as OperatorClient } from "./operator-client-C-ROjk1I.mjs";
|
|
5
5
|
import { a as resolveOperatorOrigin, r as readOperatorToken } from "./operator-auth-Cr2zCc-J.mjs";
|
|
6
|
-
import { i as humanLines } from "./operator-cmd-
|
|
6
|
+
import { i as humanLines } from "./operator-cmd-DmkmS2wL.mjs";
|
|
7
7
|
import { o as platformPromptAnswer } from "./platform-setup-Ca53gtt0.mjs";
|
|
8
8
|
import { parsePlatformAdmissionPolicy, parsePlatformLoginConfiguration } from "@void/platform";
|
|
9
9
|
import { stripVTControlCharacters } from "node:util";
|
|
@@ -142,11 +142,11 @@ async function configurationInput(args, existing) {
|
|
|
142
142
|
}
|
|
143
143
|
async function runPlatformAuthConfig(args) {
|
|
144
144
|
if (args.action === "recover") {
|
|
145
|
-
const { runPlatformAuthRecovery } = await import("./platform-auth-recovery-
|
|
145
|
+
const { runPlatformAuthRecovery } = await import("./platform-auth-recovery-B-mEaWEi.mjs");
|
|
146
146
|
return runPlatformAuthRecovery(args);
|
|
147
147
|
}
|
|
148
148
|
if (args.action === "protection") {
|
|
149
|
-
const { runPlatformProtectionConfig } = await import("./platform-auth-protection-
|
|
149
|
+
const { runPlatformProtectionConfig } = await import("./platform-auth-protection-BogLhtHi.mjs");
|
|
150
150
|
return runPlatformProtectionConfig(args);
|
|
151
151
|
}
|
|
152
152
|
const origin = resolveOperatorOrigin(args.connection);
|
package/dist/{platform-auth-protection-NjRejttU.mjs → platform-auth-protection-BogLhtHi.mjs}
RENAMED
|
@@ -5,8 +5,8 @@ import { A as confirm, tt as isCancel } from "./dist-Cor9XGoz.mjs";
|
|
|
5
5
|
import { m as printSuccess } from "./output-BpgYODYx.mjs";
|
|
6
6
|
import { n as OperatorClient } from "./operator-client-C-ROjk1I.mjs";
|
|
7
7
|
import { a as resolveOperatorOrigin, r as readOperatorToken } from "./operator-auth-Cr2zCc-J.mjs";
|
|
8
|
-
import { G as checkpointPlatformAccessResources, H as resolvePlatformCloudflareCredential, K as parsePlatformAccessSetupSpec, Y as PlatformCloudflareClient, m as acquirePlatformDatabaseLifecycleLock, n as resolvePlatformInstallDatabaseUrl, q as preparePlatformAccessSetup } from "./platform-lifecycle-
|
|
9
|
-
import { d as verifyPlatformInstallationOwnership, l as selectAuthoritativePlatformManifest } from "./platform-management-
|
|
8
|
+
import { G as checkpointPlatformAccessResources, H as resolvePlatformCloudflareCredential, K as parsePlatformAccessSetupSpec, Y as PlatformCloudflareClient, m as acquirePlatformDatabaseLifecycleLock, n as resolvePlatformInstallDatabaseUrl, q as preparePlatformAccessSetup } from "./platform-lifecycle-CPYY7E9B.mjs";
|
|
9
|
+
import { d as verifyPlatformInstallationOwnership, l as selectAuthoritativePlatformManifest } from "./platform-management-BOnGbMSM.mjs";
|
|
10
10
|
import { parsePlatformAccessProtection, platformProtectionProofMessage } from "@void/platform";
|
|
11
11
|
import { createHmac } from "node:crypto";
|
|
12
12
|
import { readFile } from "node:fs/promises";
|
|
@@ -3,8 +3,8 @@ import { u as openBrowser } from "./auth-B6iOCjKI.mjs";
|
|
|
3
3
|
import { A as confirm, tt as isCancel } from "./dist-Cor9XGoz.mjs";
|
|
4
4
|
import { l as formatUrl, m as printSuccess } from "./output-BpgYODYx.mjs";
|
|
5
5
|
import { a as resolveOperatorOrigin } from "./operator-auth-Cr2zCc-J.mjs";
|
|
6
|
-
import { H as resolvePlatformCloudflareCredential, Y as PlatformCloudflareClient, g as platformDatabaseClientUrl, h as acquirePlatformDatabaseLifecycleLockConnection, n as resolvePlatformInstallDatabaseUrl } from "./platform-lifecycle-
|
|
7
|
-
import { d as verifyPlatformInstallationOwnership, l as selectAuthoritativePlatformManifest } from "./platform-management-
|
|
6
|
+
import { H as resolvePlatformCloudflareCredential, Y as PlatformCloudflareClient, g as platformDatabaseClientUrl, h as acquirePlatformDatabaseLifecycleLockConnection, n as resolvePlatformInstallDatabaseUrl } from "./platform-lifecycle-CPYY7E9B.mjs";
|
|
7
|
+
import { d as verifyPlatformInstallationOwnership, l as selectAuthoritativePlatformManifest } from "./platform-management-BOnGbMSM.mjs";
|
|
8
8
|
import { parsePlatformAccessProtection, parsePlatformAdmissionPolicy, parsePlatformLoginConfiguration, platformAuthenticationRecoveryMessage, validatePlatformAdmissionPolicy } from "@void/platform";
|
|
9
9
|
import { createCipheriv, createDecipheriv, createHash, createHmac, hkdfSync, randomBytes, randomUUID } from "node:crypto";
|
|
10
10
|
import { setTimeout } from "node:timers/promises";
|
|
@@ -1 +1 @@
|
|
|
1
|
-
export { t as discoverPlatform, r as runPlatformCommand } from "./platform-cmd-
|
|
1
|
+
export { t as discoverPlatform, r as runPlatformCommand } from "./platform-cmd-DZK2ixMl.mjs";
|
|
@@ -103,12 +103,12 @@ async function runPlatformCommand(_root, args) {
|
|
|
103
103
|
await runPlatformPlansConfig(args);
|
|
104
104
|
return;
|
|
105
105
|
}
|
|
106
|
-
const { runPlatformAuthConfig } = await import("./platform-auth-config-
|
|
106
|
+
const { runPlatformAuthConfig } = await import("./platform-auth-config-CImnfohz.mjs");
|
|
107
107
|
await runPlatformAuthConfig(args);
|
|
108
108
|
return;
|
|
109
109
|
}
|
|
110
110
|
if (args.subcommand === "operator") {
|
|
111
|
-
const { runOperatorCommand } = await import("./operator-cmd-
|
|
111
|
+
const { runOperatorCommand } = await import("./operator-cmd-CjazwOyb.mjs");
|
|
112
112
|
await runOperatorCommand(args);
|
|
113
113
|
return;
|
|
114
114
|
}
|
|
@@ -176,7 +176,7 @@ async function runPlatformCommand(_root, args) {
|
|
|
176
176
|
console.log(`Capabilities: ${Object.entries(discovery.capabilities).filter(([, enabled]) => enabled).map(([name]) => name).join(", ")}`);
|
|
177
177
|
return;
|
|
178
178
|
}
|
|
179
|
-
const { runPlatformLifecycleCommand } = await import("./platform-lifecycle-
|
|
179
|
+
const { runPlatformLifecycleCommand } = await import("./platform-lifecycle-DwXq7kZt.mjs");
|
|
180
180
|
await runPlatformLifecycleCommand(args);
|
|
181
181
|
}
|
|
182
182
|
function showSavedInstallationStatus(manifest) {
|
|
@@ -2,8 +2,8 @@ import { m as readInstallationRecoverySecrets, t as acquirePlatformLifecycleLock
|
|
|
2
2
|
import { t as cfAccessHeaders } from "./cf-access-BM9G0lhO.mjs";
|
|
3
3
|
import { A as confirm, X as text, tt as isCancel } from "./dist-Cor9XGoz.mjs";
|
|
4
4
|
import { m as printSuccess, p as note } from "./output-BpgYODYx.mjs";
|
|
5
|
-
import { C as createPlatformHealthProbeToken, E as recordResource, H as resolvePlatformCloudflareCredential, O as recordPlatformWorkerTraffic, V as assertPlatformOperatorCredentialCanApplyPlan, Y as PlatformCloudflareClient, k as createPlatformInstallPlan, m as acquirePlatformDatabaseLifecycleLock, n as resolvePlatformInstallDatabaseUrl, t as assertNoninteractivePlatformMutationAcknowledged } from "./platform-lifecycle-
|
|
6
|
-
import { d as verifyPlatformInstallationOwnership, l as selectAuthoritativePlatformManifest, o as resolveInstalledPlatformManifest } from "./platform-management-
|
|
5
|
+
import { C as createPlatformHealthProbeToken, E as recordResource, H as resolvePlatformCloudflareCredential, O as recordPlatformWorkerTraffic, V as assertPlatformOperatorCredentialCanApplyPlan, Y as PlatformCloudflareClient, k as createPlatformInstallPlan, m as acquirePlatformDatabaseLifecycleLock, n as resolvePlatformInstallDatabaseUrl, t as assertNoninteractivePlatformMutationAcknowledged } from "./platform-lifecycle-CPYY7E9B.mjs";
|
|
6
|
+
import { d as verifyPlatformInstallationOwnership, l as selectAuthoritativePlatformManifest, o as resolveInstalledPlatformManifest } from "./platform-management-BOnGbMSM.mjs";
|
|
7
7
|
import { PLATFORM_HEALTH_HOSTNAME_LABEL, PLATFORM_REMOTE_INSTALLATION_MANIFEST_KEY, createApplicationRoutes, createPlatformDeploymentManifest, normalizeApplicationDomain } from "@void/platform";
|
|
8
8
|
//#region src/cli/platform-domain.ts
|
|
9
9
|
function platformDomainTarget(manifest, domain, zone, dedicatedZone) {
|
|
@@ -6,9 +6,9 @@ import { t as ensurePlatformAccessToken } from "./cf-access-CWP4avfP.mjs";
|
|
|
6
6
|
import { A as confirm, H as outro, K as select, L as log, U as password, X as text$1, tt as isCancel, z as multiselect } from "./dist-Cor9XGoz.mjs";
|
|
7
7
|
import { f as import_picocolors, l as formatUrl, m as printSuccess, n as cliCommandName, p as note, r as createSpinner, u as getErrorMessage } from "./output-BpgYODYx.mjs";
|
|
8
8
|
import { l as resolveCloudflareOperationArgv } from "./cloudflare-process-8jEYIeim.mjs";
|
|
9
|
-
import { o as createDefaultRunWrangler, v as resolvePinnedApiBaseUrl } from "./provision-
|
|
9
|
+
import { o as createDefaultRunWrangler, v as resolvePinnedApiBaseUrl } from "./provision-DztLJ97X.mjs";
|
|
10
10
|
import { t as parsePlatformArgs } from "./platform-args-BMD2gjc_.mjs";
|
|
11
|
-
import { o as runCloudflareAuthCommand } from "./cloudflare-auth-
|
|
11
|
+
import { o as runCloudflareAuthCommand } from "./cloudflare-auth-DyD_kVFr.mjs";
|
|
12
12
|
import { a as platformManagementSetupPage, c as platformSetupLink, i as platformInstallCommandArguments, l as platformSetupPages, n as formatPlatformSetupPlan, o as platformPromptAnswer, r as openPlatformSetupPage, s as platformSetupFieldHelp, t as formatPlatformInstallCommand } from "./platform-setup-Ca53gtt0.mjs";
|
|
13
13
|
import { copyFileSync, cpSync, existsSync, lstatSync, mkdirSync, mkdtempSync, readFileSync, readdirSync, rmSync, writeFileSync } from "node:fs";
|
|
14
14
|
import { fileURLToPath } from "node:url";
|
|
@@ -5516,7 +5516,7 @@ async function verifyInstalledPlatformAccessProtection(input) {
|
|
|
5516
5516
|
}
|
|
5517
5517
|
const existingWorkers = input.plan.actions.filter((action) => action.kind === "worker" && action.action === "update").map((action) => action.name);
|
|
5518
5518
|
if (existingWorkers.length) {
|
|
5519
|
-
const { verifyProtectionWorkerOrigins } = await import("./platform-auth-protection-
|
|
5519
|
+
const { verifyProtectionWorkerOrigins } = await import("./platform-auth-protection-BogLhtHi.mjs");
|
|
5520
5520
|
await verifyProtectionWorkerOrigins({
|
|
5521
5521
|
request: input.client.request.bind(input.client),
|
|
5522
5522
|
listWorkerDomains: input.client.listWorkerDomains.bind(input.client),
|
|
@@ -7838,14 +7838,14 @@ function resolvePlatformInstallDatabaseUrl(checkpoint, manifest = null) {
|
|
|
7838
7838
|
}
|
|
7839
7839
|
async function runPlatformLifecycleCommand(commandArgs) {
|
|
7840
7840
|
if (commandArgs.subcommand === "domain") {
|
|
7841
|
-
const { runPlatformDomainCommand } = await import("./platform-domain-
|
|
7841
|
+
const { runPlatformDomainCommand } = await import("./platform-domain-CRvelPGE.mjs");
|
|
7842
7842
|
await runPlatformDomainCommand(commandArgs);
|
|
7843
7843
|
return;
|
|
7844
7844
|
}
|
|
7845
7845
|
if (commandArgs.subcommand === "discover") {
|
|
7846
7846
|
const client = new PlatformCloudflareClient((await resolvePlatformCloudflareCredential()).token);
|
|
7847
7847
|
const accountId = await selectAccount(await readAccounts(client), commandArgs.account);
|
|
7848
|
-
const { recoverPlatformInstallations } = await import("./platform-recovery-
|
|
7848
|
+
const { recoverPlatformInstallations } = await import("./platform-recovery-noaALXnE.mjs");
|
|
7849
7849
|
const recovered = await recoverPlatformInstallations(client, accountId, void 0, commandArgs.selector);
|
|
7850
7850
|
if (recovered.length === 0) {
|
|
7851
7851
|
log.info(`No recoverable Void platform installations were found in ${accountId}.`);
|
|
@@ -7856,7 +7856,7 @@ async function runPlatformLifecycleCommand(commandArgs) {
|
|
|
7856
7856
|
return;
|
|
7857
7857
|
}
|
|
7858
7858
|
if (commandArgs.subcommand !== "install") {
|
|
7859
|
-
const { runInstalledPlatformCommand } = await import("./platform-management-
|
|
7859
|
+
const { runInstalledPlatformCommand } = await import("./platform-management-lXdgGgAM.mjs");
|
|
7860
7860
|
await runInstalledPlatformCommand(commandArgs);
|
|
7861
7861
|
return;
|
|
7862
7862
|
}
|
|
@@ -8032,7 +8032,7 @@ async function runPlatformLifecycleCommand(commandArgs) {
|
|
|
8032
8032
|
progress?.stop("Read the saved installation.");
|
|
8033
8033
|
progress = void 0;
|
|
8034
8034
|
if (authoritative) {
|
|
8035
|
-
const { selectAuthoritativePlatformManifest } = await import("./platform-management-
|
|
8035
|
+
const { selectAuthoritativePlatformManifest } = await import("./platform-management-lXdgGgAM.mjs");
|
|
8036
8036
|
const selected = selectAuthoritativePlatformManifest(existing, authoritative);
|
|
8037
8037
|
authoritativeProvisionIntents = true;
|
|
8038
8038
|
if (!args.plan && JSON.stringify(selected) !== JSON.stringify(existing)) writeInstallationManifest(selected);
|
|
@@ -8472,7 +8472,7 @@ async function runPlatformLifecycleCommand(commandArgs) {
|
|
|
8472
8472
|
})).actions.filter((action) => action.kind === "worker"),
|
|
8473
8473
|
revalidateBeforeWorkerDeploy: (manifest, action) => revalidatePlatformInstallAction(client, plan, manifest, action),
|
|
8474
8474
|
verifyExistingOwnership: async (manifest, databaseCheckpointExists) => {
|
|
8475
|
-
const { verifyPlatformInstallationOwnership } = await import("./platform-management-
|
|
8475
|
+
const { verifyPlatformInstallationOwnership } = await import("./platform-management-lXdgGgAM.mjs");
|
|
8476
8476
|
const retainedReplacementKeys = new Set(plan.actions.filter((action) => {
|
|
8477
8477
|
const previous = manifest.resources.find((resource) => resource.key === action.key);
|
|
8478
8478
|
return action.action === "create" && previous && previous.name !== action.name;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
export { r as runPlatformLifecycleCommand } from "./platform-lifecycle-
|
|
1
|
+
export { r as runPlatformLifecycleCommand } from "./platform-lifecycle-CPYY7E9B.mjs";
|
|
@@ -2,7 +2,7 @@ import { S as writePendingInstallationSecrets, _ as removePlatformConnectionForI
|
|
|
2
2
|
import { t as ensurePlatformAccessToken } from "./cf-access-CWP4avfP.mjs";
|
|
3
3
|
import { A as confirm, H as outro, K as select, L as log, tt as isCancel } from "./dist-Cor9XGoz.mjs";
|
|
4
4
|
import { f as import_picocolors, l as formatUrl, m as printSuccess, p as note, r as createSpinner } from "./output-BpgYODYx.mjs";
|
|
5
|
-
import { $ as hyperdriveOriginMatches, A as dnsRecordConfigHash, B as turnOffInstalledProjectZeroTrust, C as createPlatformHealthProbeToken, D as platformTrafficAttachmentWorker, F as platformAdoptionIntentHash, H as resolvePlatformCloudflareCredential, I as r2BucketConfigHash, J as PlatformCloudflareApiError, L as resourceMarkerProblem, M as hasProvisionIntentStep, N as legacyResourceConfigHash, P as matchesRecordedR2Fingerprint, Q as hyperdriveOriginFromConnectionString, R as revalidatePlatformInstallAction, S as loadPlatformRuntime, T as resolveBootstrapGitHubId, U as verifyPlatformCloudflareCredential, V as assertPlatformOperatorCredentialCanApplyPlan, W as activatePlatformAccessCredentials, X as PlatformRuntimeTokenEmailPermissionError, Y as PlatformCloudflareClient, Z as hyperdriveOriginConfigHash, _ as readPlatformProjectSlugs, a as findPlatformWorkerOutsideChanges, b as formatZeroTrustApplications, c as uploadPlatformWorkerOutsideChanges, d as replacePendingInstallationAuthentication, et as verifyPlatformRuntimeTokenEmailPermissions, f as REMOTE_INSTALLATION_MANIFEST_KEY, j as formatPlatformInstallPlan, k as createPlatformInstallPlan, l as authenticationSetupRequestHash, m as acquirePlatformDatabaseLifecycleLock, n as resolvePlatformInstallDatabaseUrl, o as formatPlatformWorkerOutsideChanges, p as installPlatform, s as reviewPlatformWorkerOutsideChanges, t as assertNoninteractivePlatformMutationAcknowledged, tt as verifyPlatformRuntimeTokenPermissions, u as readLoginReplacementFile, v as readPlatformProjectZeroTrustState, w as createPlatformInstallationSecrets, x as readPlatformDatabase, y as assertProjectZeroTrustAllowsUninstall, z as platformDatabaseNameFromOwnerUrl } from "./platform-lifecycle-
|
|
5
|
+
import { $ as hyperdriveOriginMatches, A as dnsRecordConfigHash, B as turnOffInstalledProjectZeroTrust, C as createPlatformHealthProbeToken, D as platformTrafficAttachmentWorker, F as platformAdoptionIntentHash, H as resolvePlatformCloudflareCredential, I as r2BucketConfigHash, J as PlatformCloudflareApiError, L as resourceMarkerProblem, M as hasProvisionIntentStep, N as legacyResourceConfigHash, P as matchesRecordedR2Fingerprint, Q as hyperdriveOriginFromConnectionString, R as revalidatePlatformInstallAction, S as loadPlatformRuntime, T as resolveBootstrapGitHubId, U as verifyPlatformCloudflareCredential, V as assertPlatformOperatorCredentialCanApplyPlan, W as activatePlatformAccessCredentials, X as PlatformRuntimeTokenEmailPermissionError, Y as PlatformCloudflareClient, Z as hyperdriveOriginConfigHash, _ as readPlatformProjectSlugs, a as findPlatformWorkerOutsideChanges, b as formatZeroTrustApplications, c as uploadPlatformWorkerOutsideChanges, d as replacePendingInstallationAuthentication, et as verifyPlatformRuntimeTokenEmailPermissions, f as REMOTE_INSTALLATION_MANIFEST_KEY, j as formatPlatformInstallPlan, k as createPlatformInstallPlan, l as authenticationSetupRequestHash, m as acquirePlatformDatabaseLifecycleLock, n as resolvePlatformInstallDatabaseUrl, o as formatPlatformWorkerOutsideChanges, p as installPlatform, s as reviewPlatformWorkerOutsideChanges, t as assertNoninteractivePlatformMutationAcknowledged, tt as verifyPlatformRuntimeTokenPermissions, u as readLoginReplacementFile, v as readPlatformProjectZeroTrustState, w as createPlatformInstallationSecrets, x as readPlatformDatabase, y as assertProjectZeroTrustAllowsUninstall, z as platformDatabaseNameFromOwnerUrl } from "./platform-lifecycle-CPYY7E9B.mjs";
|
|
6
6
|
import { PLATFORM_DISABLED_KEY, PLATFORM_DISABLED_VALUE, PLATFORM_R2_OWNERSHIP_MARKER_KEY, parsePlatformInstallationManifest, recordInstallationResource, recordInstallationStep, setInstallationDesiredState, transitionInstallation } from "@void/platform";
|
|
7
7
|
import { setTimeout } from "node:timers/promises";
|
|
8
8
|
//#region src/cli/platform-teardown.ts
|
|
@@ -1 +1 @@
|
|
|
1
|
-
export { c as runInstalledPlatformCommand, l as selectAuthoritativePlatformManifest, d as verifyPlatformInstallationOwnership } from "./platform-management-
|
|
1
|
+
export { c as runInstalledPlatformCommand, l as selectAuthoritativePlatformManifest, d as verifyPlatformInstallationOwnership } from "./platform-management-BOnGbMSM.mjs";
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
import { o as listInstallationManifests, t as acquirePlatformLifecycleLock, x as writeInstallationManifest, y as savePlatformConnection } from "./platform-registry-B9mWX9LO.mjs";
|
|
2
2
|
import { t as cfAccessHeaders } from "./cf-access-BM9G0lhO.mjs";
|
|
3
|
-
import { f as REMOTE_INSTALLATION_MANIFEST_KEY, k as createPlatformInstallPlan } from "./platform-lifecycle-
|
|
4
|
-
import { a as recoverDurablyMarkedProvisionIntents, d as verifyPlatformInstallationOwnership, r as isPlatformManifestMonotonicExtension } from "./platform-management-
|
|
3
|
+
import { f as REMOTE_INSTALLATION_MANIFEST_KEY, k as createPlatformInstallPlan } from "./platform-lifecycle-CPYY7E9B.mjs";
|
|
4
|
+
import { a as recoverDurablyMarkedProvisionIntents, d as verifyPlatformInstallationOwnership, r as isPlatformManifestMonotonicExtension } from "./platform-management-BOnGbMSM.mjs";
|
|
5
5
|
import { parsePlatformInstallationManifest, setInstallationEndpoints } from "@void/platform";
|
|
6
6
|
//#region src/cli/platform-recovery.ts
|
|
7
7
|
async function recoverPlatformInstallations(client, accountId, verifyEndpoint = verifyInstallationEndpoint, selector = "") {
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import { L as log } from "./dist-Cor9XGoz.mjs";
|
|
2
2
|
import { m as printSuccess, p as note } from "./output-BpgYODYx.mjs";
|
|
3
|
-
import { t as prepareProject } from "./prepare-
|
|
3
|
+
import { t as prepareProject } from "./prepare-D604Yiyr.mjs";
|
|
4
4
|
//#region src/cli/prepare.ts
|
|
5
5
|
async function runPrepareCommand(root) {
|
|
6
6
|
console.log();
|
|
@@ -1,13 +1,13 @@
|
|
|
1
1
|
import { a as join } from "./dist-ipQi0Q8y.mjs";
|
|
2
|
-
import { i as loadVoidAuthConfig } from "./config-BTu1o3Dc.mjs";
|
|
3
|
-
import { c as getDatabaseCasing, p as readConfig } from "./config-DHgSEWT7.mjs";
|
|
4
|
-
import { n as ensureProjectTsconfig, r as writeFileIfChanged } from "./project-tsconfig-Itv1f4WC.mjs";
|
|
5
|
-
import { n as generateDbDts } from "./db-types-NGxPwnlt.mjs";
|
|
6
2
|
import { t as discoverSchema } from "./discover-LaV0tbIu.mjs";
|
|
3
|
+
import { a as projectAuthConfigImporter, i as loadVoidAuthConfig } from "./config-D-6q7EBH.mjs";
|
|
4
|
+
import { c as getDatabaseCasing, p as readConfig } from "./config-OFOAimzt.mjs";
|
|
5
|
+
import { i as writeFileIfChanged, n as ensureProjectTsconfig } from "./project-tsconfig-CVvk6Z_e.mjs";
|
|
6
|
+
import { n as generateDbDts } from "./db-types-0eCiqYb1.mjs";
|
|
7
7
|
import { s as loadLocalEnv } from "./env-BaMz0j7H.mjs";
|
|
8
8
|
import { n as findEnvFileForPaths, r as generateEnvTypes } from "./env-types-BicfKBhV.mjs";
|
|
9
|
-
import { t as analyzeApplication } from "./application-routing-
|
|
10
|
-
import { n as generateQueueTypes, t as generateRouteTypes } from "./route-types
|
|
9
|
+
import { t as analyzeApplication } from "./application-routing-4719u_kf.mjs";
|
|
10
|
+
import { n as generateQueueTypes, r as generateAuthTypes, t as generateRouteTypes } from "./route-types-DvEGmPif.mjs";
|
|
11
11
|
import { n as generateVoidAuthDrizzleSchema, t as generateVoidAuthDatabaseModule } from "./drizzle-BQfyvQKX.mjs";
|
|
12
12
|
import { existsSync, rmSync } from "node:fs";
|
|
13
13
|
import { fileURLToPath } from "node:url";
|
|
@@ -32,6 +32,10 @@ async function prepareProject(root) {
|
|
|
32
32
|
const { dts } = generateEnvTypes(envFile, outDir);
|
|
33
33
|
writeGeneratedFile(outDir, "env.d.ts", dts, written);
|
|
34
34
|
} else removeGeneratedFile(outDir, "env.d.ts", removed);
|
|
35
|
+
if (authConfigPath) {
|
|
36
|
+
const { dts } = generateAuthTypes(authConfigPath, outDir);
|
|
37
|
+
writeGeneratedFile(outDir, "auth.d.ts", dts, written);
|
|
38
|
+
} else removeGeneratedFile(outDir, "auth.d.ts", removed);
|
|
35
39
|
const hasRouteTypes = scan.routes.length > 0 || (scan.websockets?.length ?? 0) > 0 || scan.pages.pages.length > 0;
|
|
36
40
|
if (hasRouteTypes) {
|
|
37
41
|
const { dts } = generateRouteTypes(scan, paths.routesDir, outDir, paths.pagesDir);
|
|
@@ -48,7 +52,7 @@ async function prepareProject(root) {
|
|
|
48
52
|
const authRuntime = {
|
|
49
53
|
dialect,
|
|
50
54
|
providers: config.auth?.providers ?? null,
|
|
51
|
-
userConfig: await loadVoidAuthConfig(authConfigPath)
|
|
55
|
+
userConfig: await loadVoidAuthConfig(authConfigPath, projectAuthConfigImporter(root))
|
|
52
56
|
};
|
|
53
57
|
const env = {
|
|
54
58
|
...loadLocalEnv(root),
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export { t as prepareProject } from "./prepare-D604Yiyr.mjs";
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
import { n as readDeploymentPlatform } from "./project-rqDnVsJN.mjs";
|
|
2
2
|
import { c as getToken, s as getSiteDomain } from "./auth-B6iOCjKI.mjs";
|
|
3
3
|
import { H as outro, L as log } from "./dist-Cor9XGoz.mjs";
|
|
4
|
-
import { r as PlatformClient } from "./client-
|
|
4
|
+
import { r as PlatformClient } from "./client-B3LnB_bE.mjs";
|
|
5
5
|
import { _ as tablePrefix, f as import_picocolors, i as dim, l as formatUrl, o as formatCount } from "./output-BpgYODYx.mjs";
|
|
6
6
|
//#region src/cli/projects.ts
|
|
7
7
|
async function runProjectsCommand(root) {
|
|
@@ -38,24 +38,24 @@ async function runProjectsCommand(root) {
|
|
|
38
38
|
async function runProjectCommand(root, args) {
|
|
39
39
|
const cloudflare = readDeploymentPlatform(root) === "cloudflare";
|
|
40
40
|
if (args.subcommand === "status") {
|
|
41
|
-
const { runListCommand } = await import("./list-
|
|
41
|
+
const { runListCommand } = await import("./list-BYRP6am0.mjs");
|
|
42
42
|
return runListCommand(root, args.name || void 0);
|
|
43
43
|
}
|
|
44
44
|
if (args.subcommand === "link") {
|
|
45
45
|
if (cloudflare) throw new Error("project: Direct Cloudflare apps are identified by cloudflare.name in void.config.ts and do not need linking.");
|
|
46
|
-
const { runLink } = await import("./link-
|
|
46
|
+
const { runLink } = await import("./link-Dllip08S.mjs");
|
|
47
47
|
return runLink(root, args.name || void 0);
|
|
48
48
|
}
|
|
49
49
|
if (args.subcommand === "list") {
|
|
50
50
|
if (cloudflare) {
|
|
51
|
-
const { runListCommand } = await import("./list-
|
|
51
|
+
const { runListCommand } = await import("./list-BYRP6am0.mjs");
|
|
52
52
|
return runListCommand(root);
|
|
53
53
|
}
|
|
54
54
|
return runProjectsCommand(root);
|
|
55
55
|
}
|
|
56
56
|
if (args.subcommand === "token") {
|
|
57
57
|
if (cloudflare) throw new Error("project: CI deploy credentials are available only for Void platform projects.");
|
|
58
|
-
const { runProjectTokenCommand } = await import("./project-token-
|
|
58
|
+
const { runProjectTokenCommand } = await import("./project-token-BB6PwaA9.mjs");
|
|
59
59
|
return runProjectTokenCommand(root, args);
|
|
60
60
|
}
|
|
61
61
|
if (args.subcommand === "team") {
|
|
@@ -66,7 +66,7 @@ async function runProjectCommand(root, args) {
|
|
|
66
66
|
}
|
|
67
67
|
const accountInvitationAction = args.action === "pending" || args.action === "accept" || args.action === "decline";
|
|
68
68
|
if (cloudflare && !accountInvitationAction) throw new Error("project: Teams are available only for projects hosted on a Void platform, not direct Cloudflare deployments.");
|
|
69
|
-
const { runProjectTeamCommand } = await import("./project-team-
|
|
69
|
+
const { runProjectTeamCommand } = await import("./project-team-BjCLgTRC.mjs");
|
|
70
70
|
return runProjectTeamCommand(root, args);
|
|
71
71
|
}
|
|
72
72
|
if (args.subcommand === "zero-trust") {
|
|
@@ -77,38 +77,38 @@ async function runProjectCommand(root, args) {
|
|
|
77
77
|
return;
|
|
78
78
|
}
|
|
79
79
|
const action = args.action;
|
|
80
|
-
const { runProjectZeroTrustCommand } = await import("./project-zero-trust-
|
|
80
|
+
const { runProjectZeroTrustCommand } = await import("./project-zero-trust-CWDh1P_t.mjs");
|
|
81
81
|
return runProjectZeroTrustCommand(root, {
|
|
82
82
|
...args,
|
|
83
83
|
action
|
|
84
84
|
});
|
|
85
85
|
}
|
|
86
86
|
if (args.subcommand === "logs") {
|
|
87
|
-
const { runLogsCommand } = await import("./logs-
|
|
87
|
+
const { runLogsCommand } = await import("./logs-DmJTBhed.mjs");
|
|
88
88
|
return runLogsCommand(root, args.filter, args.range, args.deployment || void 0, args.level || void 0);
|
|
89
89
|
}
|
|
90
90
|
if (args.subcommand === "requests") {
|
|
91
91
|
if (cloudflare) throw new Error("project: Historical request analytics require the Void platform. Use `void project logs` for a live Cloudflare tail.");
|
|
92
|
-
const { runRequestsCommand } = await import("./requests-
|
|
92
|
+
const { runRequestsCommand } = await import("./requests-D_pbzDyz.mjs");
|
|
93
93
|
return runRequestsCommand(root, args.range, args.status || void 0);
|
|
94
94
|
}
|
|
95
95
|
if (args.subcommand === "rollback") {
|
|
96
|
-
const { runRollbackCommand } = await import("./rollback-
|
|
96
|
+
const { runRollbackCommand } = await import("./rollback-CjfIYsJx.mjs");
|
|
97
97
|
return runRollbackCommand(root, args.deployId || void 0, args.platform);
|
|
98
98
|
}
|
|
99
99
|
if (args.subcommand === "cancel") {
|
|
100
100
|
if (cloudflare) throw new Error("project: Direct Cloudflare deploys activate only after readiness succeeds, so there is no remote build to cancel.");
|
|
101
|
-
const { runCancelDeployCommand } = await import("./cancel-deploy-
|
|
101
|
+
const { runCancelDeployCommand } = await import("./cancel-deploy-Dw0UmWKO.mjs");
|
|
102
102
|
return runCancelDeployCommand(root, args.deployId || void 0);
|
|
103
103
|
}
|
|
104
104
|
if (args.subcommand === "delete") {
|
|
105
105
|
if (cloudflare) throw new Error("project: Refusing to delete Cloudflare resources through this command. Direct deployments are additive and existing resources may be shared.");
|
|
106
|
-
const { runDeleteCommand } = await import("./delete-
|
|
106
|
+
const { runDeleteCommand } = await import("./delete-lETE6Tpt.mjs");
|
|
107
107
|
return runDeleteCommand(root, args.name || void 0, { force: args.force });
|
|
108
108
|
}
|
|
109
109
|
if (args.subcommand === "purge-cache") {
|
|
110
110
|
if (cloudflare) throw new Error("project: `void project purge-cache` is available only for projects hosted on a Void platform. For a direct Cloudflare deploy, redeploy or purge the configured ISR KV namespace.");
|
|
111
|
-
const { runPurgeCacheCommand } = await import("./cache-
|
|
111
|
+
const { runPurgeCacheCommand } = await import("./cache-jvwLNb0h.mjs");
|
|
112
112
|
return runPurgeCacheCommand(root, args.projectSlug || void 0);
|
|
113
113
|
}
|
|
114
114
|
}
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
import { r as readProjectConfig } from "./project-rqDnVsJN.mjs";
|
|
2
2
|
import { c as getToken, i as getAccountCredential } from "./auth-B6iOCjKI.mjs";
|
|
3
3
|
import { H as outro, L as log } from "./dist-Cor9XGoz.mjs";
|
|
4
|
-
import { c as platformErrorMessage, n as PlatformApiError, r as PlatformClient, s as parsePlatformErrorBody } from "./client-
|
|
4
|
+
import { c as platformErrorMessage, n as PlatformApiError, r as PlatformClient, s as parsePlatformErrorBody } from "./client-B3LnB_bE.mjs";
|
|
5
5
|
import { h as sanitizeTerminalText, l as formatUrl, m as printSuccess, o as formatCount, p as note } from "./output-BpgYODYx.mjs";
|
|
6
6
|
import { r as requireProjectBySlug, t as getRequestedProjectSlug } from "./resolve-project-Xoi6eTWY.mjs";
|
|
7
7
|
//#region src/cli/project-team.ts
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
import { r as readProjectConfig } from "./project-rqDnVsJN.mjs";
|
|
2
2
|
import { c as getToken } from "./auth-B6iOCjKI.mjs";
|
|
3
3
|
import { H as outro, L as log } from "./dist-Cor9XGoz.mjs";
|
|
4
|
-
import { r as PlatformClient } from "./client-
|
|
4
|
+
import { r as PlatformClient } from "./client-B3LnB_bE.mjs";
|
|
5
5
|
import { _ as tablePrefix, i as dim, m as printSuccess } from "./output-BpgYODYx.mjs";
|
|
6
6
|
import { r as requireProjectBySlug } from "./resolve-project-Xoi6eTWY.mjs";
|
|
7
7
|
//#region src/cli/project-token.ts
|