@farm.js/core 0.1.14 → 0.1.16

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 (123) hide show
  1. package/dist/agent-runtime.d.mts +5 -2
  2. package/dist/agent-runtime.d.ts +5 -2
  3. package/dist/api/client.d.mts +3 -2
  4. package/dist/api/client.d.ts +3 -2
  5. package/dist/api/route-manager.d.mts +5 -2
  6. package/dist/api/route-manager.d.ts +5 -2
  7. package/dist/api/runtime.d.mts +3 -2
  8. package/dist/api/runtime.d.ts +3 -2
  9. package/dist/{api-client-C8d7BZNp.d.mts → api-client-B-n3pm_Q.d.mts} +2 -1
  10. package/dist/{api-client-BWrEbxfO.d.ts → api-client-C0_NZEBl.d.ts} +2 -1
  11. package/dist/api.d.mts +7 -4
  12. package/dist/api.d.ts +7 -4
  13. package/dist/{app-wIYse61b.d.ts → app-AyjEsCBq.d.ts} +3 -3
  14. package/dist/{app-B3nVSjen.d.mts → app-CYPHeOo_.d.mts} +3 -3
  15. package/dist/app-markdown.d.mts +6 -3
  16. package/dist/app-markdown.d.ts +6 -3
  17. package/dist/{chunk-FOGLGRDS.mjs → chunk-7HDZYYS4.mjs} +100 -8
  18. package/dist/{chunk-DNCKVMSV.mjs → chunk-IL5RWYK7.mjs} +1 -1
  19. package/dist/{chunk-GNTPTTLA.mjs → chunk-IXTEENRS.mjs} +1 -1
  20. package/dist/{chunk-J2F5LFQ2.mjs → chunk-NHHKW2T6.mjs} +175 -8
  21. package/dist/{chunk-NJ47VORC.mjs → chunk-NUD6XBMO.mjs} +1 -1
  22. package/dist/{chunk-U6CRU23N.mjs → chunk-TYVVIQ5M.mjs} +10 -7
  23. package/dist/{chunk-W7IVHTOP.mjs → chunk-UQZPTIML.mjs} +15 -2
  24. package/dist/{chunk-S3QW3BIS.mjs → chunk-VVTREAG5.mjs} +89 -4
  25. package/dist/{client-plugins-C1EgdoJM.d.mts → client-plugins-CIPRtSsW.d.mts} +16 -4
  26. package/dist/{client-plugins-CslwYp3E.d.ts → client-plugins-CqVtZi5X.d.ts} +16 -4
  27. package/dist/client-plugins.d.mts +5 -2
  28. package/dist/client-plugins.d.ts +5 -2
  29. package/dist/client.d.mts +8 -7
  30. package/dist/client.d.ts +8 -7
  31. package/dist/config.d.mts +5 -2
  32. package/dist/config.d.ts +5 -2
  33. package/dist/{devtools-PCGEBRSC.mjs → devtools-IU7LKZOH.mjs} +2 -2
  34. package/dist/docs.cjs +74 -3
  35. package/dist/docs.mjs +3 -3
  36. package/dist/{route-C6UClI1z.d.mts → endpoint-Bu3XgeMK.d.mts} +3 -128
  37. package/dist/{route-CHBaW55F.d.ts → endpoint-kSAxE52R.d.ts} +3 -128
  38. package/dist/env.cjs +101 -8
  39. package/dist/env.d.mts +20 -2
  40. package/dist/env.d.ts +20 -2
  41. package/dist/env.mjs +3 -1
  42. package/dist/index.cjs +383 -24
  43. package/dist/index.d.mts +16 -15
  44. package/dist/index.d.ts +16 -15
  45. package/dist/index.mjs +20 -8
  46. package/dist/integrations.d.mts +5 -2
  47. package/dist/integrations.d.ts +5 -2
  48. package/dist/internal/app-markdown-runtime.d.mts +5 -2
  49. package/dist/internal/app-markdown-runtime.d.ts +5 -2
  50. package/dist/internal/build-runtime.cjs +435 -174
  51. package/dist/internal/build-runtime.d.mts +7 -4
  52. package/dist/internal/build-runtime.d.ts +7 -4
  53. package/dist/internal/build-runtime.mjs +6 -6
  54. package/dist/internal/cli-runtime.cjs +68 -4
  55. package/dist/internal/cli-runtime.mjs +2 -2
  56. package/dist/internal/client-error-overlay.cjs +1 -1
  57. package/dist/internal/client-error-overlay.mjs +1 -1
  58. package/dist/internal/compression-runtime.d.mts +5 -2
  59. package/dist/internal/compression-runtime.d.ts +5 -2
  60. package/dist/internal/config-runtime.cjs +68 -4
  61. package/dist/internal/config-runtime.d.mts +6 -3
  62. package/dist/internal/config-runtime.d.ts +6 -3
  63. package/dist/internal/config-runtime.mjs +2 -2
  64. package/dist/internal/product-telemetry-runtime.cjs +1 -1
  65. package/dist/internal/product-telemetry-runtime.mjs +1 -1
  66. package/dist/internal/production-runtime.d.mts +11 -8
  67. package/dist/internal/production-runtime.d.ts +11 -8
  68. package/dist/{metadata-BsUcOEXg.d.ts → metadata-8g__AMPM.d.ts} +1 -1
  69. package/dist/{metadata-B1bxCPUY.d.mts → metadata-OMX6wFNf.d.mts} +1 -1
  70. package/dist/middleware.d.mts +7 -4
  71. package/dist/middleware.d.ts +7 -4
  72. package/dist/{nitro-ICBP5APY.mjs → nitro-3N4ZXRYM.mjs} +5 -2
  73. package/dist/plugin.cjs +278 -11
  74. package/dist/plugin.d.mts +5 -2
  75. package/dist/plugin.d.ts +5 -2
  76. package/dist/plugin.mjs +3 -3
  77. package/dist/{production-runtime-CsNn2-zx.d.ts → production-runtime-BJh7o6Cr.d.ts} +1 -1
  78. package/dist/{production-runtime-BDllolVh.d.mts → production-runtime-W3M0eNDV.d.mts} +1 -1
  79. package/dist/{render-plan-EG4hNFjy.d.ts → render-plan-Be4ZGTJP.d.ts} +1 -1
  80. package/dist/{render-plan-CNUlzylR.d.mts → render-plan-io7pvDNc.d.mts} +1 -1
  81. package/dist/renderer-client.d.mts +5 -4
  82. package/dist/renderer-client.d.ts +5 -4
  83. package/dist/{request-Blh_f7Z3.d.mts → request-DZkHYQ89.d.mts} +1 -1
  84. package/dist/{request-DsVSQVfD.d.ts → request-G8JhKr4F.d.ts} +1 -1
  85. package/dist/request.d.mts +6 -3
  86. package/dist/request.d.ts +6 -3
  87. package/dist/route-BxNJT447.d.ts +128 -0
  88. package/dist/route-C_eLaFTZ.d.mts +128 -0
  89. package/dist/{route-rendering-hUETRCbM.d.ts → route-rendering-BcLLPJgN.d.ts} +1 -1
  90. package/dist/{route-rendering-LT4XSoQK.d.mts → route-rendering-CbAKr1TY.d.mts} +1 -1
  91. package/dist/routes.d.mts +4 -2
  92. package/dist/routes.d.ts +4 -2
  93. package/dist/server-fn-client.d.mts +3 -2
  94. package/dist/server-fn-client.d.ts +3 -2
  95. package/dist/server-fn.cjs +141 -3
  96. package/dist/server-fn.d.mts +72 -1
  97. package/dist/server-fn.d.ts +72 -1
  98. package/dist/server-fn.mjs +12 -1
  99. package/dist/server-plugins.d.mts +6 -3
  100. package/dist/server-plugins.d.ts +6 -3
  101. package/dist/server-query-client.d.mts +1 -0
  102. package/dist/server-query-client.d.ts +1 -0
  103. package/dist/server-query.cjs +60 -3
  104. package/dist/server-query.d.mts +6 -1
  105. package/dist/server-query.d.ts +6 -1
  106. package/dist/server-query.mjs +3 -2
  107. package/dist/server.cjs +331 -15
  108. package/dist/server.d.mts +9 -8
  109. package/dist/server.d.ts +9 -8
  110. package/dist/server.mjs +6 -6
  111. package/dist/{spa-router-csKR9Ebj.d.mts → spa-router-BcS_4nqm.d.mts} +2 -2
  112. package/dist/{spa-router-Y_2FSJQK.d.ts → spa-router-BzFBUJkn.d.ts} +2 -2
  113. package/dist/testing.d.mts +5 -3
  114. package/dist/testing.d.ts +5 -3
  115. package/dist/{utils-DR2wfZAn.d.mts → utils-5kQP1mFR.d.mts} +1 -1
  116. package/dist/{utils-jISOE9SD.d.ts → utils-C4yrAhNc.d.ts} +1 -1
  117. package/dist/version.cjs +1 -1
  118. package/dist/version.mjs +1 -1
  119. package/dist/vite.cjs +416 -153
  120. package/dist/vite.d.mts +5 -2
  121. package/dist/vite.d.ts +5 -2
  122. package/dist/vite.mjs +3 -3
  123. package/package.json +3 -3
