@farm.js/core 0.1.36 → 0.1.38
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-BVExL8rZ.d.mts → agent-mcp-BwKlpnc7.d.mts} +1 -1
- package/dist/{agent-mcp-luzfXK-P.d.ts → agent-mcp-De1imoMS.d.ts} +1 -1
- package/dist/{agent-mcp-handler-SJAHFSPI.cjs → agent-mcp-handler-MRGP3WJ3.cjs} +5 -5
- package/dist/{agent-mcp-handler-LPJ2CADR.mjs → agent-mcp-handler-OLRMZONF.mjs} +4 -4
- package/dist/agent-runtime.cjs +3 -3
- package/dist/agent-runtime.d.mts +1 -1
- package/dist/agent-runtime.d.ts +1 -1
- package/dist/agent-runtime.mjs +2 -2
- package/dist/api/client.cjs +3 -3
- package/dist/api/client.mjs +2 -2
- package/dist/api/route-manager.cjs +6 -6
- package/dist/api/route-manager.d.mts +3 -3
- package/dist/api/route-manager.d.ts +3 -3
- package/dist/api/route-manager.mjs +5 -5
- package/dist/api/runtime.cjs +4 -4
- package/dist/api/runtime.d.mts +2 -2
- package/dist/api/runtime.d.ts +2 -2
- package/dist/api/runtime.mjs +3 -3
- package/dist/api.cjs +9 -8
- package/dist/api.d.mts +3 -3
- package/dist/api.d.ts +3 -3
- package/dist/api.mjs +8 -7
- package/dist/{app-BukwkFIu.d.mts → app-CFZt-srr.d.mts} +21 -3
- package/dist/{app-Yfa2dsFy.d.ts → app-kT_QXTdx.d.ts} +21 -3
- package/dist/app-markdown.cjs +6 -4
- package/dist/app-markdown.d.mts +3 -3
- package/dist/app-markdown.d.ts +3 -3
- package/dist/app-markdown.mjs +5 -3
- package/dist/{chunk-ADEA7PN3.cjs → chunk-2DD4JMQC.cjs} +113 -22
- package/dist/chunk-2ZYGC6SS.cjs +576 -0
- package/dist/{chunk-JZVADIOD.cjs → chunk-34UCJRQO.cjs} +2 -2
- package/dist/{chunk-D2BB47NB.cjs → chunk-3LOLJTFV.cjs} +6 -6
- package/dist/{chunk-KXWRO25S.cjs → chunk-472NCAZ7.cjs} +3 -3
- package/dist/chunk-4E5QXOCL.cjs +109 -0
- package/dist/{chunk-Z2HLU4IX.cjs → chunk-4GWRFP22.cjs} +23 -2
- package/dist/{chunk-VQLJWDVW.cjs → chunk-4IE345DM.cjs} +37 -19
- package/dist/{chunk-O6WAEAX3.mjs → chunk-5BWWFHR2.mjs} +70 -15
- package/dist/{chunk-JNUWCDTF.cjs → chunk-5D2JIPLH.cjs} +2 -2
- package/dist/{chunk-BO36SELV.cjs → chunk-5OKBARDN.cjs} +2 -2
- package/dist/{chunk-AO6RYU5N.cjs → chunk-5PWXMJOH.cjs} +30 -22
- package/dist/{chunk-AHGECQEW.mjs → chunk-666CKENS.mjs} +1 -1
- package/dist/chunk-6BK3K2GB.mjs +318 -0
- package/dist/{chunk-O6I6VWKK.mjs → chunk-6HB6V3R7.mjs} +1 -1
- package/dist/{chunk-UXFQ3UDA.cjs → chunk-6XWDE2P2.cjs} +61 -4
- package/dist/{chunk-VILIPRS6.mjs → chunk-7FPTZLKH.mjs} +1 -1
- package/dist/{chunk-SC2WYWPF.mjs → chunk-7PEP3BUT.mjs} +3 -3
- package/dist/{chunk-4E5AEDKY.mjs → chunk-A3EAIURZ.mjs} +25 -7
- package/dist/{chunk-YDQZGSDS.mjs → chunk-ARC7I3O2.mjs} +1 -1
- package/dist/{chunk-LSZAVSGY.mjs → chunk-B6G5CKMC.mjs} +101 -10
- package/dist/{chunk-3KZS4SUS.mjs → chunk-BZHXGVMA.mjs} +1 -1
- package/dist/{chunk-KN7K4VQN.mjs → chunk-CNNOLE4O.mjs} +1 -1
- package/dist/{chunk-4GLOOWKE.mjs → chunk-CQMVIOYP.mjs} +1 -1
- package/dist/{chunk-2ELDTQRN.mjs → chunk-CUM5NYL5.mjs} +1 -1
- package/dist/{chunk-HITLGIAO.cjs → chunk-CY2ZQ5C6.cjs} +7 -6
- package/dist/{chunk-PZNL3WEG.mjs → chunk-DMEPTZTI.mjs} +22 -11
- package/dist/{chunk-QORUJDIV.mjs → chunk-DRLKAXDM.mjs} +2 -2
- package/dist/{chunk-DQQOKWYA.cjs → chunk-EIPC3FDA.cjs} +12 -4
- package/dist/{chunk-HOXTWRGB.mjs → chunk-EKF7KDFD.mjs} +5 -2
- package/dist/{chunk-42NHY7HW.cjs → chunk-EKN7NSZO.cjs} +62 -14
- package/dist/{chunk-YKX5BK66.cjs → chunk-EMO6K4YY.cjs} +7 -7
- package/dist/{chunk-6SJ2KJTA.mjs → chunk-EPYU2EBL.mjs} +1 -1
- package/dist/{chunk-D227TIEN.cjs → chunk-FWE7LEQC.cjs} +13 -13
- package/dist/{chunk-PTZ2TVNE.cjs → chunk-H5CLOUZS.cjs} +5 -5
- package/dist/{chunk-DTSROJ5J.mjs → chunk-HD5CF3OE.mjs} +1 -1
- package/dist/{chunk-35GKZR22.mjs → chunk-HXRYZWTA.mjs} +1 -1
- package/dist/{chunk-JG6DJF5A.mjs → chunk-HZFM2LWQ.mjs} +22 -1
- package/dist/{chunk-MKYBIIAQ.mjs → chunk-IBUQWVYA.mjs} +17 -1
- package/dist/{chunk-F2SE2VDO.mjs → chunk-IHQIOZLC.mjs} +1 -1
- package/dist/{chunk-W7LF2J2S.mjs → chunk-INL3THCU.mjs} +1 -1
- package/dist/{chunk-WZ77PUAM.mjs → chunk-IVLZZZEI.mjs} +1 -1
- package/dist/{chunk-ENLZ4R3Y.mjs → chunk-J7K2NZD6.mjs} +7 -6
- package/dist/{chunk-BPOF5U4N.mjs → chunk-JCKYH4LG.mjs} +10 -7
- package/dist/{chunk-77GNHH2Z.cjs → chunk-JCYYXBAJ.cjs} +3 -3
- package/dist/{chunk-C4SPBWFM.cjs → chunk-JEZO6VUR.cjs} +10 -1
- package/dist/{chunk-ZWM5KGAA.cjs → chunk-KCQBAKIY.cjs} +23 -20
- package/dist/{chunk-OTC5BDGO.mjs → chunk-KHKLMNI5.mjs} +12 -7
- package/dist/{chunk-DZ5ZVB2K.cjs → chunk-KKSTAEMY.cjs} +1 -1
- package/dist/{chunk-N2NAS2AM.cjs → chunk-L4DD7ODZ.cjs} +2 -2
- package/dist/{chunk-YSCV4SJF.cjs → chunk-L5H2GSUC.cjs} +4 -4
- package/dist/{chunk-OO7GXVSR.mjs → chunk-LI2F57NI.mjs} +1 -1
- package/dist/{chunk-NRSN7G7E.mjs → chunk-MLY2RP5R.mjs} +10 -2
- package/dist/{chunk-BPMATOP2.cjs → chunk-N32CC42M.cjs} +25 -20
- package/dist/{chunk-FNO7A7CM.cjs → chunk-NBBEQLOK.cjs} +34 -16
- package/dist/{chunk-XCMCS4DA.mjs → chunk-ND2CWPOD.mjs} +2 -2
- package/dist/{chunk-GQRWBCWK.mjs → chunk-OAHTRMIC.mjs} +13 -5
- package/dist/{chunk-35WV46VL.mjs → chunk-OCIEZME4.mjs} +876 -685
- package/dist/{chunk-UH6QN5NL.mjs → chunk-P664ZVTV.mjs} +2 -2
- package/dist/{chunk-TE2G5ION.cjs → chunk-PGZDEPTM.cjs} +88 -33
- package/dist/{chunk-FDR64H6B.mjs → chunk-POSPE3IO.mjs} +59 -2
- package/dist/{chunk-UVW64BCB.cjs → chunk-Q3NXS4MU.cjs} +16 -14
- package/dist/{chunk-4WCZJQUO.mjs → chunk-QFW2IH5E.mjs} +57 -9
- package/dist/{chunk-5SJWVY6R.mjs → chunk-QHSH7IH4.mjs} +9 -0
- package/dist/chunk-QRKIMN7T.mjs +48 -0
- package/dist/chunk-QTXBII4Z.cjs +632 -0
- package/dist/{chunk-CI6E3UOH.cjs → chunk-RG4A6LB2.cjs} +7 -7
- package/dist/{chunk-BJPBQNIE.cjs → chunk-RW63BOV7.cjs} +2 -2
- package/dist/{chunk-FO427P6I.cjs → chunk-RWFLWR5J.cjs} +10 -10
- package/dist/{chunk-FFFW3OQ7.cjs → chunk-S6FJO323.cjs} +2 -2
- package/dist/{chunk-EUV4YR3V.cjs → chunk-SGBJ247Q.cjs} +18 -2
- package/dist/chunk-SGBZPZUW.mjs +75 -0
- package/dist/{chunk-2NNMOPDN.mjs → chunk-SKVTP5PR.mjs} +4 -1
- package/dist/{chunk-2YTDKNH3.cjs → chunk-TGFQVLLF.cjs} +956 -765
- package/dist/{chunk-IHNIDL6H.cjs → chunk-TO4GJ56K.cjs} +22 -11
- package/dist/{chunk-276VJSM6.mjs → chunk-TUBTR2OP.mjs} +250 -118
- package/dist/{chunk-GQ3Z3IZI.cjs → chunk-TYJALEHQ.cjs} +18 -18
- package/dist/chunk-TYMMBFN2.mjs +109 -0
- package/dist/chunk-U6QLDL3G.mjs +576 -0
- package/dist/{chunk-U4KT7QP3.cjs → chunk-ULASELLA.cjs} +26 -1
- package/dist/chunk-UXHS27O6.cjs +75 -0
- package/dist/{chunk-WWIKMBRN.mjs → chunk-VNGH5MLF.mjs} +17 -1
- package/dist/{chunk-EZDQRNQ7.mjs → chunk-VT4WFRHA.mjs} +23 -5
- package/dist/{chunk-CBJJH36A.cjs → chunk-VU6AAZVY.cjs} +20 -4
- package/dist/{chunk-27ZWSI3W.cjs → chunk-VXEEATVD.cjs} +2 -2
- package/dist/{chunk-EWET4D2Y.mjs → chunk-W36M2BQ4.mjs} +3 -3
- package/dist/{chunk-4WQ6PGSJ.cjs → chunk-WEW2JVA4.cjs} +4 -4
- package/dist/{chunk-4E5WBPEG.mjs → chunk-WFRT7JPX.mjs} +8 -533
- package/dist/{chunk-T4OGRVNS.mjs → chunk-WLL43JMO.mjs} +2 -2
- package/dist/chunk-WW46B6HA.cjs +318 -0
- package/dist/{chunk-TKSCR644.cjs → chunk-WXJLNP33.cjs} +2 -2
- package/dist/{chunk-S6VYG6XU.cjs → chunk-XKG2BLFN.cjs} +2 -2
- package/dist/{chunk-4NU4GGTC.cjs → chunk-XKVVMZP5.cjs} +6 -3
- package/dist/{chunk-NMHWYWDR.cjs → chunk-YR2VBEMO.cjs} +658 -526
- package/dist/{chunk-OHLSEQ57.mjs → chunk-ZJD2PN6Z.mjs} +10 -8
- package/dist/{chunk-3BU22U3M.cjs → chunk-ZXH4TS3F.cjs} +5 -2
- package/dist/{client-plugins-r1mOtSC1.d.ts → client-plugins-BvlNhGEB.d.ts} +54 -7
- package/dist/{client-plugins-C3mK9Pol.d.mts → client-plugins-DUrIYX9B.d.mts} +54 -7
- package/dist/client-plugins.d.mts +1 -1
- package/dist/client-plugins.d.ts +1 -1
- package/dist/client.cjs +8 -8
- package/dist/client.d.mts +5 -5
- package/dist/client.d.ts +5 -5
- package/dist/client.mjs +7 -7
- package/dist/config.d.mts +1 -1
- package/dist/config.d.ts +1 -1
- package/dist/{devtools-ERIKFEXX.mjs → devtools-JYJNOLPQ.mjs} +8 -6
- package/dist/{devtools-JZJJY5CK.cjs → devtools-VQWJANJV.cjs} +9 -7
- package/dist/docs.cjs +12 -10
- package/dist/docs.d.mts +20 -2
- package/dist/docs.d.ts +20 -2
- package/dist/docs.mjs +11 -9
- package/dist/headers.cjs +6 -4
- package/dist/headers.d.mts +11 -1
- package/dist/headers.d.ts +11 -1
- package/dist/headers.mjs +5 -3
- package/dist/i18n/client.cjs +11 -11
- package/dist/i18n/client.mjs +3 -3
- package/dist/index.cjs +62 -46
- package/dist/index.d.mts +16 -16
- package/dist/index.d.ts +16 -16
- package/dist/index.mjs +62 -46
- package/dist/integrations.cjs +5 -3
- package/dist/integrations.d.mts +1 -1
- package/dist/integrations.d.ts +1 -1
- package/dist/integrations.mjs +4 -2
- package/dist/internal/app-markdown-runtime.cjs +5 -3
- package/dist/internal/app-markdown-runtime.d.mts +19 -5
- package/dist/internal/app-markdown-runtime.d.ts +19 -5
- package/dist/internal/app-markdown-runtime.mjs +4 -2
- package/dist/internal/build-runtime.cjs +33 -30
- package/dist/internal/build-runtime.d.mts +3 -3
- package/dist/internal/build-runtime.d.ts +3 -3
- package/dist/internal/build-runtime.mjs +32 -29
- package/dist/internal/cli-runtime.cjs +14 -12
- package/dist/internal/cli-runtime.mjs +13 -11
- package/dist/internal/client-error-overlay.cjs +4 -4
- package/dist/internal/client-error-overlay.mjs +1 -1
- package/dist/internal/client-runtime.cjs +2 -2
- package/dist/internal/client-runtime.mjs +1 -1
- 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 -7
- package/dist/internal/config-runtime.d.mts +2 -2
- package/dist/internal/config-runtime.d.ts +2 -2
- package/dist/internal/config-runtime.mjs +8 -6
- package/dist/internal/docs-precompiled-runtime.cjs +19 -13
- package/dist/internal/docs-precompiled-runtime.d.mts +5 -0
- package/dist/internal/docs-precompiled-runtime.d.ts +5 -0
- package/dist/internal/docs-precompiled-runtime.mjs +14 -8
- package/dist/internal/infra-analytics-runtime.cjs +5 -5
- package/dist/internal/infra-analytics-runtime.mjs +3 -3
- package/dist/internal/product-telemetry-runtime.cjs +2 -2
- package/dist/internal/product-telemetry-runtime.mjs +1 -1
- package/dist/internal/production-node-env.cjs +6 -2
- package/dist/internal/production-node-env.d.mts +10 -1
- package/dist/internal/production-node-env.d.ts +10 -1
- package/dist/internal/production-node-env.mjs +5 -1
- package/dist/internal/production-runtime.cjs +39 -54
- package/dist/internal/production-runtime.d.mts +51 -11
- package/dist/internal/production-runtime.d.ts +51 -11
- package/dist/internal/production-runtime.mjs +39 -54
- package/dist/markdown.cjs +8 -2
- package/dist/markdown.d.mts +1 -1
- package/dist/markdown.d.ts +1 -1
- package/dist/markdown.mjs +7 -1
- package/dist/middleware.cjs +10 -8
- package/dist/middleware.d.mts +27 -5
- package/dist/middleware.d.ts +27 -5
- package/dist/middleware.mjs +10 -8
- package/dist/navigation.cjs +7 -7
- package/dist/navigation.d.mts +4 -4
- package/dist/navigation.d.ts +4 -4
- package/dist/navigation.mjs +6 -6
- package/dist/plugin.cjs +25 -23
- package/dist/plugin.d.mts +1 -1
- package/dist/plugin.d.ts +1 -1
- package/dist/plugin.mjs +24 -22
- package/dist/{production-runtime-CCeVZXst.d.mts → production-runtime-BQ4_WLwQ.d.mts} +1 -1
- package/dist/{production-runtime-DPnsggY3.d.ts → production-runtime-D2aMyzjr.d.ts} +1 -1
- package/dist/query/client.cjs +9 -9
- package/dist/query/client.mjs +4 -4
- package/dist/{render-plan-Cw4f5E_R.d.ts → render-plan-25p4hrj4.d.ts} +1 -1
- package/dist/{render-plan-BuGaPFe6.d.mts → render-plan-DtkXMN8D.d.mts} +1 -1
- package/dist/renderer-client.cjs +12 -12
- package/dist/renderer-client.d.mts +3 -3
- package/dist/renderer-client.d.ts +3 -3
- package/dist/renderer-client.mjs +4 -4
- package/dist/renderer.d.mts +13 -4
- package/dist/renderer.d.ts +13 -4
- package/dist/{request-CsGARcAw.d.mts → request-DgCkIdcn.d.mts} +4 -2
- package/dist/{request-Bkg-hERy.d.ts → request-jF4jwx8f.d.ts} +4 -2
- package/dist/request.cjs +3 -3
- package/dist/request.d.mts +2 -2
- package/dist/request.d.ts +2 -2
- package/dist/request.mjs +2 -2
- package/dist/{route-rendering-BUZMH_64.d.ts → route-rendering-Bji6S6a_.d.ts} +1 -1
- package/dist/{route-rendering-f11yh5dp.d.mts → route-rendering-CSBF78Ya.d.mts} +1 -1
- package/dist/{router-Cp6yRE8A.d.mts → router-B09Ui3Qm.d.mts} +1 -1
- package/dist/{router-B8CR9GbD.d.ts → router-CPB9cXtG.d.ts} +1 -1
- package/dist/routes.cjs +2 -2
- package/dist/routes.d.mts +1 -1
- package/dist/routes.d.ts +1 -1
- package/dist/routes.mjs +1 -1
- package/dist/{runtime-CAEv36S_.d.mts → runtime-CM6E6yuI.d.mts} +1 -1
- package/dist/{runtime-CQVsT330.d.ts → runtime-EDMwLdjv.d.ts} +1 -1
- package/dist/server-fn.cjs +3 -3
- package/dist/server-fn.mjs +2 -2
- package/dist/server-plugins.cjs +5 -5
- package/dist/server-plugins.d.mts +2 -2
- package/dist/server-plugins.d.ts +2 -2
- package/dist/server-plugins.mjs +4 -4
- package/dist/server-query.cjs +4 -4
- package/dist/server-query.mjs +3 -3
- package/dist/server.cjs +51 -49
- package/dist/server.d.mts +7 -7
- package/dist/server.d.ts +7 -7
- package/dist/server.mjs +29 -27
- package/dist/{spa-router-BuciWGCZ.d.ts → spa-router-B_N8XgVu.d.ts} +2 -2
- package/dist/{spa-router-DwbqGkGj.d.mts → spa-router-Cgimzfbi.d.mts} +2 -2
- package/dist/testing.cjs +8 -8
- package/dist/testing.d.mts +1 -1
- package/dist/testing.d.ts +1 -1
- package/dist/testing.mjs +6 -6
- package/dist/theme/server.cjs +4 -4
- package/dist/theme/server.mjs +3 -3
- package/dist/{utils-CaoWKtYM.d.ts → utils-BNxAKAuT.d.ts} +1 -1
- package/dist/{utils-B9V0S_yL.d.mts → utils-DZciYXYl.d.mts} +1 -1
- package/dist/version.cjs +2 -2
- package/dist/version.mjs +1 -1
- package/dist/vite.cjs +25 -23
- package/dist/vite.d.mts +1 -1
- package/dist/vite.d.ts +1 -1
- package/dist/vite.mjs +24 -22
- package/package.json +1 -1
- package/types/middleware.d.ts +5 -1
- package/dist/chunk-655RLQQL.mjs +0 -43
- package/dist/chunk-FXEF4PPL.mjs +0 -47
- package/dist/chunk-IZY3V5XW.mjs +0 -23
- package/dist/chunk-MRMI32SN.cjs +0 -1157
- package/dist/chunk-MT763TDW.cjs +0 -43
- package/dist/chunk-XD32KALF.cjs +0 -47
- /package/dist/{chunk-SJNMVDDF.cjs → chunk-FUCSUGDM.cjs} +0 -0
- /package/dist/{chunk-UDNPLXW7.mjs → chunk-MYIZXDZA.mjs} +0 -0
|
@@ -1,24 +1,24 @@
|
|
|
1
1
|
export { _runWithAfterRequest } from '../after.mjs';
|
|
2
|
-
import { aJ as FarmMCPCatalogDetails,
|
|
3
|
-
export {
|
|
4
|
-
export { m as mergeRouteRenderingDirectiveConfig } from '../route-rendering-
|
|
2
|
+
import { aJ as FarmMCPCatalogDetails, cx as ResolvedFarmConfig, dO as FarmIntegrationsUserConfig, fR as APIRequestRuntime, bT as ResolvedFarmMCPConfig, aE as FarmMCPServerRegistration, fS as FarmLlmsTxtLink, I as FarmConfig, _ as FarmContextFactoryInput } from '../client-plugins-DUrIYX9B.mjs';
|
|
3
|
+
export { g0 as FarmLlmsTxtUserConfig, g1 as ResolvedFarmLlmsTxtConfig, g6 as applyFarmCspNonceToResponse, fW as collectFarmLlmsTxtPages, fU as createFarmAgentRobots, g7 as createFarmCspNonce, fX as createFarmDefaultLlmsTxt, fV as createFarmDefaultSitemap, f_ as createFarmLlmsFullRenderer, fY as createFarmLlmsMarkdownReader, fT as createFarmMetadataRouteResponse, g as getFarmRedirectError, i as isFarmNotFoundError, b as isFarmRedirectError, g2 as manageFarmDocumentPreloads, g3 as manageFarmHtmlPreloads, g4 as manageFarmLinkHeaderPreloads, aI as registerFarmMCPServer, fZ as renderFarmLlmsFullTxt, g5 as reportFarmPreloadWarnings, f$ as resolveFarmLlmsTxtConfig, g8 as resolveFarmSecurityConfig, g9 as stampFarmCspNonce } from '../client-plugins-DUrIYX9B.mjs';
|
|
4
|
+
export { m as mergeRouteRenderingDirectiveConfig } from '../route-rendering-CSBF78Ya.mjs';
|
|
5
5
|
import { R as ResolvedFarmServerConfig } from '../workflows-jZ4BcdoZ.mjs';
|
|
6
6
|
export { a as FarmServerConfig, y as bufferFarmRequestBody, z as cloneFarmRequestWithContext, A as createFarmNodeRequestAbortSignal, B as createFarmRequestBodyErrorResponse, C as matchesFarmIfNoneMatch, E as readFarmRequestBody, G as readNodeRequestBody, H as resolveFarmServerConfig } from '../workflows-jZ4BcdoZ.mjs';
|
|
7
|
-
export { _ as _getRequestReadCount, a as _runWithCurrentRequest, g as getCurrentRequest, r as resolveFarmWebRequestOrigin } from '../request-
|
|
7
|
+
export { _ as _getRequestReadCount, a as _runWithCurrentRequest, b as _runWithFarmCspNonce, g as getCurrentRequest, r as resolveFarmWebRequestOrigin } from '../request-DgCkIdcn.mjs';
|
|
8
8
|
export { configureFarmCache, createFarmCacheKey, getFarmDataCache, normalizeRevalidatePath } from '../cache.mjs';
|
|
9
9
|
import { k as FarmI18nUserConfig, R as ResolvedFarmI18nConfig } from '../types-CnH8DOqo.mjs';
|
|
10
10
|
export { c as createFarmLocaleCookie, g as getFarmLocaleVaryHeaders } from '../resolver-khasx3fU.mjs';
|
|
11
11
|
import { F as FarmLocalePathConfig } from '../index-BJJfLxJo.mjs';
|
|
12
12
|
export { l as localizeFarmHref, a as localizeFarmPathname, s as stripFarmLocaleFromPathname } from '../index-BJJfLxJo.mjs';
|
|
13
|
-
import { F as FarmDefaultMCPPage } from '../agent-mcp-
|
|
14
|
-
export { a as addMetadataImageReference, b as addMetadataMarkdownAlternate, g as collectFarmDefaultMCPPages, m as mergeMetadata, d as mergeModuleViewport, r as renderMetadataHead, e as renderViewportHead, h as resolveFarmDefaultMCPServer, f as resolveFarmNotFoundMetadata } from '../agent-mcp-
|
|
15
|
-
export { _ as _runWithMiddlewareContext, c as _runWithMiddlewareData, e as applyProductionMiddlewareHeaders, d as createProductionMiddlewareRunner } from '../production-runtime-
|
|
13
|
+
import { F as FarmDefaultMCPPage } from '../agent-mcp-BwKlpnc7.mjs';
|
|
14
|
+
export { a as addMetadataImageReference, b as addMetadataMarkdownAlternate, g as collectFarmDefaultMCPPages, m as mergeMetadata, d as mergeModuleViewport, r as renderMetadataHead, e as renderViewportHead, h as resolveFarmDefaultMCPServer, f as resolveFarmNotFoundMetadata } from '../agent-mcp-BwKlpnc7.mjs';
|
|
15
|
+
export { _ as _runWithMiddlewareContext, c as _runWithMiddlewareData, e as applyProductionMiddlewareHeaders, d as createProductionMiddlewareRunner } from '../production-runtime-BQ4_WLwQ.mjs';
|
|
16
16
|
export { L as configureFarmObservability, P as emitFarmEvent, Q as runWithFarmRequestSpan } from '../observability-CoXunYhS.mjs';
|
|
17
17
|
export { f as createFarmInstrumentationLifecycle, r as resolveFarmInstrumentationRuntime } from '../instrumentation-runtime-CE06JLHZ.mjs';
|
|
18
18
|
export { _setDefaultFarmThemeConfig, getTheme } from '../theme/server.mjs';
|
|
19
19
|
import { c as FarmThemeRuntime, d as FarmThemeConfig, R as ResolvedFarmThemeConfig, a as FarmThemePreference } from '../types-DQnyD3VD.mjs';
|
|
20
20
|
export { d as applyFarmBasePath, r as resolveFarmTrailingSlashRedirect, s as searchParamsToObject, b as setFarmBasePath, a as setFarmTrailingSlashPreference, c as stripFarmBasePath } from '../base-path-BU16ETmo.mjs';
|
|
21
|
-
export { m as matchFarmPageRoute, p as parseRoutePath } from '../utils-
|
|
21
|
+
export { m as matchFarmPageRoute, p as parseRoutePath } from '../utils-DZciYXYl.mjs';
|
|
22
22
|
import 'node:http';
|
|
23
23
|
import '../lifecycle-DK06VuKP.mjs';
|
|
24
24
|
import '../integration-api-0y4FXJpC.mjs';
|
|
@@ -149,6 +149,12 @@ interface FarmAppManifestInput {
|
|
|
149
149
|
version: string;
|
|
150
150
|
path: string;
|
|
151
151
|
} | undefined;
|
|
152
|
+
/**
|
|
153
|
+
* Whether a guard written for a path (middleware, an integration's `protectedRoutes`)
|
|
154
|
+
* covers an MCP server's endpoint. Set by the server at runtime: such a server is listed
|
|
155
|
+
* as requiring authorization, without its tools, resources or prompts, in the public view.
|
|
156
|
+
*/
|
|
157
|
+
guardCoversPath?: (path: string) => boolean;
|
|
152
158
|
}
|
|
153
159
|
type Env = Record<string, string | undefined>;
|
|
154
160
|
/**
|
|
@@ -160,6 +166,37 @@ declare function createFarmAppManifestResponse(request: Request, input: FarmAppM
|
|
|
160
166
|
env?: Env;
|
|
161
167
|
}): Promise<Response>;
|
|
162
168
|
|
|
169
|
+
/**
|
|
170
|
+
* Whether a guard written for this page's path covers it: middleware.ts in the page's
|
|
171
|
+
* folder or a parent below the root, a config middleware matcher, or an integration's
|
|
172
|
+
* middleware matcher (`protectedRoutes`). Public listings (sitemap.xml, llms.txt, the
|
|
173
|
+
* default MCP server) leave such a page out, so its path and title stay unpublished.
|
|
174
|
+
*
|
|
175
|
+
* Guards that cover every path (a root middleware.ts, middleware without a matcher or
|
|
176
|
+
* with a catch-all or function matcher, a plugin's `runtime.before`) name no page, so
|
|
177
|
+
* they hide nothing: the listings would otherwise be empty. Their pages are still read
|
|
178
|
+
* as an anonymous visitor, so a guard there keeps the content itself private.
|
|
179
|
+
*
|
|
180
|
+
* @internal
|
|
181
|
+
*/
|
|
182
|
+
declare function farmPathGuardCoversPage(options: {
|
|
183
|
+
config: {
|
|
184
|
+
middleware?: ResolvedFarmConfig["middleware"];
|
|
185
|
+
integrations?: FarmIntegrationsUserConfig;
|
|
186
|
+
};
|
|
187
|
+
middlewareRoutes: readonly {
|
|
188
|
+
path: string;
|
|
189
|
+
}[];
|
|
190
|
+
}, pathname: string): boolean;
|
|
191
|
+
/**
|
|
192
|
+
* {@link farmPathGuardCoversPage} for an endpoint served under `/api`, such as an
|
|
193
|
+
* `apiMcp()` server: a guard written for either the `/api` route or its public
|
|
194
|
+
* `api.basePath` form covers it.
|
|
195
|
+
*
|
|
196
|
+
* @internal
|
|
197
|
+
*/
|
|
198
|
+
declare function farmPathGuardCoversEndpoint(options: Parameters<typeof farmPathGuardCoversPage>[0], path: string, apiServerBasePath?: string): boolean;
|
|
199
|
+
|
|
163
200
|
/**
|
|
164
201
|
* Compare a caller-supplied secret against the configured one without leaking
|
|
165
202
|
* how much of it matched.
|
|
@@ -244,9 +281,12 @@ declare function resolveFarmPreviewDeployment(env: FarmDeploymentEnv | undefined
|
|
|
244
281
|
declare function applyFarmPreviewRobotsTag(response: Response): Response;
|
|
245
282
|
|
|
246
283
|
/** Empty when the target is not an http(s) URL; the page then stays as rendered. */
|
|
247
|
-
declare function createLateRedirectRecovery(url: string): string;
|
|
284
|
+
declare function createLateRedirectRecovery(url: string, nonce?: string): string;
|
|
248
285
|
/** `content` is the rendered not-found markup (the app's not-found page or the built-in one). */
|
|
249
|
-
declare function createLateNotFoundRecovery(content: string): string;
|
|
286
|
+
declare function createLateNotFoundRecovery(content: string, nonce?: string): string;
|
|
287
|
+
|
|
288
|
+
/** The CSP nonce of the response being rendered, when `security.csp.nonce` is on. */
|
|
289
|
+
declare function _resolveCurrentCspNonce(): string | undefined;
|
|
250
290
|
|
|
251
291
|
/** Bind the owning app's live route dispatcher, never a process-wide route table. */
|
|
252
292
|
declare function _runWithAPIRequestRuntime<T>(runtime: APIRequestRuntime, run: () => T): T;
|
|
@@ -464,4 +504,4 @@ declare function appendFarmRedirectQuery(destination: string, search: string): s
|
|
|
464
504
|
|
|
465
505
|
declare function appendFarmLinkHeader(headers: Headers, value: string): void;
|
|
466
506
|
|
|
467
|
-
export { _isFarmOwnedResponse, _markFarmOwnedResponse, _runWithAPIRequestRuntime, _withFarmResponseHeaders, appendFarmLinkHeader, appendFarmRedirectQuery, applyFarmPreviewRobotsTag, applyFarmThemeDocument, compareRouteSpecificity, createDefaultErrorMarkup, createFarmAiCatalogResponse, createFarmApiCatalogResponse, createFarmAppManifestResponse, createFarmLayoutSelector, createFarmLegacyRequest, createFarmProductionLifecycle, createFarmThemeDocumentParts, createLateNotFoundRecovery, createLateRedirectRecovery, ensureFarmDocumentMeta, farmSecretsMatch, generateNativeMCPPluginSource, getDefaultErrorStatusText, getRoutePatternSpecificity, handleFarmDefaultMCPRequest, isInRouteGroupScope as isInFarmRouteGroupScope, listFarmMCPLlmsTxtLinks, renderFarmLegacyErrorHtml, renderFarmLegacyHtml, renderFarmLocaleAlternateLinks, resolveDefaultErrorStatus, resolveFarmI18nConfig, resolveFarmPreviewDeployment, resolveFarmRouteContext, serializeFarmInlineValue, withFarmRouteContext };
|
|
507
|
+
export { _isFarmOwnedResponse, _markFarmOwnedResponse, _resolveCurrentCspNonce, _runWithAPIRequestRuntime, _withFarmResponseHeaders, appendFarmLinkHeader, appendFarmRedirectQuery, applyFarmPreviewRobotsTag, applyFarmThemeDocument, compareRouteSpecificity, createDefaultErrorMarkup, createFarmAiCatalogResponse, createFarmApiCatalogResponse, createFarmAppManifestResponse, createFarmLayoutSelector, createFarmLegacyRequest, createFarmProductionLifecycle, createFarmThemeDocumentParts, createLateNotFoundRecovery, createLateRedirectRecovery, ensureFarmDocumentMeta, farmPathGuardCoversEndpoint, farmSecretsMatch, generateNativeMCPPluginSource, getDefaultErrorStatusText, getRoutePatternSpecificity, handleFarmDefaultMCPRequest, isInRouteGroupScope as isInFarmRouteGroupScope, listFarmMCPLlmsTxtLinks, renderFarmLegacyErrorHtml, renderFarmLegacyHtml, renderFarmLocaleAlternateLinks, resolveDefaultErrorStatus, resolveFarmI18nConfig, resolveFarmPreviewDeployment, resolveFarmRouteContext, serializeFarmInlineValue, withFarmRouteContext };
|
|
@@ -1,24 +1,24 @@
|
|
|
1
1
|
export { _runWithAfterRequest } from '../after.js';
|
|
2
|
-
import { aJ as FarmMCPCatalogDetails,
|
|
3
|
-
export {
|
|
4
|
-
export { m as mergeRouteRenderingDirectiveConfig } from '../route-rendering-
|
|
2
|
+
import { aJ as FarmMCPCatalogDetails, cx as ResolvedFarmConfig, dO as FarmIntegrationsUserConfig, fR as APIRequestRuntime, bT as ResolvedFarmMCPConfig, aE as FarmMCPServerRegistration, fS as FarmLlmsTxtLink, I as FarmConfig, _ as FarmContextFactoryInput } from '../client-plugins-BvlNhGEB.js';
|
|
3
|
+
export { g0 as FarmLlmsTxtUserConfig, g1 as ResolvedFarmLlmsTxtConfig, g6 as applyFarmCspNonceToResponse, fW as collectFarmLlmsTxtPages, fU as createFarmAgentRobots, g7 as createFarmCspNonce, fX as createFarmDefaultLlmsTxt, fV as createFarmDefaultSitemap, f_ as createFarmLlmsFullRenderer, fY as createFarmLlmsMarkdownReader, fT as createFarmMetadataRouteResponse, g as getFarmRedirectError, i as isFarmNotFoundError, b as isFarmRedirectError, g2 as manageFarmDocumentPreloads, g3 as manageFarmHtmlPreloads, g4 as manageFarmLinkHeaderPreloads, aI as registerFarmMCPServer, fZ as renderFarmLlmsFullTxt, g5 as reportFarmPreloadWarnings, f$ as resolveFarmLlmsTxtConfig, g8 as resolveFarmSecurityConfig, g9 as stampFarmCspNonce } from '../client-plugins-BvlNhGEB.js';
|
|
4
|
+
export { m as mergeRouteRenderingDirectiveConfig } from '../route-rendering-Bji6S6a_.js';
|
|
5
5
|
import { R as ResolvedFarmServerConfig } from '../workflows-jZ4BcdoZ.js';
|
|
6
6
|
export { a as FarmServerConfig, y as bufferFarmRequestBody, z as cloneFarmRequestWithContext, A as createFarmNodeRequestAbortSignal, B as createFarmRequestBodyErrorResponse, C as matchesFarmIfNoneMatch, E as readFarmRequestBody, G as readNodeRequestBody, H as resolveFarmServerConfig } from '../workflows-jZ4BcdoZ.js';
|
|
7
|
-
export { _ as _getRequestReadCount, a as _runWithCurrentRequest, g as getCurrentRequest, r as resolveFarmWebRequestOrigin } from '../request-
|
|
7
|
+
export { _ as _getRequestReadCount, a as _runWithCurrentRequest, b as _runWithFarmCspNonce, g as getCurrentRequest, r as resolveFarmWebRequestOrigin } from '../request-jF4jwx8f.js';
|
|
8
8
|
export { configureFarmCache, createFarmCacheKey, getFarmDataCache, normalizeRevalidatePath } from '../cache.js';
|
|
9
9
|
import { k as FarmI18nUserConfig, R as ResolvedFarmI18nConfig } from '../types-CnH8DOqo.js';
|
|
10
10
|
export { c as createFarmLocaleCookie, g as getFarmLocaleVaryHeaders } from '../resolver-DadfRL6F.js';
|
|
11
11
|
import { F as FarmLocalePathConfig } from '../index-CwoOP-MW.js';
|
|
12
12
|
export { l as localizeFarmHref, a as localizeFarmPathname, s as stripFarmLocaleFromPathname } from '../index-CwoOP-MW.js';
|
|
13
|
-
import { F as FarmDefaultMCPPage } from '../agent-mcp-
|
|
14
|
-
export { a as addMetadataImageReference, b as addMetadataMarkdownAlternate, g as collectFarmDefaultMCPPages, m as mergeMetadata, d as mergeModuleViewport, r as renderMetadataHead, e as renderViewportHead, h as resolveFarmDefaultMCPServer, f as resolveFarmNotFoundMetadata } from '../agent-mcp-
|
|
15
|
-
export { _ as _runWithMiddlewareContext, c as _runWithMiddlewareData, e as applyProductionMiddlewareHeaders, d as createProductionMiddlewareRunner } from '../production-runtime-
|
|
13
|
+
import { F as FarmDefaultMCPPage } from '../agent-mcp-De1imoMS.js';
|
|
14
|
+
export { a as addMetadataImageReference, b as addMetadataMarkdownAlternate, g as collectFarmDefaultMCPPages, m as mergeMetadata, d as mergeModuleViewport, r as renderMetadataHead, e as renderViewportHead, h as resolveFarmDefaultMCPServer, f as resolveFarmNotFoundMetadata } from '../agent-mcp-De1imoMS.js';
|
|
15
|
+
export { _ as _runWithMiddlewareContext, c as _runWithMiddlewareData, e as applyProductionMiddlewareHeaders, d as createProductionMiddlewareRunner } from '../production-runtime-D2aMyzjr.js';
|
|
16
16
|
export { L as configureFarmObservability, P as emitFarmEvent, Q as runWithFarmRequestSpan } from '../observability-CoXunYhS.js';
|
|
17
17
|
export { f as createFarmInstrumentationLifecycle, r as resolveFarmInstrumentationRuntime } from '../instrumentation-runtime-CE06JLHZ.js';
|
|
18
18
|
export { _setDefaultFarmThemeConfig, getTheme } from '../theme/server.js';
|
|
19
19
|
import { c as FarmThemeRuntime, d as FarmThemeConfig, R as ResolvedFarmThemeConfig, a as FarmThemePreference } from '../types-DQnyD3VD.js';
|
|
20
20
|
export { d as applyFarmBasePath, r as resolveFarmTrailingSlashRedirect, s as searchParamsToObject, b as setFarmBasePath, a as setFarmTrailingSlashPreference, c as stripFarmBasePath } from '../base-path-BU16ETmo.js';
|
|
21
|
-
export { m as matchFarmPageRoute, p as parseRoutePath } from '../utils-
|
|
21
|
+
export { m as matchFarmPageRoute, p as parseRoutePath } from '../utils-BNxAKAuT.js';
|
|
22
22
|
import 'node:http';
|
|
23
23
|
import '../lifecycle-DK06VuKP.js';
|
|
24
24
|
import '../integration-api-BPJo5oXb.js';
|
|
@@ -149,6 +149,12 @@ interface FarmAppManifestInput {
|
|
|
149
149
|
version: string;
|
|
150
150
|
path: string;
|
|
151
151
|
} | undefined;
|
|
152
|
+
/**
|
|
153
|
+
* Whether a guard written for a path (middleware, an integration's `protectedRoutes`)
|
|
154
|
+
* covers an MCP server's endpoint. Set by the server at runtime: such a server is listed
|
|
155
|
+
* as requiring authorization, without its tools, resources or prompts, in the public view.
|
|
156
|
+
*/
|
|
157
|
+
guardCoversPath?: (path: string) => boolean;
|
|
152
158
|
}
|
|
153
159
|
type Env = Record<string, string | undefined>;
|
|
154
160
|
/**
|
|
@@ -160,6 +166,37 @@ declare function createFarmAppManifestResponse(request: Request, input: FarmAppM
|
|
|
160
166
|
env?: Env;
|
|
161
167
|
}): Promise<Response>;
|
|
162
168
|
|
|
169
|
+
/**
|
|
170
|
+
* Whether a guard written for this page's path covers it: middleware.ts in the page's
|
|
171
|
+
* folder or a parent below the root, a config middleware matcher, or an integration's
|
|
172
|
+
* middleware matcher (`protectedRoutes`). Public listings (sitemap.xml, llms.txt, the
|
|
173
|
+
* default MCP server) leave such a page out, so its path and title stay unpublished.
|
|
174
|
+
*
|
|
175
|
+
* Guards that cover every path (a root middleware.ts, middleware without a matcher or
|
|
176
|
+
* with a catch-all or function matcher, a plugin's `runtime.before`) name no page, so
|
|
177
|
+
* they hide nothing: the listings would otherwise be empty. Their pages are still read
|
|
178
|
+
* as an anonymous visitor, so a guard there keeps the content itself private.
|
|
179
|
+
*
|
|
180
|
+
* @internal
|
|
181
|
+
*/
|
|
182
|
+
declare function farmPathGuardCoversPage(options: {
|
|
183
|
+
config: {
|
|
184
|
+
middleware?: ResolvedFarmConfig["middleware"];
|
|
185
|
+
integrations?: FarmIntegrationsUserConfig;
|
|
186
|
+
};
|
|
187
|
+
middlewareRoutes: readonly {
|
|
188
|
+
path: string;
|
|
189
|
+
}[];
|
|
190
|
+
}, pathname: string): boolean;
|
|
191
|
+
/**
|
|
192
|
+
* {@link farmPathGuardCoversPage} for an endpoint served under `/api`, such as an
|
|
193
|
+
* `apiMcp()` server: a guard written for either the `/api` route or its public
|
|
194
|
+
* `api.basePath` form covers it.
|
|
195
|
+
*
|
|
196
|
+
* @internal
|
|
197
|
+
*/
|
|
198
|
+
declare function farmPathGuardCoversEndpoint(options: Parameters<typeof farmPathGuardCoversPage>[0], path: string, apiServerBasePath?: string): boolean;
|
|
199
|
+
|
|
163
200
|
/**
|
|
164
201
|
* Compare a caller-supplied secret against the configured one without leaking
|
|
165
202
|
* how much of it matched.
|
|
@@ -244,9 +281,12 @@ declare function resolveFarmPreviewDeployment(env: FarmDeploymentEnv | undefined
|
|
|
244
281
|
declare function applyFarmPreviewRobotsTag(response: Response): Response;
|
|
245
282
|
|
|
246
283
|
/** Empty when the target is not an http(s) URL; the page then stays as rendered. */
|
|
247
|
-
declare function createLateRedirectRecovery(url: string): string;
|
|
284
|
+
declare function createLateRedirectRecovery(url: string, nonce?: string): string;
|
|
248
285
|
/** `content` is the rendered not-found markup (the app's not-found page or the built-in one). */
|
|
249
|
-
declare function createLateNotFoundRecovery(content: string): string;
|
|
286
|
+
declare function createLateNotFoundRecovery(content: string, nonce?: string): string;
|
|
287
|
+
|
|
288
|
+
/** The CSP nonce of the response being rendered, when `security.csp.nonce` is on. */
|
|
289
|
+
declare function _resolveCurrentCspNonce(): string | undefined;
|
|
250
290
|
|
|
251
291
|
/** Bind the owning app's live route dispatcher, never a process-wide route table. */
|
|
252
292
|
declare function _runWithAPIRequestRuntime<T>(runtime: APIRequestRuntime, run: () => T): T;
|
|
@@ -464,4 +504,4 @@ declare function appendFarmRedirectQuery(destination: string, search: string): s
|
|
|
464
504
|
|
|
465
505
|
declare function appendFarmLinkHeader(headers: Headers, value: string): void;
|
|
466
506
|
|
|
467
|
-
export { _isFarmOwnedResponse, _markFarmOwnedResponse, _runWithAPIRequestRuntime, _withFarmResponseHeaders, appendFarmLinkHeader, appendFarmRedirectQuery, applyFarmPreviewRobotsTag, applyFarmThemeDocument, compareRouteSpecificity, createDefaultErrorMarkup, createFarmAiCatalogResponse, createFarmApiCatalogResponse, createFarmAppManifestResponse, createFarmLayoutSelector, createFarmLegacyRequest, createFarmProductionLifecycle, createFarmThemeDocumentParts, createLateNotFoundRecovery, createLateRedirectRecovery, ensureFarmDocumentMeta, farmSecretsMatch, generateNativeMCPPluginSource, getDefaultErrorStatusText, getRoutePatternSpecificity, handleFarmDefaultMCPRequest, isInRouteGroupScope as isInFarmRouteGroupScope, listFarmMCPLlmsTxtLinks, renderFarmLegacyErrorHtml, renderFarmLegacyHtml, renderFarmLocaleAlternateLinks, resolveDefaultErrorStatus, resolveFarmI18nConfig, resolveFarmPreviewDeployment, resolveFarmRouteContext, serializeFarmInlineValue, withFarmRouteContext };
|
|
507
|
+
export { _isFarmOwnedResponse, _markFarmOwnedResponse, _resolveCurrentCspNonce, _runWithAPIRequestRuntime, _withFarmResponseHeaders, appendFarmLinkHeader, appendFarmRedirectQuery, applyFarmPreviewRobotsTag, applyFarmThemeDocument, compareRouteSpecificity, createDefaultErrorMarkup, createFarmAiCatalogResponse, createFarmApiCatalogResponse, createFarmAppManifestResponse, createFarmLayoutSelector, createFarmLegacyRequest, createFarmProductionLifecycle, createFarmThemeDocumentParts, createLateNotFoundRecovery, createLateRedirectRecovery, ensureFarmDocumentMeta, farmPathGuardCoversEndpoint, farmSecretsMatch, generateNativeMCPPluginSource, getDefaultErrorStatusText, getRoutePatternSpecificity, handleFarmDefaultMCPRequest, isInRouteGroupScope as isInFarmRouteGroupScope, listFarmMCPLlmsTxtLinks, renderFarmLegacyErrorHtml, renderFarmLegacyHtml, renderFarmLocaleAlternateLinks, resolveDefaultErrorStatus, resolveFarmI18nConfig, resolveFarmPreviewDeployment, resolveFarmRouteContext, serializeFarmInlineValue, withFarmRouteContext };
|
|
@@ -1,23 +1,19 @@
|
|
|
1
1
|
import {
|
|
2
2
|
handleFarmDefaultMCPRequest
|
|
3
|
-
} from "../chunk-
|
|
3
|
+
} from "../chunk-EPYU2EBL.mjs";
|
|
4
4
|
import {
|
|
5
|
+
createFarmLayoutSelector,
|
|
5
6
|
generateNativeMCPPluginSource
|
|
6
|
-
} from "../chunk-
|
|
7
|
+
} from "../chunk-TYMMBFN2.mjs";
|
|
7
8
|
import {
|
|
8
9
|
applyProductionMiddlewareHeaders,
|
|
9
10
|
createProductionMiddlewareRunner
|
|
10
|
-
} from "../chunk-
|
|
11
|
+
} from "../chunk-KHKLMNI5.mjs";
|
|
11
12
|
import {
|
|
12
13
|
createFarmInstrumentationLifecycle,
|
|
13
14
|
resolveFarmInstrumentationRuntime
|
|
14
15
|
} from "../chunk-H77NVNJ2.mjs";
|
|
15
|
-
import
|
|
16
|
-
matchSegmentParts,
|
|
17
|
-
normalizePathname,
|
|
18
|
-
parseRoutePattern,
|
|
19
|
-
splitNormalizedPathname
|
|
20
|
-
} from "../chunk-OT6ZEW74.mjs";
|
|
16
|
+
import "../chunk-OT6ZEW74.mjs";
|
|
21
17
|
import {
|
|
22
18
|
applyFarmThemeDocument,
|
|
23
19
|
createDefaultErrorMarkup,
|
|
@@ -29,17 +25,17 @@ import {
|
|
|
29
25
|
createLateNotFoundRecovery,
|
|
30
26
|
createLateRedirectRecovery,
|
|
31
27
|
ensureFarmDocumentMeta,
|
|
28
|
+
farmPathGuardCoversEndpoint,
|
|
32
29
|
getDefaultErrorStatusText,
|
|
33
|
-
getRouteGroupScope,
|
|
34
30
|
isInRouteGroupScope,
|
|
35
31
|
listFarmMCPLlmsTxtLinks,
|
|
36
32
|
renderFarmLocaleAlternateLinks,
|
|
37
33
|
resolveDefaultErrorStatus
|
|
38
|
-
} from "../chunk-
|
|
34
|
+
} from "../chunk-B6G5CKMC.mjs";
|
|
39
35
|
import {
|
|
40
36
|
collectFarmDefaultMCPPages,
|
|
41
37
|
resolveFarmDefaultMCPServer
|
|
42
|
-
} from "../chunk-
|
|
38
|
+
} from "../chunk-P664ZVTV.mjs";
|
|
43
39
|
import {
|
|
44
40
|
mergeRouteRenderingDirectiveConfig
|
|
45
41
|
} from "../chunk-DAO7JGTS.mjs";
|
|
@@ -50,18 +46,16 @@ import "../chunk-XAXTTBUT.mjs";
|
|
|
50
46
|
import {
|
|
51
47
|
_setDefaultFarmThemeConfig,
|
|
52
48
|
getTheme
|
|
53
|
-
} from "../chunk-
|
|
49
|
+
} from "../chunk-CUM5NYL5.mjs";
|
|
54
50
|
import {
|
|
55
|
-
applyFarmCspNonceToResponse,
|
|
56
51
|
applyFarmPreviewRobotsTag,
|
|
57
52
|
createFarmAgentRobots,
|
|
58
53
|
createFarmDefaultSitemap,
|
|
59
54
|
manageFarmDocumentPreloads,
|
|
60
55
|
manageFarmHtmlPreloads,
|
|
61
56
|
manageFarmLinkHeaderPreloads,
|
|
62
|
-
reportFarmPreloadWarnings
|
|
63
|
-
|
|
64
|
-
} from "../chunk-4E5WBPEG.mjs";
|
|
57
|
+
reportFarmPreloadWarnings
|
|
58
|
+
} from "../chunk-WFRT7JPX.mjs";
|
|
65
59
|
import {
|
|
66
60
|
collectFarmLlmsTxtPages,
|
|
67
61
|
createFarmDefaultLlmsTxt,
|
|
@@ -69,8 +63,14 @@ import {
|
|
|
69
63
|
createFarmLlmsMarkdownReader,
|
|
70
64
|
renderFarmLlmsFullTxt,
|
|
71
65
|
resolveFarmLlmsTxtConfig
|
|
72
|
-
} from "../chunk-
|
|
73
|
-
import
|
|
66
|
+
} from "../chunk-HD5CF3OE.mjs";
|
|
67
|
+
import {
|
|
68
|
+
applyFarmCspNonceToResponse,
|
|
69
|
+
createFarmCspNonce,
|
|
70
|
+
resolveFarmSecurityConfig,
|
|
71
|
+
stampFarmCspNonce
|
|
72
|
+
} from "../chunk-U6QLDL3G.mjs";
|
|
73
|
+
import "../chunk-VNGH5MLF.mjs";
|
|
74
74
|
import "../chunk-MVL2RAJW.mjs";
|
|
75
75
|
import {
|
|
76
76
|
farmSecretsMatch
|
|
@@ -80,11 +80,13 @@ import {
|
|
|
80
80
|
resolveFarmRouteContext,
|
|
81
81
|
withFarmRouteContext
|
|
82
82
|
} from "../chunk-SEJ5N6SL.mjs";
|
|
83
|
+
import "../chunk-IBUQWVYA.mjs";
|
|
84
|
+
import "../chunk-44SYJEG3.mjs";
|
|
83
85
|
import {
|
|
84
86
|
_runWithMiddlewareContext,
|
|
85
87
|
_runWithMiddlewareData
|
|
86
|
-
} from "../chunk-
|
|
87
|
-
import "../chunk-
|
|
88
|
+
} from "../chunk-SKVTP5PR.mjs";
|
|
89
|
+
import "../chunk-HZFM2LWQ.mjs";
|
|
88
90
|
import {
|
|
89
91
|
_runWithAPIRequestRuntime
|
|
90
92
|
} from "../chunk-R3DS7A2T.mjs";
|
|
@@ -100,6 +102,8 @@ import {
|
|
|
100
102
|
getFarmDataCache,
|
|
101
103
|
normalizeRevalidatePath
|
|
102
104
|
} from "../chunk-MSSFIQGM.mjs";
|
|
105
|
+
import "../chunk-FZ6YYU2W.mjs";
|
|
106
|
+
import "../chunk-FP2INE7H.mjs";
|
|
103
107
|
import {
|
|
104
108
|
bufferFarmRequestBody,
|
|
105
109
|
cloneFarmRequestWithContext,
|
|
@@ -125,13 +129,15 @@ import {
|
|
|
125
129
|
emitFarmEvent,
|
|
126
130
|
runWithFarmRequestSpan
|
|
127
131
|
} from "../chunk-FUZEBRP3.mjs";
|
|
132
|
+
import "../chunk-Z2RZJZIZ.mjs";
|
|
128
133
|
import "../chunk-BTHHUD7Q.mjs";
|
|
129
|
-
import "../chunk-
|
|
134
|
+
import "../chunk-LI2F57NI.mjs";
|
|
130
135
|
import {
|
|
131
136
|
resolveFarmTrailingSlashRedirect,
|
|
132
137
|
setFarmTrailingSlashPreference
|
|
133
138
|
} from "../chunk-54UPOYFS.mjs";
|
|
134
139
|
import "../chunk-WNSDDRNU.mjs";
|
|
140
|
+
import "../chunk-JPLUGGRV.mjs";
|
|
135
141
|
import "../chunk-G4MWPDSE.mjs";
|
|
136
142
|
import "../chunk-O7BH5O46.mjs";
|
|
137
143
|
import "../chunk-7LTCDQRS.mjs";
|
|
@@ -158,6 +164,7 @@ import "../chunk-4SIYUGRY.mjs";
|
|
|
158
164
|
import {
|
|
159
165
|
appendFarmRedirectQuery
|
|
160
166
|
} from "../chunk-BRYHOB4X.mjs";
|
|
167
|
+
import "../chunk-SAXPH6G5.mjs";
|
|
161
168
|
import {
|
|
162
169
|
_isFarmOwnedResponse,
|
|
163
170
|
_markFarmOwnedResponse,
|
|
@@ -171,11 +178,14 @@ import {
|
|
|
171
178
|
import {
|
|
172
179
|
_getRequestReadCount,
|
|
173
180
|
_runWithCurrentRequest,
|
|
181
|
+
_runWithFarmCspNonce,
|
|
174
182
|
getCurrentRequest,
|
|
175
183
|
resolveFarmWebRequestOrigin
|
|
176
|
-
} from "../chunk-
|
|
184
|
+
} from "../chunk-POSPE3IO.mjs";
|
|
177
185
|
import "../chunk-CQ6OSQ3K.mjs";
|
|
178
|
-
import
|
|
186
|
+
import {
|
|
187
|
+
_resolveCurrentCspNonce
|
|
188
|
+
} from "../chunk-QRKIMN7T.mjs";
|
|
179
189
|
import {
|
|
180
190
|
localizeFarmHref,
|
|
181
191
|
localizeFarmPathname,
|
|
@@ -194,36 +204,6 @@ import {
|
|
|
194
204
|
__name
|
|
195
205
|
} from "../chunk-LPEX4YW6.mjs";
|
|
196
206
|
|
|
197
|
-
// src/routing/layout-selector.ts
|
|
198
|
-
function createFarmLayoutSelector(layouts, resolveRouteDirectory) {
|
|
199
|
-
const prepared = layouts.map((layout) => {
|
|
200
|
-
const segments = layout.pattern === "/" ? [] : parseRoutePattern(layout.pattern);
|
|
201
|
-
return {
|
|
202
|
-
layout,
|
|
203
|
-
segments: segments.length === 0 ? null : segments,
|
|
204
|
-
groupScope: getRouteGroupScope(layout.pattern)
|
|
205
|
-
};
|
|
206
|
-
});
|
|
207
|
-
return (pathname, routeDirectory) => {
|
|
208
|
-
const applicable = [];
|
|
209
|
-
let parts;
|
|
210
|
-
let directory = routeDirectory;
|
|
211
|
-
for (const { layout, segments, groupScope } of prepared) {
|
|
212
|
-
if (segments !== null) {
|
|
213
|
-
parts ?? (parts = splitNormalizedPathname(normalizePathname(pathname.replace(/\/$/, "") || "/")));
|
|
214
|
-
if (matchSegmentParts(segments, parts, true) === null) continue;
|
|
215
|
-
}
|
|
216
|
-
if (groupScope !== null) {
|
|
217
|
-
if (directory === void 0) directory = resolveRouteDirectory?.(pathname) ?? null;
|
|
218
|
-
if (!isInRouteGroupScope(directory, groupScope)) continue;
|
|
219
|
-
}
|
|
220
|
-
applicable.push(layout);
|
|
221
|
-
}
|
|
222
|
-
return applicable;
|
|
223
|
-
};
|
|
224
|
-
}
|
|
225
|
-
__name(createFarmLayoutSelector, "createFarmLayoutSelector");
|
|
226
|
-
|
|
227
207
|
// src/production-lifecycle.ts
|
|
228
208
|
function createFarmProductionLifecycle(options) {
|
|
229
209
|
let state = "starting";
|
|
@@ -526,9 +506,11 @@ export {
|
|
|
526
506
|
_getRequestReadCount,
|
|
527
507
|
_isFarmOwnedResponse,
|
|
528
508
|
_markFarmOwnedResponse,
|
|
509
|
+
_resolveCurrentCspNonce,
|
|
529
510
|
_runWithAPIRequestRuntime,
|
|
530
511
|
_runWithAfterRequest,
|
|
531
512
|
_runWithCurrentRequest,
|
|
513
|
+
_runWithFarmCspNonce,
|
|
532
514
|
_runWithMiddlewareContext,
|
|
533
515
|
_runWithMiddlewareData,
|
|
534
516
|
_setDefaultFarmThemeConfig,
|
|
@@ -555,6 +537,7 @@ export {
|
|
|
555
537
|
createFarmApiCatalogResponse,
|
|
556
538
|
createFarmAppManifestResponse,
|
|
557
539
|
createFarmCacheKey,
|
|
540
|
+
createFarmCspNonce,
|
|
558
541
|
createFarmDefaultLlmsTxt,
|
|
559
542
|
createFarmDefaultSitemap,
|
|
560
543
|
createFarmInstrumentationLifecycle,
|
|
@@ -573,6 +556,7 @@ export {
|
|
|
573
556
|
createProductionMiddlewareRunner,
|
|
574
557
|
emitFarmEvent,
|
|
575
558
|
ensureFarmDocumentMeta,
|
|
559
|
+
farmPathGuardCoversEndpoint,
|
|
576
560
|
farmSecretsMatch,
|
|
577
561
|
generateNativeMCPPluginSource,
|
|
578
562
|
getCurrentRequest,
|
|
@@ -626,6 +610,7 @@ export {
|
|
|
626
610
|
serializeFarmInlineValue,
|
|
627
611
|
setFarmBasePath,
|
|
628
612
|
setFarmTrailingSlashPreference,
|
|
613
|
+
stampFarmCspNonce,
|
|
629
614
|
stripFarmBasePath,
|
|
630
615
|
stripFarmLocaleFromPathname,
|
|
631
616
|
withFarmRouteContext
|
package/dist/markdown.cjs
CHANGED
|
@@ -14,7 +14,10 @@
|
|
|
14
14
|
|
|
15
15
|
|
|
16
16
|
|
|
17
|
-
|
|
17
|
+
|
|
18
|
+
|
|
19
|
+
|
|
20
|
+
var _chunkSGBJ247Qcjs = require('./chunk-SGBJ247Q.cjs');
|
|
18
21
|
require('./chunk-J63ZH5OQ.cjs');
|
|
19
22
|
require('./chunk-75RZHGLS.cjs');
|
|
20
23
|
require('./chunk-E3UK5IIB.cjs');
|
|
@@ -41,4 +44,7 @@ require('./chunk-S3JO3N4H.cjs');
|
|
|
41
44
|
|
|
42
45
|
|
|
43
46
|
|
|
44
|
-
|
|
47
|
+
|
|
48
|
+
|
|
49
|
+
|
|
50
|
+
exports.FARM_MARKDOWN_CONTENT_TYPE = _chunkSGBJ247Qcjs.FARM_MARKDOWN_CONTENT_TYPE; exports.FARM_MARKDOWN_PAGE_CHECK_HEADER = _chunkSGBJ247Qcjs.FARM_MARKDOWN_PAGE_CHECK_HEADER; exports._getFarmMarkdownPageCheckToken = _chunkSGBJ247Qcjs._getFarmMarkdownPageCheckToken; exports._isFarmMarkdownPageCheck = _chunkSGBJ247Qcjs._isFarmMarkdownPageCheck; exports.applyMarkdownNegotiationHeaders = _chunkSGBJ247Qcjs.applyMarkdownNegotiationHeaders; exports.createFarmMarkdownErrorBody = _chunkSGBJ247Qcjs.createFarmMarkdownErrorBody; exports.createMarkdownMirrorResponse = _chunkSGBJ247Qcjs.createMarkdownMirrorResponse; exports.extractFarmPageActions = _chunkSGBJ247Qcjs.extractFarmPageActions; exports.farmAcceptQuality = _chunkSGBJ247Qcjs.farmAcceptQuality; exports.farmRequestWantsMarkdown = _chunkSGBJ247Qcjs.farmRequestWantsMarkdown; exports.getFarmMarkdownAlternatePath = _chunkSGBJ247Qcjs.getFarmMarkdownAlternatePath; exports.getFarmMarkdownMirrorPath = _chunkSGBJ247Qcjs.getFarmMarkdownMirrorPath; exports.htmlToMarkdown = _chunkSGBJ247Qcjs.htmlToMarkdown; exports.isFarmMarkdownMirrorExposed = _chunkSGBJ247Qcjs.isFarmMarkdownMirrorExposed; exports.matchesFarmMarkdownRoutePattern = _chunkSGBJ247Qcjs.matchesFarmMarkdownRoutePattern; exports.requestAcceptsMarkdown = _chunkSGBJ247Qcjs.requestAcceptsMarkdown; exports.resolveMarkdownConfig = _chunkSGBJ247Qcjs.resolveMarkdownConfig; exports.resolveMarkdownMirrorTarget = _chunkSGBJ247Qcjs.resolveMarkdownMirrorTarget;
|
package/dist/markdown.d.mts
CHANGED
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
export {
|
|
1
|
+
export { fq as ApplyMarkdownNegotiationHeadersOptions, fp as CreateMarkdownMirrorResponseOptions, z as FARM_MARKDOWN_CONTENT_TYPE, fi as FARM_MARKDOWN_PAGE_CHECK_HEADER, fn as FarmMarkdownMirrorTarget, aF as FarmMarkdownResolvedConfig, fm as FarmMarkdownResolvedRoute, fl as FarmMarkdownRouteInput, cI as FarmMarkdownUserConfig, fF as FarmPageFormAction, fD as FarmPageFormField, fC as FarmPageFormOption, fE as FarmPageFormSubmit, fo as ResolveMarkdownMirrorTargetOptions, fj as _getFarmMarkdownPageCheckToken, fk as _isFarmMarkdownPageCheck, fu as applyMarkdownNegotiationHeaders, A as createFarmMarkdownErrorBody, ft as createMarkdownMirrorResponse, fG as extractFarmPageActions, fw as farmAcceptQuality, B as farmRequestWantsMarkdown, fz as getFarmMarkdownAlternatePath, fy as getFarmMarkdownMirrorPath, fv as htmlToMarkdown, fA as isFarmMarkdownMirrorExposed, fB as matchesFarmMarkdownRoutePattern, fx as requestAcceptsMarkdown, fr as resolveMarkdownConfig, fs as resolveMarkdownMirrorTarget } from './client-plugins-DUrIYX9B.mjs';
|
|
2
2
|
import './lifecycle-DK06VuKP.mjs';
|
|
3
3
|
import './integration-api-0y4FXJpC.mjs';
|
|
4
4
|
import './endpoint-CCHFqyTE.mjs';
|
package/dist/markdown.d.ts
CHANGED
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
export {
|
|
1
|
+
export { fq as ApplyMarkdownNegotiationHeadersOptions, fp as CreateMarkdownMirrorResponseOptions, z as FARM_MARKDOWN_CONTENT_TYPE, fi as FARM_MARKDOWN_PAGE_CHECK_HEADER, fn as FarmMarkdownMirrorTarget, aF as FarmMarkdownResolvedConfig, fm as FarmMarkdownResolvedRoute, fl as FarmMarkdownRouteInput, cI as FarmMarkdownUserConfig, fF as FarmPageFormAction, fD as FarmPageFormField, fC as FarmPageFormOption, fE as FarmPageFormSubmit, fo as ResolveMarkdownMirrorTargetOptions, fj as _getFarmMarkdownPageCheckToken, fk as _isFarmMarkdownPageCheck, fu as applyMarkdownNegotiationHeaders, A as createFarmMarkdownErrorBody, ft as createMarkdownMirrorResponse, fG as extractFarmPageActions, fw as farmAcceptQuality, B as farmRequestWantsMarkdown, fz as getFarmMarkdownAlternatePath, fy as getFarmMarkdownMirrorPath, fv as htmlToMarkdown, fA as isFarmMarkdownMirrorExposed, fB as matchesFarmMarkdownRoutePattern, fx as requestAcceptsMarkdown, fr as resolveMarkdownConfig, fs as resolveMarkdownMirrorTarget } from './client-plugins-BvlNhGEB.js';
|
|
2
2
|
import './lifecycle-DK06VuKP.js';
|
|
3
3
|
import './integration-api-BPJo5oXb.js';
|
|
4
4
|
import './endpoint-CA-TNX60.js';
|
package/dist/markdown.mjs
CHANGED
|
@@ -1,5 +1,8 @@
|
|
|
1
1
|
import {
|
|
2
2
|
FARM_MARKDOWN_CONTENT_TYPE,
|
|
3
|
+
FARM_MARKDOWN_PAGE_CHECK_HEADER,
|
|
4
|
+
_getFarmMarkdownPageCheckToken,
|
|
5
|
+
_isFarmMarkdownPageCheck,
|
|
3
6
|
applyMarkdownNegotiationHeaders,
|
|
4
7
|
createFarmMarkdownErrorBody,
|
|
5
8
|
createMarkdownMirrorResponse,
|
|
@@ -14,7 +17,7 @@ import {
|
|
|
14
17
|
requestAcceptsMarkdown,
|
|
15
18
|
resolveMarkdownConfig,
|
|
16
19
|
resolveMarkdownMirrorTarget
|
|
17
|
-
} from "./chunk-
|
|
20
|
+
} from "./chunk-VNGH5MLF.mjs";
|
|
18
21
|
import "./chunk-MVL2RAJW.mjs";
|
|
19
22
|
import "./chunk-ZLAT2CWY.mjs";
|
|
20
23
|
import "./chunk-FUZEBRP3.mjs";
|
|
@@ -27,6 +30,9 @@ import "./chunk-55YI3RRB.mjs";
|
|
|
27
30
|
import "./chunk-LPEX4YW6.mjs";
|
|
28
31
|
export {
|
|
29
32
|
FARM_MARKDOWN_CONTENT_TYPE,
|
|
33
|
+
FARM_MARKDOWN_PAGE_CHECK_HEADER,
|
|
34
|
+
_getFarmMarkdownPageCheckToken,
|
|
35
|
+
_isFarmMarkdownPageCheck,
|
|
30
36
|
applyMarkdownNegotiationHeaders,
|
|
31
37
|
createFarmMarkdownErrorBody,
|
|
32
38
|
createMarkdownMirrorResponse,
|
package/dist/middleware.cjs
CHANGED
|
@@ -7,16 +7,16 @@
|
|
|
7
7
|
|
|
8
8
|
|
|
9
9
|
|
|
10
|
-
var
|
|
10
|
+
var _chunkXKVVMZP5cjs = require('./chunk-XKVVMZP5.cjs');
|
|
11
11
|
|
|
12
12
|
|
|
13
13
|
|
|
14
14
|
|
|
15
|
-
var
|
|
15
|
+
var _chunkN32CC42Mcjs = require('./chunk-N32CC42M.cjs');
|
|
16
16
|
|
|
17
17
|
|
|
18
18
|
|
|
19
|
-
var
|
|
19
|
+
var _chunkKCQBAKIYcjs = require('./chunk-KCQBAKIY.cjs');
|
|
20
20
|
require('./chunk-M7MKQXAF.cjs');
|
|
21
21
|
|
|
22
22
|
|
|
@@ -27,8 +27,8 @@ require('./chunk-M7MKQXAF.cjs');
|
|
|
27
27
|
|
|
28
28
|
|
|
29
29
|
|
|
30
|
-
var
|
|
31
|
-
require('./chunk-
|
|
30
|
+
var _chunkZXH4TS3Fcjs = require('./chunk-ZXH4TS3F.cjs');
|
|
31
|
+
require('./chunk-4GWRFP22.cjs');
|
|
32
32
|
require('./chunk-M2L4MYDQ.cjs');
|
|
33
33
|
require('./chunk-SHLXACIO.cjs');
|
|
34
34
|
require('./chunk-HLJ6MBUZ.cjs');
|
|
@@ -41,11 +41,12 @@ require('./chunk-S3A45T7F.cjs');
|
|
|
41
41
|
require('./chunk-AI7QMY7O.cjs');
|
|
42
42
|
require('./chunk-FJ3M4CUX.cjs');
|
|
43
43
|
require('./chunk-OX6O6WVA.cjs');
|
|
44
|
-
require('./chunk-
|
|
44
|
+
require('./chunk-6XWDE2P2.cjs');
|
|
45
|
+
|
|
45
46
|
|
|
46
47
|
|
|
47
48
|
var _chunkUS2QVW3Ecjs = require('./chunk-US2QVW3E.cjs');
|
|
48
|
-
require('./chunk-
|
|
49
|
+
require('./chunk-ULASELLA.cjs');
|
|
49
50
|
require('./chunk-BIDYX3SL.cjs');
|
|
50
51
|
require('./chunk-I57LW5VZ.cjs');
|
|
51
52
|
require('./chunk-NO3WWW3N.cjs');
|
|
@@ -73,4 +74,5 @@ require('./chunk-S3JO3N4H.cjs');
|
|
|
73
74
|
|
|
74
75
|
|
|
75
76
|
|
|
76
|
-
|
|
77
|
+
|
|
78
|
+
exports.MiddlewareManager = _chunkKCQBAKIYcjs.MiddlewareManager; exports.UnsupportedRateLimitStorageError = _chunkXKVVMZP5cjs.UnsupportedRateLimitStorageError; exports._runWithMiddlewareContext = _chunkZXH4TS3Fcjs._runWithMiddlewareContext; exports._runWithMiddlewareData = _chunkZXH4TS3Fcjs._runWithMiddlewareData; exports.applyProductionMiddlewareHeaders = _chunkN32CC42Mcjs.applyProductionMiddlewareHeaders; exports.canonicalizeRequestPathSegments = _chunkUS2QVW3Ecjs.canonicalizeRequestPathSegments; exports.canonicalizeRequestPathname = _chunkUS2QVW3Ecjs.canonicalizeRequestPathname; exports.createContext = _chunkKCQBAKIYcjs.createContext; exports.createProductionMiddlewareRunner = _chunkN32CC42Mcjs.createProductionMiddlewareRunner; exports.farmMiddlewarePlugin = _chunkXKVVMZP5cjs.farmMiddlewarePlugin; exports.getFromMiddleware = _chunkXKVVMZP5cjs.getFromMiddleware; exports.getMiddlewareContext = _chunkZXH4TS3Fcjs.getMiddlewareContext; exports.getMiddlewareData = _chunkZXH4TS3Fcjs.getMiddlewareData; exports.getMiddlewareValue = _chunkZXH4TS3Fcjs.getMiddlewareValue; exports.getRateLimitStatus = _chunkXKVVMZP5cjs.getRateLimitStatus; exports.hasMiddlewareData = _chunkXKVVMZP5cjs.hasMiddlewareData; exports.matchesMiddlewareConfig = _chunkN32CC42Mcjs.matchesMiddlewareConfig; exports.memoryRateLimitStorage = _chunkXKVVMZP5cjs.memoryRateLimitStorage; exports.middleware = _chunkXKVVMZP5cjs.middleware; exports.parseMiddlewareCookieHeader = _chunkZXH4TS3Fcjs.parseMiddlewareCookieHeader; exports.serializeMiddlewareCookie = _chunkZXH4TS3Fcjs.serializeMiddlewareCookie; exports.serializeMiddlewareCookieDeletion = _chunkZXH4TS3Fcjs.serializeMiddlewareCookieDeletion; exports.unwrapMiddleware = _chunkXKVVMZP5cjs.unwrapMiddleware;
|
package/dist/middleware.d.mts
CHANGED
|
@@ -1,10 +1,10 @@
|
|
|
1
|
-
import {
|
|
2
|
-
export {
|
|
1
|
+
import { eK as MiddlewareChain, eP as RateLimitStorage, eQ as RateLimitStatus, eR as MemoryRateLimitStorageOptions, aC as MiddlewareContext, az as FarmMiddlewareConfig, eG as MiddlewareFunction, aB as MiddlewareConfig, E as MiddlewareProps, eM as CookieOptions } from './client-plugins-DUrIYX9B.mjs';
|
|
2
|
+
export { eL as CookieJar, eT as MiddlewareResult, eJ as MiddlewareStore, eS as NextFunction, eN as RateLimitConfig, eO as RateLimitIncrementResult, ay as ReadonlyMiddlewareStore, eH as RequestMiddleware, eI as RequestMiddlewareContext } from './client-plugins-DUrIYX9B.mjs';
|
|
3
3
|
import { IncomingMessage, ServerResponse } from 'http';
|
|
4
4
|
import { ViteDevServer, Plugin } from 'vite';
|
|
5
5
|
import { a as FarmServerConfig, R as ResolvedFarmServerConfig } from './workflows-jZ4BcdoZ.mjs';
|
|
6
6
|
import { R as ResolvedFarmI18nConfig } from './types-CnH8DOqo.mjs';
|
|
7
|
-
export { _ as _runWithMiddlewareContext, c as _runWithMiddlewareData, e as applyProductionMiddlewareHeaders, d as createProductionMiddlewareRunner, g as getMiddlewareContext, a as getMiddlewareData, b as getMiddlewareValue, m as matchesMiddlewareConfig } from './production-runtime-
|
|
7
|
+
export { _ as _runWithMiddlewareContext, c as _runWithMiddlewareData, e as applyProductionMiddlewareHeaders, d as createProductionMiddlewareRunner, g as getMiddlewareContext, a as getMiddlewareData, b as getMiddlewareValue, m as matchesMiddlewareConfig } from './production-runtime-BQ4_WLwQ.mjs';
|
|
8
8
|
import './lifecycle-DK06VuKP.mjs';
|
|
9
9
|
import './integration-api-0y4FXJpC.mjs';
|
|
10
10
|
import './endpoint-CCHFqyTE.mjs';
|
|
@@ -60,7 +60,9 @@ declare function middleware(basePath?: string): MiddlewareChain;
|
|
|
60
60
|
/**
|
|
61
61
|
* Create a middleware context from request/response
|
|
62
62
|
*/
|
|
63
|
-
declare function createContext(req: IncomingMessage, res: ServerResponse, viteServer?: ViteDevServer, parent?: MiddlewareContext["parent"], server?: FarmServerConfig | ResolvedFarmServerConfig
|
|
63
|
+
declare function createContext(req: IncomingMessage, res: ServerResponse, viteServer?: ViteDevServer, parent?: MiddlewareContext["parent"], server?: FarmServerConfig | ResolvedFarmServerConfig,
|
|
64
|
+
/** Strip basePath/locale the way page routing does, for `ctx.routePathname`. */
|
|
65
|
+
toRoutePathname?: (pathname: string) => string): MiddlewareContext;
|
|
64
66
|
|
|
65
67
|
interface DiscoveredMiddleware {
|
|
66
68
|
path: string;
|
|
@@ -171,6 +173,26 @@ declare function hasMiddlewareData(middleware: MiddlewareProps | undefined): boo
|
|
|
171
173
|
* slash grows a path segment that was not in the request.
|
|
172
174
|
*/
|
|
173
175
|
declare function canonicalizeRequestPathSegments(pathname: string): string[];
|
|
176
|
+
/**
|
|
177
|
+
* The string form of {@link canonicalizeRequestPathSegments}, for matchers that
|
|
178
|
+
* run a regex or a prefix check over the whole pathname instead of walking
|
|
179
|
+
* segments.
|
|
180
|
+
*
|
|
181
|
+
* A decoded `/` is re-encoded as `%2F` so it stays inside its segment for a
|
|
182
|
+
* matcher that treats `/` as a separator, and so a capture that a redirect or
|
|
183
|
+
* rewrite reuses keeps the encoding it arrived with.
|
|
184
|
+
*
|
|
185
|
+
* A run of slashes collapses to one, because every route matcher drops empty
|
|
186
|
+
* segments: `//dashboard` renders `/dashboard`, so a guard comparing `//dashboard`
|
|
187
|
+
* against `/dashboard` let the protected page through. A trailing slash and case
|
|
188
|
+
* are otherwise left exactly as they arrived: this changes which pathname a
|
|
189
|
+
* pattern is compared against, never what the pattern means.
|
|
190
|
+
*
|
|
191
|
+
* Decoding happens once. A path that still contains `%` after decoding, such as
|
|
192
|
+
* `%2541BC` decoding to `%41BC`, keeps it; decoding a second time would resolve
|
|
193
|
+
* a different route than the request asked for.
|
|
194
|
+
*/
|
|
195
|
+
declare function canonicalizeRequestPathname(pathname: string): string;
|
|
174
196
|
|
|
175
197
|
declare function parseMiddlewareCookieHeader(cookieHeader?: string | null): Record<string, string>;
|
|
176
198
|
declare function serializeMiddlewareCookie(name: string, value: string, options?: CookieOptions): string;
|
|
@@ -202,4 +224,4 @@ interface FarmMiddlewarePluginOptions {
|
|
|
202
224
|
}
|
|
203
225
|
declare function farmMiddlewarePlugin(options?: FarmMiddlewarePluginOptions): Plugin;
|
|
204
226
|
|
|
205
|
-
export { CookieOptions, FarmMiddlewareConfig, type FarmMiddlewarePluginOptions, MemoryRateLimitStorageOptions, MiddlewareChain, MiddlewareConfig, MiddlewareContext, MiddlewareFunction, MiddlewareManager, RateLimitStatus, RateLimitStorage, UnsupportedRateLimitStorageError, canonicalizeRequestPathSegments, createContext, farmMiddlewarePlugin, getFromMiddleware, getRateLimitStatus, hasMiddlewareData, memoryRateLimitStorage, middleware, parseMiddlewareCookieHeader, serializeMiddlewareCookie, serializeMiddlewareCookieDeletion, unwrapMiddleware };
|
|
227
|
+
export { CookieOptions, FarmMiddlewareConfig, type FarmMiddlewarePluginOptions, MemoryRateLimitStorageOptions, MiddlewareChain, MiddlewareConfig, MiddlewareContext, MiddlewareFunction, MiddlewareManager, RateLimitStatus, RateLimitStorage, UnsupportedRateLimitStorageError, canonicalizeRequestPathSegments, canonicalizeRequestPathname, createContext, farmMiddlewarePlugin, getFromMiddleware, getRateLimitStatus, hasMiddlewareData, memoryRateLimitStorage, middleware, parseMiddlewareCookieHeader, serializeMiddlewareCookie, serializeMiddlewareCookieDeletion, unwrapMiddleware };
|