@getstrata/bootstrap 2.2.52 → 2.2.54

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/CHANGELOG.md CHANGED
@@ -1,5 +1,15 @@
1
1
  # @getstrata/bootstrap changelog
2
2
 
3
+ ## 2.2.54
4
+
5
+ - Preserve own native route parameter keys such as __proto__ as data properties instead of losing them through an inherited setter. Keep the ordinary object prototype, string coercion, Bun-owned decoding and native request identity.
6
+ - Align the core requirement with 2.2.54. No new route API or native asset admission/delivery or mixed HTTP/WebSocket behavior is introduced.
7
+
8
+ ## 2.2.53
9
+
10
+ - Preserve Bun-native decoded route parameters without decoding them a second time. Literal percent identifiers remain valid, and encoded-looking identifiers retain the key Bun supplies before binding and authorization.
11
+ - Align the core requirement with 2.2.53. Native asset admission/delivery and mixed HTTP/WebSocket reporting limitations remain unchanged.
12
+
3
13
  ## 2.2.52
4
14
 
5
15
  - Share response policy and observation middleware for explicitly public application documents without adding auth/tenant requirements.
@@ -5,7 +5,7 @@ import type { HttpKernel } from "../httpKernel.ts";
5
5
  /** Read Bun native `:param` values from a route handler request. */
6
6
  export declare function routeParams(request: Request): Record<string, string>;
7
7
  /**
8
- * Attach decoded route params to Bun's native Request for RouteRequest handlers.
8
+ * Copy Bun's already decoded route params onto its native Request for RouteRequest handlers.
9
9
  * Mutates the request in place so instanceof Request and Bun internals stay valid.
10
10
  */
11
11
  export declare function toRouteRequest<TParams extends Record<string, string>>(request: Request): RouteRequest<TParams>;
@@ -378,14 +378,10 @@ function createHttpKernel(dependencies) {
378
378
 
379
379
  // ../../src/bootstrap/web/routing.ts
380
380
  function routeParams(request) {
381
- const normalized = {};
382
381
  const raw = request.params;
383
- if (raw && typeof raw === "object") {
384
- for (const [key, value] of Object.entries(raw)) {
385
- normalized[key] = decodeURIComponent(String(value));
386
- }
387
- }
388
- return normalized;
382
+ if (!raw || typeof raw !== "object")
383
+ return {};
384
+ return Object.fromEntries(Object.entries(raw).map(([key, value]) => [key, String(value)]));
389
385
  }
390
386
  function toRouteRequest(request) {
391
387
  const params = routeParams(request);
package/dist/index.js CHANGED
@@ -2052,14 +2052,10 @@ async function parseFormBody(request) {
2052
2052
  import { requestPrefersJson } from "@getstrata/core/http/contentNegotiation";
2053
2053
  import { withErrorHandling as withErrorHandling2 } from "@getstrata/core/http/response";
2054
2054
  function routeParams(request) {
2055
- const normalized = {};
2056
2055
  const raw = request.params;
2057
- if (raw && typeof raw === "object") {
2058
- for (const [key, value] of Object.entries(raw)) {
2059
- normalized[key] = decodeURIComponent(String(value));
2060
- }
2061
- }
2062
- return normalized;
2056
+ if (!raw || typeof raw !== "object")
2057
+ return {};
2058
+ return Object.fromEntries(Object.entries(raw).map(([key, value]) => [key, String(value)]));
2063
2059
  }
2064
2060
  function toRouteRequest(request) {
2065
2061
  const params = routeParams(request);
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@getstrata/bootstrap",
3
- "version": "2.2.52",
3
+ "version": "2.2.54",
4
4
  "description": "Strata application bootstrap: HttpKernel, DI, web session helpers",
5
5
  "type": "module",
6
6
  "license": "MIT",
@@ -190,7 +190,7 @@
190
190
  "access": "public"
191
191
  },
192
192
  "peerDependencies": {
193
- "@getstrata/core": "^2.2.52",
193
+ "@getstrata/core": "^2.2.54",
194
194
  "typescript": "^5.9.0 || ^6.0.0 || ^7.0.0"
195
195
  },
196
196
  "engines": {