@farm.js/core 0.1.0-beta.42 → 0.1.0-beta.44
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/agent-runtime.d.mts +2 -1
- package/dist/agent-runtime.d.ts +2 -1
- package/dist/{app-DlrxySOB.d.ts → app-DyqYhh1o.d.ts} +3 -3
- package/dist/{app-8HI8Swuo.d.mts → app-WXv1CQZu.d.mts} +3 -3
- package/dist/app-markdown.d.mts +3 -2
- package/dist/app-markdown.d.ts +3 -2
- package/dist/{chunk-DKOIDET6.mjs → chunk-4MYKKWR4.mjs} +5 -5
- package/dist/{chunk-PSS353YX.mjs → chunk-BQWTEZSS.mjs} +2 -2
- package/dist/{chunk-HTRNPFDG.mjs → chunk-FY34HLY7.mjs} +2 -2
- package/dist/{chunk-HTRNPFDG.mjs.map → chunk-FY34HLY7.mjs.map} +1 -1
- package/dist/{chunk-47AWCMVP.mjs → chunk-LIIZPHDO.mjs} +5 -5
- package/dist/{chunk-LFCB4XH7.mjs → chunk-MYNLKNAW.mjs} +3 -3
- package/dist/{chunk-LFCB4XH7.mjs.map → chunk-MYNLKNAW.mjs.map} +1 -1
- package/dist/{chunk-74YTBPTY.mjs → chunk-TUYEGV7H.mjs} +58 -51
- package/dist/chunk-TUYEGV7H.mjs.map +1 -0
- package/dist/{chunk-U5DLXOFP.mjs → chunk-X4MNGHCU.mjs} +2 -2
- package/dist/client/lifecycle.mjs +2 -2
- package/dist/{client-plugins-D-8aRxvd.d.mts → client-plugins-DmcF3JHA.d.mts} +6 -1
- package/dist/{client-plugins-BRactCe8.d.ts → client-plugins-Dql9bGKX.d.ts} +6 -1
- package/dist/client-plugins.cjs +1 -1
- package/dist/client-plugins.cjs.map +1 -1
- package/dist/client-plugins.d.mts +2 -1
- package/dist/client-plugins.d.ts +2 -1
- package/dist/client-plugins.mjs +2 -2
- package/dist/client.cjs +1 -1
- package/dist/client.cjs.map +1 -1
- package/dist/client.d.mts +5 -4
- package/dist/client.d.ts +5 -4
- package/dist/client.mjs +2 -2
- package/dist/config.d.mts +2 -1
- package/dist/config.d.ts +2 -1
- package/dist/{devtools-7BTXCOMR.mjs → devtools-3MSKJ4TE.mjs} +3 -3
- package/dist/docs.cjs.map +1 -1
- package/dist/docs.mjs +3 -3
- package/dist/index.cjs +60 -53
- package/dist/index.cjs.map +1 -1
- package/dist/index.d.mts +10 -9
- package/dist/index.d.ts +10 -9
- package/dist/index.mjs +7 -7
- package/dist/integrations.d.mts +2 -1
- package/dist/integrations.d.ts +2 -1
- package/dist/internal/build-runtime.cjs +60 -53
- package/dist/internal/build-runtime.cjs.map +1 -1
- package/dist/internal/build-runtime.d.mts +4 -3
- package/dist/internal/build-runtime.d.ts +4 -3
- package/dist/internal/build-runtime.mjs +6 -6
- package/dist/internal/client-runtime.cjs +1 -1
- package/dist/internal/client-runtime.cjs.map +1 -1
- package/dist/internal/client-runtime.mjs +2 -2
- package/dist/internal/config-runtime.cjs +57 -51
- package/dist/internal/config-runtime.cjs.map +1 -1
- package/dist/internal/config-runtime.d.mts +3 -2
- package/dist/internal/config-runtime.d.ts +3 -2
- package/dist/internal/config-runtime.mjs +2 -2
- package/dist/internal/production-runtime.d.mts +6 -5
- package/dist/internal/production-runtime.d.ts +6 -5
- package/dist/{layers-VWVDTPUZ.mjs → layers-3ZHU4XTZ.mjs} +4 -2
- package/dist/{metadata-route-uuPEsBr_.d.ts → metadata-route-CW-GF0VH.d.ts} +1 -1
- package/dist/{metadata-route-S7IBCaqP.d.mts → metadata-route-Ca36AbOC.d.mts} +1 -1
- package/dist/middleware.d.mts +4 -3
- package/dist/middleware.d.ts +4 -3
- package/dist/plugin.cjs +1 -1
- package/dist/plugin.cjs.map +1 -1
- package/dist/plugin.d.mts +2 -1
- package/dist/plugin.d.ts +2 -1
- package/dist/plugin.mjs +3 -3
- package/dist/{production-runtime-FLWrk1jo.d.mts → production-runtime-DrDv5Hi7.d.mts} +1 -1
- package/dist/{production-runtime-IykJPKRq.d.ts → production-runtime-GmvKFKZ8.d.ts} +1 -1
- package/dist/{render-plan-BMoKOFRz.d.ts → render-plan-C8_69TW3.d.ts} +1 -1
- package/dist/{render-plan-CX71vuj8.d.mts → render-plan-CgTOoLZt.d.mts} +1 -1
- package/dist/renderer-client.d.mts +4 -3
- package/dist/renderer-client.d.ts +4 -3
- package/dist/{request-CAMDBxAg.d.mts → request-CgBjM2bH.d.mts} +1 -1
- package/dist/{request-BnGpxWVL.d.ts → request-Dfjl5DZU.d.ts} +1 -1
- package/dist/request.d.mts +3 -2
- package/dist/request.d.ts +3 -2
- package/dist/routes.d.mts +2 -1
- package/dist/routes.d.ts +2 -1
- package/dist/server-plugins.d.mts +3 -2
- package/dist/server-plugins.d.ts +3 -2
- package/dist/server.cjs +62 -53
- package/dist/server.cjs.map +1 -1
- package/dist/server.d.mts +8 -7
- package/dist/server.d.ts +8 -7
- package/dist/server.mjs +6 -4
- package/dist/server.mjs.map +1 -1
- package/dist/{spa-router-BmBW0Uxs.d.mts → spa-router-BD7iUG-C.d.mts} +1 -1
- package/dist/{spa-router-DjGIPGr0.d.ts → spa-router-swFKTqwR.d.ts} +1 -1
- package/dist/testing.d.mts +2 -1
- package/dist/testing.d.ts +2 -1
- package/dist/{utils-DA9em9mF.d.mts → utils-CjZRiq-l.d.mts} +1 -1
- package/dist/{utils-BKFacUoB.d.ts → utils-_LOF-V9f.d.ts} +1 -1
- package/dist/version.cjs +1 -1
- package/dist/version.cjs.map +1 -1
- package/dist/version.mjs +1 -1
- package/dist/vite.cjs +59 -52
- package/dist/vite.cjs.map +1 -1
- package/dist/vite.d.mts +2 -1
- package/dist/vite.d.ts +2 -1
- package/dist/vite.mjs +3 -3
- package/package.json +3 -3
- package/dist/chunk-74YTBPTY.mjs.map +0 -1
- /package/dist/{chunk-DKOIDET6.mjs.map → chunk-4MYKKWR4.mjs.map} +0 -0
- /package/dist/{chunk-PSS353YX.mjs.map → chunk-BQWTEZSS.mjs.map} +0 -0
- /package/dist/{chunk-47AWCMVP.mjs.map → chunk-LIIZPHDO.mjs.map} +0 -0
- /package/dist/{chunk-U5DLXOFP.mjs.map → chunk-X4MNGHCU.mjs.map} +0 -0
- /package/dist/{devtools-7BTXCOMR.mjs.map → devtools-3MSKJ4TE.mjs.map} +0 -0
- /package/dist/{layers-VWVDTPUZ.mjs.map → layers-3ZHU4XTZ.mjs.map} +0 -0
|
@@ -141,11 +141,65 @@ function getFarmLayerAliases(layers) {
|
|
|
141
141
|
);
|
|
142
142
|
}
|
|
143
143
|
__name(getFarmLayerAliases, "getFarmLayerAliases");
|
|
144
|
+
var WINDOWS_ABSOLUTE_PATH_RE = /^(?:[A-Za-z]:[\\/]|\\\\)/;
|
|
145
|
+
function createFarmConfigResolutionPlugin(options) {
|
|
146
|
+
const configEntryChecks = /* @__PURE__ */ new Map();
|
|
147
|
+
return {
|
|
148
|
+
name: "farm-config-package-resolution",
|
|
149
|
+
setup(pluginBuild) {
|
|
150
|
+
pluginBuild.onResolve({ filter: /^@farm\.js\/core$/ }, async (args) => {
|
|
151
|
+
if (args.pluginData?.farmConfigExternal || args.kind !== "import-statement" || !args.importer) {
|
|
152
|
+
return;
|
|
153
|
+
}
|
|
154
|
+
let configEntryCheck = configEntryChecks.get(args.importer);
|
|
155
|
+
if (!configEntryCheck) {
|
|
156
|
+
configEntryCheck = onlyImportsFarmConfigHelpers(args.importer, options.transform);
|
|
157
|
+
configEntryChecks.set(args.importer, configEntryCheck);
|
|
158
|
+
}
|
|
159
|
+
if (!await configEntryCheck) return;
|
|
160
|
+
const resolved = await pluginBuild.resolve(FARM_CONFIG_ENTRY, {
|
|
161
|
+
importer: args.importer,
|
|
162
|
+
kind: args.kind,
|
|
163
|
+
namespace: args.namespace,
|
|
164
|
+
resolveDir: args.resolveDir,
|
|
165
|
+
pluginData: { farmConfigExternal: true }
|
|
166
|
+
});
|
|
167
|
+
if (resolved.errors.length > 0 || !resolved.path) return;
|
|
168
|
+
return {
|
|
169
|
+
path: resolved.path,
|
|
170
|
+
external: true,
|
|
171
|
+
warnings: resolved.warnings
|
|
172
|
+
};
|
|
173
|
+
});
|
|
174
|
+
pluginBuild.onResolve({ filter: /^[^./]/ }, async (args) => {
|
|
175
|
+
if (args.kind === "entry-point" || path.isAbsolute(args.path) || WINDOWS_ABSOLUTE_PATH_RE.test(args.path)) {
|
|
176
|
+
return;
|
|
177
|
+
}
|
|
178
|
+
if (args.pluginData?.farmConfigExternal) return;
|
|
179
|
+
const resolved = await pluginBuild.resolve(args.path, {
|
|
180
|
+
importer: args.importer,
|
|
181
|
+
kind: args.kind,
|
|
182
|
+
namespace: args.namespace,
|
|
183
|
+
resolveDir: args.resolveDir,
|
|
184
|
+
pluginData: { farmConfigExternal: true }
|
|
185
|
+
});
|
|
186
|
+
if (resolved.errors.length > 0 || !resolved.path) {
|
|
187
|
+
return { path: args.path, external: true };
|
|
188
|
+
}
|
|
189
|
+
return {
|
|
190
|
+
path: resolved.path,
|
|
191
|
+
external: true,
|
|
192
|
+
warnings: resolved.warnings
|
|
193
|
+
};
|
|
194
|
+
});
|
|
195
|
+
}
|
|
196
|
+
};
|
|
197
|
+
}
|
|
198
|
+
__name(createFarmConfigResolutionPlugin, "createFarmConfigResolutionPlugin");
|
|
144
199
|
async function loadFarmConfigFile(configPath, options) {
|
|
145
200
|
const { build, transform } = await import("esbuild");
|
|
146
201
|
const cacheRoot = path.resolve(options.cacheRoot || options.root);
|
|
147
202
|
const configCacheDir = path.join(cacheRoot, ".farm", ".config-loader");
|
|
148
|
-
const configEntryChecks = /* @__PURE__ */ new Map();
|
|
149
203
|
await mkdir(configCacheDir, { recursive: true });
|
|
150
204
|
const modulePath = path.join(
|
|
151
205
|
configCacheDir,
|
|
@@ -159,55 +213,7 @@ async function loadFarmConfigFile(configPath, options) {
|
|
|
159
213
|
format: "esm",
|
|
160
214
|
platform: "node",
|
|
161
215
|
target: `node${process.versions.node.split(".")[0]}`,
|
|
162
|
-
plugins: [
|
|
163
|
-
{
|
|
164
|
-
name: "farm-config-package-resolution",
|
|
165
|
-
setup(pluginBuild) {
|
|
166
|
-
pluginBuild.onResolve({ filter: /^@farm.js\/core$/ }, async (args) => {
|
|
167
|
-
if (args.pluginData?.farmConfigExternal || args.kind !== "import-statement" || !args.importer) {
|
|
168
|
-
return;
|
|
169
|
-
}
|
|
170
|
-
let configEntryCheck = configEntryChecks.get(args.importer);
|
|
171
|
-
if (!configEntryCheck) {
|
|
172
|
-
configEntryCheck = onlyImportsFarmConfigHelpers(args.importer, transform);
|
|
173
|
-
configEntryChecks.set(args.importer, configEntryCheck);
|
|
174
|
-
}
|
|
175
|
-
if (!await configEntryCheck) return;
|
|
176
|
-
const resolved = await pluginBuild.resolve(FARM_CONFIG_ENTRY, {
|
|
177
|
-
importer: args.importer,
|
|
178
|
-
kind: args.kind,
|
|
179
|
-
namespace: args.namespace,
|
|
180
|
-
resolveDir: args.resolveDir,
|
|
181
|
-
pluginData: { farmConfigExternal: true }
|
|
182
|
-
});
|
|
183
|
-
if (resolved.errors.length > 0 || !resolved.path) return;
|
|
184
|
-
return {
|
|
185
|
-
path: resolved.path,
|
|
186
|
-
external: true,
|
|
187
|
-
warnings: resolved.warnings
|
|
188
|
-
};
|
|
189
|
-
});
|
|
190
|
-
pluginBuild.onResolve({ filter: /^[^./]/ }, async (args) => {
|
|
191
|
-
if (args.pluginData?.farmConfigExternal) return;
|
|
192
|
-
const resolved = await pluginBuild.resolve(args.path, {
|
|
193
|
-
importer: args.importer,
|
|
194
|
-
kind: args.kind,
|
|
195
|
-
namespace: args.namespace,
|
|
196
|
-
resolveDir: args.resolveDir,
|
|
197
|
-
pluginData: { farmConfigExternal: true }
|
|
198
|
-
});
|
|
199
|
-
if (resolved.errors.length > 0 || !resolved.path) {
|
|
200
|
-
return { path: args.path, external: true };
|
|
201
|
-
}
|
|
202
|
-
return {
|
|
203
|
-
path: resolved.path,
|
|
204
|
-
external: true,
|
|
205
|
-
warnings: resolved.warnings
|
|
206
|
-
};
|
|
207
|
-
});
|
|
208
|
-
}
|
|
209
|
-
}
|
|
210
|
-
],
|
|
216
|
+
plugins: [createFarmConfigResolutionPlugin({ transform })],
|
|
211
217
|
jsx: "automatic",
|
|
212
218
|
logLevel: "silent",
|
|
213
219
|
sourcemap: "inline"
|
|
@@ -445,6 +451,7 @@ export {
|
|
|
445
451
|
getFarmSourceRoots,
|
|
446
452
|
getFarmAppDirectories,
|
|
447
453
|
getFarmLayerAliases,
|
|
454
|
+
createFarmConfigResolutionPlugin,
|
|
448
455
|
loadFarmConfigFile
|
|
449
456
|
};
|
|
450
|
-
//# sourceMappingURL=chunk-
|
|
457
|
+
//# sourceMappingURL=chunk-TUYEGV7H.mjs.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"sources":["../src/layers.ts"],"sourcesContent":["import { existsSync, readFileSync, realpathSync, statSync } from \"node:fs\";\nimport { mkdir, unlink } from \"node:fs/promises\";\nimport { createRequire } from \"node:module\";\nimport path from \"node:path\";\nimport { pathToFileURL } from \"node:url\";\n\ntype EsbuildTransform = (typeof import(\"esbuild\"))[\"transform\"];\n\nexport type FarmLayerEntry = string;\n\nexport interface ResolvedFarmLayer {\n /** The value used in `extends`. */\n source: string;\n /** Stable name used by the `#layers/<name>` alias. */\n name: string;\n /** Absolute layer package or directory root. */\n root: string;\n /** Source directory relative to the layer root. */\n srcDir: string;\n /** Resolved layer config file when one exists. */\n configFile?: string;\n}\n\nexport interface FarmSourceRoot {\n name: string;\n root: string;\n srcDir: string;\n layer: boolean;\n}\n\nexport interface ResolveFarmLayersOptions {\n root: string;\n mode: \"development\" | \"production\";\n}\n\nexport interface FarmLayerResolution<TConfig extends Record<string, any>> {\n config: TConfig & {\n extends?: readonly FarmLayerEntry[];\n layers: ResolvedFarmLayer[];\n };\n layers: ResolvedFarmLayer[];\n}\n\nconst FARM_CORE_PACKAGE = \"@farm.js/core\";\nconst FARM_CONFIG_ENTRY = \"@farm.js/core/config\";\nconst FARM_CORE_REFERENCE_RE = /([\"'])@farm.js\\/core\\1/g;\nconst FARM_CONFIG_HELPER_IMPORT_RE =\n /(?:^|\\n)[\\t ]*import[\\t ]*\\{([^{}]*)\\}[\\t ]*from[\\t ]*([\"'])@farm.js\\/core\\2[\\t ]*;?[\\t ]*(?:\\n|$)/g;\nconst FARM_CONFIG_HELPER_SPECIFIER_RE =\n /^(?:defineConfig|defineFarmConfig)(?:\\s+as\\s+[$A-Z_a-z][$\\w]*)?$/;\n\nconst CONFIG_FILENAMES = [\n \"farm.config.ts\",\n \"farm.config.tsx\",\n \"farm.config.mts\",\n \"farm.config.cts\",\n \"farm.config.js\",\n \"farm.config.jsx\",\n \"farm.config.mjs\",\n \"farm.config.cjs\",\n \"config.ts\",\n \"config.tsx\",\n \"config.mts\",\n \"config.cts\",\n \"config.js\",\n \"config.jsx\",\n \"config.mjs\",\n \"config.cjs\",\n];\n\nconst LAYER_LOCAL_CONFIG_KEYS = new Set([\n \"root\",\n \"srcDir\",\n \"outDir\",\n \"distDir\",\n \"deploy\",\n \"output\",\n \"preset\",\n \"publicDir\",\n \"generateBuildId\",\n]);\n\ntype LoadedLayer = ResolvedFarmLayer & {\n config: Record<string, any>;\n};\n\nexport async function resolveFarmLayers<TConfig extends Record<string, any>>(\n projectConfig: TConfig,\n options: ResolveFarmLayersOptions,\n): Promise<FarmLayerResolution<TConfig>> {\n const projectRoot = path.resolve(options.root);\n const entries = normalizeLayerEntries(projectConfig.extends, \"project config\");\n\n if (entries.length === 0) {\n return {\n config: {\n ...projectConfig,\n layers: [],\n },\n layers: [],\n };\n }\n\n const loadedLayers: LoadedLayer[] = [];\n const visited = new Set<string>();\n const aliases = new Map<string, string>();\n\n const visit = async (\n source: string,\n ownerRoot: string,\n stack: Array<{ root: string; source: string }>,\n ): Promise<void> => {\n const resolvedSource = resolveLayerSource(source, ownerRoot);\n const cycleIndex = stack.findIndex((entry) => entry.root === resolvedSource.root);\n if (cycleIndex !== -1) {\n const cycle = [...stack.slice(cycleIndex).map((entry) => entry.source), source];\n throw new Error(`Farm layer cycle detected: ${cycle.join(\" -> \")}`);\n }\n if (visited.has(resolvedSource.root)) return;\n\n const configFile = findFarmConfigFile(resolvedSource.root, resolvedSource.configFile);\n const config = configFile\n ? await loadFarmConfigFile(configFile, {\n cacheRoot: projectRoot,\n root: resolvedSource.root,\n })\n : {};\n const nestedEntries = normalizeLayerEntries(config.extends, `layer ${JSON.stringify(source)}`);\n const nextStack = [...stack, { root: resolvedSource.root, source }];\n\n for (const nestedSource of nestedEntries) {\n await visit(nestedSource, resolvedSource.root, nextStack);\n }\n\n if (visited.has(resolvedSource.root)) return;\n\n const name = getLayerName(source, resolvedSource.root);\n const conflictingRoot = aliases.get(name);\n if (conflictingRoot && conflictingRoot !== resolvedSource.root) {\n throw new Error(\n `Farm layer alias \"#layers/${name}\" is ambiguous between ${conflictingRoot} and ${resolvedSource.root}`,\n );\n }\n aliases.set(name, resolvedSource.root);\n\n visited.add(resolvedSource.root);\n loadedLayers.push({\n source,\n name,\n root: resolvedSource.root,\n srcDir: normalizeLayerSrcDir(config.srcDir),\n configFile,\n config,\n });\n };\n\n for (const source of entries) {\n await visit(source, projectRoot, []);\n }\n\n let mergedConfig: Record<string, any> = {};\n for (const layer of loadedLayers) {\n mergedConfig = mergeFarmLayerConfig(mergedConfig, getLayerDefaults(layer.config));\n }\n mergedConfig = mergeFarmLayerConfig(mergedConfig, projectConfig);\n\n const layers = loadedLayers.map(({ config: _config, ...layer }) => layer);\n return {\n config: {\n ...mergedConfig,\n root: projectConfig.root,\n srcDir: projectConfig.srcDir,\n extends: projectConfig.extends,\n layers,\n } as unknown as FarmLayerResolution<TConfig>[\"config\"],\n layers,\n };\n}\n\nexport function getFarmSourceRoots(config: {\n root?: string;\n srcDir?: string;\n layers?: readonly ResolvedFarmLayer[];\n}): FarmSourceRoot[] {\n const roots: FarmSourceRoot[] = (config.layers ?? []).map((layer) => ({\n name: layer.name,\n root: layer.root,\n srcDir: layer.srcDir,\n layer: true,\n }));\n\n roots.push({\n name: \"project\",\n root: path.resolve(config.root || process.cwd()),\n srcDir: config.srcDir || \"src\",\n layer: false,\n });\n\n return roots;\n}\n\nexport function getFarmAppDirectories(config: {\n root?: string;\n srcDir?: string;\n layers?: readonly ResolvedFarmLayer[];\n}): string[] {\n return getFarmSourceRoots(config).map((source) => path.join(source.root, source.srcDir, \"app\"));\n}\n\nexport function getFarmLayerAliases(\n layers: readonly ResolvedFarmLayer[] | undefined,\n): Record<string, string> {\n return Object.fromEntries(\n (layers ?? []).map((layer) => [`#layers/${layer.name}`, path.join(layer.root, layer.srcDir)]),\n );\n}\n\n// Matches Windows drive-letter (`E:\\`, `E:/`) and UNC (`\\\\server\\share`) paths,\n// which would otherwise pass the \"bare specifier\" filter below. `path.isAbsolute`\n// only recognizes these on Windows, but esbuild can hand us such paths on any\n// platform (e.g. in cross-platform tests), and no valid package name contains\n// `:` or starts with `\\`.\nconst WINDOWS_ABSOLUTE_PATH_RE = /^(?:[A-Za-z]:[\\\\/]|\\\\\\\\)/;\n\nexport function createFarmConfigResolutionPlugin(options: {\n transform: EsbuildTransform;\n}): import(\"esbuild\").Plugin {\n const configEntryChecks = new Map<string, Promise<boolean>>();\n\n return {\n name: \"farm-config-package-resolution\",\n setup(pluginBuild) {\n pluginBuild.onResolve({ filter: /^@farm\\.js\\/core$/ }, async (args) => {\n if (\n args.pluginData?.farmConfigExternal ||\n args.kind !== \"import-statement\" ||\n !args.importer\n ) {\n return;\n }\n\n let configEntryCheck = configEntryChecks.get(args.importer);\n if (!configEntryCheck) {\n configEntryCheck = onlyImportsFarmConfigHelpers(args.importer, options.transform);\n configEntryChecks.set(args.importer, configEntryCheck);\n }\n if (!(await configEntryCheck)) return;\n\n const resolved = await pluginBuild.resolve(FARM_CONFIG_ENTRY, {\n importer: args.importer,\n kind: args.kind,\n namespace: args.namespace,\n resolveDir: args.resolveDir,\n pluginData: { farmConfigExternal: true },\n });\n if (resolved.errors.length > 0 || !resolved.path) return;\n\n return {\n path: resolved.path,\n external: true,\n warnings: resolved.warnings,\n };\n });\n\n pluginBuild.onResolve({ filter: /^[^./]/ }, async (args) => {\n // The filter is meant to catch bare package specifiers, but Windows\n // absolute paths (`E:\\...`) match it too — including the entry point\n // itself, which esbuild rejects when marked external.\n if (\n args.kind === \"entry-point\" ||\n path.isAbsolute(args.path) ||\n WINDOWS_ABSOLUTE_PATH_RE.test(args.path)\n ) {\n return;\n }\n if (args.pluginData?.farmConfigExternal) return;\n\n const resolved = await pluginBuild.resolve(args.path, {\n importer: args.importer,\n kind: args.kind,\n namespace: args.namespace,\n resolveDir: args.resolveDir,\n pluginData: { farmConfigExternal: true },\n });\n\n if (resolved.errors.length > 0 || !resolved.path) {\n return { path: args.path, external: true };\n }\n\n return {\n path: resolved.path,\n external: true,\n warnings: resolved.warnings,\n };\n });\n },\n };\n}\n\nexport async function loadFarmConfigFile<TConfig = Record<string, any>>(\n configPath: string,\n options: { root: string; cacheRoot?: string },\n): Promise<TConfig> {\n const { build, transform } = await import(\"esbuild\");\n const cacheRoot = path.resolve(options.cacheRoot || options.root);\n const configCacheDir = path.join(cacheRoot, \".farm\", \".config-loader\");\n await mkdir(configCacheDir, { recursive: true });\n\n const modulePath = path.join(\n configCacheDir,\n `farm-config-${Date.now()}-${Math.random().toString(36).slice(2)}.mjs`,\n );\n\n await build({\n absWorkingDir: path.resolve(options.root),\n entryPoints: [path.resolve(configPath)],\n outfile: modulePath,\n bundle: true,\n format: \"esm\",\n platform: \"node\",\n target: `node${process.versions.node.split(\".\")[0]}`,\n plugins: [createFarmConfigResolutionPlugin({ transform })],\n jsx: \"automatic\",\n logLevel: \"silent\",\n sourcemap: \"inline\",\n });\n\n const moduleUrl = `${pathToFileURL(modulePath).href}?t=${Date.now()}`;\n try {\n const loaded = await import(/* @vite-ignore */ moduleUrl);\n const config = loaded.default || loaded;\n if (!config || typeof config !== \"object\" || Array.isArray(config)) {\n throw new TypeError(`Farm config ${configPath} must export an object`);\n }\n return config as TConfig;\n } finally {\n await unlink(modulePath).catch(() => undefined);\n }\n}\n\nasync function onlyImportsFarmConfigHelpers(\n importer: string,\n transform: EsbuildTransform,\n): Promise<boolean> {\n try {\n const source = readFileSync(importer, \"utf8\");\n if (!source.includes(FARM_CORE_PACKAGE)) return false;\n\n const transformed = await transform(source, {\n format: \"esm\",\n jsx: \"automatic\",\n loader: getEsbuildLoader(importer),\n sourcefile: importer,\n });\n const references = [...transformed.code.matchAll(FARM_CORE_REFERENCE_RE)];\n if (references.length === 0) return false;\n\n const safeImportRanges: Array<{ start: number; end: number }> = [];\n for (const match of transformed.code.matchAll(FARM_CONFIG_HELPER_IMPORT_RE)) {\n const specifiers = match[1]\n .split(\",\")\n .map((specifier) => specifier.trim())\n .filter(Boolean);\n if (\n specifiers.length === 0 ||\n !specifiers.every((specifier) => FARM_CONFIG_HELPER_SPECIFIER_RE.test(specifier))\n ) {\n continue;\n }\n\n const start = match.index ?? 0;\n safeImportRanges.push({ start, end: start + match[0].length });\n }\n\n return references.every((reference) => {\n const index = reference.index ?? -1;\n return safeImportRanges.some((range) => index >= range.start && index < range.end);\n });\n } catch {\n // Unsupported syntax or non-file importers retain the existing package resolution path.\n return false;\n }\n}\n\nfunction getEsbuildLoader(file: string): \"js\" | \"jsx\" | \"ts\" | \"tsx\" {\n switch (path.extname(file)) {\n case \".ts\":\n case \".mts\":\n case \".cts\":\n return \"ts\";\n case \".tsx\":\n return \"tsx\";\n case \".jsx\":\n return \"jsx\";\n default:\n return \"js\";\n }\n}\n\nfunction normalizeLayerEntries(value: unknown, owner: string): string[] {\n if (value === undefined) return [];\n if (!Array.isArray(value)) {\n throw new TypeError(`${owner} \"extends\" must be an array of layer paths or package names`);\n }\n\n return value.map((entry, index) => {\n if (typeof entry !== \"string\" || entry.trim() === \"\") {\n throw new TypeError(`${owner} \"extends\" entry ${index} must be a non-empty string`);\n }\n return entry.trim();\n });\n}\n\nfunction resolveLayerSource(\n source: string,\n ownerRoot: string,\n): { root: string; configFile?: string } {\n if (isPathLayerSource(source)) {\n const target = source.startsWith(\"file:\")\n ? path.resolve(ownerRoot, source.slice(\"file:\".length))\n : path.resolve(ownerRoot, source);\n if (!existsSync(target)) {\n throw new Error(`Cannot resolve Farm layer ${JSON.stringify(source)} from ${ownerRoot}`);\n }\n\n const stats = statSync(target);\n const root = stats.isDirectory() ? target : path.dirname(target);\n return {\n root: normalizeRealPath(root),\n configFile: stats.isFile() ? normalizeRealPath(target) : undefined,\n };\n }\n\n const requireFromOwner = createRequire(path.join(ownerRoot, \"package.json\"));\n let packageJsonPath: string | undefined;\n try {\n packageJsonPath = requireFromOwner.resolve(`${source}/package.json`);\n } catch {\n // Packages with an exports map often hide package.json. Resolve their entry and walk upward.\n }\n\n if (packageJsonPath) {\n return { root: normalizeRealPath(path.dirname(packageJsonPath)) };\n }\n\n try {\n const entryPath = requireFromOwner.resolve(source);\n const packageRoot = findNearestPackageRoot(entryPath);\n if (packageRoot) return { root: normalizeRealPath(packageRoot) };\n } catch {\n // Use the common error below so local and package failures have the same shape.\n }\n\n throw new Error(`Cannot resolve Farm layer package ${JSON.stringify(source)} from ${ownerRoot}`);\n}\n\nfunction findNearestPackageRoot(entryPath: string): string | null {\n let current = statSync(entryPath).isDirectory() ? entryPath : path.dirname(entryPath);\n while (true) {\n if (existsSync(path.join(current, \"package.json\"))) return current;\n const parent = path.dirname(current);\n if (parent === current) return null;\n current = parent;\n }\n}\n\nfunction findFarmConfigFile(root: string, explicitPath?: string): string | undefined {\n if (explicitPath) return explicitPath;\n for (const fileName of CONFIG_FILENAMES) {\n const candidate = path.join(root, fileName);\n if (existsSync(candidate)) return candidate;\n }\n return undefined;\n}\n\nfunction getLayerName(source: string, root: string): string {\n if (!isPathLayerSource(source)) {\n const packageName = source.split(\"/\").filter(Boolean).pop();\n if (packageName) return sanitizeLayerName(packageName);\n }\n\n try {\n const packageJson = JSON.parse(readFileSync(path.join(root, \"package.json\"), \"utf8\"));\n if (typeof packageJson.name === \"string\") {\n return sanitizeLayerName(packageJson.name.split(\"/\").pop() || packageJson.name);\n }\n } catch {\n // A local layer does not need package metadata.\n }\n\n return sanitizeLayerName(path.basename(root));\n}\n\nfunction sanitizeLayerName(value: string): string {\n const name = value\n .trim()\n .replace(/[^a-zA-Z0-9_-]+/g, \"-\")\n .replace(/^-+|-+$/g, \"\");\n if (!name) throw new Error(`Cannot derive a name for Farm layer ${JSON.stringify(value)}`);\n return name;\n}\n\nfunction normalizeLayerSrcDir(value: unknown): string {\n if (value === undefined) return \"src\";\n if (typeof value !== \"string\" || value.trim() === \"\" || path.isAbsolute(value)) {\n throw new TypeError(\"A Farm layer srcDir must be a non-empty relative path\");\n }\n const normalized = path.normalize(value.trim());\n if (normalized === \"..\" || normalized.startsWith(`..${path.sep}`)) {\n throw new TypeError(\"A Farm layer srcDir cannot leave the layer root\");\n }\n return normalized;\n}\n\nfunction getLayerDefaults(config: Record<string, any>): Record<string, any> {\n return Object.fromEntries(\n Object.entries(config).filter(\n ([key, value]) =>\n key !== \"extends\" && value !== undefined && !LAYER_LOCAL_CONFIG_KEYS.has(key),\n ),\n );\n}\n\nfunction mergeFarmLayerConfig(\n base: Record<string, any>,\n override: Record<string, any>,\n): Record<string, any> {\n const output: Record<string, any> = { ...base };\n\n for (const [key, value] of Object.entries(override)) {\n if (value === undefined || key === \"layers\") continue;\n\n if (key === \"plugins\") {\n output[key] = [...toArray(output[key]), ...toArray(value)];\n continue;\n }\n\n if (key === \"middleware\" && output[key] !== undefined) {\n output[key] = [...toArray(output[key]), ...toArray(value)];\n continue;\n }\n\n if ((key === \"redirects\" || key === \"rewrites\" || key === \"headers\") && output[key]) {\n output[key] = mergeConfigListResolvers(output[key], value);\n continue;\n }\n\n if (isPlainObject(output[key]) && isPlainObject(value)) {\n output[key] = mergePlainObjects(output[key], value);\n continue;\n }\n\n output[key] = value;\n }\n\n return output;\n}\n\nfunction mergePlainObjects(base: Record<string, any>, override: Record<string, any>) {\n const output: Record<string, any> = { ...base };\n for (const [key, value] of Object.entries(override)) {\n if (value === undefined) continue;\n output[key] =\n isPlainObject(output[key]) && isPlainObject(value)\n ? mergePlainObjects(output[key], value)\n : value;\n }\n return output;\n}\n\nfunction mergeConfigListResolvers(base: unknown, override: unknown) {\n return async () => [...(await resolveConfigList(base)), ...(await resolveConfigList(override))];\n}\n\nasync function resolveConfigList(value: unknown): Promise<any[]> {\n const resolved = typeof value === \"function\" ? await value() : value;\n return toArray(resolved);\n}\n\nfunction toArray(value: unknown): any[] {\n if (value === undefined || value === null) return [];\n return Array.isArray(value) ? value : [value];\n}\n\nfunction isPlainObject(value: unknown): value is Record<string, any> {\n if (!value || typeof value !== \"object\" || Array.isArray(value)) return false;\n const prototype = Object.getPrototypeOf(value);\n return prototype === Object.prototype || prototype === null;\n}\n\nfunction isPathLayerSource(source: string): boolean {\n return (\n source.startsWith(\".\") ||\n source.startsWith(\"/\") ||\n source.startsWith(\"file:\") ||\n /^[a-zA-Z]:[\\\\/]/.test(source)\n );\n}\n\nfunction normalizeRealPath(value: string): string {\n return path.resolve(realpathSync(value));\n}\n"],"mappings":";;;;;AAAA,SAAS,YAAY,cAAc,cAAc,gBAAgB;AACjE,SAAS,OAAO,cAAc;AAC9B,SAAS,qBAAqB;AAC9B,OAAO,UAAU;AACjB,SAAS,qBAAqB;AAuC9B,IAAM,oBAAoB;AAC1B,IAAM,oBAAoB;AAC1B,IAAM,yBAAyB;AAC/B,IAAM,+BACJ;AACF,IAAM,kCACJ;AAEF,IAAM,mBAAmB;AAAA,EACvB;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AACF;AAEA,IAAM,0BAA0B,oBAAI,IAAI;AAAA,EACtC;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AACF,CAAC;AAMD,eAAsB,kBAC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AI,MAAM,kBAAkB,IAAI,GAAI,GAAI,MAAM,kBAAkB,QAAQ,CAAE;AAChG;AAFS;AAIT,eAAe,kBAAkB,OAAgC;AAC/D,QAAM,WAAW,OAAO,UAAU,aAAa,MAAM,MAAM,IAAI;AAC/D,SAAO,QAAQ,QAAQ;AACzB;AAHe;AAKf,SAAS,QAAQ,OAAuB;AACtC,MAAI,UAAU,UAAa,UAAU,KAAM,QAAO,CAAC;AACnD,SAAO,MAAM,QAAQ,KAAK,IAAI,QAAQ,CAAC,KAAK;AAC9C;AAHS;AAKT,SAAS,cAAc,OAA8C;AACnE,MAAI,CAAC,SAAS,OAAO,UAAU,YAAY,MAAM,QAAQ,KAAK,EAAG,QAAO;AACxE,QAAM,YAAY,OAAO,eAAe,KAAK;AAC7C,SAAO,cAAc,OAAO,aAAa,cAAc;AACzD;AAJS;AAMT,SAAS,kBAAkB,QAAyB;AAClD,SACE,OAAO,WAAW,GAAG,KACrB,OAAO,WAAW,GAAG,KACrB,OAAO,WAAW,OAAO,KACzB,kBAAkB,KAAK,MAAM;AAEjC;AAPS;AAST,SAAS,kBAAkB,OAAuB;AAChD,SAAO,KAAK,QAAQ,aAAa,KAAK,CAAC;AACzC;AAFS;","names":[]}
|
|
@@ -4,7 +4,7 @@ import {
|
|
|
4
4
|
} from "./chunk-V7RBCSDJ.mjs";
|
|
5
5
|
import {
|
|
6
6
|
resolveDocsConfig
|
|
7
|
-
} from "./chunk-
|
|
7
|
+
} from "./chunk-MYNLKNAW.mjs";
|
|
8
8
|
import {
|
|
9
9
|
resolveFarmDocsFontAssets,
|
|
10
10
|
toFarmDocsPublicFontAssets
|
|
@@ -2544,4 +2544,4 @@ export {
|
|
|
2544
2544
|
createDocsAPI,
|
|
2545
2545
|
createFarmDocsAPIHandler
|
|
2546
2546
|
};
|
|
2547
|
-
//# sourceMappingURL=chunk-
|
|
2547
|
+
//# sourceMappingURL=chunk-X4MNGHCU.mjs.map
|
|
@@ -1,9 +1,9 @@
|
|
|
1
1
|
"use client";
|
|
2
2
|
import {
|
|
3
3
|
defineClient
|
|
4
|
-
} from "../chunk-
|
|
4
|
+
} from "../chunk-BQWTEZSS.mjs";
|
|
5
5
|
import "../chunk-FXG2PS27.mjs";
|
|
6
|
-
import "../chunk-
|
|
6
|
+
import "../chunk-FY34HLY7.mjs";
|
|
7
7
|
import "../chunk-CGILA3WO.mjs";
|
|
8
8
|
export {
|
|
9
9
|
defineClient
|
|
@@ -14,6 +14,7 @@ import { g as FarmWorkflowsUserConfig, a as FarmServerConfig, F as FarmWorkflows
|
|
|
14
14
|
import { FarmCronUserConfig, FarmCronResolvedConfig } from './cron.mjs';
|
|
15
15
|
import { FarmEnvConfig, ResolvedFarmEnv } from './env.mjs';
|
|
16
16
|
import { FarmServerActionsConfig, ResolvedFarmServerActionsConfig } from './server-action-security.mjs';
|
|
17
|
+
import * as esbuild from 'esbuild';
|
|
17
18
|
import { F as FarmImageConfig, R as ResolvedFarmImageConfig } from './image-config-Duob7wER.mjs';
|
|
18
19
|
import { k as FarmI18nUserConfig, R as ResolvedFarmI18nConfig } from './types-mP6R6CzS.mjs';
|
|
19
20
|
import { FarmCacheUserConfig } from './cache.mjs';
|
|
@@ -312,6 +313,7 @@ declare function routeRulesToRedirects(routeRules: FarmRouteRules): RedirectConf
|
|
|
312
313
|
declare function routeRulesToHeaders(routeRules: FarmRouteRules): HeaderConfig[];
|
|
313
314
|
declare function routeRulesToNitroRouteRules(routeRules: FarmRouteRules): Record<string, any>;
|
|
314
315
|
|
|
316
|
+
type EsbuildTransform = (typeof esbuild)["transform"];
|
|
315
317
|
type FarmLayerEntry = string;
|
|
316
318
|
interface ResolvedFarmLayer {
|
|
317
319
|
/** The value used in `extends`. */
|
|
@@ -354,6 +356,9 @@ declare function getFarmAppDirectories(config: {
|
|
|
354
356
|
layers?: readonly ResolvedFarmLayer[];
|
|
355
357
|
}): string[];
|
|
356
358
|
declare function getFarmLayerAliases(layers: readonly ResolvedFarmLayer[] | undefined): Record<string, string>;
|
|
359
|
+
declare function createFarmConfigResolutionPlugin(options: {
|
|
360
|
+
transform: EsbuildTransform;
|
|
361
|
+
}): esbuild.Plugin;
|
|
357
362
|
declare function loadFarmConfigFile<TConfig = Record<string, any>>(configPath: string, options: {
|
|
358
363
|
root: string;
|
|
359
364
|
cacheRoot?: string;
|
|
@@ -2070,4 +2075,4 @@ interface SSGCollectionResult {
|
|
|
2070
2075
|
ssr: string[];
|
|
2071
2076
|
}
|
|
2072
2077
|
|
|
2073
|
-
export { type
|
|
2078
|
+
export { type FarmMdxComponents as $, type AppRoutePattern as A, type ServerAction as B, type RouteSegment as C, type ParsedRoute as D, type ErrorProps as E, type FarmConfig as F, type GenerateStaticParams as G, type BuildOptions as H, type SSGPage as I, type SSGCollectionResult as J, type FarmLayerEntry as K, type LoadingProps as L, type MiddlewareProps as M, type NitroPreset as N, type ResolvedFarmLayer as O, type PageRouteParams as P, type FarmSourceRoot as Q, type ResolvedFarmMigrationsConfig as R, type StaticPathPrimitive as S, type ResolveFarmLayersOptions as T, type FarmLayerResolution as U, resolveFarmLayers as V, getFarmSourceRoots as W, getFarmAppDirectories as X, getFarmLayerAliases as Y, createFarmConfigResolutionPlugin as Z, loadFarmConfigFile as _, type FarmComponentType as a, type FarmPluginRuntimeCloseEvent as a$, type FarmMdxResolvedConfig as a0, resolveMdxConfig as a1, type FarmMdxComponent as a2, type FarmMdxUserConfig as a3, type FarmUserConfig as a4, type BundleResultPayload as a5, type FarmPlugin as a6, type FarmIntegration as a7, type ReadonlyMiddlewareStore as a8, type FarmMiddlewareConfig as a9, type FarmCspConfig as aA, type FarmCspDirectives as aB, type FarmCspDirectiveValue as aC, type FarmCspOptions as aD, type FarmSecurityConfig as aE, type ResolvedFarmCspConfig as aF, type FarmAuthConfig as aG, type FarmAuthDatabaseConfig as aH, type FarmAuthEmailAndPasswordConfig as aI, type FarmAuthSessionConfig as aJ, type FarmAuthUserConfig as aK, type PluginRequestContext as aL, type FarmPluginContext as aM, type FarmPluginIntegrationContext as aN, type FarmPluginLifecycle as aO, type FarmRequestPluginContext as aP, type FarmRequestStore as aQ, type FarmPluginRuntimeKind as aR, type FarmPluginRouteRuntimePayload as aS, type FarmPluginSetupContext as aT, type FarmPluginStateContext as aU, type FarmPluginRuntimeBaseEvent as aV, type FarmPluginRuntimeContextEvent as aW, type FarmPluginRuntimeBeforeEvent as aX, type FarmPluginRuntimeAfterEvent as aY, type FarmPluginRuntimeErrorEvent as aZ, type FarmPluginRuntimeStartEvent as a_, type MiddlewareModule as aa, type ResolvedFarmDevtoolsConfig as ab, type ResolvedFarmAuthConfig as ac, type ResolvedFarmPerformanceConfig as ad, type ResolvedFarmSecurityConfig as ae, manageFarmDocumentPreloads as af, manageFarmHtmlPreloads as ag, manageFarmLinkHeaderPreloads as ah, reportFarmPreloadWarnings as ai, type OpenAPIConfig as aj, definePlugin as ak, FarmRuntimeShutdownError as al, PluginManager as am, resolveConfig as an, loadConfig as ao, resolveDeployConfig as ap, resolveMigrationsConfig as aq, resolveDeployOutputPath as ar, normalizeDeployTarget as as, getDeployTargetForPreset as at, getPresetForDeployTarget as au, type FarmLayerConfig as av, type FarmPerformanceConfig as aw, type FarmPreloadMode as ax, type FarmPreloadUserConfig as ay, type ResolvedFarmPreloadConfig as az, type FarmMigrationCommand as b, type FarmIntegrationRoute as b$, type FarmPluginRuntimeHooks as b0, type FarmPluginRuntimeRequestOptions as b1, type FarmPluginRuntimeRequestHandler as b2, type FarmPluginRuntimeSession as b3, type FarmPluginDiscoveredRoute as b4, type FarmPluginRouterHooks as b5, type FarmPluginRenderHooks as b6, type FarmPluginBuildHooks as b7, type FarmPluginDevHooks as b8, type FarmPluginClientConfig as b9, type FarmIntegrationRouteParams as bA, type FarmIntegrationRouteMethod as bB, type FarmIntegrationRouteInputSource as bC, type FarmIntegrationValidationPathSegment as bD, type FarmIntegrationRouteInput as bE, type FarmIntegrationValidationIssue as bF, type FarmIntegrationValidationErrorLike as bG, type FarmIntegrationValidationResult as bH, type FarmIntegrationStandardValidationResult as bI, type FarmIntegrationInputSchema as bJ, type FarmIntegrationRouteInputSchemas as bK, type FarmIntegrationRequestContextStore as bL, FARM_INTEGRATION_INTERNAL_DISPATCH_CONTEXT_KEY as bM, type FarmIntegrationRouteDb as bN, type FarmIntegrationRouteStorageArgs as bO, type FarmIntegrationRouteArgs as bP, type FarmIntegrationConfigContext as bQ, type FarmIntegrationConfigDefinition as bR, type FarmIntegrationConfigInput as bS, type FarmIntegrationLifecycleLogLevel as bT, type FarmIntegrationLifecycleLogger as bU, type FarmIntegrationLifecycleContext as bV, type FarmIntegrationLifecycleHook as bW, type FarmIntegrationData as bX, type FarmIntegrationHandlerContext as bY, type FarmIntegrationRouteHookContext as bZ, type FarmIntegrationRouteHook as b_, type RouteDiscoveredPayload as ba, type RoutesGeneratedPayload as bb, type MiddlewareDiscoveredPayload as bc, type APIRouteDiscoveredPayload as bd, type RouteMatchPayload as be, type RouteMatchResultPayload as bf, type RenderLifecyclePayload as bg, type APIHandlerLifecyclePayload as bh, type ErrorLifecyclePayload as bi, type HMRUpdatePayload as bj, type BundleLifecyclePayload as bk, type NitroBuildLifecyclePayload as bl, type ShutdownPayload as bm, type ResolvedFarmConfig as bn, type RedirectConfig as bo, type HeaderConfig as bp, type RewriteConfig as bq, type ImageConfig as br, type I18nConfig as bs, type MiddlewareConfig as bt, type FarmDeployConfig as bu, type ResolvedFarmDeployConfig as bv, type FarmDeployTarget as bw, type FarmIntegrationCategory as bx, type FarmIntegrationSlot as by, type FarmIntegrationRouteParamValue as bz, type FarmMigrationsConfig as c, type CookieJar as c$, type FarmTypedIntegrationRoute as c0, type FarmIntegrationRouteMiddleware as c1, type FarmIntegrationMiddleware as c2, type FarmIntegrationProviderProps as c3, type FarmIntegrationProvider as c4, type FarmIntegrationDocumentNavigation as c5, type FarmIntegrationSchemaFieldType as c6, type FarmIntegrationSchemaReference as c7, type FarmIntegrationSchemaField as c8, type FarmIntegrationSchemaConstraint as c9, getIntegrationProviders as cA, getIntegrationDocumentNavigationMatchers as cB, getIntegrationSchemas as cC, getRegisteredIntegrationRuntime as cD, getRegisteredIntegrations as cE, getRegisteredIntegrationSchemas as cF, matchIntegrationRoute as cG, matchRegisteredIntegrationRoute as cH, getRegisteredIntegrationAPIManifest as cI, dispatchIntegrationRequest as cJ, type FarmIntegrationOrmSchema as cK, type FarmIntegrationOrmClient as cL, type InferFarmIntegrationOrmField as cM, type InferFarmIntegrationOrmFields as cN, type InferFarmIntegrationOrmSchema as cO, type InferFarmIntegrationOrmClient as cP, type CreateIntegrationOrmOptions as cQ, createIntegrationOrm as cR, resolveIntegrationOrmRuntimeClient as cS, farmIntegrationSchemaToOrmSchema as cT, type IntegrationOrmModelNames as cU, type MiddlewareContext as cV, type MiddlewareFunction as cW, type RequestMiddleware as cX, type RequestMiddlewareContext as cY, type MiddlewareStore as cZ, type MiddlewareChain as c_, type FarmIntegrationSchemaModel as ca, type FarmIntegrationSchemaModelExtension as cb, type FarmIntegrationSchemaModelOverride as cc, type FarmIntegrationSchema as cd, defineIntegrationSchema as ce, type FarmIntegrationLogPhase as cf, type FarmIntegrationLogEvent as cg, type FarmIntegrationLogger as ch, type FarmIntegrationPluginOwner as ci, type FarmIntegrationContributedPlugin as cj, type FarmIntegrationsUserConfig as ck, getFarmIntegrationPluginServerRuntime as cl, getFarmIntegrationPluginOwner as cm, type FarmIntegrationRouteFactory as cn, type FarmIntegrationRoutesFactoryContext as co, type FarmIntegrationRoutesFactory as cp, type FarmIntegrationEndpointValue as cq, type FarmIntegrationEndpoints as cr, type FarmIntegrationEndpointsFactoryContext as cs, type FarmIntegrationEndpointsFactory as ct, createIntegrationRoute as cu, integrationRoute as cv, type DefinedIntegration as cw, defineIntegration as cx, isFarmIntegration as cy, resolveIntegrationPlugins as cz, defineConfig as d, type CookieOptions as d0, type RateLimitConfig as d1, type RateLimitIncrementResult as d2, type RateLimitStorage as d3, type RateLimitStatus as d4, type MemoryRateLimitStorageOptions as d5, type NextFunction as d6, type MiddlewareResult as d7, type FarmRouteRuleRenderMode as d8, type FarmRouteRuleRedirect as d9, type FarmRouteRuleCors as da, type FarmRouteRule as db, type FarmRouteRules as dc, normalizeRouteRules as dd, routeRulesToRedirects as de, routeRulesToHeaders as df, routeRulesToNitroRouteRules as dg, DEFAULT_FARM_DEVTOOLS_SHORTCUT as dh, FARM_DEVTOOLS_PATH as di, FARM_DEVTOOLS_LAUNCH_PARAM as dj, type FarmDevtoolsConfig as dk, type FarmDevtoolsUserConfig as dl, resolveFarmDevtoolsConfig as dm, type MiddlewareConfig$1 as dn, farmI18nClientBridgePlugin as dp, rewriteEarlySsrRelativeImports as dq, type FarmMigrationsUserConfig as e, farmPlugin as f, type FarmContextFactoryInput as g, type FarmContextFactory as h, type FarmAppContext as i, type PluginContextProps as j, type PageProps as k, type PagePropsWithMiddleware as l, type LayoutProps as m, type MetadataProps as n, type LayoutMetadataProps as o, type Page as p, type Layout as q, type Loading as r, type ErrorBoundary as s, type RouteModule as t, type StaticPathParams as u, type StaticRouteParams as v, type LayoutModule as w, type Metadata as x, type FarmRequest as y, type FarmResponse as z };
|
|
@@ -14,6 +14,7 @@ import { g as FarmWorkflowsUserConfig, a as FarmServerConfig, F as FarmWorkflows
|
|
|
14
14
|
import { FarmCronUserConfig, FarmCronResolvedConfig } from './cron.js';
|
|
15
15
|
import { FarmEnvConfig, ResolvedFarmEnv } from './env.js';
|
|
16
16
|
import { FarmServerActionsConfig, ResolvedFarmServerActionsConfig } from './server-action-security.js';
|
|
17
|
+
import * as esbuild from 'esbuild';
|
|
17
18
|
import { F as FarmImageConfig, R as ResolvedFarmImageConfig } from './image-config-Duob7wER.js';
|
|
18
19
|
import { k as FarmI18nUserConfig, R as ResolvedFarmI18nConfig } from './types-mP6R6CzS.js';
|
|
19
20
|
import { FarmCacheUserConfig } from './cache.js';
|
|
@@ -312,6 +313,7 @@ declare function routeRulesToRedirects(routeRules: FarmRouteRules): RedirectConf
|
|
|
312
313
|
declare function routeRulesToHeaders(routeRules: FarmRouteRules): HeaderConfig[];
|
|
313
314
|
declare function routeRulesToNitroRouteRules(routeRules: FarmRouteRules): Record<string, any>;
|
|
314
315
|
|
|
316
|
+
type EsbuildTransform = (typeof esbuild)["transform"];
|
|
315
317
|
type FarmLayerEntry = string;
|
|
316
318
|
interface ResolvedFarmLayer {
|
|
317
319
|
/** The value used in `extends`. */
|
|
@@ -354,6 +356,9 @@ declare function getFarmAppDirectories(config: {
|
|
|
354
356
|
layers?: readonly ResolvedFarmLayer[];
|
|
355
357
|
}): string[];
|
|
356
358
|
declare function getFarmLayerAliases(layers: readonly ResolvedFarmLayer[] | undefined): Record<string, string>;
|
|
359
|
+
declare function createFarmConfigResolutionPlugin(options: {
|
|
360
|
+
transform: EsbuildTransform;
|
|
361
|
+
}): esbuild.Plugin;
|
|
357
362
|
declare function loadFarmConfigFile<TConfig = Record<string, any>>(configPath: string, options: {
|
|
358
363
|
root: string;
|
|
359
364
|
cacheRoot?: string;
|
|
@@ -2070,4 +2075,4 @@ interface SSGCollectionResult {
|
|
|
2070
2075
|
ssr: string[];
|
|
2071
2076
|
}
|
|
2072
2077
|
|
|
2073
|
-
export { type
|
|
2078
|
+
export { type FarmMdxComponents as $, type AppRoutePattern as A, type ServerAction as B, type RouteSegment as C, type ParsedRoute as D, type ErrorProps as E, type FarmConfig as F, type GenerateStaticParams as G, type BuildOptions as H, type SSGPage as I, type SSGCollectionResult as J, type FarmLayerEntry as K, type LoadingProps as L, type MiddlewareProps as M, type NitroPreset as N, type ResolvedFarmLayer as O, type PageRouteParams as P, type FarmSourceRoot as Q, type ResolvedFarmMigrationsConfig as R, type StaticPathPrimitive as S, type ResolveFarmLayersOptions as T, type FarmLayerResolution as U, resolveFarmLayers as V, getFarmSourceRoots as W, getFarmAppDirectories as X, getFarmLayerAliases as Y, createFarmConfigResolutionPlugin as Z, loadFarmConfigFile as _, type FarmComponentType as a, type FarmPluginRuntimeCloseEvent as a$, type FarmMdxResolvedConfig as a0, resolveMdxConfig as a1, type FarmMdxComponent as a2, type FarmMdxUserConfig as a3, type FarmUserConfig as a4, type BundleResultPayload as a5, type FarmPlugin as a6, type FarmIntegration as a7, type ReadonlyMiddlewareStore as a8, type FarmMiddlewareConfig as a9, type FarmCspConfig as aA, type FarmCspDirectives as aB, type FarmCspDirectiveValue as aC, type FarmCspOptions as aD, type FarmSecurityConfig as aE, type ResolvedFarmCspConfig as aF, type FarmAuthConfig as aG, type FarmAuthDatabaseConfig as aH, type FarmAuthEmailAndPasswordConfig as aI, type FarmAuthSessionConfig as aJ, type FarmAuthUserConfig as aK, type PluginRequestContext as aL, type FarmPluginContext as aM, type FarmPluginIntegrationContext as aN, type FarmPluginLifecycle as aO, type FarmRequestPluginContext as aP, type FarmRequestStore as aQ, type FarmPluginRuntimeKind as aR, type FarmPluginRouteRuntimePayload as aS, type FarmPluginSetupContext as aT, type FarmPluginStateContext as aU, type FarmPluginRuntimeBaseEvent as aV, type FarmPluginRuntimeContextEvent as aW, type FarmPluginRuntimeBeforeEvent as aX, type FarmPluginRuntimeAfterEvent as aY, type FarmPluginRuntimeErrorEvent as aZ, type FarmPluginRuntimeStartEvent as a_, type MiddlewareModule as aa, type ResolvedFarmDevtoolsConfig as ab, type ResolvedFarmAuthConfig as ac, type ResolvedFarmPerformanceConfig as ad, type ResolvedFarmSecurityConfig as ae, manageFarmDocumentPreloads as af, manageFarmHtmlPreloads as ag, manageFarmLinkHeaderPreloads as ah, reportFarmPreloadWarnings as ai, type OpenAPIConfig as aj, definePlugin as ak, FarmRuntimeShutdownError as al, PluginManager as am, resolveConfig as an, loadConfig as ao, resolveDeployConfig as ap, resolveMigrationsConfig as aq, resolveDeployOutputPath as ar, normalizeDeployTarget as as, getDeployTargetForPreset as at, getPresetForDeployTarget as au, type FarmLayerConfig as av, type FarmPerformanceConfig as aw, type FarmPreloadMode as ax, type FarmPreloadUserConfig as ay, type ResolvedFarmPreloadConfig as az, type FarmMigrationCommand as b, type FarmIntegrationRoute as b$, type FarmPluginRuntimeHooks as b0, type FarmPluginRuntimeRequestOptions as b1, type FarmPluginRuntimeRequestHandler as b2, type FarmPluginRuntimeSession as b3, type FarmPluginDiscoveredRoute as b4, type FarmPluginRouterHooks as b5, type FarmPluginRenderHooks as b6, type FarmPluginBuildHooks as b7, type FarmPluginDevHooks as b8, type FarmPluginClientConfig as b9, type FarmIntegrationRouteParams as bA, type FarmIntegrationRouteMethod as bB, type FarmIntegrationRouteInputSource as bC, type FarmIntegrationValidationPathSegment as bD, type FarmIntegrationRouteInput as bE, type FarmIntegrationValidationIssue as bF, type FarmIntegrationValidationErrorLike as bG, type FarmIntegrationValidationResult as bH, type FarmIntegrationStandardValidationResult as bI, type FarmIntegrationInputSchema as bJ, type FarmIntegrationRouteInputSchemas as bK, type FarmIntegrationRequestContextStore as bL, FARM_INTEGRATION_INTERNAL_DISPATCH_CONTEXT_KEY as bM, type FarmIntegrationRouteDb as bN, type FarmIntegrationRouteStorageArgs as bO, type FarmIntegrationRouteArgs as bP, type FarmIntegrationConfigContext as bQ, type FarmIntegrationConfigDefinition as bR, type FarmIntegrationConfigInput as bS, type FarmIntegrationLifecycleLogLevel as bT, type FarmIntegrationLifecycleLogger as bU, type FarmIntegrationLifecycleContext as bV, type FarmIntegrationLifecycleHook as bW, type FarmIntegrationData as bX, type FarmIntegrationHandlerContext as bY, type FarmIntegrationRouteHookContext as bZ, type FarmIntegrationRouteHook as b_, type RouteDiscoveredPayload as ba, type RoutesGeneratedPayload as bb, type MiddlewareDiscoveredPayload as bc, type APIRouteDiscoveredPayload as bd, type RouteMatchPayload as be, type RouteMatchResultPayload as bf, type RenderLifecyclePayload as bg, type APIHandlerLifecyclePayload as bh, type ErrorLifecyclePayload as bi, type HMRUpdatePayload as bj, type BundleLifecyclePayload as bk, type NitroBuildLifecyclePayload as bl, type ShutdownPayload as bm, type ResolvedFarmConfig as bn, type RedirectConfig as bo, type HeaderConfig as bp, type RewriteConfig as bq, type ImageConfig as br, type I18nConfig as bs, type MiddlewareConfig as bt, type FarmDeployConfig as bu, type ResolvedFarmDeployConfig as bv, type FarmDeployTarget as bw, type FarmIntegrationCategory as bx, type FarmIntegrationSlot as by, type FarmIntegrationRouteParamValue as bz, type FarmMigrationsConfig as c, type CookieJar as c$, type FarmTypedIntegrationRoute as c0, type FarmIntegrationRouteMiddleware as c1, type FarmIntegrationMiddleware as c2, type FarmIntegrationProviderProps as c3, type FarmIntegrationProvider as c4, type FarmIntegrationDocumentNavigation as c5, type FarmIntegrationSchemaFieldType as c6, type FarmIntegrationSchemaReference as c7, type FarmIntegrationSchemaField as c8, type FarmIntegrationSchemaConstraint as c9, getIntegrationProviders as cA, getIntegrationDocumentNavigationMatchers as cB, getIntegrationSchemas as cC, getRegisteredIntegrationRuntime as cD, getRegisteredIntegrations as cE, getRegisteredIntegrationSchemas as cF, matchIntegrationRoute as cG, matchRegisteredIntegrationRoute as cH, getRegisteredIntegrationAPIManifest as cI, dispatchIntegrationRequest as cJ, type FarmIntegrationOrmSchema as cK, type FarmIntegrationOrmClient as cL, type InferFarmIntegrationOrmField as cM, type InferFarmIntegrationOrmFields as cN, type InferFarmIntegrationOrmSchema as cO, type InferFarmIntegrationOrmClient as cP, type CreateIntegrationOrmOptions as cQ, createIntegrationOrm as cR, resolveIntegrationOrmRuntimeClient as cS, farmIntegrationSchemaToOrmSchema as cT, type IntegrationOrmModelNames as cU, type MiddlewareContext as cV, type MiddlewareFunction as cW, type RequestMiddleware as cX, type RequestMiddlewareContext as cY, type MiddlewareStore as cZ, type MiddlewareChain as c_, type FarmIntegrationSchemaModel as ca, type FarmIntegrationSchemaModelExtension as cb, type FarmIntegrationSchemaModelOverride as cc, type FarmIntegrationSchema as cd, defineIntegrationSchema as ce, type FarmIntegrationLogPhase as cf, type FarmIntegrationLogEvent as cg, type FarmIntegrationLogger as ch, type FarmIntegrationPluginOwner as ci, type FarmIntegrationContributedPlugin as cj, type FarmIntegrationsUserConfig as ck, getFarmIntegrationPluginServerRuntime as cl, getFarmIntegrationPluginOwner as cm, type FarmIntegrationRouteFactory as cn, type FarmIntegrationRoutesFactoryContext as co, type FarmIntegrationRoutesFactory as cp, type FarmIntegrationEndpointValue as cq, type FarmIntegrationEndpoints as cr, type FarmIntegrationEndpointsFactoryContext as cs, type FarmIntegrationEndpointsFactory as ct, createIntegrationRoute as cu, integrationRoute as cv, type DefinedIntegration as cw, defineIntegration as cx, isFarmIntegration as cy, resolveIntegrationPlugins as cz, defineConfig as d, type CookieOptions as d0, type RateLimitConfig as d1, type RateLimitIncrementResult as d2, type RateLimitStorage as d3, type RateLimitStatus as d4, type MemoryRateLimitStorageOptions as d5, type NextFunction as d6, type MiddlewareResult as d7, type FarmRouteRuleRenderMode as d8, type FarmRouteRuleRedirect as d9, type FarmRouteRuleCors as da, type FarmRouteRule as db, type FarmRouteRules as dc, normalizeRouteRules as dd, routeRulesToRedirects as de, routeRulesToHeaders as df, routeRulesToNitroRouteRules as dg, DEFAULT_FARM_DEVTOOLS_SHORTCUT as dh, FARM_DEVTOOLS_PATH as di, FARM_DEVTOOLS_LAUNCH_PARAM as dj, type FarmDevtoolsConfig as dk, type FarmDevtoolsUserConfig as dl, resolveFarmDevtoolsConfig as dm, type MiddlewareConfig$1 as dn, farmI18nClientBridgePlugin as dp, rewriteEarlySsrRelativeImports as dq, type FarmMigrationsUserConfig as e, farmPlugin as f, type FarmContextFactoryInput as g, type FarmContextFactory as h, type FarmAppContext as i, type PluginContextProps as j, type PageProps as k, type PagePropsWithMiddleware as l, type LayoutProps as m, type MetadataProps as n, type LayoutMetadataProps as o, type Page as p, type Layout as q, type Loading as r, type ErrorBoundary as s, type RouteModule as t, type StaticPathParams as u, type StaticRouteParams as v, type LayoutModule as w, type Metadata as x, type FarmRequest as y, type FarmResponse as z };
|