@farm.js/core 0.1.25 → 0.1.26

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.
Files changed (133) hide show
  1. package/dist/agent-runtime.d.mts +2 -2
  2. package/dist/agent-runtime.d.ts +2 -2
  3. package/dist/api/route-manager.d.mts +2 -2
  4. package/dist/api/route-manager.d.ts +2 -2
  5. package/dist/api.d.mts +3 -3
  6. package/dist/api.d.ts +3 -3
  7. package/dist/{app-ZuWrAMc_.d.mts → app-29vG5tmY.d.mts} +3 -3
  8. package/dist/{app-BF-ctoxh.d.ts → app-Cx71s_PT.d.ts} +3 -3
  9. package/dist/app-markdown.cjs +6 -4
  10. package/dist/app-markdown.d.mts +3 -3
  11. package/dist/app-markdown.d.ts +3 -3
  12. package/dist/app-markdown.mjs +5 -3
  13. package/dist/{chunk-E3RDL2DA.cjs → chunk-2CT6XUNO.cjs} +61 -31
  14. package/dist/{chunk-R7LCG3BT.cjs → chunk-3TQG7CGC.cjs} +84 -77
  15. package/dist/{chunk-AXYTGLF3.cjs → chunk-3WSWXPYM.cjs} +4 -4
  16. package/dist/{chunk-2BIJGZR3.mjs → chunk-74RZNRY6.mjs} +1 -1
  17. package/dist/{chunk-TTVHACQV.cjs → chunk-ALIFMS4A.cjs} +1 -1
  18. package/dist/{chunk-T2OPSH6S.mjs → chunk-ARXCHQLX.mjs} +9 -2
  19. package/dist/{chunk-2KI3CL3N.mjs → chunk-DU2CASV6.mjs} +1 -1
  20. package/dist/chunk-J63ZH5OQ.cjs +62 -0
  21. package/dist/{chunk-XM4ZDVD7.mjs → chunk-JM5GQL4H.mjs} +1 -1
  22. package/dist/{chunk-6VEHUKZ2.mjs → chunk-MM5D6VLP.mjs} +4 -20
  23. package/dist/chunk-MVL2RAJW.mjs +62 -0
  24. package/dist/{chunk-YA6LLTIJ.cjs → chunk-ND224OE2.cjs} +4 -20
  25. package/dist/{chunk-XME4TCLB.mjs → chunk-OFKG57MZ.mjs} +2 -2
  26. package/dist/{chunk-U4MP7XTD.mjs → chunk-OOIL3BWR.mjs} +168 -16
  27. package/dist/{chunk-WOI2HOGA.mjs → chunk-PPIW3MH6.mjs} +1 -1
  28. package/dist/{chunk-2ITKVAIF.cjs → chunk-QIH2HD6H.cjs} +191 -39
  29. package/dist/{chunk-65P6OGYN.cjs → chunk-QJ4D3UKJ.cjs} +10 -3
  30. package/dist/{chunk-RYDW7GPR.cjs → chunk-QLXEYIAW.cjs} +13 -13
  31. package/dist/{chunk-WJYCI56T.mjs → chunk-QPPQHB6X.mjs} +43 -30
  32. package/dist/{chunk-RR6UGYUT.mjs → chunk-RAI7NULA.mjs} +39 -9
  33. package/dist/{chunk-6K4SPQWL.cjs → chunk-RCYINC4A.cjs} +3 -3
  34. package/dist/{chunk-QYMRIVG6.cjs → chunk-SZ4LYNUX.cjs} +110 -97
  35. package/dist/{chunk-N2Z4ZFDE.mjs → chunk-UXQXGB5A.mjs} +19 -12
  36. package/dist/{chunk-CFNOGDUS.cjs → chunk-W2HZKYES.cjs} +2 -2
  37. package/dist/{chunk-O5DVPF3R.cjs → chunk-WFPRVVF2.cjs} +10 -10
  38. package/dist/{chunk-5YYJ6Q2L.mjs → chunk-YMUH2BLR.mjs} +2 -2
  39. package/dist/{client-plugins-DPG0NeZN.d.mts → client-plugins-B8RPJnot.d.mts} +90 -3
  40. package/dist/{client-plugins-Fgni-_25.d.ts → client-plugins-bPBf4haK.d.ts} +90 -3
  41. package/dist/client-plugins.d.mts +2 -2
  42. package/dist/client-plugins.d.ts +2 -2
  43. package/dist/client.d.mts +6 -6
  44. package/dist/client.d.ts +6 -6
  45. package/dist/config.d.mts +2 -2
  46. package/dist/config.d.ts +2 -2
  47. package/dist/{devtools-I7TBFOKD.mjs → devtools-5D4ZDRPR.mjs} +5 -3
  48. package/dist/{devtools-6OA7FEF6.cjs → devtools-QZJEUOJW.cjs} +6 -4
  49. package/dist/docs.cjs +8 -6
  50. package/dist/docs.mjs +7 -5
  51. package/dist/index.cjs +17 -13
  52. package/dist/index.d.mts +13 -13
  53. package/dist/index.d.ts +13 -13
  54. package/dist/index.mjs +16 -12
  55. package/dist/integrations.d.mts +2 -2
  56. package/dist/integrations.d.ts +2 -2
  57. package/dist/internal/app-markdown-runtime.cjs +5 -3
  58. package/dist/internal/app-markdown-runtime.d.mts +2 -2
  59. package/dist/internal/app-markdown-runtime.d.ts +2 -2
  60. package/dist/internal/app-markdown-runtime.mjs +4 -2
  61. package/dist/internal/build-runtime.cjs +14 -13
  62. package/dist/internal/build-runtime.d.mts +4 -4
  63. package/dist/internal/build-runtime.d.ts +4 -4
  64. package/dist/internal/build-runtime.mjs +13 -12
  65. package/dist/internal/cli-runtime.cjs +6 -5
  66. package/dist/internal/cli-runtime.mjs +5 -4
  67. package/dist/internal/client-error-overlay.cjs +4 -4
  68. package/dist/internal/client-error-overlay.mjs +1 -1
  69. package/dist/internal/compression-runtime.d.mts +2 -2
  70. package/dist/internal/compression-runtime.d.ts +2 -2
  71. package/dist/internal/config-runtime.cjs +6 -4
  72. package/dist/internal/config-runtime.d.mts +3 -3
  73. package/dist/internal/config-runtime.d.ts +3 -3
  74. package/dist/internal/config-runtime.mjs +5 -3
  75. package/dist/internal/infra-analytics-runtime.cjs +4 -3
  76. package/dist/internal/infra-analytics-runtime.mjs +2 -1
  77. package/dist/internal/product-telemetry-runtime.cjs +2 -2
  78. package/dist/internal/product-telemetry-runtime.mjs +1 -1
  79. package/dist/internal/production-runtime.cjs +5 -4
  80. package/dist/internal/production-runtime.d.mts +11 -9
  81. package/dist/internal/production-runtime.d.ts +11 -9
  82. package/dist/internal/production-runtime.mjs +4 -3
  83. package/dist/markdown.cjs +4 -2
  84. package/dist/markdown.mjs +3 -1
  85. package/dist/{metadata-D0EF7esB.d.mts → metadata-C3na4CBj.d.mts} +1 -1
  86. package/dist/{metadata-CDnRHKVq.d.ts → metadata-CzBP4Mfp.d.ts} +1 -1
  87. package/dist/middleware.d.mts +4 -4
  88. package/dist/middleware.d.ts +4 -4
  89. package/dist/navigation.d.mts +5 -5
  90. package/dist/navigation.d.ts +5 -5
  91. package/dist/observability-BupkiN0m.d.mts +447 -0
  92. package/dist/observability-BupkiN0m.d.ts +447 -0
  93. package/dist/observability.d.mts +2 -417
  94. package/dist/observability.d.ts +2 -417
  95. package/dist/plugin.cjs +9 -8
  96. package/dist/plugin.d.mts +2 -2
  97. package/dist/plugin.d.ts +2 -2
  98. package/dist/plugin.mjs +8 -7
  99. package/dist/{production-runtime-DpCt0opU.d.ts → production-runtime-CYg4wM4E.d.ts} +1 -1
  100. package/dist/{production-runtime-x3W4wVqx.d.mts → production-runtime-DP94hPGe.d.mts} +1 -1
  101. package/dist/{render-plan-D5oFRVBV.d.ts → render-plan-Bl6Fzg5z.d.ts} +1 -1
  102. package/dist/{render-plan-tazUJalK.d.mts → render-plan-CKAJg0jC.d.mts} +1 -1
  103. package/dist/renderer-client.d.mts +4 -4
  104. package/dist/renderer-client.d.ts +4 -4
  105. package/dist/{request-CzZX0Aew.d.ts → request-CR-Bp1Px.d.ts} +1 -1
  106. package/dist/{request-CXmQy5ks.d.mts → request-CrBCcPZZ.d.mts} +1 -1
  107. package/dist/request.d.mts +3 -3
  108. package/dist/request.d.ts +3 -3
  109. package/dist/{route-rendering-B-qpe32B.d.mts → route-rendering-C1NAHo-C.d.mts} +1 -1
  110. package/dist/{route-rendering-Dw3C362T.d.ts → route-rendering-CZH5FegB.d.ts} +1 -1
  111. package/dist/{router-CafM2jlw.d.mts → router-B57eDJ3u.d.mts} +1 -1
  112. package/dist/{router-CLl3xHwl.d.ts → router-Cg_kD3Bd.d.ts} +1 -1
  113. package/dist/routes.d.mts +2 -2
  114. package/dist/routes.d.ts +2 -2
  115. package/dist/server-plugins.d.mts +3 -3
  116. package/dist/server-plugins.d.ts +3 -3
  117. package/dist/server.cjs +159 -102
  118. package/dist/server.d.mts +8 -8
  119. package/dist/server.d.ts +8 -8
  120. package/dist/server.mjs +140 -83
  121. package/dist/{spa-router-DePr2aZ6.d.ts → spa-router-BstQUO6Q.d.ts} +2 -2
  122. package/dist/{spa-router-6sJfsMlQ.d.mts → spa-router-DTdbuinx.d.mts} +2 -2
  123. package/dist/testing.d.mts +2 -2
  124. package/dist/testing.d.ts +2 -2
  125. package/dist/{utils-BPHr-1mP.d.mts → utils-CS3ZLnEJ.d.mts} +1 -1
  126. package/dist/{utils-BBKC3cf3.d.ts → utils-D3rdsIvM.d.ts} +1 -1
  127. package/dist/version.cjs +2 -2
  128. package/dist/version.mjs +1 -1
  129. package/dist/vite.cjs +9 -8
  130. package/dist/vite.d.mts +2 -2
  131. package/dist/vite.d.ts +2 -2
  132. package/dist/vite.mjs +8 -7
  133. package/package.json +1 -1
