@pristine-ts/networking 0.0.276 → 0.0.277
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/lib/cjs/decorators/body.decorator.js +2 -16
- package/dist/lib/cjs/decorators/body.decorator.js.map +1 -1
- package/dist/lib/cjs/decorators/controller.decorator.js +5 -11
- package/dist/lib/cjs/decorators/controller.decorator.js.map +1 -1
- package/dist/lib/cjs/decorators/header.decorator.js +3 -16
- package/dist/lib/cjs/decorators/header.decorator.js.map +1 -1
- package/dist/lib/cjs/decorators/headers.decorator.js +3 -16
- package/dist/lib/cjs/decorators/headers.decorator.js.map +1 -1
- package/dist/lib/cjs/decorators/identity.decorator.js +3 -16
- package/dist/lib/cjs/decorators/identity.decorator.js.map +1 -1
- package/dist/lib/cjs/decorators/query-parameter.decorator.js +3 -16
- package/dist/lib/cjs/decorators/query-parameter.decorator.js.map +1 -1
- package/dist/lib/cjs/decorators/query-parameters.decorator.js +3 -16
- package/dist/lib/cjs/decorators/query-parameters.decorator.js.map +1 -1
- package/dist/lib/cjs/decorators/request.decorator.js +3 -16
- package/dist/lib/cjs/decorators/request.decorator.js.map +1 -1
- package/dist/lib/cjs/decorators/response-header.decorator.js +9 -38
- package/dist/lib/cjs/decorators/response-header.decorator.js.map +1 -1
- package/dist/lib/cjs/decorators/route-parameter.decorator.js +3 -16
- package/dist/lib/cjs/decorators/route-parameter.decorator.js.map +1 -1
- package/dist/lib/cjs/decorators/route.decorator.js +5 -12
- package/dist/lib/cjs/decorators/route.decorator.js.map +1 -1
- package/dist/lib/cjs/interceptors/response-headers.interceptor.js +3 -2
- package/dist/lib/cjs/interceptors/response-headers.interceptor.js.map +1 -1
- package/dist/lib/cjs/router.js +27 -21
- package/dist/lib/cjs/router.js.map +1 -1
- package/dist/lib/esm/decorators/body.decorator.js +2 -16
- package/dist/lib/esm/decorators/body.decorator.js.map +1 -1
- package/dist/lib/esm/decorators/controller.decorator.js +5 -11
- package/dist/lib/esm/decorators/controller.decorator.js.map +1 -1
- package/dist/lib/esm/decorators/header.decorator.js +3 -16
- package/dist/lib/esm/decorators/header.decorator.js.map +1 -1
- package/dist/lib/esm/decorators/headers.decorator.js +3 -16
- package/dist/lib/esm/decorators/headers.decorator.js.map +1 -1
- package/dist/lib/esm/decorators/identity.decorator.js +3 -16
- package/dist/lib/esm/decorators/identity.decorator.js.map +1 -1
- package/dist/lib/esm/decorators/query-parameter.decorator.js +3 -16
- package/dist/lib/esm/decorators/query-parameter.decorator.js.map +1 -1
- package/dist/lib/esm/decorators/query-parameters.decorator.js +3 -16
- package/dist/lib/esm/decorators/query-parameters.decorator.js.map +1 -1
- package/dist/lib/esm/decorators/request.decorator.js +3 -16
- package/dist/lib/esm/decorators/request.decorator.js.map +1 -1
- package/dist/lib/esm/decorators/response-header.decorator.js +8 -37
- package/dist/lib/esm/decorators/response-header.decorator.js.map +1 -1
- package/dist/lib/esm/decorators/route-parameter.decorator.js +3 -16
- package/dist/lib/esm/decorators/route-parameter.decorator.js.map +1 -1
- package/dist/lib/esm/decorators/route.decorator.js +5 -12
- package/dist/lib/esm/decorators/route.decorator.js.map +1 -1
- package/dist/lib/esm/interceptors/response-headers.interceptor.js +3 -2
- package/dist/lib/esm/interceptors/response-headers.interceptor.js.map +1 -1
- package/dist/lib/esm/router.js +28 -22
- package/dist/lib/esm/router.js.map +1 -1
- package/dist/types/decorators/controller.decorator.d.ts +1 -0
- package/dist/types/decorators/header.decorator.d.ts +1 -0
- package/dist/types/decorators/headers.decorator.d.ts +1 -0
- package/dist/types/decorators/identity.decorator.d.ts +1 -0
- package/dist/types/decorators/query-parameter.decorator.d.ts +1 -0
- package/dist/types/decorators/query-parameters.decorator.d.ts +1 -0
- package/dist/types/decorators/request.decorator.d.ts +1 -0
- package/dist/types/decorators/response-header.decorator.d.ts +2 -0
- package/dist/types/decorators/route-parameter.decorator.d.ts +1 -0
- package/dist/types/decorators/route.decorator.d.ts +1 -0
- package/dist/types/router.d.ts +1 -0
- package/package.json +7 -6
package/dist/lib/cjs/router.js
CHANGED
|
@@ -22,6 +22,7 @@ var __awaiter = (this && this.__awaiter) || function (thisArg, _arguments, P, ge
|
|
|
22
22
|
};
|
|
23
23
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
24
24
|
exports.Router = void 0;
|
|
25
|
+
require("reflect-metadata");
|
|
25
26
|
const tsyringe_1 = require("tsyringe");
|
|
26
27
|
const url_util_1 = require("./utils/url.util");
|
|
27
28
|
const not_found_http_error_1 = require("./errors/not-found.http-error");
|
|
@@ -37,6 +38,7 @@ const controller_decorator_1 = require("./decorators/controller.decorator");
|
|
|
37
38
|
const lodash_1 = require("lodash");
|
|
38
39
|
const http_error_1 = require("./errors/http.error");
|
|
39
40
|
const router_cache_1 = require("./cache/router.cache");
|
|
41
|
+
const metadata_1 = require("@pristine-ts/metadata");
|
|
40
42
|
/**
|
|
41
43
|
* The router service is the service that creates the routing tree from the controllers.
|
|
42
44
|
* It also executes a request properly by routing it to the intended controller and returns the response.
|
|
@@ -114,30 +116,25 @@ let Router = class Router {
|
|
|
114
116
|
}
|
|
115
117
|
// Loop over all the controllers and control the Route Tree
|
|
116
118
|
controller_decorator_1.controllerRegistry.forEach(controller => {
|
|
117
|
-
var _a
|
|
118
|
-
|
|
119
|
-
return;
|
|
120
|
-
}
|
|
121
|
-
let basePath = (_b = (_a = controller.__metadata__) === null || _a === void 0 ? void 0 : _a.controller) === null || _b === void 0 ? void 0 : _b.basePath;
|
|
119
|
+
var _a;
|
|
120
|
+
let basePath = (_a = metadata_1.ClassMetadata.getMetadata(controller, common_1.MetadataEnum.ControllerBasePath)) !== null && _a !== void 0 ? _a : "";
|
|
122
121
|
// Clean the base path by removing trailing slashes.
|
|
123
122
|
if (basePath.endsWith("/")) {
|
|
124
123
|
basePath = basePath.slice(0, basePath.length - 1);
|
|
125
124
|
}
|
|
126
|
-
|
|
127
|
-
|
|
128
|
-
|
|
129
|
-
|
|
130
|
-
const method = (_f = controller.__metadata__) === null || _f === void 0 ? void 0 : _f.methods[methodPropertyKey];
|
|
131
|
-
if (method.hasOwnProperty("route") === false) {
|
|
132
|
-
continue;
|
|
125
|
+
const routePropertyKeys = metadata_1.ClassMetadata.getMetadata(controller, common_1.MetadataEnum.ControllerRoutes);
|
|
126
|
+
routePropertyKeys.forEach(methodPropertyKey => {
|
|
127
|
+
if (metadata_1.MethodMetadata.hasMetadata(controller.prototype, methodPropertyKey, common_1.MetadataEnum.Route) === false) {
|
|
128
|
+
return;
|
|
133
129
|
}
|
|
134
130
|
// Retrieve the "RouteMethodDecorator" object assigned by the @route decorator at .route
|
|
135
|
-
const routeMethodDecorator =
|
|
136
|
-
// Build the Route object that will be used
|
|
131
|
+
const routeMethodDecorator = metadata_1.MethodMetadata.getMetadata(controller.prototype, methodPropertyKey, common_1.MetadataEnum.Route);
|
|
132
|
+
// Build the Route object that will be used by the router to dispatch a request to
|
|
137
133
|
// the appropriate controller method
|
|
138
|
-
const route = new route_1.Route(controller.constructor, routeMethodDecorator.methodKeyname);
|
|
139
|
-
route.methodArguments = (
|
|
140
|
-
|
|
134
|
+
const route = new route_1.Route(controller.prototype.constructor, routeMethodDecorator.methodKeyname);
|
|
135
|
+
route.methodArguments = common_1.MetadataUtil.getMethodParametersMetadata(controller.prototype, methodPropertyKey);
|
|
136
|
+
const context = (0, lodash_1.mergeWith)({}, common_1.MetadataUtil.getRouteContext(controller.prototype.constructor), common_1.MetadataUtil.getRouteContext(controller.prototype, methodPropertyKey));
|
|
137
|
+
route.context = context;
|
|
141
138
|
// Build the proper path
|
|
142
139
|
let path = routeMethodDecorator.path;
|
|
143
140
|
// Clean the path by removing the first and trailing slashes.
|
|
@@ -151,7 +148,7 @@ let Router = class Router {
|
|
|
151
148
|
const routePath = basePath + "/" + path;
|
|
152
149
|
// Register the route
|
|
153
150
|
this.register(routePath, routeMethodDecorator.httpMethod, route);
|
|
154
|
-
}
|
|
151
|
+
});
|
|
155
152
|
});
|
|
156
153
|
this.setupCompleted = true;
|
|
157
154
|
this.loghandler.debug("Route tree: \n" + this.getRouteTree());
|
|
@@ -361,7 +358,10 @@ let Router = class Router {
|
|
|
361
358
|
// So, we have to verify that the method exists, and if it doesn't we throw
|
|
362
359
|
if (typeof interceptor.interceptRequest === "undefined") {
|
|
363
360
|
// Simply log a message for now that the interceptors doesn't implement the 'interceptRequest' method.
|
|
364
|
-
this.loghandler.debug("The Request Interceptor doesn't implement the interceptRequest method.", {
|
|
361
|
+
this.loghandler.debug("The Request Interceptor doesn't implement the interceptRequest method.", {
|
|
362
|
+
name: interceptor.constructor.name,
|
|
363
|
+
interceptor
|
|
364
|
+
});
|
|
365
365
|
continue;
|
|
366
366
|
}
|
|
367
367
|
try {
|
|
@@ -409,7 +409,10 @@ let Router = class Router {
|
|
|
409
409
|
// So, we have to verify that the method exists, and if it doesn't we throw
|
|
410
410
|
if (typeof interceptor.interceptResponse === "undefined") {
|
|
411
411
|
// Simply log a message for now that the interceptors doesn't implement the 'interceptResponse' method.
|
|
412
|
-
this.loghandler.debug("Router - The Request Interceptor doesn't implement the interceptResponse method.", {
|
|
412
|
+
this.loghandler.debug("Router - The Request Interceptor doesn't implement the interceptResponse method.", {
|
|
413
|
+
name: interceptor.constructor.name,
|
|
414
|
+
interceptor
|
|
415
|
+
}, networking_module_keyname_1.NetworkingModuleKeyname);
|
|
413
416
|
continue;
|
|
414
417
|
}
|
|
415
418
|
try {
|
|
@@ -472,7 +475,10 @@ let Router = class Router {
|
|
|
472
475
|
// So, we have to verify that the method exists, and if it doesn't we throw
|
|
473
476
|
if (typeof interceptor.interceptError === "undefined") {
|
|
474
477
|
// Simply log a message for now that the interceptors doesn't implement the 'interceptError' method.
|
|
475
|
-
this.loghandler.info("The Request Interceptor doesn't implement the interceptError method.", {
|
|
478
|
+
this.loghandler.info("The Request Interceptor doesn't implement the interceptError method.", {
|
|
479
|
+
name: interceptor.constructor.name,
|
|
480
|
+
interceptor
|
|
481
|
+
});
|
|
476
482
|
continue;
|
|
477
483
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,iBAAM,EAAC,gCAAgC,CAAC,CAAA;6CAFoB,2FAA0C,kBAG/E,0BAAW;GAnB7C,MAAM,CAghBlB"}
|
|
@@ -1,3 +1,4 @@
|
|
|
1
|
+
import { MetadataUtil } from "@pristine-ts/common";
|
|
1
2
|
/**
|
|
2
3
|
* The body decorator can be used to inject the body of a request in a parameter of a method in a controller.
|
|
3
4
|
*/
|
|
@@ -15,26 +16,11 @@ export const body = () => {
|
|
|
15
16
|
* The index of the parameter for which the decorator is used.
|
|
16
17
|
*/
|
|
17
18
|
parameterIndex) => {
|
|
18
|
-
// Verify that the object target.constructor.prototype["__metadata__"]["methods"][propertyKey]["arguments"] exists or we create it.
|
|
19
|
-
// This object is a convention defined by Pristine on where to save controller method parameter decorator information and is used in the router to retrieve that information.
|
|
20
|
-
if (target.constructor.prototype.hasOwnProperty("__metadata__") === false) {
|
|
21
|
-
target.constructor.prototype["__metadata__"] = {};
|
|
22
|
-
}
|
|
23
|
-
if (target.constructor.prototype["__metadata__"].hasOwnProperty("methods") === false) {
|
|
24
|
-
target.constructor.prototype["__metadata__"]["methods"] = {};
|
|
25
|
-
}
|
|
26
|
-
if (target.constructor.prototype["__metadata__"]["methods"].hasOwnProperty(propertyKey) === false) {
|
|
27
|
-
target.constructor.prototype["__metadata__"]["methods"][propertyKey] = {};
|
|
28
|
-
}
|
|
29
|
-
if (target.constructor.prototype["__metadata__"]["methods"][propertyKey].hasOwnProperty("arguments") === false) {
|
|
30
|
-
target.constructor.prototype["__metadata__"]["methods"][propertyKey]["arguments"] = [];
|
|
31
|
-
}
|
|
32
19
|
// Set the type of method parameter. Each parameter decorator has it's own type.
|
|
33
20
|
const methodParameter = {
|
|
34
21
|
type: "body"
|
|
35
22
|
};
|
|
36
|
-
|
|
37
|
-
target.constructor.prototype["__metadata__"]["methods"][propertyKey]["arguments"][parameterIndex] = methodParameter;
|
|
23
|
+
MetadataUtil.setMethodParameterArgumentMetadata(target, propertyKey, parameterIndex, methodParameter);
|
|
38
24
|
};
|
|
39
25
|
};
|
|
40
26
|
//# sourceMappingURL=body.decorator.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"body.decorator.js","sourceRoot":"","sources":["../../../../src/decorators/body.decorator.ts"],"names":[],"mappings":"
|
|
1
|
+
{"version":3,"file":"body.decorator.js","sourceRoot":"","sources":["../../../../src/decorators/body.decorator.ts"],"names":[],"mappings":"AACA,OAAO,EAAC,YAAY,EAAC,MAAM,qBAAqB,CAAC;AAEjD;;GAEG;AACH,MAAM,CAAC,MAAM,IAAI,GAAG,GAAG,EAAE;IACrB,OAAO;IACH;;OAEG;IACH,MAAW;IAEX;;OAEG;IACH,WAA4B;IAE5B;;OAEG;IACH,cAAsB,EACxB,EAAE;QACA,gFAAgF;QAChF,MAAM,eAAe,GAAoC;YACrD,IAAI,EAAE,MAAM;SACf,CAAC;QAEF,YAAY,CAAC,kCAAkC,CAAC,MAAM,EAAE,WAAW,EAAE,cAAc,EAAE,eAAe,CAAC,CAAC;IAC1G,CAAC,CAAA;AACL,CAAC,CAAC"}
|
|
@@ -1,3 +1,6 @@
|
|
|
1
|
+
import "reflect-metadata";
|
|
2
|
+
import { ClassMetadata } from "@pristine-ts/metadata";
|
|
3
|
+
import { MetadataEnum } from "@pristine-ts/common";
|
|
1
4
|
export const controllerRegistry = [];
|
|
2
5
|
/**
|
|
3
6
|
* The controller decorator can be used on a class to register this class as a controller in the router.
|
|
@@ -9,18 +12,9 @@ export const controller = (basePath) => {
|
|
|
9
12
|
* The constructor of the class
|
|
10
13
|
*/
|
|
11
14
|
constructor) => {
|
|
12
|
-
|
|
13
|
-
// This object is a convention defined by Pristine on where to save controller decorator information and is used in the router to retrieve that information.
|
|
14
|
-
if (constructor.prototype.hasOwnProperty("__metadata__") === false) {
|
|
15
|
-
constructor.prototype["__metadata__"] = {};
|
|
16
|
-
}
|
|
17
|
-
if (constructor.prototype["__metadata__"].hasOwnProperty("controller") === false) {
|
|
18
|
-
constructor.prototype["__metadata__"]["controller"] = {};
|
|
19
|
-
}
|
|
20
|
-
// Save the base path.
|
|
21
|
-
constructor.prototype["__metadata__"]["controller"]["basePath"] = basePath;
|
|
15
|
+
ClassMetadata.defineMetadata(constructor, MetadataEnum.ControllerBasePath, basePath);
|
|
22
16
|
// Push the class prototype in the controllerRegistry that is used to instantiate all the controllers for the router.
|
|
23
|
-
controllerRegistry.push(constructor
|
|
17
|
+
controllerRegistry.push(constructor);
|
|
24
18
|
};
|
|
25
19
|
};
|
|
26
20
|
//# sourceMappingURL=controller.decorator.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"controller.decorator.js","sourceRoot":"","sources":["../../../../src/decorators/controller.decorator.ts"],"names":[],"mappings":"AAAA,MAAM,CAAC,MAAM,kBAAkB,GAAU,EAAE,CAAC;AAE5C;;;GAGG;AACH,MAAM,CAAC,MAAM,UAAU,GAAG,CAAC,QAAgB,EAAE,EAAE;IAC3C,OAAO;IACH;;OAEG;IACH,WAAqB,EACvB,EAAE;QACA
|
|
1
|
+
{"version":3,"file":"controller.decorator.js","sourceRoot":"","sources":["../../../../src/decorators/controller.decorator.ts"],"names":[],"mappings":"AAAA,OAAO,kBAAkB,CAAC;AAC1B,OAAO,EAAC,aAAa,EAAC,MAAM,uBAAuB,CAAC;AACpD,OAAO,EAAC,YAAY,EAAC,MAAM,qBAAqB,CAAA;AAEhD,MAAM,CAAC,MAAM,kBAAkB,GAAU,EAAE,CAAC;AAE5C;;;GAGG;AACH,MAAM,CAAC,MAAM,UAAU,GAAG,CAAC,QAAgB,EAAE,EAAE;IAC3C,OAAO;IACH;;OAEG;IACH,WAAqB,EACvB,EAAE;QACA,aAAa,CAAC,cAAc,CAAC,WAAW,EAAE,YAAY,CAAC,kBAAkB,EAAE,QAAQ,CAAC,CAAA;QAEpF,qHAAqH;QACrH,kBAAkB,CAAC,IAAI,CAAC,WAAW,CAAC,CAAA;IACxC,CAAC,CAAA;AACL,CAAC,CAAA"}
|
|
@@ -1,3 +1,5 @@
|
|
|
1
|
+
import "reflect-metadata";
|
|
2
|
+
import { MetadataUtil } from "@pristine-ts/common";
|
|
1
3
|
/**
|
|
2
4
|
* The headerParameter decorator can be used to inject a specific header of a request in a parameter of a method in a controller.
|
|
3
5
|
* @param name The name of the header to inject.
|
|
@@ -16,28 +18,13 @@ export const header = (name) => {
|
|
|
16
18
|
* The index of the parameter for which the decorator is used.
|
|
17
19
|
*/
|
|
18
20
|
parameterIndex) => {
|
|
19
|
-
// Verify that the object target.constructor.prototype["__metadata__"]["methods"][propertyKey]["arguments"] exists or we create it.
|
|
20
|
-
// This object is a convention defined by Pristine on where to save controller method parameter decorator information and is used in the router to retrieve that information.
|
|
21
|
-
if (target.constructor.prototype.hasOwnProperty("__metadata__") === false) {
|
|
22
|
-
target.constructor.prototype["__metadata__"] = {};
|
|
23
|
-
}
|
|
24
|
-
if (target.constructor.prototype["__metadata__"].hasOwnProperty("methods") === false) {
|
|
25
|
-
target.constructor.prototype["__metadata__"]["methods"] = {};
|
|
26
|
-
}
|
|
27
|
-
if (target.constructor.prototype["__metadata__"]["methods"].hasOwnProperty(propertyKey) === false) {
|
|
28
|
-
target.constructor.prototype["__metadata__"]["methods"][propertyKey] = {};
|
|
29
|
-
}
|
|
30
|
-
if (target.constructor.prototype["__metadata__"]["methods"][propertyKey].hasOwnProperty("arguments") === false) {
|
|
31
|
-
target.constructor.prototype["__metadata__"]["methods"][propertyKey]["arguments"] = [];
|
|
32
|
-
}
|
|
33
21
|
// Set the type of method parameter. Each parameter decorator has it's own type.
|
|
34
22
|
// Set also the name of the header to resolve.
|
|
35
23
|
const methodParameter = {
|
|
36
24
|
type: "header",
|
|
37
25
|
headerName: name,
|
|
38
26
|
};
|
|
39
|
-
|
|
40
|
-
target.constructor.prototype["__metadata__"]["methods"][propertyKey]["arguments"][parameterIndex] = methodParameter;
|
|
27
|
+
MetadataUtil.setMethodParameterArgumentMetadata(target, propertyKey, parameterIndex, methodParameter);
|
|
41
28
|
};
|
|
42
29
|
};
|
|
43
30
|
//# sourceMappingURL=header.decorator.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"header.decorator.js","sourceRoot":"","sources":["../../../../src/decorators/header.decorator.ts"],"names":[],"mappings":"
|
|
1
|
+
{"version":3,"file":"header.decorator.js","sourceRoot":"","sources":["../../../../src/decorators/header.decorator.ts"],"names":[],"mappings":"AAAA,OAAO,kBAAkB,CAAC;AAG1B,OAAO,EAAC,YAAY,EAAC,MAAM,qBAAqB,CAAC;AAEjD;;;GAGG;AACH,MAAM,CAAC,MAAM,MAAM,GAAG,CAAC,IAAY,EAAE,EAAE;IACnC,OAAO;IACH;;OAEG;IACH,MAAW;IAEX;;OAEG;IACH,WAA4B;IAE5B;;OAEG;IACH,cAAsB,EACxB,EAAE;QACA,gFAAgF;QAChF,8CAA8C;QAC9C,MAAM,eAAe,GAAsC;YACvD,IAAI,EAAE,QAAQ;YACd,UAAU,EAAE,IAAI;SACnB,CAAC;QAEF,YAAY,CAAC,kCAAkC,CAAC,MAAM,EAAE,WAAW,EAAE,cAAc,EAAE,eAAe,CAAC,CAAC;IAC1G,CAAC,CAAA;AACL,CAAC,CAAA"}
|
|
@@ -1,3 +1,5 @@
|
|
|
1
|
+
import "reflect-metadata";
|
|
2
|
+
import { MetadataUtil } from "@pristine-ts/common";
|
|
1
3
|
/**
|
|
2
4
|
* The headers decorator can be used to inject the headers of a request in a parameter of a method in a controller.
|
|
3
5
|
*/
|
|
@@ -15,26 +17,11 @@ export const headers = () => {
|
|
|
15
17
|
* The index of the parameter for which the decorator is used.
|
|
16
18
|
*/
|
|
17
19
|
parameterIndex) => {
|
|
18
|
-
// Verify that the object target.constructor.prototype["__metadata__"]["methods"][propertyKey]["arguments"] exists or we create it.
|
|
19
|
-
// This object is a convention defined by Pristine on where to save controller method parameter decorator information and is used in the router to retrieve that information.
|
|
20
|
-
if (target.constructor.prototype.hasOwnProperty("__metadata__") === false) {
|
|
21
|
-
target.constructor.prototype["__metadata__"] = {};
|
|
22
|
-
}
|
|
23
|
-
if (target.constructor.prototype["__metadata__"].hasOwnProperty("methods") === false) {
|
|
24
|
-
target.constructor.prototype["__metadata__"]["methods"] = {};
|
|
25
|
-
}
|
|
26
|
-
if (target.constructor.prototype["__metadata__"]["methods"].hasOwnProperty(propertyKey) === false) {
|
|
27
|
-
target.constructor.prototype["__metadata__"]["methods"][propertyKey] = {};
|
|
28
|
-
}
|
|
29
|
-
if (target.constructor.prototype["__metadata__"]["methods"][propertyKey].hasOwnProperty("arguments") === false) {
|
|
30
|
-
target.constructor.prototype["__metadata__"]["methods"][propertyKey]["arguments"] = [];
|
|
31
|
-
}
|
|
32
20
|
// Set the type of method parameter. Each parameter decorator has it's own type.
|
|
33
21
|
const methodParameter = {
|
|
34
22
|
type: "headers"
|
|
35
23
|
};
|
|
36
|
-
|
|
37
|
-
target.constructor.prototype["__metadata__"]["methods"][propertyKey]["arguments"][parameterIndex] = methodParameter;
|
|
24
|
+
MetadataUtil.setMethodParameterArgumentMetadata(target, propertyKey, parameterIndex, methodParameter);
|
|
38
25
|
};
|
|
39
26
|
};
|
|
40
27
|
//# sourceMappingURL=headers.decorator.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"headers.decorator.js","sourceRoot":"","sources":["../../../../src/decorators/headers.decorator.ts"],"names":[],"mappings":"
|
|
1
|
+
{"version":3,"file":"headers.decorator.js","sourceRoot":"","sources":["../../../../src/decorators/headers.decorator.ts"],"names":[],"mappings":"AAAA,OAAO,kBAAkB,CAAC;AAE1B,OAAO,EAAC,YAAY,EAAC,MAAM,qBAAqB,CAAC;AAEjD;;GAEG;AACH,MAAM,CAAC,MAAM,OAAO,GAAG,GAAG,EAAE;IACxB,OAAO;IACH;;OAEG;IACH,MAAW;IAEX;;OAEG;IACH,WAA4B;IAE5B;;OAEG;IACH,cAAsB,EACxB,EAAE;QACA,gFAAgF;QAChF,MAAM,eAAe,GAAuC;YACxD,IAAI,EAAE,SAAS;SAClB,CAAC;QAEF,YAAY,CAAC,kCAAkC,CAAC,MAAM,EAAE,WAAW,EAAE,cAAc,EAAE,eAAe,CAAC,CAAC;IAC1G,CAAC,CAAA;AACL,CAAC,CAAC"}
|
|
@@ -1,3 +1,5 @@
|
|
|
1
|
+
import "reflect-metadata";
|
|
2
|
+
import { MetadataUtil } from "@pristine-ts/common";
|
|
1
3
|
/**
|
|
2
4
|
* The identity decorator can be used to inject the identity making the request in a parameter of a method in a controller.
|
|
3
5
|
*/
|
|
@@ -15,26 +17,11 @@ export const identity = () => {
|
|
|
15
17
|
* The index of the parameter for which the decorator is used.
|
|
16
18
|
*/
|
|
17
19
|
parameterIndex) => {
|
|
18
|
-
// Verify that the object target.constructor.prototype["__metadata__"]["methods"][propertyKey]["arguments"] exists or we create it.
|
|
19
|
-
// This object is a convention defined by Pristine on where to save controller method parameter decorator information and is used in the router to retrieve that information.
|
|
20
|
-
if (target.constructor.prototype.hasOwnProperty("__metadata__") === false) {
|
|
21
|
-
target.constructor.prototype["__metadata__"] = {};
|
|
22
|
-
}
|
|
23
|
-
if (target.constructor.prototype["__metadata__"].hasOwnProperty("methods") === false) {
|
|
24
|
-
target.constructor.prototype["__metadata__"]["methods"] = {};
|
|
25
|
-
}
|
|
26
|
-
if (target.constructor.prototype["__metadata__"]["methods"].hasOwnProperty(propertyKey) === false) {
|
|
27
|
-
target.constructor.prototype["__metadata__"]["methods"][propertyKey] = {};
|
|
28
|
-
}
|
|
29
|
-
if (target.constructor.prototype["__metadata__"]["methods"][propertyKey].hasOwnProperty("arguments") === false) {
|
|
30
|
-
target.constructor.prototype["__metadata__"]["methods"][propertyKey]["arguments"] = [];
|
|
31
|
-
}
|
|
32
20
|
// Set the type of method parameter. Each parameter decorator has it's own type.
|
|
33
21
|
const methodParameter = {
|
|
34
22
|
type: "identity"
|
|
35
23
|
};
|
|
36
|
-
|
|
37
|
-
target.constructor.prototype["__metadata__"]["methods"][propertyKey]["arguments"][parameterIndex] = methodParameter;
|
|
24
|
+
MetadataUtil.setMethodParameterArgumentMetadata(target, propertyKey, parameterIndex, methodParameter);
|
|
38
25
|
};
|
|
39
26
|
};
|
|
40
27
|
//# sourceMappingURL=identity.decorator.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"identity.decorator.js","sourceRoot":"","sources":["../../../../src/decorators/identity.decorator.ts"],"names":[],"mappings":"
|
|
1
|
+
{"version":3,"file":"identity.decorator.js","sourceRoot":"","sources":["../../../../src/decorators/identity.decorator.ts"],"names":[],"mappings":"AAAA,OAAO,kBAAkB,CAAC;AAE1B,OAAO,EAAC,YAAY,EAAC,MAAM,qBAAqB,CAAC;AAEjD;;GAEG;AACH,MAAM,CAAC,MAAM,QAAQ,GAAG,GAAG,EAAE;IACzB,OAAO;IACH;;OAEG;IACH,MAAW;IAEX;;OAEG;IACH,WAA4B;IAE5B;;OAEG;IACH,cAAsB,EACxB,EAAE;QACA,gFAAgF;QAChF,MAAM,eAAe,GAAwC;YACzD,IAAI,EAAE,UAAU;SACnB,CAAC;QAEF,YAAY,CAAC,kCAAkC,CAAC,MAAM,EAAE,WAAW,EAAE,cAAc,EAAE,eAAe,CAAC,CAAC;IAC1G,CAAC,CAAA;AACL,CAAC,CAAC"}
|
|
@@ -1,3 +1,5 @@
|
|
|
1
|
+
import "reflect-metadata";
|
|
2
|
+
import { MetadataUtil } from "@pristine-ts/common";
|
|
1
3
|
/**
|
|
2
4
|
* The queryParameter decorator can be used to inject a specific query parameter of a request in a parameter of a method in a controller.
|
|
3
5
|
* @param name The name of the query parameter to inject.
|
|
@@ -16,28 +18,13 @@ export const queryParameter = (name) => {
|
|
|
16
18
|
* The index of the parameter for which the decorator is used.
|
|
17
19
|
*/
|
|
18
20
|
parameterIndex) => {
|
|
19
|
-
// Verify that the object target.constructor.prototype["__metadata__"]["methods"][propertyKey]["arguments"] exists or we create it.
|
|
20
|
-
// This object is a convention defined by Pristine on where to save controller method parameter decorator information and is used in the router to retrieve that information.
|
|
21
|
-
if (target.constructor.prototype.hasOwnProperty("__metadata__") === false) {
|
|
22
|
-
target.constructor.prototype["__metadata__"] = {};
|
|
23
|
-
}
|
|
24
|
-
if (target.constructor.prototype["__metadata__"].hasOwnProperty("methods") === false) {
|
|
25
|
-
target.constructor.prototype["__metadata__"]["methods"] = {};
|
|
26
|
-
}
|
|
27
|
-
if (target.constructor.prototype["__metadata__"]["methods"].hasOwnProperty(propertyKey) === false) {
|
|
28
|
-
target.constructor.prototype["__metadata__"]["methods"][propertyKey] = {};
|
|
29
|
-
}
|
|
30
|
-
if (target.constructor.prototype["__metadata__"]["methods"][propertyKey].hasOwnProperty("arguments") === false) {
|
|
31
|
-
target.constructor.prototype["__metadata__"]["methods"][propertyKey]["arguments"] = [];
|
|
32
|
-
}
|
|
33
21
|
// Set the type of method parameter. Each parameter decorator has it's own type.
|
|
34
22
|
// Set also the name of the query parameter to resolve.
|
|
35
23
|
const methodParameter = {
|
|
36
24
|
type: "queryParameter",
|
|
37
25
|
queryParameterName: name,
|
|
38
26
|
};
|
|
39
|
-
|
|
40
|
-
target.constructor.prototype["__metadata__"]["methods"][propertyKey]["arguments"][parameterIndex] = methodParameter;
|
|
27
|
+
MetadataUtil.setMethodParameterArgumentMetadata(target, propertyKey, parameterIndex, methodParameter);
|
|
41
28
|
};
|
|
42
29
|
};
|
|
43
30
|
//# sourceMappingURL=query-parameter.decorator.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"query-parameter.decorator.js","sourceRoot":"","sources":["../../../../src/decorators/query-parameter.decorator.ts"],"names":[],"mappings":"
|
|
1
|
+
{"version":3,"file":"query-parameter.decorator.js","sourceRoot":"","sources":["../../../../src/decorators/query-parameter.decorator.ts"],"names":[],"mappings":"AAAA,OAAO,kBAAkB,CAAC;AAE1B,OAAO,EAAC,YAAY,EAAC,MAAM,qBAAqB,CAAC;AAEjD;;;GAGG;AACH,MAAM,CAAC,MAAM,cAAc,GAAG,CAAC,IAAY,EAAE,EAAE;IAC3C,OAAO;IACH;;OAEG;IACH,MAAW;IAEX;;OAEG;IACH,WAA4B;IAE5B;;OAEG;IACH,cAAsB,EACxB,EAAE;QACA,gFAAgF;QAChF,uDAAuD;QACvD,MAAM,eAAe,GAAqC;YACtD,IAAI,EAAE,gBAAgB;YACtB,kBAAkB,EAAE,IAAI;SAC3B,CAAC;QAEF,YAAY,CAAC,kCAAkC,CAAC,MAAM,EAAE,WAAW,EAAE,cAAc,EAAE,eAAe,CAAC,CAAC;IAC1G,CAAC,CAAA;AACL,CAAC,CAAA"}
|
|
@@ -1,3 +1,5 @@
|
|
|
1
|
+
import "reflect-metadata";
|
|
2
|
+
import { MetadataUtil } from "@pristine-ts/common";
|
|
1
3
|
/**
|
|
2
4
|
* The queryParameters decorator can be used to inject all the query parameters of a request in a parameter of a method in a controller.
|
|
3
5
|
*/
|
|
@@ -15,26 +17,11 @@ export const queryParameters = () => {
|
|
|
15
17
|
* The index of the parameter for which the decorator is used.
|
|
16
18
|
*/
|
|
17
19
|
parameterIndex) => {
|
|
18
|
-
// Verify that the object target.constructor.prototype["__metadata__"]["methods"][propertyKey]["arguments"] exists or we create it.
|
|
19
|
-
// This object is a convention defined by Pristine on where to save controller method parameter decorator information and is used in the router to retrieve that information.
|
|
20
|
-
if (target.constructor.prototype.hasOwnProperty("__metadata__") === false) {
|
|
21
|
-
target.constructor.prototype["__metadata__"] = {};
|
|
22
|
-
}
|
|
23
|
-
if (target.constructor.prototype["__metadata__"].hasOwnProperty("methods") === false) {
|
|
24
|
-
target.constructor.prototype["__metadata__"]["methods"] = {};
|
|
25
|
-
}
|
|
26
|
-
if (target.constructor.prototype["__metadata__"]["methods"].hasOwnProperty(propertyKey) === false) {
|
|
27
|
-
target.constructor.prototype["__metadata__"]["methods"][propertyKey] = {};
|
|
28
|
-
}
|
|
29
|
-
if (target.constructor.prototype["__metadata__"]["methods"][propertyKey].hasOwnProperty("arguments") === false) {
|
|
30
|
-
target.constructor.prototype["__metadata__"]["methods"][propertyKey]["arguments"] = [];
|
|
31
|
-
}
|
|
32
20
|
// Set the type of method parameter. Each parameter decorator has it's own type.
|
|
33
21
|
const methodParameter = {
|
|
34
22
|
type: "queryParameters",
|
|
35
23
|
};
|
|
36
|
-
|
|
37
|
-
target.constructor.prototype["__metadata__"]["methods"][propertyKey]["arguments"][parameterIndex] = methodParameter;
|
|
24
|
+
MetadataUtil.setMethodParameterArgumentMetadata(target, propertyKey, parameterIndex, methodParameter);
|
|
38
25
|
};
|
|
39
26
|
};
|
|
40
27
|
//# sourceMappingURL=query-parameters.decorator.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"query-parameters.decorator.js","sourceRoot":"","sources":["../../../../src/decorators/query-parameters.decorator.ts"],"names":[],"mappings":"
|
|
1
|
+
{"version":3,"file":"query-parameters.decorator.js","sourceRoot":"","sources":["../../../../src/decorators/query-parameters.decorator.ts"],"names":[],"mappings":"AAAA,OAAO,kBAAkB,CAAC;AAE1B,OAAO,EAAC,YAAY,EAAC,MAAM,qBAAqB,CAAC;AAEjD;;GAEG;AACH,MAAM,CAAC,MAAM,eAAe,GAAG,GAAG,EAAE;IAChC,OAAO;IACH;;OAEG;IACH,MAAW;IAEX;;OAEG;IACH,WAA4B;IAE5B;;OAEG;IACH,cAAsB,EACxB,EAAE;QACA,gFAAgF;QAChF,MAAM,eAAe,GAAsC;YACvD,IAAI,EAAE,iBAAiB;SAC1B,CAAC;QAEF,YAAY,CAAC,kCAAkC,CAAC,MAAM,EAAE,WAAW,EAAE,cAAc,EAAE,eAAe,CAAC,CAAC;IAC1G,CAAC,CAAA;AACL,CAAC,CAAA"}
|
|
@@ -1,3 +1,5 @@
|
|
|
1
|
+
import "reflect-metadata";
|
|
2
|
+
import { MetadataUtil } from "@pristine-ts/common";
|
|
1
3
|
/**
|
|
2
4
|
* The request decorator can be used to inject the whole request in a parameter of a method in a controller.
|
|
3
5
|
*/
|
|
@@ -15,26 +17,11 @@ export const request = () => {
|
|
|
15
17
|
* The index of the parameter for which the decorator is used.
|
|
16
18
|
*/
|
|
17
19
|
parameterIndex) => {
|
|
18
|
-
// Verify that the object target.constructor.prototype["__metadata__"]["methods"][propertyKey]["arguments"] exists or we create it.
|
|
19
|
-
// This object is a convention defined by Pristine on where to save controller method parameter decorator information and is used in the router to retrieve that information.
|
|
20
|
-
if (target.constructor.prototype.hasOwnProperty("__metadata__") === false) {
|
|
21
|
-
target.constructor.prototype["__metadata__"] = {};
|
|
22
|
-
}
|
|
23
|
-
if (target.constructor.prototype["__metadata__"].hasOwnProperty("methods") === false) {
|
|
24
|
-
target.constructor.prototype["__metadata__"]["methods"] = {};
|
|
25
|
-
}
|
|
26
|
-
if (target.constructor.prototype["__metadata__"]["methods"].hasOwnProperty(propertyKey) === false) {
|
|
27
|
-
target.constructor.prototype["__metadata__"]["methods"][propertyKey] = {};
|
|
28
|
-
}
|
|
29
|
-
if (target.constructor.prototype["__metadata__"]["methods"][propertyKey].hasOwnProperty("arguments") === false) {
|
|
30
|
-
target.constructor.prototype["__metadata__"]["methods"][propertyKey]["arguments"] = [];
|
|
31
|
-
}
|
|
32
20
|
// Set the type of method parameter. Each parameter decorator has it's own type.
|
|
33
21
|
const methodParameter = {
|
|
34
22
|
type: "request"
|
|
35
23
|
};
|
|
36
|
-
|
|
37
|
-
target.constructor.prototype["__metadata__"]["methods"][propertyKey]["arguments"][parameterIndex] = methodParameter;
|
|
24
|
+
MetadataUtil.setMethodParameterArgumentMetadata(target, propertyKey, parameterIndex, methodParameter);
|
|
38
25
|
};
|
|
39
26
|
};
|
|
40
27
|
//# sourceMappingURL=request.decorator.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"request.decorator.js","sourceRoot":"","sources":["../../../../src/decorators/request.decorator.ts"],"names":[],"mappings":"
|
|
1
|
+
{"version":3,"file":"request.decorator.js","sourceRoot":"","sources":["../../../../src/decorators/request.decorator.ts"],"names":[],"mappings":"AAAA,OAAO,kBAAkB,CAAC;AAE1B,OAAO,EAAC,YAAY,EAAC,MAAM,qBAAqB,CAAC;AAEjD;;GAEG;AACH,MAAM,CAAC,MAAM,OAAO,GAAG,GAAG,EAAE;IACxB,OAAO;IACH;;OAEG;IACH,MAAW;IAEX;;OAEG;IACH,WAA4B;IAE5B;;OAEG;IACH,cAAsB,EACxB,EAAE;QACA,gFAAgF;QAChF,MAAM,eAAe,GAAuC;YACxD,IAAI,EAAE,SAAS;SAClB,CAAC;QAEF,YAAY,CAAC,kCAAkC,CAAC,MAAM,EAAE,WAAW,EAAE,cAAc,EAAE,eAAe,CAAC,CAAC;IAC1G,CAAC,CAAA;AACL,CAAC,CAAC"}
|
|
@@ -1,3 +1,6 @@
|
|
|
1
|
+
import "reflect-metadata";
|
|
2
|
+
import { MetadataUtil } from "@pristine-ts/common";
|
|
3
|
+
export const responseHeaderMetadataKeyname = "@responseHeader";
|
|
1
4
|
/**
|
|
2
5
|
* The responseHeader decorator can be used to specify a header that needs to be added to the response before sending it back.
|
|
3
6
|
* This decorator can be used with either method (route) or a class (controller).
|
|
@@ -19,43 +22,11 @@ export const responseHeader = (key, value) => {
|
|
|
19
22
|
* The descriptor of the property
|
|
20
23
|
*/
|
|
21
24
|
descriptor) => {
|
|
22
|
-
|
|
23
|
-
|
|
24
|
-
|
|
25
|
-
|
|
26
|
-
|
|
27
|
-
target.constructor.prototype["__metadata__"] = {};
|
|
28
|
-
}
|
|
29
|
-
if (target.constructor.prototype["__metadata__"].hasOwnProperty("methods") === false) {
|
|
30
|
-
target.constructor.prototype["__metadata__"]["methods"] = {};
|
|
31
|
-
}
|
|
32
|
-
if (target.constructor.prototype["__metadata__"]["methods"].hasOwnProperty(propertyKey) === false) {
|
|
33
|
-
target.constructor.prototype["__metadata__"]["methods"][propertyKey] = {};
|
|
34
|
-
}
|
|
35
|
-
if (target.constructor.prototype["__metadata__"]["methods"][propertyKey].hasOwnProperty("__routeContext__") === false) {
|
|
36
|
-
target.constructor.prototype["__metadata__"]["methods"][propertyKey]["__routeContext__"] = {};
|
|
37
|
-
}
|
|
38
|
-
if (target.constructor.prototype["__metadata__"]["methods"][propertyKey]["__routeContext__"].hasOwnProperty("responseHeaders") === false) {
|
|
39
|
-
target.constructor.prototype["__metadata__"]["methods"][propertyKey]["__routeContext__"]["responseHeaders"] = {};
|
|
40
|
-
}
|
|
41
|
-
target.constructor.prototype["__metadata__"]["methods"][propertyKey]["__routeContext__"]["responseHeaders"][key] = value;
|
|
42
|
-
}
|
|
43
|
-
else {
|
|
44
|
-
// It is a controller decorator
|
|
45
|
-
if (target.prototype.hasOwnProperty("__metadata__") === false) {
|
|
46
|
-
target.prototype["__metadata__"] = {};
|
|
47
|
-
}
|
|
48
|
-
if (target.prototype["__metadata__"].hasOwnProperty("controller") === false) {
|
|
49
|
-
target.prototype["__metadata__"]["controller"] = {};
|
|
50
|
-
}
|
|
51
|
-
if (target.prototype["__metadata__"]["controller"].hasOwnProperty("__routeContext__") === false) {
|
|
52
|
-
target.prototype["__metadata__"]["controller"]["__routeContext__"] = {};
|
|
53
|
-
}
|
|
54
|
-
if (target.prototype["__metadata__"]["controller"]["__routeContext__"].hasOwnProperty("responseHeaders") === false) {
|
|
55
|
-
target.prototype["__metadata__"]["controller"]["__routeContext__"]["responseHeaders"] = {};
|
|
56
|
-
}
|
|
57
|
-
target.prototype["__metadata__"]["controller"]["__routeContext__"]["responseHeaders"][key] = value;
|
|
58
|
-
}
|
|
25
|
+
var _a;
|
|
26
|
+
const routeContext = MetadataUtil.getRouteContext(target, propertyKey);
|
|
27
|
+
const headers = (_a = routeContext[responseHeaderMetadataKeyname]) !== null && _a !== void 0 ? _a : {};
|
|
28
|
+
headers[key] = value;
|
|
29
|
+
MetadataUtil.setToRouteContext(responseHeaderMetadataKeyname, headers, target, propertyKey);
|
|
59
30
|
};
|
|
60
31
|
};
|
|
61
32
|
//# sourceMappingURL=response-header.decorator.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"response-header.decorator.js","sourceRoot":"","sources":["../../../../src/decorators/response-header.decorator.ts"],"names":[],"mappings":"AAAA;;;;;;GAMG;AACH,MAAM,CAAC,MAAM,cAAc,GAAG,CAAC,GAAW,EAAE,KAAa,EAAE,EAAE;IACzD,OAAO;IACH;;OAEG;IACH,MAAW;IAEX;;OAEG;IACH,WAAoB;IAEpB;;OAEG;IACH,UAA+B,EACjC,EAAE
|
|
1
|
+
{"version":3,"file":"response-header.decorator.js","sourceRoot":"","sources":["../../../../src/decorators/response-header.decorator.ts"],"names":[],"mappings":"AAAA,OAAO,kBAAkB,CAAC;AAC1B,OAAO,EAAC,YAAY,EAAC,MAAM,qBAAqB,CAAC;AAEjD,MAAM,CAAC,MAAM,6BAA6B,GAAG,iBAAiB,CAAC;AAE/D;;;;;;GAMG;AACH,MAAM,CAAC,MAAM,cAAc,GAAG,CAAC,GAAW,EAAE,KAAa,EAAE,EAAE;IACzD,OAAO;IACH;;OAEG;IACH,MAAW;IAEX;;OAEG;IACH,WAAoB;IAEpB;;OAEG;IACH,UAA+B,EACjC,EAAE;;QACA,MAAM,YAAY,GAAG,YAAY,CAAC,eAAe,CAAC,MAAM,EAAE,WAAW,CAAC,CAAC;QAEvE,MAAM,OAAO,GAAG,MAAA,YAAY,CAAC,6BAA6B,CAAC,mCAAI,EAAE,CAAC;QAElE,OAAO,CAAC,GAAG,CAAC,GAAG,KAAK,CAAC;QAErB,YAAY,CAAC,iBAAiB,CAAC,6BAA6B,EAAE,OAAO,EAAE,MAAM,EAAE,WAAW,CAAC,CAAC;IAChG,CAAC,CAAA;AACL,CAAC,CAAA"}
|