@farm.js/core 0.1.30 → 0.1.31
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-markdown.cjs +4 -4
- package/dist/app-markdown.mjs +3 -3
- package/dist/{chunk-Q5JFU33Q.cjs → chunk-2FXWWUE5.cjs} +4 -4
- package/dist/{chunk-6G3ZZ2IE.mjs → chunk-5LJCOSKT.mjs} +1 -1
- package/dist/{chunk-S4K74WI4.mjs → chunk-6L6DQR5W.mjs} +7 -7
- package/dist/{chunk-YMUE7L3D.mjs → chunk-6VYZOPOT.mjs} +1 -1
- package/dist/{chunk-BZ3CHOFX.mjs → chunk-7QOCTYBS.mjs} +1 -1
- package/dist/{chunk-PQD2AI3B.mjs → chunk-AHAJGAYD.mjs} +1 -1
- package/dist/{chunk-XLTV4VOG.cjs → chunk-CUMINO7Z.cjs} +4 -4
- package/dist/{chunk-JFHKNFEO.cjs → chunk-DFLLARUK.cjs} +10 -10
- package/dist/{chunk-7CXKSRKL.mjs → chunk-FJZ3DQLK.mjs} +2 -2
- package/dist/{chunk-BZAGKCKB.cjs → chunk-FYRBX5IY.cjs} +2 -2
- package/dist/{chunk-HPQC2LHF.cjs → chunk-IFI5FXEZ.cjs} +80 -72
- package/dist/{chunk-GIWC4CFJ.cjs → chunk-IMB4PIAR.cjs} +72 -72
- package/dist/{chunk-ATXI6LGT.mjs → chunk-JBC2FKRW.mjs} +6 -3
- package/dist/{chunk-6CNX6Q3K.cjs → chunk-KJ2TIHZZ.cjs} +6 -3
- package/dist/{chunk-ZDILFMWN.cjs → chunk-MXDTKXO6.cjs} +13 -13
- package/dist/{chunk-D234YWNA.mjs → chunk-TEN4FIZU.mjs} +1 -1
- package/dist/{chunk-2UABTL3Y.mjs → chunk-UAFSBWNT.mjs} +2 -2
- package/dist/{chunk-K6V52QMI.mjs → chunk-VA62MHFV.mjs} +1 -1
- package/dist/{chunk-X5TXZFMN.cjs → chunk-VYZSOYR4.cjs} +1 -1
- package/dist/{chunk-IVLUJUT4.mjs → chunk-WG2KHOMN.mjs} +16 -8
- package/dist/{chunk-NXG66MR7.cjs → chunk-X7KZBF63.cjs} +3 -3
- package/dist/{chunk-NPPL5YDT.cjs → chunk-YVGAEAA5.cjs} +2 -2
- package/dist/{devtools-THVNPI2M.mjs → devtools-BPBCYOU6.mjs} +3 -3
- package/dist/{devtools-GGVPZHJX.cjs → devtools-EWRDHCD5.cjs} +4 -4
- package/dist/docs.cjs +6 -6
- package/dist/docs.mjs +5 -5
- package/dist/index.cjs +12 -12
- package/dist/index.mjs +11 -11
- package/dist/internal/app-markdown-runtime.cjs +3 -3
- package/dist/internal/app-markdown-runtime.mjs +2 -2
- package/dist/internal/build-runtime.cjs +12 -12
- package/dist/internal/build-runtime.mjs +11 -11
- package/dist/internal/cli-runtime.cjs +5 -5
- package/dist/internal/cli-runtime.mjs +4 -4
- package/dist/internal/client-error-overlay.cjs +4 -4
- package/dist/internal/client-error-overlay.mjs +1 -1
- package/dist/internal/config-runtime.cjs +4 -4
- package/dist/internal/config-runtime.mjs +3 -3
- package/dist/internal/product-telemetry-runtime.cjs +2 -2
- package/dist/internal/product-telemetry-runtime.mjs +1 -1
- package/dist/internal/production-runtime.cjs +4 -4
- package/dist/internal/production-runtime.mjs +3 -3
- package/dist/markdown.cjs +2 -2
- package/dist/markdown.mjs +1 -1
- package/dist/plugin.cjs +8 -8
- package/dist/plugin.mjs +7 -7
- package/dist/server.cjs +25 -25
- package/dist/server.mjs +8 -8
- package/dist/version.cjs +2 -2
- package/dist/version.mjs +1 -1
- package/dist/vite.cjs +8 -8
- package/dist/vite.mjs +7 -7
- package/package.json +1 -1
|
@@ -27,7 +27,7 @@ var _chunkJSROZYYOcjs = require('./chunk-JSROZYYO.cjs');
|
|
|
27
27
|
|
|
28
28
|
|
|
29
29
|
|
|
30
|
-
var
|
|
30
|
+
var _chunkYVGAEAA5cjs = require('./chunk-YVGAEAA5.cjs');
|
|
31
31
|
|
|
32
32
|
|
|
33
33
|
var _chunkCXP5U3RWcjs = require('./chunk-CXP5U3RW.cjs');
|
|
@@ -108,7 +108,7 @@ var _chunkPSV6XKPOcjs = require('./chunk-PSV6XKPO.cjs');
|
|
|
108
108
|
|
|
109
109
|
|
|
110
110
|
|
|
111
|
-
var
|
|
111
|
+
var _chunkCUMINO7Zcjs = require('./chunk-CUMINO7Z.cjs');
|
|
112
112
|
|
|
113
113
|
|
|
114
114
|
|
|
@@ -126,12 +126,12 @@ var _chunkVEKFLAQMcjs = require('./chunk-VEKFLAQM.cjs');
|
|
|
126
126
|
|
|
127
127
|
|
|
128
128
|
|
|
129
|
-
var
|
|
129
|
+
var _chunkFYRBX5IYcjs = require('./chunk-FYRBX5IY.cjs');
|
|
130
130
|
|
|
131
131
|
|
|
132
132
|
|
|
133
133
|
|
|
134
|
-
var
|
|
134
|
+
var _chunkX7KZBF63cjs = require('./chunk-X7KZBF63.cjs');
|
|
135
135
|
|
|
136
136
|
|
|
137
137
|
|
|
@@ -145,7 +145,7 @@ var _chunkOHY2ZWUGcjs = require('./chunk-OHY2ZWUG.cjs');
|
|
|
145
145
|
|
|
146
146
|
|
|
147
147
|
|
|
148
|
-
var
|
|
148
|
+
var _chunkKJ2TIHZZcjs = require('./chunk-KJ2TIHZZ.cjs');
|
|
149
149
|
|
|
150
150
|
|
|
151
151
|
var _chunkMPEYMSCFcjs = require('./chunk-MPEYMSCF.cjs');
|
|
@@ -285,7 +285,7 @@ var _chunkE3UK5IIBcjs = require('./chunk-E3UK5IIB.cjs');
|
|
|
285
285
|
var _chunkUQZ4AYTHcjs = require('./chunk-UQZ4AYTH.cjs');
|
|
286
286
|
|
|
287
287
|
|
|
288
|
-
var
|
|
288
|
+
var _chunkVYZSOYR4cjs = require('./chunk-VYZSOYR4.cjs');
|
|
289
289
|
|
|
290
290
|
|
|
291
291
|
|
|
@@ -2242,7 +2242,7 @@ var _RouteManager = class _RouteManager {
|
|
|
2242
2242
|
);
|
|
2243
2243
|
const routeEntries = Array.from(this.routes.values()).map((entry) => ({
|
|
2244
2244
|
entry,
|
|
2245
|
-
metadata:
|
|
2245
|
+
metadata: _chunkX7KZBF63cjs.isFarmMarkdownPageFile.call(void 0, entry.modulePath) ? markdownPagePlan() : getClientModuleHydrationPlan(
|
|
2246
2246
|
entry.modulePath,
|
|
2247
2247
|
normalizedProjectRoot,
|
|
2248
2248
|
isolatedMode,
|
|
@@ -2250,7 +2250,7 @@ var _RouteManager = class _RouteManager {
|
|
|
2250
2250
|
)
|
|
2251
2251
|
}));
|
|
2252
2252
|
const markdownFallback = routeEntries.find(
|
|
2253
|
-
({ entry, metadata }) =>
|
|
2253
|
+
({ entry, metadata }) => _chunkX7KZBF63cjs.isFarmMarkdownPageFile.call(void 0, entry.modulePath) && metadata.fallbackReason
|
|
2254
2254
|
);
|
|
2255
2255
|
if (markdownFallback) {
|
|
2256
2256
|
_chunk5QIKR7RRcjs.logger.warn(
|
|
@@ -2258,7 +2258,7 @@ var _RouteManager = class _RouteManager {
|
|
|
2258
2258
|
);
|
|
2259
2259
|
}
|
|
2260
2260
|
const markdownStaticPackages = _optionalChain([routeEntries, 'access', _120 => _120.find, 'call', _121 => _121(
|
|
2261
|
-
({ entry, metadata }) =>
|
|
2261
|
+
({ entry, metadata }) => _chunkX7KZBF63cjs.isFarmMarkdownPageFile.call(void 0, entry.modulePath) && metadata.staticPackageBoundaries
|
|
2262
2262
|
), 'optionalAccess', _122 => _122.metadata, 'access', _123 => _123.staticPackageBoundaries]);
|
|
2263
2263
|
if (markdownStaticPackages) {
|
|
2264
2264
|
_chunk5QIKR7RRcjs.logger.info(
|
|
@@ -2266,7 +2266,7 @@ var _RouteManager = class _RouteManager {
|
|
|
2266
2266
|
);
|
|
2267
2267
|
}
|
|
2268
2268
|
for (const { entry, metadata } of [...layoutEntries, ...routeEntries]) {
|
|
2269
|
-
if (
|
|
2269
|
+
if (_chunkX7KZBF63cjs.isFarmMarkdownPageFile.call(void 0, entry.modulePath) || !metadata.staticPackageBoundaries) continue;
|
|
2270
2270
|
_chunk5QIKR7RRcjs.logger.info(
|
|
2271
2271
|
`[Farm.js] ${entry.pattern} is async, so it renders client components from ${metadata.staticPackageBoundaries.join(", ")} as static HTML: package client components cannot be isolated yet.`
|
|
2272
2272
|
);
|
|
@@ -2418,13 +2418,13 @@ var _RouteManager = class _RouteManager {
|
|
|
2418
2418
|
const { createRouteModuleFromProgrammaticPage } = await import("./routes.cjs");
|
|
2419
2419
|
return createRouteModuleFromProgrammaticPage(programmaticPage, this.rendererRuntime);
|
|
2420
2420
|
}
|
|
2421
|
-
if (
|
|
2421
|
+
if (_chunkX7KZBF63cjs.isFarmMarkdownPageFile.call(void 0, modulePath)) {
|
|
2422
2422
|
const mdxConfig = _chunkOHY2ZWUGcjs.resolveMdxConfig.call(void 0, this.config.mdx);
|
|
2423
|
-
const components = await
|
|
2423
|
+
const components = await _chunkFYRBX5IYcjs.loadFarmMdxComponents.call(void 0, mdxConfig, {
|
|
2424
2424
|
root: this.config.root,
|
|
2425
2425
|
loadModule: this.viteServer ? (componentModulePath) => _chunkBMWDEBXOcjs.loadFarmDevModule.call(void 0, this.viteServer, componentModulePath) : void 0
|
|
2426
2426
|
});
|
|
2427
|
-
return await
|
|
2427
|
+
return await _chunkFYRBX5IYcjs.createFarmMarkdownRouteModuleFromFile.call(void 0, modulePath, {
|
|
2428
2428
|
components,
|
|
2429
2429
|
config: mdxConfig
|
|
2430
2430
|
});
|
|
@@ -2531,8 +2531,8 @@ var _RouteManager = class _RouteManager {
|
|
|
2531
2531
|
}
|
|
2532
2532
|
}
|
|
2533
2533
|
for (const [pattern, group] of canonicalPageGroups) {
|
|
2534
|
-
const componentFiles = group.files.filter((file) => !
|
|
2535
|
-
const markdownFiles = group.files.filter(
|
|
2534
|
+
const componentFiles = group.files.filter((file) => !_chunkX7KZBF63cjs.isFarmMarkdownPageFile.call(void 0, file));
|
|
2535
|
+
const markdownFiles = group.files.filter(_chunkX7KZBF63cjs.isFarmMarkdownPageFile);
|
|
2536
2536
|
if (componentFiles.length > 1) {
|
|
2537
2537
|
throw new Error(
|
|
2538
2538
|
`Duplicate page route "${pattern}". Found ${componentFiles.map((file) => path9.default.join(appDir, file)).join(" and ")}.`
|
|
@@ -4691,7 +4691,7 @@ _chunkS3JO3N4Hcjs.__name.call(void 0, appendResponseVary, "appendResponseVary");
|
|
|
4691
4691
|
function renderI18nAlternateLinks(requestPath, snapshot, options) {
|
|
4692
4692
|
if (snapshot.routing === "none") return "";
|
|
4693
4693
|
const url = new URL(requestPath, "http://farm.local");
|
|
4694
|
-
return
|
|
4694
|
+
return _chunkYVGAEAA5cjs.renderFarmLocaleAlternateLinks.call(void 0, url.pathname, snapshot, options);
|
|
4695
4695
|
}
|
|
4696
4696
|
_chunkS3JO3N4Hcjs.__name.call(void 0, renderI18nAlternateLinks, "renderI18nAlternateLinks");
|
|
4697
4697
|
var PPR_REFRESH_MAX_ATTEMPTS = 3;
|
|
@@ -4830,7 +4830,7 @@ var _ServerRenderer = class _ServerRenderer {
|
|
|
4830
4830
|
this.routeManager = routeManager;
|
|
4831
4831
|
this.i18nRuntime = i18nRuntime;
|
|
4832
4832
|
this.viteServer = viteServer;
|
|
4833
|
-
this.security =
|
|
4833
|
+
this.security = _chunkCUMINO7Zcjs.resolveFarmSecurityConfig.call(void 0, config.security);
|
|
4834
4834
|
this.loadSSGManifest();
|
|
4835
4835
|
}
|
|
4836
4836
|
async initialize() {
|
|
@@ -5329,10 +5329,10 @@ var _ServerRenderer = class _ServerRenderer {
|
|
|
5329
5329
|
if (this.viteServer) await this.applyRendererAppSetup();
|
|
5330
5330
|
_chunkI57LW5VZcjs.setFarmBasePath.call(void 0, this.config.basePath);
|
|
5331
5331
|
_chunkOYEUREB6cjs.setFarmTrailingSlashPreference.call(void 0, this.config.trailingSlash);
|
|
5332
|
-
const cspNonce =
|
|
5332
|
+
const cspNonce = _chunkCUMINO7Zcjs.createFarmCspNonce.call(void 0, this.security);
|
|
5333
5333
|
if (cspNonce) {
|
|
5334
5334
|
req.__FARM_CSP_NONCE__ = cspNonce;
|
|
5335
|
-
const header =
|
|
5335
|
+
const header = _chunkCUMINO7Zcjs.getFarmSecurityHeader.call(void 0, this.security, cspNonce);
|
|
5336
5336
|
res.setHeader(header.key, header.value);
|
|
5337
5337
|
}
|
|
5338
5338
|
const request2 = _chunk5ZSWG4UXcjs.createWebRequestFromFarmRequest.call(void 0, req, {
|
|
@@ -5915,7 +5915,7 @@ var _ServerRenderer = class _ServerRenderer {
|
|
|
5915
5915
|
}
|
|
5916
5916
|
}
|
|
5917
5917
|
_chunkE3UK5IIBcjs.emitFarmEvent.call(void 0, { type: "render.error", route: pathname, error });
|
|
5918
|
-
const errorStatus =
|
|
5918
|
+
const errorStatus = _chunkYVGAEAA5cjs.resolveDefaultErrorStatus.call(void 0, error);
|
|
5919
5919
|
if (pprRefreshRoute) {
|
|
5920
5920
|
_chunkE3UK5IIBcjs.emitFarmEvent.call(void 0, {
|
|
5921
5921
|
type: "ppr.refresh.error",
|
|
@@ -6059,7 +6059,7 @@ var _ServerRenderer = class _ServerRenderer {
|
|
|
6059
6059
|
);
|
|
6060
6060
|
metadata = _chunk3LUF2PE2cjs.addMetadataMarkdownAlternate.call(void 0,
|
|
6061
6061
|
metadata,
|
|
6062
|
-
|
|
6062
|
+
_chunkKJ2TIHZZcjs.getFarmMarkdownAlternatePath.call(void 0, _chunkKJ2TIHZZcjs.resolveMarkdownConfig.call(void 0, this.config.md), publicPathname)
|
|
6063
6063
|
);
|
|
6064
6064
|
return metadata;
|
|
6065
6065
|
}
|
|
@@ -6131,11 +6131,11 @@ var _ServerRenderer = class _ServerRenderer {
|
|
|
6131
6131
|
path: match.routePath,
|
|
6132
6132
|
...llmsContext
|
|
6133
6133
|
}) : routeModule.default;
|
|
6134
|
-
const body = match.metadata.kind === "llms-full" && !(value instanceof Response) ? await
|
|
6134
|
+
const body = match.metadata.kind === "llms-full" && !(value instanceof Response) ? await _chunkCUMINO7Zcjs.renderFarmLlmsFullTxt.call(void 0, value, {
|
|
6135
6135
|
origin: url.origin,
|
|
6136
6136
|
readMarkdown: llmsContext.markdown
|
|
6137
6137
|
}) : value;
|
|
6138
|
-
const response =
|
|
6138
|
+
const response = _chunkYVGAEAA5cjs.createFarmMetadataRouteResponse.call(void 0, match.metadata.kind, body, routeModule, {
|
|
6139
6139
|
method,
|
|
6140
6140
|
request: request2
|
|
6141
6141
|
});
|
|
@@ -6153,7 +6153,7 @@ var _ServerRenderer = class _ServerRenderer {
|
|
|
6153
6153
|
}
|
|
6154
6154
|
/** `/llms.txt` and `/llms-full.txt` from `agent.llmsTxt` when no file route owns them. */
|
|
6155
6155
|
getGeneratedLlmsKind(pathname) {
|
|
6156
|
-
const config =
|
|
6156
|
+
const config = _chunkCUMINO7Zcjs.resolveFarmLlmsTxtConfig.call(void 0, _optionalChain([this, 'access', _200 => _200.config, 'access', _201 => _201.agent, 'optionalAccess', _202 => _202.llmsTxt]));
|
|
6157
6157
|
if (!config.enabled) return null;
|
|
6158
6158
|
if (pathname === "/llms.txt") return "llms";
|
|
6159
6159
|
return pathname === "/llms-full.txt" && config.full ? "llms-full" : null;
|
|
@@ -6163,15 +6163,15 @@ var _ServerRenderer = class _ServerRenderer {
|
|
|
6163
6163
|
const request2 = _chunk5ZSWG4UXcjs.createWebRequestFromFarmRequest.call(void 0, req, {
|
|
6164
6164
|
trustProxy: _optionalChain([this, 'access', _203 => _203.config, 'access', _204 => _204.server, 'optionalAccess', _205 => _205.trustProxy])
|
|
6165
6165
|
});
|
|
6166
|
-
const config =
|
|
6166
|
+
const config = _chunkCUMINO7Zcjs.resolveFarmLlmsTxtConfig.call(void 0, _optionalChain([this, 'access', _206 => _206.config, 'access', _207 => _207.agent, 'optionalAccess', _208 => _208.llmsTxt]));
|
|
6167
6167
|
const context = await this.createLlmsTxtContext(request2, { full: kind === "llms-full", req });
|
|
6168
|
-
const body = kind === "llms-full" ? await
|
|
6168
|
+
const body = kind === "llms-full" ? await _chunkCUMINO7Zcjs.renderFarmLlmsFullTxt.call(void 0, context.defaults, {
|
|
6169
6169
|
origin: new URL(request2.url).origin,
|
|
6170
6170
|
readMarkdown: context.markdown
|
|
6171
6171
|
}) : context.defaults;
|
|
6172
6172
|
await _chunkUQZ4AYTHcjs.sendWebResponse.call(void 0,
|
|
6173
6173
|
res,
|
|
6174
|
-
|
|
6174
|
+
_chunkYVGAEAA5cjs.createFarmMetadataRouteResponse.call(void 0,
|
|
6175
6175
|
kind,
|
|
6176
6176
|
body,
|
|
6177
6177
|
{ revalidate: config.revalidate },
|
|
@@ -6190,7 +6190,7 @@ var _ServerRenderer = class _ServerRenderer {
|
|
|
6190
6190
|
}
|
|
6191
6191
|
}
|
|
6192
6192
|
getAgentCrawlers() {
|
|
6193
|
-
return
|
|
6193
|
+
return _chunkCUMINO7Zcjs.resolveFarmAgentCrawlers.call(void 0, _optionalChain([this, 'access', _209 => _209.config, 'access', _210 => _210.agent, 'optionalAccess', _211 => _211.crawlers]));
|
|
6194
6194
|
}
|
|
6195
6195
|
/** `/robots.txt` from `agent.crawlers` when no robots.ts owns it. */
|
|
6196
6196
|
async renderGeneratedRobotsTxt(req, res) {
|
|
@@ -6198,7 +6198,7 @@ var _ServerRenderer = class _ServerRenderer {
|
|
|
6198
6198
|
const sitemapPath = _optionalChain([this, 'access', _212 => _212.routeManager, 'access', _213 => _213.matchMetadataRoute, 'call', _214 => _214("/sitemap.xml"), 'optionalAccess', _215 => _215.metadata, 'access', _216 => _216.kind]) === "sitemap" ? "/sitemap.xml" : void 0;
|
|
6199
6199
|
const rootLayout = this.routeManager.getLayouts().get("/");
|
|
6200
6200
|
const rootMetadata = sitemapPath && rootLayout ? (await this.routeManager.loadLayoutModule(rootLayout.modulePath)).metadata : void 0;
|
|
6201
|
-
const robots =
|
|
6201
|
+
const robots = _chunkCUMINO7Zcjs.createFarmAgentRobots.call(void 0, {
|
|
6202
6202
|
crawlers: this.getAgentCrawlers(),
|
|
6203
6203
|
sitemapPath,
|
|
6204
6204
|
metadataBase: _optionalChain([rootMetadata, 'optionalAccess', _217 => _217.metadataBase]),
|
|
@@ -6206,7 +6206,7 @@ var _ServerRenderer = class _ServerRenderer {
|
|
|
6206
6206
|
});
|
|
6207
6207
|
await _chunkUQZ4AYTHcjs.sendWebResponse.call(void 0,
|
|
6208
6208
|
res,
|
|
6209
|
-
|
|
6209
|
+
_chunkYVGAEAA5cjs.createFarmMetadataRouteResponse.call(void 0, "robots", robots, {}, { method: req.method })
|
|
6210
6210
|
);
|
|
6211
6211
|
} catch (error) {
|
|
6212
6212
|
_chunk5QIKR7RRcjs.logger.error(`Generated robots.txt failed: ${error}`);
|
|
@@ -6221,7 +6221,7 @@ var _ServerRenderer = class _ServerRenderer {
|
|
|
6221
6221
|
}
|
|
6222
6222
|
/** Same inputs the production server gives llms.txt: static pages and root metadata. */
|
|
6223
6223
|
async createLlmsTxtContext(request2, options = {}) {
|
|
6224
|
-
const config =
|
|
6224
|
+
const config = _chunkCUMINO7Zcjs.resolveFarmLlmsTxtConfig.call(void 0, _optionalChain([this, 'access', _218 => _218.config, 'access', _219 => _219.agent, 'optionalAccess', _220 => _220.llmsTxt]));
|
|
6225
6225
|
const origin = new URL(request2.url).origin;
|
|
6226
6226
|
const staticRoutes = [...this.routeManager.getRoutes()].filter(
|
|
6227
6227
|
([pattern]) => !pattern.includes("[")
|
|
@@ -6239,16 +6239,16 @@ var _ServerRenderer = class _ServerRenderer {
|
|
|
6239
6239
|
);
|
|
6240
6240
|
const rootLayout = this.routeManager.getLayouts().get("/");
|
|
6241
6241
|
const rootMetadata = rootLayout ? (await this.routeManager.loadLayoutModule(rootLayout.modulePath)).metadata : void 0;
|
|
6242
|
-
const pages =
|
|
6242
|
+
const pages = _chunkCUMINO7Zcjs.collectFarmLlmsTxtPages.call(void 0, sources, {
|
|
6243
6243
|
origin,
|
|
6244
6244
|
basePath: this.config.basePath,
|
|
6245
|
-
markdown:
|
|
6245
|
+
markdown: _chunkKJ2TIHZZcjs.resolveMarkdownConfig.call(void 0, this.config.md),
|
|
6246
6246
|
include: config.include,
|
|
6247
6247
|
exclude: config.exclude
|
|
6248
6248
|
});
|
|
6249
6249
|
return {
|
|
6250
6250
|
pages,
|
|
6251
|
-
defaults:
|
|
6251
|
+
defaults: _chunkCUMINO7Zcjs.createFarmDefaultLlmsTxt.call(void 0, { origin, pages, config, rootMetadata }),
|
|
6252
6252
|
...options.full ? { markdown: this.createDevMarkdownReader(options.req) } : {}
|
|
6253
6253
|
};
|
|
6254
6254
|
}
|
|
@@ -6268,11 +6268,11 @@ var _ServerRenderer = class _ServerRenderer {
|
|
|
6268
6268
|
}
|
|
6269
6269
|
if (socket.encrypted) {
|
|
6270
6270
|
const address = { host: socket.localAddress, port: socket.localPort };
|
|
6271
|
-
return
|
|
6271
|
+
return _chunkCUMINO7Zcjs.createFarmLlmsMarkdownReader.call(void 0, (page) => requestOwnHttpsServer(page, address));
|
|
6272
6272
|
}
|
|
6273
6273
|
const host = socket.localAddress.includes(":") ? `[${socket.localAddress}]` : socket.localAddress;
|
|
6274
6274
|
const localOrigin = `http://${host}:${socket.localPort}`;
|
|
6275
|
-
const read =
|
|
6275
|
+
const read = _chunkCUMINO7Zcjs.createFarmLlmsMarkdownReader.call(void 0, (page) => fetch(page));
|
|
6276
6276
|
return (url) => {
|
|
6277
6277
|
const target = new URL(url);
|
|
6278
6278
|
return read(`${localOrigin}${target.pathname}${target.search}`);
|
|
@@ -6523,7 +6523,7 @@ window.__FARM_I18N__ = ${_chunkUJ2C4ICScjs.getFarmI18nClientSnapshot.call(void 0
|
|
|
6523
6523
|
i18nSnapshot,
|
|
6524
6524
|
this.getI18nAlternateOptions(req, req.__FARM_METADATA__)
|
|
6525
6525
|
) : "";
|
|
6526
|
-
const themeDocument =
|
|
6526
|
+
const themeDocument = _chunkYVGAEAA5cjs.createFarmThemeDocumentParts.call(void 0,
|
|
6527
6527
|
this.config.theme,
|
|
6528
6528
|
this.config.basePath,
|
|
6529
6529
|
_chunkXWAWFQFScjs.getTheme.call(void 0, )
|
|
@@ -6760,7 +6760,7 @@ window.__FARM_I18N__ = ${_chunkUJ2C4ICScjs.getFarmI18nClientSnapshot.call(void 0
|
|
|
6760
6760
|
this.getI18nAlternateOptions(req, req.__FARM_METADATA__)
|
|
6761
6761
|
) : "";
|
|
6762
6762
|
const fontHead = renderFarmFontDevHead(this.config.root || process.cwd());
|
|
6763
|
-
const themeDocument =
|
|
6763
|
+
const themeDocument = _chunkYVGAEAA5cjs.createFarmThemeDocumentParts.call(void 0,
|
|
6764
6764
|
this.config.theme,
|
|
6765
6765
|
this.config.basePath,
|
|
6766
6766
|
_chunkXWAWFQFScjs.getTheme.call(void 0, )
|
|
@@ -6769,7 +6769,7 @@ window.__FARM_I18N__ = ${_chunkUJ2C4ICScjs.getFarmI18nClientSnapshot.call(void 0
|
|
|
6769
6769
|
const devStyleLinks = this.collectDevStyleLinks();
|
|
6770
6770
|
const globalStylesheetLink = this.devGlobalStylesheetLink(true);
|
|
6771
6771
|
const cspNonce = this.getCspNonce(req);
|
|
6772
|
-
const secureDocumentHTML = /* @__PURE__ */ _chunkS3JO3N4Hcjs.__name.call(void 0, (html) => cspNonce ?
|
|
6772
|
+
const secureDocumentHTML = /* @__PURE__ */ _chunkS3JO3N4Hcjs.__name.call(void 0, (html) => cspNonce ? _chunkCUMINO7Zcjs.addFarmCspNonceToScriptTags.call(void 0, html, cspNonce) : html, "secureDocumentHTML");
|
|
6773
6773
|
const createLateNavigationRecovery = /* @__PURE__ */ _chunkS3JO3N4Hcjs.__name.call(void 0, (navigationError) => this.createLateNavigationRecoveryHTML(req, navigationError), "createLateNavigationRecovery");
|
|
6774
6774
|
const { pipe, abort } = renderToPipeableStream(streamRoot, {
|
|
6775
6775
|
nonce: cspNonce,
|
|
@@ -6816,7 +6816,7 @@ window.__FARM_I18N__ = ${_chunkUJ2C4ICScjs.getFarmI18nClientSnapshot.call(void 0
|
|
|
6816
6816
|
let firstChunk = true;
|
|
6817
6817
|
let checkedFullDocument = false;
|
|
6818
6818
|
let documentPrefix = "";
|
|
6819
|
-
const cspNonceRewriter = cspNonce ?
|
|
6819
|
+
const cspNonceRewriter = cspNonce ? _chunkCUMINO7Zcjs.createFarmCspNonceRewriter.call(void 0, cspNonce) : void 0;
|
|
6820
6820
|
const cspStreamDecoder = cspNonceRewriter ? new TextDecoder() : void 0;
|
|
6821
6821
|
const recordRenderedChunk = /* @__PURE__ */ _chunkS3JO3N4Hcjs.__name.call(void 0, (chunkText) => {
|
|
6822
6822
|
if (!chunkText) return;
|
|
@@ -7019,7 +7019,7 @@ window.__FARM_I18N__ = ${_chunkUJ2C4ICScjs.getFarmI18nClientSnapshot.call(void 0
|
|
|
7019
7019
|
*/
|
|
7020
7020
|
async createLateNavigationRecoveryHTML(req, error) {
|
|
7021
7021
|
if (_chunkOX6O6WVAcjs.isFarmRedirectError.call(void 0, error)) {
|
|
7022
|
-
return
|
|
7022
|
+
return _chunkYVGAEAA5cjs.createLateRedirectRecovery.call(void 0, this.localizeRedirectUrl(_chunkOX6O6WVAcjs.getFarmRedirectError.call(void 0, error).url));
|
|
7023
7023
|
}
|
|
7024
7024
|
const pathname = _chunk5ZSWG4UXcjs.resolveFarmRequestURL.call(void 0, req, {
|
|
7025
7025
|
trustProxy: _optionalChain([this, 'access', _253 => _253.config, 'access', _254 => _254.server, 'optionalAccess', _255 => _255.trustProxy])
|
|
@@ -7037,7 +7037,7 @@ window.__FARM_I18N__ = ${_chunkUJ2C4ICScjs.getFarmI18nClientSnapshot.call(void 0
|
|
|
7037
7037
|
_chunk5QIKR7RRcjs.logger.warn(`not-found page could not render outside its layout, using Farm's: ${error2}`);
|
|
7038
7038
|
}
|
|
7039
7039
|
}
|
|
7040
|
-
return
|
|
7040
|
+
return _chunkYVGAEAA5cjs.createLateNotFoundRecovery.call(void 0, content);
|
|
7041
7041
|
}
|
|
7042
7042
|
async render404(req, res) {
|
|
7043
7043
|
res.statusCode = 404;
|
|
@@ -7046,11 +7046,11 @@ window.__FARM_I18N__ = ${_chunkUJ2C4ICScjs.getFarmI18nClientSnapshot.call(void 0
|
|
|
7046
7046
|
}).pathname;
|
|
7047
7047
|
const acceptHeader = req.headers.accept;
|
|
7048
7048
|
const accept = Array.isArray(acceptHeader) ? acceptHeader.join(",") : acceptHeader;
|
|
7049
|
-
if (
|
|
7050
|
-
res.setHeader("Content-Type",
|
|
7049
|
+
if (_chunkKJ2TIHZZcjs.farmRequestWantsMarkdown.call(void 0, pathname, accept)) {
|
|
7050
|
+
res.setHeader("Content-Type", _chunkKJ2TIHZZcjs.FARM_MARKDOWN_CONTENT_TYPE);
|
|
7051
7051
|
res.setHeader("X-Farm-Markdown-Error", "404");
|
|
7052
7052
|
res.setHeader("Cache-Control", "no-store");
|
|
7053
|
-
res.end(
|
|
7053
|
+
res.end(_chunkKJ2TIHZZcjs.createFarmMarkdownErrorBody.call(void 0, 404, pathname, this.config.basePath || "/"));
|
|
7054
7054
|
return;
|
|
7055
7055
|
}
|
|
7056
7056
|
const appDir = path9.join(this.config.root, this.config.srcDir, "app");
|
|
@@ -7112,8 +7112,8 @@ window.__FARM_I18N__ = ${_chunkUJ2C4ICScjs.getFarmI18nClientSnapshot.call(void 0
|
|
|
7112
7112
|
trustProxy: _optionalChain([this, 'access', _261 => _261.config, 'access', _262 => _262.server, 'optionalAccess', _263 => _263.trustProxy])
|
|
7113
7113
|
});
|
|
7114
7114
|
const diagnostics = isDev ? createDefaultErrorDiagnostics(error, this.config.root || process.cwd()) : void 0;
|
|
7115
|
-
const statusText =
|
|
7116
|
-
const content =
|
|
7115
|
+
const statusText = _chunkYVGAEAA5cjs.getDefaultErrorStatusText.call(void 0, statusCode);
|
|
7116
|
+
const content = _chunkYVGAEAA5cjs.createDefaultErrorMarkup.call(void 0, {
|
|
7117
7117
|
statusCode,
|
|
7118
7118
|
statusText,
|
|
7119
7119
|
requestPath: requestUrl.pathname,
|
|
@@ -7123,7 +7123,7 @@ window.__FARM_I18N__ = ${_chunkUJ2C4ICScjs.getFarmI18nClientSnapshot.call(void 0
|
|
|
7123
7123
|
stack: _optionalChain([diagnostics, 'optionalAccess', _266 => _266.stack]),
|
|
7124
7124
|
sourceFrame: _optionalChain([diagnostics, 'optionalAccess', _267 => _267.sourceFrame]),
|
|
7125
7125
|
development: isDev,
|
|
7126
|
-
farmVersion:
|
|
7126
|
+
farmVersion: _chunkVYZSOYR4cjs.FARM_VERSION,
|
|
7127
7127
|
nodeVersion: process.version,
|
|
7128
7128
|
mode: isDev ? "development" : "production"
|
|
7129
7129
|
});
|
|
@@ -7166,7 +7166,7 @@ ${i18nSnapshot ? `window.__FARM_I18N__ = ${serializeInlineValue(i18nSnapshot)};`
|
|
|
7166
7166
|
this.getI18nAlternateOptions(alternates.req, alternates.metadata)
|
|
7167
7167
|
) : "";
|
|
7168
7168
|
const fontHead = renderFarmFontDevHead(this.config.root || process.cwd());
|
|
7169
|
-
const themeDocument =
|
|
7169
|
+
const themeDocument = _chunkYVGAEAA5cjs.createFarmThemeDocumentParts.call(void 0,
|
|
7170
7170
|
this.config.theme,
|
|
7171
7171
|
this.config.basePath,
|
|
7172
7172
|
_chunkXWAWFQFScjs.getTheme.call(void 0, )
|
|
@@ -7226,7 +7226,7 @@ ${clientScript}
|
|
|
7226
7226
|
}
|
|
7227
7227
|
secureDocumentHTML(req, html) {
|
|
7228
7228
|
const nonce = this.getCspNonce(req);
|
|
7229
|
-
return nonce ?
|
|
7229
|
+
return nonce ? _chunkCUMINO7Zcjs.addFarmCspNonceToScriptTags.call(void 0, html, nonce) : html;
|
|
7230
7230
|
}
|
|
7231
7231
|
applyDeploymentHeaders(req, res) {
|
|
7232
7232
|
const deploymentId = this.getDeploymentId();
|
|
@@ -7334,9 +7334,9 @@ var _FarmApp = class _FarmApp {
|
|
|
7334
7334
|
context: config.context || (() => void 0),
|
|
7335
7335
|
server: _chunkEM6SBQKMcjs.resolveFarmServerConfig.call(void 0, config.server),
|
|
7336
7336
|
serverActions: _chunkT5CERMEHcjs.resolveServerActionsConfig.call(void 0, config.serverActions),
|
|
7337
|
-
security:
|
|
7337
|
+
security: _chunkCUMINO7Zcjs.resolveFarmSecurityConfig.call(void 0, config.security),
|
|
7338
7338
|
images: _chunkYFPGHF5Fcjs.resolveFarmImageConfig.call(void 0, config.images),
|
|
7339
|
-
performance:
|
|
7339
|
+
performance: _chunkCUMINO7Zcjs.resolveFarmPerformanceConfig.call(void 0, config.performance),
|
|
7340
7340
|
theme: _chunkOI6CMLWXcjs.resolveFarmThemeConfig.call(void 0, config.theme, basePath),
|
|
7341
7341
|
i18n: isResolvedI18nConfig(config.i18n) ? config.i18n : _chunkHBTUGXHScjs.resolveFarmI18nConfig.call(void 0, config.i18n, {
|
|
7342
7342
|
root,
|
|
@@ -7348,7 +7348,7 @@ var _FarmApp = class _FarmApp {
|
|
|
7348
7348
|
serverRuntimeConfig: config.serverRuntimeConfig || {},
|
|
7349
7349
|
publicRuntimeConfig: config.publicRuntimeConfig || {},
|
|
7350
7350
|
docs: isResolvedDocsConfig(config.docs) ? config.docs : defaultDocsConfig,
|
|
7351
|
-
md:
|
|
7351
|
+
md: _chunkKJ2TIHZZcjs.resolveMarkdownConfig.call(void 0, config.md),
|
|
7352
7352
|
mdx: _chunkOHY2ZWUGcjs.resolveMdxConfig.call(void 0, config.mdx),
|
|
7353
7353
|
observability: _nullishCoalesce(config.observability, () => ( false)),
|
|
7354
7354
|
telemetry: config.telemetry !== false,
|
|
@@ -9498,13 +9498,13 @@ _chunkS3JO3N4Hcjs.__name.call(void 0, reportOpenAPIDevGenerationResult, "reportO
|
|
|
9498
9498
|
// src/vite.ts
|
|
9499
9499
|
var SERVER_FN_TRANSFORM_PLUGIN = "@farm.js/plugin/rsc:server-fn-actions";
|
|
9500
9500
|
function farmLlmsTxtGeneratedPaths(config) {
|
|
9501
|
-
const llms =
|
|
9501
|
+
const llms = _chunkCUMINO7Zcjs.resolveFarmLlmsTxtConfig.call(void 0, _optionalChain([config, 'access', _474 => _474.agent, 'optionalAccess', _475 => _475.llmsTxt]));
|
|
9502
9502
|
if (!llms.enabled) return [];
|
|
9503
9503
|
return llms.full ? ["/llms.txt", "/llms-full.txt"] : ["/llms.txt"];
|
|
9504
9504
|
}
|
|
9505
9505
|
_chunkS3JO3N4Hcjs.__name.call(void 0, farmLlmsTxtGeneratedPaths, "farmLlmsTxtGeneratedPaths");
|
|
9506
9506
|
function farmAgentGeneratedPaths(config) {
|
|
9507
|
-
const crawlers =
|
|
9507
|
+
const crawlers = _chunkCUMINO7Zcjs.resolveFarmAgentCrawlers.call(void 0, _optionalChain([config, 'access', _476 => _476.agent, 'optionalAccess', _477 => _477.crawlers]));
|
|
9508
9508
|
return [...farmLlmsTxtGeneratedPaths(config), ...crawlers.enabled ? ["/robots.txt"] : []];
|
|
9509
9509
|
}
|
|
9510
9510
|
_chunkS3JO3N4Hcjs.__name.call(void 0, farmAgentGeneratedPaths, "farmAgentGeneratedPaths");
|
|
@@ -9550,7 +9550,7 @@ function loadFarmWorkflowsDevRuntime() {
|
|
|
9550
9550
|
}
|
|
9551
9551
|
_chunkS3JO3N4Hcjs.__name.call(void 0, loadFarmWorkflowsDevRuntime, "loadFarmWorkflowsDevRuntime");
|
|
9552
9552
|
function loadFarmDevtoolsSnapshotRuntime() {
|
|
9553
|
-
return import("./devtools-
|
|
9553
|
+
return import("./devtools-EWRDHCD5.cjs");
|
|
9554
9554
|
}
|
|
9555
9555
|
_chunkS3JO3N4Hcjs.__name.call(void 0, loadFarmDevtoolsSnapshotRuntime, "loadFarmDevtoolsSnapshotRuntime");
|
|
9556
9556
|
function loadFarmDevtoolsUIRuntime() {
|
|
@@ -9637,7 +9637,7 @@ function renderFarmI18nStaticHead(requestPath, snapshot) {
|
|
|
9637
9637
|
if (!snapshot) return "";
|
|
9638
9638
|
const runtime = `<script>window.__FARM_I18N__ = ${serializeFarmInlineValue(snapshot)};</script>`;
|
|
9639
9639
|
if (snapshot.routing === "none") return runtime;
|
|
9640
|
-
return `${
|
|
9640
|
+
return `${_chunkYVGAEAA5cjs.renderFarmLocaleAlternateLinks.call(void 0, requestPath, snapshot)}${runtime}`;
|
|
9641
9641
|
}
|
|
9642
9642
|
_chunkS3JO3N4Hcjs.__name.call(void 0, renderFarmI18nStaticHead, "renderFarmI18nStaticHead");
|
|
9643
9643
|
function getPublicEnvDefine(config) {
|
|
@@ -10236,7 +10236,7 @@ function farmPlugin(options = {}, initialPluginManager) {
|
|
|
10236
10236
|
if (_optionalChain([farmConfig, 'access', _505 => _505.agent, 'optionalAccess', _506 => _506.noindexPreviews])) {
|
|
10237
10237
|
server.middlewares.use((_req, res, next) => {
|
|
10238
10238
|
if (_chunkCXP5U3RWcjs.isFarmPreviewDeploymentEnvironment.call(void 0, process.env)) {
|
|
10239
|
-
res.setHeader("X-Robots-Tag",
|
|
10239
|
+
res.setHeader("X-Robots-Tag", _chunkCUMINO7Zcjs.FARM_PREVIEW_ROBOTS_TAG);
|
|
10240
10240
|
}
|
|
10241
10241
|
next();
|
|
10242
10242
|
});
|
|
@@ -10846,13 +10846,13 @@ window.__FARM_MANIFEST__ = ${inlineValue({
|
|
|
10846
10846
|
const docsHandler = openAPIManager.getDocsRouteHandler(parsedRequestUrl.origin);
|
|
10847
10847
|
return docsHandler(req, res);
|
|
10848
10848
|
}
|
|
10849
|
-
if (_optionalChain([options, 'access', _560 => _560.agent, 'optionalAccess', _561 => _561.apiCatalog]) && _chunkI57LW5VZcjs.stripFarmBasePath.call(void 0, requestPathname, farmConfig.basePath) ===
|
|
10849
|
+
if (_optionalChain([options, 'access', _560 => _560.agent, 'optionalAccess', _561 => _561.apiCatalog]) && _chunkI57LW5VZcjs.stripFarmBasePath.call(void 0, requestPathname, farmConfig.basePath) === _chunkYVGAEAA5cjs.FARM_API_CATALOG_PATH) {
|
|
10850
10850
|
if (await runAppMiddlewareForContentRoute()) return;
|
|
10851
10851
|
await _chunkUQZ4AYTHcjs.sendWebResponse.call(void 0,
|
|
10852
10852
|
res,
|
|
10853
|
-
|
|
10853
|
+
_chunkYVGAEAA5cjs.createFarmApiCatalogResponse.call(void 0,
|
|
10854
10854
|
requestMethod,
|
|
10855
|
-
|
|
10855
|
+
_chunkYVGAEAA5cjs.resolveFarmApiCatalogInput.call(void 0, { ...options, api: farmConfig.api }),
|
|
10856
10856
|
new Request(parsedRequestUrl, {
|
|
10857
10857
|
headers: { "user-agent": String(_nullishCoalesce(req.headers["user-agent"], () => ( ""))) }
|
|
10858
10858
|
})
|
|
@@ -10887,7 +10887,7 @@ window.__FARM_MANIFEST__ = ${inlineValue({
|
|
|
10887
10887
|
return;
|
|
10888
10888
|
}
|
|
10889
10889
|
}
|
|
10890
|
-
const markdownSourceResponse = viteModuleRequest ? null : await
|
|
10890
|
+
const markdownSourceResponse = viteModuleRequest ? null : await _chunkX7KZBF63cjs.createFarmMarkdownSourceResponse.call(void 0, {
|
|
10891
10891
|
request: new Request(fullUrl, {
|
|
10892
10892
|
method: requestMethod,
|
|
10893
10893
|
headers: docsHeaders
|
|
@@ -10895,7 +10895,7 @@ window.__FARM_MANIFEST__ = ${inlineValue({
|
|
|
10895
10895
|
config: farmApp.getConfig().mdx,
|
|
10896
10896
|
resolveSource: /* @__PURE__ */ _chunkS3JO3N4Hcjs.__name.call(void 0, async (pathname2) => {
|
|
10897
10897
|
const match = farmApp.getRouteManager().matchRoute(pathname2);
|
|
10898
|
-
const sourcePath = _optionalChain([match, 'access', _562 => _562.route, 'optionalAccess', _563 => _563.markdownSourcePath]) || (match.route &&
|
|
10898
|
+
const sourcePath = _optionalChain([match, 'access', _562 => _562.route, 'optionalAccess', _563 => _563.markdownSourcePath]) || (match.route && _chunkX7KZBF63cjs.isFarmMarkdownPageFile.call(void 0, match.route.modulePath) ? match.route.modulePath : null);
|
|
10899
10899
|
if (!sourcePath) {
|
|
10900
10900
|
return null;
|
|
10901
10901
|
}
|
|
@@ -10910,7 +10910,7 @@ window.__FARM_MANIFEST__ = ${inlineValue({
|
|
|
10910
10910
|
await _chunkUQZ4AYTHcjs.sendWebResponse.call(void 0, res, markdownSourceResponse);
|
|
10911
10911
|
return;
|
|
10912
10912
|
}
|
|
10913
|
-
const markdownResponse = viteModuleRequest ? null : await
|
|
10913
|
+
const markdownResponse = viteModuleRequest ? null : await _chunkKJ2TIHZZcjs.createMarkdownMirrorResponse.call(void 0, {
|
|
10914
10914
|
request: new Request(fullUrl, {
|
|
10915
10915
|
method: requestMethod,
|
|
10916
10916
|
headers: docsHeaders
|
|
@@ -10932,21 +10932,21 @@ window.__FARM_MANIFEST__ = ${inlineValue({
|
|
|
10932
10932
|
await _chunkUQZ4AYTHcjs.sendWebResponse.call(void 0, res, markdownResponse);
|
|
10933
10933
|
return;
|
|
10934
10934
|
}
|
|
10935
|
-
if (!viteModuleRequest &&
|
|
10936
|
-
const markdownRoute = farmApp.getRouteManager().matchRoute(
|
|
10935
|
+
if (!viteModuleRequest && _chunkKJ2TIHZZcjs.farmRequestWantsMarkdown.call(void 0, requestPathname, req.headers.accept)) {
|
|
10936
|
+
const markdownRoute = farmApp.getRouteManager().matchRoute(_chunkX7KZBF63cjs.normalizeFarmMarkdownRoutePath.call(void 0, requestPathname));
|
|
10937
10937
|
if (!markdownRoute.route) {
|
|
10938
10938
|
if (await runAppMiddlewareForContentRoute()) return;
|
|
10939
10939
|
res.statusCode = 404;
|
|
10940
|
-
res.setHeader("Content-Type",
|
|
10940
|
+
res.setHeader("Content-Type", _chunkKJ2TIHZZcjs.FARM_MARKDOWN_CONTENT_TYPE);
|
|
10941
10941
|
res.setHeader("X-Farm-Markdown-Error", "404");
|
|
10942
10942
|
res.setHeader("Cache-Control", "no-store");
|
|
10943
10943
|
res.end(
|
|
10944
|
-
|
|
10944
|
+
_chunkKJ2TIHZZcjs.createFarmMarkdownErrorBody.call(void 0, 404, requestPathname, farmConfig.basePath || "/")
|
|
10945
10945
|
);
|
|
10946
10946
|
return;
|
|
10947
10947
|
}
|
|
10948
10948
|
}
|
|
10949
|
-
const markdownPageTarget =
|
|
10949
|
+
const markdownPageTarget = _chunkKJ2TIHZZcjs.resolveMarkdownMirrorTarget.call(void 0,
|
|
10950
10950
|
farmApp.getConfig().md,
|
|
10951
10951
|
requestPathname,
|
|
10952
10952
|
{
|
|
@@ -10959,7 +10959,7 @@ window.__FARM_MANIFEST__ = ${inlineValue({
|
|
|
10959
10959
|
if (!varyValues.some((value) => value.toLowerCase() === "accept")) {
|
|
10960
10960
|
res.setHeader("Vary", [...varyValues, "Accept"].join(", "));
|
|
10961
10961
|
}
|
|
10962
|
-
const alternatePath =
|
|
10962
|
+
const alternatePath = _chunkKJ2TIHZZcjs.getFarmMarkdownMirrorPath.call(void 0, markdownPageTarget.pathname);
|
|
10963
10963
|
const alternateLink = `<${alternatePath}>; rel="alternate"; type="text/markdown"`;
|
|
10964
10964
|
const currentLink = res.getHeader("Link");
|
|
10965
10965
|
res.setHeader(
|
|
@@ -11455,7 +11455,7 @@ window.__FARM_MANIFEST__ = ${inlineValue({
|
|
|
11455
11455
|
}
|
|
11456
11456
|
mergedMetadata = _chunk3LUF2PE2cjs.addMetadataMarkdownAlternate.call(void 0,
|
|
11457
11457
|
mergedMetadata,
|
|
11458
|
-
|
|
11458
|
+
_chunkKJ2TIHZZcjs.getFarmMarkdownAlternatePath.call(void 0, farmApp.getConfig().md, targetRequestUrl.pathname)
|
|
11459
11459
|
);
|
|
11460
11460
|
const routeSlots = await Promise.all(
|
|
11461
11461
|
slots.map(async (slot) => {
|
|
@@ -14351,7 +14351,7 @@ async function defineConfig(config = {}) {
|
|
|
14351
14351
|
const isExposed = hostConfig === true || hostConfig === "0.0.0.0";
|
|
14352
14352
|
console.log("");
|
|
14353
14353
|
console.log(
|
|
14354
|
-
` ${pc.bold(pc.green("Farm.js"))} ${pc.dim(`v${
|
|
14354
|
+
` ${pc.bold(pc.green("Farm.js"))} ${pc.dim(`v${_chunkVYZSOYR4cjs.FARM_VERSION}`)} ${pc.dim(`ready in ${elapsed}ms`)}`
|
|
14355
14355
|
);
|
|
14356
14356
|
console.log("");
|
|
14357
14357
|
console.log(
|
|
@@ -605,10 +605,13 @@ function separateLayoutRowItems(source) {
|
|
|
605
605
|
}
|
|
606
606
|
if (boundaries.length === 0) return container;
|
|
607
607
|
if (items.filter(Boolean).every((text) => text.length === 1)) return container;
|
|
608
|
-
let separated =
|
|
609
|
-
|
|
610
|
-
|
|
608
|
+
let separated = "";
|
|
609
|
+
let start = 0;
|
|
610
|
+
for (const boundary of boundaries) {
|
|
611
|
+
separated += `${content.slice(start, boundary)} `;
|
|
612
|
+
start = boundary;
|
|
611
613
|
}
|
|
614
|
+
separated += content.slice(start);
|
|
612
615
|
return `<${tag}${attributes}>${separated}</${tag}>`;
|
|
613
616
|
}
|
|
614
617
|
);
|
|
@@ -605,10 +605,13 @@ function separateLayoutRowItems(source) {
|
|
|
605
605
|
}
|
|
606
606
|
if (boundaries.length === 0) return container;
|
|
607
607
|
if (items.filter(Boolean).every((text) => text.length === 1)) return container;
|
|
608
|
-
let separated =
|
|
609
|
-
|
|
610
|
-
|
|
608
|
+
let separated = "";
|
|
609
|
+
let start = 0;
|
|
610
|
+
for (const boundary of boundaries) {
|
|
611
|
+
separated += `${content.slice(start, boundary)} `;
|
|
612
|
+
start = boundary;
|
|
611
613
|
}
|
|
614
|
+
separated += content.slice(start);
|
|
612
615
|
return `<${tag}${attributes}>${separated}</${tag}>`;
|
|
613
616
|
}
|
|
614
617
|
);
|