@farm.js/core 0.2.0-beta.0 → 0.2.0-beta.2
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-handler-IUL6OPC3.cjs → agent-mcp-handler-EXOG55M4.cjs} +5 -5
- package/dist/{agent-mcp-handler-GDY5CPPW.mjs → agent-mcp-handler-VX4NDDHR.mjs} +4 -4
- package/dist/{agent-mcp.d-BdM0pIrD.d.ts → agent-mcp.d-DBaonhLg.d.ts} +1 -1
- package/dist/{agent-mcp.d-CMGqpUbk.d.mts → agent-mcp.d-DhCEzIfu.d.mts} +1 -1
- package/dist/agent-runtime.cjs +2 -2
- package/dist/agent-runtime.d.mts +1 -1
- package/dist/agent-runtime.d.ts +1 -1
- package/dist/agent-runtime.mjs +1 -1
- package/dist/analyzer-OWIHFO5M.cjs +17 -0
- package/dist/{analyzer-PWHYGER6.mjs → analyzer-T2U345WL.mjs} +2 -2
- package/dist/api/node.d.mts +3 -3
- package/dist/api/node.d.ts +3 -3
- package/dist/api/route-manager.cjs +3 -3
- package/dist/api/route-manager.d.mts +3 -3
- package/dist/api/route-manager.d.ts +3 -3
- package/dist/api/route-manager.mjs +2 -2
- package/dist/api/runtime.d.mts +2 -2
- package/dist/api/runtime.d.ts +2 -2
- package/dist/api.cjs +4 -4
- package/dist/api.d.mts +4 -4
- package/dist/api.d.ts +4 -4
- package/dist/api.mjs +3 -3
- package/dist/{app-manifest.d-COhjPgHn.d.ts → app-manifest.d-nLVFFd7N.d.ts} +1 -1
- package/dist/{app-manifest.d-BeDB2OVm.d.mts → app-manifest.d-uE0JGZKN.d.mts} +1 -1
- 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 +7 -5
- package/dist/{app.d-b3A4cca5.d.ts → app.d-CwVkAUEU.d.ts} +14 -8
- package/dist/{app.d-AVZXCfcO.d.mts → app.d-DGGcNXV7.d.mts} +14 -8
- package/dist/{chunk-AG27TI6Q.mjs → chunk-23NBOP43.mjs} +3 -0
- package/dist/{chunk-BGEA4K7C.mjs → chunk-26ZTI2ZO.mjs} +4 -4
- package/dist/{chunk-L6ZL35ZJ.mjs → chunk-4A6A6P4T.mjs} +2 -2
- package/dist/{chunk-ZOD6EYWE.mjs → chunk-4Q263EQI.mjs} +2 -2
- package/dist/{chunk-2NOHVIJ3.cjs → chunk-5LJF4KUZ.cjs} +17 -4
- package/dist/{chunk-5AL2GXAU.mjs → chunk-7MMDEIVC.mjs} +1 -1
- package/dist/{chunk-GV5D5EM6.mjs → chunk-ANKMAGFJ.mjs} +1 -1
- package/dist/{chunk-QBXS4TNG.mjs → chunk-BL54BTVJ.mjs} +1 -1
- package/dist/{chunk-YCHIR3X6.mjs → chunk-BW563VZZ.mjs} +34 -2
- package/dist/{chunk-XRYLMTYF.cjs → chunk-CBB7I6HW.cjs} +3 -3
- package/dist/{chunk-KMGHXIDA.cjs → chunk-CHOOBTDD.cjs} +2 -2
- package/dist/{chunk-MRULVIH3.mjs → chunk-COK4IXOO.mjs} +35 -18
- package/dist/{chunk-YU2MNIIY.mjs → chunk-CRF5MOLO.mjs} +17 -4
- package/dist/{chunk-NQ3Y6E2T.mjs → chunk-CV4MOEMO.mjs} +2 -2
- package/dist/{chunk-OLKYHTLN.cjs → chunk-DA432P2F.cjs} +5 -5
- package/dist/{chunk-B3HQTGXS.cjs → chunk-DVAZ53X6.cjs} +6 -1
- package/dist/{chunk-XRSNW4IU.mjs → chunk-E72GG355.mjs} +5 -0
- package/dist/{chunk-CNGGEHXY.cjs → chunk-EA5HVG45.cjs} +2 -2
- package/dist/{chunk-NG2EZ6QS.cjs → chunk-EODGIFI7.cjs} +4 -2
- package/dist/{chunk-Y3DO7BIJ.cjs → chunk-EUZFBHPP.cjs} +3 -0
- package/dist/{chunk-ERV422FO.cjs → chunk-EXPVSFAG.cjs} +16 -13
- package/dist/{chunk-EACD6ND7.cjs → chunk-EZUTDTFM.cjs} +7 -7
- package/dist/{chunk-PTAGDZ7I.mjs → chunk-GTHBWZUK.mjs} +5 -1
- package/dist/{chunk-KCJBIWBM.mjs → chunk-GVORDLLV.mjs} +1 -1
- package/dist/{chunk-XGL42MQ7.mjs → chunk-HIDZM23B.mjs} +1 -1
- package/dist/{chunk-W3ZBLFLU.mjs → chunk-HNB5JHBO.mjs} +6 -3
- package/dist/{chunk-MM4U2NNI.mjs → chunk-HVGINJTO.mjs} +101 -42
- package/dist/{chunk-XJJQAFZX.mjs → chunk-I5KPOXUE.mjs} +1 -1
- package/dist/{chunk-HR5GU4UU.cjs → chunk-ILQSRLKK.cjs} +4 -4
- package/dist/{chunk-TQFIZRON.cjs → chunk-J2EKGR6E.cjs} +1030 -485
- package/dist/{chunk-26WP75W5.cjs → chunk-JDT733EW.cjs} +41 -27
- package/dist/{chunk-W53Z4WDI.cjs → chunk-JH4CDG4G.cjs} +8 -8
- package/dist/{chunk-KQ6TYQU7.cjs → chunk-KDQKTX3Q.cjs} +4 -4
- package/dist/{chunk-PEQJ4UUT.mjs → chunk-LP6DIYGA.mjs} +2 -2
- package/dist/{chunk-M4CNAZMS.mjs → chunk-LQ3FISSD.mjs} +61 -40
- package/dist/{chunk-PQ6DBVJ2.cjs → chunk-M4YXD6MD.cjs} +291 -232
- package/dist/{chunk-CFLRUCN7.cjs → chunk-MWAWMFG3.cjs} +415 -394
- package/dist/{chunk-ECVSRE4Y.mjs → chunk-N2BRIN7I.mjs} +1 -1
- package/dist/{chunk-SUACCCZG.cjs → chunk-N2ZMSSPP.cjs} +11 -11
- package/dist/{chunk-MO4UTDQ6.mjs → chunk-NNNMFSXG.mjs} +1 -1
- package/dist/{chunk-6266WH6X.cjs → chunk-NOSLIDSG.cjs} +1 -1
- package/dist/{chunk-ICOJ2BC6.mjs → chunk-NWF2FTFV.mjs} +24 -10
- package/dist/{chunk-HU4R2PPW.cjs → chunk-NZRAUCUL.cjs} +2 -2
- package/dist/{chunk-VMGQOP7X.cjs → chunk-OLIWLN4I.cjs} +2 -2
- package/dist/{chunk-H47EH24T.mjs → chunk-OQOII62L.mjs} +1 -1
- package/dist/{chunk-BJHXFEAF.mjs → chunk-P2TGLGRR.mjs} +4 -4
- package/dist/{chunk-THGSPDFD.cjs → chunk-PAKB6JHX.cjs} +7 -7
- package/dist/{chunk-WOTAU3BN.mjs → chunk-Q637AXGZ.mjs} +218 -74
- package/dist/{chunk-ZZGQD3LL.mjs → chunk-QO24II6C.mjs} +4 -2
- package/dist/{chunk-SG5RFGV6.cjs → chunk-RBSGFS5X.cjs} +66 -34
- package/dist/{chunk-IJPRCQHW.cjs → chunk-RGMUS3HO.cjs} +10 -10
- package/dist/{chunk-PA3VZNWU.cjs → chunk-RTAWQXME.cjs} +324 -180
- package/dist/{chunk-DMSXZNQR.cjs → chunk-RZI6436F.cjs} +2 -2
- package/dist/{chunk-HZY63K5C.mjs → chunk-S6MGFULY.mjs} +2 -2
- package/dist/{chunk-5GFTMTX3.cjs → chunk-SAUGKNCF.cjs} +2 -2
- package/dist/{chunk-JGUMFTZT.cjs → chunk-SCE7VWPN.cjs} +12 -12
- package/dist/{chunk-BQHIJOZM.cjs → chunk-SIECKBNK.cjs} +6 -2
- package/dist/{chunk-JDO3X7RB.mjs → chunk-SPKZCFPH.mjs} +1 -1
- package/dist/{chunk-LUGQUU4S.mjs → chunk-SSFAPTRD.mjs} +1 -1
- package/dist/{chunk-7LBNWL3L.cjs → chunk-SWPLGPYF.cjs} +7 -7
- package/dist/{chunk-3MY6TNNE.cjs → chunk-TWFJJPE7.cjs} +3 -3
- package/dist/{chunk-WP77JDKI.cjs → chunk-UCJCU2IL.cjs} +14 -14
- package/dist/{chunk-WX752VMN.mjs → chunk-UCRNNDNS.mjs} +1 -1
- package/dist/{chunk-FEWCWBOF.cjs → chunk-UGWKNZ4U.cjs} +44 -27
- package/dist/{chunk-IRPXOTEN.cjs → chunk-UOMSGJHK.cjs} +11 -11
- package/dist/{chunk-WPB6HJC7.mjs → chunk-UWDFH3ZV.mjs} +1 -1
- package/dist/{chunk-MZPPT5NA.mjs → chunk-V5FEFFHV.mjs} +1 -1
- package/dist/{chunk-HR4N2K4V.mjs → chunk-WABOJXAA.mjs} +2 -2
- package/dist/{chunk-LTXKRIST.mjs → chunk-WANLI3ZC.mjs} +2 -2
- package/dist/{chunk-5ZWXTIGE.cjs → chunk-WEZTGM7N.cjs} +2 -2
- package/dist/{chunk-HQEYZSF3.cjs → chunk-WPURVYXT.cjs} +2 -2
- package/dist/{chunk-TE7AX6HB.mjs → chunk-WV63R4GE.mjs} +1 -1
- package/dist/{chunk-SCOKBXHS.mjs → chunk-XOLYZZDX.mjs} +696 -151
- package/dist/{chunk-4ZVKDHS6.cjs → chunk-YSRZSKQB.cjs} +4 -4
- package/dist/{cli-runtime.d-jqZ7YCsm.d.ts → cli-runtime.d-Dbl-gIoz.d.ts} +5 -5
- package/dist/{cli-runtime.d-qL44rqYO.d.mts → cli-runtime.d-oUiNuspW.d.mts} +5 -5
- package/dist/{client-component.d-BDD5aiUb.d.ts → client-component.d-CT4q7tmy.d.ts} +1 -1
- package/dist/{client-component.d-B2L2LyAr.d.mts → client-component.d-DaUqOhZT.d.mts} +1 -1
- package/dist/{client-plugins.d-Crct3m_r.d.ts → client-plugins.d-24qhjX8c.d.ts} +30 -4
- package/dist/{client-plugins.d-Dzc3vOw_.d.mts → client-plugins.d-BfGTqbAH.d.mts} +30 -4
- package/dist/client-plugins.d.mts +1 -1
- package/dist/client-plugins.d.ts +1 -1
- package/dist/client.cjs +4 -4
- package/dist/client.d.mts +7 -7
- package/dist/client.d.ts +7 -7
- package/dist/client.mjs +3 -3
- package/dist/config.d.mts +1 -1
- package/dist/config.d.ts +1 -1
- package/dist/desktop.d.mts +2 -2
- package/dist/desktop.d.ts +2 -2
- package/dist/{devtools-RL4AU5KD.cjs → devtools-5WDQQDTA.cjs} +6 -6
- package/dist/{devtools-2CRVXV7E.mjs → devtools-DPYIYHTI.mjs} +5 -5
- package/dist/docs.cjs +8 -8
- package/dist/docs.d.mts +3 -3
- package/dist/docs.d.ts +3 -3
- package/dist/docs.mjs +7 -7
- package/dist/environment/vite.cjs +3 -3
- package/dist/environment/vite.mjs +2 -2
- package/dist/{handler.d-B1S1ZBqS.d.mts → handler.d-GfNuz57p.d.mts} +1 -1
- package/dist/{handler.d-ZweCBJD4.d.ts → handler.d-Oca5kNSz.d.ts} +1 -1
- package/dist/{headers.d-C-yGl_f6.d.mts → headers.d-C_lsQIWA.d.mts} +1 -1
- package/dist/{headers.d-BgBdQN8x.d.ts → headers.d-b8gHJDvu.d.ts} +1 -1
- package/dist/index.cjs +42 -38
- package/dist/{index.d-13h3oDu7.d.mts → index.d-BLtjh1aS.d.mts} +1 -1
- package/dist/{index.d-CtoniAXT.d.ts → index.d-Ckv6kHFm.d.ts} +1 -1
- package/dist/index.d.mts +23 -23
- package/dist/index.d.ts +23 -23
- package/dist/index.mjs +39 -35
- package/dist/integrations/orm.d.mts +1 -1
- package/dist/integrations/orm.d.ts +1 -1
- package/dist/integrations.cjs +4 -2
- package/dist/integrations.d.mts +1 -1
- package/dist/integrations.d.ts +1 -1
- package/dist/integrations.mjs +3 -1
- package/dist/internal/app-markdown-runtime.cjs +5 -3
- package/dist/internal/app-markdown-runtime.d.mts +10 -5
- package/dist/internal/app-markdown-runtime.d.ts +10 -5
- package/dist/internal/app-markdown-runtime.mjs +6 -4
- package/dist/internal/build-runtime.cjs +29 -29
- package/dist/internal/build-runtime.d.mts +4 -4
- package/dist/internal/build-runtime.d.ts +4 -4
- package/dist/internal/build-runtime.mjs +28 -28
- package/dist/internal/cli-runtime.cjs +12 -12
- package/dist/internal/cli-runtime.d.mts +7 -7
- package/dist/internal/cli-runtime.d.ts +7 -7
- package/dist/internal/cli-runtime.mjs +11 -11
- package/dist/internal/client-error-overlay.cjs +4 -4
- package/dist/internal/client-error-overlay.mjs +1 -1
- package/dist/internal/client-runtime.d.mts +5 -5
- package/dist/internal/client-runtime.d.ts +5 -5
- package/dist/internal/compression-runtime.d.mts +1 -1
- package/dist/internal/compression-runtime.d.ts +1 -1
- package/dist/internal/config-runtime.cjs +7 -7
- package/dist/internal/config-runtime.d.mts +3 -3
- package/dist/internal/config-runtime.d.ts +3 -3
- package/dist/internal/config-runtime.mjs +6 -6
- package/dist/internal/infra-analytics-runtime.cjs +9 -9
- package/dist/internal/infra-analytics-runtime.mjs +7 -7
- package/dist/internal/metadata-image-runtime.d.mts +2 -2
- package/dist/internal/metadata-image-runtime.d.ts +2 -2
- package/dist/internal/native-server-fns.cjs +4 -4
- package/dist/internal/native-server-fns.mjs +3 -3
- package/dist/internal/product-telemetry-runtime.cjs +3 -3
- package/dist/internal/product-telemetry-runtime.mjs +2 -2
- package/dist/internal/production-node-env.cjs +2 -2
- package/dist/internal/production-node-env.mjs +1 -1
- package/dist/internal/production-runtime.cjs +12 -12
- package/dist/internal/production-runtime.d.mts +10 -10
- package/dist/internal/production-runtime.d.ts +10 -10
- package/dist/internal/production-runtime.mjs +11 -11
- package/dist/internal/spa-router.cjs +3 -3
- package/dist/internal/spa-router.d.mts +3 -3
- package/dist/internal/spa-router.d.ts +3 -3
- package/dist/internal/spa-router.mjs +2 -2
- package/dist/internal/start-manifest.d.mts +1 -1
- package/dist/internal/start-manifest.d.ts +1 -1
- package/dist/{manager-D4DZRBRS.cjs → manager-37UJPUN4.cjs} +4 -4
- package/dist/{manager-PKPQGBAE.mjs → manager-7BNSJKME.mjs} +3 -3
- package/dist/markdown.cjs +2 -2
- package/dist/markdown.d.mts +1 -1
- package/dist/markdown.d.ts +1 -1
- package/dist/markdown.mjs +1 -1
- package/dist/middleware.d.mts +1 -1
- package/dist/middleware.d.ts +1 -1
- package/dist/{mount.d-_6Un9wdK.d.mts → mount.d-BCS8mD4E.d.mts} +1 -1
- package/dist/{mount.d-DyKlRR6z.d.ts → mount.d-DEX8eref.d.ts} +1 -1
- package/dist/{native-tree-5TENEQ7Y.cjs → native-tree-52CUAP3N.cjs} +3 -3
- package/dist/{native-tree-LNO7K6JR.mjs → native-tree-AO7PQ7FR.mjs} +2 -2
- package/dist/{navigation-delegate.d-BbW1_pf_.d.ts → navigation-delegate.d-Cgi28e5Q.d.ts} +1 -1
- package/dist/{navigation-delegate.d-B9GjWbov.d.mts → navigation-delegate.d-F83ugsZW.d.mts} +1 -1
- package/dist/navigation.cjs +5 -5
- package/dist/navigation.d.mts +4 -4
- package/dist/navigation.d.ts +4 -4
- package/dist/navigation.mjs +4 -4
- package/dist/plugin.cjs +22 -22
- package/dist/plugin.d.mts +5 -5
- package/dist/plugin.d.ts +5 -5
- package/dist/plugin.mjs +21 -21
- package/dist/query/client.cjs +7 -7
- package/dist/query/client.mjs +2 -2
- package/dist/{render-plan.d-DaM1NPnm.d.mts → render-plan.d-BkVY4aFb.d.mts} +1 -1
- package/dist/{render-plan.d-D0FV9lDT.d.ts → render-plan.d-DCF2GZdD.d.ts} +1 -1
- package/dist/renderer-client.cjs +5 -5
- package/dist/renderer-client.d.mts +5 -5
- package/dist/renderer-client.d.ts +5 -5
- package/dist/renderer-client.mjs +2 -2
- package/dist/renderer.d.mts +22 -11
- package/dist/renderer.d.ts +22 -11
- package/dist/{request.d-CrXC7voZ.d.ts → request.d-C5o-4dU2.d.ts} +1 -1
- package/dist/{request.d-DVSLilGx.d.mts → request.d-DMPB53-i.d.mts} +1 -1
- package/dist/request.d.mts +2 -2
- package/dist/request.d.ts +2 -2
- package/dist/{route-rendering.d-CWi3UYtR.d.mts → route-rendering.d-DDvArvik.d.mts} +1 -1
- package/dist/{route-rendering.d-OfbM_rj8.d.ts → route-rendering.d-DfP6zRP7.d.ts} +1 -1
- package/dist/{router.d-YKVirmj4.d.mts → router.d-1Skf2XCO.d.mts} +1 -1
- package/dist/{router.d-Bm9FNSu3.d.ts → router.d-s40h7aoS.d.ts} +1 -1
- package/dist/routes.d.mts +3 -3
- package/dist/routes.d.ts +3 -3
- package/dist/{rsc-pipeline-LRB4ZG6I.mjs → rsc-pipeline-O2YMVHUF.mjs} +7 -7
- package/dist/{rsc-pipeline-3DYC5ZXW.cjs → rsc-pipeline-SFQSMVI7.cjs} +8 -8
- package/dist/{runtime-3WJNNAAR.mjs → runtime-K2X3IZAF.mjs} +6 -6
- package/dist/{runtime-CRFF32H6.cjs → runtime-WOTVFYQY.cjs} +8 -8
- package/dist/{runtime.d-BVj6apd0.d.mts → runtime.d-Bykc5Qfg.d.mts} +1 -1
- package/dist/{runtime.d-D7QYVJGO.d.ts → runtime.d-k-9kFUsM.d.ts} +1 -1
- package/dist/{server-components-status.d-BDVcxi0z.d.mts → server-components-status.d-D-HixBe0.d.mts} +1 -1
- package/dist/{server-components-status.d-CfKDpmCH.d.ts → server-components-status.d-DLNd1C5j.d.ts} +1 -1
- package/dist/server-plugins.d.mts +3 -3
- package/dist/server-plugins.d.ts +3 -3
- package/dist/server.cjs +47 -46
- package/dist/server.d.mts +11 -11
- package/dist/server.d.ts +11 -11
- package/dist/server.mjs +26 -25
- package/dist/{spa-router.d-DGmropfK.d.mts → spa-router.d-DIlXwm00.d.mts} +2 -2
- package/dist/{spa-router.d-nE1jHNGt.d.ts → spa-router.d-Dl-EJeJT.d.ts} +2 -2
- package/dist/{ssg.d-DS-gXUbf.d.mts → ssg.d-D2ZV0bhs.d.mts} +2 -2
- package/dist/{ssg.d-jXlUAKzg.d.ts → ssg.d-bE-ylg0e.d.ts} +2 -2
- package/dist/{store-core.d-B5cwOd8g.d.ts → store-core.d-BmdnMopD.d.ts} +2 -2
- package/dist/{store-core.d-C-gATBwd.d.mts → store-core.d-DPsCYzV7.d.mts} +2 -2
- package/dist/testing.cjs +2 -2
- package/dist/testing.d.mts +1 -1
- package/dist/testing.d.ts +1 -1
- package/dist/testing.mjs +2 -2
- package/dist/{utils.d-BODwBtkz.d.ts → utils.d-BFZQcBZV.d.ts} +1 -1
- package/dist/{utils.d-Cmj-fzds.d.mts → utils.d-nM3OHKq5.d.mts} +1 -1
- package/dist/version.cjs +2 -2
- package/dist/version.mjs +1 -1
- package/dist/vite.cjs +22 -22
- package/dist/vite.d.mts +6 -6
- package/dist/vite.d.ts +6 -6
- package/dist/vite.mjs +21 -21
- package/package.json +1 -1
- package/dist/analyzer-B2TRJT3B.cjs +0 -17
|
@@ -28,7 +28,7 @@ var _chunkYUCU6XB4cjs = require('./chunk-YUCU6XB4.cjs');
|
|
|
28
28
|
var _chunk7U4XF76Rcjs = require('./chunk-7U4XF76R.cjs');
|
|
29
29
|
|
|
30
30
|
|
|
31
|
-
var
|
|
31
|
+
var _chunkNOSLIDSGcjs = require('./chunk-NOSLIDSG.cjs');
|
|
32
32
|
|
|
33
33
|
// src/environment-vite.ts
|
|
34
34
|
var _fs = require('fs'); var _fs2 = _interopRequireDefault(_fs);
|
|
@@ -158,9 +158,16 @@ var snapshot;
|
|
|
158
158
|
var base;
|
|
159
159
|
var volatile;
|
|
160
160
|
var trace;
|
|
161
|
+
var traceGroups;
|
|
161
162
|
function farmSourceSnapshotPathKey(file, paths = _path2.default) {
|
|
163
|
+
if (paths === _path2.default && _path2.default.sep === "/" && isNormalizedPosixPath(file)) return file;
|
|
162
164
|
return paths.resolve(file);
|
|
163
165
|
}
|
|
166
|
+
function isNormalizedPosixPath(file) {
|
|
167
|
+
if (file.charCodeAt(0) !== 47) return false;
|
|
168
|
+
if (file.length === 1) return true;
|
|
169
|
+
return !file.endsWith("/") && !file.endsWith("/.") && !file.endsWith("/..") && !file.includes("//") && !file.includes("/./") && !file.includes("/../");
|
|
170
|
+
}
|
|
164
171
|
function getFarmSourceStamp(file) {
|
|
165
172
|
try {
|
|
166
173
|
const stat = _fs2.default.statSync(file);
|
|
@@ -268,15 +275,34 @@ function memoizeInFarmSourceSnapshot(scope, key, compute, lasting) {
|
|
|
268
275
|
function noteFarmSourceRead(file) {
|
|
269
276
|
_optionalChain([trace, 'optionalAccess', _20 => _20.add, 'call', _21 => _21(file)]);
|
|
270
277
|
}
|
|
278
|
+
function noteFarmSourceReads(files) {
|
|
279
|
+
if (traceGroups) traceGroups.add(files);
|
|
280
|
+
else if (trace) for (const file of files) trace.add(file);
|
|
281
|
+
}
|
|
271
282
|
function traceFarmSourceReads(operation) {
|
|
283
|
+
const { result, files } = traceReads(operation, false);
|
|
284
|
+
return { result, files: [...files] };
|
|
285
|
+
}
|
|
286
|
+
function traceFarmSourceReadGroups(operation) {
|
|
287
|
+
const { result, files, groups } = traceReads(operation, true);
|
|
288
|
+
return { result, files: [...files], groups: [...groups] };
|
|
289
|
+
}
|
|
290
|
+
function traceReads(operation, grouped) {
|
|
272
291
|
const outer = trace;
|
|
292
|
+
const outerGroups = traceGroups;
|
|
273
293
|
const files = /* @__PURE__ */ new Set();
|
|
294
|
+
const groups = grouped ? /* @__PURE__ */ new Set() : void 0;
|
|
274
295
|
trace = files;
|
|
296
|
+
traceGroups = groups;
|
|
275
297
|
try {
|
|
276
|
-
return { result: operation(), files
|
|
298
|
+
return { result: operation(), files, groups };
|
|
277
299
|
} finally {
|
|
278
300
|
trace = outer;
|
|
279
|
-
|
|
301
|
+
traceGroups = outerGroups;
|
|
302
|
+
if (outer) {
|
|
303
|
+
for (const file of files) outer.add(file);
|
|
304
|
+
if (groups) for (const group of groups) noteFarmSourceReads(group);
|
|
305
|
+
}
|
|
280
306
|
}
|
|
281
307
|
}
|
|
282
308
|
|
|
@@ -304,11 +330,19 @@ function packageNameOf(specifier) {
|
|
|
304
330
|
return { name, subpath: parts.slice(name.startsWith("@") ? 2 : 1).join("/") };
|
|
305
331
|
}
|
|
306
332
|
function findPackageDirectory(importer, name) {
|
|
307
|
-
|
|
308
|
-
|
|
309
|
-
|
|
310
|
-
|
|
311
|
-
|
|
333
|
+
const start = _path2.default.dirname(importer);
|
|
334
|
+
return memoizeInFarmSourceSnapshot(
|
|
335
|
+
"package-directory",
|
|
336
|
+
`${farmSourceSnapshotPathKey(start)}\0${name}`,
|
|
337
|
+
() => {
|
|
338
|
+
for (let current = start; ; current = _path2.default.dirname(current)) {
|
|
339
|
+
const directory = _path2.default.join(current, "node_modules", name);
|
|
340
|
+
if (_fs2.default.existsSync(_path2.default.join(directory, "package.json"))) return _fs2.default.realpathSync(directory);
|
|
341
|
+
if (_path2.default.dirname(current) === current) return null;
|
|
342
|
+
}
|
|
343
|
+
},
|
|
344
|
+
(directory) => directory !== null
|
|
345
|
+
);
|
|
312
346
|
}
|
|
313
347
|
function pickTarget(value, conditions) {
|
|
314
348
|
if (typeof value === "string") return value;
|
|
@@ -505,7 +539,11 @@ function traceExport(file, name, depth) {
|
|
|
505
539
|
return void 0;
|
|
506
540
|
}
|
|
507
541
|
function traceFarmExport(file, name) {
|
|
508
|
-
return
|
|
542
|
+
return memoizeInFarmSourceSnapshot(
|
|
543
|
+
"export-kind",
|
|
544
|
+
`${farmSourceSnapshotPathKey(file)}\0${name}`,
|
|
545
|
+
() => _optionalChain([traceExport, 'call', _34 => _34(file, name, 0), 'optionalAccess', _35 => _35.kind])
|
|
546
|
+
);
|
|
509
547
|
}
|
|
510
548
|
function isFarmClientExport(file, name) {
|
|
511
549
|
return traceFarmExport(file, name) === "client";
|
|
@@ -785,9 +823,21 @@ function readModuleImports(file) {
|
|
|
785
823
|
return imports;
|
|
786
824
|
}
|
|
787
825
|
var clientOnlyFreeFiles = /* @__PURE__ */ new Set();
|
|
788
|
-
function invalidateFarmClientOnlyScan() {
|
|
826
|
+
function invalidateFarmClientOnlyScan(file, event) {
|
|
827
|
+
if (file && event === "update" && _path2.default.basename(file) !== "package.json" && !isClientOnlyScanned(file)) {
|
|
828
|
+
return;
|
|
829
|
+
}
|
|
789
830
|
clientOnlyFreeFiles.clear();
|
|
790
831
|
}
|
|
832
|
+
function isClientOnlyScanned(file) {
|
|
833
|
+
const resolved = _path2.default.resolve(file);
|
|
834
|
+
if (clientOnlyFreeFiles.has(resolved)) return true;
|
|
835
|
+
try {
|
|
836
|
+
return clientOnlyFreeFiles.has(_fs2.default.realpathSync(resolved));
|
|
837
|
+
} catch (e11) {
|
|
838
|
+
return true;
|
|
839
|
+
}
|
|
840
|
+
}
|
|
791
841
|
function resolveServerEntry(importer, specifier) {
|
|
792
842
|
const parsed = packageNameOf(specifier);
|
|
793
843
|
if (!parsed || REACT_PACKAGES.has(parsed.name) || parsed.name.startsWith("@farm.js/")) {
|
|
@@ -873,7 +923,7 @@ function stampScannedPath(directory, target) {
|
|
|
873
923
|
const stat = _fs2.default.statSync(target, { throwIfNoEntry: false });
|
|
874
924
|
if (!stat) return void 0;
|
|
875
925
|
return [_path2.default.relative(directory, target), stat.size, stat.mtimeMs, stat.ctimeMs];
|
|
876
|
-
} catch (
|
|
926
|
+
} catch (e12) {
|
|
877
927
|
return void 0;
|
|
878
928
|
}
|
|
879
929
|
}
|
|
@@ -886,12 +936,12 @@ function usePackageScanCacheFile(file) {
|
|
|
886
936
|
const stored = /* @__PURE__ */ new Map();
|
|
887
937
|
try {
|
|
888
938
|
const value = JSON.parse(_fs2.default.readFileSync(file, "utf8"));
|
|
889
|
-
if (_optionalChain([value, 'optionalAccess', _68 => _68.schema]) === PACKAGE_SCAN_CACHE_SCHEMA && value.farm ===
|
|
939
|
+
if (_optionalChain([value, 'optionalAccess', _68 => _68.schema]) === PACKAGE_SCAN_CACHE_SCHEMA && value.farm === _chunkNOSLIDSGcjs.FARM_VERSION && value.scans && typeof value.scans === "object") {
|
|
890
940
|
for (const [directory, scan] of Object.entries(value.scans)) {
|
|
891
941
|
if (isStoredPackageScan(scan)) stored.set(directory, scan);
|
|
892
942
|
}
|
|
893
943
|
}
|
|
894
|
-
} catch (
|
|
944
|
+
} catch (e13) {
|
|
895
945
|
}
|
|
896
946
|
packageScanCache = { file, stored, dirty: false };
|
|
897
947
|
}
|
|
@@ -915,14 +965,14 @@ function persistPackageScanCache() {
|
|
|
915
965
|
_fs2.default.mkdirSync(_path2.default.dirname(cache2.file), { recursive: true });
|
|
916
966
|
_fs2.default.writeFileSync(
|
|
917
967
|
temporary,
|
|
918
|
-
JSON.stringify({ schema: PACKAGE_SCAN_CACHE_SCHEMA, farm:
|
|
968
|
+
JSON.stringify({ schema: PACKAGE_SCAN_CACHE_SCHEMA, farm: _chunkNOSLIDSGcjs.FARM_VERSION, scans })
|
|
919
969
|
);
|
|
920
970
|
_fs2.default.renameSync(temporary, cache2.file);
|
|
921
971
|
cache2.dirty = false;
|
|
922
|
-
} catch (
|
|
972
|
+
} catch (e14) {
|
|
923
973
|
try {
|
|
924
974
|
_fs2.default.rmSync(temporary, { force: true });
|
|
925
|
-
} catch (
|
|
975
|
+
} catch (e15) {
|
|
926
976
|
}
|
|
927
977
|
}
|
|
928
978
|
}
|
|
@@ -946,7 +996,7 @@ function scanPackage(directory) {
|
|
|
946
996
|
stamps.push(stampScannedPath(directory, current));
|
|
947
997
|
try {
|
|
948
998
|
entries = _fs2.default.readdirSync(current, { withFileTypes: true });
|
|
949
|
-
} catch (
|
|
999
|
+
} catch (e16) {
|
|
950
1000
|
continue;
|
|
951
1001
|
}
|
|
952
1002
|
for (const entry of entries) {
|
|
@@ -958,7 +1008,7 @@ function scanPackage(directory) {
|
|
|
958
1008
|
stamps.push(stampScannedPath(directory, file));
|
|
959
1009
|
try {
|
|
960
1010
|
code = _fs2.default.readFileSync(file, "utf8");
|
|
961
|
-
} catch (
|
|
1011
|
+
} catch (e17) {
|
|
962
1012
|
continue;
|
|
963
1013
|
}
|
|
964
1014
|
for (const match of code.matchAll(IMPORT_SPECIFIER)) scan.imports.add(match[1]);
|
|
@@ -985,7 +1035,7 @@ function findFarmServerBundledPackage(importer, specifier) {
|
|
|
985
1035
|
if (manifest.exports === void 0 && manifest.type !== "module" && typeof manifest.module === "string" && typeof manifest.main === "string" && _path2.default.resolve(directory, manifest.main) !== _path2.default.resolve(directory, manifest.module)) {
|
|
986
1036
|
return { name: parsed.name, prebundle: isSelfContainedPackage(manifest, importer) };
|
|
987
1037
|
}
|
|
988
|
-
} catch (
|
|
1038
|
+
} catch (e18) {
|
|
989
1039
|
return null;
|
|
990
1040
|
}
|
|
991
1041
|
const scan = scanPackage(directory);
|
|
@@ -1008,7 +1058,7 @@ function findFarmPackageManifest(importer, specifier) {
|
|
|
1008
1058
|
try {
|
|
1009
1059
|
const manifest = JSON.parse(_fs2.default.readFileSync(_path2.default.join(directory, "package.json"), "utf8"));
|
|
1010
1060
|
names = new Set(Object.keys(_nullishCoalesce(manifest.dependencies, () => ( {}))));
|
|
1011
|
-
} catch (
|
|
1061
|
+
} catch (e19) {
|
|
1012
1062
|
return null;
|
|
1013
1063
|
}
|
|
1014
1064
|
const dependencies = [...scanPackage(directory).imports].filter((imported) => {
|
|
@@ -1454,7 +1504,7 @@ function holdsRouteDefinition(value, definitions) {
|
|
|
1454
1504
|
if (descriptor && "value" in descriptor) next(descriptor.value);
|
|
1455
1505
|
}
|
|
1456
1506
|
}
|
|
1457
|
-
} catch (
|
|
1507
|
+
} catch (e20) {
|
|
1458
1508
|
}
|
|
1459
1509
|
}
|
|
1460
1510
|
return false;
|
|
@@ -1547,7 +1597,7 @@ function readJsonString(text) {
|
|
|
1547
1597
|
try {
|
|
1548
1598
|
const value = JSON.parse(text);
|
|
1549
1599
|
return typeof value === "string" ? value : void 0;
|
|
1550
|
-
} catch (
|
|
1600
|
+
} catch (e21) {
|
|
1551
1601
|
return void 0;
|
|
1552
1602
|
}
|
|
1553
1603
|
}
|
|
@@ -1555,7 +1605,7 @@ function readJsonArray(text) {
|
|
|
1555
1605
|
try {
|
|
1556
1606
|
const value = JSON.parse(text);
|
|
1557
1607
|
return Array.isArray(value) ? value : void 0;
|
|
1558
|
-
} catch (
|
|
1608
|
+
} catch (e22) {
|
|
1559
1609
|
return void 0;
|
|
1560
1610
|
}
|
|
1561
1611
|
}
|
|
@@ -1565,13 +1615,13 @@ function readExports(namespace) {
|
|
|
1565
1615
|
let keys;
|
|
1566
1616
|
try {
|
|
1567
1617
|
keys = Object.keys(namespace);
|
|
1568
|
-
} catch (
|
|
1618
|
+
} catch (e23) {
|
|
1569
1619
|
return [];
|
|
1570
1620
|
}
|
|
1571
1621
|
for (const key of keys) {
|
|
1572
1622
|
try {
|
|
1573
1623
|
entries.push([key, namespace[key]]);
|
|
1574
|
-
} catch (
|
|
1624
|
+
} catch (e24) {
|
|
1575
1625
|
}
|
|
1576
1626
|
}
|
|
1577
1627
|
return entries;
|
|
@@ -1604,7 +1654,7 @@ function toModuleFile(file) {
|
|
|
1604
1654
|
if (file.startsWith("file://")) {
|
|
1605
1655
|
try {
|
|
1606
1656
|
return toPosixPath(_url.fileURLToPath.call(void 0, file));
|
|
1607
|
-
} catch (
|
|
1657
|
+
} catch (e25) {
|
|
1608
1658
|
return toPosixPath(file);
|
|
1609
1659
|
}
|
|
1610
1660
|
}
|
|
@@ -1634,7 +1684,7 @@ function parse(code, file) {
|
|
|
1634
1684
|
function parseAs(code, lang) {
|
|
1635
1685
|
try {
|
|
1636
1686
|
return _parseAst.parseAst.call(void 0, code, { lang });
|
|
1637
|
-
} catch (
|
|
1687
|
+
} catch (e26) {
|
|
1638
1688
|
return null;
|
|
1639
1689
|
}
|
|
1640
1690
|
}
|
|
@@ -1769,16 +1819,23 @@ function specifierPackage(specifier) {
|
|
|
1769
1819
|
return specifier.startsWith("@") ? parts.slice(0, 2).join("/") : parts[0];
|
|
1770
1820
|
}
|
|
1771
1821
|
function packageLookup(directory, packageName) {
|
|
1772
|
-
|
|
1773
|
-
|
|
1774
|
-
|
|
1775
|
-
|
|
1776
|
-
|
|
1777
|
-
|
|
1822
|
+
return memoizeInFarmSourceSnapshot(
|
|
1823
|
+
"package-lookup",
|
|
1824
|
+
`${farmSourceSnapshotPathKey(directory)}\0${packageName}`,
|
|
1825
|
+
() => {
|
|
1826
|
+
for (let current = directory; ; current = _path2.default.dirname(current)) {
|
|
1827
|
+
if (_path2.default.basename(current) !== "node_modules") {
|
|
1828
|
+
const candidate = _path2.default.join(current, "node_modules", packageName);
|
|
1829
|
+
try {
|
|
1830
|
+
return { from: current, real: _fs2.default.realpathSync(candidate) };
|
|
1831
|
+
} catch (e27) {
|
|
1832
|
+
}
|
|
1833
|
+
}
|
|
1834
|
+
if (_path2.default.dirname(current) === current) return null;
|
|
1778
1835
|
}
|
|
1779
|
-
}
|
|
1780
|
-
|
|
1781
|
-
|
|
1836
|
+
},
|
|
1837
|
+
(result) => result !== null
|
|
1838
|
+
);
|
|
1782
1839
|
}
|
|
1783
1840
|
function referenceResolveFrom(root, specifier, importer) {
|
|
1784
1841
|
const packageName = specifierPackage(specifier);
|
|
@@ -1788,7 +1845,7 @@ function referenceResolveFrom(root, specifier, importer) {
|
|
|
1788
1845
|
if (_optionalChain([app, 'optionalAccess', _101 => _101.real]) === own.real) return null;
|
|
1789
1846
|
try {
|
|
1790
1847
|
return _fs2.default.realpathSync(own.from);
|
|
1791
|
-
} catch (
|
|
1848
|
+
} catch (e28) {
|
|
1792
1849
|
return own.from;
|
|
1793
1850
|
}
|
|
1794
1851
|
}
|
|
@@ -1811,15 +1868,12 @@ function ensureFarmPackageClientReference(root, specifier, exportName, importer)
|
|
|
1811
1868
|
`export { __farm_reference__ as ${exportName} };`,
|
|
1812
1869
|
""
|
|
1813
1870
|
].join("\n");
|
|
1814
|
-
|
|
1815
|
-
|
|
1816
|
-
|
|
1817
|
-
|
|
1818
|
-
|
|
1819
|
-
|
|
1820
|
-
_fs2.default.mkdirSync(_path2.default.dirname(file), { recursive: true });
|
|
1821
|
-
_fs2.default.writeFileSync(file, source);
|
|
1822
|
-
}
|
|
1871
|
+
memoizeInFarmSourceSnapshot(
|
|
1872
|
+
"client-reference-file",
|
|
1873
|
+
`${file}\0${source}`,
|
|
1874
|
+
() => writeIfChanged(file, source),
|
|
1875
|
+
() => false
|
|
1876
|
+
);
|
|
1823
1877
|
return file;
|
|
1824
1878
|
}
|
|
1825
1879
|
function writeIfChanged(file, source) {
|
|
@@ -2147,7 +2201,8 @@ var PackageClientBoundaryCache = class {
|
|
|
2147
2201
|
else this.dirty = true;
|
|
2148
2202
|
}
|
|
2149
2203
|
}
|
|
2150
|
-
return _optionalChain([entries, 'optionalAccess', _114 => _114.find, 'call', _115 => _115(
|
|
2204
|
+
if (visited.size === 0) return _optionalChain([entries, 'optionalAccess', _114 => _114.find, 'call', _115 => _115((entry) => entry.stops.length === 0)]);
|
|
2205
|
+
return _optionalChain([entries, 'optionalAccess', _116 => _116.find, 'call', _117 => _117(
|
|
2151
2206
|
(entry) => entry.stops.every((file) => visited.has(file)) && !entry.files.some((file) => visited.has(file))
|
|
2152
2207
|
)]);
|
|
2153
2208
|
}
|
|
@@ -2218,7 +2273,7 @@ var PackageClientBoundaryCache = class {
|
|
|
2218
2273
|
}
|
|
2219
2274
|
const contents = JSON.stringify({
|
|
2220
2275
|
schema: SCHEMA_VERSION,
|
|
2221
|
-
farm:
|
|
2276
|
+
farm: _chunkNOSLIDSGcjs.FARM_VERSION,
|
|
2222
2277
|
paths,
|
|
2223
2278
|
entries
|
|
2224
2279
|
});
|
|
@@ -2258,7 +2313,7 @@ function readStoredCache(file) {
|
|
|
2258
2313
|
} catch (e37) {
|
|
2259
2314
|
return null;
|
|
2260
2315
|
}
|
|
2261
|
-
if (!isRecord(value) || value.schema !== SCHEMA_VERSION || value.farm !==
|
|
2316
|
+
if (!isRecord(value) || value.schema !== SCHEMA_VERSION || value.farm !== _chunkNOSLIDSGcjs.FARM_VERSION) {
|
|
2262
2317
|
return null;
|
|
2263
2318
|
}
|
|
2264
2319
|
const { paths, entries } = value;
|
|
@@ -2269,7 +2324,7 @@ function readStoredCache(file) {
|
|
|
2269
2324
|
const usable = variants.filter((entry) => isStoredEntry(entry, paths.length));
|
|
2270
2325
|
if (usable.length > 0) valid[key] = usable;
|
|
2271
2326
|
}
|
|
2272
|
-
return { schema: SCHEMA_VERSION, farm:
|
|
2327
|
+
return { schema: SCHEMA_VERSION, farm: _chunkNOSLIDSGcjs.FARM_VERSION, paths, entries: valid };
|
|
2273
2328
|
}
|
|
2274
2329
|
function isRecord(value) {
|
|
2275
2330
|
return typeof value === "object" && value !== null && !Array.isArray(value);
|
|
@@ -2307,8 +2362,13 @@ async function withPackageClientBoundaryCache(operation) {
|
|
|
2307
2362
|
await cache2.persist();
|
|
2308
2363
|
}
|
|
2309
2364
|
}
|
|
2365
|
+
function bindPackageClientBoundaryCache() {
|
|
2366
|
+
const cache2 = getPackageClientBoundaryCache();
|
|
2367
|
+
if (!cache2) return (operation) => operation();
|
|
2368
|
+
return (operation) => getPackageClientBoundaryCache() ? operation() : getStorage().run(cache2, operation);
|
|
2369
|
+
}
|
|
2310
2370
|
function usePackageClientBoundaryCacheFile(file) {
|
|
2311
|
-
_optionalChain([getPackageClientBoundaryCache, 'call',
|
|
2371
|
+
_optionalChain([getPackageClientBoundaryCache, 'call', _118 => _118(), 'optionalAccess', _119 => _119.load, 'call', _120 => _120(file)]);
|
|
2312
2372
|
}
|
|
2313
2373
|
function resolvePackageClientBoundaryCacheFile(root, distDir) {
|
|
2314
2374
|
return _path2.default.resolve(root, distDir, "cache", "client-boundaries.json");
|
|
@@ -2325,7 +2385,7 @@ function runWithPackageClientBoundaryCacheFile(file, operation) {
|
|
|
2325
2385
|
var latestDevCache;
|
|
2326
2386
|
function runWithLatestPackageClientBoundaryCache(file, operation) {
|
|
2327
2387
|
if (getPackageClientBoundaryCache()) return operation();
|
|
2328
|
-
if (_optionalChain([latestDevCache, 'optionalAccess',
|
|
2388
|
+
if (_optionalChain([latestDevCache, 'optionalAccess', _121 => _121.file]) !== file) {
|
|
2329
2389
|
const cache2 = new PackageClientBoundaryCache();
|
|
2330
2390
|
cache2.load(file);
|
|
2331
2391
|
latestDevCache = { file, cache: cache2 };
|
|
@@ -2350,9 +2410,9 @@ function realPath(file) {
|
|
|
2350
2410
|
function setFarmRendererHydrationScope(roots, renderer, routeModules) {
|
|
2351
2411
|
const keys = roots.map(realPath);
|
|
2352
2412
|
const ruleSetsHydration = routeModules.some(
|
|
2353
|
-
(entry) => _optionalChain([entry, 'access',
|
|
2413
|
+
(entry) => _optionalChain([entry, 'access', _122 => _122.hydration, 'optionalAccess', _123 => _123.hydrate]) !== void 0 || _optionalChain([entry, 'access', _124 => _124.hydration, 'optionalAccess', _125 => _125.strategy]) !== void 0
|
|
2354
2414
|
);
|
|
2355
|
-
if (!_optionalChain([renderer, 'optionalAccess',
|
|
2415
|
+
if (!_optionalChain([renderer, 'optionalAccess', _126 => _126.hydration]) && !_optionalChain([renderer, 'optionalAccess', _127 => _127.compile]) && !ruleSetsHydration) {
|
|
2356
2416
|
for (const key of keys) scopes.delete(key);
|
|
2357
2417
|
return () => {
|
|
2358
2418
|
};
|
|
@@ -2383,7 +2443,7 @@ function findScope(file) {
|
|
|
2383
2443
|
if (file !== root && !file.startsWith(`${root}${_path2.default.sep}`)) continue;
|
|
2384
2444
|
if (!match || root.length > match.length) match = { length: root.length, scope };
|
|
2385
2445
|
}
|
|
2386
|
-
return _nullishCoalesce(_optionalChain([match, 'optionalAccess',
|
|
2446
|
+
return _nullishCoalesce(_optionalChain([match, 'optionalAccess', _128 => _128.scope]), () => ( null));
|
|
2387
2447
|
}
|
|
2388
2448
|
function resolveFarmRendererModuleHydration(content, sourcePath, readSource) {
|
|
2389
2449
|
if (scopes.size === 0) return null;
|
|
@@ -2392,7 +2452,7 @@ function resolveFarmRendererModuleHydration(content, sourcePath, readSource) {
|
|
|
2392
2452
|
if (!scope) return null;
|
|
2393
2453
|
const route = scope.routeModules.get(file);
|
|
2394
2454
|
const options = scope.renderer.hydration;
|
|
2395
|
-
const own = _optionalChain([options, 'optionalAccess',
|
|
2455
|
+
const own = _optionalChain([options, 'optionalAccess', _129 => _129.resolve]) && scope.extensions.has(_path2.default.extname(file).toLowerCase()) ? readOwnHydration(scope, content, file) : {};
|
|
2396
2456
|
if (!route && own.hydrate === void 0 && own.strategy === void 0) return null;
|
|
2397
2457
|
const source = readSource();
|
|
2398
2458
|
const where = `${file} sets its hydration twice`;
|
|
@@ -2406,9 +2466,9 @@ function resolveFarmRendererModuleHydration(content, sourcePath, readSource) {
|
|
|
2406
2466
|
`${where}: \`export const island = "${source.strategy}"\` and renderer \`${scope.renderer.name}\`'s syntax, which says "${own.strategy}". Keep one of them.`
|
|
2407
2467
|
);
|
|
2408
2468
|
}
|
|
2409
|
-
const kindDefault = _optionalChain([route, 'optionalAccess',
|
|
2410
|
-
const hydrate = _nullishCoalesce(_nullishCoalesce(_nullishCoalesce(_nullishCoalesce(own.hydrate, () => ( source.hydrate)), () => ( _optionalChain([route, 'optionalAccess',
|
|
2411
|
-
const strategy = _nullishCoalesce(_nullishCoalesce(_nullishCoalesce(_nullishCoalesce(own.strategy, () => ( source.strategy)), () => ( _optionalChain([route, 'optionalAccess',
|
|
2469
|
+
const kindDefault = _optionalChain([route, 'optionalAccess', _130 => _130.kind]) === "page" ? _optionalChain([options, 'optionalAccess', _131 => _131.pages]) : _optionalChain([route, 'optionalAccess', _132 => _132.kind]) === "layout" ? _optionalChain([options, 'optionalAccess', _133 => _133.layouts]) : void 0;
|
|
2470
|
+
const hydrate = _nullishCoalesce(_nullishCoalesce(_nullishCoalesce(_nullishCoalesce(own.hydrate, () => ( source.hydrate)), () => ( _optionalChain([route, 'optionalAccess', _134 => _134.hydration, 'access', _135 => _135.hydrate]))), () => ( kindDefault)), () => ( false));
|
|
2471
|
+
const strategy = _nullishCoalesce(_nullishCoalesce(_nullishCoalesce(_nullishCoalesce(own.strategy, () => ( source.strategy)), () => ( _optionalChain([route, 'optionalAccess', _136 => _136.hydration, 'access', _137 => _137.strategy]))), () => ( ((hydrate || source.clientDirective) && route ? _optionalChain([options, 'optionalAccess', _138 => _138.strategy]) : void 0))), () => ( null));
|
|
2412
2472
|
return { hydrate, strategy };
|
|
2413
2473
|
}
|
|
2414
2474
|
function readOwnHydration(scope, content, file) {
|
|
@@ -2442,7 +2502,7 @@ function compileFarmRendererSource(content, sourcePath) {
|
|
|
2442
2502
|
if (scopes.size === 0) return content;
|
|
2443
2503
|
const file = realPath(sourcePath);
|
|
2444
2504
|
const scope = findScope(file);
|
|
2445
|
-
const compile = _optionalChain([scope, 'optionalAccess',
|
|
2505
|
+
const compile = _optionalChain([scope, 'optionalAccess', _139 => _139.renderer, 'access', _140 => _140.compile]);
|
|
2446
2506
|
if (!scope || !compile || !scope.extensions.has(_path2.default.extname(file).toLowerCase())) {
|
|
2447
2507
|
return content;
|
|
2448
2508
|
}
|
|
@@ -2503,9 +2563,9 @@ function scanMarkdownCode(content) {
|
|
|
2503
2563
|
let inCode = false;
|
|
2504
2564
|
for (; index < lines.length; index++) {
|
|
2505
2565
|
const line = lines[index];
|
|
2506
|
-
const marker = _optionalChain([/^ {0,3}(`{3,}|~{3,})/, 'access',
|
|
2566
|
+
const marker = _optionalChain([/^ {0,3}(`{3,}|~{3,})/, 'access', _141 => _141.exec, 'call', _142 => _142(line), 'optionalAccess', _143 => _143[1]]);
|
|
2507
2567
|
if (fence) {
|
|
2508
|
-
if (_optionalChain([marker, 'optionalAccess',
|
|
2568
|
+
if (_optionalChain([marker, 'optionalAccess', _144 => _144[0]]) === fence[0] && marker.length >= fence.length && line.trim() === marker) {
|
|
2509
2569
|
fence = null;
|
|
2510
2570
|
}
|
|
2511
2571
|
} else if (inCode) {
|
|
@@ -2557,7 +2617,7 @@ function resolveModuleSourcePath(modulePath, root) {
|
|
|
2557
2617
|
candidates.add(_path2.default.join(root, normalized));
|
|
2558
2618
|
candidates.add(_path2.default.resolve(root, normalized));
|
|
2559
2619
|
}
|
|
2560
|
-
if (_optionalChain([withoutQuery, 'optionalAccess',
|
|
2620
|
+
if (_optionalChain([withoutQuery, 'optionalAccess', _145 => _145.startsWith, 'call', _146 => _146("/src/")])) {
|
|
2561
2621
|
const normalized = withoutQuery.replace(/^\/+/, "");
|
|
2562
2622
|
candidates.add(_path2.default.join(process.cwd(), normalized));
|
|
2563
2623
|
candidates.add(_path2.default.resolve(process.cwd(), normalized));
|
|
@@ -2627,7 +2687,7 @@ function hasUseClientDirective(content) {
|
|
|
2627
2687
|
return false;
|
|
2628
2688
|
}
|
|
2629
2689
|
function hasHydrateExport(content) {
|
|
2630
|
-
return _optionalChain([_chunkWMRGIQTAcjs.readFarmHydrateExport.call(void 0, content), 'optionalAccess',
|
|
2690
|
+
return _optionalChain([_chunkWMRGIQTAcjs.readFarmHydrateExport.call(void 0, content), 'optionalAccess', _147 => _147.value]) === true;
|
|
2631
2691
|
}
|
|
2632
2692
|
var REGEXP_PREFIX_PUNCTUATION = /* @__PURE__ */ new Set([
|
|
2633
2693
|
"(",
|
|
@@ -2816,7 +2876,7 @@ function isIslandExportStart(tokens, index) {
|
|
|
2816
2876
|
const token = tokens[index];
|
|
2817
2877
|
const previous = tokens[index - 1];
|
|
2818
2878
|
const startsStatement = !previous || previous.value === ";" || previous.value === "{" || previous.value === "}" || token.line > previous.line;
|
|
2819
|
-
return startsStatement && token.value === "export" && _optionalChain([tokens, 'access',
|
|
2879
|
+
return startsStatement && token.value === "export" && _optionalChain([tokens, 'access', _148 => _148[index + 1], 'optionalAccess', _149 => _149.value]) === "const" && _optionalChain([tokens, 'access', _150 => _150[index + 2], 'optionalAccess', _151 => _151.value]) === "island";
|
|
2820
2880
|
}
|
|
2821
2881
|
function getIslandStrategyExport(content) {
|
|
2822
2882
|
if (!content) return null;
|
|
@@ -2824,15 +2884,15 @@ function getIslandStrategyExport(content) {
|
|
|
2824
2884
|
for (let index = 0; index < tokens.length - 2; index++) {
|
|
2825
2885
|
if (!isIslandExportStart(tokens, index)) continue;
|
|
2826
2886
|
let valueIndex = index + 3;
|
|
2827
|
-
if (_optionalChain([tokens, 'access',
|
|
2887
|
+
if (_optionalChain([tokens, 'access', _152 => _152[valueIndex], 'optionalAccess', _153 => _153.value]) === ":") {
|
|
2828
2888
|
while (valueIndex < tokens.length && tokens[valueIndex].value !== "=") valueIndex++;
|
|
2829
2889
|
}
|
|
2830
|
-
if (_optionalChain([tokens, 'access',
|
|
2890
|
+
if (_optionalChain([tokens, 'access', _154 => _154[valueIndex], 'optionalAccess', _155 => _155.value]) !== "=") break;
|
|
2831
2891
|
valueIndex++;
|
|
2832
2892
|
const literal = tokens[valueIndex];
|
|
2833
2893
|
if (!literal || literal.kind !== "string" || !_chunk7KJJ4SBScjs.isFarmIslandStrategy.call(void 0, literal.value)) break;
|
|
2834
2894
|
let trailingIndex = valueIndex + 1;
|
|
2835
|
-
if (_optionalChain([tokens, 'access',
|
|
2895
|
+
if (_optionalChain([tokens, 'access', _156 => _156[trailingIndex], 'optionalAccess', _157 => _157.value]) === "as" && _optionalChain([tokens, 'access', _158 => _158[trailingIndex + 1], 'optionalAccess', _159 => _159.value]) === "const") {
|
|
2836
2896
|
trailingIndex += 2;
|
|
2837
2897
|
}
|
|
2838
2898
|
const trailing = tokens[trailingIndex];
|
|
@@ -2858,13 +2918,13 @@ function hasAsyncDefaultExport(content) {
|
|
|
2858
2918
|
for (let index = 0; index < tokens.length - 2; index++) {
|
|
2859
2919
|
const token = tokens[index];
|
|
2860
2920
|
if (token.kind !== "identifier" || token.value !== "export") continue;
|
|
2861
|
-
if (_optionalChain([tokens, 'access',
|
|
2862
|
-
if (_optionalChain([tokens, 'access',
|
|
2921
|
+
if (_optionalChain([tokens, 'access', _160 => _160[index - 1], 'optionalAccess', _161 => _161.value]) === ".") continue;
|
|
2922
|
+
if (_optionalChain([tokens, 'access', _162 => _162[index + 1], 'optionalAccess', _163 => _163.value]) !== "default") continue;
|
|
2863
2923
|
const exported = tokens[index + 2];
|
|
2864
2924
|
if (exported.kind === "identifier" && exported.value === "async") {
|
|
2865
2925
|
return true;
|
|
2866
2926
|
}
|
|
2867
|
-
if (exported.kind === "identifier" && !["function", "class"].includes(exported.value) && _optionalChain([tokens, 'access',
|
|
2927
|
+
if (exported.kind === "identifier" && !["function", "class"].includes(exported.value) && _optionalChain([tokens, 'access', _164 => _164[index + 3], 'optionalAccess', _165 => _165.value]) !== "(" && isAsyncLocalDeclaration(tokens, exported.value)) {
|
|
2868
2928
|
return true;
|
|
2869
2929
|
}
|
|
2870
2930
|
}
|
|
@@ -2872,15 +2932,23 @@ function hasAsyncDefaultExport(content) {
|
|
|
2872
2932
|
}
|
|
2873
2933
|
function isAsyncLocalDeclaration(tokens, name) {
|
|
2874
2934
|
for (let index = 0; index < tokens.length - 2; index++) {
|
|
2875
|
-
if (tokens[index].value === "async" && _optionalChain([tokens, 'access',
|
|
2935
|
+
if (tokens[index].value === "async" && _optionalChain([tokens, 'access', _166 => _166[index + 1], 'optionalAccess', _167 => _167.value]) === "function" && _optionalChain([tokens, 'access', _168 => _168[index + 2], 'optionalAccess', _169 => _169.value]) === name) {
|
|
2876
2936
|
return true;
|
|
2877
2937
|
}
|
|
2878
|
-
if (tokens[index].value === name && _optionalChain([tokens, 'access',
|
|
2938
|
+
if (tokens[index].value === name && _optionalChain([tokens, 'access', _170 => _170[index + 1], 'optionalAccess', _171 => _171.value]) === "=" && _optionalChain([tokens, 'access', _172 => _172[index + 2], 'optionalAccess', _173 => _173.value]) === "async") {
|
|
2879
2939
|
return true;
|
|
2880
2940
|
}
|
|
2881
2941
|
}
|
|
2882
2942
|
return false;
|
|
2883
2943
|
}
|
|
2944
|
+
function parseImportedModuleMetadata(content) {
|
|
2945
|
+
if (!content) return parseClientModuleMetadata(content, false);
|
|
2946
|
+
return memoizeInFarmSourceSnapshot(
|
|
2947
|
+
"imported-module-metadata",
|
|
2948
|
+
content,
|
|
2949
|
+
() => parseClientModuleMetadata(content, false)
|
|
2950
|
+
);
|
|
2951
|
+
}
|
|
2884
2952
|
function parseClientModuleMetadata(content, inspectIslandExport, sourcePath) {
|
|
2885
2953
|
if (!content) {
|
|
2886
2954
|
return {
|
|
@@ -2900,7 +2968,7 @@ function parseClientModuleMetadata(content, inspectIslandExport, sourcePath) {
|
|
|
2900
2968
|
mayCompileFarmRendererSource(sourcePath) && readSourceIfExists(sourcePath) || content,
|
|
2901
2969
|
sourcePath,
|
|
2902
2970
|
() => ({
|
|
2903
|
-
hydrate: typeof _optionalChain([hydrate, 'optionalAccess',
|
|
2971
|
+
hydrate: typeof _optionalChain([hydrate, 'optionalAccess', _174 => _174.value]) === "boolean" ? hydrate.value : void 0,
|
|
2904
2972
|
strategy: getIslandStrategyExport(content),
|
|
2905
2973
|
clientDirective: isClientComponent
|
|
2906
2974
|
})
|
|
@@ -2913,7 +2981,7 @@ function parseClientModuleMetadata(content, inspectIslandExport, sourcePath) {
|
|
|
2913
2981
|
islandStrategy: rendererHydration.strategy
|
|
2914
2982
|
};
|
|
2915
2983
|
}
|
|
2916
|
-
const hasHydrate = _optionalChain([hydrate, 'optionalAccess',
|
|
2984
|
+
const hasHydrate = _optionalChain([hydrate, 'optionalAccess', _175 => _175.value]) === true;
|
|
2917
2985
|
return {
|
|
2918
2986
|
isClientComponent,
|
|
2919
2987
|
hasHydrateExport: hasHydrate,
|
|
@@ -2943,7 +3011,7 @@ function getFarmClientRenderingBindings(code, file, root) {
|
|
|
2943
3011
|
for (const [specifier, locals] of getStaticImportBindings(code)) {
|
|
2944
3012
|
const imported = resolveImportedModule(file, specifier, root);
|
|
2945
3013
|
if (!imported.path) continue;
|
|
2946
|
-
const metadata = imported.local ? inspectClientModuleMetadata(imported.path, root, /* @__PURE__ */ new Set([_path2.default.resolve(file)]), false) : inspectPackageClientBoundary(imported.path, root
|
|
3014
|
+
const metadata = imported.local ? inspectClientModuleMetadata(imported.path, root, /* @__PURE__ */ new Set([_path2.default.resolve(file)]), false) : inspectPackageClientBoundary(imported.path, root);
|
|
2947
3015
|
if (metadata.isClientComponent || metadata.shouldHydrate) bindings.push(...locals);
|
|
2948
3016
|
}
|
|
2949
3017
|
return bindings;
|
|
@@ -3116,7 +3184,7 @@ function planClientModuleHydration(modulePath, root, mode, options) {
|
|
|
3116
3184
|
return plan;
|
|
3117
3185
|
}
|
|
3118
3186
|
function usesFarmServerTree(plan) {
|
|
3119
|
-
return _optionalChain([plan, 'optionalAccess',
|
|
3187
|
+
return _optionalChain([plan, 'optionalAccess', _176 => _176.asyncOwnerIslands]) === true && plan.isolatedBoundaries.length > 0;
|
|
3120
3188
|
}
|
|
3121
3189
|
function getMarkdownPageHydrationPlan(componentsModulePath, root, mode = "off", options = {}) {
|
|
3122
3190
|
const plan = {
|
|
@@ -3266,12 +3334,20 @@ function exportListNames(content) {
|
|
|
3266
3334
|
}
|
|
3267
3335
|
return names;
|
|
3268
3336
|
}
|
|
3337
|
+
var NO_IMPORT_BINDINGS = /* @__PURE__ */ new Map();
|
|
3269
3338
|
function getStaticImportBindings(content) {
|
|
3339
|
+
if (!content) return NO_IMPORT_BINDINGS;
|
|
3340
|
+
return memoizeInFarmSourceSnapshot(
|
|
3341
|
+
"import-bindings",
|
|
3342
|
+
content,
|
|
3343
|
+
() => scanStaticImportBindings(content)
|
|
3344
|
+
);
|
|
3345
|
+
}
|
|
3346
|
+
function scanStaticImportBindings(content) {
|
|
3270
3347
|
const bindings = /* @__PURE__ */ new Map();
|
|
3271
|
-
if (!content) return bindings;
|
|
3272
3348
|
const tokens = tokenizeModuleSource(content);
|
|
3273
3349
|
for (let index = 0; index < tokens.length; index++) {
|
|
3274
|
-
if (tokens[index].value !== "import" || _optionalChain([tokens, 'access',
|
|
3350
|
+
if (tokens[index].value !== "import" || _optionalChain([tokens, 'access', _177 => _177[index - 1], 'optionalAccess', _178 => _178.value]) === ".") continue;
|
|
3275
3351
|
const first = tokens[index + 1];
|
|
3276
3352
|
if (!first || first.value === "type" || first.value === "(" || first.kind === "string") {
|
|
3277
3353
|
continue;
|
|
@@ -3279,7 +3355,7 @@ function getStaticImportBindings(content) {
|
|
|
3279
3355
|
let fromIndex = -1;
|
|
3280
3356
|
for (let cursor = index + 1; cursor < tokens.length; cursor++) {
|
|
3281
3357
|
if (tokens[cursor].value === ";") break;
|
|
3282
|
-
if (tokens[cursor].value === "from" && _optionalChain([tokens, 'access',
|
|
3358
|
+
if (tokens[cursor].value === "from" && _optionalChain([tokens, 'access', _179 => _179[cursor + 1], 'optionalAccess', _180 => _180.kind]) === "string") {
|
|
3283
3359
|
fromIndex = cursor;
|
|
3284
3360
|
break;
|
|
3285
3361
|
}
|
|
@@ -3288,13 +3364,13 @@ function getStaticImportBindings(content) {
|
|
|
3288
3364
|
const specifier = tokens[fromIndex + 1].value;
|
|
3289
3365
|
const clause = tokens.slice(index + 1, fromIndex);
|
|
3290
3366
|
const localNames = [];
|
|
3291
|
-
if (_optionalChain([clause, 'access',
|
|
3367
|
+
if (_optionalChain([clause, 'access', _181 => _181[0], 'optionalAccess', _182 => _182.kind]) === "identifier" && clause[0].value !== "type") {
|
|
3292
3368
|
localNames.push(clause[0].value);
|
|
3293
3369
|
}
|
|
3294
3370
|
const namespaceAs = clause.findIndex(
|
|
3295
|
-
(token, clauseIndex) => token.value === "*" && _optionalChain([clause, 'access',
|
|
3371
|
+
(token, clauseIndex) => token.value === "*" && _optionalChain([clause, 'access', _183 => _183[clauseIndex + 1], 'optionalAccess', _184 => _184.value]) === "as"
|
|
3296
3372
|
);
|
|
3297
|
-
if (namespaceAs !== -1 && _optionalChain([clause, 'access',
|
|
3373
|
+
if (namespaceAs !== -1 && _optionalChain([clause, 'access', _185 => _185[namespaceAs + 2], 'optionalAccess', _186 => _186.kind]) === "identifier") {
|
|
3298
3374
|
localNames.push(clause[namespaceAs + 2].value);
|
|
3299
3375
|
}
|
|
3300
3376
|
const openingBrace = clause.findIndex((token) => token.value === "{");
|
|
@@ -3304,11 +3380,11 @@ function getStaticImportBindings(content) {
|
|
|
3304
3380
|
if (openingBrace !== -1 && closingBrace !== -1) {
|
|
3305
3381
|
let entryStart = openingBrace + 1;
|
|
3306
3382
|
for (let cursor = entryStart; cursor <= closingBrace; cursor++) {
|
|
3307
|
-
if (cursor !== closingBrace && _optionalChain([clause, 'access',
|
|
3383
|
+
if (cursor !== closingBrace && _optionalChain([clause, 'access', _187 => _187[cursor], 'optionalAccess', _188 => _188.value]) !== ",") continue;
|
|
3308
3384
|
const entry = clause.slice(entryStart, cursor).filter((token) => token.value !== "type");
|
|
3309
3385
|
const asIndex = entry.findIndex((token) => token.value === "as");
|
|
3310
3386
|
const local = asIndex === -1 ? entry[0] : entry[asIndex + 1];
|
|
3311
|
-
if (_optionalChain([local, 'optionalAccess',
|
|
3387
|
+
if (_optionalChain([local, 'optionalAccess', _189 => _189.kind]) === "identifier") localNames.push(local.value);
|
|
3312
3388
|
entryStart = cursor + 1;
|
|
3313
3389
|
}
|
|
3314
3390
|
}
|
|
@@ -3345,7 +3421,7 @@ function findParserSensitiveJsxContainer(content, localBindings) {
|
|
|
3345
3421
|
const open = [];
|
|
3346
3422
|
const isSelfClosing = (openingIndex) => {
|
|
3347
3423
|
for (let index = openingIndex; index < tokens.length; index++) {
|
|
3348
|
-
if (tokens[index].value === ">") return _optionalChain([tokens, 'access',
|
|
3424
|
+
if (tokens[index].value === ">") return _optionalChain([tokens, 'access', _190 => _190[index - 1], 'optionalAccess', _191 => _191.value]) === "/";
|
|
3349
3425
|
}
|
|
3350
3426
|
return false;
|
|
3351
3427
|
};
|
|
@@ -3353,7 +3429,7 @@ function findParserSensitiveJsxContainer(content, localBindings) {
|
|
|
3353
3429
|
if (tokens[index].value !== "<") continue;
|
|
3354
3430
|
if (tokens[index + 1].value === "/") {
|
|
3355
3431
|
const closing = tokens[index + 2];
|
|
3356
|
-
const at = _optionalChain([closing, 'optionalAccess',
|
|
3432
|
+
const at = _optionalChain([closing, 'optionalAccess', _192 => _192.kind]) === "identifier" ? open.lastIndexOf(closing.value) : -1;
|
|
3357
3433
|
if (at !== -1) open.length = at;
|
|
3358
3434
|
continue;
|
|
3359
3435
|
}
|
|
@@ -3396,7 +3472,7 @@ function findMatchingToken(tokens, openingIndex, opening, closing) {
|
|
|
3396
3472
|
}
|
|
3397
3473
|
function containsClientJsx(tokens, start, end, clientBindings) {
|
|
3398
3474
|
for (let index = start; index < end; index++) {
|
|
3399
|
-
if (tokens[index].value === "<" && clientBindings.has(_optionalChain([tokens, 'access',
|
|
3475
|
+
if (tokens[index].value === "<" && clientBindings.has(_optionalChain([tokens, 'access', _193 => _193[index + 1], 'optionalAccess', _194 => _194.value]))) return true;
|
|
3400
3476
|
}
|
|
3401
3477
|
return false;
|
|
3402
3478
|
}
|
|
@@ -3434,7 +3510,7 @@ function getClientRenderingHelpers(tokens, clientBindings) {
|
|
|
3434
3510
|
let helperName;
|
|
3435
3511
|
let bodyStart = -1;
|
|
3436
3512
|
let bodyEnd = -1;
|
|
3437
|
-
if (tokens[index].value === "function" && _optionalChain([tokens, 'access',
|
|
3513
|
+
if (tokens[index].value === "function" && _optionalChain([tokens, 'access', _195 => _195[index + 1], 'optionalAccess', _196 => _196.kind]) === "identifier") {
|
|
3438
3514
|
helperName = tokens[index + 1].value;
|
|
3439
3515
|
const parametersStart = tokens.findIndex(
|
|
3440
3516
|
(token, tokenIndex) => tokenIndex > index + 1 && token.value === "("
|
|
@@ -3444,21 +3520,21 @@ function getClientRenderingHelpers(tokens, clientBindings) {
|
|
|
3444
3520
|
(token, tokenIndex) => tokenIndex > parametersEnd && token.value === "{"
|
|
3445
3521
|
);
|
|
3446
3522
|
if (bodyStart !== -1) bodyEnd = findMatchingToken(tokens, bodyStart, "{", "}");
|
|
3447
|
-
} else if ((tokens[index].value === "const" || tokens[index].value === "let" || tokens[index].value === "var") && _optionalChain([tokens, 'access',
|
|
3523
|
+
} else if ((tokens[index].value === "const" || tokens[index].value === "let" || tokens[index].value === "var") && _optionalChain([tokens, 'access', _197 => _197[index + 1], 'optionalAccess', _198 => _198.kind]) === "identifier") {
|
|
3448
3524
|
helperName = tokens[index + 1].value;
|
|
3449
3525
|
let assignmentIndex = -1;
|
|
3450
3526
|
let arrowIndex = -1;
|
|
3451
3527
|
for (let cursor = index + 2; cursor < tokens.length; cursor++) {
|
|
3452
3528
|
if (tokens[cursor].value === ";") break;
|
|
3453
3529
|
if (assignmentIndex === -1 && tokens[cursor].value === "=") assignmentIndex = cursor;
|
|
3454
|
-
if (tokens[cursor].value === "=" && _optionalChain([tokens, 'access',
|
|
3530
|
+
if (tokens[cursor].value === "=" && _optionalChain([tokens, 'access', _199 => _199[cursor + 1], 'optionalAccess', _200 => _200.value]) === ">") {
|
|
3455
3531
|
arrowIndex = cursor;
|
|
3456
3532
|
break;
|
|
3457
3533
|
}
|
|
3458
3534
|
}
|
|
3459
3535
|
if (arrowIndex !== -1) {
|
|
3460
3536
|
bodyStart = arrowIndex + 2;
|
|
3461
|
-
bodyEnd = _optionalChain([tokens, 'access',
|
|
3537
|
+
bodyEnd = _optionalChain([tokens, 'access', _201 => _201[bodyStart], 'optionalAccess', _202 => _202.value]) === "{" ? findMatchingToken(tokens, bodyStart, "{", "}") : findStatementEnd(tokens, bodyStart);
|
|
3462
3538
|
} else if (assignmentIndex !== -1) {
|
|
3463
3539
|
bodyStart = assignmentIndex + 1;
|
|
3464
3540
|
bodyEnd = findStatementEnd(tokens, bodyStart);
|
|
@@ -3498,14 +3574,14 @@ function passesElementValuedProps(content, localBindings) {
|
|
|
3498
3574
|
else if (value === "}") braceDepth--;
|
|
3499
3575
|
else if (value === "<" && braceDepth > 0) return true;
|
|
3500
3576
|
else if (value === ">" && braceDepth === 0) {
|
|
3501
|
-
selfClosing = _optionalChain([tokens, 'access',
|
|
3577
|
+
selfClosing = _optionalChain([tokens, 'access', _203 => _203[cursor - 1], 'optionalAccess', _204 => _204.value]) === "/";
|
|
3502
3578
|
break;
|
|
3503
3579
|
}
|
|
3504
3580
|
}
|
|
3505
3581
|
if (selfClosing || cursor >= tokens.length) continue;
|
|
3506
3582
|
for (let child = cursor + 1; child < tokens.length; child++) {
|
|
3507
3583
|
if (tokens[child].value !== "<") continue;
|
|
3508
|
-
const closesBoundary = _optionalChain([tokens, 'access',
|
|
3584
|
+
const closesBoundary = _optionalChain([tokens, 'access', _205 => _205[child + 1], 'optionalAccess', _206 => _206.value]) === "/" && _optionalChain([tokens, 'access', _207 => _207[child + 2], 'optionalAccess', _208 => _208.value]) === name;
|
|
3509
3585
|
if (!closesBoundary) return true;
|
|
3510
3586
|
break;
|
|
3511
3587
|
}
|
|
@@ -3527,7 +3603,7 @@ function rendersOnlyLeafElements(content, localBindings) {
|
|
|
3527
3603
|
else if (value === "<" && braceDepth > 0) return false;
|
|
3528
3604
|
else if (value === ">" && braceDepth === 0) break;
|
|
3529
3605
|
}
|
|
3530
|
-
if (cursor >= tokens.length || _optionalChain([tokens, 'access',
|
|
3606
|
+
if (cursor >= tokens.length || _optionalChain([tokens, 'access', _209 => _209[cursor - 1], 'optionalAccess', _210 => _210.value]) !== "/") return false;
|
|
3531
3607
|
}
|
|
3532
3608
|
return true;
|
|
3533
3609
|
}
|
|
@@ -3539,9 +3615,9 @@ function hasDynamicJsxCardinality(content, localBindings) {
|
|
|
3539
3615
|
const containsDynamicRenderer = (start, end) => containsClientJsx(tokens, start, end, clientBindings) || tokens.slice(start, end).some((token) => renderingHelpers.has(token.value));
|
|
3540
3616
|
for (let index = 0; index < tokens.length; index++) {
|
|
3541
3617
|
let callStart = -1;
|
|
3542
|
-
if (tokens[index].value === "." && (_optionalChain([tokens, 'access',
|
|
3618
|
+
if (tokens[index].value === "." && (_optionalChain([tokens, 'access', _211 => _211[index + 1], 'optionalAccess', _212 => _212.value]) === "map" || _optionalChain([tokens, 'access', _213 => _213[index + 1], 'optionalAccess', _214 => _214.value]) === "flatMap") && _optionalChain([tokens, 'access', _215 => _215[index + 2], 'optionalAccess', _216 => _216.value]) === "(") {
|
|
3543
3619
|
callStart = index + 2;
|
|
3544
|
-
} else if (tokens[index].value === "Array" && _optionalChain([tokens, 'access',
|
|
3620
|
+
} else if (tokens[index].value === "Array" && _optionalChain([tokens, 'access', _217 => _217[index + 1], 'optionalAccess', _218 => _218.value]) === "." && _optionalChain([tokens, 'access', _219 => _219[index + 2], 'optionalAccess', _220 => _220.value]) === "from" && _optionalChain([tokens, 'access', _221 => _221[index + 3], 'optionalAccess', _222 => _222.value]) === "(") {
|
|
3545
3621
|
callStart = index + 3;
|
|
3546
3622
|
}
|
|
3547
3623
|
if (callStart !== -1) {
|
|
@@ -3550,10 +3626,10 @@ function hasDynamicJsxCardinality(content, localBindings) {
|
|
|
3550
3626
|
index = callEnd;
|
|
3551
3627
|
continue;
|
|
3552
3628
|
}
|
|
3553
|
-
if ((tokens[index].value === "for" || tokens[index].value === "while") && _optionalChain([tokens, 'access',
|
|
3629
|
+
if ((tokens[index].value === "for" || tokens[index].value === "while") && _optionalChain([tokens, 'access', _223 => _223[index + 1], 'optionalAccess', _224 => _224.value]) === "(") {
|
|
3554
3630
|
const conditionEnd = findMatchingToken(tokens, index + 1, "(", ")");
|
|
3555
3631
|
const bodyStart = conditionEnd + 1;
|
|
3556
|
-
const bodyEnd = _optionalChain([tokens, 'access',
|
|
3632
|
+
const bodyEnd = _optionalChain([tokens, 'access', _225 => _225[bodyStart], 'optionalAccess', _226 => _226.value]) === "{" ? findMatchingToken(tokens, bodyStart, "{", "}") : tokens.findIndex((token, tokenIndex) => tokenIndex > bodyStart && token.value === ";");
|
|
3557
3633
|
if (containsDynamicRenderer(bodyStart, bodyEnd === -1 ? tokens.length : bodyEnd)) return true;
|
|
3558
3634
|
}
|
|
3559
3635
|
}
|
|
@@ -3575,7 +3651,7 @@ function collectIsolatedClientBoundaries(ownerPath, root, options = {}) {
|
|
|
3575
3651
|
if (visiting.has(moduleSourcePath)) return 0;
|
|
3576
3652
|
visiting.add(moduleSourcePath);
|
|
3577
3653
|
const content = readModuleCode(moduleSourcePath);
|
|
3578
|
-
const parsed =
|
|
3654
|
+
const parsed = parseImportedModuleMetadata(content);
|
|
3579
3655
|
if (parsed.isClientComponent) {
|
|
3580
3656
|
if (!isIsolatableClientBoundarySource(content)) {
|
|
3581
3657
|
fallbackReason = `client boundary ${moduleSourcePath} uses an unsupported export shape`;
|
|
@@ -3637,7 +3713,7 @@ function collectIsolatedClientBoundaries(ownerPath, root, options = {}) {
|
|
|
3637
3713
|
if (reference) importedBoundaryCount += visit(reference);
|
|
3638
3714
|
}
|
|
3639
3715
|
} else {
|
|
3640
|
-
const packageMetadata = inspectPackageClientBoundary(importedPath, root
|
|
3716
|
+
const packageMetadata = inspectPackageClientBoundary(importedPath, root);
|
|
3641
3717
|
if (!packageMetadata.shouldHydrate) continue;
|
|
3642
3718
|
const references = options.packageReferences && projectRoot ? findFarmPackageClientImports(
|
|
3643
3719
|
_nullishCoalesce(content, () => ( "")),
|
|
@@ -3672,7 +3748,7 @@ function collectIsolatedClientBoundaries(ownerPath, root, options = {}) {
|
|
|
3672
3748
|
const localBindings = _nullishCoalesce(importedBindings.get(specifier), () => ( []));
|
|
3673
3749
|
const staticUses = countStaticJsxUses(content, localBindings);
|
|
3674
3750
|
if (staticUses > 0) {
|
|
3675
|
-
const grows = options.packageReferences === true && projectRoot !== void 0 && (_nullishCoalesce(_optionalChain([findFarmIslandContainers, 'call',
|
|
3751
|
+
const grows = options.packageReferences === true && projectRoot !== void 0 && (_nullishCoalesce(_optionalChain([findFarmIslandContainers, 'call', _227 => _227(_nullishCoalesce(content, () => ( "")), moduleSourcePath, localBindings), 'optionalAccess', _228 => _228.length]), () => ( 0))) > 0;
|
|
3676
3752
|
if (grows) visit(ensureFarmIslandContainerReference(projectRoot));
|
|
3677
3753
|
const container = grows ? void 0 : findParserSensitiveJsxContainer(content, localBindings);
|
|
3678
3754
|
if (container) {
|
|
@@ -3762,43 +3838,65 @@ function inspectClientModuleMetadata(resolvedPath, root, visited, inspectIslandE
|
|
|
3762
3838
|
function farmWorkspaceServerEntry(entry) {
|
|
3763
3839
|
const real = realpathOrSelf(entry);
|
|
3764
3840
|
if (real.split(_path2.default.sep).includes("node_modules")) return null;
|
|
3765
|
-
if (
|
|
3841
|
+
if (parseImportedModuleMetadata(readIfExists(real)).isClientComponent) return null;
|
|
3766
3842
|
return real;
|
|
3767
3843
|
}
|
|
3768
3844
|
function realpathOrSelf(file) {
|
|
3769
|
-
|
|
3770
|
-
|
|
3771
|
-
|
|
3772
|
-
|
|
3773
|
-
|
|
3774
|
-
|
|
3845
|
+
const real = memoizeInFarmSourceSnapshot(
|
|
3846
|
+
"realpath",
|
|
3847
|
+
farmSourceSnapshotPathKey(file),
|
|
3848
|
+
() => {
|
|
3849
|
+
try {
|
|
3850
|
+
return _fs2.default.realpathSync(file);
|
|
3851
|
+
} catch (e42) {
|
|
3852
|
+
return null;
|
|
3853
|
+
}
|
|
3854
|
+
},
|
|
3855
|
+
(resolved) => resolved !== null
|
|
3856
|
+
);
|
|
3857
|
+
return _nullishCoalesce(real, () => ( file));
|
|
3858
|
+
}
|
|
3859
|
+
var NODE_MODULES_SEGMENT2 = `${_path2.default.sep}node_modules${_path2.default.sep}`;
|
|
3860
|
+
function getInstalledPackageDirectory(file, start) {
|
|
3861
|
+
let end = file.indexOf(_path2.default.sep, start);
|
|
3862
|
+
if (end !== -1 && file[start] === "@") end = file.indexOf(_path2.default.sep, end + 1);
|
|
3863
|
+
return end === -1 ? file : file.slice(0, end);
|
|
3864
|
+
}
|
|
3865
|
+
function installedRealPath(file) {
|
|
3866
|
+
const segment = file.lastIndexOf(NODE_MODULES_SEGMENT2);
|
|
3867
|
+
if (segment === -1) return file;
|
|
3868
|
+
const directory = getInstalledPackageDirectory(file, segment + NODE_MODULES_SEGMENT2.length);
|
|
3869
|
+
const real = realpathOrSelf(directory);
|
|
3870
|
+
if (real === directory || !real.includes(NODE_MODULES_SEGMENT2)) return file;
|
|
3871
|
+
return real + file.slice(directory.length);
|
|
3872
|
+
}
|
|
3873
|
+
var NO_VISITED_FILES = /* @__PURE__ */ new Set();
|
|
3775
3874
|
function getBarePackageReexports(content) {
|
|
3776
3875
|
return getImportSpecifiers(content, { reexportsOnly: true }).filter(
|
|
3777
3876
|
(specifier) => bareSpecifierPackage(specifier)
|
|
3778
3877
|
);
|
|
3779
3878
|
}
|
|
3780
|
-
function inspectPackageClientBoundary(
|
|
3879
|
+
function inspectPackageClientBoundary(importedPath, root, visited) {
|
|
3880
|
+
const resolvedPath = importedPath && installedRealPath(importedPath);
|
|
3781
3881
|
const cache2 = getPackageClientBoundaryCache();
|
|
3782
|
-
if (!cache2 || !resolvedPath || visited.has(resolvedPath)) {
|
|
3783
|
-
return traversePackageClientBoundary(resolvedPath, root, visited);
|
|
3882
|
+
if (!cache2 || !resolvedPath || _optionalChain([visited, 'optionalAccess', _229 => _229.has, 'call', _230 => _230(resolvedPath)])) {
|
|
3883
|
+
return traversePackageClientBoundary(resolvedPath, root, _nullishCoalesce(visited, () => ( /* @__PURE__ */ new Set())));
|
|
3784
3884
|
}
|
|
3785
3885
|
const key = `${_nullishCoalesce(root, () => ( ""))}\0${resolvedPath}`;
|
|
3786
|
-
const cached = cache2.find(key, visited);
|
|
3886
|
+
const cached = cache2.find(key, _nullishCoalesce(visited, () => ( NO_VISITED_FILES)));
|
|
3787
3887
|
if (cached) {
|
|
3788
|
-
for (const file of cached.files)
|
|
3789
|
-
|
|
3790
|
-
noteFarmSourceRead(file);
|
|
3791
|
-
}
|
|
3888
|
+
if (visited) for (const file of cached.files) visited.add(file);
|
|
3889
|
+
noteFarmSourceReads(cached.files);
|
|
3792
3890
|
return { ...cached.result };
|
|
3793
3891
|
}
|
|
3794
3892
|
const trace2 = new PackageInspectionTrace();
|
|
3795
|
-
const result = traversePackageClientBoundary(resolvedPath, root, visited, trace2);
|
|
3893
|
+
const result = traversePackageClientBoundary(resolvedPath, root, _nullishCoalesce(visited, () => ( /* @__PURE__ */ new Set())), trace2);
|
|
3796
3894
|
cache2.add(key, trace2.toEntry(result));
|
|
3797
3895
|
return result;
|
|
3798
3896
|
}
|
|
3799
3897
|
function traversePackageClientBoundary(resolvedPath, root, visited, trace2) {
|
|
3800
3898
|
if (!resolvedPath || visited.has(resolvedPath)) {
|
|
3801
|
-
if (resolvedPath) _optionalChain([trace2, 'optionalAccess',
|
|
3899
|
+
if (resolvedPath) _optionalChain([trace2, 'optionalAccess', _231 => _231.stop, 'call', _232 => _232(resolvedPath)]);
|
|
3802
3900
|
return {
|
|
3803
3901
|
isClientComponent: false,
|
|
3804
3902
|
shouldHydrate: false,
|
|
@@ -3806,9 +3904,9 @@ function traversePackageClientBoundary(resolvedPath, root, visited, trace2) {
|
|
|
3806
3904
|
};
|
|
3807
3905
|
}
|
|
3808
3906
|
visited.add(resolvedPath);
|
|
3809
|
-
_optionalChain([trace2, 'optionalAccess',
|
|
3907
|
+
_optionalChain([trace2, 'optionalAccess', _233 => _233.visit, 'call', _234 => _234(resolvedPath)]);
|
|
3810
3908
|
const content = readIfExists(resolvedPath);
|
|
3811
|
-
const parsed =
|
|
3909
|
+
const parsed = parseImportedModuleMetadata(content);
|
|
3812
3910
|
let importsClientBoundary = false;
|
|
3813
3911
|
let importedIslandStrategy = null;
|
|
3814
3912
|
const reexports = getBarePackageReexports(content);
|
|
@@ -3864,7 +3962,7 @@ function scanImportSpecifiers(content, { reexportsOnly = false, dynamic = false
|
|
|
3864
3962
|
braceDepth = Math.max(0, braceDepth - 1);
|
|
3865
3963
|
continue;
|
|
3866
3964
|
}
|
|
3867
|
-
if (dynamic && keyword.kind === "identifier" && keyword.value === "import" && _optionalChain([tokens, 'access',
|
|
3965
|
+
if (dynamic && keyword.kind === "identifier" && keyword.value === "import" && _optionalChain([tokens, 'access', _235 => _235[index - 1], 'optionalAccess', _236 => _236.value]) !== "." && _optionalChain([tokens, 'access', _237 => _237[index + 1], 'optionalAccess', _238 => _238.value]) === "(" && _optionalChain([tokens, 'access', _239 => _239[index + 2], 'optionalAccess', _240 => _240.kind]) === "string") {
|
|
3868
3966
|
matches.add(tokens[index + 2].value);
|
|
3869
3967
|
continue;
|
|
3870
3968
|
}
|
|
@@ -3874,7 +3972,7 @@ function scanImportSpecifiers(content, { reexportsOnly = false, dynamic = false
|
|
|
3874
3972
|
}
|
|
3875
3973
|
if (reexportsOnly && keyword.value !== "export") continue;
|
|
3876
3974
|
const previous = tokens[index - 1];
|
|
3877
|
-
if (_optionalChain([previous, 'optionalAccess',
|
|
3975
|
+
if (_optionalChain([previous, 'optionalAccess', _241 => _241.value]) === ".") continue;
|
|
3878
3976
|
const first = tokens[index + 1];
|
|
3879
3977
|
if (!first || first.value === "type" || first.value === "(" || first.value === ".") {
|
|
3880
3978
|
continue;
|
|
@@ -3890,7 +3988,7 @@ function scanImportSpecifiers(content, { reexportsOnly = false, dynamic = false
|
|
|
3890
3988
|
for (let cursor = index + 1; cursor < tokens.length; cursor++) {
|
|
3891
3989
|
const token = tokens[cursor];
|
|
3892
3990
|
if (token.value === ";") break;
|
|
3893
|
-
if (token.value === "from" && _optionalChain([tokens, 'access',
|
|
3991
|
+
if (token.value === "from" && _optionalChain([tokens, 'access', _242 => _242[cursor + 1], 'optionalAccess', _243 => _243.kind]) === "string") {
|
|
3894
3992
|
fromIndex = cursor;
|
|
3895
3993
|
break;
|
|
3896
3994
|
}
|
|
@@ -3908,14 +4006,17 @@ function scanImportSpecifiers(content, { reexportsOnly = false, dynamic = false
|
|
|
3908
4006
|
return Array.from(matches);
|
|
3909
4007
|
}
|
|
3910
4008
|
function isTypeOnlyNamedClause(tokens, startIndex, endIndex) {
|
|
3911
|
-
if (_optionalChain([tokens, 'access',
|
|
3912
|
-
|
|
3913
|
-
|
|
3914
|
-
|
|
4009
|
+
if (_optionalChain([tokens, 'access', _244 => _244[startIndex], 'optionalAccess', _245 => _245.value]) !== "{") return false;
|
|
4010
|
+
let closingBraceIndex = -1;
|
|
4011
|
+
for (let index = startIndex + 1; index < endIndex; index++) {
|
|
4012
|
+
if (tokens[index].value !== "}") continue;
|
|
4013
|
+
closingBraceIndex = index;
|
|
4014
|
+
break;
|
|
4015
|
+
}
|
|
3915
4016
|
if (closingBraceIndex === -1) return false;
|
|
3916
4017
|
let entryStartsAt = startIndex + 1;
|
|
3917
4018
|
for (let index = entryStartsAt; index <= closingBraceIndex; index++) {
|
|
3918
|
-
if (index !== closingBraceIndex && _optionalChain([tokens, 'access',
|
|
4019
|
+
if (index !== closingBraceIndex && _optionalChain([tokens, 'access', _246 => _246[index], 'optionalAccess', _247 => _247.value]) !== ",") continue;
|
|
3919
4020
|
const entry = tokens.slice(entryStartsAt, index);
|
|
3920
4021
|
if (entry.length > 0 && entry[0].value !== "type") return false;
|
|
3921
4022
|
entryStartsAt = index + 1;
|
|
@@ -3986,19 +4087,22 @@ function matchProjectImportAlias(alias, specifier) {
|
|
|
3986
4087
|
return specifier.slice(alias.prefix.length, specifier.length - alias.suffix.length);
|
|
3987
4088
|
}
|
|
3988
4089
|
function getProjectImportAliases(projectRoot) {
|
|
3989
|
-
const stamp = PROJECT_ALIAS_FILES.map((file) => {
|
|
3990
|
-
try {
|
|
3991
|
-
return String(_fs2.default.statSync(_path2.default.join(projectRoot, file)).mtimeMs);
|
|
3992
|
-
} catch (e43) {
|
|
3993
|
-
return "-";
|
|
3994
|
-
}
|
|
3995
|
-
}).join(":");
|
|
3996
4090
|
const sourceDir = _chunkMNUYXZV7cjs.getFarmProjectSourceDir.call(void 0, projectRoot);
|
|
3997
|
-
const cacheStamp = `${stamp}:${sourceDir}`;
|
|
3998
4091
|
const cached = projectImportAliasCache.get(projectRoot);
|
|
3999
|
-
|
|
4092
|
+
const dependencies = new Set(
|
|
4093
|
+
_nullishCoalesce(_optionalChain([cached, 'optionalAccess', _248 => _248.stamps, 'access', _249 => _249.keys, 'call', _250 => _250()]), () => ( PROJECT_ALIAS_FILES.map((file) => _path2.default.join(projectRoot, file))))
|
|
4094
|
+
);
|
|
4095
|
+
const stamps = /* @__PURE__ */ new Map();
|
|
4096
|
+
for (const file of dependencies) {
|
|
4097
|
+
noteFarmSourceRead(file);
|
|
4098
|
+
stamps.set(file, getFarmSourceStamp(file));
|
|
4099
|
+
}
|
|
4100
|
+
if (_optionalChain([cached, 'optionalAccess', _251 => _251.sourceDir]) === sourceDir && [...stamps].every(([file, stamp]) => cached.stamps.get(file) === stamp))
|
|
4101
|
+
return cached.aliases;
|
|
4102
|
+
dependencies.clear();
|
|
4103
|
+
for (const file of PROJECT_ALIAS_FILES) dependencies.add(_path2.default.join(projectRoot, file));
|
|
4000
4104
|
const aliases = [
|
|
4001
|
-
...readTsconfigPathAliases(projectRoot),
|
|
4105
|
+
...readTsconfigPathAliases(projectRoot, dependencies),
|
|
4002
4106
|
...readPackageImportAliases(projectRoot)
|
|
4003
4107
|
];
|
|
4004
4108
|
if (!aliases.some((alias) => alias.prefix === "@/")) {
|
|
@@ -4009,15 +4113,20 @@ function getProjectImportAliases(projectRoot) {
|
|
|
4009
4113
|
targets: [_path2.default.join(projectRoot, sourceDir, "*")]
|
|
4010
4114
|
});
|
|
4011
4115
|
}
|
|
4012
|
-
|
|
4116
|
+
stamps.clear();
|
|
4117
|
+
for (const file of dependencies) {
|
|
4118
|
+
noteFarmSourceRead(file);
|
|
4119
|
+
stamps.set(file, getFarmSourceStamp(file));
|
|
4120
|
+
}
|
|
4121
|
+
projectImportAliasCache.set(projectRoot, { sourceDir, stamps, aliases });
|
|
4013
4122
|
return aliases;
|
|
4014
4123
|
}
|
|
4015
|
-
function readTsconfigPathAliases(projectRoot) {
|
|
4124
|
+
function readTsconfigPathAliases(projectRoot, dependencies) {
|
|
4016
4125
|
for (const name of ["tsconfig.json", "jsconfig.json"]) {
|
|
4017
4126
|
const configPath = _path2.default.join(projectRoot, name);
|
|
4018
4127
|
if (!_fs2.default.existsSync(configPath)) continue;
|
|
4019
|
-
const resolved = readTsconfigPaths(configPath, /* @__PURE__ */ new Set());
|
|
4020
|
-
if (!_optionalChain([resolved, 'optionalAccess',
|
|
4128
|
+
const resolved = readTsconfigPaths(configPath, /* @__PURE__ */ new Set(), dependencies);
|
|
4129
|
+
if (!_optionalChain([resolved, 'optionalAccess', _252 => _252.paths])) return [];
|
|
4021
4130
|
const base2 = _nullishCoalesce(resolved.baseUrl, () => ( resolved.pathsDirectory));
|
|
4022
4131
|
return Object.entries(resolved.paths).flatMap(([pattern, targets]) => {
|
|
4023
4132
|
if (!Array.isArray(targets)) return [];
|
|
@@ -4034,9 +4143,10 @@ function readTsconfigPathAliases(projectRoot) {
|
|
|
4034
4143
|
}
|
|
4035
4144
|
return [];
|
|
4036
4145
|
}
|
|
4037
|
-
function readTsconfigPaths(configPath, visited) {
|
|
4146
|
+
function readTsconfigPaths(configPath, visited, dependencies) {
|
|
4038
4147
|
if (visited.has(configPath)) return null;
|
|
4039
4148
|
visited.add(configPath);
|
|
4149
|
+
dependencies.add(configPath);
|
|
4040
4150
|
const config = readJsonWithComments(configPath);
|
|
4041
4151
|
if (!config) return null;
|
|
4042
4152
|
const directory = _path2.default.dirname(configPath);
|
|
@@ -4049,21 +4159,21 @@ function readTsconfigPaths(configPath, visited) {
|
|
|
4049
4159
|
directory,
|
|
4050
4160
|
parent.endsWith(".json") ? parent : `${parent}.json`
|
|
4051
4161
|
);
|
|
4052
|
-
inherited = _nullishCoalesce(readTsconfigPaths(parentPath, visited), () => ( inherited));
|
|
4162
|
+
inherited = _nullishCoalesce(readTsconfigPaths(parentPath, visited, dependencies), () => ( inherited));
|
|
4053
4163
|
}
|
|
4054
4164
|
const options = _nullishCoalesce(config.compilerOptions, () => ( {}));
|
|
4055
|
-
const baseUrl = typeof options.baseUrl === "string" ? _path2.default.resolve(directory, options.baseUrl) : _optionalChain([inherited, 'optionalAccess',
|
|
4165
|
+
const baseUrl = typeof options.baseUrl === "string" ? _path2.default.resolve(directory, options.baseUrl) : _optionalChain([inherited, 'optionalAccess', _253 => _253.baseUrl]);
|
|
4056
4166
|
if (options.paths && typeof options.paths === "object") {
|
|
4057
4167
|
return { paths: options.paths, pathsDirectory: directory, baseUrl };
|
|
4058
4168
|
}
|
|
4059
4169
|
return inherited ? { ...inherited, baseUrl } : { pathsDirectory: directory, baseUrl };
|
|
4060
4170
|
}
|
|
4061
4171
|
function readPackageImportAliases(projectRoot) {
|
|
4062
|
-
const imports = _optionalChain([readPackageJson, 'call',
|
|
4172
|
+
const imports = _optionalChain([readPackageJson, 'call', _254 => _254(_path2.default.join(projectRoot, "package.json")), 'optionalAccess', _255 => _255.imports]);
|
|
4063
4173
|
if (!imports || typeof imports !== "object") return [];
|
|
4064
4174
|
return Object.entries(imports).flatMap(([pattern, value]) => {
|
|
4065
4175
|
const target = resolveConditionalExportTarget(value);
|
|
4066
|
-
if (!pattern.startsWith("#") || !_optionalChain([target, 'optionalAccess',
|
|
4176
|
+
if (!pattern.startsWith("#") || !_optionalChain([target, 'optionalAccess', _256 => _256.startsWith, 'call', _257 => _257("./")])) return [];
|
|
4067
4177
|
const wildcardIndex = pattern.indexOf("*");
|
|
4068
4178
|
return [
|
|
4069
4179
|
{
|
|
@@ -4079,7 +4189,7 @@ function readJsonWithComments(filePath) {
|
|
|
4079
4189
|
let source;
|
|
4080
4190
|
try {
|
|
4081
4191
|
source = _fs2.default.readFileSync(filePath, "utf8");
|
|
4082
|
-
} catch (
|
|
4192
|
+
} catch (e43) {
|
|
4083
4193
|
return null;
|
|
4084
4194
|
}
|
|
4085
4195
|
let output = "";
|
|
@@ -4107,7 +4217,7 @@ function readJsonWithComments(filePath) {
|
|
|
4107
4217
|
}
|
|
4108
4218
|
try {
|
|
4109
4219
|
return JSON.parse(output.replace(/,(\s*[}\]])/g, "$1"));
|
|
4110
|
-
} catch (
|
|
4220
|
+
} catch (e44) {
|
|
4111
4221
|
return null;
|
|
4112
4222
|
}
|
|
4113
4223
|
}
|
|
@@ -4129,15 +4239,15 @@ function resolvePackageModuleSourcePath(importerPath, specifier, root) {
|
|
|
4129
4239
|
const packageJsonPath = _path2.default.join(packageDirectory, "package.json");
|
|
4130
4240
|
const packageJson = readPackageJson(packageJsonPath);
|
|
4131
4241
|
const exportKey = packageSubpath ? `./${packageSubpath}` : ".";
|
|
4132
|
-
const exportTarget = resolvePackageExport(_optionalChain([packageJson, 'optionalAccess',
|
|
4242
|
+
const exportTarget = resolvePackageExport(_optionalChain([packageJson, 'optionalAccess', _258 => _258.exports]), exportKey);
|
|
4133
4243
|
const candidates = /* @__PURE__ */ new Set();
|
|
4134
|
-
if (_optionalChain([exportTarget, 'optionalAccess',
|
|
4244
|
+
if (_optionalChain([exportTarget, 'optionalAccess', _259 => _259.startsWith, 'call', _260 => _260("./")])) {
|
|
4135
4245
|
candidates.add(_path2.default.resolve(packageDirectory, exportTarget));
|
|
4136
4246
|
}
|
|
4137
4247
|
if (packageSubpath) {
|
|
4138
4248
|
candidates.add(_path2.default.join(packageDirectory, packageSubpath));
|
|
4139
4249
|
} else {
|
|
4140
|
-
for (const entry of [_optionalChain([packageJson, 'optionalAccess',
|
|
4250
|
+
for (const entry of [_optionalChain([packageJson, 'optionalAccess', _261 => _261.browser]), _optionalChain([packageJson, 'optionalAccess', _262 => _262.module]), _optionalChain([packageJson, 'optionalAccess', _263 => _263.main])]) {
|
|
4141
4251
|
if (typeof entry === "string") candidates.add(_path2.default.resolve(packageDirectory, entry));
|
|
4142
4252
|
}
|
|
4143
4253
|
candidates.add(_path2.default.join(packageDirectory, "index"));
|
|
@@ -4173,7 +4283,7 @@ function findPackageDirectory2(importerPath, packageName, root) {
|
|
|
4173
4283
|
function readPackageJson(packageJsonPath) {
|
|
4174
4284
|
try {
|
|
4175
4285
|
return JSON.parse(_fs2.default.readFileSync(packageJsonPath, "utf8"));
|
|
4176
|
-
} catch (
|
|
4286
|
+
} catch (e45) {
|
|
4177
4287
|
return null;
|
|
4178
4288
|
}
|
|
4179
4289
|
}
|
|
@@ -4202,7 +4312,7 @@ function resolvePackageExport(exportsField, exportKey) {
|
|
|
4202
4312
|
if (!exportKey.startsWith(prefix) || !exportKey.endsWith(suffix)) continue;
|
|
4203
4313
|
const wildcard = exportKey.slice(prefix.length, exportKey.length - suffix.length);
|
|
4204
4314
|
const target = resolveConditionalExportTarget(value);
|
|
4205
|
-
return _nullishCoalesce(_optionalChain([target, 'optionalAccess',
|
|
4315
|
+
return _nullishCoalesce(_optionalChain([target, 'optionalAccess', _264 => _264.replace, 'call', _265 => _265("*", wildcard)]), () => ( null));
|
|
4206
4316
|
}
|
|
4207
4317
|
return null;
|
|
4208
4318
|
}
|
|
@@ -4245,8 +4355,8 @@ function resolveSourceCandidatePath(candidate) {
|
|
|
4245
4355
|
}
|
|
4246
4356
|
for (const sourcePath of paths) {
|
|
4247
4357
|
try {
|
|
4248
|
-
if (_optionalChain([_fs2.default, 'access',
|
|
4249
|
-
} catch (
|
|
4358
|
+
if (_optionalChain([_fs2.default, 'access', _266 => _266.statSync, 'call', _267 => _267(sourcePath, { throwIfNoEntry: false }), 'optionalAccess', _268 => _268.isFile, 'call', _269 => _269()])) return sourcePath;
|
|
4359
|
+
} catch (e46) {
|
|
4250
4360
|
}
|
|
4251
4361
|
}
|
|
4252
4362
|
return null;
|
|
@@ -4254,7 +4364,7 @@ function resolveSourceCandidatePath(candidate) {
|
|
|
4254
4364
|
function isFarmPackageClientBoundary(importerPath, specifier, root) {
|
|
4255
4365
|
const imported = resolveImportedModule(importerPath, specifier, root);
|
|
4256
4366
|
if (imported.local || !imported.path) return false;
|
|
4257
|
-
return inspectPackageClientBoundary(imported.path, root
|
|
4367
|
+
return inspectPackageClientBoundary(imported.path, root).shouldHydrate;
|
|
4258
4368
|
}
|
|
4259
4369
|
var CLIENT_PACKAGE_SCAN_EXTENSIONS = /\.(?:[cm]?[jt]sx?)$/;
|
|
4260
4370
|
var CLIENT_PACKAGE_SCAN_SKIP = /* @__PURE__ */ new Set([
|
|
@@ -4288,7 +4398,7 @@ function scanFarmPackageImports(directory, root) {
|
|
|
4288
4398
|
let entries;
|
|
4289
4399
|
try {
|
|
4290
4400
|
entries = _fs2.default.readdirSync(current, { withFileTypes: true });
|
|
4291
|
-
} catch (
|
|
4401
|
+
} catch (e47) {
|
|
4292
4402
|
return;
|
|
4293
4403
|
}
|
|
4294
4404
|
for (const entry of entries) {
|
|
@@ -4321,7 +4431,7 @@ function collectFarmServerBundledPackageInfo(directory) {
|
|
|
4321
4431
|
let entries;
|
|
4322
4432
|
try {
|
|
4323
4433
|
entries = _fs2.default.readdirSync(current, { withFileTypes: true });
|
|
4324
|
-
} catch (
|
|
4434
|
+
} catch (e48) {
|
|
4325
4435
|
return;
|
|
4326
4436
|
}
|
|
4327
4437
|
for (const entry of entries) {
|
|
@@ -4350,17 +4460,43 @@ var clientReachableModules = /* @__PURE__ */ new Map();
|
|
|
4350
4460
|
function invalidateFarmClientReachableModules() {
|
|
4351
4461
|
clientReachableModules.clear();
|
|
4352
4462
|
}
|
|
4463
|
+
function isClientEntrySource(content) {
|
|
4464
|
+
return hasUseClientDirective(content) || hasHydrateExport(content);
|
|
4465
|
+
}
|
|
4466
|
+
function getClientReachableImports(content) {
|
|
4467
|
+
return getImportSpecifiers(content, { dynamic: true });
|
|
4468
|
+
}
|
|
4469
|
+
function noteFarmClientReachableModuleChange(file, event, options) {
|
|
4470
|
+
if (event !== "update") {
|
|
4471
|
+
invalidateFarmClientReachableModules();
|
|
4472
|
+
return;
|
|
4473
|
+
}
|
|
4474
|
+
const resolved = _path2.default.resolve(file);
|
|
4475
|
+
let content;
|
|
4476
|
+
for (const [key, scan] of clientReachableModules) {
|
|
4477
|
+
const read = scan.reads.get(resolved);
|
|
4478
|
+
if (!read) {
|
|
4479
|
+
if (options.appSource) clientReachableModules.delete(key);
|
|
4480
|
+
continue;
|
|
4481
|
+
}
|
|
4482
|
+
if (content === void 0) content = readIfExists(resolved);
|
|
4483
|
+
if (read.entry !== void 0 && read.entry !== isClientEntrySource(content) || read.imports !== void 0 && read.imports !== getClientReachableImports(content).join("\0")) {
|
|
4484
|
+
clientReachableModules.delete(key);
|
|
4485
|
+
}
|
|
4486
|
+
}
|
|
4487
|
+
}
|
|
4353
4488
|
function getFarmClientReachableModules(directory, root) {
|
|
4354
4489
|
const key = `${_path2.default.resolve(root)}\0${_path2.default.resolve(directory)}`;
|
|
4355
4490
|
const cached = clientReachableModules.get(key);
|
|
4356
|
-
if (cached) return cached;
|
|
4491
|
+
if (cached) return cached.modules;
|
|
4357
4492
|
const reachable = /* @__PURE__ */ new Set();
|
|
4493
|
+
const reads = /* @__PURE__ */ new Map();
|
|
4358
4494
|
const queue = [];
|
|
4359
4495
|
const walk2 = (current) => {
|
|
4360
4496
|
let entries;
|
|
4361
4497
|
try {
|
|
4362
4498
|
entries = _fs2.default.readdirSync(current, { withFileTypes: true });
|
|
4363
|
-
} catch (
|
|
4499
|
+
} catch (e49) {
|
|
4364
4500
|
return;
|
|
4365
4501
|
}
|
|
4366
4502
|
for (const entry of entries) {
|
|
@@ -4368,8 +4504,9 @@ function getFarmClientReachableModules(directory, root) {
|
|
|
4368
4504
|
if (entry.isDirectory()) {
|
|
4369
4505
|
if (!entry.name.startsWith(".") && !CLIENT_PACKAGE_SCAN_SKIP.has(entry.name)) walk2(file);
|
|
4370
4506
|
} else if (isScannedSourceFile(entry.name)) {
|
|
4371
|
-
const
|
|
4372
|
-
|
|
4507
|
+
const clientEntry = isClientEntrySource(readIfExists(file));
|
|
4508
|
+
reads.set(_path2.default.resolve(file), { entry: clientEntry });
|
|
4509
|
+
if (clientEntry) queue.push(file);
|
|
4373
4510
|
}
|
|
4374
4511
|
}
|
|
4375
4512
|
};
|
|
@@ -4378,14 +4515,18 @@ function getFarmClientReachableModules(directory, root) {
|
|
|
4378
4515
|
const file = _path2.default.resolve(queue.pop());
|
|
4379
4516
|
if (reachable.has(file)) continue;
|
|
4380
4517
|
reachable.add(file);
|
|
4381
|
-
|
|
4518
|
+
const imports = getClientReachableImports(readIfExists(file));
|
|
4519
|
+
const read = reads.get(file);
|
|
4520
|
+
if (read) read.imports = imports.join("\0");
|
|
4521
|
+
else reads.set(file, { imports: imports.join("\0") });
|
|
4522
|
+
for (const specifier of imports) {
|
|
4382
4523
|
const imported = resolveImportedModule(file, specifier, root);
|
|
4383
4524
|
if (imported.local && imported.path && !reachable.has(_path2.default.resolve(imported.path))) {
|
|
4384
4525
|
queue.push(imported.path);
|
|
4385
4526
|
}
|
|
4386
4527
|
}
|
|
4387
4528
|
}
|
|
4388
|
-
clientReachableModules.set(key, reachable);
|
|
4529
|
+
clientReachableModules.set(key, { modules: reachable, reads });
|
|
4389
4530
|
return reachable;
|
|
4390
4531
|
}
|
|
4391
4532
|
function resolveFarmClientOptimizeDeps(directory, root) {
|
|
@@ -4395,7 +4536,7 @@ function resolveFarmClientOptimizeDeps(directory, root) {
|
|
|
4395
4536
|
const imports = scanFarmPackageImports(directory, root);
|
|
4396
4537
|
for (const specifier of imports.client) {
|
|
4397
4538
|
const fonts = findFarmServerBundledPackage(importer, specifier);
|
|
4398
|
-
if (_optionalChain([fonts, 'optionalAccess',
|
|
4539
|
+
if (_optionalChain([fonts, 'optionalAccess', _270 => _270.fonts])) {
|
|
4399
4540
|
exclude.add(fonts.name);
|
|
4400
4541
|
continue;
|
|
4401
4542
|
}
|
|
@@ -4471,13 +4612,13 @@ function farmEnvironmentFunctionsPlugin(options = {}) {
|
|
|
4471
4612
|
let projectRoot = process.cwd();
|
|
4472
4613
|
let sources;
|
|
4473
4614
|
const routeSourceFiles = () => {
|
|
4474
|
-
const clientRoutes = _optionalChain([farmApi, 'optionalAccess',
|
|
4475
|
-
if (_optionalChain([sources, 'optionalAccess',
|
|
4615
|
+
const clientRoutes = _optionalChain([farmApi, 'optionalAccess', _271 => _271.getProgrammaticClientRoutes, 'call', _272 => _272()]);
|
|
4616
|
+
if (_optionalChain([sources, 'optionalAccess', _273 => _273.for]) !== clientRoutes || !sources) {
|
|
4476
4617
|
sources = {
|
|
4477
4618
|
for: clientRoutes,
|
|
4478
4619
|
files: /* @__PURE__ */ new Set([
|
|
4479
4620
|
...routesFiles,
|
|
4480
|
-
...[..._nullishCoalesce(_optionalChain([clientRoutes, 'optionalAccess',
|
|
4621
|
+
...[..._nullishCoalesce(_optionalChain([clientRoutes, 'optionalAccess', _274 => _274.routeSourceFiles]), () => ( []))].map(resolvedFile)
|
|
4481
4622
|
])
|
|
4482
4623
|
};
|
|
4483
4624
|
}
|
|
@@ -4498,7 +4639,7 @@ function farmEnvironmentFunctionsPlugin(options = {}) {
|
|
|
4498
4639
|
configResolved(config) {
|
|
4499
4640
|
isBuild = config.command === "build";
|
|
4500
4641
|
projectRoot = config.root;
|
|
4501
|
-
farmApi = _optionalChain([config, 'access',
|
|
4642
|
+
farmApi = _optionalChain([config, 'access', _275 => _275.plugins, 'access', _276 => _276.find, 'call', _277 => _277((plugin) => plugin.name === "farm"), 'optionalAccess', _278 => _278.api]);
|
|
4502
4643
|
sources = void 0;
|
|
4503
4644
|
routesFiles = new Set(
|
|
4504
4645
|
_chunk52Q4OB4Acjs.getFarmSourceRoots.call(void 0, { ...options, root: _nullishCoalesce(options.root, () => ( config.root)) }).flatMap(
|
|
@@ -4511,7 +4652,7 @@ function farmEnvironmentFunctionsPlugin(options = {}) {
|
|
|
4511
4652
|
transform(code, id, transformOptions) {
|
|
4512
4653
|
const environment = resolveBuildEnvironment(
|
|
4513
4654
|
this,
|
|
4514
|
-
_optionalChain([transformOptions, 'optionalAccess',
|
|
4655
|
+
_optionalChain([transformOptions, 'optionalAccess', _279 => _279.ssr])
|
|
4515
4656
|
);
|
|
4516
4657
|
const parse3 = (source) => this.parse(source);
|
|
4517
4658
|
const result = transformEnvironmentFunctions({
|
|
@@ -4524,7 +4665,7 @@ function farmEnvironmentFunctionsPlugin(options = {}) {
|
|
|
4524
4665
|
if (environment === "client" && !isBuild && !_chunkYUCU6XB4cjs.parseProgrammaticRouteModuleId.call(void 0, id) && routeSourceFiles().has(moduleFile(id)) && !isProgrammaticRouteActionProxy(code)) {
|
|
4525
4666
|
this.error(routeSourceError(moduleFile(id)));
|
|
4526
4667
|
}
|
|
4527
|
-
if (environment === "server" && _chunkT7UC2ORAcjs.resolveFarmServerComponentsMode.call(void 0, _optionalChain([options, 'access',
|
|
4668
|
+
if (environment === "server" && _chunkT7UC2ORAcjs.resolveFarmServerComponentsMode.call(void 0, _optionalChain([options, 'access', _280 => _280.experimental, 'optionalAccess', _281 => _281.serverComponents])) === "islands" && isApplicationScript(id)) {
|
|
4528
4669
|
const file = id.split("?", 1)[0];
|
|
4529
4670
|
const root = _fs.realpathSync.call(void 0, _nullishCoalesce(options.root, () => ( projectRoot)));
|
|
4530
4671
|
const clientCode = getFarmClientReachableModules(root, root).has(_path2.default.resolve(file)) || _fs.existsSync.call(void 0, file) && hasUseClientDirective(_fs.readFileSync.call(void 0, file, "utf8"));
|
|
@@ -4558,7 +4699,7 @@ function farmEnvironmentFunctionsPlugin(options = {}) {
|
|
|
4558
4699
|
for (const id of this.getModuleIds()) {
|
|
4559
4700
|
if (_chunkYUCU6XB4cjs.parseProgrammaticRouteModuleId.call(void 0, id)) {
|
|
4560
4701
|
const chain = findClientNodeBuiltinChain(id, (moduleId) => {
|
|
4561
|
-
return _optionalChain([this, 'access',
|
|
4702
|
+
return _optionalChain([this, 'access', _282 => _282.getModuleInfo, 'call', _283 => _283(moduleId), 'optionalAccess', _284 => _284.importedIds]);
|
|
4562
4703
|
});
|
|
4563
4704
|
if (chain) {
|
|
4564
4705
|
this.error(
|
|
@@ -4576,8 +4717,8 @@ function farmEnvironmentFunctionsPlugin(options = {}) {
|
|
|
4576
4717
|
}
|
|
4577
4718
|
if (!forbidden.has(moduleFile(id))) continue;
|
|
4578
4719
|
const info = this.getModuleInfo(id);
|
|
4579
|
-
if (isProgrammaticRouteActionProxy(_optionalChain([info, 'optionalAccess',
|
|
4580
|
-
this.error(routeSourceError(moduleFile(id), _optionalChain([info, 'optionalAccess',
|
|
4720
|
+
if (isProgrammaticRouteActionProxy(_optionalChain([info, 'optionalAccess', _285 => _285.code]))) continue;
|
|
4721
|
+
this.error(routeSourceError(moduleFile(id), _optionalChain([info, 'optionalAccess', _286 => _286.importers, 'access', _287 => _287.map, 'call', _288 => _288(moduleFile)])));
|
|
4581
4722
|
}
|
|
4582
4723
|
}
|
|
4583
4724
|
};
|
|
@@ -4591,13 +4732,13 @@ function moduleFile(id) {
|
|
|
4591
4732
|
function resolvedFile(filePath) {
|
|
4592
4733
|
try {
|
|
4593
4734
|
return moduleFile(_fs.realpathSync.call(void 0, filePath));
|
|
4594
|
-
} catch (
|
|
4735
|
+
} catch (e50) {
|
|
4595
4736
|
return moduleFile(filePath);
|
|
4596
4737
|
}
|
|
4597
4738
|
}
|
|
4598
4739
|
function resolveBuildEnvironment(context, ssr) {
|
|
4599
|
-
if (_optionalChain([context, 'access',
|
|
4600
|
-
if (_optionalChain([context, 'access',
|
|
4740
|
+
if (_optionalChain([context, 'access', _289 => _289.environment, 'optionalAccess', _290 => _290.name]) === "client") return "client";
|
|
4741
|
+
if (_optionalChain([context, 'access', _291 => _291.environment, 'optionalAccess', _292 => _292.name]) === "rsc" || _optionalChain([context, 'access', _293 => _293.environment, 'optionalAccess', _294 => _294.name]) === "ssr") {
|
|
4601
4742
|
return "server";
|
|
4602
4743
|
}
|
|
4603
4744
|
return ssr ? "server" : "client";
|
|
@@ -4924,4 +5065,7 @@ function transformError(id, message) {
|
|
|
4924
5065
|
|
|
4925
5066
|
|
|
4926
5067
|
|
|
4927
|
-
|
|
5068
|
+
|
|
5069
|
+
|
|
5070
|
+
|
|
5071
|
+
exports.FARM_BROWSER_BUILTIN_PREFIX = FARM_BROWSER_BUILTIN_PREFIX; exports.resolveFarmBrowserBuiltin = resolveFarmBrowserBuiltin; exports.loadFarmBrowserBuiltin = loadFarmBrowserBuiltin; exports.farmBrowserBuiltinsOptimizerPlugin = farmBrowserBuiltinsOptimizerPlugin; exports.programmaticClientRouteKey = programmaticClientRouteKey; exports.resolveProgrammaticClientRoutes = resolveProgrammaticClientRoutes; exports.createEvaluatedRouteGraph = createEvaluatedRouteGraph; exports.mergeProgrammaticClientRoutes = mergeProgrammaticClientRoutes; exports.generateProgrammaticClientRouteModule = generateProgrammaticClientRouteModule; exports.getFarmSourceStamp = getFarmSourceStamp; exports.FarmSourceSnapshotStore = FarmSourceSnapshotStore; exports.withFarmSourceSnapshot = withFarmSourceSnapshot; exports.withFarmSourceSnapshotOf = withFarmSourceSnapshotOf; exports.memoizeInFarmSourceSnapshot = memoizeInFarmSourceSnapshot; exports.noteFarmSourceRead = noteFarmSourceRead; exports.traceFarmSourceReads = traceFarmSourceReads; exports.traceFarmSourceReadGroups = traceFarmSourceReadGroups; exports.rewriteFarmReactServerClientModuleImports = rewriteFarmReactServerClientModuleImports; exports.rewriteFarmReactServerImports = rewriteFarmReactServerImports; exports.invalidateFarmClientOnlyScan = invalidateFarmClientOnlyScan; exports.farmRelativeImportFiles = farmRelativeImportFiles; exports.usePackageScanCacheFile = usePackageScanCacheFile; exports.persistPackageScanCache = persistPackageScanCache; exports.FARM_CLIENT_REFERENCE_PRAGMA = FARM_CLIENT_REFERENCE_PRAGMA; exports.FARM_CLIENT_REFERENCE_DIRECTORY = FARM_CLIENT_REFERENCE_DIRECTORY; exports.FARM_RESOLVE_FROM_PREFIX = FARM_RESOLVE_FROM_PREFIX; exports.parseFarmResolveFrom = parseFarmResolveFrom; exports.ensureFarmPackageClientReference = ensureFarmPackageClientReference; exports.ensureFarmInternalClientReference = ensureFarmInternalClientReference; exports.rewriteFarmPackageClientImports = rewriteFarmPackageClientImports; exports.farmIslandContainerReferencePath = farmIslandContainerReferencePath; exports.ensureFarmIslandContainerReference = ensureFarmIslandContainerReference; exports.wrapFarmIslandContainers = wrapFarmIslandContainers; exports.withPackageClientBoundaryCache = withPackageClientBoundaryCache; exports.bindPackageClientBoundaryCache = bindPackageClientBoundaryCache; exports.usePackageClientBoundaryCacheFile = usePackageClientBoundaryCacheFile; exports.resolvePackageClientBoundaryCacheFile = resolvePackageClientBoundaryCacheFile; exports.runWithPackageClientBoundaryCacheFile = runWithPackageClientBoundaryCacheFile; exports.runWithLatestPackageClientBoundaryCache = runWithLatestPackageClientBoundaryCache; exports.dropLatestPackageClientBoundaryCache = dropLatestPackageClientBoundaryCache; exports.setFarmRendererHydrationScope = setFarmRendererHydrationScope; exports.resolveModuleSourcePath = resolveModuleSourcePath; exports.getFarmClientHydrationPlanOptions = getFarmClientHydrationPlanOptions; exports.describeSuppressedAsyncHydration = describeSuppressedAsyncHydration; exports.resolveFarmIsolatedClientHydrationMode = resolveFarmIsolatedClientHydrationMode; exports.hasUseClientDirective = hasUseClientDirective; exports.getIslandStrategyExport = getIslandStrategyExport; exports.stripUseClientDirective = stripUseClientDirective; exports.getFarmClientRenderingBindings = getFarmClientRenderingBindings; exports.collectFarmRenderedClientModules = collectFarmRenderedClientModules; exports.collectFarmServerStylesheets = collectFarmServerStylesheets; exports.getClientModuleMetadata = getClientModuleMetadata; exports.getClientModuleHydrationPlanKey = getClientModuleHydrationPlanKey; exports.getClientModuleHydrationPlan = getClientModuleHydrationPlan; exports.usesFarmServerTree = usesFarmServerTree; exports.createMarkdownPageHydrationPlanner = createMarkdownPageHydrationPlanner; exports.enforceFarmIsolatedHydrationRouteBudget = enforceFarmIsolatedHydrationRouteBudget; exports.isIsolatableClientBoundarySource = isIsolatableClientBoundarySource; exports.isFarmClientModulePlanUnchanged = isFarmClientModulePlanUnchanged; exports.getInstalledPackageDirectory = getInstalledPackageDirectory; exports.resolveImportedModule = resolveImportedModule; exports.isFarmPackageClientBoundary = isFarmPackageClientBoundary; exports.collectFarmClientPackageImports = collectFarmClientPackageImports; exports.collectFarmServerBundledPackageInfo = collectFarmServerBundledPackageInfo; exports.noteFarmClientReachableModuleChange = noteFarmClientReachableModuleChange; exports.getFarmClientReachableModules = getFarmClientReachableModules; exports.resolveFarmClientOptimizeDeps = resolveFarmClientOptimizeDeps; exports.createFarmDiagnostic = createFarmDiagnostic; exports.formatFarmDiagnostic = formatFarmDiagnostic; exports.createFarmSourceLocator = createFarmSourceLocator; exports.transformEnvironmentFunctions = transformEnvironmentFunctions; exports.farmEnvironmentFunctionsPlugin = farmEnvironmentFunctionsPlugin;
|