@deepkit/http 1.0.1-alpha.102 → 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 +22 -0
- package/dist/cjs/src/controllers.js +1 -1
- package/dist/cjs/src/decorator.d.ts +7 -6
- package/dist/cjs/src/decorator.js +31 -15
- package/dist/cjs/src/decorator.js.map +1 -1
- package/dist/cjs/src/filter.js +4 -4
- package/dist/cjs/src/http-app.js +1 -1
- package/dist/cjs/src/http.d.ts +1 -1
- package/dist/cjs/src/http.js +39 -39
- 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.d.ts +1 -1
- package/dist/cjs/src/middleware.js +5 -5
- package/dist/cjs/src/model.d.ts +16 -28
- package/dist/cjs/src/model.js +23 -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.d.ts +1 -1
- package/dist/cjs/src/router.js +16 -16
- package/dist/cjs/src/router.js.map +1 -1
- 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.d.ts +7 -6
- package/dist/esm/src/decorator.js +29 -14
- package/dist/esm/src/decorator.js.map +1 -1
- package/dist/esm/src/filter.js +4 -4
- package/dist/esm/src/http-app.js +1 -1
- package/dist/esm/src/http.d.ts +1 -1
- package/dist/esm/src/http.js +39 -39
- 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.d.ts +1 -1
- package/dist/esm/src/middleware.js +5 -5
- package/dist/esm/src/model.d.ts +16 -28
- package/dist/esm/src/model.js +23 -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.d.ts +1 -1
- package/dist/esm/src/router.js +17 -17
- package/dist/esm/src/router.js.map +1 -1
- package/dist/esm/src/static-serving.js +3 -3
- package/dist/esm/tsconfig.esm.tsbuildinfo +1 -1
- package/package.json +12 -12
- package/src/decorator.ts +20 -2
- package/src/http.ts +1 -1
- package/src/kernel.ts +1 -1
- package/src/model.ts +9 -9
- package/src/router.ts +16 -5
- package/tsconfig.json +5 -1
package/dist/esm/src/kernel.js
CHANGED
|
@@ -33,7 +33,7 @@ export class HttpKernel {
|
|
|
33
33
|
try {
|
|
34
34
|
if (frame) {
|
|
35
35
|
frame.data({ url: req.getUrl(), method: req.getMethod(), clientIp: req.getRemoteAddress() });
|
|
36
|
-
await frame.run(
|
|
36
|
+
await frame.run(() => workflow.apply('request', new HttpRequestEvent(httpInjectorContext, req, res)));
|
|
37
37
|
}
|
|
38
38
|
else {
|
|
39
39
|
await workflow.apply('request', new HttpRequestEvent(httpInjectorContext, req, res));
|
|
@@ -71,5 +71,5 @@ export class HttpKernel {
|
|
|
71
71
|
}
|
|
72
72
|
}
|
|
73
73
|
}
|
|
74
|
-
HttpKernel.__type = [() => HttpRouter, 'router', () => EventDispatcher, 'eventDispatcher', () => InjectorContext, 'injectorContext', () => __ΩLoggerInterface, 'logger', () => Stopwatch, 'stopwatch', 'constructor', () => RequestBuilder, 'requestBuilder', () => MemoryHttpResponse, 'request', () => HttpRequest, 'req', () => HttpResponse, 'res', 'handleRequest', 'PP7!2"<P7#2$<P7%2&<n\'2(<P7)2*8<"0+PP7,2-P7.`0/PP7021P7223"
|
|
74
|
+
HttpKernel.__type = [() => HttpRouter, 'router', () => EventDispatcher, 'eventDispatcher', () => InjectorContext, 'injectorContext', () => __ΩLoggerInterface, 'logger', () => Stopwatch, 'stopwatch', 'constructor', () => RequestBuilder, 'requestBuilder', () => MemoryHttpResponse, 'request', () => HttpRequest, 'req', () => HttpResponse, 'res', 'handleRequest', 'HttpKernel', 'PP7!2"<P7#2$<P7%2&<n\'2(<P7)2*8<"0+PP7,2-P7.`0/PP7021P7223"045w5'];
|
|
75
75
|
//# sourceMappingURL=kernel.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"kernel.js","sourceRoot":"","sources":["../../../src/kernel.ts"],"names":[],"mappings":";yDAGgC,iBAAiB;AAHjD,OAAO,EAAE,eAAe,EAAE,MAAM,mBAAmB,CAAC;AACpD,OAAO,EAAE,UAAU,EAAE,MAAM,aAAa,CAAC;AACzC,OAAO,EAAE,eAAe,EAAE,MAAM,gBAAgB,CAAC;AAEjD,OAAO,EAAE,WAAW,EAAE,YAAY,EAAE,kBAAkB,EAAE,cAAc,EAAE,MAAM,YAAY,CAAC;AAC3F,OAAO,EAAE,SAAS,EAAE,gBAAgB,EAAE,mBAAmB,EAAE,YAAY,EAAE,YAAY,EAAE,MAAM,WAAW,CAAC;AACzG,OAAO,EAAE,aAAa,EAAE,SAAS,EAAE,MAAM,oBAAoB,CAAC;AAC9D,OAAO,EAAE,MAAM,EAAE,MAAM,IAAI,CAAC;AAC5B,OAAO,EAAE,eAAe,EAAE,MAAM,eAAe,CAAC;AAEhD,MAAM,OAAO,UAAU;IACnB,YACc,MAAkB,EAClB,eAAgC,EAChC,eAAgC,EAChC,MAAuB,EACvB,SAAqB;QAJrB,WAAM,GAAN,MAAM,CAAY;QAClB,oBAAe,GAAf,eAAe,CAAiB;QAChC,oBAAe,GAAf,eAAe,CAAiB;QAChC,WAAM,GAAN,MAAM,CAAiB;QACvB,cAAS,GAAT,SAAS,CAAY;IAGnC,CAAC;IAEM,KAAK,CAAC,OAAO,CAAC,cAA8B;QAC/C,MAAM,OAAO,GAAG,cAAc,CAAC,KAAK,EAAE,CAAC;QACvC,MAAM,QA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C;gBACrE,IAAI,KAAK,YAAY,eAAe,EAAE;oBAClC,eAAe,CAAC,MAAM,CAAC,IAAI,YAAY,CAAC;wBACpC,OAAO,EAAE,KAAK,CAAC,OAAO;wBACtB,MAAM,EAAE,KAAK,CAAC,MAAM;qBACvB,EAAE,GAAG,CAAC,CAAC,sBAAsB,EAAE,EAAE,EAAE,OAAO,EAAE,GAAG,EAAE,QAAQ,EAAE,GAAG,EAAE,CAAC,CAAC;oBACnE,OAAO;iBACV;qBAAM,IAAI,KAAK,YAAY,SAAS,EAAE;oBACnC,eAAe,CAAC,MAAM,CAAC,IAAI,YAAY,CAAC;wBACpC,OAAO,EAAE,KAAK,CAAC,OAAO;qBACzB,EAAE,KAAK,CAAC,QAAQ,CAAC,CAAC,sBAAsB,EAAE,EAAE,EAAE,OAAO,EAAE,GAAG,EAAE,QAAQ,EAAE,GAAG,EAAE,CAAC,CAAC;oBAC9E,OAAO;iBACV;gBAED,GAAG,CAAC,MAAM,CAAC,GAAG,CAAC,CAAC;aACnB;YAED,IAAI,CAAC,MAAM,CAAC,KAAK,CAAC,4BAA4B,EAAE,KAAK,CAAC,CAAC;SAC1D;gBAAS;YACN,KAAK,MAAM,IAAI,IAAI,MAAM,CAAC,MAAM,CAAC,GAAG,CAAC,aAAa,CAAC,EAAE;gBACjD,MAAM,CAAC,IAAI,CAAC,IAAI,EAAE,GAAG,EAAE;gBACvB,CAAC,CAAC,CAAC;aACN;YAED,IAAI,KAAK,EAAE;gBACP,KAAK,CAAC,IAAI,CAAC,EAAE,cAAc,EAAE,GAAG,CAAC,UAAU,EAAE,CAAC,CAAC;gBAC/C,KAAK,CAAC,GAAG,EAAE,CAAC;aACf;SACJ;IACL,CAAC"}
|
package/dist/esm/src/logger.js
CHANGED
|
@@ -19,7 +19,7 @@ export class HttpLogger {
|
|
|
19
19
|
this.logger.log(event.request.connection.remoteAddress || '0.0.0.0', '-', event.request.method, `"${event.request.url}"`, event.response.statusCode, `"${event.request.headers.referer || ''}"`);
|
|
20
20
|
}
|
|
21
21
|
}
|
|
22
|
-
HttpLogger.__type = [() => __ΩLoggerInterface, 'logger', 'constructor', () => httpWorkflow.onResponse.event, 'event', 'onHttpRequest', 'Pn!2";"0#Pi$2%"0&
|
|
22
|
+
HttpLogger.__type = [() => __ΩLoggerInterface, 'logger', 'constructor', () => httpWorkflow.onResponse.event, 'event', 'onHttpRequest', 'HttpLogger', 'Pn!2";"0#Pi$2%"0&5w\''];
|
|
23
23
|
__decorate([
|
|
24
24
|
eventDispatcher.listen(httpWorkflow.onResponse, 101) //101 is right after 100 default listener
|
|
25
25
|
,
|
|
@@ -2,7 +2,7 @@ import { ClassType } from '@deepkit/core';
|
|
|
2
2
|
import { AppModule } from '@deepkit/app';
|
|
3
3
|
import { HttpRequest, HttpResponse } from './model.js';
|
|
4
4
|
import { InjectorModule } from '@deepkit/injector';
|
|
5
|
-
export
|
|
5
|
+
export type HttpMiddlewareFn = (req: HttpRequest, res: HttpResponse, next: (err?: any) => void) => void | Promise<void>;
|
|
6
6
|
export interface HttpMiddleware {
|
|
7
7
|
execute: HttpMiddlewareFn;
|
|
8
8
|
}
|
|
@@ -5,11 +5,11 @@ import { AppModule } from '@deepkit/app';
|
|
|
5
5
|
import { createFreeDecoratorContext } from '@deepkit/type';
|
|
6
6
|
import { HttpRequest, HttpResponse } from './model.js';
|
|
7
7
|
import { InjectorModule } from '@deepkit/injector';
|
|
8
|
-
const __ΩHttpMiddlewareFn = [() => HttpRequest, 'req', () => HttpResponse, 'res', 'err', '', 'next', 'PP7!2"P7#2$P"2%8$/&2\'P$$`J/&'];
|
|
8
|
+
const __ΩHttpMiddlewareFn = [() => HttpRequest, 'req', () => HttpResponse, 'res', 'err', '', 'next', 'PP7!2"P7#2$P"2%8$/&2\'P$$`J/&y'];
|
|
9
9
|
export { __ΩHttpMiddlewareFn as __ΩHttpMiddlewareFn };
|
|
10
|
-
const __ΩHttpMiddleware = [() => __ΩHttpMiddlewareFn, 'execute', 'Pn!4"
|
|
10
|
+
const __ΩHttpMiddleware = [() => __ΩHttpMiddlewareFn, 'execute', 'Pn!4"My'];
|
|
11
11
|
export { __ΩHttpMiddleware as __ΩHttpMiddleware };
|
|
12
|
-
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/
|
|
12
|
+
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'];
|
|
13
13
|
export { __ΩHttpMiddlewareRoute as __ΩHttpMiddlewareRoute };
|
|
14
14
|
export class HttpMiddlewareConfig {
|
|
15
15
|
constructor() {
|
|
@@ -33,7 +33,7 @@ export class HttpMiddlewareConfig {
|
|
|
33
33
|
return classTypes;
|
|
34
34
|
}
|
|
35
35
|
}
|
|
36
|
-
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', () => 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@
|
|
36
|
+
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', () => 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'];
|
|
37
37
|
export class HttpMiddlewareApi {
|
|
38
38
|
constructor() {
|
|
39
39
|
this.t = new HttpMiddlewareConfig;
|
|
@@ -85,6 +85,6 @@ export class HttpMiddlewareApi {
|
|
|
85
85
|
this.t.selfModule = true;
|
|
86
86
|
}
|
|
87
87
|
}
|
|
88
|
-
HttpMiddlewareApi.__type = ['name', () => __ΩHttpMiddlewareFn, () => __ΩClassType, () => __ΩHttpMiddleware, 'middlewares', 'for', () => __ΩHttpMiddlewareRoute, 'routes', 'forRoutes', () => __ΩHttpMiddlewareRoute, 'excludeRoutes', 'names', 'forRouteNames', 'excludeRouteNames', 'timeout', () => __ΩClassType, 'controllers', 'forControllers', () => __ΩClassType, 'excludeControllers', 'order', () => 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"
|
|
88
|
+
HttpMiddlewareApi.__type = ['name', () => __ΩHttpMiddlewareFn, () => __ΩClassType, () => __ΩHttpMiddleware, 'middlewares', 'for', () => __ΩHttpMiddlewareRoute, 'routes', 'forRoutes', () => __ΩHttpMiddlewareRoute, 'excludeRoutes', 'names', 'forRouteNames', 'excludeRouteNames', 'timeout', () => __ΩClassType, 'controllers', 'forControllers', () => __ΩClassType, 'excludeControllers', 'order', () => 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:'];
|
|
89
89
|
export const httpMiddleware = createFreeDecoratorContext(HttpMiddlewareApi);
|
|
90
90
|
//# sourceMappingURL=middleware.js.map
|
package/dist/esm/src/model.d.ts
CHANGED
|
@@ -2,7 +2,7 @@
|
|
|
2
2
|
/// <reference types="node" />
|
|
3
3
|
import { IncomingMessage, OutgoingHttpHeader, OutgoingHttpHeaders, ServerResponse } from 'http';
|
|
4
4
|
import { UploadedFile } from './router.js';
|
|
5
|
-
import { Type, ValidationErrorItem } from '@deepkit/type';
|
|
5
|
+
import { Type, ValidationErrorItem, TypeAnnotation } from '@deepkit/type';
|
|
6
6
|
export declare class HttpResponse extends ServerResponse {
|
|
7
7
|
status(code: number): void;
|
|
8
8
|
}
|
|
@@ -14,13 +14,13 @@ export declare class HttpResponse extends ServerResponse {
|
|
|
14
14
|
*/
|
|
15
15
|
export declare function readBody(request: IncomingMessage): Promise<Buffer>;
|
|
16
16
|
export declare function createRequestWithCachedBody(request: Partial<IncomingMessage>, body: Buffer): HttpRequest;
|
|
17
|
-
export
|
|
17
|
+
export type HttpRequestQuery = {
|
|
18
18
|
[name: string]: string;
|
|
19
19
|
};
|
|
20
|
-
export
|
|
20
|
+
export type HttpRequestResolvedParameters = {
|
|
21
21
|
[name: string]: any;
|
|
22
22
|
};
|
|
23
|
-
export
|
|
23
|
+
export type HttpRequestPositionedParameters = {
|
|
24
24
|
arguments: any[];
|
|
25
25
|
parameters: HttpRequestResolvedParameters;
|
|
26
26
|
};
|
|
@@ -40,32 +40,20 @@ export declare class ValidatedBody<T> {
|
|
|
40
40
|
value: T;
|
|
41
41
|
};
|
|
42
42
|
}
|
|
43
|
-
export
|
|
44
|
-
|
|
45
|
-
|
|
46
|
-
export declare type HttpBodyValidation<T> = ValidatedBody<T> & {
|
|
47
|
-
__meta?: ['httpBodyValidation'];
|
|
48
|
-
};
|
|
49
|
-
export declare type HttpPath<T, Options extends {
|
|
43
|
+
export type HttpBody<T> = T & TypeAnnotation<'httpBody'>;
|
|
44
|
+
export type HttpBodyValidation<T> = ValidatedBody<T> & TypeAnnotation<'httpBodyValidation'>;
|
|
45
|
+
export type HttpPath<T, Options extends {
|
|
50
46
|
name?: string;
|
|
51
|
-
} = {}> = T &
|
|
52
|
-
|
|
53
|
-
};
|
|
54
|
-
export declare type HttpHeader<T, Options extends {
|
|
47
|
+
} = {}> = T & TypeAnnotation<'httpPath', Options>;
|
|
48
|
+
export type HttpHeader<T, Options extends {
|
|
55
49
|
name?: string;
|
|
56
|
-
} = {}> = T &
|
|
57
|
-
|
|
58
|
-
};
|
|
59
|
-
export declare type HttpQuery<T, Options extends {
|
|
50
|
+
} = {}> = T & TypeAnnotation<'httpHeader'>;
|
|
51
|
+
export type HttpQuery<T, Options extends {
|
|
60
52
|
name?: string;
|
|
61
|
-
} = {}> = T &
|
|
62
|
-
|
|
63
|
-
};
|
|
64
|
-
export declare type HttpQueries<T, Options extends {
|
|
53
|
+
} = {}> = T & TypeAnnotation<'httpQuery', Options>;
|
|
54
|
+
export type HttpQueries<T, Options extends {
|
|
65
55
|
name?: string;
|
|
66
|
-
} = {}> = T &
|
|
67
|
-
__meta?: ['httpQueries', Options];
|
|
68
|
-
};
|
|
56
|
+
} = {}> = T & TypeAnnotation<'httpQueries', Options>;
|
|
69
57
|
/**
|
|
70
58
|
* For all parameters used in the URL path, a regular expression of /[^/]+/ is used. To change that, use getRegExp.
|
|
71
59
|
*
|
|
@@ -80,8 +68,8 @@ export declare type HttpQueries<T, Options extends {
|
|
|
80
68
|
* }
|
|
81
69
|
* ```
|
|
82
70
|
*/
|
|
83
|
-
export
|
|
84
|
-
__meta?: ['httpRegExp', Pattern];
|
|
71
|
+
export type HttpRegExp<T, Pattern extends string | RegExp> = T & {
|
|
72
|
+
__meta?: never & ['httpRegExp', Pattern];
|
|
85
73
|
};
|
|
86
74
|
export declare function getRegExp(type: Type): string | RegExp | undefined;
|
|
87
75
|
export declare class RequestBuilder {
|
package/dist/esm/src/model.js
CHANGED
|
@@ -1,11 +1,13 @@
|
|
|
1
|
+
const __ΩError = ['name', 'message', 'stack', 'P&4!&4"&4#8My'];
|
|
2
|
+
const __ΩPartial = ['T', 'l+e#!e"!fRb!Pde"!gN#"y'];
|
|
3
|
+
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'];
|
|
4
|
+
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'];
|
|
5
|
+
/*@ts-ignore*/
|
|
6
|
+
import { __ΩTypeAnnotation as __ΩTypeAnnotation } from '@deepkit/type';
|
|
1
7
|
function __assignType(fn, args) {
|
|
2
8
|
fn.__type = args;
|
|
3
9
|
return fn;
|
|
4
10
|
}
|
|
5
|
-
const __ΩConcatArray = ['T', 'length', 'separator', 'join', 'start', 'end', 'slice', 'b!P\'4"9\'e"!LP&2#8&1$P\'2%8\'2&8e#!F1\'M'];
|
|
6
|
-
const __ΩError = ['name', 'message', 'stack', 'P&4!&4"&4#8M'];
|
|
7
|
-
const __ΩPartial = ['T', 'l+e#!e"!fRb!Pde"!gN#"'];
|
|
8
|
-
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"!LM'];
|
|
9
11
|
/*
|
|
10
12
|
* Deepkit Framework
|
|
11
13
|
* Copyright (C) 2021 Deepkit UG, Marc J. Schmidt
|
|
@@ -27,7 +29,7 @@ export class HttpResponse extends ServerResponse {
|
|
|
27
29
|
this.end();
|
|
28
30
|
}
|
|
29
31
|
}
|
|
30
|
-
HttpResponse.__type = [() => ServerResponse, 'code', 'status', 'P7!P\'2""0#
|
|
32
|
+
HttpResponse.__type = [() => ServerResponse, 'code', 'status', 'HttpResponse', 'P7!P\'2""0#5w$'];
|
|
31
33
|
/**
|
|
32
34
|
* Reads the body of the request and returns it as a Buffer.
|
|
33
35
|
* The result will be cached in the request object as `request.body`.
|
|
@@ -88,11 +90,11 @@ export function createRequestWithCachedBody(request, body) {
|
|
|
88
90
|
_a)(writable);
|
|
89
91
|
}
|
|
90
92
|
createRequestWithCachedBody.__type = [() => __ΩPartial, 'request', 'body', () => HttpRequest, 'createRequestWithCachedBody', 'P!o!"2"!2#P7$/%'];
|
|
91
|
-
const __ΩHttpRequestQuery = ['P&&
|
|
93
|
+
const __ΩHttpRequestQuery = ['P&&LMy'];
|
|
92
94
|
export { __ΩHttpRequestQuery as __ΩHttpRequestQuery };
|
|
93
|
-
const __ΩHttpRequestResolvedParameters = ['P&"
|
|
95
|
+
const __ΩHttpRequestResolvedParameters = ['P&"LMy'];
|
|
94
96
|
export { __ΩHttpRequestResolvedParameters as __ΩHttpRequestResolvedParameters };
|
|
95
|
-
const __ΩHttpRequestPositionedParameters = ['arguments', () => __ΩHttpRequestResolvedParameters, 'parameters', 'P"F4!n"4#
|
|
97
|
+
const __ΩHttpRequestPositionedParameters = ['arguments', () => __ΩHttpRequestResolvedParameters, 'parameters', 'P"F4!n"4#My'];
|
|
96
98
|
export { __ΩHttpRequestPositionedParameters as __ΩHttpRequestPositionedParameters };
|
|
97
99
|
export class BodyValidationError {
|
|
98
100
|
constructor(errors = []) {
|
|
@@ -110,10 +112,10 @@ export class BodyValidationError {
|
|
|
110
112
|
return this.errors.filter(__assignType(v => v.path === path, ['v', '', 'P"2!"/"']));
|
|
111
113
|
}
|
|
112
114
|
getErrorMessageForPath(path) {
|
|
113
|
-
return this.getErrorsForPath(path).map(__assignType(v => v.
|
|
115
|
+
return this.getErrorsForPath(path).map(__assignType(v => v.toString(), ['v', '', 'P"2!"/"'])).join(', ');
|
|
114
116
|
}
|
|
115
117
|
}
|
|
116
|
-
BodyValidationError.__type = [() => ValidationErrorItem, 'errors', () => [], 'constructor', 'prefix', 'hasErrors', () => ValidationErrorItem, 'getErrors', 'path', () => ValidationErrorItem, 'getErrorsForPath', 'getErrorMessageForPath', 'PP7!F2":9>#"0$P&2%8)0&P&2%8P7\'F0(P&2)P7*F0+P&2)&0,
|
|
118
|
+
BodyValidationError.__type = [() => ValidationErrorItem, 'errors', () => [], 'constructor', 'prefix', 'hasErrors', () => ValidationErrorItem, 'getErrors', 'path', () => ValidationErrorItem, 'getErrorsForPath', 'getErrorMessageForPath', 'BodyValidationError', 'PP7!F2":9>#"0$P&2%8)0&P&2%8P7\'F0(P&2)P7*F0+P&2)&0,5w-'];
|
|
117
119
|
export class ValidatedBody {
|
|
118
120
|
constructor(error, value) {
|
|
119
121
|
this.error = error;
|
|
@@ -123,20 +125,20 @@ export class ValidatedBody {
|
|
|
123
125
|
return this.value !== undefined;
|
|
124
126
|
}
|
|
125
127
|
}
|
|
126
|
-
ValidatedBody.__type = ['T', () => BodyValidationError, 'error', 'value', 'constructor', 'valid', 'b!PP7"2#:e"!2$8:"0%P!0&
|
|
127
|
-
const __ΩHttpBody = ['T', "httpBody", '
|
|
128
|
+
ValidatedBody.__type = ['T', () => BodyValidationError, 'error', 'value', 'constructor', 'valid', 'ValidatedBody', 'b!PP7"2#:e"!2$8:"0%P!0&5w\''];
|
|
129
|
+
const __ΩHttpBody = ['T', () => __ΩTypeAnnotation, "httpBody", 'b!Pe"!.#o""Ky'];
|
|
128
130
|
export { __ΩHttpBody as __ΩHttpBody };
|
|
129
|
-
const __ΩHttpBodyValidation = ['T', () => ValidatedBody, "httpBodyValidation", '
|
|
131
|
+
const __ΩHttpBodyValidation = ['T', () => ValidatedBody, () => __ΩTypeAnnotation, "httpBodyValidation", 'b!PPe#!7".$o#"Ky'];
|
|
130
132
|
export { __ΩHttpBodyValidation as __ΩHttpBodyValidation };
|
|
131
|
-
const __ΩHttpPath = ['T', 'Options', "httpPath", '
|
|
133
|
+
const __ΩHttpPath = ['T', 'Options', () => __ΩTypeAnnotation, "httpPath", 'b!PMc"Pe"!.$e""o##Ky'];
|
|
132
134
|
export { __ΩHttpPath as __ΩHttpPath };
|
|
133
|
-
const __ΩHttpHeader = ['T', 'Options', "httpHeader", '
|
|
135
|
+
const __ΩHttpHeader = ['T', 'Options', () => __ΩTypeAnnotation, "httpHeader", 'b!PMc"Pe"!.$o#"Ky'];
|
|
134
136
|
export { __ΩHttpHeader as __ΩHttpHeader };
|
|
135
|
-
const __ΩHttpQuery = ['T', 'Options', "httpQuery", '
|
|
137
|
+
const __ΩHttpQuery = ['T', 'Options', () => __ΩTypeAnnotation, "httpQuery", 'b!PMc"Pe"!.$e""o##Ky'];
|
|
136
138
|
export { __ΩHttpQuery as __ΩHttpQuery };
|
|
137
|
-
const __ΩHttpQueries = ['T', 'Options', "httpQueries", '
|
|
139
|
+
const __ΩHttpQueries = ['T', 'Options', () => __ΩTypeAnnotation, "httpQueries", 'b!PMc"Pe"!.$e""o##Ky'];
|
|
138
140
|
export { __ΩHttpQueries as __ΩHttpQueries };
|
|
139
|
-
const __ΩHttpRegExp = ['T', 'Pattern', "httpRegExp", '__meta', 'b!b"Pe"!PP.#e
|
|
141
|
+
const __ΩHttpRegExp = ['T', 'Pattern', "httpRegExp", '__meta', 'b!b"Pe"!PP!P.#e%"GK4$8MKy'];
|
|
140
142
|
export { __ΩHttpRegExp as __ΩHttpRegExp };
|
|
141
143
|
export function getRegExp(type) {
|
|
142
144
|
const options = metaAnnotation.getForName(type, 'httpRegExp');
|
|
@@ -225,7 +227,7 @@ Content-Type: application/json\r
|
|
|
225
227
|
return this;
|
|
226
228
|
}
|
|
227
229
|
}
|
|
228
|
-
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!
|
|
230
|
+
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'];
|
|
229
231
|
export class HttpRequest extends IncomingMessage {
|
|
230
232
|
constructor() {
|
|
231
233
|
super(...arguments);
|
|
@@ -277,7 +279,7 @@ export class HttpRequest extends IncomingMessage {
|
|
|
277
279
|
return this.socket.remoteAddress || '';
|
|
278
280
|
}
|
|
279
281
|
}
|
|
280
|
-
HttpRequest.__type = [() => IncomingMessage, 'store', function () { return {}; }, () => 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=
|
|
282
|
+
HttpRequest.__type = [() => IncomingMessage, 'store', function () { return {}; }, () => 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>'];
|
|
281
283
|
export class MemoryHttpResponse extends HttpResponse {
|
|
282
284
|
constructor() {
|
|
283
285
|
super(...arguments);
|
|
@@ -359,5 +361,5 @@ export class MemoryHttpResponse extends HttpResponse {
|
|
|
359
361
|
return this;
|
|
360
362
|
}
|
|
361
363
|
}
|
|
362
|
-
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"
|
|
364
|
+
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'];
|
|
363
365
|
//# sourceMappingURL=model.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"model.js","sourceRoot":"","sources":["../../../src/model.ts"],"names":[],"mappings":";;;;;;;;
|
|
1
|
+
{"version":3,"file":"model.js","sourceRoot":"","sources":["../../../src/model.ts"],"names":[],"mappings":";;;;;uDAc0F,eAAe;;;;;AAdzG;;;;;;;;GAQG;AAEH,OAAO,EAAE,eAAe,EAA2C,cAAc,EAAE,MAAM,MAAM,CAAC;AAChG,OAAO,EAAE,YAAY,EAAE,MAAM,aAAa,CAAC;AAC3C,OAAO,KAAK,WAAW,MAAM,aAAa,CAAC;AAC3C,OAAO,EAAE,QAAQ,EAAE,MAAM,QAAQ,CAAC;AAClC,OAAO,EAAE,cAAc,EAAE,cAAc,EAAQ,mBAAmB,EAAkB,MAAM,eAAe,CAAC;AAC1G,OAAO,EAAE,cAAc,EAAE,OAAO,EAAE,MAAM,eAAe,CAAC;AAExD,MAAM,OAAO,YAAa,SAAQ,cAAc;IAC5C,MAAM,CAAC,IAAY;QACf,IAAI,CAAC,SAAS,CAAC,IAAI,CAAC,CAAC;QACrB,IAAI,CAAC,GAAG,EAAE,CAAC;IACf,CAAC;;;AAGL;;;;;GAKG;AACH,MAAM,UAAU,QAAQ,CAAC,OAAwB;IAC7C,OAAO,cAAc,cAAC,CAA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AC;IAChB,CAAC;IAED,GAAG,CAAC,KAAU,EAAE,QAAc,EAAE,QAAc;QAC1C,IAAI,OAAO,KAAK,KAAK,UAAU,EAAE;YAC7B,QAAQ,GAAG,KAAK,CAAC;YACjB,KAAK,GAAG,IAAI,CAAC;YACb,QAAQ,GAAG,IAAI,CAAC;SACnB;aAAM,IAAI,OAAO,QAAQ,KAAK,UAAU,EAAE;YACvC,QAAQ,GAAG,QAAQ,CAAC;YACpB,QAAQ,GAAG,IAAI,CAAC;SACnB;QAED,IAAI,KAAK,EAAE;YACP,IAAI,QAAQ,KAAK,OAAO,KAAK,EAAE;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;;8EAxFqB,MAAM,CAAC,KAAK,CAAC,CAAC,CAAC,qCACwC,MAAM,CAAC,MAAM,CAAC,IAAI,CAAC"}
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
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.
|
|
1
|
+
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'];
|
|
2
2
|
export { __ΩHttpParserOptions as __ΩHttpParserOptions };
|
|
3
3
|
export class HttpConfig {
|
|
4
4
|
constructor() {
|
|
@@ -6,5 +6,5 @@ export class HttpConfig {
|
|
|
6
6
|
this.parser = {};
|
|
7
7
|
}
|
|
8
8
|
}
|
|
9
|
-
HttpConfig.__type = ['debug', function () { return false; }, () => __ΩHttpParserOptions, 'parser', function () { return {}; }, ')3!>"n#3$>%
|
|
9
|
+
HttpConfig.__type = ['debug', function () { return false; }, () => __ΩHttpParserOptions, 'parser', function () { return {}; }, 'HttpConfig', ')3!>"n#3$>%5w&'];
|
|
10
10
|
//# sourceMappingURL=module.config.js.map
|
package/dist/esm/src/module.js
CHANGED
|
@@ -116,5 +116,5 @@ export class HttpModule extends createModule({
|
|
|
116
116
|
this.httpControllers.add(controller, module);
|
|
117
117
|
}
|
|
118
118
|
}
|
|
119
|
-
HttpModule.__type = [() => createModule({ config: HttpConfig, providers: [HttpRouter, HttpKernel, HttpResultFormatter, HttpRouterRegistry, HttpRouterFilterResolver, { provide: HttpResponse, scope: "http" }, { provide: HttpRequest, scope: "http" }, { provide: RouteConfig, useValue: undefined, scope: "http" }, { provide: Logger, useValue: new Logger([new ConsoleTransport()]) }], listeners: [HttpListener], workflows: [httpWorkflow], exports: [HttpRouter, HttpRouterRegistry, HttpKernel, HttpResultFormatter, HttpRouterFilterResolver, HttpResponse, HttpRequest, HttpControllers, RouteConfig, Logger] }), 'process', () => EventToken, 'patchEventsForHttpRequestAccess', function () { return [httpWorkflow.onRequest, httpWorkflow.onAuth, httpWorkflow.onController]; }, () => AppModule, 'module', 'listener', 'processListener', () => AppModule, () => __ΩControllerConfig, 'config', 'processController', 'P7!P"0"P"7#F3$<>%PP"7&2\'"2("0)PP"7*2\'n+2,"0-
|
|
119
|
+
HttpModule.__type = [() => createModule({ config: HttpConfig, providers: [HttpRouter, HttpKernel, HttpResultFormatter, HttpRouterRegistry, HttpRouterFilterResolver, { provide: HttpResponse, scope: "http" }, { provide: HttpRequest, scope: "http" }, { provide: RouteConfig, useValue: undefined, scope: "http" }, { provide: Logger, useValue: new Logger([new ConsoleTransport()]) }], listeners: [HttpListener], workflows: [httpWorkflow], exports: [HttpRouter, HttpRouterRegistry, HttpKernel, HttpResultFormatter, HttpRouterFilterResolver, HttpResponse, HttpRequest, HttpControllers, RouteConfig, Logger] }), 'process', () => EventToken, 'patchEventsForHttpRequestAccess', function () { return [httpWorkflow.onRequest, httpWorkflow.onAuth, httpWorkflow.onController]; }, () => AppModule, 'module', 'listener', 'processListener', () => AppModule, () => __ΩControllerConfig, 'config', 'processController', 'HttpModule', 'P7!P"0"P"7#F3$<>%PP"7&2\'"2("0)PP"7*2\'n+2,"0-5w.'];
|
|
120
120
|
//# sourceMappingURL=module.js.map
|
|
@@ -107,7 +107,7 @@ export class ParameterForRequestParser {
|
|
|
107
107
|
return metaAnnotation.getForName(this.parameter.type, 'httpPath') !== undefined || this.regexPosition !== undefined;
|
|
108
108
|
}
|
|
109
109
|
}
|
|
110
|
-
ParameterForRequestParser.__type = ['regexPosition', () => ReflectionParameter, 'parameter', 'constructor', 'getType', 'getName', 'isPartOfPath', '\'3!8PP7"2#:"0$!!P"0%!!!!P"0&P)0\'
|
|
110
|
+
ParameterForRequestParser.__type = ['regexPosition', () => ReflectionParameter, 'parameter', 'constructor', 'getType', 'getName', 'isPartOfPath', 'ParameterForRequestParser', '\'3!8PP7"2#:"0$!!P"0%!!!!P"0&P)0\'5w('];
|
|
111
111
|
export function parseRoutePathToRegex(path, params) {
|
|
112
112
|
const parameterNames = {};
|
|
113
113
|
let argumentIndex = 0;
|
package/dist/esm/src/router.d.ts
CHANGED
|
@@ -9,7 +9,7 @@ import { MiddlewareRegistry } from '@deepkit/app';
|
|
|
9
9
|
import { HttpMiddlewareConfig, HttpMiddlewareFn } from './middleware.js';
|
|
10
10
|
import { ParameterForRequestParser } from './request-parser.js';
|
|
11
11
|
import { HttpConfig } from './module.config.js';
|
|
12
|
-
export
|
|
12
|
+
export type RouteParameterResolverForInjector = ((injector: InjectorContext) => HttpRequestPositionedParameters | Promise<HttpRequestPositionedParameters>);
|
|
13
13
|
interface ResolvedController {
|
|
14
14
|
parameters: RouteParameterResolverForInjector;
|
|
15
15
|
routeConfig: RouteConfig;
|
package/dist/esm/src/router.js
CHANGED
|
@@ -4,6 +4,8 @@ var __decorate = (this && this.__decorate) || function (decorators, target, key,
|
|
|
4
4
|
else for (var i = decorators.length - 1; i >= 0; i--) if (d = decorators[i]) r = (c < 3 ? d(r) : c > 3 ? d(target, key, r) : d(target, key)) || r;
|
|
5
5
|
return c > 3 && r && Object.defineProperty(target, key, r), r;
|
|
6
6
|
};
|
|
7
|
+
const __ΩPartial = ['T', 'l+e#!e"!fRb!Pde"!gN#"y'];
|
|
8
|
+
const __ΩRecord = ['K', 'T', 'l\'e#"Rb!b"Pde"!N#!y'];
|
|
7
9
|
/*@ts-ignore*/
|
|
8
10
|
import { __ΩSerializationOptions as __ΩSerializationOptions } from '@deepkit/type';
|
|
9
11
|
/*@ts-ignore*/
|
|
@@ -26,8 +28,6 @@ function __assignType(fn, args) {
|
|
|
26
28
|
fn.__type = args;
|
|
27
29
|
return fn;
|
|
28
30
|
}
|
|
29
|
-
const __ΩPartial = ['T', 'l+e#!e"!fRb!Pde"!gN#"'];
|
|
30
|
-
const __ΩRecord = ['K', 'T', 'l\'e#"Rb!b"Pde"!N#!'];
|
|
31
31
|
/*
|
|
32
32
|
* Deepkit Framework
|
|
33
33
|
* Copyright (C) 2021 Deepkit UG, Marc J. Schmidt
|
|
@@ -39,7 +39,7 @@ const __ΩRecord = ['K', 'T', 'l\'e#"Rb!b"Pde"!N#!'];
|
|
|
39
39
|
*/
|
|
40
40
|
import { CompilerContext, getClassName, isArray, isClass, urlJoin } from '@deepkit/core';
|
|
41
41
|
import { entity, ReflectionClass, ReflectionFunction, ReflectionKind, ReflectionParameter, serializer, Serializer, ValidationError } from '@deepkit/type';
|
|
42
|
-
import { HttpAction, httpClass, HttpController } from './decorator.js';
|
|
42
|
+
import { getActions, HttpAction, httpClass, HttpController } from './decorator.js';
|
|
43
43
|
import { HttpRequest } from './model.js';
|
|
44
44
|
import { InjectorContext, InjectorModule } from '@deepkit/injector';
|
|
45
45
|
import { Logger } from '@deepkit/logger';
|
|
@@ -51,13 +51,13 @@ import qs from 'qs';
|
|
|
51
51
|
import { HtmlResponse, JSONResponse, Response } from './http.js';
|
|
52
52
|
import { getRequestParserCodeForParameters, ParameterForRequestParser, parseRoutePathToRegex } from './request-parser.js';
|
|
53
53
|
import { HttpConfig } from './module.config.js';
|
|
54
|
-
const __ΩRouteParameterResolverForInjector = [() => InjectorContext, 'injector', () => __ΩHttpRequestPositionedParameters, () => __ΩHttpRequestPositionedParameters, '', 'PP7!2"Pn#n$`J/%'];
|
|
54
|
+
const __ΩRouteParameterResolverForInjector = [() => InjectorContext, 'injector', () => __ΩHttpRequestPositionedParameters, () => __ΩHttpRequestPositionedParameters, '', 'PP7!2"Pn#n$`J/%y'];
|
|
55
55
|
export { __ΩRouteParameterResolverForInjector as __ΩRouteParameterResolverForInjector };
|
|
56
|
-
const __ΩResolvedController = [() => __ΩRouteParameterResolverForInjector, 'parameters', () => RouteConfig, 'routeConfig', () => UploadedFile, 'uploadedFiles', () => InjectorContext, 'injector', () => __ΩHttpMiddlewareFn, 'fn', 'timeout', '', 'middlewares', 'Pn!4"P7#4$P&P7%LM4&PP7\'2(Pn)4*\'4+8MF/,4-
|
|
56
|
+
const __ΩResolvedController = [() => __ΩRouteParameterResolverForInjector, 'parameters', () => RouteConfig, 'routeConfig', () => UploadedFile, 'uploadedFiles', () => InjectorContext, 'injector', () => __ΩHttpMiddlewareFn, 'fn', 'timeout', '', 'middlewares', 'Pn!4"P7#4$P&P7%LM4&PP7\'2(Pn)4*\'4+8MF/,4-8My'];
|
|
57
57
|
export const UploadedFileSymbol = Symbol('UploadedFile');
|
|
58
58
|
let UploadedFile = class UploadedFile {
|
|
59
59
|
};
|
|
60
|
-
UploadedFile.__type = [() => UploadedFileSymbol, 'validator', 'size', 'path', 'name', 'type', 'lastModifiedDate', 'Pi!,J3"\'3#&3$P&,J3%P&,J3&PT,J3\'
|
|
60
|
+
UploadedFile.__type = [() => UploadedFileSymbol, 'validator', 'size', 'path', 'name', 'type', 'lastModifiedDate', 'UploadedFile', 'Pi!,J3"\'3#&3$P&,J3%P&,J3&PT,J3\'5w('];
|
|
61
61
|
UploadedFile = __decorate([
|
|
62
62
|
entity.name('@deepkit/UploadedFile')
|
|
63
63
|
], UploadedFile);
|
|
@@ -66,9 +66,9 @@ serializer.typeGuards.getRegistry(1).registerClass(UploadedFile, __assignType((t
|
|
|
66
66
|
state.setContext({ UploadedFileSymbol });
|
|
67
67
|
state.addSetterAndReportErrorIfInvalid('uploadSecurity', 'Not an uploaded file', `typeof ${state.accessor} === 'object' && ${state.accessor} !== null && ${state.accessor}.validator === UploadedFileSymbol`);
|
|
68
68
|
}, ['type', 'state', '', 'P"2!"2""/#']));
|
|
69
|
-
const __ΩRouteFunctionControllerAction = ["function", 'type', () => InjectorModule, 'module', 'args', '', 'fn', 'P.!4"P"7#4$8P"@2%"/&4\'
|
|
69
|
+
const __ΩRouteFunctionControllerAction = ["function", 'type', () => InjectorModule, 'module', 'args', '', 'fn', 'P.!4"P"7#4$8P"@2%"/&4\'My'];
|
|
70
70
|
export { __ΩRouteFunctionControllerAction as __ΩRouteFunctionControllerAction };
|
|
71
|
-
const __ΩRouteClassControllerAction = ["controller", 'type', () => InjectorModule, 'module', () => __ΩClassType, 'controller', 'methodName', 'P.!4"P"7#4$8n%4&&4\'
|
|
71
|
+
const __ΩRouteClassControllerAction = ["controller", 'type', () => InjectorModule, 'module', () => __ΩClassType, 'controller', 'methodName', 'P.!4"P"7#4$8n%4&&4\'My'];
|
|
72
72
|
export { __ΩRouteClassControllerAction as __ΩRouteClassControllerAction };
|
|
73
73
|
export class RouteConfig {
|
|
74
74
|
constructor(name, httpMethods, path, action, internal = false) {
|
|
@@ -111,7 +111,7 @@ export class RouteConfig {
|
|
|
111
111
|
return path;
|
|
112
112
|
}
|
|
113
113
|
}
|
|
114
|
-
RouteConfig.__type = ['baseUrl', function () { return ''; }, 'statusCode', 'description', 'type', 'responses', function () { return []; }, function () { return ''; }, 'groups', function () { return []; }, 'category', function () { return ''; }, 'returnType', () => __ΩSerializationOptions, 'serializationOptions', () => Serializer, 'serializer', () => InjectorModule, 'module', () => __ΩClassType, 'resolverForToken', function () { return new Map(); }, () => HttpMiddlewareConfig, 'config', () => InjectorModule, 'middlewares', function () { return []; }, () => __ΩClassType, 'resolverForParameterName', function () { return new Map(); }, 'name', 'httpMethods', 'path', () => __ΩRouteClassControllerAction, () => __ΩRouteFunctionControllerAction, 'action', 'internal', () => false, 'constructor', () => 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&
|
|
114
|
+
RouteConfig.__type = ['baseUrl', function () { return ''; }, 'statusCode', 'description', 'type', 'responses', function () { return []; }, function () { return ''; }, 'groups', function () { return []; }, 'category', function () { return ''; }, 'returnType', () => __ΩSerializationOptions, 'serializationOptions', () => Serializer, 'serializer', () => InjectorModule, 'module', () => __ΩClassType, 'resolverForToken', function () { return new Map(); }, () => HttpMiddlewareConfig, 'config', () => InjectorModule, 'middlewares', function () { return []; }, () => __ΩClassType, 'resolverForParameterName', function () { return new Map(); }, 'name', 'httpMethods', 'path', () => __ΩRouteClassControllerAction, () => __ΩRouteFunctionControllerAction, 'action', 'internal', () => false, 'constructor', () => 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'];
|
|
115
115
|
class ParsedRoute {
|
|
116
116
|
constructor(routeConfig) {
|
|
117
117
|
this.routeConfig = routeConfig;
|
|
@@ -134,7 +134,7 @@ class ParsedRoute {
|
|
|
134
134
|
throw new Error(`No route parameter with name ${name} defined.`);
|
|
135
135
|
}
|
|
136
136
|
}
|
|
137
|
-
ParsedRoute.__type = ['regex', 'pathParameterNames', function () { return {}; }, () => ParameterForRequestParser, 'parameters', function () { return []; }, () => RouteConfig, 'routeConfig', 'constructor', () => ReflectionParameter, 'property', () => ParameterForRequestParser, 'addParameter', () => ParameterForRequestParser, 'getParameters', 'name', () => ParameterForRequestParser, 'getParameter', '&3!8P&\'LM3">#P7$F3%<>&PP7\'2(:"0)PP7*2+P7,0-PP7.F0/P&
|
|
137
|
+
ParsedRoute.__type = ['regex', 'pathParameterNames', function () { return {}; }, () => ParameterForRequestParser, 'parameters', function () { return []; }, () => RouteConfig, 'routeConfig', 'constructor', () => ReflectionParameter, 'property', () => ParameterForRequestParser, 'addParameter', () => ParameterForRequestParser, 'getParameters', 'name', () => ParameterForRequestParser, 'getParameter', 'ParsedRoute', '&3!8P&\'LM3">#P7$F3%<>&PP7\'2(:"0)PP7*2+P7,0-PP7.F0/P&20P71025w3'];
|
|
138
138
|
export function parseRouteControllerAction(routeConfig) {
|
|
139
139
|
const parsedRoute = new ParsedRoute(routeConfig);
|
|
140
140
|
const parameters = routeConfig.getReflectionFunction().getParameters();
|
|
@@ -154,9 +154,9 @@ export function dotToUrlPath(dotPath) {
|
|
|
154
154
|
return dotPath.replace(/\./g, '][').replace('][', '[') + ']';
|
|
155
155
|
}
|
|
156
156
|
dotToUrlPath.__type = ['dotPath', 'dotToUrlPath', 'P&2!&/"'];
|
|
157
|
-
const __ΩRouteParameterResolver = [() => __ΩRouteParameterResolverContext, 'context', 'resolve', 'PPn!2"P""`J1#
|
|
157
|
+
const __ΩRouteParameterResolver = [() => __ΩRouteParameterResolverContext, 'context', 'resolve', 'PPn!2"P""`J1#My'];
|
|
158
158
|
export { __ΩRouteParameterResolver as __ΩRouteParameterResolver };
|
|
159
|
-
const __ΩRouteParameterResolverContext = [() => __ΩClassType, 'token', () => RouteConfig, 'route', () => HttpRequest, 'request', 'name', 'value', () => __ΩHttpRequestQuery, 'query', () => __ΩHttpRequestResolvedParameters, 'parameters', () => ReflectionParameter, 'type', 'PPn!&+"J4"P7#4$P7%4&"4\'"4(n)4*n+4,P7-4.
|
|
159
|
+
const __ΩRouteParameterResolverContext = [() => __ΩClassType, 'token', () => RouteConfig, 'route', () => HttpRequest, 'request', 'name', 'value', () => __ΩHttpRequestQuery, 'query', () => __ΩHttpRequestResolvedParameters, 'parameters', () => ReflectionParameter, 'type', 'PPn!&+"J4"P7#4$P7%4&"4\'"4(n)4*n+4,P7-4.My'];
|
|
160
160
|
export { __ΩRouteParameterResolverContext as __ΩRouteParameterResolverContext };
|
|
161
161
|
function filterMiddlewaresForRoute(middlewareRawConfigs, routeConfig, fullPath) {
|
|
162
162
|
const middlewares = middlewareRawConfigs.slice(0);
|
|
@@ -237,7 +237,7 @@ function filterMiddlewaresForRoute(middlewareRawConfigs, routeConfig, fullPath)
|
|
|
237
237
|
return middlewareConfigs;
|
|
238
238
|
}
|
|
239
239
|
filterMiddlewaresForRoute.__type = [() => __ΩMiddlewareRegistryEntry, 'middlewareRawConfigs', () => RouteConfig, 'routeConfig', 'fullPath', () => HttpMiddlewareConfig, 'config', () => InjectorModule, 'module', 'filterMiddlewaresForRoute', 'Pn!F2"P7#2$&2%PP7&4\'P"7(4)MF/*'];
|
|
240
|
-
const __ΩHttpRouterFunctionOptions = ['path', 'name', 'methods', 'description', 'category', 'groups', () => __ΩRecord, 'data', 'baseUrl', () => HttpMiddlewareConfig, '', 'middlewares', () => 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$"
|
|
240
|
+
const __ΩHttpRouterFunctionOptions = ['path', 'name', 'methods', 'description', 'category', 'groups', () => __ΩRecord, 'data', 'baseUrl', () => HttpMiddlewareConfig, '', 'middlewares', () => 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'];
|
|
241
241
|
export { __ΩHttpRouterFunctionOptions as __ΩHttpRouterFunctionOptions };
|
|
242
242
|
function convertOptions(methods, pathOrOptions, defaultOptions) {
|
|
243
243
|
const options = 'string' === typeof pathOrOptions ? { path: pathOrOptions } : pathOrOptions;
|
|
@@ -371,7 +371,7 @@ export class HttpRouterRegistryFunctionRegistrar {
|
|
|
371
371
|
this.addRoute(routeConfig);
|
|
372
372
|
}
|
|
373
373
|
}
|
|
374
|
-
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, () => 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;
|
|
374
|
+
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, () => 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'];
|
|
375
375
|
function createRouteConfigFromHttpAction(routeAction, action, module, controller) {
|
|
376
376
|
const routeConfig = new RouteConfig(action.name, action.httpMethods, action.path, routeAction);
|
|
377
377
|
routeConfig.responses = action.responses;
|
|
@@ -416,7 +416,7 @@ export class HttpRouterRegistry extends HttpRouterRegistryFunctionRegistrar {
|
|
|
416
416
|
if (!controllerData)
|
|
417
417
|
throw new Error(`Http controller class ${getClassName(controller)} has no @http.controller decorator.`);
|
|
418
418
|
const schema = ReflectionClass.from(controller);
|
|
419
|
-
for (const action of
|
|
419
|
+
for (const action of getActions(controller)) {
|
|
420
420
|
const routeAction = {
|
|
421
421
|
type: 'controller',
|
|
422
422
|
controller,
|
|
@@ -435,7 +435,7 @@ export class HttpRouterRegistry extends HttpRouterRegistryFunctionRegistrar {
|
|
|
435
435
|
this.buildId++;
|
|
436
436
|
}
|
|
437
437
|
}
|
|
438
|
-
HttpRouterRegistry.__type = [() => HttpRouterRegistryFunctionRegistrar, () => RouteConfig, 'routes', function () { return []; }, 'buildId', function () { return 1; }, 'getBuildId', () => RouteConfig, 'getRoutes', () => __ΩClassType, 'controller', () => InjectorModule, 'module', 'addRouteForController', () => RouteConfig, 'routeConfig', 'addRoute', 'P7!P7"F3#<>$\'3%;>&P\'0\'PP7(F0)Pn*2+P"7,2-"0.PP7/20"
|
|
438
|
+
HttpRouterRegistry.__type = [() => HttpRouterRegistryFunctionRegistrar, () => RouteConfig, 'routes', function () { return []; }, 'buildId', function () { return 1; }, 'getBuildId', () => RouteConfig, 'getRoutes', () => __ΩClassType, 'controller', () => InjectorModule, 'module', 'addRouteForController', () => RouteConfig, 'routeConfig', 'addRoute', 'HttpRouterRegistry', 'P7!P7"F3#<>$\'3%;>&P\'0\'PP7(F0)Pn*2+P"7,2-"0.PP7/20"015w2'];
|
|
439
439
|
export class HttpRouter {
|
|
440
440
|
constructor(controllers, logger, config, middlewareRegistry = new MiddlewareRegistry, registry = new HttpRouterRegistry) {
|
|
441
441
|
this.logger = logger;
|
|
@@ -601,5 +601,5 @@ export class HttpRouter {
|
|
|
601
601
|
return this.resolveRequest({ url, method });
|
|
602
602
|
}
|
|
603
603
|
}
|
|
604
|
-
HttpRouter.__type = [() => HttpRequest, 'request', () => __ΩResolvedController, '', 'fn', 'buildId', function () { return 0; }, 'name', 'parameters', 'resolveFn', () => HttpControllers, 'controllers', () => __ΩLoggerInterface, 'logger', () => HttpConfig, 'config', () => MiddlewareRegistry, 'middlewareRegistry', () => new MiddlewareRegistry, () => HttpRouterRegistry, 'registry', () => new HttpRouterRegistry, 'constructor', () => RouteConfig, 'getRoutes', () => __ΩClassType, () => InjectorModule, 'module', () => __ΩClassType, 'controller', () => MiddlewareRegistry, () => new MiddlewareRegistry(), () => InjectorModule, () => new InjectorModule(), () => HttpConfig, () => new HttpConfig(), () => HttpRouter, 'forControllers', () => CompilerContext, 'compiler', () => RouteConfig, 'routeConfig', 'getRouteCode', () => CompilerContext, () => RouteConfig, 'getRouteUrlResolveCode', () => RouteConfig, 'addRoute', () => __ΩClassType, () => InjectorModule, 'addRouteForController', () => HttpRequest, () => __ΩResolvedController, 'build', 'buildUrlResolver', 'routeName', () => ({}), 'resolveUrl', () => 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`-
|
|
604
|
+
HttpRouter.__type = [() => HttpRequest, 'request', () => __ΩResolvedController, '', 'fn', 'buildId', function () { return 0; }, 'name', 'parameters', 'resolveFn', () => HttpControllers, 'controllers', () => __ΩLoggerInterface, 'logger', () => HttpConfig, 'config', () => MiddlewareRegistry, 'middlewareRegistry', () => new MiddlewareRegistry, () => HttpRouterRegistry, 'registry', () => new HttpRouterRegistry, 'constructor', () => RouteConfig, 'getRoutes', () => __ΩClassType, () => InjectorModule, 'module', () => __ΩClassType, 'controller', () => MiddlewareRegistry, () => new MiddlewareRegistry(), () => InjectorModule, () => new InjectorModule(), () => HttpConfig, () => new HttpConfig(), () => HttpRouter, 'forControllers', () => CompilerContext, 'compiler', () => RouteConfig, 'routeConfig', 'getRouteCode', () => CompilerContext, () => RouteConfig, 'getRouteUrlResolveCode', () => RouteConfig, 'addRoute', () => __ΩClassType, () => InjectorModule, 'addRouteForController', () => HttpRequest, () => __ΩResolvedController, 'build', 'buildUrlResolver', 'routeName', () => ({}), 'resolveUrl', () => 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'];
|
|
605
605
|
//# sourceMappingURL=router.js.map
|