@farm.js/core 0.1.20 → 0.1.22
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/{app-D_6nTit-.d.mts → app-0e-oTC_R.d.mts} +7 -0
- package/dist/{app-DAyPE-gr.d.ts → app-B7qKw8Ny.d.ts} +7 -0
- package/dist/{chunk-A7T6JZNI.cjs → chunk-2HCEC2YO.cjs} +1 -1
- package/dist/{chunk-K6MG3SEG.mjs → chunk-AAWTJW2G.mjs} +215 -53
- package/dist/{chunk-OLYK7EAK.mjs → chunk-DAATZTKJ.mjs} +14 -0
- package/dist/{chunk-GQFSCBKJ.cjs → chunk-EXUMQVY3.cjs} +187 -208
- package/dist/{chunk-NRS46D4L.mjs → chunk-GKT4ONKN.mjs} +1 -1
- package/dist/{chunk-YP5JZ4LF.cjs → chunk-GXXONIAR.cjs} +3 -3
- package/dist/{chunk-W7MZXRXM.mjs → chunk-ONMW3EVV.mjs} +1 -1
- package/dist/{chunk-PZX6I4JW.cjs → chunk-P5HSJCXI.cjs} +441 -279
- package/dist/{chunk-5V37LKBG.mjs → chunk-PC33YKTC.mjs} +53 -74
- package/dist/{chunk-TFAXUHWX.cjs → chunk-PSV6XKPO.cjs} +15 -1
- package/dist/{chunk-ZE6ONQ5R.cjs → chunk-Q3PX2TGL.cjs} +2 -2
- package/dist/{chunk-XFFQSD2F.cjs → chunk-SO7CRMP6.cjs} +2 -2
- package/dist/{chunk-RMIJFZU3.mjs → chunk-SPSQFO3Z.mjs} +1 -1
- package/dist/{chunk-F7E2AZKQ.mjs → chunk-X2ZUD4GI.mjs} +1 -1
- package/dist/{devtools-R6MDDAZK.cjs → devtools-6DQHO7EK.cjs} +3 -3
- package/dist/{devtools-MTB5SA2B.mjs → devtools-EZ5ORGAK.mjs} +2 -2
- package/dist/docs.cjs +4 -4
- package/dist/docs.mjs +3 -3
- package/dist/index.cjs +8 -8
- package/dist/index.d.mts +1 -1
- package/dist/index.d.ts +1 -1
- package/dist/index.mjs +7 -7
- package/dist/internal/build-runtime.cjs +8 -8
- package/dist/internal/build-runtime.mjs +7 -7
- package/dist/internal/cli-runtime.cjs +4 -4
- package/dist/internal/cli-runtime.mjs +3 -3
- package/dist/internal/client-error-overlay.cjs +4 -4
- package/dist/internal/client-error-overlay.mjs +1 -1
- package/dist/internal/config-runtime.cjs +3 -3
- package/dist/internal/config-runtime.mjs +2 -2
- package/dist/internal/product-telemetry-runtime.cjs +2 -2
- package/dist/internal/product-telemetry-runtime.mjs +1 -1
- package/dist/plugin.cjs +5 -5
- package/dist/plugin.mjs +4 -4
- package/dist/renderer.cjs +4 -2
- package/dist/renderer.d.mts +9 -1
- package/dist/renderer.d.ts +9 -1
- package/dist/renderer.mjs +3 -1
- package/dist/server.cjs +22 -28
- package/dist/server.d.mts +1 -1
- package/dist/server.d.ts +1 -1
- package/dist/server.mjs +7 -13
- package/dist/version.cjs +2 -2
- package/dist/version.mjs +1 -1
- package/dist/vite.cjs +5 -5
- package/dist/vite.mjs +4 -4
- package/package.json +7 -3
|
@@ -7,7 +7,7 @@ import {
|
|
|
7
7
|
import {
|
|
8
8
|
compileFarmDocsAdapterEdgeManifest,
|
|
9
9
|
createFarmDocsAPIHandler
|
|
10
|
-
} from "./chunk-
|
|
10
|
+
} from "./chunk-ONMW3EVV.mjs";
|
|
11
11
|
import {
|
|
12
12
|
FARM_DOCS_LAST_MODIFIED_MANIFEST,
|
|
13
13
|
createFarmDocsHandler,
|
|
@@ -31,7 +31,7 @@ import {
|
|
|
31
31
|
getDeployTargetForPreset,
|
|
32
32
|
hasCustomFarmRouteContext,
|
|
33
33
|
resolveDeployOutputPath
|
|
34
|
-
} from "./chunk-
|
|
34
|
+
} from "./chunk-SPSQFO3Z.mjs";
|
|
35
35
|
import {
|
|
36
36
|
resolveFarmInstrumentationFile
|
|
37
37
|
} from "./chunk-F5D4XEAS.mjs";
|
|
@@ -57,19 +57,20 @@ import {
|
|
|
57
57
|
getClientModuleHydrationPlan,
|
|
58
58
|
getClientModuleMetadata,
|
|
59
59
|
getFarmClientHydrationPlanOptions,
|
|
60
|
+
loadTailwindVitePlugin,
|
|
60
61
|
mergeFarmFontCss,
|
|
61
62
|
mergeFarmProductionViteConfig,
|
|
62
63
|
mergeFarmViteConfig,
|
|
63
64
|
resolveFarmClientCacheAdapterEntry,
|
|
64
65
|
resolveFarmIsolatedClientHydrationMode,
|
|
65
66
|
resolveFarmNotFoundComponentPath
|
|
66
|
-
} from "./chunk-
|
|
67
|
+
} from "./chunk-AAWTJW2G.mjs";
|
|
67
68
|
import {
|
|
68
69
|
findRequestBoundSourceBlockers,
|
|
69
70
|
generateFarmTypeArtifacts,
|
|
70
71
|
parseRouteRenderingDirective,
|
|
71
72
|
resolveRouteRenderingConfigFromFile
|
|
72
|
-
} from "./chunk-
|
|
73
|
+
} from "./chunk-GKT4ONKN.mjs";
|
|
73
74
|
import {
|
|
74
75
|
isFarmPreviewDeploymentEnvironment
|
|
75
76
|
} from "./chunk-BOYNDCZL.mjs";
|
|
@@ -96,8 +97,9 @@ import {
|
|
|
96
97
|
getFarmRendererComponentExtensions,
|
|
97
98
|
getFarmRendererStreamingCapabilitiesForRuntime,
|
|
98
99
|
isReactRenderer,
|
|
99
|
-
loadFarmRendererVitePlugins
|
|
100
|
-
|
|
100
|
+
loadFarmRendererVitePlugins,
|
|
101
|
+
resolveFarmRendererAppSetup
|
|
102
|
+
} from "./chunk-DAATZTKJ.mjs";
|
|
101
103
|
import {
|
|
102
104
|
applyFarmCspHashesToHtml
|
|
103
105
|
} from "./chunk-7BC6GAL7.mjs";
|
|
@@ -954,52 +956,6 @@ export default {};
|
|
|
954
956
|
}
|
|
955
957
|
__name(createFarmNodeServerEntry, "createFarmNodeServerEntry");
|
|
956
958
|
|
|
957
|
-
// src/build/vite-plugin-compat.ts
|
|
958
|
-
function adaptTailwindVitePlugin(pluginOption, builder) {
|
|
959
|
-
if (builder !== "rolldown") return pluginOption;
|
|
960
|
-
return adaptPluginOption(pluginOption);
|
|
961
|
-
}
|
|
962
|
-
__name(adaptTailwindVitePlugin, "adaptTailwindVitePlugin");
|
|
963
|
-
function adaptPluginOption(pluginOption) {
|
|
964
|
-
if (Array.isArray(pluginOption)) return pluginOption.map(adaptPluginOption);
|
|
965
|
-
if (!pluginOption || typeof pluginOption !== "object") return pluginOption;
|
|
966
|
-
const plugin = pluginOption;
|
|
967
|
-
if (!plugin.name?.startsWith("@tailwindcss/vite:generate:")) return pluginOption;
|
|
968
|
-
if (isVitePluginHook(plugin.transform)) {
|
|
969
|
-
return {
|
|
970
|
-
...plugin,
|
|
971
|
-
transform: withVite5TransformContext(plugin.transform)
|
|
972
|
-
};
|
|
973
|
-
}
|
|
974
|
-
if (plugin.transform && typeof plugin.transform === "object" && "handler" in plugin.transform && isVitePluginHook(plugin.transform.handler)) {
|
|
975
|
-
return {
|
|
976
|
-
...plugin,
|
|
977
|
-
transform: {
|
|
978
|
-
...plugin.transform,
|
|
979
|
-
handler: withVite5TransformContext(plugin.transform.handler)
|
|
980
|
-
}
|
|
981
|
-
};
|
|
982
|
-
}
|
|
983
|
-
return pluginOption;
|
|
984
|
-
}
|
|
985
|
-
__name(adaptPluginOption, "adaptPluginOption");
|
|
986
|
-
function isVitePluginHook(value) {
|
|
987
|
-
return typeof value === "function";
|
|
988
|
-
}
|
|
989
|
-
__name(isVitePluginHook, "isVitePluginHook");
|
|
990
|
-
function withVite5TransformContext(handler) {
|
|
991
|
-
return function(...args) {
|
|
992
|
-
const context = new Proxy(this, {
|
|
993
|
-
get(target, property, receiver) {
|
|
994
|
-
if (property === "environment") return void 0;
|
|
995
|
-
return Reflect.get(target, property, receiver);
|
|
996
|
-
}
|
|
997
|
-
});
|
|
998
|
-
return handler.apply(context, args);
|
|
999
|
-
};
|
|
1000
|
-
}
|
|
1001
|
-
__name(withVite5TransformContext, "withVite5TransformContext");
|
|
1002
|
-
|
|
1003
959
|
// src/nitro/universal-build.ts
|
|
1004
960
|
function preloadFarmNitroBuilder() {
|
|
1005
961
|
return import("nitro/builder").then(
|
|
@@ -2141,15 +2097,10 @@ async function buildClient(productionVite, config, root, srcDir, outputDir, page
|
|
|
2141
2097
|
const postcssConfigPath = path5.join(clientEntryDir, "postcss.config.cjs");
|
|
2142
2098
|
await fs.writeFile(postcssConfigPath, "module.exports = { plugins: [] };\n");
|
|
2143
2099
|
postcssSearchPath = clientEntryDir;
|
|
2144
|
-
|
|
2145
|
-
|
|
2146
|
-
|
|
2147
|
-
|
|
2148
|
-
} catch (error) {
|
|
2149
|
-
logger.warn(
|
|
2150
|
-
`Tailwind plugin auto-enable failed; continuing without it: ${error.message}`
|
|
2151
|
-
);
|
|
2152
|
-
}
|
|
2100
|
+
tailwindVitePlugin = await loadTailwindVitePlugin({
|
|
2101
|
+
builder: productionVite.builder,
|
|
2102
|
+
announce: true
|
|
2103
|
+
});
|
|
2153
2104
|
}
|
|
2154
2105
|
try {
|
|
2155
2106
|
const clientViteConfig = {
|
|
@@ -3054,8 +3005,11 @@ function generateClientHydrationEntry(clientPages, layoutRoutes, clientRouteSlot
|
|
|
3054
3005
|
srcDir,
|
|
3055
3006
|
publicRuntimeConfig
|
|
3056
3007
|
);
|
|
3008
|
+
const appSetupPath = resolveFarmRendererAppSetup(root, renderer);
|
|
3057
3009
|
const rendererClientImports = isReactRenderer(renderer) ? `import React from "react";
|
|
3058
|
-
import { createRoot, hydrateRoot } from "react-dom/client";` : `import React, { createRoot, hydrateRoot } from ${JSON.stringify(renderer.client)}
|
|
3010
|
+
import { createRoot, hydrateRoot } from "react-dom/client";` : appSetupPath ? `import React, { createRoot, hydrateRoot, configureApp as __farmConfigureApp } from ${JSON.stringify(renderer.client)};
|
|
3011
|
+
import __farmAppSetup from ${JSON.stringify(toPosixPath(appSetupPath))};
|
|
3012
|
+
__farmConfigureApp(__farmAppSetup);` : `import React, { createRoot, hydrateRoot } from ${JSON.stringify(renderer.client)};`;
|
|
3059
3013
|
const providerClientCode = generateFarmIntegrationProviderClientCode(
|
|
3060
3014
|
integrationProviders,
|
|
3061
3015
|
root,
|
|
@@ -4456,14 +4410,10 @@ async function buildSSRInMemory(productionVite, config, root, routeManager, apiR
|
|
|
4456
4410
|
path5.join(postcssConfigDir, "postcss.config.cjs"),
|
|
4457
4411
|
"module.exports = { plugins: [] };\n"
|
|
4458
4412
|
);
|
|
4459
|
-
|
|
4460
|
-
|
|
4461
|
-
|
|
4462
|
-
}
|
|
4463
|
-
logger.warn(
|
|
4464
|
-
`Tailwind plugin auto-enable failed for SSR; continuing without it: ${error.message}`
|
|
4465
|
-
);
|
|
4466
|
-
}
|
|
4413
|
+
tailwindVitePlugin = await loadTailwindVitePlugin({
|
|
4414
|
+
builder: productionVite.builder,
|
|
4415
|
+
label: "for SSR"
|
|
4416
|
+
});
|
|
4467
4417
|
}
|
|
4468
4418
|
let ssrBundle;
|
|
4469
4419
|
let ssrEntryFile;
|
|
@@ -5123,6 +5073,17 @@ async function applyFarmPreloadBudget(response, pathname, request) {
|
|
|
5123
5073
|
`.trim();
|
|
5124
5074
|
}
|
|
5125
5075
|
__name(generatePreloadResponseRuntimeSource, "generatePreloadResponseRuntimeSource");
|
|
5076
|
+
function generateFarmRendererAppSetupServerCode(config) {
|
|
5077
|
+
const appSetupPath = resolveFarmRendererAppSetup(config.root || process.cwd(), config.renderer);
|
|
5078
|
+
if (!appSetupPath) return "";
|
|
5079
|
+
return `
|
|
5080
|
+
import __farmAppSetup from ${JSON.stringify(toPosixPath(appSetupPath))};
|
|
5081
|
+
if (typeof ReactDOMServer.configureApp !== "function") {
|
|
5082
|
+
throw new Error(${JSON.stringify(`Renderer \`${config.renderer.name}\` does not support \`appSetup\`: its server module must export configureApp().`)});
|
|
5083
|
+
}
|
|
5084
|
+
ReactDOMServer.configureApp(__farmAppSetup);`;
|
|
5085
|
+
}
|
|
5086
|
+
__name(generateFarmRendererAppSetupServerCode, "generateFarmRendererAppSetupServerCode");
|
|
5126
5087
|
function generateVirtualEntryCode(apiRoutes, pageRoutes, layoutRoutes, routeSlots, errorRoutes, metadataImageRoutes, applicationMetadataRoutes, middlewareRoutes, redirectRoutes, configuredRewriteRoutes, configuredHeaderRoutes, openAPIReference, notFoundPath, instrumentationPath, config, farmDocsPrecompiledManifest, configModulePath, hasServerRuntimeIntegrations, hasRuntimeIntegrationConfig, hasConfiguredRuntimePlugins, hasServerRuntimePlugins, preset, i18nCatalogs, isolatedClientBoundaryModules, hydrationPlanCache) {
|
|
5127
5088
|
const hasCompressionRuntime = config.compress && resolveFarmInstrumentationRuntime(preset) === "nodejs";
|
|
5128
5089
|
const servesAgentRobotsTxt = Boolean(config.agent?.crawlers?.enabled) && !applicationMetadataRoutes.some(
|
|
@@ -5141,7 +5102,7 @@ function generateVirtualEntryCode(apiRoutes, pageRoutes, layoutRoutes, routeSlot
|
|
|
5141
5102
|
getFarmPresetRuntime(preset)
|
|
5142
5103
|
);
|
|
5143
5104
|
const rendererServerImports = isReactRenderer(config.renderer) ? `import * as React from "react";
|
|
5144
|
-
import * as ReactDOMServer from "react-dom/server";${hasIsolatedClientGraphRuntime ? '\nimport { isolateFarmServerPageGraph, wrapFarmIsolatedClientGraph } from "@farm.js/core/internal/isolated-boundary";' : ""}` : `import React, * as ReactDOMServer from ${JSON.stringify(config.renderer.server)}
|
|
5105
|
+
import * as ReactDOMServer from "react-dom/server";${hasIsolatedClientGraphRuntime ? '\nimport { isolateFarmServerPageGraph, wrapFarmIsolatedClientGraph } from "@farm.js/core/internal/isolated-boundary";' : ""}` : `import React, * as ReactDOMServer from ${JSON.stringify(config.renderer.server)};${generateFarmRendererAppSetupServerCode(config)}`;
|
|
5145
5106
|
const routeClientGraphServerRuntime = hasIsolatedClientGraphRuntime ? `function wrapFarmRouteClientGraph(element) {
|
|
5146
5107
|
return wrapFarmIsolatedClientGraph(React, element);
|
|
5147
5108
|
}
|
|
@@ -9421,7 +9382,7 @@ export default async function farmNitroEventHandler(event) {
|
|
|
9421
9382
|
else process.env[FARM_PRERENDER_ENV] = previousPrerender;
|
|
9422
9383
|
}
|
|
9423
9384
|
}
|
|
9424
|
-
const sharpRuntimeStagePromise = imageRuntime === "node" ? stageSharpRuntime(config, root, distDir, fs) : Promise.resolve(null);
|
|
9385
|
+
const sharpRuntimeStagePromise = imageRuntime === "node" ? stageSharpRuntime(config, root, distDir, fs, preset) : Promise.resolve(null);
|
|
9425
9386
|
const [nitroBuildResult, sharpRuntimeStageResult] = await Promise.allSettled([
|
|
9426
9387
|
nitroBuilder.build(nitroInstance),
|
|
9427
9388
|
sharpRuntimeStagePromise
|
|
@@ -9439,7 +9400,7 @@ export default async function farmNitroEventHandler(event) {
|
|
|
9439
9400
|
if (sharpRuntimeStageResult.status === "rejected") {
|
|
9440
9401
|
throw sharpRuntimeStageResult.reason;
|
|
9441
9402
|
}
|
|
9442
|
-
const stagedSharpRuntime = sharpRuntimeStageResult.value ?? (imageRuntime === "node" ? await stageSharpRuntime(config, root, distDir, fs) : null);
|
|
9403
|
+
const stagedSharpRuntime = sharpRuntimeStageResult.value ?? (imageRuntime === "node" ? await stageSharpRuntime(config, root, distDir, fs, preset) : null);
|
|
9443
9404
|
const runtimeCopyPromise = (async () => {
|
|
9444
9405
|
if (stagedSharpRuntime) {
|
|
9445
9406
|
await installStagedSharpRuntime(stagedSharpRuntime, runtimeServerOutputDir, fs);
|
|
@@ -9635,7 +9596,24 @@ async function copyFarmDocsContentForVercel(config, root, nitroFuncDir, fs) {
|
|
|
9635
9596
|
logger.info(`\u{1F4DA} Bundled docs content for Vercel: ${path5.relative(root, docsContentDir)}`);
|
|
9636
9597
|
}
|
|
9637
9598
|
__name(copyFarmDocsContentForVercel, "copyFarmDocsContentForVercel");
|
|
9638
|
-
|
|
9599
|
+
function resolveServerFunctionPlatform(preset) {
|
|
9600
|
+
return preset === "vercel" || preset === "netlify" ? { os: "linux", cpu: "x64", libc: "glibc" } : null;
|
|
9601
|
+
}
|
|
9602
|
+
__name(resolveServerFunctionPlatform, "resolveServerFunctionPlatform");
|
|
9603
|
+
function packageSupportsPlatform(packageJson, platform) {
|
|
9604
|
+
return platformFieldAllows(packageJson.os, platform.os) && platformFieldAllows(packageJson.cpu, platform.cpu) && platformFieldAllows(packageJson.libc, platform.libc);
|
|
9605
|
+
}
|
|
9606
|
+
__name(packageSupportsPlatform, "packageSupportsPlatform");
|
|
9607
|
+
function platformFieldAllows(field, value) {
|
|
9608
|
+
if (!Array.isArray(field)) return true;
|
|
9609
|
+
const entries = field.filter((entry) => typeof entry === "string");
|
|
9610
|
+
if (entries.includes(`!${value}`)) return false;
|
|
9611
|
+
const allowed = entries.filter((entry) => !entry.startsWith("!"));
|
|
9612
|
+
return allowed.length === 0 || allowed.includes(value);
|
|
9613
|
+
}
|
|
9614
|
+
__name(platformFieldAllows, "platformFieldAllows");
|
|
9615
|
+
async function stageSharpRuntime(config, root, distDir, fs, preset) {
|
|
9616
|
+
const functionPlatform = resolveServerFunctionPlatform(preset);
|
|
9639
9617
|
const projectRequire = createRequire(path5.join(root, "package.json"));
|
|
9640
9618
|
let sharpRequire = projectRequire;
|
|
9641
9619
|
if (!resolvePackageJson(projectRequire, "sharp")) {
|
|
@@ -9662,6 +9640,7 @@ async function stageSharpRuntime(config, root, distDir, fs) {
|
|
|
9662
9640
|
const packageJsonPath = resolvePackageJson(parentRequire, packageName);
|
|
9663
9641
|
if (!packageJsonPath) return;
|
|
9664
9642
|
const packageJson = JSON.parse(await fs.readFile(packageJsonPath, "utf8"));
|
|
9643
|
+
if (functionPlatform && !packageSupportsPlatform(packageJson, functionPlatform)) return;
|
|
9665
9644
|
const packageDir = path5.dirname(packageJsonPath);
|
|
9666
9645
|
const targetDir = path5.join(targetNodeModules, ...packageName.split("/"));
|
|
9667
9646
|
copiedPackages.set(packageName, String(packageJson.version || "*"));
|
|
@@ -3,6 +3,7 @@
|
|
|
3
3
|
var _chunkS3JO3N4Hcjs = require('./chunk-S3JO3N4H.cjs');
|
|
4
4
|
|
|
5
5
|
// src/renderer.ts
|
|
6
|
+
var _fs = require('fs'); var _fs2 = _interopRequireDefault(_fs);
|
|
6
7
|
var _module = require('module');
|
|
7
8
|
var _path = require('path'); var _path2 = _interopRequireDefault(_path);
|
|
8
9
|
var _url = require('url');
|
|
@@ -128,6 +129,9 @@ function resolveFarmRenderer(renderer) {
|
|
|
128
129
|
throw new TypeError(`Farm renderer \`${field}\` must be a non-empty string.`);
|
|
129
130
|
}
|
|
130
131
|
}
|
|
132
|
+
if (resolved.appSetup !== void 0 && (typeof resolved.appSetup !== "string" || resolved.appSetup.trim().length === 0)) {
|
|
133
|
+
throw new TypeError("Farm renderer `appSetup` must be a non-empty module path.");
|
|
134
|
+
}
|
|
131
135
|
return {
|
|
132
136
|
...resolved,
|
|
133
137
|
componentExtensions: [...resolved.componentExtensions || []],
|
|
@@ -155,6 +159,15 @@ function isReactRenderer(renderer) {
|
|
|
155
159
|
return !renderer || renderer.name === "react";
|
|
156
160
|
}
|
|
157
161
|
_chunkS3JO3N4Hcjs.__name.call(void 0, isReactRenderer, "isReactRenderer");
|
|
162
|
+
function resolveFarmRendererAppSetup(root, renderer) {
|
|
163
|
+
if (!renderer.appSetup) return null;
|
|
164
|
+
const filePath = _path2.default.resolve(root, renderer.appSetup);
|
|
165
|
+
if (!_fs2.default.existsSync(filePath)) {
|
|
166
|
+
throw new Error(`Renderer \`${renderer.name}\` app setup module was not found: ${filePath}`);
|
|
167
|
+
}
|
|
168
|
+
return filePath;
|
|
169
|
+
}
|
|
170
|
+
_chunkS3JO3N4Hcjs.__name.call(void 0, resolveFarmRendererAppSetup, "resolveFarmRendererAppSetup");
|
|
158
171
|
function resolveFarmRendererModule(root, specifier) {
|
|
159
172
|
const requireFromApp = _module.createRequire.call(void 0, _path2.default.join(_path2.default.resolve(root), "package.json"));
|
|
160
173
|
return requireFromApp.resolve(specifier);
|
|
@@ -203,4 +216,5 @@ _chunkS3JO3N4Hcjs.__name.call(void 0, loadFarmRendererVitePlugins, "loadFarmRend
|
|
|
203
216
|
|
|
204
217
|
|
|
205
218
|
|
|
206
|
-
|
|
219
|
+
|
|
220
|
+
exports.getFarmRendererCapabilities = getFarmRendererCapabilities; exports.getFarmRendererStreamingCapabilitiesForRuntime = getFarmRendererStreamingCapabilitiesForRuntime; exports.assertFarmRendererStreamingRuntime = assertFarmRendererStreamingRuntime; exports.FARM_COMPONENT_EXTENSIONS = FARM_COMPONENT_EXTENSIONS; exports.resolveFarmComponentExtensions = resolveFarmComponentExtensions; exports.getFarmRendererComponentExtensions = getFarmRendererComponentExtensions; exports.REACT_RENDERER = REACT_RENDERER; exports.defineRenderer = defineRenderer; exports.resolveFarmRenderer = resolveFarmRenderer; exports.readFarmRendererWebStream = readFarmRendererWebStream; exports.isReactRenderer = isReactRenderer; exports.resolveFarmRendererAppSetup = resolveFarmRendererAppSetup; exports.resolveFarmRendererModule = resolveFarmRendererModule; exports.loadFarmRendererVitePlugins = loadFarmRendererVitePlugins;
|
|
@@ -6,7 +6,7 @@
|
|
|
6
6
|
var _chunkNBAHDVOJcjs = require('./chunk-NBAHDVOJ.cjs');
|
|
7
7
|
|
|
8
8
|
|
|
9
|
-
var
|
|
9
|
+
var _chunkGXXONIARcjs = require('./chunk-GXXONIAR.cjs');
|
|
10
10
|
|
|
11
11
|
|
|
12
12
|
var _chunk75WGQVQAcjs = require('./chunk-75WGQVQA.cjs');
|
|
@@ -510,7 +510,7 @@ async function resolveAPIContext(options) {
|
|
|
510
510
|
config: options.config,
|
|
511
511
|
configPath: options.configPath
|
|
512
512
|
}));
|
|
513
|
-
const docs = isResolvedDocsConfig(docsInput) ? docsInput : await
|
|
513
|
+
const docs = isResolvedDocsConfig(docsInput) ? docsInput : await _chunkGXXONIARcjs.resolveDocsConfig.call(void 0, docsInput, { root, srcDir });
|
|
514
514
|
return {
|
|
515
515
|
root,
|
|
516
516
|
srcDir,
|
|
@@ -23,7 +23,7 @@ var _chunkTIWHTW3Qcjs = require('./chunk-TIWHTW3Q.cjs');
|
|
|
23
23
|
var _chunkY4YMF2NQcjs = require('./chunk-Y4YMF2NQ.cjs');
|
|
24
24
|
|
|
25
25
|
|
|
26
|
-
var
|
|
26
|
+
var _chunkPSV6XKPOcjs = require('./chunk-PSV6XKPO.cjs');
|
|
27
27
|
|
|
28
28
|
|
|
29
29
|
var _chunkN4RLRSWWcjs = require('./chunk-N4RLRSWW.cjs');
|
|
@@ -779,7 +779,7 @@ _chunkS3JO3N4Hcjs.__name.call(void 0, generateRouteTypes, "generateRouteTypes");
|
|
|
779
779
|
async function createRouteTypeDeclarations(options, outPath) {
|
|
780
780
|
const { root, srcDir = "src", extraRoutes = [], suppressLintOnLink = false } = options;
|
|
781
781
|
const sourceRoots = _nullishCoalesce(options.sourceRoots, () => ( [{ name: "project", root, srcDir, layer: false }]));
|
|
782
|
-
const componentExtensions =
|
|
782
|
+
const componentExtensions = _chunkPSV6XKPOcjs.resolveFarmComponentExtensions.call(void 0, options.componentExtensions).map(
|
|
783
783
|
(extension) => extension.slice(1)
|
|
784
784
|
);
|
|
785
785
|
const patterns = /* @__PURE__ */ new Set();
|
|
@@ -1,12 +1,12 @@
|
|
|
1
1
|
"use strict";Object.defineProperty(exports, "__esModule", {value: true}); function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; } function _optionalChain(ops) { let lastAccessLHS = undefined; let value = ops[0]; let i = 1; while (i < ops.length) { const op = ops[i]; const fn = ops[i + 1]; i += 2; if ((op === 'optionalAccess' || op === 'optionalCall') && value == null) { return undefined; } if (op === 'access' || op === 'optionalAccess') { lastAccessLHS = value; value = fn(value); } else if (op === 'call' || op === 'optionalCall') { value = fn((...args) => value.call(lastAccessLHS, ...args)); lastAccessLHS = undefined; } } return value; }
|
|
2
2
|
|
|
3
|
-
var
|
|
3
|
+
var _chunkGXXONIARcjs = require('./chunk-GXXONIAR.cjs');
|
|
4
4
|
require('./chunk-KR6CKSXT.cjs');
|
|
5
5
|
require('./chunk-QBPXNZGV.cjs');
|
|
6
6
|
require('./chunk-YJRZR7VU.cjs');
|
|
7
7
|
require('./chunk-Q5B3KJBP.cjs');
|
|
8
8
|
require('./chunk-Y4YMF2NQ.cjs');
|
|
9
|
-
require('./chunk-
|
|
9
|
+
require('./chunk-PSV6XKPO.cjs');
|
|
10
10
|
require('./chunk-ISTFC3MZ.cjs');
|
|
11
11
|
require('./chunk-YFPGHF5F.cjs');
|
|
12
12
|
|
|
@@ -274,7 +274,7 @@ async function createFarmDevtoolsSnapshot(input) {
|
|
|
274
274
|
}));
|
|
275
275
|
const deploymentPreset = String(_optionalChain([config, 'access', _10 => _10.deploy, 'optionalAccess', _11 => _11.preset]) || config.preset || "node-server");
|
|
276
276
|
const deploymentTarget = String(
|
|
277
|
-
_optionalChain([config, 'access', _12 => _12.deploy, 'optionalAccess', _13 => _13.target]) ||
|
|
277
|
+
_optionalChain([config, 'access', _12 => _12.deploy, 'optionalAccess', _13 => _13.target]) || _chunkGXXONIARcjs.getDeployTargetForPreset.call(void 0, deploymentPreset) || "node"
|
|
278
278
|
);
|
|
279
279
|
const env = input.env || process.env;
|
|
280
280
|
if (pageRoutes.length === 0) {
|
|
@@ -1,12 +1,12 @@
|
|
|
1
1
|
import {
|
|
2
2
|
getDeployTargetForPreset
|
|
3
|
-
} from "./chunk-
|
|
3
|
+
} from "./chunk-SPSQFO3Z.mjs";
|
|
4
4
|
import "./chunk-XZNTNMHT.mjs";
|
|
5
5
|
import "./chunk-FZC7EEPM.mjs";
|
|
6
6
|
import "./chunk-JBSVKMC5.mjs";
|
|
7
7
|
import "./chunk-GHFS7RUB.mjs";
|
|
8
8
|
import "./chunk-IILNZK5G.mjs";
|
|
9
|
-
import "./chunk-
|
|
9
|
+
import "./chunk-DAATZTKJ.mjs";
|
|
10
10
|
import "./chunk-7BC6GAL7.mjs";
|
|
11
11
|
import "./chunk-G2KY33I6.mjs";
|
|
12
12
|
import {
|
package/dist/docs.cjs
CHANGED
|
@@ -4,7 +4,7 @@
|
|
|
4
4
|
|
|
5
5
|
|
|
6
6
|
|
|
7
|
-
var
|
|
7
|
+
var _chunkQ3PX2TGLcjs = require('./chunk-Q3PX2TGL.cjs');
|
|
8
8
|
|
|
9
9
|
|
|
10
10
|
|
|
@@ -16,7 +16,7 @@ var _chunkZE6ONQ5Rcjs = require('./chunk-ZE6ONQ5R.cjs');
|
|
|
16
16
|
var _chunkNBAHDVOJcjs = require('./chunk-NBAHDVOJ.cjs');
|
|
17
17
|
require('./chunk-MWWVKDW3.cjs');
|
|
18
18
|
require('./chunk-KGZIORNL.cjs');
|
|
19
|
-
require('./chunk-
|
|
19
|
+
require('./chunk-GXXONIAR.cjs');
|
|
20
20
|
require('./chunk-KR6CKSXT.cjs');
|
|
21
21
|
require('./chunk-75WGQVQA.cjs');
|
|
22
22
|
require('./chunk-HREOKQWT.cjs');
|
|
@@ -24,7 +24,7 @@ require('./chunk-QBPXNZGV.cjs');
|
|
|
24
24
|
require('./chunk-YJRZR7VU.cjs');
|
|
25
25
|
require('./chunk-Q5B3KJBP.cjs');
|
|
26
26
|
require('./chunk-Y4YMF2NQ.cjs');
|
|
27
|
-
require('./chunk-
|
|
27
|
+
require('./chunk-PSV6XKPO.cjs');
|
|
28
28
|
require('./chunk-ISTFC3MZ.cjs');
|
|
29
29
|
require('./chunk-YFPGHF5F.cjs');
|
|
30
30
|
require('./chunk-6EXBPJ24.cjs');
|
|
@@ -70,4 +70,4 @@ require('./chunk-S3JO3N4H.cjs');
|
|
|
70
70
|
|
|
71
71
|
|
|
72
72
|
|
|
73
|
-
exports.createDocsAPI =
|
|
73
|
+
exports.createDocsAPI = _chunkQ3PX2TGLcjs.createDocsAPI; exports.createFarmDocsAPIHandler = _chunkQ3PX2TGLcjs.createFarmDocsAPIHandler; exports.createFarmDocsAdapterHandler = _chunkQ3PX2TGLcjs.createFarmDocsAdapterHandler; exports.createFarmDocsHandler = _chunkNBAHDVOJcjs.createFarmDocsHandler; exports.discoverFarmDocsPages = _chunkNBAHDVOJcjs.discoverFarmDocsPages; exports.getFarmDocsDocumentNavigationMatchers = _chunkNBAHDVOJcjs.getFarmDocsDocumentNavigationMatchers; exports.getFarmDocsRouteTypeEntries = _chunkNBAHDVOJcjs.getFarmDocsRouteTypeEntries; exports.hasFarmDocsRuntimeAdapter = _chunkQ3PX2TGLcjs.hasFarmDocsRuntimeAdapter; exports.isFarmDocsAPIRequest = _chunkQ3PX2TGLcjs.isFarmDocsAPIRequest; exports.isFarmDocsRequest = _chunkNBAHDVOJcjs.isFarmDocsRequest; exports.loadFarmDocsPage = _chunkNBAHDVOJcjs.loadFarmDocsPage; exports.resolveFarmDocsContentDir = _chunkNBAHDVOJcjs.resolveFarmDocsContentDir;
|
package/dist/docs.mjs
CHANGED
|
@@ -4,7 +4,7 @@ import {
|
|
|
4
4
|
createFarmDocsAdapterHandler,
|
|
5
5
|
hasFarmDocsRuntimeAdapter,
|
|
6
6
|
isFarmDocsAPIRequest
|
|
7
|
-
} from "./chunk-
|
|
7
|
+
} from "./chunk-ONMW3EVV.mjs";
|
|
8
8
|
import {
|
|
9
9
|
createFarmDocsHandler,
|
|
10
10
|
discoverFarmDocsPages,
|
|
@@ -16,7 +16,7 @@ import {
|
|
|
16
16
|
} from "./chunk-HSDL2AUR.mjs";
|
|
17
17
|
import "./chunk-UP4CW6WP.mjs";
|
|
18
18
|
import "./chunk-TFQG7TBC.mjs";
|
|
19
|
-
import "./chunk-
|
|
19
|
+
import "./chunk-SPSQFO3Z.mjs";
|
|
20
20
|
import "./chunk-XZNTNMHT.mjs";
|
|
21
21
|
import "./chunk-VVBO3QH7.mjs";
|
|
22
22
|
import "./chunk-TVGP4BBZ.mjs";
|
|
@@ -24,7 +24,7 @@ import "./chunk-FZC7EEPM.mjs";
|
|
|
24
24
|
import "./chunk-JBSVKMC5.mjs";
|
|
25
25
|
import "./chunk-GHFS7RUB.mjs";
|
|
26
26
|
import "./chunk-IILNZK5G.mjs";
|
|
27
|
-
import "./chunk-
|
|
27
|
+
import "./chunk-DAATZTKJ.mjs";
|
|
28
28
|
import "./chunk-7BC6GAL7.mjs";
|
|
29
29
|
import "./chunk-G2KY33I6.mjs";
|
|
30
30
|
import "./chunk-YHOCRI4H.mjs";
|