@farm.js/core 0.1.22 → 0.1.23

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 (150) hide show
  1. package/dist/agent-runtime.d.mts +3 -2
  2. package/dist/agent-runtime.d.ts +3 -2
  3. package/dist/api/route-manager.cjs +3 -2
  4. package/dist/api/route-manager.d.mts +3 -2
  5. package/dist/api/route-manager.d.ts +3 -2
  6. package/dist/api/route-manager.mjs +2 -1
  7. package/dist/api.cjs +4 -3
  8. package/dist/api.d.mts +4 -3
  9. package/dist/api.d.ts +4 -3
  10. package/dist/api.mjs +3 -2
  11. package/dist/{app-B7qKw8Ny.d.ts → app-BV-7wV5q.d.ts} +3 -3
  12. package/dist/{app-0e-oTC_R.d.mts → app-BZDWwwFa.d.mts} +3 -3
  13. package/dist/app-markdown.d.mts +4 -3
  14. package/dist/app-markdown.d.ts +4 -3
  15. package/dist/chunk-2VQKKQ6D.mjs +51 -0
  16. package/dist/{chunk-EGJDUF4Q.mjs → chunk-3ATMYLLJ.mjs} +6 -12
  17. package/dist/{chunk-HSDL2AUR.mjs → chunk-47H7VENP.mjs} +20 -32
  18. package/dist/{chunk-EXUMQVY3.cjs → chunk-4DKZ6JR3.cjs} +258 -256
  19. package/dist/{chunk-PUCUVI7K.mjs → chunk-72VJRKJD.mjs} +1 -1
  20. package/dist/{chunk-PC33YKTC.mjs → chunk-7LU4IOXQ.mjs} +128 -126
  21. package/dist/{chunk-SPSQFO3Z.mjs → chunk-BDJNP7AQ.mjs} +9 -13
  22. package/dist/{chunk-GXXONIAR.cjs → chunk-DNLQMFER.cjs} +12 -16
  23. package/dist/{chunk-SO7CRMP6.cjs → chunk-DW34V5SM.cjs} +5 -5
  24. package/dist/{chunk-X2ZUD4GI.mjs → chunk-EHUZ2MKO.mjs} +1 -1
  25. package/dist/{chunk-3NM6SRI6.mjs → chunk-F3VB7ONA.mjs} +10 -8
  26. package/dist/{chunk-P5HSJCXI.cjs → chunk-III667SJ.cjs} +291 -260
  27. package/dist/chunk-IK6LVLKC.cjs +51 -0
  28. package/dist/{chunk-B3WK4DTX.cjs → chunk-IMBMOEWT.cjs} +5 -1
  29. package/dist/{chunk-IILNZK5G.mjs → chunk-JHWOVJ3M.mjs} +46 -62
  30. package/dist/{chunk-TKNSDBBN.cjs → chunk-K3F2E6GS.cjs} +20 -1
  31. package/dist/{chunk-RTHIVJ2G.cjs → chunk-KCMTCM6I.cjs} +7 -8
  32. package/dist/{chunk-Q3PX2TGL.cjs → chunk-LQIRVSBY.cjs} +30 -40
  33. package/dist/chunk-LYLEZIG3.cjs +73 -0
  34. package/dist/{chunk-NBAHDVOJ.cjs → chunk-LYM7HY34.cjs} +20 -32
  35. package/dist/{chunk-K6FNHVDR.cjs → chunk-MPEYMSCF.cjs} +6 -12
  36. package/dist/{chunk-BHJUZ64B.cjs → chunk-QTBEAKCJ.cjs} +7 -7
  37. package/dist/{chunk-J6JRB2ER.mjs → chunk-S67OYZU7.mjs} +1 -1
  38. package/dist/chunk-SFGWNC43.mjs +97 -0
  39. package/dist/{chunk-AYJR42WX.cjs → chunk-UFDV5N3C.cjs} +2 -2
  40. package/dist/chunk-UYIHRDE4.cjs +97 -0
  41. package/dist/{chunk-Y4YMF2NQ.cjs → chunk-VPTDD5XF.cjs} +46 -62
  42. package/dist/{chunk-AAWTJW2G.mjs → chunk-VPY755R2.mjs} +58 -27
  43. package/dist/{chunk-GKT4ONKN.mjs → chunk-VVJCWBIE.mjs} +2 -2
  44. package/dist/{chunk-2HCEC2YO.cjs → chunk-VXCA7RZP.cjs} +1 -1
  45. package/dist/{chunk-CQHFU55R.mjs → chunk-WNUBR4CA.mjs} +5 -1
  46. package/dist/{chunk-CIAGU2X4.cjs → chunk-XSIRSMAS.cjs} +10 -8
  47. package/dist/{chunk-ONMW3EVV.mjs → chunk-YGMK6ESJ.mjs} +20 -30
  48. package/dist/chunk-YOZYCI6Z.mjs +73 -0
  49. package/dist/{chunk-HLCDYJY7.mjs → chunk-YQVSHTMR.mjs} +20 -1
  50. package/dist/{chunk-F5D4XEAS.mjs → chunk-ZZSRYEYU.mjs} +7 -8
  51. package/dist/{client-plugins-CWrhb1ir.d.mts → client-plugins-B_XzCegf.d.mts} +11 -9
  52. package/dist/{client-plugins-DPf0qZey.d.ts → client-plugins-CKsXQfXY.d.ts} +11 -9
  53. package/dist/client-plugins.d.mts +3 -2
  54. package/dist/client-plugins.d.ts +3 -2
  55. package/dist/client.d.mts +7 -6
  56. package/dist/client.d.ts +7 -6
  57. package/dist/config.d.mts +3 -2
  58. package/dist/config.d.ts +3 -2
  59. package/dist/{devtools-EZ5ORGAK.mjs → devtools-OY4SNU3P.mjs} +4 -3
  60. package/dist/{devtools-6DQHO7EK.cjs → devtools-UHRSZ7VA.cjs} +5 -4
  61. package/dist/docs.cjs +9 -6
  62. package/dist/docs.mjs +8 -5
  63. package/dist/index.cjs +23 -20
  64. package/dist/index.d.mts +14 -13
  65. package/dist/index.d.ts +14 -13
  66. package/dist/index.mjs +18 -15
  67. package/dist/instrumentation.cjs +3 -2
  68. package/dist/instrumentation.mjs +2 -1
  69. package/dist/integrations.d.mts +3 -2
  70. package/dist/integrations.d.ts +3 -2
  71. package/dist/internal/app-markdown-runtime.d.mts +3 -2
  72. package/dist/internal/app-markdown-runtime.d.ts +3 -2
  73. package/dist/internal/build-runtime.cjs +17 -14
  74. package/dist/internal/build-runtime.d.mts +5 -4
  75. package/dist/internal/build-runtime.d.ts +5 -4
  76. package/dist/internal/build-runtime.mjs +16 -13
  77. package/dist/internal/cli-runtime.cjs +10 -7
  78. package/dist/internal/cli-runtime.mjs +9 -6
  79. package/dist/internal/client-error-overlay.cjs +4 -4
  80. package/dist/internal/client-error-overlay.mjs +1 -1
  81. package/dist/internal/compression-runtime.d.mts +3 -2
  82. package/dist/internal/compression-runtime.d.ts +3 -2
  83. package/dist/internal/config-runtime.cjs +5 -4
  84. package/dist/internal/config-runtime.d.mts +4 -3
  85. package/dist/internal/config-runtime.d.ts +4 -3
  86. package/dist/internal/config-runtime.mjs +4 -3
  87. package/dist/internal/metadata-image-runtime.cjs +3 -2
  88. package/dist/internal/metadata-image-runtime.mjs +2 -1
  89. package/dist/internal/product-telemetry-runtime.cjs +2 -2
  90. package/dist/internal/product-telemetry-runtime.mjs +1 -1
  91. package/dist/internal/production-runtime.d.mts +9 -8
  92. package/dist/internal/production-runtime.d.ts +9 -8
  93. package/dist/layers-4PNE2HOY.cjs +18 -0
  94. package/dist/{layers-CJKSJGLN.mjs → layers-BRQF5ETU.mjs} +2 -1
  95. package/dist/{manager-NPG43N46.mjs → manager-RT733VRK.mjs} +2 -2
  96. package/dist/{manager-G4B2IPYE.cjs → manager-XZ5TX7AO.cjs} +3 -3
  97. package/dist/{metadata-CO9fRyyJ.d.mts → metadata-B08w4EYV.d.mts} +1 -1
  98. package/dist/{metadata-zY9wltwH.d.ts → metadata-IQEblkZp.d.ts} +1 -1
  99. package/dist/middleware.d.mts +5 -4
  100. package/dist/middleware.d.ts +5 -4
  101. package/dist/navigation.d.mts +6 -5
  102. package/dist/navigation.d.ts +6 -5
  103. package/dist/{nitro-TSGDUJMN.cjs → nitro-KQDU7CFE.cjs} +2 -2
  104. package/dist/{nitro-4LFVTT24.mjs → nitro-ZKLGOTVY.mjs} +1 -1
  105. package/dist/node-module-bundle-L5L7JCZ4.mjs +11 -0
  106. package/dist/node-module-bundle-VAFZOXMJ.cjs +11 -0
  107. package/dist/plugin.cjs +11 -9
  108. package/dist/plugin.d.mts +3 -2
  109. package/dist/plugin.d.ts +3 -2
  110. package/dist/plugin.mjs +10 -8
  111. package/dist/{production-runtime-CywsHwnG.d.mts → production-runtime-C3bGFEaM.d.mts} +1 -1
  112. package/dist/{production-runtime-lkfwujwK.d.ts → production-runtime-DRSOkc-d.d.ts} +1 -1
  113. package/dist/{render-plan-LVy6sGQe.d.mts → render-plan-B6CKNl4e.d.mts} +1 -1
  114. package/dist/{render-plan-DHF0GeWo.d.ts → render-plan-CCFuMLNS.d.ts} +1 -1
  115. package/dist/renderer-client.d.mts +5 -4
  116. package/dist/renderer-client.d.ts +5 -4
  117. package/dist/{request-6AkmhEYE.d.mts → request-DgD1XsTx.d.mts} +1 -1
  118. package/dist/{request-BYxlRqA9.d.ts → request-Dn6VURbE.d.ts} +1 -1
  119. package/dist/request.d.mts +4 -3
  120. package/dist/request.d.ts +4 -3
  121. package/dist/{route-rendering-Dd8Jmml7.d.mts → route-rendering-76A5I_kE.d.mts} +1 -1
  122. package/dist/{route-rendering-CWaKiUbS.d.ts → route-rendering-LAmQEdyG.d.ts} +1 -1
  123. package/dist/{router-B2m4fvve.d.ts → router-BSOOGya2.d.ts} +1 -1
  124. package/dist/{router-xwEE112q.d.mts → router-CnrRSa9d.d.mts} +1 -1
  125. package/dist/routes.d.mts +3 -2
  126. package/dist/routes.d.ts +3 -2
  127. package/dist/server-plugins.d.mts +4 -3
  128. package/dist/server-plugins.d.ts +4 -3
  129. package/dist/server.cjs +39 -26
  130. package/dist/server.d.mts +9 -8
  131. package/dist/server.d.ts +9 -8
  132. package/dist/server.mjs +24 -11
  133. package/dist/{spa-router-Y8rrXTVK.d.ts → spa-router-BMrSsG5b.d.ts} +2 -2
  134. package/dist/{spa-router-DVEHQnWo.d.mts → spa-router-DnYhWCvI.d.mts} +2 -2
  135. package/dist/testing.cjs +2 -1
  136. package/dist/testing.d.mts +3 -2
  137. package/dist/testing.d.ts +3 -2
  138. package/dist/testing.mjs +2 -1
  139. package/dist/{utils-DSPx34-A.d.mts → utils-ABkktwku.d.mts} +1 -1
  140. package/dist/{utils-Dvuny_08.d.ts → utils-C3GguS-Q.d.ts} +1 -1
  141. package/dist/version.cjs +2 -2
  142. package/dist/version.mjs +1 -1
  143. package/dist/vite.cjs +11 -9
  144. package/dist/vite.d.mts +3 -2
  145. package/dist/vite.d.ts +3 -2
  146. package/dist/vite.mjs +10 -8
  147. package/dist/workflows.cjs +2 -2
  148. package/dist/workflows.mjs +1 -1
  149. package/package.json +21 -11
  150. package/dist/layers-E4WPJNY5.cjs +0 -17
