@farm.js/core 0.1.51-beta.1 → 0.1.51-beta.3
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/{agent-mcp-handler-WWCC4GLG.mjs → agent-mcp-handler-7JSKGSOW.mjs} +4 -4
- package/dist/{agent-mcp-handler-RT3COCEL.cjs → agent-mcp-handler-YE4AGWHN.cjs} +5 -5
- package/dist/{agent-mcp.d-ZuuNgrkQ.d.ts → agent-mcp.d-BAR9njbJ.d.ts} +1 -1
- package/dist/{agent-mcp.d-BPzpKBHQ.d.mts → agent-mcp.d-BJKChOrO.d.mts} +1 -1
- package/dist/agent-runtime.d.mts +2 -2
- package/dist/agent-runtime.d.ts +2 -2
- package/dist/{analyzer-V74FTD2F.mjs → analyzer-OTPEWH5W.mjs} +82 -22
- package/dist/{analyzer-AZULAOPL.cjs → analyzer-TSQXZCZN.cjs} +82 -22
- package/dist/api/route-manager.d.mts +4 -4
- package/dist/api/route-manager.d.ts +4 -4
- package/dist/api/runtime.d.mts +3 -3
- package/dist/api/runtime.d.ts +3 -3
- package/dist/api.d.mts +4 -4
- package/dist/api.d.ts +4 -4
- package/dist/{app-manifest.d-HWhqbP2X.d.ts → app-manifest.d-BLFbaqx8.d.ts} +1 -1
- package/dist/{app-manifest.d-BJDcZn3W.d.mts → app-manifest.d-DEQNnNhV.d.mts} +1 -1
- package/dist/app-markdown.cjs +4 -4
- package/dist/app-markdown.d.mts +3 -3
- package/dist/app-markdown.d.ts +3 -3
- package/dist/app-markdown.mjs +3 -3
- package/dist/{app.d-B5EWdob-.d.ts → app.d-CNPaUYaa.d.ts} +4 -4
- package/dist/{app.d-DOGW1KI8.d.mts → app.d-CT7xDkj2.d.mts} +4 -4
- package/dist/{chunk-YVJV7Q2X.mjs → chunk-3BLEXUGE.mjs} +1 -1
- package/dist/chunk-3HLQTOVU.cjs +6 -0
- package/dist/{chunk-KU7MBLDZ.mjs → chunk-3SMXQNFD.mjs} +2 -2
- package/dist/{chunk-EWC76P5D.mjs → chunk-3TLKUBXG.mjs} +411 -166
- package/dist/{chunk-BSEKNTMS.mjs → chunk-3WSIYBMG.mjs} +41 -19
- package/dist/{chunk-JVBNKWLV.cjs → chunk-3XQ57EFI.cjs} +16 -16
- package/dist/{chunk-GW4YUIHW.mjs → chunk-3Z63X45F.mjs} +1 -1
- package/dist/{chunk-SCRC5AMM.mjs → chunk-4353ZRE5.mjs} +1 -1
- package/dist/{chunk-SBABQKPT.cjs → chunk-46KXZBOG.cjs} +5 -5
- package/dist/{chunk-2756SHCI.cjs → chunk-4CGOMZP3.cjs} +221 -199
- package/dist/{chunk-RMPNYUGT.cjs → chunk-4SEHMBL4.cjs} +10 -10
- package/dist/{chunk-QAIAFCRZ.mjs → chunk-4TKAIO2F.mjs} +3 -3
- package/dist/{chunk-NJLTQR5P.cjs → chunk-53SACYBY.cjs} +7 -7
- package/dist/{chunk-I3EFXUAR.mjs → chunk-5FXPJIOT.mjs} +2 -2
- package/dist/chunk-7FVVQEVL.cjs +541 -0
- package/dist/{chunk-IFBINMI4.cjs → chunk-7MD37P5V.cjs} +5 -5
- package/dist/{chunk-JATTVAHA.cjs → chunk-B3GM5I6N.cjs} +4 -4
- package/dist/chunk-C3BOESDW.mjs +541 -0
- package/dist/{chunk-WJFFPXCV.cjs → chunk-D7UQC4O6.cjs} +10 -8
- package/dist/{chunk-KRRZJ77U.mjs → chunk-E5DXF5GE.mjs} +2 -2
- package/dist/chunk-EFZGB7JC.cjs +114 -0
- package/dist/{chunk-NYQSC4DX.cjs → chunk-FFE2EMF7.cjs} +5 -5
- package/dist/{chunk-KMB5BMFX.mjs → chunk-GAO7MS5O.mjs} +9 -3
- package/dist/{chunk-HIFIG6HL.cjs → chunk-H33PJEXN.cjs} +5 -5
- package/dist/{chunk-TT66CP3P.cjs → chunk-HLWOWZFX.cjs} +2 -2
- package/dist/chunk-JXEPLIXD.cjs +389 -0
- package/dist/{chunk-VITZRYW3.cjs → chunk-KLNFJDFM.cjs} +15 -9
- package/dist/{chunk-KBRZAYI7.mjs → chunk-LDNSSHEG.mjs} +2 -2
- package/dist/chunk-LLZSYFOM.mjs +6 -0
- package/dist/{chunk-N77JBPLC.mjs → chunk-LPDKG6RA.mjs} +9 -7
- package/dist/chunk-MIGFX2FN.mjs +758 -0
- package/dist/{chunk-72D2NX77.mjs → chunk-MRNDAJEV.mjs} +1 -1
- package/dist/{chunk-5A5GAZ75.mjs → chunk-NOTSHVRN.mjs} +406 -234
- package/dist/{chunk-AGR7VJH2.cjs → chunk-OAMUSC7H.cjs} +1 -1
- package/dist/chunk-P6MHI5O2.cjs +758 -0
- package/dist/{chunk-EOSFVNXZ.mjs → chunk-R4PHCZ3G.mjs} +1 -1
- package/dist/{chunk-X2M4XN4V.cjs → chunk-TQMI6BYO.cjs} +675 -430
- package/dist/{chunk-76GHW3WI.cjs → chunk-TSFMFPRU.cjs} +4 -4
- package/dist/{chunk-5N7QAGEA.cjs → chunk-TWHXBMLJ.cjs} +37 -7
- package/dist/{chunk-BOVGCUDZ.cjs → chunk-UJL4JOXV.cjs} +2 -2
- package/dist/chunk-UQF3OJVE.mjs +389 -0
- package/dist/{chunk-XY4DYGSU.cjs → chunk-WGUHDWT5.cjs} +607 -435
- package/dist/{chunk-LAZK6UV7.mjs → chunk-YAJTD3ZG.mjs} +1 -1
- package/dist/{chunk-7UPCJDB5.mjs → chunk-YUEYBL35.mjs} +2 -2
- package/dist/{chunk-EIMK7D2D.mjs → chunk-ZD2VKAUI.mjs} +34 -4
- package/dist/chunk-ZNXTU4YH.mjs +114 -0
- package/dist/{client-plugins.d-C_3CdALC.d.mts → client-plugins.d-DllmH8eM.d.mts} +31 -5
- package/dist/{client-plugins.d-C0n8Yhh-.d.ts → client-plugins.d-n3iWY1EJ.d.ts} +31 -5
- package/dist/client-plugins.d.mts +2 -2
- package/dist/client-plugins.d.ts +2 -2
- package/dist/client.d.mts +7 -7
- package/dist/client.d.ts +7 -7
- package/dist/{config.d-CnhyvvmT.d.ts → config.d-DqKaCr1r.d.mts} +14 -3
- package/dist/{config.d-CnhyvvmT.d.mts → config.d-DqKaCr1r.d.ts} +14 -3
- package/dist/config.d.mts +2 -2
- package/dist/config.d.ts +2 -2
- package/dist/desktop.d.mts +3 -3
- package/dist/desktop.d.ts +3 -3
- package/dist/{devtools-KJFUE5FO.cjs → devtools-TO6TAO32.cjs} +5 -5
- package/dist/{devtools-BU5IT2PD.mjs → devtools-UESYARTF.mjs} +4 -4
- package/dist/docs.cjs +7 -7
- package/dist/docs.d.mts +3 -3
- package/dist/docs.d.ts +3 -3
- package/dist/docs.mjs +6 -6
- package/dist/index.cjs +23 -18
- package/dist/{index.d-CsGxS-hZ.d.mts → index.d-BL7KKiwa.d.mts} +1 -1
- package/dist/{index.d-B6M_8kmo.d.ts → index.d-BXsAXm1U.d.ts} +1 -1
- package/dist/index.d.mts +17 -17
- package/dist/index.d.ts +17 -17
- package/dist/index.mjs +23 -18
- package/dist/integrations.d.mts +2 -2
- package/dist/integrations.d.ts +2 -2
- package/dist/internal/app-markdown-runtime.cjs +3 -3
- package/dist/internal/app-markdown-runtime.d.mts +3 -3
- package/dist/internal/app-markdown-runtime.d.ts +3 -3
- package/dist/internal/app-markdown-runtime.mjs +2 -2
- package/dist/internal/build-runtime.cjs +21 -18
- package/dist/internal/build-runtime.d.mts +4 -4
- package/dist/internal/build-runtime.d.ts +4 -4
- package/dist/internal/build-runtime.mjs +20 -17
- package/dist/internal/cli-runtime.cjs +7 -7
- package/dist/internal/cli-runtime.mjs +6 -6
- package/dist/internal/client-error-overlay.cjs +4 -4
- package/dist/internal/client-error-overlay.mjs +1 -1
- package/dist/internal/client-runtime.d.mts +5 -5
- package/dist/internal/client-runtime.d.ts +5 -5
- package/dist/internal/compression-runtime.d.mts +2 -2
- package/dist/internal/compression-runtime.d.ts +2 -2
- package/dist/internal/config-runtime.cjs +6 -6
- package/dist/internal/config-runtime.d.mts +41 -80
- package/dist/internal/config-runtime.d.ts +41 -80
- package/dist/internal/config-runtime.mjs +5 -5
- package/dist/internal/infra-analytics-runtime.cjs +8 -8
- package/dist/internal/infra-analytics-runtime.mjs +6 -6
- package/dist/internal/product-telemetry-runtime.cjs +2 -2
- package/dist/internal/product-telemetry-runtime.mjs +1 -1
- package/dist/internal/production-runtime.cjs +91 -9
- package/dist/internal/production-runtime.d.mts +67 -12
- package/dist/internal/production-runtime.d.ts +67 -12
- package/dist/internal/production-runtime.mjs +90 -8
- package/dist/markdown.cjs +4 -2
- package/dist/markdown.d.mts +2 -2
- package/dist/markdown.d.ts +2 -2
- package/dist/markdown.mjs +3 -1
- package/dist/middleware.d.mts +4 -4
- package/dist/middleware.d.ts +4 -4
- package/dist/mobile.d.mts +21 -5
- package/dist/mobile.d.ts +21 -5
- package/dist/native-tree-EBPDFTRW.mjs +25 -0
- package/dist/native-tree-MMZS7S6W.cjs +25 -0
- package/dist/{navigation-delegate.d-C0BbdUgN.d.mts → navigation-delegate.d-C76gXTmO.d.mts} +1 -1
- package/dist/{navigation-delegate.d-jArRF0ZP.d.ts → navigation-delegate.d-DIyDslxt.d.ts} +1 -1
- package/dist/navigation.d.mts +5 -5
- package/dist/navigation.d.ts +5 -5
- package/dist/plugin.cjs +14 -13
- package/dist/plugin.d.mts +5 -4
- package/dist/plugin.d.ts +5 -4
- package/dist/plugin.mjs +13 -12
- package/dist/{production-runtime.d-DFaQ1qaV.d.mts → production-runtime.d-CDHztggO.d.mts} +1 -1
- package/dist/{production-runtime.d-UnXmSS_S.d.ts → production-runtime.d-tyaGdbk6.d.ts} +1 -1
- package/dist/{programmatic-routes-client.d-VZ0qcbH4.d.ts → programmatic-routes-client.d-XfmIrCK1.d.ts} +2 -2
- package/dist/{programmatic-routes-client.d-BIowUXQC.d.mts → programmatic-routes-client.d-aAWiDd64.d.mts} +2 -2
- package/dist/{render-plan.d-BNeqyPyJ.d.mts → render-plan.d-Diwybxo8.d.mts} +1 -1
- package/dist/{render-plan.d-BB6KrYjP.d.ts → render-plan.d-Dr5WRjoV.d.ts} +1 -1
- package/dist/renderer-client.d.mts +5 -5
- package/dist/renderer-client.d.ts +5 -5
- package/dist/{request.d-Bxhghm76.d.ts → request.d-D01fRn--.d.ts} +1 -1
- package/dist/{request.d-BV1munmx.d.mts → request.d-Dd3AFR79.d.mts} +1 -1
- package/dist/request.d.mts +3 -3
- package/dist/request.d.ts +3 -3
- package/dist/{route-rendering.d-DShqKlgK.d.mts → route-rendering.d-BQ53lJ_D.d.mts} +1 -1
- package/dist/{route-rendering.d-BIf7zE9d.d.ts → route-rendering.d-Bhx4QoJt.d.ts} +1 -1
- package/dist/{router.d-BE7i84fb.d.mts → router.d-Bi23a6Xc.d.mts} +1 -1
- package/dist/{router.d-Bw3K3b0a.d.ts → router.d-DQ3k7EYn.d.ts} +1 -1
- package/dist/{routes.d-_5tBQexL.d.mts → routes.d-BgTd7vI4.d.mts} +91 -4
- package/dist/{routes.d-DVZQL0-H.d.ts → routes.d-C7jMJFvP.d.ts} +91 -4
- package/dist/routes.d.mts +2 -2
- package/dist/routes.d.ts +2 -2
- package/dist/{rsc-pipeline-FBM6NFYY.mjs → rsc-pipeline-K3ER3Q4N.mjs} +5 -5
- package/dist/{rsc-pipeline-IQI5XQLS.cjs → rsc-pipeline-OCZIT5OF.cjs} +6 -6
- package/dist/{runtime-DXEVFYLE.cjs → runtime-DKNSIH7V.cjs} +85 -29
- package/dist/{runtime-2JYIDUON.mjs → runtime-MKYDEUZT.mjs} +75 -19
- package/dist/{runtime.d-CQgoYR0Q.d.mts → runtime.d-B2Js6qZ2.d.mts} +1 -1
- package/dist/{runtime.d-CfhaLPl-.d.ts → runtime.d-BL-CGwoi.d.ts} +1 -1
- package/dist/server-plugins.d.mts +3 -3
- package/dist/server-plugins.d.ts +3 -3
- package/dist/server.cjs +31 -30
- package/dist/server.d.mts +11 -10
- package/dist/server.d.ts +11 -10
- package/dist/server.mjs +16 -15
- package/dist/session-AAU7RNRO.cjs +23 -0
- package/dist/session-IGEDQ5PY.mjs +23 -0
- package/dist/{spa-router.d-D63jb6nX.d.mts → spa-router.d-B2rIFGs0.d.mts} +2 -2
- package/dist/{spa-router.d-C5opIgXg.d.ts → spa-router.d-DqZ6Lfs0.d.ts} +2 -2
- package/dist/testing.d.mts +2 -2
- package/dist/testing.d.ts +2 -2
- package/dist/{utils.d-CkpTqTsC.d.ts → utils.d-Bv2MPeLR.d.ts} +1 -1
- package/dist/{utils.d-CO-U4OVZ.d.mts → utils.d-fqXe8lNc.d.mts} +1 -1
- package/dist/version.cjs +2 -2
- package/dist/version.mjs +1 -1
- package/dist/vite.cjs +14 -13
- package/dist/vite.d.mts +12 -6
- package/dist/vite.d.ts +12 -6
- package/dist/vite.mjs +13 -12
- package/package.json +3 -3
|
@@ -1,9 +1,9 @@
|
|
|
1
1
|
import {
|
|
2
2
|
handleFarmDefaultMCPRequest
|
|
3
|
-
} from "./chunk-
|
|
4
|
-
import "./chunk-
|
|
5
|
-
import "./chunk-
|
|
6
|
-
import "./chunk-
|
|
3
|
+
} from "./chunk-MRNDAJEV.mjs";
|
|
4
|
+
import "./chunk-E5DXF5GE.mjs";
|
|
5
|
+
import "./chunk-YAJTD3ZG.mjs";
|
|
6
|
+
import "./chunk-LPDKG6RA.mjs";
|
|
7
7
|
import "./chunk-KJMWAUKE.mjs";
|
|
8
8
|
import "./chunk-2DA7CLY7.mjs";
|
|
9
9
|
import "./chunk-LM2YOGDK.mjs";
|
|
@@ -1,9 +1,9 @@
|
|
|
1
1
|
"use strict";Object.defineProperty(exports, "__esModule", {value: true});
|
|
2
2
|
|
|
3
|
-
var
|
|
4
|
-
require('./chunk-
|
|
5
|
-
require('./chunk-
|
|
6
|
-
require('./chunk-
|
|
3
|
+
var _chunk53SACYBYcjs = require('./chunk-53SACYBY.cjs');
|
|
4
|
+
require('./chunk-46KXZBOG.cjs');
|
|
5
|
+
require('./chunk-H33PJEXN.cjs');
|
|
6
|
+
require('./chunk-D7UQC4O6.cjs');
|
|
7
7
|
require('./chunk-6ONBZGVH.cjs');
|
|
8
8
|
require('./chunk-EVIWKPJV.cjs');
|
|
9
9
|
require('./chunk-B5BBTPJQ.cjs');
|
|
@@ -15,4 +15,4 @@ require('./chunk-YTVSWXEZ.cjs');
|
|
|
15
15
|
require('./chunk-BTZ5O6VM.cjs');
|
|
16
16
|
|
|
17
17
|
|
|
18
|
-
exports.handleFarmDefaultMCPRequest =
|
|
18
|
+
exports.handleFarmDefaultMCPRequest = _chunk53SACYBYcjs.handleFarmDefaultMCPRequest;
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { M as Metadata, bp as FarmAgentJsonLd, bq as FarmMCPServerRegistration, br as FarmMarkdownResolvedConfig } from './client-plugins.d-
|
|
1
|
+
import { M as Metadata, bp as FarmAgentJsonLd, bq as FarmMCPServerRegistration, br as FarmMarkdownResolvedConfig } from './client-plugins.d-n3iWY1EJ.js';
|
|
2
2
|
|
|
3
3
|
type MetadataImageKind = "opengraph" | "twitter";
|
|
4
4
|
interface FarmMetadataImageReference {
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { M as Metadata, bp as FarmAgentJsonLd, bq as FarmMCPServerRegistration, br as FarmMarkdownResolvedConfig } from './client-plugins.d-
|
|
1
|
+
import { M as Metadata, bp as FarmAgentJsonLd, bq as FarmMCPServerRegistration, br as FarmMarkdownResolvedConfig } from './client-plugins.d-DllmH8eM.mjs';
|
|
2
2
|
|
|
3
3
|
type MetadataImageKind = "opengraph" | "twitter";
|
|
4
4
|
interface FarmMetadataImageReference {
|
package/dist/agent-runtime.d.mts
CHANGED
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import { ChildProcess } from 'node:child_process';
|
|
2
|
-
import { B as BundleResultPayload, F as FarmPlugin, a as FarmIntegration } from './client-plugins.d-
|
|
2
|
+
import { B as BundleResultPayload, F as FarmPlugin, a as FarmIntegration } from './client-plugins.d-DllmH8eM.mjs';
|
|
3
3
|
import './lifecycle.d-C2aLBOwu.mjs';
|
|
4
4
|
import './route.d-BaVH3V0w.mjs';
|
|
5
5
|
import './endpoint.d-BkMSCRf6.mjs';
|
|
@@ -29,7 +29,7 @@ import 'rolldown/utils';
|
|
|
29
29
|
import 'rolldown';
|
|
30
30
|
import './image-config.d-CeDgNyX4.mjs';
|
|
31
31
|
import './types.d-C41ePjvP.mjs';
|
|
32
|
-
import './config.d-
|
|
32
|
+
import './config.d-DqKaCr1r.mjs';
|
|
33
33
|
import './types.d-DQnyD3VD.mjs';
|
|
34
34
|
import './font.mjs';
|
|
35
35
|
|
package/dist/agent-runtime.d.ts
CHANGED
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import { ChildProcess } from 'node:child_process';
|
|
2
|
-
import { B as BundleResultPayload, F as FarmPlugin, a as FarmIntegration } from './client-plugins.d-
|
|
2
|
+
import { B as BundleResultPayload, F as FarmPlugin, a as FarmIntegration } from './client-plugins.d-n3iWY1EJ.js';
|
|
3
3
|
import './lifecycle.d-C2aLBOwu.js';
|
|
4
4
|
import './route.d-DBTEqifW.js';
|
|
5
5
|
import './endpoint.d-BgHn0lhl.js';
|
|
@@ -29,7 +29,7 @@ import 'rolldown/utils';
|
|
|
29
29
|
import 'rolldown';
|
|
30
30
|
import './image-config.d-CeDgNyX4.js';
|
|
31
31
|
import './types.d-C41ePjvP.js';
|
|
32
|
-
import './config.d-
|
|
32
|
+
import './config.d-DqKaCr1r.js';
|
|
33
33
|
import './types.d-DQnyD3VD.js';
|
|
34
34
|
import './font.js';
|
|
35
35
|
|
|
@@ -1,6 +1,10 @@
|
|
|
1
|
+
import {
|
|
2
|
+
FARM_NATIVE_STYLE_PROPERTIES,
|
|
3
|
+
farmNativeClassProblem
|
|
4
|
+
} from "./chunk-MIGFX2FN.mjs";
|
|
1
5
|
import {
|
|
2
6
|
FARM_VERSION
|
|
3
|
-
} from "./chunk-
|
|
7
|
+
} from "./chunk-R4PHCZ3G.mjs";
|
|
4
8
|
import "./chunk-Y6FXYEAI.mjs";
|
|
5
9
|
|
|
6
10
|
// src/mobile/analyzer.ts
|
|
@@ -8,7 +12,7 @@ import { createHash } from "crypto";
|
|
|
8
12
|
import { existsSync, readFileSync, statSync } from "fs";
|
|
9
13
|
import { mkdir, readFile, writeFile } from "fs/promises";
|
|
10
14
|
import * as path from "path";
|
|
11
|
-
var ANALYZER_VERSION = `
|
|
15
|
+
var ANALYZER_VERSION = `3:${FARM_VERSION}`;
|
|
12
16
|
var INTRINSIC_KINDS = {};
|
|
13
17
|
for (const tag of "div section main article header footer nav aside figure hr li".split(" ")) {
|
|
14
18
|
INTRINSIC_KINDS[tag] = "View";
|
|
@@ -303,9 +307,15 @@ function analyzeSource(file, source, parseSync) {
|
|
|
303
307
|
components: {}
|
|
304
308
|
};
|
|
305
309
|
const starts = lineStarts(source);
|
|
306
|
-
const block = (node, rule, message) => {
|
|
307
|
-
facts.blockers.push({
|
|
310
|
+
const block = (node, rule, message, only) => {
|
|
311
|
+
facts.blockers.push({
|
|
312
|
+
...locate(starts, node.start),
|
|
313
|
+
rule,
|
|
314
|
+
message,
|
|
315
|
+
...only ? { only } : {}
|
|
316
|
+
});
|
|
308
317
|
};
|
|
318
|
+
const needsDevice = (node, message) => block(node, "client-logic", message, "native");
|
|
309
319
|
const result = parseSync(file, source, { lang: scriptLang(file) });
|
|
310
320
|
if (result.errors.length > 0) {
|
|
311
321
|
const error = result.errors[0];
|
|
@@ -323,7 +333,10 @@ function analyzeSource(file, source, parseSync) {
|
|
|
323
333
|
let defaultName;
|
|
324
334
|
for (const statement of program.body) {
|
|
325
335
|
if (statement.type === "ExpressionStatement" && statement.directive) {
|
|
326
|
-
if (statement.directive === "use client")
|
|
336
|
+
if (statement.directive === "use client") {
|
|
337
|
+
facts.useClient = true;
|
|
338
|
+
needsDevice(statement, 'a "use client" module renders in the browser');
|
|
339
|
+
}
|
|
327
340
|
if (statement.directive === "use server") facts.serverBoundary = true;
|
|
328
341
|
continue;
|
|
329
342
|
}
|
|
@@ -400,6 +413,14 @@ function analyzeSource(file, source, parseSync) {
|
|
|
400
413
|
kind = MAPPED_COMPONENTS[binding.source]?.[member];
|
|
401
414
|
if (!kind) {
|
|
402
415
|
const fromApp = /^(?:\.|\/|@\/|~|#)/.test(binding.source);
|
|
416
|
+
if (!fromApp) {
|
|
417
|
+
block(
|
|
418
|
+
opening,
|
|
419
|
+
"unmapped-element",
|
|
420
|
+
`<${tag}> from "${binding.source}" has no native mapping`,
|
|
421
|
+
"native"
|
|
422
|
+
);
|
|
423
|
+
}
|
|
403
424
|
counted = !fromApp;
|
|
404
425
|
kind = fromApp || PORTABLE_PACKAGES.has(packageName(binding.source)) ? "Component" : void 0;
|
|
405
426
|
}
|
|
@@ -453,6 +474,8 @@ function analyzeSource(file, source, parseSync) {
|
|
|
453
474
|
if (/^on[A-Z]/.test(name)) {
|
|
454
475
|
if (isIntrinsic && kind && !MAPPED_EVENTS[kind]?.has(name)) {
|
|
455
476
|
block(attribute, "dom-event", `${name} on <${tag}> has no native event`);
|
|
477
|
+
} else {
|
|
478
|
+
needsDevice(attribute, `${name} on <${tag}> runs on the device`);
|
|
456
479
|
}
|
|
457
480
|
events.push(name);
|
|
458
481
|
continue;
|
|
@@ -466,7 +489,11 @@ function analyzeSource(file, source, parseSync) {
|
|
|
466
489
|
for (const token of classes.split(/\s+/).filter(Boolean)) {
|
|
467
490
|
const problem = classifyClass(token);
|
|
468
491
|
if (problem) block(attribute, "class-name", problem);
|
|
469
|
-
else
|
|
492
|
+
else {
|
|
493
|
+
style.push(token);
|
|
494
|
+
const native = farmNativeClassProblem(token);
|
|
495
|
+
if (native) block(attribute, "class-name", native, "native");
|
|
496
|
+
}
|
|
470
497
|
}
|
|
471
498
|
continue;
|
|
472
499
|
}
|
|
@@ -486,6 +513,9 @@ function analyzeSource(file, source, parseSync) {
|
|
|
486
513
|
block(property, "style", `style.${key} has no native mapping`);
|
|
487
514
|
continue;
|
|
488
515
|
}
|
|
516
|
+
if (!FARM_NATIVE_STYLE_PROPERTIES.has(key)) {
|
|
517
|
+
block(property, "style", `style.${key} has no native-tier style`, "native");
|
|
518
|
+
}
|
|
489
519
|
const literal2 = staticString(property.value);
|
|
490
520
|
if (literal2 !== void 0) {
|
|
491
521
|
if (STYLE_ENUMS[key] && !STYLE_ENUMS[key].has(literal2)) {
|
|
@@ -613,6 +643,8 @@ function analyzeSource(file, source, parseSync) {
|
|
|
613
643
|
const calleeName = callee.type === "Identifier" ? callee.name : callee.type === "MemberExpression" && !callee.computed ? callee.property.name : void 0;
|
|
614
644
|
if (calleeName === "useLayoutEffect" || calleeName === "useInsertionEffect") {
|
|
615
645
|
block(node, "layout-effect", `${calleeName} reads layout from the DOM`);
|
|
646
|
+
} else if (calleeName && /^use(?:[A-Z0-9]|$)/.test(calleeName)) {
|
|
647
|
+
needsDevice(node, `${calleeName}() runs on the device`);
|
|
616
648
|
}
|
|
617
649
|
if (calleeName === "createElement" || calleeName === "cloneElement") {
|
|
618
650
|
block(
|
|
@@ -766,7 +798,13 @@ function classifyPackage(fact, serverBoundary) {
|
|
|
766
798
|
const at = { line: fact.line, column: fact.column };
|
|
767
799
|
const specifier = fact.source;
|
|
768
800
|
if (specifier.startsWith("node:") || NODE_BUILTINS.has(packageName(specifier))) {
|
|
769
|
-
return serverBoundary ? void 0 : {
|
|
801
|
+
return serverBoundary ? void 0 : {
|
|
802
|
+
...at,
|
|
803
|
+
rule: "node-builtin",
|
|
804
|
+
message: `import "${specifier}" is a Node.js API`,
|
|
805
|
+
// A server-rendered screen runs it on the server, like the web page.
|
|
806
|
+
only: "react-native"
|
|
807
|
+
};
|
|
770
808
|
}
|
|
771
809
|
if (specifier.startsWith("@farm.js/core")) {
|
|
772
810
|
const portable = CORE_PORTABLE[specifier];
|
|
@@ -775,14 +813,22 @@ function classifyPackage(fact, serverBoundary) {
|
|
|
775
813
|
return {
|
|
776
814
|
...at,
|
|
777
815
|
rule: "unmapped-import",
|
|
778
|
-
message: `${unmapped.join(", ") || "import"} from "${specifier}" has no native mapping
|
|
816
|
+
message: `${unmapped.join(", ") || "import"} from "${specifier}" has no native mapping`,
|
|
817
|
+
// Server APIs are fine on a server-rendered screen; components and hooks from it are
|
|
818
|
+
// checked where they are used.
|
|
819
|
+
only: "react-native"
|
|
779
820
|
};
|
|
780
821
|
}
|
|
781
822
|
return void 0;
|
|
782
823
|
}
|
|
783
824
|
const name = packageName(specifier);
|
|
784
825
|
if (name === "react") {
|
|
785
|
-
return specifier === "react" || specifier === "react/jsx-runtime" || specifier === "react/jsx-dev-runtime" ? void 0 : {
|
|
826
|
+
return specifier === "react" || specifier === "react/jsx-runtime" || specifier === "react/jsx-dev-runtime" ? void 0 : {
|
|
827
|
+
...at,
|
|
828
|
+
rule: "unknown-package",
|
|
829
|
+
message: `import "${specifier}" has no native mapping`,
|
|
830
|
+
only: "react-native"
|
|
831
|
+
};
|
|
786
832
|
}
|
|
787
833
|
if (PORTABLE_PACKAGES.has(name)) return void 0;
|
|
788
834
|
if (DOM_PACKAGES.some(
|
|
@@ -793,7 +839,9 @@ function classifyPackage(fact, serverBoundary) {
|
|
|
793
839
|
return {
|
|
794
840
|
...at,
|
|
795
841
|
rule: "unknown-package",
|
|
796
|
-
message: `import "${specifier}" has no native mapping
|
|
842
|
+
message: `import "${specifier}" has no native mapping`,
|
|
843
|
+
// Data and utility packages run on the server; their components are blocked where used.
|
|
844
|
+
only: "react-native"
|
|
797
845
|
};
|
|
798
846
|
}
|
|
799
847
|
var NODE_BUILTINS = new Set(
|
|
@@ -970,31 +1018,37 @@ async function analyzeFarmMobileRoutes(options) {
|
|
|
970
1018
|
const elements = { total: 0, mapped: 0, byKind: {} };
|
|
971
1019
|
const seen = /* @__PURE__ */ new Set();
|
|
972
1020
|
const ir = { root: "", components: {} };
|
|
973
|
-
const walk = (file, entry) => {
|
|
1021
|
+
const walk = (file, entry, layout) => {
|
|
974
1022
|
if (seen.has(file)) return;
|
|
975
1023
|
seen.add(file);
|
|
976
1024
|
const moduleFacts = settled.get(file);
|
|
977
1025
|
const label = relative2(root, file);
|
|
1026
|
+
const add = (blocker) => {
|
|
1027
|
+
if (!layout) blockers.push(blocker);
|
|
1028
|
+
else if (blocker.only !== "native") blockers.push({ ...blocker, only: "react-native" });
|
|
1029
|
+
};
|
|
978
1030
|
if (entry && options.serverComponents && !moduleFacts.useClient) {
|
|
979
|
-
|
|
1031
|
+
add({
|
|
980
1032
|
file: label,
|
|
981
1033
|
line: 1,
|
|
982
1034
|
column: 1,
|
|
983
1035
|
rule: "server-component",
|
|
984
|
-
message: 'a server component (no "use client") renders on the server'
|
|
1036
|
+
message: 'a server component (no "use client") renders on the server',
|
|
1037
|
+
only: "react-native"
|
|
985
1038
|
});
|
|
986
1039
|
}
|
|
987
1040
|
if (entry && moduleFacts.asyncDefault) {
|
|
988
|
-
|
|
1041
|
+
add({
|
|
989
1042
|
file: label,
|
|
990
1043
|
line: 1,
|
|
991
1044
|
column: 1,
|
|
992
1045
|
rule: "async-component",
|
|
993
|
-
message: "an async component renders on the server"
|
|
1046
|
+
message: "an async component renders on the server",
|
|
1047
|
+
only: "react-native"
|
|
994
1048
|
});
|
|
995
1049
|
}
|
|
996
1050
|
if (moduleFacts.serverBoundary && !entry) return;
|
|
997
|
-
for (const blocker of moduleFacts.blockers)
|
|
1051
|
+
for (const blocker of moduleFacts.blockers) add({ file: label, ...blocker });
|
|
998
1052
|
for (const win of moduleFacts.wins) wins.add(win);
|
|
999
1053
|
elements.total += moduleFacts.elements.total;
|
|
1000
1054
|
elements.mapped += moduleFacts.elements.mapped;
|
|
@@ -1005,8 +1059,8 @@ async function analyzeFarmMobileRoutes(options) {
|
|
|
1005
1059
|
ir.components[`${label}#${name}`] = node;
|
|
1006
1060
|
}
|
|
1007
1061
|
for (const entryImport of resolved.get(file) ?? []) {
|
|
1008
|
-
if (entryImport.blocker)
|
|
1009
|
-
if (entryImport.file) walk(entryImport.file, false);
|
|
1062
|
+
if (entryImport.blocker) add({ file: label, ...entryImport.blocker });
|
|
1063
|
+
if (entryImport.file) walk(entryImport.file, false, layout);
|
|
1010
1064
|
}
|
|
1011
1065
|
};
|
|
1012
1066
|
if (!page) {
|
|
@@ -1026,17 +1080,23 @@ async function analyzeFarmMobileRoutes(options) {
|
|
|
1026
1080
|
message: "a Markdown page renders HTML from Markdown"
|
|
1027
1081
|
});
|
|
1028
1082
|
} else {
|
|
1029
|
-
walk(page, true);
|
|
1083
|
+
walk(page, true, false);
|
|
1030
1084
|
ir.root = `${relative2(root, page)}#default`;
|
|
1031
1085
|
}
|
|
1032
|
-
for (const layout of layouts) walk(layout, true);
|
|
1033
|
-
const
|
|
1086
|
+
for (const layout of layouts) walk(layout, true, true);
|
|
1087
|
+
const strip = ({ only: _only, ...blocker }) => blocker;
|
|
1088
|
+
const portBlockers = blockers.filter((blocker) => blocker.only !== "native").map(strip);
|
|
1089
|
+
const nativeBlockers = blockers.filter((blocker) => blocker.only !== "react-native").map(strip);
|
|
1090
|
+
const portable = portBlockers.length === 0;
|
|
1091
|
+
const tier = nativeBlockers.length === 0 ? "native" : portable ? "react-native" : "web";
|
|
1034
1092
|
const sortedWins = [...wins].sort();
|
|
1035
1093
|
const analysis = {
|
|
1036
1094
|
route,
|
|
1095
|
+
tier,
|
|
1037
1096
|
decision: portable && sortedWins.length > 0 ? "port" : "web",
|
|
1038
1097
|
portable,
|
|
1039
|
-
blockers,
|
|
1098
|
+
blockers: portBlockers,
|
|
1099
|
+
nativeBlockers,
|
|
1040
1100
|
wins: sortedWins,
|
|
1041
1101
|
elements,
|
|
1042
1102
|
portablePercent: elements.total === 0 ? portable ? 100 : 0 : Math.round(elements.mapped / elements.total * 100),
|
|
@@ -1,6 +1,10 @@
|
|
|
1
1
|
"use strict";Object.defineProperty(exports, "__esModule", {value: true}); function _interopRequireWildcard(obj) { if (obj && obj.__esModule) { return obj; } else { var newObj = {}; if (obj != null) { for (var key in obj) { if (Object.prototype.hasOwnProperty.call(obj, key)) { newObj[key] = obj[key]; } } } newObj.default = obj; return newObj; } } function _nullishCoalesce(lhs, rhsFn) { if (lhs != null) { return lhs; } else { return rhsFn(); } } 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
|
-
|
|
3
|
+
|
|
4
|
+
var _chunkP6MHI5O2cjs = require('./chunk-P6MHI5O2.cjs');
|
|
5
|
+
|
|
6
|
+
|
|
7
|
+
var _chunkOAMUSC7Hcjs = require('./chunk-OAMUSC7H.cjs');
|
|
4
8
|
require('./chunk-BTZ5O6VM.cjs');
|
|
5
9
|
|
|
6
10
|
// src/mobile/analyzer.ts
|
|
@@ -8,7 +12,7 @@ var _crypto = require('crypto');
|
|
|
8
12
|
var _fs = require('fs');
|
|
9
13
|
var _promises = require('fs/promises');
|
|
10
14
|
var _path = require('path'); var path = _interopRequireWildcard(_path);
|
|
11
|
-
var ANALYZER_VERSION = `
|
|
15
|
+
var ANALYZER_VERSION = `3:${_chunkOAMUSC7Hcjs.FARM_VERSION}`;
|
|
12
16
|
var INTRINSIC_KINDS = {};
|
|
13
17
|
for (const tag of "div section main article header footer nav aside figure hr li".split(" ")) {
|
|
14
18
|
INTRINSIC_KINDS[tag] = "View";
|
|
@@ -303,9 +307,15 @@ function analyzeSource(file, source, parseSync) {
|
|
|
303
307
|
components: {}
|
|
304
308
|
};
|
|
305
309
|
const starts = lineStarts(source);
|
|
306
|
-
const block = (node, rule, message) => {
|
|
307
|
-
facts.blockers.push({
|
|
310
|
+
const block = (node, rule, message, only) => {
|
|
311
|
+
facts.blockers.push({
|
|
312
|
+
...locate(starts, node.start),
|
|
313
|
+
rule,
|
|
314
|
+
message,
|
|
315
|
+
...only ? { only } : {}
|
|
316
|
+
});
|
|
308
317
|
};
|
|
318
|
+
const needsDevice = (node, message) => block(node, "client-logic", message, "native");
|
|
309
319
|
const result = parseSync(file, source, { lang: scriptLang(file) });
|
|
310
320
|
if (result.errors.length > 0) {
|
|
311
321
|
const error = result.errors[0];
|
|
@@ -323,7 +333,10 @@ function analyzeSource(file, source, parseSync) {
|
|
|
323
333
|
let defaultName;
|
|
324
334
|
for (const statement of program.body) {
|
|
325
335
|
if (statement.type === "ExpressionStatement" && statement.directive) {
|
|
326
|
-
if (statement.directive === "use client")
|
|
336
|
+
if (statement.directive === "use client") {
|
|
337
|
+
facts.useClient = true;
|
|
338
|
+
needsDevice(statement, 'a "use client" module renders in the browser');
|
|
339
|
+
}
|
|
327
340
|
if (statement.directive === "use server") facts.serverBoundary = true;
|
|
328
341
|
continue;
|
|
329
342
|
}
|
|
@@ -400,6 +413,14 @@ function analyzeSource(file, source, parseSync) {
|
|
|
400
413
|
kind = _optionalChain([MAPPED_COMPONENTS, 'access', _13 => _13[binding.source], 'optionalAccess', _14 => _14[member]]);
|
|
401
414
|
if (!kind) {
|
|
402
415
|
const fromApp = /^(?:\.|\/|@\/|~|#)/.test(binding.source);
|
|
416
|
+
if (!fromApp) {
|
|
417
|
+
block(
|
|
418
|
+
opening,
|
|
419
|
+
"unmapped-element",
|
|
420
|
+
`<${tag}> from "${binding.source}" has no native mapping`,
|
|
421
|
+
"native"
|
|
422
|
+
);
|
|
423
|
+
}
|
|
403
424
|
counted = !fromApp;
|
|
404
425
|
kind = fromApp || PORTABLE_PACKAGES.has(packageName(binding.source)) ? "Component" : void 0;
|
|
405
426
|
}
|
|
@@ -453,6 +474,8 @@ function analyzeSource(file, source, parseSync) {
|
|
|
453
474
|
if (/^on[A-Z]/.test(name)) {
|
|
454
475
|
if (isIntrinsic && kind && !_optionalChain([MAPPED_EVENTS, 'access', _15 => _15[kind], 'optionalAccess', _16 => _16.has, 'call', _17 => _17(name)])) {
|
|
455
476
|
block(attribute, "dom-event", `${name} on <${tag}> has no native event`);
|
|
477
|
+
} else {
|
|
478
|
+
needsDevice(attribute, `${name} on <${tag}> runs on the device`);
|
|
456
479
|
}
|
|
457
480
|
events.push(name);
|
|
458
481
|
continue;
|
|
@@ -466,7 +489,11 @@ function analyzeSource(file, source, parseSync) {
|
|
|
466
489
|
for (const token of classes.split(/\s+/).filter(Boolean)) {
|
|
467
490
|
const problem = classifyClass(token);
|
|
468
491
|
if (problem) block(attribute, "class-name", problem);
|
|
469
|
-
else
|
|
492
|
+
else {
|
|
493
|
+
style.push(token);
|
|
494
|
+
const native = _chunkP6MHI5O2cjs.farmNativeClassProblem.call(void 0, token);
|
|
495
|
+
if (native) block(attribute, "class-name", native, "native");
|
|
496
|
+
}
|
|
470
497
|
}
|
|
471
498
|
continue;
|
|
472
499
|
}
|
|
@@ -486,6 +513,9 @@ function analyzeSource(file, source, parseSync) {
|
|
|
486
513
|
block(property, "style", `style.${key} has no native mapping`);
|
|
487
514
|
continue;
|
|
488
515
|
}
|
|
516
|
+
if (!_chunkP6MHI5O2cjs.FARM_NATIVE_STYLE_PROPERTIES.has(key)) {
|
|
517
|
+
block(property, "style", `style.${key} has no native-tier style`, "native");
|
|
518
|
+
}
|
|
489
519
|
const literal2 = staticString(property.value);
|
|
490
520
|
if (literal2 !== void 0) {
|
|
491
521
|
if (STYLE_ENUMS[key] && !STYLE_ENUMS[key].has(literal2)) {
|
|
@@ -613,6 +643,8 @@ function analyzeSource(file, source, parseSync) {
|
|
|
613
643
|
const calleeName = callee.type === "Identifier" ? callee.name : callee.type === "MemberExpression" && !callee.computed ? callee.property.name : void 0;
|
|
614
644
|
if (calleeName === "useLayoutEffect" || calleeName === "useInsertionEffect") {
|
|
615
645
|
block(node, "layout-effect", `${calleeName} reads layout from the DOM`);
|
|
646
|
+
} else if (calleeName && /^use(?:[A-Z0-9]|$)/.test(calleeName)) {
|
|
647
|
+
needsDevice(node, `${calleeName}() runs on the device`);
|
|
616
648
|
}
|
|
617
649
|
if (calleeName === "createElement" || calleeName === "cloneElement") {
|
|
618
650
|
block(
|
|
@@ -766,7 +798,13 @@ function classifyPackage(fact, serverBoundary) {
|
|
|
766
798
|
const at = { line: fact.line, column: fact.column };
|
|
767
799
|
const specifier = fact.source;
|
|
768
800
|
if (specifier.startsWith("node:") || NODE_BUILTINS.has(packageName(specifier))) {
|
|
769
|
-
return serverBoundary ? void 0 : {
|
|
801
|
+
return serverBoundary ? void 0 : {
|
|
802
|
+
...at,
|
|
803
|
+
rule: "node-builtin",
|
|
804
|
+
message: `import "${specifier}" is a Node.js API`,
|
|
805
|
+
// A server-rendered screen runs it on the server, like the web page.
|
|
806
|
+
only: "react-native"
|
|
807
|
+
};
|
|
770
808
|
}
|
|
771
809
|
if (specifier.startsWith("@farm.js/core")) {
|
|
772
810
|
const portable = CORE_PORTABLE[specifier];
|
|
@@ -775,14 +813,22 @@ function classifyPackage(fact, serverBoundary) {
|
|
|
775
813
|
return {
|
|
776
814
|
...at,
|
|
777
815
|
rule: "unmapped-import",
|
|
778
|
-
message: `${unmapped.join(", ") || "import"} from "${specifier}" has no native mapping
|
|
816
|
+
message: `${unmapped.join(", ") || "import"} from "${specifier}" has no native mapping`,
|
|
817
|
+
// Server APIs are fine on a server-rendered screen; components and hooks from it are
|
|
818
|
+
// checked where they are used.
|
|
819
|
+
only: "react-native"
|
|
779
820
|
};
|
|
780
821
|
}
|
|
781
822
|
return void 0;
|
|
782
823
|
}
|
|
783
824
|
const name = packageName(specifier);
|
|
784
825
|
if (name === "react") {
|
|
785
|
-
return specifier === "react" || specifier === "react/jsx-runtime" || specifier === "react/jsx-dev-runtime" ? void 0 : {
|
|
826
|
+
return specifier === "react" || specifier === "react/jsx-runtime" || specifier === "react/jsx-dev-runtime" ? void 0 : {
|
|
827
|
+
...at,
|
|
828
|
+
rule: "unknown-package",
|
|
829
|
+
message: `import "${specifier}" has no native mapping`,
|
|
830
|
+
only: "react-native"
|
|
831
|
+
};
|
|
786
832
|
}
|
|
787
833
|
if (PORTABLE_PACKAGES.has(name)) return void 0;
|
|
788
834
|
if (DOM_PACKAGES.some(
|
|
@@ -793,7 +839,9 @@ function classifyPackage(fact, serverBoundary) {
|
|
|
793
839
|
return {
|
|
794
840
|
...at,
|
|
795
841
|
rule: "unknown-package",
|
|
796
|
-
message: `import "${specifier}" has no native mapping
|
|
842
|
+
message: `import "${specifier}" has no native mapping`,
|
|
843
|
+
// Data and utility packages run on the server; their components are blocked where used.
|
|
844
|
+
only: "react-native"
|
|
797
845
|
};
|
|
798
846
|
}
|
|
799
847
|
var NODE_BUILTINS = new Set(
|
|
@@ -970,31 +1018,37 @@ async function analyzeFarmMobileRoutes(options) {
|
|
|
970
1018
|
const elements = { total: 0, mapped: 0, byKind: {} };
|
|
971
1019
|
const seen = /* @__PURE__ */ new Set();
|
|
972
1020
|
const ir = { root: "", components: {} };
|
|
973
|
-
const walk = (file, entry) => {
|
|
1021
|
+
const walk = (file, entry, layout) => {
|
|
974
1022
|
if (seen.has(file)) return;
|
|
975
1023
|
seen.add(file);
|
|
976
1024
|
const moduleFacts = settled.get(file);
|
|
977
1025
|
const label = relative2(root, file);
|
|
1026
|
+
const add = (blocker) => {
|
|
1027
|
+
if (!layout) blockers.push(blocker);
|
|
1028
|
+
else if (blocker.only !== "native") blockers.push({ ...blocker, only: "react-native" });
|
|
1029
|
+
};
|
|
978
1030
|
if (entry && options.serverComponents && !moduleFacts.useClient) {
|
|
979
|
-
|
|
1031
|
+
add({
|
|
980
1032
|
file: label,
|
|
981
1033
|
line: 1,
|
|
982
1034
|
column: 1,
|
|
983
1035
|
rule: "server-component",
|
|
984
|
-
message: 'a server component (no "use client") renders on the server'
|
|
1036
|
+
message: 'a server component (no "use client") renders on the server',
|
|
1037
|
+
only: "react-native"
|
|
985
1038
|
});
|
|
986
1039
|
}
|
|
987
1040
|
if (entry && moduleFacts.asyncDefault) {
|
|
988
|
-
|
|
1041
|
+
add({
|
|
989
1042
|
file: label,
|
|
990
1043
|
line: 1,
|
|
991
1044
|
column: 1,
|
|
992
1045
|
rule: "async-component",
|
|
993
|
-
message: "an async component renders on the server"
|
|
1046
|
+
message: "an async component renders on the server",
|
|
1047
|
+
only: "react-native"
|
|
994
1048
|
});
|
|
995
1049
|
}
|
|
996
1050
|
if (moduleFacts.serverBoundary && !entry) return;
|
|
997
|
-
for (const blocker of moduleFacts.blockers)
|
|
1051
|
+
for (const blocker of moduleFacts.blockers) add({ file: label, ...blocker });
|
|
998
1052
|
for (const win of moduleFacts.wins) wins.add(win);
|
|
999
1053
|
elements.total += moduleFacts.elements.total;
|
|
1000
1054
|
elements.mapped += moduleFacts.elements.mapped;
|
|
@@ -1005,8 +1059,8 @@ async function analyzeFarmMobileRoutes(options) {
|
|
|
1005
1059
|
ir.components[`${label}#${name}`] = node;
|
|
1006
1060
|
}
|
|
1007
1061
|
for (const entryImport of _nullishCoalesce(resolved.get(file), () => ( []))) {
|
|
1008
|
-
if (entryImport.blocker)
|
|
1009
|
-
if (entryImport.file) walk(entryImport.file, false);
|
|
1062
|
+
if (entryImport.blocker) add({ file: label, ...entryImport.blocker });
|
|
1063
|
+
if (entryImport.file) walk(entryImport.file, false, layout);
|
|
1010
1064
|
}
|
|
1011
1065
|
};
|
|
1012
1066
|
if (!page) {
|
|
@@ -1026,17 +1080,23 @@ async function analyzeFarmMobileRoutes(options) {
|
|
|
1026
1080
|
message: "a Markdown page renders HTML from Markdown"
|
|
1027
1081
|
});
|
|
1028
1082
|
} else {
|
|
1029
|
-
walk(page, true);
|
|
1083
|
+
walk(page, true, false);
|
|
1030
1084
|
ir.root = `${relative2(root, page)}#default`;
|
|
1031
1085
|
}
|
|
1032
|
-
for (const layout of layouts) walk(layout, true);
|
|
1033
|
-
const
|
|
1086
|
+
for (const layout of layouts) walk(layout, true, true);
|
|
1087
|
+
const strip = ({ only: _only, ...blocker }) => blocker;
|
|
1088
|
+
const portBlockers = blockers.filter((blocker) => blocker.only !== "native").map(strip);
|
|
1089
|
+
const nativeBlockers = blockers.filter((blocker) => blocker.only !== "react-native").map(strip);
|
|
1090
|
+
const portable = portBlockers.length === 0;
|
|
1091
|
+
const tier = nativeBlockers.length === 0 ? "native" : portable ? "react-native" : "web";
|
|
1034
1092
|
const sortedWins = [...wins].sort();
|
|
1035
1093
|
const analysis = {
|
|
1036
1094
|
route,
|
|
1095
|
+
tier,
|
|
1037
1096
|
decision: portable && sortedWins.length > 0 ? "port" : "web",
|
|
1038
1097
|
portable,
|
|
1039
|
-
blockers,
|
|
1098
|
+
blockers: portBlockers,
|
|
1099
|
+
nativeBlockers,
|
|
1040
1100
|
wins: sortedWins,
|
|
1041
1101
|
elements,
|
|
1042
1102
|
portablePercent: elements.total === 0 ? portable ? 100 : 0 : Math.round(elements.mapped / elements.total * 100),
|
|
@@ -1,6 +1,6 @@
|
|
|
1
|
-
import { P as PluginAPIDispatch } from '../runtime.d-
|
|
2
|
-
export { A as API_ROUTE_METHODS, g as getAllowedAPIRouteMethods, i as invokeAPIRouteEndpoint, a as isWebResponse, n as normalizeRouteResponse, r as resolveAPIRouteEndpoint } from '../runtime.d-
|
|
3
|
-
import { f as FarmRouteRuntimeConfig, F as FarmPlugin } from '../client-plugins.d-
|
|
1
|
+
import { P as PluginAPIDispatch } from '../runtime.d-B2Js6qZ2.mjs';
|
|
2
|
+
export { A as API_ROUTE_METHODS, g as getAllowedAPIRouteMethods, i as invokeAPIRouteEndpoint, a as isWebResponse, n as normalizeRouteResponse, r as resolveAPIRouteEndpoint } from '../runtime.d-B2Js6qZ2.mjs';
|
|
3
|
+
import { f as FarmRouteRuntimeConfig, F as FarmPlugin } from '../client-plugins.d-DllmH8eM.mjs';
|
|
4
4
|
import { ViteDevServer } from 'vite';
|
|
5
5
|
import '../types.d-C41ePjvP.mjs';
|
|
6
6
|
import { F as FarmI18nRuntime } from '../runtime.d-3iJAKptR.mjs';
|
|
@@ -33,7 +33,7 @@ import '../layers.d-CcS42OGR.mjs';
|
|
|
33
33
|
import 'rolldown/utils';
|
|
34
34
|
import 'rolldown';
|
|
35
35
|
import '../image-config.d-CeDgNyX4.mjs';
|
|
36
|
-
import '../config.d-
|
|
36
|
+
import '../config.d-DqKaCr1r.mjs';
|
|
37
37
|
import '../types.d-DQnyD3VD.mjs';
|
|
38
38
|
import '../font.mjs';
|
|
39
39
|
import '../resolver.d-JnZKKsc5.mjs';
|
|
@@ -1,6 +1,6 @@
|
|
|
1
|
-
import { P as PluginAPIDispatch } from '../runtime.d-
|
|
2
|
-
export { A as API_ROUTE_METHODS, g as getAllowedAPIRouteMethods, i as invokeAPIRouteEndpoint, a as isWebResponse, n as normalizeRouteResponse, r as resolveAPIRouteEndpoint } from '../runtime.d-
|
|
3
|
-
import { f as FarmRouteRuntimeConfig, F as FarmPlugin } from '../client-plugins.d-
|
|
1
|
+
import { P as PluginAPIDispatch } from '../runtime.d-BL-CGwoi.js';
|
|
2
|
+
export { A as API_ROUTE_METHODS, g as getAllowedAPIRouteMethods, i as invokeAPIRouteEndpoint, a as isWebResponse, n as normalizeRouteResponse, r as resolveAPIRouteEndpoint } from '../runtime.d-BL-CGwoi.js';
|
|
3
|
+
import { f as FarmRouteRuntimeConfig, F as FarmPlugin } from '../client-plugins.d-n3iWY1EJ.js';
|
|
4
4
|
import { ViteDevServer } from 'vite';
|
|
5
5
|
import '../types.d-C41ePjvP.js';
|
|
6
6
|
import { F as FarmI18nRuntime } from '../runtime.d-BtL3PCL3.js';
|
|
@@ -33,7 +33,7 @@ import '../layers.d-CcS42OGR.js';
|
|
|
33
33
|
import 'rolldown/utils';
|
|
34
34
|
import 'rolldown';
|
|
35
35
|
import '../image-config.d-CeDgNyX4.js';
|
|
36
|
-
import '../config.d-
|
|
36
|
+
import '../config.d-DqKaCr1r.js';
|
|
37
37
|
import '../types.d-DQnyD3VD.js';
|
|
38
38
|
import '../font.js';
|
|
39
39
|
import '../resolver.d-BHyZgpa7.js';
|
package/dist/api/runtime.d.mts
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
export { i as isEndpointFailure, p as parseRouteSchema } from '../endpoint.d-BkMSCRf6.mjs';
|
|
2
|
-
export { b as APIRouteShapeSource, A as API_ROUTE_METHODS, c as createEndpointFailureResponse, d as createStaticAPIRouteMatcherAtBasePath, g as getAllowedAPIRouteMethods, i as invokeAPIRouteEndpoint, e as isFarmAPIPathname, a as isWebResponse, m as matchAPIRouteAtBasePath, f as mergePluginAPIRoutes, n as normalizeRouteResponse, h as registerAPIRouteShape, r as resolveAPIRouteEndpoint } from '../runtime.d-
|
|
2
|
+
export { b as APIRouteShapeSource, A as API_ROUTE_METHODS, c as createEndpointFailureResponse, d as createStaticAPIRouteMatcherAtBasePath, g as getAllowedAPIRouteMethods, i as invokeAPIRouteEndpoint, e as isFarmAPIPathname, a as isWebResponse, m as matchAPIRouteAtBasePath, f as mergePluginAPIRoutes, n as normalizeRouteResponse, h as registerAPIRouteShape, r as resolveAPIRouteEndpoint } from '../runtime.d-B2Js6qZ2.mjs';
|
|
3
3
|
export { A as APIRouteMatch, a as APIRouteParamValue, b as APIRouteParams, m as matchAPIRoute } from '../route-pattern.d-CVsVbq5n.mjs';
|
|
4
|
-
export { bg as FarmMCPCatalogDetails, bq as FarmMCPServerRegistration, bs as _findFarmMCPEndpointTool, bt as _publishFarmMCPCatalog, bu as registerFarmMCPServer } from '../client-plugins.d-
|
|
4
|
+
export { bg as FarmMCPCatalogDetails, bq as FarmMCPServerRegistration, bs as _findFarmMCPEndpointTool, bt as _publishFarmMCPCatalog, bu as registerFarmMCPServer } from '../client-plugins.d-DllmH8eM.mjs';
|
|
5
5
|
import '../cache.mjs';
|
|
6
6
|
import '../route.d-BaVH3V0w.mjs';
|
|
7
7
|
import '../lifecycle.d-C2aLBOwu.mjs';
|
|
@@ -30,6 +30,6 @@ import 'rolldown/utils';
|
|
|
30
30
|
import 'rolldown';
|
|
31
31
|
import '../image-config.d-CeDgNyX4.mjs';
|
|
32
32
|
import '../types.d-C41ePjvP.mjs';
|
|
33
|
-
import '../config.d-
|
|
33
|
+
import '../config.d-DqKaCr1r.mjs';
|
|
34
34
|
import '../types.d-DQnyD3VD.mjs';
|
|
35
35
|
import '../font.mjs';
|
package/dist/api/runtime.d.ts
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
export { i as isEndpointFailure, p as parseRouteSchema } from '../endpoint.d-BgHn0lhl.js';
|
|
2
|
-
export { b as APIRouteShapeSource, A as API_ROUTE_METHODS, c as createEndpointFailureResponse, d as createStaticAPIRouteMatcherAtBasePath, g as getAllowedAPIRouteMethods, i as invokeAPIRouteEndpoint, e as isFarmAPIPathname, a as isWebResponse, m as matchAPIRouteAtBasePath, f as mergePluginAPIRoutes, n as normalizeRouteResponse, h as registerAPIRouteShape, r as resolveAPIRouteEndpoint } from '../runtime.d-
|
|
2
|
+
export { b as APIRouteShapeSource, A as API_ROUTE_METHODS, c as createEndpointFailureResponse, d as createStaticAPIRouteMatcherAtBasePath, g as getAllowedAPIRouteMethods, i as invokeAPIRouteEndpoint, e as isFarmAPIPathname, a as isWebResponse, m as matchAPIRouteAtBasePath, f as mergePluginAPIRoutes, n as normalizeRouteResponse, h as registerAPIRouteShape, r as resolveAPIRouteEndpoint } from '../runtime.d-BL-CGwoi.js';
|
|
3
3
|
export { A as APIRouteMatch, a as APIRouteParamValue, b as APIRouteParams, m as matchAPIRoute } from '../route-pattern.d-CVsVbq5n.js';
|
|
4
|
-
export { bg as FarmMCPCatalogDetails, bq as FarmMCPServerRegistration, bs as _findFarmMCPEndpointTool, bt as _publishFarmMCPCatalog, bu as registerFarmMCPServer } from '../client-plugins.d-
|
|
4
|
+
export { bg as FarmMCPCatalogDetails, bq as FarmMCPServerRegistration, bs as _findFarmMCPEndpointTool, bt as _publishFarmMCPCatalog, bu as registerFarmMCPServer } from '../client-plugins.d-n3iWY1EJ.js';
|
|
5
5
|
import '../cache.js';
|
|
6
6
|
import '../route.d-DBTEqifW.js';
|
|
7
7
|
import '../lifecycle.d-C2aLBOwu.js';
|
|
@@ -30,6 +30,6 @@ import 'rolldown/utils';
|
|
|
30
30
|
import 'rolldown';
|
|
31
31
|
import '../image-config.d-CeDgNyX4.js';
|
|
32
32
|
import '../types.d-C41ePjvP.js';
|
|
33
|
-
import '../config.d-
|
|
33
|
+
import '../config.d-DqKaCr1r.js';
|
|
34
34
|
import '../types.d-DQnyD3VD.js';
|
|
35
35
|
import '../font.js';
|