package/dist/server.cjs CHANGED
@@ -11971,14 +11971,33 @@ function resolveEnv(config, source = getProcessEnv()) {
11971
11971
  };
11972
11972
  return resolved;
11973
11973
  }
11974
+ function createBundledEnv(env2, source = getProcessEnv()) {
11975
+ const resolved = normalizeResolvedEnv(env2 ?? {});
11976
+ const server = {};
11977
+ const runtime3 = {};
11978
+ for (const [key, value] of Object.entries(resolved.server)) {
11979
+ if (source[key] === void 0) {
11980
+ server[key] = value;
11981
+ } else {
11982
+ runtime3[key] = getRuntimeEnvType(value);
11983
+ }
11984
+ }
11985
+ return {
11986
+ server,
11987
+ public: resolved.public,
11988
+ ...Object.keys(runtime3).length > 0 ? { runtime: { server: runtime3 } } : {}
11989
+ };
11990
+ }
11974
11991
  function setEnv(env2) {
11975
- currentEnv = normalizeResolvedEnv(env2);
11992
+ currentEnv = prepareEnv(env2);
11976
11993
  if (typeof window === "undefined") {
11977
11994
  farmEnvGlobal[FARM_ENV_SYMBOL] = currentEnv;
11978
11995
  }
11979
11996
  }
11980
11997
  function getResolvedEnv() {
11981
- return getCurrentEnv();
11998
+ const env2 = getCurrentEnv();
11999
+ if (typeof window === "undefined") readRuntimeServerEnv(env2);
12000
+ return env2;
11982
12001
  }
