@farm.js/core 0.2.0 → 0.2.1
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/{agent-mcp.d-xPua9Zdz.d.ts → agent-mcp.d--uQgDp_Q.d.ts} +1 -1
- package/dist/{agent-mcp.d-DhZf5-v0.d.mts → agent-mcp.d-DpthRhqr.d.mts} +1 -1
- package/dist/agent-runtime.d.mts +4 -4
- package/dist/agent-runtime.d.ts +4 -4
- package/dist/{analyzer-LQ4LVDCW.mjs → analyzer-GLFRODYV.mjs} +2 -2
- package/dist/analyzer-KBVOHASA.cjs +17 -0
- package/dist/api/node.d.mts +6 -6
- package/dist/api/node.d.ts +6 -6
- package/dist/api/route-manager.cjs +3 -3
- package/dist/api/route-manager.d.mts +6 -6
- package/dist/api/route-manager.d.ts +6 -6
- package/dist/api/route-manager.mjs +2 -2
- package/dist/api/runtime.d.mts +5 -5
- package/dist/api/runtime.d.ts +5 -5
- package/dist/api.cjs +4 -4
- package/dist/api.d.mts +7 -7
- package/dist/api.d.ts +7 -7
- package/dist/api.mjs +3 -3
- package/dist/{app-manifest.d-D6l1Wkn6.d.ts → app-manifest.d-DMgcFuXQ.d.ts} +1 -1
- package/dist/{app-manifest.d-Bq9VWtpk.d.mts → app-manifest.d-DXAvPjMw.d.mts} +1 -1
- package/dist/app-markdown.d.mts +5 -5
- package/dist/app-markdown.d.ts +5 -5
- package/dist/{app.d-Bn1bqBkf.d.mts → app.d-DG_-nN5y.d.mts} +4 -4
- package/dist/{app.d-gnTrW72o.d.ts → app.d-htfGqq-d.d.ts} +4 -4
- package/dist/{chunk-MEIZIRMK.mjs → chunk-BOHBFBRA.mjs} +1 -1
- package/dist/{chunk-WOPQQCP3.mjs → chunk-CPL7WIMP.mjs} +1 -1
- package/dist/{chunk-RMLXUVR5.cjs → chunk-CS6GXE42.cjs} +91 -21
- package/dist/{chunk-MLMDOIBY.mjs → chunk-CZMMU3FP.mjs} +2 -2
- package/dist/{chunk-ZCT6B5PQ.cjs → chunk-D2OU4CX2.cjs} +6 -6
- package/dist/{chunk-ZTNU4XCC.cjs → chunk-D2VLHRBN.cjs} +3 -3
- package/dist/{chunk-RDT2LJES.mjs → chunk-D5GFVHBV.mjs} +4 -4
- package/dist/{chunk-RP55BUJM.mjs → chunk-E7ISZK3R.mjs} +1 -1
- package/dist/{chunk-4ER5KYSC.cjs → chunk-GEZ76JXD.cjs} +3 -3
- package/dist/{chunk-T4VF6BYV.cjs → chunk-GL4SPJTE.cjs} +2 -2
- package/dist/{chunk-SIHHYNX4.mjs → chunk-HBZQIRRM.mjs} +1 -1
- package/dist/{chunk-MUQP2APN.cjs → chunk-HENYWY5J.cjs} +2 -2
- package/dist/{chunk-LGL5QKUJ.cjs → chunk-JJ22OI7J.cjs} +2 -2
- package/dist/{chunk-Z7YIQ7AJ.cjs → chunk-JZAGIXMB.cjs} +1 -1
- package/dist/{chunk-FFROR7QD.mjs → chunk-L2KGQXFU.mjs} +1 -1
- package/dist/{chunk-MZG5M4JS.cjs → chunk-MR64FNW6.cjs} +4 -4
- package/dist/{chunk-KKXGBQ2K.mjs → chunk-MYJPW4XN.mjs} +2 -2
- package/dist/chunk-O77EKGAS.mjs +36 -0
- package/dist/{chunk-ZVEKOMZS.mjs → chunk-OKZHPPBX.mjs} +1 -1
- package/dist/{chunk-54INSSWI.mjs → chunk-P2THJDLH.mjs} +23 -15
- package/dist/{chunk-VFZQXADS.cjs → chunk-PGU4SCIU.cjs} +133 -131
- package/dist/{chunk-VWPGK6UV.cjs → chunk-PVB5UYJT.cjs} +54 -54
- package/dist/{chunk-DNERKYN4.cjs → chunk-Q4FHYBFT.cjs} +11 -11
- package/dist/{chunk-JKNQMGZE.cjs → chunk-QI3UYN3P.cjs} +2 -2
- package/dist/{chunk-GAD63TH7.mjs → chunk-QJKGRUBR.mjs} +1 -1
- package/dist/{chunk-GK2RCRT2.mjs → chunk-RCJAOQWW.mjs} +1 -1
- package/dist/{chunk-D7KBMJ7L.mjs → chunk-SIJ3DREB.mjs} +1 -1
- package/dist/{chunk-HYYOVRED.mjs → chunk-SPVXL37B.mjs} +1 -1
- package/dist/{chunk-MX4G24YS.mjs → chunk-TI4BJFYX.mjs} +16 -14
- package/dist/{chunk-O47IT4CS.cjs → chunk-V6ACETKR.cjs} +4 -4
- package/dist/{chunk-J6JAUJPC.cjs → chunk-W34OS5CK.cjs} +148 -140
- package/dist/{chunk-KJW6KEOZ.mjs → chunk-WRT775N6.mjs} +92 -22
- package/dist/{chunk-2LHO4HTP.cjs → chunk-XSE4XJKY.cjs} +2 -2
- package/dist/{chunk-ZF7N222A.mjs → chunk-XYCB3CXM.mjs} +2 -2
- package/dist/{chunk-MNBFSAWF.cjs → chunk-YCGOQKVC.cjs} +20 -1
- package/dist/{chunk-PATIHHC7.cjs → chunk-ZQOHL6TX.cjs} +2 -2
- package/dist/{client-component.d-34DDMZcl.d.mts → client-component.d-D5JVDeQf.d.mts} +1 -1
- package/dist/{client-component.d-DT5OKBZu.d.ts → client-component.d-DDbDw2yP.d.ts} +1 -1
- package/dist/{client-plugins.d-D7k9t9Ge.d.mts → client-plugins.d-9jr2yWR3.d.mts} +4 -4
- package/dist/{client-plugins.d-D9CnUvZ5.d.ts → client-plugins.d-BHqfH3DQ.d.ts} +4 -4
- package/dist/client-plugins.d.mts +4 -4
- package/dist/client-plugins.d.ts +4 -4
- package/dist/client.d.mts +10 -10
- package/dist/client.d.ts +10 -10
- package/dist/config.d.mts +4 -4
- package/dist/config.d.ts +4 -4
- package/dist/desktop.d.mts +5 -5
- package/dist/desktop.d.ts +5 -5
- package/dist/{devtools-IUU4SWQL.cjs → devtools-F6Z436WU.cjs} +2 -2
- package/dist/{devtools-R77KAJA4.mjs → devtools-ZDBCJI44.mjs} +1 -1
- package/dist/docs.cjs +3 -3
- package/dist/docs.d.mts +6 -6
- package/dist/docs.d.ts +6 -6
- package/dist/docs.mjs +2 -2
- package/dist/environment/vite.cjs +3 -3
- package/dist/environment/vite.d.mts +1 -1
- package/dist/environment/vite.d.ts +1 -1
- package/dist/environment/vite.mjs +2 -2
- package/dist/{generate-route-types.d-BFOMM8Ef.d.mts → generate-route-types.d-CAiRw4N0.d.mts} +1 -1
- package/dist/{generate-route-types.d-C2m8myHb.d.ts → generate-route-types.d-Dz8MOQ3u.d.ts} +1 -1
- package/dist/{handler.d-DbZvbwNi.d.ts → handler.d-Dq_bSEKC.d.ts} +2 -2
- package/dist/{handler.d-fxTjv3Nn.d.mts → handler.d-EtTSPkeO.d.mts} +2 -2
- package/dist/{headers.d-OBHpGTF_.d.mts → headers.d-BKwGD_uC.d.mts} +1 -1
- package/dist/{headers.d-oeWybIk8.d.ts → headers.d-CpIHLCEk.d.ts} +1 -1
- package/dist/index.cjs +22 -22
- package/dist/{index.d-BM-dKdzH.d.ts → index.d-CoRZKiHA.d.ts} +1 -1
- package/dist/{index.d-CRrPQwlO.d.mts → index.d-DXtaU9OU.d.mts} +1 -1
- package/dist/index.d.mts +27 -27
- package/dist/index.d.ts +27 -27
- package/dist/index.mjs +17 -17
- package/dist/integrations/orm.d.mts +4 -4
- package/dist/integrations/orm.d.ts +4 -4
- package/dist/integrations.d.mts +4 -4
- package/dist/integrations.d.ts +4 -4
- package/dist/internal/app-markdown-runtime.d.mts +5 -5
- package/dist/internal/app-markdown-runtime.d.ts +5 -5
- package/dist/internal/build-runtime.cjs +17 -17
- package/dist/internal/build-runtime.d.mts +7 -7
- package/dist/internal/build-runtime.d.ts +7 -7
- package/dist/internal/build-runtime.mjs +16 -16
- package/dist/internal/cli-runtime.cjs +8 -5
- package/dist/internal/cli-runtime.d.mts +20 -12
- package/dist/internal/cli-runtime.d.ts +20 -12
- package/dist/internal/cli-runtime.mjs +7 -4
- package/dist/internal/client-error-overlay.cjs +4 -4
- package/dist/internal/client-error-overlay.mjs +1 -1
- package/dist/internal/client-runtime.d.mts +8 -8
- package/dist/internal/client-runtime.d.ts +8 -8
- package/dist/internal/compression-runtime.d.mts +4 -4
- package/dist/internal/compression-runtime.d.ts +4 -4
- package/dist/internal/config-runtime.cjs +3 -3
- package/dist/internal/config-runtime.d.mts +8 -8
- package/dist/internal/config-runtime.d.ts +8 -8
- package/dist/internal/config-runtime.mjs +2 -2
- package/dist/internal/infra-analytics-runtime.cjs +6 -6
- package/dist/internal/infra-analytics-runtime.mjs +4 -4
- package/dist/internal/native-server-fns.cjs +4 -4
- package/dist/internal/native-server-fns.mjs +3 -3
- package/dist/internal/product-telemetry-runtime.cjs +3 -3
- package/dist/internal/product-telemetry-runtime.mjs +2 -2
- package/dist/internal/production-runtime.cjs +4 -4
- package/dist/internal/production-runtime.d.mts +13 -13
- package/dist/internal/production-runtime.d.ts +13 -13
- package/dist/internal/production-runtime.mjs +3 -3
- package/dist/internal/spa-router.d.mts +6 -6
- package/dist/internal/spa-router.d.ts +6 -6
- package/dist/internal/start-manifest.d.mts +4 -4
- package/dist/internal/start-manifest.d.ts +4 -4
- package/dist/{layers.d-CH0bC4QL.d.mts → layers.d-dNBkiNE9.d.mts} +1 -1
- package/dist/{layers.d-CH0bC4QL.d.ts → layers.d-dNBkiNE9.d.ts} +1 -1
- package/dist/{manager-STAB5TVZ.cjs → manager-YRIENS63.cjs} +4 -4
- package/dist/{manager-EFPBRS3U.mjs → manager-YTJOAHII.mjs} +3 -3
- package/dist/markdown.d.mts +4 -4
- package/dist/markdown.d.ts +4 -4
- package/dist/middleware.d.mts +4 -4
- package/dist/middleware.d.ts +4 -4
- package/dist/mobile.d.mts +4 -4
- package/dist/mobile.d.ts +4 -4
- package/dist/{mount.d-TnD-Mebk.d.ts → mount.d-BzK2Z1pR.d.ts} +1 -1
- package/dist/{mount.d-B7RiwjiO.d.mts → mount.d-D-ynBlxU.d.mts} +1 -1
- package/dist/{navigation-delegate.d-VBCF0EeN.d.ts → navigation-delegate.d-DtsnFnNF.d.ts} +1 -1
- package/dist/{navigation-delegate.d-Boz2511c.d.mts → navigation-delegate.d-aJh3ZmTY.d.mts} +1 -1
- package/dist/navigation.d.mts +7 -7
- package/dist/navigation.d.ts +7 -7
- package/dist/plugin.cjs +12 -12
- package/dist/plugin.d.mts +8 -8
- package/dist/plugin.d.ts +8 -8
- package/dist/plugin.mjs +11 -11
- package/dist/{render-plan.d-BwnmyfNk.d.mts → render-plan.d-C6nUIU2m.d.mts} +1 -1
- package/dist/{render-plan.d-BrumV_ZE.d.ts → render-plan.d-h8bkOQyh.d.ts} +1 -1
- package/dist/renderer-client.d.mts +8 -8
- package/dist/renderer-client.d.ts +8 -8
- package/dist/{request.d-Dd5nRTO5.d.mts → request.d-CBEdJD5R.d.mts} +1 -1
- package/dist/{request.d-NUi01-5e.d.ts → request.d-CrriEvxy.d.ts} +1 -1
- package/dist/request.d.mts +5 -5
- package/dist/request.d.ts +5 -5
- package/dist/{route-rendering.d-CJR5BPXV.d.ts → route-rendering.d-C-ivf31T.d.ts} +1 -1
- package/dist/{route-rendering.d-BK0Pf7_k.d.mts → route-rendering.d-DgXpNk_c.d.mts} +1 -1
- package/dist/{router.d-C-JSFCPU.d.ts → router.d-BRRPd5dE.d.ts} +1 -1
- package/dist/{router.d-CNUS3x1j.d.mts → router.d-O5LrW9mZ.d.mts} +1 -1
- package/dist/{routes.d-D7RWvfqL.d.ts → routes.d-CYe98R_8.d.ts} +1 -1
- package/dist/{routes.d-BWvpUoYu.d.mts → routes.d-DBGnKaUQ.d.mts} +1 -1
- package/dist/routes.d.mts +4 -4
- package/dist/routes.d.ts +4 -4
- package/dist/{rsc-pipeline-UBWVU3NF.cjs → rsc-pipeline-2DNM7UDA.cjs} +3 -3
- package/dist/{rsc-pipeline-DHISDFT7.mjs → rsc-pipeline-HYINQPMW.mjs} +2 -2
- package/dist/{runtime-VUKMY44G.mjs → runtime-JP7L5KI7.mjs} +2 -2
- package/dist/{runtime-XKRQW3YT.cjs → runtime-M6GLD4CR.cjs} +4 -4
- package/dist/{runtime.d-CsOpO6yQ.d.mts → runtime.d-DP8Sk9PM.d.mts} +1 -1
- package/dist/{runtime.d-B2T4bM5_.d.ts → runtime.d-DW_1avVi.d.ts} +1 -1
- package/dist/{cli-runtime.d-Vvxf-Z8a.d.ts → schema-dependencies.d-C__RyTvW.d.ts} +21 -13
- package/dist/{cli-runtime.d-LwIb0swO.d.mts → schema-dependencies.d-Cedd7QUf.d.mts} +21 -13
- package/dist/{schema.d-BM-uVGpx.d.mts → schema.d-HlGSe1on.d.mts} +1 -1
- package/dist/{schema.d-BM-uVGpx.d.ts → schema.d-HlGSe1on.d.ts} +1 -1
- package/dist/schema.d.mts +1 -1
- package/dist/schema.d.ts +1 -1
- package/dist/{server-components-status.d-DOYt4E_Q.d.ts → server-components-status.d-CdsEQbeM.d.ts} +2 -2
- package/dist/{server-components-status.d-Cc5rir0l.d.mts → server-components-status.d-DN98yOT4.d.mts} +2 -2
- package/dist/server-plugins.d.mts +6 -6
- package/dist/server-plugins.d.ts +6 -6
- package/dist/server.cjs +35 -35
- package/dist/server.d.mts +14 -14
- package/dist/server.d.ts +14 -14
- package/dist/server.mjs +13 -13
- package/dist/{spa-router.d-C7FcpLxU.d.ts → spa-router.d-BJWZAdrV.d.ts} +2 -2
- package/dist/{spa-router.d-Cq5UFJvq.d.mts → spa-router.d-FcDbBCrK.d.mts} +2 -2
- package/dist/{ssg.d-BzNZemk7.d.mts → ssg.d--uut8Gya.d.mts} +3 -3
- package/dist/{ssg.d-DUhacIxj.d.ts → ssg.d-Cf9mC1rZ.d.ts} +3 -3
- package/dist/storage.d.mts +2 -2
- package/dist/storage.d.ts +2 -2
- package/dist/{store-core.d-DbUAtSBK.d.mts → store-core.d-DgYlAo-e.d.mts} +2 -2
- package/dist/{store-core.d-BX3yXrxA.d.ts → store-core.d-h7o6V2kH.d.ts} +2 -2
- package/dist/testing.cjs +2 -2
- package/dist/testing.d.mts +4 -4
- package/dist/testing.d.ts +4 -4
- package/dist/testing.mjs +2 -2
- package/dist/{types.d-C5hlNbHa.d.mts → types.d-CRiwa0jj.d.mts} +1 -1
- package/dist/{types.d-C5hlNbHa.d.ts → types.d-CRiwa0jj.d.ts} +1 -1
- package/dist/{utils.d-BhJJEXzo.d.ts → utils.d-2lGEnyBc.d.ts} +1 -1
- package/dist/{utils.d-NOMkLFpC.d.mts → utils.d-DjFApBfE.d.mts} +1 -1
- package/dist/version.cjs +2 -2
- package/dist/version.mjs +1 -1
- package/dist/vite.cjs +12 -12
- package/dist/vite.d.mts +9 -9
- package/dist/vite.d.ts +9 -9
- package/dist/vite.mjs +11 -11
- package/package.json +1 -1
- package/dist/analyzer-ZFC2L6NZ.cjs +0 -17
- package/dist/chunk-OZAVCLXY.mjs +0 -17
- /package/dist/{chunk-OAAVIFOJ.cjs → chunk-EIAA4W3M.cjs} +0 -0
- /package/dist/{chunk-ZRTBDHO2.mjs → chunk-H6MYRZ2U.mjs} +0 -0
|
@@ -1,14 +1,14 @@
|
|
|
1
|
-
import {
|
|
1
|
+
import { aT as FarmConfig, P as ParsedRoute, bw as ResolvedFarmRouteRuntimeConfig, bx as ApplicationMetadataRouteKind, p as RouteModule, b6 as LayoutModule, S as SSGCollectionResult, X as FarmRequest, Y as FarmResponse, by as ResolvedFarmAPIConfig, aQ as FarmDocsResolvedConfig, bv as FarmMarkdownResolvedConfig, o as FarmMdxResolvedConfig, aG as ResolvedFarmDevtoolsConfig, bz as ResolvedFarmDevIndicatorsConfig, bA as ResolvedFarmAuthConfig, bB as ResolvedFarmPerformanceConfig, bC as ResolvedFarmSecurityConfig } from './client-plugins.d-9jr2yWR3.mjs';
|
|
2
2
|
import { FarmWorkflowsResolvedConfig } from './workflows.mjs';
|
|
3
3
|
import { FarmCronResolvedConfig } from './cron.mjs';
|
|
4
4
|
import { R as ResolvedFarmImageConfig } from './image-config.d-ByhQ0TT7.mjs';
|
|
5
|
-
import { F as FarmSearchPreserveRoute, M as MetadataImageKind, c as createFarmDefaultMCPServer } from './agent-mcp.d-
|
|
5
|
+
import { F as FarmSearchPreserveRoute, M as MetadataImageKind, c as createFarmDefaultMCPServer } from './agent-mcp.d-DpthRhqr.mjs';
|
|
6
6
|
import { ProgrammaticRedirectRoute, ProgrammaticRouteSearchClientOptions } from './routes.mjs';
|
|
7
|
-
import { I as IsolatedClientBoundaryReference, F as FarmSourceSnapshotStore, C as ClientModuleHydrationPlan, P as ProgrammaticClientRoutes } from './client-component.d-
|
|
7
|
+
import { I as IsolatedClientBoundaryReference, F as FarmSourceSnapshotStore, C as ClientModuleHydrationPlan, P as ProgrammaticClientRoutes } from './client-component.d-D5JVDeQf.mjs';
|
|
8
8
|
import { ViteDevServer } from 'vite';
|
|
9
9
|
import { F as FarmIslandStrategy } from './island.d-CfGru1MO.mjs';
|
|
10
10
|
import { FarmRenderer, FarmRendererServerModule } from './renderer.mjs';
|
|
11
|
-
import { F as FarmRouteRenderPlan } from './render-plan.d-
|
|
11
|
+
import { F as FarmRouteRenderPlan } from './render-plan.d-C6nUIU2m.mjs';
|
|
12
12
|
import { R as ResolvedFarmI18nConfig } from './types.d-euATAbE4.mjs';
|
|
13
13
|
import { a as FarmRedirectStatus } from './navigation-errors.d-DwHtoMyR.mjs';
|
|
14
14
|
import { F as FarmI18nRuntime } from './runtime.d-CTAXWZby.mjs';
|
|
@@ -1,14 +1,14 @@
|
|
|
1
|
-
import {
|
|
1
|
+
import { aT as FarmConfig, P as ParsedRoute, bw as ResolvedFarmRouteRuntimeConfig, bx as ApplicationMetadataRouteKind, p as RouteModule, b6 as LayoutModule, S as SSGCollectionResult, X as FarmRequest, Y as FarmResponse, by as ResolvedFarmAPIConfig, aQ as FarmDocsResolvedConfig, bv as FarmMarkdownResolvedConfig, o as FarmMdxResolvedConfig, aG as ResolvedFarmDevtoolsConfig, bz as ResolvedFarmDevIndicatorsConfig, bA as ResolvedFarmAuthConfig, bB as ResolvedFarmPerformanceConfig, bC as ResolvedFarmSecurityConfig } from './client-plugins.d-BHqfH3DQ.js';
|
|
2
2
|
import { FarmWorkflowsResolvedConfig } from './workflows.js';
|
|
3
3
|
import { FarmCronResolvedConfig } from './cron.js';
|
|
4
4
|
import { R as ResolvedFarmImageConfig } from './image-config.d-ByhQ0TT7.js';
|
|
5
|
-
import { F as FarmSearchPreserveRoute, M as MetadataImageKind, c as createFarmDefaultMCPServer } from './agent-mcp.d
|
|
5
|
+
import { F as FarmSearchPreserveRoute, M as MetadataImageKind, c as createFarmDefaultMCPServer } from './agent-mcp.d--uQgDp_Q.js';
|
|
6
6
|
import { ProgrammaticRedirectRoute, ProgrammaticRouteSearchClientOptions } from './routes.js';
|
|
7
|
-
import { I as IsolatedClientBoundaryReference, F as FarmSourceSnapshotStore, C as ClientModuleHydrationPlan, P as ProgrammaticClientRoutes } from './client-component.d-
|
|
7
|
+
import { I as IsolatedClientBoundaryReference, F as FarmSourceSnapshotStore, C as ClientModuleHydrationPlan, P as ProgrammaticClientRoutes } from './client-component.d-DDbDw2yP.js';
|
|
8
8
|
import { ViteDevServer } from 'vite';
|
|
9
9
|
import { F as FarmIslandStrategy } from './island.d-CfGru1MO.js';
|
|
10
10
|
import { FarmRenderer, FarmRendererServerModule } from './renderer.js';
|
|
11
|
-
import { F as FarmRouteRenderPlan } from './render-plan.d-
|
|
11
|
+
import { F as FarmRouteRenderPlan } from './render-plan.d-h8bkOQyh.js';
|
|
12
12
|
import { R as ResolvedFarmI18nConfig } from './types.d-euATAbE4.js';
|
|
13
13
|
import { a as FarmRedirectStatus } from './navigation-errors.d-DwHtoMyR.js';
|
|
14
14
|
import { F as FarmI18nRuntime } from './runtime.d-PUA5qBnd.js';
|
|
@@ -3,7 +3,9 @@
|
|
|
3
3
|
var _chunkB6JPBPBQcjs = require('./chunk-B6JPBPBQ.cjs');
|
|
4
4
|
|
|
5
5
|
|
|
6
|
-
|
|
6
|
+
|
|
7
|
+
|
|
8
|
+
var _chunkYCGOQKVCcjs = require('./chunk-YCGOQKVC.cjs');
|
|
7
9
|
|
|
8
10
|
|
|
9
11
|
var _chunkSGBEJBBBcjs = require('./chunk-SGBEJBBB.cjs');
|
|
@@ -19,16 +21,45 @@ var _module = require('module');
|
|
|
19
21
|
var _path = require('path');
|
|
20
22
|
var _esmodulelexer = require('es-module-lexer');
|
|
21
23
|
var moduleLexerInitialized = false;
|
|
24
|
+
var HTTP_METHODS = ["GET", "HEAD", "QUERY", "POST", "PUT", "DELETE", "PATCH", "OPTIONS"];
|
|
22
25
|
var JSX_ROUTE_LANGS = { ".jsx": "jsx", ".tsx": "tsx" };
|
|
23
|
-
var
|
|
24
|
-
function
|
|
25
|
-
_nullishCoalesce(
|
|
26
|
+
var oxcUtils;
|
|
27
|
+
function loadOxcUtils() {
|
|
28
|
+
return _nullishCoalesce(oxcUtils, () => ( (oxcUtils = _module.createRequire.call(void 0, typeof __filename === "string" ? __filename : _chunkUGL4BDNBcjs.define_import_meta_default.url)(
|
|
26
29
|
"rolldown/utils"
|
|
27
|
-
)
|
|
28
|
-
|
|
30
|
+
))));
|
|
31
|
+
}
|
|
32
|
+
function transformJSXRoute(content, lang, filePath) {
|
|
33
|
+
const result = loadOxcUtils().transformSync(filePath, content, { lang, sourceType: "module" });
|
|
29
34
|
if (result.errors.length > 0) throw result.errors[0];
|
|
30
35
|
return result.code;
|
|
31
36
|
}
|
|
37
|
+
function extractDeclaredMethods(content, filePath) {
|
|
38
|
+
const { program, errors } = loadOxcUtils().parseSync(filePath, content, { lang: "dts" });
|
|
39
|
+
if (errors.length > 0) throw new Error(`${filePath}: ${errors[0].message}`);
|
|
40
|
+
const names = /* @__PURE__ */ new Set();
|
|
41
|
+
for (const statement of program.body) {
|
|
42
|
+
if (statement.type !== "ExportNamedDeclaration") continue;
|
|
43
|
+
const declaration = statement.declaration;
|
|
44
|
+
if (_optionalChain([declaration, 'optionalAccess', _ => _.type]) === "VariableDeclaration") {
|
|
45
|
+
for (const declarator of declaration.declarations) {
|
|
46
|
+
if (declarator.id.type === "Identifier") names.add(declarator.id.name);
|
|
47
|
+
}
|
|
48
|
+
} else if ((_optionalChain([declaration, 'optionalAccess', _2 => _2.type]) === "FunctionDeclaration" || _optionalChain([declaration, 'optionalAccess', _3 => _3.type]) === "TSDeclareFunction") && declaration.id) {
|
|
49
|
+
names.add(declaration.id.name);
|
|
50
|
+
} else if (!declaration && statement.exportKind !== "type") {
|
|
51
|
+
for (const specifier of statement.specifiers) {
|
|
52
|
+
if (specifier.exportKind === "type") continue;
|
|
53
|
+
const exported = specifier.exported;
|
|
54
|
+
names.add(exported.type === "Literal" ? String(exported.value) : exported.name);
|
|
55
|
+
}
|
|
56
|
+
}
|
|
57
|
+
}
|
|
58
|
+
return HTTP_METHODS.filter((method) => names.has(method));
|
|
59
|
+
}
|
|
60
|
+
function isFile(filePath) {
|
|
61
|
+
return _optionalChain([_fs.statSync.call(void 0, filePath, { throwIfNoEntry: false }), 'optionalAccess', _4 => _4.isFile, 'call', _5 => _5()]) === true;
|
|
62
|
+
}
|
|
32
63
|
var API_CLIENT_METHOD_SEGMENTS = /* @__PURE__ */ new Set([
|
|
33
64
|
"get",
|
|
34
65
|
"head",
|
|
@@ -40,8 +71,9 @@ var API_CLIENT_METHOD_SEGMENTS = /* @__PURE__ */ new Set([
|
|
|
40
71
|
"options"
|
|
41
72
|
]);
|
|
42
73
|
var APITypeGenerator = class {
|
|
43
|
-
constructor(appDir) {
|
|
74
|
+
constructor(appDir, options = {}) {
|
|
44
75
|
this.appDirs = Array.isArray(appDir) ? [...appDir] : [appDir];
|
|
76
|
+
this.polyroute = options.polyroute === true;
|
|
45
77
|
}
|
|
46
78
|
/**
|
|
47
79
|
* Scan all API route files and extract route information
|
|
@@ -89,7 +121,7 @@ var APITypeGenerator = class {
|
|
|
89
121
|
if (item.isDirectory()) {
|
|
90
122
|
const newBasePath = basePath ? `${basePath}/${item.name}` : item.name;
|
|
91
123
|
this.scanDirectory(fullPath, appDir, routes, newBasePath);
|
|
92
|
-
} else if (
|
|
124
|
+
} else if (_chunkYCGOQKVCcjs.isFarmAPIRouteFileName.call(void 0, item.name, this.polyroute)) {
|
|
93
125
|
const routeInfo = this.extractRouteInfo(fullPath, appDir, basePath);
|
|
94
126
|
if (routeInfo) {
|
|
95
127
|
routes.push(routeInfo);
|
|
@@ -98,14 +130,44 @@ var APITypeGenerator = class {
|
|
|
98
130
|
}
|
|
99
131
|
}
|
|
100
132
|
extractRouteInfo(filePath, appDir, basePath) {
|
|
133
|
+
const relativePath = _path.relative.call(void 0, appDir, filePath);
|
|
134
|
+
const apiPath = basePath ? `/api/${basePath}` : "/api";
|
|
135
|
+
const fileName = _path.basename.call(void 0, filePath);
|
|
136
|
+
if (_chunkYCGOQKVCcjs.isPolyrouteRouteFileName.call(void 0, fileName)) {
|
|
137
|
+
const declarationPath = _path.join.call(void 0,
|
|
138
|
+
_path.dirname.call(void 0, filePath),
|
|
139
|
+
_chunkYCGOQKVCcjs.getPolyrouteRouteDeclarationFileName.call(void 0, fileName)
|
|
140
|
+
);
|
|
141
|
+
if (!isFile(declarationPath)) {
|
|
142
|
+
return { path: apiPath, methods: [...HTTP_METHODS], filePath, relativePath };
|
|
143
|
+
}
|
|
144
|
+
try {
|
|
145
|
+
const methods = extractDeclaredMethods(
|
|
146
|
+
_fs.readFileSync.call(void 0, declarationPath, "utf-8"),
|
|
147
|
+
declarationPath
|
|
148
|
+
);
|
|
149
|
+
if (methods.length === 0) return null;
|
|
150
|
+
return {
|
|
151
|
+
path: apiPath,
|
|
152
|
+
methods,
|
|
153
|
+
filePath,
|
|
154
|
+
relativePath,
|
|
155
|
+
declaration: {
|
|
156
|
+
filePath: declarationPath,
|
|
157
|
+
relativePath: _path.relative.call(void 0, appDir, declarationPath)
|
|
158
|
+
}
|
|
159
|
+
};
|
|
160
|
+
} catch (error) {
|
|
161
|
+
console.warn(`Failed to read route declaration ${declarationPath}:`, error);
|
|
162
|
+
return null;
|
|
163
|
+
}
|
|
164
|
+
}
|
|
101
165
|
try {
|
|
102
166
|
const content = _fs.readFileSync.call(void 0, filePath, "utf-8");
|
|
103
167
|
const methods = this.extractExportedMethods(content, filePath);
|
|
104
168
|
if (methods.length === 0) {
|
|
105
169
|
return null;
|
|
106
170
|
}
|
|
107
|
-
const relativePath = _path.relative.call(void 0, appDir, filePath);
|
|
108
|
-
const apiPath = basePath ? `/api/${basePath}` : "/api";
|
|
109
171
|
return {
|
|
110
172
|
path: apiPath,
|
|
111
173
|
methods,
|
|
@@ -122,7 +184,7 @@ var APITypeGenerator = class {
|
|
|
122
184
|
_esmodulelexer.initSync.call(void 0, );
|
|
123
185
|
moduleLexerInitialized = true;
|
|
124
186
|
}
|
|
125
|
-
const httpMethods =
|
|
187
|
+
const httpMethods = HTTP_METHODS;
|
|
126
188
|
const lang = JSX_ROUTE_LANGS[_path.extname.call(void 0, filePath)];
|
|
127
189
|
const source = lang ? transformJSXRoute(content, lang, filePath) : content;
|
|
128
190
|
const [, exports] = _esmodulelexer.parse.call(void 0, source);
|
|
@@ -159,9 +221,10 @@ var APITypeGenerator = class {
|
|
|
159
221
|
*/
|
|
160
222
|
generateAPIRouter(routes, options = {}) {
|
|
161
223
|
const imports = [];
|
|
224
|
+
const coreAPITypes = [];
|
|
162
225
|
const pluginTypes = [];
|
|
163
|
-
if (_optionalChain([options, 'access',
|
|
164
|
-
|
|
226
|
+
if (_optionalChain([options, 'access', _6 => _6.pluginConfigs, 'optionalAccess', _7 => _7.length])) {
|
|
227
|
+
coreAPITypes.push("PluginAPIRouter");
|
|
165
228
|
options.pluginConfigs.forEach((filePath, index) => {
|
|
166
229
|
const importPath = this.getRouteImportPath({ filePath }, options.outFile);
|
|
167
230
|
imports.push(`import type FarmPluginConfig${index} from ${JSON.stringify(importPath)};`);
|
|
@@ -202,25 +265,31 @@ var APITypeGenerator = class {
|
|
|
202
265
|
for (const method of route.methods) methodSources.set(method, route);
|
|
203
266
|
}
|
|
204
267
|
const allMethods = [...methodSources.keys()];
|
|
268
|
+
const methodTypes = /* @__PURE__ */ new Map();
|
|
205
269
|
for (const method of allMethods) {
|
|
206
|
-
const
|
|
270
|
+
const source = methodSources.get(method);
|
|
271
|
+
if (!source.declaration && _chunkYCGOQKVCcjs.isPolyrouteRouteFileName.call(void 0, _path.basename.call(void 0, source.filePath))) {
|
|
272
|
+
if (!coreAPITypes.includes("TypedEndpoint")) coreAPITypes.push("TypedEndpoint");
|
|
273
|
+
methodTypes.set(method, "TypedEndpoint<any, any>");
|
|
274
|
+
continue;
|
|
275
|
+
}
|
|
276
|
+
const importPath = this.getRouteImportPath(_nullishCoalesce(source.declaration, () => ( source)), options.outFile);
|
|
207
277
|
const importName = `${method}_${routeName}`;
|
|
208
278
|
imports.push(
|
|
209
279
|
`import type { ${method} as ${importName} } from ${JSON.stringify(importPath)};`
|
|
210
280
|
);
|
|
281
|
+
methodTypes.set(method, `typeof ${importName}`);
|
|
211
282
|
}
|
|
212
283
|
if (parts.length === 0) {
|
|
213
284
|
for (const method of allMethods) {
|
|
214
|
-
|
|
215
|
-
const methodName = method.toLowerCase();
|
|
216
|
-
nestedStructure[methodName] = `typeof ${importName}`;
|
|
285
|
+
nestedStructure[method.toLowerCase()] = methodTypes.get(method);
|
|
217
286
|
}
|
|
218
287
|
} else {
|
|
219
288
|
const hasMethodCollision = parts.some((part, index) => {
|
|
220
289
|
if (part === "$params" || index === 0 && part === "integrations") return true;
|
|
221
290
|
if (!API_CLIENT_METHOD_SEGMENTS.has(part)) return false;
|
|
222
291
|
const parentPath = parts.slice(0, index).join("/");
|
|
223
|
-
return _optionalChain([routeMethodsByPath, 'access',
|
|
292
|
+
return _optionalChain([routeMethodsByPath, 'access', _8 => _8.get, 'call', _9 => _9(parentPath), 'optionalAccess', _10 => _10.has, 'call', _11 => _11(part)]) === true;
|
|
224
293
|
});
|
|
225
294
|
const typePath = hasMethodCollision ? [`/${cleanPath}`] : parts;
|
|
226
295
|
let current = nestedStructure;
|
|
@@ -229,9 +298,7 @@ var APITypeGenerator = class {
|
|
|
229
298
|
if (i === typePath.length - 1) {
|
|
230
299
|
current[part] = createRouteTreeNode();
|
|
231
300
|
for (const method of allMethods) {
|
|
232
|
-
|
|
233
|
-
const methodName = method.toLowerCase();
|
|
234
|
-
current[part][methodName] = `typeof ${importName}`;
|
|
301
|
+
current[part][method.toLowerCase()] = methodTypes.get(method);
|
|
235
302
|
}
|
|
236
303
|
} else {
|
|
237
304
|
if (!Object.prototype.hasOwnProperty.call(current, part)) {
|
|
@@ -268,6 +335,9 @@ ${routeManifest.map(
|
|
|
268
335
|
},`
|
|
269
336
|
).join("\n")}
|
|
270
337
|
]` : "[]";
|
|
338
|
+
if (coreAPITypes.length) {
|
|
339
|
+
imports.unshift(`import type { ${coreAPITypes.join(", ")} } from "@farm.js/core/api";`);
|
|
340
|
+
}
|
|
271
341
|
return `/**
|
|
272
342
|
* Auto-generated API router types
|
|
273
343
|
* This file is automatically generated - do not edit manually
|
|
@@ -4,7 +4,7 @@ import {
|
|
|
4
4
|
} from "./chunk-PZ5ZJAAO.mjs";
|
|
5
5
|
import {
|
|
6
6
|
APITypeGenerator
|
|
7
|
-
} from "./chunk-
|
|
7
|
+
} from "./chunk-WRT775N6.mjs";
|
|
8
8
|
import {
|
|
9
9
|
getOptionalCatchAllParameterNames,
|
|
10
10
|
materializeSSGRoutePath,
|
|
@@ -841,7 +841,7 @@ async function generateFarmTypeArtifacts(options) {
|
|
|
841
841
|
}
|
|
842
842
|
}
|
|
843
843
|
if (shouldGenerateApi) {
|
|
844
|
-
const generator = new APITypeGenerator(appDirs);
|
|
844
|
+
const generator = new APITypeGenerator(appDirs, { polyroute: options.polyroute });
|
|
845
845
|
const apiRoutes = generator.scanAPIRoutes();
|
|
846
846
|
const apiTypesPath = options.apiTypesOutFile ? resolve3(root, options.apiTypesOutFile) : join3(root, srcDir, "lib", "api.generated.ts");
|
|
847
847
|
const pluginRoutes = resolvePluginRoutes(
|
|
@@ -31,7 +31,7 @@ var _chunkPYPHM7AScjs = require('./chunk-PYPHM7AS.cjs');
|
|
|
31
31
|
var _chunk7ZDLE77Pcjs = require('./chunk-7ZDLE77P.cjs');
|
|
32
32
|
|
|
33
33
|
|
|
34
|
-
var
|
|
34
|
+
var _chunkJZAGIXMBcjs = require('./chunk-JZAGIXMB.cjs');
|
|
35
35
|
|
|
36
36
|
|
|
37
37
|
var _chunkUGL4BDNBcjs = require('./chunk-UGL4BDNB.cjs');
|
|
@@ -980,7 +980,7 @@ function usePackageScanCacheFile(file) {
|
|
|
980
980
|
const stored = /* @__PURE__ */ new Map();
|
|
981
981
|
try {
|
|
982
982
|
const value = JSON.parse(_fs2.default.readFileSync(file, "utf8"));
|
|
983
|
-
if (_optionalChain([value, 'optionalAccess', _68 => _68.schema]) === PACKAGE_SCAN_CACHE_SCHEMA && value.farm ===
|
|
983
|
+
if (_optionalChain([value, 'optionalAccess', _68 => _68.schema]) === PACKAGE_SCAN_CACHE_SCHEMA && value.farm === _chunkJZAGIXMBcjs.FARM_VERSION && value.scans && typeof value.scans === "object") {
|
|
984
984
|
for (const [directory, scan] of Object.entries(value.scans)) {
|
|
985
985
|
if (isStoredPackageScan(scan)) stored.set(directory, scan);
|
|
986
986
|
}
|
|
@@ -1009,7 +1009,7 @@ function persistPackageScanCache() {
|
|
|
1009
1009
|
_fs2.default.mkdirSync(_path2.default.dirname(cache2.file), { recursive: true });
|
|
1010
1010
|
_fs2.default.writeFileSync(
|
|
1011
1011
|
temporary,
|
|
1012
|
-
JSON.stringify({ schema: PACKAGE_SCAN_CACHE_SCHEMA, farm:
|
|
1012
|
+
JSON.stringify({ schema: PACKAGE_SCAN_CACHE_SCHEMA, farm: _chunkJZAGIXMBcjs.FARM_VERSION, scans })
|
|
1013
1013
|
);
|
|
1014
1014
|
_fs2.default.renameSync(temporary, cache2.file);
|
|
1015
1015
|
cache2.dirty = false;
|
|
@@ -2322,7 +2322,7 @@ var PackageClientBoundaryCache = class {
|
|
|
2322
2322
|
}
|
|
2323
2323
|
const contents = JSON.stringify({
|
|
2324
2324
|
schema: SCHEMA_VERSION,
|
|
2325
|
-
farm:
|
|
2325
|
+
farm: _chunkJZAGIXMBcjs.FARM_VERSION,
|
|
2326
2326
|
paths,
|
|
2327
2327
|
entries
|
|
2328
2328
|
});
|
|
@@ -2362,7 +2362,7 @@ function readStoredCache(file) {
|
|
|
2362
2362
|
} catch (e38) {
|
|
2363
2363
|
return null;
|
|
2364
2364
|
}
|
|
2365
|
-
if (!isRecord(value) || value.schema !== SCHEMA_VERSION || value.farm !==
|
|
2365
|
+
if (!isRecord(value) || value.schema !== SCHEMA_VERSION || value.farm !== _chunkJZAGIXMBcjs.FARM_VERSION) {
|
|
2366
2366
|
return null;
|
|
2367
2367
|
}
|
|
2368
2368
|
const { paths, entries } = value;
|
|
@@ -2373,7 +2373,7 @@ function readStoredCache(file) {
|
|
|
2373
2373
|
const usable = variants.filter((entry) => isStoredEntry(entry, paths.length));
|
|
2374
2374
|
if (usable.length > 0) valid[key] = usable;
|
|
2375
2375
|
}
|
|
2376
|
-
return { schema: SCHEMA_VERSION, farm:
|
|
2376
|
+
return { schema: SCHEMA_VERSION, farm: _chunkJZAGIXMBcjs.FARM_VERSION, paths, entries: valid };
|
|
2377
2377
|
}
|
|
2378
2378
|
function isRecord(value) {
|
|
2379
2379
|
return typeof value === "object" && value !== null && !Array.isArray(value);
|
|
@@ -7,7 +7,7 @@ var _chunkPRKFECGTcjs = require('./chunk-PRKFECGT.cjs');
|
|
|
7
7
|
|
|
8
8
|
|
|
9
9
|
|
|
10
|
-
var
|
|
10
|
+
var _chunkYCGOQKVCcjs = require('./chunk-YCGOQKVC.cjs');
|
|
11
11
|
|
|
12
12
|
|
|
13
13
|
var _chunkYCIFGYBYcjs = require('./chunk-YCIFGYBY.cjs');
|
|
@@ -142,7 +142,7 @@ var APIRouteManager = class _APIRouteManager {
|
|
|
142
142
|
/**
|
|
143
143
|
* Recursively find all route.ts files
|
|
144
144
|
*/
|
|
145
|
-
findRouteFiles(dir, polyroute =
|
|
145
|
+
findRouteFiles(dir, polyroute = _chunkYCGOQKVCcjs.hasPolyroutePlugin.call(void 0, _optionalChain([this, 'access', _ => _.viteServer, 'optionalAccess', _2 => _2.config, 'optionalAccess', _3 => _3.plugins]))) {
|
|
146
146
|
const files = [];
|
|
147
147
|
if (!fs.existsSync(dir)) {
|
|
148
148
|
return files;
|
|
@@ -152,7 +152,7 @@ var APIRouteManager = class _APIRouteManager {
|
|
|
152
152
|
const fullPath = path.join(dir, entry.name);
|
|
153
153
|
if (entry.isDirectory()) {
|
|
154
154
|
files.push(...this.findRouteFiles(fullPath, polyroute));
|
|
155
|
-
} else if (
|
|
155
|
+
} else if (_chunkYCGOQKVCcjs.isFarmAPIRouteFileName.call(void 0, entry.name, polyroute)) {
|
|
156
156
|
files.push(fullPath);
|
|
157
157
|
}
|
|
158
158
|
}
|
|
@@ -9,7 +9,7 @@ import {
|
|
|
9
9
|
collectSSGPages,
|
|
10
10
|
matchSSGPage,
|
|
11
11
|
resolveRouteRenderingConfigFromFile
|
|
12
|
-
} from "./chunk-
|
|
12
|
+
} from "./chunk-CZMMU3FP.mjs";
|
|
13
13
|
import {
|
|
14
14
|
resolveFarmRendererRoutes
|
|
15
15
|
} from "./chunk-PZ5ZJAAO.mjs";
|
|
@@ -59,7 +59,7 @@ import {
|
|
|
59
59
|
} from "./chunk-LP6DIYGA.mjs";
|
|
60
60
|
import {
|
|
61
61
|
listFarmMCPLlmsTxtLinks
|
|
62
|
-
} from "./chunk-
|
|
62
|
+
} from "./chunk-XYCB3CXM.mjs";
|
|
63
63
|
import {
|
|
64
64
|
FARM_DEFAULT_MCP_PATH,
|
|
65
65
|
collectFarmDefaultMCPPages,
|
|
@@ -108,7 +108,7 @@ import {
|
|
|
108
108
|
usesFarmServerTree,
|
|
109
109
|
withFarmSourceSnapshot,
|
|
110
110
|
withFarmSourceSnapshotAside
|
|
111
|
-
} from "./chunk-
|
|
111
|
+
} from "./chunk-E7ISZK3R.mjs";
|
|
112
112
|
import {
|
|
113
113
|
_setDefaultFarmThemeConfig,
|
|
114
114
|
getTheme
|
|
@@ -312,7 +312,7 @@ import {
|
|
|
312
312
|
} from "./chunk-EILUVBKS.mjs";
|
|
313
313
|
import {
|
|
314
314
|
FARM_VERSION
|
|
315
|
-
} from "./chunk-
|
|
315
|
+
} from "./chunk-BOHBFBRA.mjs";
|
|
316
316
|
import {
|
|
317
317
|
normalizeFarmAPIConfig
|
|
318
318
|
} from "./chunk-W6QLRQ3V.mjs";
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
"use strict";Object.defineProperty(exports, "__esModule", {value: true}); function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; } function _nullishCoalesce(lhs, rhsFn) { if (lhs != null) { return lhs; } else { return rhsFn(); } }
|
|
2
2
|
|
|
3
3
|
|
|
4
|
-
var
|
|
4
|
+
var _chunkJJ22OI7Jcjs = require('./chunk-JJ22OI7J.cjs');
|
|
5
5
|
|
|
6
6
|
|
|
7
7
|
var _chunk7O3YJ6NPcjs = require('./chunk-7O3YJ6NP.cjs');
|
|
@@ -68,7 +68,7 @@ function findFarmNativeScreenFiles(appDirs) {
|
|
|
68
68
|
}
|
|
69
69
|
function collectFarmNativeServerFns(options) {
|
|
70
70
|
const { root, srcDir } = options;
|
|
71
|
-
const aliases =
|
|
71
|
+
const aliases = _chunkJJ22OI7Jcjs.readAliases.call(void 0, root, srcDir);
|
|
72
72
|
const seen = /* @__PURE__ */ new Set();
|
|
73
73
|
const found = /* @__PURE__ */ new Map();
|
|
74
74
|
const queue = [...options.entries];
|
|
@@ -102,7 +102,7 @@ function collectFarmNativeServerFns(options) {
|
|
|
102
102
|
}
|
|
103
103
|
}
|
|
104
104
|
for (const candidate of _nullishCoalesce(candidates, () => ( []))) {
|
|
105
|
-
const resolved =
|
|
105
|
+
const resolved = _chunkJJ22OI7Jcjs.resolveFile.call(void 0, candidate);
|
|
106
106
|
if (resolved && SCRIPT.test(resolved) && !resolved.includes(`${_path2.default.sep}node_modules${_path2.default.sep}`)) {
|
|
107
107
|
queue.push(resolved);
|
|
108
108
|
break;
|
|
@@ -4,7 +4,7 @@
|
|
|
4
4
|
var _chunkWXPY5FRFcjs = require('./chunk-WXPY5FRF.cjs');
|
|
5
5
|
|
|
6
6
|
|
|
7
|
-
var
|
|
7
|
+
var _chunkCS6GXE42cjs = require('./chunk-CS6GXE42.cjs');
|
|
8
8
|
|
|
9
9
|
|
|
10
10
|
|
|
@@ -850,7 +850,7 @@ async function generateFarmTypeArtifacts(options) {
|
|
|
850
850
|
}
|
|
851
851
|
}
|
|
852
852
|
if (shouldGenerateApi) {
|
|
853
|
-
const generator = new (0,
|
|
853
|
+
const generator = new (0, _chunkCS6GXE42cjs.APITypeGenerator)(appDirs, { polyroute: options.polyroute });
|
|
854
854
|
const apiRoutes = generator.scanAPIRoutes();
|
|
855
855
|
const apiTypesPath = options.apiTypesOutFile ? _path.resolve.call(void 0, root, options.apiTypesOutFile) : _path.join.call(void 0, root, srcDir, "lib", "api.generated.ts");
|
|
856
856
|
const pluginRoutes = _chunk4JCX33RZcjs.resolvePluginRoutes.call(void 0,
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
"use strict";Object.defineProperty(exports, "__esModule", {value: true}); function _nullishCoalesce(lhs, rhsFn) { if (lhs != null) { return lhs; } else { return rhsFn(); } } function _optionalChain(ops) { let lastAccessLHS = undefined; let value = ops[0]; let i = 1; while (i < ops.length) { const op = ops[i]; const fn = ops[i + 1]; i += 2; if ((op === 'optionalAccess' || op === 'optionalCall') && value == null) { return undefined; } if (op === 'access' || op === 'optionalAccess') { lastAccessLHS = value; value = fn(value); } else if (op === 'call' || op === 'optionalCall') { value = fn((...args) => value.call(lastAccessLHS, ...args)); lastAccessLHS = undefined; } } return value; }
|
|
2
2
|
|
|
3
|
-
var
|
|
3
|
+
var _chunkJZAGIXMBcjs = require('./chunk-JZAGIXMB.cjs');
|
|
4
4
|
|
|
5
5
|
|
|
6
6
|
var _chunkUGL4BDNBcjs = require('./chunk-UGL4BDNB.cjs');
|
|
@@ -97,7 +97,7 @@ function createFarmProductionSiteReporter(options) {
|
|
|
97
97
|
schemaVersion: FARM_PRODUCTION_SITE_TELEMETRY_SCHEMA_VERSION,
|
|
98
98
|
eventType: FARM_PRODUCTION_SITE_ATTESTATION_EVENT_TYPE,
|
|
99
99
|
packageName: FARM_PRODUCTION_SITE_TELEMETRY_PACKAGE_NAME,
|
|
100
|
-
packageVersion: sanitizeDetail(
|
|
100
|
+
packageVersion: sanitizeDetail(_chunkJZAGIXMBcjs.FARM_VERSION, "unknown"),
|
|
101
101
|
renderer: sanitizeDetail(options.renderer, "custom"),
|
|
102
102
|
deployTarget: sanitizeDetail(options.deployTarget, "custom")
|
|
103
103
|
};
|
|
@@ -18,7 +18,7 @@ var _chunkBRWSQDKOcjs = require('./chunk-BRWSQDKO.cjs');
|
|
|
18
18
|
var _chunkJ3RIMCBDcjs = require('./chunk-J3RIMCBD.cjs');
|
|
19
19
|
|
|
20
20
|
|
|
21
|
-
var
|
|
21
|
+
var _chunkJZAGIXMBcjs = require('./chunk-JZAGIXMB.cjs');
|
|
22
22
|
|
|
23
23
|
|
|
24
24
|
var _chunkUGL4BDNBcjs = require('./chunk-UGL4BDNB.cjs');
|
|
@@ -29,7 +29,7 @@ var _crypto = require('crypto');
|
|
|
29
29
|
var _fs = require('fs');
|
|
30
30
|
var _promises = require('fs/promises');
|
|
31
31
|
var _path = require('path'); var path = _interopRequireWildcard(_path);
|
|
32
|
-
var ANALYZER_VERSION = `8:${
|
|
32
|
+
var ANALYZER_VERSION = `8:${_chunkJZAGIXMBcjs.FARM_VERSION}`;
|
|
33
33
|
var INTRINSIC_KINDS = {};
|
|
34
34
|
for (const tag of "div section main article header footer nav aside figure hr li".split(" ")) {
|
|
35
35
|
INTRINSIC_KINDS[tag] = "View";
|
|
@@ -4,7 +4,7 @@
|
|
|
4
4
|
var _chunkR6GOH5CHcjs = require('./chunk-R6GOH5CH.cjs');
|
|
5
5
|
|
|
6
6
|
|
|
7
|
-
var
|
|
7
|
+
var _chunkHENYWY5Jcjs = require('./chunk-HENYWY5J.cjs');
|
|
8
8
|
|
|
9
9
|
|
|
10
10
|
var _chunk6QCZWAGOcjs = require('./chunk-6QCZWAGO.cjs');
|
|
@@ -29,7 +29,7 @@ var _chunkH5AC3XSEcjs = require('./chunk-H5AC3XSE.cjs');
|
|
|
29
29
|
var _chunk7GKZDRY2cjs = require('./chunk-7GKZDRY2.cjs');
|
|
30
30
|
|
|
31
31
|
|
|
32
|
-
var
|
|
32
|
+
var _chunkJZAGIXMBcjs = require('./chunk-JZAGIXMB.cjs');
|
|
33
33
|
|
|
34
34
|
|
|
35
35
|
var _chunkTFCBJFP7cjs = require('./chunk-TFCBJFP7.cjs');
|
|
@@ -294,7 +294,7 @@ function createFarmAppManifest(input, registered = []) {
|
|
|
294
294
|
return {
|
|
295
295
|
schemaVersion: 1,
|
|
296
296
|
app: app ? {
|
|
297
|
-
...app.version ? { farm:
|
|
297
|
+
...app.version ? { farm: _chunkJZAGIXMBcjs.FARM_VERSION } : {},
|
|
298
298
|
...app.renderer ? { renderer: input.renderer } : {},
|
|
299
299
|
basePath: input.basePath,
|
|
300
300
|
...app.build ? { build: input.build } : {}
|
|
@@ -325,7 +325,7 @@ function resolveFarmSiteUrl() {
|
|
|
325
325
|
asUrl(read("RAILWAY_PUBLIC_DOMAIN"))
|
|
326
326
|
];
|
|
327
327
|
for (const candidate of candidates) {
|
|
328
|
-
const origin = candidate ?
|
|
328
|
+
const origin = candidate ? _chunkHENYWY5Jcjs.normalizeFarmProductionSiteOrigin.call(void 0, candidate) : void 0;
|
|
329
329
|
if (origin) return origin;
|
|
330
330
|
}
|
|
331
331
|
return null;
|
|
@@ -9,14 +9,14 @@ import {
|
|
|
9
9
|
} from "./chunk-IYEY3JWJ.mjs";
|
|
10
10
|
import {
|
|
11
11
|
APIRouteConflictError
|
|
12
|
-
} from "./chunk-
|
|
12
|
+
} from "./chunk-CPL7WIMP.mjs";
|
|
13
13
|
import {
|
|
14
14
|
findProgrammaticRouteFilesInDir
|
|
15
15
|
} from "./chunk-LQZXCSYG.mjs";
|
|
16
16
|
import {
|
|
17
17
|
hasPolyroutePlugin,
|
|
18
18
|
isFarmAPIRouteFileName
|
|
19
|
-
} from "./chunk-
|
|
19
|
+
} from "./chunk-O77EKGAS.mjs";
|
|
20
20
|
import {
|
|
21
21
|
API_ROUTE_METHODS,
|
|
22
22
|
FARM_INTERNAL_SERVER_ERROR_BODY,
|
|
@@ -0,0 +1,36 @@
|
|
|
1
|
+
// src/api/route-files.ts
|
|
2
|
+
function hasPolyroutePlugin(plugins) {
|
|
3
|
+
return plugins?.some((plugin) => plugin.name === "polyroute") === true;
|
|
4
|
+
}
|
|
5
|
+
async function hasPolyroutePluginOption(option) {
|
|
6
|
+
const value = await option;
|
|
7
|
+
if (Array.isArray(value)) {
|
|
8
|
+
for (const entry of value) {
|
|
9
|
+
if (await hasPolyroutePluginOption(entry)) return true;
|
|
10
|
+
}
|
|
11
|
+
return false;
|
|
12
|
+
}
|
|
13
|
+
return typeof value === "object" && value !== null && value.name === "polyroute";
|
|
14
|
+
}
|
|
15
|
+
function isPolyrouteRouteFileName(fileName) {
|
|
16
|
+
return fileName === "route.rs" || fileName === "route.go" || fileName === "route.py";
|
|
17
|
+
}
|
|
18
|
+
function getPolyrouteRouteDeclarationFileName(routeFileName) {
|
|
19
|
+
return routeFileName.replace(/^route\./, "route.d.") + ".ts";
|
|
20
|
+
}
|
|
21
|
+
function isPolyrouteRouteDeclarationFileName(fileName) {
|
|
22
|
+
return fileName === "route.d.rs.ts" || fileName === "route.d.go.ts" || fileName === "route.d.py.ts";
|
|
23
|
+
}
|
|
24
|
+
function isFarmAPIRouteFileName(fileName, polyroute = false) {
|
|
25
|
+
if (polyroute && isPolyrouteRouteFileName(fileName)) return true;
|
|
26
|
+
return /^route\.(?:ts|tsx|js|jsx)$/.test(fileName);
|
|
27
|
+
}
|
|
28
|
+
|
|
29
|
+
export {
|
|
30
|
+
hasPolyroutePlugin,
|
|
31
|
+
hasPolyroutePluginOption,
|
|
32
|
+
isPolyrouteRouteFileName,
|
|
33
|
+
getPolyrouteRouteDeclarationFileName,
|
|
34
|
+
isPolyrouteRouteDeclarationFileName,
|
|
35
|
+
isFarmAPIRouteFileName
|
|
36
|
+
};
|