@farm.js/plugin 0.1.0-beta.60 → 0.1.0-beta.62

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/index.d.ts CHANGED
@@ -39,5 +39,5 @@
39
39
  * })
40
40
  * ```
41
41
  */
42
- export declare const version = "0.1.0-beta.60";
42
+ export declare const version = "0.1.0-beta.62";
43
43
  //# sourceMappingURL=index.d.ts.map
package/dist/index.js CHANGED
@@ -39,7 +39,7 @@
39
39
  * })
40
40
  * ```
41
41
  */
42
- export const version = "0.1.0-beta.60";
42
+ export const version = "0.1.0-beta.62";
43
43
  // Note: Import plugins from their respective subpaths:
44
44
  // - @farm.js/plugin/rsc
45
45
  // - @farm.js/plugin/middleware
@@ -1 +1 @@
1
- {"version":3,"file":"rsc.d.ts","sourceRoot":"","sources":["../../../src/rsc/entries/rsc.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,YAAY,EAAE,MAAM,aAAa,CAAC;AAEhD;;;;;;;;;GASG;AACH,wBAAgB,gBAAgB,CAAC,GAAG,EAAE,YAAY,GAAG,MAAM,CAs7B1D"}
1
+ {"version":3,"file":"rsc.d.ts","sourceRoot":"","sources":["../../../src/rsc/entries/rsc.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,YAAY,EAAE,MAAM,aAAa,CAAC;AAEhD;;;;;;;;;GASG;AACH,wBAAgB,gBAAgB,CAAC,GAAG,EAAE,YAAY,GAAG,MAAM,CAw7B1D"}
@@ -51,7 +51,7 @@ import {
51
51
  } from '@farm.js/core/middleware';
52
52
  import { invokeAPIRouteEndpoint, matchAPIRoute } from '@farm.js/core/api/runtime';
53
53
  import { _runWithAfterRequest } from '@farm.js/core/after';
54
- import { _runWithCurrentRequest } from '@farm.js/core/internal/production-runtime';
54
+ import { _runWithCurrentRequest, searchParamsToObject } from '@farm.js/core/internal/production-runtime';
55
55
 
56
56
  const farmDeploymentId = ${JSON.stringify(ctx.deploymentId)};
57
57
  `;
@@ -719,7 +719,9 @@ async function handleFarmRequest(request) {
719
719
  const globalsCssPath = '/${ctx.srcDir}' + routesPath + '/globals.css';
720
720
 
721
721
  // Parse search params
722
- const searchParams = Object.fromEntries(url.searchParams);
722
+ // Collect repeated keys into arrays, matching the searchParams prop shape
723
+ // every non-RSC environment produces (see core's search-params.ts).
724
+ const searchParams = searchParamsToObject(url.searchParams);
723
725
 
724
726
  // Page props passed to components (includes middleware shared data)
725
727
  const pageProps = { params, searchParams, middlewareData };
@@ -884,7 +886,7 @@ async function handleFarmRequest(request) {
884
886
  const Layout = LayoutModules[LayoutModules.length - 1]?.default;
885
887
  const LayoutComp = Layout || (function PassThrough({ children }) { return children; });
886
888
  const errParams = matched ? matched.params : {};
887
- const errSearchParams = Object.fromEntries(url.searchParams);
889
+ const errSearchParams = searchParamsToObject(url.searchParams);
888
890
  const errorElement = h(ErrorComponent, {
889
891
  error: err,
890
892
  reset: () => {},
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@farm.js/plugin",
3
- "version": "0.1.0-beta.60",
3
+ "version": "0.1.0-beta.62",
4
4
  "description": "Official plugins for Farm.js framework",
5
5
  "license": "MIT",
6
6
  "author": "Farm.js Team",
@@ -61,7 +61,7 @@
61
61
  "nitro": "3.0.1-alpha.0",
62
62
  "picocolors": "^1.0.0",
63
63
  "rsc-html-stream": "^0.0.4",
64
- "@farm.js/core": "0.1.0-beta.60"
64
+ "@farm.js/core": "0.1.0-beta.62"
65
65
  },
66
66
  "devDependencies": {
67
67
  "@types/node": "^20.19.21",
@@ -82,7 +82,7 @@
82
82
  "react-dom": "19.2.8",
83
83
  "react-server-dom-webpack": "19.2.8",
84
84
  "vite": ">=6.0.0",
85
- "@farm.js/core": "0.1.0-beta.60"
85
+ "@farm.js/core": "0.1.0-beta.62"
86
86
  },
87
87
  "peerDependenciesMeta": {
88
88
  "@vitejs/plugin-rsc": {