11983
12002
  function resolveEnvScope(shape, source, scope) {
11984
12003
  if (!shape) {
@@ -12013,7 +12032,7 @@ function createEnvProxy(scope) {
12013
12032
  return void 0;
12014
12033
  }
12015
12034
  const env2 = getEnvScope(scope);
12016
- return env2[property];
12035
+ return scope === "server" ? readServerEnvKey(env2, property) : env2[property];
12017
12036
  },
12018
12037
  ownKeys() {
12019
12038
  return Reflect.ownKeys(getEnvScope(scope));
@@ -12036,10 +12055,75 @@ function createEnvProxy(scope) {
12036
12055
  );
12037
12056
  }
12038
12057
  function getEnvScope(scope) {
12058
+ const env2 = getCurrentEnv();
12039
12059
  if (scope === "server") {
12040
12060
  assertServerEnvAccess();
12061
+ readRuntimeServerEnv(env2);
12041
12062
  }
12042
- return getCurrentEnv()[scope] || {};
12063
+ return env2[scope] || {};
12064
+ }
12065
+ function readServerEnvKey(server, key) {
12066
+ const value = server[key];
12067
+ if (value === void 0) {
12068
+ const state = getCurrentEnv()[FARM_ENV_RUNTIME_SYMBOL];
12069
+ if (state && key in state.pending && !state.warned.has(key)) {
12070
+ state.warned.add(key);
12071
+ console.warn(
12072
+ `[Farm] Server env "${key}" was set when this app was built but is not set where the server runs, so it reads as undefined. Farm reads server env at runtime and does not store it in the build output; set "${key}" in the server's environment.`
12073
+ );
12074
+ }
12075
+ }
12076
+ return value;
12077
+ }
12078
+ function readRuntimeServerEnv(env2) {
12079
+ const state = env2[FARM_ENV_RUNTIME_SYMBOL];
12080
+ if (!state) return;
12081
+ const source = getProcessEnv();
12082
+ for (const [key, type] of Object.entries(state.pending)) {
12083
+ const raw = source[key];
12084
+ if (raw === void 0) continue;
12085
+ env2.server[key] = coerceRuntimeEnvValue(raw, type);
12086
+ delete state.pending[key];
12087
+ }
12088
+ }
12089
+ function getRuntimeEnvType(value) {
12090
+ if (typeof value === "number") return "number";
12091
+ if (typeof value === "boolean") return "boolean";
12092
+ if (value !== null && typeof value === "object" && !(value instanceof Date)) return "json";
12093
+ return "string";
12094
+ }
12095
+ function coerceRuntimeEnvValue(raw, type) {
12096
+ if (type === "number") {
12097
+ const value = Number(raw);
12098
+ return raw.trim() !== "" && Number.isFinite(value) ? value : raw;
12099
+ }
12100
+ if (type === "boolean") {
12101
+ if (/^(true|1)$/i.test(raw.trim())) return true;
12102
+ if (/^(false|0|)$/i.test(raw.trim())) return false;
12103
+ return raw;
12104
+ }
12105
+ if (type === "json") {
12106
+ try {
12107
+ return JSON.parse(raw);
12108
+ } catch {
12109
+ return raw;
12110
+ }
12111
+ }
12112
+ return raw;
12113
+ }
12114
+ function prepareEnv(env2) {
12115
+ const normalized = normalizeResolvedEnv(env2);
12116
+ const runtime3 = env2.runtime?.server;
12117
+ if (!isRecord4(runtime3) || Object.keys(runtime3).length === 0) return normalized;
12118
+ const prepared = { server: { ...normalized.server }, public: normalized.public };
12119
+ Object.defineProperty(prepared, FARM_ENV_RUNTIME_SYMBOL, {
12120
+ value: {
12121
+ pending: { ...runtime3 },
12122
+ warned: /* @__PURE__ */ new Set()
12123
+ },
12124
+ enumerable: false
12125
+ });
12126
+ return prepared;
12043
12127
  }
12044
12128
  function assertServerEnvAccess() {
12045
12129
  if (typeof window !== "undefined") {
@@ -12068,7 +12152,7 @@ function getCurrentEnv() {
12068
12152
  function getInjectedEnv() {
12069
12153
  try {
12070
12154
  if (typeof __FARM_ENV__ !== "undefined" && __FARM_ENV__) {
12071
- return normalizeResolvedEnv(__FARM_ENV__);
12155
+ return prepareEnv(__FARM_ENV__);
12072
12156
  }
12073
12157
  } catch {
12074
12158
  }
@@ -12098,14 +12182,16 @@ function getProcessEnv() {
12098
12182
  }
12099
12183
  return {};
12100
12184
  }
12101
- var FARM_ENV_SYMBOL, farmEnvGlobal, currentEnv, env, publicEnv;
12185
+ var FARM_ENV_SYMBOL, FARM_ENV_RUNTIME_SYMBOL, farmEnvGlobal, currentEnv, env, publicEnv;
12102
12186
  var init_env = __esm({
12103
12187
  "src/env.ts"() {
12104
12188
  "use strict";
12105
12189
  FARM_ENV_SYMBOL = /* @__PURE__ */ Symbol.for("farm.env");
12190
+ FARM_ENV_RUNTIME_SYMBOL = /* @__PURE__ */ Symbol.for("farm.env.runtime");
12106
12191
  farmEnvGlobal = globalThis;
12107
12192
  currentEnv = getInitialEnv();
12108
12193
  __name(resolveEnv, "resolveEnv");
12194
+ __name(createBundledEnv, "createBundledEnv");
12109
12195
  __name(setEnv, "setEnv");
12110
12196
  __name(getResolvedEnv, "getResolvedEnv");
12111
12197
  env = createEnvProxy("server");
@@ -12114,6 +12200,11 @@ var init_env = __esm({
12114
12200
  __name(parseEnvValue, "parseEnvValue");
12115
12201
  __name(createEnvProxy, "createEnvProxy");
12116
12202
  __name(getEnvScope, "getEnvScope");
12203
+ __name(readServerEnvKey, "readServerEnvKey");
12204
+ __name(readRuntimeServerEnv, "readRuntimeServerEnv");
12205
+ __name(getRuntimeEnvType, "getRuntimeEnvType");
12206
+ __name(coerceRuntimeEnvValue, "coerceRuntimeEnvValue");
12207
+ __name(prepareEnv, "prepareEnv");
12117
12208
  __name(assertServerEnvAccess, "assertServerEnvAccess");
12118
12209
  __name(getInitialEnv, "getInitialEnv");
12119
12210
  __name(getCurrentEnv, "getCurrentEnv");
@@ -23836,9 +23927,10 @@ function collectIsolatedClientBoundaries(ownerPath, root, options = {}) {
23836
23927
  const importedBindings = getStaticImportBindings(content);
23837
23928
  let estimatedBoundaryCount2 = 0;
23838
23929
  for (const specifier of new Set(getImportSpecifiers(content))) {
23839
- const importedPath = resolveImportedModuleSourcePath(moduleSourcePath, specifier, root);
23930
+ const imported = resolveImportedModule(moduleSourcePath, specifier, root);
23931
+ const importedPath = imported.path;
23840
23932
  if (!importedPath) continue;
23841
- if (!specifier.startsWith(".") && !specifier.startsWith("/")) {
23933
+ if (!imported.local) {
23842
23934
  const packageMetadata = inspectPackageClientBoundary(importedPath, root, /* @__PURE__ */ new Set());
23843
23935
  if (packageMetadata.shouldHydrate) {
23844
23936
  if (options.staticPackageBoundaries) {
@@ -23907,8 +23999,8 @@ function inspectClientModuleMetadata(resolvedPath, root, visited, inspectIslandE
23907
23999
  let importsClientBoundary = false;
23908
24000
  let importedIslandStrategy = null;
23909
24001
  for (const specifier of getImportSpecifiers(content)) {
23910
- const importedPath = resolveImportedModuleSourcePath(resolvedPath, specifier, root);
23911
- const importedMetadata = !specifier.startsWith(".") && !specifier.startsWith("/") ? inspectPackageClientBoundary(importedPath, root, visited) : inspectClientModuleMetadata(importedPath, root, visited, false);
24002
+ const imported = resolveImportedModule(resolvedPath, specifier, root);
24003
+ const importedMetadata = imported.local ? inspectClientModuleMetadata(imported.path, root, visited, false) : inspectPackageClientBoundary(imported.path, root, visited);
23912
24004
  if (importedMetadata.isClientComponent || importedMetadata.shouldHydrate) {
23913
24005
  importsClientBoundary = true;
23914
24006
  if (importedIslandStrategy === null) {
@@ -24037,6 +24129,171 @@ function isTypeOnlyNamedClause(tokens, startIndex, endIndex) {
24037
24129
  return true;
24038
24130
  }
24039
24131
  __name(isTypeOnlyNamedClause, "isTypeOnlyNamedClause");
24132
+ function resolveImportedModule(importerPath, specifier, root) {
24133
+ if (specifier.startsWith(".") || specifier.startsWith("/")) {
24134
+ return { path: resolveImportedModuleSourcePath(importerPath, specifier, root), local: true };
24135
+ }
24136
+ const aliased = resolveProjectAliasSourcePath(specifier, root);
24137
+ if (aliased !== void 0) return { path: aliased, local: true };
24138
+ return { path: resolvePackageModuleSourcePath(importerPath, specifier, root), local: false };
24139
+ }
24140
+ __name(resolveImportedModule, "resolveImportedModule");
24141
+ var projectImportAliasCache = /* @__PURE__ */ new Map();
24142
+ var PROJECT_ALIAS_FILES = ["tsconfig.json", "jsconfig.json", "package.json"];
24143
+ function resolveProjectAliasSourcePath(specifier, root) {
24144
+ if (!root) return void 0;
24145
+ const projectRoot = import_path4.default.resolve(root);
24146
+ let match;
24147
+ for (const alias of getProjectImportAliases(projectRoot)) {
24148
+ const captured = matchProjectImportAlias(alias, specifier);
24149
+ if (captured === null) continue;
24150
+ if (!match || alias.prefix.length > match.alias.prefix.length) match = { alias, captured };
24151
+ }
24152
+ if (!match) return void 0;
24153
+ return resolveSourceCandidate(
24154
+ match.alias.targets.map(
24155
+ (target) => import_path4.default.normalize(match.alias.wildcard ? target.replace("*", match.captured) : target)
24156
+ )
24157
+ );
24158
+ }
24159
+ __name(resolveProjectAliasSourcePath, "resolveProjectAliasSourcePath");
24160
+ function matchProjectImportAlias(alias, specifier) {
24161
+ if (!alias.wildcard) return specifier === alias.prefix ? "" : null;
24162
+ if (specifier.length < alias.prefix.length + alias.suffix.length || !specifier.startsWith(alias.prefix) || !specifier.endsWith(alias.suffix)) {
24163
+ return null;
24164
+ }
24165
+ return specifier.slice(alias.prefix.length, specifier.length - alias.suffix.length);
24166
+ }
24167
+ __name(matchProjectImportAlias, "matchProjectImportAlias");
24168
+ function getProjectImportAliases(projectRoot) {
24169
+ const stamp = PROJECT_ALIAS_FILES.map((file) => {
24170
+ try {
24171
+ return String(import_fs2.default.statSync(import_path4.default.join(projectRoot, file)).mtimeMs);
24172
+ } catch {
24173
+ return "-";
24174
+ }
24175
+ }).join(":");
24176
+ const cached = projectImportAliasCache.get(projectRoot);
24177
+ if (cached?.stamp === stamp) return cached.aliases;
24178
+ const aliases = [
24179
+ ...readTsconfigPathAliases(projectRoot),
24180
+ ...readPackageImportAliases(projectRoot)
24181
+ ];
24182
+ if (!aliases.some((alias) => alias.prefix === "@/")) {
24183
+ aliases.push({
24184
+ prefix: "@/",
24185
+ suffix: "",
24186
+ wildcard: true,
24187
+ targets: [import_path4.default.join(projectRoot, "src", "*")]
24188
+ });
24189
+ }
24190
+ projectImportAliasCache.set(projectRoot, { stamp, aliases });
24191
+ return aliases;
24192
+ }
24193
+ __name(getProjectImportAliases, "getProjectImportAliases");
24194
+ function readTsconfigPathAliases(projectRoot) {
24195
+ for (const name2 of ["tsconfig.json", "jsconfig.json"]) {
24196
+ const configPath = import_path4.default.join(projectRoot, name2);
24197
+ if (!import_fs2.default.existsSync(configPath)) continue;
24198
+ const resolved = readTsconfigPaths(configPath, /* @__PURE__ */ new Set());
24199
+ if (!resolved?.paths) return [];
24200
+ const base = resolved.baseUrl ?? resolved.pathsDirectory;
24201
+ return Object.entries(resolved.paths).flatMap(([pattern, targets]) => {
24202
+ if (!Array.isArray(targets)) return [];
24203
+ const wildcardIndex = pattern.indexOf("*");
24204
+ return [
24205
+ {
24206
+ prefix: wildcardIndex === -1 ? pattern : pattern.slice(0, wildcardIndex),
24207
+ suffix: wildcardIndex === -1 ? "" : pattern.slice(wildcardIndex + 1),
24208
+ wildcard: wildcardIndex !== -1,
24209
+ targets: targets.filter((target) => typeof target === "string").map((target) => import_path4.default.resolve(base, target))
24210
+ }
24211
+ ];
24212
+ });
24213
+ }
24214
+ return [];
24215
+ }
24216
+ __name(readTsconfigPathAliases, "readTsconfigPathAliases");
24217
+ function readTsconfigPaths(configPath, visited) {
24218
+ if (visited.has(configPath)) return null;
24219
+ visited.add(configPath);
24220
+ const config = readJsonWithComments(configPath);
24221
+ if (!config) return null;
24222
+ const directory = import_path4.default.dirname(configPath);
24223
+ const parents = (Array.isArray(config.extends) ? config.extends : [config.extends]).filter(
24224
+ (parent) => typeof parent === "string" && parent.startsWith(".")
24225
+ );
24226
+ let inherited = null;
24227
+ for (const parent of parents) {
24228
+ const parentPath = import_path4.default.resolve(
24229
+ directory,
24230
+ parent.endsWith(".json") ? parent : `${parent}.json`
24231
+ );
24232
+ inherited = readTsconfigPaths(parentPath, visited) ?? inherited;
24233
+ }
24234
+ const options = config.compilerOptions ?? {};
24235
+ const baseUrl = typeof options.baseUrl === "string" ? import_path4.default.resolve(directory, options.baseUrl) : inherited?.baseUrl;
24236
+ if (options.paths && typeof options.paths === "object") {
24237
+ return { paths: options.paths, pathsDirectory: directory, baseUrl };
24238
+ }
24239
+ return inherited ? { ...inherited, baseUrl } : { pathsDirectory: directory, baseUrl };
24240
+ }
24241
+ __name(readTsconfigPaths, "readTsconfigPaths");
24242
+ function readPackageImportAliases(projectRoot) {
24243
+ const imports = readPackageJson(import_path4.default.join(projectRoot, "package.json"))?.imports;
24244
+ if (!imports || typeof imports !== "object") return [];
24245
+ return Object.entries(imports).flatMap(([pattern, value]) => {
24246
+ const target = resolveConditionalExportTarget(value);
24247
+ if (!pattern.startsWith("#") || !target?.startsWith("./")) return [];
24248
+ const wildcardIndex = pattern.indexOf("*");
24249
+ return [
24250
+ {
24251
+ prefix: wildcardIndex === -1 ? pattern : pattern.slice(0, wildcardIndex),
24252
+ suffix: wildcardIndex === -1 ? "" : pattern.slice(wildcardIndex + 1),
24253
+ wildcard: wildcardIndex !== -1,
24254
+ targets: [import_path4.default.resolve(projectRoot, target)]
24255
+ }
24256
+ ];
24257
+ });
24258
+ }
24259
+ __name(readPackageImportAliases, "readPackageImportAliases");
24260
+ function readJsonWithComments(filePath) {
24261
+ let source;
24262
+ try {
24263
+ source = import_fs2.default.readFileSync(filePath, "utf8");
24264
+ } catch {
24265
+ return null;
24266
+ }
24267
+ let output = "";
24268
+ let inString = false;
24269
+ for (let index = 0; index < source.length; index++) {
24270
+ const char = source[index];
24271
+ if (inString) {
24272
+ output += char;
24273
+ if (char === "\\") output += source[++index] ?? "";
24274
+ else if (char === '"') inString = false;
24275
+ continue;
24276
+ }
24277
+ if (char === '"') {
24278
+ inString = true;
24279
+ output += char;
24280
+ } else if (char === "/" && source[index + 1] === "/") {
24281
+ while (index < source.length && source[index] !== "\n") index++;
24282
+ output += "\n";
24283
+ } else if (char === "/" && source[index + 1] === "*") {
24284
+ const end = source.indexOf("*/", index + 2);
24285
+ index = end === -1 ? source.length : end + 1;
24286
+ } else {
24287
+ output += char;
24288
+ }
24289
+ }
24290
+ try {
24291
+ return JSON.parse(output.replace(/,(\s*[}\]])/g, "$1"));
24292
+ } catch {
24293
+ return null;
24294
+ }
24295
+ }
24296
+ __name(readJsonWithComments, "readJsonWithComments");
24040
24297
  function resolveImportedModuleSourcePath(importerPath, specifier, root) {
24041
24298
  if (!specifier.startsWith(".") && !specifier.startsWith("/")) {
24042
24299
  return resolvePackageModuleSourcePath(importerPath, specifier, root);
@@ -29503,7 +29760,7 @@ _setFarmThemeServerSnapshotResolver(() => {
29503
29760
  });
29504
29761
 
29505
29762
  // package.json
29506
- var version = "0.1.14";
29763
+ var version = "0.1.16";
29507
29764
 
29508
29765
  // src/version.ts
29509
29766
  var FARM_VERSION = version;
@@ -32472,6 +32729,7 @@ function createFarmApp(config, viteServer) {
32472
32729
  __name(createFarmApp, "createFarmApp");
32473
32730
 
32474
32731
  // src/vite.ts
32732
+ init_env();
32475
32733
  init_utils();
32476
32734
 
32477
32735
  // src/plugin.ts
@@ -38434,7 +38692,7 @@ function getEnvDefines(config, configEnv) {
38434
38692
  )
38435
38693
  };
38436
38694
  if (configEnv?.isSsrBuild) {
38437
- defines.__FARM_ENV__ = JSON.stringify(getFullEnvDefine(config));
38695
+ defines.__FARM_ENV__ = JSON.stringify(createBundledEnv(getFullEnvDefine(config)));
38438
38696
  }
38439
38697
  return defines;
38440
38698
  }
@@ -42865,8 +43123,46 @@ init_server_action_security();
42865
43123
  init_server_action_security();
42866
43124
  init_cache();
42867
43125
  init_server_fn_error();
43126
+ init_navigation_errors();
42868
43127
  init_server_fn_error();
42869
43128
  var FARM_SERVER_FN_SYMBOL = /* @__PURE__ */ Symbol.for("farm.server-fn");
43129
+ var FARM_SERVER_FUNCTION_DESCRIPTOR = /* @__PURE__ */ Symbol.for("farm.server-function.descriptor");
43130
+ var _ServerFnInputError = class _ServerFnInputError extends Error {
43131
+ constructor(cause) {
43132
+ super("Server function input is invalid");
43133
+ this.cause = cause;
43134
+ }
43135
+ };
43136
+ __name(_ServerFnInputError, "ServerFnInputError");
43137
+ var ServerFnInputError = _ServerFnInputError;
43138
+ function createServerFunctionDescriptor(kind, options, run) {
43139
+ return Object.freeze({
43140
+ kind,
43141
+ input: options.input,
43142
+ output: options.output,
43143
+ mcp: options.mcp === void 0 ? void 0 : Object.freeze({ ...options.mcp }),
43144
+ run
43145
+ });
43146
+ }
43147
+ __name(createServerFunctionDescriptor, "createServerFunctionDescriptor");
43148
+ function _attachServerFunctionDescriptor(target, descriptor) {
43149
+ Object.defineProperty(target, FARM_SERVER_FUNCTION_DESCRIPTOR, {
43150
+ value: descriptor,
43151
+ enumerable: false
43152
+ });
43153
+ }
43154
+ __name(_attachServerFunctionDescriptor, "_attachServerFunctionDescriptor");
43155
+ function getServerFunctionRunner(value) {
43156
+ if (typeof value !== "function") return void 0;
43157
+ return value[FARM_SERVER_FUNCTION_DESCRIPTOR];
43158
+ }
43159
+ __name(getServerFunctionRunner, "getServerFunctionRunner");
43160
+ function _runServerFunctionForCaller(value, input) {
43161
+ const runner = getServerFunctionRunner(value);
43162
+ if (!runner) throw new TypeError("Expected a function created with createServerFn");
43163
+ return runner.run(input);
43164
+ }
43165
+ __name(_runServerFunctionForCaller, "_runServerFunctionForCaller");
42870
43166
  var UNSAFE_FORM_KEYS = /* @__PURE__ */ new Set(["__proto__", "constructor", "prototype"]);
42871
43167
  function createServerFn(options) {
42872
43168
  if (!options || typeof options.handler !== "function") {
@@ -42875,10 +43171,15 @@ function createServerFn(options) {
42875
43171
  const middleware = resolveServerFnMiddleware(options.middleware);
42876
43172
  const errors = normalizeServerFnErrors(options.errors);
42877
43173
  const error = createServerFnErrorHandler(errors);
42878
- const serverFn = /* @__PURE__ */ __name(async (value) => {
43174
+ const run = /* @__PURE__ */ __name(async (value, labelInputErrors) => {
42879
43175
  const formData = isFormData(value) ? value : void 0;
42880
43176
  const rawInput = formData ? formDataToObject2(formData) : value;
42881
- const input = await _parseServerFnSchema(options.input, rawInput, "input");
43177
+ let input;
43178
+ try {
43179
+ input = await _parseServerFnSchema(options.input, rawInput, "input");
43180
+ } catch (cause) {
43181
+ throw labelInputErrors ? new ServerFnInputError(cause) : cause;
43182
+ }
42882
43183
  const executionContext = getServerActionExecutionContext();
42883
43184
  const request2 = executionContext?.request ?? _resolveCurrentRequest();
42884
43185
  const signal = executionContext?.signal ?? request2?.signal ?? getServerActionSignal();
@@ -42904,7 +43205,8 @@ function createServerFn(options) {
42904
43205
  await applyFarmCacheInvalidationTargets(declaration);
42905
43206
  }
42906
43207
  return parsedResult;
42907
- }, "serverFn");
43208
+ }, "run");
43209
+ const serverFn = /* @__PURE__ */ __name((value) => run(value, false), "serverFn");
42908
43210
  Object.defineProperties(serverFn, {
42909
43211
  [FARM_SERVER_FN_SYMBOL]: {
42910
43212
  value: true,
@@ -42935,6 +43237,10 @@ function createServerFn(options) {
42935
43237
  enumerable: false
42936
43238
  }
42937
43239
  });
43240
+ _attachServerFunctionDescriptor(
43241
+ serverFn,
43242
+ createServerFunctionDescriptor("action", options, (value) => run(value, true))
43243
+ );
42938
43244
  return serverFn;
42939
43245
  }
42940
43246
  __name(createServerFn, "createServerFn");
@@ -43211,6 +43517,16 @@ function createServerQuery(options) {
43211
43517
  enumerable: false
43212
43518
  }
43213
43519
  });
43520
+ _attachServerFunctionDescriptor(
43521
+ query,
43522
+ createServerFunctionDescriptor("query", options, async (value) => {
43523
+ const result = await _runServerFunctionForCaller(
43524
+ execute,
43525
+ value
43526
+ );
43527
+ return result.data;
43528
+ })
43529
+ );
43214
43530
  return query;
43215
43531
  }
43216
43532
  __name(createServerQuery, "createServerQuery");
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-B3nVSjen.mjs';
2
- import { w as FarmConfig } from './client-plugins-C1EgdoJM.mjs';
3
- export { A as AppRoutePattern, a3 as BuildOptions, X as ErrorBoundary, O as ErrorProps, h as FarmAppContext, z as FarmComponentType, t as FarmContextFactory, I as FarmContextFactoryInput, J as FarmIsolatedClientHydrationMode, a8 as FarmLayerEntry, ac as FarmLayerResolution, D as FarmMigrationCommand, E as FarmMigrationsConfig, G as FarmMigrationsUserConfig, b as FarmRequest, c as FarmResponse, aa as FarmSourceRoot, $ as GenerateStaticParams, V as Layout, T as LayoutMetadataProps, a0 as LayoutModule, L as LayoutProps, W as Loading, K as LoadingProps, M as Metadata, a1 as MetadataJsonLd, S as MetadataProps, a7 as MetadataRobots, a6 as MetadataRobotsDirectives, u as MiddlewareProps, N as NitroPreset, U as Page, i as PageProps, Q as PagePropsWithMiddleware, C as PageRouteParams, P as ParsedRoute, j as PluginContextProps, ab as ResolveFarmLayersOptions, a9 as ResolvedFarmLayer, H as ResolvedFarmMigrationsConfig, k as RouteModule, R as RouteSegment, a5 as SSGCollectionResult, a4 as SSGPage, a2 as ServerAction, Z as StaticPathParams, Y as StaticPathPrimitive, _ as StaticRouteParams, ah as createFarmConfigResolutionPlugin, y as defineConfig, x as farmPlugin, af as getFarmAppDirectories, ag as getFarmLayerAliases, ae as getFarmSourceRoots, ai as loadFarmConfigFile, ad as resolveFarmLayers } from './client-plugins-C1EgdoJM.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-DR2wfZAn.mjs';
1
+ export { F as FarmApp, R as RouteManager, S as ServerRenderer, c as createFarmApp } from './app-CYPHeOo_.mjs';
2
+ import { w as FarmConfig } from './client-plugins-CIPRtSsW.mjs';
3
+ export { A as AppRoutePattern, a3 as BuildOptions, X as ErrorBoundary, O as ErrorProps, h as FarmAppContext, z as FarmComponentType, t as FarmContextFactory, I as FarmContextFactoryInput, J as FarmIsolatedClientHydrationMode, a8 as FarmLayerEntry, ac as FarmLayerResolution, D as FarmMigrationCommand, E as FarmMigrationsConfig, G as FarmMigrationsUserConfig, b as FarmRequest, c as FarmResponse, aa as FarmSourceRoot, $ as GenerateStaticParams, V as Layout, T as LayoutMetadataProps, a0 as LayoutModule, L as LayoutProps, W as Loading, K as LoadingProps, M as Metadata, a1 as MetadataJsonLd, S as MetadataProps, a7 as MetadataRobots, a6 as MetadataRobotsDirectives, u as MiddlewareProps, N as NitroPreset, U as Page, i as PageProps, Q as PagePropsWithMiddleware, C as PageRouteParams, P as ParsedRoute, j as PluginContextProps, ab as ResolveFarmLayersOptions, a9 as ResolvedFarmLayer, H as ResolvedFarmMigrationsConfig, k as RouteModule, R as RouteSegment, a5 as SSGCollectionResult, a4 as SSGPage, a2 as ServerAction, Z as StaticPathParams, Y as StaticPathPrimitive, _ as StaticRouteParams, ah as createFarmConfigResolutionPlugin, y as defineConfig, x as farmPlugin, af as getFarmAppDirectories, ag as getFarmLayerAliases, ae as getFarmSourceRoots, ai as loadFarmConfigFile, ad as resolveFarmLayers } from './client-plugins-CIPRtSsW.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-5kQP1mFR.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-Blh_f7Z3.mjs';
11
+ export { g as getCurrentRequest } from './request-DZkHYQ89.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';
@@ -26,10 +26,11 @@ import './routes.mjs';
26
26
  import 'react';
27
27
  import './server-fn.mjs';
28
28
  import './server-fn-error-DDh14a0V.mjs';
29
+ import './endpoint-Bu3XgeMK.mjs';
29
30
  import './renderer.mjs';
30
31
  import './deployment.mjs';
31
32
  import './lifecycle-DK06VuKP.mjs';
32
- import './route-C6UClI1z.mjs';
33
+ import './route-C_eLaFTZ.mjs';
33
34
  import 'http';
34
35
  import './schema.mjs';
35
36
  import './integration-api-BbaiokCC.mjs';
@@ -42,8 +43,8 @@ import 'esbuild';
42
43
  import './types-DQnyD3VD.mjs';
43
44
  import './font.mjs';
44
45
  import './island-CfGru1MO.mjs';
45
- import './metadata-B1bxCPUY.mjs';
46
- import './render-plan-CNUlzylR.mjs';
46
+ import './metadata-OMX6wFNf.mjs';
47
+ import './render-plan-io7pvDNc.mjs';
47
48
  import './runtime-AOJge4vQ.mjs';
48
49
  import './resolver-DhW0CqZN.mjs';
49
50
 
package/dist/server.d.ts CHANGED
@@ -1,14 +1,14 @@
1
- export { F as FarmApp, R as RouteManager, S as ServerRenderer, c as createFarmApp } from './app-wIYse61b.js';
2
- import { w as FarmConfig } from './client-plugins-CslwYp3E.js';
3
- export { A as AppRoutePattern, a3 as BuildOptions, X as ErrorBoundary, O as ErrorProps, h as FarmAppContext, z as FarmComponentType, t as FarmContextFactory, I as FarmContextFactoryInput, J as FarmIsolatedClientHydrationMode, a8 as FarmLayerEntry, ac as FarmLayerResolution, D as FarmMigrationCommand, E as FarmMigrationsConfig, G as FarmMigrationsUserConfig, b as FarmRequest, c as FarmResponse, aa as FarmSourceRoot, $ as GenerateStaticParams, V as Layout, T as LayoutMetadataProps, a0 as LayoutModule, L as LayoutProps, W as Loading, K as LoadingProps, M as Metadata, a1 as MetadataJsonLd, S as MetadataProps, a7 as MetadataRobots, a6 as MetadataRobotsDirectives, u as MiddlewareProps, N as NitroPreset, U as Page, i as PageProps, Q as PagePropsWithMiddleware, C as PageRouteParams, P as ParsedRoute, j as PluginContextProps, ab as ResolveFarmLayersOptions, a9 as ResolvedFarmLayer, H as ResolvedFarmMigrationsConfig, k as RouteModule, R as RouteSegment, a5 as SSGCollectionResult, a4 as SSGPage, a2 as ServerAction, Z as StaticPathParams, Y as StaticPathPrimitive, _ as StaticRouteParams, ah as createFarmConfigResolutionPlugin, y as defineConfig, x as farmPlugin, af as getFarmAppDirectories, ag as getFarmLayerAliases, ae as getFarmSourceRoots, ai as loadFarmConfigFile, ad as resolveFarmLayers } from './client-plugins-CslwYp3E.js';
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-jISOE9SD.js';
1
+ export { F as FarmApp, R as RouteManager, S as ServerRenderer, c as createFarmApp } from './app-AyjEsCBq.js';
2
+ import { w as FarmConfig } from './client-plugins-CqVtZi5X.js';
3
+ export { A as AppRoutePattern, a3 as BuildOptions, X as ErrorBoundary, O as ErrorProps, h as FarmAppContext, z as FarmComponentType, t as FarmContextFactory, I as FarmContextFactoryInput, J as FarmIsolatedClientHydrationMode, a8 as FarmLayerEntry, ac as FarmLayerResolution, D as FarmMigrationCommand, E as FarmMigrationsConfig, G as FarmMigrationsUserConfig, b as FarmRequest, c as FarmResponse, aa as FarmSourceRoot, $ as GenerateStaticParams, V as Layout, T as LayoutMetadataProps, a0 as LayoutModule, L as LayoutProps, W as Loading, K as LoadingProps, M as Metadata, a1 as MetadataJsonLd, S as MetadataProps, a7 as MetadataRobots, a6 as MetadataRobotsDirectives, u as MiddlewareProps, N as NitroPreset, U as Page, i as PageProps, Q as PagePropsWithMiddleware, C as PageRouteParams, P as ParsedRoute, j as PluginContextProps, ab as ResolveFarmLayersOptions, a9 as ResolvedFarmLayer, H as ResolvedFarmMigrationsConfig, k as RouteModule, R as RouteSegment, a5 as SSGCollectionResult, a4 as SSGPage, a2 as ServerAction, Z as StaticPathParams, Y as StaticPathPrimitive, _ as StaticRouteParams, ah as createFarmConfigResolutionPlugin, y as defineConfig, x as farmPlugin, af as getFarmAppDirectories, ag as getFarmLayerAliases, ae as getFarmSourceRoots, ai as loadFarmConfigFile, ad as resolveFarmLayers } from './client-plugins-CqVtZi5X.js';
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-C4yrAhNc.js';
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.js';
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.js';
7
7
  export { AfterCallback, FarmAfterPlatformContext, _runWithAfterNodeResponse, _runWithAfterRequest, _withAfterNodeMiddleware, after } from './after.js';
8
8
  export { FARM_SERVER_QUERY_SYMBOL, ServerQuery, ServerQueryKey, ServerQueryOptions, ServerQueryOutputOptions, ServerQueryStaleTime, createServerQuery } from './server-query.js';
9
9
  import { ViteDevServer } from 'vite';
10
10
  import './types-Z0aotQ8w.js';
11
- export { g as getCurrentRequest } from './request-DsVSQVfD.js';
11
+ export { g as getCurrentRequest } from './request-G8JhKr4F.js';
12
12
  import { ServerResponse } from 'node:http';
13
13
  export { getTheme, getThemeSnapshot } from './theme/server.js';
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.js';
@@ -26,10 +26,11 @@ import './routes.js';
26
26
  import 'react';
27
27
  import './server-fn.js';
28
28
  import './server-fn-error-DDh14a0V.js';
29
+ import './endpoint-kSAxE52R.js';
29
30
  import './renderer.js';
30
31
  import './deployment.js';
31
32
  import './lifecycle-DK06VuKP.js';
32
- import './route-CHBaW55F.js';
33
+ import './route-BxNJT447.js';
33
34
  import 'http';
34
35
  import './schema.js';
35
36
  import './integration-api-BbaiokCC.js';
@@ -42,8 +43,8 @@ import 'esbuild';
42
43
  import './types-DQnyD3VD.js';
43
44
  import './font.js';
44
45
  import './island-CfGru1MO.js';
45
- import './metadata-BsUcOEXg.js';
46
- import './render-plan-EG4hNFjy.js';
46
+ import './metadata-8g__AMPM.js';
47
+ import './render-plan-Be4ZGTJP.js';
47
48
  import './runtime-BirxPwbZ.js';
48
49
  import './resolver-PPEeiJ6M.js';
49
50
 
package/dist/server.mjs CHANGED
@@ -10,12 +10,12 @@ import {
10
10
  import {
11
11
  FARM_SERVER_QUERY_SYMBOL,
12
12
  createServerQuery
13
- } from "./chunk-W7IVHTOP.mjs";
14
- import "./chunk-S3QW3BIS.mjs";
13
+ } from "./chunk-UQZPTIML.mjs";
14
+ import "./chunk-VVTREAG5.mjs";
15
15
  import {
16
16
  loadConfig,
17
17
  resolveConfig
18
- } from "./chunk-GNTPTTLA.mjs";
18
+ } from "./chunk-IXTEENRS.mjs";
19
19
  import "./chunk-XZNTNMHT.mjs";
20
20
  import {
21
21
  loadFarmInstrumentation,
@@ -40,7 +40,7 @@ import {
40
40
  farmPlugin,
41
41
  farmServerOnlyEntriesPlugin,
42
42
  mergeFarmViteConfig
43
- } from "./chunk-J2F5LFQ2.mjs";
43
+ } from "./chunk-NHHKW2T6.mjs";
44
44
  import "./chunk-27JNCYEK.mjs";
45
45
  import {
46
46
  readSchemaTables
@@ -96,7 +96,7 @@ import {
96
96
  sanitizeServerActionError,
97
97
  validateServerActionRequest
98
98
  } from "./chunk-QCFFHV5H.mjs";
99
- import "./chunk-FOGLGRDS.mjs";
99
+ import "./chunk-7HDZYYS4.mjs";
100
100
  import "./chunk-KATQ6I56.mjs";
101
101
  import "./chunk-LUC2FAGW.mjs";
102
102
  import "./chunk-FA2W42OV.mjs";
@@ -188,7 +188,7 @@ import {
188
188
  } from "./chunk-Z2RZJZIZ.mjs";
189
189
  import {
190
190
  FARM_VERSION
191
- } from "./chunk-DNCKVMSV.mjs";
191
+ } from "./chunk-IL5RWYK7.mjs";
192
192
  import "./chunk-54UPOYFS.mjs";
193
193
  import "./chunk-WNSDDRNU.mjs";
194
194
  import "./chunk-JPLUGGRV.mjs";
@@ -1,8 +1,8 @@
1
- import { M as Metadata } from './client-plugins-C1EgdoJM.mjs';
1
+ import { M as Metadata } from './client-plugins-CIPRtSsW.mjs';
2
2
  import { F as FarmClientPluginManager } from './lifecycle-DK06VuKP.mjs';
3
3
  import { F as FarmI18nClientSnapshot } from './types-Z0aotQ8w.mjs';
4
4
  import { F as FarmIslandStrategy } from './island-CfGru1MO.mjs';
5
- import { F as FarmRouteRenderPlan } from './render-plan-CNUlzylR.mjs';
5
+ import { F as FarmRouteRenderPlan } from './render-plan-io7pvDNc.mjs';
6
6
 
7
7
  type NavigationMetadata = (Metadata & Record<string, any>) | undefined;
8
8
 
@@ -1,8 +1,8 @@
1
- import { M as Metadata } from './client-plugins-CslwYp3E.js';
1
+ import { M as Metadata } from './client-plugins-CqVtZi5X.js';
2
2
  import { F as FarmClientPluginManager } from './lifecycle-DK06VuKP.js';
3
3
  import { F as FarmI18nClientSnapshot } from './types-Z0aotQ8w.js';
4
4
  import { F as FarmIslandStrategy } from './island-CfGru1MO.js';
5
- import { F as FarmRouteRenderPlan } from './render-plan-EG4hNFjy.js';
5
+ import { F as FarmRouteRenderPlan } from './render-plan-Be4ZGTJP.js';
6
6
 
7
7
  type NavigationMetadata = (Metadata & Record<string, any>) | undefined;
8
8