@farm.js/core 0.2.1 → 0.2.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--uQgDp_Q.d.ts → agent-mcp.d-DuZjglYX.d.ts} +1 -1
- package/dist/{agent-mcp.d-DpthRhqr.d.mts → agent-mcp.d-gI3ahrF6.d.mts} +1 -1
- package/dist/agent-runtime.d.mts +1 -1
- package/dist/agent-runtime.d.ts +1 -1
- package/dist/analyzer-ENHO4SA5.cjs +17 -0
- package/dist/{analyzer-GLFRODYV.mjs → analyzer-UXWYUTBK.mjs} +2 -2
- package/dist/api/node.d.mts +3 -3
- package/dist/api/node.d.ts +3 -3
- package/dist/api/route-manager.d.mts +3 -3
- package/dist/api/route-manager.d.ts +3 -3
- package/dist/api/runtime.d.mts +2 -2
- package/dist/api/runtime.d.ts +2 -2
- package/dist/api.d.mts +4 -4
- package/dist/api.d.ts +4 -4
- package/dist/{app-manifest.d-DMgcFuXQ.d.ts → app-manifest.d-B3h89j6a.d.ts} +1 -1
- package/dist/{app-manifest.d-DXAvPjMw.d.mts → app-manifest.d-bHK9EGPI.d.mts} +1 -1
- package/dist/app-markdown.d.mts +2 -2
- package/dist/app-markdown.d.ts +2 -2
- package/dist/{app.d-htfGqq-d.d.ts → app.d-C3uyET_L.d.ts} +4 -4
- package/dist/{app.d-DG_-nN5y.d.mts → app.d-Cr7fXGvJ.d.mts} +4 -4
- package/dist/{chunk-HENYWY5J.cjs → chunk-2T4GGCQT.cjs} +2 -2
- package/dist/{chunk-PGU4SCIU.cjs → chunk-56F4CDKE.cjs} +124 -124
- package/dist/{chunk-V6ACETKR.cjs → chunk-5AOARZJT.cjs} +4 -4
- package/dist/{chunk-YQXLBYY2.cjs → chunk-5B2Y4EVS.cjs} +32 -8
- package/dist/{chunk-QI3UYN3P.cjs → chunk-5CG2UD6B.cjs} +12 -12
- package/dist/{chunk-QCVP22KW.cjs → chunk-5RYBQKBY.cjs} +3 -3
- package/dist/{chunk-BOHBFBRA.mjs → chunk-6VMBLDWY.mjs} +1 -1
- package/dist/{chunk-DVL3UVYT.mjs → chunk-6XABTMXR.mjs} +2 -2
- package/dist/chunk-7QGA6UX6.cjs +26 -0
- package/dist/{chunk-JZAGIXMB.cjs → chunk-A4AYTO2E.cjs} +1 -1
- package/dist/{chunk-V36K4TSU.mjs → chunk-ADKPJZPP.mjs} +1 -1
- package/dist/{chunk-OKZHPPBX.mjs → chunk-ALGAGXWB.mjs} +1 -1
- package/dist/{chunk-XSE4XJKY.cjs → chunk-B7CZ7T2I.cjs} +2 -2
- package/dist/{chunk-PVB5UYJT.cjs → chunk-BEAQVRMQ.cjs} +51 -51
- package/dist/{chunk-GEZ76JXD.cjs → chunk-FDS6U2NT.cjs} +3 -3
- package/dist/{chunk-P2THJDLH.mjs → chunk-FEWGKBMM.mjs} +16 -11
- package/dist/chunk-G7LNCHTS.mjs +21 -0
- package/dist/{chunk-L2KGQXFU.mjs → chunk-GKDOKES3.mjs} +1 -1
- package/dist/{chunk-XYCB3CXM.mjs → chunk-IEXZMDF4.mjs} +2 -2
- package/dist/{chunk-HBZQIRRM.mjs → chunk-JCERO6YF.mjs} +1 -1
- package/dist/{chunk-JJ22OI7J.cjs → chunk-JM5VSEYC.cjs} +2 -2
- package/dist/{chunk-MR64FNW6.cjs → chunk-L7Z6OAE2.cjs} +4 -4
- package/dist/{chunk-D5GFVHBV.mjs → chunk-MEXGQE4T.mjs} +5 -5
- package/dist/{chunk-RCJAOQWW.mjs → chunk-NPR6SCEV.mjs} +1 -1
- package/dist/{chunk-QJKGRUBR.mjs → chunk-Q4CPBKPT.mjs} +4 -4
- package/dist/{chunk-D2OU4CX2.cjs → chunk-SJQ24IB5.cjs} +6 -6
- package/dist/{chunk-SIJ3DREB.mjs → chunk-ST3U7XVO.mjs} +1 -1
- package/dist/{chunk-TI4BJFYX.mjs → chunk-TK2JJCP5.mjs} +10 -10
- package/dist/{chunk-LO5BNR6Y.mjs → chunk-W5T3ZAFU.mjs} +25 -1
- package/dist/{chunk-ADCVSTFV.cjs → chunk-WAQIO2VD.cjs} +2 -2
- package/dist/{chunk-W34OS5CK.cjs → chunk-ZND5D4IC.cjs} +142 -137
- package/dist/{chunk-E7ISZK3R.mjs → chunk-ZVT2F3JU.mjs} +1 -1
- package/dist/{client-component.d-DDbDw2yP.d.ts → client-component.d-BavTzqsn.d.ts} +1 -1
- package/dist/{client-component.d-D5JVDeQf.d.mts → client-component.d-X3j9FOZ2.d.mts} +1 -1
- package/dist/{client-plugins.d-BHqfH3DQ.d.ts → client-plugins.d-CqTr5IrQ.d.ts} +61 -1
- package/dist/{client-plugins.d-9jr2yWR3.d.mts → client-plugins.d-DnnAopKG.d.mts} +61 -1
- package/dist/client-plugins.d.mts +1 -1
- package/dist/client-plugins.d.ts +1 -1
- package/dist/client.d.mts +7 -7
- package/dist/client.d.ts +7 -7
- package/dist/config.d.mts +1 -1
- package/dist/config.d.ts +1 -1
- package/dist/desktop.cjs +5 -1
- package/dist/desktop.d.mts +8 -4
- package/dist/desktop.d.ts +8 -4
- package/dist/desktop.mjs +4 -0
- package/dist/{dev-guard-M3ZCDWCK.cjs → dev-guard-5NUIX6IZ.cjs} +4 -3
- package/dist/{dev-guard-TFVWJNIB.mjs → dev-guard-L42ZZRCZ.mjs} +2 -1
- package/dist/{devtools-F6Z436WU.cjs → devtools-4LMM3DDJ.cjs} +2 -2
- package/dist/{devtools-ZDBCJI44.mjs → devtools-RFVGDHXH.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/environment/vite.cjs +3 -3
- package/dist/environment/vite.mjs +2 -2
- package/dist/{handler.d-EtTSPkeO.d.mts → handler.d-BSlpYCDB.d.mts} +1 -1
- package/dist/{handler.d-Dq_bSEKC.d.ts → handler.d-DgX7gPO6.d.ts} +1 -1
- package/dist/{headers.d-BKwGD_uC.d.mts → headers.d-Cf8l5LMo.d.mts} +1 -1
- package/dist/{headers.d-CpIHLCEk.d.ts → headers.d-CmxW42R2.d.ts} +1 -1
- package/dist/index.cjs +15 -14
- package/dist/{index.d-DXtaU9OU.d.mts → index.d-7xoJqKRZ.d.mts} +1 -1
- package/dist/{index.d-CoRZKiHA.d.ts → index.d-BZZt7kxO.d.ts} +1 -1
- package/dist/index.d.mts +22 -22
- package/dist/index.d.ts +22 -22
- package/dist/index.mjs +14 -13
- package/dist/integrations/orm.d.mts +1 -1
- package/dist/integrations/orm.d.ts +1 -1
- package/dist/integrations.d.mts +1 -1
- package/dist/integrations.d.ts +1 -1
- package/dist/internal/app-markdown-runtime.d.mts +2 -2
- package/dist/internal/app-markdown-runtime.d.ts +2 -2
- package/dist/internal/build-runtime.cjs +17 -16
- package/dist/internal/build-runtime.d.mts +4 -4
- package/dist/internal/build-runtime.d.ts +4 -4
- package/dist/internal/build-runtime.mjs +16 -15
- package/dist/internal/cli-runtime.cjs +2 -2
- package/dist/internal/cli-runtime.d.mts +7 -7
- package/dist/internal/cli-runtime.d.ts +7 -7
- 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 +1 -1
- package/dist/internal/compression-runtime.d.ts +1 -1
- package/dist/internal/config-runtime.cjs +5 -4
- package/dist/internal/config-runtime.d.mts +3 -3
- package/dist/internal/config-runtime.d.ts +3 -3
- package/dist/internal/config-runtime.mjs +4 -3
- package/dist/internal/infra-analytics-runtime.cjs +6 -6
- package/dist/internal/infra-analytics-runtime.mjs +4 -4
- package/dist/internal/native-server-fns.cjs +4 -4
- package/dist/internal/native-server-fns.mjs +3 -3
- package/dist/internal/product-telemetry-runtime.cjs +3 -3
- package/dist/internal/product-telemetry-runtime.mjs +2 -2
- package/dist/internal/production-runtime.cjs +4 -4
- package/dist/internal/production-runtime.d.mts +10 -10
- package/dist/internal/production-runtime.d.ts +10 -10
- package/dist/internal/production-runtime.mjs +3 -3
- package/dist/internal/spa-router.d.mts +3 -3
- package/dist/internal/spa-router.d.ts +3 -3
- package/dist/internal/start-manifest.d.mts +1 -1
- package/dist/internal/start-manifest.d.ts +1 -1
- package/dist/markdown.d.mts +1 -1
- package/dist/markdown.d.ts +1 -1
- package/dist/middleware.d.mts +1 -1
- package/dist/middleware.d.ts +1 -1
- package/dist/{mount.d-BzK2Z1pR.d.ts → mount.d-CD-xVBu7.d.ts} +1 -1
- package/dist/{mount.d-D-ynBlxU.d.mts → mount.d-Dd0xeRMl.d.mts} +1 -1
- package/dist/{navigation-delegate.d-DtsnFnNF.d.ts → navigation-delegate.d-Bses_F-y.d.ts} +1 -1
- package/dist/{navigation-delegate.d-aJh3ZmTY.d.mts → navigation-delegate.d-dBNg976E.d.mts} +1 -1
- package/dist/navigation.d.mts +4 -4
- package/dist/navigation.d.ts +4 -4
- package/dist/plugin.cjs +12 -11
- package/dist/plugin.d.mts +5 -5
- package/dist/plugin.d.ts +5 -5
- package/dist/plugin.mjs +11 -10
- package/dist/{render-plan.d-h8bkOQyh.d.ts → render-plan.d-DaIwnRK2.d.ts} +1 -1
- package/dist/{render-plan.d-C6nUIU2m.d.mts → render-plan.d-vOdZHHLI.d.mts} +1 -1
- package/dist/renderer-client.d.mts +5 -5
- package/dist/renderer-client.d.ts +5 -5
- package/dist/{request.d-CBEdJD5R.d.mts → request.d-B8U4pVFP.d.mts} +1 -1
- package/dist/{request.d-CrriEvxy.d.ts → request.d-CgXp3EEc.d.ts} +1 -1
- package/dist/request.d.mts +2 -2
- package/dist/request.d.ts +2 -2
- package/dist/{route-rendering.d-DgXpNk_c.d.mts → route-rendering.d-BQvNYQqu.d.mts} +1 -1
- package/dist/{route-rendering.d-C-ivf31T.d.ts → route-rendering.d-Di0AxFix.d.ts} +1 -1
- package/dist/{router.d-BRRPd5dE.d.ts → router.d-BJVGhSAJ.d.ts} +1 -1
- package/dist/{router.d-O5LrW9mZ.d.mts → router.d-hNedVdoB.d.mts} +1 -1
- package/dist/routes.d.mts +1 -1
- package/dist/routes.d.ts +1 -1
- package/dist/{rsc-pipeline-2DNM7UDA.cjs → rsc-pipeline-HT4G3QGT.cjs} +7 -6
- package/dist/{rsc-pipeline-HYINQPMW.mjs → rsc-pipeline-NCJ3NIE5.mjs} +6 -5
- package/dist/{runtime-M6GLD4CR.cjs → runtime-6UF5XKUP.cjs} +4 -4
- package/dist/{runtime-JP7L5KI7.mjs → runtime-VHXIEXL7.mjs} +2 -2
- package/dist/{runtime.d-DW_1avVi.d.ts → runtime.d-0R8nHCM6.d.ts} +1 -1
- package/dist/{runtime.d-DP8Sk9PM.d.mts → runtime.d-DpeuF_T-.d.mts} +1 -1
- package/dist/{schema-dependencies.d-Cedd7QUf.d.mts → schema-dependencies.d-_Wyey4Wv.d.mts} +1 -1
- package/dist/{schema-dependencies.d-C__RyTvW.d.ts → schema-dependencies.d-tkUHREqz.d.ts} +1 -1
- package/dist/{server-components-status.d-CdsEQbeM.d.ts → server-components-status.d-B2Z5WvO5.d.ts} +1 -1
- package/dist/{server-components-status.d-DN98yOT4.d.mts → server-components-status.d-sN7ju-ie.d.mts} +1 -1
- package/dist/server-plugins.d.mts +3 -3
- package/dist/server-plugins.d.ts +3 -3
- package/dist/server.cjs +37 -36
- package/dist/server.d.mts +11 -11
- package/dist/server.d.ts +11 -11
- package/dist/server.mjs +13 -12
- package/dist/{spa-router.d-FcDbBCrK.d.mts → spa-router.d-D3AtR2Bc.d.mts} +2 -2
- package/dist/{spa-router.d-BJWZAdrV.d.ts → spa-router.d-MjT6sGb9.d.ts} +2 -2
- package/dist/{ssg.d--uut8Gya.d.mts → ssg.d-B32Cp_XW.d.mts} +2 -2
- package/dist/{ssg.d-Cf9mC1rZ.d.ts → ssg.d-C1SNuPz5.d.ts} +2 -2
- package/dist/{store-core.d-h7o6V2kH.d.ts → store-core.d-BZ3YXs70.d.ts} +2 -2
- package/dist/{store-core.d-DgYlAo-e.d.mts → store-core.d-BbVdaoA0.d.mts} +2 -2
- package/dist/testing.d.mts +1 -1
- package/dist/testing.d.ts +1 -1
- package/dist/{utils.d-2lGEnyBc.d.ts → utils.d-Bjbm44fP.d.ts} +1 -1
- package/dist/{utils.d-DjFApBfE.d.mts → utils.d-CoLozp7-.d.mts} +1 -1
- package/dist/version.cjs +2 -2
- package/dist/version.mjs +1 -1
- package/dist/vite.cjs +12 -11
- package/dist/vite.d.mts +6 -6
- package/dist/vite.d.ts +6 -6
- package/dist/vite.mjs +11 -10
- package/package.json +1 -1
- package/dist/analyzer-KBVOHASA.cjs +0 -17
- /package/dist/{chunk-EIAA4W3M.cjs → chunk-COXMHCIV.cjs} +0 -0
- /package/dist/{chunk-H6MYRZ2U.mjs → chunk-JL2HNLMC.mjs} +0 -0
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
"use strict";Object.defineProperty(exports, "__esModule", {value: true}); 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 _chunkL7Z6OAE2cjs = require('./chunk-L7Z6OAE2.cjs');
|
|
4
4
|
|
|
5
5
|
|
|
6
6
|
|
|
@@ -370,7 +370,7 @@ function requestEvent(metadata, method, status, durationMs) {
|
|
|
370
370
|
id: uuid(),
|
|
371
371
|
requestId: metadata.id,
|
|
372
372
|
timestamp: (/* @__PURE__ */ new Date()).toISOString(),
|
|
373
|
-
route: routeTemplate(
|
|
373
|
+
route: routeTemplate(_chunkL7Z6OAE2cjs.getFarmRouteLabel.call(void 0, metadata.route)),
|
|
374
374
|
...metadata.path ? { path: metadata.path } : {},
|
|
375
375
|
agent: metadata.agent,
|
|
376
376
|
kind: "request",
|
|
@@ -426,7 +426,7 @@ function toolEvent(metadata, event, payloads) {
|
|
|
426
426
|
id: uuid(),
|
|
427
427
|
requestId: metadata.id,
|
|
428
428
|
timestamp: (/* @__PURE__ */ new Date()).toISOString(),
|
|
429
|
-
route: routeTemplate(
|
|
429
|
+
route: routeTemplate(_chunkL7Z6OAE2cjs.getFarmRouteLabel.call(void 0, metadata.route)),
|
|
430
430
|
...metadata.path ? { path: metadata.path } : {},
|
|
431
431
|
agent: metadata.agent,
|
|
432
432
|
kind: "mcp.tool",
|
|
@@ -512,7 +512,7 @@ async function receiveWebMCPReport(request, exporter, options, webmcp, waitUntil
|
|
|
512
512
|
exporter.enqueue({
|
|
513
513
|
id: uuid(),
|
|
514
514
|
timestamp: (/* @__PURE__ */ new Date()).toISOString(),
|
|
515
|
-
route: routeTemplate(
|
|
515
|
+
route: routeTemplate(_chunkL7Z6OAE2cjs.getFarmRouteLabel.call(void 0, route)),
|
|
516
516
|
...path ? { path } : {},
|
|
517
517
|
agent: _chunkU2HFXURZcjs.classifyFarmClient.call(void 0, request),
|
|
518
518
|
kind: "mcp.tool",
|
|
@@ -8,6 +8,9 @@
|
|
|
8
8
|
var _chunkP2LSRUQBcjs = require('./chunk-P2LSRUQB.cjs');
|
|
9
9
|
|
|
10
10
|
|
|
11
|
+
var _chunk7QGA6UX6cjs = require('./chunk-7QGA6UX6.cjs');
|
|
12
|
+
|
|
13
|
+
|
|
11
14
|
var _chunkUGL4BDNBcjs = require('./chunk-UGL4BDNB.cjs');
|
|
12
15
|
|
|
13
16
|
// src/desktop/config.ts
|
|
@@ -25,8 +28,9 @@ function resolveFarmPlatform(env = process.env) {
|
|
|
25
28
|
const value = env[FARM_PLATFORM_ENV];
|
|
26
29
|
return value === "desktop" || value === "mobile" ? value : "web";
|
|
27
30
|
}
|
|
28
|
-
var DESKTOP_KEYS = /* @__PURE__ */ new Set(["name", "id", "version", "icon", "window", "shell"]);
|
|
31
|
+
var DESKTOP_KEYS = /* @__PURE__ */ new Set(["name", "id", "version", "icon", "window", "permissions", "shell"]);
|
|
29
32
|
var WINDOW_KEYS = /* @__PURE__ */ new Set(["width", "height", "title", "hideOnClose"]);
|
|
33
|
+
var PERMISSION_KEYS = new Set(_chunk7QGA6UX6cjs.FARM_DESKTOP_PERMISSIONS);
|
|
30
34
|
var APP_ID = /^[A-Za-z][A-Za-z0-9-]*(?:\.[A-Za-z0-9][A-Za-z0-9-]*)+$/;
|
|
31
35
|
var SHELL_NAME = /^[a-z][a-z0-9-]*$/;
|
|
32
36
|
var SHELL_PACKAGE = /^(?:@[a-z0-9][a-z0-9._-]*\/)?[a-z0-9][a-z0-9._-]*(?:\/[a-z0-9][a-z0-9._-]*)*$/;
|
|
@@ -74,6 +78,20 @@ function validateFarmDesktopConfig(input, context) {
|
|
|
74
78
|
fail("window.hideOnClose must be true or false.");
|
|
75
79
|
}
|
|
76
80
|
}
|
|
81
|
+
if (input.permissions !== void 0) {
|
|
82
|
+
if (!_chunkP2LSRUQBcjs.isPlainObject.call(void 0, input.permissions)) {
|
|
83
|
+
fail('permissions must be an object, such as { microphone: "Notes records voice memos." }.');
|
|
84
|
+
}
|
|
85
|
+
checkKeys(input.permissions, PERMISSION_KEYS, "permissions.");
|
|
86
|
+
for (const key of PERMISSION_KEYS) {
|
|
87
|
+
const value = input.permissions[key];
|
|
88
|
+
if (value !== void 0 && (typeof value !== "string" || !value.trim())) {
|
|
89
|
+
fail(
|
|
90
|
+
`permissions.${key} must be the sentence macOS shows when it asks for access, such as "Notes records voice memos.", or left out for no access.`
|
|
91
|
+
);
|
|
92
|
+
}
|
|
93
|
+
}
|
|
94
|
+
}
|
|
77
95
|
const shell = optionalString(input.shell, "shell");
|
|
78
96
|
if (shell !== void 0 && !SHELL_NAME.test(shell) && !shell.includes("/")) {
|
|
79
97
|
fail(`shell must be an adapter name such as "electrobun" or a package name, got "${shell}".`);
|
|
@@ -98,17 +116,23 @@ function resolveFarmDesktopConfig(input, root, context) {
|
|
|
98
116
|
const icon = config.icon ? path.resolve(root, config.icon.trim()) : void 0;
|
|
99
117
|
if (icon && !_fs.existsSync.call(void 0, icon))
|
|
100
118
|
desktopChecker(context).fail(`icon ${config.icon} was not found in ${root}.`);
|
|
119
|
+
const permissions = {};
|
|
120
|
+
for (const key of _chunk7QGA6UX6cjs.FARM_DESKTOP_PERMISSIONS) {
|
|
121
|
+
const sentence = _optionalChain([config, 'access', _7 => _7.permissions, 'optionalAccess', _8 => _8[key], 'optionalAccess', _9 => _9.trim, 'call', _10 => _10()]);
|
|
122
|
+
if (sentence) permissions[key] = sentence;
|
|
123
|
+
}
|
|
101
124
|
return {
|
|
102
125
|
name,
|
|
103
|
-
id: _optionalChain([config, 'access',
|
|
104
|
-
version: _optionalChain([config, 'access',
|
|
126
|
+
id: _optionalChain([config, 'access', _11 => _11.id, 'optionalAccess', _12 => _12.trim, 'call', _13 => _13()]) || `local.farm.${slug(name)}`,
|
|
127
|
+
version: _optionalChain([config, 'access', _14 => _14.version, 'optionalAccess', _15 => _15.trim, 'call', _16 => _16()]) || typeof pkg.version === "string" && pkg.version.trim() || "0.0.0",
|
|
105
128
|
...icon ? { icon } : {},
|
|
106
129
|
window: {
|
|
107
|
-
width: _nullishCoalesce(_optionalChain([config, 'access',
|
|
108
|
-
height: _nullishCoalesce(_optionalChain([config, 'access',
|
|
109
|
-
title: _optionalChain([config, 'access',
|
|
110
|
-
hideOnClose: _optionalChain([config, 'access',
|
|
130
|
+
width: _nullishCoalesce(_optionalChain([config, 'access', _17 => _17.window, 'optionalAccess', _18 => _18.width]), () => ( 1024)),
|
|
131
|
+
height: _nullishCoalesce(_optionalChain([config, 'access', _19 => _19.window, 'optionalAccess', _20 => _20.height]), () => ( 768)),
|
|
132
|
+
title: _optionalChain([config, 'access', _21 => _21.window, 'optionalAccess', _22 => _22.title, 'optionalAccess', _23 => _23.trim, 'call', _24 => _24()]) || name,
|
|
133
|
+
hideOnClose: _optionalChain([config, 'access', _25 => _25.window, 'optionalAccess', _26 => _26.hideOnClose]) === true
|
|
111
134
|
},
|
|
135
|
+
...Object.keys(permissions).length ? { permissions } : {},
|
|
112
136
|
shell,
|
|
113
137
|
shellPackage: resolveFarmDesktopShellPackage(shell)
|
|
114
138
|
};
|
|
@@ -176,7 +200,7 @@ async function createFarmDesktopSetup(userConfig, root, mode, options, cache) {
|
|
|
176
200
|
mcp: false,
|
|
177
201
|
...userConfig.agent
|
|
178
202
|
},
|
|
179
|
-
images: _optionalChain([userConfig, 'access',
|
|
203
|
+
images: _optionalChain([userConfig, 'access', _27 => _27.images, 'optionalAccess', _28 => _28.provider]) === void 0 ? { ...userConfig.images, provider: "none" } : userConfig.images
|
|
180
204
|
},
|
|
181
205
|
// On Bun by default; the CLI picks node-server for shells that embed Node. A platform
|
|
182
206
|
// build environment (VERCEL=1) must not move it either.
|
|
@@ -3,19 +3,19 @@
|
|
|
3
3
|
var _chunkYV47TSSBcjs = require('./chunk-YV47TSSB.cjs');
|
|
4
4
|
|
|
5
5
|
|
|
6
|
-
var
|
|
6
|
+
var _chunkCOXMHCIVcjs = require('./chunk-COXMHCIV.cjs');
|
|
7
7
|
|
|
8
8
|
|
|
9
9
|
|
|
10
|
-
var
|
|
10
|
+
var _chunk5RYBQKBYcjs = require('./chunk-5RYBQKBY.cjs');
|
|
11
11
|
|
|
12
12
|
|
|
13
13
|
|
|
14
14
|
|
|
15
|
-
var
|
|
15
|
+
var _chunkWAQIO2VDcjs = require('./chunk-WAQIO2VD.cjs');
|
|
16
16
|
|
|
17
17
|
|
|
18
|
-
var
|
|
18
|
+
var _chunk5B2Y4EVScjs = require('./chunk-5B2Y4EVS.cjs');
|
|
19
19
|
|
|
20
20
|
|
|
21
21
|
|
|
@@ -126,11 +126,11 @@ async function createFarmRscViteConfig(userConfig, options) {
|
|
|
126
126
|
for (const key of FARM_RSC_CONFIG_KEYS) {
|
|
127
127
|
if (config[key] !== void 0) rscConfig[key] = config[key];
|
|
128
128
|
}
|
|
129
|
-
const createReactPlugin = hasPluginNamed(vitePlugins, "vite:react") ? void 0 : await _asyncNullishCoalesce(await _asyncOptionalChain([viteReact, 'optionalAccess', async _4 => _4.default]), async () => ( (options.command === "serve" ? (await
|
|
130
|
-
const tailwind = hasPluginNamed(vitePlugins, "@tailwindcss/vite") ? void 0 : await
|
|
131
|
-
const platform =
|
|
129
|
+
const createReactPlugin = hasPluginNamed(vitePlugins, "vite:react") ? void 0 : await _asyncNullishCoalesce(await _asyncOptionalChain([viteReact, 'optionalAccess', async _4 => _4.default]), async () => ( (options.command === "serve" ? (await _chunk5RYBQKBYcjs.loadFarmReactPlugin.call(void 0, )).default : void 0)));
|
|
130
|
+
const tailwind = hasPluginNamed(vitePlugins, "@tailwindcss/vite") ? void 0 : await _chunkWAQIO2VDcjs.loadTailwindVitePlugin.call(void 0, );
|
|
131
|
+
const platform = _chunk5B2Y4EVScjs.resolveFarmPlatform.call(void 0, );
|
|
132
132
|
const mobileClient = config.mobile === void 0 || platform === "desktop" ? void 0 : options.command === "build" ? "entry" : platform === "mobile" ? "inline" : void 0;
|
|
133
|
-
const clientPluginEntry =
|
|
133
|
+
const clientPluginEntry = _chunkWAQIO2VDcjs.generateFarmClientPluginEntryCode.call(void 0,
|
|
134
134
|
config.plugins,
|
|
135
135
|
root,
|
|
136
136
|
typeof config.srcDir === "string" ? config.srcDir : "src",
|
|
@@ -155,7 +155,7 @@ async function createFarmRscViteConfig(userConfig, options) {
|
|
|
155
155
|
port: _nullishCoalesce(options.port, () => ( _optionalChain([config, 'access', _5 => _5.server, 'optionalAccess', _6 => _6.port]))),
|
|
156
156
|
plugins: [
|
|
157
157
|
...options.command === "serve" && platform === "desktop" ? [
|
|
158
|
-
|
|
158
|
+
_chunk5RYBQKBYcjs.farmDesktopDevGuardPlugin.call(void 0,
|
|
159
159
|
typeof config.basePath === "string" ? config.basePath : void 0
|
|
160
160
|
)
|
|
161
161
|
] : [],
|
|
@@ -167,7 +167,7 @@ async function createFarmRscViteConfig(userConfig, options) {
|
|
|
167
167
|
server: { environmentName: "rsc" },
|
|
168
168
|
config: {
|
|
169
169
|
preset: options.preset,
|
|
170
|
-
outputDir: options.outputDir &&
|
|
170
|
+
outputDir: options.outputDir && _chunkCOXMHCIVcjs.resolveDeployOutputPath.call(void 0, root, options.outputDir)
|
|
171
171
|
}
|
|
172
172
|
})
|
|
173
173
|
]
|
|
@@ -187,12 +187,12 @@ async function createFarmRscViteConfig(userConfig, options) {
|
|
|
187
187
|
async function resolveFarmRscServerPlugins(userConfig, config, root) {
|
|
188
188
|
const kept = _nullishCoalesce(config.plugins, () => ( []));
|
|
189
189
|
const names = new Set(
|
|
190
|
-
kept.filter((plugin) =>
|
|
190
|
+
kept.filter((plugin) => _chunkWAQIO2VDcjs.hasFarmServerRuntimePlugins.call(void 0, [plugin])).map((plugin) => plugin.name)
|
|
191
191
|
);
|
|
192
192
|
if (names.size === 0) return void 0;
|
|
193
193
|
const loads = (plugin) => {
|
|
194
194
|
const candidate = plugin;
|
|
195
|
-
return !!candidate && names.has(candidate.name) &&
|
|
195
|
+
return !!candidate && names.has(candidate.name) && _chunkWAQIO2VDcjs.hasFarmServerRuntimePlugins.call(void 0, [candidate]);
|
|
196
196
|
};
|
|
197
197
|
const { findFarmConfigFile, loadFarmConfigFile, resolveFarmLayers } = await import("./layers-6R55QDT5.cjs");
|
|
198
198
|
const files = [];
|
|
@@ -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 _chunk5B2Y4EVScjs = require('./chunk-5B2Y4EVS.cjs');
|
|
4
4
|
|
|
5
5
|
|
|
6
6
|
|
|
@@ -16,8 +16,8 @@ function farmDesktopDevGuardPlugin(basePath) {
|
|
|
16
16
|
configureServer: {
|
|
17
17
|
order: "pre",
|
|
18
18
|
async handler(server) {
|
|
19
|
-
if (
|
|
20
|
-
const { createFarmDesktopDevGuard } = await import("./dev-guard-
|
|
19
|
+
if (_chunk5B2Y4EVScjs.resolveFarmPlatform.call(void 0, ) !== "desktop") return;
|
|
20
|
+
const { createFarmDesktopDevGuard } = await import("./dev-guard-5NUIX6IZ.cjs");
|
|
21
21
|
server.middlewares.use(createFarmDesktopDevGuard(server, { basePath: basePath || "" }));
|
|
22
22
|
}
|
|
23
23
|
}
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import {
|
|
2
2
|
resolveFarmPlatform
|
|
3
|
-
} from "./chunk-
|
|
3
|
+
} from "./chunk-W5T3ZAFU.mjs";
|
|
4
4
|
|
|
5
5
|
// src/desktop/dev-guard-plugin.ts
|
|
6
6
|
function farmDesktopDevGuardPlugin(basePath) {
|
|
@@ -12,7 +12,7 @@ function farmDesktopDevGuardPlugin(basePath) {
|
|
|
12
12
|
order: "pre",
|
|
13
13
|
async handler(server) {
|
|
14
14
|
if (resolveFarmPlatform() !== "desktop") return;
|
|
15
|
-
const { createFarmDesktopDevGuard } = await import("./dev-guard-
|
|
15
|
+
const { createFarmDesktopDevGuard } = await import("./dev-guard-L42ZZRCZ.mjs");
|
|
16
16
|
server.middlewares.use(createFarmDesktopDevGuard(server, { basePath: basePath || "" }));
|
|
17
17
|
}
|
|
18
18
|
}
|
|
@@ -0,0 +1,26 @@
|
|
|
1
|
+
"use strict";Object.defineProperty(exports, "__esModule", {value: true});
|
|
2
|
+
|
|
3
|
+
var _chunkUGL4BDNBcjs = require('./chunk-UGL4BDNB.cjs');
|
|
4
|
+
|
|
5
|
+
// src/desktop/permissions.ts
|
|
6
|
+
_chunkUGL4BDNBcjs.init_define_import_meta.call(void 0, );
|
|
7
|
+
var FARM_DESKTOP_PERMISSIONS = [
|
|
8
|
+
"microphone",
|
|
9
|
+
"camera",
|
|
10
|
+
"location",
|
|
11
|
+
"speechRecognition",
|
|
12
|
+
"bluetooth",
|
|
13
|
+
"contacts",
|
|
14
|
+
"calendars",
|
|
15
|
+
"reminders",
|
|
16
|
+
"photos",
|
|
17
|
+
"music",
|
|
18
|
+
"motion",
|
|
19
|
+
"documents",
|
|
20
|
+
"downloads",
|
|
21
|
+
"desktop"
|
|
22
|
+
];
|
|
23
|
+
|
|
24
|
+
|
|
25
|
+
|
|
26
|
+
exports.FARM_DESKTOP_PERMISSIONS = FARM_DESKTOP_PERMISSIONS;
|
|
@@ -18,7 +18,7 @@ var _chunk4A6WSOZHcjs = require('./chunk-4A6WSOZH.cjs');
|
|
|
18
18
|
var _chunkTDAH76RRcjs = require('./chunk-TDAH76RR.cjs');
|
|
19
19
|
|
|
20
20
|
|
|
21
|
-
var
|
|
21
|
+
var _chunkCOXMHCIVcjs = require('./chunk-COXMHCIV.cjs');
|
|
22
22
|
|
|
23
23
|
|
|
24
24
|
|
|
@@ -638,7 +638,7 @@ async function resolveAPIContext(options) {
|
|
|
638
638
|
config: options.config,
|
|
639
639
|
configPath: options.configPath
|
|
640
640
|
}));
|
|
641
|
-
const docs = isResolvedDocsConfig(docsInput) ? docsInput : await
|
|
641
|
+
const docs = isResolvedDocsConfig(docsInput) ? docsInput : await _chunkCOXMHCIVcjs.resolveDocsConfig.call(void 0, docsInput, { root, srcDir });
|
|
642
642
|
const guardedPaths = new Set(_nullishCoalesce(_optionalChain([runtimeConfig, 'optionalAccess', _27 => _27.guardedPaths]), () => ( [])));
|
|
643
643
|
return {
|
|
644
644
|
root,
|