@farm.js/core 0.1.0-beta.96 → 0.1.0-beta.97
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/after.cjs +1 -1
- package/dist/after.mjs +1 -1
- package/dist/agent-runtime.d.mts +3 -2
- package/dist/agent-runtime.d.ts +3 -2
- package/dist/api/route-manager.cjs +43 -4
- package/dist/api/route-manager.d.mts +4 -3
- package/dist/api/route-manager.d.ts +4 -3
- package/dist/api/route-manager.mjs +6 -6
- package/dist/api/runtime.cjs +43 -4
- package/dist/api/runtime.d.mts +1 -1
- package/dist/api/runtime.d.ts +1 -1
- package/dist/api/runtime.mjs +4 -4
- package/dist/api.cjs +239 -70
- package/dist/api.d.mts +7 -6
- package/dist/api.d.ts +7 -6
- package/dist/api.mjs +17 -11
- package/dist/{app-CIIEvA4r.d.ts → app-CIOx3LvY.d.ts} +4 -4
- package/dist/{app-O4AEC1OH.d.mts → app-DBd6437H.d.mts} +4 -4
- package/dist/app-markdown.d.mts +4 -3
- package/dist/app-markdown.d.ts +4 -3
- package/dist/cache.cjs +42 -4
- package/dist/cache.d.mts +68 -1
- package/dist/cache.d.ts +68 -1
- package/dist/cache.mjs +3 -3
- package/dist/{chunk-AXVJCMVF.mjs → chunk-2HDOV47R.mjs} +3 -3
- package/dist/chunk-2HDOV47R.mjs.map +1 -0
- package/dist/{chunk-RBRLLZL5.mjs → chunk-34IAPZBG.mjs} +16 -3
- package/dist/chunk-34IAPZBG.mjs.map +1 -0
- package/dist/{chunk-VV24CC42.mjs → chunk-35NPLKQJ.mjs} +2 -2
- package/dist/{chunk-MM46HTX6.mjs → chunk-3TWQERDE.mjs} +4 -3
- package/dist/chunk-3TWQERDE.mjs.map +1 -0
- package/dist/{chunk-RWYRFCLG.mjs → chunk-4X57GXQA.mjs} +2 -2
- package/dist/{chunk-3I55IGXU.mjs → chunk-52BR7LTX.mjs} +14 -15
- package/dist/chunk-52BR7LTX.mjs.map +1 -0
- package/dist/{chunk-RAGSHKDC.mjs → chunk-6EJHNHH4.mjs} +38 -3
- package/dist/chunk-6EJHNHH4.mjs.map +1 -0
- package/dist/{chunk-ZFNK77WN.mjs → chunk-6JNGOC37.mjs} +2 -2
- package/dist/{after.cjs.map → chunk-6JNGOC37.mjs.map} +1 -1
- package/dist/{chunk-MOW47IF5.mjs → chunk-6UYVU46O.mjs} +2 -2
- package/dist/{chunk-7MABZJIM.mjs → chunk-7PYVLJ4J.mjs} +1 -1
- package/dist/chunk-7PYVLJ4J.mjs.map +1 -0
- package/dist/{chunk-54XSGLKT.mjs → chunk-D7F7YZ7L.mjs} +93 -67
- package/dist/chunk-D7F7YZ7L.mjs.map +1 -0
- package/dist/{chunk-SCFX4UTD.mjs → chunk-EHTUKVSW.mjs} +1 -1
- package/dist/chunk-EHTUKVSW.mjs.map +1 -0
- package/dist/{chunk-LZTGDH3H.mjs → chunk-EPDIF432.mjs} +424 -10
- package/dist/chunk-EPDIF432.mjs.map +1 -0
- package/dist/{chunk-GZHKWHCH.mjs → chunk-FP5Q67FO.mjs} +167 -96
- package/dist/chunk-FP5Q67FO.mjs.map +1 -0
- package/dist/{chunk-HHZAOTQD.mjs → chunk-GJ7W6LNK.mjs} +7 -6
- package/dist/chunk-GJ7W6LNK.mjs.map +1 -0
- package/dist/{chunk-RLGUZ3HS.mjs → chunk-I3OOUWO5.mjs} +3 -3
- package/dist/{chunk-LKKMI7JG.mjs → chunk-IZBX2TEU.mjs} +153 -68
- package/dist/chunk-IZBX2TEU.mjs.map +1 -0
- package/dist/{chunk-74QPONAN.mjs → chunk-J3MPQ4MQ.mjs} +2 -2
- package/dist/{chunk-74QPONAN.mjs.map → chunk-J3MPQ4MQ.mjs.map} +1 -1
- package/dist/{chunk-ODJGAWDH.mjs → chunk-JV7JUD7Q.mjs} +4 -4
- package/dist/{chunk-Q3OX763A.mjs → chunk-LXDASSTE.mjs} +2 -2
- package/dist/{chunk-ZRBCBOEX.mjs → chunk-N2FY2QZ7.mjs} +28 -3
- package/dist/chunk-N2FY2QZ7.mjs.map +1 -0
- package/dist/{chunk-MRVJCLYQ.mjs → chunk-PSQ7N4XP.mjs} +4 -2
- package/dist/chunk-PSQ7N4XP.mjs.map +1 -0
- package/dist/{chunk-HVG3HLQZ.mjs → chunk-Q7WGOOAI.mjs} +3 -3
- package/dist/{chunk-WTYAPO5I.mjs → chunk-RCNWMEBT.mjs} +3 -2
- package/dist/{chunk-WTYAPO5I.mjs.map → chunk-RCNWMEBT.mjs.map} +1 -1
- package/dist/{chunk-3INDBMUU.mjs → chunk-TGDIACZT.mjs} +2 -2
- package/dist/{chunk-WB75GIX2.mjs → chunk-TQTB33JS.mjs} +14 -3
- package/dist/chunk-TQTB33JS.mjs.map +1 -0
- package/dist/{chunk-WMAYETRD.mjs → chunk-TT3E2JOF.mjs} +3 -3
- package/dist/{chunk-FVAM43KI.mjs → chunk-UMUWR5XA.mjs} +2 -2
- package/dist/{chunk-VOUJW4FL.mjs → chunk-WD2EBM3I.mjs} +70 -15
- package/dist/chunk-WD2EBM3I.mjs.map +1 -0
- package/dist/{chunk-ZPG6SNHH.mjs → chunk-WMJGA32P.mjs} +47 -5
- package/dist/chunk-WMJGA32P.mjs.map +1 -0
- package/dist/{chunk-TKQCJMY7.mjs → chunk-X4SFHKFH.mjs} +7 -4
- package/dist/{chunk-TKQCJMY7.mjs.map → chunk-X4SFHKFH.mjs.map} +1 -1
- package/dist/{chunk-Q7GPJZCO.mjs → chunk-YIBV77KZ.mjs} +26 -7
- package/dist/chunk-YIBV77KZ.mjs.map +1 -0
- package/dist/client/lifecycle.mjs +2 -2
- package/dist/{client-mcMC334J.d.mts → client-DWoLZ3QU.d.mts} +52 -5
- package/dist/{client-d5ONQ-Pd.d.ts → client-DuQuQC1h.d.ts} +52 -5
- package/dist/client-cache-BMxuFqwH.d.ts +18 -0
- package/dist/client-cache-CCK-fCe0.d.mts +18 -0
- package/dist/{client-plugins-BvClItiL.d.mts → client-plugins-B6-07YmP.d.mts} +52 -99
- package/dist/{client-plugins-B9Sq-iMg.d.ts → client-plugins-By6MVUX-.d.ts} +52 -99
- package/dist/client-plugins.cjs +1 -1
- package/dist/client-plugins.d.mts +3 -2
- package/dist/client-plugins.d.ts +3 -2
- package/dist/client-plugins.mjs +2 -2
- package/dist/client.cjs +757 -104
- package/dist/client.d.mts +124 -16
- package/dist/client.d.ts +124 -16
- package/dist/client.mjs +28 -14
- package/dist/config.d.mts +3 -2
- package/dist/config.d.ts +3 -2
- package/dist/{devtools-S52RRRMN.mjs → devtools-XWZX6CCL.mjs} +5 -5
- package/dist/{devtools-client-EOVDBPOI.mjs → devtools-client-Z7QQA3Q2.mjs} +2 -2
- package/dist/{devtools-ui-NJKFORTG.mjs → devtools-ui-2HG5M4EL.mjs} +3 -1
- package/dist/devtools-ui-2HG5M4EL.mjs.map +1 -0
- package/dist/docs.cjs +24 -5
- package/dist/docs.mjs +5 -5
- package/dist/i18n/server.cjs +13 -2
- package/dist/i18n/server.d.mts +2 -2
- package/dist/i18n/server.d.ts +2 -2
- package/dist/i18n/server.mjs +1 -1
- package/dist/index.cjs +1578 -772
- package/dist/index.d.mts +28 -20
- package/dist/index.d.ts +28 -20
- package/dist/index.mjs +53 -33
- package/dist/index.mjs.map +1 -1
- package/dist/integration-api-BT024nuJ.d.mts +97 -0
- package/dist/integration-api-BT024nuJ.d.ts +97 -0
- package/dist/integrations.d.mts +3 -2
- package/dist/integrations.d.ts +3 -2
- package/dist/internal/build-runtime.cjs +710 -532
- package/dist/internal/build-runtime.d.mts +5 -4
- package/dist/internal/build-runtime.d.ts +5 -4
- package/dist/internal/build-runtime.mjs +15 -15
- package/dist/internal/client-runtime.cjs +1 -1
- package/dist/internal/client-runtime.mjs +2 -2
- package/dist/internal/config-runtime.cjs +4 -1
- package/dist/internal/config-runtime.d.mts +4 -3
- package/dist/internal/config-runtime.d.ts +4 -3
- package/dist/internal/config-runtime.mjs +4 -4
- package/dist/internal/product-telemetry-runtime.cjs +1 -1
- package/dist/internal/product-telemetry-runtime.mjs +1 -1
- package/dist/internal/production-runtime.cjs +29 -3
- package/dist/internal/production-runtime.d.mts +8 -7
- package/dist/internal/production-runtime.d.ts +8 -7
- package/dist/internal/production-runtime.mjs +5 -5
- package/dist/{metadata-route-yV4U6X8h.d.ts → metadata-route-8_V3UonT.d.ts} +1 -1
- package/dist/{metadata-route-p4K1l92V.d.mts → metadata-route-CWP_HjGU.d.mts} +1 -1
- package/dist/middleware.cjs +28 -2
- package/dist/middleware.d.mts +5 -4
- package/dist/middleware.d.ts +5 -4
- package/dist/middleware.mjs +4 -4
- package/dist/navigation.cjs +3 -1
- package/dist/navigation.mjs +3 -3
- package/dist/observability.cjs +27 -2
- package/dist/observability.mjs +1 -1
- package/dist/plugin.cjs +474 -334
- package/dist/plugin.d.mts +3 -2
- package/dist/plugin.d.ts +3 -2
- package/dist/plugin.mjs +12 -12
- package/dist/{production-runtime-IkB0Qj4i.d.mts → production-runtime-BGRH1dKG.d.mts} +1 -1
- package/dist/{production-runtime-0JTch4_d.d.ts → production-runtime-CdmzsDax.d.ts} +1 -1
- package/dist/query/client.cjs +11 -3
- package/dist/query/client.mjs +12 -4
- package/dist/query/client.mjs.map +1 -1
- package/dist/{render-plan-Dc8CjNI7.d.ts → render-plan-0GeHiGVZ.d.ts} +1 -1
- package/dist/{render-plan-CU31j-Jk.d.mts → render-plan-DLxJYAA5.d.mts} +1 -1
- package/dist/renderer-client.cjs +140 -26
- package/dist/renderer-client.d.mts +7 -6
- package/dist/renderer-client.d.ts +7 -6
- package/dist/renderer-client.mjs +16 -19
- package/dist/renderer-client.mjs.map +1 -1
- package/dist/{request-BXa1KY8i.d.mts → request-BCNXSXLh.d.mts} +1 -1
- package/dist/{request-CUUBujZt.d.ts → request-BstWbZ6O.d.ts} +1 -1
- package/dist/request.d.mts +4 -3
- package/dist/request.d.ts +4 -3
- package/dist/{route-Y8lfz1wF.d.ts → route-4pd-EVtw.d.ts} +45 -50
- package/dist/{route-Cq3aObmj.d.mts → route-CvEr4Uc9.d.mts} +45 -50
- package/dist/routes.cjs +27 -2
- package/dist/routes.d.mts +3 -2
- package/dist/routes.d.ts +3 -2
- package/dist/routes.mjs +4 -4
- package/dist/{runtime-j1S3sDTh.d.ts → runtime-BgDQzBiu.d.ts} +1 -0
- package/dist/{runtime-DDwvDtS4.d.mts → runtime-CV2UCV-5.d.mts} +1 -0
- package/dist/server-action-security.mjs +2 -2
- package/dist/server-fn-client.cjs +34 -2
- package/dist/server-fn-client.d.mts +6 -0
- package/dist/server-fn-client.d.ts +6 -0
- package/dist/server-fn-client.mjs +1 -1
- package/dist/server-fn.cjs +42 -4
- package/dist/server-fn.mjs +5 -5
- package/dist/server-plugins.d.mts +4 -3
- package/dist/server-plugins.d.ts +4 -3
- package/dist/server-query-client.cjs +146 -27
- package/dist/server-query-client.d.mts +3 -3
- package/dist/server-query-client.d.ts +3 -3
- package/dist/server-query-client.mjs +7 -7
- package/dist/{server-query-runtime-3zAj77yv.d.ts → server-query-runtime-DXRNhX_3.d.ts} +2 -0
- package/dist/{server-query-runtime-B50KAcj5.d.mts → server-query-runtime-aP52iuL5.d.mts} +2 -0
- package/dist/server-query.cjs +44 -5
- package/dist/server-query.d.mts +4 -0
- package/dist/server-query.d.ts +4 -0
- package/dist/server-query.mjs +7 -7
- package/dist/server.cjs +499 -355
- package/dist/server.d.mts +11 -10
- package/dist/server.d.ts +11 -10
- package/dist/server.mjs +16 -16
- package/dist/{spa-router-CyLkwst6.d.mts → spa-router-BeyAVSc6.d.mts} +1 -1
- package/dist/{spa-router-BkqGXaV_.d.ts → spa-router-COgu4txb.d.ts} +1 -1
- package/dist/testing.cjs +27 -2
- package/dist/testing.d.mts +3 -2
- package/dist/testing.d.ts +3 -2
- package/dist/testing.mjs +8 -8
- package/dist/{utils-NKR6SoNv.d.mts → utils-DL2VwDQl.d.mts} +1 -1
- package/dist/{utils-B2OHrb9F.d.ts → utils-DkU2c_1B.d.ts} +1 -1
- package/dist/version.cjs +1 -1
- package/dist/version.mjs +1 -1
- package/dist/vite.cjs +482 -338
- package/dist/vite.d.mts +3 -2
- package/dist/vite.d.ts +3 -2
- package/dist/vite.mjs +16 -12
- package/package.json +17 -17
- package/types/client.d.ts +87 -1
- package/dist/agent-runtime.cjs.map +0 -1
- package/dist/api/route-manager.cjs.map +0 -1
- package/dist/api/runtime.cjs.map +0 -1
- package/dist/api.cjs.map +0 -1
- package/dist/app-markdown.cjs.map +0 -1
- package/dist/cache.cjs.map +0 -1
- package/dist/chunk-3I55IGXU.mjs.map +0 -1
- package/dist/chunk-54XSGLKT.mjs.map +0 -1
- package/dist/chunk-7MABZJIM.mjs.map +0 -1
- package/dist/chunk-AXVJCMVF.mjs.map +0 -1
- package/dist/chunk-GZHKWHCH.mjs.map +0 -1
- package/dist/chunk-HHZAOTQD.mjs.map +0 -1
- package/dist/chunk-LKKMI7JG.mjs.map +0 -1
- package/dist/chunk-LZTGDH3H.mjs.map +0 -1
- package/dist/chunk-MM46HTX6.mjs.map +0 -1
- package/dist/chunk-MRVJCLYQ.mjs.map +0 -1
- package/dist/chunk-Q7GPJZCO.mjs.map +0 -1
- package/dist/chunk-RAGSHKDC.mjs.map +0 -1
- package/dist/chunk-RBRLLZL5.mjs.map +0 -1
- package/dist/chunk-SCFX4UTD.mjs.map +0 -1
- package/dist/chunk-VOUJW4FL.mjs.map +0 -1
- package/dist/chunk-WB75GIX2.mjs.map +0 -1
- package/dist/chunk-ZFNK77WN.mjs.map +0 -1
- package/dist/chunk-ZPG6SNHH.mjs.map +0 -1
- package/dist/chunk-ZRBCBOEX.mjs.map +0 -1
- package/dist/client/lifecycle.cjs.map +0 -1
- package/dist/client-cache-CopR_MaI.d.mts +0 -6
- package/dist/client-cache-Djy_TlE8.d.ts +0 -6
- package/dist/client-plugins.cjs.map +0 -1
- package/dist/client.cjs.map +0 -1
- package/dist/config.cjs.map +0 -1
- package/dist/cron.cjs.map +0 -1
- package/dist/deferred.cjs.map +0 -1
- package/dist/deployment.cjs.map +0 -1
- package/dist/devtools-ui-NJKFORTG.mjs.map +0 -1
- package/dist/docs.cjs.map +0 -1
- package/dist/env-types.cjs.map +0 -1
- package/dist/env.cjs.map +0 -1
- package/dist/environment/vite.cjs.map +0 -1
- package/dist/environment.cjs.map +0 -1
- package/dist/font.cjs.map +0 -1
- package/dist/headers.cjs.map +0 -1
- package/dist/i18n/client.cjs.map +0 -1
- package/dist/i18n/index.cjs.map +0 -1
- package/dist/i18n/server.cjs.map +0 -1
- package/dist/image/server.cjs.map +0 -1
- package/dist/image/sharp.cjs.map +0 -1
- package/dist/image.cjs.map +0 -1
- package/dist/index.cjs.map +0 -1
- package/dist/instrumentation.cjs.map +0 -1
- package/dist/integrations.cjs.map +0 -1
- package/dist/internal/build-runtime.cjs.map +0 -1
- package/dist/internal/client-runtime.cjs.map +0 -1
- package/dist/internal/config-runtime.cjs.map +0 -1
- package/dist/internal/isolated-boundary.cjs.map +0 -1
- package/dist/internal/metadata-image-runtime.cjs.map +0 -1
- package/dist/internal/product-telemetry-runtime.cjs.map +0 -1
- package/dist/internal/production-node-env.cjs.map +0 -1
- package/dist/internal/production-runtime.cjs.map +0 -1
- package/dist/markdown.cjs.map +0 -1
- package/dist/middleware.cjs.map +0 -1
- package/dist/navigation.cjs.map +0 -1
- package/dist/observability.cjs.map +0 -1
- package/dist/plugin.cjs.map +0 -1
- package/dist/query/client.cjs.map +0 -1
- package/dist/query/index.cjs.map +0 -1
- package/dist/query/parsers.cjs.map +0 -1
- package/dist/query/server.cjs.map +0 -1
- package/dist/renderer/react/client.cjs.map +0 -1
- package/dist/renderer/react/server.cjs.map +0 -1
- package/dist/renderer/react/vite.cjs.map +0 -1
- package/dist/renderer-client.cjs.map +0 -1
- package/dist/renderer.cjs.map +0 -1
- package/dist/request.cjs.map +0 -1
- package/dist/router.cjs.map +0 -1
- package/dist/routes.cjs.map +0 -1
- package/dist/server-action-security.cjs.map +0 -1
- package/dist/server-fn-client.cjs.map +0 -1
- package/dist/server-fn.cjs.map +0 -1
- package/dist/server-plugins.cjs.map +0 -1
- package/dist/server-query-client.cjs.map +0 -1
- package/dist/server-query.cjs.map +0 -1
- package/dist/server.cjs.map +0 -1
- package/dist/storage.cjs.map +0 -1
- package/dist/testing.cjs.map +0 -1
- package/dist/theme/client.cjs.map +0 -1
- package/dist/theme/index.cjs.map +0 -1
- package/dist/theme/runtime.cjs.map +0 -1
- package/dist/theme/server.cjs.map +0 -1
- package/dist/version.cjs.map +0 -1
- package/dist/vite.cjs.map +0 -1
- package/dist/workflows.cjs.map +0 -1
- /package/dist/{chunk-VV24CC42.mjs.map → chunk-35NPLKQJ.mjs.map} +0 -0
- /package/dist/{chunk-RWYRFCLG.mjs.map → chunk-4X57GXQA.mjs.map} +0 -0
- /package/dist/{chunk-MOW47IF5.mjs.map → chunk-6UYVU46O.mjs.map} +0 -0
- /package/dist/{chunk-RLGUZ3HS.mjs.map → chunk-I3OOUWO5.mjs.map} +0 -0
- /package/dist/{chunk-ODJGAWDH.mjs.map → chunk-JV7JUD7Q.mjs.map} +0 -0
- /package/dist/{chunk-Q3OX763A.mjs.map → chunk-LXDASSTE.mjs.map} +0 -0
- /package/dist/{chunk-HVG3HLQZ.mjs.map → chunk-Q7WGOOAI.mjs.map} +0 -0
- /package/dist/{chunk-3INDBMUU.mjs.map → chunk-TGDIACZT.mjs.map} +0 -0
- /package/dist/{chunk-WMAYETRD.mjs.map → chunk-TT3E2JOF.mjs.map} +0 -0
- /package/dist/{chunk-FVAM43KI.mjs.map → chunk-UMUWR5XA.mjs.map} +0 -0
- /package/dist/{devtools-S52RRRMN.mjs.map → devtools-XWZX6CCL.mjs.map} +0 -0
- /package/dist/{devtools-client-EOVDBPOI.mjs.map → devtools-client-Z7QQA3Q2.mjs.map} +0 -0
package/dist/api.cjs
CHANGED
|
@@ -75,7 +75,13 @@ function recordFarmEventTrace(event) {
|
|
|
75
75
|
activeSpan.addEvent(event.type, toEventAttributes(event), event.timestamp);
|
|
76
76
|
}
|
|
77
77
|
const error = event.type === "request.error" ? void 0 : getEventError(event);
|
|
78
|
-
if (error !== void 0)
|
|
78
|
+
if (error !== void 0) {
|
|
79
|
+
if (event.type === "render.error") {
|
|
80
|
+
recordSpanException(activeSpan, error);
|
|
81
|
+
} else {
|
|
82
|
+
recordSpanError(activeSpan, error);
|
|
83
|
+
}
|
|
84
|
+
}
|
|
79
85
|
}
|
|
80
86
|
const completedTraceContext = recordCompletedEventSpan(event, activeContext);
|
|
81
87
|
return traceContext ?? completedTraceContext;
|
|
@@ -169,12 +175,25 @@ function getCompletedSpanDescriptor(event) {
|
|
|
169
175
|
return void 0;
|
|
170
176
|
}
|
|
171
177
|
}
|
|
178
|
+
function hashFarmCacheKey(value) {
|
|
179
|
+
let hash = 2166136261;
|
|
180
|
+
for (let index = 0; index < value.length; index++) {
|
|
181
|
+
hash ^= value.charCodeAt(index);
|
|
182
|
+
hash = Math.imul(hash, 16777619);
|
|
183
|
+
}
|
|
184
|
+
return (hash >>> 0).toString(16).padStart(8, "0");
|
|
185
|
+
}
|
|
172
186
|
function toEventAttributes(event) {
|
|
173
187
|
const attributes = {};
|
|
188
|
+
const redactKey = typeof event.type === "string" && event.type.startsWith("cache.");
|
|
174
189
|
for (const [key, value] of Object.entries(event)) {
|
|
175
190
|
if (key === "timestamp" || key === "level" || key === "error" || key === "traceId" || key === "spanId" || key === "traceSampled" || value === void 0) {
|
|
176
191
|
continue;
|
|
177
192
|
}
|
|
193
|
+
if (redactKey && key === "key" && typeof value === "string") {
|
|
194
|
+
attributes["farm.key_hash"] = hashFarmCacheKey(value);
|
|
195
|
+
continue;
|
|
196
|
+
}
|
|
178
197
|
if (typeof value === "string" || typeof value === "number" || typeof value === "boolean") {
|
|
179
198
|
attributes[`farm.${key}`] = value;
|
|
180
199
|
} else if (Array.isArray(value)) {
|
|
@@ -192,9 +211,13 @@ function toEventAttributes(event) {
|
|
|
192
211
|
function getEventError(event) {
|
|
193
212
|
return "error" in event ? event.error : void 0;
|
|
194
213
|
}
|
|
195
|
-
function
|
|
214
|
+
function recordSpanException(span, error) {
|
|
196
215
|
const normalized = error instanceof Error ? error : new Error(String(error));
|
|
197
216
|
span.recordException(normalized);
|
|
217
|
+
return normalized;
|
|
218
|
+
}
|
|
219
|
+
function recordSpanError(span, error) {
|
|
220
|
+
const normalized = recordSpanException(span, error);
|
|
198
221
|
span.setStatus({ code: import_api.SpanStatusCode.ERROR, message: normalized.message });
|
|
199
222
|
}
|
|
200
223
|
function setResponseStatus(span, status) {
|
|
@@ -245,8 +268,10 @@ var init_tracing = __esm({
|
|
|
245
268
|
__name(recordFarmEventTrace, "recordFarmEventTrace");
|
|
246
269
|
__name(recordCompletedEventSpan, "recordCompletedEventSpan");
|
|
247
270
|
__name(getCompletedSpanDescriptor, "getCompletedSpanDescriptor");
|
|
271
|
+
__name(hashFarmCacheKey, "hashFarmCacheKey");
|
|
248
272
|
__name(toEventAttributes, "toEventAttributes");
|
|
249
273
|
__name(getEventError, "getEventError");
|
|
274
|
+
__name(recordSpanException, "recordSpanException");
|
|
250
275
|
__name(recordSpanError, "recordSpanError");
|
|
251
276
|
__name(setResponseStatus, "setResponseStatus");
|
|
252
277
|
__name(getSpanTraceContext, "getSpanTraceContext");
|
|
@@ -393,15 +418,27 @@ function getFarmCacheInvalidationState() {
|
|
|
393
418
|
taskListeners: /* @__PURE__ */ new Set()
|
|
394
419
|
});
|
|
395
420
|
}
|
|
421
|
+
function warnFarmCacheListenerError(scope, error) {
|
|
422
|
+
const detail = error instanceof Error ? error.stack ?? error.message : String(error);
|
|
423
|
+
console.warn(`[farm:cache] ${scope} listener failed: ${detail}`);
|
|
424
|
+
}
|
|
396
425
|
function notifyFarmCacheInvalidation(key) {
|
|
397
426
|
if (typeof key !== "string" || key.length === 0) return;
|
|
398
427
|
for (const listener of getFarmCacheInvalidationState().listeners) {
|
|
399
|
-
|
|
428
|
+
try {
|
|
429
|
+
listener(key);
|
|
430
|
+
} catch (error) {
|
|
431
|
+
warnFarmCacheListenerError("invalidation", error);
|
|
432
|
+
}
|
|
400
433
|
}
|
|
401
434
|
}
|
|
402
435
|
function notifyFarmCacheTask(task) {
|
|
403
436
|
for (const listener of getFarmCacheInvalidationState().taskListeners) {
|
|
404
|
-
|
|
437
|
+
try {
|
|
438
|
+
listener(task);
|
|
439
|
+
} catch (error) {
|
|
440
|
+
warnFarmCacheListenerError("task", error);
|
|
441
|
+
}
|
|
405
442
|
}
|
|
406
443
|
}
|
|
407
444
|
function applyFarmCacheInvalidations(keys) {
|
|
@@ -443,6 +480,7 @@ var init_cache_invalidation = __esm({
|
|
|
443
480
|
FARM_CACHE_INVALIDATION_STATE = /* @__PURE__ */ Symbol.for("farm.cacheInvalidationState");
|
|
444
481
|
globalState = globalThis;
|
|
445
482
|
__name(getFarmCacheInvalidationState, "getFarmCacheInvalidationState");
|
|
483
|
+
__name(warnFarmCacheListenerError, "warnFarmCacheListenerError");
|
|
446
484
|
__name(notifyFarmCacheInvalidation, "notifyFarmCacheInvalidation");
|
|
447
485
|
__name(notifyFarmCacheTask, "notifyFarmCacheTask");
|
|
448
486
|
__name(applyFarmCacheInvalidations, "applyFarmCacheInvalidations");
|
|
@@ -2250,6 +2288,7 @@ __export(api_exports, {
|
|
|
2250
2288
|
POST: () => POST,
|
|
2251
2289
|
PUT: () => PUT,
|
|
2252
2290
|
QUERY: () => QUERY,
|
|
2291
|
+
applyServerFnOptimisticUpdates: () => applyServerFnOptimisticUpdates,
|
|
2253
2292
|
createAPIClient: () => createAPIClient,
|
|
2254
2293
|
createApiClients: () => createApiClients,
|
|
2255
2294
|
createEndpoint: () => createEndpoint,
|
|
@@ -2278,6 +2317,8 @@ __export(api_exports, {
|
|
|
2278
2317
|
resolveFarmAPIRequestURL: () => resolveFarmAPIRequestURL,
|
|
2279
2318
|
resolveFarmAPIServerBasePath: () => resolveFarmAPIServerBasePath,
|
|
2280
2319
|
resolvePluginRoutes: () => resolvePluginRoutes,
|
|
2320
|
+
resolveServerFnInvalidateTargets: () => resolveServerFnInvalidateTargets,
|
|
2321
|
+
settleServerFnOptimisticUpdates: () => settleServerFnOptimisticUpdates,
|
|
2281
2322
|
toFormData: () => toFormData
|
|
2282
2323
|
});
|
|
2283
2324
|
module.exports = __toCommonJS(api_exports);
|
|
@@ -2594,6 +2635,7 @@ function createEndpoint(pathOrOptions, optionsOrHandler, maybeHandler) {
|
|
|
2594
2635
|
body: options.body,
|
|
2595
2636
|
inputBody: isMultipartSchema(options.body) ? "form-data" : options.body,
|
|
2596
2637
|
query: options.query,
|
|
2638
|
+
inputQuery: options.query,
|
|
2597
2639
|
headers: options.headers,
|
|
2598
2640
|
response: null,
|
|
2599
2641
|
errors
|
|
@@ -5183,6 +5225,7 @@ function subscribeWeakCache(reference) {
|
|
|
5183
5225
|
return dispose;
|
|
5184
5226
|
}
|
|
5185
5227
|
__name(subscribeWeakCache, "subscribeWeakCache");
|
|
5228
|
+
var DEFAULT_GC_SWEEP_INTERVAL_MS = 3e4;
|
|
5186
5229
|
var _FarmClientDataCache = class _FarmClientDataCache {
|
|
5187
5230
|
constructor(options = {}) {
|
|
5188
5231
|
this.entries = /* @__PURE__ */ new Map();
|
|
@@ -5190,6 +5233,7 @@ var _FarmClientDataCache = class _FarmClientDataCache {
|
|
|
5190
5233
|
this.invalidatedAt = /* @__PURE__ */ new Map();
|
|
5191
5234
|
this.listeners = /* @__PURE__ */ new Map();
|
|
5192
5235
|
this.inflight = /* @__PURE__ */ new Map();
|
|
5236
|
+
this.gcSweepIntervalMs = options.gcSweepIntervalMs ?? DEFAULT_GC_SWEEP_INTERVAL_MS;
|
|
5193
5237
|
if (options.subscribeToInvalidation !== false) {
|
|
5194
5238
|
if (typeof WeakRef === "function") {
|
|
5195
5239
|
const reference = new WeakRef(this);
|
|
@@ -5206,6 +5250,10 @@ var _FarmClientDataCache = class _FarmClientDataCache {
|
|
|
5206
5250
|
get size() {
|
|
5207
5251
|
return this.entries.size;
|
|
5208
5252
|
}
|
|
5253
|
+
/** @internal Attach or detach the persistence engine's observation sink. */
|
|
5254
|
+
attachPersistence(sink) {
|
|
5255
|
+
this.persistence = sink;
|
|
5256
|
+
}
|
|
5209
5257
|
resolveKey(key) {
|
|
5210
5258
|
let resolved = key;
|
|
5211
5259
|
const seen = /* @__PURE__ */ new Set();
|
|
@@ -5221,6 +5269,7 @@ var _FarmClientDataCache = class _FarmClientDataCache {
|
|
|
5221
5269
|
if (!entry) return void 0;
|
|
5222
5270
|
if (entry.gcAt !== void 0 && now >= entry.gcAt) {
|
|
5223
5271
|
this.entries.delete(resolved);
|
|
5272
|
+
this.persistence?.onDelete(resolved);
|
|
5224
5273
|
this.emit(resolved);
|
|
5225
5274
|
return void 0;
|
|
5226
5275
|
}
|
|
@@ -5234,6 +5283,8 @@ var _FarmClientDataCache = class _FarmClientDataCache {
|
|
|
5234
5283
|
this.invalidatedAt.delete(resolved);
|
|
5235
5284
|
}
|
|
5236
5285
|
this.entries.set(resolved, nextEntry);
|
|
5286
|
+
if (nextEntry.gcAt !== void 0) this.scheduleGcSweep();
|
|
5287
|
+
this.persistence?.onSet(resolved, nextEntry);
|
|
5237
5288
|
this.emit(resolved);
|
|
5238
5289
|
return this;
|
|
5239
5290
|
}
|
|
@@ -5241,6 +5292,7 @@ var _FarmClientDataCache = class _FarmClientDataCache {
|
|
|
5241
5292
|
const resolved = this.resolveKey(key);
|
|
5242
5293
|
const deleted = this.entries.delete(resolved);
|
|
5243
5294
|
this.inflight.delete(resolved);
|
|
5295
|
+
if (deleted) this.persistence?.onDelete(resolved);
|
|
5244
5296
|
this.emit(resolved);
|
|
5245
5297
|
return deleted;
|
|
5246
5298
|
}
|
|
@@ -5250,11 +5302,16 @@ var _FarmClientDataCache = class _FarmClientDataCache {
|
|
|
5250
5302
|
this.aliases.clear();
|
|
5251
5303
|
this.invalidatedAt.clear();
|
|
5252
5304
|
this.inflight.clear();
|
|
5305
|
+
this.persistence?.onClear();
|
|
5253
5306
|
for (const key of keys) this.emit(key);
|
|
5254
5307
|
}
|
|
5255
5308
|
dispose() {
|
|
5256
5309
|
this.unsubscribeInvalidation?.();
|
|
5257
5310
|
this.unsubscribeInvalidation = void 0;
|
|
5311
|
+
if (this.gcTimer !== void 0) {
|
|
5312
|
+
clearTimeout(this.gcTimer);
|
|
5313
|
+
this.gcTimer = void 0;
|
|
5314
|
+
}
|
|
5258
5315
|
this.clear();
|
|
5259
5316
|
}
|
|
5260
5317
|
isStale(key, now = Date.now()) {
|
|
@@ -5283,8 +5340,9 @@ var _FarmClientDataCache = class _FarmClientDataCache {
|
|
|
5283
5340
|
const resolvedInvalidatedAt = this.invalidatedAt.get(resolved);
|
|
5284
5341
|
if (aliasEntry && !this.entries.has(resolved)) {
|
|
5285
5342
|
this.entries.set(resolved, aliasEntry);
|
|
5343
|
+
this.persistence?.onSet(resolved, aliasEntry);
|
|
5286
5344
|
}
|
|
5287
|
-
this.entries.delete(alias);
|
|
5345
|
+
if (this.entries.delete(alias)) this.persistence?.onDelete(alias);
|
|
5288
5346
|
this.invalidatedAt.delete(alias);
|
|
5289
5347
|
const invalidatedAt = [aliasInvalidatedAt, resolvedInvalidatedAt].reduce(
|
|
5290
5348
|
(latest, value) => value === void 0 ? latest : latest === void 0 ? value : Math.max(latest, value),
|
|
@@ -5324,7 +5382,9 @@ var _FarmClientDataCache = class _FarmClientDataCache {
|
|
|
5324
5382
|
listeners.add(listener);
|
|
5325
5383
|
return () => {
|
|
5326
5384
|
listeners.delete(listener);
|
|
5327
|
-
if (listeners.size === 0
|
|
5385
|
+
if (listeners.size === 0 && this.listeners.get(key) === listeners) {
|
|
5386
|
+
this.listeners.delete(key);
|
|
5387
|
+
}
|
|
5328
5388
|
};
|
|
5329
5389
|
}
|
|
5330
5390
|
getInflight(key) {
|
|
@@ -5336,6 +5396,30 @@ var _FarmClientDataCache = class _FarmClientDataCache {
|
|
|
5336
5396
|
deleteInflight(key) {
|
|
5337
5397
|
this.inflight.delete(this.resolveKey(key));
|
|
5338
5398
|
}
|
|
5399
|
+
scheduleGcSweep() {
|
|
5400
|
+
if (this.gcSweepIntervalMs === false || this.gcTimer !== void 0) return;
|
|
5401
|
+
const timer = setTimeout(() => {
|
|
5402
|
+
this.gcTimer = void 0;
|
|
5403
|
+
this.sweepExpiredEntries();
|
|
5404
|
+
}, this.gcSweepIntervalMs);
|
|
5405
|
+
timer.unref?.();
|
|
5406
|
+
this.gcTimer = timer;
|
|
5407
|
+
}
|
|
5408
|
+
sweepExpiredEntries(now = Date.now()) {
|
|
5409
|
+
const watched = /* @__PURE__ */ new Set();
|
|
5410
|
+
for (const key of this.listeners.keys()) watched.add(this.resolveKey(key));
|
|
5411
|
+
let remaining = false;
|
|
5412
|
+
for (const [key, entry] of this.entries) {
|
|
5413
|
+
if (entry.gcAt === void 0) continue;
|
|
5414
|
+
if (now < entry.gcAt || entry.fetching || this.inflight.has(key) || watched.has(key)) {
|
|
5415
|
+
remaining = true;
|
|
5416
|
+
continue;
|
|
5417
|
+
}
|
|
5418
|
+
this.entries.delete(key);
|
|
5419
|
+
this.persistence?.onDelete(key);
|
|
5420
|
+
}
|
|
5421
|
+
if (remaining) this.scheduleGcSweep();
|
|
5422
|
+
}
|
|
5339
5423
|
emit(key, event) {
|
|
5340
5424
|
this.notifyListeners(key, event);
|
|
5341
5425
|
for (const [alias, target] of this.aliases) {
|
|
@@ -5614,70 +5698,6 @@ function createAPIClientRuntime(options = {}, transport) {
|
|
|
5614
5698
|
let scopedRequestState;
|
|
5615
5699
|
const routeMeta = transport?.routeMeta ?? /* @__PURE__ */ new WeakMap();
|
|
5616
5700
|
let requestCounter = 0;
|
|
5617
|
-
const applyOptimisticLayer = /* @__PURE__ */ __name((entry, layer) => {
|
|
5618
|
-
let data = entry?.data;
|
|
5619
|
-
for (const updater of layer.updaters) data = updater(data);
|
|
5620
|
-
return {
|
|
5621
|
-
data,
|
|
5622
|
-
updatedAt: layer.updatedAt,
|
|
5623
|
-
staleAt: entry?.staleAt ?? layer.staleAt,
|
|
5624
|
-
gcAt: entry?.gcAt ?? layer.gcAt,
|
|
5625
|
-
invalidatedAt: entry?.invalidatedAt,
|
|
5626
|
-
[API_CACHE_REFETCH]: entry?.[API_CACHE_REFETCH]
|
|
5627
|
-
};
|
|
5628
|
-
}, "applyOptimisticLayer");
|
|
5629
|
-
const storeOptimisticEntry = /* @__PURE__ */ __name((cacheState, key, stack, entry) => {
|
|
5630
|
-
if (!entry) {
|
|
5631
|
-
cacheState.delete(key);
|
|
5632
|
-
stack.renderedEntry = void 0;
|
|
5633
|
-
return;
|
|
5634
|
-
}
|
|
5635
|
-
cacheState.set(key, entry);
|
|
5636
|
-
if (stack.invalidatedAt !== void 0) {
|
|
5637
|
-
cacheState.invalidate(key, stack.invalidatedAt);
|
|
5638
|
-
}
|
|
5639
|
-
stack.renderedEntry = cacheState.get(key);
|
|
5640
|
-
}, "storeOptimisticEntry");
|
|
5641
|
-
const reconcileOptimisticInvalidation = /* @__PURE__ */ __name((cacheState, key, stack) => {
|
|
5642
|
-
const current = cacheState.get(key);
|
|
5643
|
-
const rendered = stack.renderedEntry;
|
|
5644
|
-
if (current === rendered) return true;
|
|
5645
|
-
if (!current || !rendered || current.data !== rendered.data || current.updatedAt !== rendered.updatedAt || current.gcAt !== rendered.gcAt || current.status !== rendered.status || current.error !== rendered.error || current.fetching !== rendered.fetching || current.staleAt !== 0 || current.invalidatedAt === void 0) {
|
|
5646
|
-
return false;
|
|
5647
|
-
}
|
|
5648
|
-
stack.invalidatedAt = current.invalidatedAt;
|
|
5649
|
-
stack.renderedEntry = current;
|
|
5650
|
-
return true;
|
|
5651
|
-
}, "reconcileOptimisticInvalidation");
|
|
5652
|
-
const renderOptimisticStack = /* @__PURE__ */ __name((cacheState, key, stack) => {
|
|
5653
|
-
let entry = stack.entry ? { ...stack.entry } : void 0;
|
|
5654
|
-
for (const layer of stack.layers) entry = applyOptimisticLayer(entry, layer);
|
|
5655
|
-
storeOptimisticEntry(cacheState, key, stack, entry);
|
|
5656
|
-
}, "renderOptimisticStack");
|
|
5657
|
-
const settleOptimisticUpdates = /* @__PURE__ */ __name((cacheState, optimisticState, snapshots, outcome) => {
|
|
5658
|
-
const settledKeys = [];
|
|
5659
|
-
for (const snapshot of snapshots) {
|
|
5660
|
-
const stack = optimisticState.get(snapshot.key);
|
|
5661
|
-
if (stack !== snapshot.stack) continue;
|
|
5662
|
-
if (!reconcileOptimisticInvalidation(cacheState, snapshot.key, stack)) {
|
|
5663
|
-
optimisticState.delete(snapshot.key);
|
|
5664
|
-
continue;
|
|
5665
|
-
}
|
|
5666
|
-
if (outcome === "rollback") {
|
|
5667
|
-
stack.layers = stack.layers.filter((layer) => layer !== snapshot.layer);
|
|
5668
|
-
} else {
|
|
5669
|
-
snapshot.layer.committed = true;
|
|
5670
|
-
if (outcome === "invalidate") stack.invalidatedAt = Date.now();
|
|
5671
|
-
}
|
|
5672
|
-
while (stack.layers[0]?.committed) {
|
|
5673
|
-
stack.entry = applyOptimisticLayer(stack.entry, stack.layers.shift());
|
|
5674
|
-
}
|
|
5675
|
-
renderOptimisticStack(cacheState, snapshot.key, stack);
|
|
5676
|
-
if (stack.layers.length === 0) optimisticState.delete(snapshot.key);
|
|
5677
|
-
settledKeys.push(snapshot.key);
|
|
5678
|
-
}
|
|
5679
|
-
return settledKeys;
|
|
5680
|
-
}, "settleOptimisticUpdates");
|
|
5681
5701
|
const fetchClient = /* @__PURE__ */ __name(async (path4, requestOptions, defaultHeaders, cancellation) => {
|
|
5682
5702
|
const url = resolveFarmAPIRequestURL(path4, baseURL);
|
|
5683
5703
|
const method = String(requestOptions.method || "GET").toUpperCase();
|
|
@@ -6054,6 +6074,7 @@ function createAPIClientRuntime(options = {}, transport) {
|
|
|
6054
6074
|
staleAt: updatedAt + staleTime,
|
|
6055
6075
|
gcAt: getGcAt(updatedAt, cacheOptions?.gcTime),
|
|
6056
6076
|
invalidatedAt: void 0,
|
|
6077
|
+
persist: cacheOptions?.persist === true ? true : void 0,
|
|
6057
6078
|
[API_CACHE_REFETCH]: createCacheRefetch(
|
|
6058
6079
|
request,
|
|
6059
6080
|
path4,
|
|
@@ -6401,6 +6422,151 @@ function getOptimisticState(cache) {
|
|
|
6401
6422
|
return state;
|
|
6402
6423
|
}
|
|
6403
6424
|
__name(getOptimisticState, "getOptimisticState");
|
|
6425
|
+
function applyOptimisticLayer(entry, layer) {
|
|
6426
|
+
let data = entry?.data;
|
|
6427
|
+
for (const updater of layer.updaters) data = updater(data);
|
|
6428
|
+
return {
|
|
6429
|
+
data,
|
|
6430
|
+
updatedAt: layer.updatedAt,
|
|
6431
|
+
staleAt: entry?.staleAt ?? layer.staleAt,
|
|
6432
|
+
gcAt: entry?.gcAt ?? layer.gcAt,
|
|
6433
|
+
invalidatedAt: entry?.invalidatedAt,
|
|
6434
|
+
[API_CACHE_REFETCH]: entry?.[API_CACHE_REFETCH]
|
|
6435
|
+
};
|
|
6436
|
+
}
|
|
6437
|
+
__name(applyOptimisticLayer, "applyOptimisticLayer");
|
|
6438
|
+
function storeOptimisticEntry(cacheState, key, stack, entry) {
|
|
6439
|
+
if (!entry) {
|
|
6440
|
+
cacheState.delete(key);
|
|
6441
|
+
stack.renderedEntry = void 0;
|
|
6442
|
+
return;
|
|
6443
|
+
}
|
|
6444
|
+
cacheState.set(key, entry);
|
|
6445
|
+
if (stack.invalidatedAt !== void 0) {
|
|
6446
|
+
cacheState.invalidate(key, stack.invalidatedAt);
|
|
6447
|
+
}
|
|
6448
|
+
stack.renderedEntry = cacheState.get(key);
|
|
6449
|
+
}
|
|
6450
|
+
__name(storeOptimisticEntry, "storeOptimisticEntry");
|
|
6451
|
+
function reconcileOptimisticInvalidation(cacheState, key, stack) {
|
|
6452
|
+
const current = cacheState.get(key);
|
|
6453
|
+
const rendered = stack.renderedEntry;
|
|
6454
|
+
if (current === rendered) return true;
|
|
6455
|
+
if (!current || !rendered || current.data !== rendered.data || current.updatedAt !== rendered.updatedAt || current.gcAt !== rendered.gcAt || current.status !== rendered.status || current.error !== rendered.error || current.fetching !== rendered.fetching || current.staleAt !== 0 || current.invalidatedAt === void 0) {
|
|
6456
|
+
return false;
|
|
6457
|
+
}
|
|
6458
|
+
stack.invalidatedAt = current.invalidatedAt;
|
|
6459
|
+
stack.renderedEntry = current;
|
|
6460
|
+
return true;
|
|
6461
|
+
}
|
|
6462
|
+
__name(reconcileOptimisticInvalidation, "reconcileOptimisticInvalidation");
|
|
6463
|
+
function renderOptimisticStack(cacheState, key, stack) {
|
|
6464
|
+
let entry = stack.entry ? { ...stack.entry } : void 0;
|
|
6465
|
+
for (const layer of stack.layers) entry = applyOptimisticLayer(entry, layer);
|
|
6466
|
+
storeOptimisticEntry(cacheState, key, stack, entry);
|
|
6467
|
+
}
|
|
6468
|
+
__name(renderOptimisticStack, "renderOptimisticStack");
|
|
6469
|
+
function settleOptimisticUpdates(cacheState, optimisticState, snapshots, outcome) {
|
|
6470
|
+
const settledKeys = [];
|
|
6471
|
+
for (const snapshot of snapshots) {
|
|
6472
|
+
const stack = optimisticState.get(snapshot.key);
|
|
6473
|
+
if (stack !== snapshot.stack) continue;
|
|
6474
|
+
if (!reconcileOptimisticInvalidation(cacheState, snapshot.key, stack)) {
|
|
6475
|
+
optimisticState.delete(snapshot.key);
|
|
6476
|
+
continue;
|
|
6477
|
+
}
|
|
6478
|
+
if (outcome === "rollback") {
|
|
6479
|
+
stack.layers = stack.layers.filter((layer) => layer !== snapshot.layer);
|
|
6480
|
+
} else {
|
|
6481
|
+
snapshot.layer.committed = true;
|
|
6482
|
+
if (outcome === "invalidate") stack.invalidatedAt = Date.now();
|
|
6483
|
+
}
|
|
6484
|
+
while (stack.layers[0]?.committed) {
|
|
6485
|
+
stack.entry = applyOptimisticLayer(stack.entry, stack.layers.shift());
|
|
6486
|
+
}
|
|
6487
|
+
renderOptimisticStack(cacheState, snapshot.key, stack);
|
|
6488
|
+
if (stack.layers.length === 0) optimisticState.delete(snapshot.key);
|
|
6489
|
+
settledKeys.push(snapshot.key);
|
|
6490
|
+
}
|
|
6491
|
+
return settledKeys;
|
|
6492
|
+
}
|
|
6493
|
+
__name(settleOptimisticUpdates, "settleOptimisticUpdates");
|
|
6494
|
+
function applyServerFnOptimisticUpdates(updates, now = Date.now()) {
|
|
6495
|
+
const cacheState = getFarmClientDataCache();
|
|
6496
|
+
const optimisticState = getOptimisticState(cacheState);
|
|
6497
|
+
const snapshots = /* @__PURE__ */ new Map();
|
|
6498
|
+
for (const update of updates) {
|
|
6499
|
+
if (update.length !== 2) continue;
|
|
6500
|
+
const [target, updater] = update;
|
|
6501
|
+
if (typeof updater !== "function") continue;
|
|
6502
|
+
const targetKey = typeof target === "string" || Array.isArray(target) ? normalizeFarmClientCacheKey(target) : null;
|
|
6503
|
+
if (!targetKey) continue;
|
|
6504
|
+
const targetEntry = getValidCacheEntry(cacheState, targetKey, now);
|
|
6505
|
+
const currentEntry = cacheState.get(targetKey);
|
|
6506
|
+
let stack = optimisticState.get(targetKey);
|
|
6507
|
+
if (stack && !reconcileOptimisticInvalidation(cacheState, targetKey, stack)) {
|
|
6508
|
+
stack = void 0;
|
|
6509
|
+
}
|
|
6510
|
+
if (!stack) {
|
|
6511
|
+
stack = {
|
|
6512
|
+
entry: targetEntry ? { ...targetEntry } : void 0,
|
|
6513
|
+
layers: [],
|
|
6514
|
+
renderedEntry: currentEntry
|
|
6515
|
+
};
|
|
6516
|
+
optimisticState.set(targetKey, stack);
|
|
6517
|
+
}
|
|
6518
|
+
let snapshot = snapshots.get(targetKey);
|
|
6519
|
+
if (!snapshot) {
|
|
6520
|
+
const previousEntry = stack.layers.length === 0 ? stack.entry : stack.renderedEntry;
|
|
6521
|
+
const layer = {
|
|
6522
|
+
updaters: [],
|
|
6523
|
+
updatedAt: now,
|
|
6524
|
+
// A server function has no cache policy of its own; preserve the
|
|
6525
|
+
// target read's freshness metadata when it exists.
|
|
6526
|
+
staleAt: targetEntry?.staleAt ?? now,
|
|
6527
|
+
gcAt: targetEntry?.gcAt
|
|
6528
|
+
};
|
|
6529
|
+
stack.layers.push(layer);
|
|
6530
|
+
snapshot = { key: targetKey, stack, layer };
|
|
6531
|
+
snapshots.set(targetKey, snapshot);
|
|
6532
|
+
snapshot.layer.updaters.push(updater);
|
|
6533
|
+
const nextEntry2 = applyOptimisticLayer(previousEntry, {
|
|
6534
|
+
...snapshot.layer,
|
|
6535
|
+
updaters: [updater]
|
|
6536
|
+
});
|
|
6537
|
+
storeOptimisticEntry(cacheState, targetKey, stack, nextEntry2);
|
|
6538
|
+
continue;
|
|
6539
|
+
}
|
|
6540
|
+
snapshot.layer.updaters.push(updater);
|
|
6541
|
+
const nextEntry = applyOptimisticLayer(stack.renderedEntry, {
|
|
6542
|
+
...snapshot.layer,
|
|
6543
|
+
updaters: [updater]
|
|
6544
|
+
});
|
|
6545
|
+
storeOptimisticEntry(cacheState, targetKey, stack, nextEntry);
|
|
6546
|
+
}
|
|
6547
|
+
return Array.from(snapshots.values());
|
|
6548
|
+
}
|
|
6549
|
+
__name(applyServerFnOptimisticUpdates, "applyServerFnOptimisticUpdates");
|
|
6550
|
+
function settleServerFnOptimisticUpdates(snapshots, outcome) {
|
|
6551
|
+
if (snapshots.length === 0) return;
|
|
6552
|
+
const cacheState = getFarmClientDataCache();
|
|
6553
|
+
settleOptimisticUpdates(cacheState, getOptimisticState(cacheState), snapshots, outcome);
|
|
6554
|
+
}
|
|
6555
|
+
__name(settleServerFnOptimisticUpdates, "settleServerFnOptimisticUpdates");
|
|
6556
|
+
function resolveServerFnInvalidateTargets(invalidate2) {
|
|
6557
|
+
const targets = Array.isArray(invalidate2) ? invalidate2 : invalidate2.targets;
|
|
6558
|
+
const keys = [];
|
|
6559
|
+
for (const target of targets) {
|
|
6560
|
+
if (typeof target === "string" || Array.isArray(target)) {
|
|
6561
|
+
if (Array.isArray(target) && typeof target[0] === "function") continue;
|
|
6562
|
+
keys.push(normalizeFarmClientCacheKey(target));
|
|
6563
|
+
} else if (target && typeof target === "object" && "key" in target) {
|
|
6564
|
+
keys.push(normalizeFarmClientCacheKey(target.key));
|
|
6565
|
+
}
|
|
6566
|
+
}
|
|
6567
|
+
return keys;
|
|
6568
|
+
}
|
|
6569
|
+
__name(resolveServerFnInvalidateTargets, "resolveServerFnInvalidateTargets");
|
|
6404
6570
|
function buildCacheKey(method, path4, input, baseURL, defaultHeaders) {
|
|
6405
6571
|
const keyInput = input && typeof input === "object" ? {
|
|
6406
6572
|
query: input.query,
|
|
@@ -7360,6 +7526,7 @@ __name(farmApiPlugin, "farmApiPlugin");
|
|
|
7360
7526
|
POST,
|
|
7361
7527
|
PUT,
|
|
7362
7528
|
QUERY,
|
|
7529
|
+
applyServerFnOptimisticUpdates,
|
|
7363
7530
|
createAPIClient,
|
|
7364
7531
|
createApiClients,
|
|
7365
7532
|
createEndpoint,
|
|
@@ -7388,6 +7555,8 @@ __name(farmApiPlugin, "farmApiPlugin");
|
|
|
7388
7555
|
resolveFarmAPIRequestURL,
|
|
7389
7556
|
resolveFarmAPIServerBasePath,
|
|
7390
7557
|
resolvePluginRoutes,
|
|
7558
|
+
resolveServerFnInvalidateTargets,
|
|
7559
|
+
settleServerFnOptimisticUpdates,
|
|
7391
7560
|
toFormData
|
|
7392
7561
|
});
|
|
7393
7562
|
//# sourceMappingURL=api.cjs.map
|
package/dist/api.d.mts
CHANGED
|
@@ -1,14 +1,14 @@
|
|
|
1
|
-
export { A as AnyEndpointMiddleware, D as DELETE, d as EndpointErrorContracts, b as EndpointErrorDefinition, c as EndpointErrorDefinitions, e as EndpointErrorHandler, a as EndpointErrorSchema, f as EndpointFail, E as EndpointFailure, q as EndpointHandler, n as EndpointInvalidationContext, m as EndpointInvalidationTarget, o as EndpointInvalidations, l as EndpointMiddleware, j as EndpointMiddlewareContext, k as EndpointMiddlewareResult, p as EndpointOptions, g as EndpointParamValue, h as EndpointParams, F as FarmAPIStream, y as FarmStreamResponse, G as GET, H as HEAD, I as InferEndpointMiddlewareContext, M as MultipartField, x as MultipartSchema, v as MultipartValues, O as OPTIONS, u as PATCH, s as POST, t as PUT, $ as PluginAPIRouter, Z as PluginRoutes, P as PluginRoutesFactory, Q as QUERY, W as RouteDefinition, Y as RouteFactory, U as RouteInputSchemas, V as RouteJSON, S as RouteMethod, X as RouteOptions, R as RoutePathParams, T as TypedEndpoint, w as TypedFormData, r as createEndpoint, _ as createRouteFactory, i as isEndpointFailure, N as isFarmAPIStream, K as isJSONStreamResponse, B as isMultipartSchema, J as jsonStream, z as multipart, L as readJSONStream, a0 as resolvePluginRoutes, C as toFormData } from './route-
|
|
1
|
+
export { A as AnyEndpointMiddleware, D as DELETE, d as EndpointErrorContracts, b as EndpointErrorDefinition, c as EndpointErrorDefinitions, e as EndpointErrorHandler, a as EndpointErrorSchema, f as EndpointFail, E as EndpointFailure, q as EndpointHandler, n as EndpointInvalidationContext, m as EndpointInvalidationTarget, o as EndpointInvalidations, l as EndpointMiddleware, j as EndpointMiddlewareContext, k as EndpointMiddlewareResult, p as EndpointOptions, g as EndpointParamValue, h as EndpointParams, F as FarmAPIStream, y as FarmStreamResponse, G as GET, H as HEAD, I as InferEndpointMiddlewareContext, M as MultipartField, x as MultipartSchema, v as MultipartValues, O as OPTIONS, u as PATCH, s as POST, t as PUT, $ as PluginAPIRouter, Z as PluginRoutes, P as PluginRoutesFactory, Q as QUERY, W as RouteDefinition, Y as RouteFactory, U as RouteInputSchemas, V as RouteJSON, S as RouteMethod, X as RouteOptions, R as RoutePathParams, T as TypedEndpoint, w as TypedFormData, r as createEndpoint, _ as createRouteFactory, i as isEndpointFailure, N as isFarmAPIStream, K as isJSONStreamResponse, B as isMultipartSchema, J as jsonStream, z as multipart, L as readJSONStream, a0 as resolvePluginRoutes, C as toFormData } from './route-CvEr4Uc9.mjs';
|
|
2
2
|
export { APIRoute, APIRouteConflictError, APIRouteHandlerOptions, APIRouteManager, APIRouteManagerOptions, API_ROUTE_METHODS } from './api/route-manager.mjs';
|
|
3
|
-
export { s as APIClient, h as APIClientError, b as APIClientOptions, i as APIClientSystemError, c as APIClientWithoutIntegrationsOptions, g as APIResult,
|
|
4
|
-
import { ah as ResolvedFarmAPIConfig } from './client-plugins-
|
|
5
|
-
export {
|
|
3
|
+
export { s as APIClient, h as APIClientError, b as APIClientOptions, i as APIClientSystemError, c as APIClientWithoutIntegrationsOptions, g as APIResult, G as APIRouteManifest, A as APIRouteRefMetadata, u as ApiClients, C as CacheKey, n as CacheOptions, l as CachePolicy, m as CacheScope, q as ClientOptions, a as FARM_API_ROUTE_META_SYMBOL, F as FARM_API_ROUTE_REF_SYMBOL, o as InvalidateOptions, I as InvalidateTarget, p as OptimisticOptions, O as OptimisticUpdate, j as RequestEvent, k as ResponseEvent, R as RetryOptions, r as RouteAPIClient, t as ServerAPIClient, S as ServerAPIClientOptions, d as ServerAPIClientWithoutIntegrationsOptions, f as StatusEvent, e as StatusPhase, B as applyServerFnOptimisticUpdates, w as createAPIClient, v as createApiClients, z as createServerAPIClient, y as getAPIRouteRefMetadata, x as isAPIRouteRef, E as resolveServerFnInvalidateTargets, D as settleServerFnOptimisticUpdates } from './client-DWoLZ3QU.mjs';
|
|
4
|
+
import { ah as ResolvedFarmAPIConfig } from './client-plugins-B6-07YmP.mjs';
|
|
5
|
+
export { d4 as DEFAULT_FARM_API_BASE_PATH, d7 as FarmAPIConfig, d5 as FarmAPIConfigResolverContext, d6 as FarmAPIConfigValue, db as getFarmAPIBaseURL, da as normalizeFarmAPIBasePath, d9 as normalizeFarmAPIConfig, d8 as resolveFarmAPIConfig, dc as resolveFarmAPIRequestURL } from './client-plugins-B6-07YmP.mjs';
|
|
6
6
|
import { Plugin } from 'vite';
|
|
7
7
|
export { getAllowedAPIRouteMethods, invokeAPIRouteEndpoint, isWebResponse, normalizeRouteResponse, resolveAPIRouteEndpoint } from './api/runtime.mjs';
|
|
8
8
|
export { A as APIRouteMatch, b as APIRouteParamValue, a as APIRouteParams, m as matchAPIRoute } from './route-pattern-W-SsJGSp.mjs';
|
|
9
9
|
import './cache.mjs';
|
|
10
10
|
import './types-CnH8DOqo.mjs';
|
|
11
|
-
import './runtime-
|
|
11
|
+
import './runtime-CV2UCV-5.mjs';
|
|
12
12
|
import './resolver-khasx3fU.mjs';
|
|
13
13
|
import './lifecycle-De0vQG45.mjs';
|
|
14
14
|
import './renderer.mjs';
|
|
@@ -17,6 +17,7 @@ import './types-Cc8l9IqS.mjs';
|
|
|
17
17
|
import 'db0';
|
|
18
18
|
import 'unstorage';
|
|
19
19
|
import 'react';
|
|
20
|
+
import './integration-api-BT024nuJ.mjs';
|
|
20
21
|
import '@farming-labs/orm';
|
|
21
22
|
import './types-CKwggz9n.mjs';
|
|
22
23
|
import '@farming-labs/docs';
|
|
@@ -36,7 +37,7 @@ import './font.mjs';
|
|
|
36
37
|
import './after.mjs';
|
|
37
38
|
import 'node:http';
|
|
38
39
|
import './island-CfGru1MO.mjs';
|
|
39
|
-
import './client-cache-
|
|
40
|
+
import './client-cache-CCK-fCe0.mjs';
|
|
40
41
|
|
|
41
42
|
/** Return the same-origin path served by this Farm application. */
|
|
42
43
|
declare function resolveFarmAPIServerBasePath(config: ResolvedFarmAPIConfig): string;
|
package/dist/api.d.ts
CHANGED
|
@@ -1,14 +1,14 @@
|
|
|
1
|
-
export { A as AnyEndpointMiddleware, D as DELETE, d as EndpointErrorContracts, b as EndpointErrorDefinition, c as EndpointErrorDefinitions, e as EndpointErrorHandler, a as EndpointErrorSchema, f as EndpointFail, E as EndpointFailure, q as EndpointHandler, n as EndpointInvalidationContext, m as EndpointInvalidationTarget, o as EndpointInvalidations, l as EndpointMiddleware, j as EndpointMiddlewareContext, k as EndpointMiddlewareResult, p as EndpointOptions, g as EndpointParamValue, h as EndpointParams, F as FarmAPIStream, y as FarmStreamResponse, G as GET, H as HEAD, I as InferEndpointMiddlewareContext, M as MultipartField, x as MultipartSchema, v as MultipartValues, O as OPTIONS, u as PATCH, s as POST, t as PUT, $ as PluginAPIRouter, Z as PluginRoutes, P as PluginRoutesFactory, Q as QUERY, W as RouteDefinition, Y as RouteFactory, U as RouteInputSchemas, V as RouteJSON, S as RouteMethod, X as RouteOptions, R as RoutePathParams, T as TypedEndpoint, w as TypedFormData, r as createEndpoint, _ as createRouteFactory, i as isEndpointFailure, N as isFarmAPIStream, K as isJSONStreamResponse, B as isMultipartSchema, J as jsonStream, z as multipart, L as readJSONStream, a0 as resolvePluginRoutes, C as toFormData } from './route-
|
|
1
|
+
export { A as AnyEndpointMiddleware, D as DELETE, d as EndpointErrorContracts, b as EndpointErrorDefinition, c as EndpointErrorDefinitions, e as EndpointErrorHandler, a as EndpointErrorSchema, f as EndpointFail, E as EndpointFailure, q as EndpointHandler, n as EndpointInvalidationContext, m as EndpointInvalidationTarget, o as EndpointInvalidations, l as EndpointMiddleware, j as EndpointMiddlewareContext, k as EndpointMiddlewareResult, p as EndpointOptions, g as EndpointParamValue, h as EndpointParams, F as FarmAPIStream, y as FarmStreamResponse, G as GET, H as HEAD, I as InferEndpointMiddlewareContext, M as MultipartField, x as MultipartSchema, v as MultipartValues, O as OPTIONS, u as PATCH, s as POST, t as PUT, $ as PluginAPIRouter, Z as PluginRoutes, P as PluginRoutesFactory, Q as QUERY, W as RouteDefinition, Y as RouteFactory, U as RouteInputSchemas, V as RouteJSON, S as RouteMethod, X as RouteOptions, R as RoutePathParams, T as TypedEndpoint, w as TypedFormData, r as createEndpoint, _ as createRouteFactory, i as isEndpointFailure, N as isFarmAPIStream, K as isJSONStreamResponse, B as isMultipartSchema, J as jsonStream, z as multipart, L as readJSONStream, a0 as resolvePluginRoutes, C as toFormData } from './route-4pd-EVtw.js';
|
|
2
2
|
export { APIRoute, APIRouteConflictError, APIRouteHandlerOptions, APIRouteManager, APIRouteManagerOptions, API_ROUTE_METHODS } from './api/route-manager.js';
|
|
3
|
-
export { s as APIClient, h as APIClientError, b as APIClientOptions, i as APIClientSystemError, c as APIClientWithoutIntegrationsOptions, g as APIResult,
|
|
4
|
-
import { ah as ResolvedFarmAPIConfig } from './client-plugins-
|
|
5
|
-
export {
|
|
3
|
+
export { s as APIClient, h as APIClientError, b as APIClientOptions, i as APIClientSystemError, c as APIClientWithoutIntegrationsOptions, g as APIResult, G as APIRouteManifest, A as APIRouteRefMetadata, u as ApiClients, C as CacheKey, n as CacheOptions, l as CachePolicy, m as CacheScope, q as ClientOptions, a as FARM_API_ROUTE_META_SYMBOL, F as FARM_API_ROUTE_REF_SYMBOL, o as InvalidateOptions, I as InvalidateTarget, p as OptimisticOptions, O as OptimisticUpdate, j as RequestEvent, k as ResponseEvent, R as RetryOptions, r as RouteAPIClient, t as ServerAPIClient, S as ServerAPIClientOptions, d as ServerAPIClientWithoutIntegrationsOptions, f as StatusEvent, e as StatusPhase, B as applyServerFnOptimisticUpdates, w as createAPIClient, v as createApiClients, z as createServerAPIClient, y as getAPIRouteRefMetadata, x as isAPIRouteRef, E as resolveServerFnInvalidateTargets, D as settleServerFnOptimisticUpdates } from './client-DuQuQC1h.js';
|
|
4
|
+
import { ah as ResolvedFarmAPIConfig } from './client-plugins-By6MVUX-.js';
|
|
5
|
+
export { d4 as DEFAULT_FARM_API_BASE_PATH, d7 as FarmAPIConfig, d5 as FarmAPIConfigResolverContext, d6 as FarmAPIConfigValue, db as getFarmAPIBaseURL, da as normalizeFarmAPIBasePath, d9 as normalizeFarmAPIConfig, d8 as resolveFarmAPIConfig, dc as resolveFarmAPIRequestURL } from './client-plugins-By6MVUX-.js';
|
|
6
6
|
import { Plugin } from 'vite';
|
|
7
7
|
export { getAllowedAPIRouteMethods, invokeAPIRouteEndpoint, isWebResponse, normalizeRouteResponse, resolveAPIRouteEndpoint } from './api/runtime.js';
|
|
8
8
|
export { A as APIRouteMatch, b as APIRouteParamValue, a as APIRouteParams, m as matchAPIRoute } from './route-pattern-W-SsJGSp.js';
|
|
9
9
|
import './cache.js';
|
|
10
10
|
import './types-CnH8DOqo.js';
|
|
11
|
-
import './runtime-
|
|
11
|
+
import './runtime-BgDQzBiu.js';
|
|
12
12
|
import './resolver-DadfRL6F.js';
|
|
13
13
|
import './lifecycle-De0vQG45.js';
|
|
14
14
|
import './renderer.js';
|
|
@@ -17,6 +17,7 @@ import './types-Cc8l9IqS.js';
|
|
|
17
17
|
import 'db0';
|
|
18
18
|
import 'unstorage';
|
|
19
19
|
import 'react';
|
|
20
|
+
import './integration-api-BT024nuJ.js';
|
|
20
21
|
import '@farming-labs/orm';
|
|
21
22
|
import './types-CKwggz9n.js';
|
|
22
23
|
import '@farming-labs/docs';
|
|
@@ -36,7 +37,7 @@ import './font.js';
|
|
|
36
37
|
import './after.js';
|
|
37
38
|
import 'node:http';
|
|
38
39
|
import './island-CfGru1MO.js';
|
|
39
|
-
import './client-cache-
|
|
40
|
+
import './client-cache-BMxuFqwH.js';
|
|
40
41
|
|
|
41
42
|
/** Return the same-origin path served by this Farm application. */
|
|
42
43
|
declare function resolveFarmAPIServerBasePath(config: ResolvedFarmAPIConfig): string;
|
package/dist/api.mjs
CHANGED
|
@@ -1,27 +1,30 @@
|
|
|
1
1
|
import {
|
|
2
2
|
farmApiPlugin
|
|
3
|
-
} from "./chunk-
|
|
3
|
+
} from "./chunk-JV7JUD7Q.mjs";
|
|
4
4
|
import {
|
|
5
5
|
APIClientError,
|
|
6
6
|
FARM_API_ROUTE_META_SYMBOL,
|
|
7
7
|
FARM_API_ROUTE_REF_SYMBOL,
|
|
8
|
+
applyServerFnOptimisticUpdates,
|
|
8
9
|
createAPIClient,
|
|
9
10
|
createApiClients,
|
|
10
11
|
createServerAPIClient,
|
|
11
12
|
getAPIRouteRefMetadata,
|
|
12
|
-
isAPIRouteRef
|
|
13
|
-
|
|
13
|
+
isAPIRouteRef,
|
|
14
|
+
resolveServerFnInvalidateTargets,
|
|
15
|
+
settleServerFnOptimisticUpdates
|
|
16
|
+
} from "./chunk-IZBX2TEU.mjs";
|
|
14
17
|
import "./chunk-DU3PKDVQ.mjs";
|
|
15
|
-
import "./chunk-
|
|
18
|
+
import "./chunk-WMJGA32P.mjs";
|
|
16
19
|
import "./chunk-YUE4CJNB.mjs";
|
|
17
|
-
import "./chunk-
|
|
20
|
+
import "./chunk-6JNGOC37.mjs";
|
|
18
21
|
import {
|
|
19
22
|
APIRouteConflictError,
|
|
20
23
|
APIRouteManager,
|
|
21
24
|
API_ROUTE_METHODS
|
|
22
|
-
} from "./chunk-
|
|
25
|
+
} from "./chunk-TT3E2JOF.mjs";
|
|
23
26
|
import "./chunk-NXV52RNX.mjs";
|
|
24
|
-
import "./chunk-
|
|
27
|
+
import "./chunk-TQTB33JS.mjs";
|
|
25
28
|
import "./chunk-STV7A2LH.mjs";
|
|
26
29
|
import "./chunk-XNWHZQ6A.mjs";
|
|
27
30
|
import "./chunk-SXWF4QRU.mjs";
|
|
@@ -49,7 +52,7 @@ import {
|
|
|
49
52
|
normalizeRouteResponse,
|
|
50
53
|
resolveAPIRouteEndpoint,
|
|
51
54
|
resolvePluginRoutes
|
|
52
|
-
} from "./chunk-
|
|
55
|
+
} from "./chunk-3TWQERDE.mjs";
|
|
53
56
|
import "./chunk-4OAR7CTF.mjs";
|
|
54
57
|
import {
|
|
55
58
|
resolveFarmAPIServerBasePath
|
|
@@ -76,10 +79,10 @@ import {
|
|
|
76
79
|
resolveFarmAPIRequestURL
|
|
77
80
|
} from "./chunk-6YPPIPKR.mjs";
|
|
78
81
|
import "./chunk-776TTMU3.mjs";
|
|
79
|
-
import "./chunk-
|
|
80
|
-
import "./chunk-
|
|
82
|
+
import "./chunk-2HDOV47R.mjs";
|
|
83
|
+
import "./chunk-34IAPZBG.mjs";
|
|
81
84
|
import "./chunk-WZ5QFROO.mjs";
|
|
82
|
-
import "./chunk-
|
|
85
|
+
import "./chunk-N2FY2QZ7.mjs";
|
|
83
86
|
import "./chunk-EDWCT2JF.mjs";
|
|
84
87
|
import "./chunk-LM2YNO4U.mjs";
|
|
85
88
|
import "./chunk-W4ZNS76E.mjs";
|
|
@@ -103,6 +106,7 @@ export {
|
|
|
103
106
|
POST,
|
|
104
107
|
PUT,
|
|
105
108
|
QUERY,
|
|
109
|
+
applyServerFnOptimisticUpdates,
|
|
106
110
|
createAPIClient,
|
|
107
111
|
createApiClients,
|
|
108
112
|
createEndpoint,
|
|
@@ -131,6 +135,8 @@ export {
|
|
|
131
135
|
resolveFarmAPIRequestURL,
|
|
132
136
|
resolveFarmAPIServerBasePath,
|
|
133
137
|
resolvePluginRoutes,
|
|
138
|
+
resolveServerFnInvalidateTargets,
|
|
139
|
+
settleServerFnOptimisticUpdates,
|
|
134
140
|
toFormData
|
|
135
141
|
};
|
|
136
142
|
//# sourceMappingURL=api.mjs.map
|