@farm.js/core 0.1.76 → 0.1.77
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-Cftp2kFv.d.ts → agent-mcp.d-B1h3RznZ.d.ts} +1 -1
- package/dist/{agent-mcp.d-D0FMmqi0.d.mts → agent-mcp.d-WFQotg8M.d.mts} +1 -1
- package/dist/agent-runtime.cjs +2 -2
- package/dist/agent-runtime.d.mts +2 -2
- package/dist/agent-runtime.d.ts +2 -2
- package/dist/agent-runtime.mjs +1 -1
- package/dist/{analyzer-NLQKPN74.mjs → analyzer-64YS2OXQ.mjs} +2 -2
- package/dist/analyzer-HTNXLX6N.cjs +16 -0
- package/dist/api/node.d.mts +4 -4
- package/dist/api/node.d.ts +4 -4
- 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 +5 -5
- package/dist/api.d.ts +5 -5
- package/dist/{app-manifest.d-cpOw_sV5.d.mts → app-manifest.d-EZEYG-tD.d.mts} +1 -1
- package/dist/{app-manifest.d-7PmA_9hm.d.ts → app-manifest.d-Ktsqsuk9.d.ts} +1 -1
- package/dist/app-markdown.d.mts +3 -3
- package/dist/app-markdown.d.ts +3 -3
- package/dist/{app.d-wOkxXre8.d.ts → app.d-CSh3y8w8.d.ts} +4 -4
- package/dist/{app.d-DUZvwnFF.d.mts → app.d-DTkqYcIr.d.mts} +4 -4
- package/dist/{chunk-CL2ONP73.cjs → chunk-2PE5STAR.cjs} +36 -27
- package/dist/{chunk-MOS2N377.mjs → chunk-2QPTZMGK.mjs} +1 -1
- package/dist/{chunk-E7VF3LQ5.mjs → chunk-4STJ6LGR.mjs} +13 -1
- package/dist/{chunk-LQBV2Y37.mjs → chunk-65XXHTVJ.mjs} +38 -2
- package/dist/{chunk-O225GNEU.mjs → chunk-7EXFAJST.mjs} +13 -12
- package/dist/{chunk-QTDIOZV6.cjs → chunk-7SAGHWWU.cjs} +2 -2
- package/dist/{chunk-5EEQNZLU.mjs → chunk-BTHNOAOF.mjs} +2 -2
- package/dist/{chunk-Q4X3MX4J.mjs → chunk-D2RLADWN.mjs} +95 -101
- package/dist/chunk-DS2KZ5BT.mjs +16 -0
- package/dist/{chunk-PXXG5BID.cjs → chunk-DSRWQ4SJ.cjs} +3 -3
- package/dist/{chunk-WMJQNVKX.cjs → chunk-FCHEO3LG.cjs} +2 -2
- package/dist/{chunk-75XSZIRE.mjs → chunk-FD6BMUA3.mjs} +35 -26
- package/dist/{chunk-JL6XHQZF.mjs → chunk-FNVGK72M.mjs} +5 -5
- package/dist/{chunk-Q7JMHO5U.mjs → chunk-FPGSIOWS.mjs} +2 -2
- package/dist/{chunk-2JEXQAIR.cjs → chunk-FTQUNBRN.cjs} +2 -2
- package/dist/{chunk-HKGU2X4I.cjs → chunk-FVVGEGQ2.cjs} +2 -2
- package/dist/{chunk-7564NP5Z.cjs → chunk-GC2BSXQS.cjs} +39 -3
- package/dist/{chunk-CKBBKRBO.mjs → chunk-IHMSLS2O.mjs} +8 -8
- package/dist/{chunk-DVW6SKHA.cjs → chunk-IIVZTGGP.cjs} +2 -2
- package/dist/{chunk-A2VFKOQL.mjs → chunk-IXC6WDMT.mjs} +1 -1
- package/dist/{chunk-TMVVBK5S.cjs → chunk-JD42G6BN.cjs} +2 -2
- package/dist/{chunk-WILPJVQE.cjs → chunk-LTDMJD2F.cjs} +4 -4
- package/dist/{chunk-XX6ZA2IO.cjs → chunk-MQW4LHJR.cjs} +1 -1
- package/dist/{chunk-BYJPBJ4E.cjs → chunk-NQZWLIPT.cjs} +3 -3
- package/dist/{chunk-YHE7HH2I.mjs → chunk-NTHAZLVS.mjs} +27 -26
- package/dist/{chunk-OCLCA3X3.mjs → chunk-OCKQ3YOH.mjs} +1 -1
- package/dist/{chunk-WJDMH3E7.cjs → chunk-OQZF6H6G.cjs} +4 -4
- package/dist/{chunk-SGQXJVFX.mjs → chunk-ORWXJDUN.mjs} +1 -1
- package/dist/{chunk-QP4GYVRR.cjs → chunk-PMKUTZGR.cjs} +8 -8
- package/dist/{chunk-CCQZDOQR.cjs → chunk-PUEPDMWY.cjs} +16 -16
- package/dist/{chunk-MTBDJ326.cjs → chunk-QMR2TUVZ.cjs} +13 -1
- package/dist/{chunk-2GZZVIXY.mjs → chunk-QODXWUGQ.mjs} +2 -2
- package/dist/{chunk-UBXNTZCY.cjs → chunk-RFXEQYPH.cjs} +98 -104
- package/dist/{chunk-DTNWLRRF.cjs → chunk-SIYELCIX.cjs} +73 -73
- package/dist/{chunk-E77ZKNPN.mjs → chunk-SL2BSPDJ.mjs} +1 -1
- package/dist/{chunk-X3HUT4JU.mjs → chunk-SMYDCZBW.mjs} +1 -1
- package/dist/{chunk-YQXJY7E7.mjs → chunk-TQOYIPMQ.mjs} +1 -1
- package/dist/{chunk-XLOORES5.cjs → chunk-UYACD4SH.cjs} +1 -1
- package/dist/{chunk-3OYFMOBY.mjs → chunk-WHNNDFCJ.mjs} +1 -1
- package/dist/{chunk-YONTMPZ6.mjs → chunk-WXMR3OHY.mjs} +1 -1
- package/dist/{chunk-BBRSPKFI.cjs → chunk-WZVESREI.cjs} +145 -144
- package/dist/chunk-XRRHPBG2.cjs +16 -0
- package/dist/{chunk-PSNYVBWC.cjs → chunk-YROK6CJC.cjs} +7 -7
- package/dist/{chunk-2WKGQCAV.cjs → chunk-YRQ44JTF.cjs} +153 -152
- package/dist/{chunk-VDJ3CLBR.mjs → chunk-YTGNMKRA.mjs} +1 -1
- package/dist/{chunk-GP5BWTO7.mjs → chunk-ZBE5EHVJ.mjs} +4 -4
- package/dist/{cli-runtime.d-D84CwyPI.d.ts → cli-runtime.d-DljFfr8T.d.ts} +8 -6
- package/dist/{cli-runtime.d-OQY2pgwK.d.mts → cli-runtime.d-HSkdfvoq.d.mts} +8 -6
- package/dist/{client-component.d-Bh6CfC5z.d.mts → client-component.d-B-1dIlsw.d.mts} +1 -1
- package/dist/{client-component.d-Bf8jZqW7.d.ts → client-component.d-_otXB__v.d.ts} +1 -1
- package/dist/{client-plugins.d-r3K2oQ6w.d.mts → client-plugins.d-BmBzvfSP.d.mts} +1 -1
- package/dist/{client-plugins.d-DuujrC8d.d.ts → client-plugins.d-MjxlvbCK.d.ts} +1 -1
- 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.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-MBZPUH3U.mjs → devtools-7LHXG2VS.mjs} +4 -3
- package/dist/{devtools-3WZIZ7KK.cjs → devtools-NNQN66EZ.cjs} +5 -4
- package/dist/docs.cjs +6 -5
- package/dist/docs.d.mts +4 -4
- package/dist/docs.d.ts +4 -4
- package/dist/docs.mjs +5 -4
- package/dist/environment/vite.cjs +5 -4
- package/dist/environment/vite.mjs +4 -3
- package/dist/{handler.d-Bd5lRSvb.d.ts → handler.d-C53zFDmp.d.ts} +1 -1
- package/dist/{handler.d-SRH-AKzf.d.mts → handler.d-CaYopqaD.d.mts} +1 -1
- package/dist/{headers.d-D-OvGikv.d.ts → headers.d-BvtpC90T.d.ts} +1 -1
- package/dist/{headers.d-CHHvyaIG.d.mts → headers.d-MBkD9ZLf.d.mts} +1 -1
- package/dist/index.cjs +28 -23
- package/dist/{index.d-BiUtYJUG.d.ts → index.d-2hQpPZ-P.d.ts} +1 -1
- package/dist/{index.d-BOPsgMlI.d.mts → index.d-Mikf-tdP.d.mts} +1 -1
- package/dist/index.d.mts +23 -23
- package/dist/index.d.ts +23 -23
- package/dist/index.mjs +27 -22
- package/dist/integrations/orm.cjs +4 -3
- package/dist/integrations/orm.d.mts +2 -2
- package/dist/integrations/orm.d.ts +2 -2
- package/dist/integrations/orm.mjs +3 -2
- package/dist/integrations.cjs +2 -2
- package/dist/integrations.d.mts +2 -2
- package/dist/integrations.d.ts +2 -2
- package/dist/integrations.mjs +1 -1
- 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 +22 -21
- package/dist/internal/build-runtime.d.mts +5 -5
- package/dist/internal/build-runtime.d.ts +5 -5
- package/dist/internal/build-runtime.mjs +21 -20
- package/dist/internal/cli-runtime.cjs +12 -9
- package/dist/internal/cli-runtime.d.mts +9 -8
- package/dist/internal/cli-runtime.d.ts +9 -8
- package/dist/internal/cli-runtime.mjs +12 -9
- 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.cjs +2 -2
- package/dist/internal/compression-runtime.d.mts +6 -3
- package/dist/internal/compression-runtime.d.ts +6 -3
- package/dist/internal/compression-runtime.mjs +1 -1
- package/dist/internal/config-runtime.cjs +6 -5
- package/dist/internal/config-runtime.d.mts +4 -4
- package/dist/internal/config-runtime.d.ts +4 -4
- package/dist/internal/config-runtime.mjs +5 -4
- 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 +7 -6
- package/dist/internal/production-runtime.d.mts +11 -11
- package/dist/internal/production-runtime.d.ts +11 -11
- package/dist/internal/production-runtime.mjs +6 -5
- package/dist/internal/start-manifest.d.mts +2 -2
- package/dist/internal/start-manifest.d.ts +2 -2
- package/dist/{layers-XQ7VFMWO.mjs → layers-I7VE5Q2Y.mjs} +2 -1
- package/dist/layers-WP5K5F7W.cjs +21 -0
- package/dist/markdown.d.mts +2 -2
- package/dist/markdown.d.ts +2 -2
- package/dist/middleware.d.mts +2 -2
- package/dist/middleware.d.ts +2 -2
- package/dist/{mount.d-vq1HTq5u.d.mts → mount.d-DsP46XCy.d.mts} +1 -1
- package/dist/{mount.d-C2yq0Zzz.d.ts → mount.d-GU-tNxbE.d.ts} +1 -1
- package/dist/{navigation-delegate.d-DS2Sqm7E.d.mts → navigation-delegate.d-CUtNOYLi.d.mts} +1 -1
- package/dist/{navigation-delegate.d-D7xIin3i.d.ts → navigation-delegate.d-DsxNPrLT.d.ts} +1 -1
- package/dist/navigation.d.mts +5 -5
- package/dist/navigation.d.ts +5 -5
- package/dist/{plugin-6CHZBFJD.mjs → plugin-2KWR2X4B.mjs} +1 -1
- package/dist/{plugin-YXPIS3XX.cjs → plugin-MW7IDV76.cjs} +2 -2
- package/dist/plugin.cjs +14 -13
- package/dist/plugin.d.mts +6 -6
- package/dist/plugin.d.ts +6 -6
- package/dist/plugin.mjs +13 -12
- package/dist/{render-plan.d-BCq0nfdw.d.ts → render-plan.d-8K6S0h0L.d.ts} +1 -1
- package/dist/{render-plan.d-X6KqerAM.d.mts → render-plan.d-B7Xp-PPW.d.mts} +1 -1
- package/dist/renderer-client.d.mts +5 -5
- package/dist/renderer-client.d.ts +5 -5
- package/dist/{request.d-CPdq2_kC.d.ts → request.d-CuQxmOqX.d.ts} +1 -1
- package/dist/{request.d-Be9rWboC.d.mts → request.d-nhqciCAz.d.mts} +1 -1
- package/dist/request.d.mts +3 -3
- package/dist/request.d.ts +3 -3
- package/dist/{route-rendering.d-CKB5GhQr.d.ts → route-rendering.d-BSsdDYC1.d.ts} +1 -1
- package/dist/{route-rendering.d-CIPli7Ve.d.mts → route-rendering.d-CeF1FOnl.d.mts} +1 -1
- package/dist/{router.d-CvrbOXzF.d.ts → router.d-C7yGlhDL.d.ts} +1 -1
- package/dist/{router.d-VxTgLGxN.d.mts → router.d-D462OX24.d.mts} +1 -1
- package/dist/routes.d.mts +2 -2
- package/dist/routes.d.ts +2 -2
- package/dist/{rsc-pipeline-TPHK74VE.cjs → rsc-pipeline-7PV6ARDS.cjs} +8 -7
- package/dist/{rsc-pipeline-FPE4OL57.mjs → rsc-pipeline-EZU4W4RL.mjs} +7 -6
- package/dist/{runtime-UBG657UC.cjs → runtime-QOE3NRXF.cjs} +8 -7
- package/dist/{runtime-45BD33OJ.mjs → runtime-RWLFEPS3.mjs} +5 -4
- package/dist/{runtime.d-Cn1jiDNI.d.mts → runtime.d-C-BHQMy5.d.mts} +1 -1
- package/dist/{runtime.d-Ps54JWpo.d.ts → runtime.d-CORDJQMy.d.ts} +1 -1
- package/dist/{server-components-status.d-DnmipSb3.d.mts → server-components-status.d-BJ6huueH.d.mts} +1 -1
- package/dist/{server-components-status.d-Dhtbs5lC.d.ts → server-components-status.d-BbADqqjq.d.ts} +1 -1
- package/dist/server-plugins.cjs +2 -2
- package/dist/server-plugins.d.mts +4 -4
- package/dist/server-plugins.d.ts +4 -4
- package/dist/server-plugins.mjs +1 -1
- package/dist/server.cjs +43 -38
- package/dist/server.d.mts +13 -13
- package/dist/server.d.ts +13 -13
- package/dist/server.mjs +21 -16
- package/dist/session-OU7M4CIF.cjs +24 -0
- package/dist/{session-ASQTJNBK.mjs → session-WPAT6H76.mjs} +3 -2
- package/dist/{spa-router.d-DXm5J9rM.d.mts → spa-router.d-DfjafHyX.d.mts} +2 -2
- package/dist/{spa-router.d-cppVufl2.d.ts → spa-router.d-DyGJLQc_.d.ts} +2 -2
- package/dist/{ssg.d-CI5OFl8H.d.ts → ssg.d-D11lz_wr.d.ts} +2 -2
- package/dist/{ssg.d-Duzy1wQc.d.mts → ssg.d-iiLTyLAO.d.mts} +2 -2
- package/dist/storage.cjs +7 -2
- package/dist/storage.d.mts +260 -38
- package/dist/storage.d.ts +260 -38
- package/dist/storage.mjs +6 -1
- package/dist/testing.d.mts +2 -2
- package/dist/testing.d.ts +2 -2
- package/dist/{types.d-D5cY6XjK.d.mts → types.d-DC97bnjj.d.mts} +20 -3
- package/dist/{types.d-D5cY6XjK.d.ts → types.d-DC97bnjj.d.ts} +20 -3
- package/dist/{utils.d-D3dfy8zh.d.ts → utils.d-D-GQeEfa.d.ts} +1 -1
- package/dist/{utils.d-CNI-I8ZV.d.mts → utils.d-fW-95yEh.d.mts} +1 -1
- package/dist/version.cjs +2 -2
- package/dist/version.mjs +1 -1
- package/dist/vite.cjs +14 -13
- package/dist/vite.d.mts +7 -7
- package/dist/vite.d.ts +7 -7
- package/dist/vite.mjs +13 -12
- package/package.json +2 -2
- package/dist/analyzer-KFJGYJS7.cjs +0 -16
- package/dist/layers-7P4RLKVX.cjs +0 -20
- package/dist/session-ACVUJ5XV.cjs +0 -23
- /package/dist/{chunk-OWO7KDZ3.cjs → chunk-AF3PNVVF.cjs} +0 -0
- /package/dist/{chunk-6MNDFNZW.mjs → chunk-BEXH6BGH.mjs} +0 -0
- /package/dist/{chunk-22T75EML.cjs → chunk-PC5OZ4YR.cjs} +0 -0
- /package/dist/{chunk-LSHUCNIF.mjs → chunk-RL47VZ6J.mjs} +0 -0
|
@@ -40,22 +40,22 @@ import {
|
|
|
40
40
|
resolveFarmImageProviderForRuntime,
|
|
41
41
|
resolveFarmRouteRootStrategy,
|
|
42
42
|
toBakedMarkdownSourcePath
|
|
43
|
-
} from "./chunk-
|
|
43
|
+
} from "./chunk-IHMSLS2O.mjs";
|
|
44
44
|
import {
|
|
45
45
|
generateFarmClientPluginEntryCode,
|
|
46
46
|
hasFarmServerRuntimePlugins,
|
|
47
47
|
loadTailwindVitePlugin
|
|
48
|
-
} from "./chunk-
|
|
48
|
+
} from "./chunk-SL2BSPDJ.mjs";
|
|
49
49
|
import {
|
|
50
50
|
FARM_NODE_RESPONSE_END_PENDING
|
|
51
|
-
} from "./chunk-
|
|
51
|
+
} from "./chunk-RL47VZ6J.mjs";
|
|
52
52
|
import {
|
|
53
53
|
resolveFarmPlatform
|
|
54
54
|
} from "./chunk-SMUW7UST.mjs";
|
|
55
55
|
import {
|
|
56
56
|
generateFarmTypeArtifacts,
|
|
57
57
|
resolveRouteRenderingConfig
|
|
58
|
-
} from "./chunk-
|
|
58
|
+
} from "./chunk-65XXHTVJ.mjs";
|
|
59
59
|
import {
|
|
60
60
|
createFarmRouteRenderPlan,
|
|
61
61
|
farmPathGuardCoversEndpoint,
|
|
@@ -82,13 +82,13 @@ import {
|
|
|
82
82
|
resolveFarmMCPRouteLabel,
|
|
83
83
|
resolveFarmMarkdownRouteLabel,
|
|
84
84
|
setFarmRouteLabel
|
|
85
|
-
} from "./chunk-
|
|
85
|
+
} from "./chunk-BTHNOAOF.mjs";
|
|
86
86
|
import {
|
|
87
87
|
FARM_DEFAULT_MCP_PATH
|
|
88
88
|
} from "./chunk-JA6RML7C.mjs";
|
|
89
89
|
import {
|
|
90
90
|
isFarmPreviewDeploymentEnvironment
|
|
91
|
-
} from "./chunk-
|
|
91
|
+
} from "./chunk-ORWXJDUN.mjs";
|
|
92
92
|
import {
|
|
93
93
|
createFarmServerFnBoundaryModule,
|
|
94
94
|
isFarmServerFnBoundaryId,
|
|
@@ -139,7 +139,7 @@ import {
|
|
|
139
139
|
usePackageScanCacheFile,
|
|
140
140
|
withFarmSourceSnapshotOf,
|
|
141
141
|
wrapFarmIslandContainers
|
|
142
|
-
} from "./chunk-
|
|
142
|
+
} from "./chunk-QODXWUGQ.mjs";
|
|
143
143
|
import {
|
|
144
144
|
generateFarmDocsAdapterClientRuntime,
|
|
145
145
|
getFarmDocsAdapterConfigModule
|
|
@@ -174,7 +174,7 @@ import {
|
|
|
174
174
|
getFarmAppDirectories,
|
|
175
175
|
getFarmLayerAliases,
|
|
176
176
|
getFarmSourceRoots
|
|
177
|
-
} from "./chunk-
|
|
177
|
+
} from "./chunk-4STJ6LGR.mjs";
|
|
178
178
|
import {
|
|
179
179
|
REACT_RENDERER,
|
|
180
180
|
getFarmRendererCapabilities,
|
|
@@ -215,7 +215,7 @@ import {
|
|
|
215
215
|
getIntegrationDocumentNavigationMatchers,
|
|
216
216
|
getIntegrationProviders,
|
|
217
217
|
matchIntegrationRoute
|
|
218
|
-
} from "./chunk-
|
|
218
|
+
} from "./chunk-BEXH6BGH.mjs";
|
|
219
219
|
import {
|
|
220
220
|
resolveFarmRouteContext,
|
|
221
221
|
withFarmRouteContext
|
|
@@ -301,7 +301,7 @@ import {
|
|
|
301
301
|
} from "./chunk-2DA7CLY7.mjs";
|
|
302
302
|
import {
|
|
303
303
|
FARM_VERSION
|
|
304
|
-
} from "./chunk-
|
|
304
|
+
} from "./chunk-SMYDCZBW.mjs";
|
|
305
305
|
import {
|
|
306
306
|
DEFAULT_FARM_API_BASE_PATH
|
|
307
307
|
} from "./chunk-W6QLRQ3V.mjs";
|
|
@@ -1273,7 +1273,7 @@ function loadFarmWorkflowsDevRuntime() {
|
|
|
1273
1273
|
return import("./workflows.mjs");
|
|
1274
1274
|
}
|
|
1275
1275
|
function loadFarmDevtoolsSnapshotRuntime() {
|
|
1276
|
-
return import("./devtools-
|
|
1276
|
+
return import("./devtools-7LHXG2VS.mjs");
|
|
1277
1277
|
}
|
|
1278
1278
|
function loadFarmDevtoolsUIRuntime() {
|
|
1279
1279
|
return import("./devtools-ui-CYBVFLPH.mjs");
|
|
@@ -2516,6 +2516,7 @@ function farmPlugin(options = {}, initialPluginManager, deferredSetup) {
|
|
|
2516
2516
|
root: farmConfig.root,
|
|
2517
2517
|
srcDir: farmConfig.srcDir,
|
|
2518
2518
|
layers: farmConfig.layers,
|
|
2519
|
+
storage: farmConfig.storage,
|
|
2519
2520
|
plugins: farmConfig.plugins,
|
|
2520
2521
|
extraRoutes: getExtraRouteTypes(),
|
|
2521
2522
|
suppressLintOnLink: farmConfig.suppressLintOnLink,
|
|
@@ -7957,7 +7958,7 @@ async function defineConfig(config = {}) {
|
|
|
7957
7958
|
const tailwindVitePlugin = await loadTailwindVitePlugin();
|
|
7958
7959
|
const appRoot = path6.resolve(config.root || process.cwd());
|
|
7959
7960
|
if (config.extends?.length) {
|
|
7960
|
-
const { config: layeredConfig } = await import("./layers-
|
|
7961
|
+
const { config: layeredConfig } = await import("./layers-I7VE5Q2Y.mjs").then(
|
|
7961
7962
|
({ resolveFarmLayers }) => resolveFarmLayers(config, {
|
|
7962
7963
|
root: appRoot,
|
|
7963
7964
|
mode: process.env.NODE_ENV === "production" ? "production" : "development"
|
|
@@ -3,7 +3,7 @@
|
|
|
3
3
|
var _chunkAQLHD6HZcjs = require('./chunk-AQLHD6HZ.cjs');
|
|
4
4
|
|
|
5
5
|
|
|
6
|
-
var
|
|
6
|
+
var _chunkAF3PNVVFcjs = require('./chunk-AF3PNVVF.cjs');
|
|
7
7
|
|
|
8
8
|
|
|
9
9
|
|
|
@@ -284,7 +284,7 @@ function isArrayIndex(key) {
|
|
|
284
284
|
// src/plugin-server-runtime.ts
|
|
285
285
|
function hasFarmServerRuntimePlugins(plugins) {
|
|
286
286
|
return (plugins || []).some((plugin) => {
|
|
287
|
-
if (
|
|
287
|
+
if (_chunkAF3PNVVFcjs.getFarmIntegrationPluginServerRuntime.call(void 0, plugin) === false) return false;
|
|
288
288
|
return Boolean(
|
|
289
289
|
plugin.setup || plugin.init || plugin.ready || plugin.shutdown || plugin.runtime || plugin.router || plugin.render || plugin.beforeRouteMatch || plugin.afterRouteMatch || plugin.beforeRender || plugin.afterRender || plugin.onError || plugin.transformHTML
|
|
290
290
|
);
|
|
@@ -4,7 +4,7 @@ import {
|
|
|
4
4
|
} from "./chunk-JA6RML7C.mjs";
|
|
5
5
|
import {
|
|
6
6
|
normalizeFarmProductionSiteOrigin
|
|
7
|
-
} from "./chunk-
|
|
7
|
+
} from "./chunk-ORWXJDUN.mjs";
|
|
8
8
|
import {
|
|
9
9
|
resolveFarmAppManifestConfig
|
|
10
10
|
} from "./chunk-SQ5O7I3L.mjs";
|
|
@@ -29,7 +29,7 @@ import {
|
|
|
29
29
|
} from "./chunk-YT2ZMLXK.mjs";
|
|
30
30
|
import {
|
|
31
31
|
FARM_VERSION
|
|
32
|
-
} from "./chunk-
|
|
32
|
+
} from "./chunk-SMYDCZBW.mjs";
|
|
33
33
|
import {
|
|
34
34
|
applyFarmBasePath
|
|
35
35
|
} from "./chunk-SF3JB56B.mjs";
|
|
@@ -1,3 +1,7 @@
|
|
|
1
|
+
import {
|
|
2
|
+
isMountSchema
|
|
3
|
+
} from "./chunk-DS2KZ5BT.mjs";
|
|
4
|
+
|
|
1
5
|
// src/storage/managed-sqlite.ts
|
|
2
6
|
function managedSqliteName(mount, managed) {
|
|
3
7
|
const name = managed === true ? mount : managed && typeof managed === "object" && "name" in managed ? managed.name : void 0;
|
|
@@ -75,7 +79,8 @@ async function connect(name, loadClient) {
|
|
|
75
79
|
});
|
|
76
80
|
}
|
|
77
81
|
var databaseAccessor = /* @__PURE__ */ Symbol.for("farmjs.storage.managedDatabase");
|
|
78
|
-
|
|
82
|
+
var mountSchema = /* @__PURE__ */ Symbol.for("farmjs.storage.managedSchema");
|
|
83
|
+
function managedSqliteDriver(name, loadClient, schema) {
|
|
79
84
|
let pending;
|
|
80
85
|
let initialized;
|
|
81
86
|
let closed = false;
|
|
@@ -100,6 +105,7 @@ function managedSqliteDriver(name, loadClient) {
|
|
|
100
105
|
return {
|
|
101
106
|
name: "farm-managed-sqlite",
|
|
102
107
|
[databaseAccessor]: client,
|
|
108
|
+
[mountSchema]: schema,
|
|
103
109
|
async hasItem(key) {
|
|
104
110
|
return (await (await kv()).execute({ sql: "SELECT 1 FROM _farm_kv WHERE key=?", args: [key] })).rows.length > 0;
|
|
105
111
|
},
|
|
@@ -287,6 +293,7 @@ function extractDriverOptions(config) {
|
|
|
287
293
|
client: _client,
|
|
288
294
|
driver: _driver,
|
|
289
295
|
mounts: _mounts,
|
|
296
|
+
managed: _managed,
|
|
290
297
|
options,
|
|
291
298
|
tableName: _tableName,
|
|
292
299
|
...inlineOptions
|
|
@@ -332,11 +339,13 @@ async function resolveDriver(config, mount) {
|
|
|
332
339
|
if (config && isStorageClient(config)) {
|
|
333
340
|
return config.resolveDriver();
|
|
334
341
|
}
|
|
335
|
-
|
|
342
|
+
const hosted = resolveManagedStorageMount(config);
|
|
343
|
+
if (hosted) {
|
|
336
344
|
if (!mount) throw new TypeError("Register managed SQLite in storage.mounts.");
|
|
337
345
|
return managedSqliteDriver(
|
|
338
|
-
managedSqliteName(mount,
|
|
339
|
-
() => loadModule("@libsql/client/http")
|
|
346
|
+
managedSqliteName(mount, hosted.managed),
|
|
347
|
+
() => loadModule("@libsql/client/http"),
|
|
348
|
+
hosted.schema
|
|
340
349
|
);
|
|
341
350
|
}
|
|
342
351
|
const driverInput = config?.driver ?? "memory";
|
|
@@ -421,12 +430,17 @@ function createStorageClientFromResolver(resolveDriver2, modules = []) {
|
|
|
421
430
|
function defineStorageClient(resolveDriver2) {
|
|
422
431
|
return createStorageClientFromResolver(resolveDriver2);
|
|
423
432
|
}
|
|
424
|
-
function
|
|
433
|
+
function configuredStorageClient(config) {
|
|
434
|
+
const hosted = resolveManagedStorageMount(config);
|
|
435
|
+
if (hosted) return hosted;
|
|
425
436
|
return createStorageClientFromResolver(
|
|
426
437
|
() => resolveDriver(config),
|
|
427
438
|
_collectFarmStorageModules(config)
|
|
428
439
|
);
|
|
429
440
|
}
|
|
441
|
+
function createStorageClient(config) {
|
|
442
|
+
return configuredStorageClient(config);
|
|
443
|
+
}
|
|
430
444
|
function driverStorage(driver) {
|
|
431
445
|
return defineStorageClient(() => typeof driver === "function" ? driver() : driver);
|
|
432
446
|
}
|
|
@@ -440,105 +454,81 @@ function databaseStorage(database, options = {}) {
|
|
|
440
454
|
return driver;
|
|
441
455
|
}, ["unstorage/drivers/db0"]);
|
|
442
456
|
}
|
|
443
|
-
function
|
|
444
|
-
|
|
445
|
-
|
|
446
|
-
function localStorage(options = {}) {
|
|
447
|
-
return createStorageClient({
|
|
448
|
-
driver: "local",
|
|
449
|
-
...options
|
|
450
|
-
});
|
|
451
|
-
}
|
|
452
|
-
function sqliteStorage(options) {
|
|
453
|
-
if ("managed" in options) {
|
|
454
|
-
if (Object.keys(options).some((key) => key !== "managed"))
|
|
455
|
-
throw new TypeError("Supply only managed when Farm provisions SQLite.");
|
|
456
|
-
if (options.managed !== true) managedSqliteName("", options.managed);
|
|
457
|
-
return { driver: "farm-managed-sqlite", managed: options.managed };
|
|
457
|
+
function assertMountSchema(schema) {
|
|
458
|
+
if (schema !== void 0 && !isMountSchema(schema)) {
|
|
459
|
+
throw new TypeError("Pass a schema created with defineSchema() from @farming-labs/orm.");
|
|
458
460
|
}
|
|
459
|
-
return createStorageClient({
|
|
460
|
-
driver: "sqlite",
|
|
461
|
-
...options
|
|
462
|
-
});
|
|
463
|
-
}
|
|
464
|
-
function mysqlStorage(options) {
|
|
465
|
-
return createStorageClient({
|
|
466
|
-
driver: "mysql",
|
|
467
|
-
...options
|
|
468
|
-
});
|
|
469
|
-
}
|
|
470
|
-
function mysql2Storage(options) {
|
|
471
|
-
return mysqlStorage(options);
|
|
472
|
-
}
|
|
473
|
-
function postgresStorage(options) {
|
|
474
|
-
return createStorageClient({
|
|
475
|
-
driver: "postgres",
|
|
476
|
-
...options
|
|
477
|
-
});
|
|
478
|
-
}
|
|
479
|
-
function pgStorage(options) {
|
|
480
|
-
return postgresStorage(options);
|
|
481
|
-
}
|
|
482
|
-
function pgliteStorage(options) {
|
|
483
|
-
return createStorageClient({
|
|
484
|
-
driver: "pglite",
|
|
485
|
-
...options
|
|
486
|
-
});
|
|
487
|
-
}
|
|
488
|
-
function planetscaleStorage(options) {
|
|
489
|
-
return createStorageClient({
|
|
490
|
-
driver: "planetscale",
|
|
491
|
-
...options
|
|
492
|
-
});
|
|
493
|
-
}
|
|
494
|
-
function libsqlStorage(options) {
|
|
495
|
-
return createStorageClient({
|
|
496
|
-
driver: "libsql",
|
|
497
|
-
...options
|
|
498
|
-
});
|
|
499
|
-
}
|
|
500
|
-
function redisStorage(options) {
|
|
501
|
-
return createStorageClient({
|
|
502
|
-
driver: "redis",
|
|
503
|
-
...options
|
|
504
|
-
});
|
|
505
|
-
}
|
|
506
|
-
function s3Storage(options) {
|
|
507
|
-
return createStorageClient({
|
|
508
|
-
driver: "s3",
|
|
509
|
-
...options
|
|
510
|
-
});
|
|
511
461
|
}
|
|
512
|
-
function
|
|
513
|
-
|
|
514
|
-
|
|
515
|
-
|
|
516
|
-
|
|
517
|
-
|
|
518
|
-
|
|
519
|
-
|
|
520
|
-
|
|
521
|
-
|
|
522
|
-
|
|
523
|
-
|
|
524
|
-
|
|
525
|
-
|
|
526
|
-
|
|
527
|
-
...options
|
|
528
|
-
});
|
|
462
|
+
function farmStorage(options = {}) {
|
|
463
|
+
if (!options || typeof options !== "object" || Array.isArray(options) || Object.keys(options).some((key) => key !== "namespace" && key !== "managed" && key !== "schema"))
|
|
464
|
+
throw new TypeError(
|
|
465
|
+
"Use farmStorage() or pass only the `managed`, `namespace`, and `schema` options."
|
|
466
|
+
);
|
|
467
|
+
if (options.managed !== void 0 && options.managed !== true)
|
|
468
|
+
throw new TypeError("Set `managed` to true or omit it when using farmStorage().");
|
|
469
|
+
const managed = options.namespace === void 0 ? true : { name: options.namespace };
|
|
470
|
+
if (managed !== true) managedSqliteName("", managed);
|
|
471
|
+
assertMountSchema(options.schema);
|
|
472
|
+
return {
|
|
473
|
+
driver: "farm-managed-sqlite",
|
|
474
|
+
managed,
|
|
475
|
+
...options.schema && { schema: options.schema }
|
|
476
|
+
};
|
|
529
477
|
}
|
|
530
|
-
function
|
|
531
|
-
|
|
532
|
-
|
|
533
|
-
|
|
534
|
-
|
|
478
|
+
function resolveManagedStorageMount(config) {
|
|
479
|
+
if (!config || typeof config !== "object") return;
|
|
480
|
+
if ("schema" in config && isMountSchema(config.schema) && (!("managed" in config) || !config.managed)) {
|
|
481
|
+
throw new TypeError(
|
|
482
|
+
"Set `managed: true` or use farmStorage({ schema }) to bind an ORM schema."
|
|
483
|
+
);
|
|
484
|
+
}
|
|
485
|
+
if (!("managed" in config)) {
|
|
486
|
+
if ("driver" in config && config.driver === "farm-managed-sqlite")
|
|
487
|
+
throw new TypeError("Set `managed` to true on a hosted storage mount.");
|
|
488
|
+
return;
|
|
489
|
+
}
|
|
490
|
+
const { driver, managed, ...options } = config;
|
|
491
|
+
if ((managed === false || managed === void 0) && driver !== "farm-managed-sqlite") return;
|
|
492
|
+
if (typeof driver !== "string" || !(driver === "farm-managed-sqlite" || driver === "local" || driver === "vercel-kv" || Object.prototype.hasOwnProperty.call(DATABASE_CONNECTORS, driver) || driver !== "db0" && Object.prototype.hasOwnProperty.call(builtinDrivers, driver)))
|
|
493
|
+
throw new TypeError("Select a built-in storage driver to use `managed: true`.");
|
|
494
|
+
if (Object.keys(options).some((key) => key !== "namespace" && key !== "schema"))
|
|
495
|
+
throw new TypeError(
|
|
496
|
+
"Remove provider connection settings and driver options when using `managed: true`."
|
|
497
|
+
);
|
|
498
|
+
assertMountSchema(options.schema);
|
|
499
|
+
if (managed === true)
|
|
500
|
+
return farmStorage({
|
|
501
|
+
namespace: options.namespace,
|
|
502
|
+
schema: options.schema
|
|
503
|
+
});
|
|
504
|
+
if ((driver === "sqlite" || driver === "farm-managed-sqlite") && !("namespace" in options)) {
|
|
505
|
+
return farmStorage({ namespace: managedSqliteName("", managed), schema: options.schema });
|
|
506
|
+
}
|
|
507
|
+
throw new TypeError("Set `managed` to true and use `namespace` to select a hosted resource.");
|
|
535
508
|
}
|
|
536
|
-
function
|
|
537
|
-
|
|
538
|
-
driver
|
|
539
|
-
|
|
540
|
-
|
|
509
|
+
function providerStorage(driver) {
|
|
510
|
+
function storage(options) {
|
|
511
|
+
return configuredStorageClient({ ...options, driver });
|
|
512
|
+
}
|
|
513
|
+
return storage;
|
|
541
514
|
}
|
|
515
|
+
var memoryStorage = providerStorage("memory");
|
|
516
|
+
var localStorage = providerStorage("local");
|
|
517
|
+
var sqliteStorage = providerStorage("sqlite");
|
|
518
|
+
var mysqlStorage = providerStorage("mysql");
|
|
519
|
+
var mysql2Storage = mysqlStorage;
|
|
520
|
+
var postgresStorage = providerStorage("postgres");
|
|
521
|
+
var pgStorage = postgresStorage;
|
|
522
|
+
var pgliteStorage = providerStorage("pglite");
|
|
523
|
+
var planetscaleStorage = providerStorage("planetscale");
|
|
524
|
+
var libsqlStorage = providerStorage("libsql");
|
|
525
|
+
var redisStorage = providerStorage("redis");
|
|
526
|
+
var s3Storage = providerStorage("s3");
|
|
527
|
+
var mongodbStorage = providerStorage("mongodb");
|
|
528
|
+
var upstashStorage = providerStorage("upstash");
|
|
529
|
+
var netlifyBlobsStorage = providerStorage("netlify-blobs");
|
|
530
|
+
var vercelKVStorage = providerStorage("vercel-kv");
|
|
531
|
+
var vercelBlobStorage = providerStorage("vercel-blob");
|
|
542
532
|
function collectDriverModules(config, modules) {
|
|
543
533
|
if (!config || typeof config !== "object") return;
|
|
544
534
|
if (isStorageClient(config)) {
|
|
@@ -550,7 +540,7 @@ function collectDriverModules(config, modules) {
|
|
|
550
540
|
const source = config;
|
|
551
541
|
const driver = source.driver;
|
|
552
542
|
if (typeof driver === "string") {
|
|
553
|
-
if (
|
|
543
|
+
if (resolveManagedStorageMount(config)) {
|
|
554
544
|
modules.add("@libsql/client/http");
|
|
555
545
|
} else if (isDatabaseDriverName(driver)) {
|
|
556
546
|
modules.add("db0");
|
|
@@ -629,7 +619,9 @@ async function getDatabase(name, options) {
|
|
|
629
619
|
"Configure a managed SQLite mount named " + JSON.stringify(name) + " before calling getDatabase()."
|
|
630
620
|
);
|
|
631
621
|
const client = await driver[databaseAccessor]();
|
|
632
|
-
|
|
622
|
+
if (options && "raw" in options) return client;
|
|
623
|
+
const schema = options?.schema ?? driver[mountSchema];
|
|
624
|
+
return schema ? managedOrm(client, schema) : client;
|
|
633
625
|
}
|
|
634
626
|
function getStorage(namespace) {
|
|
635
627
|
globalStorage = getActiveGlobalStorage();
|
|
@@ -702,6 +694,8 @@ export {
|
|
|
702
694
|
createStorageClient,
|
|
703
695
|
driverStorage,
|
|
704
696
|
databaseStorage,
|
|
697
|
+
farmStorage,
|
|
698
|
+
resolveManagedStorageMount,
|
|
705
699
|
memoryStorage,
|
|
706
700
|
localStorage,
|
|
707
701
|
sqliteStorage,
|
|
@@ -0,0 +1,16 @@
|
|
|
1
|
+
// src/storage/mount-schema.ts
|
|
2
|
+
function isMountSchema(value) {
|
|
3
|
+
return !!value && typeof value === "object" && "_tag" in value && value._tag === "schema" && "models" in value && !!value.models && typeof value.models === "object" && !Array.isArray(value.models);
|
|
4
|
+
}
|
|
5
|
+
function isManagedMount(value) {
|
|
6
|
+
return !!value && typeof value === "object" && "managed" in value && !!value.managed;
|
|
7
|
+
}
|
|
8
|
+
function hasManagedMountSchema(value) {
|
|
9
|
+
return isManagedMount(value) && "schema" in value && isMountSchema(value.schema);
|
|
10
|
+
}
|
|
11
|
+
|
|
12
|
+
export {
|
|
13
|
+
isMountSchema,
|
|
14
|
+
isManagedMount,
|
|
15
|
+
hasManagedMountSchema
|
|
16
|
+
};
|
|
@@ -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 _chunkLTDMJD2Fcjs = require('./chunk-LTDMJD2F.cjs');
|
|
4
4
|
|
|
5
5
|
|
|
6
6
|
|
|
@@ -329,7 +329,7 @@ function requestEvent(metadata, method, status, durationMs) {
|
|
|
329
329
|
id: uuid(),
|
|
330
330
|
requestId: metadata.id,
|
|
331
331
|
timestamp: (/* @__PURE__ */ new Date()).toISOString(),
|
|
332
|
-
route: routeTemplate(
|
|
332
|
+
route: routeTemplate(_chunkLTDMJD2Fcjs.getFarmRouteLabel.call(void 0, metadata.route)),
|
|
333
333
|
...metadata.path ? { path: metadata.path } : {},
|
|
334
334
|
agent: metadata.agent,
|
|
335
335
|
kind: "request",
|
|
@@ -343,7 +343,7 @@ function toolEvent(metadata, event) {
|
|
|
343
343
|
id: uuid(),
|
|
344
344
|
requestId: metadata.id,
|
|
345
345
|
timestamp: (/* @__PURE__ */ new Date()).toISOString(),
|
|
346
|
-
route: routeTemplate(
|
|
346
|
+
route: routeTemplate(_chunkLTDMJD2Fcjs.getFarmRouteLabel.call(void 0, metadata.route)),
|
|
347
347
|
...metadata.path ? { path: metadata.path } : {},
|
|
348
348
|
agent: metadata.agent,
|
|
349
349
|
kind: "mcp.tool",
|
|
@@ -18,7 +18,7 @@ var _chunk6D3CJFNUcjs = require('./chunk-6D3CJFNU.cjs');
|
|
|
18
18
|
var _chunkNDOE76QCcjs = require('./chunk-NDOE76QC.cjs');
|
|
19
19
|
|
|
20
20
|
|
|
21
|
-
var
|
|
21
|
+
var _chunkYROK6CJCcjs = require('./chunk-YROK6CJC.cjs');
|
|
22
22
|
|
|
23
23
|
|
|
24
24
|
|
|
@@ -593,7 +593,7 @@ async function resolveAPIContext(options) {
|
|
|
593
593
|
config: options.config,
|
|
594
594
|
configPath: options.configPath
|
|
595
595
|
}));
|
|
596
|
-
const docs = isResolvedDocsConfig(docsInput) ? docsInput : await
|
|
596
|
+
const docs = isResolvedDocsConfig(docsInput) ? docsInput : await _chunkYROK6CJCcjs.resolveDocsConfig.call(void 0, docsInput, { root, srcDir });
|
|
597
597
|
const guardedPaths = new Set(_nullishCoalesce(_optionalChain([runtimeConfig, 'optionalAccess', _28 => _28.guardedPaths]), () => ( [])));
|
|
598
598
|
return {
|
|
599
599
|
root,
|
|
@@ -4,6 +4,7 @@ import {
|
|
|
4
4
|
|
|
5
5
|
// src/plugins/compression.ts
|
|
6
6
|
import { pipeline, Readable } from "stream";
|
|
7
|
+
import { promisify } from "util";
|
|
7
8
|
import { brotliCompress, constants, createBrotliCompress, createGzip, gzip } from "zlib";
|
|
8
9
|
var Q_VALUE = /^(?:0(?:\.\d{0,3})?|1(?:\.0{0,3})?)$/;
|
|
9
10
|
function parseEncodingQuality(header) {
|
|
@@ -28,10 +29,10 @@ function selectEncoding(header) {
|
|
|
28
29
|
const qualities = parseEncodingQuality(header);
|
|
29
30
|
const wildcard = qualities.get("*") ?? 0;
|
|
30
31
|
const quality = (encoding) => qualities.get(encoding) ?? wildcard;
|
|
31
|
-
const
|
|
32
|
+
const brotli2 = quality("br");
|
|
32
33
|
const gzip2 = quality("gzip");
|
|
33
|
-
if (
|
|
34
|
-
return
|
|
34
|
+
if (brotli2 <= 0 && gzip2 <= 0) return void 0;
|
|
35
|
+
return brotli2 >= gzip2 ? "br" : "gzip";
|
|
35
36
|
}
|
|
36
37
|
var COMPRESSIBLE_MEDIA_TYPES = /* @__PURE__ */ new Set([
|
|
37
38
|
"application/javascript",
|
|
@@ -86,32 +87,40 @@ function compressedHeaders(response, encoding) {
|
|
|
86
87
|
}
|
|
87
88
|
return headers;
|
|
88
89
|
}
|
|
89
|
-
|
|
90
|
+
var compressedShells = /* @__PURE__ */ new WeakMap();
|
|
91
|
+
var brotli = promisify(brotliCompress);
|
|
92
|
+
var gzipBuffer = promisify(gzip);
|
|
93
|
+
function encodeText(text, encoding) {
|
|
94
|
+
const input = Buffer.from(text);
|
|
95
|
+
return encoding === "br" ? brotli(input, { params: { [constants.BROTLI_PARAM_QUALITY]: BROTLI_QUALITY } }) : gzipBuffer(input);
|
|
96
|
+
}
|
|
97
|
+
function getEncodedShell(shell, encoding) {
|
|
98
|
+
let entry = compressedShells.get(shell);
|
|
99
|
+
if (entry?.html !== shell.html) {
|
|
100
|
+
entry = { html: shell.html };
|
|
101
|
+
compressedShells.set(shell, entry);
|
|
102
|
+
}
|
|
103
|
+
const variants = entry;
|
|
104
|
+
return variants[encoding] ?? (variants[encoding] = encodeText(shell.html, encoding).catch((error) => {
|
|
105
|
+
delete variants[encoding];
|
|
106
|
+
throw error;
|
|
107
|
+
}));
|
|
108
|
+
}
|
|
109
|
+
function compressBufferedResponse(response, text, encoding, lazyBody, shell) {
|
|
90
110
|
const headers = compressedHeaders(response, encoding);
|
|
91
111
|
if (!lazyBody) response.body?.cancel().catch(() => {
|
|
92
112
|
});
|
|
93
|
-
const
|
|
113
|
+
const reuse = shell && shell.html === text;
|
|
114
|
+
const bytes = reuse ? getEncodedShell(shell, encoding) : encodeText(text, encoding);
|
|
94
115
|
let cancelled = false;
|
|
95
116
|
const body = new ReadableStream({
|
|
96
|
-
start(controller) {
|
|
97
|
-
const
|
|
98
|
-
|
|
99
|
-
|
|
100
|
-
|
|
101
|
-
|
|
102
|
-
|
|
103
|
-
controller.enqueue(new Uint8Array(output.buffer, output.byteOffset, output.byteLength));
|
|
104
|
-
controller.close();
|
|
105
|
-
};
|
|
106
|
-
if (encoding === "br") {
|
|
107
|
-
brotliCompress(
|
|
108
|
-
input,
|
|
109
|
-
{ params: { [constants.BROTLI_PARAM_QUALITY]: BROTLI_QUALITY } },
|
|
110
|
-
done
|
|
111
|
-
);
|
|
112
|
-
} else {
|
|
113
|
-
gzip(input, done);
|
|
114
|
-
}
|
|
117
|
+
async start(controller) {
|
|
118
|
+
const output = await bytes;
|
|
119
|
+
if (cancelled) return;
|
|
120
|
+
controller.enqueue(
|
|
121
|
+
reuse ? new Uint8Array(output) : new Uint8Array(output.buffer, output.byteOffset, output.byteLength)
|
|
122
|
+
);
|
|
123
|
+
controller.close();
|
|
115
124
|
},
|
|
116
125
|
cancel() {
|
|
117
126
|
cancelled = true;
|
|
@@ -141,12 +150,12 @@ function compressResponse(response, encoding) {
|
|
|
141
150
|
function varyIdentityResponse(response) {
|
|
142
151
|
return _withFarmResponseHeaders(response, (headers) => appendVary(headers, "Accept-Encoding"));
|
|
143
152
|
}
|
|
144
|
-
function compressFarmResponse(request, response, bufferedText, lazyBody = false) {
|
|
153
|
+
function compressFarmResponse(request, response, bufferedText, lazyBody = false, shell) {
|
|
145
154
|
if (!isCompressionEligible(request, response, bufferedText)) return response;
|
|
146
155
|
if (request.method === "HEAD") return varyIdentityResponse(response);
|
|
147
156
|
const encoding = selectEncoding(request.headers.get("accept-encoding") ?? "");
|
|
148
157
|
if (!encoding) return varyIdentityResponse(response);
|
|
149
|
-
return bufferedText === void 0 ? compressResponse(response, encoding) : compressBufferedResponse(response, bufferedText, encoding, lazyBody);
|
|
158
|
+
return bufferedText === void 0 ? compressResponse(response, encoding) : compressBufferedResponse(response, bufferedText, encoding, lazyBody, shell);
|
|
150
159
|
}
|
|
151
160
|
function createCompressionPlugin({
|
|
152
161
|
beforeRequest: overrideBeforeRequest,
|
|
@@ -4,13 +4,13 @@ import {
|
|
|
4
4
|
formatFarmRscBlockingMessage,
|
|
5
5
|
inspectFarmServerComponents,
|
|
6
6
|
resolveFarmRscCheckConfig
|
|
7
|
-
} from "./chunk-
|
|
7
|
+
} from "./chunk-OCKQ3YOH.mjs";
|
|
8
8
|
import {
|
|
9
9
|
createFarmDevLoopbackPlugin
|
|
10
10
|
} from "./chunk-IG2JE6WJ.mjs";
|
|
11
11
|
import {
|
|
12
12
|
resolveDeployOutputPath
|
|
13
|
-
} from "./chunk-
|
|
13
|
+
} from "./chunk-ZBE5EHVJ.mjs";
|
|
14
14
|
import {
|
|
15
15
|
farmDesktopDevGuardPlugin,
|
|
16
16
|
loadFarmReactPlugin
|
|
@@ -19,7 +19,7 @@ import {
|
|
|
19
19
|
generateFarmClientPluginEntryCode,
|
|
20
20
|
hasFarmServerRuntimePlugins,
|
|
21
21
|
loadTailwindVitePlugin
|
|
22
|
-
} from "./chunk-
|
|
22
|
+
} from "./chunk-SL2BSPDJ.mjs";
|
|
23
23
|
import {
|
|
24
24
|
resolveFarmPlatform
|
|
25
25
|
} from "./chunk-SMUW7UST.mjs";
|
|
@@ -183,7 +183,7 @@ async function resolveFarmRscServerPlugins(userConfig, config, root) {
|
|
|
183
183
|
const candidate = plugin;
|
|
184
184
|
return !!candidate && names.has(candidate.name) && hasFarmServerRuntimePlugins([candidate]);
|
|
185
185
|
};
|
|
186
|
-
const { findFarmConfigFile, loadFarmConfigFile, resolveFarmLayers } = await import("./layers-
|
|
186
|
+
const { findFarmConfigFile, loadFarmConfigFile, resolveFarmLayers } = await import("./layers-I7VE5Q2Y.mjs");
|
|
187
187
|
const files = [];
|
|
188
188
|
if (userConfig.extends) {
|
|
189
189
|
const { layers } = await resolveFarmLayers(userConfig, { root, mode: "production" });
|
|
@@ -210,7 +210,7 @@ async function resolveFarmRscServerPlugins(userConfig, config, root) {
|
|
|
210
210
|
}
|
|
211
211
|
async function configureFarmRscPlugins(config, command) {
|
|
212
212
|
if (config.plugins.length === 0) return config;
|
|
213
|
-
const { PluginManager } = await import("./plugin-
|
|
213
|
+
const { PluginManager } = await import("./plugin-2KWR2X4B.mjs");
|
|
214
214
|
const manager = new PluginManager({
|
|
215
215
|
config,
|
|
216
216
|
isDev: command === "serve",
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import {
|
|
2
2
|
resolveIntegrationOrmRuntimeClient
|
|
3
|
-
} from "./chunk-
|
|
3
|
+
} from "./chunk-WXMR3OHY.mjs";
|
|
4
4
|
import {
|
|
5
5
|
collectSchemaModels,
|
|
6
6
|
columnTypeFamily,
|
|
@@ -25,7 +25,7 @@ import {
|
|
|
25
25
|
} from "./chunk-UTUS6JUH.mjs";
|
|
26
26
|
import {
|
|
27
27
|
getIntegrationSchemas
|
|
28
|
-
} from "./chunk-
|
|
28
|
+
} from "./chunk-BEXH6BGH.mjs";
|
|
29
29
|
import {
|
|
30
30
|
resolveSchemaModels
|
|
31
31
|
} from "./chunk-F3N52U7S.mjs";
|
|
@@ -3,7 +3,7 @@
|
|
|
3
3
|
var _chunkSHIWRBFIcjs = require('./chunk-SHIWRBFI.cjs');
|
|
4
4
|
|
|
5
5
|
|
|
6
|
-
var
|
|
6
|
+
var _chunkRFXEQYPHcjs = require('./chunk-RFXEQYPH.cjs');
|
|
7
7
|
|
|
8
8
|
// src/mobile/session.ts
|
|
9
9
|
var FARM_MOBILE_SESSION_PLUGIN = "farm:mobile-session";
|
|
@@ -176,7 +176,7 @@ function createFarmMobileSessionPlugin(options) {
|
|
|
176
176
|
const refreshTtl = (_nullishCoalesce(options.refreshTokenTtl, () => ( 30 * 24 * 60 * 60))) * 1e3;
|
|
177
177
|
const nonceTtl = (_nullishCoalesce(options.nonceTtl, () => ( 60))) * 1e3;
|
|
178
178
|
const now = _nullishCoalesce(options.now, () => ( Date.now));
|
|
179
|
-
const store = () => _nullishCoalesce(_optionalChain([options, 'access', _6 => _6.storage, 'optionalCall', _7 => _7()]), () => (
|
|
179
|
+
const store = () => _nullishCoalesce(_optionalChain([options, 'access', _6 => _6.storage, 'optionalCall', _7 => _7()]), () => ( _chunkRFXEQYPHcjs.getStorage.call(void 0, STORAGE_NAMESPACE)));
|
|
180
180
|
let warnedNoReader = false;
|
|
181
181
|
function sessionReader() {
|
|
182
182
|
for (const integration of Object.values(_nullishCoalesce(options.integrations(), () => ( {})))) {
|
|
@@ -15,14 +15,14 @@ var _chunkWBTHHTBOcjs = require('./chunk-WBTHHTBO.cjs');
|
|
|
15
15
|
var _chunkCCAUIBIScjs = require('./chunk-CCAUIBIS.cjs');
|
|
16
16
|
|
|
17
17
|
|
|
18
|
-
var
|
|
18
|
+
var _chunkUYACD4SHcjs = require('./chunk-UYACD4SH.cjs');
|
|
19
19
|
|
|
20
20
|
// src/mobile/analyzer.ts
|
|
21
21
|
var _crypto = require('crypto');
|
|
22
22
|
var _fs = require('fs');
|
|
23
23
|
var _promises = require('fs/promises');
|
|
24
24
|
var _path = require('path'); var path = _interopRequireWildcard(_path);
|
|
25
|
-
var ANALYZER_VERSION = `7:${
|
|
25
|
+
var ANALYZER_VERSION = `7:${_chunkUYACD4SHcjs.FARM_VERSION}`;
|
|
26
26
|
var INTRINSIC_KINDS = {};
|
|
27
27
|
for (const tag of "div section main article header footer nav aside figure hr li".split(" ")) {
|
|
28
28
|
INTRINSIC_KINDS[tag] = "View";
|