@@ -1,5 +1,5 @@
1
- export { g as getCurrentRequest } from './request-CXmQy5ks.mjs';
2
- import './client-plugins-DPG0NeZN.mjs';
1
+ export { g as getCurrentRequest } from './request-CrBCcPZZ.mjs';
2
+ import './client-plugins-B8RPJnot.mjs';
3
3
  import './lifecycle-DK06VuKP.mjs';
4
4
  import './route-B0XrsrFk.mjs';
5
5
  import './endpoint-DAc96i93.mjs';
@@ -17,7 +17,7 @@ import './integration-api-BbaiokCC.mjs';
17
17
  import '@farming-labs/orm';
18
18
  import './types-DFbjpjXX.mjs';
19
19
  import '@farming-labs/docs';
20
- import './observability.mjs';
20
+ import './observability-BupkiN0m.mjs';
21
21
  import '@opentelemetry/api';
22
22
  import 'vite';
23
23
  import './workflows-CR9ex-gz.mjs';
package/dist/request.d.ts CHANGED
@@ -1,5 +1,5 @@
1
- export { g as getCurrentRequest } from './request-CzZX0Aew.js';
2
- import './client-plugins-Fgni-_25.js';
1
+ export { g as getCurrentRequest } from './request-CR-Bp1Px.js';
2
+ import './client-plugins-bPBf4haK.js';
3
3
  import './lifecycle-DK06VuKP.js';
4
4
  import './route-DOEpbyWZ.js';
5
5
  import './endpoint-1zA994xL.js';
@@ -17,7 +17,7 @@ import './integration-api-BbaiokCC.js';
17
17
  import '@farming-labs/orm';
18
18
  import './types-DFbjpjXX.js';
19
19
  import '@farming-labs/docs';
20
- import './observability.js';
20
+ import './observability-BupkiN0m.js';
21
21
  import '@opentelemetry/api';
22
22
  import 'vite';
23
23
  import './workflows-CR9ex-gz.js';
@@ -1,4 +1,4 @@
1
- import { s as RouteModule } from './client-plugins-DPG0NeZN.mjs';
1
+ import { s as RouteModule } from './client-plugins-B8RPJnot.mjs';
2
2
 
