@farm.js/core 0.1.35 → 0.1.37
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/{metadata-BnLDsUOS.d.ts → agent-mcp-BC0bAGVF.d.mts} +45 -2
- package/dist/agent-mcp-handler-LPJ2CADR.mjs +19 -0
- package/dist/agent-mcp-handler-SJAHFSPI.cjs +19 -0
- package/dist/{metadata-WGpBYcGn.d.mts → agent-mcp-jyDHbQKe.d.ts} +45 -2
- package/dist/agent-runtime.cjs +6 -4
- package/dist/agent-runtime.d.mts +1 -1
- package/dist/agent-runtime.d.ts +1 -1
- package/dist/agent-runtime.mjs +5 -3
- package/dist/api/client.cjs +3 -3
- package/dist/api/client.mjs +2 -2
- package/dist/api/route-manager.cjs +9 -9
- package/dist/api/route-manager.d.mts +10 -4
- package/dist/api/route-manager.d.ts +10 -4
- package/dist/api/route-manager.mjs +8 -8
- package/dist/api/runtime.cjs +6 -6
- package/dist/api/runtime.d.mts +4 -62
- package/dist/api/runtime.d.ts +4 -62
- package/dist/api/runtime.mjs +5 -5
- package/dist/api.cjs +13 -12
- package/dist/api.d.mts +3 -3
- package/dist/api.d.ts +3 -3
- package/dist/api.mjs +12 -11
- package/dist/{app-BXB3JZYc.d.ts → app-CKO3iN1c.d.ts} +17 -3
- package/dist/{app-D_j9AAVL.d.mts → app-Cbkj9ufe.d.mts} +17 -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-F7JZENPF.cjs → chunk-3A4KGQYI.cjs} +38 -30
- package/dist/{chunk-4MMGO7YW.cjs → chunk-3IP27TCG.cjs} +43 -32
- package/dist/{chunk-FDR64H6B.mjs → chunk-3KGDJLJK.mjs} +41 -2
- package/dist/{chunk-UJD4PHYB.mjs → chunk-4E5WBPEG.mjs} +72 -354
- package/dist/{chunk-KXWRO25S.cjs → chunk-4GPOC4LN.cjs} +3 -3
- package/dist/{chunk-Z2HLU4IX.cjs → chunk-4GWRFP22.cjs} +23 -2
- package/dist/{chunk-4KU5Q7C2.mjs → chunk-4P6ULFMD.mjs} +253 -67
- package/dist/chunk-4WQ6PGSJ.cjs +367 -0
- package/dist/{chunk-SMHH4VDG.mjs → chunk-4WVJLURN.mjs} +1 -1
- package/dist/{chunk-2F2ER724.cjs → chunk-5BXGGEC7.cjs} +27 -22
- package/dist/{chunk-3BHT4WMP.cjs → chunk-5D2JIPLH.cjs} +8 -8
- package/dist/{chunk-AHGECQEW.mjs → chunk-666CKENS.mjs} +1 -1
- package/dist/{chunk-GFHLGIYC.cjs → chunk-6LGFV2CQ.cjs} +8 -8
- package/dist/chunk-6SJ2KJTA.mjs +314 -0
- package/dist/{chunk-PFQKNERH.cjs → chunk-6TJITR2B.cjs} +457 -218
- package/dist/{chunk-73MC7ZL6.cjs → chunk-75X755YZ.cjs} +2 -2
- package/dist/{chunk-3UH7MRCP.cjs → chunk-7DWNJI73.cjs} +13 -13
- package/dist/{chunk-7L5V3KQO.cjs → chunk-7O5M4UKW.cjs} +2 -2
- package/dist/{chunk-BJPBQNIE.cjs → chunk-7SQ5SGYZ.cjs} +2 -2
- package/dist/{chunk-27ZWSI3W.cjs → chunk-ADOAUDQ6.cjs} +2 -2
- package/dist/{chunk-CP6X4AEU.mjs → chunk-AJQTP4OO.mjs} +1 -1
- package/dist/{chunk-YKX5BK66.cjs → chunk-ATWHHSY2.cjs} +7 -7
- package/dist/{chunk-EFCQPQMG.cjs → chunk-B5PFZLKV.cjs} +89 -8
- package/dist/{chunk-FNO7A7CM.cjs → chunk-BHY547NB.cjs} +34 -16
- package/dist/{chunk-JHWOVJ3M.mjs → chunk-BUGNQIHC.mjs} +5 -0
- package/dist/{chunk-7GLPRTTF.cjs → chunk-CGBDNNSM.cjs} +2 -2
- package/dist/chunk-CI6E3UOH.cjs +314 -0
- package/dist/{chunk-2G2NNLE2.mjs → chunk-CQMVIOYP.mjs} +5 -5
- package/dist/{chunk-X6W5FFH6.cjs → chunk-CVH2BXPY.cjs} +8 -8
- package/dist/{chunk-TKSCR644.cjs → chunk-D3C5LBQY.cjs} +2 -2
- package/dist/{chunk-PZNL3WEG.mjs → chunk-DMEPTZTI.mjs} +22 -11
- package/dist/chunk-DTSROJ5J.mjs +367 -0
- package/dist/{chunk-DBNKI4NF.cjs → chunk-ECKF2BAM.cjs} +6 -2
- package/dist/{chunk-GQ3Z3IZI.cjs → chunk-EMMQ64QW.cjs} +18 -18
- package/dist/{chunk-6DU6UFUE.mjs → chunk-EXG5LD6B.mjs} +16 -8
- package/dist/{chunk-HUMR6LSU.mjs → chunk-F5QO4FNE.mjs} +1 -1
- package/dist/{chunk-YULD7ICZ.mjs → chunk-FBOJ55OM.mjs} +1 -1
- package/dist/{chunk-IHNMMXHV.mjs → chunk-FGRYBX5X.mjs} +15 -10
- package/dist/{chunk-D227TIEN.cjs → chunk-FWE7LEQC.cjs} +13 -13
- package/dist/{chunk-3BU22U3M.cjs → chunk-G2TEB74S.cjs} +5 -2
- package/dist/{chunk-G5RT7EXW.mjs → chunk-HEVMCTSR.mjs} +21 -6
- package/dist/{chunk-W7LF2J2S.mjs → chunk-HMRSWN47.mjs} +1 -1
- package/dist/{chunk-JG6DJF5A.mjs → chunk-HZFM2LWQ.mjs} +22 -1
- package/dist/{chunk-UAORZ7QA.mjs → chunk-IAIYV4RZ.mjs} +2 -2
- package/dist/{chunk-F2SE2VDO.mjs → chunk-IHQIOZLC.mjs} +1 -1
- package/dist/{chunk-2NNMOPDN.mjs → chunk-J3ANCZKA.mjs} +4 -1
- package/dist/{chunk-C4SPBWFM.cjs → chunk-JEZO6VUR.cjs} +10 -1
- package/dist/{chunk-SC2WYWPF.mjs → chunk-JPNFPAZ4.mjs} +3 -3
- package/dist/{chunk-F6Z3Y5KL.mjs → chunk-K3SAEIM3.mjs} +5 -2
- package/dist/{chunk-QAU5JD57.mjs → chunk-K4I4O5TS.mjs} +289 -50
- package/dist/{chunk-KN7K4VQN.mjs → chunk-KDTBF3UU.mjs} +1 -1
- package/dist/{chunk-OMVAU7NT.cjs → chunk-KIIMAWOJ.cjs} +11 -1
- package/dist/{chunk-43FMW62B.mjs → chunk-KMTGADN3.mjs} +28 -0
- package/dist/{chunk-QORUJDIV.mjs → chunk-KPFKMDM7.mjs} +2 -2
- package/dist/{chunk-YSCV4SJF.cjs → chunk-L5H2GSUC.cjs} +4 -4
- package/dist/{chunk-YDQZGSDS.mjs → chunk-LBDP3YT3.mjs} +1 -1
- package/dist/{chunk-6ETPZTJI.mjs → chunk-LBGILORX.mjs} +116 -55
- package/dist/{chunk-IPXLADVO.cjs → chunk-LOFKRKO7.cjs} +122 -61
- package/dist/{chunk-ULAWS2PA.cjs → chunk-LPFV45AY.cjs} +29 -26
- package/dist/{chunk-3KZS4SUS.mjs → chunk-MCIZVNOQ.mjs} +1 -1
- package/dist/{chunk-RU3M2FIK.cjs → chunk-MRMI32SN.cjs} +87 -369
- package/dist/{chunk-XCMCS4DA.mjs → chunk-ND2CWPOD.mjs} +2 -2
- package/dist/{chunk-XCACDAZZ.cjs → chunk-NDILNQ4L.cjs} +25 -10
- package/dist/{chunk-6TJOML4E.mjs → chunk-NFMDCAOS.mjs} +14 -11
- package/dist/{chunk-UXFQ3UDA.cjs → chunk-NICDYKBS.cjs} +42 -3
- package/dist/{chunk-EZDQRNQ7.mjs → chunk-NNSAQX3U.mjs} +23 -5
- package/dist/{chunk-YC6V7PWE.cjs → chunk-NQ6QFZWD.cjs} +1 -1
- package/dist/{chunk-PDOCJ6RY.mjs → chunk-O6WAEAX3.mjs} +1 -1
- package/dist/{chunk-U4KT7QP3.cjs → chunk-OW67PDDS.cjs} +14 -1
- package/dist/{chunk-77GNHH2Z.cjs → chunk-PMQHMWZU.cjs} +3 -3
- package/dist/chunk-PTZ2TVNE.cjs +178 -0
- package/dist/{chunk-6WCPV6G2.mjs → chunk-Q2KB32T4.mjs} +1 -1
- package/dist/{chunk-ICUQICNC.cjs → chunk-Q5FYSK45.cjs} +718 -532
- package/dist/{chunk-5SJWVY6R.mjs → chunk-QHSH7IH4.mjs} +9 -0
- package/dist/{chunk-Q3VLETLE.mjs → chunk-RRMVL6CJ.mjs} +4 -4
- package/dist/{chunk-IZY3V5XW.mjs → chunk-S3VWVTVA.mjs} +14 -1
- package/dist/{chunk-FFFW3OQ7.cjs → chunk-S6FJO323.cjs} +2 -2
- package/dist/{chunk-VFQT3LAO.cjs → chunk-SDOTRX3V.cjs} +5 -5
- package/dist/chunk-SGBZPZUW.mjs +75 -0
- package/dist/{chunk-BMWDEBXO.cjs → chunk-SHLXACIO.cjs} +31 -3
- package/dist/{chunk-ZXGAFZDO.cjs → chunk-T5OJPTVN.cjs} +2 -2
- package/dist/{chunk-2ELDTQRN.mjs → chunk-TDNWPAVR.mjs} +1 -1
- package/dist/{chunk-VZJR7UTG.cjs → chunk-TE2G5ION.cjs} +2 -2
- package/dist/{chunk-IHNIDL6H.cjs → chunk-TO4GJ56K.cjs} +22 -11
- package/dist/{chunk-4JHOT46A.mjs → chunk-TPLJVC7E.mjs} +86 -5
- package/dist/{chunk-NRSN7G7E.mjs → chunk-TW4GYDBJ.mjs} +1 -1
- package/dist/{chunk-XBML5KMG.cjs → chunk-U6MPZ35Q.cjs} +24 -14
- package/dist/chunk-UH6QN5NL.mjs +178 -0
- package/dist/{chunk-FTFYRMQQ.cjs → chunk-UJZLSXUB.cjs} +53 -28
- package/dist/chunk-UXHS27O6.cjs +75 -0
- package/dist/{chunk-DQQOKWYA.cjs → chunk-VR4GD5I3.cjs} +3 -3
- package/dist/{chunk-22LTEMGQ.mjs → chunk-VXAWRDK7.mjs} +14 -4
- package/dist/{chunk-62XKI4Z3.cjs → chunk-W2YDNK66.cjs} +6 -3
- package/dist/{chunk-VPTDD5XF.cjs → chunk-WBKEZXWE.cjs} +5 -0
- package/dist/{chunk-EJQT6KZN.cjs → chunk-WC5UV2HQ.cjs} +2 -2
- package/dist/{chunk-SAZVVAJH.mjs → chunk-WQ7T2263.mjs} +18 -7
- package/dist/chunk-WRPHYQVY.mjs +109 -0
- package/dist/chunk-WT4TGLXT.cjs +109 -0
- package/dist/{chunk-SOMHP6GF.mjs → chunk-XOPOIFTJ.mjs} +2 -2
- package/dist/{chunk-3PXS2MHU.mjs → chunk-YCKO6FRS.mjs} +1 -1
- package/dist/{chunk-C35ZBVRD.mjs → chunk-YWMZUGIS.mjs} +6 -2
- package/dist/{chunk-HMIJDL7S.mjs → chunk-Z5BEWYVO.mjs} +31 -6
- package/dist/{chunk-OKZUAXHF.mjs → chunk-Z7LA7MHQ.mjs} +1 -1
- package/dist/{chunk-Y7RKTKYI.mjs → chunk-ZMMBIVQM.mjs} +10 -0
- package/dist/{client-plugins-HIyulDym.d.ts → client-plugins-C8DjftDF.d.ts} +112 -5
- package/dist/{client-plugins-CvIslxWi.d.mts → client-plugins-CV4eJ9De.d.mts} +112 -5
- 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-EAUY43BS.cjs → devtools-JXFQNWSH.cjs} +11 -10
- package/dist/{devtools-EE5RIBTH.mjs → devtools-KVOY2TCZ.mjs} +10 -9
- package/dist/docs.cjs +13 -12
- package/dist/docs.d.mts +2 -2
- package/dist/docs.d.ts +2 -2
- package/dist/docs.mjs +12 -11
- package/dist/headers.cjs +4 -4
- package/dist/headers.mjs +3 -3
- package/dist/i18n/client.cjs +11 -11
- package/dist/i18n/client.mjs +3 -3
- package/dist/image/server.cjs +3 -3
- package/dist/image/server.mjs +2 -2
- package/dist/image/sharp.cjs +10 -10
- package/dist/image/sharp.mjs +2 -2
- package/dist/index.cjs +61 -54
- package/dist/index.d.mts +14 -14
- package/dist/index.d.ts +14 -14
- package/dist/index.mjs +60 -53
- package/dist/integrations.cjs +8 -4
- package/dist/integrations.d.mts +1 -1
- package/dist/integrations.d.ts +1 -1
- package/dist/integrations.mjs +7 -3
- 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 +38 -34
- package/dist/internal/build-runtime.d.mts +3 -3
- package/dist/internal/build-runtime.d.ts +3 -3
- package/dist/internal/build-runtime.mjs +37 -33
- package/dist/internal/cli-runtime.cjs +17 -16
- package/dist/internal/cli-runtime.mjs +16 -15
- 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 +11 -10
- package/dist/internal/config-runtime.d.mts +2 -2
- package/dist/internal/config-runtime.d.ts +2 -2
- package/dist/internal/config-runtime.mjs +10 -9
- package/dist/internal/infra-analytics-runtime.cjs +5 -5
- package/dist/internal/infra-analytics-runtime.mjs +3 -3
- package/dist/internal/isolated-boundary.cjs +2 -2
- package/dist/internal/isolated-boundary.d.mts +0 -1
- package/dist/internal/isolated-boundary.d.ts +0 -1
- package/dist/internal/isolated-boundary.mjs +1 -1
- package/dist/internal/metadata-image-runtime.cjs +3 -3
- package/dist/internal/metadata-image-runtime.mjs +2 -2
- package/dist/internal/product-telemetry-runtime.cjs +2 -2
- package/dist/internal/product-telemetry-runtime.mjs +1 -1
- package/dist/internal/production-runtime.cjs +27 -48
- package/dist/internal/production-runtime.d.mts +67 -27
- package/dist/internal/production-runtime.d.ts +67 -27
- package/dist/internal/production-runtime.mjs +34 -55
- package/dist/{layers-BRQF5ETU.mjs → layers-UTB43B7A.mjs} +1 -1
- package/dist/layers-VUWIOFEO.cjs +18 -0
- package/dist/markdown.cjs +1 -1
- package/dist/markdown.d.mts +1 -1
- package/dist/markdown.d.ts +1 -1
- package/dist/markdown.mjs +1 -1
- package/dist/middleware.cjs +10 -10
- package/dist/middleware.d.mts +6 -4
- package/dist/middleware.d.ts +6 -4
- package/dist/middleware.mjs +9 -9
- 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/{nitro-OVPLKPE2.cjs → nitro-7F65EZZS.cjs} +3 -3
- package/dist/{nitro-MXRDCXWZ.mjs → nitro-MPZJGPXK.mjs} +2 -2
- package/dist/plugin.cjs +31 -28
- package/dist/plugin.d.mts +1 -1
- package/dist/plugin.d.ts +1 -1
- package/dist/plugin.mjs +30 -27
- package/dist/{production-runtime-Crq6CJ-2.d.ts → production-runtime-C2kkrPVZ.d.ts} +1 -1
- package/dist/{production-runtime-0sRnuYc-.d.mts → production-runtime-Du_FHb2-.d.mts} +1 -1
- package/dist/query/client.cjs +9 -9
- package/dist/query/client.mjs +4 -4
- package/dist/{render-plan-8ozZh2Qv.d.ts → render-plan-BnnPTpus.d.ts} +1 -1
- package/dist/{render-plan-gs9GGPzw.d.mts → render-plan-Cgx7v8tJ.d.mts} +1 -1
- package/dist/renderer/react/server.cjs +3 -3
- package/dist/renderer/react/server.mjs +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/{request-B5G8rLBH.d.ts → request-BNWr7r5e.d.ts} +1 -1
- package/dist/{request-fkhiynXe.d.mts → request-sKayKcop.d.mts} +1 -1
- 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-lS5nUMua.d.ts → route-rendering-Bx4Auw6Q.d.ts} +1 -1
- package/dist/{route-rendering-CLnS7AZj.d.mts → route-rendering-DWFp3Yq4.d.mts} +1 -1
- package/dist/{router-ifU8Dui1.d.mts → router-BK6K42Ij.d.mts} +1 -1
- package/dist/{router-4iuiYnOW.d.ts → router-DnW_2tQi.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-CA3Ei5k_.d.ts +69 -0
- package/dist/runtime-DJDaCMd_.d.mts +69 -0
- package/dist/server-action-security.cjs +3 -3
- package/dist/server-action-security.mjs +2 -2
- package/dist/server-fn.cjs +5 -5
- package/dist/server-fn.mjs +4 -4
- 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 +6 -6
- package/dist/server-query.mjs +5 -5
- package/dist/server.cjs +57 -54
- package/dist/server.d.mts +7 -7
- package/dist/server.d.ts +7 -7
- package/dist/server.mjs +35 -32
- package/dist/{spa-router-Bq7VCOwx.d.mts → spa-router-D6fUA4Rn.d.mts} +2 -2
- package/dist/{spa-router-DaJk5Re4.d.ts → spa-router-Mwbd7g2L.d.ts} +2 -2
- package/dist/testing.cjs +13 -13
- package/dist/testing.d.mts +1 -1
- package/dist/testing.d.ts +1 -1
- package/dist/testing.mjs +10 -10
- package/dist/theme/server.cjs +4 -4
- package/dist/theme/server.mjs +3 -3
- package/dist/{utils-BXLmFsVR.d.ts → utils-BwVcAfUR.d.ts} +1 -1
- package/dist/{utils-XJn0c9bj.d.mts → utils-p9Hs-jCc.d.mts} +1 -1
- package/dist/version.cjs +2 -2
- package/dist/version.mjs +1 -1
- package/dist/vite.cjs +31 -28
- package/dist/vite.d.mts +1 -1
- package/dist/vite.d.ts +1 -1
- package/dist/vite.mjs +30 -27
- package/dist/workflows.cjs +3 -3
- package/dist/workflows.mjs +2 -2
- package/package.json +1 -1
- package/types/middleware.d.ts +5 -1
- package/dist/chunk-FXEF4PPL.mjs +0 -47
- package/dist/chunk-XD32KALF.cjs +0 -47
- package/dist/layers-4PNE2HOY.cjs +0 -18
- /package/dist/{chunk-SJNMVDDF.cjs → chunk-FUCSUGDM.cjs} +0 -0
- /package/dist/{chunk-UDNPLXW7.mjs → chunk-MYIZXDZA.mjs} +0 -0
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
"use strict";Object.defineProperty(exports, "__esModule", {value: true}); function _interopRequireWildcard(obj) { if (obj && obj.__esModule) { return obj; } else { var newObj = {}; if (obj != null) { for (var key in obj) { if (Object.prototype.hasOwnProperty.call(obj, key)) { newObj[key] = obj[key]; } } } newObj.default = obj; return newObj; } } function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; } function _optionalChain(ops) { let lastAccessLHS = undefined; let value = ops[0]; let i = 1; while (i < ops.length) { const op = ops[i]; const fn = ops[i + 1]; i += 2; if ((op === 'optionalAccess' || op === 'optionalCall') && value == null) { return undefined; } if (op === 'access' || op === 'optionalAccess') { lastAccessLHS = value; value = fn(value); } else if (op === 'call' || op === 'optionalCall') { value = fn((...args) => value.call(lastAccessLHS, ...args)); lastAccessLHS = undefined; } } return value; }
|
|
2
2
|
|
|
3
|
-
var
|
|
3
|
+
var _chunkB5PFZLKVcjs = require('./chunk-B5PFZLKV.cjs');
|
|
4
4
|
|
|
5
5
|
|
|
6
6
|
var _chunkS3JO3N4Hcjs = require('./chunk-S3JO3N4H.cjs');
|
|
@@ -11,7 +11,7 @@ var _path = require('path'); var _path2 = _interopRequireDefault(_path);
|
|
|
11
11
|
var _url = require('url');
|
|
12
12
|
async function createFarmMarkdownRouteModuleFromFile(filePath, options = {}) {
|
|
13
13
|
const source = await _promises.readFile.call(void 0, filePath, "utf8");
|
|
14
|
-
return
|
|
14
|
+
return _chunkB5PFZLKVcjs.createFarmMarkdownRouteModule.call(void 0, {
|
|
15
15
|
source,
|
|
16
16
|
filePath,
|
|
17
17
|
components: options.components,
|
|
@@ -3,14 +3,14 @@
|
|
|
3
3
|
|
|
4
4
|
|
|
5
5
|
|
|
6
|
-
var
|
|
6
|
+
var _chunkTE2G5IONcjs = require('./chunk-TE2G5ION.cjs');
|
|
7
7
|
|
|
8
8
|
|
|
9
9
|
|
|
10
10
|
var _chunkIK6LVLKCcjs = require('./chunk-IK6LVLKC.cjs');
|
|
11
11
|
|
|
12
12
|
|
|
13
|
-
var
|
|
13
|
+
var _chunk3A4KGQYIcjs = require('./chunk-3A4KGQYI.cjs');
|
|
14
14
|
|
|
15
15
|
|
|
16
16
|
|
|
@@ -40,7 +40,7 @@ function createFarmDocsAdapterRuntimeConfig(docs, options, moduleConfig) {
|
|
|
40
40
|
...moduleConfig ? { ...moduleConfig, ...docs.configOverrides } : _nullishCoalesce(docs.runtimeConfig, () => ( docs.config)),
|
|
41
41
|
entry: docs.config.entry || docs.entry.replace(/^\/+|\/+$/g, "") || "docs",
|
|
42
42
|
docsPath: docs.entry,
|
|
43
|
-
contentDir:
|
|
43
|
+
contentDir: _chunkTE2G5IONcjs.resolveFarmDocsContentDir.call(void 0, docs, options)
|
|
44
44
|
};
|
|
45
45
|
}
|
|
46
46
|
_chunkS3JO3N4Hcjs.__name.call(void 0, createFarmDocsAdapterRuntimeConfig, "createFarmDocsAdapterRuntimeConfig");
|
|
@@ -277,25 +277,25 @@ function getDocsDescription(docs) {
|
|
|
277
277
|
}
|
|
278
278
|
_chunkS3JO3N4Hcjs.__name.call(void 0, getDocsDescription, "getDocsDescription");
|
|
279
279
|
function getLoadedDocsPages(context) {
|
|
280
|
-
return
|
|
280
|
+
return _chunkTE2G5IONcjs.discoverFarmDocsPages.call(void 0, context.contentDir, context.docs).map((page) => _chunkTE2G5IONcjs.loadFarmDocsPage.call(void 0, context.contentDir, context.docs, page.slug)).filter((page) => Boolean(page));
|
|
281
281
|
}
|
|
282
282
|
_chunkS3JO3N4Hcjs.__name.call(void 0, getLoadedDocsPages, "getLoadedDocsPages");
|
|
283
283
|
function toDocsSourcePage(page) {
|
|
284
284
|
return {
|
|
285
|
-
...
|
|
285
|
+
..._chunkTE2G5IONcjs.toFarmDocsMarkdownPage.call(void 0, page),
|
|
286
286
|
sourcePath: page.sourcePath
|
|
287
287
|
};
|
|
288
288
|
}
|
|
289
289
|
_chunkS3JO3N4Hcjs.__name.call(void 0, toDocsSourcePage, "toDocsSourcePage");
|
|
290
290
|
function toDocsSitemapPage(page) {
|
|
291
291
|
return {
|
|
292
|
-
...
|
|
292
|
+
..._chunkTE2G5IONcjs.toFarmDocsMarkdownPage.call(void 0, page),
|
|
293
293
|
sourcePath: page.sourcePath
|
|
294
294
|
};
|
|
295
295
|
}
|
|
296
296
|
_chunkS3JO3N4Hcjs.__name.call(void 0, toDocsSitemapPage, "toDocsSitemapPage");
|
|
297
297
|
function toDocsLlmsPage(page) {
|
|
298
|
-
return
|
|
298
|
+
return _chunkTE2G5IONcjs.toFarmDocsMarkdownPage.call(void 0, page);
|
|
299
299
|
}
|
|
300
300
|
_chunkS3JO3N4Hcjs.__name.call(void 0, toDocsLlmsPage, "toDocsLlmsPage");
|
|
301
301
|
function getDocsLlmsOptions(context, request) {
|
|
@@ -389,7 +389,7 @@ _chunkS3JO3N4Hcjs.__name.call(void 0, renderAgentsDocument, "renderAgentsDocumen
|
|
|
389
389
|
function buildAgentSpec(context, request) {
|
|
390
390
|
const url = new URL(request.url);
|
|
391
391
|
const origin = url.origin;
|
|
392
|
-
const pages =
|
|
392
|
+
const pages = _chunkTE2G5IONcjs.discoverFarmDocsPages.call(void 0, context.contentDir, context.docs);
|
|
393
393
|
const spec = _chunkIK6LVLKCcjs.docsEngine.call(void 0, ).buildDocsAgentDiscoverySpec(getDocsDiscoveryOptions(context, request));
|
|
394
394
|
const title = getDocsTitle(context.docs);
|
|
395
395
|
return {
|
|
@@ -479,7 +479,7 @@ function buildPublicConfig(context) {
|
|
|
479
479
|
}
|
|
480
480
|
_chunkS3JO3N4Hcjs.__name.call(void 0, buildPublicConfig, "buildPublicConfig");
|
|
481
481
|
function buildDiagnostics(context) {
|
|
482
|
-
const pages =
|
|
482
|
+
const pages = _chunkTE2G5IONcjs.discoverFarmDocsPages.call(void 0, context.contentDir, context.docs);
|
|
483
483
|
const diagnostics = _chunkIK6LVLKCcjs.docsEngine.call(void 0, ).buildDocsDiagnostics(context.docs.config, {
|
|
484
484
|
entry: context.docs.entry,
|
|
485
485
|
mcp: {
|
|
@@ -551,12 +551,12 @@ async function resolveAPIContext(options) {
|
|
|
551
551
|
config: options.config,
|
|
552
552
|
configPath: options.configPath
|
|
553
553
|
}));
|
|
554
|
-
const docs = isResolvedDocsConfig(docsInput) ? docsInput : await
|
|
554
|
+
const docs = isResolvedDocsConfig(docsInput) ? docsInput : await _chunk3A4KGQYIcjs.resolveDocsConfig.call(void 0, docsInput, { root, srcDir });
|
|
555
555
|
return {
|
|
556
556
|
root,
|
|
557
557
|
srcDir,
|
|
558
558
|
docs,
|
|
559
|
-
contentDir:
|
|
559
|
+
contentDir: _chunkTE2G5IONcjs.resolveFarmDocsContentDir.call(void 0, docs, { root, srcDir }),
|
|
560
560
|
diagnostics: options.diagnostics === true
|
|
561
561
|
};
|
|
562
562
|
}
|
|
@@ -615,10 +615,10 @@ async function handleDocsAPIGet(request, context) {
|
|
|
615
615
|
if (format === "markdown" || url.pathname.endsWith(".md")) {
|
|
616
616
|
const pathParam = url.searchParams.get("path") || url.searchParams.get("slug");
|
|
617
617
|
const slug = normalizeDocsApiSlug(_nullishCoalesce(_nullishCoalesce(pathParam, () => ( pathTarget.slug)), () => ( "")), context.docs);
|
|
618
|
-
const page =
|
|
618
|
+
const page = _chunkTE2G5IONcjs.loadFarmDocsPage.call(void 0, context.contentDir, context.docs, slug);
|
|
619
619
|
if (!page) return text("Docs page not found\n", "text/plain; charset=utf-8", { status: 404 });
|
|
620
620
|
return text(
|
|
621
|
-
_chunkIK6LVLKCcjs.docsEngine.call(void 0, ).renderDocsMarkdownDocument(
|
|
621
|
+
_chunkIK6LVLKCcjs.docsEngine.call(void 0, ).renderDocsMarkdownDocument(_chunkTE2G5IONcjs.toFarmDocsMarkdownPage.call(void 0, page), {
|
|
622
622
|
origin: new URL(request.url).origin,
|
|
623
623
|
llms: getDocsLlmsOptions(context, request),
|
|
624
624
|
sitemap: context.docs.config.sitemap
|
|
@@ -27,7 +27,7 @@ var _chunkE2ROOWQCcjs = require('./chunk-E2ROOWQC.cjs');
|
|
|
27
27
|
var _chunkJSROZYYOcjs = require('./chunk-JSROZYYO.cjs');
|
|
28
28
|
|
|
29
29
|
|
|
30
|
-
var
|
|
30
|
+
var _chunkUJZLSXUBcjs = require('./chunk-UJZLSXUB.cjs');
|
|
31
31
|
|
|
32
32
|
|
|
33
33
|
var _chunkS3JO3N4Hcjs = require('./chunk-S3JO3N4H.cjs');
|
|
@@ -119,7 +119,7 @@ _chunkS3JO3N4Hcjs.__name.call(void 0, withTimeout, "withTimeout");
|
|
|
119
119
|
var formatSeconds = /* @__PURE__ */ _chunkS3JO3N4Hcjs.__name.call(void 0, (ms) => ms < 1e3 ? `${ms}ms` : `${Number((ms / 1e3).toFixed(1))}s`, "formatSeconds");
|
|
120
120
|
function collectSchemaOwners(config) {
|
|
121
121
|
const owners = [];
|
|
122
|
-
const integrationSchemas =
|
|
122
|
+
const integrationSchemas = _chunkUJZLSXUBcjs.getIntegrationSchemas.call(void 0, config.integrations);
|
|
123
123
|
let integrationClient;
|
|
124
124
|
for (const [name, schema] of Object.entries(integrationSchemas)) {
|
|
125
125
|
owners.push({
|
|
@@ -34,7 +34,7 @@ var _chunkS3A45T7Fcjs = require('./chunk-S3A45T7F.cjs');
|
|
|
34
34
|
var _chunkZEG3OPIBcjs = require('./chunk-ZEG3OPIB.cjs');
|
|
35
35
|
|
|
36
36
|
|
|
37
|
-
var
|
|
37
|
+
var _chunkOW67PDDScjs = require('./chunk-OW67PDDS.cjs');
|
|
38
38
|
|
|
39
39
|
|
|
40
40
|
var _chunkS3JO3N4Hcjs = require('./chunk-S3JO3N4H.cjs');
|
|
@@ -1119,7 +1119,7 @@ function createApiClients(options = {}) {
|
|
|
1119
1119
|
"api is server-only. Use apiClient from createApiClients() in the browser."
|
|
1120
1120
|
);
|
|
1121
1121
|
}
|
|
1122
|
-
const currentRequest =
|
|
1122
|
+
const currentRequest = _chunkOW67PDDScjs._resolveCurrentRequest.call(void 0, );
|
|
1123
1123
|
const runtime = _chunk72ADZ6GQcjs.resolveAPIRequestRuntime.call(void 0, );
|
|
1124
1124
|
if (!currentRequest || !runtime) {
|
|
1125
1125
|
throw new Error(
|
|
@@ -6,7 +6,7 @@
|
|
|
6
6
|
var _chunkDVM4FKZLcjs = require('./chunk-DVM4FKZL.cjs');
|
|
7
7
|
|
|
8
8
|
|
|
9
|
-
var
|
|
9
|
+
var _chunkNICDYKBScjs = require('./chunk-NICDYKBS.cjs');
|
|
10
10
|
|
|
11
11
|
|
|
12
12
|
var _chunkS3JO3N4Hcjs = require('./chunk-S3JO3N4H.cjs');
|
|
@@ -29,7 +29,7 @@ function createRewritesPlugin(rewrites, {
|
|
|
29
29
|
if (overrideBeforeRequest) {
|
|
30
30
|
await overrideBeforeRequest(req, res, context);
|
|
31
31
|
}
|
|
32
|
-
const url =
|
|
32
|
+
const url = _chunkNICDYKBScjs.resolveFarmRequestURL.call(void 0, req);
|
|
33
33
|
const routePath = _chunkDVM4FKZLcjs.resolveConfigRoutePathname.call(void 0, url.pathname, i18n);
|
|
34
34
|
const pathname = routePath.pathname;
|
|
35
35
|
for (const { rewrite, pattern } of compiledRewrites) {
|
|
@@ -1,9 +1,9 @@
|
|
|
1
1
|
"use strict";Object.defineProperty(exports, "__esModule", {value: true});
|
|
2
2
|
|
|
3
|
-
var
|
|
3
|
+
var _chunkEMMQ64QWcjs = require('./chunk-EMMQ64QW.cjs');
|
|
4
4
|
|
|
5
5
|
|
|
6
|
-
var
|
|
6
|
+
var _chunkFWE7LEQCcjs = require('./chunk-FWE7LEQC.cjs');
|
|
7
7
|
|
|
8
8
|
|
|
9
9
|
var _chunkI57LW5VZcjs = require('./chunk-I57LW5VZ.cjs');
|
|
@@ -13,7 +13,7 @@ var _chunkS3JO3N4Hcjs = require('./chunk-S3JO3N4H.cjs');
|
|
|
13
13
|
|
|
14
14
|
// src/navigation.ts
|
|
15
15
|
function useRouter2() {
|
|
16
|
-
const router =
|
|
16
|
+
const router = _chunkEMMQ64QWcjs.useRouter.call(void 0, );
|
|
17
17
|
return {
|
|
18
18
|
push: router.push,
|
|
19
19
|
replace: router.replace,
|
|
@@ -21,21 +21,21 @@ function useRouter2() {
|
|
|
21
21
|
forward: router.forward,
|
|
22
22
|
refresh() {
|
|
23
23
|
if (typeof window === "undefined") return Promise.resolve();
|
|
24
|
-
return
|
|
24
|
+
return _chunkFWE7LEQCcjs.getRouter.call(void 0, ).refresh();
|
|
25
25
|
},
|
|
26
26
|
prefetch(href) {
|
|
27
27
|
if (typeof window === "undefined") return Promise.resolve();
|
|
28
|
-
return
|
|
28
|
+
return _chunkFWE7LEQCcjs.getRouter.call(void 0, ).prefetch(_chunkI57LW5VZcjs.applyFarmBasePath.call(void 0, href));
|
|
29
29
|
}
|
|
30
30
|
};
|
|
31
31
|
}
|
|
32
32
|
_chunkS3JO3N4Hcjs.__name.call(void 0, useRouter2, "useRouter");
|
|
33
33
|
function usePathname() {
|
|
34
|
-
return
|
|
34
|
+
return _chunkEMMQ64QWcjs.useRouter.call(void 0, ).pathname;
|
|
35
35
|
}
|
|
36
36
|
_chunkS3JO3N4Hcjs.__name.call(void 0, usePathname, "usePathname");
|
|
37
37
|
function useSearchParams() {
|
|
38
|
-
return
|
|
38
|
+
return _chunkEMMQ64QWcjs.useRouter.call(void 0, ).searchParams;
|
|
39
39
|
}
|
|
40
40
|
_chunkS3JO3N4Hcjs.__name.call(void 0, useSearchParams, "useSearchParams");
|
|
41
41
|
|
|
@@ -112,11 +112,87 @@ function isFarmMarkdownPublicSourceResponse(response) {
|
|
|
112
112
|
return publicSourceResponses.has(response);
|
|
113
113
|
}
|
|
114
114
|
_chunkS3JO3N4Hcjs.__name.call(void 0, isFarmMarkdownPublicSourceResponse, "isFarmMarkdownPublicSourceResponse");
|
|
115
|
+
var ANONYMOUS_REQUEST_HEADERS = /* @__PURE__ */ new Set([
|
|
116
|
+
"accept",
|
|
117
|
+
"accept-encoding",
|
|
118
|
+
"accept-language",
|
|
119
|
+
"cache-control",
|
|
120
|
+
"connection",
|
|
121
|
+
"dnt",
|
|
122
|
+
"host",
|
|
123
|
+
"if-match",
|
|
124
|
+
"if-modified-since",
|
|
125
|
+
"if-none-match",
|
|
126
|
+
"if-range",
|
|
127
|
+
"if-unmodified-since",
|
|
128
|
+
"keep-alive",
|
|
129
|
+
"origin",
|
|
130
|
+
"pragma",
|
|
131
|
+
"priority",
|
|
132
|
+
"purpose",
|
|
133
|
+
"range",
|
|
134
|
+
"referer",
|
|
135
|
+
"save-data",
|
|
136
|
+
"sec-gpc",
|
|
137
|
+
"sec-purpose",
|
|
138
|
+
"te",
|
|
139
|
+
"traceparent",
|
|
140
|
+
"tracestate",
|
|
141
|
+
"upgrade-insecure-requests",
|
|
142
|
+
"user-agent",
|
|
143
|
+
"x-forwarded-host",
|
|
144
|
+
"x-forwarded-port",
|
|
145
|
+
"x-forwarded-proto",
|
|
146
|
+
"x-request-id"
|
|
147
|
+
]);
|
|
148
|
+
function isAnonymousRequestHeader(name) {
|
|
149
|
+
const lower = name.toLowerCase();
|
|
150
|
+
return ANONYMOUS_REQUEST_HEADERS.has(lower) || lower.startsWith("sec-fetch-") || lower.startsWith("sec-ch-");
|
|
151
|
+
}
|
|
152
|
+
_chunkS3JO3N4Hcjs.__name.call(void 0, isAnonymousRequestHeader, "isAnonymousRequestHeader");
|
|
153
|
+
var PAGE_CHECK_DROPPED_HEADERS = /* @__PURE__ */ new Set([
|
|
154
|
+
"accept-encoding",
|
|
155
|
+
"if-match",
|
|
156
|
+
"if-modified-since",
|
|
157
|
+
"if-none-match",
|
|
158
|
+
"if-range",
|
|
159
|
+
"if-unmodified-since",
|
|
160
|
+
"range"
|
|
161
|
+
]);
|
|
162
|
+
async function anonymousVisitorOpensPage(options, url, targetPathname) {
|
|
163
|
+
const pageUrl = new URL(url);
|
|
164
|
+
pageUrl.pathname = targetPathname;
|
|
165
|
+
const headers = new Headers();
|
|
166
|
+
for (const [name, value] of options.request.headers) {
|
|
167
|
+
if (!PAGE_CHECK_DROPPED_HEADERS.has(name.toLowerCase())) headers.append(name, value);
|
|
168
|
+
}
|
|
169
|
+
headers.set("accept", "text/html");
|
|
170
|
+
const response = await options.renderPage(
|
|
171
|
+
new Request(pageUrl, {
|
|
172
|
+
method: "GET",
|
|
173
|
+
headers,
|
|
174
|
+
redirect: "manual",
|
|
175
|
+
signal: options.request.signal
|
|
176
|
+
})
|
|
177
|
+
);
|
|
178
|
+
void _optionalChain([response, 'access', _9 => _9.body, 'optionalAccess', _10 => _10.cancel, 'call', _11 => _11(), 'access', _12 => _12.catch, 'call', _13 => _13(() => {
|
|
179
|
+
})]);
|
|
180
|
+
return response.status >= 200 && response.status < 300 && Boolean(_optionalChain([response, 'access', _14 => _14.headers, 'access', _15 => _15.get, 'call', _16 => _16("content-type"), 'optionalAccess', _17 => _17.toLowerCase, 'call', _18 => _18(), 'access', _19 => _19.includes, 'call', _20 => _20("text/html")]));
|
|
181
|
+
}
|
|
182
|
+
_chunkS3JO3N4Hcjs.__name.call(void 0, anonymousVisitorOpensPage, "anonymousVisitorOpensPage");
|
|
183
|
+
function hasOnlyAnonymousHeaders(headers) {
|
|
184
|
+
for (const name of headers.keys()) {
|
|
185
|
+
if (!isAnonymousRequestHeader(name)) return false;
|
|
186
|
+
}
|
|
187
|
+
return true;
|
|
188
|
+
}
|
|
189
|
+
_chunkS3JO3N4Hcjs.__name.call(void 0, hasOnlyAnonymousHeaders, "hasOnlyAnonymousHeaders");
|
|
190
|
+
var FARM_MARKDOWN_ANONYMOUS_CLIENT_ADDRESS = "192.0.2.1";
|
|
115
191
|
async function createFarmMarkdownSourceResponse(options) {
|
|
116
192
|
if (options.request.method !== "GET" && options.request.method !== "HEAD") {
|
|
117
193
|
return null;
|
|
118
194
|
}
|
|
119
|
-
if (_optionalChain([options, 'access',
|
|
195
|
+
if (_optionalChain([options, 'access', _21 => _21.config, 'optionalAccess', _22 => _22.markdownRoutes]) === false) {
|
|
120
196
|
return null;
|
|
121
197
|
}
|
|
122
198
|
const url = new URL(options.request.url);
|
|
@@ -129,13 +205,14 @@ async function createFarmMarkdownSourceResponse(options) {
|
|
|
129
205
|
if (!source) {
|
|
130
206
|
return null;
|
|
131
207
|
}
|
|
132
|
-
const anonymous =
|
|
208
|
+
const anonymous = hasOnlyAnonymousHeaders(options.request.headers) && (!options.clientAddress || options.clientAddress === FARM_MARKDOWN_ANONYMOUS_CLIENT_ADDRESS);
|
|
133
209
|
if (options.renderPage && (hasMarkdownExtension || !anonymous)) {
|
|
134
210
|
const publicUrl = new URL(url);
|
|
135
211
|
publicUrl.pathname = targetPathname;
|
|
136
|
-
const publicHeaders = new Headers(
|
|
137
|
-
|
|
138
|
-
|
|
212
|
+
const publicHeaders = new Headers();
|
|
213
|
+
for (const [name, value] of options.request.headers) {
|
|
214
|
+
if (isAnonymousRequestHeader(name)) publicHeaders.append(name, value);
|
|
215
|
+
}
|
|
139
216
|
publicHeaders.set("accept", "text/markdown");
|
|
140
217
|
const publicResponse = await options.renderPage(
|
|
141
218
|
new Request(publicUrl, {
|
|
@@ -144,11 +221,11 @@ async function createFarmMarkdownSourceResponse(options) {
|
|
|
144
221
|
signal: options.request.signal
|
|
145
222
|
})
|
|
146
223
|
);
|
|
147
|
-
if (publicResponse.headers.get("X-Farm-Markdown-Route") === targetPathname) {
|
|
224
|
+
if (publicResponse.headers.get("X-Farm-Markdown-Route") === targetPathname && publicResponse.headers.has("X-Farm-Markdown-Source")) {
|
|
148
225
|
publicSourceResponses.add(publicResponse);
|
|
149
226
|
return publicResponse;
|
|
150
227
|
}
|
|
151
|
-
await _optionalChain([publicResponse, 'access',
|
|
228
|
+
await _optionalChain([publicResponse, 'access', _23 => _23.body, 'optionalAccess', _24 => _24.cancel, 'call', _25 => _25()]);
|
|
152
229
|
if (!hasMarkdownExtension) return null;
|
|
153
230
|
return new Response(`No public Markdown version of ${targetPathname}.
|
|
154
231
|
`, {
|
|
@@ -159,6 +236,9 @@ async function createFarmMarkdownSourceResponse(options) {
|
|
|
159
236
|
}
|
|
160
237
|
});
|
|
161
238
|
}
|
|
239
|
+
if (options.renderPage && !await anonymousVisitorOpensPage(options, url, targetPathname)) {
|
|
240
|
+
return null;
|
|
241
|
+
}
|
|
162
242
|
const headers = new Headers({
|
|
163
243
|
"Content-Type": "text/markdown; charset=utf-8",
|
|
164
244
|
"Content-Location": targetPathname === "/" ? "/index.md" : `${targetPathname}.md`,
|
|
@@ -189,4 +269,5 @@ _chunkS3JO3N4Hcjs.__name.call(void 0, createFarmMarkdownSourceResponse, "createF
|
|
|
189
269
|
|
|
190
270
|
|
|
191
271
|
|
|
192
|
-
|
|
272
|
+
|
|
273
|
+
exports.isFarmMarkdownPageFile = isFarmMarkdownPageFile; exports.normalizeFarmMarkdownRoutePath = normalizeFarmMarkdownRoutePath; exports.parseMarkdownFrontmatter = parseMarkdownFrontmatter; exports.titleFromMarkdown = titleFromMarkdown; exports.createMarkdownMetadata = createMarkdownMetadata; exports.createFarmMarkdownRouteModule = createFarmMarkdownRouteModule; exports.isFarmMarkdownPublicSourceResponse = isFarmMarkdownPublicSourceResponse; exports.FARM_MARKDOWN_ANONYMOUS_CLIENT_ADDRESS = FARM_MARKDOWN_ANONYMOUS_CLIENT_ADDRESS; exports.createFarmMarkdownSourceResponse = createFarmMarkdownSourceResponse;
|
|
@@ -7,7 +7,7 @@ var _chunkD7JTOLFKcjs = require('./chunk-D7JTOLFK.cjs');
|
|
|
7
7
|
|
|
8
8
|
|
|
9
9
|
|
|
10
|
-
var
|
|
10
|
+
var _chunk7SQ5SGYZcjs = require('./chunk-7SQ5SGYZ.cjs');
|
|
11
11
|
|
|
12
12
|
|
|
13
13
|
var _chunkLTNGXMQ6cjs = require('./chunk-LTNGXMQ6.cjs');
|
|
@@ -17,10 +17,12 @@ var _chunkSU7MH53Pcjs = require('./chunk-SU7MH53P.cjs');
|
|
|
17
17
|
|
|
18
18
|
|
|
19
19
|
|
|
20
|
-
var
|
|
20
|
+
var _chunkS6FJO323cjs = require('./chunk-S6FJO323.cjs');
|
|
21
21
|
|
|
22
22
|
|
|
23
|
-
|
|
23
|
+
|
|
24
|
+
|
|
25
|
+
var _chunkJEZO6VURcjs = require('./chunk-JEZO6VUR.cjs');
|
|
24
26
|
|
|
25
27
|
|
|
26
28
|
var _chunk63H6BKXGcjs = require('./chunk-63H6BKXG.cjs');
|
|
@@ -147,9 +149,9 @@ function useMutationLifecycle(target, options = {}) {
|
|
|
147
149
|
};
|
|
148
150
|
});
|
|
149
151
|
const mutationTarget = targetRef.current;
|
|
150
|
-
const isAPITarget =
|
|
152
|
+
const isAPITarget = _chunk7SQ5SGYZcjs.isAPIRouteRef.call(void 0, mutationTarget);
|
|
151
153
|
const sharedOptimistic = !preparationFailed && !isAPITarget ? _optionalChain([currentOptions, 'access', _3 => _3.request, 'optionalAccess', _4 => _4.optimistic]) : void 0;
|
|
152
|
-
const sharedSnapshots = _optionalChain([sharedOptimistic, 'optionalAccess', _5 => _5.update, 'optionalAccess', _6 => _6.length]) ?
|
|
154
|
+
const sharedSnapshots = _optionalChain([sharedOptimistic, 'optionalAccess', _5 => _5.update, 'optionalAccess', _6 => _6.length]) ? _chunk7SQ5SGYZcjs.applyServerFnOptimisticUpdates.call(void 0, sharedOptimistic.update) : [];
|
|
153
155
|
try {
|
|
154
156
|
if (preparationFailed) throw preparationError;
|
|
155
157
|
let data;
|
|
@@ -176,9 +178,9 @@ function useMutationLifecycle(target, options = {}) {
|
|
|
176
178
|
throw cause;
|
|
177
179
|
}
|
|
178
180
|
}
|
|
179
|
-
|
|
181
|
+
_chunk7SQ5SGYZcjs.settleServerFnOptimisticUpdates.call(void 0, sharedSnapshots, "commit");
|
|
180
182
|
if (!isAPITarget && _optionalChain([currentOptions, 'access', _9 => _9.request, 'optionalAccess', _10 => _10.invalidate])) {
|
|
181
|
-
for (const key of
|
|
183
|
+
for (const key of _chunk7SQ5SGYZcjs.resolveServerFnInvalidateTargets.call(void 0, currentOptions.request.invalidate)) {
|
|
182
184
|
_chunkZEG3OPIBcjs.notifyFarmCacheInvalidation.call(void 0, key);
|
|
183
185
|
}
|
|
184
186
|
}
|
|
@@ -213,7 +215,7 @@ function useMutationLifecycle(target, options = {}) {
|
|
|
213
215
|
}
|
|
214
216
|
return data;
|
|
215
217
|
} catch (cause) {
|
|
216
|
-
|
|
218
|
+
_chunk7SQ5SGYZcjs.settleServerFnOptimisticUpdates.call(void 0,
|
|
217
219
|
sharedSnapshots,
|
|
218
220
|
_optionalChain([sharedOptimistic, 'optionalAccess', _11 => _11.rollbackOnError]) ? "rollback" : "invalidate"
|
|
219
221
|
);
|
|
@@ -389,7 +391,7 @@ function useFetcher(target, options = {}) {
|
|
|
389
391
|
const Form = _react.useMemo.call(void 0, () => {
|
|
390
392
|
const FetcherForm = /* @__PURE__ */ _chunkS3JO3N4Hcjs.__name.call(void 0, ({ action, method, encType, onSubmit, ...props }) => {
|
|
391
393
|
const targetValue = targetRef.current;
|
|
392
|
-
const metadata =
|
|
394
|
+
const metadata = _chunk7SQ5SGYZcjs.getAPIRouteRefMetadata.call(void 0, targetValue);
|
|
393
395
|
const nativeAction = _nullishCoalesce(action, () => ( resolveFetcherFormAction(targetValue, metadata)));
|
|
394
396
|
const nativeMethod = _nullishCoalesce(method, () => ( (metadata && (metadata.method === "GET" || metadata.method === "POST") ? metadata.method.toLowerCase() : metadata ? "post" : void 0)));
|
|
395
397
|
const functionAction = typeof nativeAction === "function";
|
|
@@ -458,10 +460,10 @@ function mapFetcherFormData(target, formData, options) {
|
|
|
458
460
|
if (options.mapFormData) {
|
|
459
461
|
return options.mapFormData(formData, context);
|
|
460
462
|
}
|
|
461
|
-
if (!
|
|
463
|
+
if (!_chunk7SQ5SGYZcjs.isAPIRouteRef.call(void 0, target)) {
|
|
462
464
|
return formData;
|
|
463
465
|
}
|
|
464
|
-
const method = _optionalChain([
|
|
466
|
+
const method = _optionalChain([_chunk7SQ5SGYZcjs.getAPIRouteRefMetadata.call(void 0, target), 'optionalAccess', _14 => _14.method]);
|
|
465
467
|
const query = method === "GET" || method === "HEAD";
|
|
466
468
|
const encoding = _nullishCoalesce(_optionalChain([context, 'access', _15 => _15.submitter, 'optionalAccess', _16 => _16.getAttribute, 'call', _17 => _17("formenctype")]), () => ( _optionalChain([context, 'access', _18 => _18.form, 'optionalAccess', _19 => _19.enctype])));
|
|
467
469
|
if (!query && (_optionalChain([encoding, 'optionalAccess', _20 => _20.toLowerCase, 'call', _21 => _21()]) === "multipart/form-data" || Array.from(formData.values()).some((value) => typeof value !== "string"))) {
|
|
@@ -1213,9 +1215,10 @@ function LinkInner({
|
|
|
1213
1215
|
hash,
|
|
1214
1216
|
trailingSlash: _nullishCoalesce(trailingSlash, () => ( _chunkOYEUREB6cjs.getFarmTrailingSlashPreference.call(void 0, )))
|
|
1215
1217
|
});
|
|
1216
|
-
const localizedHref =
|
|
1218
|
+
const localizedHref = _chunkS6FJO323cjs.localizeActiveFarmHref.call(void 0, baseHref, locale);
|
|
1217
1219
|
const resolvedHref = isExternalUrl(localizedHref) ? localizedHref : _chunkI57LW5VZcjs.applyFarmBasePath.call(void 0, localizedHref, _nullishCoalesce(_optionalChain([farm, 'optionalAccess', _34 => _34.basePath]), () => ( _chunkI57LW5VZcjs.getFarmBasePath.call(void 0, ))));
|
|
1218
1220
|
const isExternal = isExternalUrl(resolvedHref);
|
|
1221
|
+
const isScriptHref = _chunkJEZO6VURcjs.isFarmScriptURL.call(void 0, resolvedHref);
|
|
1219
1222
|
const doPrefetch = _react.useCallback.call(void 0, () => {
|
|
1220
1223
|
if (isExternal || activePrefetch.current) return;
|
|
1221
1224
|
const router = getRouter();
|
|
@@ -1325,6 +1328,11 @@ function LinkInner({
|
|
|
1325
1328
|
const handleClick = _react.useCallback.call(void 0,
|
|
1326
1329
|
(event) => {
|
|
1327
1330
|
_optionalChain([onClick, 'optionalCall', _40 => _40(event)]);
|
|
1331
|
+
if (isScriptHref) {
|
|
1332
|
+
event.preventDefault();
|
|
1333
|
+
_chunkJEZO6VURcjs.isFarmBlockedNavigationURL.call(void 0, _chunkJEZO6VURcjs.resolveFarmNavigationURL.call(void 0, resolvedHref, window.location.href));
|
|
1334
|
+
return;
|
|
1335
|
+
}
|
|
1328
1336
|
if (event.defaultPrevented) return;
|
|
1329
1337
|
if (isExternal) return;
|
|
1330
1338
|
if (event.currentTarget.hasAttribute("download")) return;
|
|
@@ -1333,7 +1341,7 @@ function LinkInner({
|
|
|
1333
1341
|
if (event.button !== 0) return;
|
|
1334
1342
|
if (typeof window !== "undefined") {
|
|
1335
1343
|
event.preventDefault();
|
|
1336
|
-
if (
|
|
1344
|
+
if (_chunkS6FJO323cjs.isFarmLocaleChangeHref.call(void 0, localizedHref)) {
|
|
1337
1345
|
window.location.assign(resolvedHref);
|
|
1338
1346
|
return;
|
|
1339
1347
|
}
|
|
@@ -1346,7 +1354,17 @@ function LinkInner({
|
|
|
1346
1354
|
}
|
|
1347
1355
|
}
|
|
1348
1356
|
},
|
|
1349
|
-
[
|
|
1357
|
+
[
|
|
1358
|
+
localizedHref,
|
|
1359
|
+
resolvedHref,
|
|
1360
|
+
replace,
|
|
1361
|
+
scroll,
|
|
1362
|
+
viewTransition,
|
|
1363
|
+
target,
|
|
1364
|
+
isExternal,
|
|
1365
|
+
isScriptHref,
|
|
1366
|
+
onClick
|
|
1367
|
+
]
|
|
1350
1368
|
);
|
|
1351
1369
|
const setRefs = _react.useCallback.call(void 0,
|
|
1352
1370
|
(node) => {
|
|
@@ -1360,7 +1378,7 @@ function LinkInner({
|
|
|
1360
1378
|
"a",
|
|
1361
1379
|
{
|
|
1362
1380
|
ref: setRefs,
|
|
1363
|
-
href: resolvedHref,
|
|
1381
|
+
href: isScriptHref ? void 0 : resolvedHref,
|
|
1364
1382
|
target,
|
|
1365
1383
|
onClick: handleClick,
|
|
1366
1384
|
onMouseEnter: handleMouseEnter,
|
|
@@ -1433,7 +1451,7 @@ function applyPreservedSearchParams(href) {
|
|
|
1433
1451
|
const manifest = window.__FARM_MANIFEST__;
|
|
1434
1452
|
const routes = _optionalChain([manifest, 'optionalAccess', _41 => _41.routes]) && typeof manifest.routes === "object" ? Object.values(manifest.routes) : [];
|
|
1435
1453
|
if (routes.length === 0) return href;
|
|
1436
|
-
const url =
|
|
1454
|
+
const url = _chunkJEZO6VURcjs.resolveFarmNavigationURL.call(void 0, href, window.location.href);
|
|
1437
1455
|
const route = routes.find((candidate) => matchManifestRoute(url.pathname, candidate));
|
|
1438
1456
|
const preserve = Array.isArray(_optionalChain([route, 'optionalAccess', _42 => _42.search, 'optionalAccess', _43 => _43.preserve])) ? route.search.preserve : [];
|
|
1439
1457
|
if (preserve.length === 0) return href;
|
|
@@ -190,6 +190,7 @@ function createFarmConfigResolutionPlugin(options) {
|
|
|
190
190
|
};
|
|
191
191
|
}
|
|
192
192
|
__name(createFarmConfigResolutionPlugin, "createFarmConfigResolutionPlugin");
|
|
193
|
+
var FARM_CONFIG_ROOT = /* @__PURE__ */ Symbol.for("farm.configRoot");
|
|
193
194
|
async function loadFarmConfigFile(configPath, options) {
|
|
194
195
|
const { transform } = await import("rolldown/utils");
|
|
195
196
|
const cacheRoot = path.resolve(options.cacheRoot || options.root);
|
|
@@ -207,6 +208,9 @@ async function loadFarmConfigFile(configPath, options) {
|
|
|
207
208
|
plugins: [createFarmConfigResolutionPlugin({ transform })]
|
|
208
209
|
});
|
|
209
210
|
const moduleUrl = `${pathToFileURL(modulePath).href}?t=${Date.now()}`;
|
|
211
|
+
const configRootState = globalThis;
|
|
212
|
+
const previousConfigRoot = configRootState[FARM_CONFIG_ROOT];
|
|
213
|
+
configRootState[FARM_CONFIG_ROOT] = cacheRoot;
|
|
210
214
|
try {
|
|
211
215
|
const loaded = await import(
|
|
212
216
|
/* @vite-ignore */
|
|
@@ -218,6 +222,7 @@ async function loadFarmConfigFile(configPath, options) {
|
|
|
218
222
|
}
|
|
219
223
|
return config;
|
|
220
224
|
} finally {
|
|
225
|
+
configRootState[FARM_CONFIG_ROOT] = previousConfigRoot;
|
|
221
226
|
await unlink(modulePath).catch(() => void 0);
|
|
222
227
|
}
|
|
223
228
|
}
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
"use strict";Object.defineProperty(exports, "__esModule", {value: true}); function _nullishCoalesce(lhs, rhsFn) { if (lhs != null) { return lhs; } else { return rhsFn(); } } function _optionalChain(ops) { let lastAccessLHS = undefined; let value = ops[0]; let i = 1; while (i < ops.length) { const op = ops[i]; const fn = ops[i + 1]; i += 2; if ((op === 'optionalAccess' || op === 'optionalCall') && value == null) { return undefined; } if (op === 'access' || op === 'optionalAccess') { lastAccessLHS = value; value = fn(value); } else if (op === 'call' || op === 'optionalCall') { value = fn((...args) => value.call(lastAccessLHS, ...args)); lastAccessLHS = undefined; } } return value; }
|
|
2
2
|
|
|
3
|
-
var
|
|
3
|
+
var _chunkKIIMAWOJcjs = require('./chunk-KIIMAWOJ.cjs');
|
|
4
4
|
|
|
5
5
|
|
|
6
6
|
var _chunkS3JO3N4Hcjs = require('./chunk-S3JO3N4H.cjs');
|
|
@@ -583,7 +583,7 @@ function createOptimizedImageResponse(request, image, config) {
|
|
|
583
583
|
if (image.contentType === "image/svg+xml" && config.dangerouslyAllowSVG) {
|
|
584
584
|
headers.set("content-security-policy", "default-src 'none'; sandbox");
|
|
585
585
|
}
|
|
586
|
-
if (
|
|
586
|
+
if (_chunkKIIMAWOJcjs.matchesFarmIfNoneMatch.call(void 0, request.headers.get("if-none-match"), image.etag)) {
|
|
587
587
|
headers.delete("content-length");
|
|
588
588
|
return new Response(null, { status: 304, headers });
|
|
589
589
|
}
|