@@ -6,7 +6,7 @@ import {
6
6
  } from "./chunk-IOEH4VWN.mjs";
7
7
  import {
8
8
  APIRouteConflictError
9
- } from "./chunk-CQHFU55R.mjs";
9
+ } from "./chunk-WNUBR4CA.mjs";
10
10
  import {
11
11
  findProgrammaticRouteFilesInDir
12
12
  } from "./chunk-YOYF2E4U.mjs";
@@ -7,7 +7,7 @@ import {
7
7
  import {
8
8
  compileFarmDocsAdapterEdgeManifest,
9
9
  createFarmDocsAPIHandler
10
- } from "./chunk-ONMW3EVV.mjs";
10
+ } from "./chunk-YGMK6ESJ.mjs";
11
11
  import {
12
12
  FARM_DOCS_LAST_MODIFIED_MANIFEST,
13
13
  createFarmDocsHandler,
@@ -17,7 +17,7 @@ import {
17
17
  loadFarmDocsPage,
18
18
  resolveFarmDocsContentDir,
19
19
  toFarmDocsMarkdownPage
20
- } from "./chunk-HSDL2AUR.mjs";
20
+ } from "./chunk-47H7VENP.mjs";
21
21
  import {
22
22
  generateFarmDocsSearchClientRuntime,
23
23
  isFarmDocsSearchEnabled,
@@ -26,15 +26,18 @@ import {
26
26
  import {
27
27
  FARM_PRERENDER_ENV
28
28
  } from "./chunk-6VEHUKZ2.mjs";
29
+ import {
30
+ loadFarmDocsEngine
31
+ } from "./chunk-2VQKKQ6D.mjs";
29
32
  import {
30
33
  getDefaultDeployOutputDir,
31
34
  getDeployTargetForPreset,
32
35
  hasCustomFarmRouteContext,
33
36
  resolveDeployOutputPath
34
- } from "./chunk-SPSQFO3Z.mjs";
37
+ } from "./chunk-BDJNP7AQ.mjs";
35
38
  import {
36
39
  resolveFarmInstrumentationFile
37
- } from "./chunk-F5D4XEAS.mjs";
40
+ } from "./chunk-ZZSRYEYU.mjs";
38
41
  import {
39
42
  resolveFarmInstrumentationRuntime
40
43
  } from "./chunk-H77NVNJ2.mjs";
