@farm.js/core 0.1.81 → 0.1.82
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-Cxi3214_.d.ts → agent-mcp.d-C2Su3x4D.d.ts} +1 -1
- package/dist/{agent-mcp.d-DMqOqnOA.d.mts → agent-mcp.d-Yak-LqRd.d.mts} +1 -1
- package/dist/agent-runtime.cjs +4 -3
- package/dist/agent-runtime.d.mts +1 -1
- package/dist/agent-runtime.d.ts +1 -1
- package/dist/agent-runtime.mjs +3 -2
- package/dist/analyzer-LV23T6QN.cjs +17 -0
- package/dist/{analyzer-IC66UJCU.mjs → analyzer-RPU2KG4J.mjs} +2 -2
- package/dist/api/node.cjs +5 -4
- package/dist/api/node.d.mts +3 -3
- package/dist/api/node.d.ts +3 -3
- package/dist/api/node.mjs +4 -3
- package/dist/api/route-manager.cjs +5 -4
- 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 -3
- package/dist/api/runtime.cjs +4 -3
- package/dist/api/runtime.d.mts +2 -2
- package/dist/api/runtime.d.ts +2 -2
- package/dist/api/runtime.mjs +3 -2
- package/dist/api.cjs +7 -6
- package/dist/api.d.mts +4 -4
- package/dist/api.d.ts +4 -4
- package/dist/api.mjs +6 -5
- package/dist/{app-manifest.d-Bbxp5kes.d.mts → app-manifest.d-BcyOFMrg.d.mts} +1 -1
- package/dist/{app-manifest.d-C8Cswd31.d.ts → app-manifest.d-DZyXaICz.d.ts} +1 -1
- package/dist/app-markdown.d.mts +2 -2
- package/dist/app-markdown.d.ts +2 -2
- package/dist/{app.d-BJuSurgy.d.mts → app.d-C0ePpuaG.d.mts} +21 -4
- package/dist/{app.d-DGIoFt5D.d.ts → app.d-CIoXsAbN.d.ts} +21 -4
- package/dist/chunk-3DE6RK7K.cjs +36 -0
- package/dist/{chunk-NOYKBGUK.mjs → chunk-47I2MYIR.mjs} +130 -46
- package/dist/{chunk-GY63XD6K.mjs → chunk-4X7LSGM6.mjs} +1 -1
- package/dist/{chunk-BPWTSPK6.mjs → chunk-5AL2GXAU.mjs} +1 -1
- package/dist/{chunk-GAWSWJJ2.cjs → chunk-5GFTMTX3.cjs} +2 -2
- package/dist/{chunk-CPZZBCPO.cjs → chunk-5MUFW5UU.cjs} +2 -2
- package/dist/{chunk-LKIG5SM6.cjs → chunk-5P65LXGU.cjs} +9 -9
- package/dist/{chunk-XOXCQGAF.mjs → chunk-63ZE6B6M.mjs} +1 -1
- package/dist/{chunk-XOGCNKB7.cjs → chunk-6BPFIYGY.cjs} +3 -3
- package/dist/{chunk-UF4BNKKJ.mjs → chunk-6QYPP5KC.mjs} +2 -2
- package/dist/{chunk-ATISIC6G.mjs → chunk-7VJXYB6S.mjs} +7 -1
- package/dist/{chunk-2Y2HRZQY.cjs → chunk-AIPZDBP6.cjs} +312 -228
- package/dist/{chunk-CL7BUGVB.cjs → chunk-ARORZ3MH.cjs} +286 -240
- package/dist/{chunk-ONSZP5JK.mjs → chunk-AUFEM3FB.mjs} +1 -1
- package/dist/{chunk-FYZD7DUS.cjs → chunk-B2PGVHBG.cjs} +4 -4
- package/dist/{chunk-WGWWRV2M.cjs → chunk-B3HQTGXS.cjs} +6 -4
- package/dist/{chunk-M6DAIE4T.cjs → chunk-BCTHOQPP.cjs} +10 -8
- package/dist/{chunk-S3IWDDQ3.mjs → chunk-C3VCYOU4.mjs} +1 -1
- package/dist/{chunk-OO4GVGM3.mjs → chunk-CA2HBLXP.mjs} +11 -1
- package/dist/{chunk-W6C3LEXX.cjs → chunk-CD5Z7RR5.cjs} +155 -20
- package/dist/{chunk-YH7ENV3K.mjs → chunk-CJDBTTLB.mjs} +4 -4
- package/dist/{chunk-5N526T7Q.mjs → chunk-DAXU2NBE.mjs} +74 -18
- package/dist/{chunk-Z5BANEQD.cjs → chunk-DMSXZNQR.cjs} +2 -2
- package/dist/{chunk-46UV2E7I.cjs → chunk-DRO3NXA3.cjs} +9 -9
- package/dist/{chunk-4OFWG4IK.cjs → chunk-EACD6ND7.cjs} +8 -2
- package/dist/{chunk-HTNJ7A4D.mjs → chunk-EL2Z6YFZ.mjs} +2 -2
- package/dist/{chunk-IM3UINTZ.mjs → chunk-GXLNARPO.mjs} +151 -16
- package/dist/{chunk-E3HBD2K3.cjs → chunk-HHQEKLZL.cjs} +2 -2
- package/dist/{chunk-5ZHC6QGD.cjs → chunk-HQKCSJEH.cjs} +8 -2
- package/dist/{chunk-RHI67C2V.cjs → chunk-HUGPJFOC.cjs} +1 -35
- package/dist/{chunk-BJWJP5A4.mjs → chunk-I4DR3HCH.mjs} +3 -3
- package/dist/{chunk-C2OLXVUC.mjs → chunk-IVP5Q4BX.mjs} +10 -3
- package/dist/{chunk-NSLRK5DK.cjs → chunk-JK26IMT7.cjs} +1 -1
- package/dist/{chunk-WIZRYFB2.cjs → chunk-JYQ6DGPW.cjs} +8 -6
- package/dist/{chunk-TYHWZOA2.mjs → chunk-KWI3SQFX.mjs} +4 -2
- package/dist/{chunk-POVHO46S.mjs → chunk-L3RDECA5.mjs} +1 -1
- package/dist/{chunk-MOGRRZMW.cjs → chunk-LM2ZDNDD.cjs} +16 -16
- package/dist/{chunk-RPA45OQS.mjs → chunk-MO4UTDQ6.mjs} +1 -1
- package/dist/{chunk-ZIYJWJV2.cjs → chunk-N2EFMN2K.cjs} +8 -8
- package/dist/{chunk-6WVRVGKC.mjs → chunk-NAHDG6UX.mjs} +1 -1
- package/dist/{chunk-OFVCWV2D.cjs → chunk-NEKO3HM2.cjs} +11 -1
- package/dist/{chunk-SLEHAGGV.mjs → chunk-NQ3Y6E2T.mjs} +7 -1
- package/dist/{chunk-IPG6B25T.mjs → chunk-NRCKBDYP.mjs} +78 -32
- package/dist/{chunk-POL5RCVU.mjs → chunk-OMB7UGVW.mjs} +1 -1
- package/dist/{chunk-D77OGI6X.mjs → chunk-OP5VI4TP.mjs} +1 -1
- package/dist/{chunk-7VCLTNED.mjs → chunk-PNMAD3OS.mjs} +1 -35
- package/dist/{chunk-OIWDEDUO.cjs → chunk-Q2VOT3K2.cjs} +392 -336
- package/dist/{chunk-RZ6XUEQS.mjs → chunk-QSMUMK7Y.mjs} +2 -2
- package/dist/{chunk-2HMSSPCZ.mjs → chunk-RMLR5RMH.mjs} +4 -2
- package/dist/{chunk-ADQ2LATR.cjs → chunk-RMPUEH5T.cjs} +2 -2
- package/dist/{chunk-AHVF5GI2.cjs → chunk-S7WZUK3B.cjs} +2 -2
- package/dist/{chunk-ZKNXCRUQ.cjs → chunk-U54REWMJ.cjs} +23 -23
- package/dist/chunk-U6XYBTUT.mjs +36 -0
- package/dist/{chunk-TCMRLW3K.cjs → chunk-VACYUMXW.cjs} +10 -3
- package/dist/{chunk-OUDNUFVR.cjs → chunk-VMBIKDKW.cjs} +4 -4
- package/dist/{chunk-UGLTOLTJ.cjs → chunk-W76C7TCW.cjs} +2 -2
- package/dist/{chunk-6JWXHPVR.mjs → chunk-XRSNW4IU.mjs} +4 -2
- package/dist/{chunk-TLSGRK7E.mjs → chunk-ZIZRIZLP.mjs} +1 -1
- package/dist/{cli-runtime.d-D8O1v2_X.d.mts → cli-runtime.d-Hnvvadz7.d.mts} +5 -5
- package/dist/{cli-runtime.d-hf4L1MNP.d.ts → cli-runtime.d-I0MphTbc.d.ts} +5 -5
- package/dist/{client-component.d-CX8UCQh-.d.ts → client-component.d-5QEvtJsg.d.ts} +1 -1
- package/dist/{client-component.d-DFwUHlOz.d.mts → client-component.d-DapRqtSC.d.mts} +1 -1
- package/dist/{client-plugins.d-BflSNO-b.d.mts → client-plugins.d-C1WM3ieD.d.mts} +6 -1
- package/dist/{client-plugins.d-qWp8hNwd.d.ts → client-plugins.d-DcmDzcSC.d.ts} +6 -1
- package/dist/client-plugins.d.mts +1 -1
- package/dist/client-plugins.d.ts +1 -1
- package/dist/client.d.mts +7 -7
- package/dist/client.d.ts +7 -7
- package/dist/config.d.mts +1 -1
- package/dist/config.d.ts +1 -1
- package/dist/cron.cjs +2 -2
- package/dist/cron.mjs +1 -1
- package/dist/desktop.d.mts +2 -2
- package/dist/desktop.d.ts +2 -2
- package/dist/{devtools-EI5N366Z.cjs → devtools-5B7NZE6F.cjs} +10 -9
- package/dist/{devtools-XJHODO5H.mjs → devtools-C5GXZZ7E.mjs} +7 -6
- package/dist/docs.cjs +9 -8
- package/dist/docs.d.mts +3 -3
- package/dist/docs.d.ts +3 -3
- package/dist/docs.mjs +8 -7
- package/dist/environment/vite.cjs +4 -4
- package/dist/environment/vite.mjs +3 -3
- package/dist/{handler.d-DoH5Krkq.d.mts → handler.d-B8bPCBzl.d.mts} +1 -1
- package/dist/{handler.d-C2oRihfa.d.ts → handler.d-Cliwo6Nu.d.ts} +1 -1
- package/dist/{headers.d-BrX53wFQ.d.mts → headers.d-CVwSpSGX.d.mts} +1 -1
- package/dist/{headers.d-Dj0mfYpb.d.ts → headers.d-C_btqjV6.d.ts} +1 -1
- package/dist/index.cjs +28 -27
- package/dist/{index.d-DzDHOttz.d.mts → index.d-DFuMZk9-.d.mts} +1 -1
- package/dist/{index.d-Dhc2scRl.d.ts → index.d-hOEbMcLk.d.ts} +1 -1
- package/dist/index.d.mts +22 -22
- package/dist/index.d.ts +22 -22
- package/dist/index.mjs +27 -26
- package/dist/integrations/orm.d.mts +1 -1
- package/dist/integrations/orm.d.ts +1 -1
- package/dist/integrations.cjs +4 -3
- package/dist/integrations.d.mts +1 -1
- package/dist/integrations.d.ts +1 -1
- package/dist/integrations.mjs +3 -2
- 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 +26 -25
- package/dist/internal/build-runtime.d.mts +4 -4
- package/dist/internal/build-runtime.d.ts +4 -4
- package/dist/internal/build-runtime.mjs +25 -24
- package/dist/internal/cli-runtime.cjs +11 -10
- package/dist/internal/cli-runtime.d.mts +7 -7
- package/dist/internal/cli-runtime.d.ts +7 -7
- package/dist/internal/cli-runtime.mjs +10 -9
- package/dist/internal/client-error-overlay.cjs +4 -4
- package/dist/internal/client-error-overlay.mjs +1 -1
- package/dist/internal/client-runtime.d.mts +5 -5
- package/dist/internal/client-runtime.d.ts +5 -5
- package/dist/internal/compression-runtime.d.mts +1 -1
- package/dist/internal/compression-runtime.d.ts +1 -1
- package/dist/internal/config-runtime.cjs +9 -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 +8 -7
- package/dist/internal/infra-analytics-runtime.cjs +8 -6
- package/dist/internal/infra-analytics-runtime.d.mts +8 -2
- package/dist/internal/infra-analytics-runtime.d.ts +8 -2
- package/dist/internal/infra-analytics-runtime.mjs +8 -6
- package/dist/internal/islands-boot.cjs +54 -20
- package/dist/internal/islands-boot.d.mts +5 -3
- package/dist/internal/islands-boot.d.ts +5 -3
- package/dist/internal/islands-boot.mjs +49 -15
- 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 +11 -6
- package/dist/internal/production-runtime.d.mts +13 -11
- package/dist/internal/production-runtime.d.ts +13 -11
- package/dist/internal/production-runtime.mjs +10 -5
- package/dist/internal/spa-router.d.mts +3 -3
- package/dist/internal/spa-router.d.ts +3 -3
- package/dist/internal/start-manifest.d.mts +1 -1
- package/dist/internal/start-manifest.d.ts +1 -1
- package/dist/markdown.d.mts +1 -1
- package/dist/markdown.d.ts +1 -1
- package/dist/middleware.d.mts +1 -1
- package/dist/middleware.d.ts +1 -1
- package/dist/{mount.d-DwXjaOHY.d.ts → mount.d-CAovYKfs.d.ts} +1 -1
- package/dist/{mount.d-DOaeUoWq.d.mts → mount.d-DLeYxeRR.d.mts} +1 -1
- package/dist/{navigation-delegate.d-o3pPd9VI.d.ts → navigation-delegate.d-BLM-8Q3Z.d.ts} +1 -1
- package/dist/{navigation-delegate.d-BElGUMgt.d.mts → navigation-delegate.d-Chv93QS6.d.mts} +1 -1
- package/dist/navigation.d.mts +4 -4
- package/dist/navigation.d.ts +4 -4
- package/dist/{nitro-YLTGVGK4.mjs → nitro-FK3SZM4H.mjs} +1 -1
- package/dist/{nitro-XGIO6EQN.cjs → nitro-YDFMH5PY.cjs} +4 -4
- package/dist/{plugin-LN3JBZRR.cjs → plugin-3PT7I26P.cjs} +2 -2
- package/dist/{plugin-33I3V42N.mjs → plugin-QOTAPTVV.mjs} +1 -1
- package/dist/plugin.cjs +21 -19
- package/dist/plugin.d.mts +5 -5
- package/dist/plugin.d.ts +5 -5
- package/dist/plugin.mjs +20 -18
- package/dist/{render-plan.d-BD06tqFA.d.ts → render-plan.d-BSTjTH8h.d.ts} +1 -1
- package/dist/{render-plan.d-xWCRAJeR.d.mts → render-plan.d-CK5Lggyb.d.mts} +1 -1
- package/dist/renderer-client.cjs +48 -5
- package/dist/renderer-client.d.mts +5 -5
- package/dist/renderer-client.d.ts +5 -5
- package/dist/renderer-client.mjs +48 -5
- package/dist/renderer.cjs +2 -2
- package/dist/renderer.d.mts +10 -0
- package/dist/renderer.d.ts +10 -0
- package/dist/renderer.mjs +1 -1
- package/dist/{request.d-Dx82V8bz.d.mts → request.d-BhggxQf3.d.mts} +1 -1
- package/dist/{request.d-DUMuWxSN.d.ts → request.d-CyJS9bjm.d.ts} +1 -1
- package/dist/request.d.mts +2 -2
- package/dist/request.d.ts +2 -2
- package/dist/{route-rendering.d-BwBVpLtD.d.ts → route-rendering.d-BLPPmI5I.d.ts} +1 -1
- package/dist/{route-rendering.d-DJh6GauM.d.mts → route-rendering.d-CUpG2mZJ.d.mts} +1 -1
- package/dist/{router.d-CJBSG5jr.d.ts → router.d-0X2Ki6rf.d.ts} +1 -1
- package/dist/{router.d-BtkKDxUB.d.mts → router.d-2NQM1Kgw.d.mts} +1 -1
- package/dist/routes.d.mts +1 -1
- package/dist/routes.d.ts +1 -1
- package/dist/{rsc-pipeline-H5AXQA7A.cjs → rsc-pipeline-5AOF64FL.cjs} +10 -9
- package/dist/{rsc-pipeline-GD6KLOIG.mjs → rsc-pipeline-DNRLYOJ7.mjs} +9 -8
- package/dist/{runtime-OJ7FXFUI.mjs → runtime-EHG2FRXZ.mjs} +9 -8
- package/dist/{runtime-YWQVBC3V.cjs → runtime-ZVHG5SRB.cjs} +13 -12
- package/dist/{runtime.d-BQnD0cfC.d.ts → runtime.d-CXuwkUgr.d.ts} +1 -1
- package/dist/{runtime.d-C4SuZXf6.d.mts → runtime.d-CaFXcu_Q.d.mts} +1 -1
- package/dist/{server-components-status.d-rfKOcE0N.d.ts → server-components-status.d-BdeFD8ZH.d.ts} +1 -1
- package/dist/{server-components-status.d-9rH7ZoEq.d.mts → server-components-status.d-Cp7zvBm5.d.mts} +1 -1
- package/dist/server-plugins.d.mts +3 -3
- package/dist/server-plugins.d.ts +3 -3
- package/dist/server.cjs +54 -48
- package/dist/server.d.mts +11 -11
- package/dist/server.d.ts +11 -11
- package/dist/server.mjs +30 -24
- package/dist/{spa-router.d-DMKiBsHH.d.ts → spa-router.d-Bjgl-Osi.d.ts} +2 -2
- package/dist/{spa-router.d-V6XLSTCy.d.mts → spa-router.d-l3G38xHa.d.mts} +2 -2
- package/dist/{ssg.d-MNedvvMB.d.ts → ssg.d-DDca17Lc.d.ts} +2 -2
- package/dist/{ssg.d-BnCKPQL0.d.mts → ssg.d-RnlHOqUL.d.mts} +2 -2
- package/dist/{store-core.d-BqJI1-ix.d.mts → store-core.d-BZjuC6Zc.d.mts} +11 -3
- package/dist/{store-core.d-Ad5biajo.d.ts → store-core.d-BaOUOPf7.d.ts} +11 -3
- package/dist/testing.cjs +5 -4
- package/dist/testing.d.mts +1 -1
- package/dist/testing.d.ts +1 -1
- package/dist/testing.mjs +4 -3
- package/dist/{utils.d-BdjHKDuT.d.ts → utils.d-D8TWmpWo.d.ts} +1 -1
- package/dist/{utils.d-BEKLWa0Z.d.mts → utils.d-tdzw0_zQ.d.mts} +1 -1
- package/dist/version.cjs +2 -2
- package/dist/version.mjs +1 -1
- package/dist/vite.cjs +21 -19
- package/dist/vite.d.mts +6 -6
- package/dist/vite.d.ts +6 -6
- package/dist/vite.mjs +20 -18
- package/package.json +2 -2
- package/dist/analyzer-435DCIQ6.cjs +0 -17
|
@@ -21,7 +21,7 @@ var _chunkKORZ6PREcjs = require('./chunk-KORZ6PRE.cjs');
|
|
|
21
21
|
|
|
22
22
|
|
|
23
23
|
|
|
24
|
-
var
|
|
24
|
+
var _chunkJYQ6DGPWcjs = require('./chunk-JYQ6DGPW.cjs');
|
|
25
25
|
|
|
26
26
|
|
|
27
27
|
var _chunkGCJ4GNMCcjs = require('./chunk-GCJ4GNMC.cjs');
|
|
@@ -122,7 +122,7 @@ var APIRouteManager = class _APIRouteManager {
|
|
|
122
122
|
await this.loadProgrammaticApiRoutes(appDir);
|
|
123
123
|
}
|
|
124
124
|
this.routes = new Map(
|
|
125
|
-
|
|
125
|
+
_chunkJYQ6DGPWcjs.mergePluginAPIRoutes.call(void 0, [...this.routes.values()], this.plugins, void 0, {
|
|
126
126
|
bodySizeLimit: this.bodySizeLimit,
|
|
127
127
|
dispatch: this.dispatch
|
|
128
128
|
}).map((route) => [route.path, route])
|
|
@@ -164,7 +164,7 @@ var APIRouteManager = class _APIRouteManager {
|
|
|
164
164
|
const routeModule = await this.loadModule(filePath);
|
|
165
165
|
const endpoints = {};
|
|
166
166
|
const availableMethods = [];
|
|
167
|
-
for (const method of
|
|
167
|
+
for (const method of _chunkJYQ6DGPWcjs.API_ROUTE_METHODS) {
|
|
168
168
|
if (routeModule[method]) {
|
|
169
169
|
endpoints[method] = routeModule[method];
|
|
170
170
|
availableMethods.push(method);
|
|
@@ -356,7 +356,7 @@ var APIRouteManager = class _APIRouteManager {
|
|
|
356
356
|
const url = new URL(request.url);
|
|
357
357
|
const pathname = url.pathname;
|
|
358
358
|
const method = request.method.toUpperCase();
|
|
359
|
-
const match =
|
|
359
|
+
const match = _chunkJYQ6DGPWcjs.matchAPIRouteAtBasePath.call(void 0, this.routes, pathname, this.basePath);
|
|
360
360
|
if (!match) {
|
|
361
361
|
return new Response(JSON.stringify({ error: "Not Found" }), {
|
|
362
362
|
status: 404,
|
|
@@ -364,23 +364,23 @@ var APIRouteManager = class _APIRouteManager {
|
|
|
364
364
|
});
|
|
365
365
|
}
|
|
366
366
|
const { route, params } = match;
|
|
367
|
-
const endpoint =
|
|
367
|
+
const endpoint = _chunkJYQ6DGPWcjs.resolveAPIRouteEndpoint.call(void 0, route, method);
|
|
368
368
|
if (!endpoint) {
|
|
369
369
|
return new Response(JSON.stringify({ error: "Method Not Allowed" }), {
|
|
370
370
|
status: 405,
|
|
371
371
|
headers: {
|
|
372
|
-
Allow:
|
|
372
|
+
Allow: _chunkJYQ6DGPWcjs.getAllowedAPIRouteMethods.call(void 0, route).join(", "),
|
|
373
373
|
"Content-Type": "application/json"
|
|
374
374
|
}
|
|
375
375
|
});
|
|
376
376
|
}
|
|
377
377
|
const invoke = async () => {
|
|
378
378
|
try {
|
|
379
|
-
return await
|
|
379
|
+
return await _chunkJYQ6DGPWcjs.invokeAPIRouteEndpoint.call(void 0, endpoint, request, params, this.bodySizeLimit);
|
|
380
380
|
} catch (error) {
|
|
381
381
|
if (options.throwOnError) throw error;
|
|
382
382
|
console.error(`[API Error] ${pathname}:`, error);
|
|
383
|
-
return
|
|
383
|
+
return _chunkJYQ6DGPWcjs.createFarmInternalServerErrorResponse.call(void 0, );
|
|
384
384
|
}
|
|
385
385
|
};
|
|
386
386
|
return _optionalChain([this, 'access', _13 => _13.i18n, 'optionalAccess', _14 => _14.config, 'access', _15 => _15.enabled]) ? _chunkSXXSQVKKcjs._runWithFarmI18nRequest.call(void 0, this.i18n, request, invoke, {
|
|
@@ -395,7 +395,7 @@ var APIRouteManager = class _APIRouteManager {
|
|
|
395
395
|
return Boolean(this.matchRoute(pathname));
|
|
396
396
|
}
|
|
397
397
|
matchRoute(pathname) {
|
|
398
|
-
return
|
|
398
|
+
return _chunkJYQ6DGPWcjs.matchAPIRouteAtBasePath.call(void 0, this.routes, pathname, this.basePath);
|
|
399
399
|
}
|
|
400
400
|
/**
|
|
401
401
|
* Get all routes for client type generation
|
|
@@ -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 _chunk5MUFW5UUcjs = require('./chunk-5MUFW5UU.cjs');
|
|
5
5
|
|
|
6
6
|
|
|
7
7
|
var _chunkPIUTGRDIcjs = require('./chunk-PIUTGRDI.cjs');
|
|
@@ -64,7 +64,7 @@ function findFarmNativeScreenFiles(appDirs) {
|
|
|
64
64
|
}
|
|
65
65
|
function collectFarmNativeServerFns(options) {
|
|
66
66
|
const { root, srcDir } = options;
|
|
67
|
-
const aliases =
|
|
67
|
+
const aliases = _chunk5MUFW5UUcjs.readAliases.call(void 0, root, srcDir);
|
|
68
68
|
const seen = /* @__PURE__ */ new Set();
|
|
69
69
|
const found = /* @__PURE__ */ new Map();
|
|
70
70
|
const queue = [...options.entries];
|
|
@@ -98,7 +98,7 @@ function collectFarmNativeServerFns(options) {
|
|
|
98
98
|
}
|
|
99
99
|
}
|
|
100
100
|
for (const candidate of _nullishCoalesce(candidates, () => ( []))) {
|
|
101
|
-
const resolved =
|
|
101
|
+
const resolved = _chunk5MUFW5UUcjs.resolveFile.call(void 0, candidate);
|
|
102
102
|
if (resolved && SCRIPT.test(resolved) && !resolved.includes(`${_path2.default.sep}node_modules${_path2.default.sep}`)) {
|
|
103
103
|
queue.push(resolved);
|
|
104
104
|
break;
|
|
@@ -9,7 +9,7 @@ import {
|
|
|
9
9
|
} from "./chunk-IYEY3JWJ.mjs";
|
|
10
10
|
import {
|
|
11
11
|
APIRouteConflictError
|
|
12
|
-
} from "./chunk-
|
|
12
|
+
} from "./chunk-NAHDG6UX.mjs";
|
|
13
13
|
import {
|
|
14
14
|
findProgrammaticRouteFilesInDir
|
|
15
15
|
} from "./chunk-URBP6DLH.mjs";
|
|
@@ -26,7 +26,7 @@ import {
|
|
|
26
26
|
matchAPIRouteAtBasePath,
|
|
27
27
|
mergePluginAPIRoutes,
|
|
28
28
|
resolveAPIRouteEndpoint
|
|
29
|
-
} from "./chunk-
|
|
29
|
+
} from "./chunk-KWI3SQFX.mjs";
|
|
30
30
|
import {
|
|
31
31
|
isProgrammaticRoutesFileName
|
|
32
32
|
} from "./chunk-DZXD6CYJ.mjs";
|
|
@@ -9,6 +9,9 @@ import {
|
|
|
9
9
|
toPosixPath
|
|
10
10
|
} from "./chunk-U6GMCDRS.mjs";
|
|
11
11
|
|
|
12
|
+
// src/preview-request.ts
|
|
13
|
+
var FARM_PREVIEW_REQUEST_HEADER = "x-farm-preview";
|
|
14
|
+
|
|
12
15
|
// src/cron.ts
|
|
13
16
|
var DEFAULT_FARM_CRON_SECRET_ENV = "CRON_SECRET";
|
|
14
17
|
var FARM_CRON_MANIFEST = "cron-manifest.json";
|
|
@@ -200,7 +203,9 @@ function isCronRequestAuthorized(request, options = {}) {
|
|
|
200
203
|
const secretEnv = options.secretEnv || DEFAULT_FARM_CRON_SECRET_ENV;
|
|
201
204
|
const secret = options.secret || readFarmEnvironmentValue(secretEnv);
|
|
202
205
|
if (!secret) {
|
|
203
|
-
return options.allowUnsecured === true || !getFarmRuntimeBindings() && isExplicitDevelopmentEnv()
|
|
206
|
+
return options.allowUnsecured === true || !getFarmRuntimeBindings() && isExplicitDevelopmentEnv() && // Development stays open for the developer's own machine, not for visitors to a
|
|
207
|
+
// `farm preview` URL. The preview marks every request it tunnels in.
|
|
208
|
+
!request.headers.get(FARM_PREVIEW_REQUEST_HEADER);
|
|
204
209
|
}
|
|
205
210
|
const authorization = request.headers.get("authorization") || "";
|
|
206
211
|
const bearer = /^Bearer (.*)$/i.exec(authorization)?.[1] || "";
|
|
@@ -658,6 +663,7 @@ function safeFileName(value) {
|
|
|
658
663
|
}
|
|
659
664
|
|
|
660
665
|
export {
|
|
666
|
+
FARM_PREVIEW_REQUEST_HEADER,
|
|
661
667
|
DEFAULT_FARM_CRON_SECRET_ENV,
|
|
662
668
|
FARM_CRON_MANIFEST,
|
|
663
669
|
resolveCronConfig,
|