@mrxsys/mrx-core 2.11.0-2-and-276-20251029 → 2.11.0-2-and-279-20251103

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.
Files changed (148) hide show
  1. package/CHANGELOG.md +0 -407
  2. package/dist/chunk-0d0zd2yg.js +8 -0
  3. package/dist/chunk-12qzn7jw.js +7 -0
  4. package/dist/chunk-441xs5k1.js +53 -0
  5. package/dist/chunk-4v86f7gp.js +59 -0
  6. package/dist/chunk-6w9ja96e.js +9 -0
  7. package/dist/chunk-7t524zqh.js +26 -0
  8. package/dist/chunk-8tffnbpn.js +7 -0
  9. package/dist/chunk-9cgzhc50.js +15 -0
  10. package/dist/chunk-9d3zvgp6.js +9 -0
  11. package/dist/chunk-9dzsj7f2.js +23 -0
  12. package/dist/chunk-9r5anep5.js +11 -0
  13. package/dist/chunk-afd82epa.js +201 -0
  14. package/dist/chunk-afyz8rg5.js +209 -0
  15. package/dist/chunk-dre2fgj0.js +7 -0
  16. package/dist/chunk-e30paw8a.js +101 -0
  17. package/dist/chunk-eeb7yskp.js +61 -0
  18. package/dist/chunk-fs3wm3p4.js +32 -0
  19. package/dist/chunk-grfyngq0.js +39 -0
  20. package/dist/chunk-gtn1kn0z.js +79 -0
  21. package/dist/chunk-jksb9ers.js +7 -0
  22. package/dist/chunk-m3grz32t.js +27 -0
  23. package/dist/chunk-mvrxngm7.js +41 -0
  24. package/dist/chunk-n0n14mf8.js +7 -0
  25. package/dist/chunk-p14h6jfs.js +365 -0
  26. package/dist/chunk-pjv1ekwr.js +284 -0
  27. package/dist/chunk-rz5p4j3p.js +13 -0
  28. package/dist/chunk-spnh9dzk.js +10 -0
  29. package/dist/chunk-sqts8vyk.js +60 -0
  30. package/dist/chunk-w7h898m3.js +14 -0
  31. package/dist/chunk-xhhj1gvj.js +9 -0
  32. package/dist/chunk-z0ct35ft.js +8 -0
  33. package/dist/errors/enums/index.js +7 -0
  34. package/dist/errors/index.js +12 -0
  35. package/dist/errors/utils/index.js +16 -0
  36. package/dist/errors/utils/is-nowarajs-error.ts.d.ts +2 -2
  37. package/dist/modules/data/enums/index.js +7 -0
  38. package/dist/modules/data/index.js +17 -0
  39. package/dist/modules/data/transformers/camel-case.d.ts +2 -2
  40. package/dist/modules/data/transformers/index.js +32 -0
  41. package/dist/modules/data/transformers/kebab-case.d.ts +2 -2
  42. package/dist/modules/data/transformers/pascal-case.d.ts +2 -2
  43. package/dist/modules/data/transformers/snake-case.d.ts +2 -2
  44. package/dist/modules/data/types/index.js +1 -0
  45. package/dist/modules/data/types/transform-object-keys.d.ts +4 -4
  46. package/dist/modules/database/enums/index.js +9 -0
  47. package/dist/modules/database/events/index.js +1 -0
  48. package/dist/modules/database/events/mssql-event-map.d.ts +1 -1
  49. package/dist/modules/database/events/table-event-map.d.ts +1 -1
  50. package/dist/modules/database/index.js +16 -0
  51. package/dist/modules/database/mssql.d.ts +2 -2
  52. package/dist/modules/database/table.d.ts +2 -2
  53. package/dist/modules/database/types/index.js +1 -0
  54. package/dist/modules/elysia/cache/cache.d.ts +152 -4
  55. package/dist/modules/elysia/cache/index.js +90 -0
  56. package/dist/modules/elysia/cache/types/index.js +1 -0
  57. package/dist/modules/elysia/crud/crud.d.ts +2 -2
  58. package/dist/modules/elysia/crud/enums/index.js +7 -0
  59. package/dist/modules/elysia/crud/index.js +153 -0
  60. package/dist/modules/elysia/crud/operations/count.d.ts +175 -7
  61. package/dist/modules/elysia/crud/operations/delete.d.ts +175 -7
  62. package/dist/modules/elysia/crud/operations/deleteOne.d.ts +175 -7
  63. package/dist/modules/elysia/crud/operations/find.d.ts +175 -7
  64. package/dist/modules/elysia/crud/operations/findOne.d.ts +175 -7
  65. package/dist/modules/elysia/crud/operations/index.js +34 -0
  66. package/dist/modules/elysia/crud/operations/insert.d.ts +175 -7
  67. package/dist/modules/elysia/crud/operations/update.d.ts +175 -7
  68. package/dist/modules/elysia/crud/operations/updateOne.d.ts +175 -7
  69. package/dist/modules/elysia/crud/operations/utils/get-db-injection.d.ts +1 -1
  70. package/dist/modules/elysia/crud/types/crud-options.d.ts +1 -1
  71. package/dist/modules/elysia/crud/types/crud-schema-models-type.d.ts +9 -9
  72. package/dist/modules/elysia/crud/types/delete-schema.d.ts +2 -2
  73. package/dist/modules/elysia/crud/types/find-schema.d.ts +3 -3
  74. package/dist/modules/elysia/crud/types/index.js +1 -0
  75. package/dist/modules/elysia/crud/types/insert-schema.d.ts +1 -1
  76. package/dist/modules/elysia/crud/types/properties-schema.d.ts +1 -1
  77. package/dist/modules/elysia/crud/types/response-200-schema.d.ts +1 -1
  78. package/dist/modules/elysia/crud/types/update-schema.d.ts +2 -2
  79. package/dist/modules/elysia/crud/utils/create-adaptive-where-clause-schema.d.ts +1 -1
  80. package/dist/modules/elysia/crud/utils/create-count-response-200-schema.d.ts +1 -1
  81. package/dist/modules/elysia/crud/utils/create-count-schema.d.ts +1 -1
  82. package/dist/modules/elysia/crud/utils/create-delete-schema.d.ts +1 -1
  83. package/dist/modules/elysia/crud/utils/create-filters-schema.d.ts +1 -1
  84. package/dist/modules/elysia/crud/utils/create-find-schema.d.ts +1 -1
  85. package/dist/modules/elysia/crud/utils/create-id-param-schema.d.ts +1 -1
  86. package/dist/modules/elysia/crud/utils/create-insert-schema.d.ts +1 -1
  87. package/dist/modules/elysia/crud/utils/create-order-schema.d.ts +1 -1
  88. package/dist/modules/elysia/crud/utils/create-properties-schema.d.ts +1 -1
  89. package/dist/modules/elysia/crud/utils/create-q-schema.d.ts +1 -1
  90. package/dist/modules/elysia/crud/utils/create-response-200-schema.d.ts +1 -1
  91. package/dist/modules/elysia/crud/utils/create-selected-fields-schema.d.ts +1 -1
  92. package/dist/modules/elysia/crud/utils/create-update-one-schema.d.ts +1 -1
  93. package/dist/modules/elysia/crud/utils/create-update-schema.d.ts +1 -1
  94. package/dist/modules/elysia/crud/utils/index.js +41 -0
  95. package/dist/modules/elysia/db-resolver/db-resolver.d.ts +158 -6
  96. package/dist/modules/elysia/db-resolver/enums/index.js +7 -0
  97. package/dist/modules/elysia/db-resolver/index.js +18 -0
  98. package/dist/modules/elysia/error/enums/index.js +7 -0
  99. package/dist/modules/elysia/error/error.d.ts +51 -0
  100. package/dist/modules/elysia/error/index.js +76 -0
  101. package/dist/modules/elysia/microservice/enums/index.js +7 -0
  102. package/dist/modules/elysia/microservice/index.js +100 -0
  103. package/dist/modules/elysia/rate-limit/enums/index.js +7 -0
  104. package/dist/modules/elysia/rate-limit/index.js +81 -0
  105. package/dist/modules/elysia/rate-limit/rate-limit.d.ts +293 -4
  106. package/dist/modules/elysia/rate-limit/types/index.js +1 -0
  107. package/dist/modules/jwt/enums/index.js +11 -0
  108. package/dist/modules/jwt/index.js +51 -0
  109. package/dist/modules/jwt/utils/index.js +9 -0
  110. package/dist/modules/kv-store/bun-redis/bun-redis-store.d.ts +1 -1
  111. package/dist/modules/kv-store/bun-redis/index.js +84 -0
  112. package/dist/modules/kv-store/enums/index.js +7 -0
  113. package/dist/modules/kv-store/ioredis/index.js +86 -0
  114. package/dist/modules/kv-store/ioredis/ioredis-store.d.ts +1 -1
  115. package/dist/modules/kv-store/memory/index.js +9 -0
  116. package/dist/modules/kv-store/memory/memory-store.d.ts +1 -1
  117. package/dist/modules/kv-store/types/index.js +1 -0
  118. package/dist/modules/logger/enums/index.js +7 -0
  119. package/dist/modules/logger/events/index.js +1 -0
  120. package/dist/modules/logger/events/logger-events.d.ts +1 -1
  121. package/dist/modules/logger/index.js +282 -0
  122. package/dist/modules/logger/logger.d.ts +1 -1
  123. package/dist/modules/logger/sinks/console-logger.d.ts +2 -2
  124. package/dist/modules/logger/sinks/devnull-logger.d.ts +1 -1
  125. package/dist/modules/logger/sinks/file-logger/file-logger.d.ts +2 -2
  126. package/dist/modules/logger/sinks/index.js +66 -0
  127. package/dist/modules/logger/types/index.js +1 -0
  128. package/dist/modules/logger/worker-logger.d.ts +1 -0
  129. package/dist/modules/mailer/enums/index.js +7 -0
  130. package/dist/modules/mailer/index.js +55 -0
  131. package/dist/modules/mailer/types/index.js +1 -0
  132. package/dist/modules/repository/index.js +12 -0
  133. package/dist/modules/repository/repository.d.ts +2 -2
  134. package/dist/modules/repository/types/index.js +1 -0
  135. package/dist/modules/repository/types/query-options.d.ts +1 -1
  136. package/dist/modules/singleton-manager/enums/index.js +7 -0
  137. package/dist/modules/singleton-manager/index.js +9 -0
  138. package/dist/modules/totp/enums/index.js +7 -0
  139. package/dist/modules/totp/index.js +104 -0
  140. package/dist/modules/totp/types/index.js +1 -0
  141. package/dist/modules/totp/utils/index.js +76 -0
  142. package/dist/modules/typed-event-emitter/index.js +7 -0
  143. package/dist/modules/typed-event-emitter/types/index.js +1 -0
  144. package/dist/shared/enums/index.js +7 -0
  145. package/dist/shared/types/index.js +1 -0
  146. package/dist/shared/utils/flatten.d.ts +1 -1
  147. package/dist/shared/utils/index.js +30 -0
  148. package/package.json +3 -3
