@farm.js/core 0.1.51-beta.1 → 0.1.51-beta.2
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.d-ZuuNgrkQ.d.ts → agent-mcp.d-CR5Ov83o.d.ts} +1 -1
- package/dist/{agent-mcp.d-BPzpKBHQ.d.mts → agent-mcp.d-Z5DuwrqW.d.mts} +1 -1
- package/dist/agent-runtime.d.mts +2 -2
- package/dist/agent-runtime.d.ts +2 -2
- package/dist/{analyzer-AZULAOPL.cjs → analyzer-T76CN3S7.cjs} +70 -21
- package/dist/{analyzer-V74FTD2F.mjs → analyzer-Z6TNEAET.mjs} +70 -21
- 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-BJDcZn3W.d.mts → app-manifest.d-CAHkOBFa.d.mts} +1 -1
- package/dist/{app-manifest.d-HWhqbP2X.d.ts → app-manifest.d-DiWr_Jfx.d.ts} +1 -1
- package/dist/app-markdown.d.mts +3 -3
- package/dist/app-markdown.d.ts +3 -3
- package/dist/{app.d-DOGW1KI8.d.mts → app.d-BfgJCsTQ.d.mts} +4 -4
- package/dist/{app.d-B5EWdob-.d.ts → app.d-DmapqkbV.d.ts} +4 -4
- package/dist/{chunk-5A5GAZ75.mjs → chunk-4SSRBCBR.mjs} +57 -22
- package/dist/{chunk-EOSFVNXZ.mjs → chunk-6CYQQQGR.mjs} +1 -1
- package/dist/{chunk-BSEKNTMS.mjs → chunk-74Z5KX4A.mjs} +4 -4
- package/dist/chunk-7FVVQEVL.cjs +541 -0
- package/dist/chunk-C3BOESDW.mjs +541 -0
- package/dist/{chunk-KMB5BMFX.mjs → chunk-CTM4SPB3.mjs} +5 -0
- package/dist/{chunk-XY4DYGSU.cjs → chunk-DTU4PX7V.cjs} +177 -142
- package/dist/{chunk-KU7MBLDZ.mjs → chunk-E6LTONL4.mjs} +1 -1
- package/dist/{chunk-QAIAFCRZ.mjs → chunk-E73PGHSR.mjs} +1 -1
- package/dist/{chunk-I3EFXUAR.mjs → chunk-FM2UEKS2.mjs} +1 -1
- package/dist/{chunk-JVBNKWLV.cjs → chunk-GNJIYJMS.cjs} +2 -2
- package/dist/{chunk-AGR7VJH2.cjs → chunk-GUJTVM36.cjs} +1 -1
- package/dist/{chunk-SCRC5AMM.mjs → chunk-IBSAYAWB.mjs} +1 -1
- package/dist/{chunk-RMPNYUGT.cjs → chunk-J3LBO2O4.cjs} +2 -2
- package/dist/{chunk-VITZRYW3.cjs → chunk-NPQLMP7M.cjs} +5 -0
- package/dist/{chunk-TT66CP3P.cjs → chunk-NXBHYO7S.cjs} +2 -2
- package/dist/{chunk-EWC76P5D.mjs → chunk-PMKUU273.mjs} +2 -2
- package/dist/{chunk-IFBINMI4.cjs → chunk-QXPSWMUD.cjs} +3 -3
- package/dist/{chunk-X2M4XN4V.cjs → chunk-WZW6LEHM.cjs} +5 -5
- package/dist/{chunk-2756SHCI.cjs → chunk-YU42A5MA.cjs} +52 -52
- package/dist/{client-plugins.d-C_3CdALC.d.mts → client-plugins.d-Bx3FXpqm.d.mts} +18 -5
- package/dist/{client-plugins.d-C0n8Yhh-.d.ts → client-plugins.d-TiLbS5j4.d.ts} +18 -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.mts → config.d-iRPI16ku.d.mts} +6 -2
- package/dist/{config.d-CnhyvvmT.d.ts → config.d-iRPI16ku.d.ts} +6 -2
- 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-6XWCZIGO.cjs} +2 -2
- package/dist/{devtools-BU5IT2PD.mjs → devtools-UQLDAOEI.mjs} +1 -1
- package/dist/docs.cjs +3 -3
- package/dist/docs.d.mts +3 -3
- package/dist/docs.d.ts +3 -3
- package/dist/docs.mjs +2 -2
- package/dist/index.cjs +9 -8
- package/dist/{index.d-CsGxS-hZ.d.mts → index.d-YxJ2AiDF.d.mts} +1 -1
- package/dist/{index.d-B6M_8kmo.d.ts → index.d-yueUNipJ.d.ts} +1 -1
- package/dist/index.d.mts +17 -17
- package/dist/index.d.ts +17 -17
- package/dist/index.mjs +8 -7
- package/dist/integrations.d.mts +2 -2
- package/dist/integrations.d.ts +2 -2
- package/dist/internal/app-markdown-runtime.d.mts +3 -3
- package/dist/internal/app-markdown-runtime.d.ts +3 -3
- package/dist/internal/build-runtime.cjs +10 -9
- package/dist/internal/build-runtime.d.mts +4 -4
- package/dist/internal/build-runtime.d.ts +4 -4
- package/dist/internal/build-runtime.mjs +9 -8
- 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/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 +3 -3
- package/dist/internal/config-runtime.d.mts +16 -79
- package/dist/internal/config-runtime.d.ts +16 -79
- package/dist/internal/config-runtime.mjs +2 -2
- package/dist/internal/infra-analytics-runtime.cjs +5 -5
- package/dist/internal/infra-analytics-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 +7 -3
- package/dist/internal/production-runtime.d.mts +35 -12
- package/dist/internal/production-runtime.d.ts +35 -12
- package/dist/internal/production-runtime.mjs +6 -2
- package/dist/markdown.d.mts +2 -2
- package/dist/markdown.d.ts +2 -2
- package/dist/middleware.d.mts +4 -4
- package/dist/middleware.d.ts +4 -4
- package/dist/mobile.d.mts +4 -4
- package/dist/mobile.d.ts +4 -4
- package/dist/{navigation-delegate.d-jArRF0ZP.d.ts → navigation-delegate.d-BY1e_Xrh.d.ts} +1 -1
- package/dist/{navigation-delegate.d-C0BbdUgN.d.mts → navigation-delegate.d-HnDXhlyP.d.mts} +1 -1
- package/dist/navigation.d.mts +5 -5
- package/dist/navigation.d.ts +5 -5
- package/dist/plugin.cjs +5 -5
- package/dist/plugin.d.mts +4 -4
- package/dist/plugin.d.ts +4 -4
- package/dist/plugin.mjs +4 -4
- package/dist/{production-runtime.d-DFaQ1qaV.d.mts → production-runtime.d-BpJUDzP8.d.mts} +1 -1
- package/dist/{production-runtime.d-UnXmSS_S.d.ts → production-runtime.d-lMjvE9cf.d.ts} +1 -1
- package/dist/{programmatic-routes-client.d-BIowUXQC.d.mts → programmatic-routes-client.d-6CGQ3TCk.d.mts} +2 -2
- package/dist/{programmatic-routes-client.d-VZ0qcbH4.d.ts → programmatic-routes-client.d-BlFp5hv4.d.ts} +2 -2
- package/dist/{render-plan.d-BNeqyPyJ.d.mts → render-plan.d-BH9edqKs.d.mts} +1 -1
- package/dist/{render-plan.d-BB6KrYjP.d.ts → render-plan.d-DhP0mTHF.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-BVZrsR1v.d.ts} +1 -1
- package/dist/{request.d-BV1munmx.d.mts → request.d-DJFRdKi8.d.mts} +1 -1
- package/dist/request.d.mts +3 -3
- package/dist/request.d.ts +3 -3
- package/dist/{route-rendering.d-BIf7zE9d.d.ts → route-rendering.d-B00JtK_-.d.ts} +1 -1
- package/dist/{route-rendering.d-DShqKlgK.d.mts → route-rendering.d-Bpmw7PED.d.mts} +1 -1
- package/dist/{router.d-Bw3K3b0a.d.ts → router.d-Bd1x9XxQ.d.ts} +1 -1
- package/dist/{router.d-BE7i84fb.d.mts → router.d-e0jQ3jQ-.d.mts} +1 -1
- package/dist/{routes.d-_5tBQexL.d.mts → routes.d-Cmv8TgVq.d.mts} +89 -2
- package/dist/{routes.d-DVZQL0-H.d.ts → routes.d-D96Dq9lz.d.ts} +89 -2
- package/dist/routes.d.mts +2 -2
- package/dist/routes.d.ts +2 -2
- package/dist/{rsc-pipeline-IQI5XQLS.cjs → rsc-pipeline-DX4OC5FN.cjs} +3 -3
- package/dist/{rsc-pipeline-FBM6NFYY.mjs → rsc-pipeline-ZQ4CTVEG.mjs} +2 -2
- package/dist/{runtime-2JYIDUON.mjs → runtime-NPDRDV6R.mjs} +64 -15
- package/dist/{runtime-DXEVFYLE.cjs → runtime-NQ3EDSA7.cjs} +73 -24
- package/dist/{runtime.d-CQgoYR0Q.d.mts → runtime.d-CgB3IJDq.d.mts} +1 -1
- package/dist/{runtime.d-CfhaLPl-.d.ts → runtime.d-D-td-RR3.d.ts} +1 -1
- package/dist/server-plugins.d.mts +3 -3
- package/dist/server-plugins.d.ts +3 -3
- package/dist/server.cjs +22 -22
- package/dist/server.d.mts +10 -10
- package/dist/server.d.ts +10 -10
- package/dist/server.mjs +7 -7
- 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-BWDhS0FK.d.mts} +2 -2
- package/dist/{spa-router.d-C5opIgXg.d.ts → spa-router.d-CO01mVOM.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-B77__yh8.d.ts} +1 -1
- package/dist/{utils.d-CO-U4OVZ.d.mts → utils.d-DRDazhCA.d.mts} +1 -1
- package/dist/version.cjs +2 -2
- package/dist/version.mjs +1 -1
- package/dist/vite.cjs +5 -5
- package/dist/vite.d.mts +5 -5
- package/dist/vite.d.ts +5 -5
- package/dist/vite.mjs +4 -4
- package/package.json +3 -3
|
@@ -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-TiLbS5j4.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-Bx3FXpqm.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-Bx3FXpqm.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-iRPI16ku.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-TiLbS5j4.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-iRPI16ku.js';
|
|
33
33
|
import './types.d-DQnyD3VD.js';
|
|
34
34
|
import './font.js';
|
|
35
35
|
|
|
@@ -1,6 +1,6 @@
|
|
|
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
|
-
var
|
|
3
|
+
var _chunkGUJTVM36cjs = require('./chunk-GUJTVM36.cjs');
|
|
4
4
|
require('./chunk-BTZ5O6VM.cjs');
|
|
5
5
|
|
|
6
6
|
// src/mobile/analyzer.ts
|
|
@@ -8,7 +8,7 @@ var _crypto = require('crypto');
|
|
|
8
8
|
var _fs = require('fs');
|
|
9
9
|
var _promises = require('fs/promises');
|
|
10
10
|
var _path = require('path'); var path = _interopRequireWildcard(_path);
|
|
11
|
-
var ANALYZER_VERSION = `
|
|
11
|
+
var ANALYZER_VERSION = `2:${_chunkGUJTVM36cjs.FARM_VERSION}`;
|
|
12
12
|
var INTRINSIC_KINDS = {};
|
|
13
13
|
for (const tag of "div section main article header footer nav aside figure hr li".split(" ")) {
|
|
14
14
|
INTRINSIC_KINDS[tag] = "View";
|
|
@@ -303,9 +303,15 @@ function analyzeSource(file, source, parseSync) {
|
|
|
303
303
|
components: {}
|
|
304
304
|
};
|
|
305
305
|
const starts = lineStarts(source);
|
|
306
|
-
const block = (node, rule, message) => {
|
|
307
|
-
facts.blockers.push({
|
|
306
|
+
const block = (node, rule, message, only) => {
|
|
307
|
+
facts.blockers.push({
|
|
308
|
+
...locate(starts, node.start),
|
|
309
|
+
rule,
|
|
310
|
+
message,
|
|
311
|
+
...only ? { only } : {}
|
|
312
|
+
});
|
|
308
313
|
};
|
|
314
|
+
const needsDevice = (node, message) => block(node, "client-logic", message, "native");
|
|
309
315
|
const result = parseSync(file, source, { lang: scriptLang(file) });
|
|
310
316
|
if (result.errors.length > 0) {
|
|
311
317
|
const error = result.errors[0];
|
|
@@ -323,7 +329,10 @@ function analyzeSource(file, source, parseSync) {
|
|
|
323
329
|
let defaultName;
|
|
324
330
|
for (const statement of program.body) {
|
|
325
331
|
if (statement.type === "ExpressionStatement" && statement.directive) {
|
|
326
|
-
if (statement.directive === "use client")
|
|
332
|
+
if (statement.directive === "use client") {
|
|
333
|
+
facts.useClient = true;
|
|
334
|
+
needsDevice(statement, 'a "use client" module renders in the browser');
|
|
335
|
+
}
|
|
327
336
|
if (statement.directive === "use server") facts.serverBoundary = true;
|
|
328
337
|
continue;
|
|
329
338
|
}
|
|
@@ -400,6 +409,14 @@ function analyzeSource(file, source, parseSync) {
|
|
|
400
409
|
kind = _optionalChain([MAPPED_COMPONENTS, 'access', _13 => _13[binding.source], 'optionalAccess', _14 => _14[member]]);
|
|
401
410
|
if (!kind) {
|
|
402
411
|
const fromApp = /^(?:\.|\/|@\/|~|#)/.test(binding.source);
|
|
412
|
+
if (!fromApp) {
|
|
413
|
+
block(
|
|
414
|
+
opening,
|
|
415
|
+
"unmapped-element",
|
|
416
|
+
`<${tag}> from "${binding.source}" has no native mapping`,
|
|
417
|
+
"native"
|
|
418
|
+
);
|
|
419
|
+
}
|
|
403
420
|
counted = !fromApp;
|
|
404
421
|
kind = fromApp || PORTABLE_PACKAGES.has(packageName(binding.source)) ? "Component" : void 0;
|
|
405
422
|
}
|
|
@@ -453,6 +470,8 @@ function analyzeSource(file, source, parseSync) {
|
|
|
453
470
|
if (/^on[A-Z]/.test(name)) {
|
|
454
471
|
if (isIntrinsic && kind && !_optionalChain([MAPPED_EVENTS, 'access', _15 => _15[kind], 'optionalAccess', _16 => _16.has, 'call', _17 => _17(name)])) {
|
|
455
472
|
block(attribute, "dom-event", `${name} on <${tag}> has no native event`);
|
|
473
|
+
} else {
|
|
474
|
+
needsDevice(attribute, `${name} on <${tag}> runs on the device`);
|
|
456
475
|
}
|
|
457
476
|
events.push(name);
|
|
458
477
|
continue;
|
|
@@ -613,6 +632,8 @@ function analyzeSource(file, source, parseSync) {
|
|
|
613
632
|
const calleeName = callee.type === "Identifier" ? callee.name : callee.type === "MemberExpression" && !callee.computed ? callee.property.name : void 0;
|
|
614
633
|
if (calleeName === "useLayoutEffect" || calleeName === "useInsertionEffect") {
|
|
615
634
|
block(node, "layout-effect", `${calleeName} reads layout from the DOM`);
|
|
635
|
+
} else if (calleeName && /^use(?:[A-Z0-9]|$)/.test(calleeName)) {
|
|
636
|
+
needsDevice(node, `${calleeName}() runs on the device`);
|
|
616
637
|
}
|
|
617
638
|
if (calleeName === "createElement" || calleeName === "cloneElement") {
|
|
618
639
|
block(
|
|
@@ -766,7 +787,13 @@ function classifyPackage(fact, serverBoundary) {
|
|
|
766
787
|
const at = { line: fact.line, column: fact.column };
|
|
767
788
|
const specifier = fact.source;
|
|
768
789
|
if (specifier.startsWith("node:") || NODE_BUILTINS.has(packageName(specifier))) {
|
|
769
|
-
return serverBoundary ? void 0 : {
|
|
790
|
+
return serverBoundary ? void 0 : {
|
|
791
|
+
...at,
|
|
792
|
+
rule: "node-builtin",
|
|
793
|
+
message: `import "${specifier}" is a Node.js API`,
|
|
794
|
+
// A server-rendered screen runs it on the server, like the web page.
|
|
795
|
+
only: "react-native"
|
|
796
|
+
};
|
|
770
797
|
}
|
|
771
798
|
if (specifier.startsWith("@farm.js/core")) {
|
|
772
799
|
const portable = CORE_PORTABLE[specifier];
|
|
@@ -775,14 +802,22 @@ function classifyPackage(fact, serverBoundary) {
|
|
|
775
802
|
return {
|
|
776
803
|
...at,
|
|
777
804
|
rule: "unmapped-import",
|
|
778
|
-
message: `${unmapped.join(", ") || "import"} from "${specifier}" has no native mapping
|
|
805
|
+
message: `${unmapped.join(", ") || "import"} from "${specifier}" has no native mapping`,
|
|
806
|
+
// Server APIs are fine on a server-rendered screen; components and hooks from it are
|
|
807
|
+
// checked where they are used.
|
|
808
|
+
only: "react-native"
|
|
779
809
|
};
|
|
780
810
|
}
|
|
781
811
|
return void 0;
|
|
782
812
|
}
|
|
783
813
|
const name = packageName(specifier);
|
|
784
814
|
if (name === "react") {
|
|
785
|
-
return specifier === "react" || specifier === "react/jsx-runtime" || specifier === "react/jsx-dev-runtime" ? void 0 : {
|
|
815
|
+
return specifier === "react" || specifier === "react/jsx-runtime" || specifier === "react/jsx-dev-runtime" ? void 0 : {
|
|
816
|
+
...at,
|
|
817
|
+
rule: "unknown-package",
|
|
818
|
+
message: `import "${specifier}" has no native mapping`,
|
|
819
|
+
only: "react-native"
|
|
820
|
+
};
|
|
786
821
|
}
|
|
787
822
|
if (PORTABLE_PACKAGES.has(name)) return void 0;
|
|
788
823
|
if (DOM_PACKAGES.some(
|
|
@@ -793,7 +828,9 @@ function classifyPackage(fact, serverBoundary) {
|
|
|
793
828
|
return {
|
|
794
829
|
...at,
|
|
795
830
|
rule: "unknown-package",
|
|
796
|
-
message: `import "${specifier}" has no native mapping
|
|
831
|
+
message: `import "${specifier}" has no native mapping`,
|
|
832
|
+
// Data and utility packages run on the server; their components are blocked where used.
|
|
833
|
+
only: "react-native"
|
|
797
834
|
};
|
|
798
835
|
}
|
|
799
836
|
var NODE_BUILTINS = new Set(
|
|
@@ -970,31 +1007,37 @@ async function analyzeFarmMobileRoutes(options) {
|
|
|
970
1007
|
const elements = { total: 0, mapped: 0, byKind: {} };
|
|
971
1008
|
const seen = /* @__PURE__ */ new Set();
|
|
972
1009
|
const ir = { root: "", components: {} };
|
|
973
|
-
const walk = (file, entry) => {
|
|
1010
|
+
const walk = (file, entry, layout) => {
|
|
974
1011
|
if (seen.has(file)) return;
|
|
975
1012
|
seen.add(file);
|
|
976
1013
|
const moduleFacts = settled.get(file);
|
|
977
1014
|
const label = relative2(root, file);
|
|
1015
|
+
const add = (blocker) => {
|
|
1016
|
+
if (!layout) blockers.push(blocker);
|
|
1017
|
+
else if (blocker.only !== "native") blockers.push({ ...blocker, only: "react-native" });
|
|
1018
|
+
};
|
|
978
1019
|
if (entry && options.serverComponents && !moduleFacts.useClient) {
|
|
979
|
-
|
|
1020
|
+
add({
|
|
980
1021
|
file: label,
|
|
981
1022
|
line: 1,
|
|
982
1023
|
column: 1,
|
|
983
1024
|
rule: "server-component",
|
|
984
|
-
message: 'a server component (no "use client") renders on the server'
|
|
1025
|
+
message: 'a server component (no "use client") renders on the server',
|
|
1026
|
+
only: "react-native"
|
|
985
1027
|
});
|
|
986
1028
|
}
|
|
987
1029
|
if (entry && moduleFacts.asyncDefault) {
|
|
988
|
-
|
|
1030
|
+
add({
|
|
989
1031
|
file: label,
|
|
990
1032
|
line: 1,
|
|
991
1033
|
column: 1,
|
|
992
1034
|
rule: "async-component",
|
|
993
|
-
message: "an async component renders on the server"
|
|
1035
|
+
message: "an async component renders on the server",
|
|
1036
|
+
only: "react-native"
|
|
994
1037
|
});
|
|
995
1038
|
}
|
|
996
1039
|
if (moduleFacts.serverBoundary && !entry) return;
|
|
997
|
-
for (const blocker of moduleFacts.blockers)
|
|
1040
|
+
for (const blocker of moduleFacts.blockers) add({ file: label, ...blocker });
|
|
998
1041
|
for (const win of moduleFacts.wins) wins.add(win);
|
|
999
1042
|
elements.total += moduleFacts.elements.total;
|
|
1000
1043
|
elements.mapped += moduleFacts.elements.mapped;
|
|
@@ -1005,8 +1048,8 @@ async function analyzeFarmMobileRoutes(options) {
|
|
|
1005
1048
|
ir.components[`${label}#${name}`] = node;
|
|
1006
1049
|
}
|
|
1007
1050
|
for (const entryImport of _nullishCoalesce(resolved.get(file), () => ( []))) {
|
|
1008
|
-
if (entryImport.blocker)
|
|
1009
|
-
if (entryImport.file) walk(entryImport.file, false);
|
|
1051
|
+
if (entryImport.blocker) add({ file: label, ...entryImport.blocker });
|
|
1052
|
+
if (entryImport.file) walk(entryImport.file, false, layout);
|
|
1010
1053
|
}
|
|
1011
1054
|
};
|
|
1012
1055
|
if (!page) {
|
|
@@ -1026,17 +1069,23 @@ async function analyzeFarmMobileRoutes(options) {
|
|
|
1026
1069
|
message: "a Markdown page renders HTML from Markdown"
|
|
1027
1070
|
});
|
|
1028
1071
|
} else {
|
|
1029
|
-
walk(page, true);
|
|
1072
|
+
walk(page, true, false);
|
|
1030
1073
|
ir.root = `${relative2(root, page)}#default`;
|
|
1031
1074
|
}
|
|
1032
|
-
for (const layout of layouts) walk(layout, true);
|
|
1033
|
-
const
|
|
1075
|
+
for (const layout of layouts) walk(layout, true, true);
|
|
1076
|
+
const strip = ({ only: _only, ...blocker }) => blocker;
|
|
1077
|
+
const portBlockers = blockers.filter((blocker) => blocker.only !== "native").map(strip);
|
|
1078
|
+
const nativeBlockers = blockers.filter((blocker) => blocker.only !== "react-native").map(strip);
|
|
1079
|
+
const portable = portBlockers.length === 0;
|
|
1080
|
+
const tier = nativeBlockers.length === 0 ? "native" : portable ? "react-native" : "web";
|
|
1034
1081
|
const sortedWins = [...wins].sort();
|
|
1035
1082
|
const analysis = {
|
|
1036
1083
|
route,
|
|
1084
|
+
tier,
|
|
1037
1085
|
decision: portable && sortedWins.length > 0 ? "port" : "web",
|
|
1038
1086
|
portable,
|
|
1039
|
-
blockers,
|
|
1087
|
+
blockers: portBlockers,
|
|
1088
|
+
nativeBlockers,
|
|
1040
1089
|
wins: sortedWins,
|
|
1041
1090
|
elements,
|
|
1042
1091
|
portablePercent: elements.total === 0 ? portable ? 100 : 0 : Math.round(elements.mapped / elements.total * 100),
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import {
|
|
2
2
|
FARM_VERSION
|
|
3
|
-
} from "./chunk-
|
|
3
|
+
} from "./chunk-6CYQQQGR.mjs";
|
|
4
4
|
import "./chunk-Y6FXYEAI.mjs";
|
|
5
5
|
|
|
6
6
|
// src/mobile/analyzer.ts
|
|
@@ -8,7 +8,7 @@ import { createHash } from "crypto";
|
|
|
8
8
|
import { existsSync, readFileSync, statSync } from "fs";
|
|
9
9
|
import { mkdir, readFile, writeFile } from "fs/promises";
|
|
10
10
|
import * as path from "path";
|
|
11
|
-
var ANALYZER_VERSION = `
|
|
11
|
+
var ANALYZER_VERSION = `2:${FARM_VERSION}`;
|
|
12
12
|
var INTRINSIC_KINDS = {};
|
|
13
13
|
for (const tag of "div section main article header footer nav aside figure hr li".split(" ")) {
|
|
14
14
|
INTRINSIC_KINDS[tag] = "View";
|
|
@@ -303,9 +303,15 @@ function analyzeSource(file, source, parseSync) {
|
|
|
303
303
|
components: {}
|
|
304
304
|
};
|
|
305
305
|
const starts = lineStarts(source);
|
|
306
|
-
const block = (node, rule, message) => {
|
|
307
|
-
facts.blockers.push({
|
|
306
|
+
const block = (node, rule, message, only) => {
|
|
307
|
+
facts.blockers.push({
|
|
308
|
+
...locate(starts, node.start),
|
|
309
|
+
rule,
|
|
310
|
+
message,
|
|
311
|
+
...only ? { only } : {}
|
|
312
|
+
});
|
|
308
313
|
};
|
|
314
|
+
const needsDevice = (node, message) => block(node, "client-logic", message, "native");
|
|
309
315
|
const result = parseSync(file, source, { lang: scriptLang(file) });
|
|
310
316
|
if (result.errors.length > 0) {
|
|
311
317
|
const error = result.errors[0];
|
|
@@ -323,7 +329,10 @@ function analyzeSource(file, source, parseSync) {
|
|
|
323
329
|
let defaultName;
|
|
324
330
|
for (const statement of program.body) {
|
|
325
331
|
if (statement.type === "ExpressionStatement" && statement.directive) {
|
|
326
|
-
if (statement.directive === "use client")
|
|
332
|
+
if (statement.directive === "use client") {
|
|
333
|
+
facts.useClient = true;
|
|
334
|
+
needsDevice(statement, 'a "use client" module renders in the browser');
|
|
335
|
+
}
|
|
327
336
|
if (statement.directive === "use server") facts.serverBoundary = true;
|
|
328
337
|
continue;
|
|
329
338
|
}
|
|
@@ -400,6 +409,14 @@ function analyzeSource(file, source, parseSync) {
|
|
|
400
409
|
kind = MAPPED_COMPONENTS[binding.source]?.[member];
|
|
401
410
|
if (!kind) {
|
|
402
411
|
const fromApp = /^(?:\.|\/|@\/|~|#)/.test(binding.source);
|
|
412
|
+
if (!fromApp) {
|
|
413
|
+
block(
|
|
414
|
+
opening,
|
|
415
|
+
"unmapped-element",
|
|
416
|
+
`<${tag}> from "${binding.source}" has no native mapping`,
|
|
417
|
+
"native"
|
|
418
|
+
);
|
|
419
|
+
}
|
|
403
420
|
counted = !fromApp;
|
|
404
421
|
kind = fromApp || PORTABLE_PACKAGES.has(packageName(binding.source)) ? "Component" : void 0;
|
|
405
422
|
}
|
|
@@ -453,6 +470,8 @@ function analyzeSource(file, source, parseSync) {
|
|
|
453
470
|
if (/^on[A-Z]/.test(name)) {
|
|
454
471
|
if (isIntrinsic && kind && !MAPPED_EVENTS[kind]?.has(name)) {
|
|
455
472
|
block(attribute, "dom-event", `${name} on <${tag}> has no native event`);
|
|
473
|
+
} else {
|
|
474
|
+
needsDevice(attribute, `${name} on <${tag}> runs on the device`);
|
|
456
475
|
}
|
|
457
476
|
events.push(name);
|
|
458
477
|
continue;
|
|
@@ -613,6 +632,8 @@ function analyzeSource(file, source, parseSync) {
|
|
|
613
632
|
const calleeName = callee.type === "Identifier" ? callee.name : callee.type === "MemberExpression" && !callee.computed ? callee.property.name : void 0;
|
|
614
633
|
if (calleeName === "useLayoutEffect" || calleeName === "useInsertionEffect") {
|
|
615
634
|
block(node, "layout-effect", `${calleeName} reads layout from the DOM`);
|
|
635
|
+
} else if (calleeName && /^use(?:[A-Z0-9]|$)/.test(calleeName)) {
|
|
636
|
+
needsDevice(node, `${calleeName}() runs on the device`);
|
|
616
637
|
}
|
|
617
638
|
if (calleeName === "createElement" || calleeName === "cloneElement") {
|
|
618
639
|
block(
|
|
@@ -766,7 +787,13 @@ function classifyPackage(fact, serverBoundary) {
|
|
|
766
787
|
const at = { line: fact.line, column: fact.column };
|
|
767
788
|
const specifier = fact.source;
|
|
768
789
|
if (specifier.startsWith("node:") || NODE_BUILTINS.has(packageName(specifier))) {
|
|
769
|
-
return serverBoundary ? void 0 : {
|
|
790
|
+
return serverBoundary ? void 0 : {
|
|
791
|
+
...at,
|
|
792
|
+
rule: "node-builtin",
|
|
793
|
+
message: `import "${specifier}" is a Node.js API`,
|
|
794
|
+
// A server-rendered screen runs it on the server, like the web page.
|
|
795
|
+
only: "react-native"
|
|
796
|
+
};
|
|
770
797
|
}
|
|
771
798
|
if (specifier.startsWith("@farm.js/core")) {
|
|
772
799
|
const portable = CORE_PORTABLE[specifier];
|
|
@@ -775,14 +802,22 @@ function classifyPackage(fact, serverBoundary) {
|
|
|
775
802
|
return {
|
|
776
803
|
...at,
|
|
777
804
|
rule: "unmapped-import",
|
|
778
|
-
message: `${unmapped.join(", ") || "import"} from "${specifier}" has no native mapping
|
|
805
|
+
message: `${unmapped.join(", ") || "import"} from "${specifier}" has no native mapping`,
|
|
806
|
+
// Server APIs are fine on a server-rendered screen; components and hooks from it are
|
|
807
|
+
// checked where they are used.
|
|
808
|
+
only: "react-native"
|
|
779
809
|
};
|
|
780
810
|
}
|
|
781
811
|
return void 0;
|
|
782
812
|
}
|
|
783
813
|
const name = packageName(specifier);
|
|
784
814
|
if (name === "react") {
|
|
785
|
-
return specifier === "react" || specifier === "react/jsx-runtime" || specifier === "react/jsx-dev-runtime" ? void 0 : {
|
|
815
|
+
return specifier === "react" || specifier === "react/jsx-runtime" || specifier === "react/jsx-dev-runtime" ? void 0 : {
|
|
816
|
+
...at,
|
|
817
|
+
rule: "unknown-package",
|
|
818
|
+
message: `import "${specifier}" has no native mapping`,
|
|
819
|
+
only: "react-native"
|
|
820
|
+
};
|
|
786
821
|
}
|
|
787
822
|
if (PORTABLE_PACKAGES.has(name)) return void 0;
|
|
788
823
|
if (DOM_PACKAGES.some(
|
|
@@ -793,7 +828,9 @@ function classifyPackage(fact, serverBoundary) {
|
|
|
793
828
|
return {
|
|
794
829
|
...at,
|
|
795
830
|
rule: "unknown-package",
|
|
796
|
-
message: `import "${specifier}" has no native mapping
|
|
831
|
+
message: `import "${specifier}" has no native mapping`,
|
|
832
|
+
// Data and utility packages run on the server; their components are blocked where used.
|
|
833
|
+
only: "react-native"
|
|
797
834
|
};
|
|
798
835
|
}
|
|
799
836
|
var NODE_BUILTINS = new Set(
|
|
@@ -970,31 +1007,37 @@ async function analyzeFarmMobileRoutes(options) {
|
|
|
970
1007
|
const elements = { total: 0, mapped: 0, byKind: {} };
|
|
971
1008
|
const seen = /* @__PURE__ */ new Set();
|
|
972
1009
|
const ir = { root: "", components: {} };
|
|
973
|
-
const walk = (file, entry) => {
|
|
1010
|
+
const walk = (file, entry, layout) => {
|
|
974
1011
|
if (seen.has(file)) return;
|
|
975
1012
|
seen.add(file);
|
|
976
1013
|
const moduleFacts = settled.get(file);
|
|
977
1014
|
const label = relative2(root, file);
|
|
1015
|
+
const add = (blocker) => {
|
|
1016
|
+
if (!layout) blockers.push(blocker);
|
|
1017
|
+
else if (blocker.only !== "native") blockers.push({ ...blocker, only: "react-native" });
|
|
1018
|
+
};
|
|
978
1019
|
if (entry && options.serverComponents && !moduleFacts.useClient) {
|
|
979
|
-
|
|
1020
|
+
add({
|
|
980
1021
|
file: label,
|
|
981
1022
|
line: 1,
|
|
982
1023
|
column: 1,
|
|
983
1024
|
rule: "server-component",
|
|
984
|
-
message: 'a server component (no "use client") renders on the server'
|
|
1025
|
+
message: 'a server component (no "use client") renders on the server',
|
|
1026
|
+
only: "react-native"
|
|
985
1027
|
});
|
|
986
1028
|
}
|
|
987
1029
|
if (entry && moduleFacts.asyncDefault) {
|
|
988
|
-
|
|
1030
|
+
add({
|
|
989
1031
|
file: label,
|
|
990
1032
|
line: 1,
|
|
991
1033
|
column: 1,
|
|
992
1034
|
rule: "async-component",
|
|
993
|
-
message: "an async component renders on the server"
|
|
1035
|
+
message: "an async component renders on the server",
|
|
1036
|
+
only: "react-native"
|
|
994
1037
|
});
|
|
995
1038
|
}
|
|
996
1039
|
if (moduleFacts.serverBoundary && !entry) return;
|
|
997
|
-
for (const blocker of moduleFacts.blockers)
|
|
1040
|
+
for (const blocker of moduleFacts.blockers) add({ file: label, ...blocker });
|
|
998
1041
|
for (const win of moduleFacts.wins) wins.add(win);
|
|
999
1042
|
elements.total += moduleFacts.elements.total;
|
|
1000
1043
|
elements.mapped += moduleFacts.elements.mapped;
|
|
@@ -1005,8 +1048,8 @@ async function analyzeFarmMobileRoutes(options) {
|
|
|
1005
1048
|
ir.components[`${label}#${name}`] = node;
|
|
1006
1049
|
}
|
|
1007
1050
|
for (const entryImport of resolved.get(file) ?? []) {
|
|
1008
|
-
if (entryImport.blocker)
|
|
1009
|
-
if (entryImport.file) walk(entryImport.file, false);
|
|
1051
|
+
if (entryImport.blocker) add({ file: label, ...entryImport.blocker });
|
|
1052
|
+
if (entryImport.file) walk(entryImport.file, false, layout);
|
|
1010
1053
|
}
|
|
1011
1054
|
};
|
|
1012
1055
|
if (!page) {
|
|
@@ -1026,17 +1069,23 @@ async function analyzeFarmMobileRoutes(options) {
|
|
|
1026
1069
|
message: "a Markdown page renders HTML from Markdown"
|
|
1027
1070
|
});
|
|
1028
1071
|
} else {
|
|
1029
|
-
walk(page, true);
|
|
1072
|
+
walk(page, true, false);
|
|
1030
1073
|
ir.root = `${relative2(root, page)}#default`;
|
|
1031
1074
|
}
|
|
1032
|
-
for (const layout of layouts) walk(layout, true);
|
|
1033
|
-
const
|
|
1075
|
+
for (const layout of layouts) walk(layout, true, true);
|
|
1076
|
+
const strip = ({ only: _only, ...blocker }) => blocker;
|
|
1077
|
+
const portBlockers = blockers.filter((blocker) => blocker.only !== "native").map(strip);
|
|
1078
|
+
const nativeBlockers = blockers.filter((blocker) => blocker.only !== "react-native").map(strip);
|
|
1079
|
+
const portable = portBlockers.length === 0;
|
|
1080
|
+
const tier = nativeBlockers.length === 0 ? "native" : portable ? "react-native" : "web";
|
|
1034
1081
|
const sortedWins = [...wins].sort();
|
|
1035
1082
|
const analysis = {
|
|
1036
1083
|
route,
|
|
1084
|
+
tier,
|
|
1037
1085
|
decision: portable && sortedWins.length > 0 ? "port" : "web",
|
|
1038
1086
|
portable,
|
|
1039
|
-
blockers,
|
|
1087
|
+
blockers: portBlockers,
|
|
1088
|
+
nativeBlockers,
|
|
1040
1089
|
wins: sortedWins,
|
|
1041
1090
|
elements,
|
|
1042
1091
|
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-CgB3IJDq.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-CgB3IJDq.mjs';
|
|
3
|
+
import { f as FarmRouteRuntimeConfig, F as FarmPlugin } from '../client-plugins.d-Bx3FXpqm.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-iRPI16ku.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-D-td-RR3.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-D-td-RR3.js';
|
|
3
|
+
import { f as FarmRouteRuntimeConfig, F as FarmPlugin } from '../client-plugins.d-TiLbS5j4.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-iRPI16ku.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-CgB3IJDq.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,
|
|
4
|
+
export { bg as FarmMCPCatalogDetails, bq as FarmMCPServerRegistration, bB as _findFarmMCPEndpointTool, bC as _publishFarmMCPCatalog, bD as registerFarmMCPServer } from '../client-plugins.d-Bx3FXpqm.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-iRPI16ku.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-D-td-RR3.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,
|
|
4
|
+
export { bg as FarmMCPCatalogDetails, bq as FarmMCPServerRegistration, bB as _findFarmMCPEndpointTool, bC as _publishFarmMCPCatalog, bD as registerFarmMCPServer } from '../client-plugins.d-TiLbS5j4.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-iRPI16ku.js';
|
|
34
34
|
import '../types.d-DQnyD3VD.js';
|
|
35
35
|
import '../font.js';
|
package/dist/api.d.mts
CHANGED
|
@@ -1,13 +1,13 @@
|
|
|
1
1
|
export { A as AnyEndpointMiddleware, D as DELETE, g as EndpointErrorContracts, h as EndpointErrorDefinition, j as EndpointErrorDefinitions, k as EndpointErrorHandler, l as EndpointErrorSchema, m as EndpointFail, f as EndpointFailure, n as EndpointHandler, o as EndpointInvalidationContext, q as EndpointInvalidationTarget, r as EndpointInvalidations, E as EndpointMCPMetadata, a as EndpointMCPOptions, s as EndpointMiddleware, t as EndpointMiddlewareContext, c as EndpointMiddlewareResult, b as EndpointOpenAPIMetadata, u as EndpointOptions, v as EndpointParamValue, w as EndpointParams, F as FarmAPIStream, x as FarmStreamResponse, G as GET, H as HEAD, I as InferEndpointMiddlewareContext, M as MultipartField, y as MultipartSchema, z as MultipartValues, O as OPTIONS, P as PATCH, B as POST, C as PUT, Q as QUERY, T as TypedEndpoint, J as TypedFormData, K as createEndpoint, i as isEndpointFailure, L as isFarmAPIStream, N as isJSONStreamResponse, S as isMultipartSchema, U as jsonStream, V as multipart, W as readJSONStream, X as toFormData } from './endpoint.d-BkMSCRf6.mjs';
|
|
2
2
|
export { APIRoute, APIRouteConflictError, APIRouteHandlerOptions, APIRouteManager, APIRouteManagerOptions } from './api/route-manager.mjs';
|
|
3
3
|
export { A as APIClient, a as APIClientError, b as APIClientOptions, c as APIClientSystemError, d as APIClientWithoutIntegrationsOptions, e as APIQueryPrimitive, f as APIQueryValue, g as APIResult, h as APIRouteManifest, i as APIRouteRefMetadata, j as ApiClients, C as CacheKey, k as CacheOptions, l as CachePolicy, m as CacheScope, p as ClientOptions, F as FARM_API_ROUTE_META_SYMBOL, s as FARM_API_ROUTE_REF_SYMBOL, P as InvalidateOptions, Q as InvalidateTarget, S as OptimisticOptions, T as OptimisticUpdate, U as RequestEvent, V as ResponseEvent, W as RetryAttemptContext, R as RetryOptions, X as RouteAPIClient, Y as ServerAPIClient, Z as ServerAPIClientOptions, _ as ServerAPIClientWithoutIntegrationsOptions, $ as StatusEvent, a0 as StatusPhase, a1 as applyServerFnOptimisticUpdates, a2 as createAPIClient, a3 as createApiClients, a9 as createServerAPIClient, aa as getAPIRouteRefMetadata, af as isAPIRouteRef, ag as resolveServerFnInvalidateTargets, ah as settleServerFnOptimisticUpdates } from './api-client.d-CeA6tNA6.mjs';
|
|
4
|
-
import { bG as ResolvedFarmAPIConfig } from './client-plugins.d-
|
|
5
|
-
export { bZ as DEFAULT_FARM_API_BASE_PATH, c6 as FarmAPIConfig, c7 as FarmAPIConfigResolverContext, c8 as FarmAPIConfigValue,
|
|
4
|
+
import { bG as ResolvedFarmAPIConfig } from './client-plugins.d-Bx3FXpqm.mjs';
|
|
5
|
+
export { bZ as DEFAULT_FARM_API_BASE_PATH, c6 as FarmAPIConfig, c7 as FarmAPIConfigResolverContext, c8 as FarmAPIConfigValue, fa as getFarmAPIBaseURL, fD as normalizeFarmAPIBasePath, fE as normalizeFarmAPIConfig, fL as resolveFarmAPIConfig, fM as resolveFarmAPIRequestURL } from './client-plugins.d-Bx3FXpqm.mjs';
|
|
6
6
|
import { Plugin } from 'vite';
|
|
7
7
|
import { c as PluginRoutesFactory } from './route.d-BaVH3V0w.mjs';
|
|
8
8
|
export { j as PluginAPIRouter, P as PluginLocalAPI, a as PluginLocalAPIEndpoint, b as PluginRoutes, R as RouteDefinition, k as RouteFactory, l as RouteInputSchemas, m as RouteJSON, d as RouteMethod, n as RouteOptions, o as RoutePathParams, q as createRouteFactory, u as resolvePluginRoutes } from './route.d-BaVH3V0w.mjs';
|
|
9
9
|
export { A as APIRouteMatch, a as APIRouteParamValue, b as APIRouteParams, m as matchAPIRoute } from './route-pattern.d-CVsVbq5n.mjs';
|
|
10
|
-
export { A as API_ROUTE_METHODS, g as getAllowedAPIRouteMethods, i as invokeAPIRouteEndpoint, a as isWebResponse, n as normalizeRouteResponse, r as resolveAPIRouteEndpoint } from './runtime.d-
|
|
10
|
+
export { A as API_ROUTE_METHODS, g as getAllowedAPIRouteMethods, i as invokeAPIRouteEndpoint, a as isWebResponse, n as normalizeRouteResponse, r as resolveAPIRouteEndpoint } from './runtime.d-CgB3IJDq.mjs';
|
|
11
11
|
import './cache.mjs';
|
|
12
12
|
import './types.d-C41ePjvP.mjs';
|
|
13
13
|
import './runtime.d-3iJAKptR.mjs';
|
|
@@ -36,7 +36,7 @@ import './layers.d-CcS42OGR.mjs';
|
|
|
36
36
|
import 'rolldown/utils';
|
|
37
37
|
import 'rolldown';
|
|
38
38
|
import './image-config.d-CeDgNyX4.mjs';
|
|
39
|
-
import './config.d-
|
|
39
|
+
import './config.d-iRPI16ku.mjs';
|
|
40
40
|
import './types.d-DQnyD3VD.mjs';
|
|
41
41
|
import './font.mjs';
|
|
42
42
|
import './client-cache.d-di_Nasxa.mjs';
|
package/dist/api.d.ts
CHANGED
|
@@ -1,13 +1,13 @@
|
|
|
1
1
|
export { A as AnyEndpointMiddleware, D as DELETE, g as EndpointErrorContracts, h as EndpointErrorDefinition, j as EndpointErrorDefinitions, k as EndpointErrorHandler, l as EndpointErrorSchema, m as EndpointFail, f as EndpointFailure, n as EndpointHandler, o as EndpointInvalidationContext, q as EndpointInvalidationTarget, r as EndpointInvalidations, E as EndpointMCPMetadata, a as EndpointMCPOptions, s as EndpointMiddleware, t as EndpointMiddlewareContext, c as EndpointMiddlewareResult, b as EndpointOpenAPIMetadata, u as EndpointOptions, v as EndpointParamValue, w as EndpointParams, F as FarmAPIStream, x as FarmStreamResponse, G as GET, H as HEAD, I as InferEndpointMiddlewareContext, M as MultipartField, y as MultipartSchema, z as MultipartValues, O as OPTIONS, P as PATCH, B as POST, C as PUT, Q as QUERY, T as TypedEndpoint, J as TypedFormData, K as createEndpoint, i as isEndpointFailure, L as isFarmAPIStream, N as isJSONStreamResponse, S as isMultipartSchema, U as jsonStream, V as multipart, W as readJSONStream, X as toFormData } from './endpoint.d-BgHn0lhl.js';
|
|
2
2
|
export { APIRoute, APIRouteConflictError, APIRouteHandlerOptions, APIRouteManager, APIRouteManagerOptions } from './api/route-manager.js';
|
|
3
3
|
export { A as APIClient, a as APIClientError, b as APIClientOptions, c as APIClientSystemError, d as APIClientWithoutIntegrationsOptions, e as APIQueryPrimitive, f as APIQueryValue, g as APIResult, h as APIRouteManifest, i as APIRouteRefMetadata, j as ApiClients, C as CacheKey, k as CacheOptions, l as CachePolicy, m as CacheScope, p as ClientOptions, F as FARM_API_ROUTE_META_SYMBOL, s as FARM_API_ROUTE_REF_SYMBOL, P as InvalidateOptions, Q as InvalidateTarget, S as OptimisticOptions, T as OptimisticUpdate, U as RequestEvent, V as ResponseEvent, W as RetryAttemptContext, R as RetryOptions, X as RouteAPIClient, Y as ServerAPIClient, Z as ServerAPIClientOptions, _ as ServerAPIClientWithoutIntegrationsOptions, $ as StatusEvent, a0 as StatusPhase, a1 as applyServerFnOptimisticUpdates, a2 as createAPIClient, a3 as createApiClients, a9 as createServerAPIClient, aa as getAPIRouteRefMetadata, af as isAPIRouteRef, ag as resolveServerFnInvalidateTargets, ah as settleServerFnOptimisticUpdates } from './api-client.d-BWcqZciH.js';
|
|
4
|
-
import { bG as ResolvedFarmAPIConfig } from './client-plugins.d-
|
|
5
|
-
export { bZ as DEFAULT_FARM_API_BASE_PATH, c6 as FarmAPIConfig, c7 as FarmAPIConfigResolverContext, c8 as FarmAPIConfigValue,
|
|
4
|
+
import { bG as ResolvedFarmAPIConfig } from './client-plugins.d-TiLbS5j4.js';
|
|
5
|
+
export { bZ as DEFAULT_FARM_API_BASE_PATH, c6 as FarmAPIConfig, c7 as FarmAPIConfigResolverContext, c8 as FarmAPIConfigValue, fa as getFarmAPIBaseURL, fD as normalizeFarmAPIBasePath, fE as normalizeFarmAPIConfig, fL as resolveFarmAPIConfig, fM as resolveFarmAPIRequestURL } from './client-plugins.d-TiLbS5j4.js';
|
|
6
6
|
import { Plugin } from 'vite';
|
|
7
7
|
import { c as PluginRoutesFactory } from './route.d-DBTEqifW.js';
|
|
8
8
|
export { j as PluginAPIRouter, P as PluginLocalAPI, a as PluginLocalAPIEndpoint, b as PluginRoutes, R as RouteDefinition, k as RouteFactory, l as RouteInputSchemas, m as RouteJSON, d as RouteMethod, n as RouteOptions, o as RoutePathParams, q as createRouteFactory, u as resolvePluginRoutes } from './route.d-DBTEqifW.js';
|
|
9
9
|
export { A as APIRouteMatch, a as APIRouteParamValue, b as APIRouteParams, m as matchAPIRoute } from './route-pattern.d-CVsVbq5n.js';
|
|
10
|
-
export { A as API_ROUTE_METHODS, g as getAllowedAPIRouteMethods, i as invokeAPIRouteEndpoint, a as isWebResponse, n as normalizeRouteResponse, r as resolveAPIRouteEndpoint } from './runtime.d-
|
|
10
|
+
export { A as API_ROUTE_METHODS, g as getAllowedAPIRouteMethods, i as invokeAPIRouteEndpoint, a as isWebResponse, n as normalizeRouteResponse, r as resolveAPIRouteEndpoint } from './runtime.d-D-td-RR3.js';
|
|
11
11
|
import './cache.js';
|
|
12
12
|
import './types.d-C41ePjvP.js';
|
|
13
13
|
import './runtime.d-BtL3PCL3.js';
|
|
@@ -36,7 +36,7 @@ import './layers.d-CcS42OGR.js';
|
|
|
36
36
|
import 'rolldown/utils';
|
|
37
37
|
import 'rolldown';
|
|
38
38
|
import './image-config.d-CeDgNyX4.js';
|
|
39
|
-
import './config.d-
|
|
39
|
+
import './config.d-iRPI16ku.js';
|
|
40
40
|
import './types.d-DQnyD3VD.js';
|
|
41
41
|
import './font.js';
|
|
42
42
|
import './client-cache.d-Deoqq-nM.js';
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { bg as FarmMCPCatalogDetails, bh as ResolvedFarmAppManifestConfig } from './client-plugins.d-
|
|
1
|
+
import { bg as FarmMCPCatalogDetails, bh as ResolvedFarmAppManifestConfig } from './client-plugins.d-Bx3FXpqm.mjs';
|
|
2
2
|
|
|
3
3
|
interface FarmAppManifestWebMCPTool {
|
|
4
4
|
name: string;
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { bg as FarmMCPCatalogDetails, bh as ResolvedFarmAppManifestConfig } from './client-plugins.d-
|
|
1
|
+
import { bg as FarmMCPCatalogDetails, bh as ResolvedFarmAppManifestConfig } from './client-plugins.d-TiLbS5j4.js';
|
|
2
2
|
|
|
3
3
|
interface FarmAppManifestWebMCPTool {
|
|
4
4
|
name: string;
|