void 1.2.1 → 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-CdUll_35.mjs → account-cmd-HP8bixYo.mjs} +3 -3
- package/dist/{application-analysis-fEqoSeMp.mjs → application-analysis-DDOQwiXk.mjs} +18 -12
- package/dist/{application-routing-DAhNP4u3.mjs → application-routing-4719u_kf.mjs} +3 -1
- package/dist/auth-g2TQbDLD.d.mts +70 -0
- package/dist/{auth-link-C87vGXM-.mjs → auth-link-CedYpDCy.mjs} +3 -3
- package/dist/{auth-router-6I81r-ix.mjs → auth-router-vafo7x8w.mjs} +11 -6
- package/dist/{better-auth-shared-D-6z0q0f.mjs → better-auth-shared-7FM3Uk2N.mjs} +48 -2
- package/dist/{better-auth-shared-DVk2DkTW.d.mts → better-auth-shared-BHB8kiTE.d.mts} +1 -1
- package/dist/{build-cmd-ex1g-j_e.mjs → build-cmd-9vUAQ1_V.mjs} +1 -1
- package/dist/{cache-oHzrnY3z.mjs → cache-jvwLNb0h.mjs} +1 -1
- package/dist/{cancel-deploy-viAMD0Q_.mjs → cancel-deploy-Dw0UmWKO.mjs} +1 -1
- package/dist/{cf-build-output-BhVxldCw.mjs → cf-build-output-XpNR9zoh.mjs} +122 -5
- 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 +41 -32
- package/dist/cli/cloudflare-operation-process.mjs +35 -8
- package/dist/cli/env-schema-probe.mjs +2 -2
- package/dist/{client-BEkdj1kx.mjs → client-B3LnB_bE.mjs} +8 -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-DMzCv12s.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-CCRTVg-I.mjs → cloudflare-connect-zTJh8UnN.mjs} +2 -2
- package/dist/{cloudflare-operations-Dh9dEHJj.mjs → cloudflare-operations-Bc-7fN44.mjs} +4 -4
- package/dist/{cloudflare-operations-DsSaw2BT.mjs → cloudflare-operations-BtulCNOg.mjs} +1 -1
- package/dist/{config-BU6hMu1W.mjs → config-BV2ASlpn.mjs} +1 -1
- package/dist/{config-DQfHOKh9.d.mts → config-CAdZVTLN.d.mts} +4 -1
- 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-k7R2rPVA.mjs → connect-BOM6zvFX.mjs} +4 -4
- package/dist/{create-project-DV71ol5d.mjs → create-project-Bxd02EHN.mjs} +1 -1
- package/dist/{create-project-DTuy-l0z.mjs → create-project-C2K0DN2O.mjs} +1 -1
- package/dist/{db-DVOkLH5X.mjs → db-Cdvr3zwG.mjs} +18 -18
- package/dist/{db-types-NGxPwnlt.mjs → db-types-0eCiqYb1.mjs} +1 -1
- package/dist/{delete-BbP5eopu.mjs → delete-lETE6Tpt.mjs} +1 -1
- package/dist/deploy-CX94CmKa.mjs +2 -0
- package/dist/{deploy-7H32EnUs.mjs → deploy-CdM-LAxX.mjs} +473 -148
- package/dist/{deploy-managed-static-DlvcvnQT.mjs → deploy-managed-static-DjeBFG2c.mjs} +43 -20
- package/dist/{deploy-transport-BzGEj0Ge.mjs → deploy-transport-DIq_gFTP.mjs} +14 -13
- package/dist/deploy.d.mts +2 -0
- package/dist/deploy.mjs +8 -5
- package/dist/{dispatch-DoUnxTNo.mjs → dispatch-CLa2LThw.mjs} +76 -7
- package/dist/{domain-CA2wBgra.mjs → domain-DyhNtdYf.mjs} +2 -2
- package/dist/{email-DXpCc77w.mjs → email-DM2wDcBN.mjs} +59 -10
- package/dist/{email-cloudflare-D03g2TkS.mjs → email-cloudflare-PMbAev9Q.mjs} +124 -10
- package/dist/{env-DgOQ9_8S.mjs → env-78hbN-oI.mjs} +3 -3
- package/dist/{env-BJjULvL0.mjs → env-BaMz0j7H.mjs} +6 -1
- package/dist/{env-validation-Dwq3PJzK.mjs → env-validation-B3VobvXm.mjs} +2 -1
- package/dist/{env-validation-BmsdCZEk.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-BfmcIi2g.mjs → gen-CFmsUsW1.mjs} +3 -3
- package/dist/{github-cmd-CY9LUqLh.mjs → github-cmd-De-_IWbM.mjs} +1 -1
- package/dist/{handler-BbkSPzGF.d.mts → handler-BHktmuTL.d.mts} +4 -2
- package/dist/{headers-D522zd0A.mjs → headers--vaK_chu.mjs} +1 -1
- package/dist/{help-CxSlPpzJ.mjs → help-CKbrhZha.mjs} +16 -1
- package/dist/help-qOZr3wng.mjs +1 -0
- package/dist/index.d.mts +3 -5
- package/dist/index.mjs +370 -140
- package/dist/{info-7VDlhtyy.mjs → info-Yg0-V5Rs.mjs} +4 -4
- package/dist/{init-DxYyOs4-.mjs → init-CDiJQycf.mjs} +241 -206
- package/dist/{link-Ddmod1dZ.mjs → link-Dllip08S.mjs} +2 -2
- package/dist/{list-MogaugiO.mjs → list-BYRP6am0.mjs} +2 -2
- package/dist/{live-Bt8Y_0bg.d.mts → live-BllfDuzA.d.mts} +2 -2
- package/dist/{local-d1-BHBnKWRb.mjs → local-d1-CAwAs9GH.mjs} +1 -1
- package/dist/login-BAPmYnb7.mjs +1 -0
- package/dist/{login-Cttnagmm.mjs → login-PcFy5mlC.mjs} +2 -2
- package/dist/{logs-CAszUWZI.mjs → logs-DmJTBhed.mjs} +2 -2
- package/dist/{migrate-DyT2jJ8y.mjs → migrate-B8S2xTcb.mjs} +5 -66
- package/dist/migrate-BIYTPQE6.mjs +1 -0
- package/dist/nitro.mjs +4 -4
- package/dist/{node-WB7c2N4L.mjs → node-CDOPrGSl.mjs} +5 -5
- package/dist/{operator-args-UnE8Y2eK.mjs → operator-args-BsJIYXaT.mjs} +8 -1
- package/dist/operator-cmd-CjazwOyb.mjs +1 -0
- package/dist/{operator-cmd-skshjMGl.mjs → operator-cmd-DmkmS2wL.mjs} +4 -3
- package/dist/pages/client.d.mts +32 -4
- package/dist/pages/client.mjs +186 -29
- package/dist/pages/index.d.mts +34 -2
- package/dist/pages/index.mjs +96 -55
- package/dist/pages/islands-plugin.d.mts +1 -1
- package/dist/pages/islands-plugin.mjs +9 -3
- package/dist/pages/protocol.d.mts +2 -2
- package/dist/platform-args-BC8_hsDj.mjs +1 -0
- package/dist/{platform-args-DVbVClZl.mjs → platform-args-BMD2gjc_.mjs} +1 -1
- package/dist/{platform-auth-config-C-pm5Qzx.mjs → platform-auth-config-CImnfohz.mjs} +3 -3
- package/dist/{platform-auth-protection-SHhvim1L.mjs → platform-auth-protection-BogLhtHi.mjs} +2 -2
- package/dist/{platform-auth-recovery-DXVWs-wA.mjs → platform-auth-recovery-B-mEaWEi.mjs} +2 -2
- package/dist/{platform-cmd-PiNRkopU.mjs → platform-cmd-CV8NxIIn.mjs} +1 -1
- package/dist/{platform-cmd-D5I1beUX.mjs → platform-cmd-DZK2ixMl.mjs} +4 -4
- package/dist/{platform-domain-jpmBfZeb.mjs → platform-domain-CRvelPGE.mjs} +2 -2
- package/dist/{platform-lifecycle-DyKmuNY6.mjs → platform-lifecycle-CPYY7E9B.mjs} +103 -41
- package/dist/{platform-lifecycle-DH3Yr1qQ.mjs → platform-lifecycle-DwXq7kZt.mjs} +1 -1
- package/dist/{platform-management--vDwSn35.mjs → platform-management-BOnGbMSM.mjs} +1 -1
- package/dist/{platform-management-7m-PLaPJ.mjs → platform-management-lXdgGgAM.mjs} +1 -1
- package/dist/{platform-recovery-BiNpZZab.mjs → platform-recovery-noaALXnE.mjs} +2 -2
- package/dist/{plugin-inference-DUjCd55H.mjs → plugin-inference-CeiB6BG5.mjs} +53 -18
- package/dist/{prepare-BcAE5Sdj.mjs → prepare-BuOS18AM.mjs} +1 -1
- package/dist/{prepare-DA-17DhO.mjs → prepare-D604Yiyr.mjs} +12 -8
- package/dist/prepare-DU-tOpS5.mjs +1 -0
- package/dist/{prerender-render-Cijv7UFo.mjs → prerender-render-CaShbHJ3.mjs} +13 -1
- package/dist/prerender-render.d.mts +1 -0
- package/dist/prerender-render.mjs +1 -1
- package/dist/{project-cmd-DA4K5faU.mjs → project-cmd-DBYqAIbe.mjs} +15 -15
- package/dist/{project-team-CQBNveX3.mjs → project-team-BjCLgTRC.mjs} +1 -1
- package/dist/{project-token-CCalFyQf.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-DPnkiEuT.mjs → project-zero-trust-CWDh1P_t.mjs} +1 -1
- package/dist/{protocol-BBDpJz3G.d.mts → protocol-D5XDySYu.d.mts} +2 -2
- package/dist/{provision-BFLCrnUp.mjs → provision-DfxLCg-d.mjs} +1 -1
- package/dist/{provision-DtROpNNI.mjs → provision-DztLJ97X.mjs} +24 -8
- package/dist/{requests-BpH0kImL.mjs → requests-D_pbzDyz.mjs} +1 -1
- package/dist/{rollback-CXS1tAa-.mjs → rollback-CjfIYsJx.mjs} +2 -2
- package/dist/{route-types-BZi26DVS.mjs → route-types-DvEGmPif.mjs} +109 -30
- package/dist/routes-stub.d.mts +22 -13
- package/dist/runtime/auth.d.mts +2 -2
- package/dist/runtime/better-auth-mysql.d.mts +1 -1
- package/dist/runtime/better-auth-mysql.mjs +1 -1
- package/dist/runtime/better-auth-pg.d.mts +1 -1
- package/dist/runtime/better-auth-pg.mjs +1 -1
- package/dist/runtime/better-auth.d.mts +1 -1
- package/dist/runtime/better-auth.mjs +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/log.mjs +19 -1
- package/dist/runtime/routing.d.mts +5 -4
- package/dist/runtime/routing.mjs +14 -73
- 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/{scan-8IzYXiU_.mjs → scan-N9WzdcAl.mjs} +302 -23
- package/dist/{secret-BbXHfLAt.mjs → secret-3X0PxmuX.mjs} +9 -12
- package/dist/static-asset-marker-Btf-6oCD.mjs +32 -0
- package/dist/{types-7AIz0OZu.d.mts → types-w72dljaA.d.mts} +6 -1
- package/dist/{version-metadata-tS39iW09.mjs → version-metadata-D2vfMQzv.mjs} +2 -1
- package/dist/worker-conditions-AWFRcFxR.mjs +11 -0
- package/dist/{wrangler-F96NnLyb.mjs → wrangler-I-scB_1t.mjs} +82 -13
- package/dist/wrangler-UnwdISay.mjs +1 -0
- package/dist/{wrapper-D3sZyh2C.mjs → wrapper-BBl1rC32.mjs} +8 -12
- package/dist/{ws-BH-im_tX.d.mts → ws-B3ClMVDh.d.mts} +3 -2
- package/docs/guide/auth.md +4 -2
- package/docs/guide/edge/redirects.md +22 -0
- package/docs/guide/edge/static-assets.md +10 -0
- package/docs/guide/email/domains.md +1 -1
- package/docs/guide/email/receiving.md +2 -0
- package/docs/guide/email/sending.md +1 -1
- package/docs/guide/pages-routing/actions-and-forms.md +43 -13
- package/docs/guide/pages-routing/markdown.md +2 -0
- package/docs/guide/pages-routing/overview.md +33 -2
- package/docs/guide/platform/administration/email.md +18 -0
- package/docs/guide/platform/installation/maintenance.md +3 -1
- package/docs/guide/platform/installation/prerequisites.md +9 -4
- package/docs/guide/platform/installation/uninstall.md +2 -0
- package/docs/guide/queues.md +13 -1
- package/docs/guide/server-routing.md +40 -2
- package/docs/guide/ssg.md +8 -0
- package/docs/guide/type-safety.md +7 -7
- package/docs/guide/websockets.md +4 -2
- 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 +6 -4
- package/docs/reference/cli/deploy.md +10 -9
- package/docs/reference/cli/email.md +13 -0
- package/docs/reference/cli/platform-email.md +2 -2
- package/docs/reference/cli.md +1 -0
- package/docs/reference/config.md +11 -1
- package/docs/reference/structure.md +3 -1
- package/package.json +9 -7
- package/schema.json +4 -0
- package/skills/void/SKILL.md +1 -1
- package/templates/assets/icons.svg +49 -0
- package/templates/assets/react.svg +1 -0
- package/templates/assets/solid.svg +1 -0
- package/templates/assets/stack.svg +35 -0
- package/templates/assets/svelte.svg +1 -0
- package/templates/assets/void.svg +5 -0
- package/templates/assets/vue.svg +1 -0
- package/dist/auth-DkcFflXV.d.mts +0 -42
- package/dist/cf-build-output-BJHuSsVN.mjs +0 -1
- package/dist/client-BiRDZTSd.mjs +0 -1
- package/dist/config-CyUJzi3q.mjs +0 -32
- package/dist/deploy-CE0Ev0Ob.mjs +0 -2
- package/dist/gen-NrOlWZaG.mjs +0 -1
- package/dist/help-BeAFFE5C.mjs +0 -1
- package/dist/login-DgDwlKc_.mjs +0 -1
- package/dist/migrate-n49ZeS1X.mjs +0 -1
- package/dist/operator-cmd-d2MvJOrl.mjs +0 -1
- package/dist/parse-filename-DioPHiR9.mjs +0 -77
- package/dist/platform-args-kQrgxScY.mjs +0 -1
- package/dist/prepare-C4I0f--h.mjs +0 -1
- package/dist/wrangler-BLb3_luP.mjs +0 -1
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-
|
|
3
|
-
import { i as PageDefinition, n as LayoutDefinition, o as PageScanResult, r as NamedLayoutDefinition } from "../types-
|
|
2
|
+
import "../config-CAdZVTLN.mjs";
|
|
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;
|
|
@@ -41,13 +42,29 @@ type PageScanOptions = {
|
|
|
41
42
|
output?: "server" | "static";
|
|
42
43
|
paths?: ProjectPaths;
|
|
43
44
|
pagesDir?: string;
|
|
45
|
+
/** Report pages that share a route. Off when another framework owns pages/ (Nuxt nests users.vue and users/index.vue). */
|
|
46
|
+
checkRoutes?: boolean;
|
|
47
|
+
/** Keep only pages for this environment (`.dev` / `.prod` suffix). Unset keeps every page. */
|
|
48
|
+
environment?: RouteEnvironment;
|
|
44
49
|
};
|
|
50
|
+
/**
|
|
51
|
+
* The environment a file under pages/ is limited to, read from its name the way
|
|
52
|
+
* scanPages does: `home.dev.tsx`, `home.dev.island.vue` and `home.dev.server.ts`
|
|
53
|
+
* give 'dev'. Files the scanner skips (`_` segments, other extensions) give null.
|
|
54
|
+
*/
|
|
55
|
+
export declare function pageFileEnvironment(relativePath: string): RouteEnvironment | null;
|
|
45
56
|
export declare function scanPages(root: string, options?: PageScanOptions): Promise<PageScanResult>;
|
|
46
57
|
//#endregion
|
|
47
58
|
//#region src/pages/manifest.d.ts
|
|
48
59
|
/**
|
|
49
60
|
* Generates the component import map and layout tree as code strings.
|
|
50
61
|
* Used by both SSR renderer and client entry virtual modules.
|
|
62
|
+
*
|
|
63
|
+
* Client entries load this eagerly, so it grows with every page. Each page id
|
|
64
|
+
* is written once, identical layout chains are shared, and static routes are
|
|
65
|
+
* matched by exact lookup instead of a RegExp per page. The emitted bindings
|
|
66
|
+
* (`components`, `layoutTree`, `routeMeta`, `matchRoute`) keep their shape;
|
|
67
|
+
* `matchRoute` takes a decoded pathname (see `decodePagePath`).
|
|
51
68
|
*/
|
|
52
69
|
export declare function generateComponentManifest(scan: PageScanResult, pagesDir: string): string;
|
|
53
70
|
//#endregion
|
|
@@ -61,4 +78,19 @@ type ResolveStaticPageDataBuildOptionsInput = {
|
|
|
61
78
|
};
|
|
62
79
|
export declare function resolveStaticPageDataBuildOptions(root: string, options?: ResolveStaticPageDataBuildOptionsInput): StaticPageDataBuildOptions;
|
|
63
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
|
|
64
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,60 +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-
|
|
4
|
-
import { a as
|
|
5
|
-
import { r as parseRedirectsFile } from "../headers
|
|
3
|
+
import { p as readConfig } from "../config-OFOAimzt.mjs";
|
|
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--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
|
-
|
|
9
|
-
|
|
10
|
-
* Generates the component import map and layout tree as code strings.
|
|
11
|
-
* Used by both SSR renderer and client entry virtual modules.
|
|
12
|
-
*/
|
|
13
|
-
function generateComponentManifest(scan, pagesDir) {
|
|
14
|
-
const lines = [];
|
|
15
|
-
lines.push("const components = {");
|
|
16
|
-
for (const page of scan.pages) {
|
|
17
|
-
const importPath = `${pagesDir}/${page.componentPath}`;
|
|
18
|
-
lines.push(` ${JSON.stringify(page.componentId)}: () => import(${JSON.stringify(importPath)}),`);
|
|
19
|
-
}
|
|
20
|
-
for (const layout of [...scan.layouts, ...scan.namedLayouts]) {
|
|
21
|
-
const importPath = `${pagesDir}/${layout.filePath}`;
|
|
22
|
-
lines.push(` ${JSON.stringify(toLayoutId(layout))}: () => import(${JSON.stringify(importPath)}),`);
|
|
23
|
-
}
|
|
24
|
-
lines.push("};");
|
|
25
|
-
lines.push("const layoutTree = {");
|
|
26
|
-
for (const page of scan.pages) {
|
|
27
|
-
const chain = resolveLayoutIds(page, scan.layouts, scan.namedLayouts);
|
|
28
|
-
if (chain.length > 0) lines.push(` ${JSON.stringify(page.componentId)}: ${JSON.stringify(chain)},`);
|
|
29
|
-
}
|
|
30
|
-
lines.push("};");
|
|
31
|
-
lines.push("const routeMeta = {");
|
|
32
|
-
for (const page of scan.pages) if (page.island) lines.push(` ${JSON.stringify(page.componentId)}: { island: true },`);
|
|
33
|
-
lines.push("};");
|
|
34
|
-
lines.push("const routes = [");
|
|
35
|
-
for (const page of scan.pages) {
|
|
36
|
-
const regex = patternToRegex(page.pattern);
|
|
37
|
-
lines.push(` { pattern: ${regex}, id: ${JSON.stringify(page.componentId)} },`);
|
|
38
|
-
}
|
|
39
|
-
lines.push("];");
|
|
40
|
-
lines.push(`function matchRoute(url) {
|
|
41
|
-
const path = new URL(url, "http://x").pathname;
|
|
42
|
-
for (const r of routes) {
|
|
43
|
-
if (r.pattern.test(path)) return r.id;
|
|
44
|
-
}
|
|
45
|
-
return null;
|
|
46
|
-
}`);
|
|
47
|
-
return lines.join("\n");
|
|
48
|
-
}
|
|
49
|
-
function patternToRegex(pattern) {
|
|
50
|
-
return `/^${pattern.split("/").map((segment) => {
|
|
51
|
-
if (segment === "*") return "(.*)";
|
|
52
|
-
if (/^:[^/{}]+\{\.\+\}$/.test(segment)) return "(.+)";
|
|
53
|
-
if (/^:[^/]+$/.test(segment)) return "([^/]+)";
|
|
54
|
-
return segment.replace(/[.*+?^${}()|[\]\\]/g, "\\$&");
|
|
55
|
-
}).join("/").replace(/\//g, "\\/")}$/`;
|
|
56
|
-
}
|
|
57
|
-
//#endregion
|
|
8
|
+
import { existsSync } from "node:fs";
|
|
9
|
+
import { normalizePath } from "vite";
|
|
58
10
|
//#region src/pages/static-data.ts
|
|
59
11
|
function resolveStaticPageDataBuildOptions(root, options = {}) {
|
|
60
12
|
const config = readConfig(root);
|
|
@@ -73,4 +25,93 @@ function resolveStaticPageDataBuildOptions(root, options = {}) {
|
|
|
73
25
|
};
|
|
74
26
|
}
|
|
75
27
|
//#endregion
|
|
76
|
-
|
|
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,4 +1,4 @@
|
|
|
1
|
-
import { o as PageScanResult } from "../types-
|
|
1
|
+
import { o as PageScanResult } from "../types-w72dljaA.mjs";
|
|
2
2
|
import { Plugin, ResolvedConfig, ViteDevServer } from "vite";
|
|
3
3
|
//#region ../../node_modules/.pnpm/magic-string@1.4.3/node_modules/magic-string/dist/index.d.mts
|
|
4
4
|
//#region src/SourceMap.d.ts
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import { c as resolve, n as dirname } from "../dist-ipQi0Q8y.mjs";
|
|
2
|
-
import { c as
|
|
2
|
+
import { c as editIslandSource, i as resolveEffectiveLayoutChain, l as findIslandImports, n as scanPages, u as findStaticCssImports } from "../scan-N9WzdcAl.mjs";
|
|
3
3
|
import { existsSync, readFileSync } from "node:fs";
|
|
4
4
|
import { isCSSRequest, normalizePath } from "vite";
|
|
5
5
|
//#region src/pages/islands-plugin.ts
|
|
@@ -23,7 +23,10 @@ function resolveSpecifier(specifier, importerDir, extensions) {
|
|
|
23
23
|
async function hasIslandPages(root, pagesDir) {
|
|
24
24
|
if (!existsSync(pagesDir)) return false;
|
|
25
25
|
try {
|
|
26
|
-
return (await scanPages(root, {
|
|
26
|
+
return (await scanPages(root, {
|
|
27
|
+
pagesDir,
|
|
28
|
+
environment: "prod"
|
|
29
|
+
})).pages.some((page) => page.island);
|
|
27
30
|
} catch {
|
|
28
31
|
return false;
|
|
29
32
|
}
|
|
@@ -181,7 +184,10 @@ function watchPagesForRescan(server, pagesDir, root, onRescan) {
|
|
|
181
184
|
if (debounceTimer) clearTimeout(debounceTimer);
|
|
182
185
|
debounceTimer = setTimeout(() => {
|
|
183
186
|
debounceTimer = null;
|
|
184
|
-
pending = scanPages(root, {
|
|
187
|
+
pending = scanPages(root, {
|
|
188
|
+
pagesDir,
|
|
189
|
+
environment: "dev"
|
|
190
|
+
}).then((pageScan) => {
|
|
185
191
|
onRescan(pageScan);
|
|
186
192
|
for (const env of Object.values(server.environments)) {
|
|
187
193
|
const mod = env.moduleGraph.getModuleById("\0virtual:void-islands-renderer");
|
|
@@ -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 };
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export { t as parsePlatformArgs } from "./platform-args-BMD2gjc_.mjs";
|
|
@@ -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-BsJIYXaT.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
|
|
@@ -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-SHhvim1L.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";
|
|
@@ -96,19 +96,19 @@ async function runPlatformCommand(_root, args) {
|
|
|
96
96
|
}]
|
|
97
97
|
});
|
|
98
98
|
if (isCancel(group)) return;
|
|
99
|
-
const { parsePlatformArgs } = await import("./platform-args-
|
|
99
|
+
const { parsePlatformArgs } = await import("./platform-args-BC8_hsDj.mjs");
|
|
100
100
|
return runPlatformCommand(_root, parsePlatformArgs(["config", group]));
|
|
101
101
|
}
|
|
102
102
|
const { runPlatformPlansConfig } = await import("./platform-plans-config-CeydDSj0.mjs");
|
|
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) {
|