@tsed/platform-middlewares 7.48.0 → 7.50.0
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.
|
@@ -28,7 +28,7 @@ function Use(...args) {
|
|
|
28
28
|
return (0, schema_1.JsonEntityFn)((entity, parameters) => {
|
|
29
29
|
switch (entity.decoratorType) {
|
|
30
30
|
case core_1.DecoratorTypes.METHOD:
|
|
31
|
-
return (0, schema_1.
|
|
31
|
+
return (0, schema_1.Operation)(...args);
|
|
32
32
|
case core_1.DecoratorTypes.CLASS:
|
|
33
33
|
entity.store.merge("middlewares", {
|
|
34
34
|
use: args
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"use.js","sourceRoot":"","sources":["../../../src/decorators/use.ts"],"names":[],"mappings":";;;AAAA,qCAAoE;AACpE,
|
|
1
|
+
{"version":3,"file":"use.js","sourceRoot":"","sources":["../../../src/decorators/use.ts"],"names":[],"mappings":";;;AAAA,qCAAoE;AACpE,yCAAqD;AAErD;;;;;;;;;;;;;;;;;;;;GAoBG;AACH,SAAgB,GAAG,CAAC,GAAG,IAAW;IAChC,OAAO,IAAA,qBAAY,EAAC,CAAC,MAAM,EAAE,UAAU,EAAE,EAAE;QACzC,QAAQ,MAAM,CAAC,aAAa,EAAE;YAC5B,KAAK,qBAAc,CAAC,MAAM;gBACxB,OAAO,IAAA,kBAAS,EAAC,GAAG,IAAI,CAAC,CAAC;YAE5B,KAAK,qBAAc,CAAC,KAAK;gBACvB,MAAM,CAAC,KAAK,CAAC,KAAK,CAAC,aAAa,EAAE;oBAChC,GAAG,EAAE,IAAI;iBACV,CAAC,CAAC;gBACH,MAAM;YAER;gBACE,MAAM,IAAI,+BAAwB,CAAC,GAAG,EAAE,UAAU,CAAC,CAAC;SACvD;IACH,CAAC,CAAC,CAAC;AACL,CAAC;AAhBD,kBAgBC"}
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import { DecoratorTypes, UnsupportedDecoratorType } from "@tsed/core";
|
|
2
|
-
import { JsonEntityFn,
|
|
2
|
+
import { JsonEntityFn, Operation } from "@tsed/schema";
|
|
3
3
|
/**
|
|
4
4
|
* Mounts the specified middleware function or functions at the specified path: the middleware function is executed when
|
|
5
5
|
* the base of the requested path matches `path.
|
|
@@ -25,7 +25,7 @@ export function Use(...args) {
|
|
|
25
25
|
return JsonEntityFn((entity, parameters) => {
|
|
26
26
|
switch (entity.decoratorType) {
|
|
27
27
|
case DecoratorTypes.METHOD:
|
|
28
|
-
return
|
|
28
|
+
return Operation(...args);
|
|
29
29
|
case DecoratorTypes.CLASS:
|
|
30
30
|
entity.store.merge("middlewares", {
|
|
31
31
|
use: args
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"use.js","sourceRoot":"","sources":["../../../src/decorators/use.ts"],"names":[],"mappings":"AAAA,OAAO,EAAC,cAAc,EAAE,wBAAwB,EAAC,MAAM,YAAY,CAAC;AACpE,OAAO,EAAC,YAAY,EAAE,
|
|
1
|
+
{"version":3,"file":"use.js","sourceRoot":"","sources":["../../../src/decorators/use.ts"],"names":[],"mappings":"AAAA,OAAO,EAAC,cAAc,EAAE,wBAAwB,EAAC,MAAM,YAAY,CAAC;AACpE,OAAO,EAAC,YAAY,EAAE,SAAS,EAAC,MAAM,cAAc,CAAC;AAErD;;;;;;;;;;;;;;;;;;;;GAoBG;AACH,MAAM,UAAU,GAAG,CAAC,GAAG,IAAW;IAChC,OAAO,YAAY,CAAC,CAAC,MAAM,EAAE,UAAU,EAAE,EAAE;QACzC,QAAQ,MAAM,CAAC,aAAa,EAAE;YAC5B,KAAK,cAAc,CAAC,MAAM;gBACxB,OAAO,SAAS,CAAC,GAAG,IAAI,CAAC,CAAC;YAE5B,KAAK,cAAc,CAAC,KAAK;gBACvB,MAAM,CAAC,KAAK,CAAC,KAAK,CAAC,aAAa,EAAE;oBAChC,GAAG,EAAE,IAAI;iBACV,CAAC,CAAC;gBACH,MAAM;YAER;gBACE,MAAM,IAAI,wBAAwB,CAAC,GAAG,EAAE,UAAU,CAAC,CAAC;SACvD;IACH,CAAC,CAAC,CAAC;AACL,CAAC"}
|