@@ -42,6 +45,7 @@ import {
42
45
  DEFAULT_NOT_FOUND_STYLES,
43
46
  FARM_LAYOUT_ELEMENT_CLIENT_SOURCE,
44
47
  PluginManager,
48
+ SHARP_INSTALL_HINT,
45
49
  createFarmApp,
46
50
  createFarmSourceAlias,
47
51
  createFarmThemeCssPlugin,
@@ -62,15 +66,16 @@ import {
62
66
  mergeFarmProductionViteConfig,
63
67
  mergeFarmViteConfig,
64
68
  resolveFarmClientCacheAdapterEntry,
69
+ resolveFarmImageProviderForRuntime,
65
70
  resolveFarmIsolatedClientHydrationMode,
66
71
  resolveFarmNotFoundComponentPath
67
- } from "./chunk-AAWTJW2G.mjs";
72
+ } from "./chunk-VPY755R2.mjs";
68
73
  import {
69
74
  findRequestBoundSourceBlockers,
70
75
  generateFarmTypeArtifacts,
71
76
  parseRouteRenderingDirective,
72
77
  resolveRouteRenderingConfigFromFile
73
- } from "./chunk-GKT4ONKN.mjs";
78
+ } from "./chunk-VVJCWBIE.mjs";
74
79
  import {
75
80
  isFarmPreviewDeploymentEnvironment
76
81
  } from "./chunk-BOYNDCZL.mjs";
@@ -90,7 +95,7 @@ import {
90
95
  } from "./chunk-GHFS7RUB.mjs";