@@ -0,0 +1,284 @@
1
+ // @bun
2
+ import {
3
+ dbResolver
4
+ } from "./chunk-441xs5k1.js";
5
+ import {
6
+ CRUD_SUCCESS_KEYS
7
+ } from "./chunk-w7h898m3.js";
8
+
9
+ // source/modules/elysia/crud/operations/count.ts
10
+ import { Elysia } from "elysia";
11
+
12
+ // source/modules/elysia/crud/operations/utils/get-db-injection.ts
13
+ var getDbInjection = (database) => typeof database === "string" ? {
14
+ injectStaticDB: database
15
+ } : {
16
+ injectDynamicDB: database
17
+ };
18
+
19
+ // source/modules/elysia/crud/operations/count.ts
20
+ var count = (database, tableName, {
21
+ hook,
22
+ method = "POST",
23
+ path = "/count"
24
+ }) => new Elysia({
25
+ name: `count[${tableName}]`
26
+ }).use(dbResolver("database:")).route(method, path, async (ctx) => {
27
+ const db = ctx.dynamicDB || ctx.staticDB;
28
+ const body = ctx.body;
29
+ const data = await db.getRepository(tableName).count({
30
+ ...body.queryOptions,
31
+ throwIfNoResult: true
32
+ });
33
+ return {
34
+ message: CRUD_SUCCESS_KEYS.COUNT_RESPONSE,
35
+ content: data
36
+ };
37
+ }, {
38
+ detail: {
39
+ summary: "Count",
40
+ description: `Count ${tableName} records based on query options.`
41
+ },
42
+ ...getDbInjection(database),
43
+ body: `${tableName}Count`,
44
+ response: `${tableName}CountResponse200`,
45
+ ...hook
46
+ });
47
+
48
+ // source/modules/elysia/crud/operations/delete.ts
49
+ import { Elysia as Elysia2 } from "elysia";
50
+ var batchDelete = (database, tableName, {
51
+ hook,
52
+ method = "DELETE",
53
+ path = "/"
54
+ }) => new Elysia2({
55
+ name: `delete[${tableName}]`
56
+ }).use(dbResolver("database:")).route(method, path, async (ctx) => {
57
+ const db = ctx.dynamicDB || ctx.staticDB;
58
+ const body = ctx.body;
59
+ const selectedFields = body.queryOptions?.selectedFields ?? "*";
60
+ const data = await db.getRepository(tableName).delete({
61
+ filters: body.queryOptions.filters,
62
+ selectedFields,
63
+ throwIfNoResult: true
64
+ });
65
+ return {
66
+ message: CRUD_SUCCESS_KEYS.DELETE_RESPONSE,
67
+ content: data
68
+ };
69
+ }, {
70
+ detail: {
71
+ summary: "Delete",
72
+ description: `Delete ${tableName} records based on query options.`
73
+ },
74
+ ...getDbInjection(database),
75
+ body: `${tableName}Delete`,
76
+ response: `${tableName}Response200`,
77
+ ...hook
78
+ });
79
+
80
+ // source/modules/elysia/crud/operations/deleteOne.ts
81
+ import { Elysia as Elysia3 } from "elysia";
82
+ var deleteOne = (database, tableName, {
83
+ hook,
84
+ method = "DELETE",
85
+ path = "/:id"
86
+ }) => new Elysia3({
87
+ name: `deleteOne[${tableName}]`
88
+ }).use(dbResolver("database:")).route(method, path, async (ctx) => {
89
+ const db = ctx.dynamicDB || ctx.staticDB;
90
+ const { id } = ctx.params;
91
+ const [primaryKey] = db.getTable(tableName).primaryKey;
92
+ const data = await db.getRepository(tableName).delete({
93
+ selectedFields: "*",
94
+ filters: {
95
+ [primaryKey]: id
96
+ },
97
+ throwIfNoResult: {
98
+ httpStatusCode: "NOT_FOUND",
99
+ message: `Record with id ${id} not found in ${tableName}`
100
+ }
101
+ });
102
+ return {
103
+ message: CRUD_SUCCESS_KEYS.DELETE_ONE_RESPONSE,
104
+ content: data
105
+ };
106
+ }, {
107
+ detail: {
108
+ summary: "Delete One",
109
+ description: `Delete a single ${tableName} record by its primary key.`
110
+ },
111
+ ...getDbInjection(database),
112
+ params: `${tableName}IdParam`,
113
+ response: `${tableName}Response200`,
114
+ ...hook
115
+ });
116
+
117
+ // source/modules/elysia/crud/operations/find.ts
118
+ import { Elysia as Elysia4 } from "elysia";
119
+ var find = (database, tableName, {
120
+ hook,
121
+ method = "POST",
122
+ path = "/find"
123
+ }) => new Elysia4({
124
+ name: `find[${tableName}]`
125
+ }).use(dbResolver("database:")).route(method, path, async (ctx) => {
126
+ const db = ctx.dynamicDB || ctx.staticDB;
127
+ const body = ctx.body;
128
+ const data = await db.getRepository(tableName).find({
129
+ ...body?.queryOptions || {},
130
+ throwIfNoResult: false
131
+ });
132
+ return {
133
+ message: CRUD_SUCCESS_KEYS.FIND_RESPONSE,
134
+ content: data
135
+ };
136
+ }, {
137
+ detail: {
138
+ summary: "Find",
139
+ description: `Find ${tableName} records based on query options.`
140
+ },
141
+ ...getDbInjection(database),
142
+ body: `${tableName}Find`,
143
+ response: `${tableName}Response200`,
144
+ ...hook
145
+ });
146
+
147
+ // source/modules/elysia/crud/operations/findOne.ts
148
+ import { Elysia as Elysia5 } from "elysia";
149
+ var findOne = (database, tableName, {
150
+ hook,
151
+ method = "GET",
152
+ path = "/:id"
153
+ }) => new Elysia5({
154
+ name: `findOne[${tableName}]`
155
+ }).use(dbResolver("database:")).route(method, path, async (ctx) => {
156
+ const db = ctx.dynamicDB || ctx.staticDB;
157
+ const { id } = ctx.params;
158
+ const [primaryKey] = db.getTable(tableName).primaryKey;
159
+ const data = await db.getRepository(tableName).find({
160
+ filters: {
161
+ [primaryKey]: id
162
+ },
163
+ throwIfNoResult: {
164
+ httpStatusCode: "NOT_FOUND",
165
+ message: `Record with id ${id} not found in ${tableName}`
166
+ }
167
+ });
168
+ return {
169
+ message: CRUD_SUCCESS_KEYS.FIND_ONE_RESPONSE,
170
+ content: data
171
+ };
172
+ }, {
173
+ detail: {
174
+ summary: "Find One",
175
+ description: `Find a single ${tableName} record by its primary key.`
176
+ },
177
+ ...getDbInjection(database),
178
+ params: `${tableName}IdParam`,
179
+ response: `${tableName}Response200`,
180
+ ...hook
181
+ });
182
+
183
+ // source/modules/elysia/crud/operations/insert.ts
184
+ import { Elysia as Elysia6 } from "elysia";
185
+ var insert = (database, tableName, {
186
+ hook,
187
+ method = "POST",
188
+ path = "/"
189
+ }) => new Elysia6({
190
+ name: `insert[${tableName}]`
191
+ }).use(dbResolver("database:")).route(method, path, async (ctx) => {
192
+ const db = ctx.dynamicDB || ctx.staticDB;
193
+ const body = ctx.body;
194
+ const selectedFields = body.queryOptions?.selectedFields ?? "*";
195
+ const data = await db.getRepository(tableName).insert(body.data, {
196
+ selectedFields,
197
+ throwIfNoResult: true
198
+ });
199
+ return {
200
+ message: CRUD_SUCCESS_KEYS.INSERT_RESPONSE,
201
+ content: data
202
+ };
203
+ }, {
204
+ detail: {
205
+ summary: "Insert",
206
+ description: `Insert one or more records into the ${tableName} table.`
207
+ },
208
+ ...getDbInjection(database),
209
+ body: `${tableName}Insert`,
210
+ response: `${tableName}Response200`,
211
+ ...hook
212
+ });
213
+
214
+ // source/modules/elysia/crud/operations/update.ts
215
+ import { Elysia as Elysia7 } from "elysia";
216
+ var update = (database, tableName, {
217
+ hook,
218
+ method = "PATCH",
219
+ path = "/"
220
+ }) => new Elysia7({
221
+ name: `update[${tableName}]`
222
+ }).use(dbResolver("database:")).route(method, path, async (ctx) => {
223
+ const db = ctx.dynamicDB || ctx.staticDB;
224
+ const body = ctx.body;
225
+ const data = await db.getRepository(tableName).update(body.data, {
226
+ filters: body.queryOptions.filters,
227
+ selectedFields: body.queryOptions.selectedFields ?? "*",
228
+ throwIfNoResult: true
229
+ });
230
+ return {
231
+ message: CRUD_SUCCESS_KEYS.UPDATE_RESPONSE,
232
+ content: data
233
+ };
234
+ }, {
235
+ detail: {
236
+ summary: "Update",
237
+ description: `Update one or more ${tableName} records based on query options.`
238
+ },
239
+ ...getDbInjection(database),
240
+ body: `${tableName}Update`,
241
+ response: `${tableName}Response200`,
242
+ ...hook
243
+ });
244
+
245
+ // source/modules/elysia/crud/operations/updateOne.ts
246
+ import { Elysia as Elysia8 } from "elysia";
247
+ var updateOne = (database, tableName, {
248
+ hook,
249
+ method = "PATCH",
250
+ path = "/:id"
251
+ }) => new Elysia8({
252
+ name: `updateOne[${tableName}]`
253
+ }).use(dbResolver("database:")).route(method, path, async (ctx) => {
254
+ const db = ctx.dynamicDB || ctx.staticDB;
255
+ const { id } = ctx.params;
256
+ const body = ctx.body;
257
+ const [primaryKey] = db.getTable(tableName).primaryKey;
258
+ const data = await db.getRepository(tableName).update(body.data, {
259
+ selectedFields: "*",
260
+ filters: {
261
+ [primaryKey]: id
262
+ },
263
+ throwIfNoResult: {
264
+ httpStatusCode: "NOT_FOUND",
265
+ message: `Record with id ${id} not found in ${tableName}`
266
+ }
267
+ });
268
+ return {
269
+ message: CRUD_SUCCESS_KEYS.UPDATE_ONE_RESPONSE,
270
+ content: data
271
+ };
272
+ }, {
273
+ detail: {
274
+ summary: "Update Single Record",
275
+ description: `Update a single record in the ${tableName} table by its primary key.`
276
+ },
277
+ ...getDbInjection(database),
278
+ params: `${tableName}IdParam`,
279
+ body: `${tableName}UpdateOne`,
280
+ response: `${tableName}Response200`,
281
+ ...hook
282
+ });
283
+
284
+ export { count, batchDelete, deleteOne, find, findOne, insert, update, updateOne };
@@ -0,0 +1,13 @@
1
+ // @bun
2
+ // source/modules/logger/enums/logger-error-keys.ts
3
+ var LOGGER_ERROR_KEYS = {
4
+ BEFORE_EXIT_CLOSE_ERROR: "mrx-core.logger.error.before_exit_close_error",
5
+ BEFORE_EXIT_FLUSH_ERROR: "mrx-core.logger.error.before_exit_flush_error",
6
+ NO_SINKS_PROVIDED: "mrx-core.logger.error.no_sinks_provided",
7
+ REGISTER_SINK_ERROR: "mrx-core.logger.error.register_sink_error",
8
+ SINK_ALREADY_ADDED: "mrx-core.logger.error.sink_already_added",
9
+ SINK_CLOSE_ERROR: "mrx-core.logger.error.sink_close_error",
10
+ SINK_LOG_ERROR: "mrx-core.logger.error.sink_log_error"
11
+ };
12
+
13
+ export { LOGGER_ERROR_KEYS };
@@ -0,0 +1,10 @@
1
+ // @bun
2
+ // source/modules/elysia/error/enums/error.keys.ts
3
+ var ERROR_KEYS = {
4
+ CORE_ERROR_VALIDATION: "mrx-core.error.validation",
5
+ CORE_ERROR_NOT_FOUND: "mrx-core.error.not_found",
6
+ CORE_ERROR_PARSE: "mrx-core.error.parse",
7
+ CORE_ERROR_INTERNAL_SERVER_ERROR: "mrx-core.error.internal_server_error"
8
+ };
9
+
10
+ export { ERROR_KEYS };
@@ -0,0 +1,60 @@
1
+ // @bun
2
+ // source/errors/enums/http-status-codes.ts
3
+ var HTTP_STATUS_CODES = {
4
+ CONTINUE: 100,
5
+ SWITCHING_PROTOCOLS: 101,
6
+ PROCESSING: 102,
7
+ EARLY_HINTS: 103,
8
+ OK: 200,
9
+ CREATED: 201,
10
+ ACCEPTED: 202,
11
+ NON_AUTHORITATIVE_INFORMATION: 203,
12
+ NO_CONTENT: 204,
13
+ RESET_CONTENT: 205,
14
+ PARTIAL_CONTENT: 206,
15
+ MULTI_STATUS: 207,
16
+ ALREADY_REPORTED: 208,
17
+ IM_USED: 226,
18
+ BAD_REQUEST: 400,
19
+ UNAUTHORIZED: 401,
20
+ PAYMENT_REQUIRED: 402,
21
+ FORBIDDEN: 403,
22
+ NOT_FOUND: 404,
23
+ METHOD_NOT_ALLOWED: 405,
24
+ NOT_ACCEPTABLE: 406,
25
+ PROXY_AUTHENTICATION_REQUIRED: 407,
26
+ REQUEST_TIMEOUT: 408,
27
+ CONFLICT: 409,
28
+ GONE: 410,
29
+ LENGTH_REQUIRED: 411,
30
+ PRECONDITION_FAILED: 412,
31
+ PAYLOAD_TOO_LARGE: 413,
32
+ URI_TOO_LONG: 414,
33
+ UNSUPPORTED_MEDIA_TYPE: 415,
34
+ RANGE_NOT_SATISFIABLE: 416,
35
+ EXPECTATION_FAILED: 417,
36
+ IM_A_TEAPOT: 418,
37
+ MISDIRECTED_REQUEST: 421,
38
+ UNPROCESSABLE_ENTITY: 422,
39
+ LOCKED: 423,
40
+ FAILED_DEPENDENCY: 424,
41
+ TOO_EARLY: 425,
42
+ UPGRADE_REQUIRED: 426,
43
+ PRECONDITION_REQUIRED: 428,
44
+ TOO_MANY_REQUESTS: 429,
45
+ REQUEST_HEADER_FIELDS_TOO_LARGE: 431,
46
+ UNAVAILABLE_FOR_LEGAL_REASONS: 451,
47
+ INTERNAL_SERVER_ERROR: 500,
48
+ NOT_IMPLEMENTED: 501,
49
+ BAD_GATEWAY: 502,
50
+ SERVICE_UNAVAILABLE: 503,
51
+ GATEWAY_TIMEOUT: 504,
52
+ HTTP_VERSION_NOT_SUPPORTED: 505,
53
+ VARIANT_ALSO_NEGOTIATES: 506,
54
+ INSUFFICIENT_STORAGE: 507,
55
+ LOOP_DETECTED: 508,
56
+ NOT_EXTENDED: 510,
57
+ NETWORK_AUTHENTICATION_REQUIRED: 511
58
+ };
59
+
60
+ export { HTTP_STATUS_CODES };
@@ -0,0 +1,14 @@
1
+ // @bun
2
+ // source/modules/elysia/crud/enums/crud-success-keys.ts
3
+ var CRUD_SUCCESS_KEYS = {
4
+ COUNT_RESPONSE: "mrx-core.crud.success.count_response",
5
+ DELETE_RESPONSE: "mrx-core.crud.success.delete_response",
6
+ DELETE_ONE_RESPONSE: "mrx-core.crud.success.delete_one_response",
7
+ FIND_RESPONSE: "mrx-core.crud.success.find_response",
8
+ FIND_ONE_RESPONSE: "mrx-core.crud.success.find_one_response",
9
+ INSERT_RESPONSE: "mrx-core.crud.success.insert_response",
10
+ UPDATE_RESPONSE: "mrx-core.crud.success.update_response",
11
+ UPDATE_ONE_RESPONSE: "mrx-core.crud.success.update_one_response"
12
+ };
13
+
14
+ export { CRUD_SUCCESS_KEYS };
@@ -0,0 +1,9 @@
1
+ // @bun
2
+ // source/modules/kv-store/enums/kv-store-error-keys.ts
3
+ var KV_STORE_ERROR_KEYS = {
4
+ CLOSING_CONNECTION_FAILED: "mrx-core.kv-store.error.closing_connection_failed",
5
+ CONNECTION_FAILED: "mrx-core.kv-store.error.connection_failed",
6
+ NOT_INTEGER: "mrx-core.kv-store.error.not_integer"
7
+ };
8
+
9
+ export { KV_STORE_ERROR_KEYS };
@@ -0,0 +1,8 @@
1
+ // @bun
2
+ // source/modules/singleton-manager/enums/singleton-manager-error-keys.ts
3
+ var SINGLETON_MANAGER_ERROR_KEYS = {
4
+ CLASS_INSTANCE_ALREADY_REGISTERED: "mrx-core.singleton-manager.error.class_instance_already_registered",
5
+ CLASS_INSTANCE_NOT_REGISTERED: "mrx-core.singleton-manager.error.class_instance_not_registered"
6
+ };
7
+
8
+ export { SINGLETON_MANAGER_ERROR_KEYS };
@@ -0,0 +1,7 @@
1
+ // @bun
2
+ import {
3
+ HTTP_STATUS_CODES
4
+ } from "../../chunk-sqts8vyk.js";
5
+ export {
6
+ HTTP_STATUS_CODES
7
+ };
@@ -0,0 +1,12 @@
1
+ // @bun
2
+ import {
3
+ HttpError
4
+ } from "../chunk-7t524zqh.js";
5
+ import"../chunk-sqts8vyk.js";
6
+ import {
7
+ BaseError
8
+ } from "../chunk-9cgzhc50.js";
9
+ export {
10
+ HttpError,
11
+ BaseError
12
+ };
@@ -0,0 +1,16 @@
1
+ // @bun
2
+ import {
3
+ HttpError
4
+ } from "../../chunk-7t524zqh.js";
5
+ import"../../chunk-sqts8vyk.js";
6
+ import {
7
+ BaseError
8
+ } from "../../chunk-9cgzhc50.js";
9
+
10
+ // source/errors/utils/is-nowarajs-error.ts.ts
11
+ var isBaseError = (e) => e instanceof BaseError;
12
+ var isHttpError = (e) => e instanceof HttpError;
13
+ export {
14
+ isHttpError,
15
+ isBaseError
16
+ };
@@ -1,4 +1,4 @@
1
- import { BaseError } from '#/errors/base-error';
2
- import { HttpError } from '#/errors/http-error';
1
+ import { BaseError } from '../../errors/base-error';
2
+ import { HttpError } from '../../errors/http-error';
3
3
  export declare const isBaseError: (e: unknown) => e is BaseError;