3
3
  /**
4
4
  * The rendering-mode merge shared by every consumer of route directives.
@@ -1,4 +1,4 @@
1
- import { s as RouteModule } from './client-plugins-Fgni-_25.js';
1
+ import { s as RouteModule } from './client-plugins-bPBf4haK.js';
2
2
 
3
3
  /**
4
4
  * The rendering-mode merge shared by every consumer of route directives.
@@ -1,6 +1,6 @@
1
1
  import { RefObject } from 'react';
2
2
  import { FarmRouterRouteInput } from './router.mjs';
3
- import { b as FarmNavigationBlockerContext, F as FarmNavigationState } from './spa-router-6sJfsMlQ.mjs';
3
+ import { b as FarmNavigationBlockerContext, F as FarmNavigationState } from './spa-router-DTdbuinx.mjs';
4
4
 
5
5
  interface UseRouterOptions {
6
6
  basePath?: string;
@@ -1,6 +1,6 @@
1
1
  import { RefObject } from 'react';
2
2
  import { FarmRouterRouteInput } from './router.js';
3
- import { b as FarmNavigationBlockerContext, F as FarmNavigationState } from './spa-router-DePr2aZ6.js';
3
+ import { b as FarmNavigationBlockerContext, F as FarmNavigationState } from './spa-router-BstQUO6Q.js';
4
4
 
5
5
  interface UseRouterOptions {
6
6
  basePath?: string;
package/dist/routes.d.mts CHANGED
@@ -1,4 +1,4 @@
1
- import { F as FarmRouteRuntimeConfig, L as LayoutProps, M as Metadata, j as FarmRouteRuntime, k as FarmRouteRegions, l as FarmRouteMaxDuration, m as FarmAppContext, o as PageProps, q as PluginContextProps, s as RouteModule, P as ParsedRoute } from './client-plugins-DPG0NeZN.mjs';
1
+ import { F as FarmRouteRuntimeConfig, L as LayoutProps, M as Metadata, j as FarmRouteRuntime, k as FarmRouteRegions, l as FarmRouteMaxDuration, m as FarmAppContext, o as PageProps, q as PluginContextProps, s as RouteModule, P as ParsedRoute } from './client-plugins-B8RPJnot.mjs';
2
2
  import { ComponentType } from 'react';
3
3
  import { RouteDataCacheKey } from './cache.mjs';
4
4
  import { ServerFn } from './server-fn.mjs';
@@ -16,7 +16,7 @@ import './integration-api-BbaiokCC.mjs';
16
16
  import '@farming-labs/orm';
17
17
  import './types-DFbjpjXX.mjs';
18
18
  import '@farming-labs/docs';
19
- import './observability.mjs';
19
+ import './observability-BupkiN0m.mjs';
20
20
  import '@opentelemetry/api';
21
21
  import 'vite';
22
22
  import './workflows-CR9ex-gz.mjs';
package/dist/routes.d.ts CHANGED
@@ -1,4 +1,4 @@
1
- import { F as FarmRouteRuntimeConfig, L as LayoutProps, M as Metadata, j as FarmRouteRuntime, k as FarmRouteRegions, l as FarmRouteMaxDuration, m as FarmAppContext, o as PageProps, q as PluginContextProps, s as RouteModule, P as ParsedRoute } from './client-plugins-Fgni-_25.js';
1
+ import { F as FarmRouteRuntimeConfig, L as LayoutProps, M as Metadata, j as FarmRouteRuntime, k as FarmRouteRegions, l as FarmRouteMaxDuration, m as FarmAppContext, o as PageProps, q as PluginContextProps, s as RouteModule, P as ParsedRoute } from './client-plugins-bPBf4haK.js';
2
2
  import { ComponentType } from 'react';
3
3
  import { RouteDataCacheKey } from './cache.js';
4
4
  import { ServerFn } from './server-fn.js';
@@ -16,7 +16,7 @@ import './integration-api-BbaiokCC.js';
16
16
  import '@farming-labs/orm';
17
17
  import './types-DFbjpjXX.js';
18
18
  import '@farming-labs/docs';
19
- import './observability.js';
19
+ import './observability-BupkiN0m.js';
20
20
  import '@opentelemetry/api';
21
21
  import 'vite';
22
22
  import './workflows-CR9ex-gz.js';
@@ -1,5 +1,5 @@
1
- import { cr as RedirectConfig, e as FarmRequest, f as FarmResponse, h as FarmPluginContext, a as FarmPlugin, cs as HeaderConfig, ct as RewriteConfig } from './client-plugins-DPG0NeZN.mjs';
2
- export { bP as FarmPluginLifecycle, bY as FarmPluginRuntimeEndpoint, bZ as FarmPluginRuntimeEndpointEvent, bQ as FarmRequestPluginContext, bR as FarmRequestStore } from './client-plugins-DPG0NeZN.mjs';
1
+ import { cx as RedirectConfig, e as FarmRequest, f as FarmResponse, h as FarmPluginContext, a as FarmPlugin, cy as HeaderConfig, cz as RewriteConfig } from './client-plugins-B8RPJnot.mjs';
2
+ export { bV as FarmPluginLifecycle, c2 as FarmPluginRuntimeEndpoint, c3 as FarmPluginRuntimeEndpointEvent, bW as FarmRequestPluginContext, bX as FarmRequestStore } from './client-plugins-B8RPJnot.mjs';
3
3
  import { R as ResolvedFarmI18nConfig } from './types-Z0aotQ8w.mjs';
4
4
  export { createCompressionPlugin } from './internal/compression-runtime.mjs';
5
5
  import './lifecycle-DK06VuKP.mjs';
@@ -19,7 +19,7 @@ import './integration-api-BbaiokCC.mjs';
19
19
  import '@farming-labs/orm';
20
20
  import './types-DFbjpjXX.mjs';
21
21
  import '@farming-labs/docs';
22
- import './observability.mjs';
22
+ import './observability-BupkiN0m.mjs';
23
23
  import '@opentelemetry/api';
24
24
  import 'vite';
25
25
  import './workflows-CR9ex-gz.mjs';
@@ -1,5 +1,5 @@
1
- import { cr as RedirectConfig, e as FarmRequest, f as FarmResponse, h as FarmPluginContext, a as FarmPlugin, cs as HeaderConfig, ct as RewriteConfig } from './client-plugins-Fgni-_25.js';
2
- export { bP as FarmPluginLifecycle, bY as FarmPluginRuntimeEndpoint, bZ as FarmPluginRuntimeEndpointEvent, bQ as FarmRequestPluginContext, bR as FarmRequestStore } from './client-plugins-Fgni-_25.js';
1
+ import { cx as RedirectConfig, e as FarmRequest, f as FarmResponse, h as FarmPluginContext, a as FarmPlugin, cy as HeaderConfig, cz as RewriteConfig } from './client-plugins-bPBf4haK.js';
2
+ export { bV as FarmPluginLifecycle, c2 as FarmPluginRuntimeEndpoint, c3 as FarmPluginRuntimeEndpointEvent, bW as FarmRequestPluginContext, bX as FarmRequestStore } from './client-plugins-bPBf4haK.js';
3
3
  import { R as ResolvedFarmI18nConfig } from './types-Z0aotQ8w.js';
4
4
  export { createCompressionPlugin } from './internal/compression-runtime.js';
5
5
  import './lifecycle-DK06VuKP.js';
@@ -19,7 +19,7 @@ import './integration-api-BbaiokCC.js';
19
19
  import '@farming-labs/orm';
20
20
  import './types-DFbjpjXX.js';
21
21
  import '@farming-labs/docs';
22
- import './observability.js';
22
+ import './observability-BupkiN0m.js';
23
23
  import '@opentelemetry/api';
24
24
  import 'vite';
25
25
  import './workflows-CR9ex-gz.js';
package/dist/server.cjs CHANGED
@@ -1,7 +1,7 @@
1
1
  "use strict";Object.defineProperty(exports, "__esModule", {value: true}); function _interopRequireWildcard(obj) { if (obj && obj.__esModule) { return obj; } else { var newObj = {}; if (obj != null) { for (var key in obj) { if (Object.prototype.hasOwnProperty.call(obj, key)) { newObj[key] = obj[key]; } } } newObj.default = obj; return newObj; } } function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; } function _nullishCoalesce(lhs, rhsFn) { if (lhs != null) { return lhs; } else { return rhsFn(); } } function _optionalChain(ops) { let lastAccessLHS = undefined; let value = ops[0]; let i = 1; while (i < ops.length) { const op = ops[i]; const fn = ops[i + 1]; i += 2; if ((op === 'optionalAccess' || op === 'optionalCall') && value == null) { return undefined; } if (op === 'access' || op === 'optionalAccess') { lastAccessLHS = value; value = fn(value); } else if (op === 'call' || op === 'optionalCall') { value = fn((...args) => value.call(lastAccessLHS, ...args)); lastAccessLHS = undefined; } } return value; }require('./chunk-3376ZTRC.cjs');
2
2
 
3
3
 
4
- var _chunkYA6LLTIJcjs = require('./chunk-YA6LLTIJ.cjs');
4
+ var _chunkND224OE2cjs = require('./chunk-ND224OE2.cjs');
5
5
 
6
6
 
7
7
 
@@ -19,7 +19,7 @@ var _chunkIK6LVLKCcjs = require('./chunk-IK6LVLKC.cjs');
19
19
 
20
20
 
21
21
 
22
- var _chunkO5DVPF3Rcjs = require('./chunk-O5DVPF3R.cjs');
22
+ var _chunkWFPRVVF2cjs = require('./chunk-WFPRVVF2.cjs');
23
23
  require('./chunk-KR6CKSXT.cjs');
24
24
 
25
25
 
@@ -46,14 +46,14 @@ require('./chunk-SK35NQKK.cjs');
46
46
 
47
47
 
48
48
 
49
- var _chunkR7LCG3BTcjs = require('./chunk-R7LCG3BT.cjs');
49
+ var _chunk3TQG7CGCcjs = require('./chunk-3TQG7CGC.cjs');
50
50
  require('./chunk-DW34V5SM.cjs');
51
51
 
52
52
 
53
53
  var _chunkE2ROOWQCcjs = require('./chunk-E2ROOWQC.cjs');
54
54
  require('./chunk-JSROZYYO.cjs');
55
55
  require('./chunk-XSIRSMAS.cjs');
56
- require('./chunk-65P6OGYN.cjs');
56
+ require('./chunk-QJ4D3UKJ.cjs');
57
57
  require('./chunk-SYQ3MOWW.cjs');
58
58
  require('./chunk-CXP5U3RW.cjs');
59
59
  require('./chunk-K3F2E6GS.cjs');
@@ -87,7 +87,7 @@ var _chunkVPTDD5XFcjs = require('./chunk-VPTDD5XF.cjs');
87
87
 
88
88
 
89
89
  var _chunkPSV6XKPOcjs = require('./chunk-PSV6XKPO.cjs');
90
- require('./chunk-E3RDL2DA.cjs');
90
+ require('./chunk-2CT6XUNO.cjs');
91
91
  require('./chunk-YFPGHF5F.cjs');
92
92
  require('./chunk-6EXBPJ24.cjs');
93
93
 
@@ -104,10 +104,11 @@ require('./chunk-6EXBPJ24.cjs');
104
104
 
105
105
  var _chunkT5CERMEHcjs = require('./chunk-T5CERMEH.cjs');
106
106
  require('./chunk-VEKFLAQM.cjs');
107
- require('./chunk-CFNOGDUS.cjs');
108
- require('./chunk-6K4SPQWL.cjs');
107
+ require('./chunk-W2HZKYES.cjs');
108
+ require('./chunk-RCYINC4A.cjs');
109
109
  require('./chunk-OHY2ZWUG.cjs');
110
- require('./chunk-2ITKVAIF.cjs');
110
+ require('./chunk-QIH2HD6H.cjs');
111
+ require('./chunk-J63ZH5OQ.cjs');
111
112
  require('./chunk-UYIHRDE4.cjs');
112
113
  require('./chunk-MPEYMSCF.cjs');
113
114
  require('./chunk-JDNHKPTD.cjs');
@@ -197,7 +198,7 @@ require('./chunk-QNPEUFHQ.cjs');
197
198
  var _chunkUQZ4AYTHcjs = require('./chunk-UQZ4AYTH.cjs');
198
199
 
199
200
 
200
- var _chunkTTVHACQVcjs = require('./chunk-TTVHACQV.cjs');
201
+ var _chunkALIFMS4Acjs = require('./chunk-ALIFMS4A.cjs');
201
202
  require('./chunk-OYEUREB6.cjs');
202
203
  require('./chunk-7W3CPVXS.cjs');
203
204
  require('./chunk-NZKJGRB3.cjs');
@@ -263,12 +264,20 @@ var _chunkS3JO3N4Hcjs = require('./chunk-S3JO3N4H.cjs');
263
264
 
264
265
  // src/server/create-server.ts
265
266
  var _vite = require('vite');
266
- var _fs = require('fs'); var _fs2 = _interopRequireDefault(_fs);
267
- var _path = require('path'); var _path2 = _interopRequireDefault(_path);
268
- var DEFAULT_FARM_DEV_SERVER_PORT = 3e3;
267
+
268
+ // src/server/dev-lifecycle.ts
269
269
  var VITE_CLOSE_TIMEOUT_MS = 1e4;
270
- async function drainVitePendingRequests(server) {
271
- const registries = Object.values(_nullishCoalesce(server.environments, () => ( {}))).map(
270
+ async function drainVitePendingWork(server) {
271
+ const environments = Object.values(_nullishCoalesce(server.environments, () => ( {})));
272
+ await Promise.allSettled(
273
+ environments.map(async ({ depsOptimizer }) => {
274
+ await _optionalChain([depsOptimizer, 'optionalAccess', _ => _.scanProcessing]);
275
+ await Promise.allSettled(
276
+ Object.values(_nullishCoalesce(_optionalChain([depsOptimizer, 'optionalAccess', _2 => _2.metadata, 'access', _3 => _3.discovered]), () => ( {}))).map((dep) => dep.processing)
277
+ );
278
+ })
279
+ );
280
+ const registries = environments.map(
272
281
  (environment) => environment._pendingRequests
273
282
  );
274
283
  const pending = /* @__PURE__ */ _chunkS3JO3N4Hcjs.__name.call(void 0, () => registries.flatMap((registry) => registry ? [...registry.values()] : []), "pending");
@@ -276,7 +285,121 @@ async function drainVitePendingRequests(server) {
276
285
  await Promise.allSettled(requests.map(({ request }) => request));
277
286
  }
278
287
  }
