@mrxsys/mrx-core 2.11.0-1-and-280-20251103 → 2.11.0-1-and-284-20251113
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/{chunk-0d0zd2yg.js → chunk-037vwvd4.js} +2 -2
- package/dist/{chunk-jksb9ers.js → chunk-10w8mg8e.js} +1 -1
- package/dist/{chunk-afd82epa.js → chunk-1yykvnyz.js} +13 -13
- package/dist/{chunk-dre2fgj0.js → chunk-2z8amjqt.js} +1 -1
- package/dist/chunk-4t7sy5qt.js +10 -0
- package/dist/chunk-642xajvx.js +59 -0
- package/dist/chunk-6hs00zfd.js +13 -0
- package/dist/chunk-8pw0syzf.js +9 -0
- package/dist/{chunk-eeb7yskp.js → chunk-awphtyzp.js} +4 -4
- package/dist/{chunk-8tffnbpn.js → chunk-ayyrgqyv.js} +1 -1
- package/dist/{chunk-12qzn7jw.js → chunk-dmsev7vs.js} +1 -1
- package/dist/{chunk-afyz8rg5.js → chunk-dyntzdyn.js} +10 -9
- package/dist/{chunk-gtn1kn0z.js → chunk-hv6g22kf.js} +4 -4
- package/dist/chunk-hwfebx4x.js +11 -0
- package/dist/{chunk-e30paw8a.js → chunk-j7dyc5ks.js} +5 -5
- package/dist/chunk-jz3wd472.js +23 -0
- package/dist/{chunk-441xs5k1.js → chunk-pcfjfxbw.js} +6 -6
- package/dist/{chunk-fs3wm3p4.js → chunk-r7yr9p57.js} +6 -6
- package/dist/{chunk-pjv1ekwr.js → chunk-tg6wsheh.js} +1 -1
- package/dist/chunk-y5dtkmnp.js +8 -0
- package/dist/chunk-yrt0ffvf.js +9 -0
- package/dist/{chunk-p14h6jfs.js → chunk-yxedm2vx.js} +1 -1
- package/dist/chunk-zn2nm5gg.js +9 -0
- package/dist/{chunk-7t524zqh.js → chunk-zv4ta4fb.js} +3 -3
- package/dist/errors/{base-error.d.ts → app-error.d.ts} +2 -1
- package/dist/errors/http-error.d.ts +2 -2
- package/dist/errors/index.d.ts +2 -1
- package/dist/errors/index.js +6 -4
- package/dist/errors/internal-error.d.ts +4 -0
- package/dist/modules/data/data.d.ts +5 -5
- package/dist/modules/data/enums/data-error-keys.d.ts +1 -1
- package/dist/modules/data/enums/index.js +1 -1
- package/dist/modules/data/index.js +3 -3
- package/dist/modules/database/enums/database-error-keys.d.ts +26 -26
- package/dist/modules/database/enums/index.js +1 -1
- package/dist/modules/database/enums/mssql-error-code.d.ts +23 -23
- package/dist/modules/database/index.js +5 -5
- package/dist/modules/database/mssql.d.ts +9 -9
- package/dist/modules/elysia/cache/cache.d.ts +3 -151
- package/dist/modules/elysia/cache/index.js +3 -3
- package/dist/modules/elysia/crud/index.js +13 -13
- package/dist/modules/elysia/crud/operations/count.d.ts +4 -156
- package/dist/modules/elysia/crud/operations/delete.d.ts +4 -156
- package/dist/modules/elysia/crud/operations/deleteOne.d.ts +4 -156
- package/dist/modules/elysia/crud/operations/find.d.ts +9 -161
- package/dist/modules/elysia/crud/operations/findOne.d.ts +9 -161
- package/dist/modules/elysia/crud/operations/index.js +10 -10
- package/dist/modules/elysia/crud/operations/insert.d.ts +4 -156
- package/dist/modules/elysia/crud/operations/update.d.ts +9 -171
- package/dist/modules/elysia/crud/operations/updateOne.d.ts +9 -171
- package/dist/modules/elysia/crud/utils/index.js +4 -4
- package/dist/modules/elysia/db-resolver/db-resolver.d.ts +4 -156
- package/dist/modules/elysia/db-resolver/enums/db-resolver-error-keys.d.ts +1 -1
- package/dist/modules/elysia/db-resolver/enums/index.js +1 -1
- package/dist/modules/elysia/db-resolver/index.js +9 -9
- package/dist/modules/elysia/error/enums/error.keys.d.ts +4 -4
- package/dist/modules/elysia/error/enums/index.js +1 -1
- package/dist/modules/elysia/error/error.d.ts +5 -5
- package/dist/modules/elysia/error/index.js +14 -14
- package/dist/modules/elysia/microservice/enums/index.js +1 -1
- package/dist/modules/elysia/microservice/enums/microservice-success-keys.d.ts +2 -2
- package/dist/modules/elysia/microservice/index.js +1 -1
- package/dist/modules/elysia/rate-limit/enums/index.js +1 -1
- package/dist/modules/elysia/rate-limit/enums/rate-limit-error-keys.d.ts +1 -1
- package/dist/modules/elysia/rate-limit/index.js +5 -5
- package/dist/modules/elysia/rate-limit/rate-limit.d.ts +3 -292
- package/dist/modules/jwt/enums/index.js +2 -2
- package/dist/modules/jwt/enums/jwt-error-keys.d.ts +3 -3
- package/dist/modules/jwt/enums/parse-human-time-to-seconds-error-keys.d.ts +1 -1
- package/dist/modules/jwt/index.js +7 -9
- package/dist/modules/jwt/utils/index.js +3 -3
- package/dist/modules/jwt/utils/parse-human-time-to-seconds.d.ts +1 -1
- package/dist/modules/kv-store/bun-redis/index.js +7 -7
- package/dist/modules/kv-store/enums/index.js +1 -1
- package/dist/modules/kv-store/enums/kv-store-error-keys.d.ts +3 -3
- package/dist/modules/kv-store/ioredis/index.js +7 -7
- package/dist/modules/kv-store/memory/index.js +3 -3
- package/dist/modules/logger/enums/index.js +1 -1
- package/dist/modules/logger/enums/logger-error-keys.d.ts +7 -7
- package/dist/modules/logger/events/logger-events.d.ts +4 -4
- package/dist/modules/logger/index.js +11 -10
- package/dist/modules/logger/logger.d.ts +1 -1
- package/dist/modules/logger/sinks/file-logger/enums/file-logger-error-keys.d.ts +1 -1
- package/dist/modules/logger/sinks/index.js +4 -4
- package/dist/modules/mailer/enums/index.js +1 -1
- package/dist/modules/mailer/enums/mailer-error-keys.d.ts +3 -3
- package/dist/modules/mailer/index.js +6 -6
- package/dist/modules/mailer/smtp.d.ts +4 -4
- package/dist/modules/repository/index.js +4 -4
- package/dist/modules/repository/repository.d.ts +6 -6
- package/dist/modules/singleton-manager/enums/index.js +1 -1
- package/dist/modules/singleton-manager/enums/singleton-manager-error-keys.d.ts +2 -2
- package/dist/modules/singleton-manager/index.js +3 -3
- package/dist/modules/singleton-manager/singleton-manager.d.ts +3 -3
- package/dist/modules/totp/enums/index.js +1 -1
- package/dist/modules/totp/enums/totp-error-keys.d.ts +5 -5
- package/dist/modules/totp/index.js +6 -6
- package/dist/modules/totp/otp-auth-uri.d.ts +1 -1
- package/dist/modules/totp/utils/base32.d.ts +1 -1
- package/dist/modules/totp/utils/generate-secret-bytes.d.ts +1 -1
- package/dist/modules/totp/utils/index.js +5 -5
- package/dist/shared/utils/env.d.ts +1 -1
- package/dist/shared/utils/index.js +3 -3
- package/package.json +13 -14
- package/dist/chunk-4v86f7gp.js +0 -59
- package/dist/chunk-6w9ja96e.js +0 -9
- package/dist/chunk-9cgzhc50.js +0 -15
- package/dist/chunk-9d3zvgp6.js +0 -9
- package/dist/chunk-9r5anep5.js +0 -11
- package/dist/chunk-rz5p4j3p.js +0 -13
- package/dist/chunk-spnh9dzk.js +0 -10
- package/dist/chunk-xhhj1gvj.js +0 -9
- package/dist/chunk-z0ct35ft.js +0 -8
- package/dist/errors/utils/index.d.ts +0 -1
- package/dist/errors/utils/index.js +0 -16
- package/dist/errors/utils/is-nowarajs-error.ts.d.ts +0 -4
|
@@ -103,298 +103,9 @@ export declare const rateLimit: (store?: KvStore) => Elysia<"", {
|
|
|
103
103
|
}, {
|
|
104
104
|
schema: {};
|
|
105
105
|
standaloneSchema: {};
|
|
106
|
-
macro: Partial<
|
|
107
|
-
readonly rateLimit:
|
|
108
|
-
|
|
109
|
-
body: unknown;
|
|
110
|
-
query: Record<string, string>;
|
|
111
|
-
params: {};
|
|
112
|
-
headers: Record<string, string | undefined>;
|
|
113
|
-
cookie: Record<string, import("elysia").Cookie<unknown>>;
|
|
114
|
-
server: import("elysia/universal/server").Server | null;
|
|
115
|
-
redirect: import("elysia").redirect;
|
|
116
|
-
set: {
|
|
117
|
-
headers: HTTPHeaders;
|
|
118
|
-
status?: number | keyof StatusMap;
|
|
119
|
-
redirect?: string;
|
|
120
|
-
cookie?: Record<string, import("elysia/cookies").ElysiaCookie>;
|
|
121
|
-
};
|
|
122
|
-
path: string;
|
|
123
|
-
route: string;
|
|
124
|
-
request: Request;
|
|
125
|
-
store: {};
|
|
126
|
-
status: <const Code extends number | keyof StatusMap, const T = Code extends 100 | 101 | 102 | 103 | 200 | 201 | 202 | 203 | 204 | 205 | 206 | 207 | 208 | 400 | 401 | 402 | 403 | 404 | 405 | 406 | 407 | 408 | 409 | 410 | 411 | 412 | 413 | 414 | 415 | 416 | 417 | 418 | 421 | 422 | 423 | 424 | 425 | 426 | 428 | 429 | 431 | 451 | 500 | 501 | 502 | 503 | 504 | 505 | 506 | 507 | 508 | 510 | 511 | 300 | 301 | 302 | 303 | 304 | 307 | 308 | 420 ? {
|
|
127
|
-
readonly 100: "Continue";
|
|
128
|
-
readonly 101: "Switching Protocols";
|
|
129
|
-
readonly 102: "Processing";
|
|
130
|
-
readonly 103: "Early Hints";
|
|
131
|
-
readonly 200: "OK";
|
|
132
|
-
readonly 201: "Created";
|
|
133
|
-
readonly 202: "Accepted";
|
|
134
|
-
readonly 203: "Non-Authoritative Information";
|
|
135
|
-
readonly 204: "No Content";
|
|
136
|
-
readonly 205: "Reset Content";
|
|
137
|
-
readonly 206: "Partial Content";
|
|
138
|
-
readonly 207: "Multi-Status";
|
|
139
|
-
readonly 208: "Already Reported";
|
|
140
|
-
readonly 300: "Multiple Choices";
|
|
141
|
-
readonly 301: "Moved Permanently";
|
|
142
|
-
readonly 302: "Found";
|
|
143
|
-
readonly 303: "See Other";
|
|
144
|
-
readonly 304: "Not Modified";
|
|
145
|
-
readonly 307: "Temporary Redirect";
|
|
146
|
-
readonly 308: "Permanent Redirect";
|
|
147
|
-
readonly 400: "Bad Request";
|
|
148
|
-
readonly 401: "Unauthorized";
|
|
149
|
-
readonly 402: "Payment Required";
|
|
150
|
-
readonly 403: "Forbidden";
|
|
151
|
-
readonly 404: "Not Found";
|
|
152
|
-
readonly 405: "Method Not Allowed";
|
|
153
|
-
readonly 406: "Not Acceptable";
|
|
154
|
-
readonly 407: "Proxy Authentication Required";
|
|
155
|
-
readonly 408: "Request Timeout";
|
|
156
|
-
readonly 409: "Conflict";
|
|
157
|
-
readonly 410: "Gone";
|
|
158
|
-
readonly 411: "Length Required";
|
|
159
|
-
readonly 412: "Precondition Failed";
|
|
160
|
-
readonly 413: "Payload Too Large";
|
|
161
|
-
readonly 414: "URI Too Long";
|
|
162
|
-
readonly 415: "Unsupported Media Type";
|
|
163
|
-
readonly 416: "Range Not Satisfiable";
|
|
164
|
-
readonly 417: "Expectation Failed";
|
|
165
|
-
readonly 418: "I'm a teapot";
|
|
166
|
-
readonly 420: "Enhance Your Calm";
|
|
167
|
-
readonly 421: "Misdirected Request";
|
|
168
|
-
readonly 422: "Unprocessable Content";
|
|
169
|
-
readonly 423: "Locked";
|
|
170
|
-
readonly 424: "Failed Dependency";
|
|
171
|
-
readonly 425: "Too Early";
|
|
172
|
-
readonly 426: "Upgrade Required";
|
|
173
|
-
readonly 428: "Precondition Required";
|
|
174
|
-
readonly 429: "Too Many Requests";
|
|
175
|
-
readonly 431: "Request Header Fields Too Large";
|
|
176
|
-
readonly 451: "Unavailable For Legal Reasons";
|
|
177
|
-
readonly 500: "Internal Server Error";
|
|
178
|
-
readonly 501: "Not Implemented";
|
|
179
|
-
readonly 502: "Bad Gateway";
|
|
180
|
-
readonly 503: "Service Unavailable";
|
|
181
|
-
readonly 504: "Gateway Timeout";
|
|
182
|
-
readonly 505: "HTTP Version Not Supported";
|
|
183
|
-
readonly 506: "Variant Also Negotiates";
|
|
184
|
-
readonly 507: "Insufficient Storage";
|
|
185
|
-
readonly 508: "Loop Detected";
|
|
186
|
-
readonly 510: "Not Extended";
|
|
187
|
-
readonly 511: "Network Authentication Required";
|
|
188
|
-
}[Code] : Code>(code: Code, response?: T) => import("elysia").ElysiaCustomStatusResponse<Code, T, Code extends "Continue" | "Switching Protocols" | "Processing" | "Early Hints" | "OK" | "Created" | "Accepted" | "Non-Authoritative Information" | "No Content" | "Reset Content" | "Partial Content" | "Multi-Status" | "Already Reported" | "Multiple Choices" | "Moved Permanently" | "Found" | "See Other" | "Not Modified" | "Temporary Redirect" | "Permanent Redirect" | "Bad Request" | "Unauthorized" | "Payment Required" | "Forbidden" | "Not Found" | "Method Not Allowed" | "Not Acceptable" | "Proxy Authentication Required" | "Request Timeout" | "Conflict" | "Gone" | "Length Required" | "Precondition Failed" | "Payload Too Large" | "URI Too Long" | "Unsupported Media Type" | "Range Not Satisfiable" | "Expectation Failed" | "I'm a teapot" | "Enhance Your Calm" | "Misdirected Request" | "Unprocessable Content" | "Locked" | "Failed Dependency" | "Too Early" | "Upgrade Required" | "Precondition Required" | "Too Many Requests" | "Request Header Fields Too Large" | "Unavailable For Legal Reasons" | "Internal Server Error" | "Not Implemented" | "Bad Gateway" | "Service Unavailable" | "Gateway Timeout" | "HTTP Version Not Supported" | "Variant Also Negotiates" | "Insufficient Storage" | "Loop Detected" | "Not Extended" | "Network Authentication Required" ? {
|
|
189
|
-
readonly Continue: 100;
|
|
190
|
-
readonly "Switching Protocols": 101;
|
|
191
|
-
readonly Processing: 102;
|
|
192
|
-
readonly "Early Hints": 103;
|
|
193
|
-
readonly OK: 200;
|
|
194
|
-
readonly Created: 201;
|
|
195
|
-
readonly Accepted: 202;
|
|
196
|
-
readonly "Non-Authoritative Information": 203;
|
|
197
|
-
readonly "No Content": 204;
|
|
198
|
-
readonly "Reset Content": 205;
|
|
199
|
-
readonly "Partial Content": 206;
|
|
200
|
-
readonly "Multi-Status": 207;
|
|
201
|
-
readonly "Already Reported": 208;
|
|
202
|
-
readonly "Multiple Choices": 300;
|
|
203
|
-
readonly "Moved Permanently": 301;
|
|
204
|
-
readonly Found: 302;
|
|
205
|
-
readonly "See Other": 303;
|
|
206
|
-
readonly "Not Modified": 304;
|
|
207
|
-
readonly "Temporary Redirect": 307;
|
|
208
|
-
readonly "Permanent Redirect": 308;
|
|
209
|
-
readonly "Bad Request": 400;
|
|
210
|
-
readonly Unauthorized: 401;
|
|
211
|
-
readonly "Payment Required": 402;
|
|
212
|
-
readonly Forbidden: 403;
|
|
213
|
-
readonly "Not Found": 404;
|
|
214
|
-
readonly "Method Not Allowed": 405;
|
|
215
|
-
readonly "Not Acceptable": 406;
|
|
216
|
-
readonly "Proxy Authentication Required": 407;
|
|
217
|
-
readonly "Request Timeout": 408;
|
|
218
|
-
readonly Conflict: 409;
|
|
219
|
-
readonly Gone: 410;
|
|
220
|
-
readonly "Length Required": 411;
|
|
221
|
-
readonly "Precondition Failed": 412;
|
|
222
|
-
readonly "Payload Too Large": 413;
|
|
223
|
-
readonly "URI Too Long": 414;
|
|
224
|
-
readonly "Unsupported Media Type": 415;
|
|
225
|
-
readonly "Range Not Satisfiable": 416;
|
|
226
|
-
readonly "Expectation Failed": 417;
|
|
227
|
-
readonly "I'm a teapot": 418;
|
|
228
|
-
readonly "Enhance Your Calm": 420;
|
|
229
|
-
readonly "Misdirected Request": 421;
|
|
230
|
-
readonly "Unprocessable Content": 422;
|
|
231
|
-
readonly Locked: 423;
|
|
232
|
-
readonly "Failed Dependency": 424;
|
|
233
|
-
readonly "Too Early": 425;
|
|
234
|
-
readonly "Upgrade Required": 426;
|
|
235
|
-
readonly "Precondition Required": 428;
|
|
236
|
-
readonly "Too Many Requests": 429;
|
|
237
|
-
readonly "Request Header Fields Too Large": 431;
|
|
238
|
-
readonly "Unavailable For Legal Reasons": 451;
|
|
239
|
-
readonly "Internal Server Error": 500;
|
|
240
|
-
readonly "Not Implemented": 501;
|
|
241
|
-
readonly "Bad Gateway": 502;
|
|
242
|
-
readonly "Service Unavailable": 503;
|
|
243
|
-
readonly "Gateway Timeout": 504;
|
|
244
|
-
readonly "HTTP Version Not Supported": 505;
|
|
245
|
-
readonly "Variant Also Negotiates": 506;
|
|
246
|
-
readonly "Insufficient Storage": 507;
|
|
247
|
-
readonly "Loop Detected": 508;
|
|
248
|
-
readonly "Not Extended": 510;
|
|
249
|
-
readonly "Network Authentication Required": 511;
|
|
250
|
-
}[Code] : Code>;
|
|
251
|
-
}) => void;
|
|
252
|
-
readonly beforeHandle: ({ set, request, server }: {
|
|
253
|
-
body: unknown;
|
|
254
|
-
query: Record<string, string>;
|
|
255
|
-
params: {};
|
|
256
|
-
headers: Record<string, string | undefined>;
|
|
257
|
-
cookie: Record<string, import("elysia").Cookie<unknown>>;
|
|
258
|
-
server: import("elysia/universal/server").Server | null;
|
|
259
|
-
redirect: import("elysia").redirect;
|
|
260
|
-
set: {
|
|
261
|
-
headers: HTTPHeaders;
|
|
262
|
-
status?: number | keyof StatusMap;
|
|
263
|
-
redirect?: string;
|
|
264
|
-
cookie?: Record<string, import("elysia/cookies").ElysiaCookie>;
|
|
265
|
-
};
|
|
266
|
-
path: string;
|
|
267
|
-
route: string;
|
|
268
|
-
request: Request;
|
|
269
|
-
store: {};
|
|
270
|
-
status: <const Code extends number | keyof StatusMap, const T = Code extends 100 | 101 | 102 | 103 | 200 | 201 | 202 | 203 | 204 | 205 | 206 | 207 | 208 | 400 | 401 | 402 | 403 | 404 | 405 | 406 | 407 | 408 | 409 | 410 | 411 | 412 | 413 | 414 | 415 | 416 | 417 | 418 | 421 | 422 | 423 | 424 | 425 | 426 | 428 | 429 | 431 | 451 | 500 | 501 | 502 | 503 | 504 | 505 | 506 | 507 | 508 | 510 | 511 | 300 | 301 | 302 | 303 | 304 | 307 | 308 | 420 ? {
|
|
271
|
-
readonly 100: "Continue";
|
|
272
|
-
readonly 101: "Switching Protocols";
|
|
273
|
-
readonly 102: "Processing";
|
|
274
|
-
readonly 103: "Early Hints";
|
|
275
|
-
readonly 200: "OK";
|
|
276
|
-
readonly 201: "Created";
|
|
277
|
-
readonly 202: "Accepted";
|
|
278
|
-
readonly 203: "Non-Authoritative Information";
|
|
279
|
-
readonly 204: "No Content";
|
|
280
|
-
readonly 205: "Reset Content";
|
|
281
|
-
readonly 206: "Partial Content";
|
|
282
|
-
readonly 207: "Multi-Status";
|
|
283
|
-
readonly 208: "Already Reported";
|
|
284
|
-
readonly 300: "Multiple Choices";
|
|
285
|
-
readonly 301: "Moved Permanently";
|
|
286
|
-
readonly 302: "Found";
|
|
287
|
-
readonly 303: "See Other";
|
|
288
|
-
readonly 304: "Not Modified";
|
|
289
|
-
readonly 307: "Temporary Redirect";
|
|
290
|
-
readonly 308: "Permanent Redirect";
|
|
291
|
-
readonly 400: "Bad Request";
|
|
292
|
-
readonly 401: "Unauthorized";
|
|
293
|
-
readonly 402: "Payment Required";
|
|
294
|
-
readonly 403: "Forbidden";
|
|
295
|
-
readonly 404: "Not Found";
|
|
296
|
-
readonly 405: "Method Not Allowed";
|
|
297
|
-
readonly 406: "Not Acceptable";
|
|
298
|
-
readonly 407: "Proxy Authentication Required";
|
|
299
|
-
readonly 408: "Request Timeout";
|
|
300
|
-
readonly 409: "Conflict";
|
|
301
|
-
readonly 410: "Gone";
|
|
302
|
-
readonly 411: "Length Required";
|
|
303
|
-
readonly 412: "Precondition Failed";
|
|
304
|
-
readonly 413: "Payload Too Large";
|
|
305
|
-
readonly 414: "URI Too Long";
|
|
306
|
-
readonly 415: "Unsupported Media Type";
|
|
307
|
-
readonly 416: "Range Not Satisfiable";
|
|
308
|
-
readonly 417: "Expectation Failed";
|
|
309
|
-
readonly 418: "I'm a teapot";
|
|
310
|
-
readonly 420: "Enhance Your Calm";
|
|
311
|
-
readonly 421: "Misdirected Request";
|
|
312
|
-
readonly 422: "Unprocessable Content";
|
|
313
|
-
readonly 423: "Locked";
|
|
314
|
-
readonly 424: "Failed Dependency";
|
|
315
|
-
readonly 425: "Too Early";
|
|
316
|
-
readonly 426: "Upgrade Required";
|
|
317
|
-
readonly 428: "Precondition Required";
|
|
318
|
-
readonly 429: "Too Many Requests";
|
|
319
|
-
readonly 431: "Request Header Fields Too Large";
|
|
320
|
-
readonly 451: "Unavailable For Legal Reasons";
|
|
321
|
-
readonly 500: "Internal Server Error";
|
|
322
|
-
readonly 501: "Not Implemented";
|
|
323
|
-
readonly 502: "Bad Gateway";
|
|
324
|
-
readonly 503: "Service Unavailable";
|
|
325
|
-
readonly 504: "Gateway Timeout";
|
|
326
|
-
readonly 505: "HTTP Version Not Supported";
|
|
327
|
-
readonly 506: "Variant Also Negotiates";
|
|
328
|
-
readonly 507: "Insufficient Storage";
|
|
329
|
-
readonly 508: "Loop Detected";
|
|
330
|
-
readonly 510: "Not Extended";
|
|
331
|
-
readonly 511: "Network Authentication Required";
|
|
332
|
-
}[Code] : Code>(code: Code, response?: T) => import("elysia").ElysiaCustomStatusResponse<Code, T, Code extends "Continue" | "Switching Protocols" | "Processing" | "Early Hints" | "OK" | "Created" | "Accepted" | "Non-Authoritative Information" | "No Content" | "Reset Content" | "Partial Content" | "Multi-Status" | "Already Reported" | "Multiple Choices" | "Moved Permanently" | "Found" | "See Other" | "Not Modified" | "Temporary Redirect" | "Permanent Redirect" | "Bad Request" | "Unauthorized" | "Payment Required" | "Forbidden" | "Not Found" | "Method Not Allowed" | "Not Acceptable" | "Proxy Authentication Required" | "Request Timeout" | "Conflict" | "Gone" | "Length Required" | "Precondition Failed" | "Payload Too Large" | "URI Too Long" | "Unsupported Media Type" | "Range Not Satisfiable" | "Expectation Failed" | "I'm a teapot" | "Enhance Your Calm" | "Misdirected Request" | "Unprocessable Content" | "Locked" | "Failed Dependency" | "Too Early" | "Upgrade Required" | "Precondition Required" | "Too Many Requests" | "Request Header Fields Too Large" | "Unavailable For Legal Reasons" | "Internal Server Error" | "Not Implemented" | "Bad Gateway" | "Service Unavailable" | "Gateway Timeout" | "HTTP Version Not Supported" | "Variant Also Negotiates" | "Insufficient Storage" | "Loop Detected" | "Not Extended" | "Network Authentication Required" ? {
|
|
333
|
-
readonly Continue: 100;
|
|
334
|
-
readonly "Switching Protocols": 101;
|
|
335
|
-
readonly Processing: 102;
|
|
336
|
-
readonly "Early Hints": 103;
|
|
337
|
-
readonly OK: 200;
|
|
338
|
-
readonly Created: 201;
|
|
339
|
-
readonly Accepted: 202;
|
|
340
|
-
readonly "Non-Authoritative Information": 203;
|
|
341
|
-
readonly "No Content": 204;
|
|
342
|
-
readonly "Reset Content": 205;
|
|
343
|
-
readonly "Partial Content": 206;
|
|
344
|
-
readonly "Multi-Status": 207;
|
|
345
|
-
readonly "Already Reported": 208;
|
|
346
|
-
readonly "Multiple Choices": 300;
|
|
347
|
-
readonly "Moved Permanently": 301;
|
|
348
|
-
readonly Found: 302;
|
|
349
|
-
readonly "See Other": 303;
|
|
350
|
-
readonly "Not Modified": 304;
|
|
351
|
-
readonly "Temporary Redirect": 307;
|
|
352
|
-
readonly "Permanent Redirect": 308;
|
|
353
|
-
readonly "Bad Request": 400;
|
|
354
|
-
readonly Unauthorized: 401;
|
|
355
|
-
readonly "Payment Required": 402;
|
|
356
|
-
readonly Forbidden: 403;
|
|
357
|
-
readonly "Not Found": 404;
|
|
358
|
-
readonly "Method Not Allowed": 405;
|
|
359
|
-
readonly "Not Acceptable": 406;
|
|
360
|
-
readonly "Proxy Authentication Required": 407;
|
|
361
|
-
readonly "Request Timeout": 408;
|
|
362
|
-
readonly Conflict: 409;
|
|
363
|
-
readonly Gone: 410;
|
|
364
|
-
readonly "Length Required": 411;
|
|
365
|
-
readonly "Precondition Failed": 412;
|
|
366
|
-
readonly "Payload Too Large": 413;
|
|
367
|
-
readonly "URI Too Long": 414;
|
|
368
|
-
readonly "Unsupported Media Type": 415;
|
|
369
|
-
readonly "Range Not Satisfiable": 416;
|
|
370
|
-
readonly "Expectation Failed": 417;
|
|
371
|
-
readonly "I'm a teapot": 418;
|
|
372
|
-
readonly "Enhance Your Calm": 420;
|
|
373
|
-
readonly "Misdirected Request": 421;
|
|
374
|
-
readonly "Unprocessable Content": 422;
|
|
375
|
-
readonly Locked: 423;
|
|
376
|
-
readonly "Failed Dependency": 424;
|
|
377
|
-
readonly "Too Early": 425;
|
|
378
|
-
readonly "Upgrade Required": 426;
|
|
379
|
-
readonly "Precondition Required": 428;
|
|
380
|
-
readonly "Too Many Requests": 429;
|
|
381
|
-
readonly "Request Header Fields Too Large": 431;
|
|
382
|
-
readonly "Unavailable For Legal Reasons": 451;
|
|
383
|
-
readonly "Internal Server Error": 500;
|
|
384
|
-
readonly "Not Implemented": 501;
|
|
385
|
-
readonly "Bad Gateway": 502;
|
|
386
|
-
readonly "Service Unavailable": 503;
|
|
387
|
-
readonly "Gateway Timeout": 504;
|
|
388
|
-
readonly "HTTP Version Not Supported": 505;
|
|
389
|
-
readonly "Variant Also Negotiates": 506;
|
|
390
|
-
readonly "Insufficient Storage": 507;
|
|
391
|
-
readonly "Loop Detected": 508;
|
|
392
|
-
readonly "Not Extended": 510;
|
|
393
|
-
readonly "Network Authentication Required": 511;
|
|
394
|
-
}[Code] : Code>;
|
|
395
|
-
}) => Promise<void>;
|
|
396
|
-
};
|
|
397
|
-
}>>;
|
|
106
|
+
macro: Partial<{
|
|
107
|
+
readonly rateLimit: RateLimitOptions;
|
|
108
|
+
}>;
|
|
398
109
|
macroFn: {
|
|
399
110
|
readonly rateLimit: ({ limit, window }: RateLimitOptions) => {
|
|
400
111
|
readonly transform: ({ request }: {
|
|
@@ -1,10 +1,10 @@
|
|
|
1
1
|
// @bun
|
|
2
2
|
import {
|
|
3
3
|
JWT_ERROR_KEYS
|
|
4
|
-
} from "../../../chunk-
|
|
4
|
+
} from "../../../chunk-zn2nm5gg.js";
|
|
5
5
|
import {
|
|
6
6
|
PARSE_HUMAN_TIME_TO_SECONDS_ERROR_KEYS
|
|
7
|
-
} from "../../../chunk-
|
|
7
|
+
} from "../../../chunk-dmsev7vs.js";
|
|
8
8
|
export {
|
|
9
9
|
PARSE_HUMAN_TIME_TO_SECONDS_ERROR_KEYS,
|
|
10
10
|
JWT_ERROR_KEYS
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
export declare const JWT_ERROR_KEYS: {
|
|
2
|
-
readonly JWT_EXPIRATION_PASSED: "mrx-core.jwt.error.expiration_passed";
|
|
3
|
-
readonly JWT_SECRET_NOT_FOUND: "mrx-core.jwt.error.secret_not_found";
|
|
4
|
-
readonly JWT_SIGN_ERROR: "mrx-core.jwt.error.sign_error";
|
|
2
|
+
readonly JWT_EXPIRATION_PASSED: "mrx.mrx-core.jwt.error.expiration_passed";
|
|
3
|
+
readonly JWT_SECRET_NOT_FOUND: "mrx.mrx-core.jwt.error.secret_not_found";
|
|
4
|
+
readonly JWT_SIGN_ERROR: "mrx.mrx-core.jwt.error.sign_error";
|
|
5
5
|
};
|
|
@@ -1,3 +1,3 @@
|
|
|
1
1
|
export declare const PARSE_HUMAN_TIME_TO_SECONDS_ERROR_KEYS: {
|
|
2
|
-
readonly INVALID_TIME_EXPRESSION: "mrx-core.parse_human_time_to_seconds.error.invalid_time_expression";
|
|
2
|
+
readonly INVALID_TIME_EXPRESSION: "mrx.mrx-core.jwt.parse_human_time_to_seconds.error.invalid_time_expression";
|
|
3
3
|
};
|
|
@@ -1,16 +1,14 @@
|
|
|
1
1
|
// @bun
|
|
2
2
|
import {
|
|
3
3
|
JWT_ERROR_KEYS
|
|
4
|
-
} from "../../chunk-
|
|
4
|
+
} from "../../chunk-zn2nm5gg.js";
|
|
5
5
|
import {
|
|
6
6
|
parseHumanTimeToSeconds
|
|
7
|
-
} from "../../chunk-
|
|
8
|
-
import"../../chunk-
|
|
7
|
+
} from "../../chunk-awphtyzp.js";
|
|
8
|
+
import"../../chunk-dmsev7vs.js";
|
|
9
9
|
import {
|
|
10
|
-
|
|
11
|
-
} from "../../chunk-
|
|
12
|
-
import"../../chunk-sqts8vyk.js";
|
|
13
|
-
import"../../chunk-9cgzhc50.js";
|
|
10
|
+
InternalError
|
|
11
|
+
} from "../../chunk-jz3wd472.js";
|
|
14
12
|
|
|
15
13
|
// source/modules/jwt/jwt.ts
|
|
16
14
|
import {
|
|
@@ -20,7 +18,7 @@ import {
|
|
|
20
18
|
var signJWT = (secret, payload, expiration = 60 * 15) => {
|
|
21
19
|
const exp = expiration instanceof Date ? Math.floor(expiration.getTime() / 1000) : typeof expiration === "number" ? Math.floor(Date.now() / 1000) + expiration : Math.floor(Date.now() / 1000) + parseHumanTimeToSeconds(expiration);
|
|
22
20
|
if (exp <= Math.floor(Date.now() / 1000))
|
|
23
|
-
throw new
|
|
21
|
+
throw new InternalError(JWT_ERROR_KEYS.JWT_EXPIRATION_PASSED);
|
|
24
22
|
const finalPayload = {
|
|
25
23
|
iss: "Core-Issuer",
|
|
26
24
|
sub: "",
|
|
@@ -35,7 +33,7 @@ var signJWT = (secret, payload, expiration = 60 * 15) => {
|
|
|
35
33
|
const jwt = new SignJWT(finalPayload).setProtectedHeader({ alg: "HS256", typ: "JWT" }).setIssuer(finalPayload.iss).setSubject(finalPayload.sub).setAudience(finalPayload.aud).setJti(finalPayload.jti).setNotBefore(finalPayload.nbf).setIssuedAt(finalPayload.iat).setExpirationTime(exp).sign(new TextEncoder().encode(secret));
|
|
36
34
|
return jwt;
|
|
37
35
|
} catch (error) {
|
|
38
|
-
throw new
|
|
36
|
+
throw new InternalError(JWT_ERROR_KEYS.JWT_SIGN_ERROR, error);
|
|
39
37
|
}
|
|
40
38
|
};
|
|
41
39
|
var verifyJWT = async (token, secret) => {
|
|
@@ -1,9 +1,9 @@
|
|
|
1
1
|
// @bun
|
|
2
2
|
import {
|
|
3
3
|
parseHumanTimeToSeconds
|
|
4
|
-
} from "../../../chunk-
|
|
5
|
-
import"../../../chunk-
|
|
6
|
-
import"../../../chunk-
|
|
4
|
+
} from "../../../chunk-awphtyzp.js";
|
|
5
|
+
import"../../../chunk-dmsev7vs.js";
|
|
6
|
+
import"../../../chunk-jz3wd472.js";
|
|
7
7
|
export {
|
|
8
8
|
parseHumanTimeToSeconds
|
|
9
9
|
};
|
|
@@ -3,7 +3,7 @@
|
|
|
3
3
|
*
|
|
4
4
|
* @param timeExpression - A string representing a time period (e.g., "2 hours", "30 minutes ago", "+1 day")
|
|
5
5
|
*
|
|
6
|
-
* @throws ({@link
|
|
6
|
+
* @throws ({@link InternalError}) - If the time expression is invalid or contains an unknown unit
|
|
7
7
|
*
|
|
8
8
|
* @returns The time period in seconds (negative for past times)
|
|
9
9
|
*
|
|
@@ -1,10 +1,10 @@
|
|
|
1
1
|
// @bun
|
|
2
2
|
import {
|
|
3
3
|
KV_STORE_ERROR_KEYS
|
|
4
|
-
} from "../../../chunk-
|
|
4
|
+
} from "../../../chunk-8pw0syzf.js";
|
|
5
5
|
import {
|
|
6
|
-
|
|
7
|
-
} from "../../../chunk-
|
|
6
|
+
InternalError
|
|
7
|
+
} from "../../../chunk-jz3wd472.js";
|
|
8
8
|
|
|
9
9
|
// source/modules/kv-store/bun-redis/bun-redis-store.ts
|
|
10
10
|
var {RedisClient } = globalThis.Bun;
|
|
@@ -17,14 +17,14 @@ class BunRedisStore {
|
|
|
17
17
|
try {
|
|
18
18
|
await this._client.connect();
|
|
19
19
|
} catch (e) {
|
|
20
|
-
throw new
|
|
20
|
+
throw new InternalError(KV_STORE_ERROR_KEYS.CONNECTION_FAILED, e);
|
|
21
21
|
}
|
|
22
22
|
}
|
|
23
23
|
close() {
|
|
24
24
|
try {
|
|
25
25
|
this._client.close();
|
|
26
26
|
} catch (e) {
|
|
27
|
-
throw new
|
|
27
|
+
throw new InternalError(KV_STORE_ERROR_KEYS.CLOSING_CONNECTION_FAILED, e);
|
|
28
28
|
}
|
|
29
29
|
}
|
|
30
30
|
async get(key) {
|
|
@@ -49,7 +49,7 @@ class BunRedisStore {
|
|
|
49
49
|
const number = await this._client.incrby(key, amount ?? 1);
|
|
50
50
|
return number;
|
|
51
51
|
} catch (e) {
|
|
52
|
-
throw new
|
|
52
|
+
throw new InternalError(KV_STORE_ERROR_KEYS.NOT_INTEGER, e);
|
|
53
53
|
}
|
|
54
54
|
}
|
|
55
55
|
async decrement(key, amount) {
|
|
@@ -57,7 +57,7 @@ class BunRedisStore {
|
|
|
57
57
|
const number = await this._client.decrby(key, amount ?? 1);
|
|
58
58
|
return number;
|
|
59
59
|
} catch (e) {
|
|
60
|
-
throw new
|
|
60
|
+
throw new InternalError(KV_STORE_ERROR_KEYS.NOT_INTEGER, e);
|
|
61
61
|
}
|
|
62
62
|
}
|
|
63
63
|
async del(key) {
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
export declare const KV_STORE_ERROR_KEYS: {
|
|
2
|
-
readonly CLOSING_CONNECTION_FAILED: "mrx-core.kv-store.error.closing_connection_failed";
|
|
3
|
-
readonly CONNECTION_FAILED: "mrx-core.kv-store.error.connection_failed";
|
|
4
|
-
readonly NOT_INTEGER: "mrx-core.kv-store.error.not_integer";
|
|
2
|
+
readonly CLOSING_CONNECTION_FAILED: "mrx.mrx-core.kv-store.error.closing_connection_failed";
|
|
3
|
+
readonly CONNECTION_FAILED: "mrx.mrx-core.kv-store.error.connection_failed";
|
|
4
|
+
readonly NOT_INTEGER: "mrx.mrx-core.kv-store.error.not_integer";
|
|
5
5
|
};
|
|
@@ -1,10 +1,10 @@
|
|
|
1
1
|
// @bun
|
|
2
2
|
import {
|
|
3
3
|
KV_STORE_ERROR_KEYS
|
|
4
|
-
} from "../../../chunk-
|
|
4
|
+
} from "../../../chunk-8pw0syzf.js";
|
|
5
5
|
import {
|
|
6
|
-
|
|
7
|
-
} from "../../../chunk-
|
|
6
|
+
InternalError
|
|
7
|
+
} from "../../../chunk-jz3wd472.js";
|
|
8
8
|
|
|
9
9
|
// source/modules/kv-store/ioredis/ioredis-store.ts
|
|
10
10
|
import { Redis } from "ioredis";
|
|
@@ -20,14 +20,14 @@ class IoRedisStore {
|
|
|
20
20
|
try {
|
|
21
21
|
await this._client.connect();
|
|
22
22
|
} catch (e) {
|
|
23
|
-
throw new
|
|
23
|
+
throw new InternalError(KV_STORE_ERROR_KEYS.CONNECTION_FAILED, e);
|
|
24
24
|
}
|
|
25
25
|
}
|
|
26
26
|
async close() {
|
|
27
27
|
try {
|
|
28
28
|
await this._client.quit();
|
|
29
29
|
} catch (e) {
|
|
30
|
-
throw new
|
|
30
|
+
throw new InternalError(KV_STORE_ERROR_KEYS.CLOSING_CONNECTION_FAILED, e);
|
|
31
31
|
}
|
|
32
32
|
}
|
|
33
33
|
async get(key) {
|
|
@@ -52,7 +52,7 @@ class IoRedisStore {
|
|
|
52
52
|
const number = await this._client.incrby(key, amount);
|
|
53
53
|
return number;
|
|
54
54
|
} catch (e) {
|
|
55
|
-
throw new
|
|
55
|
+
throw new InternalError(KV_STORE_ERROR_KEYS.NOT_INTEGER, e);
|
|
56
56
|
}
|
|
57
57
|
}
|
|
58
58
|
async decrement(key, amount = 1) {
|
|
@@ -60,7 +60,7 @@ class IoRedisStore {
|
|
|
60
60
|
const number = await this._client.decrby(key, amount);
|
|
61
61
|
return number;
|
|
62
62
|
} catch (e) {
|
|
63
|
-
throw new
|
|
63
|
+
throw new InternalError(KV_STORE_ERROR_KEYS.NOT_INTEGER, e);
|
|
64
64
|
}
|
|
65
65
|
}
|
|
66
66
|
async del(key) {
|
|
@@ -1,9 +1,9 @@
|
|
|
1
1
|
// @bun
|
|
2
2
|
import {
|
|
3
3
|
MemoryStore
|
|
4
|
-
} from "../../../chunk-
|
|
5
|
-
import"../../../chunk-
|
|
6
|
-
import"../../../chunk-
|
|
4
|
+
} from "../../../chunk-j7dyc5ks.js";
|
|
5
|
+
import"../../../chunk-8pw0syzf.js";
|
|
6
|
+
import"../../../chunk-jz3wd472.js";
|
|
7
7
|
export {
|
|
8
8
|
MemoryStore
|
|
9
9
|
};
|
|
@@ -1,9 +1,9 @@
|
|
|
1
1
|
export declare const LOGGER_ERROR_KEYS: {
|
|
2
|
-
readonly BEFORE_EXIT_CLOSE_ERROR: "mrx-core.logger.error.before_exit_close_error";
|
|
3
|
-
readonly BEFORE_EXIT_FLUSH_ERROR: "mrx-core.logger.error.before_exit_flush_error";
|
|
4
|
-
readonly NO_SINKS_PROVIDED: "mrx-core.logger.error.no_sinks_provided";
|
|
5
|
-
readonly REGISTER_SINK_ERROR: "mrx-core.logger.error.register_sink_error";
|
|
6
|
-
readonly SINK_ALREADY_ADDED: "mrx-core.logger.error.sink_already_added";
|
|
7
|
-
readonly SINK_CLOSE_ERROR: "mrx-core.logger.error.sink_close_error";
|
|
8
|
-
readonly SINK_LOG_ERROR: "mrx-core.logger.error.sink_log_error";
|
|
2
|
+
readonly BEFORE_EXIT_CLOSE_ERROR: "mrx.mrx-core.logger.error.before_exit_close_error";
|
|
3
|
+
readonly BEFORE_EXIT_FLUSH_ERROR: "mrx.mrx-core.logger.error.before_exit_flush_error";
|
|
4
|
+
readonly NO_SINKS_PROVIDED: "mrx.mrx-core.logger.error.no_sinks_provided";
|
|
5
|
+
readonly REGISTER_SINK_ERROR: "mrx.mrx-core.logger.error.register_sink_error";
|
|
6
|
+
readonly SINK_ALREADY_ADDED: "mrx.mrx-core.logger.error.sink_already_added";
|
|
7
|
+
readonly SINK_CLOSE_ERROR: "mrx.mrx-core.logger.error.sink_close_error";
|
|
8
|
+
readonly SINK_LOG_ERROR: "mrx.mrx-core.logger.error.sink_log_error";
|
|
9
9
|
};
|
|
@@ -1,16 +1,16 @@
|
|
|
1
|
-
import type {
|
|
1
|
+
import type { InternalError } from '../../../errors/internal-error';
|
|
2
2
|
export interface LoggerEvent {
|
|
3
|
-
onBeforeExitError: [
|
|
3
|
+
onBeforeExitError: [InternalError<{
|
|
4
4
|
error: Error;
|
|
5
5
|
}>];
|
|
6
6
|
registerSinkError: [
|
|
7
|
-
|
|
7
|
+
InternalError<{
|
|
8
8
|
sinkName: string;
|
|
9
9
|
error: Error;
|
|
10
10
|
}>
|
|
11
11
|
];
|
|
12
12
|
sinkError: [
|
|
13
|
-
|
|
13
|
+
InternalError<{
|
|
14
14
|
sinkName: string;
|
|
15
15
|
object?: unknown;
|
|
16
16
|
error: Error;
|
|
@@ -1,13 +1,14 @@
|
|
|
1
1
|
// @bun
|
|
2
|
+
import"../typed-event-emitter/index.js";
|
|
2
3
|
import {
|
|
3
4
|
LOGGER_ERROR_KEYS
|
|
4
|
-
} from "../../chunk-
|
|
5
|
+
} from "../../chunk-6hs00zfd.js";
|
|
5
6
|
import {
|
|
6
7
|
TypedEventEmitter
|
|
7
8
|
} from "../../chunk-mvrxngm7.js";
|
|
8
9
|
import {
|
|
9
|
-
|
|
10
|
-
} from "../../chunk-
|
|
10
|
+
InternalError
|
|
11
|
+
} from "../../chunk-jz3wd472.js";
|
|
11
12
|
|
|
12
13
|
// source/modules/logger/worker-logger.ts
|
|
13
14
|
var workerFunction = () => {
|
|
@@ -132,7 +133,7 @@ class Logger extends TypedEventEmitter {
|
|
|
132
133
|
}
|
|
133
134
|
registerSink(sinkName, sinkConstructor, ...sinkArgs) {
|
|
134
135
|
if (this._sinks[sinkName])
|
|
135
|
-
throw new
|
|
136
|
+
throw new InternalError(LOGGER_ERROR_KEYS.SINK_ALREADY_ADDED);
|
|
136
137
|
this._worker.postMessage({
|
|
137
138
|
type: "REGISTER_SINK",
|
|
138
139
|
sinkName,
|
|
@@ -179,7 +180,7 @@ class Logger extends TypedEventEmitter {
|
|
|
179
180
|
}
|
|
180
181
|
_enqueue(level, object, sinkNames) {
|
|
181
182
|
if (this._sinkKeys.length === 0)
|
|
182
|
-
throw new
|
|
183
|
+
throw new InternalError(LOGGER_ERROR_KEYS.NO_SINKS_PROVIDED, { level, object });
|
|
183
184
|
if (this._pendingLogs.length >= this._maxPendingLogs)
|
|
184
185
|
return;
|
|
185
186
|
this._pendingLogs.push({
|
|
@@ -242,14 +243,14 @@ class Logger extends TypedEventEmitter {
|
|
|
242
243
|
}
|
|
243
244
|
break;
|
|
244
245
|
case "SINK_LOG_ERROR":
|
|
245
|
-
this.emit("sinkError", new
|
|
246
|
+
this.emit("sinkError", new InternalError(LOGGER_ERROR_KEYS.SINK_LOG_ERROR, event.data));
|
|
246
247
|
this._releaseBatch();
|
|
247
248
|
break;
|
|
248
249
|
case "SINK_CLOSE_ERROR":
|
|
249
|
-
this.emit("sinkError", new
|
|
250
|
+
this.emit("sinkError", new InternalError(LOGGER_ERROR_KEYS.SINK_CLOSE_ERROR, event.data));
|
|
250
251
|
break;
|
|
251
252
|
case "REGISTER_SINK_ERROR":
|
|
252
|
-
this.emit("registerSinkError", new
|
|
253
|
+
this.emit("registerSinkError", new InternalError(LOGGER_ERROR_KEYS.REGISTER_SINK_ERROR, event.data));
|
|
253
254
|
break;
|
|
254
255
|
case "CLOSE_COMPLETE":
|
|
255
256
|
this._worker.terminate();
|
|
@@ -269,11 +270,11 @@ class Logger extends TypedEventEmitter {
|
|
|
269
270
|
_handleBeforeExit = () => {
|
|
270
271
|
if (this._flushOnBeforeExit)
|
|
271
272
|
this.flush().then(() => this.close()).catch((error) => {
|
|
272
|
-
this.emit("onBeforeExitError", new
|
|
273
|
+
this.emit("onBeforeExitError", new InternalError(LOGGER_ERROR_KEYS.BEFORE_EXIT_FLUSH_ERROR, { error }));
|
|
273
274
|
});
|
|
274
275
|
else
|
|
275
276
|
this.close().catch((error) => {
|
|
276
|
-
this.emit("onBeforeExitError", new
|
|
277
|
+
this.emit("onBeforeExitError", new InternalError(LOGGER_ERROR_KEYS.BEFORE_EXIT_CLOSE_ERROR, { error }));
|
|
277
278
|
});
|
|
278
279
|
};
|
|
279
280
|
}
|