@expressots/core 2.9.0 → 2.10.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/lib/CHANGELOG.md +133 -85
- package/lib/cjs/application/app-container.js +93 -94
- package/lib/cjs/application/application-factory.js +74 -74
- package/lib/cjs/application/index.js +7 -7
- package/lib/cjs/common/color-service.provider.js +46 -47
- package/lib/cjs/common/index.js +2 -2
- package/lib/cjs/common/package-resolver.provider.js +35 -35
- package/lib/cjs/common/project-config.provider.js +2 -2
- package/lib/cjs/console/console.js +60 -61
- package/lib/cjs/console/index.js +5 -5
- package/lib/cjs/container-module/container-module.js +111 -111
- package/lib/cjs/container-module/index.js +6 -6
- package/lib/cjs/controller/base-controller.js +74 -75
- package/lib/cjs/controller/index.js +5 -5
- package/lib/cjs/decorator/index.js +17 -17
- package/lib/cjs/decorator/scope-binding.js +44 -44
- package/lib/cjs/error/app-error.js +26 -26
- package/lib/cjs/error/error-handler-middleware.js +28 -28
- package/lib/cjs/error/index.js +9 -9
- package/lib/cjs/error/report.js +53 -54
- package/lib/cjs/error/status-code.js +89 -89
- package/lib/cjs/index.js +26 -26
- package/lib/cjs/middleware/index.js +32 -32
- package/lib/cjs/middleware/interfaces/body-parser.interface.js +2 -2
- package/lib/cjs/middleware/interfaces/compression.interface.js +2 -2
- package/lib/cjs/middleware/interfaces/cookie-parser.interface.js +2 -2
- package/lib/cjs/middleware/interfaces/cookie-session/cookie-session.interface.js +2 -2
- package/lib/cjs/middleware/interfaces/cookie-session/keygrip.interface.js +2 -2
- package/lib/cjs/middleware/interfaces/cors.interface.js +2 -2
- package/lib/cjs/middleware/interfaces/express-rate-limit.interface.js +2 -2
- package/lib/cjs/middleware/interfaces/express-session.interface.js +2 -2
- package/lib/cjs/middleware/interfaces/helmet.interface.js +2 -2
- package/lib/cjs/middleware/interfaces/morgan.interface.js +2 -2
- package/lib/cjs/middleware/interfaces/multer.interface.js +2 -2
- package/lib/cjs/middleware/interfaces/serve-favicon.interface.js +2 -2
- package/lib/cjs/middleware/interfaces/serve-static.interface.js +2 -2
- package/lib/cjs/middleware/middleware-resolver.js +72 -72
- package/lib/cjs/middleware/middleware-service.js +480 -481
- package/lib/cjs/provider/db-in-memory/db-in-memory.provider.js +82 -82
- package/lib/cjs/provider/dto-validator/dto-validator.provider.js +53 -53
- package/lib/cjs/provider/environment/env-validator.provider.js +98 -98
- package/lib/cjs/provider/index.js +13 -13
- package/lib/cjs/provider/logger/logger.provider.js +117 -117
- package/lib/cjs/provider/provider-manager.js +49 -50
- package/lib/cjs/render/handlebars.interface.js +2 -2
- package/lib/cjs/render/index.js +2 -2
- package/lib/cjs/render/render.type.js +2 -2
- package/lib/cjs/types/application/app-container.d.ts +62 -62
- package/lib/cjs/types/application/application-factory.d.ts +34 -34
- package/lib/cjs/types/application/index.d.ts +2 -2
- package/lib/cjs/types/common/color-service.provider.d.ts +29 -29
- package/lib/cjs/types/common/index.d.ts +1 -1
- package/lib/cjs/types/common/package-resolver.provider.d.ts +8 -8
- package/lib/cjs/types/common/project-config.provider.d.ts +56 -47
- package/lib/cjs/types/console/console.d.ts +27 -27
- package/lib/cjs/types/console/index.d.ts +1 -1
- package/lib/cjs/types/container-module/container-module.d.ts +28 -28
- package/lib/cjs/types/container-module/index.d.ts +1 -1
- package/lib/cjs/types/controller/base-controller.d.ts +48 -48
- package/lib/cjs/types/controller/index.d.ts +1 -1
- package/lib/cjs/types/decorator/index.d.ts +1 -1
- package/lib/cjs/types/decorator/scope-binding.d.ts +33 -33
- package/lib/cjs/types/error/app-error.d.ts +29 -29
- package/lib/cjs/types/error/error-handler-middleware.d.ts +11 -11
- package/lib/cjs/types/error/index.d.ts +3 -3
- package/lib/cjs/types/error/report.d.ts +25 -25
- package/lib/cjs/types/error/status-code.d.ts +136 -136
- package/lib/cjs/types/index.d.ts +10 -10
- package/lib/cjs/types/middleware/index.d.ts +13 -13
- package/lib/cjs/types/middleware/interfaces/body-parser.interface.d.ts +33 -33
- package/lib/cjs/types/middleware/interfaces/compression.interface.d.ts +98 -98
- package/lib/cjs/types/middleware/interfaces/cookie-parser.interface.d.ts +9 -9
- package/lib/cjs/types/middleware/interfaces/cookie-session/cookie-session.interface.d.ts +57 -57
- package/lib/cjs/types/middleware/interfaces/cookie-session/keygrip.interface.d.ts +27 -27
- package/lib/cjs/types/middleware/interfaces/cors.interface.d.ts +57 -57
- package/lib/cjs/types/middleware/interfaces/express-rate-limit.interface.d.ts +292 -292
- package/lib/cjs/types/middleware/interfaces/express-session.interface.d.ts +207 -207
- package/lib/cjs/types/middleware/interfaces/helmet.interface.d.ts +210 -210
- package/lib/cjs/types/middleware/interfaces/morgan.interface.d.ts +40 -40
- package/lib/cjs/types/middleware/interfaces/multer.interface.d.ts +255 -255
- package/lib/cjs/types/middleware/interfaces/serve-favicon.interface.d.ts +11 -11
- package/lib/cjs/types/middleware/interfaces/serve-static.interface.d.ts +70 -70
- package/lib/cjs/types/middleware/middleware-resolver.d.ts +11 -11
- package/lib/cjs/types/middleware/middleware-service.d.ts +368 -368
- package/lib/cjs/types/provider/db-in-memory/db-in-memory.provider.d.ts +43 -43
- package/lib/cjs/types/provider/dto-validator/dto-validator.provider.d.ts +11 -11
- package/lib/cjs/types/provider/environment/env-validator.provider.d.ts +35 -35
- package/lib/cjs/types/provider/index.d.ts +5 -5
- package/lib/cjs/types/provider/logger/logger.provider.d.ts +54 -54
- package/lib/cjs/types/provider/provider-manager.d.ts +16 -16
- package/lib/cjs/types/render/handlebars.interface.d.ts +46 -46
- package/lib/cjs/types/render/index.d.ts +2 -2
- package/lib/cjs/types/render/render.type.d.ts +12 -12
- package/lib/package.json +16 -17
- package/package.json +16 -17
|
@@ -1,136 +1,136 @@
|
|
|
1
|
-
declare enum InformationResponse {
|
|
2
|
-
Continue = 100,
|
|
3
|
-
SwitchingProtocols = 101,
|
|
4
|
-
Processing = 102,
|
|
5
|
-
eEarlyHints = 103
|
|
6
|
-
}
|
|
7
|
-
declare enum SuccessfulResponse {
|
|
8
|
-
OK = 200,
|
|
9
|
-
Created = 201,
|
|
10
|
-
Accepted = 202,
|
|
11
|
-
NonAuthoritativeInformation = 203,
|
|
12
|
-
NoContent = 204,
|
|
13
|
-
ResetContent = 205,
|
|
14
|
-
PartialContent = 206,
|
|
15
|
-
MultiStatus = 207,
|
|
16
|
-
AlreadyReported = 208,
|
|
17
|
-
IMUsed = 226
|
|
18
|
-
}
|
|
19
|
-
declare enum RedirectionMessage {
|
|
20
|
-
MultipleChoices = 300,
|
|
21
|
-
MovedPermanently = 301,
|
|
22
|
-
Found = 302,
|
|
23
|
-
SeeOther = 303,
|
|
24
|
-
NotModified = 304,
|
|
25
|
-
TemporaryRedirect = 307,
|
|
26
|
-
PermanentRedirect = 308
|
|
27
|
-
}
|
|
28
|
-
declare enum ClientErrorResponse {
|
|
29
|
-
BadRequest = 400,
|
|
30
|
-
Unauthorized = 401,
|
|
31
|
-
PaymentRequired = 402,
|
|
32
|
-
Forbidden = 403,
|
|
33
|
-
NotFound = 404,
|
|
34
|
-
MethodNotAllowed = 405,
|
|
35
|
-
NotAcceptable = 406,
|
|
36
|
-
ProxyAuthenticationRequired = 407,
|
|
37
|
-
RequestTimeout = 408,
|
|
38
|
-
Conflict = 409,
|
|
39
|
-
Gone = 410,
|
|
40
|
-
LengthRequired = 411,
|
|
41
|
-
PreconditionFailed = 412,
|
|
42
|
-
PayloadTooLarge = 413,
|
|
43
|
-
URITooLong = 414,
|
|
44
|
-
UnsupportedMediaType = 415,
|
|
45
|
-
RangeNotSatisfiable = 416,
|
|
46
|
-
ExpectationFailed = 417,
|
|
47
|
-
ImATeapot = 418,
|
|
48
|
-
MisdirectedRequest = 421,
|
|
49
|
-
UnprocessableEntity = 422,
|
|
50
|
-
Locked = 423,
|
|
51
|
-
FailedDependency = 424,
|
|
52
|
-
TooEarly = 425,
|
|
53
|
-
UpgradeRequired = 426,
|
|
54
|
-
PreconditionRequired = 428,
|
|
55
|
-
TooManyRequests = 429,
|
|
56
|
-
RequestHeaderFieldsTooLarge = 431,
|
|
57
|
-
UnavailableForLegalReasons = 451
|
|
58
|
-
}
|
|
59
|
-
declare enum ServerErrorResponse {
|
|
60
|
-
InternalServerError = 500,
|
|
61
|
-
NotImplemented = 501,
|
|
62
|
-
BadGateway = 502,
|
|
63
|
-
ServiceUnavailable = 503,
|
|
64
|
-
GatewayTimeout = 504,
|
|
65
|
-
HTTPVersionNotSupported = 505,
|
|
66
|
-
VariantAlsoNegotiates = 506,
|
|
67
|
-
InsufficientStorage = 507,
|
|
68
|
-
LoopDetected = 508,
|
|
69
|
-
NotExtended = 510,
|
|
70
|
-
NetworkAuthenticationRequired = 511
|
|
71
|
-
}
|
|
72
|
-
declare const StatusCode: {
|
|
73
|
-
[x: number]: string;
|
|
74
|
-
InternalServerError: ServerErrorResponse.InternalServerError;
|
|
75
|
-
NotImplemented: ServerErrorResponse.NotImplemented;
|
|
76
|
-
BadGateway: ServerErrorResponse.BadGateway;
|
|
77
|
-
ServiceUnavailable: ServerErrorResponse.ServiceUnavailable;
|
|
78
|
-
GatewayTimeout: ServerErrorResponse.GatewayTimeout;
|
|
79
|
-
HTTPVersionNotSupported: ServerErrorResponse.HTTPVersionNotSupported;
|
|
80
|
-
VariantAlsoNegotiates: ServerErrorResponse.VariantAlsoNegotiates;
|
|
81
|
-
InsufficientStorage: ServerErrorResponse.InsufficientStorage;
|
|
82
|
-
LoopDetected: ServerErrorResponse.LoopDetected;
|
|
83
|
-
NotExtended: ServerErrorResponse.NotExtended;
|
|
84
|
-
NetworkAuthenticationRequired: ServerErrorResponse.NetworkAuthenticationRequired;
|
|
85
|
-
BadRequest: ClientErrorResponse.BadRequest;
|
|
86
|
-
Unauthorized: ClientErrorResponse.Unauthorized;
|
|
87
|
-
PaymentRequired: ClientErrorResponse.PaymentRequired;
|
|
88
|
-
Forbidden: ClientErrorResponse.Forbidden;
|
|
89
|
-
NotFound: ClientErrorResponse.NotFound;
|
|
90
|
-
MethodNotAllowed: ClientErrorResponse.MethodNotAllowed;
|
|
91
|
-
NotAcceptable: ClientErrorResponse.NotAcceptable;
|
|
92
|
-
ProxyAuthenticationRequired: ClientErrorResponse.ProxyAuthenticationRequired;
|
|
93
|
-
RequestTimeout: ClientErrorResponse.RequestTimeout;
|
|
94
|
-
Conflict: ClientErrorResponse.Conflict;
|
|
95
|
-
Gone: ClientErrorResponse.Gone;
|
|
96
|
-
LengthRequired: ClientErrorResponse.LengthRequired;
|
|
97
|
-
PreconditionFailed: ClientErrorResponse.PreconditionFailed;
|
|
98
|
-
PayloadTooLarge: ClientErrorResponse.PayloadTooLarge;
|
|
99
|
-
URITooLong: ClientErrorResponse.URITooLong;
|
|
100
|
-
UnsupportedMediaType: ClientErrorResponse.UnsupportedMediaType;
|
|
101
|
-
RangeNotSatisfiable: ClientErrorResponse.RangeNotSatisfiable;
|
|
102
|
-
ExpectationFailed: ClientErrorResponse.ExpectationFailed;
|
|
103
|
-
ImATeapot: ClientErrorResponse.ImATeapot;
|
|
104
|
-
MisdirectedRequest: ClientErrorResponse.MisdirectedRequest;
|
|
105
|
-
UnprocessableEntity: ClientErrorResponse.UnprocessableEntity;
|
|
106
|
-
Locked: ClientErrorResponse.Locked;
|
|
107
|
-
FailedDependency: ClientErrorResponse.FailedDependency;
|
|
108
|
-
TooEarly: ClientErrorResponse.TooEarly;
|
|
109
|
-
UpgradeRequired: ClientErrorResponse.UpgradeRequired;
|
|
110
|
-
PreconditionRequired: ClientErrorResponse.PreconditionRequired;
|
|
111
|
-
TooManyRequests: ClientErrorResponse.TooManyRequests;
|
|
112
|
-
RequestHeaderFieldsTooLarge: ClientErrorResponse.RequestHeaderFieldsTooLarge;
|
|
113
|
-
UnavailableForLegalReasons: ClientErrorResponse.UnavailableForLegalReasons;
|
|
114
|
-
MultipleChoices: RedirectionMessage.MultipleChoices;
|
|
115
|
-
MovedPermanently: RedirectionMessage.MovedPermanently;
|
|
116
|
-
Found: RedirectionMessage.Found;
|
|
117
|
-
SeeOther: RedirectionMessage.SeeOther;
|
|
118
|
-
NotModified: RedirectionMessage.NotModified;
|
|
119
|
-
TemporaryRedirect: RedirectionMessage.TemporaryRedirect;
|
|
120
|
-
PermanentRedirect: RedirectionMessage.PermanentRedirect;
|
|
121
|
-
OK: SuccessfulResponse.OK;
|
|
122
|
-
Created: SuccessfulResponse.Created;
|
|
123
|
-
Accepted: SuccessfulResponse.Accepted;
|
|
124
|
-
NonAuthoritativeInformation: SuccessfulResponse.NonAuthoritativeInformation;
|
|
125
|
-
NoContent: SuccessfulResponse.NoContent;
|
|
126
|
-
ResetContent: SuccessfulResponse.ResetContent;
|
|
127
|
-
PartialContent: SuccessfulResponse.PartialContent;
|
|
128
|
-
MultiStatus: SuccessfulResponse.MultiStatus;
|
|
129
|
-
AlreadyReported: SuccessfulResponse.AlreadyReported;
|
|
130
|
-
IMUsed: SuccessfulResponse.IMUsed;
|
|
131
|
-
Continue: InformationResponse.Continue;
|
|
132
|
-
SwitchingProtocols: InformationResponse.SwitchingProtocols;
|
|
133
|
-
Processing: InformationResponse.Processing;
|
|
134
|
-
eEarlyHints: InformationResponse.eEarlyHints;
|
|
135
|
-
};
|
|
136
|
-
export { StatusCode };
|
|
1
|
+
declare enum InformationResponse {
|
|
2
|
+
Continue = 100,
|
|
3
|
+
SwitchingProtocols = 101,
|
|
4
|
+
Processing = 102,
|
|
5
|
+
eEarlyHints = 103
|
|
6
|
+
}
|
|
7
|
+
declare enum SuccessfulResponse {
|
|
8
|
+
OK = 200,
|
|
9
|
+
Created = 201,
|
|
10
|
+
Accepted = 202,
|
|
11
|
+
NonAuthoritativeInformation = 203,
|
|
12
|
+
NoContent = 204,
|
|
13
|
+
ResetContent = 205,
|
|
14
|
+
PartialContent = 206,
|
|
15
|
+
MultiStatus = 207,
|
|
16
|
+
AlreadyReported = 208,
|
|
17
|
+
IMUsed = 226
|
|
18
|
+
}
|
|
19
|
+
declare enum RedirectionMessage {
|
|
20
|
+
MultipleChoices = 300,
|
|
21
|
+
MovedPermanently = 301,
|
|
22
|
+
Found = 302,
|
|
23
|
+
SeeOther = 303,
|
|
24
|
+
NotModified = 304,
|
|
25
|
+
TemporaryRedirect = 307,
|
|
26
|
+
PermanentRedirect = 308
|
|
27
|
+
}
|
|
28
|
+
declare enum ClientErrorResponse {
|
|
29
|
+
BadRequest = 400,
|
|
30
|
+
Unauthorized = 401,
|
|
31
|
+
PaymentRequired = 402,
|
|
32
|
+
Forbidden = 403,
|
|
33
|
+
NotFound = 404,
|
|
34
|
+
MethodNotAllowed = 405,
|
|
35
|
+
NotAcceptable = 406,
|
|
36
|
+
ProxyAuthenticationRequired = 407,
|
|
37
|
+
RequestTimeout = 408,
|
|
38
|
+
Conflict = 409,
|
|
39
|
+
Gone = 410,
|
|
40
|
+
LengthRequired = 411,
|
|
41
|
+
PreconditionFailed = 412,
|
|
42
|
+
PayloadTooLarge = 413,
|
|
43
|
+
URITooLong = 414,
|
|
44
|
+
UnsupportedMediaType = 415,
|
|
45
|
+
RangeNotSatisfiable = 416,
|
|
46
|
+
ExpectationFailed = 417,
|
|
47
|
+
ImATeapot = 418,
|
|
48
|
+
MisdirectedRequest = 421,
|
|
49
|
+
UnprocessableEntity = 422,
|
|
50
|
+
Locked = 423,
|
|
51
|
+
FailedDependency = 424,
|
|
52
|
+
TooEarly = 425,
|
|
53
|
+
UpgradeRequired = 426,
|
|
54
|
+
PreconditionRequired = 428,
|
|
55
|
+
TooManyRequests = 429,
|
|
56
|
+
RequestHeaderFieldsTooLarge = 431,
|
|
57
|
+
UnavailableForLegalReasons = 451
|
|
58
|
+
}
|
|
59
|
+
declare enum ServerErrorResponse {
|
|
60
|
+
InternalServerError = 500,
|
|
61
|
+
NotImplemented = 501,
|
|
62
|
+
BadGateway = 502,
|
|
63
|
+
ServiceUnavailable = 503,
|
|
64
|
+
GatewayTimeout = 504,
|
|
65
|
+
HTTPVersionNotSupported = 505,
|
|
66
|
+
VariantAlsoNegotiates = 506,
|
|
67
|
+
InsufficientStorage = 507,
|
|
68
|
+
LoopDetected = 508,
|
|
69
|
+
NotExtended = 510,
|
|
70
|
+
NetworkAuthenticationRequired = 511
|
|
71
|
+
}
|
|
72
|
+
declare const StatusCode: {
|
|
73
|
+
[x: number]: string;
|
|
74
|
+
InternalServerError: ServerErrorResponse.InternalServerError;
|
|
75
|
+
NotImplemented: ServerErrorResponse.NotImplemented;
|
|
76
|
+
BadGateway: ServerErrorResponse.BadGateway;
|
|
77
|
+
ServiceUnavailable: ServerErrorResponse.ServiceUnavailable;
|
|
78
|
+
GatewayTimeout: ServerErrorResponse.GatewayTimeout;
|
|
79
|
+
HTTPVersionNotSupported: ServerErrorResponse.HTTPVersionNotSupported;
|
|
80
|
+
VariantAlsoNegotiates: ServerErrorResponse.VariantAlsoNegotiates;
|
|
81
|
+
InsufficientStorage: ServerErrorResponse.InsufficientStorage;
|
|
82
|
+
LoopDetected: ServerErrorResponse.LoopDetected;
|
|
83
|
+
NotExtended: ServerErrorResponse.NotExtended;
|
|
84
|
+
NetworkAuthenticationRequired: ServerErrorResponse.NetworkAuthenticationRequired;
|
|
85
|
+
BadRequest: ClientErrorResponse.BadRequest;
|
|
86
|
+
Unauthorized: ClientErrorResponse.Unauthorized;
|
|
87
|
+
PaymentRequired: ClientErrorResponse.PaymentRequired;
|
|
88
|
+
Forbidden: ClientErrorResponse.Forbidden;
|
|
89
|
+
NotFound: ClientErrorResponse.NotFound;
|
|
90
|
+
MethodNotAllowed: ClientErrorResponse.MethodNotAllowed;
|
|
91
|
+
NotAcceptable: ClientErrorResponse.NotAcceptable;
|
|
92
|
+
ProxyAuthenticationRequired: ClientErrorResponse.ProxyAuthenticationRequired;
|
|
93
|
+
RequestTimeout: ClientErrorResponse.RequestTimeout;
|
|
94
|
+
Conflict: ClientErrorResponse.Conflict;
|
|
95
|
+
Gone: ClientErrorResponse.Gone;
|
|
96
|
+
LengthRequired: ClientErrorResponse.LengthRequired;
|
|
97
|
+
PreconditionFailed: ClientErrorResponse.PreconditionFailed;
|
|
98
|
+
PayloadTooLarge: ClientErrorResponse.PayloadTooLarge;
|
|
99
|
+
URITooLong: ClientErrorResponse.URITooLong;
|
|
100
|
+
UnsupportedMediaType: ClientErrorResponse.UnsupportedMediaType;
|
|
101
|
+
RangeNotSatisfiable: ClientErrorResponse.RangeNotSatisfiable;
|
|
102
|
+
ExpectationFailed: ClientErrorResponse.ExpectationFailed;
|
|
103
|
+
ImATeapot: ClientErrorResponse.ImATeapot;
|
|
104
|
+
MisdirectedRequest: ClientErrorResponse.MisdirectedRequest;
|
|
105
|
+
UnprocessableEntity: ClientErrorResponse.UnprocessableEntity;
|
|
106
|
+
Locked: ClientErrorResponse.Locked;
|
|
107
|
+
FailedDependency: ClientErrorResponse.FailedDependency;
|
|
108
|
+
TooEarly: ClientErrorResponse.TooEarly;
|
|
109
|
+
UpgradeRequired: ClientErrorResponse.UpgradeRequired;
|
|
110
|
+
PreconditionRequired: ClientErrorResponse.PreconditionRequired;
|
|
111
|
+
TooManyRequests: ClientErrorResponse.TooManyRequests;
|
|
112
|
+
RequestHeaderFieldsTooLarge: ClientErrorResponse.RequestHeaderFieldsTooLarge;
|
|
113
|
+
UnavailableForLegalReasons: ClientErrorResponse.UnavailableForLegalReasons;
|
|
114
|
+
MultipleChoices: RedirectionMessage.MultipleChoices;
|
|
115
|
+
MovedPermanently: RedirectionMessage.MovedPermanently;
|
|
116
|
+
Found: RedirectionMessage.Found;
|
|
117
|
+
SeeOther: RedirectionMessage.SeeOther;
|
|
118
|
+
NotModified: RedirectionMessage.NotModified;
|
|
119
|
+
TemporaryRedirect: RedirectionMessage.TemporaryRedirect;
|
|
120
|
+
PermanentRedirect: RedirectionMessage.PermanentRedirect;
|
|
121
|
+
OK: SuccessfulResponse.OK;
|
|
122
|
+
Created: SuccessfulResponse.Created;
|
|
123
|
+
Accepted: SuccessfulResponse.Accepted;
|
|
124
|
+
NonAuthoritativeInformation: SuccessfulResponse.NonAuthoritativeInformation;
|
|
125
|
+
NoContent: SuccessfulResponse.NoContent;
|
|
126
|
+
ResetContent: SuccessfulResponse.ResetContent;
|
|
127
|
+
PartialContent: SuccessfulResponse.PartialContent;
|
|
128
|
+
MultiStatus: SuccessfulResponse.MultiStatus;
|
|
129
|
+
AlreadyReported: SuccessfulResponse.AlreadyReported;
|
|
130
|
+
IMUsed: SuccessfulResponse.IMUsed;
|
|
131
|
+
Continue: InformationResponse.Continue;
|
|
132
|
+
SwitchingProtocols: InformationResponse.SwitchingProtocols;
|
|
133
|
+
Processing: InformationResponse.Processing;
|
|
134
|
+
eEarlyHints: InformationResponse.eEarlyHints;
|
|
135
|
+
};
|
|
136
|
+
export { StatusCode };
|
package/lib/cjs/types/index.d.ts
CHANGED
|
@@ -1,10 +1,10 @@
|
|
|
1
|
-
export * from "./application";
|
|
2
|
-
export * from "./common";
|
|
3
|
-
export * from "./console";
|
|
4
|
-
export * from "./container-module";
|
|
5
|
-
export * from "./controller";
|
|
6
|
-
export * from "./decorator";
|
|
7
|
-
export * from "./error";
|
|
8
|
-
export * from "./middleware";
|
|
9
|
-
export * from "./provider";
|
|
10
|
-
export * from "./render";
|
|
1
|
+
export * from "./application";
|
|
2
|
+
export * from "./common";
|
|
3
|
+
export * from "./console";
|
|
4
|
+
export * from "./container-module";
|
|
5
|
+
export * from "./controller";
|
|
6
|
+
export * from "./decorator";
|
|
7
|
+
export * from "./error";
|
|
8
|
+
export * from "./middleware";
|
|
9
|
+
export * from "./provider";
|
|
10
|
+
export * from "./render";
|
|
@@ -1,13 +1,13 @@
|
|
|
1
|
-
export { IMiddleware, Middleware, ExpressHandler, ExpressoMiddleware, MiddlewareOptions, } from "./middleware-service";
|
|
2
|
-
export { OptionsJson } from "./interfaces/body-parser.interface";
|
|
3
|
-
export { CorsOptions } from "./interfaces/cors.interface";
|
|
4
|
-
export { CompressionOptions } from "./interfaces/compression.interface";
|
|
5
|
-
export { CookieSessionOptions } from "./interfaces/cookie-session/cookie-session.interface";
|
|
6
|
-
export { OptionsHelmet } from "./interfaces/helmet.interface";
|
|
7
|
-
export { SessionOptions } from "./interfaces/express-session.interface";
|
|
8
|
-
export { Keygrip } from "./interfaces/cookie-session/keygrip.interface";
|
|
9
|
-
export { CookieParserOptions } from "./interfaces/cookie-parser.interface";
|
|
10
|
-
export { ServeFaviconOptions } from "./interfaces/serve-favicon.interface";
|
|
11
|
-
export { RateLimitOptions } from "./interfaces/express-rate-limit.interface";
|
|
12
|
-
export { multer } from "./interfaces/multer.interface";
|
|
13
|
-
export * as IMorgan from "./interfaces/morgan.interface";
|
|
1
|
+
export { IMiddleware, Middleware, ExpressHandler, ExpressoMiddleware, MiddlewareOptions, } from "./middleware-service";
|
|
2
|
+
export { OptionsJson } from "./interfaces/body-parser.interface";
|
|
3
|
+
export { CorsOptions } from "./interfaces/cors.interface";
|
|
4
|
+
export { CompressionOptions } from "./interfaces/compression.interface";
|
|
5
|
+
export { CookieSessionOptions } from "./interfaces/cookie-session/cookie-session.interface";
|
|
6
|
+
export { OptionsHelmet } from "./interfaces/helmet.interface";
|
|
7
|
+
export { SessionOptions } from "./interfaces/express-session.interface";
|
|
8
|
+
export { Keygrip } from "./interfaces/cookie-session/keygrip.interface";
|
|
9
|
+
export { CookieParserOptions } from "./interfaces/cookie-parser.interface";
|
|
10
|
+
export { ServeFaviconOptions } from "./interfaces/serve-favicon.interface";
|
|
11
|
+
export { RateLimitOptions } from "./interfaces/express-rate-limit.interface";
|
|
12
|
+
export { multer } from "./interfaces/multer.interface";
|
|
13
|
+
export * as IMorgan from "./interfaces/morgan.interface";
|
|
@@ -1,33 +1,33 @@
|
|
|
1
|
-
/// <reference types="node" />
|
|
2
|
-
/// <reference types="node" />
|
|
3
|
-
import * as http from "http";
|
|
4
|
-
interface OptionsJson {
|
|
5
|
-
/** When set to true, then deflated (compressed) bodies will be inflated; when false, deflated bodies are rejected. Defaults to true. */
|
|
6
|
-
inflate?: boolean | undefined;
|
|
7
|
-
/**
|
|
8
|
-
* Controls the maximum request body size. If this is a number,
|
|
9
|
-
* then the value specifies the number of bytes; if it is a string,
|
|
10
|
-
* the value is passed to the bytes library for parsing. Defaults to '100kb'.
|
|
11
|
-
*/
|
|
12
|
-
limit?: number | string | undefined;
|
|
13
|
-
/**
|
|
14
|
-
* The type option is used to determine what media type the middleware will parse
|
|
15
|
-
*/
|
|
16
|
-
type?: string | Array<string> | ((req: http.IncomingMessage) => any) | undefined;
|
|
17
|
-
/**
|
|
18
|
-
* The verify option, if supplied, is called as verify(req, res, buf, encoding),
|
|
19
|
-
* where buf is a Buffer of the raw request body and encoding is the encoding of the request.
|
|
20
|
-
*/
|
|
21
|
-
verify?(req: http.IncomingMessage, res: http.ServerResponse, buf: Buffer, encoding: string): void;
|
|
22
|
-
/**
|
|
23
|
-
*
|
|
24
|
-
* The reviver option is passed directly to JSON.parse as the second argument.
|
|
25
|
-
*/
|
|
26
|
-
reviver?(key: string, value: any): any;
|
|
27
|
-
/**
|
|
28
|
-
* When set to `true`, will only accept arrays and objects;
|
|
29
|
-
* when `false` will accept anything JSON.parse accepts. Defaults to `true`.
|
|
30
|
-
*/
|
|
31
|
-
strict?: boolean | undefined;
|
|
32
|
-
}
|
|
33
|
-
export { OptionsJson };
|
|
1
|
+
/// <reference types="node" />
|
|
2
|
+
/// <reference types="node" />
|
|
3
|
+
import * as http from "http";
|
|
4
|
+
interface OptionsJson {
|
|
5
|
+
/** When set to true, then deflated (compressed) bodies will be inflated; when false, deflated bodies are rejected. Defaults to true. */
|
|
6
|
+
inflate?: boolean | undefined;
|
|
7
|
+
/**
|
|
8
|
+
* Controls the maximum request body size. If this is a number,
|
|
9
|
+
* then the value specifies the number of bytes; if it is a string,
|
|
10
|
+
* the value is passed to the bytes library for parsing. Defaults to '100kb'.
|
|
11
|
+
*/
|
|
12
|
+
limit?: number | string | undefined;
|
|
13
|
+
/**
|
|
14
|
+
* The type option is used to determine what media type the middleware will parse
|
|
15
|
+
*/
|
|
16
|
+
type?: string | Array<string> | ((req: http.IncomingMessage) => any) | undefined;
|
|
17
|
+
/**
|
|
18
|
+
* The verify option, if supplied, is called as verify(req, res, buf, encoding),
|
|
19
|
+
* where buf is a Buffer of the raw request body and encoding is the encoding of the request.
|
|
20
|
+
*/
|
|
21
|
+
verify?(req: http.IncomingMessage, res: http.ServerResponse, buf: Buffer, encoding: string): void;
|
|
22
|
+
/**
|
|
23
|
+
*
|
|
24
|
+
* The reviver option is passed directly to JSON.parse as the second argument.
|
|
25
|
+
*/
|
|
26
|
+
reviver?(key: string, value: any): any;
|
|
27
|
+
/**
|
|
28
|
+
* When set to `true`, will only accept arrays and objects;
|
|
29
|
+
* when `false` will accept anything JSON.parse accepts. Defaults to `true`.
|
|
30
|
+
*/
|
|
31
|
+
strict?: boolean | undefined;
|
|
32
|
+
}
|
|
33
|
+
export { OptionsJson };
|
|
@@ -1,98 +1,98 @@
|
|
|
1
|
-
import express from "express";
|
|
2
|
-
interface CompressionFilter {
|
|
3
|
-
(req: express.Request, res: express.Response): boolean;
|
|
4
|
-
}
|
|
5
|
-
interface CompressionOptions {
|
|
6
|
-
/**
|
|
7
|
-
* @default zlib.constants.Z_DEFAULT_CHUNK or 16384
|
|
8
|
-
* @see {@link https://nodejs.org/api/zlib.html#zlib_memory_usage_tuning| Node.js documentation}
|
|
9
|
-
* @see {@link https://github.com/expressjs/compression#chunksize|chunkSize documentation}
|
|
10
|
-
*/
|
|
11
|
-
chunkSize?: number | undefined;
|
|
12
|
-
/**
|
|
13
|
-
* A function to decide if the response should be considered for compression. This function is called as
|
|
14
|
-
* `filter(req, res)` and is expected to return `true` to consider the response for compression, or `false` to
|
|
15
|
-
* not compress the response.
|
|
16
|
-
*
|
|
17
|
-
* The default filter function uses the `compressible` module to determine if `res.getHeader('Content-Type')`
|
|
18
|
-
* is compressible.
|
|
19
|
-
*
|
|
20
|
-
* @see {@link https://github.com/expressjs/compression#filter|`filter` documentation}
|
|
21
|
-
* @see {@link https://www.npmjs.com/package/compressible|compressible module}
|
|
22
|
-
*/
|
|
23
|
-
filter?: CompressionFilter | undefined;
|
|
24
|
-
/**
|
|
25
|
-
* The level of zlib compression to apply to responses. A higher level will result in better compression, but
|
|
26
|
-
* will take longer to complete. A lower level will result in less compression, but will be much faster.
|
|
27
|
-
*
|
|
28
|
-
* This is an integer in the range of `0` (no compression) to `9` (maximum compression). The special value `-1`
|
|
29
|
-
* can be used to mean the "default compression level", which is a default compromise between speed and
|
|
30
|
-
* compression (currently equivalent to level 6).
|
|
31
|
-
*
|
|
32
|
-
* - `-1` Default compression level (also `zlib.constants.Z_DEFAULT_COMPRESSION`).
|
|
33
|
-
* - `0` No compression (also `zlib.constants.Z_NO_COMPRESSION`).
|
|
34
|
-
* - `1` Fastest compression (also `zlib.constants.Z_BEST_SPEED`).
|
|
35
|
-
* - `2`
|
|
36
|
-
* - `3`
|
|
37
|
-
* - `4`
|
|
38
|
-
* - `5`
|
|
39
|
-
* - `6` (currently what `zlib.constants.Z_DEFAULT_COMPRESSION` points to).
|
|
40
|
-
* - `7`
|
|
41
|
-
* - `8`
|
|
42
|
-
* - `9` Best compression (also `zlib.constants.Z_BEST_COMPRESSION`).
|
|
43
|
-
*
|
|
44
|
-
* **Note** in the list above, `zlib` is from `zlib = require('zlib')`.
|
|
45
|
-
*
|
|
46
|
-
* @default zlib.constants.DEFAULT_COMPRESSION or -1
|
|
47
|
-
* @see {@link https://github.com/expressjs/compression#level|`level` documentation}
|
|
48
|
-
*/
|
|
49
|
-
level?: number | undefined;
|
|
50
|
-
/**
|
|
51
|
-
* This specifies how much memory should be allocated for the internal compression state and is an integer in
|
|
52
|
-
* the range of `1` (minimum level) and `9` (maximum level).
|
|
53
|
-
*
|
|
54
|
-
* @default zlib.constants.DEFAULT_MEMLEVEL or 8
|
|
55
|
-
* @see {@link https://nodejs.org/api/zlib.html#zlib_memory_usage_tuning|Node.js documentation}
|
|
56
|
-
* @see {@link https://github.com/expressjs/compression#memlevel|`memLevel` documentation}
|
|
57
|
-
*/
|
|
58
|
-
memLevel?: number | undefined;
|
|
59
|
-
/**
|
|
60
|
-
* This is used to tune the compression algorithm. This value only affects the compression ratio, not the
|
|
61
|
-
* correctness of the compressed output, even if it is not set appropriately.
|
|
62
|
-
*
|
|
63
|
-
* - `zlib.constants.Z_DEFAULT_STRATEGY` Use for normal data.
|
|
64
|
-
* - `zlib.constants.Z_FILTERED` Use for data produced by a filter (or predictor). Filtered data consists mostly of small
|
|
65
|
-
* values with a somewhat random distribution. In this case, the compression algorithm is tuned to compress
|
|
66
|
-
* them better. The effect is to force more Huffman coding and less string matching; it is somewhat intermediate
|
|
67
|
-
* between `zlib.constants.Z_DEFAULT_STRATEGY` and `zlib.constants.Z_HUFFMAN_ONLY`.
|
|
68
|
-
* - `zlib.constants.Z_FIXED` Use to prevent the use of dynamic Huffman codes, allowing for a simpler decoder for special applications.
|
|
69
|
-
* - `zlib.constants.Z_HUFFMAN_ONLY` Use to force Huffman encoding only (no string match).
|
|
70
|
-
* - `zlib.constants.Z_RLE` Use to limit match distances to one (run-length encoding). This is designed to be almost as
|
|
71
|
-
* fast as `zlib.constants.Z_HUFFMAN_ONLY`, but give better compression for PNG image data.
|
|
72
|
-
*
|
|
73
|
-
* **Note** in the list above, `zlib` is from `zlib = require('zlib')`.
|
|
74
|
-
*/
|
|
75
|
-
strategy?: number | undefined;
|
|
76
|
-
/**
|
|
77
|
-
* The byte threshold for the response body size before compression is considered for the response, defaults to
|
|
78
|
-
* 1kb. This is a number of bytes or any string accepted by the bytes module.
|
|
79
|
-
*
|
|
80
|
-
* **Note** this is only an advisory setting; if the response size cannot be determined at the time the response
|
|
81
|
-
* headers are written, then it is assumed the response is *over* the threshold. To guarantee the response size
|
|
82
|
-
* can be determined, be sure set a `Content-Length` response header.
|
|
83
|
-
*
|
|
84
|
-
* @see {@link https://www.npmjs.com/package/bytes|`bytes` module}
|
|
85
|
-
* @see {@link https://github.com/expressjs/compression#threshold|`threshold` documentation}
|
|
86
|
-
*/
|
|
87
|
-
threshold?: number | string | undefined;
|
|
88
|
-
/**
|
|
89
|
-
* @default zlib.constants.Z_DEFAULT_WINDOWBITS or 15.
|
|
90
|
-
* @see {@link https://nodejs.org/api/zlib.html#zlib_memory_usage_tuning|Node.js documentation}
|
|
91
|
-
*/
|
|
92
|
-
windowBits?: number | undefined;
|
|
93
|
-
/**
|
|
94
|
-
* In addition , `zlib` options may be passed in to the options object.
|
|
95
|
-
*/
|
|
96
|
-
[property: string]: any;
|
|
97
|
-
}
|
|
98
|
-
export { CompressionOptions };
|
|
1
|
+
import express from "express";
|
|
2
|
+
interface CompressionFilter {
|
|
3
|
+
(req: express.Request, res: express.Response): boolean;
|
|
4
|
+
}
|
|
5
|
+
interface CompressionOptions {
|
|
6
|
+
/**
|
|
7
|
+
* @default zlib.constants.Z_DEFAULT_CHUNK or 16384
|
|
8
|
+
* @see {@link https://nodejs.org/api/zlib.html#zlib_memory_usage_tuning| Node.js documentation}
|
|
9
|
+
* @see {@link https://github.com/expressjs/compression#chunksize|chunkSize documentation}
|
|
10
|
+
*/
|
|
11
|
+
chunkSize?: number | undefined;
|
|
12
|
+
/**
|
|
13
|
+
* A function to decide if the response should be considered for compression. This function is called as
|
|
14
|
+
* `filter(req, res)` and is expected to return `true` to consider the response for compression, or `false` to
|
|
15
|
+
* not compress the response.
|
|
16
|
+
*
|
|
17
|
+
* The default filter function uses the `compressible` module to determine if `res.getHeader('Content-Type')`
|
|
18
|
+
* is compressible.
|
|
19
|
+
*
|
|
20
|
+
* @see {@link https://github.com/expressjs/compression#filter|`filter` documentation}
|
|
21
|
+
* @see {@link https://www.npmjs.com/package/compressible|compressible module}
|
|
22
|
+
*/
|
|
23
|
+
filter?: CompressionFilter | undefined;
|
|
24
|
+
/**
|
|
25
|
+
* The level of zlib compression to apply to responses. A higher level will result in better compression, but
|
|
26
|
+
* will take longer to complete. A lower level will result in less compression, but will be much faster.
|
|
27
|
+
*
|
|
28
|
+
* This is an integer in the range of `0` (no compression) to `9` (maximum compression). The special value `-1`
|
|
29
|
+
* can be used to mean the "default compression level", which is a default compromise between speed and
|
|
30
|
+
* compression (currently equivalent to level 6).
|
|
31
|
+
*
|
|
32
|
+
* - `-1` Default compression level (also `zlib.constants.Z_DEFAULT_COMPRESSION`).
|
|
33
|
+
* - `0` No compression (also `zlib.constants.Z_NO_COMPRESSION`).
|
|
34
|
+
* - `1` Fastest compression (also `zlib.constants.Z_BEST_SPEED`).
|
|
35
|
+
* - `2`
|
|
36
|
+
* - `3`
|
|
37
|
+
* - `4`
|
|
38
|
+
* - `5`
|
|
39
|
+
* - `6` (currently what `zlib.constants.Z_DEFAULT_COMPRESSION` points to).
|
|
40
|
+
* - `7`
|
|
41
|
+
* - `8`
|
|
42
|
+
* - `9` Best compression (also `zlib.constants.Z_BEST_COMPRESSION`).
|
|
43
|
+
*
|
|
44
|
+
* **Note** in the list above, `zlib` is from `zlib = require('zlib')`.
|
|
45
|
+
*
|
|
46
|
+
* @default zlib.constants.DEFAULT_COMPRESSION or -1
|
|
47
|
+
* @see {@link https://github.com/expressjs/compression#level|`level` documentation}
|
|
48
|
+
*/
|
|
49
|
+
level?: number | undefined;
|
|
50
|
+
/**
|
|
51
|
+
* This specifies how much memory should be allocated for the internal compression state and is an integer in
|
|
52
|
+
* the range of `1` (minimum level) and `9` (maximum level).
|
|
53
|
+
*
|
|
54
|
+
* @default zlib.constants.DEFAULT_MEMLEVEL or 8
|
|
55
|
+
* @see {@link https://nodejs.org/api/zlib.html#zlib_memory_usage_tuning|Node.js documentation}
|
|
56
|
+
* @see {@link https://github.com/expressjs/compression#memlevel|`memLevel` documentation}
|
|
57
|
+
*/
|
|
58
|
+
memLevel?: number | undefined;
|
|
59
|
+
/**
|
|
60
|
+
* This is used to tune the compression algorithm. This value only affects the compression ratio, not the
|
|
61
|
+
* correctness of the compressed output, even if it is not set appropriately.
|
|
62
|
+
*
|
|
63
|
+
* - `zlib.constants.Z_DEFAULT_STRATEGY` Use for normal data.
|
|
64
|
+
* - `zlib.constants.Z_FILTERED` Use for data produced by a filter (or predictor). Filtered data consists mostly of small
|
|
65
|
+
* values with a somewhat random distribution. In this case, the compression algorithm is tuned to compress
|
|
66
|
+
* them better. The effect is to force more Huffman coding and less string matching; it is somewhat intermediate
|
|
67
|
+
* between `zlib.constants.Z_DEFAULT_STRATEGY` and `zlib.constants.Z_HUFFMAN_ONLY`.
|
|
68
|
+
* - `zlib.constants.Z_FIXED` Use to prevent the use of dynamic Huffman codes, allowing for a simpler decoder for special applications.
|
|
69
|
+
* - `zlib.constants.Z_HUFFMAN_ONLY` Use to force Huffman encoding only (no string match).
|
|
70
|
+
* - `zlib.constants.Z_RLE` Use to limit match distances to one (run-length encoding). This is designed to be almost as
|
|
71
|
+
* fast as `zlib.constants.Z_HUFFMAN_ONLY`, but give better compression for PNG image data.
|
|
72
|
+
*
|
|
73
|
+
* **Note** in the list above, `zlib` is from `zlib = require('zlib')`.
|
|
74
|
+
*/
|
|
75
|
+
strategy?: number | undefined;
|
|
76
|
+
/**
|
|
77
|
+
* The byte threshold for the response body size before compression is considered for the response, defaults to
|
|
78
|
+
* 1kb. This is a number of bytes or any string accepted by the bytes module.
|
|
79
|
+
*
|
|
80
|
+
* **Note** this is only an advisory setting; if the response size cannot be determined at the time the response
|
|
81
|
+
* headers are written, then it is assumed the response is *over* the threshold. To guarantee the response size
|
|
82
|
+
* can be determined, be sure set a `Content-Length` response header.
|
|
83
|
+
*
|
|
84
|
+
* @see {@link https://www.npmjs.com/package/bytes|`bytes` module}
|
|
85
|
+
* @see {@link https://github.com/expressjs/compression#threshold|`threshold` documentation}
|
|
86
|
+
*/
|
|
87
|
+
threshold?: number | string | undefined;
|
|
88
|
+
/**
|
|
89
|
+
* @default zlib.constants.Z_DEFAULT_WINDOWBITS or 15.
|
|
90
|
+
* @see {@link https://nodejs.org/api/zlib.html#zlib_memory_usage_tuning|Node.js documentation}
|
|
91
|
+
*/
|
|
92
|
+
windowBits?: number | undefined;
|
|
93
|
+
/**
|
|
94
|
+
* In addition , `zlib` options may be passed in to the options object.
|
|
95
|
+
*/
|
|
96
|
+
[property: string]: any;
|
|
97
|
+
}
|
|
98
|
+
export { CompressionOptions };
|
|
@@ -1,9 +1,9 @@
|
|
|
1
|
-
interface CookieParserOptions {
|
|
2
|
-
/**
|
|
3
|
-
* A function used for decoding cookies.
|
|
4
|
-
* By default, `decodeURIComponent` is used.
|
|
5
|
-
* You can provide a custom decoding function here.
|
|
6
|
-
*/
|
|
7
|
-
decode?(val: string): string;
|
|
8
|
-
}
|
|
9
|
-
export { CookieParserOptions };
|
|
1
|
+
interface CookieParserOptions {
|
|
2
|
+
/**
|
|
3
|
+
* A function used for decoding cookies.
|
|
4
|
+
* By default, `decodeURIComponent` is used.
|
|
5
|
+
* You can provide a custom decoding function here.
|
|
6
|
+
*/
|
|
7
|
+
decode?(val: string): string;
|
|
8
|
+
}
|
|
9
|
+
export { CookieParserOptions };
|