@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
|
@@ -4,7 +4,7 @@
|
|
|
4
4
|
var _chunkR6GOH5CHcjs = require('./chunk-R6GOH5CH.cjs');
|
|
5
5
|
|
|
6
6
|
|
|
7
|
-
var
|
|
7
|
+
var _chunk2T4GGCQTcjs = require('./chunk-2T4GGCQT.cjs');
|
|
8
8
|
|
|
9
9
|
|
|
10
10
|
var _chunk6QCZWAGOcjs = require('./chunk-6QCZWAGO.cjs');
|
|
@@ -29,7 +29,7 @@ var _chunkH5AC3XSEcjs = require('./chunk-H5AC3XSE.cjs');
|
|
|
29
29
|
var _chunk7GKZDRY2cjs = require('./chunk-7GKZDRY2.cjs');
|
|
30
30
|
|
|
31
31
|
|
|
32
|
-
var
|
|
32
|
+
var _chunkA4AYTO2Ecjs = require('./chunk-A4AYTO2E.cjs');
|
|
33
33
|
|
|
34
34
|
|
|
35
35
|
var _chunkTFCBJFP7cjs = require('./chunk-TFCBJFP7.cjs');
|
|
@@ -294,7 +294,7 @@ function createFarmAppManifest(input, registered = []) {
|
|
|
294
294
|
return {
|
|
295
295
|
schemaVersion: 1,
|
|
296
296
|
app: app ? {
|
|
297
|
-
...app.version ? { farm:
|
|
297
|
+
...app.version ? { farm: _chunkA4AYTO2Ecjs.FARM_VERSION } : {},
|
|
298
298
|
...app.renderer ? { renderer: input.renderer } : {},
|
|
299
299
|
basePath: input.basePath,
|
|
300
300
|
...app.build ? { build: input.build } : {}
|
|
@@ -325,7 +325,7 @@ function resolveFarmSiteUrl() {
|
|
|
325
325
|
asUrl(read("RAILWAY_PUBLIC_DOMAIN"))
|
|
326
326
|
];
|
|
327
327
|
for (const candidate of candidates) {
|
|
328
|
-
const origin = candidate ?
|
|
328
|
+
const origin = candidate ? _chunk2T4GGCQTcjs.normalizeFarmProductionSiteOrigin.call(void 0, candidate) : void 0;
|
|
329
329
|
if (origin) return origin;
|
|
330
330
|
}
|
|
331
331
|
return null;
|
|
@@ -1,10 +1,10 @@
|
|
|
1
1
|
import {
|
|
2
2
|
resolveFarmAppClientEntry,
|
|
3
3
|
resolveFarmClientPlugins
|
|
4
|
-
} from "./chunk-
|
|
4
|
+
} from "./chunk-ADKPJZPP.mjs";
|
|
5
5
|
import {
|
|
6
6
|
resolveFarmPlatform
|
|
7
|
-
} from "./chunk-
|
|
7
|
+
} from "./chunk-W5T3ZAFU.mjs";
|
|
8
8
|
import {
|
|
9
9
|
collectSSGPages,
|
|
10
10
|
matchSSGPage,
|
|
@@ -59,7 +59,7 @@ import {
|
|
|
59
59
|
} from "./chunk-LP6DIYGA.mjs";
|
|
60
60
|
import {
|
|
61
61
|
listFarmMCPLlmsTxtLinks
|
|
62
|
-
} from "./chunk-
|
|
62
|
+
} from "./chunk-IEXZMDF4.mjs";
|
|
63
63
|
import {
|
|
64
64
|
FARM_DEFAULT_MCP_PATH,
|
|
65
65
|
collectFarmDefaultMCPPages,
|
|
@@ -108,7 +108,7 @@ import {
|
|
|
108
108
|
usesFarmServerTree,
|
|
109
109
|
withFarmSourceSnapshot,
|
|
110
110
|
withFarmSourceSnapshotAside
|
|
111
|
-
} from "./chunk-
|
|
111
|
+
} from "./chunk-ZVT2F3JU.mjs";
|
|
112
112
|
import {
|
|
113
113
|
_setDefaultFarmThemeConfig,
|
|
114
114
|
getTheme
|
|
@@ -312,7 +312,7 @@ import {
|
|
|
312
312
|
} from "./chunk-EILUVBKS.mjs";
|
|
313
313
|
import {
|
|
314
314
|
FARM_VERSION
|
|
315
|
-
} from "./chunk-
|
|
315
|
+
} from "./chunk-6VMBLDWY.mjs";
|
|
316
316
|
import {
|
|
317
317
|
normalizeFarmAPIConfig
|
|
318
318
|
} from "./chunk-W6QLRQ3V.mjs";
|
|
@@ -3,19 +3,19 @@ import {
|
|
|
3
3
|
} from "./chunk-RLEAVG6G.mjs";
|
|
4
4
|
import {
|
|
5
5
|
resolveDeployOutputPath
|
|
6
|
-
} from "./chunk-
|
|
6
|
+
} from "./chunk-JL2HNLMC.mjs";
|
|
7
7
|
import {
|
|
8
8
|
farmDesktopDevGuardPlugin,
|
|
9
9
|
loadFarmReactPlugin
|
|
10
|
-
} from "./chunk-
|
|
10
|
+
} from "./chunk-6XABTMXR.mjs";
|
|
11
11
|
import {
|
|
12
12
|
generateFarmClientPluginEntryCode,
|
|
13
13
|
hasFarmServerRuntimePlugins,
|
|
14
14
|
loadTailwindVitePlugin
|
|
15
|
-
} from "./chunk-
|
|
15
|
+
} from "./chunk-ADKPJZPP.mjs";
|
|
16
16
|
import {
|
|
17
17
|
resolveFarmPlatform
|
|
18
|
-
} from "./chunk-
|
|
18
|
+
} from "./chunk-W5T3ZAFU.mjs";
|
|
19
19
|
import {
|
|
20
20
|
FARM_RSC_INSTALL_HINT,
|
|
21
21
|
findFarmAppPackageDir,
|
|
@@ -31,7 +31,7 @@ var _chunkPYPHM7AScjs = require('./chunk-PYPHM7AS.cjs');
|
|
|
31
31
|
var _chunk7ZDLE77Pcjs = require('./chunk-7ZDLE77P.cjs');
|
|
32
32
|
|
|
33
33
|
|
|
34
|
-
var
|
|
34
|
+
var _chunkA4AYTO2Ecjs = require('./chunk-A4AYTO2E.cjs');
|
|
35
35
|
|
|
36
36
|
|
|
37
37
|
var _chunkUGL4BDNBcjs = require('./chunk-UGL4BDNB.cjs');
|
|
@@ -980,7 +980,7 @@ function usePackageScanCacheFile(file) {
|
|
|
980
980
|
const stored = /* @__PURE__ */ new Map();
|
|
981
981
|
try {
|
|
982
982
|
const value = JSON.parse(_fs2.default.readFileSync(file, "utf8"));
|
|
983
|
-
if (_optionalChain([value, 'optionalAccess', _68 => _68.schema]) === PACKAGE_SCAN_CACHE_SCHEMA && value.farm ===
|
|
983
|
+
if (_optionalChain([value, 'optionalAccess', _68 => _68.schema]) === PACKAGE_SCAN_CACHE_SCHEMA && value.farm === _chunkA4AYTO2Ecjs.FARM_VERSION && value.scans && typeof value.scans === "object") {
|
|
984
984
|
for (const [directory, scan] of Object.entries(value.scans)) {
|
|
985
985
|
if (isStoredPackageScan(scan)) stored.set(directory, scan);
|
|
986
986
|
}
|
|
@@ -1009,7 +1009,7 @@ function persistPackageScanCache() {
|
|
|
1009
1009
|
_fs2.default.mkdirSync(_path2.default.dirname(cache2.file), { recursive: true });
|
|
1010
1010
|
_fs2.default.writeFileSync(
|
|
1011
1011
|
temporary,
|
|
1012
|
-
JSON.stringify({ schema: PACKAGE_SCAN_CACHE_SCHEMA, farm:
|
|
1012
|
+
JSON.stringify({ schema: PACKAGE_SCAN_CACHE_SCHEMA, farm: _chunkA4AYTO2Ecjs.FARM_VERSION, scans })
|
|
1013
1013
|
);
|
|
1014
1014
|
_fs2.default.renameSync(temporary, cache2.file);
|
|
1015
1015
|
cache2.dirty = false;
|
|
@@ -2322,7 +2322,7 @@ var PackageClientBoundaryCache = class {
|
|
|
2322
2322
|
}
|
|
2323
2323
|
const contents = JSON.stringify({
|
|
2324
2324
|
schema: SCHEMA_VERSION,
|
|
2325
|
-
farm:
|
|
2325
|
+
farm: _chunkA4AYTO2Ecjs.FARM_VERSION,
|
|
2326
2326
|
paths,
|
|
2327
2327
|
entries
|
|
2328
2328
|
});
|
|
@@ -2362,7 +2362,7 @@ function readStoredCache(file) {
|
|
|
2362
2362
|
} catch (e38) {
|
|
2363
2363
|
return null;
|
|
2364
2364
|
}
|
|
2365
|
-
if (!isRecord(value) || value.schema !== SCHEMA_VERSION || value.farm !==
|
|
2365
|
+
if (!isRecord(value) || value.schema !== SCHEMA_VERSION || value.farm !== _chunkA4AYTO2Ecjs.FARM_VERSION) {
|
|
2366
2366
|
return null;
|
|
2367
2367
|
}
|
|
2368
2368
|
const { paths, entries } = value;
|
|
@@ -2373,7 +2373,7 @@ function readStoredCache(file) {
|
|
|
2373
2373
|
const usable = variants.filter((entry) => isStoredEntry(entry, paths.length));
|
|
2374
2374
|
if (usable.length > 0) valid[key] = usable;
|
|
2375
2375
|
}
|
|
2376
|
-
return { schema: SCHEMA_VERSION, farm:
|
|
2376
|
+
return { schema: SCHEMA_VERSION, farm: _chunkA4AYTO2Ecjs.FARM_VERSION, paths, entries: valid };
|
|
2377
2377
|
}
|
|
2378
2378
|
function isRecord(value) {
|
|
2379
2379
|
return typeof value === "object" && value !== null && !Array.isArray(value);
|
|
@@ -32,7 +32,7 @@ import {
|
|
|
32
32
|
import {
|
|
33
33
|
collectFarmNativeServerFns,
|
|
34
34
|
findFarmNativeScreenFiles
|
|
35
|
-
} from "./chunk-
|
|
35
|
+
} from "./chunk-GKDOKES3.mjs";
|
|
36
36
|
import {
|
|
37
37
|
assertFarmDocsAdapterServesNoGuardedPages,
|
|
38
38
|
compileFarmDocsAdapterEdgeManifest,
|
|
@@ -41,7 +41,7 @@ import {
|
|
|
41
41
|
listFarmDocsAdapterPages,
|
|
42
42
|
listFarmDocsAdapterRoutes,
|
|
43
43
|
listFarmDocsPagePaths
|
|
44
|
-
} from "./chunk-
|
|
44
|
+
} from "./chunk-JCERO6YF.mjs";
|
|
45
45
|
import {
|
|
46
46
|
FARM_DOCS_LAST_MODIFIED_MANIFEST,
|
|
47
47
|
createFarmDocsHandler,
|
|
@@ -71,7 +71,7 @@ import {
|
|
|
71
71
|
getDeployTargetForPreset,
|
|
72
72
|
hasCustomFarmRouteContext,
|
|
73
73
|
resolveDeployOutputPath
|
|
74
|
-
} from "./chunk-
|
|
74
|
+
} from "./chunk-JL2HNLMC.mjs";
|
|
75
75
|
import {
|
|
76
76
|
resolveFarmInstrumentationFile
|
|
77
77
|
} from "./chunk-QRNYSISP.mjs";
|
|
@@ -117,14 +117,14 @@ import {
|
|
|
117
117
|
resolveFarmNotFoundComponentPath,
|
|
118
118
|
resolveFarmRouteRootStrategy,
|
|
119
119
|
toBakedMarkdownSourcePath
|
|
120
|
-
} from "./chunk-
|
|
120
|
+
} from "./chunk-MEXGQE4T.mjs";
|
|
121
121
|
import {
|
|
122
122
|
TAILWIND_CSS_BROWSER_TARGET,
|
|
123
123
|
generateFarmClientPluginEntryCode,
|
|
124
124
|
hasFarmServerRuntimePlugins,
|
|
125
125
|
includesTailwindVitePlugin,
|
|
126
126
|
loadTailwindVitePlugin
|
|
127
|
-
} from "./chunk-
|
|
127
|
+
} from "./chunk-ADKPJZPP.mjs";
|
|
128
128
|
import {
|
|
129
129
|
PluginManager
|
|
130
130
|
} from "./chunk-6IKUYFNQ.mjs";
|
|
@@ -137,7 +137,7 @@ import {
|
|
|
137
137
|
import {
|
|
138
138
|
FARM_PRERENDER_ENV,
|
|
139
139
|
_farmWebMCPReportsEnabled
|
|
140
|
-
} from "./chunk-
|
|
140
|
+
} from "./chunk-ST3U7XVO.mjs";
|
|
141
141
|
import {
|
|
142
142
|
HOISTED_HEAD_ELEMENT,
|
|
143
143
|
appMiddlewareMayHandlePath,
|
|
@@ -165,7 +165,7 @@ import {
|
|
|
165
165
|
listFarmBuiltInRoutePaths,
|
|
166
166
|
resolveFarmApiCatalogInput,
|
|
167
167
|
resolveFarmAppManifestInput
|
|
168
|
-
} from "./chunk-
|
|
168
|
+
} from "./chunk-IEXZMDF4.mjs";
|
|
169
169
|
import {
|
|
170
170
|
FARM_DEFAULT_MCP_PATH,
|
|
171
171
|
createFarmDefaultMCPServer,
|
|
@@ -173,7 +173,7 @@ import {
|
|
|
173
173
|
} from "./chunk-WABOJXAA.mjs";
|
|
174
174
|
import {
|
|
175
175
|
isFarmPreviewDeploymentEnvironment
|
|
176
|
-
} from "./chunk-
|
|
176
|
+
} from "./chunk-NPR6SCEV.mjs";
|
|
177
177
|
import {
|
|
178
178
|
FARM_NATIVE_SERVER_FN_PLUGIN
|
|
179
179
|
} from "./chunk-L4RTTTVE.mjs";
|
|
@@ -194,7 +194,7 @@ import {
|
|
|
194
194
|
withFarmSourceSnapshot,
|
|
195
195
|
withFarmSourceSnapshotOf,
|
|
196
196
|
withPackageClientBoundaryCache
|
|
197
|
-
} from "./chunk-
|
|
197
|
+
} from "./chunk-ZVT2F3JU.mjs";
|
|
198
198
|
import {
|
|
199
199
|
generateFarmDocsAdapterClientRuntime,
|
|
200
200
|
getFarmDocsAdapterConfigModule
|
|
@@ -320,7 +320,7 @@ import {
|
|
|
320
320
|
} from "./chunk-2I6PUKWJ.mjs";
|
|
321
321
|
import {
|
|
322
322
|
FARM_VERSION
|
|
323
|
-
} from "./chunk-
|
|
323
|
+
} from "./chunk-6VMBLDWY.mjs";
|
|
324
324
|
import {
|
|
325
325
|
FARM_VIDEO_PLAYER_PATH
|
|
326
326
|
} from "./chunk-23NBOP43.mjs";
|
|
@@ -6,6 +6,9 @@ import {
|
|
|
6
6
|
resolvePlatformBlock,
|
|
7
7
|
resolvePlatformProfile
|
|
8
8
|
} from "./chunk-UB7RVEMX.mjs";
|
|
9
|
+
import {
|
|
10
|
+
FARM_DESKTOP_PERMISSIONS
|
|
11
|
+
} from "./chunk-G7LNCHTS.mjs";
|
|
9
12
|
|
|
10
13
|
// src/desktop/config.ts
|
|
11
14
|
import { existsSync } from "fs";
|
|
@@ -21,8 +24,9 @@ function resolveFarmPlatform(env = process.env) {
|
|
|
21
24
|
const value = env[FARM_PLATFORM_ENV];
|
|
22
25
|
return value === "desktop" || value === "mobile" ? value : "web";
|
|
23
26
|
}
|
|
24
|
-
var DESKTOP_KEYS = /* @__PURE__ */ new Set(["name", "id", "version", "icon", "window", "shell"]);
|
|
27
|
+
var DESKTOP_KEYS = /* @__PURE__ */ new Set(["name", "id", "version", "icon", "window", "permissions", "shell"]);
|
|
25
28
|
var WINDOW_KEYS = /* @__PURE__ */ new Set(["width", "height", "title", "hideOnClose"]);
|
|
29
|
+
var PERMISSION_KEYS = new Set(FARM_DESKTOP_PERMISSIONS);
|
|
26
30
|
var APP_ID = /^[A-Za-z][A-Za-z0-9-]*(?:\.[A-Za-z0-9][A-Za-z0-9-]*)+$/;
|
|
27
31
|
var SHELL_NAME = /^[a-z][a-z0-9-]*$/;
|
|
28
32
|
var SHELL_PACKAGE = /^(?:@[a-z0-9][a-z0-9._-]*\/)?[a-z0-9][a-z0-9._-]*(?:\/[a-z0-9][a-z0-9._-]*)*$/;
|
|
@@ -70,6 +74,20 @@ function validateFarmDesktopConfig(input, context) {
|
|
|
70
74
|
fail("window.hideOnClose must be true or false.");
|
|
71
75
|
}
|
|
72
76
|
}
|
|
77
|
+
if (input.permissions !== void 0) {
|
|
78
|
+
if (!isPlainObject(input.permissions)) {
|
|
79
|
+
fail('permissions must be an object, such as { microphone: "Notes records voice memos." }.');
|
|
80
|
+
}
|
|
81
|
+
checkKeys(input.permissions, PERMISSION_KEYS, "permissions.");
|
|
82
|
+
for (const key of PERMISSION_KEYS) {
|
|
83
|
+
const value = input.permissions[key];
|
|
84
|
+
if (value !== void 0 && (typeof value !== "string" || !value.trim())) {
|
|
85
|
+
fail(
|
|
86
|
+
`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.`
|
|
87
|
+
);
|
|
88
|
+
}
|
|
89
|
+
}
|
|
90
|
+
}
|
|
73
91
|
const shell = optionalString(input.shell, "shell");
|
|
74
92
|
if (shell !== void 0 && !SHELL_NAME.test(shell) && !shell.includes("/")) {
|
|
75
93
|
fail(`shell must be an adapter name such as "electrobun" or a package name, got "${shell}".`);
|
|
@@ -94,6 +112,11 @@ function resolveFarmDesktopConfig(input, root, context) {
|
|
|
94
112
|
const icon = config.icon ? path.resolve(root, config.icon.trim()) : void 0;
|
|
95
113
|
if (icon && !existsSync(icon))
|
|
96
114
|
desktopChecker(context).fail(`icon ${config.icon} was not found in ${root}.`);
|
|
115
|
+
const permissions = {};
|
|
116
|
+
for (const key of FARM_DESKTOP_PERMISSIONS) {
|
|
117
|
+
const sentence = config.permissions?.[key]?.trim();
|
|
118
|
+
if (sentence) permissions[key] = sentence;
|
|
119
|
+
}
|
|
97
120
|
return {
|
|
98
121
|
name,
|
|
99
122
|
id: config.id?.trim() || `local.farm.${slug(name)}`,
|
|
@@ -105,6 +128,7 @@ function resolveFarmDesktopConfig(input, root, context) {
|
|
|
105
128
|
title: config.window?.title?.trim() || name,
|
|
106
129
|
hideOnClose: config.window?.hideOnClose === true
|
|
107
130
|
},
|
|
131
|
+
...Object.keys(permissions).length ? { permissions } : {},
|
|
108
132
|
shell,
|
|
109
133
|
shellPackage: resolveFarmDesktopShellPackage(shell)
|
|
110
134
|
};
|
|
@@ -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 _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; } 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
|
var _chunkN4AM7Q34cjs = require('./chunk-N4AM7Q34.cjs');
|
|
@@ -62,7 +62,7 @@ function resolveFarmClientPlugins(plugins, _root) {
|
|
|
62
62
|
];
|
|
63
63
|
});
|
|
64
64
|
}
|
|
65
|
-
function generateFarmClientPluginEntryCode(plugins, root, srcDir = "src", appPublicData, platform =
|
|
65
|
+
function generateFarmClientPluginEntryCode(plugins, root, srcDir = "src", appPublicData, platform = _chunk5B2Y4EVScjs.resolveFarmPlatform.call(void 0, )) {
|
|
66
66
|
const resolved = resolveFarmClientPlugins(plugins, root);
|
|
67
67
|
const appClientEntry = root ? resolveFarmAppClientEntry(root, srcDir) : void 0;
|
|
68
68
|
const appImport = appClientEntry ? `import farmAppClientDefinition from ${JSON.stringify(appClientEntry.replace(/\\/g, "/"))};` : "";
|