@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
|
@@ -28,162 +28,10 @@ export declare const updateOne: <const TDatabase extends Omit<MSSQLDatabaseOptio
|
|
|
28
28
|
} & {
|
|
29
29
|
schema: {};
|
|
30
30
|
standaloneSchema: {};
|
|
31
|
-
macro: Partial<
|
|
32
|
-
readonly injectDynamicDB:
|
|
33
|
-
|
|
34
|
-
|
|
35
|
-
body: unknown;
|
|
36
|
-
query: Record<string, string>;
|
|
37
|
-
params: Record<string, string>;
|
|
38
|
-
headers: Record<string, string | undefined>;
|
|
39
|
-
cookie: Record<string, import("elysia").Cookie<unknown>>;
|
|
40
|
-
server: import("elysia/universal/server").Server | null;
|
|
41
|
-
redirect: import("elysia").redirect;
|
|
42
|
-
set: {
|
|
43
|
-
headers: import("elysia").HTTPHeaders;
|
|
44
|
-
status?: number | keyof import("elysia").StatusMap;
|
|
45
|
-
redirect?: string;
|
|
46
|
-
cookie?: Record<string, import("elysia/cookies").ElysiaCookie>;
|
|
47
|
-
};
|
|
48
|
-
path: string;
|
|
49
|
-
route: string;
|
|
50
|
-
request: Request;
|
|
51
|
-
store: {};
|
|
52
|
-
status: <const Code extends number | keyof import("elysia").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 ? {
|
|
53
|
-
readonly 100: "Continue";
|
|
54
|
-
readonly 101: "Switching Protocols";
|
|
55
|
-
readonly 102: "Processing";
|
|
56
|
-
readonly 103: "Early Hints";
|
|
57
|
-
readonly 200: "OK";
|
|
58
|
-
readonly 201: "Created";
|
|
59
|
-
readonly 202: "Accepted";
|
|
60
|
-
readonly 203: "Non-Authoritative Information";
|
|
61
|
-
readonly 204: "No Content";
|
|
62
|
-
readonly 205: "Reset Content";
|
|
63
|
-
readonly 206: "Partial Content";
|
|
64
|
-
readonly 207: "Multi-Status";
|
|
65
|
-
readonly 208: "Already Reported";
|
|
66
|
-
readonly 300: "Multiple Choices";
|
|
67
|
-
readonly 301: "Moved Permanently";
|
|
68
|
-
readonly 302: "Found";
|
|
69
|
-
readonly 303: "See Other";
|
|
70
|
-
readonly 304: "Not Modified";
|
|
71
|
-
readonly 307: "Temporary Redirect";
|
|
72
|
-
readonly 308: "Permanent Redirect";
|
|
73
|
-
readonly 400: "Bad Request";
|
|
74
|
-
readonly 401: "Unauthorized";
|
|
75
|
-
readonly 402: "Payment Required";
|
|
76
|
-
readonly 403: "Forbidden";
|
|
77
|
-
readonly 404: "Not Found";
|
|
78
|
-
readonly 405: "Method Not Allowed";
|
|
79
|
-
readonly 406: "Not Acceptable";
|
|
80
|
-
readonly 407: "Proxy Authentication Required";
|
|
81
|
-
readonly 408: "Request Timeout";
|
|
82
|
-
readonly 409: "Conflict";
|
|
83
|
-
readonly 410: "Gone";
|
|
84
|
-
readonly 411: "Length Required";
|
|
85
|
-
readonly 412: "Precondition Failed";
|
|
86
|
-
readonly 413: "Payload Too Large";
|
|
87
|
-
readonly 414: "URI Too Long";
|
|
88
|
-
readonly 415: "Unsupported Media Type";
|
|
89
|
-
readonly 416: "Range Not Satisfiable";
|
|
90
|
-
readonly 417: "Expectation Failed";
|
|
91
|
-
readonly 418: "I'm a teapot";
|
|
92
|
-
readonly 420: "Enhance Your Calm";
|
|
93
|
-
readonly 421: "Misdirected Request";
|
|
94
|
-
readonly 422: "Unprocessable Content";
|
|
95
|
-
readonly 423: "Locked";
|
|
96
|
-
readonly 424: "Failed Dependency";
|
|
97
|
-
readonly 425: "Too Early";
|
|
98
|
-
readonly 426: "Upgrade Required";
|
|
99
|
-
readonly 428: "Precondition Required";
|
|
100
|
-
readonly 429: "Too Many Requests";
|
|
101
|
-
readonly 431: "Request Header Fields Too Large";
|
|
102
|
-
readonly 451: "Unavailable For Legal Reasons";
|
|
103
|
-
readonly 500: "Internal Server Error";
|
|
104
|
-
readonly 501: "Not Implemented";
|
|
105
|
-
readonly 502: "Bad Gateway";
|
|
106
|
-
readonly 503: "Service Unavailable";
|
|
107
|
-
readonly 504: "Gateway Timeout";
|
|
108
|
-
readonly 505: "HTTP Version Not Supported";
|
|
109
|
-
readonly 506: "Variant Also Negotiates";
|
|
110
|
-
readonly 507: "Insufficient Storage";
|
|
111
|
-
readonly 508: "Loop Detected";
|
|
112
|
-
readonly 510: "Not Extended";
|
|
113
|
-
readonly 511: "Network Authentication Required";
|
|
114
|
-
}[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" ? {
|
|
115
|
-
readonly Continue: 100;
|
|
116
|
-
readonly "Switching Protocols": 101;
|
|
117
|
-
readonly Processing: 102;
|
|
118
|
-
readonly "Early Hints": 103;
|
|
119
|
-
readonly OK: 200;
|
|
120
|
-
readonly Created: 201;
|
|
121
|
-
readonly Accepted: 202;
|
|
122
|
-
readonly "Non-Authoritative Information": 203;
|
|
123
|
-
readonly "No Content": 204;
|
|
124
|
-
readonly "Reset Content": 205;
|
|
125
|
-
readonly "Partial Content": 206;
|
|
126
|
-
readonly "Multi-Status": 207;
|
|
127
|
-
readonly "Already Reported": 208;
|
|
128
|
-
readonly "Multiple Choices": 300;
|
|
129
|
-
readonly "Moved Permanently": 301;
|
|
130
|
-
readonly Found: 302;
|
|
131
|
-
readonly "See Other": 303;
|
|
132
|
-
readonly "Not Modified": 304;
|
|
133
|
-
readonly "Temporary Redirect": 307;
|
|
134
|
-
readonly "Permanent Redirect": 308;
|
|
135
|
-
readonly "Bad Request": 400;
|
|
136
|
-
readonly Unauthorized: 401;
|
|
137
|
-
readonly "Payment Required": 402;
|
|
138
|
-
readonly Forbidden: 403;
|
|
139
|
-
readonly "Not Found": 404;
|
|
140
|
-
readonly "Method Not Allowed": 405;
|
|
141
|
-
readonly "Not Acceptable": 406;
|
|
142
|
-
readonly "Proxy Authentication Required": 407;
|
|
143
|
-
readonly "Request Timeout": 408;
|
|
144
|
-
readonly Conflict: 409;
|
|
145
|
-
readonly Gone: 410;
|
|
146
|
-
readonly "Length Required": 411;
|
|
147
|
-
readonly "Precondition Failed": 412;
|
|
148
|
-
readonly "Payload Too Large": 413;
|
|
149
|
-
readonly "URI Too Long": 414;
|
|
150
|
-
readonly "Unsupported Media Type": 415;
|
|
151
|
-
readonly "Range Not Satisfiable": 416;
|
|
152
|
-
readonly "Expectation Failed": 417;
|
|
153
|
-
readonly "I'm a teapot": 418;
|
|
154
|
-
readonly "Enhance Your Calm": 420;
|
|
155
|
-
readonly "Misdirected Request": 421;
|
|
156
|
-
readonly "Unprocessable Content": 422;
|
|
157
|
-
readonly Locked: 423;
|
|
158
|
-
readonly "Failed Dependency": 424;
|
|
159
|
-
readonly "Too Early": 425;
|
|
160
|
-
readonly "Upgrade Required": 426;
|
|
161
|
-
readonly "Precondition Required": 428;
|
|
162
|
-
readonly "Too Many Requests": 429;
|
|
163
|
-
readonly "Request Header Fields Too Large": 431;
|
|
164
|
-
readonly "Unavailable For Legal Reasons": 451;
|
|
165
|
-
readonly "Internal Server Error": 500;
|
|
166
|
-
readonly "Not Implemented": 501;
|
|
167
|
-
readonly "Bad Gateway": 502;
|
|
168
|
-
readonly "Service Unavailable": 503;
|
|
169
|
-
readonly "Gateway Timeout": 504;
|
|
170
|
-
readonly "HTTP Version Not Supported": 505;
|
|
171
|
-
readonly "Variant Also Negotiates": 506;
|
|
172
|
-
readonly "Insufficient Storage": 507;
|
|
173
|
-
readonly "Loop Detected": 508;
|
|
174
|
-
readonly "Not Extended": 510;
|
|
175
|
-
readonly "Network Authentication Required": 511;
|
|
176
|
-
}[Code] : Code>;
|
|
177
|
-
}) => Promise<{
|
|
178
|
-
dynamicDB: MSSQL;
|
|
179
|
-
}>;
|
|
180
|
-
};
|
|
181
|
-
readonly injectStaticDB: (databaseName: string) => {
|
|
182
|
-
readonly resolve: () => {
|
|
183
|
-
staticDB: MSSQL;
|
|
184
|
-
};
|
|
185
|
-
};
|
|
186
|
-
}>>;
|
|
31
|
+
macro: Partial<{
|
|
32
|
+
readonly injectDynamicDB: Omit<MSSQLDatabaseOptions, "databaseName">;
|
|
33
|
+
readonly injectStaticDB: string;
|
|
34
|
+
}>;
|
|
187
35
|
macroFn: {
|
|
188
36
|
readonly injectDynamicDB: (config: Omit<MSSQLDatabaseOptions, "databaseName">) => {
|
|
189
37
|
readonly headers: "dbResolverHeader";
|
|
@@ -352,9 +200,7 @@ export declare const updateOne: <const TDatabase extends Omit<MSSQLDatabaseOptio
|
|
|
352
200
|
response: {
|
|
353
201
|
200: {
|
|
354
202
|
message: "mrx-core.crud.success.update_one_response";
|
|
355
|
-
content:
|
|
356
|
-
[x: string]: /*elided*/ any;
|
|
357
|
-
}[];
|
|
203
|
+
content: Record<string, unknown>[];
|
|
358
204
|
};
|
|
359
205
|
};
|
|
360
206
|
};
|
|
@@ -366,9 +212,7 @@ export declare const updateOne: <const TDatabase extends Omit<MSSQLDatabaseOptio
|
|
|
366
212
|
response: {
|
|
367
213
|
200: {
|
|
368
214
|
message: "mrx-core.crud.success.update_one_response";
|
|
369
|
-
content:
|
|
370
|
-
[x: string]: /*elided*/ any;
|
|
371
|
-
}[];
|
|
215
|
+
content: Record<string, unknown>[];
|
|
372
216
|
};
|
|
373
217
|
};
|
|
374
218
|
};
|
|
@@ -380,9 +224,7 @@ export declare const updateOne: <const TDatabase extends Omit<MSSQLDatabaseOptio
|
|
|
380
224
|
response: {
|
|
381
225
|
200: {
|
|
382
226
|
message: "mrx-core.crud.success.update_one_response";
|
|
383
|
-
content:
|
|
384
|
-
[x: string]: /*elided*/ any;
|
|
385
|
-
}[];
|
|
227
|
+
content: Record<string, unknown>[];
|
|
386
228
|
};
|
|
387
229
|
};
|
|
388
230
|
};
|
|
@@ -394,9 +236,7 @@ export declare const updateOne: <const TDatabase extends Omit<MSSQLDatabaseOptio
|
|
|
394
236
|
response: {
|
|
395
237
|
200: {
|
|
396
238
|
message: "mrx-core.crud.success.update_one_response";
|
|
397
|
-
content:
|
|
398
|
-
[x: string]: /*elided*/ any;
|
|
399
|
-
}[];
|
|
239
|
+
content: Record<string, unknown>[];
|
|
400
240
|
};
|
|
401
241
|
};
|
|
402
242
|
};
|
|
@@ -408,9 +248,7 @@ export declare const updateOne: <const TDatabase extends Omit<MSSQLDatabaseOptio
|
|
|
408
248
|
response: {
|
|
409
249
|
200: {
|
|
410
250
|
message: "mrx-core.crud.success.update_one_response";
|
|
411
|
-
content:
|
|
412
|
-
[x: string]: /*elided*/ any;
|
|
413
|
-
}[];
|
|
251
|
+
content: Record<string, unknown>[];
|
|
414
252
|
};
|
|
415
253
|
};
|
|
416
254
|
};
|
|
@@ -16,11 +16,11 @@ import {
|
|
|
16
16
|
createUpdateOneSchema,
|
|
17
17
|
createUpdateSchema,
|
|
18
18
|
isDateFromElysiaTypeBox
|
|
19
|
-
} from "../../../../chunk-
|
|
19
|
+
} from "../../../../chunk-yxedm2vx.js";
|
|
20
20
|
import"../../../../chunk-9dzsj7f2.js";
|
|
21
|
-
import"../../../../chunk-
|
|
22
|
-
import"../../../../chunk-
|
|
23
|
-
import"../../../../chunk-
|
|
21
|
+
import"../../../../chunk-hv6g22kf.js";
|
|
22
|
+
import"../../../../chunk-10w8mg8e.js";
|
|
23
|
+
import"../../../../chunk-jz3wd472.js";
|
|
24
24
|
export {
|
|
25
25
|
isDateFromElysiaTypeBox,
|
|
26
26
|
createUpdateSchema,
|
|
@@ -16,162 +16,10 @@ export declare const dbResolver: (prefixDatabaseName?: string) => Elysia<"", {
|
|
|
16
16
|
}, {
|
|
17
17
|
schema: {};
|
|
18
18
|
standaloneSchema: {};
|
|
19
|
-
macro: Partial<
|
|
20
|
-
readonly injectDynamicDB:
|
|
21
|
-
|
|
22
|
-
|
|
23
|
-
body: unknown;
|
|
24
|
-
query: Record<string, string>;
|
|
25
|
-
params: Record<string, string>;
|
|
26
|
-
headers: Record<string, string | undefined>;
|
|
27
|
-
cookie: Record<string, import("elysia").Cookie<unknown>>;
|
|
28
|
-
server: import("elysia/universal/server").Server | null;
|
|
29
|
-
redirect: import("elysia").redirect;
|
|
30
|
-
set: {
|
|
31
|
-
headers: import("elysia").HTTPHeaders;
|
|
32
|
-
status?: number | keyof import("elysia").StatusMap;
|
|
33
|
-
redirect?: string;
|
|
34
|
-
cookie?: Record<string, import("elysia/cookies").ElysiaCookie>;
|
|
35
|
-
};
|
|
36
|
-
path: string;
|
|
37
|
-
route: string;
|
|
38
|
-
request: Request;
|
|
39
|
-
store: {};
|
|
40
|
-
status: <const Code extends number | keyof import("elysia").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 ? {
|
|
41
|
-
readonly 100: "Continue";
|
|
42
|
-
readonly 101: "Switching Protocols";
|
|
43
|
-
readonly 102: "Processing";
|
|
44
|
-
readonly 103: "Early Hints";
|
|
45
|
-
readonly 200: "OK";
|
|
46
|
-
readonly 201: "Created";
|
|
47
|
-
readonly 202: "Accepted";
|
|
48
|
-
readonly 203: "Non-Authoritative Information";
|
|
49
|
-
readonly 204: "No Content";
|
|
50
|
-
readonly 205: "Reset Content";
|
|
51
|
-
readonly 206: "Partial Content";
|
|
52
|
-
readonly 207: "Multi-Status";
|
|
53
|
-
readonly 208: "Already Reported";
|
|
54
|
-
readonly 300: "Multiple Choices";
|
|
55
|
-
readonly 301: "Moved Permanently";
|
|
56
|
-
readonly 302: "Found";
|
|
57
|
-
readonly 303: "See Other";
|
|
58
|
-
readonly 304: "Not Modified";
|
|
59
|
-
readonly 307: "Temporary Redirect";
|
|
60
|
-
readonly 308: "Permanent Redirect";
|
|
61
|
-
readonly 400: "Bad Request";
|
|
62
|
-
readonly 401: "Unauthorized";
|
|
63
|
-
readonly 402: "Payment Required";
|
|
64
|
-
readonly 403: "Forbidden";
|
|
65
|
-
readonly 404: "Not Found";
|
|
66
|
-
readonly 405: "Method Not Allowed";
|
|
67
|
-
readonly 406: "Not Acceptable";
|
|
68
|
-
readonly 407: "Proxy Authentication Required";
|
|
69
|
-
readonly 408: "Request Timeout";
|
|
70
|
-
readonly 409: "Conflict";
|
|
71
|
-
readonly 410: "Gone";
|
|
72
|
-
readonly 411: "Length Required";
|
|
73
|
-
readonly 412: "Precondition Failed";
|
|
74
|
-
readonly 413: "Payload Too Large";
|
|
75
|
-
readonly 414: "URI Too Long";
|
|
76
|
-
readonly 415: "Unsupported Media Type";
|
|
77
|
-
readonly 416: "Range Not Satisfiable";
|
|
78
|
-
readonly 417: "Expectation Failed";
|
|
79
|
-
readonly 418: "I'm a teapot";
|
|
80
|
-
readonly 420: "Enhance Your Calm";
|
|
81
|
-
readonly 421: "Misdirected Request";
|
|
82
|
-
readonly 422: "Unprocessable Content";
|
|
83
|
-
readonly 423: "Locked";
|
|
84
|
-
readonly 424: "Failed Dependency";
|
|
85
|
-
readonly 425: "Too Early";
|
|
86
|
-
readonly 426: "Upgrade Required";
|
|
87
|
-
readonly 428: "Precondition Required";
|
|
88
|
-
readonly 429: "Too Many Requests";
|
|
89
|
-
readonly 431: "Request Header Fields Too Large";
|
|
90
|
-
readonly 451: "Unavailable For Legal Reasons";
|
|
91
|
-
readonly 500: "Internal Server Error";
|
|
92
|
-
readonly 501: "Not Implemented";
|
|
93
|
-
readonly 502: "Bad Gateway";
|
|
94
|
-
readonly 503: "Service Unavailable";
|
|
95
|
-
readonly 504: "Gateway Timeout";
|
|
96
|
-
readonly 505: "HTTP Version Not Supported";
|
|
97
|
-
readonly 506: "Variant Also Negotiates";
|
|
98
|
-
readonly 507: "Insufficient Storage";
|
|
99
|
-
readonly 508: "Loop Detected";
|
|
100
|
-
readonly 510: "Not Extended";
|
|
101
|
-
readonly 511: "Network Authentication Required";
|
|
102
|
-
}[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" ? {
|
|
103
|
-
readonly Continue: 100;
|
|
104
|
-
readonly "Switching Protocols": 101;
|
|
105
|
-
readonly Processing: 102;
|
|
106
|
-
readonly "Early Hints": 103;
|
|
107
|
-
readonly OK: 200;
|
|
108
|
-
readonly Created: 201;
|
|
109
|
-
readonly Accepted: 202;
|
|
110
|
-
readonly "Non-Authoritative Information": 203;
|
|
111
|
-
readonly "No Content": 204;
|
|
112
|
-
readonly "Reset Content": 205;
|
|
113
|
-
readonly "Partial Content": 206;
|
|
114
|
-
readonly "Multi-Status": 207;
|
|
115
|
-
readonly "Already Reported": 208;
|
|
116
|
-
readonly "Multiple Choices": 300;
|
|
117
|
-
readonly "Moved Permanently": 301;
|
|
118
|
-
readonly Found: 302;
|
|
119
|
-
readonly "See Other": 303;
|
|
120
|
-
readonly "Not Modified": 304;
|
|
121
|
-
readonly "Temporary Redirect": 307;
|
|
122
|
-
readonly "Permanent Redirect": 308;
|
|
123
|
-
readonly "Bad Request": 400;
|
|
124
|
-
readonly Unauthorized: 401;
|
|
125
|
-
readonly "Payment Required": 402;
|
|
126
|
-
readonly Forbidden: 403;
|
|
127
|
-
readonly "Not Found": 404;
|
|
128
|
-
readonly "Method Not Allowed": 405;
|
|
129
|
-
readonly "Not Acceptable": 406;
|
|
130
|
-
readonly "Proxy Authentication Required": 407;
|
|
131
|
-
readonly "Request Timeout": 408;
|
|
132
|
-
readonly Conflict: 409;
|
|
133
|
-
readonly Gone: 410;
|
|
134
|
-
readonly "Length Required": 411;
|
|
135
|
-
readonly "Precondition Failed": 412;
|
|
136
|
-
readonly "Payload Too Large": 413;
|
|
137
|
-
readonly "URI Too Long": 414;
|
|
138
|
-
readonly "Unsupported Media Type": 415;
|
|
139
|
-
readonly "Range Not Satisfiable": 416;
|
|
140
|
-
readonly "Expectation Failed": 417;
|
|
141
|
-
readonly "I'm a teapot": 418;
|
|
142
|
-
readonly "Enhance Your Calm": 420;
|
|
143
|
-
readonly "Misdirected Request": 421;
|
|
144
|
-
readonly "Unprocessable Content": 422;
|
|
145
|
-
readonly Locked: 423;
|
|
146
|
-
readonly "Failed Dependency": 424;
|
|
147
|
-
readonly "Too Early": 425;
|
|
148
|
-
readonly "Upgrade Required": 426;
|
|
149
|
-
readonly "Precondition Required": 428;
|
|
150
|
-
readonly "Too Many Requests": 429;
|
|
151
|
-
readonly "Request Header Fields Too Large": 431;
|
|
152
|
-
readonly "Unavailable For Legal Reasons": 451;
|
|
153
|
-
readonly "Internal Server Error": 500;
|
|
154
|
-
readonly "Not Implemented": 501;
|
|
155
|
-
readonly "Bad Gateway": 502;
|
|
156
|
-
readonly "Service Unavailable": 503;
|
|
157
|
-
readonly "Gateway Timeout": 504;
|
|
158
|
-
readonly "HTTP Version Not Supported": 505;
|
|
159
|
-
readonly "Variant Also Negotiates": 506;
|
|
160
|
-
readonly "Insufficient Storage": 507;
|
|
161
|
-
readonly "Loop Detected": 508;
|
|
162
|
-
readonly "Not Extended": 510;
|
|
163
|
-
readonly "Network Authentication Required": 511;
|
|
164
|
-
}[Code] : Code>;
|
|
165
|
-
}) => Promise<{
|
|
166
|
-
dynamicDB: MSSQL;
|
|
167
|
-
}>;
|
|
168
|
-
};
|
|
169
|
-
readonly injectStaticDB: (databaseName: string) => {
|
|
170
|
-
readonly resolve: () => {
|
|
171
|
-
staticDB: MSSQL;
|
|
172
|
-
};
|
|
173
|
-
};
|
|
174
|
-
}>>;
|
|
19
|
+
macro: Partial<{
|
|
20
|
+
readonly injectDynamicDB: Omit<MSSQLDatabaseOptions, "databaseName">;
|
|
21
|
+
readonly injectStaticDB: string;
|
|
22
|
+
}>;
|
|
175
23
|
macroFn: {
|
|
176
24
|
readonly injectDynamicDB: (config: Omit<MSSQLDatabaseOptions, "databaseName">) => {
|
|
177
25
|
readonly headers: "dbResolverHeader";
|
|
@@ -1,18 +1,18 @@
|
|
|
1
1
|
// @bun
|
|
2
2
|
import {
|
|
3
3
|
dbResolver
|
|
4
|
-
} from "../../../chunk-
|
|
5
|
-
import"../../../chunk-
|
|
6
|
-
import"../../../chunk-
|
|
7
|
-
import"../../../chunk-
|
|
8
|
-
import"../../../chunk-
|
|
9
|
-
import"../../../chunk-
|
|
4
|
+
} from "../../../chunk-pcfjfxbw.js";
|
|
5
|
+
import"../../../chunk-r7yr9p57.js";
|
|
6
|
+
import"../../../chunk-y5dtkmnp.js";
|
|
7
|
+
import"../../../chunk-ayyrgqyv.js";
|
|
8
|
+
import"../../../chunk-1yykvnyz.js";
|
|
9
|
+
import"../../../chunk-dyntzdyn.js";
|
|
10
10
|
import"../../../chunk-grfyngq0.js";
|
|
11
11
|
import"../../../chunk-mvrxngm7.js";
|
|
12
|
-
import"../../../chunk-
|
|
13
|
-
import"../../../chunk-7t524zqh.js";
|
|
12
|
+
import"../../../chunk-zv4ta4fb.js";
|
|
14
13
|
import"../../../chunk-sqts8vyk.js";
|
|
15
|
-
import"../../../chunk-
|
|
14
|
+
import"../../../chunk-jz3wd472.js";
|
|
15
|
+
import"../../../chunk-642xajvx.js";
|
|
16
16
|
export {
|
|
17
17
|
dbResolver
|
|
18
18
|
};
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
export declare const ERROR_KEYS: {
|
|
2
|
-
readonly
|
|
3
|
-
readonly
|
|
4
|
-
readonly
|
|
5
|
-
readonly
|
|
2
|
+
readonly VALIDATION: "mrx.mrx-core.error.validation";
|
|
3
|
+
readonly NOT_FOUND: "mrx.mrx-core.error.not_found";
|
|
4
|
+
readonly PARSE: "mrx.mrx-core.error.parse";
|
|
5
|
+
readonly INTERNAL_SERVER_ERROR: "mrx.mrx-core.error.internal_server_error";
|
|
6
6
|
};
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import { Elysia } from 'elysia';
|
|
2
|
-
import {
|
|
2
|
+
import { InternalError } from '../../../errors/internal-error';
|
|
3
3
|
import { HttpError } from '../../../errors/http-error';
|
|
4
4
|
/**
|
|
5
5
|
* The `errorPlugin` provides an error handling system for Elysia applications.
|
|
@@ -12,7 +12,7 @@ export declare const error: Elysia<"", {
|
|
|
12
12
|
}, {
|
|
13
13
|
typebox: {};
|
|
14
14
|
error: {
|
|
15
|
-
readonly
|
|
15
|
+
readonly InternalError: InternalError<any>;
|
|
16
16
|
readonly HttpError: HttpError<any>;
|
|
17
17
|
};
|
|
18
18
|
}, {
|
|
@@ -26,13 +26,13 @@ export declare const error: Elysia<"", {
|
|
|
26
26
|
message: string;
|
|
27
27
|
content: any;
|
|
28
28
|
} | {
|
|
29
|
-
message: "mrx-core.error.not_found";
|
|
29
|
+
message: "mrx.mrx-core.error.not_found";
|
|
30
30
|
content?: never;
|
|
31
31
|
} | {
|
|
32
|
-
message: "mrx-core.error.parse";
|
|
32
|
+
message: "mrx.mrx-core.error.parse";
|
|
33
33
|
content?: never;
|
|
34
34
|
} | {
|
|
35
|
-
message: "mrx-core.error.internal_server_error";
|
|
35
|
+
message: "mrx.mrx-core.error.internal_server_error";
|
|
36
36
|
content?: never;
|
|
37
37
|
};
|
|
38
38
|
};
|
|
@@ -1,25 +1,25 @@
|
|
|
1
1
|
// @bun
|
|
2
2
|
import {
|
|
3
3
|
ERROR_KEYS
|
|
4
|
-
} from "../../../chunk-
|
|
4
|
+
} from "../../../chunk-4t7sy5qt.js";
|
|
5
5
|
import {
|
|
6
6
|
filterByKeyExclusion
|
|
7
|
-
} from "../../../chunk-
|
|
8
|
-
import"../../../chunk-
|
|
7
|
+
} from "../../../chunk-hv6g22kf.js";
|
|
8
|
+
import"../../../chunk-10w8mg8e.js";
|
|
9
9
|
import {
|
|
10
10
|
HttpError
|
|
11
|
-
} from "../../../chunk-
|
|
11
|
+
} from "../../../chunk-zv4ta4fb.js";
|
|
12
12
|
import"../../../chunk-sqts8vyk.js";
|
|
13
13
|
import {
|
|
14
|
-
|
|
15
|
-
} from "../../../chunk-
|
|
14
|
+
InternalError
|
|
15
|
+
} from "../../../chunk-jz3wd472.js";
|
|
16
16
|
|
|
17
17
|
// source/modules/elysia/error/error.ts
|
|
18
18
|
import { Elysia } from "elysia";
|
|
19
19
|
var error = new Elysia({
|
|
20
20
|
name: "errorPlugin"
|
|
21
21
|
}).error({
|
|
22
|
-
|
|
22
|
+
InternalError,
|
|
23
23
|
HttpError
|
|
24
24
|
}).onError(({ code, error: error2, set }) => {
|
|
25
25
|
set.headers["content-type"] = "application/json; charset=utf-8";
|
|
@@ -30,16 +30,16 @@ var error = new Elysia({
|
|
|
30
30
|
message: error2.message,
|
|
31
31
|
content: error2.cause
|
|
32
32
|
};
|
|
33
|
-
case "
|
|
33
|
+
case "InternalError":
|
|
34
34
|
set.status = 500;
|
|
35
35
|
return {
|
|
36
|
-
message:
|
|
37
|
-
content: error2.
|
|
36
|
+
message: ERROR_KEYS.INTERNAL_SERVER_ERROR,
|
|
37
|
+
content: error2.uuid
|
|
38
38
|
};
|
|
39
39
|
case "VALIDATION": {
|
|
40
40
|
set.status = 422;
|
|
41
41
|
return {
|
|
42
|
-
message: ERROR_KEYS.
|
|
42
|
+
message: ERROR_KEYS.VALIDATION,
|
|
43
43
|
content: {
|
|
44
44
|
on: error2.type,
|
|
45
45
|
errors: error2.all.map((e) => ({
|
|
@@ -55,19 +55,19 @@ var error = new Elysia({
|
|
|
55
55
|
case "NOT_FOUND":
|
|
56
56
|
set.status = 404;
|
|
57
57
|
return {
|
|
58
|
-
message: ERROR_KEYS.
|
|
58
|
+
message: ERROR_KEYS.NOT_FOUND
|
|
59
59
|
};
|
|
60
60
|
case "PARSE":
|
|
61
61
|
set.status = 400;
|
|
62
62
|
return {
|
|
63
|
-
message: ERROR_KEYS.
|
|
63
|
+
message: ERROR_KEYS.PARSE
|
|
64
64
|
};
|
|
65
65
|
case "INTERNAL_SERVER_ERROR":
|
|
66
66
|
case "UNKNOWN":
|
|
67
67
|
default:
|
|
68
68
|
set.status = 500;
|
|
69
69
|
return {
|
|
70
|
-
message: ERROR_KEYS.
|
|
70
|
+
message: ERROR_KEYS.INTERNAL_SERVER_ERROR
|
|
71
71
|
};
|
|
72
72
|
}
|
|
73
73
|
}).as("global");
|
|
@@ -1,4 +1,4 @@
|
|
|
1
1
|
export declare const MICROSERVICE_SUCCESS_KEYS: {
|
|
2
|
-
readonly PING_RESPONSE: "mrx-core.microservice.success.ping_response";
|
|
3
|
-
readonly INFO_RETRIEVED: "mrx-core.microservice.success.info_retrieved";
|
|
2
|
+
readonly PING_RESPONSE: "mrx.mrx-core.microservice.success.ping_response";
|
|
3
|
+
readonly INFO_RETRIEVED: "mrx.mrx-core.microservice.success.info_retrieved";
|
|
4
4
|
};
|
|
@@ -1,16 +1,16 @@
|
|
|
1
1
|
// @bun
|
|
2
2
|
import {
|
|
3
3
|
RATE_LIMIT_ERROR_KEYS
|
|
4
|
-
} from "../../../chunk-
|
|
4
|
+
} from "../../../chunk-2z8amjqt.js";
|
|
5
5
|
import {
|
|
6
6
|
MemoryStore
|
|
7
|
-
} from "../../../chunk-
|
|
8
|
-
import"../../../chunk-
|
|
7
|
+
} from "../../../chunk-j7dyc5ks.js";
|
|
8
|
+
import"../../../chunk-8pw0syzf.js";
|
|
9
9
|
import {
|
|
10
10
|
HttpError
|
|
11
|
-
} from "../../../chunk-
|
|
11
|
+
} from "../../../chunk-zv4ta4fb.js";
|
|
12
12
|
import"../../../chunk-sqts8vyk.js";
|
|
13
|
-
import"../../../chunk-
|
|
13
|
+
import"../../../chunk-jz3wd472.js";
|
|
14
14
|
|
|
15
15
|
// source/modules/elysia/rate-limit/rate-limit.ts
|
|
16
16
|
import { Elysia } from "elysia";
|