@decohere/http 0.0.1-dev.20261105.93 → 0.0.1-dev.20261105.99
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.
|
@@ -105,6 +105,11 @@ class RouteRegistry {
|
|
|
105
105
|
}
|
|
106
106
|
getRouteArgument(argumentType, argumentIndex, handler) {
|
|
107
107
|
const argMeta = (0, _reflection.getArgumentMeta)(_const.MetadataKeys.parameter, handler, argumentIndex);
|
|
108
|
+
// A named value typed as a union or interface reaches here as Object, which would build an
|
|
109
|
+
// empty object. Pass the value through as it arrived.
|
|
110
|
+
if (argumentType === Object && argMeta?.mappingKey != null && !isInjectedPart(argMeta.argumentLocation)) {
|
|
111
|
+
return this.getRouteArgument(String, argumentIndex, handler);
|
|
112
|
+
}
|
|
108
113
|
// @CurrentUser() / interface params are Object (or other non-DTO types) — no field map.
|
|
109
114
|
if (isInjectedPart(argMeta?.argumentLocation) || !(0, _reflection.isConstructable)(argumentType)) {
|
|
110
115
|
return {
|
|
@@ -95,6 +95,11 @@ export class RouteRegistry {
|
|
|
95
95
|
}
|
|
96
96
|
getRouteArgument(argumentType, argumentIndex, handler) {
|
|
97
97
|
const argMeta = getArgumentMeta(MetadataKeys.parameter, handler, argumentIndex);
|
|
98
|
+
// A named value typed as a union or interface reaches here as Object, which would build an
|
|
99
|
+
// empty object. Pass the value through as it arrived.
|
|
100
|
+
if (argumentType === Object && argMeta?.mappingKey != null && !isInjectedPart(argMeta.argumentLocation)) {
|
|
101
|
+
return this.getRouteArgument(String, argumentIndex, handler);
|
|
102
|
+
}
|
|
98
103
|
// @CurrentUser() / interface params are Object (or other non-DTO types) — no field map.
|
|
99
104
|
if (isInjectedPart(argMeta?.argumentLocation) || !isConstructable(argumentType)) {
|
|
100
105
|
return {
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@decohere/http",
|
|
3
|
-
"version": "0.0.1-dev.20261105.
|
|
3
|
+
"version": "0.0.1-dev.20261105.99",
|
|
4
4
|
"description": "Web API and microservice platform built on Fastify with decorator-based routing",
|
|
5
5
|
"keywords": [
|
|
6
6
|
"typescript",
|
|
@@ -56,9 +56,9 @@
|
|
|
56
56
|
},
|
|
57
57
|
"dependencies": {
|
|
58
58
|
"@casl/ability": "^6.8.1",
|
|
59
|
-
"@decohere/core": "0.0.1-dev.20261105.
|
|
60
|
-
"@decohere/crucible": "0.0.1-dev.20261105.
|
|
61
|
-
"@decohere/scribe": "0.0.1-dev.20261105.
|
|
59
|
+
"@decohere/core": "0.0.1-dev.20261105.99",
|
|
60
|
+
"@decohere/crucible": "0.0.1-dev.20261105.99",
|
|
61
|
+
"@decohere/scribe": "0.0.1-dev.20261105.99",
|
|
62
62
|
"@fastify/compress": "^9.2.1",
|
|
63
63
|
"@fastify/cors": "^11.3.0",
|
|
64
64
|
"@fastify/helmet": "^13.1.0",
|