4
4
  export declare const isHttpError: (e: unknown) => e is HttpError;
@@ -0,0 +1,7 @@
1
+ // @bun
2
+ import {
3
+ DATA_ERROR_KEYS
4
+ } from "../../../chunk-jksb9ers.js";
5
+ export {
6
+ DATA_ERROR_KEYS
7
+ };
@@ -0,0 +1,17 @@
1
+ // @bun
2
+ import {
3
+ filterByKeyExclusion,
4
+ filterByKeyExclusionRecursive,
5
+ filterByKeyInclusion,
6
+ filterByValue,
7
+ transformKeys
8
+ } from "../../chunk-gtn1kn0z.js";
9
+ import"../../chunk-jksb9ers.js";
10
+ import"../../chunk-9cgzhc50.js";
11
+ export {
12
+ transformKeys,
13
+ filterByValue,
14
+ filterByKeyInclusion,
15
+ filterByKeyExclusionRecursive,
16
+ filterByKeyExclusion
17
+ };
@@ -1,5 +1,5 @@
1
- import type { CamelCase } from '#/modules/data/types/camel-case';
2
- import type { CaseTransformer } from '#/modules/data/types/case-transformer';
1
+ import type { CamelCase } from '../../../modules/data/types/camel-case';
2
+ import type { CaseTransformer } from '../../../modules/data/types/case-transformer';
3
3
  /**
4
4
  * Transforms string into `camelCase` format.
5
5
  * Implements ({@link CaseTransformer}).
@@ -0,0 +1,32 @@
1
+ // @bun
2
+ // source/modules/data/transformers/camel-case.ts
3
+ class CamelCaseTransformer {
4
+ convertCase(str) {
5
+ return str.replace(/(?:[-_][a-z])/giu, (group) => group[1].toUpperCase()).replace(/^[A-Z]/u, (firstLetter) => firstLetter.toLowerCase());
6
+ }
7
+ }
8
+ // source/modules/data/transformers/kebab-case.ts
9
+ class KebabCaseTransformer {
10
+ convertCase(str) {
11
+ return str.replace(/_/gu, "-").replace(/(?<=[a-z])(?=[A-Z])/gu, "-").replace(/(?<=[A-Z]+)(?=[A-Z][a-z])/gu, "-").toLowerCase();
12
+ }
13
+ }
14
+ // source/modules/data/transformers/pascal-case.ts
15
+ class PascalCaseTransformer {
16
+ convertCase(str) {
17
+ const camelCaseKey = str.replace(/(?:[-_][a-z])/giu, (group) => group[1].toUpperCase());
18
+ return camelCaseKey.charAt(0).toUpperCase() + camelCaseKey.slice(1);
19
+ }
20
+ }
21
+ // source/modules/data/transformers/snake-case.ts
22
+ class SnakeCaseTransformer {
23
+ convertCase(str) {
24
+ return str.replace(/(?<lower>[a-z])(?<upper>[A-Z])/gu, "$<lower>_$<upper>").replace(/[-\s]/gu, "_").toLowerCase();
25
+ }
26
+ }
27
+ export {
28
+ SnakeCaseTransformer,
29
+ PascalCaseTransformer,
30
+ KebabCaseTransformer,
31
+ CamelCaseTransformer
32
+ };
@@ -1,5 +1,5 @@
1
- import type { CaseTransformer } from '#/modules/data/types/case-transformer';
2
- import type { KebabCase } from '#/modules/data/types/kebab-case';
1
+ import type { CaseTransformer } from '../../../modules/data/types/case-transformer';
2
+ import type { KebabCase } from '../../../modules/data/types/kebab-case';
3
3
  /**
4
4
  * Transforms string into `kebab-case` format.
5
5
  * Implements ({@link CaseTransformer}).
@@ -1,5 +1,5 @@
1
- import type { CaseTransformer } from '#/modules/data/types/case-transformer';
2
- import type { PascalCase } from '#/modules/data/types/pascal-case';
1
+ import type { CaseTransformer } from '../../../modules/data/types/case-transformer';
2
+ import type { PascalCase } from '../../../modules/data/types/pascal-case';
3
3
  /**
4
4
  * Transforms string into `PascalCase` format.
5
5
  * Implements ({@link CaseTransformer}).
@@ -1,5 +1,5 @@
1
- import type { CaseTransformer } from '#/modules/data/types/case-transformer';
2
- import type { SnakeCase } from '#/modules/data/types/snake-case';
1
+ import type { CaseTransformer } from '../../../modules/data/types/case-transformer';
2
+ import type { SnakeCase } from '../../../modules/data/types/snake-case';
3
3
  /**
4
4
  * Transforms string into `snake_case` format.
5
5
  * Implements ({@link CaseTransformer}).
@@ -0,0 +1 @@
1
+ // @bun
@@ -1,7 +1,7 @@
1
- import type { CamelCaseTransformer } from '#/modules/data/transformers/camel-case';
2
- import type { KebabCaseTransformer } from '#/modules/data/transformers/kebab-case';
3
- import type { PascalCaseTransformer } from '#/modules/data/transformers/pascal-case';
4
- import type { SnakeCaseTransformer } from '#/modules/data/transformers/snake-case';
1
+ import type { CamelCaseTransformer } from '../../../modules/data/transformers/camel-case';
2
+ import type { KebabCaseTransformer } from '../../../modules/data/transformers/kebab-case';
3
+ import type { PascalCaseTransformer } from '../../../modules/data/transformers/pascal-case';
4
+ import type { SnakeCaseTransformer } from '../../../modules/data/transformers/snake-case';
5
5
  import type { TransformKeysCamelCase } from './transform-keys-camel-case';
6
6
  import type { TransformKeysKebabCase } from './transform-keys-kebab-case';
7
7
  import type { TransformKeysPascalCase } from './transform-keys-pascal-case';
@@ -0,0 +1,9 @@
1
+ // @bun
2
+ import {
3
+ DATABASE_ERROR_KEYS,
4
+ MSSQL_ERROR_CODE
5
+ } from "../../../chunk-4v86f7gp.js";
6
+ export {
7
+ MSSQL_ERROR_CODE,
8
+ DATABASE_ERROR_KEYS
9
+ };
@@ -0,0 +1 @@
1
+ // @bun
@@ -1,4 +1,4 @@
1
- import type { QueryContext } from '#/modules/database/types/query-context';
1
+ import type { QueryContext } from '../../../modules/database/types/query-context';
2
2
  export interface MssqlEventMap {
3
3
  readonly query: [QueryContext];
4
4
  readonly 'query:response': [unknown[], QueryContext];
@@ -1,4 +1,4 @@
1
- import type { QueryContext } from '#/modules/database/types/query-context';
1
+ import type { QueryContext } from '../../../modules/database/types/query-context';
2
2
  export interface TableEventMap {
3
3
  readonly selected: [unknown, QueryContext];
4
4
  readonly inserted: [unknown, QueryContext];
@@ -0,0 +1,16 @@
1
+ // @bun
2
+ import {
3
+ MSSQL,
4
+ Table
5
+ } from "../../chunk-afd82epa.js";
6
+ import"../../chunk-afyz8rg5.js";
7
+ import"../../chunk-grfyngq0.js";
8
+ import"../../chunk-mvrxngm7.js";
9
+ import"../../chunk-4v86f7gp.js";
10
+ import"../../chunk-7t524zqh.js";
11
+ import"../../chunk-sqts8vyk.js";
12
+ import"../../chunk-9cgzhc50.js";
13
+ export {
14
+ Table,
15
+ MSSQL
16
+ };
@@ -1,6 +1,6 @@
1
1
  import { type Knex } from 'knex';
2
- import { Repository } from '#/modules/repository/repository';
3
- import { TypedEventEmitter } from '#/modules/typed-event-emitter/typed-event-emitter';
2
+ import { Repository } from '../../modules/repository/repository';
3
+ import { TypedEventEmitter } from '../../modules/typed-event-emitter/typed-event-emitter';
4
4
  import type { MssqlEventMap } from './events/mssql-event-map';
5
5
  import { Table } from './table';
6
6
  import type { MSSQLDatabaseOptions } from './types/mssql-database-option';
@@ -1,5 +1,5 @@
1
- import type { TableEventMap } from '#/modules/database/events/table-event-map';
2
- import { TypedEventEmitter } from '#/modules/typed-event-emitter/typed-event-emitter';
1
+ import type { TableEventMap } from '../../modules/database/events/table-event-map';
2
+ import { TypedEventEmitter } from '../../modules/typed-event-emitter/typed-event-emitter';
3
3
  /**
4
4
  * Represents a database table and provides access to its metadata (name, fields, primary key).
5
5
  * The class extends `TypedEventEmitter`<{@link TableEventMap}> to allow for event-driven programming.
@@ -0,0 +1 @@
1
+ // @bun