@farm.js/core 0.1.50 → 0.1.51-beta.0
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/README.md +163 -3
- package/dist/{agent-mcp-9BMbRgg_.d.ts → agent-mcp-BBMfNpsC.d.ts} +1 -1
- package/dist/{agent-mcp-CIMH324y.d.mts → agent-mcp-D44ip11f.d.mts} +1 -1
- package/dist/agent-runtime.d.mts +1 -1
- package/dist/agent-runtime.d.ts +1 -1
- package/dist/{analyzer-DDW34OMC.mjs → analyzer-HOUCQR3K.mjs} +1 -1
- package/dist/{analyzer-CN7C74WX.cjs → analyzer-VKUDHNDF.cjs} +2 -2
- package/dist/api/route-manager.cjs +5 -5
- package/dist/api/route-manager.d.mts +3 -3
- package/dist/api/route-manager.d.ts +3 -3
- package/dist/api/route-manager.mjs +4 -4
- package/dist/api/runtime.d.mts +2 -2
- package/dist/api/runtime.d.ts +2 -2
- package/dist/api.cjs +6 -6
- package/dist/api.d.mts +3 -3
- package/dist/api.d.ts +3 -3
- package/dist/api.mjs +5 -5
- package/dist/{app-BWibTHVT.d.ts → app-CourU3rQ.d.ts} +4 -4
- package/dist/{app-DVJ13FPA.d.mts → app-aeD4s_mg.d.mts} +4 -4
- package/dist/{app-manifest-CQDJOKL2.d.mts → app-manifest-BC6mFn5A.d.mts} +1 -1
- package/dist/{app-manifest-D0kaXdwu.d.ts → app-manifest-LzjoNPeq.d.ts} +1 -1
- package/dist/app-markdown.d.mts +2 -2
- package/dist/app-markdown.d.ts +2 -2
- package/dist/base-path-BOUV5ozD.d.mts +10 -0
- package/dist/base-path-BOUV5ozD.d.ts +10 -0
- package/dist/{chunk-RWT2BTJT.cjs → chunk-2IAPKPEB.cjs} +6 -6
- package/dist/{chunk-2G63BIRL.mjs → chunk-2KVDHNQS.mjs} +8 -11
- package/dist/{chunk-76R5GJER.mjs → chunk-3HA7PP72.mjs} +2 -2
- package/dist/{chunk-NJVFPJ2Y.cjs → chunk-3OWVWZ6R.cjs} +28 -2
- package/dist/{chunk-KO2NWUKN.mjs → chunk-4GJJ65RB.mjs} +9 -1
- package/dist/{chunk-GERUXONA.cjs → chunk-5A77OEIG.cjs} +4 -1
- package/dist/{chunk-4HBKBHVP.mjs → chunk-5ENW27SL.mjs} +1 -1
- package/dist/{chunk-MTB57GOK.mjs → chunk-724WT3NI.mjs} +4 -2
- package/dist/{chunk-VCKGOXFI.cjs → chunk-76GHW3WI.cjs} +7 -1
- package/dist/{chunk-ZIBIE7AH.mjs → chunk-7UPCJDB5.mjs} +7 -1
- package/dist/{chunk-CPXDDWGL.mjs → chunk-AER5I65K.mjs} +1 -1
- package/dist/{chunk-WB6XES4V.mjs → chunk-ALEUMLJN.mjs} +34 -5
- package/dist/{chunk-WVBUXNBX.mjs → chunk-AMRK3P6W.mjs} +123 -47
- package/dist/{chunk-L6QDME5Z.cjs → chunk-B3GZAQSC.cjs} +3 -3
- package/dist/chunk-CKPTIEDX.cjs +12 -0
- package/dist/{chunk-B5S2JS6M.cjs → chunk-DWW3AMJX.cjs} +288 -255
- package/dist/{chunk-EQMTJBB7.cjs → chunk-DZZHTMWM.cjs} +35 -6
- package/dist/{chunk-3ATXWZPH.cjs → chunk-E36C43IX.cjs} +13 -16
- package/dist/{chunk-J2ZEVDEK.cjs → chunk-EHB77D5U.cjs} +3 -3
- package/dist/{chunk-WQGRD5BJ.cjs → chunk-EX6ZSN5P.cjs} +1 -16
- package/dist/{chunk-474FO3UE.cjs → chunk-F42U3R4F.cjs} +170 -163
- package/dist/{chunk-6QA2SXVH.cjs → chunk-FK25QSVC.cjs} +2 -1
- package/dist/{chunk-BW6SCVYX.mjs → chunk-FSQMN2MQ.mjs} +1 -0
- package/dist/{chunk-2H3FJYY6.mjs → chunk-FSXSQQTV.mjs} +3 -2
- package/dist/chunk-GNZIAJGB.mjs +358 -0
- package/dist/{chunk-TXK4D46O.mjs → chunk-H3ASZDT7.mjs} +21 -1
- package/dist/{chunk-B6PREBN6.cjs → chunk-HASX6DC7.cjs} +8 -8
- package/dist/{chunk-ZLOQQ2UF.mjs → chunk-I2ZA5SXS.mjs} +60 -27
- package/dist/{chunk-X2EL3BLH.cjs → chunk-IOUOGRDX.cjs} +11 -3
- package/dist/{chunk-CBJKDB6F.mjs → chunk-IRSS4HS4.mjs} +1 -1
- package/dist/{chunk-GOOK2J2W.cjs → chunk-J22JD5YJ.cjs} +2 -2
- package/dist/{chunk-2DEPNLXK.mjs → chunk-JF5CNHHF.mjs} +4 -4
- package/dist/{chunk-VOZ5DI7D.mjs → chunk-JWI5PUO2.mjs} +6 -2
- package/dist/{chunk-YAXOEAND.cjs → chunk-KHXAJ2KA.cjs} +6 -6
- package/dist/{chunk-WXHDVXJE.mjs → chunk-KY32FWK7.mjs} +2 -2
- package/dist/{chunk-EQWWOQTK.cjs → chunk-LEIXUFJN.cjs} +6 -2
- package/dist/{chunk-2GLQSIZD.mjs → chunk-LMFJCXDD.mjs} +1 -1
- package/dist/{chunk-IXSMFKZ2.cjs → chunk-LNM57D3H.cjs} +4 -4
- package/dist/{chunk-5V4KZOZO.mjs → chunk-LZ4SB57H.mjs} +2 -2
- package/dist/{chunk-E2BMCNMJ.cjs → chunk-MMEEXMUQ.cjs} +2 -2
- package/dist/chunk-N4AQNEXR.cjs +17 -0
- package/dist/{chunk-JZMZKABS.cjs → chunk-NWUHS6GV.cjs} +3 -2
- package/dist/{chunk-LYWAGXXW.cjs → chunk-O3MMJPC2.cjs} +12 -12
- package/dist/{chunk-FACTMUPI.cjs → chunk-PDJSL7PL.cjs} +30 -19
- package/dist/{chunk-XLLVWLWO.mjs → chunk-PIHKO25G.mjs} +1 -1
- package/dist/chunk-PIUTGRDI.cjs +358 -0
- package/dist/{chunk-KGP76FSV.mjs → chunk-PPDHCRTC.mjs} +1 -1
- package/dist/{chunk-C73RIAEF.mjs → chunk-QI5AQMEE.mjs} +17 -6
- package/dist/{chunk-F5LERVY3.cjs → chunk-QK3HBOTG.cjs} +10 -10
- package/dist/{chunk-Q3UU2KXC.mjs → chunk-QMDU6QHN.mjs} +4 -1
- package/dist/{chunk-JJOWY3XD.mjs → chunk-R5P4KFPM.mjs} +1 -1
- package/dist/{chunk-IWJKJDNW.mjs → chunk-S5ZA2T2W.mjs} +35 -28
- package/dist/{chunk-PXEXOQ5R.mjs → chunk-SHS6KXOZ.mjs} +1 -1
- package/dist/{chunk-ETF5C6HR.cjs → chunk-SJ23LJ3N.cjs} +3 -3
- package/dist/{chunk-KZH6YLND.cjs → chunk-SO3T6T4I.cjs} +427 -351
- package/dist/{chunk-JHXJBNLY.cjs → chunk-SUCDVKUB.cjs} +21 -1
- package/dist/{chunk-7ONZDKVY.mjs → chunk-T4EW7AAD.mjs} +2 -2
- package/dist/{chunk-UY6HS5PF.cjs → chunk-USL2ANCB.cjs} +8 -8
- package/dist/{chunk-4T25YCZ5.cjs → chunk-VIFPE5RG.cjs} +14 -14
- package/dist/{chunk-HYN3LLG7.cjs → chunk-VO6NLTV4.cjs} +3 -3
- package/dist/{chunk-XN2MB4QZ.cjs → chunk-VQJYGZNX.cjs} +4 -4
- package/dist/{chunk-5PKDHKQP.cjs → chunk-WFVSAT7Y.cjs} +6 -4
- package/dist/{chunk-X3HOVNHI.mjs → chunk-WSY2JD7O.mjs} +6 -6
- package/dist/{chunk-SHJJM6OG.mjs → chunk-WVX3BUNJ.mjs} +1 -1
- package/dist/chunk-X3EFRVXY.mjs +12 -0
- package/dist/{chunk-UCQ52TJY.mjs → chunk-X3JNB2TB.mjs} +1 -1
- package/dist/{chunk-RHOR2J6V.cjs → chunk-X5BCMLGP.cjs} +1 -1
- package/dist/{chunk-IQXGHGZF.cjs → chunk-XB24LZWI.cjs} +5 -5
- package/dist/{chunk-BNMHXVLL.mjs → chunk-XMHERKSE.mjs} +0 -15
- package/dist/{chunk-CGCJ2TJU.cjs → chunk-XPMC4E2G.cjs} +3 -3
- package/dist/{chunk-HWCHIBJZ.mjs → chunk-XWC5NAHV.mjs} +4 -4
- package/dist/{chunk-C7425KDG.cjs → chunk-XYL4HSVC.cjs} +2 -2
- package/dist/{chunk-2SVJGOAX.mjs → chunk-Y3N5BFRJ.mjs} +3 -3
- package/dist/{chunk-IUBDMDZZ.cjs → chunk-Y7TLL65B.cjs} +4 -4
- package/dist/{chunk-M7LKA632.mjs → chunk-YLNBWUVS.mjs} +1 -1
- package/dist/chunk-Z5A6CNV2.mjs +60 -0
- package/dist/chunk-Z64V4WZI.mjs +17 -0
- package/dist/{chunk-2VCC3GVC.mjs → chunk-ZF3GX4O7.mjs} +1 -1
- package/dist/{client-plugins-BPfltM5m.d.ts → client-plugins-CFBEfVPO.d.ts} +20 -3
- package/dist/{client-plugins-D4RO59f0.d.mts → client-plugins-cqy_dQd0.d.mts} +20 -3
- package/dist/client-plugins.d.mts +1 -1
- package/dist/client-plugins.d.ts +1 -1
- package/dist/client.cjs +5 -4
- package/dist/client.d.mts +6 -6
- package/dist/client.d.ts +6 -6
- package/dist/client.mjs +4 -3
- package/dist/config.d.mts +1 -1
- package/dist/config.d.ts +1 -1
- package/dist/cron.cjs +4 -4
- package/dist/cron.mjs +3 -3
- package/dist/desktop.d.mts +2 -2
- package/dist/desktop.d.ts +2 -2
- package/dist/{devtools-STG7HPRV.mjs → devtools-4MLL3RAL.mjs} +6 -6
- package/dist/{devtools-N5XTOECL.cjs → devtools-4ZLMD454.cjs} +8 -8
- package/dist/docs.cjs +10 -10
- package/dist/docs.d.mts +2 -2
- package/dist/docs.d.ts +2 -2
- package/dist/docs.mjs +9 -9
- package/dist/{index-k8o8eUOd.d.mts → index-BYkNbeQV.d.mts} +1 -1
- package/dist/{index-C-N3Pwg-.d.ts → index-BxjN_UDZ.d.ts} +1 -1
- package/dist/index.cjs +42 -40
- package/dist/index.d.mts +16 -16
- package/dist/index.d.ts +16 -16
- package/dist/index.mjs +41 -39
- package/dist/integrations.d.mts +1 -1
- package/dist/integrations.d.ts +1 -1
- package/dist/internal/app-markdown-runtime.d.mts +2 -2
- package/dist/internal/app-markdown-runtime.d.ts +2 -2
- package/dist/internal/build-runtime.cjs +32 -31
- package/dist/internal/build-runtime.d.mts +3 -3
- package/dist/internal/build-runtime.d.ts +3 -3
- package/dist/internal/build-runtime.mjs +31 -30
- package/dist/internal/cli-runtime.cjs +15 -15
- package/dist/internal/cli-runtime.mjs +14 -14
- package/dist/internal/client-error-overlay.cjs +4 -4
- package/dist/internal/client-error-overlay.mjs +1 -1
- package/dist/internal/client-runtime.cjs +4 -2
- package/dist/internal/client-runtime.d.mts +5 -5
- package/dist/internal/client-runtime.d.ts +5 -5
- package/dist/internal/client-runtime.mjs +3 -1
- package/dist/internal/compression-runtime.d.mts +1 -1
- package/dist/internal/compression-runtime.d.ts +1 -1
- package/dist/internal/config-runtime.cjs +8 -8
- package/dist/internal/config-runtime.d.mts +3 -3
- package/dist/internal/config-runtime.d.ts +3 -3
- package/dist/internal/config-runtime.mjs +7 -7
- package/dist/internal/form-actions.cjs +4 -3
- package/dist/internal/form-actions.mjs +3 -2
- package/dist/internal/infra-analytics-runtime.cjs +5 -5
- package/dist/internal/infra-analytics-runtime.mjs +3 -3
- package/dist/internal/islands-runtime.cjs +56 -0
- package/dist/internal/islands-runtime.mjs +57 -1
- package/dist/internal/product-telemetry-runtime.cjs +2 -2
- package/dist/internal/product-telemetry-runtime.mjs +1 -1
- package/dist/internal/production-runtime.cjs +11 -8
- package/dist/internal/production-runtime.d.mts +24 -11
- package/dist/internal/production-runtime.d.ts +24 -11
- package/dist/internal/production-runtime.mjs +10 -7
- package/dist/internal/server-fn-transform.cjs +13 -0
- package/dist/internal/server-fn-transform.d.mts +24 -0
- package/dist/internal/server-fn-transform.d.ts +24 -0
- package/dist/internal/server-fn-transform.mjs +13 -0
- package/dist/markdown.d.mts +1 -1
- package/dist/markdown.d.ts +1 -1
- package/dist/middleware.cjs +7 -7
- package/dist/middleware.d.mts +3 -3
- package/dist/middleware.d.ts +3 -3
- package/dist/middleware.mjs +6 -6
- package/dist/mobile.d.mts +30 -3
- package/dist/mobile.d.ts +30 -3
- package/dist/{navigation-delegate-8xg3Zvp4.d.ts → navigation-delegate-BU4xqdnw.d.ts} +1 -1
- package/dist/{navigation-delegate-ji6elCKy.d.mts → navigation-delegate-DLhbfEN4.d.mts} +1 -1
- package/dist/navigation.d.mts +4 -4
- package/dist/navigation.d.ts +4 -4
- package/dist/{nitro-YPSZBYDK.cjs → nitro-CK7M4RMY.cjs} +11 -11
- package/dist/{nitro-2Q5NVY7L.mjs → nitro-R444AF3O.mjs} +7 -7
- package/dist/plugin.cjs +25 -23
- package/dist/plugin.d.mts +3 -3
- package/dist/plugin.d.ts +3 -3
- package/dist/plugin.mjs +24 -22
- package/dist/{production-runtime-TdKaYRj0.d.ts → production-runtime-C78A8YgK.d.ts} +1 -1
- package/dist/{production-runtime-DXnQQkQf.d.mts → production-runtime-DLA4J5WG.d.mts} +1 -1
- package/dist/{programmatic-routes-client-BwiTndEC.d.ts → programmatic-routes-client-CBqkNhBy.d.ts} +2 -2
- package/dist/{programmatic-routes-client-Dh1SDLSM.d.mts → programmatic-routes-client-NpqGBn-i.d.mts} +2 -2
- package/dist/{render-plan-BvCGXF6K.d.mts → render-plan-C9sWvDTv.d.mts} +1 -1
- package/dist/{render-plan-BPbwRbuN.d.ts → render-plan-CrqcBbnV.d.ts} +1 -1
- package/dist/renderer-client.cjs +8 -6
- package/dist/renderer-client.d.mts +4 -4
- package/dist/renderer-client.d.ts +4 -4
- package/dist/renderer-client.mjs +4 -2
- package/dist/{request-B8PGTZNR.d.ts → request-BizeuqD7.d.ts} +1 -1
- package/dist/{request-C_xTkJib.d.mts → request-WwB1-Uim.d.mts} +1 -1
- package/dist/request.d.mts +2 -2
- package/dist/request.d.ts +2 -2
- package/dist/{route-rendering-RNtcj607.d.ts → route-rendering-BGhJN64l.d.ts} +1 -1
- package/dist/{route-rendering-DlddURL1.d.mts → route-rendering-S6NFjnx4.d.mts} +1 -1
- package/dist/{router-B97eB0Mq.d.mts → router-BIheIy9G.d.mts} +1 -1
- package/dist/{router-qUVaoEN8.d.ts → router-BUD_j2EL.d.ts} +1 -1
- package/dist/routes.cjs +3 -2
- package/dist/routes.d.mts +2 -2
- package/dist/routes.d.ts +2 -2
- package/dist/routes.mjs +2 -1
- package/dist/{rsc-pipeline-L4XOZ2TE.cjs → rsc-pipeline-JRGUZBYM.cjs} +11 -11
- package/dist/{rsc-pipeline-T3775JUA.mjs → rsc-pipeline-OLAVIKI3.mjs} +10 -10
- package/dist/{runtime-C8GUnNeP.d.ts → runtime-CWP-21hP.d.ts} +1 -1
- package/dist/{runtime-CaDswfWi.d.mts → runtime-CgJwe6H_.d.mts} +1 -1
- package/dist/{runtime-BIBGJO7V.cjs → runtime-G23RSLEK.cjs} +14 -14
- package/dist/{runtime-HRSFC4ZC.mjs → runtime-OGCHDACZ.mjs} +12 -12
- package/dist/{schema-dev-notice-LZ5NXGLN.mjs → schema-dev-notice-F6QYSOAI.mjs} +2 -2
- package/dist/{schema-dev-notice-XV7GZ3QJ.cjs → schema-dev-notice-UU7DMZEU.cjs} +3 -3
- package/dist/{search-client-BTXL5XWD.mjs → search-client-OXH6GBNO.mjs} +5 -3
- package/dist/search-client-ZZLKVO5R.cjs +15 -0
- package/dist/server-action-security.cjs +2 -2
- package/dist/server-action-security.mjs +1 -1
- package/dist/server-fn.cjs +3 -3
- package/dist/server-fn.mjs +2 -2
- package/dist/server-plugins.d.mts +2 -2
- package/dist/server-plugins.d.ts +2 -2
- package/dist/server-query-client.cjs +4 -3
- package/dist/server-query-client.mjs +3 -2
- package/dist/server-query.cjs +4 -4
- package/dist/server-query.mjs +3 -3
- package/dist/server.cjs +57 -55
- package/dist/server.d.mts +9 -9
- package/dist/server.d.ts +9 -9
- package/dist/server.mjs +34 -32
- package/dist/{spa-router-Dlv5ofg0.d.mts → spa-router-CVOL0Vrq.d.mts} +2 -2
- package/dist/{spa-router-qapSboKz.d.ts → spa-router-Kytv4jSB.d.ts} +2 -2
- package/dist/testing.cjs +12 -11
- package/dist/testing.d.mts +1 -1
- package/dist/testing.d.ts +1 -1
- package/dist/testing.mjs +9 -8
- package/dist/{utils-A-cYF81u.d.ts → utils-DbyXlzaj.d.ts} +1 -1
- package/dist/{utils-DyvlSxFk.d.mts → utils-Dsa1HZ7X.d.mts} +1 -1
- package/dist/version.cjs +2 -2
- package/dist/version.mjs +1 -1
- package/dist/vite.cjs +25 -23
- package/dist/vite.d.mts +4 -4
- package/dist/vite.d.ts +4 -4
- package/dist/vite.mjs +24 -22
- package/dist/workflows.cjs +4 -4
- package/dist/workflows.mjs +3 -3
- package/package.json +8 -3
- package/dist/base-path-leyrqXbX.d.mts +0 -19
- package/dist/base-path-leyrqXbX.d.ts +0 -19
- package/dist/chunk-OTOOJIUB.mjs +0 -34
- package/dist/search-client-QCYAL6AY.cjs +0 -13
package/README.md
CHANGED
|
@@ -1,11 +1,171 @@
|
|
|
1
1
|
# @farm.js/core
|
|
2
2
|
|
|
3
|
-
The core of Farm.js,
|
|
3
|
+
The core of Farm.js, a full-stack framework for the web and agents. It owns app-directory routing in
|
|
4
|
+
`src/app`, server rendering with streaming, API routes, server functions and queries, middleware,
|
|
5
|
+
integrations, and the Vite and Nitro pipeline that turns an app into deployable output.
|
|
4
6
|
|
|
5
7
|
See [Stability and Support](https://farmjs.dev/docs/stability) for what this package guarantees.
|
|
6
8
|
|
|
9
|
+
## Install
|
|
10
|
+
|
|
11
|
+
Start a new app with the starter, which installs the dependencies for you:
|
|
12
|
+
|
|
13
|
+
```bash
|
|
14
|
+
pnpm create @farm.js/app my-app --template basic
|
|
15
|
+
```
|
|
16
|
+
|
|
17
|
+
To add Farm to an existing project:
|
|
18
|
+
|
|
7
19
|
```bash
|
|
8
|
-
|
|
20
|
+
pnpm add @farm.js/core react react-dom
|
|
21
|
+
pnpm add -D @farm.js/cli
|
|
22
|
+
```
|
|
23
|
+
|
|
24
|
+
Farm requires Node.js 22.13 or newer. `@farm.js/cli` provides the `farm` command. Every peer
|
|
25
|
+
dependency is optional: `react` and `react-dom` (18.2 or 19) are needed for the default React
|
|
26
|
+
renderer, and apps on another renderer install that renderer's package instead. Add the others only
|
|
27
|
+
when the app uses the feature:
|
|
28
|
+
|
|
29
|
+
| Package | Needed for |
|
|
30
|
+
| -------------------- | --------------------------------------------------------------- |
|
|
31
|
+
| `@tailwindcss/vite` | Built-in Tailwind CSS (a stylesheet imports `tailwindcss`) |
|
|
32
|
+
| `@vercel/og` | `opengraph-image` and `twitter-image` JSX, `@farm.js/core/og` |
|
|
33
|
+
| `sharp` | Image optimization on Node, Vercel, Netlify, and in development |
|
|
34
|
+
| `@farming-labs/docs` | The docs engine (`docs` enabled, or a `docs.config.*` file) |
|
|
35
|
+
|
|
36
|
+
## Usage
|
|
37
|
+
|
|
38
|
+
A Farm app needs `src/app`, `farm.config.ts`, `package.json`, and `tsconfig.json`.
|
|
39
|
+
|
|
40
|
+
```ts
|
|
41
|
+
// farm.config.ts
|
|
42
|
+
import { defineConfig } from "@farm.js/core";
|
|
43
|
+
|
|
44
|
+
export default defineConfig({
|
|
45
|
+
deploy: {
|
|
46
|
+
target: "node",
|
|
47
|
+
},
|
|
48
|
+
});
|
|
49
|
+
```
|
|
50
|
+
|
|
51
|
+
```tsx
|
|
52
|
+
// src/app/layout.tsx
|
|
53
|
+
import type { LayoutProps } from "@farm.js/core";
|
|
54
|
+
|
|
55
|
+
export default function RootLayout({ children }: LayoutProps) {
|
|
56
|
+
return (
|
|
57
|
+
<html lang="en">
|
|
58
|
+
<body>{children}</body>
|
|
59
|
+
</html>
|
|
60
|
+
);
|
|
61
|
+
}
|
|
62
|
+
```
|
|
63
|
+
|
|
64
|
+
```tsx
|
|
65
|
+
// src/app/page.tsx
|
|
66
|
+
import type { PageProps } from "@farm.js/core";
|
|
67
|
+
|
|
68
|
+
export default function HomePage(_props: PageProps) {
|
|
69
|
+
return <h1>Hello from Farm.js</h1>;
|
|
70
|
+
}
|
|
71
|
+
```
|
|
72
|
+
|
|
73
|
+
```json
|
|
74
|
+
{
|
|
75
|
+
"scripts": {
|
|
76
|
+
"dev": "farm dev",
|
|
77
|
+
"build": "farm build",
|
|
78
|
+
"start": "node .farm/.output/server/index.mjs"
|
|
79
|
+
}
|
|
80
|
+
}
|
|
9
81
|
```
|
|
10
82
|
|
|
11
|
-
|
|
83
|
+
Run `pnpm dev`. Farm generates route, environment, and i18n types into `src/farm.d.ts` and keeps
|
|
84
|
+
them current while the dev server runs.
|
|
85
|
+
|
|
86
|
+
## What it provides
|
|
87
|
+
|
|
88
|
+
- **File routes.** Folders under `src/app` become URLs, with `page`, `layout`, `loading`, `error`,
|
|
89
|
+
and `not-found` files, `[id]` and `[...slug]` segments, `(group)` folders, and `@slot` folders.
|
|
90
|
+
- **Rendering.** Pages render on the server, and React streams the HTML. Opt a route into static
|
|
91
|
+
output with `export const dynamic = "force-static"` or into ISR with
|
|
92
|
+
`export const revalidate = 300`. Partial Prerendering is experimental (`experimental.ppr`).
|
|
93
|
+
- **APIs and data.** `route.ts` files export HTTP methods built with `createEndpoint`, and
|
|
94
|
+
`createApiClients` returns typed server and browser callers from the generated router.
|
|
95
|
+
`createServerFn` and `createServerQuery` define validated server functions and cached reads.
|
|
96
|
+
- **Middleware.** Entries in `farm.config.ts` run first, then `src/app/**/middleware.ts` files from
|
|
97
|
+
the root segment down, in development and production.
|
|
98
|
+
- **Integrations and plugins.** Provider packages mount through `integrations: { ... }` and
|
|
99
|
+
framework extensions through `plugins: [ ... ]`.
|
|
100
|
+
- **Markdown mirrors.** Every page also answers as Markdown at its URL plus `.md`, for agents and
|
|
101
|
+
crawlers.
|
|
102
|
+
|
|
103
|
+
```ts
|
|
104
|
+
// src/app/api/hello/route.ts
|
|
105
|
+
import { createEndpoint } from "@farm.js/core/api";
|
|
106
|
+
|
|
107
|
+
export const GET = createEndpoint(async () => Response.json({ message: "Hello" }));
|
|
108
|
+
```
|
|
109
|
+
|
|
110
|
+
Pass `body`, `query`, or `headers` schemas as the first argument to validate input before the
|
|
111
|
+
handler runs.
|
|
112
|
+
|
|
113
|
+
## Renderers
|
|
114
|
+
|
|
115
|
+
React is the default and is built into this package. Preact, Solid, Vue, and Svelte are beta
|
|
116
|
+
adapters selected with `renderer` (for example `renderer: vue()` from `@farm.js/vue`). Routing,
|
|
117
|
+
APIs, middleware, and deployment stay the same across renderers.
|
|
118
|
+
|
|
119
|
+
React Server Components are experimental and opt-in:
|
|
120
|
+
|
|
121
|
+
```ts
|
|
122
|
+
export default defineConfig({
|
|
123
|
+
experimental: {
|
|
124
|
+
serverComponents: true,
|
|
125
|
+
},
|
|
126
|
+
});
|
|
127
|
+
```
|
|
128
|
+
|
|
129
|
+
When the RSC packages are missing, `farm dev` and `farm build` install them with the app's package
|
|
130
|
+
manager. CI never changes dependencies.
|
|
131
|
+
|
|
132
|
+
## Deployment
|
|
133
|
+
|
|
134
|
+
`deploy.target` maps to a Nitro preset. With no target, `farm build` writes a Node server to
|
|
135
|
+
`.farm/.output`, unless it detects a Vercel, Netlify, or Cloudflare Pages build environment. Other
|
|
136
|
+
Nitro presets pass through `deploy.preset` on a best-effort basis.
|
|
137
|
+
|
|
138
|
+
| Target | Nitro preset |
|
|
139
|
+
| ------------ | ------------------ |
|
|
140
|
+
| `node` | `node-server` |
|
|
141
|
+
| `vercel` | `vercel` |
|
|
142
|
+
| `cloudflare` | `cloudflare-pages` |
|
|
143
|
+
| `netlify` | `netlify` |
|
|
144
|
+
|
|
145
|
+
## Entry points
|
|
146
|
+
|
|
147
|
+
| Import | Use it for |
|
|
148
|
+
| ----------------------------------- | -------------------------------------------------------- |
|
|
149
|
+
| `@farm.js/core` | `defineConfig` and types such as `PageProps`, `Metadata` |
|
|
150
|
+
| `@farm.js/core/api` | `createEndpoint` for `route.ts` handlers |
|
|
151
|
+
| `@farm.js/core/client` | `Link`, `useRouter`, `createApiClients` |
|
|
152
|
+
| `@farm.js/core/navigation` | `redirect`, `notFound`, `usePathname`, `useSearchParams` |
|
|
153
|
+
| `@farm.js/core/headers` | `headers()`, `cookies()`, `getCspNonce()` on the server |
|
|
154
|
+
| `@farm.js/core/server-fn` | `createServerFn` |
|
|
155
|
+
| `@farm.js/core/server-query` | `createServerQuery` |
|
|
156
|
+
| `@farm.js/core/server-query/client` | `useServerQuery`, `prefetchServerQuery` |
|
|
157
|
+
|
|
158
|
+
## Documentation
|
|
159
|
+
|
|
160
|
+
- [Getting Started](https://farmjs.dev/docs/getting-started)
|
|
161
|
+
- [Project Structure](https://farmjs.dev/docs/project-structure)
|
|
162
|
+
- [Routing](https://farmjs.dev/docs/routing)
|
|
163
|
+
- [Rendering Model](https://farmjs.dev/docs/server-rendering)
|
|
164
|
+
- [API Routes](https://farmjs.dev/docs/api-routes)
|
|
165
|
+
- [Server Queries](https://farmjs.dev/docs/server-queries)
|
|
166
|
+
- [Middleware](https://farmjs.dev/docs/middleware)
|
|
167
|
+
- [Configuration](https://farmjs.dev/docs/configuration)
|
|
168
|
+
- [Renderers](https://farmjs.dev/docs/renderers)
|
|
169
|
+
- [Deployment](https://farmjs.dev/docs/deployment)
|
|
170
|
+
|
|
171
|
+
Report issues and find examples in the [Farm.js repository](https://github.com/farming-labs/farm.js).
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { M as Metadata,
|
|
1
|
+
import { M as Metadata, aS as FarmAgentJsonLd, aT as FarmMCPServerRegistration, aU as FarmMarkdownResolvedConfig } from './client-plugins-CFBEfVPO.js';
|
|
2
2
|
|
|
3
3
|
type MetadataImageKind = "opengraph" | "twitter";
|
|
4
4
|
interface FarmMetadataImageReference {
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { M as Metadata,
|
|
1
|
+
import { M as Metadata, aS as FarmAgentJsonLd, aT as FarmMCPServerRegistration, aU as FarmMarkdownResolvedConfig } from './client-plugins-cqy_dQd0.mjs';
|
|
2
2
|
|
|
3
3
|
type MetadataImageKind = "opengraph" | "twitter";
|
|
4
4
|
interface FarmMetadataImageReference {
|
package/dist/agent-runtime.d.mts
CHANGED
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import { ChildProcess } from 'node:child_process';
|
|
2
|
-
import { B as BundleResultPayload, F as FarmPlugin, a as FarmIntegration } from './client-plugins-
|
|
2
|
+
import { B as BundleResultPayload, F as FarmPlugin, a as FarmIntegration } from './client-plugins-cqy_dQd0.mjs';
|
|
3
3
|
import './lifecycle-C2aLBOwu.mjs';
|
|
4
4
|
import './route-2_yXC6gv.mjs';
|
|
5
5
|
import './endpoint-BkMSCRf6.mjs';
|
package/dist/agent-runtime.d.ts
CHANGED
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import { ChildProcess } from 'node:child_process';
|
|
2
|
-
import { B as BundleResultPayload, F as FarmPlugin, a as FarmIntegration } from './client-plugins-
|
|
2
|
+
import { B as BundleResultPayload, F as FarmPlugin, a as FarmIntegration } from './client-plugins-CFBEfVPO.js';
|
|
3
3
|
import './lifecycle-C2aLBOwu.js';
|
|
4
4
|
import './route-DFhZj6jN.js';
|
|
5
5
|
import './endpoint-BgHn0lhl.js';
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
"use strict";Object.defineProperty(exports, "__esModule", {value: true}); function _interopRequireWildcard(obj) { if (obj && obj.__esModule) { return obj; } else { var newObj = {}; if (obj != null) { for (var key in obj) { if (Object.prototype.hasOwnProperty.call(obj, key)) { newObj[key] = obj[key]; } } } newObj.default = obj; return newObj; } } function _nullishCoalesce(lhs, rhsFn) { if (lhs != null) { return lhs; } else { return rhsFn(); } } function _optionalChain(ops) { let lastAccessLHS = undefined; let value = ops[0]; let i = 1; while (i < ops.length) { const op = ops[i]; const fn = ops[i + 1]; i += 2; if ((op === 'optionalAccess' || op === 'optionalCall') && value == null) { return undefined; } if (op === 'access' || op === 'optionalAccess') { lastAccessLHS = value; value = fn(value); } else if (op === 'call' || op === 'optionalCall') { value = fn((...args) => value.call(lastAccessLHS, ...args)); lastAccessLHS = undefined; } } return value; }
|
|
2
2
|
|
|
3
|
-
var
|
|
3
|
+
var _chunkX5BCMLGPcjs = require('./chunk-X5BCMLGP.cjs');
|
|
4
4
|
require('./chunk-BTZ5O6VM.cjs');
|
|
5
5
|
|
|
6
6
|
// src/mobile/analyzer.ts
|
|
@@ -8,7 +8,7 @@ var _crypto = require('crypto');
|
|
|
8
8
|
var _fs = require('fs');
|
|
9
9
|
var _promises = require('fs/promises');
|
|
10
10
|
var _path = require('path'); var path = _interopRequireWildcard(_path);
|
|
11
|
-
var ANALYZER_VERSION = `1:${
|
|
11
|
+
var ANALYZER_VERSION = `1:${_chunkX5BCMLGPcjs.FARM_VERSION}`;
|
|
12
12
|
var INTRINSIC_KINDS = {};
|
|
13
13
|
for (const tag of "div section main article header footer nav aside figure hr li".split(" ")) {
|
|
14
14
|
INTRINSIC_KINDS[tag] = "View";
|
|
@@ -1,8 +1,8 @@
|
|
|
1
1
|
"use strict";Object.defineProperty(exports, "__esModule", {value: true});
|
|
2
2
|
|
|
3
3
|
|
|
4
|
-
var
|
|
5
|
-
require('../chunk-
|
|
4
|
+
var _chunkKHXAJ2KAcjs = require('../chunk-KHXAJ2KA.cjs');
|
|
5
|
+
require('../chunk-NWUHS6GV.cjs');
|
|
6
6
|
require('../chunk-SBDWCDS6.cjs');
|
|
7
7
|
require('../chunk-RVGLYMJM.cjs');
|
|
8
8
|
require('../chunk-BBPDJGCU.cjs');
|
|
@@ -27,8 +27,8 @@ require('../chunk-FEFCISOX.cjs');
|
|
|
27
27
|
require('../chunk-SNP33A33.cjs');
|
|
28
28
|
require('../chunk-JYNNIGQO.cjs');
|
|
29
29
|
require('../chunk-LNVGXUL3.cjs');
|
|
30
|
-
require('../chunk-
|
|
31
|
-
require('../chunk-
|
|
30
|
+
require('../chunk-VQJYGZNX.cjs');
|
|
31
|
+
require('../chunk-SUCDVKUB.cjs');
|
|
32
32
|
require('../chunk-EVIWKPJV.cjs');
|
|
33
33
|
require('../chunk-LIFUPCXW.cjs');
|
|
34
34
|
require('../chunk-JYT7AN37.cjs');
|
|
@@ -60,4 +60,4 @@ require('../chunk-BTZ5O6VM.cjs');
|
|
|
60
60
|
|
|
61
61
|
|
|
62
62
|
|
|
63
|
-
exports.APIRouteConflictError =
|
|
63
|
+
exports.APIRouteConflictError = _chunkKHXAJ2KAcjs.APIRouteConflictError; exports.APIRouteManager = _chunkKHXAJ2KAcjs.APIRouteManager; exports.API_ROUTE_METHODS = _chunkOYNNA4DDcjs.API_ROUTE_METHODS; exports.getAllowedAPIRouteMethods = _chunkOYNNA4DDcjs.getAllowedAPIRouteMethods; exports.invokeAPIRouteEndpoint = _chunkOYNNA4DDcjs.invokeAPIRouteEndpoint; exports.isWebResponse = _chunkOYNNA4DDcjs.isWebResponse; exports.matchAPIRoute = _chunkCA7DNRHOcjs.matchAPIRoute; exports.normalizeRouteResponse = _chunkOYNNA4DDcjs.normalizeRouteResponse; exports.resolveAPIRouteEndpoint = _chunkOYNNA4DDcjs.resolveAPIRouteEndpoint;
|
|
@@ -1,6 +1,6 @@
|
|
|
1
|
-
import { P as PluginAPIDispatch } from '../runtime-
|
|
2
|
-
export { A as API_ROUTE_METHODS, g as getAllowedAPIRouteMethods, i as invokeAPIRouteEndpoint, a as isWebResponse, n as normalizeRouteResponse, r as resolveAPIRouteEndpoint } from '../runtime-
|
|
3
|
-
import { f as FarmRouteRuntimeConfig, F as FarmPlugin } from '../client-plugins-
|
|
1
|
+
import { P as PluginAPIDispatch } from '../runtime-CgJwe6H_.mjs';
|
|
2
|
+
export { A as API_ROUTE_METHODS, g as getAllowedAPIRouteMethods, i as invokeAPIRouteEndpoint, a as isWebResponse, n as normalizeRouteResponse, r as resolveAPIRouteEndpoint } from '../runtime-CgJwe6H_.mjs';
|
|
3
|
+
import { f as FarmRouteRuntimeConfig, F as FarmPlugin } from '../client-plugins-cqy_dQd0.mjs';
|
|
4
4
|
import { ViteDevServer } from 'vite';
|
|
5
5
|
import '../types-C41ePjvP.mjs';
|
|
6
6
|
import { F as FarmI18nRuntime } from '../runtime-CihDZ2Rn.mjs';
|
|
@@ -1,6 +1,6 @@
|
|
|
1
|
-
import { P as PluginAPIDispatch } from '../runtime-
|
|
2
|
-
export { A as API_ROUTE_METHODS, g as getAllowedAPIRouteMethods, i as invokeAPIRouteEndpoint, a as isWebResponse, n as normalizeRouteResponse, r as resolveAPIRouteEndpoint } from '../runtime-
|
|
3
|
-
import { f as FarmRouteRuntimeConfig, F as FarmPlugin } from '../client-plugins-
|
|
1
|
+
import { P as PluginAPIDispatch } from '../runtime-CWP-21hP.js';
|
|
2
|
+
export { A as API_ROUTE_METHODS, g as getAllowedAPIRouteMethods, i as invokeAPIRouteEndpoint, a as isWebResponse, n as normalizeRouteResponse, r as resolveAPIRouteEndpoint } from '../runtime-CWP-21hP.js';
|
|
3
|
+
import { f as FarmRouteRuntimeConfig, F as FarmPlugin } from '../client-plugins-CFBEfVPO.js';
|
|
4
4
|
import { ViteDevServer } from 'vite';
|
|
5
5
|
import '../types-C41ePjvP.js';
|
|
6
6
|
import { F as FarmI18nRuntime } from '../runtime-C4CmlOOh.js';
|
|
@@ -1,8 +1,8 @@
|
|
|
1
1
|
import {
|
|
2
2
|
APIRouteConflictError,
|
|
3
3
|
APIRouteManager
|
|
4
|
-
} from "../chunk-
|
|
5
|
-
import "../chunk-
|
|
4
|
+
} from "../chunk-KY32FWK7.mjs";
|
|
5
|
+
import "../chunk-FSXSQQTV.mjs";
|
|
6
6
|
import "../chunk-YX6AFPXC.mjs";
|
|
7
7
|
import "../chunk-CV6MFQ4Y.mjs";
|
|
8
8
|
import "../chunk-DU4VHHPJ.mjs";
|
|
@@ -27,8 +27,8 @@ import "../chunk-QSTRBKHZ.mjs";
|
|
|
27
27
|
import "../chunk-VHIXGZYH.mjs";
|
|
28
28
|
import "../chunk-TUOO6IK3.mjs";
|
|
29
29
|
import "../chunk-MU5V7XHL.mjs";
|
|
30
|
-
import "../chunk-
|
|
31
|
-
import "../chunk-
|
|
30
|
+
import "../chunk-Y3N5BFRJ.mjs";
|
|
31
|
+
import "../chunk-H3ASZDT7.mjs";
|
|
32
32
|
import "../chunk-2DA7CLY7.mjs";
|
|
33
33
|
import "../chunk-GFT5AHAT.mjs";
|
|
34
34
|
import "../chunk-D2LCAV6L.mjs";
|
package/dist/api/runtime.d.mts
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
export { i as isEndpointFailure, p as parseRouteSchema } from '../endpoint-BkMSCRf6.mjs';
|
|
2
|
-
export { b as APIRouteShapeSource, A as API_ROUTE_METHODS, c as createEndpointFailureResponse, d as createStaticAPIRouteMatcherAtBasePath, g as getAllowedAPIRouteMethods, i as invokeAPIRouteEndpoint, e as isFarmAPIPathname, a as isWebResponse, m as matchAPIRouteAtBasePath, f as mergePluginAPIRoutes, n as normalizeRouteResponse, h as registerAPIRouteShape, r as resolveAPIRouteEndpoint } from '../runtime-
|
|
2
|
+
export { b as APIRouteShapeSource, A as API_ROUTE_METHODS, c as createEndpointFailureResponse, d as createStaticAPIRouteMatcherAtBasePath, g as getAllowedAPIRouteMethods, i as invokeAPIRouteEndpoint, e as isFarmAPIPathname, a as isWebResponse, m as matchAPIRouteAtBasePath, f as mergePluginAPIRoutes, n as normalizeRouteResponse, h as registerAPIRouteShape, r as resolveAPIRouteEndpoint } from '../runtime-CgJwe6H_.mjs';
|
|
3
3
|
export { A as APIRouteMatch, a as APIRouteParamValue, b as APIRouteParams, m as matchAPIRoute } from '../route-pattern-CVsVbq5n.mjs';
|
|
4
|
-
export {
|
|
4
|
+
export { aH as FarmMCPCatalogDetails, aT as FarmMCPServerRegistration, bs as _findFarmMCPEndpointTool, bt as _publishFarmMCPCatalog, bu as registerFarmMCPServer } from '../client-plugins-cqy_dQd0.mjs';
|
|
5
5
|
import '../cache.mjs';
|
|
6
6
|
import '../route-2_yXC6gv.mjs';
|
|
7
7
|
import '../lifecycle-C2aLBOwu.mjs';
|
package/dist/api/runtime.d.ts
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
export { i as isEndpointFailure, p as parseRouteSchema } from '../endpoint-BgHn0lhl.js';
|
|
2
|
-
export { b as APIRouteShapeSource, A as API_ROUTE_METHODS, c as createEndpointFailureResponse, d as createStaticAPIRouteMatcherAtBasePath, g as getAllowedAPIRouteMethods, i as invokeAPIRouteEndpoint, e as isFarmAPIPathname, a as isWebResponse, m as matchAPIRouteAtBasePath, f as mergePluginAPIRoutes, n as normalizeRouteResponse, h as registerAPIRouteShape, r as resolveAPIRouteEndpoint } from '../runtime-
|
|
2
|
+
export { b as APIRouteShapeSource, A as API_ROUTE_METHODS, c as createEndpointFailureResponse, d as createStaticAPIRouteMatcherAtBasePath, g as getAllowedAPIRouteMethods, i as invokeAPIRouteEndpoint, e as isFarmAPIPathname, a as isWebResponse, m as matchAPIRouteAtBasePath, f as mergePluginAPIRoutes, n as normalizeRouteResponse, h as registerAPIRouteShape, r as resolveAPIRouteEndpoint } from '../runtime-CWP-21hP.js';
|
|
3
3
|
export { A as APIRouteMatch, a as APIRouteParamValue, b as APIRouteParams, m as matchAPIRoute } from '../route-pattern-CVsVbq5n.js';
|
|
4
|
-
export {
|
|
4
|
+
export { aH as FarmMCPCatalogDetails, aT as FarmMCPServerRegistration, bs as _findFarmMCPEndpointTool, bt as _publishFarmMCPCatalog, bu as registerFarmMCPServer } from '../client-plugins-CFBEfVPO.js';
|
|
5
5
|
import '../cache.js';
|
|
6
6
|
import '../route-DFhZj6jN.js';
|
|
7
7
|
import '../lifecycle-C2aLBOwu.js';
|
package/dist/api.cjs
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
"use strict";Object.defineProperty(exports, "__esModule", {value: true});
|
|
2
2
|
|
|
3
|
-
var
|
|
3
|
+
var _chunkPDJSL7PLcjs = require('./chunk-PDJSL7PL.cjs');
|
|
4
4
|
|
|
5
5
|
|
|
6
6
|
|
|
@@ -23,8 +23,8 @@ require('./chunk-P2355C6E.cjs');
|
|
|
23
23
|
|
|
24
24
|
|
|
25
25
|
|
|
26
|
-
var
|
|
27
|
-
require('./chunk-
|
|
26
|
+
var _chunkKHXAJ2KAcjs = require('./chunk-KHXAJ2KA.cjs');
|
|
27
|
+
require('./chunk-NWUHS6GV.cjs');
|
|
28
28
|
require('./chunk-SBDWCDS6.cjs');
|
|
29
29
|
require('./chunk-RVGLYMJM.cjs');
|
|
30
30
|
require('./chunk-BBPDJGCU.cjs');
|
|
@@ -64,8 +64,8 @@ require('./chunk-Y3WG64CP.cjs');
|
|
|
64
64
|
require('./chunk-SNP33A33.cjs');
|
|
65
65
|
require('./chunk-JYNNIGQO.cjs');
|
|
66
66
|
require('./chunk-LNVGXUL3.cjs');
|
|
67
|
-
require('./chunk-
|
|
68
|
-
require('./chunk-
|
|
67
|
+
require('./chunk-VQJYGZNX.cjs');
|
|
68
|
+
require('./chunk-SUCDVKUB.cjs');
|
|
69
69
|
require('./chunk-EVIWKPJV.cjs');
|
|
70
70
|
require('./chunk-Z5MZDFX4.cjs');
|
|
71
71
|
require('./chunk-LIFUPCXW.cjs');
|
|
@@ -155,4 +155,4 @@ require('./chunk-BTZ5O6VM.cjs');
|
|
|
155
155
|
|
|
156
156
|
|
|
157
157
|
|
|
158
|
-
exports.APIClientError = _chunkVSLM6BHXcjs.APIClientError; exports.APIRouteConflictError =
|
|
158
|
+
exports.APIClientError = _chunkVSLM6BHXcjs.APIClientError; exports.APIRouteConflictError = _chunkKHXAJ2KAcjs.APIRouteConflictError; exports.APIRouteManager = _chunkKHXAJ2KAcjs.APIRouteManager; exports.API_ROUTE_METHODS = _chunkOYNNA4DDcjs.API_ROUTE_METHODS; exports.DEFAULT_FARM_API_BASE_PATH = _chunkIWFV5ZEDcjs.DEFAULT_FARM_API_BASE_PATH; exports.DELETE = _chunk5C7XMKQ4cjs.DELETE; exports.EndpointFailure = _chunk5C7XMKQ4cjs.EndpointFailure; exports.FARM_API_ROUTE_META_SYMBOL = _chunkVSLM6BHXcjs.FARM_API_ROUTE_META_SYMBOL; exports.FARM_API_ROUTE_REF_SYMBOL = _chunkVSLM6BHXcjs.FARM_API_ROUTE_REF_SYMBOL; exports.GET = _chunk5C7XMKQ4cjs.GET; exports.HEAD = _chunk5C7XMKQ4cjs.HEAD; exports.OPTIONS = _chunk5C7XMKQ4cjs.OPTIONS; exports.PATCH = _chunk5C7XMKQ4cjs.PATCH; exports.POST = _chunk5C7XMKQ4cjs.POST; exports.PUT = _chunk5C7XMKQ4cjs.PUT; exports.QUERY = _chunk5C7XMKQ4cjs.QUERY; exports.applyServerFnOptimisticUpdates = _chunkVSLM6BHXcjs.applyServerFnOptimisticUpdates; exports.createAPIClient = _chunkVSLM6BHXcjs.createAPIClient; exports.createApiClients = _chunkVSLM6BHXcjs.createApiClients; exports.createEndpoint = _chunk5C7XMKQ4cjs.createEndpoint; exports.createRouteFactory = _chunk5C7XMKQ4cjs.createRouteFactory; exports.createServerAPIClient = _chunkVSLM6BHXcjs.createServerAPIClient; exports.farmApiPlugin = _chunkPDJSL7PLcjs.farmApiPlugin; exports.getAPIRouteRefMetadata = _chunkVSLM6BHXcjs.getAPIRouteRefMetadata; exports.getAllowedAPIRouteMethods = _chunkOYNNA4DDcjs.getAllowedAPIRouteMethods; exports.getFarmAPIBaseURL = _chunkIWFV5ZEDcjs.getFarmAPIBaseURL; exports.invokeAPIRouteEndpoint = _chunkOYNNA4DDcjs.invokeAPIRouteEndpoint; exports.isAPIRouteRef = _chunkVSLM6BHXcjs.isAPIRouteRef; exports.isEndpointFailure = _chunk5C7XMKQ4cjs.isEndpointFailure; exports.isFarmAPIStream = _chunkHLYRXN2Icjs.isFarmAPIStream; exports.isJSONStreamResponse = _chunkHLYRXN2Icjs.isJSONStreamResponse; exports.isMultipartSchema = _chunkHLYRXN2Icjs.isMultipartSchema; exports.isWebResponse = _chunkOYNNA4DDcjs.isWebResponse; exports.jsonStream = _chunkHLYRXN2Icjs.jsonStream; exports.matchAPIRoute = _chunkCA7DNRHOcjs.matchAPIRoute; exports.multipart = _chunkHLYRXN2Icjs.multipart; exports.normalizeFarmAPIBasePath = _chunkIWFV5ZEDcjs.normalizeFarmAPIBasePath; exports.normalizeFarmAPIConfig = _chunkIWFV5ZEDcjs.normalizeFarmAPIConfig; exports.normalizeRouteResponse = _chunkOYNNA4DDcjs.normalizeRouteResponse; exports.readJSONStream = _chunkHLYRXN2Icjs.readJSONStream; exports.resolveAPIRouteEndpoint = _chunkOYNNA4DDcjs.resolveAPIRouteEndpoint; exports.resolveFarmAPIConfig = _chunkIWFV5ZEDcjs.resolveFarmAPIConfig; exports.resolveFarmAPIRequestURL = _chunkIWFV5ZEDcjs.resolveFarmAPIRequestURL; exports.resolveFarmAPIServerBasePath = _chunkB5BBTPJQcjs.resolveFarmAPIServerBasePath; exports.resolvePluginRoutes = _chunk5C7XMKQ4cjs.resolvePluginRoutes; exports.resolveServerFnInvalidateTargets = _chunkVSLM6BHXcjs.resolveServerFnInvalidateTargets; exports.settleServerFnOptimisticUpdates = _chunkVSLM6BHXcjs.settleServerFnOptimisticUpdates; exports.toFormData = _chunkHLYRXN2Icjs.toFormData;
|
package/dist/api.d.mts
CHANGED
|
@@ -1,13 +1,13 @@
|
|
|
1
1
|
export { A as AnyEndpointMiddleware, D as DELETE, g as EndpointErrorContracts, h as EndpointErrorDefinition, j as EndpointErrorDefinitions, k as EndpointErrorHandler, l as EndpointErrorSchema, m as EndpointFail, f as EndpointFailure, n as EndpointHandler, o as EndpointInvalidationContext, q as EndpointInvalidationTarget, r as EndpointInvalidations, E as EndpointMCPMetadata, a as EndpointMCPOptions, s as EndpointMiddleware, t as EndpointMiddlewareContext, c as EndpointMiddlewareResult, b as EndpointOpenAPIMetadata, u as EndpointOptions, v as EndpointParamValue, w as EndpointParams, F as FarmAPIStream, x as FarmStreamResponse, G as GET, H as HEAD, I as InferEndpointMiddlewareContext, M as MultipartField, y as MultipartSchema, z as MultipartValues, O as OPTIONS, P as PATCH, B as POST, C as PUT, Q as QUERY, T as TypedEndpoint, J as TypedFormData, K as createEndpoint, i as isEndpointFailure, L as isFarmAPIStream, N as isJSONStreamResponse, S as isMultipartSchema, U as jsonStream, V as multipart, W as readJSONStream, X as toFormData } from './endpoint-BkMSCRf6.mjs';
|
|
2
2
|
export { APIRoute, APIRouteConflictError, APIRouteHandlerOptions, APIRouteManager, APIRouteManagerOptions } from './api/route-manager.mjs';
|
|
3
3
|
export { A as APIClient, a as APIClientError, b as APIClientOptions, c as APIClientSystemError, d as APIClientWithoutIntegrationsOptions, e as APIQueryPrimitive, f as APIQueryValue, g as APIResult, h as APIRouteManifest, i as APIRouteRefMetadata, j as ApiClients, C as CacheKey, k as CacheOptions, l as CachePolicy, m as CacheScope, p as ClientOptions, F as FARM_API_ROUTE_META_SYMBOL, s as FARM_API_ROUTE_REF_SYMBOL, P as InvalidateOptions, Q as InvalidateTarget, S as OptimisticOptions, T as OptimisticUpdate, U as RequestEvent, V as ResponseEvent, W as RetryAttemptContext, R as RetryOptions, X as RouteAPIClient, Y as ServerAPIClient, Z as ServerAPIClientOptions, _ as ServerAPIClientWithoutIntegrationsOptions, $ as StatusEvent, a0 as StatusPhase, a1 as applyServerFnOptimisticUpdates, a2 as createAPIClient, a3 as createApiClients, a9 as createServerAPIClient, aa as getAPIRouteRefMetadata, af as isAPIRouteRef, ag as resolveServerFnInvalidateTargets, ah as settleServerFnOptimisticUpdates } from './api-client-CFdv-Xgh.mjs';
|
|
4
|
-
import {
|
|
5
|
-
export {
|
|
4
|
+
import { bG as ResolvedFarmAPIConfig } from './client-plugins-cqy_dQd0.mjs';
|
|
5
|
+
export { bZ as DEFAULT_FARM_API_BASE_PATH, c6 as FarmAPIConfig, c7 as FarmAPIConfigResolverContext, c8 as FarmAPIConfigValue, f7 as getFarmAPIBaseURL, fA as normalizeFarmAPIBasePath, fB as normalizeFarmAPIConfig, fI as resolveFarmAPIConfig, fJ as resolveFarmAPIRequestURL } from './client-plugins-cqy_dQd0.mjs';
|
|
6
6
|
import { Plugin } from 'vite';
|
|
7
7
|
import { c as PluginRoutesFactory } from './route-2_yXC6gv.mjs';
|
|
8
8
|
export { j as PluginAPIRouter, P as PluginLocalAPI, a as PluginLocalAPIEndpoint, b as PluginRoutes, R as RouteDefinition, k as RouteFactory, l as RouteInputSchemas, m as RouteJSON, d as RouteMethod, n as RouteOptions, o as RoutePathParams, q as createRouteFactory, u as resolvePluginRoutes } from './route-2_yXC6gv.mjs';
|
|
9
9
|
export { A as APIRouteMatch, a as APIRouteParamValue, b as APIRouteParams, m as matchAPIRoute } from './route-pattern-CVsVbq5n.mjs';
|
|
10
|
-
export { A as API_ROUTE_METHODS, g as getAllowedAPIRouteMethods, i as invokeAPIRouteEndpoint, a as isWebResponse, n as normalizeRouteResponse, r as resolveAPIRouteEndpoint } from './runtime-
|
|
10
|
+
export { A as API_ROUTE_METHODS, g as getAllowedAPIRouteMethods, i as invokeAPIRouteEndpoint, a as isWebResponse, n as normalizeRouteResponse, r as resolveAPIRouteEndpoint } from './runtime-CgJwe6H_.mjs';
|
|
11
11
|
import './cache.mjs';
|
|
12
12
|
import './types-C41ePjvP.mjs';
|
|
13
13
|
import './runtime-CihDZ2Rn.mjs';
|
package/dist/api.d.ts
CHANGED
|
@@ -1,13 +1,13 @@
|
|
|
1
1
|
export { A as AnyEndpointMiddleware, D as DELETE, g as EndpointErrorContracts, h as EndpointErrorDefinition, j as EndpointErrorDefinitions, k as EndpointErrorHandler, l as EndpointErrorSchema, m as EndpointFail, f as EndpointFailure, n as EndpointHandler, o as EndpointInvalidationContext, q as EndpointInvalidationTarget, r as EndpointInvalidations, E as EndpointMCPMetadata, a as EndpointMCPOptions, s as EndpointMiddleware, t as EndpointMiddlewareContext, c as EndpointMiddlewareResult, b as EndpointOpenAPIMetadata, u as EndpointOptions, v as EndpointParamValue, w as EndpointParams, F as FarmAPIStream, x as FarmStreamResponse, G as GET, H as HEAD, I as InferEndpointMiddlewareContext, M as MultipartField, y as MultipartSchema, z as MultipartValues, O as OPTIONS, P as PATCH, B as POST, C as PUT, Q as QUERY, T as TypedEndpoint, J as TypedFormData, K as createEndpoint, i as isEndpointFailure, L as isFarmAPIStream, N as isJSONStreamResponse, S as isMultipartSchema, U as jsonStream, V as multipart, W as readJSONStream, X as toFormData } from './endpoint-BgHn0lhl.js';
|
|
2
2
|
export { APIRoute, APIRouteConflictError, APIRouteHandlerOptions, APIRouteManager, APIRouteManagerOptions } from './api/route-manager.js';
|
|
3
3
|
export { A as APIClient, a as APIClientError, b as APIClientOptions, c as APIClientSystemError, d as APIClientWithoutIntegrationsOptions, e as APIQueryPrimitive, f as APIQueryValue, g as APIResult, h as APIRouteManifest, i as APIRouteRefMetadata, j as ApiClients, C as CacheKey, k as CacheOptions, l as CachePolicy, m as CacheScope, p as ClientOptions, F as FARM_API_ROUTE_META_SYMBOL, s as FARM_API_ROUTE_REF_SYMBOL, P as InvalidateOptions, Q as InvalidateTarget, S as OptimisticOptions, T as OptimisticUpdate, U as RequestEvent, V as ResponseEvent, W as RetryAttemptContext, R as RetryOptions, X as RouteAPIClient, Y as ServerAPIClient, Z as ServerAPIClientOptions, _ as ServerAPIClientWithoutIntegrationsOptions, $ as StatusEvent, a0 as StatusPhase, a1 as applyServerFnOptimisticUpdates, a2 as createAPIClient, a3 as createApiClients, a9 as createServerAPIClient, aa as getAPIRouteRefMetadata, af as isAPIRouteRef, ag as resolveServerFnInvalidateTargets, ah as settleServerFnOptimisticUpdates } from './api-client-CvI5oOBE.js';
|
|
4
|
-
import {
|
|
5
|
-
export {
|
|
4
|
+
import { bG as ResolvedFarmAPIConfig } from './client-plugins-CFBEfVPO.js';
|
|
5
|
+
export { bZ as DEFAULT_FARM_API_BASE_PATH, c6 as FarmAPIConfig, c7 as FarmAPIConfigResolverContext, c8 as FarmAPIConfigValue, f7 as getFarmAPIBaseURL, fA as normalizeFarmAPIBasePath, fB as normalizeFarmAPIConfig, fI as resolveFarmAPIConfig, fJ as resolveFarmAPIRequestURL } from './client-plugins-CFBEfVPO.js';
|
|
6
6
|
import { Plugin } from 'vite';
|
|
7
7
|
import { c as PluginRoutesFactory } from './route-DFhZj6jN.js';
|
|
8
8
|
export { j as PluginAPIRouter, P as PluginLocalAPI, a as PluginLocalAPIEndpoint, b as PluginRoutes, R as RouteDefinition, k as RouteFactory, l as RouteInputSchemas, m as RouteJSON, d as RouteMethod, n as RouteOptions, o as RoutePathParams, q as createRouteFactory, u as resolvePluginRoutes } from './route-DFhZj6jN.js';
|
|
9
9
|
export { A as APIRouteMatch, a as APIRouteParamValue, b as APIRouteParams, m as matchAPIRoute } from './route-pattern-CVsVbq5n.js';
|
|
10
|
-
export { A as API_ROUTE_METHODS, g as getAllowedAPIRouteMethods, i as invokeAPIRouteEndpoint, a as isWebResponse, n as normalizeRouteResponse, r as resolveAPIRouteEndpoint } from './runtime-
|
|
10
|
+
export { A as API_ROUTE_METHODS, g as getAllowedAPIRouteMethods, i as invokeAPIRouteEndpoint, a as isWebResponse, n as normalizeRouteResponse, r as resolveAPIRouteEndpoint } from './runtime-CWP-21hP.js';
|
|
11
11
|
import './cache.js';
|
|
12
12
|
import './types-C41ePjvP.js';
|
|
13
13
|
import './runtime-C4CmlOOh.js';
|
package/dist/api.mjs
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import {
|
|
2
2
|
farmApiPlugin
|
|
3
|
-
} from "./chunk-
|
|
3
|
+
} from "./chunk-QI5AQMEE.mjs";
|
|
4
4
|
import {
|
|
5
5
|
APIClientError,
|
|
6
6
|
FARM_API_ROUTE_META_SYMBOL,
|
|
@@ -23,8 +23,8 @@ import "./chunk-IYEY3JWJ.mjs";
|
|
|
23
23
|
import {
|
|
24
24
|
APIRouteConflictError,
|
|
25
25
|
APIRouteManager
|
|
26
|
-
} from "./chunk-
|
|
27
|
-
import "./chunk-
|
|
26
|
+
} from "./chunk-KY32FWK7.mjs";
|
|
27
|
+
import "./chunk-FSXSQQTV.mjs";
|
|
28
28
|
import "./chunk-YX6AFPXC.mjs";
|
|
29
29
|
import "./chunk-CV6MFQ4Y.mjs";
|
|
30
30
|
import "./chunk-DU4VHHPJ.mjs";
|
|
@@ -64,8 +64,8 @@ import "./chunk-IGL6CO6M.mjs";
|
|
|
64
64
|
import "./chunk-VHIXGZYH.mjs";
|
|
65
65
|
import "./chunk-TUOO6IK3.mjs";
|
|
66
66
|
import "./chunk-MU5V7XHL.mjs";
|
|
67
|
-
import "./chunk-
|
|
68
|
-
import "./chunk-
|
|
67
|
+
import "./chunk-Y3N5BFRJ.mjs";
|
|
68
|
+
import "./chunk-H3ASZDT7.mjs";
|
|
69
69
|
import "./chunk-2DA7CLY7.mjs";
|
|
70
70
|
import "./chunk-IUQLRTTO.mjs";
|
|
71
71
|
import "./chunk-GFT5AHAT.mjs";
|
|
@@ -1,14 +1,14 @@
|
|
|
1
|
-
import {
|
|
1
|
+
import { aV as FarmConfig, P as ParsedRoute, bE as ResolvedFarmRouteRuntimeConfig, bF as ApplicationMetadataRouteKind, i as RouteModule, b8 as LayoutModule, aQ as SSGCollectionResult, s as FarmRequest, t as FarmResponse, bG as ResolvedFarmAPIConfig, bH as FarmDocsResolvedConfig, aU as FarmMarkdownResolvedConfig, h as FarmMdxResolvedConfig, ax as ResolvedFarmDevtoolsConfig, bI as ResolvedFarmDevIndicatorsConfig, bJ as ResolvedFarmAuthConfig, bK as ResolvedFarmPerformanceConfig, bL as ResolvedFarmSecurityConfig } from './client-plugins-CFBEfVPO.js';
|
|
2
2
|
import { F as FarmWorkflowsResolvedConfig } from './workflows-CRMzQZ3k.js';
|
|
3
3
|
import { FarmCronResolvedConfig } from './cron.js';
|
|
4
4
|
import { R as ResolvedFarmImageConfig } from './image-config-CeDgNyX4.js';
|
|
5
5
|
import { ProgrammaticRedirectRoute, ProgrammaticRouteSearchClientOptions } from './routes.js';
|
|
6
|
-
import { P as ProgrammaticClientRoutes } from './programmatic-routes-client-
|
|
6
|
+
import { P as ProgrammaticClientRoutes } from './programmatic-routes-client-CBqkNhBy.js';
|
|
7
7
|
import { ViteDevServer } from 'vite';
|
|
8
8
|
import { F as FarmIslandStrategy } from './island-CfGru1MO.js';
|
|
9
|
-
import { M as MetadataImageKind, c as createFarmDefaultMCPServer } from './agent-mcp-
|
|
9
|
+
import { M as MetadataImageKind, c as createFarmDefaultMCPServer } from './agent-mcp-BBMfNpsC.js';
|
|
10
10
|
import { FarmServerRendererRuntime, FarmRenderer } from './renderer.js';
|
|
11
|
-
import { F as FarmRouteRenderPlan } from './render-plan-
|
|
11
|
+
import { F as FarmRouteRenderPlan } from './render-plan-CrqcBbnV.js';
|
|
12
12
|
import { R as ResolvedFarmI18nConfig } from './types-C41ePjvP.js';
|
|
13
13
|
import { F as FarmI18nRuntime } from './runtime-C4CmlOOh.js';
|
|
14
14
|
import { R as ResolvedFarmThemeConfig } from './types-DQnyD3VD.js';
|
|
@@ -1,14 +1,14 @@
|
|
|
1
|
-
import {
|
|
1
|
+
import { aV as FarmConfig, P as ParsedRoute, bE as ResolvedFarmRouteRuntimeConfig, bF as ApplicationMetadataRouteKind, i as RouteModule, b8 as LayoutModule, aQ as SSGCollectionResult, s as FarmRequest, t as FarmResponse, bG as ResolvedFarmAPIConfig, bH as FarmDocsResolvedConfig, aU as FarmMarkdownResolvedConfig, h as FarmMdxResolvedConfig, ax as ResolvedFarmDevtoolsConfig, bI as ResolvedFarmDevIndicatorsConfig, bJ as ResolvedFarmAuthConfig, bK as ResolvedFarmPerformanceConfig, bL as ResolvedFarmSecurityConfig } from './client-plugins-cqy_dQd0.mjs';
|
|
2
2
|
import { F as FarmWorkflowsResolvedConfig } from './workflows-CRMzQZ3k.mjs';
|
|
3
3
|
import { FarmCronResolvedConfig } from './cron.mjs';
|
|
4
4
|
import { R as ResolvedFarmImageConfig } from './image-config-CeDgNyX4.mjs';
|
|
5
5
|
import { ProgrammaticRedirectRoute, ProgrammaticRouteSearchClientOptions } from './routes.mjs';
|
|
6
|
-
import { P as ProgrammaticClientRoutes } from './programmatic-routes-client-
|
|
6
|
+
import { P as ProgrammaticClientRoutes } from './programmatic-routes-client-NpqGBn-i.mjs';
|
|
7
7
|
import { ViteDevServer } from 'vite';
|
|
8
8
|
import { F as FarmIslandStrategy } from './island-CfGru1MO.mjs';
|
|
9
|
-
import { M as MetadataImageKind, c as createFarmDefaultMCPServer } from './agent-mcp-
|
|
9
|
+
import { M as MetadataImageKind, c as createFarmDefaultMCPServer } from './agent-mcp-D44ip11f.mjs';
|
|
10
10
|
import { FarmServerRendererRuntime, FarmRenderer } from './renderer.mjs';
|
|
11
|
-
import { F as FarmRouteRenderPlan } from './render-plan-
|
|
11
|
+
import { F as FarmRouteRenderPlan } from './render-plan-C9sWvDTv.mjs';
|
|
12
12
|
import { R as ResolvedFarmI18nConfig } from './types-C41ePjvP.mjs';
|
|
13
13
|
import { F as FarmI18nRuntime } from './runtime-CihDZ2Rn.mjs';
|
|
14
14
|
import { R as ResolvedFarmThemeConfig } from './types-DQnyD3VD.mjs';
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import {
|
|
1
|
+
import { aH as FarmMCPCatalogDetails, aI as ResolvedFarmAppManifestConfig } from './client-plugins-cqy_dQd0.mjs';
|
|
2
2
|
|
|
3
3
|
interface FarmAppManifestWebMCPTool {
|
|
4
4
|
name: string;
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import {
|
|
1
|
+
import { aH as FarmMCPCatalogDetails, aI as ResolvedFarmAppManifestConfig } from './client-plugins-CFBEfVPO.js';
|
|
2
2
|
|
|
3
3
|
interface FarmAppManifestWebMCPTool {
|
|
4
4
|
name: string;
|
package/dist/app-markdown.d.mts
CHANGED
|
@@ -1,5 +1,5 @@
|
|
|
1
|
-
import { g as FarmMdxComponents, h as FarmMdxResolvedConfig, i as RouteModule } from './client-plugins-
|
|
2
|
-
export { j as FARM_MARKDOWN_CONTENT_TYPE, m as FarmMdxComponent, n as FarmMdxUserConfig, k as createFarmMarkdownErrorBody, l as farmRequestWantsMarkdown, r as resolveFarmMdxComponentsModulePath, o as resolveMdxConfig } from './client-plugins-
|
|
1
|
+
import { g as FarmMdxComponents, h as FarmMdxResolvedConfig, i as RouteModule } from './client-plugins-cqy_dQd0.mjs';
|
|
2
|
+
export { j as FARM_MARKDOWN_CONTENT_TYPE, m as FarmMdxComponent, n as FarmMdxUserConfig, k as createFarmMarkdownErrorBody, l as farmRequestWantsMarkdown, r as resolveFarmMdxComponentsModulePath, o as resolveMdxConfig } from './client-plugins-cqy_dQd0.mjs';
|
|
3
3
|
export { FARM_MARKDOWN_ANONYMOUS_CLIENT_ADDRESS, FarmMarkdownPageModuleInput, FarmMarkdownPageSource, createFarmMarkdownRouteModule, createFarmMarkdownSourceResponse, createMarkdownMetadata, isFarmMarkdownPageFile, isFarmMarkdownPublicSourceResponse, normalizeFarmMarkdownRoutePath, parseMarkdownFrontmatter, titleFromMarkdown } from './internal/app-markdown-runtime.mjs';
|
|
4
4
|
import './lifecycle-C2aLBOwu.mjs';
|
|
5
5
|
import './route-2_yXC6gv.mjs';
|
package/dist/app-markdown.d.ts
CHANGED
|
@@ -1,5 +1,5 @@
|
|
|
1
|
-
import { g as FarmMdxComponents, h as FarmMdxResolvedConfig, i as RouteModule } from './client-plugins-
|
|
2
|
-
export { j as FARM_MARKDOWN_CONTENT_TYPE, m as FarmMdxComponent, n as FarmMdxUserConfig, k as createFarmMarkdownErrorBody, l as farmRequestWantsMarkdown, r as resolveFarmMdxComponentsModulePath, o as resolveMdxConfig } from './client-plugins-
|
|
1
|
+
import { g as FarmMdxComponents, h as FarmMdxResolvedConfig, i as RouteModule } from './client-plugins-CFBEfVPO.js';
|
|
2
|
+
export { j as FARM_MARKDOWN_CONTENT_TYPE, m as FarmMdxComponent, n as FarmMdxUserConfig, k as createFarmMarkdownErrorBody, l as farmRequestWantsMarkdown, r as resolveFarmMdxComponentsModulePath, o as resolveMdxConfig } from './client-plugins-CFBEfVPO.js';
|
|
3
3
|
export { FARM_MARKDOWN_ANONYMOUS_CLIENT_ADDRESS, FarmMarkdownPageModuleInput, FarmMarkdownPageSource, createFarmMarkdownRouteModule, createFarmMarkdownSourceResponse, createMarkdownMetadata, isFarmMarkdownPageFile, isFarmMarkdownPublicSourceResponse, normalizeFarmMarkdownRoutePath, parseMarkdownFrontmatter, titleFromMarkdown } from './internal/app-markdown-runtime.js';
|
|
4
4
|
import './lifecycle-C2aLBOwu.js';
|
|
5
5
|
import './route-DFhZj6jN.js';
|
|
@@ -0,0 +1,10 @@
|
|
|
1
|
+
/** @internal Configure the app-wide URL preference for framework link rendering. */
|
|
2
|
+
declare function setFarmTrailingSlashPreference(enabled: boolean | undefined): void;
|
|
3
|
+
declare function resolveFarmTrailingSlashRedirect(url: URL, enabled: boolean): string | null;
|
|
4
|
+
|
|
5
|
+
/** @internal Configure the app-wide base path for framework link rendering. */
|
|
6
|
+
declare function setFarmBasePath(basePath: string | undefined): void;
|
|
7
|
+
declare function applyFarmBasePath(href: string, basePath?: string): string;
|
|
8
|
+
declare function stripFarmBasePath(pathname: string, basePath?: string): string;
|
|
9
|
+
|
|
10
|
+
export { setFarmTrailingSlashPreference as a, stripFarmBasePath as b, applyFarmBasePath as c, resolveFarmTrailingSlashRedirect as r, setFarmBasePath as s };
|
|
@@ -0,0 +1,10 @@
|
|
|
1
|
+
/** @internal Configure the app-wide URL preference for framework link rendering. */
|
|
2
|
+
declare function setFarmTrailingSlashPreference(enabled: boolean | undefined): void;
|
|
3
|
+
declare function resolveFarmTrailingSlashRedirect(url: URL, enabled: boolean): string | null;
|
|
4
|
+
|
|
5
|
+
/** @internal Configure the app-wide base path for framework link rendering. */
|
|
6
|
+
declare function setFarmBasePath(basePath: string | undefined): void;
|
|
7
|
+
declare function applyFarmBasePath(href: string, basePath?: string): string;
|
|
8
|
+
declare function stripFarmBasePath(pathname: string, basePath?: string): string;
|
|
9
|
+
|
|
10
|
+
export { setFarmTrailingSlashPreference as a, stripFarmBasePath as b, applyFarmBasePath as c, resolveFarmTrailingSlashRedirect as r, setFarmBasePath as s };
|
|
@@ -4,7 +4,7 @@
|
|
|
4
4
|
|
|
5
5
|
|
|
6
6
|
|
|
7
|
-
var
|
|
7
|
+
var _chunkFK25QSVCcjs = require('./chunk-FK25QSVC.cjs');
|
|
8
8
|
|
|
9
9
|
|
|
10
10
|
var _chunkDMAP4RNDcjs = require('./chunk-DMAP4RND.cjs');
|
|
@@ -61,13 +61,13 @@ async function _invokeServerFunction(value, input, request) {
|
|
|
61
61
|
throw new TypeError("Expected a function created with createServerFn or createServerQuery");
|
|
62
62
|
}
|
|
63
63
|
try {
|
|
64
|
-
const data = await
|
|
64
|
+
const data = await _chunkFK25QSVCcjs.runWithServerActionRequest.call(void 0, request, () => runner.run(input));
|
|
65
65
|
return { ok: true, data };
|
|
66
66
|
} catch (error) {
|
|
67
67
|
if (error instanceof ServerFnInputError) {
|
|
68
68
|
return { ok: false, reason: "input", error: error.cause };
|
|
69
69
|
}
|
|
70
|
-
if (
|
|
70
|
+
if (_chunkFK25QSVCcjs.isServerFnFailure.call(void 0, error)) return { ok: false, reason: "failure", failure: error };
|
|
71
71
|
const redirect = _chunk7JUIK547cjs.getFarmRedirectError.call(void 0, error);
|
|
72
72
|
if (redirect) {
|
|
73
73
|
return { ok: false, reason: "redirect", url: redirect.url, status: redirect.status };
|
|
@@ -106,9 +106,9 @@ function createServerFn(options) {
|
|
|
106
106
|
} catch (cause) {
|
|
107
107
|
throw labelInputErrors && isSchemaValidationFailure(cause) ? new ServerFnInputError(cause) : cause;
|
|
108
108
|
}
|
|
109
|
-
const executionContext =
|
|
109
|
+
const executionContext = _chunkFK25QSVCcjs.getServerActionExecutionContext.call(void 0, );
|
|
110
110
|
const request = executionContext ? _chunk3BIASUGRcjs._toAppRequestView.call(void 0, executionContext.request) : _chunk3BIASUGRcjs._resolveCurrentRequestForApp.call(void 0, );
|
|
111
|
-
const signal = _nullishCoalesce(_nullishCoalesce(_optionalChain([executionContext, 'optionalAccess', _ => _.signal]), () => ( _optionalChain([request, 'optionalAccess', _2 => _2.signal]))), () => (
|
|
111
|
+
const signal = _nullishCoalesce(_nullishCoalesce(_optionalChain([executionContext, 'optionalAccess', _ => _.signal]), () => ( _optionalChain([request, 'optionalAccess', _2 => _2.signal]))), () => ( _chunkFK25QSVCcjs.getServerActionSignal.call(void 0, )));
|
|
112
112
|
const handlerContext = {
|
|
113
113
|
input,
|
|
114
114
|
rawInput,
|
|
@@ -231,7 +231,7 @@ function createServerFnErrorHandler(definitions) {
|
|
|
231
231
|
throw new TypeError(`Server function error "${code}" is not declared`);
|
|
232
232
|
}
|
|
233
233
|
const parsed = parseServerFnFailureData(code, definition.data, data);
|
|
234
|
-
throw new (0,
|
|
234
|
+
throw new (0, _chunkFK25QSVCcjs.ServerFnFailure)(code, parsed, {
|
|
235
235
|
status: definition.status,
|
|
236
236
|
message: _nullishCoalesce(definition.message, () => ( "Server function failed"))
|
|
237
237
|
});
|