279
- _chunkS3JO3N4Hcjs.__name.call(void 0, drainVitePendingRequests, "drainVitePendingRequests");
288
+ _chunkS3JO3N4Hcjs.__name.call(void 0, drainVitePendingWork, "drainVitePendingWork");
289
+ function createFarmDevLifecyclePlugin(pluginManager, instrumentation) {
290
+ let runtimeServer;
291
+ const pendingRestarts = /* @__PURE__ */ new Set();
292
+ const viteClosers = /* @__PURE__ */ new WeakMap();
293
+ let shutdownPromise;
294
+ const shutdownFarmDevRuntime = /* @__PURE__ */ _chunkS3JO3N4Hcjs.__name.call(void 0, (server) => {
295
+ _nullishCoalesce(shutdownPromise, () => ( (shutdownPromise = (async () => {
296
+ await Promise.allSettled(pendingRestarts);
297
+ const closeViteServer = viteClosers.get(server.environments);
298
+ const closingHttpServer = server.httpServer;
299
+ const closingWatcher = server.watcher;
300
+ const closingWebSocket = server.ws;
301
+ const failures = [];
302
+ const step = /* @__PURE__ */ _chunkS3JO3N4Hcjs.__name.call(void 0, async (label, run) => {
303
+ try {
304
+ await run();
305
+ } catch (error) {
306
+ failures.push({ label, error });
307
+ }
308
+ }, "step");
309
+ await step("Vite server close", async () => {
310
+ let timer;
311
+ const timedOut = new Promise((resolve) => {
312
+ timer = setTimeout(() => resolve("timeout"), VITE_CLOSE_TIMEOUT_MS);
313
+ _optionalChain([timer, 'access', _4 => _4.unref, 'optionalCall', _5 => _5()]);
314
+ });
315
+ try {
316
+ const outcome = await Promise.race([
317
+ (async () => {
318
+ await drainVitePendingWork(server);
319
+ await closeViteServer();
320
+ return "closed";
321
+ })(),
322
+ timedOut
323
+ ]);
324
+ if (outcome === "timeout") {
325
+ _chunk5QIKR7RRcjs.logger.error(
326
+ `Vite server close did not settle within ${VITE_CLOSE_TIMEOUT_MS}ms; continuing shutdown without it (https://github.com/farming-labs/farm.js/issues/1263)`
327
+ );
328
+ await Promise.allSettled([
329
+ new Promise((resolve) => {
330
+ if (!closingHttpServer || !closingHttpServer.listening) return resolve();
331
+ closingHttpServer.close(() => resolve());
332
+ }),
333
+ Promise.resolve(_optionalChain([closingWatcher, 'optionalAccess', _6 => _6.close, 'optionalCall', _7 => _7()])).catch(() => {
334
+ }),
335
+ Promise.resolve(_optionalChain([closingWebSocket, 'optionalAccess', _8 => _8.close, 'optionalCall', _9 => _9()])).catch(() => {
336
+ })
337
+ ]);
338
+ }
339
+ } finally {
340
+ if (timer) clearTimeout(timer);
341
+ }
342
+ });
343
+ await step("Plugin runtime shutdown", () => pluginManager.closeRuntime("dev-server-closed"));
344
+ await step("Instrumentation shutdown", () => instrumentation.shutdown());
345
+ if (failures.length === 1) throw failures[0].error;
346
+ if (failures.length > 1) {
347
+ throw new (0, _chunk3TQG7CGCcjs.FarmRuntimeShutdownError)(
348
+ `Dev server shutdown failed during ${failures.map(({ label }) => label).join(", ")}`,
349
+ failures.map(({ error }) => error)
350
+ );
351
+ }
352
+ })())));
353
+ return shutdownPromise;
354
+ }, "shutdownFarmDevRuntime");
355
+ return {
356
+ name: "farm:dev-lifecycle",
357
+ configureServer: {
358
+ order: "post",
359
+ handler(server) {
360
+ return () => {
361
+ _nullishCoalesce(runtimeServer, () => ( (runtimeServer = server)));
362
+ const owner = runtimeServer;
363
+ viteClosers.set(server.environments, server.close.bind(server));
364
+ server.close = () => shutdownFarmDevRuntime(owner);
365
+ const restartViteServer = server.restart.bind(server);
366
+ server.restart = async (forceOptimize) => {
367
+ if (shutdownPromise) {
368
+ throw new Error("Cannot restart the Farm dev server during or after shutdown");
369
+ }
370
+ const restart = restartViteServer(forceOptimize);
371
+ pendingRestarts.add(restart);
372
+ try {
373
+ await restart;
374
+ } finally {
375
+ pendingRestarts.delete(restart);
376
+ }
377
+ };
378
+ const httpServer = server.httpServer;
379
+ _optionalChain([httpServer, 'optionalAccess', _10 => _10.once, 'call', _11 => _11("close", () => {
380
+ const closeIfCurrent = /* @__PURE__ */ _chunkS3JO3N4Hcjs.__name.call(void 0, () => {
381
+ if (owner.httpServer !== httpServer) return;
382
+ shutdownFarmDevRuntime(owner).catch((error) => {
383
+ _chunk5QIKR7RRcjs.logger.warn(`Dev server shutdown failed: ${error}`);
384
+ });
385
+ }, "closeIfCurrent");
386
+ if (pendingRestarts.size > 0) {
387
+ void Promise.allSettled(pendingRestarts).then(closeIfCurrent);
388
+ } else {
389
+ closeIfCurrent();
390
+ }
391
+ })]);
392
+ };
393
+ }
394
+ }
395
+ };
396
+ }
397
+ _chunkS3JO3N4Hcjs.__name.call(void 0, createFarmDevLifecyclePlugin, "createFarmDevLifecyclePlugin");
398
+
399
+ // src/server/create-server.ts
400
+ var _fs = require('fs'); var _fs2 = _interopRequireDefault(_fs);
401
+ var _path = require('path'); var _path2 = _interopRequireDefault(_path);
402
+ var DEFAULT_FARM_DEV_SERVER_PORT = 3e3;
280
403
  function createBrandingPlugin() {
281
404
  let serverStarted = false;
282
405
  let startTime = Date.now();
@@ -291,12 +414,12 @@ function createBrandingPlugin() {
291
414
  if (!serverStarted) {
292
415
  serverStarted = true;
293
416
  const elapsed = Date.now() - startTime;
294
- const address = _optionalChain([server, 'access', _ => _.httpServer, 'optionalAccess', _2 => _2.address, 'call', _3 => _3()]);
417
+ const address = _optionalChain([server, 'access', _12 => _12.httpServer, 'optionalAccess', _13 => _13.address, 'call', _14 => _14()]);
295
418
  const resolvedPort = typeof address === "object" && address ? address.port : server.config.server.port || port || 3e3;
296
419
  const pc = _chunkM2L4MYDQcjs.createCliColors.call(void 0, );
297
420
  console.log("");
298
421
  console.log(
299
- ` ${pc.bold(pc.green("Farm.js"))} ${pc.dim(`v${_chunkTTVHACQVcjs.FARM_VERSION}`)} ${pc.dim(`ready in ${elapsed}ms`)}`
422
+ ` ${pc.bold(pc.green("Farm.js"))} ${pc.dim(`v${_chunkALIFMS4Acjs.FARM_VERSION}`)} ${pc.dim(`ready in ${elapsed}ms`)}`
300
423
  );
301
424
  console.log("");
302
425
  console.log(
@@ -352,7 +475,7 @@ function createDevDependencyStubsPlugin() {
352
475
  }
353
476
  _chunkS3JO3N4Hcjs.__name.call(void 0, createDevDependencyStubsPlugin, "createDevDependencyStubsPlugin");
354
477
  function withPortFlag(vite, port) {
355
- return port === void 0 ? vite : { ...vite, server: { ..._optionalChain([vite, 'optionalAccess', _4 => _4.server]), port } };
478
+ return port === void 0 ? vite : { ...vite, server: { ..._optionalChain([vite, 'optionalAccess', _15 => _15.server]), port } };
356
479
  }
357
480
  _chunkS3JO3N4Hcjs.__name.call(void 0, withPortFlag, "withPortFlag");
358
481
  async function createServer(config = {}, options = {}) {
@@ -361,8 +484,8 @@ async function createServer(config = {}, options = {}) {
361
484
  try {
362
485
  const root = config.root || process.cwd();
363
486
  const mode = process.env.NODE_ENV === "production" ? "production" : "development";
364
- const userConfig = await _chunkO5DVPF3Rcjs.loadConfig.call(void 0, root, void 0, mode);
365
- const resolvedConfig = userConfig ? await _chunkO5DVPF3Rcjs.resolveConfig.call(void 0, userConfig, mode) : null;
487
+ const userConfig = await _chunkWFPRVVF2cjs.loadConfig.call(void 0, root, void 0, mode);
488
+ const resolvedConfig = userConfig ? await _chunkWFPRVVF2cjs.resolveConfig.call(void 0, userConfig, mode) : null;
366
489
  const instrumentationConfig = resolvedConfig || config;
367
490
  const instrumentationRoot = instrumentationConfig.root || root;
368
491
  const instrumentationFile = _chunkKCMTCM6Icjs.resolveFarmInstrumentationFile.call(void 0,
@@ -379,7 +502,7 @@ async function createServer(config = {}, options = {}) {
379
502
  runtime: "nodejs"
380
503
  });
381
504
  await instrumentation.start();
382
- pluginManager = new (0, _chunkR7LCG3BTcjs.PluginManager)({
505
+ pluginManager = new (0, _chunk3TQG7CGCcjs.PluginManager)({
383
506
  config: resolvedConfig || config,
384
507
  isDev: mode === "development",
385
508
  isProd: mode === "production"
@@ -404,7 +527,7 @@ async function createServer(config = {}, options = {}) {
404
527
  pluginManager.addPlugins(resolvedConfig.plugins);
405
528
  }
406
529
  }
407
- const infraAnalytics = (resolvedConfig || config).analytics !== false ? _chunkYA6LLTIJcjs.createFarmInfraAnalyticsPlugin.call(void 0, ) : null;
530
+ const infraAnalytics = (resolvedConfig || config).analytics !== false ? _chunkND224OE2cjs.createFarmInfraAnalyticsPlugin.call(void 0, ) : null;
408
531
  if (infraAnalytics) pluginManager.addPlugin(infraAnalytics);
409
532
  if (mode === "development") {
410
533
  const hasLogger = pluginManager.getPlugins().some((p) => p.name === "farm:logger");
@@ -417,7 +540,7 @@ async function createServer(config = {}, options = {}) {
417
540
  finalConfig = await pluginManager.runHookSerial("config", finalConfig);
418
541
  finalConfig.renderer = _chunkPSV6XKPOcjs.resolveFarmRenderer.call(void 0, finalConfig.renderer);
419
542
  const projectRoot = finalConfig.root || process.cwd();
420
- finalConfig.images = _chunkR7LCG3BTcjs.resolveFarmImageProviderForRuntime.call(void 0, finalConfig.images, {
543
+ finalConfig.images = _chunk3TQG7CGCcjs.resolveFarmImageProviderForRuntime.call(void 0, finalConfig.images, {
421
544
  root: projectRoot,
422
545
  dev: true
423
546
  });
@@ -434,23 +557,24 @@ async function createServer(config = {}, options = {}) {
434
557
  if (shouldUseProjectPostcss) {
435
558
  _chunk5QIKR7RRcjs.logger.info("\u{1F4E6} Using project PostCSS/Tailwind configuration");
436
559
  } else {
437
- tailwindVitePlugin = await _chunkR7LCG3BTcjs.loadTailwindVitePlugin.call(void 0, );
560
+ tailwindVitePlugin = await _chunk3TQG7CGCcjs.loadTailwindVitePlugin.call(void 0, );
438
561
  }
439
562
  const server = await _vite.createServer.call(void 0,
440
- _chunkR7LCG3BTcjs.mergeFarmViteConfig.call(void 0,
563
+ _chunk3TQG7CGCcjs.mergeFarmViteConfig.call(void 0,
441
564
  {
442
565
  root: projectRoot,
443
566
  css: shouldUseProjectPostcss ? void 0 : { postcss: { plugins: [] } },
444
567
  plugins: [
445
- _chunkR7LCG3BTcjs.createFarmThemeCssPlugin.call(void 0, finalConfig.theme, finalConfig.basePath),
568
+ _chunk3TQG7CGCcjs.createFarmThemeCssPlugin.call(void 0, finalConfig.theme, finalConfig.basePath),
446
569
  ...tailwindVitePlugin ? [tailwindVitePlugin] : [],
447
570
  ...rendererVitePlugins,
448
571
  createDevDependencyStubsPlugin(),
449
- _chunkR7LCG3BTcjs.farmI18nClientBridgePlugin.call(void 0, ),
450
- _chunkR7LCG3BTcjs.farmServerOnlyEntriesPlugin.call(void 0, ),
451
- _chunkR7LCG3BTcjs.farmPlugin.call(void 0, finalConfig, pluginManager),
572
+ _chunk3TQG7CGCcjs.farmI18nClientBridgePlugin.call(void 0, ),
573
+ _chunk3TQG7CGCcjs.farmServerOnlyEntriesPlugin.call(void 0, ),
574
+ _chunk3TQG7CGCcjs.farmPlugin.call(void 0, finalConfig, pluginManager),
452
575
  _chunk22GUSVNJcjs.farmEnvironmentFunctionsPlugin.call(void 0, ),
453
- createBrandingPlugin()
576
+ createBrandingPlugin(),
577
+ createFarmDevLifecyclePlugin(pluginManager, instrumentation)
454
578
  ],
455
579
  server: {
456
580
  middlewareMode: false,
@@ -462,8 +586,8 @@ async function createServer(config = {}, options = {}) {
462
586
  dedupe: [...finalConfig.renderer.dedupe || []]
463
587
  },
464
588
  optimizeDeps: {
465
- ..._chunkR7LCG3BTcjs.createFarmClientOptimizeDepsConfig.call(void 0,
466
- _chunkR7LCG3BTcjs.createFarmClientOptimizeDepsEntries.call(void 0, projectRoot, _chunkVPTDD5XFcjs.getFarmAppDirectories.call(void 0, finalConfig)),
589
+ ..._chunk3TQG7CGCcjs.createFarmClientOptimizeDepsConfig.call(void 0,
590
+ _chunk3TQG7CGCcjs.createFarmClientOptimizeDepsEntries.call(void 0, projectRoot, _chunkVPTDD5XFcjs.getFarmAppDirectories.call(void 0, finalConfig)),
467
591
  finalConfig.renderer
468
592
  ),
469
593
  exclude: [
@@ -512,73 +636,6 @@ async function createServer(config = {}, options = {}) {
512
636
  server.__farmPluginManager = pluginManager;
513
637
  server.__farmResolvedConfig = resolvedConfig;
514
638
  server.__farmInstrumentation = instrumentation;
515
- const closeViteServer = server.close.bind(server);
516
- let shutdownPromise;
517
- const shutdownFarmDevRuntime = /* @__PURE__ */ _chunkS3JO3N4Hcjs.__name.call(void 0, () => {
518
- _nullishCoalesce(shutdownPromise, () => ( (shutdownPromise = (async () => {
519
- const failures = [];
520
- const step = /* @__PURE__ */ _chunkS3JO3N4Hcjs.__name.call(void 0, async (label, run) => {
521
- try {
522
- await run();
523
- } catch (error) {
524
- failures.push({ label, error });
525
- }
526
- }, "step");
527
- await step("Vite server close", async () => {
528
- let timer;
529
- const timedOut = new Promise((resolve) => {
530
- timer = setTimeout(() => resolve("timeout"), VITE_CLOSE_TIMEOUT_MS);
531
- _optionalChain([timer, 'access', _5 => _5.unref, 'optionalCall', _6 => _6()]);
532
- });
533
- try {
534
- const outcome = await Promise.race([
535
- (async () => {
536
- await drainVitePendingRequests(server);
537
- await closeViteServer();
538
- return "closed";
539
- })(),
540
- timedOut
541
- ]);
542
- if (outcome === "timeout") {
543
- _chunk5QIKR7RRcjs.logger.error(
544
- `Vite server close did not settle within ${VITE_CLOSE_TIMEOUT_MS}ms; continuing shutdown without it (https://github.com/farming-labs/farm.js/issues/1263)`
545
- );
546
- await Promise.allSettled([
547
- new Promise((resolve) => {
548
- if (!server.httpServer || !server.httpServer.listening) return resolve();
549
- server.httpServer.close(() => resolve());
550
- }),
551
- Promise.resolve(_optionalChain([server, 'access', _7 => _7.watcher, 'optionalAccess', _8 => _8.close, 'optionalCall', _9 => _9()])).catch(() => {
552
- }),
553
- Promise.resolve(_optionalChain([server, 'access', _10 => _10.ws, 'optionalAccess', _11 => _11.close, 'optionalCall', _12 => _12()])).catch(() => {
554
- })
555
- ]);
556
- }
557
- } finally {
558
- if (timer) clearTimeout(timer);
559
- }
560
- });
561
- await step(
562
- "Plugin runtime shutdown",
563
- () => _optionalChain([pluginManager, 'optionalAccess', _13 => _13.closeRuntime, 'call', _14 => _14("dev-server-closed")])
564
- );
565
- await step("Instrumentation shutdown", () => _optionalChain([instrumentation, 'optionalAccess', _15 => _15.shutdown, 'call', _16 => _16()]));
566
- if (failures.length === 1) throw failures[0].error;
567
- if (failures.length > 1) {
568
- throw new (0, _chunkR7LCG3BTcjs.FarmRuntimeShutdownError)(
569
- `Dev server shutdown failed during ${failures.map(({ label }) => label).join(", ")}`,
570
- failures.map(({ error }) => error)
571
- );
572
- }
573
- })())));
574
- return shutdownPromise;
575
- }, "shutdownFarmDevRuntime");
576
- server.close = shutdownFarmDevRuntime;
577
- _optionalChain([server, 'access', _17 => _17.httpServer, 'optionalAccess', _18 => _18.once, 'call', _19 => _19("close", () => {
578
- shutdownFarmDevRuntime().catch((error) => {
579
- _chunk5QIKR7RRcjs.logger.warn(`Dev server shutdown failed: ${error}`);
580
- });
581
- })]);
582
639
  pluginManager.updateContext({ config: finalConfig, viteServer: server });
583
640
  await pluginManager.setupPlugins();
584
641
  await pluginManager.runHookParallel("devServerCreated", server);
@@ -592,7 +649,7 @@ async function createServer(config = {}, options = {}) {
592
649
  error
593
650
  });
594
651
  }
595
- await _optionalChain([instrumentation, 'optionalAccess', _20 => _20.shutdown, 'call', _21 => _21(), 'access', _22 => _22.catch, 'call', _23 => _23(() => {
652
+ await _optionalChain([instrumentation, 'optionalAccess', _16 => _16.shutdown, 'call', _17 => _17(), 'access', _18 => _18.catch, 'call', _19 => _19(() => {
596
653
  })]);
597
654
  _chunk5QIKR7RRcjs.logger.error(`Failed to create server: ${error}`);
598
655
  throw error;
@@ -616,7 +673,7 @@ async function startDevServer(config = {}, port) {
616
673
  try {
617
674
  await server.listen(port);
618
675
  const pluginManager = server.__farmPluginManager;
619
- await _optionalChain([pluginManager, 'optionalAccess', _24 => _24.startRuntime, 'call', _25 => _25()]);
676
+ await _optionalChain([pluginManager, 'optionalAccess', _20 => _20.startRuntime, 'call', _21 => _21()]);
620
677
  noticeSchemaChangesInBackground(server.__farmResolvedConfig);
621
678
  } catch (error) {
622
679
  try {
@@ -730,4 +787,4 @@ _chunkS3JO3N4Hcjs.__name.call(void 0, startDevServer, "startDevServer");
730
787
 
731
788
 
732
789
 
733
- exports.DEFAULT_FARM_DEV_SERVER_PORT = DEFAULT_FARM_DEV_SERVER_PORT; exports.DEFAULT_SERVER_ACTION_BODY_SIZE_LIMIT = _chunkT5CERMEHcjs.DEFAULT_SERVER_ACTION_BODY_SIZE_LIMIT; exports.FARM_SERVER_QUERY_SYMBOL = _chunkZMN3H73Hcjs.FARM_SERVER_QUERY_SYMBOL; exports.FarmApp = _chunkR7LCG3BTcjs.FarmApp; exports.FarmDataCache = _chunkH6G5INWMcjs.FarmDataCache; exports.FarmEnvironmentError = _chunkW4E7WMXEcjs.FarmEnvironmentError; exports.RouteManager = _chunkR7LCG3BTcjs.RouteManager; exports.ServerActionRequestError = _chunkT5CERMEHcjs.ServerActionRequestError; exports.ServerRenderer = _chunkR7LCG3BTcjs.ServerRenderer; exports._runWithAfterNodeResponse = _chunkMQ3H6LT5cjs._runWithAfterNodeResponse; exports._runWithAfterRequest = _chunkMQ3H6LT5cjs._runWithAfterRequest; exports._withAfterNodeMiddleware = _chunkMQ3H6LT5cjs._withAfterNodeMiddleware; exports.after = _chunkMQ3H6LT5cjs.after; exports.applyFarmCacheInvalidationTargets = _chunkH6G5INWMcjs.applyFarmCacheInvalidationTargets; exports.applyFarmCacheInvalidations = _chunkZEG3OPIBcjs.applyFarmCacheInvalidations; exports.configureFarmCache = _chunkH6G5INWMcjs.configureFarmCache; exports.createClientOnlyFn = _chunkW4E7WMXEcjs.createClientOnlyFn; exports.createFarmApp = _chunkR7LCG3BTcjs.createFarmApp; exports.createFarmCacheInvalidationStream = _chunkH6G5INWMcjs.createFarmCacheInvalidationStream; exports.createFarmCacheKey = _chunkH6G5INWMcjs.createFarmCacheKey; exports.createFarmConfigResolutionPlugin = _chunkVPTDD5XFcjs.createFarmConfigResolutionPlugin; exports.createFarmStorage = _chunk4ZFL5GFNcjs.createFarmStorage; exports.createIsomorphicFn = _chunkW4E7WMXEcjs.createIsomorphicFn; exports.createPathCacheTag = _chunkH6G5INWMcjs.createPathCacheTag; exports.createRouteDataCacheKey = _chunkH6G5INWMcjs.createRouteDataCacheKey; exports.createRouteDataCacheTag = _chunkH6G5INWMcjs.createRouteDataCacheTag; exports.createServer = createServer; exports.createServerActionRequestErrorResponse = _chunkT5CERMEHcjs.createServerActionRequestErrorResponse; exports.createServerOnlyFn = _chunkW4E7WMXEcjs.createServerOnlyFn; exports.createServerQuery = _chunkZMN3H73Hcjs.createServerQuery; exports.createStorageClient = _chunk4ZFL5GFNcjs.createStorageClient; exports.databaseStorage = _chunk4ZFL5GFNcjs.databaseStorage; exports.defineCacheKey = _chunkH6G5INWMcjs.defineCacheKey; exports.defineConfig = _chunkR7LCG3BTcjs.defineConfig; exports.defineStorageClient = _chunk4ZFL5GFNcjs.defineStorageClient; exports.disposeStorage = _chunk4ZFL5GFNcjs.disposeStorage; exports.driverStorage = _chunk4ZFL5GFNcjs.driverStorage; exports.farmPlugin = _chunkR7LCG3BTcjs.farmPlugin; exports.fileExists = _chunk5QIKR7RRcjs.fileExists; exports.getCurrentRequest = _chunk5ZSWG4UXcjs.getCurrentRequest; exports.getFarmAppDirectories = _chunkVPTDD5XFcjs.getFarmAppDirectories; exports.getFarmDataCache = _chunkH6G5INWMcjs.getFarmDataCache; exports.getFarmLayerAliases = _chunkVPTDD5XFcjs.getFarmLayerAliases; exports.getFarmSourceRoots = _chunkVPTDD5XFcjs.getFarmSourceRoots; exports.getServerActionExecutionContext = _chunkT5CERMEHcjs.getServerActionExecutionContext; exports.getServerActionInvalidations = _chunkT5CERMEHcjs.getServerActionInvalidations; exports.getServerActionSignal = _chunkT5CERMEHcjs.getServerActionSignal; exports.getStorage = _chunk4ZFL5GFNcjs.getStorage; exports.getTheme = _chunkXWAWFQFScjs.getTheme; exports.getThemeSnapshot = _chunkXWAWFQFScjs.getThemeSnapshot; exports.globFiles = _chunk5QIKR7RRcjs.globFiles; exports.initStorage = _chunk4ZFL5GFNcjs.initStorage; exports.invalidate = _chunkH6G5INWMcjs.invalidate; exports.invalidateRouteData = _chunkH6G5INWMcjs.invalidateRouteData; exports.libsqlStorage = _chunk4ZFL5GFNcjs.libsqlStorage; exports.loadFarmConfigFile = _chunkVPTDD5XFcjs.loadFarmConfigFile; exports.localStorage = _chunk4ZFL5GFNcjs.localStorage; exports.logger = _chunk5QIKR7RRcjs.logger; exports.matchRoute = _chunk5QIKR7RRcjs.matchRoute; exports.matchRouteParts = _chunk5QIKR7RRcjs.matchRouteParts; exports.matchRoutePrefix = _chunk5QIKR7RRcjs.matchRoutePrefix; exports.matchRoutePrefixParts = _chunk5QIKR7RRcjs.matchRoutePrefixParts; exports.memoryStorage = _chunk4ZFL5GFNcjs.memoryStorage; exports.mongodbStorage = _chunk4ZFL5GFNcjs.mongodbStorage; exports.mysql2Storage = _chunk4ZFL5GFNcjs.mysql2Storage; exports.mysqlStorage = _chunk4ZFL5GFNcjs.mysqlStorage; exports.netlifyBlobsStorage = _chunk4ZFL5GFNcjs.netlifyBlobsStorage; exports.normalizeRevalidatePath = _chunkH6G5INWMcjs.normalizeRevalidatePath; exports.parseRoutePath = _chunk5QIKR7RRcjs.parseRoutePath; exports.parseSearchParams = _chunk5QIKR7RRcjs.parseSearchParams; exports.pgStorage = _chunk4ZFL5GFNcjs.pgStorage; exports.pgliteStorage = _chunk4ZFL5GFNcjs.pgliteStorage; exports.planetscaleStorage = _chunk4ZFL5GFNcjs.planetscaleStorage; exports.postgresStorage = _chunk4ZFL5GFNcjs.postgresStorage; exports.prepareServerActionRequest = _chunkT5CERMEHcjs.prepareServerActionRequest; exports.redisStorage = _chunk4ZFL5GFNcjs.redisStorage; exports.resolveAppPath = _chunk5QIKR7RRcjs.resolveAppPath; exports.resolveFarmLayers = _chunkVPTDD5XFcjs.resolveFarmLayers; exports.resolveServerActionsConfig = _chunkT5CERMEHcjs.resolveServerActionsConfig; exports.resolveStorageRuntimeClient = _chunk4ZFL5GFNcjs.resolveStorageRuntimeClient; exports.revalidatePath = _chunkH6G5INWMcjs.revalidatePath; exports.revalidateTag = _chunkH6G5INWMcjs.revalidateTag; exports.runWithServerActionRequest = _chunkT5CERMEHcjs.runWithServerActionRequest; exports.s3Storage = _chunk4ZFL5GFNcjs.s3Storage; exports.sanitizeServerActionError = _chunkT5CERMEHcjs.sanitizeServerActionError; exports.segmentsToPattern = _chunk5QIKR7RRcjs.segmentsToPattern; exports.sendWebResponse = _chunkUQZ4AYTHcjs.sendWebResponse; exports.splitRoutePath = _chunk5QIKR7RRcjs.splitRoutePath; exports.sqliteStorage = _chunk4ZFL5GFNcjs.sqliteStorage; exports.startDevServer = startDevServer; exports.storageCacheAdapter = _chunkH6G5INWMcjs.storageCacheAdapter; exports.toPosixPath = _chunk5QIKR7RRcjs.toPosixPath; exports.toRootRelativeUrlPath = _chunk5QIKR7RRcjs.toRootRelativeUrlPath; exports.toViteModuleId = _chunk5QIKR7RRcjs.toViteModuleId; exports.unstable_cache = _chunkH6G5INWMcjs.unstable_cache; exports.updateTag = _chunkH6G5INWMcjs.updateTag; exports.upstashStorage = _chunk4ZFL5GFNcjs.upstashStorage; exports.validateServerActionRequest = _chunkT5CERMEHcjs.validateServerActionRequest; exports.vercelBlobStorage = _chunk4ZFL5GFNcjs.vercelBlobStorage; exports.vercelKVStorage = _chunk4ZFL5GFNcjs.vercelKVStorage;
790
+ exports.DEFAULT_FARM_DEV_SERVER_PORT = DEFAULT_FARM_DEV_SERVER_PORT; exports.DEFAULT_SERVER_ACTION_BODY_SIZE_LIMIT = _chunkT5CERMEHcjs.DEFAULT_SERVER_ACTION_BODY_SIZE_LIMIT; exports.FARM_SERVER_QUERY_SYMBOL = _chunkZMN3H73Hcjs.FARM_SERVER_QUERY_SYMBOL; exports.FarmApp = _chunk3TQG7CGCcjs.FarmApp; exports.FarmDataCache = _chunkH6G5INWMcjs.FarmDataCache; exports.FarmEnvironmentError = _chunkW4E7WMXEcjs.FarmEnvironmentError; exports.RouteManager = _chunk3TQG7CGCcjs.RouteManager; exports.ServerActionRequestError = _chunkT5CERMEHcjs.ServerActionRequestError; exports.ServerRenderer = _chunk3TQG7CGCcjs.ServerRenderer; exports._runWithAfterNodeResponse = _chunkMQ3H6LT5cjs._runWithAfterNodeResponse; exports._runWithAfterRequest = _chunkMQ3H6LT5cjs._runWithAfterRequest; exports._withAfterNodeMiddleware = _chunkMQ3H6LT5cjs._withAfterNodeMiddleware; exports.after = _chunkMQ3H6LT5cjs.after; exports.applyFarmCacheInvalidationTargets = _chunkH6G5INWMcjs.applyFarmCacheInvalidationTargets; exports.applyFarmCacheInvalidations = _chunkZEG3OPIBcjs.applyFarmCacheInvalidations; exports.configureFarmCache = _chunkH6G5INWMcjs.configureFarmCache; exports.createClientOnlyFn = _chunkW4E7WMXEcjs.createClientOnlyFn; exports.createFarmApp = _chunk3TQG7CGCcjs.createFarmApp; exports.createFarmCacheInvalidationStream = _chunkH6G5INWMcjs.createFarmCacheInvalidationStream; exports.createFarmCacheKey = _chunkH6G5INWMcjs.createFarmCacheKey; exports.createFarmConfigResolutionPlugin = _chunkVPTDD5XFcjs.createFarmConfigResolutionPlugin; exports.createFarmStorage = _chunk4ZFL5GFNcjs.createFarmStorage; exports.createIsomorphicFn = _chunkW4E7WMXEcjs.createIsomorphicFn; exports.createPathCacheTag = _chunkH6G5INWMcjs.createPathCacheTag; exports.createRouteDataCacheKey = _chunkH6G5INWMcjs.createRouteDataCacheKey; exports.createRouteDataCacheTag = _chunkH6G5INWMcjs.createRouteDataCacheTag; exports.createServer = createServer; exports.createServerActionRequestErrorResponse = _chunkT5CERMEHcjs.createServerActionRequestErrorResponse; exports.createServerOnlyFn = _chunkW4E7WMXEcjs.createServerOnlyFn; exports.createServerQuery = _chunkZMN3H73Hcjs.createServerQuery; exports.createStorageClient = _chunk4ZFL5GFNcjs.createStorageClient; exports.databaseStorage = _chunk4ZFL5GFNcjs.databaseStorage; exports.defineCacheKey = _chunkH6G5INWMcjs.defineCacheKey; exports.defineConfig = _chunk3TQG7CGCcjs.defineConfig; exports.defineStorageClient = _chunk4ZFL5GFNcjs.defineStorageClient; exports.disposeStorage = _chunk4ZFL5GFNcjs.disposeStorage; exports.driverStorage = _chunk4ZFL5GFNcjs.driverStorage; exports.farmPlugin = _chunk3TQG7CGCcjs.farmPlugin; exports.fileExists = _chunk5QIKR7RRcjs.fileExists; exports.getCurrentRequest = _chunk5ZSWG4UXcjs.getCurrentRequest; exports.getFarmAppDirectories = _chunkVPTDD5XFcjs.getFarmAppDirectories; exports.getFarmDataCache = _chunkH6G5INWMcjs.getFarmDataCache; exports.getFarmLayerAliases = _chunkVPTDD5XFcjs.getFarmLayerAliases; exports.getFarmSourceRoots = _chunkVPTDD5XFcjs.getFarmSourceRoots; exports.getServerActionExecutionContext = _chunkT5CERMEHcjs.getServerActionExecutionContext; exports.getServerActionInvalidations = _chunkT5CERMEHcjs.getServerActionInvalidations; exports.getServerActionSignal = _chunkT5CERMEHcjs.getServerActionSignal; exports.getStorage = _chunk4ZFL5GFNcjs.getStorage; exports.getTheme = _chunkXWAWFQFScjs.getTheme; exports.getThemeSnapshot = _chunkXWAWFQFScjs.getThemeSnapshot; exports.globFiles = _chunk5QIKR7RRcjs.globFiles; exports.initStorage = _chunk4ZFL5GFNcjs.initStorage; exports.invalidate = _chunkH6G5INWMcjs.invalidate; exports.invalidateRouteData = _chunkH6G5INWMcjs.invalidateRouteData; exports.libsqlStorage = _chunk4ZFL5GFNcjs.libsqlStorage; exports.loadFarmConfigFile = _chunkVPTDD5XFcjs.loadFarmConfigFile; exports.localStorage = _chunk4ZFL5GFNcjs.localStorage; exports.logger = _chunk5QIKR7RRcjs.logger; exports.matchRoute = _chunk5QIKR7RRcjs.matchRoute; exports.matchRouteParts = _chunk5QIKR7RRcjs.matchRouteParts; exports.matchRoutePrefix = _chunk5QIKR7RRcjs.matchRoutePrefix; exports.matchRoutePrefixParts = _chunk5QIKR7RRcjs.matchRoutePrefixParts; exports.memoryStorage = _chunk4ZFL5GFNcjs.memoryStorage; exports.mongodbStorage = _chunk4ZFL5GFNcjs.mongodbStorage; exports.mysql2Storage = _chunk4ZFL5GFNcjs.mysql2Storage; exports.mysqlStorage = _chunk4ZFL5GFNcjs.mysqlStorage; exports.netlifyBlobsStorage = _chunk4ZFL5GFNcjs.netlifyBlobsStorage; exports.normalizeRevalidatePath = _chunkH6G5INWMcjs.normalizeRevalidatePath; exports.parseRoutePath = _chunk5QIKR7RRcjs.parseRoutePath; exports.parseSearchParams = _chunk5QIKR7RRcjs.parseSearchParams; exports.pgStorage = _chunk4ZFL5GFNcjs.pgStorage; exports.pgliteStorage = _chunk4ZFL5GFNcjs.pgliteStorage; exports.planetscaleStorage = _chunk4ZFL5GFNcjs.planetscaleStorage; exports.postgresStorage = _chunk4ZFL5GFNcjs.postgresStorage; exports.prepareServerActionRequest = _chunkT5CERMEHcjs.prepareServerActionRequest; exports.redisStorage = _chunk4ZFL5GFNcjs.redisStorage; exports.resolveAppPath = _chunk5QIKR7RRcjs.resolveAppPath; exports.resolveFarmLayers = _chunkVPTDD5XFcjs.resolveFarmLayers; exports.resolveServerActionsConfig = _chunkT5CERMEHcjs.resolveServerActionsConfig; exports.resolveStorageRuntimeClient = _chunk4ZFL5GFNcjs.resolveStorageRuntimeClient; exports.revalidatePath = _chunkH6G5INWMcjs.revalidatePath; exports.revalidateTag = _chunkH6G5INWMcjs.revalidateTag; exports.runWithServerActionRequest = _chunkT5CERMEHcjs.runWithServerActionRequest; exports.s3Storage = _chunk4ZFL5GFNcjs.s3Storage; exports.sanitizeServerActionError = _chunkT5CERMEHcjs.sanitizeServerActionError; exports.segmentsToPattern = _chunk5QIKR7RRcjs.segmentsToPattern; exports.sendWebResponse = _chunkUQZ4AYTHcjs.sendWebResponse; exports.splitRoutePath = _chunk5QIKR7RRcjs.splitRoutePath; exports.sqliteStorage = _chunk4ZFL5GFNcjs.sqliteStorage; exports.startDevServer = startDevServer; exports.storageCacheAdapter = _chunkH6G5INWMcjs.storageCacheAdapter; exports.toPosixPath = _chunk5QIKR7RRcjs.toPosixPath; exports.toRootRelativeUrlPath = _chunk5QIKR7RRcjs.toRootRelativeUrlPath; exports.toViteModuleId = _chunk5QIKR7RRcjs.toViteModuleId; exports.unstable_cache = _chunkH6G5INWMcjs.unstable_cache; exports.updateTag = _chunkH6G5INWMcjs.updateTag; exports.upstashStorage = _chunk4ZFL5GFNcjs.upstashStorage; exports.validateServerActionRequest = _chunkT5CERMEHcjs.validateServerActionRequest; exports.vercelBlobStorage = _chunk4ZFL5GFNcjs.vercelBlobStorage; exports.vercelKVStorage = _chunk4ZFL5GFNcjs.vercelKVStorage;
package/dist/server.d.mts CHANGED
@@ -1,14 +1,14 @@
1
- export { F as FarmApp, R as RouteManager, S as ServerRenderer, c as createFarmApp } from './app-ZuWrAMc_.mjs';
2
- import { G as FarmConfig } from './client-plugins-DPG0NeZN.mjs';
3
- export { K as AppRoutePattern, ab as BuildOptions, a3 as ErrorBoundary, Y as ErrorProps, m as FarmAppContext, J as FarmComponentType, B as FarmContextFactory, V as FarmContextFactoryInput, W as FarmIsolatedClientHydrationMode, ag as FarmLayerEntry, ak as FarmLayerResolution, Q as FarmMigrationCommand, S as FarmMigrationsConfig, T as FarmMigrationsUserConfig, e as FarmRequest, f as FarmResponse, ai as FarmSourceRoot, a7 as GenerateStaticParams, a1 as Layout, $ as LayoutMetadataProps, a8 as LayoutModule, L as LayoutProps, a2 as Loading, X as LoadingProps, M as Metadata, a9 as MetadataJsonLd, _ as MetadataProps, af as MetadataRobots, ae as MetadataRobotsDirectives, C as MiddlewareProps, O as NitroPreset, a0 as Page, o as PageProps, Z as PagePropsWithMiddleware, N as PageRouteParams, P as ParsedRoute, q as PluginContextProps, aj as ResolveFarmLayersOptions, ah as ResolvedFarmLayer, U as ResolvedFarmMigrationsConfig, s as RouteModule, R as RouteSegment, ad as SSGCollectionResult, ac as SSGPage, aa as ServerAction, a5 as StaticPathParams, a4 as StaticPathPrimitive, a6 as StaticRouteParams, ap as createFarmConfigResolutionPlugin, I as defineConfig, H as farmPlugin, an as getFarmAppDirectories, ao as getFarmLayerAliases, am as getFarmSourceRoots, aq as loadFarmConfigFile, al as resolveFarmLayers } from './client-plugins-DPG0NeZN.mjs';
4
- export { g as fileExists, h as globFiles, l as logger, m as matchRoute, b as matchRouteParts, c as matchRoutePrefix, d as matchRoutePrefixParts, p as parseRoutePath, i as parseSearchParams, r as resolveAppPath, s as segmentsToPattern, a as splitRoutePath, e as toPosixPath, t as toRootRelativeUrlPath, f as toViteModuleId } from './utils-BPHr-1mP.mjs';
1
+ export { F as FarmApp, R as RouteManager, S as ServerRenderer, c as createFarmApp } from './app-29vG5tmY.mjs';
2
+ import { G as FarmConfig } from './client-plugins-B8RPJnot.mjs';
3
+ export { K as AppRoutePattern, ab as BuildOptions, a3 as ErrorBoundary, Y as ErrorProps, m as FarmAppContext, J as FarmComponentType, B as FarmContextFactory, V as FarmContextFactoryInput, W as FarmIsolatedClientHydrationMode, ag as FarmLayerEntry, ak as FarmLayerResolution, Q as FarmMigrationCommand, S as FarmMigrationsConfig, T as FarmMigrationsUserConfig, e as FarmRequest, f as FarmResponse, ai as FarmSourceRoot, a7 as GenerateStaticParams, a1 as Layout, $ as LayoutMetadataProps, a8 as LayoutModule, L as LayoutProps, a2 as Loading, X as LoadingProps, M as Metadata, a9 as MetadataJsonLd, _ as MetadataProps, af as MetadataRobots, ae as MetadataRobotsDirectives, C as MiddlewareProps, O as NitroPreset, a0 as Page, o as PageProps, Z as PagePropsWithMiddleware, N as PageRouteParams, P as ParsedRoute, q as PluginContextProps, aj as ResolveFarmLayersOptions, ah as ResolvedFarmLayer, U as ResolvedFarmMigrationsConfig, s as RouteModule, R as RouteSegment, ad as SSGCollectionResult, ac as SSGPage, aa as ServerAction, a5 as StaticPathParams, a4 as StaticPathPrimitive, a6 as StaticRouteParams, ap as createFarmConfigResolutionPlugin, I as defineConfig, H as farmPlugin, an as getFarmAppDirectories, ao as getFarmLayerAliases, am as getFarmSourceRoots, aq as loadFarmConfigFile, al as resolveFarmLayers } from './client-plugins-B8RPJnot.mjs';
4
+ export { g as fileExists, h as globFiles, l as logger, m as matchRoute, b as matchRouteParts, c as matchRoutePrefix, d as matchRoutePrefixParts, p as parseRoutePath, i as parseSearchParams, r as resolveAppPath, s as segmentsToPattern, a as splitRoutePath, e as toPosixPath, t as toRootRelativeUrlPath, f as toViteModuleId } from './utils-CS3ZLnEJ.mjs';
5
5
  export { createFarmStorage, createStorageClient, databaseStorage, defineStorageClient, disposeStorage, driverStorage, getStorage, initStorage, libsqlStorage, localStorage, memoryStorage, mongodbStorage, mysql2Storage, mysqlStorage, netlifyBlobsStorage, pgStorage, pgliteStorage, planetscaleStorage, postgresStorage, redisStorage, resolveStorageRuntimeClient, s3Storage, sqliteStorage, upstashStorage, vercelBlobStorage, vercelKVStorage } from './storage.mjs';
6
6
  export { CacheKeyFactory, DefinedCacheKey, FarmCacheAdapter, FarmCacheEntry, FarmCacheInvalidationStreamOptions, FarmCacheInvalidationTarget, FarmCacheOptions, FarmCacheSetOptions, FarmCacheStorage, FarmCacheUserConfig, FarmClientCacheUserConfig, FarmDataCache, GetFarmCacheEntryOptions, InferCacheKeyData, RevalidateTagProfile, RouteDataCacheKey, StorageFarmCacheAdapterOptions, applyFarmCacheInvalidationTargets, applyFarmCacheInvalidations, configureFarmCache, createFarmCacheInvalidationStream, createFarmCacheKey, createPathCacheTag, createRouteDataCacheKey, createRouteDataCacheTag, defineCacheKey, getFarmDataCache, invalidate, invalidateRouteData, normalizeRevalidatePath, revalidatePath, revalidateTag, storageCacheAdapter, unstable_cache, updateTag } from './cache.mjs';
7
7
  export { AfterCallback, FarmAfterPlatformContext, _runWithAfterNodeResponse, _runWithAfterRequest, _withAfterNodeMiddleware, after } from './after.mjs';
8
8
  export { FARM_SERVER_QUERY_SYMBOL, ServerQuery, ServerQueryKey, ServerQueryOptions, ServerQueryOutputOptions, ServerQueryStaleTime, createServerQuery } from './server-query.mjs';
9
9
  import { ViteDevServer } from 'vite';
10
10
  import './types-Z0aotQ8w.mjs';
11
- export { g as getCurrentRequest } from './request-CXmQy5ks.mjs';
11
+ export { g as getCurrentRequest } from './request-CrBCcPZZ.mjs';
12
12
  import { ServerResponse } from 'node:http';
13
13
  export { getTheme, getThemeSnapshot } from './theme/server.mjs';
14
14
  export { DEFAULT_SERVER_ACTION_BODY_SIZE_LIMIT, FarmServerActionsConfig, PreparedServerActionRequest, ResolvedFarmServerActionsConfig, SanitizedServerActionError, ServerActionRequestError, ServerActionRequestKind, createServerActionRequestErrorResponse, getServerActionExecutionContext, getServerActionInvalidations, getServerActionSignal, prepareServerActionRequest, resolveServerActionsConfig, runWithServerActionRequest, sanitizeServerActionError, validateServerActionRequest } from './server-action-security.mjs';
@@ -35,7 +35,7 @@ import 'http';
35
35
  import './schema.mjs';
36
36
  import './integration-api-BbaiokCC.mjs';
37
37
  import '@farming-labs/orm';
38
- import './observability.mjs';
38
+ import './observability-BupkiN0m.mjs';
39
39
  import '@opentelemetry/api';
40
40
  import './env.mjs';
41
41
  import 'rolldown/utils';
@@ -43,8 +43,8 @@ import 'rolldown';
43
43
  import './types-DQnyD3VD.mjs';
44
44
  import './font.mjs';
45
45
  import './island-CfGru1MO.mjs';
46
- import './metadata-D0EF7esB.mjs';
47
- import './render-plan-tazUJalK.mjs';
46
+ import './metadata-C3na4CBj.mjs';
47
+ import './render-plan-CKAJg0jC.mjs';
48
48
  import './runtime-AOJge4vQ.mjs';
49
49
  import './resolver-DhW0CqZN.mjs';
50
50