@farm.js/core 0.1.65 → 0.1.66
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/{analyzer-PE33SK5W.mjs → analyzer-4UFP4HVP.mjs} +3 -3
- package/dist/analyzer-H7SIX6BJ.cjs +16 -0
- package/dist/{chunk-IP2KHSGF.mjs → chunk-27FPUFWR.mjs} +56 -3
- package/dist/{chunk-JCEFKP5M.mjs → chunk-423SSBYQ.mjs} +6 -0
- package/dist/{chunk-E2TSYUHV.mjs → chunk-435QJNC2.mjs} +2 -2
- package/dist/{chunk-YD4J37RN.cjs → chunk-4OSOLDPL.cjs} +30 -19
- package/dist/{chunk-OSFIUSYK.cjs → chunk-4TVPYN32.cjs} +3 -3
- package/dist/{chunk-ZAUOOGER.mjs → chunk-672ISQIG.mjs} +1 -1
- package/dist/{chunk-C7DCMGC4.cjs → chunk-752IHQTD.cjs} +4 -4
- package/dist/{chunk-7QVRWGBL.cjs → chunk-7ONGIFYX.cjs} +4 -4
- package/dist/{chunk-VHHLKIDZ.mjs → chunk-AZUUKA66.mjs} +7 -7
- package/dist/{chunk-A3G5IY2W.cjs → chunk-BIF5MLTH.cjs} +1 -1
- package/dist/{chunk-HKNYNSOK.mjs → chunk-BYRZ5VTH.mjs} +1 -1
- package/dist/{chunk-V727H3RI.cjs → chunk-CCAUIBIS.cjs} +6 -0
- package/dist/{chunk-32RPJAAS.cjs → chunk-DVKH2RVN.cjs} +2 -2
- package/dist/{chunk-3KJPIO5D.cjs → chunk-E4UDLFWR.cjs} +24 -24
- package/dist/{chunk-EFZGB7JC.cjs → chunk-E5UN4OWX.cjs} +1 -0
- package/dist/{chunk-7GYCZRTH.mjs → chunk-EMNKZGF4.mjs} +4 -4
- package/dist/{chunk-ZQQK4U66.cjs → chunk-HZPKJRYA.cjs} +70 -17
- package/dist/{chunk-TZOGZKI7.cjs → chunk-IT6WRNGB.cjs} +77 -77
- package/dist/{chunk-72JSHQQQ.mjs → chunk-MPIGW42F.mjs} +1 -1
- package/dist/{chunk-WNXVWXG3.cjs → chunk-MPJEIHW2.cjs} +2 -2
- package/dist/{chunk-53ZCZ46B.cjs → chunk-NHQM2Q4I.cjs} +2 -1
- package/dist/{chunk-UYRI6U3P.mjs → chunk-O75GQVUK.mjs} +2 -1
- package/dist/{chunk-6X5NKNBE.mjs → chunk-OB7VKCUZ.mjs} +11 -10
- package/dist/{chunk-T4M52BA5.cjs → chunk-OP7LHY4Y.cjs} +103 -102
- package/dist/{chunk-CZF4XIRZ.cjs → chunk-RY4ABNPE.cjs} +3 -3
- package/dist/{chunk-GRBJ7VKH.mjs → chunk-SK7QSNWE.mjs} +1 -1
- package/dist/{chunk-YUW7F6SK.mjs → chunk-TKK5QHKZ.mjs} +1 -1
- package/dist/{chunk-ZNXTU4YH.mjs → chunk-TM2E623I.mjs} +1 -0
- package/dist/{chunk-ZX2JHEWW.mjs → chunk-UBMHQVWN.mjs} +20 -9
- package/dist/{chunk-TRIDJQ6A.cjs → chunk-VBCQ5WOI.cjs} +2 -2
- package/dist/{chunk-QHRCR44V.mjs → chunk-WFWFECDW.mjs} +1 -1
- package/dist/{chunk-Q75QPLBA.mjs → chunk-WVYRLP5E.mjs} +1 -1
- package/dist/{devtools-SGYOG36E.cjs → devtools-N2JQCMXB.cjs} +2 -2
- package/dist/{devtools-PUVZB3F2.mjs → devtools-NZUVNUP3.mjs} +1 -1
- package/dist/docs.cjs +3 -3
- package/dist/docs.mjs +2 -2
- package/dist/environment/vite.cjs +3 -3
- package/dist/environment/vite.mjs +2 -2
- package/dist/index.cjs +14 -14
- package/dist/index.mjs +13 -13
- package/dist/internal/build-runtime.cjs +15 -15
- package/dist/internal/build-runtime.mjs +14 -14
- package/dist/internal/cli-runtime.cjs +2 -2
- package/dist/internal/cli-runtime.mjs +1 -1
- 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/infra-analytics-runtime.cjs +6 -6
- package/dist/internal/infra-analytics-runtime.mjs +4 -4
- package/dist/internal/native-server-fns.cjs +5 -5
- package/dist/internal/native-server-fns.mjs +4 -4
- package/dist/internal/product-telemetry-runtime.cjs +3 -3
- package/dist/internal/product-telemetry-runtime.mjs +2 -2
- package/dist/internal/production-runtime.cjs +7 -7
- package/dist/internal/production-runtime.d.mts +7 -0
- package/dist/internal/production-runtime.d.ts +7 -0
- package/dist/internal/production-runtime.mjs +6 -6
- package/dist/{native-tree-HE2FLS72.cjs → native-tree-7LPH57Z4.cjs} +3 -3
- package/dist/{native-tree-YF2DSPKM.mjs → native-tree-VV6WN3GX.mjs} +2 -2
- package/dist/plugin.cjs +7 -7
- package/dist/plugin.mjs +6 -6
- package/dist/{port-UFUZL6RI.mjs → port-CLL4BC4O.mjs} +1 -1
- package/dist/{port-VTLHPZOI.cjs → port-HASZTQGY.cjs} +9 -9
- package/dist/{rsc-pipeline-T3PWURLJ.mjs → rsc-pipeline-7PNVJSTR.mjs} +2 -2
- package/dist/{rsc-pipeline-V4ANLRAA.cjs → rsc-pipeline-Z7QBZOIJ.cjs} +3 -3
- package/dist/{runtime-5AROV2C3.cjs → runtime-FKFCUHSK.cjs} +13 -13
- package/dist/{runtime-LRIQ3XH7.mjs → runtime-QQHX4BP3.mjs} +5 -5
- package/dist/server.cjs +25 -25
- package/dist/server.mjs +9 -9
- package/dist/version.cjs +2 -2
- package/dist/version.mjs +1 -1
- package/dist/vite.cjs +7 -7
- package/dist/vite.mjs +6 -6
- package/package.json +1 -1
- package/dist/analyzer-GHWK46LX.cjs +0 -16
- /package/dist/{chunk-IMK32ERL.cjs → chunk-CHYTADNK.cjs} +0 -0
- /package/dist/{chunk-2L54YV25.mjs → chunk-XBSLKXBL.mjs} +0 -0
|
@@ -41,7 +41,7 @@ var _chunkUJ3R2AH2cjs = require('./chunk-UJ3R2AH2.cjs');
|
|
|
41
41
|
var _chunkCLFEQGETcjs = require('./chunk-CLFEQGET.cjs');
|
|
42
42
|
|
|
43
43
|
|
|
44
|
-
var
|
|
44
|
+
var _chunk752IHQTDcjs = require('./chunk-752IHQTD.cjs');
|
|
45
45
|
|
|
46
46
|
|
|
47
47
|
|
|
@@ -69,7 +69,7 @@ var _chunkXGJVRPYLcjs = require('./chunk-XGJVRPYL.cjs');
|
|
|
69
69
|
|
|
70
70
|
|
|
71
71
|
|
|
72
|
-
var
|
|
72
|
+
var _chunk7ONGIFYXcjs = require('./chunk-7ONGIFYX.cjs');
|
|
73
73
|
|
|
74
74
|
|
|
75
75
|
var _chunk7KJJ4SBScjs = require('./chunk-7KJJ4SBS.cjs');
|
|
@@ -267,7 +267,7 @@ var _chunkCFG4QERRcjs = require('./chunk-CFG4QERR.cjs');
|
|
|
267
267
|
var _chunkJYT7AN37cjs = require('./chunk-JYT7AN37.cjs');
|
|
268
268
|
|
|
269
269
|
|
|
270
|
-
var
|
|
270
|
+
var _chunkBIF5MLTHcjs = require('./chunk-BIF5MLTH.cjs');
|
|
271
271
|
|
|
272
272
|
|
|
273
273
|
|
|
@@ -442,7 +442,7 @@ var RouteManager = class {
|
|
|
442
442
|
this.redirects = /* @__PURE__ */ new Map();
|
|
443
443
|
this.programmaticPages = /* @__PURE__ */ new Map();
|
|
444
444
|
this.programmaticLayouts = /* @__PURE__ */ new Map();
|
|
445
|
-
this.programmaticClientRoutes =
|
|
445
|
+
this.programmaticClientRoutes = _chunk7ONGIFYXcjs.mergeProgrammaticClientRoutes.call(void 0, []);
|
|
446
446
|
this.reportedIslandsErrors = /* @__PURE__ */ new Set();
|
|
447
447
|
this.config = config;
|
|
448
448
|
this.viteServer = viteServer;
|
|
@@ -474,7 +474,7 @@ var RouteManager = class {
|
|
|
474
474
|
await this.discoverFileRoutes(source);
|
|
475
475
|
await this.discoverProgrammaticRoutes(source, programmaticClientRoutes);
|
|
476
476
|
}
|
|
477
|
-
this.programmaticClientRoutes =
|
|
477
|
+
this.programmaticClientRoutes = _chunk7ONGIFYXcjs.mergeProgrammaticClientRoutes.call(void 0, programmaticClientRoutes);
|
|
478
478
|
for (const slot of this.routeSlots.values()) {
|
|
479
479
|
if (slot.interception && !this.pageRouteShapes.has(_chunkYTVSWXEZcjs.getRoutePatternShape.call(void 0, slot.pattern))) {
|
|
480
480
|
throw new (0, _chunkYTVSWXEZcjs.AmbiguousRouteError)(
|
|
@@ -747,28 +747,28 @@ var RouteManager = class {
|
|
|
747
747
|
`[Farm.js] isolated hydration kept route-wide because integration provider "${unsupportedIntegrationProvider.name}" does not declare supportsIsolatedHydration: true.`
|
|
748
748
|
);
|
|
749
749
|
}
|
|
750
|
-
const isolatedMode =
|
|
750
|
+
const isolatedMode = _chunk7ONGIFYXcjs.resolveFarmIsolatedClientHydrationMode.call(void 0,
|
|
751
751
|
_optionalChain([this, 'access', _12 => _12.config, 'access', _13 => _13.experimental, 'optionalAccess', _14 => _14.isolatedClientHydration]),
|
|
752
752
|
{
|
|
753
753
|
serverComponents: _chunkZIHWAN55cjs.resolveFarmServerComponentsMode.call(void 0, _optionalChain([this, 'access', _15 => _15.config, 'access', _16 => _16.experimental, 'optionalAccess', _17 => _17.serverComponents])) === "rsc",
|
|
754
754
|
hasUnsupportedIntegrationProvider: Boolean(unsupportedIntegrationProvider)
|
|
755
755
|
}
|
|
756
756
|
);
|
|
757
|
-
const planOptions =
|
|
757
|
+
const planOptions = _chunk7ONGIFYXcjs.getFarmClientHydrationPlanOptions.call(void 0,
|
|
758
758
|
this.config.renderer,
|
|
759
759
|
Boolean(unsupportedIntegrationProvider)
|
|
760
760
|
);
|
|
761
761
|
const islandsMode = _chunkZIHWAN55cjs.resolveFarmServerComponentsMode.call(void 0, _optionalChain([this, 'access', _18 => _18.config, 'access', _19 => _19.experimental, 'optionalAccess', _20 => _20.serverComponents])) === "islands";
|
|
762
762
|
const layoutEntries = Array.from(this.layouts.values()).map((entry) => ({
|
|
763
763
|
entry,
|
|
764
|
-
metadata:
|
|
764
|
+
metadata: _chunk7ONGIFYXcjs.getClientModuleHydrationPlan.call(void 0,
|
|
765
765
|
entry.modulePath,
|
|
766
766
|
normalizedProjectRoot,
|
|
767
767
|
isolatedMode,
|
|
768
768
|
islandsMode ? { ...planOptions, serverTreeLayouts: true } : planOptions
|
|
769
769
|
)
|
|
770
770
|
}));
|
|
771
|
-
const markdownPagePlan =
|
|
771
|
+
const markdownPagePlan = _chunk7ONGIFYXcjs.createMarkdownPageHydrationPlanner.call(void 0,
|
|
772
772
|
_chunk2HW5LWAHcjs.resolveFarmMdxComponentsModulePath.call(void 0, _chunk2HW5LWAHcjs.resolveMdxConfig.call(void 0, this.config.mdx), normalizedProjectRoot),
|
|
773
773
|
normalizedProjectRoot,
|
|
774
774
|
isolatedMode,
|
|
@@ -776,7 +776,7 @@ var RouteManager = class {
|
|
|
776
776
|
);
|
|
777
777
|
const routeEntries = Array.from(this.routes.values()).map((entry) => ({
|
|
778
778
|
entry,
|
|
779
|
-
metadata: _chunk7XGWBPQQcjs.isFarmMarkdownPageFile.call(void 0, entry.modulePath) ? markdownPagePlan() :
|
|
779
|
+
metadata: _chunk7XGWBPQQcjs.isFarmMarkdownPageFile.call(void 0, entry.modulePath) ? markdownPagePlan() : _chunk7ONGIFYXcjs.getClientModuleHydrationPlan.call(void 0, entry.modulePath, normalizedProjectRoot, isolatedMode, {
|
|
780
780
|
...planOptions,
|
|
781
781
|
serverOwners: _chunkZIHWAN55cjs.resolveFarmServerComponentsMode.call(void 0, _optionalChain([this, 'access', _21 => _21.config, 'access', _22 => _22.experimental, 'optionalAccess', _23 => _23.serverComponents])) === "islands"
|
|
782
782
|
})
|
|
@@ -803,7 +803,7 @@ var RouteManager = class {
|
|
|
803
803
|
`[Farm.js] ${entry.pattern} renders client components from ${metadata.staticPackageBoundaries.join(", ")} as static HTML: package client components cannot be isolated yet.`
|
|
804
804
|
);
|
|
805
805
|
}
|
|
806
|
-
|
|
806
|
+
_chunk7ONGIFYXcjs.enforceFarmIsolatedHydrationRouteBudget.call(void 0,
|
|
807
807
|
layoutEntries.map(({ entry, metadata }) => ({
|
|
808
808
|
pattern: entry.pattern,
|
|
809
809
|
depth: _chunkUJ3R2AH2cjs.getRouteDirectoryDepth.call(void 0, entry.pattern),
|
|
@@ -850,7 +850,7 @@ var RouteManager = class {
|
|
|
850
850
|
modulePath: toUrlPath(boundary.modulePath)
|
|
851
851
|
}))
|
|
852
852
|
} : {},
|
|
853
|
-
...
|
|
853
|
+
..._chunk7ONGIFYXcjs.usesFarmServerTree.call(void 0, metadata) ? { serverTree: true } : {},
|
|
854
854
|
renderPlan: _chunkUJ3R2AH2cjs.createFarmRouteRenderPlan.call(void 0, {
|
|
855
855
|
pageShouldHydrate: metadata.shouldHydrate,
|
|
856
856
|
layoutShouldHydrate,
|
|
@@ -892,7 +892,7 @@ var RouteManager = class {
|
|
|
892
892
|
...metadata.suppressedAsyncHydration && metadata.fallbackReason ? { suppressedAsyncHydrationReason: metadata.fallbackReason } : {}
|
|
893
893
|
}));
|
|
894
894
|
const slots = Array.from(this.routeSlots.values()).map((entry) => {
|
|
895
|
-
const metadata =
|
|
895
|
+
const metadata = _chunk7ONGIFYXcjs.getClientModuleMetadata.call(void 0, entry.modulePath, normalizedProjectRoot);
|
|
896
896
|
return {
|
|
897
897
|
name: entry.name,
|
|
898
898
|
ownerPattern: entry.ownerPattern,
|
|
@@ -1244,11 +1244,11 @@ var RouteManager = class {
|
|
|
1244
1244
|
srcDir: source.srcDir,
|
|
1245
1245
|
loadModule: (filePath) => this.loadProgrammaticRoutesModule(filePath)
|
|
1246
1246
|
});
|
|
1247
|
-
const graph = this.viteServer ?
|
|
1247
|
+
const graph = this.viteServer ? _chunk7ONGIFYXcjs.createEvaluatedRouteGraph.call(void 0, this.viteServer) : void 0;
|
|
1248
1248
|
for (const { filePath, manifest } of manifests) {
|
|
1249
1249
|
if (graph) {
|
|
1250
1250
|
clientRoutes.push(
|
|
1251
|
-
|
|
1251
|
+
_chunk7ONGIFYXcjs.resolveProgrammaticClientRoutes.call(void 0, {
|
|
1252
1252
|
graph,
|
|
1253
1253
|
routesFile: toRealPath(filePath),
|
|
1254
1254
|
routes: manifest.routes,
|
|
@@ -2793,7 +2793,7 @@ function inferFarmIslandStrategy(filePath, root) {
|
|
|
2793
2793
|
const result = _compiler.inferStrategy.call(void 0, file, code, {
|
|
2794
2794
|
parse: parseFarmIslandSource,
|
|
2795
2795
|
resolve: (specifier, importer) => {
|
|
2796
|
-
const resolved =
|
|
2796
|
+
const resolved = _chunk7ONGIFYXcjs.resolveImportedModule.call(void 0, importer, specifier, root);
|
|
2797
2797
|
return resolved.local ? resolved.path : null;
|
|
2798
2798
|
}
|
|
2799
2799
|
});
|
|
@@ -2807,7 +2807,7 @@ function inferFarmRouteRootStrategy(owners, root) {
|
|
|
2807
2807
|
const files = [];
|
|
2808
2808
|
const modules = [];
|
|
2809
2809
|
for (const owner of owners) {
|
|
2810
|
-
const rendered =
|
|
2810
|
+
const rendered = _chunk7ONGIFYXcjs.collectFarmRenderedClientModules.call(void 0, owner, root);
|
|
2811
2811
|
if (!rendered) {
|
|
2812
2812
|
return {
|
|
2813
2813
|
strategy: null,
|
|
@@ -2823,7 +2823,7 @@ function inferFarmRouteRootStrategy(owners, root) {
|
|
|
2823
2823
|
source = fs.default.readFileSync(module, "utf8");
|
|
2824
2824
|
} catch (e10) {
|
|
2825
2825
|
}
|
|
2826
|
-
if (
|
|
2826
|
+
if (_chunk7ONGIFYXcjs.getIslandStrategyExport.call(void 0, source) !== null) return { strategy: null, files, declared: true };
|
|
2827
2827
|
}
|
|
2828
2828
|
for (const module of modules) {
|
|
2829
2829
|
const result = inferFarmIslandStrategy(module, root);
|
|
@@ -3510,7 +3510,7 @@ var warnedSuppressedAsyncHydrationModules = /* @__PURE__ */ new Set();
|
|
|
3510
3510
|
function warnSuppressedAsyncHydrationOnce(modulePath, reason) {
|
|
3511
3511
|
if (warnedSuppressedAsyncHydrationModules.has(modulePath)) return;
|
|
3512
3512
|
warnedSuppressedAsyncHydrationModules.add(modulePath);
|
|
3513
|
-
_chunkQMNWKQL4cjs.logger.warn(
|
|
3513
|
+
_chunkQMNWKQL4cjs.logger.warn(_chunk7ONGIFYXcjs.describeSuppressedAsyncHydration.call(void 0, modulePath, reason));
|
|
3514
3514
|
}
|
|
3515
3515
|
var fullDocumentRoutes = /* @__PURE__ */ new Set();
|
|
3516
3516
|
var documentLayouts = /* @__PURE__ */ new WeakMap();
|
|
@@ -4549,7 +4549,7 @@ var ServerRenderer = class {
|
|
|
4549
4549
|
const routeManifestEntry = routeManifest.routes.find(
|
|
4550
4550
|
(entry) => entry.pattern === route.pattern
|
|
4551
4551
|
);
|
|
4552
|
-
const moduleMetadata = routeManifestEntry ||
|
|
4552
|
+
const moduleMetadata = routeManifestEntry || _chunk7ONGIFYXcjs.getClientModuleMetadata.call(void 0, route.modulePath, this.config.root);
|
|
4553
4553
|
const isClientComponent = moduleMetadata.isClientComponent;
|
|
4554
4554
|
const renderedRouteSlots = await Promise.all(
|
|
4555
4555
|
routeSlots.map(async (slot) => {
|
|
@@ -5311,7 +5311,7 @@ var ServerRenderer = class {
|
|
|
5311
5311
|
if (this.routeManager.matchRoute(_chunkY5TOT5F6cjs.FARM_DEFAULT_MCP_PATH).route) return void 0;
|
|
5312
5312
|
_nullishCoalesce(this.defaultMCPServer, () => ( (this.defaultMCPServer = _chunkY5TOT5F6cjs.createFarmDefaultMCPServer.call(void 0,
|
|
5313
5313
|
readAppPackageIdentity(this.config.root),
|
|
5314
|
-
|
|
5314
|
+
_chunkBIF5MLTHcjs.FARM_VERSION
|
|
5315
5315
|
))));
|
|
5316
5316
|
return _chunkY5TOT5F6cjs.resolveFarmDefaultMCPServer.call(void 0, this.defaultMCPServer);
|
|
5317
5317
|
}
|
|
@@ -5393,7 +5393,7 @@ var ServerRenderer = class {
|
|
|
5393
5393
|
pages,
|
|
5394
5394
|
config,
|
|
5395
5395
|
rootMetadata,
|
|
5396
|
-
mcp: _optionalChain([this, 'access', _178 => _178.config, 'access', _179 => _179.agent, 'optionalAccess', _180 => _180.aiCatalog]) === false ? [] :
|
|
5396
|
+
mcp: _optionalChain([this, 'access', _178 => _178.config, 'access', _179 => _179.agent, 'optionalAccess', _180 => _180.aiCatalog]) === false ? [] : _chunk752IHQTDcjs.listFarmMCPLlmsTxtLinks.call(void 0, origin, {
|
|
5397
5397
|
basePath: this.config.basePath,
|
|
5398
5398
|
apiServerBasePath: _chunk2OF5RPVUcjs.resolveFarmAPIServerBasePath.call(void 0,
|
|
5399
5399
|
_chunkPMJSG4JScjs.normalizeFarmAPIConfig.call(void 0,
|
|
@@ -5936,7 +5936,7 @@ window.__FARM_I18N__ = ${_chunkRVGLYMJMcjs.getFarmI18nClientSnapshot.call(void 0
|
|
|
5936
5936
|
const islandsOnlyPage = this.islandValues() && req.__FARM_PAGE_SHOULD_HYDRATE__ !== true && req.__FARM_LAYOUT_SHOULD_HYDRATE__ !== true && req.__FARM_HAS_HYDRATABLE_ROUTE_SLOTS__ !== true;
|
|
5937
5937
|
const rootStrategy = req.__FARM_ISLAND_STRATEGY__;
|
|
5938
5938
|
const waitingRoot = this.islandValues() && !islandsOnlyPage && req.__FARM_HAS_HYDRATABLE_ROUTE_SLOTS__ !== true && rootStrategy !== void 0 && rootStrategy !== "load" ? req.__FARM_LAYOUT_SHOULD_HYDRATE__ === true ? "root" : "__farm_page__" : null;
|
|
5939
|
-
const bootClient = (islandsOnlyPage || waitingRoot !== null) && !staticShellParts && canBootFarmIslandsClient(this.config);
|
|
5939
|
+
const bootClient = (islandsOnlyPage || waitingRoot !== null) && !staticShellParts && _chunkAQLHD6HZcjs.resolveFarmPlatform.call(void 0, ) !== "mobile" && canBootFarmIslandsClient(this.config);
|
|
5940
5940
|
const hydrationClickQueueScript = !islandsOnlyPage && !bootClient && (isClientComponent || req.__FARM_SHOULD_HYDRATE__ === true || req.__FARM_HAS_HYDRATABLE_ROUTE_SLOTS__ === true) ? createPreHydrationClickQueueScript() : "";
|
|
5941
5941
|
const {
|
|
5942
5942
|
title,
|
|
@@ -6400,7 +6400,7 @@ window.__FARM_I18N__ = ${_chunkRVGLYMJMcjs.getFarmI18nClientSnapshot.call(void 0
|
|
|
6400
6400
|
stack: _optionalChain([diagnostics, 'optionalAccess', _234 => _234.stack]),
|
|
6401
6401
|
sourceFrame: _optionalChain([diagnostics, 'optionalAccess', _235 => _235.sourceFrame]),
|
|
6402
6402
|
development: isDev,
|
|
6403
|
-
farmVersion:
|
|
6403
|
+
farmVersion: _chunkBIF5MLTHcjs.FARM_VERSION,
|
|
6404
6404
|
nodeVersion: process.version,
|
|
6405
6405
|
mode: isDev ? "development" : "production"
|
|
6406
6406
|
})
|
|
@@ -86,6 +86,7 @@ async function finalizeFarmMobileClient(options) {
|
|
|
86
86
|
return {
|
|
87
87
|
webEntry: options.webEntry,
|
|
88
88
|
entry: manifest.entry,
|
|
89
|
+
...options.webBoot ? { webBoot: options.webBoot } : {},
|
|
89
90
|
webOnly: options.webFiles.filter((file) => !mobileFiles.has(file)).sort()
|
|
90
91
|
};
|
|
91
92
|
}
|
|
@@ -41,7 +41,7 @@ import {
|
|
|
41
41
|
} from "./chunk-MK5E44WP.mjs";
|
|
42
42
|
import {
|
|
43
43
|
listFarmMCPLlmsTxtLinks
|
|
44
|
-
} from "./chunk-
|
|
44
|
+
} from "./chunk-435QJNC2.mjs";
|
|
45
45
|
import {
|
|
46
46
|
FARM_DEFAULT_MCP_PATH,
|
|
47
47
|
collectFarmDefaultMCPPages,
|
|
@@ -69,7 +69,7 @@ import {
|
|
|
69
69
|
resolveImportedModule,
|
|
70
70
|
resolveProgrammaticClientRoutes,
|
|
71
71
|
usesFarmServerTree
|
|
72
|
-
} from "./chunk-
|
|
72
|
+
} from "./chunk-672ISQIG.mjs";
|
|
73
73
|
import {
|
|
74
74
|
FARM_ISLAND_REPLAYABLE_SELECTOR
|
|
75
75
|
} from "./chunk-S32PDOLO.mjs";
|
|
@@ -267,7 +267,7 @@ import {
|
|
|
267
267
|
} from "./chunk-D2LCAV6L.mjs";
|
|
268
268
|
import {
|
|
269
269
|
FARM_VERSION
|
|
270
|
-
} from "./chunk-
|
|
270
|
+
} from "./chunk-MPIGW42F.mjs";
|
|
271
271
|
import {
|
|
272
272
|
resolveFarmTrailingSlashRedirect,
|
|
273
273
|
setFarmTrailingSlashPreference
|
|
@@ -5933,7 +5933,7 @@ window.__FARM_I18N__ = ${getFarmI18nClientSnapshot() ? serializeInlineValue(getF
|
|
|
5933
5933
|
const islandsOnlyPage = this.islandValues() && req.__FARM_PAGE_SHOULD_HYDRATE__ !== true && req.__FARM_LAYOUT_SHOULD_HYDRATE__ !== true && req.__FARM_HAS_HYDRATABLE_ROUTE_SLOTS__ !== true;
|
|
5934
5934
|
const rootStrategy = req.__FARM_ISLAND_STRATEGY__;
|
|
5935
5935
|
const waitingRoot = this.islandValues() && !islandsOnlyPage && req.__FARM_HAS_HYDRATABLE_ROUTE_SLOTS__ !== true && rootStrategy !== void 0 && rootStrategy !== "load" ? req.__FARM_LAYOUT_SHOULD_HYDRATE__ === true ? "root" : "__farm_page__" : null;
|
|
5936
|
-
const bootClient = (islandsOnlyPage || waitingRoot !== null) && !staticShellParts && canBootFarmIslandsClient(this.config);
|
|
5936
|
+
const bootClient = (islandsOnlyPage || waitingRoot !== null) && !staticShellParts && resolveFarmPlatform() !== "mobile" && canBootFarmIslandsClient(this.config);
|
|
5937
5937
|
const hydrationClickQueueScript = !islandsOnlyPage && !bootClient && (isClientComponent || req.__FARM_SHOULD_HYDRATE__ === true || req.__FARM_HAS_HYDRATABLE_ROUTE_SLOTS__ === true) ? createPreHydrationClickQueueScript() : "";
|
|
5938
5938
|
const {
|
|
5939
5939
|
title,
|
|
@@ -4,7 +4,7 @@
|
|
|
4
4
|
|
|
5
5
|
|
|
6
6
|
|
|
7
|
-
var
|
|
7
|
+
var _chunkCCAUIBIScjs = require('./chunk-CCAUIBIS.cjs');
|
|
8
8
|
|
|
9
9
|
|
|
10
10
|
var _chunk3HLQTOVUcjs = require('./chunk-3HLQTOVU.cjs');
|
|
@@ -26,12 +26,16 @@ var VOID_TAGS = new Set(
|
|
|
26
26
|
"area base br col embed hr img input link meta source track wbr".split(" ")
|
|
27
27
|
);
|
|
28
28
|
var SKIPPED_TAGS = new Set("link meta template title".split(" "));
|
|
29
|
+
var TABLE_GROUP_TAGS = new Set("table thead tbody tfoot".split(" "));
|
|
30
|
+
var TABLE_CELL_TAGS = new Set("th td".split(" "));
|
|
29
31
|
var INLINE_DEFAULTS = {
|
|
30
32
|
strong: { fontWeight: 700 },
|
|
31
33
|
b: { fontWeight: 700 },
|
|
32
34
|
em: { fontStyle: "italic" },
|
|
33
35
|
i: { fontStyle: "italic" },
|
|
34
|
-
code: { fontFamily: "mono" }
|
|
36
|
+
code: { fontFamily: "mono" },
|
|
37
|
+
th: { fontWeight: 700, textAlign: "center" },
|
|
38
|
+
caption: { textAlign: "center" }
|
|
35
39
|
};
|
|
36
40
|
var ENTITIES = {
|
|
37
41
|
amp: "&",
|
|
@@ -107,11 +111,11 @@ function find(element, test) {
|
|
|
107
111
|
}
|
|
108
112
|
function textOnly(style) {
|
|
109
113
|
return Object.fromEntries(
|
|
110
|
-
Object.entries(style).filter(([key]) =>
|
|
114
|
+
Object.entries(style).filter(([key]) => _chunkCCAUIBIScjs.FARM_NATIVE_TEXT_KEYS.has(key))
|
|
111
115
|
);
|
|
112
116
|
}
|
|
113
117
|
function withoutText(style) {
|
|
114
|
-
const rest = Object.entries(style).filter(([key]) => !
|
|
118
|
+
const rest = Object.entries(style).filter(([key]) => !_chunkCCAUIBIScjs.FARM_NATIVE_TEXT_KEYS.has(key));
|
|
115
119
|
return rest.length > 0 ? Object.fromEntries(rest) : void 0;
|
|
116
120
|
}
|
|
117
121
|
function settleLineHeight(style) {
|
|
@@ -157,8 +161,8 @@ var Converter = class {
|
|
|
157
161
|
if (this.reporting && !this.unsupported.includes(message)) this.unsupported.push(message);
|
|
158
162
|
}
|
|
159
163
|
stylesOf(element) {
|
|
160
|
-
const classes =
|
|
161
|
-
const cascade = this.sheets ?
|
|
164
|
+
const classes = _chunkCCAUIBIScjs.resolveFarmNativeClasses.call(void 0, _nullishCoalesce(element.attributes.class, () => ( "")));
|
|
165
|
+
const cascade = this.sheets ? _chunkCCAUIBIScjs.cascadeFarmNativeStylesheets.call(void 0, this.sheets, element) : void 0;
|
|
162
166
|
for (const token of classes.unsupported) {
|
|
163
167
|
if (!cascade || cascade.layered.includes(token.split(":").pop())) {
|
|
164
168
|
this.problem(`<${element.tag}> class "${token}"`);
|
|
@@ -167,7 +171,7 @@ var Converter = class {
|
|
|
167
171
|
for (const problem of _nullishCoalesce(_optionalChain([cascade, 'optionalAccess', _ => _.unsupported]), () => ( []))) {
|
|
168
172
|
this.problem(`<${element.tag}> ${problem}`);
|
|
169
173
|
}
|
|
170
|
-
const inline =
|
|
174
|
+
const inline = _chunkCCAUIBIScjs.resolveFarmNativeInlineStyle.call(void 0, _nullishCoalesce(element.attributes.style, () => ( "")), this.vars);
|
|
171
175
|
for (const declaration of inline.unsupported) {
|
|
172
176
|
this.problem(`<${element.tag}> style "${declaration}"`);
|
|
173
177
|
}
|
|
@@ -369,12 +373,58 @@ var Converter = class {
|
|
|
369
373
|
else node.submit = this.submitter(element);
|
|
370
374
|
return node;
|
|
371
375
|
}
|
|
376
|
+
/**
|
|
377
|
+
* A table as native views: the table and its row groups are columns, a row is a row, and its
|
|
378
|
+
* cells share the row's width, `colspan` cells a wider share, so columns line up from row to row
|
|
379
|
+
* (as `table-layout: fixed` lays them out). A cell's content draws as any block content does.
|
|
380
|
+
*/
|
|
381
|
+
tablePart(element, passed, box, boxDark, flex) {
|
|
382
|
+
const { tag } = element;
|
|
383
|
+
if (TABLE_CELL_TAGS.has(tag)) {
|
|
384
|
+
if (_optionalChain([element, 'access', _18 => _18.parent, 'optionalAccess', _19 => _19.tag]) !== "tr") this.problem(`<${tag}> outside a row`);
|
|
385
|
+
const rowspan = Number(_nullishCoalesce(element.attributes.rowspan, () => ( 1)));
|
|
386
|
+
if (rowspan !== 1) this.problem(`<${tag}> rowspan="${element.attributes.rowspan}"`);
|
|
387
|
+
const colspan = Number(_nullishCoalesce(element.attributes.colspan, () => ( 1)));
|
|
388
|
+
const share = Number.isInteger(colspan) && colspan >= 1 ? colspan : 1;
|
|
389
|
+
const cell = _optionalChain([box, 'optionalAccess', _20 => _20.width]) !== void 0 ? { flexGrow: 0, flexShrink: 0, ...box } : { flexGrow: share, flexShrink: 1, flexBasis: 0, ...box };
|
|
390
|
+
const node2 = this.node("View", element, cell, boxDark);
|
|
391
|
+
const children2 = this.blocks(element.children, passed, flex);
|
|
392
|
+
if (children2.length > 0) node2.children = children2;
|
|
393
|
+
return node2;
|
|
394
|
+
}
|
|
395
|
+
const row = tag === "tr";
|
|
396
|
+
const node = this.node("View", element, row ? { ...box, flexDirection: "row" } : box, boxDark);
|
|
397
|
+
const children = [];
|
|
398
|
+
for (const child of element.children) {
|
|
399
|
+
if (typeof child === "string") {
|
|
400
|
+
if (child.trim()) this.problem(`text directly inside <${tag}>`);
|
|
401
|
+
continue;
|
|
402
|
+
}
|
|
403
|
+
if (child.tag === "colgroup" || child.tag === "col") {
|
|
404
|
+
for (const column of [child, ...child.children]) {
|
|
405
|
+
if (typeof column === "string") continue;
|
|
406
|
+
const { width, style, class: className } = column.attributes;
|
|
407
|
+
if (width || style || className) this.problem(`<${column.tag}> sets column styles`);
|
|
408
|
+
}
|
|
409
|
+
continue;
|
|
410
|
+
}
|
|
411
|
+
const allowed = row ? TABLE_CELL_TAGS.has(child.tag) : child.tag === "tr" || tag === "table" && (TABLE_GROUP_TAGS.has(child.tag) || child.tag === "caption");
|
|
412
|
+
if (!allowed && !SKIPPED_TAGS.has(child.tag)) {
|
|
413
|
+
this.problem(`<${child.tag}> inside <${tag}>`);
|
|
414
|
+
continue;
|
|
415
|
+
}
|
|
416
|
+
const part = this.element(child, passed);
|
|
417
|
+
if (part) children.push(part);
|
|
418
|
+
}
|
|
419
|
+
if (children.length > 0) node.children = children;
|
|
420
|
+
return node;
|
|
421
|
+
}
|
|
372
422
|
element(element, inherited, flexItem = false) {
|
|
373
423
|
if (SKIPPED_TAGS.has(element.tag)) return void 0;
|
|
374
424
|
if (element.attributes.form !== void 0 && CONTROL_TAGS.has(element.tag)) {
|
|
375
425
|
this.problem(`<${element.tag}> form="${element.attributes.form}"`);
|
|
376
426
|
}
|
|
377
|
-
if (element.tag === "input" && _optionalChain([element, 'access',
|
|
427
|
+
if (element.tag === "input" && _optionalChain([element, 'access', _21 => _21.attributes, 'access', _22 => _22.type, 'optionalAccess', _23 => _23.toLowerCase, 'call', _24 => _24()]) === "hidden") {
|
|
378
428
|
const { name, value, disabled } = element.attributes;
|
|
379
429
|
if (this.form && name && disabled === void 0) {
|
|
380
430
|
this.form.fields.push({ name, value: _nullishCoalesce(value, () => ( "")) });
|
|
@@ -408,7 +458,7 @@ var Converter = class {
|
|
|
408
458
|
return node;
|
|
409
459
|
}
|
|
410
460
|
const textBox = flexItem && INLINE_TAGS.has(element.tag) && element.tag !== "a" && element.tag !== "br";
|
|
411
|
-
if (BLOCK_TEXT_TAGS.has(element.tag) || textBox) {
|
|
461
|
+
if (BLOCK_TEXT_TAGS.has(element.tag) || element.tag === "caption" || textBox) {
|
|
412
462
|
if (element.children.some((child) => typeof child !== "string" && !INLINE_TAGS.has(child.tag))) {
|
|
413
463
|
this.problem(`<${element.tag}> holds block elements`);
|
|
414
464
|
}
|
|
@@ -507,6 +557,9 @@ var Converter = class {
|
|
|
507
557
|
boxDark
|
|
508
558
|
);
|
|
509
559
|
}
|
|
560
|
+
if (TABLE_GROUP_TAGS.has(element.tag) || element.tag === "tr" || TABLE_CELL_TAGS.has(element.tag)) {
|
|
561
|
+
return this.tablePart(element, passed, box, boxDark, flex);
|
|
562
|
+
}
|
|
510
563
|
if (VIEW_TAGS.has(element.tag)) {
|
|
511
564
|
const node = this.node("View", element, box, boxDark);
|
|
512
565
|
const children = this.blocks(element.children, passed, flex);
|
|
@@ -578,14 +631,14 @@ var parsedSheets = /* @__PURE__ */ new Map();
|
|
|
578
631
|
function parsedStylesheet(css) {
|
|
579
632
|
let sheet = parsedSheets.get(css);
|
|
580
633
|
if (!sheet) {
|
|
581
|
-
sheet =
|
|
634
|
+
sheet = _chunkCCAUIBIScjs.parseFarmNativeStylesheet.call(void 0, css);
|
|
582
635
|
if (parsedSheets.size >= 16) parsedSheets.delete(parsedSheets.keys().next().value);
|
|
583
636
|
parsedSheets.set(css, sheet);
|
|
584
637
|
}
|
|
585
638
|
return sheet;
|
|
586
639
|
}
|
|
587
640
|
function createFarmNativeTree(html, pageUrl, stylesheets) {
|
|
588
|
-
const title = _optionalChain([/<title\b[^>]*>([\s\S]*?)<\/title>/i, 'access',
|
|
641
|
+
const title = _optionalChain([/<title\b[^>]*>([\s\S]*?)<\/title>/i, 'access', _25 => _25.exec, 'call', _26 => _26(html), 'optionalAccess', _27 => _27[1]]);
|
|
589
642
|
const document = parseHtml(_chunk2C5L5RPMcjs._readFarmRenderedHtml.call(void 0, html, { keepAriaHidden: true }));
|
|
590
643
|
const page = _nullishCoalesce(_nullishCoalesce(_nullishCoalesce(find(document, (element) => element.attributes.id === "__farm_page__"), () => ( find(document, (element) => element.attributes.id === "root"))), () => ( find(document, (element) => element.tag === "body"))), () => ( document));
|
|
591
644
|
const labels = /* @__PURE__ */ new Map();
|
|
@@ -597,7 +650,7 @@ function createFarmNativeTree(html, pageUrl, stylesheets) {
|
|
|
597
650
|
for (const child of element.children) if (typeof child !== "string") collectLabels(child);
|
|
598
651
|
};
|
|
599
652
|
collectLabels(page);
|
|
600
|
-
const converter = new Converter(pageUrl, _optionalChain([stylesheets, 'optionalAccess',
|
|
653
|
+
const converter = new Converter(pageUrl, _optionalChain([stylesheets, 'optionalAccess', _28 => _28.map, 'call', _29 => _29(parsedStylesheet)]), labels);
|
|
601
654
|
const ancestors = [];
|
|
602
655
|
for (let element = page.parent; element; element = element.parent) ancestors.unshift(element);
|
|
603
656
|
const inherited = { style: {}, dark: {} };
|
|
@@ -624,14 +677,14 @@ function createFarmNativeTree(html, pageUrl, stylesheets) {
|
|
|
624
677
|
if (children.length > 0) root.children = children;
|
|
625
678
|
return {
|
|
626
679
|
version: 1,
|
|
627
|
-
..._optionalChain([title, 'optionalAccess',
|
|
680
|
+
..._optionalChain([title, 'optionalAccess', _30 => _30.trim, 'call', _31 => _31()]) ? { title: decode(title.trim()) } : firstHeading(root) ? { title: firstHeading(root) } : {},
|
|
628
681
|
root,
|
|
629
682
|
unsupported: converter.unsupported
|
|
630
683
|
};
|
|
631
684
|
}
|
|
632
685
|
function readFarmPageStylesheets(html, pageUrl) {
|
|
633
686
|
const out = [];
|
|
634
|
-
const head = _nullishCoalesce(_optionalChain([/<head\b[^>]*>([\s\S]*?)<\/head>/i, 'access',
|
|
687
|
+
const head = _nullishCoalesce(_optionalChain([/<head\b[^>]*>([\s\S]*?)<\/head>/i, 'access', _32 => _32.exec, 'call', _33 => _33(html), 'optionalAccess', _34 => _34[1]]), () => ( html));
|
|
635
688
|
for (const match of head.matchAll(/<link\b([^>]*)>|<style\b[^>]*>([\s\S]*?)<\/style>/gi)) {
|
|
636
689
|
if (match[2] !== void 0) {
|
|
637
690
|
out.push({ inline: match[2] });
|
|
@@ -639,7 +692,7 @@ function readFarmPageStylesheets(html, pageUrl) {
|
|
|
639
692
|
}
|
|
640
693
|
const attributes = match[1];
|
|
641
694
|
if (!/\brel\s*=\s*["']?stylesheet\b/i.test(attributes)) continue;
|
|
642
|
-
const href = _optionalChain([/\bhref\s*=\s*["']([^"']+)["']/i, 'access',
|
|
695
|
+
const href = _optionalChain([/\bhref\s*=\s*["']([^"']+)["']/i, 'access', _35 => _35.exec, 'call', _36 => _36(attributes), 'optionalAccess', _37 => _37[1]]);
|
|
643
696
|
if (!href) continue;
|
|
644
697
|
const resolved = new URL(decode(href), pageUrl);
|
|
645
698
|
if (resolved.origin === pageUrl.origin) out.push({ href: resolved.pathname + resolved.search });
|
|
@@ -659,7 +712,7 @@ async function createFarmNativeTreeResponse(options) {
|
|
|
659
712
|
const page = await options.renderPage(
|
|
660
713
|
new Request(options.request.url, { ...init, signal: options.request.signal })
|
|
661
714
|
);
|
|
662
|
-
const cookies = _nullishCoalesce(_optionalChain([page, 'access',
|
|
715
|
+
const cookies = _nullishCoalesce(_optionalChain([page, 'access', _38 => _38.headers, 'access', _39 => _39.getSetCookie, 'optionalCall', _40 => _40()]), () => ( []));
|
|
663
716
|
const type = _nullishCoalesce(page.headers.get("content-type"), () => ( ""));
|
|
664
717
|
const drawn = page.status === 200 || submitted && page.status >= 400 && page.status < 500;
|
|
665
718
|
if (!drawn || !type.includes("text/html")) return page;
|
|
@@ -673,7 +726,7 @@ async function createFarmNativeTreeResponse(options) {
|
|
|
673
726
|
signal: options.request.signal
|
|
674
727
|
})
|
|
675
728
|
);
|
|
676
|
-
return response.status === 200 && _optionalChain([response, 'access',
|
|
729
|
+
return response.status === 200 && _optionalChain([response, 'access', _41 => _41.headers, 'access', _42 => _42.get, 'call', _43 => _43("content-type"), 'optionalAccess', _44 => _44.includes, 'call', _45 => _45("text/css")]) ? response.text() : void 0;
|
|
677
730
|
})));
|
|
678
731
|
const stylesheets = [];
|
|
679
732
|
for (const source of readFarmPageStylesheets(html, pageUrl)) {
|