@deepkit/http 1.0.1-alpha.105 → 1.0.1-alpha.108
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 +11 -0
- package/dist/cjs/src/controllers.js +1 -1
- package/dist/cjs/src/decorator.js +14 -14
- package/dist/cjs/src/filter.js +4 -4
- package/dist/cjs/src/http-app.js +1 -1
- package/dist/cjs/src/http.js +33 -33
- package/dist/cjs/src/http.js.map +1 -1
- package/dist/cjs/src/kernel.js +2 -2
- package/dist/cjs/src/kernel.js.map +1 -1
- package/dist/cjs/src/logger.js +1 -1
- package/dist/cjs/src/middleware.js +5 -5
- package/dist/cjs/src/model.js +21 -21
- package/dist/cjs/src/model.js.map +1 -1
- package/dist/cjs/src/module.config.js +2 -2
- package/dist/cjs/src/module.js +1 -1
- package/dist/cjs/src/request-parser.js +1 -1
- package/dist/cjs/src/router.js +15 -15
- package/dist/cjs/src/static-serving.js +3 -3
- package/dist/cjs/tsconfig.tsbuildinfo +1 -1
- package/dist/esm/src/controllers.js +1 -1
- package/dist/esm/src/decorator.js +14 -14
- package/dist/esm/src/filter.js +4 -4
- package/dist/esm/src/http-app.js +1 -1
- package/dist/esm/src/http.js +33 -33
- package/dist/esm/src/http.js.map +1 -1
- package/dist/esm/src/kernel.js +2 -2
- package/dist/esm/src/kernel.js.map +1 -1
- package/dist/esm/src/logger.js +1 -1
- package/dist/esm/src/middleware.js +5 -5
- package/dist/esm/src/model.js +21 -21
- package/dist/esm/src/model.js.map +1 -1
- package/dist/esm/src/module.config.js +2 -2
- package/dist/esm/src/module.js +1 -1
- package/dist/esm/src/request-parser.js +1 -1
- package/dist/esm/src/router.js +15 -15
- package/dist/esm/src/static-serving.js +3 -3
- package/dist/esm/tsconfig.esm.tsbuildinfo +1 -1
- package/package.json +11 -11
- package/src/http.ts +1 -1
- package/src/kernel.ts +1 -1
- package/src/model.ts +1 -1
package/dist/cjs/src/logger.js
CHANGED
|
@@ -22,7 +22,7 @@ class HttpLogger {
|
|
|
22
22
|
this.logger.log(event.request.connection.remoteAddress || '0.0.0.0', '-', event.request.method, `"${event.request.url}"`, event.response.statusCode, `"${event.request.headers.referer || ''}"`);
|
|
23
23
|
}
|
|
24
24
|
}
|
|
25
|
-
HttpLogger.__type = [() => __ΩLoggerInterface, 'logger', 'constructor', () => http_js_1.httpWorkflow.onResponse.event, 'event', 'onHttpRequest', 'Pn!2";"0#Pi$2%"0&
|
|
25
|
+
HttpLogger.__type = [() => __ΩLoggerInterface, 'logger', 'constructor', () => http_js_1.httpWorkflow.onResponse.event, 'event', 'onHttpRequest', 'HttpLogger', 'Pn!2";"0#Pi$2%"0&5w\''];
|
|
26
26
|
__decorate([
|
|
27
27
|
event_1.eventDispatcher.listen(http_js_1.httpWorkflow.onResponse, 101) //101 is right after 100 default listener
|
|
28
28
|
,
|
|
@@ -8,11 +8,11 @@ const app_1 = require("@deepkit/app");
|
|
|
8
8
|
const type_1 = require("@deepkit/type");
|
|
9
9
|
const model_js_1 = require("./model.js");
|
|
10
10
|
const injector_1 = require("@deepkit/injector");
|
|
11
|
-
const __ΩHttpMiddlewareFn = [() => model_js_1.HttpRequest, 'req', () => model_js_1.HttpResponse, 'res', 'err', '', 'next', 'PP7!2"P7#2$P"2%8$/&2\'P$$`J/&'];
|
|
11
|
+
const __ΩHttpMiddlewareFn = [() => model_js_1.HttpRequest, 'req', () => model_js_1.HttpResponse, 'res', 'err', '', 'next', 'PP7!2"P7#2$P"2%8$/&2\'P$$`J/&y'];
|
|
12
12
|
exports.__ΩHttpMiddlewareFn = __ΩHttpMiddlewareFn;
|
|
13
|
-
const __ΩHttpMiddleware = [() => __ΩHttpMiddlewareFn, 'execute', 'Pn!4"
|
|
13
|
+
const __ΩHttpMiddleware = [() => __ΩHttpMiddlewareFn, 'execute', 'Pn!4"My'];
|
|
14
14
|
exports.__ΩHttpMiddleware = __ΩHttpMiddleware;
|
|
15
|
-
const __ΩHttpMiddlewareRoute = ['path', 'pathRegExp', "GET", "HEAD", "POST", "PATCH", "PUT", "DELETE", "OPTIONS", "TRACE", 'httpMethod', 'category', 'excludeCategory', 'group', 'excludeGroup', 'P&4!8A4"8P.#.$.%.&.\'.(.).*J4+8&4,8&4-8&4.8&4/
|
|
15
|
+
const __ΩHttpMiddlewareRoute = ['path', 'pathRegExp', "GET", "HEAD", "POST", "PATCH", "PUT", "DELETE", "OPTIONS", "TRACE", 'httpMethod', 'category', 'excludeCategory', 'group', 'excludeGroup', 'P&4!8A4"8P.#.$.%.&.\'.(.).*J4+8&4,8&4-8&4.8&4/8My'];
|
|
16
16
|
exports.__ΩHttpMiddlewareRoute = __ΩHttpMiddlewareRoute;
|
|
17
17
|
class HttpMiddlewareConfig {
|
|
18
18
|
constructor() {
|
|
@@ -37,7 +37,7 @@ class HttpMiddlewareConfig {
|
|
|
37
37
|
}
|
|
38
38
|
}
|
|
39
39
|
exports.HttpMiddlewareConfig = HttpMiddlewareConfig;
|
|
40
|
-
HttpMiddlewareConfig.__type = ['name', () => __ΩHttpMiddlewareFn, () => __ΩClassType, () => __ΩHttpMiddleware, 'middlewares', function () { return []; }, () => __ΩHttpMiddlewareRoute, 'routes', function () { return []; }, () => __ΩHttpMiddlewareRoute, 'excludeRoutes', function () { return []; }, 'order', function () { return 0; }, () => __ΩClassType, 'controllers', function () { return []; }, () => __ΩClassType, 'excludeControllers', function () { return []; }, 'routeNames', function () { return []; }, 'excludeRouteNames', function () { return []; }, 'timeout', () => injector_1.InjectorModule, 'modules', function () { return []; }, 'selfModule', function () { return false; }, () => __ΩClassType, 'getClassTypes', '&3!8Pn"n$o#"JF3%>&n\'F3(>)n*F3+>,\'3->.n/F30>1n2F33>4&F35>6&F37>8\'398P"7:F3;><)3=>>Pn?F0@
|
|
40
|
+
HttpMiddlewareConfig.__type = ['name', () => __ΩHttpMiddlewareFn, () => __ΩClassType, () => __ΩHttpMiddleware, 'middlewares', function () { return []; }, () => __ΩHttpMiddlewareRoute, 'routes', function () { return []; }, () => __ΩHttpMiddlewareRoute, 'excludeRoutes', function () { return []; }, 'order', function () { return 0; }, () => __ΩClassType, 'controllers', function () { return []; }, () => __ΩClassType, 'excludeControllers', function () { return []; }, 'routeNames', function () { return []; }, 'excludeRouteNames', function () { return []; }, 'timeout', () => injector_1.InjectorModule, 'modules', function () { return []; }, 'selfModule', function () { return false; }, () => __ΩClassType, 'getClassTypes', 'HttpMiddlewareConfig', '&3!8Pn"n$o#"JF3%>&n\'F3(>)n*F3+>,\'3->.n/F30>1n2F33>4&F35>6&F37>8\'398P"7:F3;><)3=>>Pn?F0@5wA'];
|
|
41
41
|
class HttpMiddlewareApi {
|
|
42
42
|
constructor() {
|
|
43
43
|
this.t = new HttpMiddlewareConfig;
|
|
@@ -90,6 +90,6 @@ class HttpMiddlewareApi {
|
|
|
90
90
|
}
|
|
91
91
|
}
|
|
92
92
|
exports.HttpMiddlewareApi = HttpMiddlewareApi;
|
|
93
|
-
HttpMiddlewareApi.__type = ['name', () => __ΩHttpMiddlewareFn, () => __ΩClassType, () => __ΩHttpMiddleware, 'middlewares', 'for', () => __ΩHttpMiddlewareRoute, 'routes', 'forRoutes', () => __ΩHttpMiddlewareRoute, 'excludeRoutes', 'names', 'forRouteNames', 'excludeRouteNames', 'timeout', () => __ΩClassType, 'controllers', 'forControllers', () => __ΩClassType, 'excludeControllers', 'order', () => app_1.AppModule, 'modules', 'forModules', 'forSelfModules', 'P&2!"0!PPn"n$o#"J@2%"0&Pn\'@2("0)Pn*@2("0+P&@2,"0-P&@2,"0.P\'2/"0/Pn0@21"02Pn3@21"04P\'25"05PP"76@27"08P"
|
|
93
|
+
HttpMiddlewareApi.__type = ['name', () => __ΩHttpMiddlewareFn, () => __ΩClassType, () => __ΩHttpMiddleware, 'middlewares', 'for', () => __ΩHttpMiddlewareRoute, 'routes', 'forRoutes', () => __ΩHttpMiddlewareRoute, 'excludeRoutes', 'names', 'forRouteNames', 'excludeRouteNames', 'timeout', () => __ΩClassType, 'controllers', 'forControllers', () => __ΩClassType, 'excludeControllers', 'order', () => app_1.AppModule, 'modules', 'forModules', 'forSelfModules', 'HttpMiddlewareApi', 'P&2!"0!PPn"n$o#"J@2%"0&Pn\'@2("0)Pn*@2("0+P&@2,"0-P&@2,"0.P\'2/"0/Pn0@21"02Pn3@21"04P\'25"05PP"76@27"08P"095w:'];
|
|
94
94
|
exports.httpMiddleware = (0, type_1.createFreeDecoratorContext)(HttpMiddlewareApi);
|
|
95
95
|
//# sourceMappingURL=middleware.js.map
|
package/dist/cjs/src/model.js
CHANGED
|
@@ -24,10 +24,10 @@ var __importStar = (this && this.__importStar) || function (mod) {
|
|
|
24
24
|
};
|
|
25
25
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
26
26
|
exports.MemoryHttpResponse = exports.HttpRequest = exports.RequestBuilder = exports.getRegExp = exports.__ΩHttpRegExp = exports.__ΩHttpQueries = exports.__ΩHttpQuery = exports.__ΩHttpHeader = exports.__ΩHttpPath = exports.__ΩHttpBodyValidation = exports.__ΩHttpBody = exports.ValidatedBody = exports.BodyValidationError = exports.__ΩHttpRequestPositionedParameters = exports.__ΩHttpRequestResolvedParameters = exports.__ΩHttpRequestQuery = exports.createRequestWithCachedBody = exports.readBody = exports.HttpResponse = void 0;
|
|
27
|
-
const __ΩError = ['name', 'message', 'stack', 'P&4!&4"&4#
|
|
28
|
-
const __ΩPartial = ['T', 'l+e#!e"!fRb!Pde"!gN#"'];
|
|
29
|
-
const __ΩReadonlyArray = ['T', 'length', 'toString', 'toLocaleString', () => __ΩConcatArray, 'items', 'concat', () => __ΩConcatArray, 'separator', 'join', 'start', 'end', 'slice', 'searchElement', 'fromIndex', 'indexOf', 'lastIndexOf', 'value', 'index', 'array', '', 'predicate', 'thisArg', 'every', 'some', 'callbackfn', 'forEach', 'map', 'filter', 'previousValue', 'currentValue', 'currentIndex', 'reduce', 'initialValue', 'reduceRight', 'b!P\'4"9P&1#P&1$Pe#!o%"@2&e#!F1\'PPe$!e$!o("J@2&e#!F1\'P&2)8&1*P\'2+8\'2,8e#!F1-Pe#!2.\'2/8\'10Pe#!2.\'2/8\'11PPe$!22\'23e$!F924!/526"278!18PPe$!22\'23e$!F924#/526"278)18PPe$!22\'23e$!F924#/526"278)19PPe$!22\'23e$!F924$/52:"278$1;PPe$!22\'23e$!F924"/52:"278"F1<PPe$!22\'23e$!F924!/526"278"F1=PPe$!22\'23e$!F924#/526"278e#!F1=PPe$!2>e$!2?\'2@e$!F924e$!/52:e#!1APPe$!2>e$!2?\'2@e$!F924e$!/52:e#!2Be#!1APP"2>e$!2?\'2@e$!F924"/52:"2B"1APPe$!2>e$!2?\'2@e$!F924e$!/52:e#!1CPPe$!2>e$!2?\'2@e$!F924e$!/52:e#!2Be#!1CPP"2>e$!2?\'2@e$!F924"/52:"2B"1C\'e"!
|
|
30
|
-
const __ΩConcatArray = ['T', 'length', 'separator', 'join', 'start', 'end', 'slice', 'b!P\'4"9\'e"!LP&2#8&1$P\'2%8\'2&8e#!F1\'
|
|
27
|
+
const __ΩError = ['name', 'message', 'stack', 'P&4!&4"&4#8My'];
|
|
28
|
+
const __ΩPartial = ['T', 'l+e#!e"!fRb!Pde"!gN#"y'];
|
|
29
|
+
const __ΩReadonlyArray = ['T', 'length', 'toString', 'toLocaleString', () => __ΩConcatArray, 'items', 'concat', () => __ΩConcatArray, 'separator', 'join', 'start', 'end', 'slice', 'searchElement', 'fromIndex', 'indexOf', 'lastIndexOf', 'value', 'index', 'array', '', 'predicate', 'thisArg', 'every', 'some', 'callbackfn', 'forEach', 'map', 'filter', 'previousValue', 'currentValue', 'currentIndex', 'reduce', 'initialValue', 'reduceRight', 'b!P\'4"9P&1#P&1$Pe#!o%"@2&e#!F1\'PPe$!e$!o("J@2&e#!F1\'P&2)8&1*P\'2+8\'2,8e#!F1-Pe#!2.\'2/8\'10Pe#!2.\'2/8\'11PPe$!22\'23e$!F924!/526"278!18PPe$!22\'23e$!F924#/526"278)18PPe$!22\'23e$!F924#/526"278)19PPe$!22\'23e$!F924$/52:"278$1;PPe$!22\'23e$!F924"/52:"278"F1<PPe$!22\'23e$!F924!/526"278"F1=PPe$!22\'23e$!F924#/526"278e#!F1=PPe$!2>e$!2?\'2@e$!F924e$!/52:e#!1APPe$!2>e$!2?\'2@e$!F924e$!/52:e#!2Be#!1APP"2>e$!2?\'2@e$!F924"/52:"2B"1APPe$!2>e$!2?\'2@e$!F924e$!/52:e#!1CPPe$!2>e$!2?\'2@e$!F924e$!/52:e#!2Be#!1CPP"2>e$!2?\'2@e$!F924"/52:"2B"1C\'e"!LMy'];
|
|
30
|
+
const __ΩConcatArray = ['T', 'length', 'separator', 'join', 'start', 'end', 'slice', 'b!P\'4"9\'e"!LP&2#8&1$P\'2%8\'2&8e#!F1\'My'];
|
|
31
31
|
/*@ts-ignore*/
|
|
32
32
|
const { __ΩTypeAnnotation } = require('@deepkit/type');
|
|
33
33
|
function __assignType(fn, args) {
|
|
@@ -56,7 +56,7 @@ class HttpResponse extends http_1.ServerResponse {
|
|
|
56
56
|
}
|
|
57
57
|
}
|
|
58
58
|
exports.HttpResponse = HttpResponse;
|
|
59
|
-
HttpResponse.__type = [() => http_1.ServerResponse, 'code', 'status', 'P7!P\'2""0#
|
|
59
|
+
HttpResponse.__type = [() => http_1.ServerResponse, 'code', 'status', 'HttpResponse', 'P7!P\'2""0#5w$'];
|
|
60
60
|
/**
|
|
61
61
|
* Reads the body of the request and returns it as a Buffer.
|
|
62
62
|
* The result will be cached in the request object as `request.body`.
|
|
@@ -119,11 +119,11 @@ function createRequestWithCachedBody(request, body) {
|
|
|
119
119
|
}
|
|
120
120
|
exports.createRequestWithCachedBody = createRequestWithCachedBody;
|
|
121
121
|
createRequestWithCachedBody.__type = [() => __ΩPartial, 'request', 'body', () => HttpRequest, 'createRequestWithCachedBody', 'P!o!"2"!2#P7$/%'];
|
|
122
|
-
const __ΩHttpRequestQuery = ['P&&
|
|
122
|
+
const __ΩHttpRequestQuery = ['P&&LMy'];
|
|
123
123
|
exports.__ΩHttpRequestQuery = __ΩHttpRequestQuery;
|
|
124
|
-
const __ΩHttpRequestResolvedParameters = ['P&"
|
|
124
|
+
const __ΩHttpRequestResolvedParameters = ['P&"LMy'];
|
|
125
125
|
exports.__ΩHttpRequestResolvedParameters = __ΩHttpRequestResolvedParameters;
|
|
126
|
-
const __ΩHttpRequestPositionedParameters = ['arguments', () => __ΩHttpRequestResolvedParameters, 'parameters', 'P"F4!n"4#
|
|
126
|
+
const __ΩHttpRequestPositionedParameters = ['arguments', () => __ΩHttpRequestResolvedParameters, 'parameters', 'P"F4!n"4#My'];
|
|
127
127
|
exports.__ΩHttpRequestPositionedParameters = __ΩHttpRequestPositionedParameters;
|
|
128
128
|
class BodyValidationError {
|
|
129
129
|
constructor(errors = []) {
|
|
@@ -141,11 +141,11 @@ class BodyValidationError {
|
|
|
141
141
|
return this.errors.filter(__assignType(v => v.path === path, ['v', '', 'P"2!"/"']));
|
|
142
142
|
}
|
|
143
143
|
getErrorMessageForPath(path) {
|
|
144
|
-
return this.getErrorsForPath(path).map(__assignType(v => v.
|
|
144
|
+
return this.getErrorsForPath(path).map(__assignType(v => v.toString(), ['v', '', 'P"2!"/"'])).join(', ');
|
|
145
145
|
}
|
|
146
146
|
}
|
|
147
147
|
exports.BodyValidationError = BodyValidationError;
|
|
148
|
-
BodyValidationError.__type = [() => type_1.ValidationErrorItem, 'errors', () => [], 'constructor', 'prefix', 'hasErrors', () => type_1.ValidationErrorItem, 'getErrors', 'path', () => type_1.ValidationErrorItem, 'getErrorsForPath', 'getErrorMessageForPath', 'PP7!F2":9>#"0$P&2%8)0&P&2%8P7\'F0(P&2)P7*F0+P&2)&0,
|
|
148
|
+
BodyValidationError.__type = [() => type_1.ValidationErrorItem, 'errors', () => [], 'constructor', 'prefix', 'hasErrors', () => type_1.ValidationErrorItem, 'getErrors', 'path', () => type_1.ValidationErrorItem, 'getErrorsForPath', 'getErrorMessageForPath', 'BodyValidationError', 'PP7!F2":9>#"0$P&2%8)0&P&2%8P7\'F0(P&2)P7*F0+P&2)&0,5w-'];
|
|
149
149
|
class ValidatedBody {
|
|
150
150
|
constructor(error, value) {
|
|
151
151
|
this.error = error;
|
|
@@ -156,20 +156,20 @@ class ValidatedBody {
|
|
|
156
156
|
}
|
|
157
157
|
}
|
|
158
158
|
exports.ValidatedBody = ValidatedBody;
|
|
159
|
-
ValidatedBody.__type = ['T', () => BodyValidationError, 'error', 'value', 'constructor', 'valid', 'b!PP7"2#:e"!2$8:"0%P!0&
|
|
160
|
-
const __ΩHttpBody = ['T', () => __ΩTypeAnnotation, "httpBody", 'b!Pe"!.#o""
|
|
159
|
+
ValidatedBody.__type = ['T', () => BodyValidationError, 'error', 'value', 'constructor', 'valid', 'ValidatedBody', 'b!PP7"2#:e"!2$8:"0%P!0&5w\''];
|
|
160
|
+
const __ΩHttpBody = ['T', () => __ΩTypeAnnotation, "httpBody", 'b!Pe"!.#o""Ky'];
|
|
161
161
|
exports.__ΩHttpBody = __ΩHttpBody;
|
|
162
|
-
const __ΩHttpBodyValidation = ['T', () => ValidatedBody, () => __ΩTypeAnnotation, "httpBodyValidation", 'b!PPe#!7".$o#"
|
|
162
|
+
const __ΩHttpBodyValidation = ['T', () => ValidatedBody, () => __ΩTypeAnnotation, "httpBodyValidation", 'b!PPe#!7".$o#"Ky'];
|
|
163
163
|
exports.__ΩHttpBodyValidation = __ΩHttpBodyValidation;
|
|
164
|
-
const __ΩHttpPath = ['T', 'Options', () => __ΩTypeAnnotation, "httpPath", 'b!PMc"Pe"!.$e""o##
|
|
164
|
+
const __ΩHttpPath = ['T', 'Options', () => __ΩTypeAnnotation, "httpPath", 'b!PMc"Pe"!.$e""o##Ky'];
|
|
165
165
|
exports.__ΩHttpPath = __ΩHttpPath;
|
|
166
|
-
const __ΩHttpHeader = ['T', 'Options', () => __ΩTypeAnnotation, "httpHeader", 'b!PMc"Pe"!.$o#"
|
|
166
|
+
const __ΩHttpHeader = ['T', 'Options', () => __ΩTypeAnnotation, "httpHeader", 'b!PMc"Pe"!.$o#"Ky'];
|
|
167
167
|
exports.__ΩHttpHeader = __ΩHttpHeader;
|
|
168
|
-
const __ΩHttpQuery = ['T', 'Options', () => __ΩTypeAnnotation, "httpQuery", 'b!PMc"Pe"!.$e""o##
|
|
168
|
+
const __ΩHttpQuery = ['T', 'Options', () => __ΩTypeAnnotation, "httpQuery", 'b!PMc"Pe"!.$e""o##Ky'];
|
|
169
169
|
exports.__ΩHttpQuery = __ΩHttpQuery;
|
|
170
|
-
const __ΩHttpQueries = ['T', 'Options', () => __ΩTypeAnnotation, "httpQueries", 'b!PMc"Pe"!.$e""o##
|
|
170
|
+
const __ΩHttpQueries = ['T', 'Options', () => __ΩTypeAnnotation, "httpQueries", 'b!PMc"Pe"!.$e""o##Ky'];
|
|
171
171
|
exports.__ΩHttpQueries = __ΩHttpQueries;
|
|
172
|
-
const __ΩHttpRegExp = ['T', 'Pattern', "httpRegExp", '__meta', 'b!b"Pe"!PP!P.#e%"GK4$
|
|
172
|
+
const __ΩHttpRegExp = ['T', 'Pattern', "httpRegExp", '__meta', 'b!b"Pe"!PP!P.#e%"GK4$8MKy'];
|
|
173
173
|
exports.__ΩHttpRegExp = __ΩHttpRegExp;
|
|
174
174
|
function getRegExp(type) {
|
|
175
175
|
const options = type_1.metaAnnotation.getForName(type, 'httpRegExp');
|
|
@@ -260,7 +260,7 @@ Content-Type: application/json\r
|
|
|
260
260
|
}
|
|
261
261
|
}
|
|
262
262
|
exports.RequestBuilder = RequestBuilder;
|
|
263
|
-
RequestBuilder.__type = ['contentBuffer', function () { return Buffer.alloc(0); }, '_headers', function () { return {}; }, 'queryPath', 'path', 'method', () => "GET", 'constructor', 'getUrl', () => HttpRequest, 'build', 'headers', 'name', 'value', 'header', 'body', 'json', 'file', 'fileName', 'items', 'multiPart', 'query', '!3!<>"P&&LM3#<>$&3%8<P&2&<&2\'<>("0)P"0*PP7+0,PP&&LM2-!0-P&2.P&\'J2/!00P%21!02PP&4.W438&448"428MF25!06PP&!J21!01P"27!
|
|
263
|
+
RequestBuilder.__type = ['contentBuffer', function () { return Buffer.alloc(0); }, '_headers', function () { return {}; }, 'queryPath', 'path', 'method', () => "GET", 'constructor', 'getUrl', () => HttpRequest, 'build', 'headers', 'name', 'value', 'header', 'body', 'json', 'file', 'fileName', 'items', 'multiPart', 'query', 'RequestBuilder', '!3!<>"P&&LM3#<>$&3%8<P&2&<&2\'<>("0)P"0*PP7+0,PP&&LM2-!0-P&2.P&\'J2/!00P%21!02PP&4.W438&448"428MF25!06PP&!J21!01P"27!075w8'];
|
|
264
264
|
class HttpRequest extends http_1.IncomingMessage {
|
|
265
265
|
constructor() {
|
|
266
266
|
super(...arguments);
|
|
@@ -313,7 +313,7 @@ class HttpRequest extends http_1.IncomingMessage {
|
|
|
313
313
|
}
|
|
314
314
|
}
|
|
315
315
|
exports.HttpRequest = HttpRequest;
|
|
316
|
-
HttpRequest.__type = [() => http_1.IncomingMessage, 'store', function () { return {}; }, () => router_js_1.UploadedFile, 'uploadedFiles', function () { return {}; }, 'body', 'readBody', 'readBodyText', 'path', () => RequestBuilder, 'GET', () => RequestBuilder, 'POST', () => RequestBuilder, 'OPTIONS', () => RequestBuilder, 'TRACE', () => RequestBuilder, 'HEAD', () => RequestBuilder, 'PATCH', () => RequestBuilder, 'PUT', () => RequestBuilder, 'DELETE', 'getUrl', 'getMethod', 'getRemoteAddress', 'P7!P&"LM3">#P&P7$LM3%>&!3\'8P!`0(P&`0)P&2*P7+0,sP&2*P7-0.sP&2*P7/00sP&2*P7102sP&2*P7304sP&2*P7506sP&2*P7708sP&2*P790:sP&0;P&0<P&0=
|
|
316
|
+
HttpRequest.__type = [() => http_1.IncomingMessage, 'store', function () { return {}; }, () => router_js_1.UploadedFile, 'uploadedFiles', function () { return {}; }, 'body', 'readBody', 'readBodyText', 'path', () => RequestBuilder, 'GET', () => RequestBuilder, 'POST', () => RequestBuilder, 'OPTIONS', () => RequestBuilder, 'TRACE', () => RequestBuilder, 'HEAD', () => RequestBuilder, 'PATCH', () => RequestBuilder, 'PUT', () => RequestBuilder, 'DELETE', 'getUrl', 'getMethod', 'getRemoteAddress', 'HttpRequest', 'P7!P&"LM3">#P&P7$LM3%>&!3\'8P!`0(P&`0)P&2*P7+0,sP&2*P7-0.sP&2*P7/00sP&2*P7102sP&2*P7304sP&2*P7506sP&2*P7708sP&2*P790:sP&0;P&0<P&0=5w>'];
|
|
317
317
|
class MemoryHttpResponse extends HttpResponse {
|
|
318
318
|
constructor() {
|
|
319
319
|
super(...arguments);
|
|
@@ -396,5 +396,5 @@ class MemoryHttpResponse extends HttpResponse {
|
|
|
396
396
|
}
|
|
397
397
|
}
|
|
398
398
|
exports.MemoryHttpResponse = MemoryHttpResponse;
|
|
399
|
-
MemoryHttpResponse.__type = [() => HttpResponse, 'body', function () { return Buffer.alloc(0); }, 'headers', function () { return Object.create(null); }, 'name', () => __ΩReadonlyArray, 'value', 'setHeader', 'removeHeader', 'getHeader', 'getHeaders', 'statusCode', 'headersOrReasonPhrase', 'writeHead', 'chunk', 'encoding', 'callback', 'write', 'end', 'P7!!3">#P&P\'&&F-JLM3$>%P&2&P\'&&o\'"J2(!0)P&2&"0*P&2&"0+P!0,P\'2-P&!!FJ2.8P!!FJ2$8!0/!!!P"20"21"228"03P"20"218"228"
|
|
399
|
+
MemoryHttpResponse.__type = [() => HttpResponse, 'body', function () { return Buffer.alloc(0); }, 'headers', function () { return Object.create(null); }, 'name', () => __ΩReadonlyArray, 'value', 'setHeader', 'removeHeader', 'getHeader', 'getHeaders', 'statusCode', 'headersOrReasonPhrase', 'writeHead', 'chunk', 'encoding', 'callback', 'write', 'end', 'MemoryHttpResponse', 'P7!!3">#P&P\'&&F-JLM3$>%P&2&P\'&&o\'"J2(!0)P&2&"0*P&2&"0+P!0,P\'2-P&!!FJ2.8P!!FJ2$8!0/!!!P"20"21"228"03P"20"218"228"045w5'];
|
|
400
400
|
//# sourceMappingURL=model.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"model.js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gBAC3B,KAAK,GAAG,MAAM,CAAC,IAAI,CAAC,KAAK,EAAE,QAAQ,IAAI,MAAM,CAAC,CAAC;aAClD;YACD,IAAI,CAAC,IAAI,GAAG,MAAM,CAAC,MAAM,CAAC,CAAC,IAAI,CAAC,IAAI,EAAE,KAAK,CAAC,CAAC,CAAC;SACjD;QACD,IAAI,CAAC,IAAI,CAAC,QAAQ,CAAC,CAAC;QACpB,KAAK,CAAC,GAAG,CAAC,KAAK,EAAE,QAAQ,EAAE,QAAQ,CAAC,CAAC;QACrC,IAAI,CAAC,IAAI,CAAC,OAAO,CAAC,CAAC;QACnB,OAAO,IAAI,CAAC;IAChB,CAAC;;AAzFL,gDA0FC;8EAzFyB,MAAM,CAAC,KAAK,CAAC,CAAC,CAAC,qCACwC,MAAM,CAAC,MAAM,CAAC,IAAI,CAAC"}
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
"use strict";
|
|
2
2
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
3
|
exports.HttpConfig = exports.__ΩHttpParserOptions = void 0;
|
|
4
|
-
const __ΩHttpParserOptions = ['encoding', 'uploadDir', 'keepExtensions', 'allowEmptyFiles', 'minFileSize', 'maxFiles', 'maxFileSize', 'maxTotalFileSize', 'maxFields', 'maxFieldsSize', false, 'hashAlgorithm', 'multiples', 'enabledPlugins', 'PP!-J4!8P&-J4"8P)-J4#8P)-J4$8P\'-J4%8P\'-J4&8P\'-J4\'8P\'-J4(8P\'-J4)8P\'-J4*8P&.+-J4,8P)-J4-8P&F-J4.
|
|
4
|
+
const __ΩHttpParserOptions = ['encoding', 'uploadDir', 'keepExtensions', 'allowEmptyFiles', 'minFileSize', 'maxFiles', 'maxFileSize', 'maxTotalFileSize', 'maxFields', 'maxFieldsSize', false, 'hashAlgorithm', 'multiples', 'enabledPlugins', 'PP!-J4!8P&-J4"8P)-J4#8P)-J4$8P\'-J4%8P\'-J4&8P\'-J4\'8P\'-J4(8P\'-J4)8P\'-J4*8P&.+-J4,8P)-J4-8P&F-J4.8My'];
|
|
5
5
|
exports.__ΩHttpParserOptions = __ΩHttpParserOptions;
|
|
6
6
|
class HttpConfig {
|
|
7
7
|
constructor() {
|
|
@@ -10,5 +10,5 @@ class HttpConfig {
|
|
|
10
10
|
}
|
|
11
11
|
}
|
|
12
12
|
exports.HttpConfig = HttpConfig;
|
|
13
|
-
HttpConfig.__type = ['debug', function () { return false; }, () => __ΩHttpParserOptions, 'parser', function () { return {}; }, ')3!>"n#3$>%
|
|
13
|
+
HttpConfig.__type = ['debug', function () { return false; }, () => __ΩHttpParserOptions, 'parser', function () { return {}; }, 'HttpConfig', ')3!>"n#3$>%5w&'];
|
|
14
14
|
//# sourceMappingURL=module.config.js.map
|
package/dist/cjs/src/module.js
CHANGED
|
@@ -120,5 +120,5 @@ class HttpModule extends (0, app_1.createModule)({
|
|
|
120
120
|
}
|
|
121
121
|
}
|
|
122
122
|
exports.HttpModule = HttpModule;
|
|
123
|
-
HttpModule.__type = [() => (0, app_1.createModule)({ config: module_config_js_1.HttpConfig, providers: [router_js_1.HttpRouter, kernel_js_1.HttpKernel, http_js_1.HttpResultFormatter, router_js_1.HttpRouterRegistry, filter_js_1.HttpRouterFilterResolver, { provide: model_js_1.HttpResponse, scope: "http" }, { provide: model_js_1.HttpRequest, scope: "http" }, { provide: router_js_1.RouteConfig, useValue: undefined, scope: "http" }, { provide: logger_1.Logger, useValue: new logger_1.Logger([new logger_1.ConsoleTransport()]) }], listeners: [http_js_1.HttpListener], workflows: [http_js_1.httpWorkflow], exports: [router_js_1.HttpRouter, router_js_1.HttpRouterRegistry, kernel_js_1.HttpKernel, http_js_1.HttpResultFormatter, filter_js_1.HttpRouterFilterResolver, model_js_1.HttpResponse, model_js_1.HttpRequest, controllers_js_1.HttpControllers, router_js_1.RouteConfig, logger_1.Logger] }), 'process', () => event_1.EventToken, 'patchEventsForHttpRequestAccess', function () { return [http_js_1.httpWorkflow.onRequest, http_js_1.httpWorkflow.onAuth, http_js_1.httpWorkflow.onController]; }, () => app_1.AppModule, 'module', 'listener', 'processListener', () => app_1.AppModule, () => __ΩControllerConfig, 'config', 'processController', 'P7!P"0"P"7#F3$<>%PP"7&2\'"2("0)PP"7*2\'n+2,"0-
|
|
123
|
+
HttpModule.__type = [() => (0, app_1.createModule)({ config: module_config_js_1.HttpConfig, providers: [router_js_1.HttpRouter, kernel_js_1.HttpKernel, http_js_1.HttpResultFormatter, router_js_1.HttpRouterRegistry, filter_js_1.HttpRouterFilterResolver, { provide: model_js_1.HttpResponse, scope: "http" }, { provide: model_js_1.HttpRequest, scope: "http" }, { provide: router_js_1.RouteConfig, useValue: undefined, scope: "http" }, { provide: logger_1.Logger, useValue: new logger_1.Logger([new logger_1.ConsoleTransport()]) }], listeners: [http_js_1.HttpListener], workflows: [http_js_1.httpWorkflow], exports: [router_js_1.HttpRouter, router_js_1.HttpRouterRegistry, kernel_js_1.HttpKernel, http_js_1.HttpResultFormatter, filter_js_1.HttpRouterFilterResolver, model_js_1.HttpResponse, model_js_1.HttpRequest, controllers_js_1.HttpControllers, router_js_1.RouteConfig, logger_1.Logger] }), 'process', () => event_1.EventToken, 'patchEventsForHttpRequestAccess', function () { return [http_js_1.httpWorkflow.onRequest, http_js_1.httpWorkflow.onAuth, http_js_1.httpWorkflow.onController]; }, () => app_1.AppModule, 'module', 'listener', 'processListener', () => app_1.AppModule, () => __ΩControllerConfig, 'config', 'processController', 'HttpModule', 'P7!P"0"P"7#F3$<>%PP"7&2\'"2("0)PP"7*2\'n+2,"0-5w.'];
|
|
124
124
|
//# sourceMappingURL=module.js.map
|
|
@@ -114,7 +114,7 @@ class ParameterForRequestParser {
|
|
|
114
114
|
}
|
|
115
115
|
}
|
|
116
116
|
exports.ParameterForRequestParser = ParameterForRequestParser;
|
|
117
|
-
ParameterForRequestParser.__type = ['regexPosition', () => type_1.ReflectionParameter, 'parameter', 'constructor', 'getType', 'getName', 'isPartOfPath', '\'3!8PP7"2#:"0$!!P"0%!!!!P"0&P)0\'
|
|
117
|
+
ParameterForRequestParser.__type = ['regexPosition', () => type_1.ReflectionParameter, 'parameter', 'constructor', 'getType', 'getName', 'isPartOfPath', 'ParameterForRequestParser', '\'3!8PP7"2#:"0$!!P"0%!!!!P"0&P)0\'5w('];
|
|
118
118
|
function parseRoutePathToRegex(path, params) {
|
|
119
119
|
const parameterNames = {};
|
|
120
120
|
let argumentIndex = 0;
|
package/dist/cjs/src/router.js
CHANGED
|
@@ -10,8 +10,8 @@ var __importDefault = (this && this.__importDefault) || function (mod) {
|
|
|
10
10
|
};
|
|
11
11
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
12
12
|
exports.HttpRouter = exports.HttpRouterRegistry = exports.HttpRouterRegistryFunctionRegistrar = exports.__ΩHttpRouterFunctionOptions = exports.__ΩRouteParameterResolverContext = exports.__ΩRouteParameterResolver = exports.dotToUrlPath = exports.parseRouteControllerAction = exports.RouteConfig = exports.__ΩRouteClassControllerAction = exports.__ΩRouteFunctionControllerAction = exports.UploadedFile = exports.UploadedFileSymbol = exports.__ΩRouteParameterResolverForInjector = void 0;
|
|
13
|
-
const __ΩPartial = ['T', 'l+e#!e"!fRb!Pde"!gN#"'];
|
|
14
|
-
const __ΩRecord = ['K', 'T', 'l\'e#"Rb!b"Pde"!N#!'];
|
|
13
|
+
const __ΩPartial = ['T', 'l+e#!e"!fRb!Pde"!gN#"y'];
|
|
14
|
+
const __ΩRecord = ['K', 'T', 'l\'e#"Rb!b"Pde"!N#!y'];
|
|
15
15
|
/*@ts-ignore*/
|
|
16
16
|
const { __ΩSerializationOptions } = require('@deepkit/type');
|
|
17
17
|
/*@ts-ignore*/
|
|
@@ -57,13 +57,13 @@ const qs_1 = __importDefault(require("qs"));
|
|
|
57
57
|
const http_js_1 = require("./http.js");
|
|
58
58
|
const request_parser_js_1 = require("./request-parser.js");
|
|
59
59
|
const module_config_js_1 = require("./module.config.js");
|
|
60
|
-
const __ΩRouteParameterResolverForInjector = [() => injector_1.InjectorContext, 'injector', () => __ΩHttpRequestPositionedParameters, () => __ΩHttpRequestPositionedParameters, '', 'PP7!2"Pn#n$`J/%'];
|
|
60
|
+
const __ΩRouteParameterResolverForInjector = [() => injector_1.InjectorContext, 'injector', () => __ΩHttpRequestPositionedParameters, () => __ΩHttpRequestPositionedParameters, '', 'PP7!2"Pn#n$`J/%y'];
|
|
61
61
|
exports.__ΩRouteParameterResolverForInjector = __ΩRouteParameterResolverForInjector;
|
|
62
|
-
const __ΩResolvedController = [() => __ΩRouteParameterResolverForInjector, 'parameters', () => RouteConfig, 'routeConfig', () => UploadedFile, 'uploadedFiles', () => injector_1.InjectorContext, 'injector', () => __ΩHttpMiddlewareFn, 'fn', 'timeout', '', 'middlewares', 'Pn!4"P7#4$P&P7%LM4&PP7\'2(Pn)4*\'4+8MF/,4-
|
|
62
|
+
const __ΩResolvedController = [() => __ΩRouteParameterResolverForInjector, 'parameters', () => RouteConfig, 'routeConfig', () => UploadedFile, 'uploadedFiles', () => injector_1.InjectorContext, 'injector', () => __ΩHttpMiddlewareFn, 'fn', 'timeout', '', 'middlewares', 'Pn!4"P7#4$P&P7%LM4&PP7\'2(Pn)4*\'4+8MF/,4-8My'];
|
|
63
63
|
exports.UploadedFileSymbol = Symbol('UploadedFile');
|
|
64
64
|
let UploadedFile = class UploadedFile {
|
|
65
65
|
};
|
|
66
|
-
UploadedFile.__type = [() => exports.UploadedFileSymbol, 'validator', 'size', 'path', 'name', 'type', 'lastModifiedDate', 'Pi!,J3"\'3#&3$P&,J3%P&,J3&PT,J3\'
|
|
66
|
+
UploadedFile.__type = [() => exports.UploadedFileSymbol, 'validator', 'size', 'path', 'name', 'type', 'lastModifiedDate', 'UploadedFile', 'Pi!,J3"\'3#&3$P&,J3%P&,J3&PT,J3\'5w('];
|
|
67
67
|
UploadedFile = __decorate([
|
|
68
68
|
type_1.entity.name('@deepkit/UploadedFile')
|
|
69
69
|
], UploadedFile);
|
|
@@ -72,9 +72,9 @@ type_1.serializer.typeGuards.getRegistry(1).registerClass(UploadedFile, __assign
|
|
|
72
72
|
state.setContext({ UploadedFileSymbol: exports.UploadedFileSymbol });
|
|
73
73
|
state.addSetterAndReportErrorIfInvalid('uploadSecurity', 'Not an uploaded file', `typeof ${state.accessor} === 'object' && ${state.accessor} !== null && ${state.accessor}.validator === UploadedFileSymbol`);
|
|
74
74
|
}, ['type', 'state', '', 'P"2!"2""/#']));
|
|
75
|
-
const __ΩRouteFunctionControllerAction = ["function", 'type', () => injector_1.InjectorModule, 'module', 'args', '', 'fn', 'P.!4"P"7#4$8P"@2%"/&4\'
|
|
75
|
+
const __ΩRouteFunctionControllerAction = ["function", 'type', () => injector_1.InjectorModule, 'module', 'args', '', 'fn', 'P.!4"P"7#4$8P"@2%"/&4\'My'];
|
|
76
76
|
exports.__ΩRouteFunctionControllerAction = __ΩRouteFunctionControllerAction;
|
|
77
|
-
const __ΩRouteClassControllerAction = ["controller", 'type', () => injector_1.InjectorModule, 'module', () => __ΩClassType, 'controller', 'methodName', 'P.!4"P"7#4$8n%4&&4\'
|
|
77
|
+
const __ΩRouteClassControllerAction = ["controller", 'type', () => injector_1.InjectorModule, 'module', () => __ΩClassType, 'controller', 'methodName', 'P.!4"P"7#4$8n%4&&4\'My'];
|
|
78
78
|
exports.__ΩRouteClassControllerAction = __ΩRouteClassControllerAction;
|
|
79
79
|
class RouteConfig {
|
|
80
80
|
constructor(name, httpMethods, path, action, internal = false) {
|
|
@@ -118,7 +118,7 @@ class RouteConfig {
|
|
|
118
118
|
}
|
|
119
119
|
}
|
|
120
120
|
exports.RouteConfig = RouteConfig;
|
|
121
|
-
RouteConfig.__type = ['baseUrl', function () { return ''; }, 'statusCode', 'description', 'type', 'responses', function () { return []; }, function () { return ''; }, 'groups', function () { return []; }, 'category', function () { return ''; }, 'returnType', () => __ΩSerializationOptions, 'serializationOptions', () => type_1.Serializer, 'serializer', () => injector_1.InjectorModule, 'module', () => __ΩClassType, 'resolverForToken', function () { return new Map(); }, () => middleware_js_1.HttpMiddlewareConfig, 'config', () => injector_1.InjectorModule, 'middlewares', function () { return []; }, () => __ΩClassType, 'resolverForParameterName', function () { return new Map(); }, 'name', 'httpMethods', 'path', () => __ΩRouteClassControllerAction, () => __ΩRouteFunctionControllerAction, 'action', 'internal', () => false, 'constructor', () => type_1.ReflectionFunction, 'getReflectionFunction', 'getSchemaForResponse', 'getFullPath', '&3!>"P\'4#&4$"4%8MF3&>\'&3$>(&F3)>*&3+>,"3-8n.3/8P70318P"72338"n4E35>6PP7748P"79438MF3:>;&n<E3=>>P&2?:9&F2@:9&2A:9PnBnCJ2D:9)2E:>F"0GPP7H0IP\'2#P"-J0JP&
|
|
121
|
+
RouteConfig.__type = ['baseUrl', function () { return ''; }, 'statusCode', 'description', 'type', 'responses', function () { return []; }, function () { return ''; }, 'groups', function () { return []; }, 'category', function () { return ''; }, 'returnType', () => __ΩSerializationOptions, 'serializationOptions', () => type_1.Serializer, 'serializer', () => injector_1.InjectorModule, 'module', () => __ΩClassType, 'resolverForToken', function () { return new Map(); }, () => middleware_js_1.HttpMiddlewareConfig, 'config', () => injector_1.InjectorModule, 'middlewares', function () { return []; }, () => __ΩClassType, 'resolverForParameterName', function () { return new Map(); }, 'name', 'httpMethods', 'path', () => __ΩRouteClassControllerAction, () => __ΩRouteFunctionControllerAction, 'action', 'internal', () => false, 'constructor', () => type_1.ReflectionFunction, 'getReflectionFunction', 'getSchemaForResponse', 'getFullPath', 'RouteConfig', '&3!>"P\'4#&4$"4%8MF3&>\'&3$>(&F3)>*&3+>,"3-8n.3/8P70318P"72338"n4E35>6PP7748P"79438MF3:>;&n<E3=>>P&2?:9&F2@:9&2A:9PnBnCJ2D:9)2E:>F"0GPP7H0IP\'2#P"-J0JP&0K5wL'];
|
|
122
122
|
class ParsedRoute {
|
|
123
123
|
constructor(routeConfig) {
|
|
124
124
|
this.routeConfig = routeConfig;
|
|
@@ -141,7 +141,7 @@ class ParsedRoute {
|
|
|
141
141
|
throw new Error(`No route parameter with name ${name} defined.`);
|
|
142
142
|
}
|
|
143
143
|
}
|
|
144
|
-
ParsedRoute.__type = ['regex', 'pathParameterNames', function () { return {}; }, () => request_parser_js_1.ParameterForRequestParser, 'parameters', function () { return []; }, () => RouteConfig, 'routeConfig', 'constructor', () => type_1.ReflectionParameter, 'property', () => request_parser_js_1.ParameterForRequestParser, 'addParameter', () => request_parser_js_1.ParameterForRequestParser, 'getParameters', 'name', () => request_parser_js_1.ParameterForRequestParser, 'getParameter', '&3!8P&\'LM3">#P7$F3%<>&PP7\'2(:"0)PP7*2+P7,0-PP7.F0/P&
|
|
144
|
+
ParsedRoute.__type = ['regex', 'pathParameterNames', function () { return {}; }, () => request_parser_js_1.ParameterForRequestParser, 'parameters', function () { return []; }, () => RouteConfig, 'routeConfig', 'constructor', () => type_1.ReflectionParameter, 'property', () => request_parser_js_1.ParameterForRequestParser, 'addParameter', () => request_parser_js_1.ParameterForRequestParser, 'getParameters', 'name', () => request_parser_js_1.ParameterForRequestParser, 'getParameter', 'ParsedRoute', '&3!8P&\'LM3">#P7$F3%<>&PP7\'2(:"0)PP7*2+P7,0-PP7.F0/P&20P71025w3'];
|
|
145
145
|
function parseRouteControllerAction(routeConfig) {
|
|
146
146
|
const parsedRoute = new ParsedRoute(routeConfig);
|
|
147
147
|
const parameters = routeConfig.getReflectionFunction().getParameters();
|
|
@@ -163,9 +163,9 @@ function dotToUrlPath(dotPath) {
|
|
|
163
163
|
}
|
|
164
164
|
exports.dotToUrlPath = dotToUrlPath;
|
|
165
165
|
dotToUrlPath.__type = ['dotPath', 'dotToUrlPath', 'P&2!&/"'];
|
|
166
|
-
const __ΩRouteParameterResolver = [() => __ΩRouteParameterResolverContext, 'context', 'resolve', 'PPn!2"P""`J1#
|
|
166
|
+
const __ΩRouteParameterResolver = [() => __ΩRouteParameterResolverContext, 'context', 'resolve', 'PPn!2"P""`J1#My'];
|
|
167
167
|
exports.__ΩRouteParameterResolver = __ΩRouteParameterResolver;
|
|
168
|
-
const __ΩRouteParameterResolverContext = [() => __ΩClassType, 'token', () => RouteConfig, 'route', () => model_js_1.HttpRequest, 'request', 'name', 'value', () => __ΩHttpRequestQuery, 'query', () => __ΩHttpRequestResolvedParameters, 'parameters', () => type_1.ReflectionParameter, 'type', 'PPn!&+"J4"P7#4$P7%4&"4\'"4(n)4*n+4,P7-4.
|
|
168
|
+
const __ΩRouteParameterResolverContext = [() => __ΩClassType, 'token', () => RouteConfig, 'route', () => model_js_1.HttpRequest, 'request', 'name', 'value', () => __ΩHttpRequestQuery, 'query', () => __ΩHttpRequestResolvedParameters, 'parameters', () => type_1.ReflectionParameter, 'type', 'PPn!&+"J4"P7#4$P7%4&"4\'"4(n)4*n+4,P7-4.My'];
|
|
169
169
|
exports.__ΩRouteParameterResolverContext = __ΩRouteParameterResolverContext;
|
|
170
170
|
function filterMiddlewaresForRoute(middlewareRawConfigs, routeConfig, fullPath) {
|
|
171
171
|
const middlewares = middlewareRawConfigs.slice(0);
|
|
@@ -246,7 +246,7 @@ function filterMiddlewaresForRoute(middlewareRawConfigs, routeConfig, fullPath)
|
|
|
246
246
|
return middlewareConfigs;
|
|
247
247
|
}
|
|
248
248
|
filterMiddlewaresForRoute.__type = [() => __ΩMiddlewareRegistryEntry, 'middlewareRawConfigs', () => RouteConfig, 'routeConfig', 'fullPath', () => middleware_js_1.HttpMiddlewareConfig, 'config', () => injector_1.InjectorModule, 'module', 'filterMiddlewaresForRoute', 'Pn!F2"P7#2$&2%PP7&4\'P"7(4)MF/*'];
|
|
249
|
-
const __ΩHttpRouterFunctionOptions = ['path', 'name', 'methods', 'description', 'category', 'groups', () => __ΩRecord, 'data', 'baseUrl', () => middleware_js_1.HttpMiddlewareConfig, '', 'middlewares', () => type_1.Serializer, 'serializer', () => __ΩSerializationOptions, 'serializationOptions', () => __ΩClassType, 'resolverForToken', () => __ΩClassType, 'resolverForParameterName', 'statusCode', 'type', 'responses', 'P&4!&4"8&F4#8&4$8&4%8&F4&8""o\'#4(8&4)8PP7*/+F4,8P7-4.8n/408"n1E428&n3E448P\'45&4$"
|
|
249
|
+
const __ΩHttpRouterFunctionOptions = ['path', 'name', 'methods', 'description', 'category', 'groups', () => __ΩRecord, 'data', 'baseUrl', () => middleware_js_1.HttpMiddlewareConfig, '', 'middlewares', () => type_1.Serializer, 'serializer', () => __ΩSerializationOptions, 'serializationOptions', () => __ΩClassType, 'resolverForToken', () => __ΩClassType, 'resolverForParameterName', 'statusCode', 'type', 'responses', 'P&4!&4"8&F4#8&4$8&4%8&F4&8""o\'#4(8&4)8PP7*/+F4,8P7-4.8n/408"n1E428&n3E448P\'45&4$"468MF478My'];
|
|
250
250
|
exports.__ΩHttpRouterFunctionOptions = __ΩHttpRouterFunctionOptions;
|
|
251
251
|
function convertOptions(methods, pathOrOptions, defaultOptions) {
|
|
252
252
|
const options = 'string' === typeof pathOrOptions ? { path: pathOrOptions } : pathOrOptions;
|
|
@@ -381,7 +381,7 @@ class HttpRouterRegistryFunctionRegistrar {
|
|
|
381
381
|
}
|
|
382
382
|
}
|
|
383
383
|
exports.HttpRouterRegistryFunctionRegistrar = HttpRouterRegistryFunctionRegistrar;
|
|
384
|
-
HttpRouterRegistryFunctionRegistrar.__type = [() => __ΩPartial, () => __ΩHttpRouterFunctionOptions, 'defaultOptions', function () { return {}; }, () => RouteConfig, 'routeConfig', 'addRoute', () => __ΩPartial, () => __ΩHttpRouterFunctionOptions, 'options', () => HttpRouterRegistryFunctionRegistrar, 'forOptions', () => __ΩHttpRouterFunctionOptions, 'pathOrOptions', 'args', '', 'callback', 'any', () => __ΩHttpDecorator, 'decorator', 'add', () => __ΩHttpRouterFunctionOptions, 'get', () => __ΩHttpRouterFunctionOptions, 'post', () => __ΩHttpRouterFunctionOptions, 'put', () => __ΩHttpRouterFunctionOptions, 'patch', () => __ΩHttpRouterFunctionOptions, 'delete', () => __ΩHttpRouterFunctionOptions, () => __ΩHttpRouterFunctionOptions, 'trace', () => __ΩHttpRouterFunctionOptions, 'head', () => __ΩHttpRouterFunctionOptions, () => injector_1.InjectorModule, 'module', 'register', 'n"o!"3#<>$PP7%2&$0\'=Pn)o("2*P7+0,PP&n-J2.P"@2/"/021"02Pn324P"@2/"/021"05PP&n6J2.P"@2/"/021"07PP&n8J2.P"@2/"/021"09PP&n:J2.P"@2/"/021"0;PP&n<J2.P"@2/"/021"0=PP&n>J2.P"@2/"/021"0?PP&n@J2.P"@2/"/021"0*PP&nAJ2.P"@2/"/021"0BPP&nCJ2.P"@2/"/021"0DPnE2*P"@2/"/021P"7F2G8"0H;
|
|
384
|
+
HttpRouterRegistryFunctionRegistrar.__type = [() => __ΩPartial, () => __ΩHttpRouterFunctionOptions, 'defaultOptions', function () { return {}; }, () => RouteConfig, 'routeConfig', 'addRoute', () => __ΩPartial, () => __ΩHttpRouterFunctionOptions, 'options', () => HttpRouterRegistryFunctionRegistrar, 'forOptions', () => __ΩHttpRouterFunctionOptions, 'pathOrOptions', 'args', '', 'callback', 'any', () => __ΩHttpDecorator, 'decorator', 'add', () => __ΩHttpRouterFunctionOptions, 'get', () => __ΩHttpRouterFunctionOptions, 'post', () => __ΩHttpRouterFunctionOptions, 'put', () => __ΩHttpRouterFunctionOptions, 'patch', () => __ΩHttpRouterFunctionOptions, 'delete', () => __ΩHttpRouterFunctionOptions, () => __ΩHttpRouterFunctionOptions, 'trace', () => __ΩHttpRouterFunctionOptions, 'head', () => __ΩHttpRouterFunctionOptions, () => injector_1.InjectorModule, 'module', 'register', 'HttpRouterRegistryFunctionRegistrar', 'n"o!"3#<>$PP7%2&$0\'=Pn)o("2*P7+0,PP&n-J2.P"@2/"/021"02Pn324P"@2/"/021"05PP&n6J2.P"@2/"/021"07PP&n8J2.P"@2/"/021"09PP&n:J2.P"@2/"/021"0;PP&n<J2.P"@2/"/021"0=PP&n>J2.P"@2/"/021"0?PP&n@J2.P"@2/"/021"0*PP&nAJ2.P"@2/"/021"0BPP&nCJ2.P"@2/"/021"0DPnE2*P"@2/"/021P"7F2G8"0H;5wI'];
|
|
385
385
|
function createRouteConfigFromHttpAction(routeAction, action, module, controller) {
|
|
386
386
|
const routeConfig = new RouteConfig(action.name, action.httpMethods, action.path, routeAction);
|
|
387
387
|
routeConfig.responses = action.responses;
|
|
@@ -446,7 +446,7 @@ class HttpRouterRegistry extends HttpRouterRegistryFunctionRegistrar {
|
|
|
446
446
|
}
|
|
447
447
|
}
|
|
448
448
|
exports.HttpRouterRegistry = HttpRouterRegistry;
|
|
449
|
-
HttpRouterRegistry.__type = [() => HttpRouterRegistryFunctionRegistrar, () => RouteConfig, 'routes', function () { return []; }, 'buildId', function () { return 1; }, 'getBuildId', () => RouteConfig, 'getRoutes', () => __ΩClassType, 'controller', () => injector_1.InjectorModule, 'module', 'addRouteForController', () => RouteConfig, 'routeConfig', 'addRoute', 'P7!P7"F3#<>$\'3%;>&P\'0\'PP7(F0)Pn*2+P"7,2-"0.PP7/20"
|
|
449
|
+
HttpRouterRegistry.__type = [() => HttpRouterRegistryFunctionRegistrar, () => RouteConfig, 'routes', function () { return []; }, 'buildId', function () { return 1; }, 'getBuildId', () => RouteConfig, 'getRoutes', () => __ΩClassType, 'controller', () => injector_1.InjectorModule, 'module', 'addRouteForController', () => RouteConfig, 'routeConfig', 'addRoute', 'HttpRouterRegistry', 'P7!P7"F3#<>$\'3%;>&P\'0\'PP7(F0)Pn*2+P"7,2-"0.PP7/20"015w2'];
|
|
450
450
|
class HttpRouter {
|
|
451
451
|
constructor(controllers, logger, config, middlewareRegistry = new app_1.MiddlewareRegistry, registry = new HttpRouterRegistry) {
|
|
452
452
|
this.logger = logger;
|
|
@@ -613,5 +613,5 @@ class HttpRouter {
|
|
|
613
613
|
}
|
|
614
614
|
}
|
|
615
615
|
exports.HttpRouter = HttpRouter;
|
|
616
|
-
HttpRouter.__type = [() => model_js_1.HttpRequest, 'request', () => __ΩResolvedController, '', 'fn', 'buildId', function () { return 0; }, 'name', 'parameters', 'resolveFn', () => controllers_js_1.HttpControllers, 'controllers', () => __ΩLoggerInterface, 'logger', () => module_config_js_1.HttpConfig, 'config', () => app_1.MiddlewareRegistry, 'middlewareRegistry', () => new app_1.MiddlewareRegistry, () => HttpRouterRegistry, 'registry', () => new HttpRouterRegistry, 'constructor', () => RouteConfig, 'getRoutes', () => __ΩClassType, () => injector_1.InjectorModule, 'module', () => __ΩClassType, 'controller', () => app_1.MiddlewareRegistry, () => new app_1.MiddlewareRegistry(), () => injector_1.InjectorModule, () => new injector_1.InjectorModule(), () => module_config_js_1.HttpConfig, () => new module_config_js_1.HttpConfig(), () => HttpRouter, 'forControllers', () => core_1.CompilerContext, 'compiler', () => RouteConfig, 'routeConfig', 'getRouteCode', () => core_1.CompilerContext, () => RouteConfig, 'getRouteUrlResolveCode', () => RouteConfig, 'addRoute', () => __ΩClassType, () => injector_1.InjectorModule, 'addRouteForController', () => model_js_1.HttpRequest, () => __ΩResolvedController, 'build', 'buildUrlResolver', 'routeName', () => ({}), 'resolveUrl', () => model_js_1.HttpRequest, () => __ΩResolvedController, 'resolveRequest', 'method', 'url', () => __ΩResolvedController, 'resolve', 'PP7!2"Pn#-J/$3%8<\'3&<>\'P&2(P&"LM2)&/$3*8<PP7+2,n-2.;P7/20;P7122;>3P7425;>6"07PP78F09PPn:PP"7;4<n=4>MJF2,P7?22>@P"7A2<>BP7C20>DP7E0FsPP7G2HP7I2J&0K<PP7L2HP7M2J&0N<PP7O2J"0PPnQ2>P"7R2<"0SPPP7T2"PnU-J/$0V<P"0W<P&2XP&"LM2)>Y&0ZPP7[2"Pn\\-J0]P&2^&2_Pn`-
|
|
616
|
+
HttpRouter.__type = [() => model_js_1.HttpRequest, 'request', () => __ΩResolvedController, '', 'fn', 'buildId', function () { return 0; }, 'name', 'parameters', 'resolveFn', () => controllers_js_1.HttpControllers, 'controllers', () => __ΩLoggerInterface, 'logger', () => module_config_js_1.HttpConfig, 'config', () => app_1.MiddlewareRegistry, 'middlewareRegistry', () => new app_1.MiddlewareRegistry, () => HttpRouterRegistry, 'registry', () => new HttpRouterRegistry, 'constructor', () => RouteConfig, 'getRoutes', () => __ΩClassType, () => injector_1.InjectorModule, 'module', () => __ΩClassType, 'controller', () => app_1.MiddlewareRegistry, () => new app_1.MiddlewareRegistry(), () => injector_1.InjectorModule, () => new injector_1.InjectorModule(), () => module_config_js_1.HttpConfig, () => new module_config_js_1.HttpConfig(), () => HttpRouter, 'forControllers', () => core_1.CompilerContext, 'compiler', () => RouteConfig, 'routeConfig', 'getRouteCode', () => core_1.CompilerContext, () => RouteConfig, 'getRouteUrlResolveCode', () => RouteConfig, 'addRoute', () => __ΩClassType, () => injector_1.InjectorModule, 'addRouteForController', () => model_js_1.HttpRequest, () => __ΩResolvedController, 'build', 'buildUrlResolver', 'routeName', () => ({}), 'resolveUrl', () => model_js_1.HttpRequest, () => __ΩResolvedController, 'resolveRequest', 'method', 'url', () => __ΩResolvedController, 'resolve', 'HttpRouter', 'PP7!2"Pn#-J/$3%8<\'3&<>\'P&2(P&"LM2)&/$3*8<PP7+2,n-2.;P7/20;P7122;>3P7425;>6"07PP78F09PPn:PP"7;4<n=4>MJF2,P7?22>@P"7A2<>BP7C20>DP7E0FsPP7G2HP7I2J&0K<PP7L2HP7M2J&0N<PP7O2J"0PPnQ2>P"7R2<"0SPPP7T2"PnU-J/$0V<P"0W<P&2XP&"LM2)>Y&0ZPP7[2"Pn\\-J0]P&2^&2_Pn`-J0a5wb'];
|
|
617
617
|
//# sourceMappingURL=router.js.map
|
|
@@ -73,7 +73,7 @@ function serveStaticListener(module, path, localPath = path) {
|
|
|
73
73
|
}, ['resolve', '', 'P"2!"/"']));
|
|
74
74
|
}
|
|
75
75
|
}
|
|
76
|
-
HttpRequestStaticServingListener.__type = ['path', () => model_js_1.HttpRequest, 'request', () => model_js_1.HttpResponse, 'response', 'serve', () => http_js_1.httpWorkflow.onRoute.event, 'event', 'onRoute', 'P&2!P7"2#P7$2%"0&Pi\'2("0)
|
|
76
|
+
HttpRequestStaticServingListener.__type = ['path', () => model_js_1.HttpRequest, 'request', () => model_js_1.HttpResponse, 'response', 'serve', () => http_js_1.httpWorkflow.onRoute.event, 'event', 'onRoute', 'HttpRequestStaticServingListener', 'P&2!P7"2#P7$2%"0&Pi\'2("0)5w*'];
|
|
77
77
|
__decorate([
|
|
78
78
|
event_1.eventDispatcher.listen(http_js_1.httpWorkflow.onRoute, 101) //after default route listener at 100
|
|
79
79
|
,
|
|
@@ -96,7 +96,7 @@ function loadHtml(localPath, path) {
|
|
|
96
96
|
}
|
|
97
97
|
}
|
|
98
98
|
loadHtml.__type = ['localPath', 'path', 'loadHtml', 'P&2!&2"&/#'];
|
|
99
|
-
const __ΩStaticHttpOptions = ['path', 'localPath', 'groups', 'controllerName', 'indexReplace', 'P&4!&4"&F4#8&4$8P&&LM4%
|
|
99
|
+
const __ΩStaticHttpOptions = ['path', 'localPath', 'groups', 'controllerName', 'indexReplace', 'P&4!&4"&F4#8&4$8P&&LM4%8My'];
|
|
100
100
|
exports.__ΩStaticHttpOptions = __ΩStaticHttpOptions;
|
|
101
101
|
/**
|
|
102
102
|
* Serves an index file and allows to load asset files from the same folder. Can be used to serve an angular application
|
|
@@ -120,7 +120,7 @@ function registerStaticHttpController(module, options) {
|
|
|
120
120
|
return indexHtml ? new http_js_1.HtmlResponse(indexHtml) : new http_js_1.HtmlResponse('Index not found', 404);
|
|
121
121
|
}
|
|
122
122
|
}
|
|
123
|
-
StaticController.__type = [() => model_js_1.HttpRequest, 'request', () => model_js_1.HttpResponse, 'response', 'serveIndex', 'PP7!2"P7#2$"0%
|
|
123
|
+
StaticController.__type = [() => model_js_1.HttpRequest, 'request', () => model_js_1.HttpResponse, 'response', 'serveIndex', 'StaticController', 'PP7!2"P7#2$"0%5w&'];
|
|
124
124
|
__decorate([
|
|
125
125
|
decorator_js_1.http.GET().group(...groups),
|
|
126
126
|
__metadata("design:type", Function),
|