@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
|
@@ -6,13 +6,13 @@ import {
|
|
|
6
6
|
} from "./chunk-ES2LD2YD.mjs";
|
|
7
7
|
import {
|
|
8
8
|
parseRouteSlotFile
|
|
9
|
-
} from "./chunk-
|
|
9
|
+
} from "./chunk-IRSS4HS4.mjs";
|
|
10
10
|
import {
|
|
11
11
|
discoverProgrammaticRoutePaths
|
|
12
|
-
} from "./chunk-
|
|
12
|
+
} from "./chunk-FSXSQQTV.mjs";
|
|
13
13
|
import {
|
|
14
14
|
parseRoutePath
|
|
15
|
-
} from "./chunk-
|
|
15
|
+
} from "./chunk-Y3N5BFRJ.mjs";
|
|
16
16
|
|
|
17
17
|
// src/routing/generate-route-types.ts
|
|
18
18
|
import * as path from "path";
|
|
@@ -144,16 +144,13 @@ async function scanRoutePatterns(options) {
|
|
|
144
144
|
const pageFiles = /* @__PURE__ */ new Map();
|
|
145
145
|
const nativePages = /* @__PURE__ */ new Map();
|
|
146
146
|
const nativeLayouts = /* @__PURE__ */ new Map();
|
|
147
|
-
const glob = await import("
|
|
147
|
+
const { glob } = await import("tinyglobby");
|
|
148
148
|
for (const source of sourceRoots) {
|
|
149
149
|
const appDir = path.join(source.root, source.srcDir, "app");
|
|
150
150
|
if (fs.existsSync(appDir)) {
|
|
151
|
-
const routeModuleFiles = await glob
|
|
151
|
+
const routeModuleFiles = await glob(
|
|
152
152
|
`**/{page,layout,loading,error}.{${componentExtensions.join(",")},md,mdx}`,
|
|
153
|
-
{
|
|
154
|
-
cwd: appDir,
|
|
155
|
-
absolute: false
|
|
156
|
-
}
|
|
153
|
+
{ cwd: appDir, expandDirectories: false }
|
|
157
154
|
);
|
|
158
155
|
for (const file of routeModuleFiles) {
|
|
159
156
|
if (parseRouteSlotFile(file)) continue;
|
|
@@ -168,9 +165,9 @@ async function scanRoutePatterns(options) {
|
|
|
168
165
|
if (options.platformFiles) {
|
|
169
166
|
scanPlatformRouteFiles(
|
|
170
167
|
appDir,
|
|
171
|
-
await glob
|
|
168
|
+
await glob(
|
|
172
169
|
["**/{page,layout}.{native,ios,android}.{tsx,ts,jsx,js}", "**/page.{kt,swift}"],
|
|
173
|
-
{ cwd: appDir,
|
|
170
|
+
{ cwd: appDir, expandDirectories: false }
|
|
174
171
|
),
|
|
175
172
|
nativePages,
|
|
176
173
|
nativeLayouts
|
|
@@ -4,14 +4,14 @@ import {
|
|
|
4
4
|
loadFarmDocsPage,
|
|
5
5
|
resolveFarmDocsContentDir,
|
|
6
6
|
toFarmDocsMarkdownPage
|
|
7
|
-
} from "./chunk-
|
|
7
|
+
} from "./chunk-4GJJ65RB.mjs";
|
|
8
8
|
import {
|
|
9
9
|
docsEngine,
|
|
10
10
|
loadFarmDocsEngine
|
|
11
11
|
} from "./chunk-VE3FWJBO.mjs";
|
|
12
12
|
import {
|
|
13
13
|
resolveDocsConfig
|
|
14
|
-
} from "./chunk-
|
|
14
|
+
} from "./chunk-JF5CNHHF.mjs";
|
|
15
15
|
import {
|
|
16
16
|
getFarmDocsAdapterConfigModule,
|
|
17
17
|
isSecretDocsConfigKey
|
|
@@ -1,6 +1,12 @@
|
|
|
1
1
|
"use strict";Object.defineProperty(exports, "__esModule", {value: true});
|
|
2
2
|
|
|
3
|
-
var
|
|
3
|
+
var _chunkCKPTIEDXcjs = require('./chunk-CKPTIEDX.cjs');
|
|
4
|
+
|
|
5
|
+
|
|
6
|
+
|
|
7
|
+
|
|
8
|
+
|
|
9
|
+
var _chunkFK25QSVCcjs = require('./chunk-FK25QSVC.cjs');
|
|
4
10
|
|
|
5
11
|
|
|
6
12
|
|
|
@@ -16,7 +22,8 @@ function handleFarmFormActionRequest(request, config) {
|
|
|
16
22
|
return _server.handleAction.call(void 0, request, {
|
|
17
23
|
allowedOrigins: config.allowedOrigins,
|
|
18
24
|
bodySizeLimit: config.bodySizeLimit,
|
|
19
|
-
|
|
25
|
+
// The result islx sends is the envelope, not the action's own type.
|
|
26
|
+
run: (actionRequest, action) => runFarmFormAction(actionRequest, action),
|
|
20
27
|
mapError(error) {
|
|
21
28
|
const redirect = _chunk7JUIK547cjs.getFarmRedirectError.call(void 0, error);
|
|
22
29
|
if (redirect) return { redirect: redirect.url };
|
|
@@ -26,6 +33,25 @@ function handleFarmFormActionRequest(request, config) {
|
|
|
26
33
|
onError: (error) => console.error("[Farm.js] Server action failed:", error)
|
|
27
34
|
});
|
|
28
35
|
}
|
|
36
|
+
async function runFarmFormAction(request, action) {
|
|
37
|
+
if (!request.headers.has(FARM_FORM_ACTION_HEADER)) {
|
|
38
|
+
return _chunkFK25QSVCcjs.runWithServerActionRequest.call(void 0, request, action);
|
|
39
|
+
}
|
|
40
|
+
try {
|
|
41
|
+
return await _chunkFK25QSVCcjs.runWithServerActionRequest.call(void 0, request, async () => {
|
|
42
|
+
const value = await action();
|
|
43
|
+
return {
|
|
44
|
+
[_chunkCKPTIEDXcjs.FARM_ACTION_RESULT_KEY]: { invalidations: [..._chunkFK25QSVCcjs.getServerActionInvalidations.call(void 0, )] },
|
|
45
|
+
value
|
|
46
|
+
};
|
|
47
|
+
});
|
|
48
|
+
} catch (error) {
|
|
49
|
+
if (!_chunkFK25QSVCcjs.serializeServerFnFailure.call(void 0, error)) throw error;
|
|
50
|
+
return {
|
|
51
|
+
[_chunkCKPTIEDXcjs.FARM_ACTION_RESULT_KEY]: { invalidations: [], error: _chunkFK25QSVCcjs.sanitizeServerActionError.call(void 0, error) }
|
|
52
|
+
};
|
|
53
|
+
}
|
|
54
|
+
}
|
|
29
55
|
|
|
30
56
|
|
|
31
57
|
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
import {
|
|
2
2
|
generateFarmDocsSearchBootstrapRuntime,
|
|
3
3
|
isFarmDocsSearchEnabled
|
|
4
|
-
} from "./chunk-
|
|
4
|
+
} from "./chunk-ALEUMLJN.mjs";
|
|
5
5
|
import {
|
|
6
6
|
FARM_NAVIGATION_HEAD_SELECTOR
|
|
7
7
|
} from "./chunk-WYL4ODZ4.mjs";
|
|
@@ -1307,6 +1307,13 @@ function highlightCodeBlock(code) {
|
|
|
1307
1307
|
function renderCodeCopyButton(className = "code-copy") {
|
|
1308
1308
|
return `<button class="${className}" type="button" data-code-copy data-copied="false" aria-label="Copy code" title="Copy code"><svg class="code-copy-icon" viewBox="0 0 24 24" aria-hidden="true" focusable="false"><rect x="9" y="9" width="13" height="13" rx="2" ry="2"></rect><path d="M5 15H4a2 2 0 0 1-2-2V4a2 2 0 0 1 2-2h9a2 2 0 0 1 2 2v1"></path></svg><svg class="code-copy-check" viewBox="0 0 24 24" aria-hidden="true" focusable="false"><path d="M20 6 9 17l-5-5"></path></svg></button>`;
|
|
1309
1309
|
}
|
|
1310
|
+
var SCRIPT_URL_SCHEME = /^(?:javascript|vbscript|data):/i;
|
|
1311
|
+
function isScriptUrl(href) {
|
|
1312
|
+
const url = href.replace(/[\t\n\r]/g, "");
|
|
1313
|
+
let start = 0;
|
|
1314
|
+
while (start < url.length && url.charCodeAt(start) <= 32) start++;
|
|
1315
|
+
return SCRIPT_URL_SCHEME.test(url.slice(start));
|
|
1316
|
+
}
|
|
1310
1317
|
function renderMarkdownDocument(body, depth) {
|
|
1311
1318
|
const slug = createSlugger();
|
|
1312
1319
|
const renderer = new Renderer();
|
|
@@ -1342,6 +1349,7 @@ function renderMarkdownDocument(body, depth) {
|
|
|
1342
1349
|
`;
|
|
1343
1350
|
renderer.codespan = (code) => `<code>${escapeHtml(code)}</code>`;
|
|
1344
1351
|
renderer.link = (href, title, text) => {
|
|
1352
|
+
if (href && isScriptUrl(href)) return text;
|
|
1345
1353
|
const safeHref = href || "";
|
|
1346
1354
|
const titleAttribute = title ? ` title="${escapeAttribute(title)}"` : "";
|
|
1347
1355
|
return `<a href="${escapeAttribute(safeHref)}"${titleAttribute}>${text}</a>`;
|
|
@@ -17,6 +17,9 @@ var _chunkOYZXVBZPcjs = require('./chunk-OYZXVBZP.cjs');
|
|
|
17
17
|
var _chunkDMAP4RNDcjs = require('./chunk-DMAP4RND.cjs');
|
|
18
18
|
|
|
19
19
|
|
|
20
|
+
var _chunkSUCDVKUBcjs = require('./chunk-SUCDVKUB.cjs');
|
|
21
|
+
|
|
22
|
+
|
|
20
23
|
var _chunkDXUXQP2Tcjs = require('./chunk-DXUXQP2T.cjs');
|
|
21
24
|
|
|
22
25
|
// src/routes.ts
|
|
@@ -535,7 +538,7 @@ async function resolveProgrammaticRouteProps(route, props) {
|
|
|
535
538
|
...props,
|
|
536
539
|
params,
|
|
537
540
|
search,
|
|
538
|
-
searchParams:
|
|
541
|
+
searchParams: _chunkSUCDVKUBcjs.createFarmSearchParams.call(void 0, search)
|
|
539
542
|
};
|
|
540
543
|
const routeContextProps = {
|
|
541
544
|
...baseProps,
|
|
@@ -1,8 +1,10 @@
|
|
|
1
1
|
import {
|
|
2
|
-
attachRevalidationListeners
|
|
2
|
+
attachRevalidationListeners
|
|
3
|
+
} from "./chunk-Z64V4WZI.mjs";
|
|
4
|
+
import {
|
|
3
5
|
createServerQueryCallKey,
|
|
4
6
|
fetchServerQuery
|
|
5
|
-
} from "./chunk-
|
|
7
|
+
} from "./chunk-XMHERKSE.mjs";
|
|
6
8
|
import {
|
|
7
9
|
getFarmClientDataCache
|
|
8
10
|
} from "./chunk-C64XOPBZ.mjs";
|
|
@@ -396,7 +396,13 @@ function configMiddlewareMayHandlePath(config, pathname) {
|
|
|
396
396
|
});
|
|
397
397
|
}
|
|
398
398
|
function appMiddlewareMayHandlePath(middlewareRoutes, pathname) {
|
|
399
|
-
return middlewareRoutes.some((route) =>
|
|
399
|
+
return middlewareRoutes.some((route) => {
|
|
400
|
+
if (!_chunk5DX3O6TTcjs.matchesMiddlewareRoute.call(void 0, pathname, route).matched) return false;
|
|
401
|
+
if (!route.config || route.config === "unknown") return true;
|
|
402
|
+
if (!route.config.matcher && !route.config.exclude) return true;
|
|
403
|
+
const compiled = _chunk5DX3O6TTcjs.compileMiddlewareConfig.call(void 0, route.config);
|
|
404
|
+
return _chunk5DX3O6TTcjs.matchesCompiledMiddlewareConfig.call(void 0, pathname, compiled, {}).matched;
|
|
405
|
+
});
|
|
400
406
|
}
|
|
401
407
|
var CATCH_ALL_PROBE = "/__farm-listing-probe__/0";
|
|
402
408
|
function isPathSpecificMatcher(matcher) {
|
|
@@ -396,7 +396,13 @@ function configMiddlewareMayHandlePath(config, pathname) {
|
|
|
396
396
|
});
|
|
397
397
|
}
|
|
398
398
|
function appMiddlewareMayHandlePath(middlewareRoutes, pathname) {
|
|
399
|
-
return middlewareRoutes.some((route) =>
|
|
399
|
+
return middlewareRoutes.some((route) => {
|
|
400
|
+
if (!matchesMiddlewareRoute(pathname, route).matched) return false;
|
|
401
|
+
if (!route.config || route.config === "unknown") return true;
|
|
402
|
+
if (!route.config.matcher && !route.config.exclude) return true;
|
|
403
|
+
const compiled = compileMiddlewareConfig(route.config);
|
|
404
|
+
return matchesCompiledMiddlewareConfig(pathname, compiled, {}).matched;
|
|
405
|
+
});
|
|
400
406
|
}
|
|
401
407
|
var CATCH_ALL_PROBE = "/__farm-listing-probe__/0";
|
|
402
408
|
function isPathSpecificMatcher(matcher) {
|
|
@@ -18,10 +18,17 @@ function resolveFarmDocsSearchClientModule(root) {
|
|
|
18
18
|
}
|
|
19
19
|
return void 0;
|
|
20
20
|
}
|
|
21
|
+
function resolveFarmDocsSearchFrameworkModule(searchModule) {
|
|
22
|
+
try {
|
|
23
|
+
return createRequire(searchModule).resolve("fumadocs-core/framework");
|
|
24
|
+
} catch {
|
|
25
|
+
return void 0;
|
|
26
|
+
}
|
|
27
|
+
}
|
|
21
28
|
function generateFarmDocsSearchBootstrapRuntime() {
|
|
22
29
|
return `(()=>{if(window.__farmDocsSearchBootstrap)return;window.__farmDocsSearchBootstrap=true;const queue=(trigger,event)=>{if(window.__FARM_DOCS_SEARCH_BRIDGE_ACTIVE__)return;event.preventDefault();event.stopPropagation();event.stopImmediatePropagation();window.__FARM_DOCS_SEARCH_PENDING__=trigger;window.__FARM_MOUNT_DOCS_SEARCH__?.()};document.addEventListener("click",(event)=>{const target=event.target instanceof Element?event.target.closest("[data-search-full]"):null;if(target)queue("button",event)},true);document.addEventListener("keydown",(event)=>{if((event.metaKey||event.ctrlKey)&&event.key.toLowerCase()==="k")queue("keyboard",event)},true)})();`;
|
|
23
30
|
}
|
|
24
|
-
function generateFarmDocsSearchClientRuntime(enabled, moduleId) {
|
|
31
|
+
function generateFarmDocsSearchClientRuntime(enabled, moduleId, frameworkModuleId = moduleId ? resolveFarmDocsSearchFrameworkModule(moduleId) : void 0) {
|
|
25
32
|
if (!enabled || !moduleId) {
|
|
26
33
|
return `
|
|
27
34
|
function isFarmDocsSearchPage() {
|
|
@@ -71,7 +78,21 @@ function replayFarmDocsSearchOpen() {
|
|
|
71
78
|
});
|
|
72
79
|
}
|
|
73
80
|
|
|
74
|
-
|
|
81
|
+
const farmDocsSearchRouter = {
|
|
82
|
+
push(url) {
|
|
83
|
+
window.location.assign(url);
|
|
84
|
+
},
|
|
85
|
+
refresh() {
|
|
86
|
+
window.location.reload();
|
|
87
|
+
},
|
|
88
|
+
};
|
|
89
|
+
const farmDocsSearchFramework = {
|
|
90
|
+
usePathname: () => window.location.pathname,
|
|
91
|
+
useParams: () => ({}),
|
|
92
|
+
useRouter: () => farmDocsSearchRouter,
|
|
93
|
+
};
|
|
94
|
+
|
|
95
|
+
function FarmDocsSearchBridge({ component, api, FrameworkProvider }) {
|
|
75
96
|
React.useEffect(() => {
|
|
76
97
|
farmDocsSearchReady = true;
|
|
77
98
|
replayFarmDocsSearchOpen();
|
|
@@ -80,7 +101,10 @@ function FarmDocsSearchBridge({ component, api }) {
|
|
|
80
101
|
};
|
|
81
102
|
}, []);
|
|
82
103
|
|
|
83
|
-
|
|
104
|
+
const search = React.createElement(component, { api });
|
|
105
|
+
return FrameworkProvider
|
|
106
|
+
? React.createElement(FrameworkProvider, farmDocsSearchFramework, search)
|
|
107
|
+
: search;
|
|
84
108
|
}
|
|
85
109
|
|
|
86
110
|
function queueFarmDocsSearchOpen(trigger, event) {
|
|
@@ -122,8 +146,11 @@ async function mountFarmDocsSearch() {
|
|
|
122
146
|
if (farmDocsSearchContainer === container && farmDocsSearchRoot) return true;
|
|
123
147
|
|
|
124
148
|
try {
|
|
125
|
-
farmDocsSearchModulePromise ||=
|
|
126
|
-
|
|
149
|
+
farmDocsSearchModulePromise ||= Promise.all([
|
|
150
|
+
import(${JSON.stringify(moduleId)}),
|
|
151
|
+
${frameworkModuleId ? `import(${JSON.stringify(frameworkModuleId)})` : "null"},
|
|
152
|
+
]);
|
|
153
|
+
const [{ DocsCommandSearch }, framework] = await farmDocsSearchModulePromise;
|
|
127
154
|
if (!container.isConnected) return false;
|
|
128
155
|
|
|
129
156
|
if (farmDocsSearchRoot) {
|
|
@@ -139,6 +166,7 @@ async function mountFarmDocsSearch() {
|
|
|
139
166
|
React.createElement(FarmDocsSearchBridge, {
|
|
140
167
|
component: DocsCommandSearch,
|
|
141
168
|
api: container.dataset.api || '/api/docs',
|
|
169
|
+
FrameworkProvider: framework?.FrameworkProvider,
|
|
142
170
|
}),
|
|
143
171
|
);
|
|
144
172
|
return true;
|
|
@@ -156,6 +184,7 @@ window.__FARM_MOUNT_DOCS_SEARCH__ = mountFarmDocsSearch;
|
|
|
156
184
|
export {
|
|
157
185
|
isFarmDocsSearchEnabled,
|
|
158
186
|
resolveFarmDocsSearchClientModule,
|
|
187
|
+
resolveFarmDocsSearchFrameworkModule,
|
|
159
188
|
generateFarmDocsSearchBootstrapRuntime,
|
|
160
189
|
generateFarmDocsSearchClientRuntime
|
|
161
190
|
};
|