91
96
  import {
92
97
  getFarmAppDirectories
93
- } from "./chunk-IILNZK5G.mjs";
98
+ } from "./chunk-JHWOVJ3M.mjs";
94
99
  import {
95
100
  REACT_RENDERER,
96
101
  getFarmRendererCapabilities,
@@ -122,7 +127,7 @@ import {
122
127
  import {
123
128
  applyFarmWorkflowVercelCrons,
124
129
  prepareFarmWorkflowsForNitro
125
- } from "./chunk-EGJDUF4Q.mjs";
130
+ } from "./chunk-3ATMYLLJ.mjs";
126
131
  import {
127
132
  getFarmIntegrationPluginServerRuntime,
128
133
  getIntegrationProviders
@@ -132,10 +137,13 @@ import {
132
137
  } from "./chunk-TIKNUAU7.mjs";
133
138
  import {
134
139
  APIRouteManager
135
- } from "./chunk-CQHFU55R.mjs";
140
+ } from "./chunk-WNUBR4CA.mjs";
136
141
  import {
137
142
  readFarmI18nCatalogs
138
143
  } from "./chunk-FV45CKBC.mjs";
144
+ import {
145
+ VERCEL_OG_INSTALL_HINT
146
+ } from "./chunk-YOZYCI6Z.mjs";
139
147
  import {
140
148
  resolveFarmAPIServerBasePath,
141
149
  resolveFarmAPIServerRoutePath
@@ -1073,6 +1081,9 @@ var NITRO_EXTERNAL_MODULES = /* @__PURE__ */ new Set([
1073
1081
  "fsevents",
1074
1082
  "esbuild",
1075
1083
  "lightningcss",
1084
+ "rolldown",
1085
+ "rolldown/experimental",
1086
+ "rolldown/utils",
1076
1087
  "rollup",
1077
1088
  "vite",
1078
1089
  "nitro",
@@ -1313,69 +1324,70 @@ function hasFarmRuntimeConfigModule(config, configModulePath) {
1313
1324
  return Boolean(configModulePath || (config.layers || []).some((layer) => layer.configFile));
1314
1325
  }
1315
1326
  __name(hasFarmRuntimeConfigModule, "hasFarmRuntimeConfigModule");
1316
- function createEsbuildTransformOptions(configuredEsbuildOptions, minify, defaultTarget) {
1317
- const {
1318
- include: _include,
1319
- exclude: _exclude,
1320
- sourceMap: _sourceMap,
1321
- loaders: _loaders,
1322
- ...configuredTransformOptions
1323
- } = configuredEsbuildOptions;
1324
- const configuredTarget = Array.isArray(configuredTransformOptions.target) ? configuredTransformOptions.target.filter(
1325
- (target) => typeof target === "string"
1326
- ) : configuredTransformOptions.target;
1327
- const transformTarget = Array.isArray(configuredTarget) && configuredTarget.length === 0 ? defaultTarget : configuredTarget ?? defaultTarget;
1328
- const transformSupported = configuredTransformOptions.supported ? Object.fromEntries(
1329
- Object.entries(configuredTransformOptions.supported).filter(
1330
- (entry) => typeof entry[1] === "boolean"
1331
- )
1332
- ) : void 0;
1333
- return {
1334
- ...configuredTransformOptions,
1335
- format: "esm",
1336
- target: transformTarget,
1337
- loader: "js",
1338
- sourcemap: false,
1339
- minify,
1340
- keepNames: configuredTransformOptions.keepNames ?? true,
1341
- legalComments: configuredTransformOptions.legalComments ?? "none",
1342
- supported: transformSupported
1343
- };
1327
+ async function minifyFarmServerChunk(code, fileName, options) {
1328
+ const rolldownUtils = await import("rolldown/utils");
1329
+ const keepNames = { function: options.keepNames, class: options.keepNames };
1330
+ const result = await rolldownUtils.minify(fileName, code, {
1331
+ module: true,
1332
+ compress: { target: options.target, keepNames },
1333
+ mangle: { keepNames },
1334
+ codegen: { legalComments: "none", asciiOnly: true },
1335
+ sourcemap: false
1336
+ });
1337
+ if (result.errors.length > 0) {
1338
+ throw new Error(`Failed to minify ${fileName}: ${result.errors[0].message}`);
1339
+ }
1340
+ return restoreLiteralModuleSpecifiers(result.code, fileName, rolldownUtils);
1341
+ }
1342
+ __name(minifyFarmServerChunk, "minifyFarmServerChunk");
1343
+ function restoreLiteralModuleSpecifiers(code, fileName, { parseSync, Visitor }) {
1344
+ if (!code.includes("import(`") && !code.includes("require(`")) return code;
1345
+ const parsed = parseSync(fileName, code, { lang: "js", sourceType: "module" });
1346
+ if (parsed.errors.length > 0) {
1347
+ throw new Error(`Failed to minify ${fileName}: ${parsed.errors[0].message}`);
1348
+ }
1349
+ const replacements = [];
1350
+ const restore = /* @__PURE__ */ __name((node) => {
1351
+ if (node?.type !== "TemplateLiteral") return;
1352
+ const template = node;
1353
+ const value = template.quasis[0]?.value.cooked;
1354
+ if (template.expressions.length > 0 || typeof value !== "string") return;
1355
+ const text = JSON.stringify(value).replace(
1356
+ /[\u007f-￿]/g,
1357
+ (character) => `\\u${character.charCodeAt(0).toString(16).padStart(4, "0")}`
1358
+ );
1359
+ replacements.push({ start: template.start, end: template.end, text });
1360
+ }, "restore");
1361
+ new Visitor({
1362
+ ImportExpression(node) {
1363
+ restore(node.source);
1364
+ },
1365
+ CallExpression(node) {
1366
+ if (node.callee.type === "Identifier" && node.callee.name === "require" && node.arguments.length === 1) {
1367
+ restore(node.arguments[0]);
1368
+ }
1369
+ }
1370
+ }).visit(parsed.program);
1371
+ let restored = "";
1372
+ let offset = 0;
1373
+ for (const { start, end, text } of replacements.sort((a, b) => a.start - b.start)) {
1374
+ restored += code.slice(offset, start) + text;
1375
+ offset = end;
1376
+ }
1377
+ return restored + code.slice(offset);
1344
1378
  }
1345
- __name(createEsbuildTransformOptions, "createEsbuildTransformOptions");
1346
- function createEsbuildChunkMinifyPlugin(configuredEsbuildOptions) {
1347
- const configuredTransformOptions = createEsbuildTransformOptions(
1348
- configuredEsbuildOptions,
1349
- true,
1350
- "esnext"
1351
- );
1352
- const transformOptions = {
1353
- format: "esm",
1354
- target: configuredTransformOptions.target,
1355
- loader: "js",
1356
- sourcemap: false,
1357
- minify: true,
1358
- keepNames: configuredTransformOptions.keepNames,
1359
- legalComments: configuredTransformOptions.legalComments,
1360
- charset: configuredTransformOptions.charset
1361
- };
1379
+ __name(restoreLiteralModuleSpecifiers, "restoreLiteralModuleSpecifiers");
1380
+ function createServerChunkMinifyPlugin(options) {
1362
1381
  return {
1363
- name: "farm-esbuild-minify",
1382
+ name: "farm-server-chunk-minify",
1364
1383
  async renderChunk(code, chunk) {
1365
- const { transform } = await import("esbuild");
1366
- const result = await transform(code, {
1367
- ...transformOptions,
1368
- sourcefile: chunk.fileName
1369
- });
1370
- if (!result.code) return null;
1371
- return {
1372
- code: result.code,
1373
- map: result.map || null
1374
- };
1384
+ const minified = await minifyFarmServerChunk(code, chunk.fileName, options);
1385
+ if (!minified) return null;
1386
+ return { code: minified, map: null };
1375
1387
  }
1376
1388
  };
1377
1389
  }
1378
- __name(createEsbuildChunkMinifyPlugin, "createEsbuildChunkMinifyPlugin");
1390
+ __name(createServerChunkMinifyPlugin, "createServerChunkMinifyPlugin");
1379
1391
  function trimSlashes(value) {
1380
1392
  return value.replace(/^\/+|\/+$/g, "");
1381
1393
  }
@@ -2188,7 +2200,7 @@ async function buildClient(productionVite, config, root, srcDir, outputDir, page
2188
2200
  if (id.includes("/api/") && id.includes("/route")) {
2189
2201
  return { id: "\0empty-api-route", external: false };
2190
2202
  }
2191
- if (id === "fsevents" || id.includes("fsevents") || id.endsWith(".node") || id === "nitro" || id === "vite" || id === "esbuild" || id === "rollup" || id.startsWith("nitro/") || id.includes("node-pre-gyp") || id.includes("nf3")) {
2203
+ if (id === "fsevents" || id.includes("fsevents") || id.endsWith(".node") || id === "nitro" || id === "vite" || id === "esbuild" || id === "rolldown" || id.startsWith("rolldown/") || id === "rollup" || id.startsWith("nitro/") || id.includes("node-pre-gyp") || id.includes("nf3")) {
2192
2204
  return { id: "\0empty-module", external: false };
2193
2205
  }
2194
2206
  return null;
@@ -4388,7 +4400,7 @@ void hydrate();
4388
4400
  __name(generateClientHydrationEntry, "generateClientHydrationEntry");
4389
4401
  async function buildSSRInMemory(productionVite, config, root, routeManager, apiRouteManager, serverRenderer, preset, collectedPageRoutes, collectedLayoutRoutes, collectedRouteSlots, isolatedClientBoundaryModules, hydrationPlanCache, rendererBuildLifetime) {
4390
4402
  const viteBuild = productionVite.build;
4391
- const { farmPlugin } = await import("./vite.mjs");
4403
+ const { farmPlugin, farmServerOnlyEntriesPlugin } = await import("./vite.mjs");
4392
4404
  const { PluginManager: PluginManager2 } = await import("./plugin.mjs");
4393
4405
  const fs = await import("fs/promises");
4394
4406
  const pluginManager = new PluginManager2({
@@ -4444,6 +4456,7 @@ async function buildSSRInMemory(productionVite, config, root, routeManager, apiR
4444
4456
  modulePath: entry.modulePath
4445
4457
  });
4446
4458
  }
4459
+ assertMetadataImageRuntimeInstalled(root, metadataImageRoutes);
4447
4460
  const applicationMetadataRoutes = Array.from(
4448
4461
  routeManager.getMetadataRoutes().values(),
4449
4462
  (entry) => ({
@@ -4487,7 +4500,7 @@ async function buildSSRInMemory(productionVite, config, root, routeManager, apiR
4487
4500
  const appDirs = getFarmAppDirectories(config);
4488
4501
  let openAPIReference = null;
4489
4502
  if (config.openapi.enabled && config.openapi.route) {
4490
- const { OpenAPIManager, renderOpenAPIReferenceHTML } = await import("./manager-NPG43N46.mjs");
4503
+ const { OpenAPIManager, renderOpenAPIReferenceHTML } = await import("./manager-RT733VRK.mjs");
4491
4504
  const openAPIManager = new OpenAPIManager(appDirs, config.openapi, {
4492
4505
  mode: "production",
4493
4506
  apiBaseURL: config.api.baseURL
@@ -4648,6 +4661,9 @@ async function buildSSRInMemory(productionVite, config, root, routeManager, apiR
4648
4661
  ...useExternalMetadataImageRuntime ? ["@vercel/og"] : [],
4649
4662
  "esbuild",
4650
4663
  "lightningcss",
4664
+ "rolldown",
4665
+ "rolldown/experimental",
4666
+ "rolldown/utils",
4651
4667
  "rollup",
4652
4668
  "@rollup/rollup-darwin-arm64",
4653
4669
  "@rollup/rollup-darwin-x64",
@@ -4703,6 +4719,7 @@ async function buildSSRInMemory(productionVite, config, root, routeManager, apiR
4703
4719
  };
4704
4720
  }
4705
4721
  },
4722
+ farmServerOnlyEntriesPlugin(),
4706
4723
  farmPlugin({ ...config, isolatedClientBoundaryModules }, pluginManager),
4707
4724
  farmEnvironmentFunctionsPlugin(),
4708
4725
  {
@@ -9277,16 +9294,9 @@ export default async function farmNitroEventHandler(event) {
9277
9294
  if (selectRolldownBuilder) nitroConfig.builder = "rolldown";
9278
9295
  const useRolldownBuilder = canReusePrebuiltSSR && (nitroConfig.builder ?? process.env.NITRO_BUILDER) === "rolldown";
9279
9296
  const shouldMinify = nitroConfig.minify !== false;
9280
- const configuredEsbuildOptions = {};
9281
- const resolvedEsbuildOptions = {
9282
- // Function-name helpers are unsafe for provider scripts that serialize a
9283
- // function with toString(); the helper is outside the emitted script scope.
9284
- keepNames: !(config.docs?.enabled && config.docs.adapter?.server),
9285
- legalComments: "none"
9286
- };
9287
- const prebuiltSSREsbuildOptions = config.docs?.enabled && config.docs.adapter?.server ? resolvedEsbuildOptions : configuredEsbuildOptions;
9288
- const useFarmEsbuildMinifier = shouldMinify && nitroConfig.sourcemap === false && !hasCustomOxcOptions && !hasLateBuildMutationConfig;
9289
- const esbuildChunkMinifier = useFarmEsbuildMinifier ? createEsbuildChunkMinifyPlugin(resolvedEsbuildOptions) : null;
9297
+ const keepServerNames = !(config.docs?.enabled && config.docs.adapter?.server);
9298
+ const useFarmServerMinifier = shouldMinify && nitroConfig.sourcemap === false && !hasCustomOxcOptions && !hasLateBuildMutationConfig;
9299
+ const serverChunkMinifier = useFarmServerMinifier ? createServerChunkMinifyPlugin({ keepNames: keepServerNames, target: "esnext" }) : null;
9290
9300
  if (canReusePrebuiltSSR) {
9291
9301
  const configuredRollupPlugins = nitroConfig.rollupConfig?.plugins;
9292
9302
  nitroConfig.rollupConfig = {
@@ -9297,7 +9307,7 @@ export default async function farmNitroEventHandler(event) {
9297
9307
  ]
9298
9308
  };
9299
9309
  }
9300
- nitroConfig.minify = useFarmEsbuildMinifier ? false : shouldMinify;
9310
+ nitroConfig.minify = useFarmServerMinifier ? false : shouldMinify;
9301
9311
  const nitroInstance = await nitroBuilder.createNitro(nitroConfig);
9302
9312
  if (config.security.csp && config.security.csp.nonce) {
9303
9313
  nitroInstance.hooks.hook("prerender:generate", async (route) => {
@@ -9347,26 +9357,25 @@ export default async function farmNitroEventHandler(event) {
9347
9357
  await copyPrebuiltSSRBundle(
9348
9358
  ssrBundle,
9349
9359
  path5.join(prerenderServerDir, FARM_SSR_OUTPUT_DIR),
9350
- {},
9351
- false,
9360
+ null,
9352
9361
  fs
9353
9362
  );
9354
9363
  await registerPrebuiltSSRPackageImport(prerenderServerDir, ssrEntryFile, fs);
9355
9364
  });
9356
9365
  });
9357
9366
  }
9358
- if (esbuildChunkMinifier || useRolldownBuilder) {
9367
+ if (serverChunkMinifier || useRolldownBuilder) {
9359
9368
  nitroInstance.hooks.hook("rollup:before", (_nitro, rollupConfig) => {
9360
9369
  if (useRolldownBuilder) {
9361
9370
  const rolldownConfig = rollupConfig;
9362
9371
  delete rolldownConfig.inject;
9363
9372
  delete rolldownConfig.jsx;
9364
9373
  }
9365
- if (esbuildChunkMinifier) {
9374
+ if (serverChunkMinifier) {
9366
9375
  const configuredPlugins = rollupConfig.plugins;
9367
9376
  rollupConfig.plugins = [
9368
9377
  ...Array.isArray(configuredPlugins) ? configuredPlugins : configuredPlugins ? [configuredPlugins] : [],
9369
- esbuildChunkMinifier
9378
+ serverChunkMinifier
9370
9379
  ];
9371
9380
  }
9372
9381
  });
@@ -9413,8 +9422,7 @@ export default async function farmNitroEventHandler(event) {
9413
9422
  canReusePrebuiltSSR ? copyPrebuiltSSRBundle(
9414
9423
  ssrBundle,
9415
9424
  path5.join(outputDir, "server", FARM_SSR_OUTPUT_DIR),
9416
- prebuiltSSREsbuildOptions,
9417
- shouldMinify,
9425
+ shouldMinify ? { keepNames: keepServerNames, target: "node18" } : null,
9418
9426
  fs
9419
9427
  ) : Promise.resolve(),
9420
9428
  runtimeCopyPromise
@@ -9458,23 +9466,7 @@ function resolveFarmNitroOutputConfig(preset, outputDir) {
9458
9466
  };
9459
9467
  }
9460
9468
  __name(resolveFarmNitroOutputConfig, "resolveFarmNitroOutputConfig");
9461
- async function copyPrebuiltSSRBundle(ssrBundle, targetDir, configuredEsbuildOptions, minify, fs) {
9462
- const {
9463
- include: _include,
9464
- exclude: _exclude,
9465
- sourceMap: _sourceMap,
9466
- loaders: _loaders,
9467
- ...configuredTransformOptions
9468
- } = configuredEsbuildOptions;
9469
- const hasConfiguredTransforms = Object.keys(configuredTransformOptions).some(
9470
- (option) => option !== "minify"
9471
- );
9472
- const transformOptions = createEsbuildTransformOptions(
9473
- configuredEsbuildOptions,
9474
- minify,
9475
- "node18"
9476
- );
9477
- const transform = minify || hasConfiguredTransforms ? (await import("esbuild")).transform : null;
9469
+ async function copyPrebuiltSSRBundle(ssrBundle, targetDir, minifyOptions, fs) {
9478
9470
  await fs.rm(targetDir, { recursive: true, force: true });
9479
9471
  await Promise.all(
9480
9472
  Object.entries(ssrBundle).map(async ([fileName, output]) => {
@@ -9484,14 +9476,7 @@ async function copyPrebuiltSSRBundle(ssrBundle, targetDir, configuredEsbuildOpti
9484
9476
  await fs.writeFile(targetPath, output.source);
9485
9477
  return;
9486
9478
  }
9487
- let code = output.code;
9488
- if (transform) {
9489
- const result = await transform(code, {
9490
- ...transformOptions,
9491
- sourcefile: fileName
9492
- });
9493
- code = result.code;
9494
- }
9479
+ const code = minifyOptions ? await minifyFarmServerChunk(output.code, fileName, minifyOptions) : output.code;
9495
9480
  await fs.writeFile(targetPath, code);
9496
9481
  })
9497
9482
  );
@@ -9666,9 +9651,7 @@ async function stageSharpRuntime(config, root, distDir, fs, preset) {
9666
9651
  try {
9667
9652
  await copyPackage("sharp", sharpRequire);
9668
9653
  if (!copiedPackages.has("sharp")) {
9669
- throw new Error(
9670
- "Farm image optimization requires sharp. Reinstall dependencies without omitting optional packages."
9671
- );
9654
+ throw new Error(`Farm image optimization requires sharp. ${SHARP_INSTALL_HINT}`);
9672
9655
  }
9673
9656
  } catch (error) {
9674
9657
  await fs.rm(stageDir, { recursive: true, force: true });
@@ -9740,20 +9723,31 @@ async function mergeStagedDirectory(sourceDir, targetDir, fs) {
9740
9723
  );
9741
9724
  }
9742
9725
  __name(mergeStagedDirectory, "mergeStagedDirectory");
9743
- async function copyMetadataImageRuntime(root, nitroFuncDir, fs) {
9726
+ function assertMetadataImageRuntimeInstalled(root, metadataImageRoutes) {
9727
+ const generated = metadataImageRoutes.find((image) => image.sourceType === "module");
9728
+ if (!generated || resolveMetadataImageRuntimePackageJson(root)) return;
9729
+ const file = generated.modulePath ? toPosixPath(path5.relative(root, generated.modulePath)) : "";
9730
+ throw new Error(
9731
+ `${file || "A generated metadata image"} renders with @vercel/og, which is not installed. ${VERCEL_OG_INSTALL_HINT}`
9732
+ );
9733
+ }
9734
+ __name(assertMetadataImageRuntimeInstalled, "assertMetadataImageRuntimeInstalled");
9735
+ function resolveMetadataImageRuntimePackageJson(root) {
9744
9736
  const projectRequire = createRequire(path5.join(root, "package.json"));
9745
- let runtimeRequire = projectRequire;
9746
- let packageJsonPath = resolvePackageJson(runtimeRequire, "@vercel/og");
9747
- if (!packageJsonPath) {
9748
- try {
9749
- runtimeRequire = createRequire(projectRequire.resolve("@farm.js/core"));
9750
- packageJsonPath = resolvePackageJson(runtimeRequire, "@vercel/og");
9751
- } catch {
9752
- }
9737
+ const packageJsonPath = resolvePackageJson(projectRequire, "@vercel/og");
9738
+ if (packageJsonPath) return packageJsonPath;
9739
+ try {
9740
+ return resolvePackageJson(createRequire(projectRequire.resolve("@farm.js/core")), "@vercel/og");
9741
+ } catch {
9742
+ return null;
9753
9743
  }
9744
+ }
9745
+ __name(resolveMetadataImageRuntimePackageJson, "resolveMetadataImageRuntimePackageJson");
9746
+ async function copyMetadataImageRuntime(root, nitroFuncDir, fs) {
9747
+ const packageJsonPath = resolveMetadataImageRuntimePackageJson(root);
9754
9748
  if (!packageJsonPath) {
9755
9749
  throw new Error(
9756
- "Generated metadata images require @vercel/og. Reinstall @farm.js/core with production dependencies."
9750
+ `The server output imports @vercel/og, which is not installed. ${VERCEL_OG_INSTALL_HINT}`
9757
9751
  );
9758
9752
  }
9759
9753
  const packageJson = JSON.parse(await fs.readFile(packageJsonPath, "utf8"));
@@ -9930,6 +9924,14 @@ async function buildWithProductionNodeEnv(inputConfig, options) {
9930
9924
  outputDir: targets.outputDir
9931
9925
  }
9932
9926
  };
9927
+ config = {
9928
+ ...config,
9929
+ images: resolveFarmImageProviderForRuntime(config.images, {
9930
+ root: targets.root,
9931
+ preset: targets.preset
9932
+ })
9933
+ };
9934
+ if (config.docs?.enabled) await loadFarmDocsEngine();
9933
9935
  pluginManager.updateContext({ config });
9934
9936
  const { root, preset, srcDir, distDir, deployOutputDir } = targets;
9935
9937
  logger.info(`\u{1F69C} Building Farm.js application with preset: ${preset}...`);
@@ -10191,7 +10193,7 @@ function resolveLegacyPageEntry(config, root, srcDir) {
10191
10193
  __name(resolveLegacyPageEntry, "resolveLegacyPageEntry");
10192
10194
  async function buildNitro(config, routeManager, apiRouteManager, serverRenderer, preset, root, distDir, pluginManager) {
10193
10195
  const [{ createNitroConfig }, { createNitro, build: nitroBuild }] = await Promise.all([
10194
- import("./nitro-4LFVTT24.mjs"),
10196
+ import("./nitro-ZKLGOTVY.mjs"),
10195
10197
  import("nitro/builder")
10196
10198
  ]);
10197
10199
  let nitroConfig = await createNitroConfig(
@@ -15,7 +15,7 @@ import {
15
15
  import {
16
16
  loadFarmConfigFile,
17
17
  resolveFarmLayers
18
- } from "./chunk-IILNZK5G.mjs";
18
+ } from "./chunk-JHWOVJ3M.mjs";
19
19
  import {
20
20
  isReactRenderer,
21
21
  resolveFarmRenderer
@@ -48,9 +48,12 @@ import {
48
48
  import {
49
49
  resolveMarkdownConfig
50
50
  } from "./chunk-OFEY6KHO.mjs";
51
+ import {
52
+ bundleNodeModule
53
+ } from "./chunk-SFGWNC43.mjs";
51
54
  import {
52
55
  resolveWorkflowsConfig
53
- } from "./chunk-EGJDUF4Q.mjs";
56
+ } from "./chunk-3ATMYLLJ.mjs";
54
57
  import {
55
58
  resolveFarmThemeConfig
56
59
  } from "./chunk-AELACLOB.mjs";
@@ -500,25 +503,18 @@ async function loadDocsConfig(rootDir, configPath) {
500
503
  const content = await fs.readFile(resolvedPath, "utf8");
501
504
  return { config: JSON.parse(content), configPath: resolvedPath };
502
505
  }
503
- const { build } = await import("esbuild");
504
506
  const configCacheDir = path3.join(root, ".farm", ".config-loader");
505
507
  await fs.mkdir(configCacheDir, { recursive: true });
506
508
  const modulePath = path3.join(
507
509
  configCacheDir,
508
510
  `docs-config-${Date.now()}-${Math.random().toString(36).slice(2)}.mjs`
509
511
  );
510
- await build({
511
- absWorkingDir: root,
512
- entryPoints: [resolvedPath],
512
+ await bundleNodeModule({
513
+ root,
514
+ entry: resolvedPath,
513
515
  outfile: modulePath,
514
- bundle: true,
515
- format: "esm",
516
- platform: "node",
517
516
  target: `node${process.versions.node.split(".")[0]}`,
518
- packages: "external",
519
- jsx: "automatic",
520
- logLevel: "silent",
521
- sourcemap: "inline"
517
+ externalPackages: true
522
518
  });
523
519
  const moduleUrl = pathToFileURL3(modulePath).href + `?t=${Date.now()}`;
524
520
  let importedConfig;
@@ -15,7 +15,7 @@ var _chunkQ5B3KJBPcjs = require('./chunk-Q5B3KJBP.cjs');
15
15
 
16
16
 
17
17
 
18
- var _chunkY4YMF2NQcjs = require('./chunk-Y4YMF2NQ.cjs');
18
+ var _chunkVPTDD5XFcjs = require('./chunk-VPTDD5XF.cjs');
19
19
 
20
20
 
21
21
 
@@ -50,7 +50,10 @@ var _chunkOHY2ZWUGcjs = require('./chunk-OHY2ZWUG.cjs');
50
50
  var _chunkBBVSJVBZcjs = require('./chunk-BBVSJVBZ.cjs');
51
51
 
52
52
 
53
- var _chunkK6FNHVDRcjs = require('./chunk-K6FNHVDR.cjs');
53
+ var _chunkUYIHRDE4cjs = require('./chunk-UYIHRDE4.cjs');
54
+
55
+
56
+ var _chunkMPEYMSCFcjs = require('./chunk-MPEYMSCF.cjs');
54
57
 
55
58
 
56
59
  var _chunkOI6CMLWXcjs = require('./chunk-OI6CMLWX.cjs');
@@ -500,25 +503,18 @@ async function loadDocsConfig(rootDir, configPath) {
500
503
  const content = await fs.readFile(resolvedPath, "utf8");
501
504
  return { config: JSON.parse(content), configPath: resolvedPath };
502
505
  }
503
- const { build } = await import("esbuild");
504
506
  const configCacheDir = _path2.default.join(root, ".farm", ".config-loader");
505
507
  await fs.mkdir(configCacheDir, { recursive: true });
506
508
  const modulePath = _path2.default.join(
507
509
  configCacheDir,
508
510
  `docs-config-${Date.now()}-${Math.random().toString(36).slice(2)}.mjs`
509
511
  );
510
- await build({
511
- absWorkingDir: root,
512
- entryPoints: [resolvedPath],
512
+ await _chunkUYIHRDE4cjs.bundleNodeModule.call(void 0, {
513
+ root,
514
+ entry: resolvedPath,
513
515
  outfile: modulePath,
514
- bundle: true,
515
- format: "esm",
516
- platform: "node",
517
516
  target: `node${process.versions.node.split(".")[0]}`,
518
- packages: "external",
519
- jsx: "automatic",
520
- logLevel: "silent",
521
- sourcemap: "inline"
517
+ externalPackages: true
522
518
  });
523
519
  const moduleUrl = pathToFileURL3(modulePath).href + `?t=${Date.now()}`;
524
520
  let importedConfig;
@@ -646,7 +642,7 @@ function validateConfigRouteSources(routes, field) {
646
642
  _chunkS3JO3N4Hcjs.__name.call(void 0, validateConfigRouteSources, "validateConfigRouteSources");
647
643
  async function resolveConfig(userConfig, mode) {
648
644
  const projectRoot = userConfig.root || process.cwd();
649
- const layerResolution = await _chunkY4YMF2NQcjs.resolveFarmLayers.call(void 0, userConfig, {
645
+ const layerResolution = await _chunkVPTDD5XFcjs.resolveFarmLayers.call(void 0, userConfig, {
650
646
  root: projectRoot,
651
647
  mode
652
648
  });
@@ -743,7 +739,7 @@ async function resolveConfig(userConfig, mode) {
743
739
  mdx,
744
740
  migrations: resolveMigrationsConfig(userConfig.migrations),
745
741
  cron: _chunk6EXBPJ24cjs.resolveCronConfig.call(void 0, userConfig.cron),
746
- workflows: _chunkK6FNHVDRcjs.resolveWorkflowsConfig.call(void 0, userConfig.workflows),
742
+ workflows: _chunkMPEYMSCFcjs.resolveWorkflowsConfig.call(void 0, userConfig.workflows),
747
743
  api,
748
744
  observability: _nullishCoalesce(userConfig.observability, () => ( false)),
749
745
  telemetry: userConfig.telemetry !== false,
@@ -857,7 +853,7 @@ async function loadConfig(rootDir, configPath, mode = process.env.NODE_ENV === "
857
853
  if (!existsSync(normalizedPath)) {
858
854
  continue;
859
855
  }
860
- const loadedConfig = await _chunkY4YMF2NQcjs.loadFarmConfigFile.call(void 0, normalizedPath, { root });
856
+ const loadedConfig = await _chunkVPTDD5XFcjs.loadFarmConfigFile.call(void 0, normalizedPath, { root });
861
857
  return loadedConfig.root === void 0 ? { ...loadedConfig, root } : loadedConfig;
862
858
  } catch (error) {
863
859
  const configError = new Error(
@@ -6,7 +6,7 @@ var _chunkE2ROOWQCcjs = require('./chunk-E2ROOWQC.cjs');
6
6
  var _chunkJSROZYYOcjs = require('./chunk-JSROZYYO.cjs');
7
7
 
8
8
 
9
- var _chunkCIAGU2X4cjs = require('./chunk-CIAGU2X4.cjs');
9
+ var _chunkXSIRSMAScjs = require('./chunk-XSIRSMAS.cjs');
10
10
 
11
11
 
12
12
  var _chunkSYQ3MOWWcjs = require('./chunk-SYQ3MOWW.cjs');
@@ -20,7 +20,7 @@ var _chunkTIWHTW3Qcjs = require('./chunk-TIWHTW3Q.cjs');
20
20
 
21
21
 
22
22
 
23
- var _chunkY4YMF2NQcjs = require('./chunk-Y4YMF2NQ.cjs');
23
+ var _chunkVPTDD5XFcjs = require('./chunk-VPTDD5XF.cjs');
24
24
 
25
25
 
26
26
  var _chunkPSV6XKPOcjs = require('./chunk-PSV6XKPO.cjs');
@@ -1158,8 +1158,8 @@ async function generateFarmTypeArtifacts(options) {
1158
1158
  const shouldGenerateEnv = options.env !== false;
1159
1159
  const shouldGenerateImages = options.images !== false;
1160
1160
  const shouldGenerateI18n = options.i18n !== false && _optionalChain([options, 'access', _47 => _47.i18nConfig, 'optionalAccess', _48 => _48.enabled]);
1161
- const sourceRoots = _chunkY4YMF2NQcjs.getFarmSourceRoots.call(void 0, { root, srcDir, layers: options.layers });
1162
- const appDirs = _chunkY4YMF2NQcjs.getFarmAppDirectories.call(void 0, { root, srcDir, layers: options.layers });
1161
+ const sourceRoots = _chunkVPTDD5XFcjs.getFarmSourceRoots.call(void 0, { root, srcDir, layers: options.layers });
1162
+ const appDirs = _chunkVPTDD5XFcjs.getFarmAppDirectories.call(void 0, { root, srcDir, layers: options.layers });
1163
1163
  const result = {
1164
1164
  apiRoutes: [],
1165
1165
  stalePaths: []
@@ -1198,7 +1198,7 @@ async function generateFarmTypeArtifacts(options) {
1198
1198
  }
1199
1199
  }
1200
1200
  if (shouldGenerateApi) {
1201
- const generator = new (0, _chunkCIAGU2X4cjs.APITypeGenerator)(appDirs);
1201
+ const generator = new (0, _chunkXSIRSMAScjs.APITypeGenerator)(appDirs);
1202
1202
  const apiRoutes = generator.scanAPIRoutes();
1203
1203
  const apiTypesPath = options.apiTypesOutFile ? _path.resolve.call(void 0, root, options.apiTypesOutFile) : _path.join.call(void 0, root, srcDir, "lib", "api.generated.ts");
1204
1204
  const pluginRoutes = _chunkI4J452B7cjs.resolvePluginRoutes.call(void 0, options.plugins);
@@ -1,5 +1,5 @@
1
1
  // package.json
2
- var version = "0.1.22";
2
+ var version = "0.1.23";
3
3
 
4
4
  // src/version.ts
5
5
  var FARM_VERSION = version;