@farm.js/core 0.1.81 → 0.1.82
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/{agent-mcp.d-Cxi3214_.d.ts → agent-mcp.d-C2Su3x4D.d.ts} +1 -1
- package/dist/{agent-mcp.d-DMqOqnOA.d.mts → agent-mcp.d-Yak-LqRd.d.mts} +1 -1
- package/dist/agent-runtime.cjs +4 -3
- package/dist/agent-runtime.d.mts +1 -1
- package/dist/agent-runtime.d.ts +1 -1
- package/dist/agent-runtime.mjs +3 -2
- package/dist/analyzer-LV23T6QN.cjs +17 -0
- package/dist/{analyzer-IC66UJCU.mjs → analyzer-RPU2KG4J.mjs} +2 -2
- package/dist/api/node.cjs +5 -4
- package/dist/api/node.d.mts +3 -3
- package/dist/api/node.d.ts +3 -3
- package/dist/api/node.mjs +4 -3
- package/dist/api/route-manager.cjs +5 -4
- package/dist/api/route-manager.d.mts +3 -3
- package/dist/api/route-manager.d.ts +3 -3
- package/dist/api/route-manager.mjs +4 -3
- package/dist/api/runtime.cjs +4 -3
- package/dist/api/runtime.d.mts +2 -2
- package/dist/api/runtime.d.ts +2 -2
- package/dist/api/runtime.mjs +3 -2
- package/dist/api.cjs +7 -6
- package/dist/api.d.mts +4 -4
- package/dist/api.d.ts +4 -4
- package/dist/api.mjs +6 -5
- package/dist/{app-manifest.d-Bbxp5kes.d.mts → app-manifest.d-BcyOFMrg.d.mts} +1 -1
- package/dist/{app-manifest.d-C8Cswd31.d.ts → app-manifest.d-DZyXaICz.d.ts} +1 -1
- package/dist/app-markdown.d.mts +2 -2
- package/dist/app-markdown.d.ts +2 -2
- package/dist/{app.d-BJuSurgy.d.mts → app.d-C0ePpuaG.d.mts} +21 -4
- package/dist/{app.d-DGIoFt5D.d.ts → app.d-CIoXsAbN.d.ts} +21 -4
- package/dist/chunk-3DE6RK7K.cjs +36 -0
- package/dist/{chunk-NOYKBGUK.mjs → chunk-47I2MYIR.mjs} +130 -46
- package/dist/{chunk-GY63XD6K.mjs → chunk-4X7LSGM6.mjs} +1 -1
- package/dist/{chunk-BPWTSPK6.mjs → chunk-5AL2GXAU.mjs} +1 -1
- package/dist/{chunk-GAWSWJJ2.cjs → chunk-5GFTMTX3.cjs} +2 -2
- package/dist/{chunk-CPZZBCPO.cjs → chunk-5MUFW5UU.cjs} +2 -2
- package/dist/{chunk-LKIG5SM6.cjs → chunk-5P65LXGU.cjs} +9 -9
- package/dist/{chunk-XOXCQGAF.mjs → chunk-63ZE6B6M.mjs} +1 -1
- package/dist/{chunk-XOGCNKB7.cjs → chunk-6BPFIYGY.cjs} +3 -3
- package/dist/{chunk-UF4BNKKJ.mjs → chunk-6QYPP5KC.mjs} +2 -2
- package/dist/{chunk-ATISIC6G.mjs → chunk-7VJXYB6S.mjs} +7 -1
- package/dist/{chunk-2Y2HRZQY.cjs → chunk-AIPZDBP6.cjs} +312 -228
- package/dist/{chunk-CL7BUGVB.cjs → chunk-ARORZ3MH.cjs} +286 -240
- package/dist/{chunk-ONSZP5JK.mjs → chunk-AUFEM3FB.mjs} +1 -1
- package/dist/{chunk-FYZD7DUS.cjs → chunk-B2PGVHBG.cjs} +4 -4
- package/dist/{chunk-WGWWRV2M.cjs → chunk-B3HQTGXS.cjs} +6 -4
- package/dist/{chunk-M6DAIE4T.cjs → chunk-BCTHOQPP.cjs} +10 -8
- package/dist/{chunk-S3IWDDQ3.mjs → chunk-C3VCYOU4.mjs} +1 -1
- package/dist/{chunk-OO4GVGM3.mjs → chunk-CA2HBLXP.mjs} +11 -1
- package/dist/{chunk-W6C3LEXX.cjs → chunk-CD5Z7RR5.cjs} +155 -20
- package/dist/{chunk-YH7ENV3K.mjs → chunk-CJDBTTLB.mjs} +4 -4
- package/dist/{chunk-5N526T7Q.mjs → chunk-DAXU2NBE.mjs} +74 -18
- package/dist/{chunk-Z5BANEQD.cjs → chunk-DMSXZNQR.cjs} +2 -2
- package/dist/{chunk-46UV2E7I.cjs → chunk-DRO3NXA3.cjs} +9 -9
- package/dist/{chunk-4OFWG4IK.cjs → chunk-EACD6ND7.cjs} +8 -2
- package/dist/{chunk-HTNJ7A4D.mjs → chunk-EL2Z6YFZ.mjs} +2 -2
- package/dist/{chunk-IM3UINTZ.mjs → chunk-GXLNARPO.mjs} +151 -16
- package/dist/{chunk-E3HBD2K3.cjs → chunk-HHQEKLZL.cjs} +2 -2
- package/dist/{chunk-5ZHC6QGD.cjs → chunk-HQKCSJEH.cjs} +8 -2
- package/dist/{chunk-RHI67C2V.cjs → chunk-HUGPJFOC.cjs} +1 -35
- package/dist/{chunk-BJWJP5A4.mjs → chunk-I4DR3HCH.mjs} +3 -3
- package/dist/{chunk-C2OLXVUC.mjs → chunk-IVP5Q4BX.mjs} +10 -3
- package/dist/{chunk-NSLRK5DK.cjs → chunk-JK26IMT7.cjs} +1 -1
- package/dist/{chunk-WIZRYFB2.cjs → chunk-JYQ6DGPW.cjs} +8 -6
- package/dist/{chunk-TYHWZOA2.mjs → chunk-KWI3SQFX.mjs} +4 -2
- package/dist/{chunk-POVHO46S.mjs → chunk-L3RDECA5.mjs} +1 -1
- package/dist/{chunk-MOGRRZMW.cjs → chunk-LM2ZDNDD.cjs} +16 -16
- package/dist/{chunk-RPA45OQS.mjs → chunk-MO4UTDQ6.mjs} +1 -1
- package/dist/{chunk-ZIYJWJV2.cjs → chunk-N2EFMN2K.cjs} +8 -8
- package/dist/{chunk-6WVRVGKC.mjs → chunk-NAHDG6UX.mjs} +1 -1
- package/dist/{chunk-OFVCWV2D.cjs → chunk-NEKO3HM2.cjs} +11 -1
- package/dist/{chunk-SLEHAGGV.mjs → chunk-NQ3Y6E2T.mjs} +7 -1
- package/dist/{chunk-IPG6B25T.mjs → chunk-NRCKBDYP.mjs} +78 -32
- package/dist/{chunk-POL5RCVU.mjs → chunk-OMB7UGVW.mjs} +1 -1
- package/dist/{chunk-D77OGI6X.mjs → chunk-OP5VI4TP.mjs} +1 -1
- package/dist/{chunk-7VCLTNED.mjs → chunk-PNMAD3OS.mjs} +1 -35
- package/dist/{chunk-OIWDEDUO.cjs → chunk-Q2VOT3K2.cjs} +392 -336
- package/dist/{chunk-RZ6XUEQS.mjs → chunk-QSMUMK7Y.mjs} +2 -2
- package/dist/{chunk-2HMSSPCZ.mjs → chunk-RMLR5RMH.mjs} +4 -2
- package/dist/{chunk-ADQ2LATR.cjs → chunk-RMPUEH5T.cjs} +2 -2
- package/dist/{chunk-AHVF5GI2.cjs → chunk-S7WZUK3B.cjs} +2 -2
- package/dist/{chunk-ZKNXCRUQ.cjs → chunk-U54REWMJ.cjs} +23 -23
- package/dist/chunk-U6XYBTUT.mjs +36 -0
- package/dist/{chunk-TCMRLW3K.cjs → chunk-VACYUMXW.cjs} +10 -3
- package/dist/{chunk-OUDNUFVR.cjs → chunk-VMBIKDKW.cjs} +4 -4
- package/dist/{chunk-UGLTOLTJ.cjs → chunk-W76C7TCW.cjs} +2 -2
- package/dist/{chunk-6JWXHPVR.mjs → chunk-XRSNW4IU.mjs} +4 -2
- package/dist/{chunk-TLSGRK7E.mjs → chunk-ZIZRIZLP.mjs} +1 -1
- package/dist/{cli-runtime.d-D8O1v2_X.d.mts → cli-runtime.d-Hnvvadz7.d.mts} +5 -5
- package/dist/{cli-runtime.d-hf4L1MNP.d.ts → cli-runtime.d-I0MphTbc.d.ts} +5 -5
- package/dist/{client-component.d-CX8UCQh-.d.ts → client-component.d-5QEvtJsg.d.ts} +1 -1
- package/dist/{client-component.d-DFwUHlOz.d.mts → client-component.d-DapRqtSC.d.mts} +1 -1
- package/dist/{client-plugins.d-BflSNO-b.d.mts → client-plugins.d-C1WM3ieD.d.mts} +6 -1
- package/dist/{client-plugins.d-qWp8hNwd.d.ts → client-plugins.d-DcmDzcSC.d.ts} +6 -1
- package/dist/client-plugins.d.mts +1 -1
- package/dist/client-plugins.d.ts +1 -1
- package/dist/client.d.mts +7 -7
- package/dist/client.d.ts +7 -7
- package/dist/config.d.mts +1 -1
- package/dist/config.d.ts +1 -1
- package/dist/cron.cjs +2 -2
- package/dist/cron.mjs +1 -1
- package/dist/desktop.d.mts +2 -2
- package/dist/desktop.d.ts +2 -2
- package/dist/{devtools-EI5N366Z.cjs → devtools-5B7NZE6F.cjs} +10 -9
- package/dist/{devtools-XJHODO5H.mjs → devtools-C5GXZZ7E.mjs} +7 -6
- package/dist/docs.cjs +9 -8
- package/dist/docs.d.mts +3 -3
- package/dist/docs.d.ts +3 -3
- package/dist/docs.mjs +8 -7
- package/dist/environment/vite.cjs +4 -4
- package/dist/environment/vite.mjs +3 -3
- package/dist/{handler.d-DoH5Krkq.d.mts → handler.d-B8bPCBzl.d.mts} +1 -1
- package/dist/{handler.d-C2oRihfa.d.ts → handler.d-Cliwo6Nu.d.ts} +1 -1
- package/dist/{headers.d-BrX53wFQ.d.mts → headers.d-CVwSpSGX.d.mts} +1 -1
- package/dist/{headers.d-Dj0mfYpb.d.ts → headers.d-C_btqjV6.d.ts} +1 -1
- package/dist/index.cjs +28 -27
- package/dist/{index.d-DzDHOttz.d.mts → index.d-DFuMZk9-.d.mts} +1 -1
- package/dist/{index.d-Dhc2scRl.d.ts → index.d-hOEbMcLk.d.ts} +1 -1
- package/dist/index.d.mts +22 -22
- package/dist/index.d.ts +22 -22
- package/dist/index.mjs +27 -26
- package/dist/integrations/orm.d.mts +1 -1
- package/dist/integrations/orm.d.ts +1 -1
- package/dist/integrations.cjs +4 -3
- package/dist/integrations.d.mts +1 -1
- package/dist/integrations.d.ts +1 -1
- package/dist/integrations.mjs +3 -2
- package/dist/internal/app-markdown-runtime.d.mts +2 -2
- package/dist/internal/app-markdown-runtime.d.ts +2 -2
- package/dist/internal/build-runtime.cjs +26 -25
- package/dist/internal/build-runtime.d.mts +4 -4
- package/dist/internal/build-runtime.d.ts +4 -4
- package/dist/internal/build-runtime.mjs +25 -24
- package/dist/internal/cli-runtime.cjs +11 -10
- package/dist/internal/cli-runtime.d.mts +7 -7
- package/dist/internal/cli-runtime.d.ts +7 -7
- package/dist/internal/cli-runtime.mjs +10 -9
- package/dist/internal/client-error-overlay.cjs +4 -4
- package/dist/internal/client-error-overlay.mjs +1 -1
- package/dist/internal/client-runtime.d.mts +5 -5
- package/dist/internal/client-runtime.d.ts +5 -5
- package/dist/internal/compression-runtime.d.mts +1 -1
- package/dist/internal/compression-runtime.d.ts +1 -1
- package/dist/internal/config-runtime.cjs +9 -8
- package/dist/internal/config-runtime.d.mts +3 -3
- package/dist/internal/config-runtime.d.ts +3 -3
- package/dist/internal/config-runtime.mjs +8 -7
- package/dist/internal/infra-analytics-runtime.cjs +8 -6
- package/dist/internal/infra-analytics-runtime.d.mts +8 -2
- package/dist/internal/infra-analytics-runtime.d.ts +8 -2
- package/dist/internal/infra-analytics-runtime.mjs +8 -6
- package/dist/internal/islands-boot.cjs +54 -20
- package/dist/internal/islands-boot.d.mts +5 -3
- package/dist/internal/islands-boot.d.ts +5 -3
- package/dist/internal/islands-boot.mjs +49 -15
- package/dist/internal/native-server-fns.cjs +4 -4
- package/dist/internal/native-server-fns.mjs +3 -3
- package/dist/internal/product-telemetry-runtime.cjs +3 -3
- package/dist/internal/product-telemetry-runtime.mjs +2 -2
- package/dist/internal/production-runtime.cjs +11 -6
- package/dist/internal/production-runtime.d.mts +13 -11
- package/dist/internal/production-runtime.d.ts +13 -11
- package/dist/internal/production-runtime.mjs +10 -5
- package/dist/internal/spa-router.d.mts +3 -3
- package/dist/internal/spa-router.d.ts +3 -3
- package/dist/internal/start-manifest.d.mts +1 -1
- package/dist/internal/start-manifest.d.ts +1 -1
- package/dist/markdown.d.mts +1 -1
- package/dist/markdown.d.ts +1 -1
- package/dist/middleware.d.mts +1 -1
- package/dist/middleware.d.ts +1 -1
- package/dist/{mount.d-DwXjaOHY.d.ts → mount.d-CAovYKfs.d.ts} +1 -1
- package/dist/{mount.d-DOaeUoWq.d.mts → mount.d-DLeYxeRR.d.mts} +1 -1
- package/dist/{navigation-delegate.d-o3pPd9VI.d.ts → navigation-delegate.d-BLM-8Q3Z.d.ts} +1 -1
- package/dist/{navigation-delegate.d-BElGUMgt.d.mts → navigation-delegate.d-Chv93QS6.d.mts} +1 -1
- package/dist/navigation.d.mts +4 -4
- package/dist/navigation.d.ts +4 -4
- package/dist/{nitro-YLTGVGK4.mjs → nitro-FK3SZM4H.mjs} +1 -1
- package/dist/{nitro-XGIO6EQN.cjs → nitro-YDFMH5PY.cjs} +4 -4
- package/dist/{plugin-LN3JBZRR.cjs → plugin-3PT7I26P.cjs} +2 -2
- package/dist/{plugin-33I3V42N.mjs → plugin-QOTAPTVV.mjs} +1 -1
- package/dist/plugin.cjs +21 -19
- package/dist/plugin.d.mts +5 -5
- package/dist/plugin.d.ts +5 -5
- package/dist/plugin.mjs +20 -18
- package/dist/{render-plan.d-BD06tqFA.d.ts → render-plan.d-BSTjTH8h.d.ts} +1 -1
- package/dist/{render-plan.d-xWCRAJeR.d.mts → render-plan.d-CK5Lggyb.d.mts} +1 -1
- package/dist/renderer-client.cjs +48 -5
- package/dist/renderer-client.d.mts +5 -5
- package/dist/renderer-client.d.ts +5 -5
- package/dist/renderer-client.mjs +48 -5
- package/dist/renderer.cjs +2 -2
- package/dist/renderer.d.mts +10 -0
- package/dist/renderer.d.ts +10 -0
- package/dist/renderer.mjs +1 -1
- package/dist/{request.d-Dx82V8bz.d.mts → request.d-BhggxQf3.d.mts} +1 -1
- package/dist/{request.d-DUMuWxSN.d.ts → request.d-CyJS9bjm.d.ts} +1 -1
- package/dist/request.d.mts +2 -2
- package/dist/request.d.ts +2 -2
- package/dist/{route-rendering.d-BwBVpLtD.d.ts → route-rendering.d-BLPPmI5I.d.ts} +1 -1
- package/dist/{route-rendering.d-DJh6GauM.d.mts → route-rendering.d-CUpG2mZJ.d.mts} +1 -1
- package/dist/{router.d-CJBSG5jr.d.ts → router.d-0X2Ki6rf.d.ts} +1 -1
- package/dist/{router.d-BtkKDxUB.d.mts → router.d-2NQM1Kgw.d.mts} +1 -1
- package/dist/routes.d.mts +1 -1
- package/dist/routes.d.ts +1 -1
- package/dist/{rsc-pipeline-H5AXQA7A.cjs → rsc-pipeline-5AOF64FL.cjs} +10 -9
- package/dist/{rsc-pipeline-GD6KLOIG.mjs → rsc-pipeline-DNRLYOJ7.mjs} +9 -8
- package/dist/{runtime-OJ7FXFUI.mjs → runtime-EHG2FRXZ.mjs} +9 -8
- package/dist/{runtime-YWQVBC3V.cjs → runtime-ZVHG5SRB.cjs} +13 -12
- package/dist/{runtime.d-BQnD0cfC.d.ts → runtime.d-CXuwkUgr.d.ts} +1 -1
- package/dist/{runtime.d-C4SuZXf6.d.mts → runtime.d-CaFXcu_Q.d.mts} +1 -1
- package/dist/{server-components-status.d-rfKOcE0N.d.ts → server-components-status.d-BdeFD8ZH.d.ts} +1 -1
- package/dist/{server-components-status.d-9rH7ZoEq.d.mts → server-components-status.d-Cp7zvBm5.d.mts} +1 -1
- package/dist/server-plugins.d.mts +3 -3
- package/dist/server-plugins.d.ts +3 -3
- package/dist/server.cjs +54 -48
- package/dist/server.d.mts +11 -11
- package/dist/server.d.ts +11 -11
- package/dist/server.mjs +30 -24
- package/dist/{spa-router.d-DMKiBsHH.d.ts → spa-router.d-Bjgl-Osi.d.ts} +2 -2
- package/dist/{spa-router.d-V6XLSTCy.d.mts → spa-router.d-l3G38xHa.d.mts} +2 -2
- package/dist/{ssg.d-MNedvvMB.d.ts → ssg.d-DDca17Lc.d.ts} +2 -2
- package/dist/{ssg.d-BnCKPQL0.d.mts → ssg.d-RnlHOqUL.d.mts} +2 -2
- package/dist/{store-core.d-BqJI1-ix.d.mts → store-core.d-BZjuC6Zc.d.mts} +11 -3
- package/dist/{store-core.d-Ad5biajo.d.ts → store-core.d-BaOUOPf7.d.ts} +11 -3
- package/dist/testing.cjs +5 -4
- package/dist/testing.d.mts +1 -1
- package/dist/testing.d.ts +1 -1
- package/dist/testing.mjs +4 -3
- package/dist/{utils.d-BdjHKDuT.d.ts → utils.d-D8TWmpWo.d.ts} +1 -1
- package/dist/{utils.d-BEKLWa0Z.d.mts → utils.d-tdzw0_zQ.d.mts} +1 -1
- package/dist/version.cjs +2 -2
- package/dist/version.mjs +1 -1
- package/dist/vite.cjs +21 -19
- package/dist/vite.d.mts +6 -6
- package/dist/vite.d.ts +6 -6
- package/dist/vite.mjs +20 -18
- package/package.json +2 -2
- package/dist/analyzer-435DCIQ6.cjs +0 -17
|
@@ -1,12 +1,12 @@
|
|
|
1
1
|
import {
|
|
2
2
|
resolveFarmAppClientEntry,
|
|
3
3
|
resolveFarmClientPlugins
|
|
4
|
-
} from "./chunk-
|
|
4
|
+
} from "./chunk-MO4UTDQ6.mjs";
|
|
5
5
|
import {
|
|
6
6
|
collectSSGPages,
|
|
7
7
|
matchSSGPage,
|
|
8
8
|
resolveRouteRenderingConfigFromFile
|
|
9
|
-
} from "./chunk-
|
|
9
|
+
} from "./chunk-ZIZRIZLP.mjs";
|
|
10
10
|
import {
|
|
11
11
|
findFarmAppPackageDir
|
|
12
12
|
} from "./chunk-YSU3WCW6.mjs";
|
|
@@ -25,6 +25,7 @@ import {
|
|
|
25
25
|
createFarmThemeDocumentParts,
|
|
26
26
|
createLateNotFoundRecovery,
|
|
27
27
|
createLateRedirectRecovery,
|
|
28
|
+
createPreHydrationClickQueueScript,
|
|
28
29
|
createRouteDirectoryPattern,
|
|
29
30
|
extractFarmFullDocument,
|
|
30
31
|
farmDocsLayoutsWrapPage,
|
|
@@ -48,7 +49,7 @@ import {
|
|
|
48
49
|
stripRouteGroups,
|
|
49
50
|
takeFarmHoistedHead,
|
|
50
51
|
takeFarmNavigationOutlet
|
|
51
|
-
} from "./chunk-
|
|
52
|
+
} from "./chunk-CA2HBLXP.mjs";
|
|
52
53
|
import {
|
|
53
54
|
getFarmFormState,
|
|
54
55
|
handleFarmFormActionRequest,
|
|
@@ -56,7 +57,7 @@ import {
|
|
|
56
57
|
} from "./chunk-V7HNYR76.mjs";
|
|
57
58
|
import {
|
|
58
59
|
listFarmMCPLlmsTxtLinks
|
|
59
|
-
} from "./chunk-
|
|
60
|
+
} from "./chunk-QSMUMK7Y.mjs";
|
|
60
61
|
import {
|
|
61
62
|
FARM_DEFAULT_MCP_PATH,
|
|
62
63
|
collectFarmDefaultMCPPages,
|
|
@@ -99,10 +100,7 @@ import {
|
|
|
99
100
|
traceFarmSourceReads,
|
|
100
101
|
usesFarmServerTree,
|
|
101
102
|
withFarmSourceSnapshot
|
|
102
|
-
} from "./chunk-
|
|
103
|
-
import {
|
|
104
|
-
FARM_ISLAND_REPLAYABLE_SELECTOR
|
|
105
|
-
} from "./chunk-S32PDOLO.mjs";
|
|
103
|
+
} from "./chunk-EL2Z6YFZ.mjs";
|
|
106
104
|
import {
|
|
107
105
|
_setDefaultFarmThemeConfig,
|
|
108
106
|
getTheme
|
|
@@ -126,7 +124,7 @@ import {
|
|
|
126
124
|
resolveFarmAgentCrawlers,
|
|
127
125
|
resolveFarmAgentSitemap,
|
|
128
126
|
resolveFarmPerformanceConfig
|
|
129
|
-
} from "./chunk-
|
|
127
|
+
} from "./chunk-NQ3Y6E2T.mjs";
|
|
130
128
|
import {
|
|
131
129
|
createFarmCspNonce,
|
|
132
130
|
createFarmCspNonceRewriter,
|
|
@@ -165,13 +163,13 @@ import {
|
|
|
165
163
|
resolveFarmRenderer,
|
|
166
164
|
resolveFarmRendererAppSetup,
|
|
167
165
|
resolveFarmRendererModule
|
|
168
|
-
} from "./chunk-
|
|
166
|
+
} from "./chunk-RMLR5RMH.mjs";
|
|
169
167
|
import {
|
|
170
168
|
resolveFarmImageConfig
|
|
171
169
|
} from "./chunk-AOIUYHPH.mjs";
|
|
172
170
|
import {
|
|
173
171
|
resolveCronConfig
|
|
174
|
-
} from "./chunk-
|
|
172
|
+
} from "./chunk-7VJXYB6S.mjs";
|
|
175
173
|
import {
|
|
176
174
|
resolveServerActionsConfig
|
|
177
175
|
} from "./chunk-NLATR3T3.mjs";
|
|
@@ -208,7 +206,7 @@ import {
|
|
|
208
206
|
getIntegrationProviders,
|
|
209
207
|
getRegisteredIntegrationAPIManifest,
|
|
210
208
|
isFarmIntegrationProviderComponentReference
|
|
211
|
-
} from "./chunk-
|
|
209
|
+
} from "./chunk-XRSNW4IU.mjs";
|
|
212
210
|
import {
|
|
213
211
|
initStorage
|
|
214
212
|
} from "./chunk-QBJ6N5MT.mjs";
|
|
@@ -306,7 +304,7 @@ import {
|
|
|
306
304
|
} from "./chunk-EILUVBKS.mjs";
|
|
307
305
|
import {
|
|
308
306
|
FARM_VERSION
|
|
309
|
-
} from "./chunk-
|
|
307
|
+
} from "./chunk-OP5VI4TP.mjs";
|
|
310
308
|
import {
|
|
311
309
|
normalizeFarmAPIConfig
|
|
312
310
|
} from "./chunk-W6QLRQ3V.mjs";
|
|
@@ -4042,10 +4040,6 @@ var PPR_REFRESH_MAX_ATTEMPTS = 3;
|
|
|
4042
4040
|
function createPPRRefreshScript() {
|
|
4043
4041
|
return `<script>(function(){if(window.__FARM_PPR_REFRESHING__)return;window.__FARM_PPR_REFRESHING__=true;var owner=document.currentScript;function applyState(doc){doc.querySelectorAll("script[data-farm-refresh-state]").forEach(function(source){var script=document.createElement("script");if(owner&&owner.nonce)script.nonce=owner.nonce;script.textContent=source.textContent||"";document.head.appendChild(script);script.remove();});}function key(node){return node.nodeType===1?node.getAttribute("id"):null}function compatible(current,next){if(current.nodeType!==next.nodeType)return false;if(current.nodeType===1&¤t.tagName!==next.tagName)return false;var currentKey=key(current);var nextKey=key(next);return currentKey||nextKey?currentKey===nextKey:true}function syncAttributes(current,next){Array.from(current.attributes).forEach(function(attribute){if(!next.hasAttribute(attribute.name))current.removeAttribute(attribute.name)});Array.from(next.attributes).forEach(function(attribute){if(current.getAttribute(attribute.name)!==attribute.value)current.setAttribute(attribute.name,attribute.value)})}function syncChildren(current,next){var cursor=current.firstChild;Array.from(next.childNodes).forEach(function(nextChild){if(cursor&&compatible(cursor,nextChild)){var matched=cursor;cursor=cursor.nextSibling;syncNode(matched,nextChild);return}var candidate=cursor;while(candidate&&!compatible(candidate,nextChild))candidate=candidate.nextSibling;if(candidate){current.insertBefore(candidate,cursor);syncNode(candidate,nextChild);return}current.insertBefore(nextChild.cloneNode(true),cursor)});while(cursor){var stale=cursor;cursor=cursor.nextSibling;stale.remove()}}function syncNode(current,next){if(current.nodeType===3||current.nodeType===8){if(current.nodeValue!==next.nodeValue)current.nodeValue=next.nodeValue;return}if(current.nodeType!==1)return;var tag=current.tagName;var value=tag==="INPUT"&¤t.type==="file"?null:"value" in current?current.value:null;var checked="checked" in current?current.checked:null;var selected=tag==="SELECT"?Array.from(current.options).map(function(option){return option.selected}):null;var focused=document.activeElement===current;var selection=focused&&typeof current.selectionStart==="number"?[current.selectionStart,current.selectionEnd,current.selectionDirection]:null;syncAttributes(current,next);syncChildren(current,next);if(value!==null)current.value=value;if(checked!==null)current.checked=checked;if(selected)Array.from(current.options).forEach(function(option,index){option.selected=selected[index]===true});if(selection)try{current.setSelectionRange(selection[0],selection[1],selection[2])}catch{}}function replaceRoot(html){var doc=new DOMParser().parseFromString(html,"text/html");var next=doc.getElementById("root");var current=document.getElementById("root");if(!next||!current)return false;applyState(doc);syncNode(current,next);return true}var attempts=0,settle;window.__FARM_PPR_REFRESH_PROMISE__=new Promise(function(resolve){settle=resolve;});function release(){window.__FARM_PPR_REFRESHING__=false;}function retry(){settle();if(window.__FARM_PPR_HYDRATING__||attempts>=${PPR_REFRESH_MAX_ATTEMPTS})return release();if(navigator.onLine===false){window.addEventListener("online",run,{once:true});return;}setTimeout(run,1000*Math.pow(2,attempts-1));}function run(){if(window.__FARM_PPR_HYDRATING__)return release();attempts++;fetch(window.location.href,{cache:"no-store",credentials:"same-origin",headers:{"x-farm-ppr-refresh":"1"}}).then(function(response){if(!response.ok)throw new Error("status "+response.status);return response.text();}).then(function(html){if(window.__FARM_PPR_HYDRATING__)return release();if(!replaceRoot(html))throw new Error("no root");settle();}).catch(retry);}run();})();</script>`;
|
|
4044
4042
|
}
|
|
4045
|
-
function createPreHydrationClickQueueScript() {
|
|
4046
|
-
const selector = JSON.stringify(FARM_ISLAND_REPLAYABLE_SELECTOR);
|
|
4047
|
-
return `<script>(function(){if(window.__FARM_PREHYDRATION_CLICK_QUEUE__)return;var queue=[];window.__FARM_PREHYDRATION_CLICK_QUEUE__=queue;window.__FARM_HYDRATED__=false;document.documentElement.dataset.farmHydrated="false";function isModified(event){return !!(event.metaKey||event.altKey||event.ctrlKey||event.shiftKey)}function inHydrated(node){return !!(node&&node.closest&&node.closest('[data-farm-island-hydrated="true"]'))}function closestQueuedTarget(target){while(target&&target!==document.documentElement){if(target.matches&&target.matches(${selector}))return target;target=target.parentElement}return null}function announce(target,kind){document.dispatchEvent(new CustomEvent("farm:island-interaction",{detail:{target:target,kind:kind||null}}))}function submits(target,kind){return kind==="submit"||!!(target.form&&target.type==="submit")}function hold(event,target,kind){if(!(submits(target,kind)&&queue.some(function(item){return item.target===target}))){queue.push({target:target,kind:kind,createdAt:Date.now()});announce(target,kind)}event.preventDefault();event.stopImmediatePropagation()}document.addEventListener("click",function(event){if(window.__FARM_HYDRATED__)return;if(event.defaultPrevented||event.button!==0||isModified(event))return;var target=closestQueuedTarget(event.target);if(!target||target.closest&&target.closest("a[href]")||inHydrated(target))return;hold(event,target,"click")},true);document.addEventListener("submit",function(event){if(window.__FARM_HYDRATED__)return;if(event.defaultPrevented)return;var form=event.target;if(!form||form.nodeName!=="FORM"||inHydrated(form))return;hold(event,form,"submit")},true);function observe(event){if(window.__FARM_HYDRATED__)return;var target=event.target;if(!(target&&target.closest)||inHydrated(target))return;announce(target,null)}document.addEventListener("pointerdown",observe,true);document.addEventListener("focusin",observe,true);})();</script>`;
|
|
4048
|
-
}
|
|
4049
4043
|
function rendererRenderOptions() {
|
|
4050
4044
|
const nonce = _resolveCurrentCspNonce();
|
|
4051
4045
|
return nonce ? { nonce } : void 0;
|
|
@@ -4238,7 +4232,10 @@ var ServerRenderer = class {
|
|
|
4238
4232
|
this.appliedAppSetupModule = setupModule;
|
|
4239
4233
|
configureApp(setupModule.default);
|
|
4240
4234
|
}
|
|
4241
|
-
createPageBoundary(pageElement, options) {
|
|
4235
|
+
async createPageBoundary(pageElement, options) {
|
|
4236
|
+
if (options.pageShouldHydrate && !options.layoutShouldHydrate) {
|
|
4237
|
+
pageElement = await this.wrapIslandIntegrationProviders(pageElement);
|
|
4238
|
+
}
|
|
4242
4239
|
const boundary = this.rendererRuntime.createElement(
|
|
4243
4240
|
"div",
|
|
4244
4241
|
{
|
|
@@ -4253,6 +4250,15 @@ var ServerRenderer = class {
|
|
|
4253
4250
|
);
|
|
4254
4251
|
return options.pageShouldHydrate && !options.layoutShouldHydrate && this.reactRenderer ? this.reactRenderer.markPagePosition(boundary) : boundary;
|
|
4255
4252
|
}
|
|
4253
|
+
/**
|
|
4254
|
+
* The browser hydrates a page island or a route slot as its own root, inside the integration
|
|
4255
|
+
* providers, so the server renders the providers inside it too, or a provider that renders
|
|
4256
|
+
* markup (a Vue `<slot />` renders fragment markers) puts the root's HTML out of step. React
|
|
4257
|
+
* lines an island up with its tree position instead, and its providers render no markup.
|
|
4258
|
+
*/
|
|
4259
|
+
async wrapIslandIntegrationProviders(element) {
|
|
4260
|
+
return this.reactRenderer ? element : this.wrapWithIntegrationProviders(element);
|
|
4261
|
+
}
|
|
4256
4262
|
/// The app's `<srcDir>/app/globals.css`, linked only when it exists, as the
|
|
4257
4263
|
/// production build imports it only when it exists. An app without one gets
|
|
4258
4264
|
/// no stylesheet link rather than a failing request.
|
|
@@ -4470,7 +4476,7 @@ var ServerRenderer = class {
|
|
|
4470
4476
|
} else if (input.layoutShouldHydrate && !input.pageShouldHydrate && this.rendererRuntime.isolateServerPageGraph) {
|
|
4471
4477
|
element = await this.isolateServerPage(element, input.serverTree === true);
|
|
4472
4478
|
}
|
|
4473
|
-
element = this.createPageBoundary(element, {
|
|
4479
|
+
element = await this.createPageBoundary(element, {
|
|
4474
4480
|
pageShouldHydrate: input.pageShouldHydrate,
|
|
4475
4481
|
layoutShouldHydrate: input.layoutShouldHydrate,
|
|
4476
4482
|
islandStrategy: input.islandStrategy
|
|
@@ -4495,7 +4501,11 @@ var ServerRenderer = class {
|
|
|
4495
4501
|
continue;
|
|
4496
4502
|
}
|
|
4497
4503
|
let slotElement = this.rendererRuntime.createElement(slot.module.default, slot.props);
|
|
4498
|
-
if (slot.shouldHydrate !== false)
|
|
4504
|
+
if (slot.shouldHydrate !== false) {
|
|
4505
|
+
slotElement = this.wrapClientGraph(
|
|
4506
|
+
await this.wrapIslandIntegrationProviders(slotElement)
|
|
4507
|
+
);
|
|
4508
|
+
}
|
|
4499
4509
|
slotProps[slot.name] = this.rendererRuntime.createElement(
|
|
4500
4510
|
"div",
|
|
4501
4511
|
{
|
|
@@ -4841,7 +4851,7 @@ window.__FARM_I18N__ = ${i18nSnapshot ? serializeInlineValue(i18nSnapshot) : "nu
|
|
|
4841
4851
|
}
|
|
4842
4852
|
);
|
|
4843
4853
|
const layoutShouldHydrate = layoutMetadata.some((metadata) => metadata.shouldHydrate);
|
|
4844
|
-
pageElement = this.createPageBoundary(pageElement, {
|
|
4854
|
+
pageElement = await this.createPageBoundary(pageElement, {
|
|
4845
4855
|
pageShouldHydrate: pageMetadata.shouldHydrate,
|
|
4846
4856
|
layoutShouldHydrate,
|
|
4847
4857
|
islandStrategy: pageMetadata.islandStrategy
|
|
@@ -4858,7 +4868,7 @@ window.__FARM_I18N__ = ${i18nSnapshot ? serializeInlineValue(i18nSnapshot) : "nu
|
|
|
4858
4868
|
if (pageMetadata.shouldHydrate && !layoutShouldHydrate && this.reactRenderer) {
|
|
4859
4869
|
pageElement = this.reactRenderer.markLayoutPosition(pageElement);
|
|
4860
4870
|
}
|
|
4861
|
-
const html = await this.
|
|
4871
|
+
const { html, head: rendererHead } = await this.renderElementToDocumentParts(
|
|
4862
4872
|
await this.wrapWithIntegrationProviders(pageElement)
|
|
4863
4873
|
);
|
|
4864
4874
|
const mergedMetadata = await this.resolveRouteMetadata({
|
|
@@ -4867,8 +4877,9 @@ window.__FARM_I18N__ = ${i18nSnapshot ? serializeInlineValue(i18nSnapshot) : "nu
|
|
|
4867
4877
|
pageProps,
|
|
4868
4878
|
pathname: page.urlPath
|
|
4869
4879
|
});
|
|
4870
|
-
const { title, tags, hasFavicon } = renderMetadataHead(mergedMetadata);
|
|
4871
|
-
const
|
|
4880
|
+
const { title, tags, hasFavicon, hasExplicitTitle } = renderMetadataHead(mergedMetadata);
|
|
4881
|
+
const titleTag = !hasExplicitTitle && /<title[\s>]/i.test(rendererHead) ? "" : `<title>${title}</title>`;
|
|
4882
|
+
const metadataHead = `${hasFavicon ? "" : '<link rel="icon" href="data:,">\n '}${titleTag}${tags}${rendererHead}`;
|
|
4872
4883
|
const fullDocument = this.createFullHTML(
|
|
4873
4884
|
html,
|
|
4874
4885
|
pageMetadata.shouldHydrate === true,
|
|
@@ -5490,7 +5501,7 @@ window.__FARM_I18N__ = ${i18nSnapshot ? serializeInlineValue(i18nSnapshot) : "nu
|
|
|
5490
5501
|
routeManifestEntry?.serverTree === true
|
|
5491
5502
|
);
|
|
5492
5503
|
}
|
|
5493
|
-
pageElement = this.createPageBoundary(pageElement, {
|
|
5504
|
+
pageElement = await this.createPageBoundary(pageElement, {
|
|
5494
5505
|
pageShouldHydrate: isClientComponent || shouldHydrate,
|
|
5495
5506
|
layoutShouldHydrate: shouldHydrateLayout,
|
|
5496
5507
|
islandStrategy: hydrationIslandStrategy
|
|
@@ -5539,7 +5550,11 @@ window.__FARM_I18N__ = ${i18nSnapshot ? serializeInlineValue(i18nSnapshot) : "nu
|
|
|
5539
5550
|
slot.module.default,
|
|
5540
5551
|
slot.props
|
|
5541
5552
|
);
|
|
5542
|
-
if (slot.shouldHydrate)
|
|
5553
|
+
if (slot.shouldHydrate) {
|
|
5554
|
+
slotElement = this.wrapClientGraph(
|
|
5555
|
+
await this.wrapIslandIntegrationProviders(slotElement)
|
|
5556
|
+
);
|
|
5557
|
+
}
|
|
5543
5558
|
slotElement = this.rendererRuntime.createElement(
|
|
5544
5559
|
"div",
|
|
5545
5560
|
{
|
|
@@ -6413,6 +6428,21 @@ window.__FARM_I18N__ = ${i18nSnapshot ? serializeInlineValue(i18nSnapshot) : "nu
|
|
|
6413
6428
|
return false;
|
|
6414
6429
|
}
|
|
6415
6430
|
}
|
|
6431
|
+
/**
|
|
6432
|
+
* Islands mode: a page whose route hydrates nothing as a root hydrates only islands, which hold
|
|
6433
|
+
* their own clicks, so nothing else on it is held, as in production.
|
|
6434
|
+
*/
|
|
6435
|
+
isIslandsOnlyPage(req) {
|
|
6436
|
+
return this.islandValues() && req.__FARM_PAGE_SHOULD_HYDRATE__ !== true && req.__FARM_LAYOUT_SHOULD_HYDRATE__ !== true && req.__FARM_HAS_HYDRATABLE_ROUTE_SLOTS__ !== true;
|
|
6437
|
+
}
|
|
6438
|
+
/**
|
|
6439
|
+
* The head script that holds a page's clicks and submits until it hydrates, which the client
|
|
6440
|
+
* replays once it has. Production writes it into the same pages, streamed or buffered.
|
|
6441
|
+
*/
|
|
6442
|
+
renderPreHydrationHold(req, bootClient) {
|
|
6443
|
+
const hydrates = req.__FARM_IS_CLIENT_COMPONENT__ === true || req.__FARM_SHOULD_HYDRATE__ === true || req.__FARM_HAS_HYDRATABLE_ROUTE_SLOTS__ === true;
|
|
6444
|
+
return hydrates && !bootClient && !this.isIslandsOnlyPage(req) ? createPreHydrationClickQueueScript() : "";
|
|
6445
|
+
}
|
|
6416
6446
|
async renderBufferedSSR(element, req, res, clearMiddlewareData, options = {}) {
|
|
6417
6447
|
const startedAt = Date.now();
|
|
6418
6448
|
const route = options.observabilityRoute || req.__FARM_ROUTE__ || req.url || "/";
|
|
@@ -6465,6 +6495,7 @@ window.__FARM_I18N__ = ${getFarmI18nClientSnapshot() ? serializeInlineValue(getF
|
|
|
6465
6495
|
const farmClientScript = farmScripts(
|
|
6466
6496
|
`<script type="module" src="/@farm/client.js"></script>`
|
|
6467
6497
|
);
|
|
6498
|
+
const holdScript = farmScripts(this.renderPreHydrationHold(req, false));
|
|
6468
6499
|
const { html: content, head: rendererHead } = await this.renderElementToDocumentParts(
|
|
6469
6500
|
element,
|
|
6470
6501
|
{
|
|
@@ -6523,7 +6554,8 @@ window.__FARM_I18N__ = ${getFarmI18nClientSnapshot() ? serializeInlineValue(getF
|
|
|
6523
6554
|
...this.collectDevStyleLinks(),
|
|
6524
6555
|
viteClientScript,
|
|
6525
6556
|
rendererHydrationScript,
|
|
6526
|
-
bootstrapScript
|
|
6557
|
+
bootstrapScript,
|
|
6558
|
+
holdScript
|
|
6527
6559
|
].filter(Boolean).join("\n "),
|
|
6528
6560
|
bodyFooter: [deferredScript, farmClientScript].filter(Boolean).join("\n ")
|
|
6529
6561
|
});
|
|
@@ -6543,7 +6575,8 @@ window.__FARM_I18N__ = ${getFarmI18nClientSnapshot() ? serializeInlineValue(getF
|
|
|
6543
6575
|
${l}`).join("")}
|
|
6544
6576
|
${viteClientScript}
|
|
6545
6577
|
${rendererHydrationScript}
|
|
6546
|
-
${bootstrapScript}
|
|
6578
|
+
${bootstrapScript}${holdScript ? `
|
|
6579
|
+
${holdScript}` : ""}
|
|
6547
6580
|
</head>
|
|
6548
6581
|
<body class="">
|
|
6549
6582
|
<div id="root">${content}</div>
|
|
@@ -6683,11 +6716,12 @@ window.__FARM_MANIFEST__ = ${JSON.stringify(clientManifest)};
|
|
|
6683
6716
|
window.__FARM_INTEGRATION_API_MANIFEST__ = ${JSON.stringify(getRegisteredIntegrationAPIManifest())};
|
|
6684
6717
|
window.__FARM_I18N__ = ${getFarmI18nClientSnapshot() ? serializeInlineValue(getFarmI18nClientSnapshot()) : "null"};
|
|
6685
6718
|
</script>${renderFarmFormStateScript()}`;
|
|
6686
|
-
const islandsOnlyPage = this.
|
|
6719
|
+
const islandsOnlyPage = this.isIslandsOnlyPage(req);
|
|
6687
6720
|
const rootStrategy = req.__FARM_ISLAND_STRATEGY__;
|
|
6688
6721
|
const waitingRoot = this.islandValues() && !islandsOnlyPage && req.__FARM_HAS_HYDRATABLE_ROUTE_SLOTS__ !== true && rootStrategy !== void 0 && rootStrategy !== "load" ? req.__FARM_LAYOUT_SHOULD_HYDRATE__ === true ? "root" : "__farm_page__" : null;
|
|
6689
6722
|
const bootClient = (islandsOnlyPage || waitingRoot !== null) && !staticShellParts && resolveFarmPlatform() !== "mobile" && canBootFarmIslandsClient(this.config);
|
|
6690
|
-
const hydrationClickQueueScript =
|
|
6723
|
+
const hydrationClickQueueScript = this.renderPreHydrationHold(req, bootClient);
|
|
6724
|
+
const rendererHydrationScript = this.rendererRuntime.generateHydrationScript?.() || "";
|
|
6691
6725
|
const {
|
|
6692
6726
|
title,
|
|
6693
6727
|
tags: metaTags,
|
|
@@ -6753,7 +6787,8 @@ window.__FARM_I18N__ = ${getFarmI18nClientSnapshot() ? serializeInlineValue(getF
|
|
|
6753
6787
|
${fontHead}
|
|
6754
6788
|
${globalStylesheetLink}${devStyleLinks.map((l) => `
|
|
6755
6789
|
${l}`).join("")}
|
|
6756
|
-
<script type="module" src="/@vite/client"></script
|
|
6790
|
+
<script type="module" src="/@vite/client"></script>${rendererHydrationScript ? `
|
|
6791
|
+
${rendererHydrationScript}` : ""}
|
|
6757
6792
|
${propsScript}
|
|
6758
6793
|
${hydrationClickQueueScript}
|
|
6759
6794
|
</head>
|
|
@@ -6807,6 +6842,7 @@ window.__FARM_I18N__ = ${getFarmI18nClientSnapshot() ? serializeInlineValue(getF
|
|
|
6807
6842
|
globalStylesheetLink,
|
|
6808
6843
|
...devStyleLinks,
|
|
6809
6844
|
`<script type="module" src="/@vite/client"></script>`,
|
|
6845
|
+
rendererHydrationScript,
|
|
6810
6846
|
propsScript,
|
|
6811
6847
|
hydrationClickQueueScript
|
|
6812
6848
|
].filter(Boolean).join("\n ")
|
|
@@ -8033,6 +8069,15 @@ function createFarmNavigationScript(script) {
|
|
|
8033
8069
|
freshScript.textContent = script.textContent || "";
|
|
8034
8070
|
return freshScript;
|
|
8035
8071
|
}
|
|
8072
|
+
// Readies nodes parsed outside the page (DOMParser, a <template>) for the page they move into.
|
|
8073
|
+
// Those parse as a page without scripting, so a <noscript>'s content comes out as elements, whose
|
|
8074
|
+
// images and frames would load once in the page. They become the text the page's own parser makes
|
|
8075
|
+
// of that markup.
|
|
8076
|
+
function adoptFarmParsedNodes(root) {
|
|
8077
|
+
for (const noscript of Array.from(root.querySelectorAll("noscript"))) {
|
|
8078
|
+
noscript.textContent = noscript.innerHTML;
|
|
8079
|
+
}
|
|
8080
|
+
}
|
|
8036
8081
|
// React streams Suspense content after its fallback, in a hidden segment that a reveal script
|
|
8037
8082
|
// ($RC for a boundary, $RS for a segment placeholder) moves into place. This makes the same moves
|
|
8038
8083
|
// in a parsed page, before it goes on screen, and drops the calls it made, so the islands in that
|
|
@@ -8131,7 +8176,8 @@ async function readFarmNavigationStream(body, flushToken) {
|
|
|
8131
8176
|
cancel: function() { reader.cancel().catch(function() {}); },
|
|
8132
8177
|
};
|
|
8133
8178
|
}`;
|
|
8134
|
-
var FARM_EARLY_NAVIGATION_SOURCE = `// The request the boot script sent for a link clicked before the router ran
|
|
8179
|
+
var FARM_EARLY_NAVIGATION_SOURCE = `// The request the boot script sent for a link pressed or clicked before the router ran
|
|
8180
|
+
// (islands-boot.ts).
|
|
8135
8181
|
// The next navigation request takes its response when it is the same request, and aborts it
|
|
8136
8182
|
// otherwise. The held island values may differ: a response for fewer of them carries more values,
|
|
8137
8183
|
// which fits any page. As with a prefetched page, a response sent over 30 seconds ago is not used.
|
|
@@ -62,43 +62,9 @@ function describeIntegrationOriginRejection(reason) {
|
|
|
62
62
|
}
|
|
63
63
|
}
|
|
64
64
|
|
|
65
|
-
// src/api/route-schema.ts
|
|
66
|
-
async function parseRouteSchema(schema, value) {
|
|
67
|
-
if (schema.parseAsync) return schema.parseAsync(value);
|
|
68
|
-
if (schema["~standard"]) {
|
|
69
|
-
const result = await schema["~standard"].validate(value);
|
|
70
|
-
if (result.issues)
|
|
71
|
-
throw Object.assign(new Error("Validation failed"), { issues: result.issues });
|
|
72
|
-
return result.value;
|
|
73
|
-
}
|
|
74
|
-
if (schema.parse) return schema.parse(value);
|
|
75
|
-
throw new TypeError("Route validators must implement Standard Schema or parse().");
|
|
76
|
-
}
|
|
77
|
-
var PUBLIC_MESSAGE_CODES = /* @__PURE__ */ new Set(["custom", "invalid_type"]);
|
|
78
|
-
function toPublicValidationIssues(error) {
|
|
79
|
-
const issues = error?.issues;
|
|
80
|
-
const list = Array.isArray(issues) ? issues : Array.isArray(error?.errors) ? error.errors : [];
|
|
81
|
-
return list.map((issue) => {
|
|
82
|
-
const { path, code, message } = issue ?? {};
|
|
83
|
-
return {
|
|
84
|
-
path: Array.isArray(path) ? path.map(toPublicPathSegment) : [],
|
|
85
|
-
...typeof code === "string" ? { code } : {},
|
|
86
|
-
message: PUBLIC_MESSAGE_CODES.has(code) && typeof message === "string" && message ? message : "Invalid value"
|
|
87
|
-
};
|
|
88
|
-
});
|
|
89
|
-
}
|
|
90
|
-
function toPublicPathSegment(segment) {
|
|
91
|
-
const key = segment && typeof segment === "object" && "key" in segment ? segment.key : segment;
|
|
92
|
-
if (typeof key === "number") return key;
|
|
93
|
-
if (typeof key === "symbol") return key.description || key.toString();
|
|
94
|
-
return String(key);
|
|
95
|
-
}
|
|
96
|
-
|
|
97
65
|
export {
|
|
98
66
|
resolveIntegrationAllowedOrigins,
|
|
99
67
|
validateIntegrationRequestOrigin,
|
|
100
68
|
rejectCrossSiteNonJSONBody,
|
|
101
|
-
describeIntegrationOriginRejection
|
|
102
|
-
parseRouteSchema,
|
|
103
|
-
toPublicValidationIssues
|
|
69
|
+
describeIntegrationOriginRejection
|
|
104
70
|
};
|