@mrxsys/mrx-core 2.8.0 → 2.9.0-1-and-259-20250918
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-00s6t4tw.js +26 -0
- package/dist/{chunk-sepwfqdh.js → chunk-0601exyg.js} +2 -1
- package/dist/chunk-4mvsje21.js +7 -0
- package/dist/chunk-547mr88s.js +10 -0
- package/dist/chunk-5pwb7peq.js +9 -0
- package/dist/{chunk-syhskygx.js → chunk-6g29g0tk.js} +15 -24
- package/dist/{chunk-z1skzn1j.js → chunk-6tqh339a.js} +4 -3
- package/dist/{chunk-m18th1g5.js → chunk-75hgws2d.js} +18 -39
- package/dist/chunk-8y9b2m5a.js +53 -0
- package/dist/chunk-9cgzhc50.js +15 -0
- package/dist/chunk-9dzsj7f2.js +23 -0
- package/dist/{chunk-kv9hms2z.js → chunk-b23dvm2d.js} +2 -1
- package/dist/chunk-b6f6ez2w.js +8 -0
- package/dist/{chunk-zaje5tv4.js → chunk-c9vjf06h.js} +31 -30
- package/dist/chunk-d0p9787v.js +272 -0
- package/dist/{chunk-5qtpggzv.js → chunk-grfyngq0.js} +3 -2
- package/dist/{chunk-4n72ks5x.js → chunk-h4dyeeqg.js} +4 -5
- package/dist/{chunk-9nw6qekv.js → chunk-h9t48r9q.js} +2 -1
- package/dist/{chunk-7g8k2epn.js → chunk-k9dtqf1p.js} +6 -9
- package/dist/{chunk-26brdrbz.js → chunk-kje1qysg.js} +59 -46
- package/dist/{chunk-4mt568fz.js → chunk-m3grz32t.js} +4 -3
- package/dist/{chunk-yvyahr2h.js → chunk-mvrxngm7.js} +2 -1
- package/dist/{chunk-j28jpfv2.js → chunk-n6d9ncnv.js} +2 -1
- package/dist/chunk-ngrxhdkb.js +32 -0
- package/dist/{chunk-79mw7w0g.js → chunk-nvt16s80.js} +2 -1
- package/dist/{chunk-yd82hdxv.js → chunk-w1547qd4.js} +2 -1
- package/dist/chunk-yagxbm1r.js +9 -0
- package/dist/{chunk-snqdnkk7.js → chunk-z9a175mk.js} +4 -3
- package/dist/{chunk-r1kcf1q6.js → chunk-zwrygafm.js} +5 -6
- package/dist/errors/base-error.d.ts +5 -0
- package/dist/errors/enums/index.d.ts +1 -1
- package/dist/errors/enums/index.js +1 -1
- package/dist/errors/http-error.d.ts +11 -0
- package/dist/errors/index.d.ts +2 -2
- package/dist/errors/index.js +3 -3
- package/dist/errors/utils/index.d.ts +1 -0
- package/dist/errors/utils/index.js +16 -0
- package/dist/errors/utils/is-nowarajs-error.ts.d.ts +4 -0
- package/dist/modules/data/data.d.ts +2 -2
- package/dist/modules/data/enums/index.d.ts +1 -1
- package/dist/modules/data/enums/index.js +1 -1
- package/dist/modules/data/index.js +3 -3
- package/dist/modules/data/transformers/{camelCase.d.ts → camel-case.d.ts} +2 -2
- package/dist/modules/data/transformers/index.d.ts +4 -4
- package/dist/modules/data/transformers/index.js +4 -4
- package/dist/modules/data/transformers/{kebabCase.d.ts → kebab-case.d.ts} +2 -2
- package/dist/modules/data/transformers/{pascalCase.d.ts → pascal-case.d.ts} +2 -2
- package/dist/modules/data/transformers/{snakeCase.d.ts → snake-case.d.ts} +2 -2
- package/dist/modules/data/types/index.d.ts +10 -10
- package/dist/modules/data/types/{pascalCase.d.ts → pascal-case.d.ts} +1 -1
- package/dist/modules/data/types/{transformKeysCamelCase.d.ts → transform-keys-camel-case.d.ts} +1 -1
- package/dist/modules/data/types/{transformKeysKebabCase.d.ts → transform-keys-kebab-case.d.ts} +1 -1
- package/dist/modules/data/types/{transformKeysPascalCase.d.ts → transform-keys-pascal-case.d.ts} +1 -1
- package/dist/modules/data/types/{transformKeysSnakeCase.d.ts → transform-keys-snake-case.d.ts} +1 -1
- package/dist/modules/data/types/{transformObjectKeys.d.ts → transform-object-keys.d.ts} +8 -8
- package/dist/modules/database/enums/index.d.ts +2 -2
- package/dist/modules/database/enums/index.js +1 -1
- package/dist/modules/database/events/index.d.ts +2 -2
- package/dist/modules/database/events/{mssqlEventMap.d.ts → mssql-event-map.d.ts} +1 -1
- package/dist/modules/database/events/{tableEventMap.d.ts → table-event-map.d.ts} +1 -1
- package/dist/modules/database/index.js +8 -8
- package/dist/modules/database/mssql.d.ts +3 -3
- package/dist/modules/database/table.d.ts +2 -2
- package/dist/modules/database/types/index.d.ts +3 -3
- package/dist/modules/elysia/cache/cache.d.ts +15 -132
- package/dist/modules/elysia/cache/index.js +8 -6
- package/dist/modules/elysia/cache/types/{cacheOptions.d.ts → cache-options.d.ts} +1 -1
- package/dist/modules/elysia/cache/types/index.d.ts +1 -1
- package/dist/modules/elysia/cache/utils/index.d.ts +1 -1
- package/dist/modules/elysia/cache/utils/index.js +1 -1
- package/dist/modules/elysia/{crudSchema/crudSchema.d.ts → crud/crud-schema.d.ts} +4 -4
- package/dist/modules/elysia/crud/crud.d.ts +34 -42
- package/dist/modules/elysia/crud/index.d.ts +1 -0
- package/dist/modules/elysia/crud/index.js +125 -280
- package/dist/modules/elysia/crud/operations/count.d.ts +258 -0
- package/dist/modules/elysia/crud/operations/delete.d.ts +258 -0
- package/dist/modules/elysia/crud/operations/deleteOne.d.ts +258 -0
- package/dist/modules/elysia/crud/operations/find.d.ts +258 -0
- package/dist/modules/elysia/crud/operations/findOne.d.ts +258 -0
- package/dist/modules/elysia/crud/operations/index.d.ts +8 -0
- package/dist/modules/elysia/crud/operations/index.js +33 -0
- package/dist/modules/elysia/crud/operations/insert.d.ts +258 -0
- package/dist/modules/elysia/crud/operations/update.d.ts +268 -0
- package/dist/modules/elysia/crud/operations/updateOne.d.ts +268 -0
- package/dist/modules/elysia/{crudSchema/types/adaptiveWhereClauseSchema.d.ts → crud/types/adaptive-where-clause-schema.d.ts} +1 -1
- package/dist/modules/elysia/crud/types/count-response-200-schema.d.ts +5 -0
- package/dist/modules/elysia/crud/types/count-schema.d.ts +10 -0
- package/dist/modules/elysia/crud/types/crud-operation-base.d.ts +4 -0
- package/dist/modules/elysia/crud/types/crud-operation-count.d.ts +14 -0
- package/dist/modules/elysia/crud/types/crud-operation-delete-one.d.ts +14 -0
- package/dist/modules/elysia/crud/types/crud-operation-delete.d.ts +14 -0
- package/dist/modules/elysia/crud/types/crud-operation-find-one.d.ts +14 -0
- package/dist/modules/elysia/crud/types/crud-operation-find.d.ts +14 -0
- package/dist/modules/elysia/crud/types/crud-operation-insert.d.ts +14 -0
- package/dist/modules/elysia/crud/types/crud-operation-update-one.d.ts +16 -0
- package/dist/modules/elysia/crud/types/crud-operation-update.d.ts +14 -0
- package/dist/modules/elysia/crud/types/crud-operations.d.ts +19 -0
- package/dist/modules/elysia/crud/types/crud-options.d.ts +44 -0
- package/dist/modules/elysia/crud/types/crud-schema-models-type.d.ts +12 -0
- package/dist/modules/elysia/{crudSchema/types/crudSchemaOptions.d.ts → crud/types/crud-schema-options.d.ts} +1 -1
- package/dist/modules/elysia/crud/types/delete-schema.d.ts +12 -0
- package/dist/modules/elysia/crud/types/filter-schema.d.ts +9 -0
- package/dist/modules/elysia/crud/types/find-schema.d.ts +16 -0
- package/dist/modules/elysia/{crudSchema/utils/createIdParamSchema.d.ts → crud/types/id-param-schema.d.ts} +1 -1
- package/dist/modules/elysia/crud/types/index.d.ts +29 -11
- package/dist/modules/elysia/crud/types/insert-schema.d.ts +11 -0
- package/dist/modules/elysia/{crudSchema/types/orderSchema.d.ts → crud/types/order-schema.d.ts} +1 -1
- package/dist/modules/elysia/crud/types/properties-schema.d.ts +9 -0
- package/dist/modules/elysia/{crudSchema/types/qSchema.d.ts → crud/types/q-schema.d.ts} +1 -1
- package/dist/modules/elysia/crud/types/response-200-schema.d.ts +11 -0
- package/dist/modules/elysia/{crudSchema/types/selectedFieldSchema.d.ts → crud/types/selected-field-schema.d.ts} +1 -1
- package/dist/modules/elysia/crud/types/update-one-schema.d.ts +4 -0
- package/dist/modules/elysia/crud/types/update-schema.d.ts +13 -0
- package/dist/modules/elysia/{crudSchema/utils/createAdaptiveWhereClauseSchema.d.ts → crud/utils/create-adaptive-where-clause-schema.d.ts} +2 -2
- package/dist/modules/elysia/crud/utils/create-count-response-200-schema.d.ts +8 -0
- package/dist/modules/elysia/crud/utils/create-count-schema.d.ts +12 -0
- package/dist/modules/elysia/crud/utils/create-delete-schema.d.ts +12 -0
- package/dist/modules/elysia/{crudSchema/utils/createFiltersSchema.d.ts → crud/utils/create-filters-schema.d.ts} +3 -6
- package/dist/modules/elysia/crud/utils/create-find-schema.d.ts +12 -0
- package/dist/modules/elysia/crud/utils/create-id-param-schema.d.ts +2 -0
- package/dist/modules/elysia/crud/utils/create-insert-schema.d.ts +8 -0
- package/dist/modules/elysia/{crudSchema/utils/createOrderSchema.d.ts → crud/utils/create-order-schema.d.ts} +2 -2
- package/dist/modules/elysia/crud/utils/create-properties-schema.d.ts +12 -0
- package/dist/modules/elysia/{crudSchema/utils/createQSchema.d.ts → crud/utils/create-q-schema.d.ts} +2 -2
- package/dist/modules/elysia/crud/utils/create-response-200-schema.d.ts +3 -0
- package/dist/modules/elysia/{crudSchema/utils/createSelectedFieldsSchema.d.ts → crud/utils/create-selected-fields-schema.d.ts} +2 -2
- package/dist/modules/elysia/crud/utils/create-update-one-schema.d.ts +3 -0
- package/dist/modules/elysia/crud/utils/create-update-schema.d.ts +3 -0
- package/dist/modules/elysia/crud/utils/index.d.ts +16 -0
- package/dist/modules/elysia/{crudSchema → crud}/utils/index.js +7 -4
- package/dist/modules/elysia/{crudSchema/utils/isDateFromElysiaTypeBox.d.ts → crud/utils/is-date-from-elysia-typebox.d.ts} +1 -1
- package/dist/modules/elysia/db-resolver/db-resolver.d.ts +193 -0
- package/dist/modules/elysia/db-resolver/enums/db-resolver-error-keys.d.ts +3 -0
- package/dist/modules/elysia/db-resolver/enums/index.d.ts +1 -0
- package/dist/modules/elysia/{dbResolver → db-resolver}/enums/index.js +1 -1
- package/dist/modules/elysia/db-resolver/index.d.ts +1 -0
- package/dist/modules/elysia/db-resolver/index.js +18 -0
- package/dist/modules/elysia/error/error.d.ts +14 -3
- package/dist/modules/elysia/error/index.js +5 -5
- package/dist/modules/elysia/microservice/microservice.d.ts +17 -14
- package/dist/modules/elysia/rate-limit/enums/index.d.ts +1 -0
- package/dist/modules/elysia/{rateLimit → rate-limit}/enums/index.js +1 -1
- package/dist/modules/elysia/rate-limit/index.d.ts +1 -0
- package/dist/modules/elysia/{rateLimit → rate-limit}/index.js +12 -16
- package/dist/modules/elysia/{rateLimit/rateLimit.d.ts → rate-limit/rate-limit.d.ts} +5 -2
- package/dist/modules/elysia/rate-limit/types/index.d.ts +1 -0
- package/dist/modules/elysia/{rateLimit/types/rateLimitOptions.d.ts → rate-limit/types/rate-limit-options.d.ts} +1 -1
- package/dist/modules/jwt/enums/index.d.ts +2 -2
- package/dist/modules/jwt/enums/index.js +2 -2
- package/dist/modules/jwt/index.js +8 -15
- package/dist/modules/jwt/utils/index.d.ts +1 -1
- package/dist/modules/jwt/utils/index.js +3 -3
- package/dist/modules/kv-store/enums/index.d.ts +1 -0
- package/dist/modules/{kvStore → kv-store}/enums/index.js +1 -1
- package/dist/modules/kv-store/ioredis/index.d.ts +1 -0
- package/dist/modules/{kvStore → kv-store}/ioredis/index.js +7 -17
- package/dist/modules/{kvStore/ioredis/ioredisStore.d.ts → kv-store/ioredis/ioredis-store.d.ts} +1 -1
- package/dist/modules/kv-store/memory/index.d.ts +1 -0
- package/dist/modules/kv-store/memory/index.js +9 -0
- package/dist/modules/{kvStore/memory/memoryStore.d.ts → kv-store/memory/memory-store.d.ts} +1 -1
- package/dist/modules/kv-store/types/index.d.ts +1 -0
- package/dist/modules/logger/enums/index.d.ts +1 -1
- package/dist/modules/logger/enums/index.js +1 -1
- package/dist/modules/logger/enums/logger-error-keys.d.ts +6 -0
- package/dist/modules/logger/events/index.d.ts +1 -1
- package/dist/modules/logger/events/logger-events.d.ts +11 -0
- package/dist/modules/logger/index.js +40 -52
- package/dist/modules/logger/logger.d.ts +172 -172
- package/dist/modules/logger/sinks/console-logger.d.ts +22 -0
- package/dist/modules/logger/sinks/file-logger.d.ts +25 -0
- package/dist/modules/logger/sinks/index.d.ts +2 -0
- package/dist/modules/logger/{strategies → sinks}/index.js +6 -6
- package/dist/modules/logger/types/bodies-intersection.d.ts +2 -0
- package/dist/modules/logger/types/index.d.ts +6 -6
- package/dist/modules/logger/types/log-stream-chunk.d.ts +15 -0
- package/dist/modules/logger/types/{loggerStrategy.d.ts → logger-sink.d.ts} +3 -3
- package/dist/modules/logger/types/sink-body.d.ts +2 -0
- package/dist/modules/logger/types/sink-map.d.ts +2 -0
- package/dist/modules/mailer/enums/index.d.ts +1 -1
- package/dist/modules/mailer/enums/index.js +1 -1
- package/dist/modules/mailer/index.js +5 -8
- package/dist/modules/mailer/smtp.d.ts +1 -1
- package/dist/modules/mailer/types/index.d.ts +3 -3
- package/dist/modules/mailer/types/{smtpOptions.d.ts → smtp-options.d.ts} +2 -2
- package/dist/modules/repository/index.js +6 -6
- package/dist/modules/repository/repository.d.ts +5 -5
- package/dist/modules/repository/types/filter.d.ts +2 -2
- package/dist/modules/repository/types/index.d.ts +6 -6
- package/dist/modules/repository/types/{queryOptionsExtendPagination.d.ts → query-options-extend-pagination.d.ts} +1 -1
- package/dist/modules/repository/types/{queryOptionsExtendStream.d.ts → query-options-extend-stream.d.ts} +1 -1
- package/dist/modules/repository/types/{queryOptions.d.ts → query-options.d.ts} +4 -4
- package/dist/modules/singleton-manager/enums/index.d.ts +1 -0
- package/dist/modules/{singletonManager → singleton-manager}/enums/index.js +1 -1
- package/dist/modules/singleton-manager/enums/singleton-manager-error-keys.d.ts +4 -0
- package/dist/modules/singleton-manager/index.d.ts +1 -0
- package/dist/modules/singleton-manager/index.js +9 -0
- package/dist/modules/{singletonManager/singletonManager.d.ts → singleton-manager/singleton-manager.d.ts} +9 -11
- package/dist/modules/totp/enums/index.d.ts +1 -1
- package/dist/modules/totp/enums/index.js +1 -1
- package/dist/modules/totp/hotp.d.ts +1 -1
- package/dist/modules/totp/index.d.ts +1 -1
- package/dist/modules/totp/index.js +7 -13
- package/dist/modules/totp/{otpAuthUri.d.ts → otp-auth-uri.d.ts} +1 -1
- package/dist/modules/totp/totp.d.ts +2 -2
- package/dist/modules/totp/types/index.d.ts +3 -3
- package/dist/modules/totp/types/{verifyOptions.d.ts → verify-options.d.ts} +1 -1
- package/dist/modules/totp/utils/index.d.ts +5 -5
- package/dist/modules/totp/utils/index.js +7 -12
- package/dist/modules/typed-event-emitter/index.d.ts +1 -0
- package/dist/modules/{typedEventEmitter → typed-event-emitter}/index.js +1 -1
- package/dist/modules/typed-event-emitter/typed-event-emitter.d.ts +221 -0
- package/dist/modules/typed-event-emitter/types/index.d.ts +1 -0
- package/dist/shared/enums/index.d.ts +1 -0
- package/dist/{utils → shared}/enums/index.js +1 -1
- package/dist/shared/types/index.d.ts +3 -0
- package/dist/shared/types/tflatten.d.ts +5 -0
- package/dist/shared/utils/flatten.d.ts +3 -0
- package/dist/{utils → shared/utils}/index.d.ts +2 -1
- package/dist/{utils → shared/utils}/index.js +10 -9
- package/package.json +39 -40
- package/CHANGELOG.md +0 -98
- package/dist/chunk-45gt9273.js +0 -8
- package/dist/chunk-4xs0e8cm.js +0 -9
- package/dist/chunk-683sda6e.js +0 -28
- package/dist/chunk-7jsxw1ts.js +0 -40
- package/dist/chunk-dwfyt1m6.js +0 -6
- package/dist/chunk-g821m8gq.js +0 -77
- package/dist/chunk-hcc6g1fd.js +0 -7
- package/dist/chunk-ncc0m208.js +0 -8
- package/dist/chunk-vknq69e0.js +0 -23
- package/dist/chunk-y78xrx17.js +0 -54
- package/dist/errors/baseError.d.ts +0 -9
- package/dist/errors/httpError.d.ts +0 -14
- package/dist/errors/types/baseErrorOptions.d.ts +0 -15
- package/dist/errors/types/httpErrorOptions.d.ts +0 -13
- package/dist/errors/types/index.d.ts +0 -2
- package/dist/modules/elysia/crud/types/crudOperationBaseOptions.d.ts +0 -6
- package/dist/modules/elysia/crud/types/crudOperationCountOptions.d.ts +0 -2
- package/dist/modules/elysia/crud/types/crudOperationDeleteOneOptions.d.ts +0 -2
- package/dist/modules/elysia/crud/types/crudOperationDeleteOptions.d.ts +0 -2
- package/dist/modules/elysia/crud/types/crudOperationFindOneOptions.d.ts +0 -2
- package/dist/modules/elysia/crud/types/crudOperationFindOptions.d.ts +0 -2
- package/dist/modules/elysia/crud/types/crudOperationInsertOptions.d.ts +0 -2
- package/dist/modules/elysia/crud/types/crudOperationUpdateOneOptions.d.ts +0 -2
- package/dist/modules/elysia/crud/types/crudOperationUpdateOptions.d.ts +0 -2
- package/dist/modules/elysia/crud/types/crudOperationsOptions.d.ts +0 -18
- package/dist/modules/elysia/crud/types/crudOptions.d.ts +0 -25
- package/dist/modules/elysia/crudSchema/index.d.ts +0 -1
- package/dist/modules/elysia/crudSchema/index.js +0 -11
- package/dist/modules/elysia/crudSchema/types/crudModelsType.d.ts +0 -14
- package/dist/modules/elysia/crudSchema/types/index.d.ts +0 -8
- package/dist/modules/elysia/crudSchema/types/queryOptionsBuilderOptions.d.ts +0 -11
- package/dist/modules/elysia/crudSchema/utils/createCountResponse200Schema.d.ts +0 -11
- package/dist/modules/elysia/crudSchema/utils/createCountSchema.d.ts +0 -16
- package/dist/modules/elysia/crudSchema/utils/createDeleteSchema.d.ts +0 -18
- package/dist/modules/elysia/crudSchema/utils/createFindSchema.d.ts +0 -22
- package/dist/modules/elysia/crudSchema/utils/createInsertSchema.d.ts +0 -8
- package/dist/modules/elysia/crudSchema/utils/createPropertiesSchema.d.ts +0 -12
- package/dist/modules/elysia/crudSchema/utils/createResponse200Schema.d.ts +0 -5
- package/dist/modules/elysia/crudSchema/utils/createUpdateOneSchema.d.ts +0 -4
- package/dist/modules/elysia/crudSchema/utils/createUpdateSchema.d.ts +0 -10
- package/dist/modules/elysia/crudSchema/utils/index.d.ts +0 -15
- package/dist/modules/elysia/dbResolver/dbResolver.d.ts +0 -17
- package/dist/modules/elysia/dbResolver/enums/dbResolverErrorKeys.d.ts +0 -3
- package/dist/modules/elysia/dbResolver/enums/index.d.ts +0 -1
- package/dist/modules/elysia/dbResolver/index.d.ts +0 -1
- package/dist/modules/elysia/dbResolver/index.js +0 -18
- package/dist/modules/elysia/dbResolver/types/dynamicDbOptions.d.ts +0 -7
- package/dist/modules/elysia/dbResolver/types/index.d.ts +0 -1
- package/dist/modules/elysia/rateLimit/enums/index.d.ts +0 -1
- package/dist/modules/elysia/rateLimit/index.d.ts +0 -1
- package/dist/modules/elysia/rateLimit/types/index.d.ts +0 -1
- package/dist/modules/kvStore/enums/index.d.ts +0 -1
- package/dist/modules/kvStore/ioredis/index.d.ts +0 -1
- package/dist/modules/kvStore/memory/index.d.ts +0 -1
- package/dist/modules/kvStore/memory/index.js +0 -9
- package/dist/modules/kvStore/types/index.d.ts +0 -1
- package/dist/modules/kvStore/types/index.js +0 -1
- package/dist/modules/logger/enums/loggerErrorKeys.d.ts +0 -6
- package/dist/modules/logger/events/loggerEvents.d.ts +0 -11
- package/dist/modules/logger/strategies/consoleLogger.d.ts +0 -22
- package/dist/modules/logger/strategies/fileLogger.d.ts +0 -25
- package/dist/modules/logger/strategies/index.d.ts +0 -2
- package/dist/modules/logger/types/bodiesIntersection.d.ts +0 -2
- package/dist/modules/logger/types/logStreamChunk.d.ts +0 -15
- package/dist/modules/logger/types/strategyBody.d.ts +0 -2
- package/dist/modules/logger/types/strategyMap.d.ts +0 -2
- package/dist/modules/singletonManager/enums/index.d.ts +0 -1
- package/dist/modules/singletonManager/enums/singletonManagerErrorKeys.d.ts +0 -4
- package/dist/modules/singletonManager/index.d.ts +0 -1
- package/dist/modules/singletonManager/index.js +0 -9
- package/dist/modules/typedEventEmitter/index.d.ts +0 -1
- package/dist/modules/typedEventEmitter/typedEventEmitter.d.ts +0 -221
- package/dist/modules/typedEventEmitter/types/index.d.ts +0 -1
- package/dist/modules/typedEventEmitter/types/index.js +0 -1
- package/dist/utils/enums/index.d.ts +0 -1
- package/dist/utils/types/index.d.ts +0 -2
- package/dist/utils/types/index.js +0 -1
- package/dist/errors/enums/{httpErrorStatusCodes.d.ts → http-status-codes.d.ts} +0 -0
- package/dist/modules/data/enums/{dataErrorKeys.d.ts → data-error-keys.d.ts} +0 -0
- package/dist/modules/data/types/{camelCase.d.ts → camel-case.d.ts} +0 -0
- package/dist/modules/data/types/{caseTransformer.d.ts → case-transformer.d.ts} +0 -0
- package/dist/modules/data/types/{kebabCase.d.ts → kebab-case.d.ts} +0 -0
- package/dist/modules/data/types/{snakeCase.d.ts → snake-case.d.ts} +0 -0
- package/dist/modules/database/enums/{databaseErrorKeys.d.ts → database-error-keys.d.ts} +15 -15
- package/dist/modules/database/enums/{mssqlErrorCode.d.ts → mssql-error-code.d.ts} +12 -12
- package/dist/modules/database/types/{mssqlDatabaseOption.d.ts → mssql-database-option.d.ts} +0 -0
- package/dist/modules/database/types/{mssqlEventLog.d.ts → mssql-event-log.d.ts} +0 -0
- package/dist/modules/database/types/{queryContext.d.ts → query-context.d.ts} +0 -0
- package/dist/modules/elysia/cache/types/{cacheItem.d.ts → cache-item.d.ts} +0 -0
- package/dist/modules/elysia/cache/utils/{generateCacheKey.d.ts → generate-cache-key.d.ts} +0 -0
- package/dist/modules/elysia/{crudSchema/types/crudSchemaOperations.d.ts → crud/types/crud-schema-operations.d.ts} +0 -0
- package/dist/modules/elysia/{rateLimit/enums/rateLimitErrorKeys.d.ts → rate-limit/enums/rate-limit-error-keys.d.ts} +0 -0
- package/dist/{errors → modules/elysia/rate-limit}/types/index.js +0 -0
- package/dist/modules/jwt/enums/{jwtErrorKeys.d.ts → jwt-error-keys.d.ts} +2 -2
- package/dist/modules/jwt/enums/{parseHumanTimeToSecondsErrorKeys.d.ts → parse-human-time-to-seconds-error-keys.d.ts} +0 -0
- package/dist/modules/jwt/utils/{parseHumanTimeToSeconds.d.ts → parse-human-time-to-seconds.d.ts} +0 -0
- package/dist/modules/{kvStore/enums/kvStoreErrorKeys.d.ts → kv-store/enums/kv-store-error-keys.d.ts} +2 -2
- package/dist/modules/{kvStore/memory/types/memoryStoreEntry.d.ts → kv-store/memory/types/memory-store-entry.d.ts} +0 -0
- package/dist/modules/{elysia/crudSchema → kv-store}/types/index.js +0 -0
- package/dist/modules/{kvStore/types/kvStore.d.ts → kv-store/types/kv-store.d.ts} +0 -0
- package/dist/modules/logger/types/{logLevels.d.ts → log-levels.d.ts} +0 -0
- package/dist/modules/mailer/enums/{mailerErrorKeys.d.ts → mailer-error-keys.d.ts} +1 -1
- package/dist/modules/mailer/types/{smtpCredentials.d.ts → smtp-credentials.d.ts} +0 -0
- package/dist/modules/mailer/types/{smtpPoolOptions.d.ts → smtp-pool-options.d.ts} +0 -0
- package/dist/modules/repository/types/{adaptiveWhereClause.d.ts → adaptive-where-clause.d.ts} +0 -0
- package/dist/modules/repository/types/{orderByItem.d.ts → order-by-item.d.ts} +0 -0
- package/dist/modules/repository/types/{selectedFields.d.ts → selected-fields.d.ts} +0 -0
- package/dist/modules/totp/enums/{totpErrorKeys.d.ts → totp-error-keys.d.ts} +2 -2
- /package/dist/modules/totp/types/{otpAuthUri.d.ts → otp-auth-uri.d.ts} +0 -0
- /package/dist/modules/totp/types/{totpOptions.d.ts → totp-options.d.ts} +0 -0
- /package/dist/modules/totp/utils/{createCounterBuffer.d.ts → create-counter-buffer.d.ts} +0 -0
- /package/dist/modules/totp/utils/{dynamicTruncation.d.ts → dynamic-truncation.d.ts} +0 -0
- /package/dist/modules/totp/utils/{generateHmac.d.ts → generate-hmac.d.ts} +0 -0
- /package/dist/modules/totp/utils/{generateSecretBytes.d.ts → generate-secret-bytes.d.ts} +0 -0
- /package/dist/modules/totp/utils/{timeRemaining.d.ts → time-remaining.d.ts} +0 -0
- /package/dist/modules/{typedEventEmitter/types/eventMap.d.ts → typed-event-emitter/types/event-map.d.ts} +0 -0
- /package/dist/modules/{elysia/dbResolver → typed-event-emitter}/types/index.js +0 -0
- /package/dist/{utils/enums/utilsErrorKeys.d.ts → shared/enums/utils-error-keys.d.ts} +0 -0
- /package/dist/{modules/elysia/rateLimit → shared}/types/index.js +0 -0
- /package/dist/{utils/types/renameKey.d.ts → shared/types/rename-key.d.ts} +0 -0
- /package/dist/{utils/types/streamWithAsyncIterable.d.ts → shared/types/stream-with-async-iterable.d.ts} +0 -0
- /package/dist/{utils → shared/utils}/env.d.ts +0 -0
- /package/dist/{utils/isDateString.d.ts → shared/utils/is-date-string.d.ts} +0 -0
- /package/dist/{utils → shared/utils}/stream.d.ts +0 -0
package/package.json
CHANGED
|
@@ -1,37 +1,38 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@mrxsys/mrx-core",
|
|
3
|
-
"version": "2.
|
|
3
|
+
"version": "2.9.0-1-and-259-20250918",
|
|
4
4
|
"author": "Ruby",
|
|
5
5
|
"devDependencies": {
|
|
6
|
-
"@
|
|
7
|
-
"@
|
|
8
|
-
"@
|
|
9
|
-
"@
|
|
6
|
+
"@elysiajs/openapi": "^1.4.2",
|
|
7
|
+
"@eslint/js": "^9.35.0",
|
|
8
|
+
"@sinclair/typebox": "0.34.41",
|
|
9
|
+
"@stylistic/eslint-plugin": "^5.3.1",
|
|
10
|
+
"@types/bun": "^1.2.22",
|
|
10
11
|
"@types/nodemailer": "^7.0.1",
|
|
11
|
-
"elysia": "
|
|
12
|
-
"eslint": "^9.
|
|
13
|
-
"globals": "^16.
|
|
12
|
+
"elysia": "1.4.5",
|
|
13
|
+
"eslint": "^9.35.0",
|
|
14
|
+
"globals": "^16.4.0",
|
|
14
15
|
"ioredis": "^5.7.0",
|
|
15
|
-
"jose": "^6.0
|
|
16
|
+
"jose": "^6.1.0",
|
|
16
17
|
"knex": "^3.1.0",
|
|
17
18
|
"mssql": "^11.0.1",
|
|
18
|
-
"nodemailer": "^7.0.
|
|
19
|
-
"typescript-eslint": "^8.
|
|
19
|
+
"nodemailer": "^7.0.6",
|
|
20
|
+
"typescript-eslint": "^8.44.0"
|
|
20
21
|
},
|
|
21
22
|
"peerDependencies": {
|
|
22
|
-
"@sinclair/typebox": "0.34.
|
|
23
|
-
"elysia": "^1.3.
|
|
23
|
+
"@sinclair/typebox": "0.34.41",
|
|
24
|
+
"elysia": "^1.3.21",
|
|
24
25
|
"ioredis": "^5.7.0",
|
|
25
|
-
"jose": "^6.0
|
|
26
|
+
"jose": "^6.1.0",
|
|
26
27
|
"knex": "^3.1.0",
|
|
27
28
|
"mssql": "^11.0.1",
|
|
28
|
-
"nodemailer": "^7.0.
|
|
29
|
+
"nodemailer": "^7.0.6",
|
|
29
30
|
"typescript": "^5.9.2"
|
|
30
31
|
},
|
|
31
32
|
"exports": {
|
|
32
33
|
"./errors": "./dist/errors/index.js",
|
|
33
34
|
"./errors/enums": "./dist/errors/enums/index.js",
|
|
34
|
-
"./errors/
|
|
35
|
+
"./errors/utils": "./dist/errors/utils/index.js",
|
|
35
36
|
"./modules/data": "./dist/modules/data/index.js",
|
|
36
37
|
"./modules/data/enums": "./dist/modules/data/enums/index.js",
|
|
37
38
|
"./modules/data/transformers": "./dist/modules/data/transformers/index.js",
|
|
@@ -44,46 +45,44 @@
|
|
|
44
45
|
"./modules/elysia/cache/types": "./dist/modules/elysia/cache/types/index.js",
|
|
45
46
|
"./modules/elysia/cache/utils": "./dist/modules/elysia/cache/utils/index.js",
|
|
46
47
|
"./modules/elysia/crud": "./dist/modules/elysia/crud/index.js",
|
|
48
|
+
"./modules/elysia/crud/operations": "./dist/modules/elysia/crud/operations/index.js",
|
|
47
49
|
"./modules/elysia/crud/types": "./dist/modules/elysia/crud/types/index.js",
|
|
48
|
-
"./modules/elysia/
|
|
49
|
-
"./modules/elysia/
|
|
50
|
-
"./modules/elysia/
|
|
51
|
-
"./modules/elysia/dbResolver": "./dist/modules/elysia/dbResolver/index.js",
|
|
52
|
-
"./modules/elysia/dbResolver/enums": "./dist/modules/elysia/dbResolver/enums/index.js",
|
|
53
|
-
"./modules/elysia/dbResolver/types": "./dist/modules/elysia/dbResolver/types/index.js",
|
|
50
|
+
"./modules/elysia/crud/utils": "./dist/modules/elysia/crud/utils/index.js",
|
|
51
|
+
"./modules/elysia/db-resolver": "./dist/modules/elysia/db-resolver/index.js",
|
|
52
|
+
"./modules/elysia/db-resolver/enums": "./dist/modules/elysia/db-resolver/enums/index.js",
|
|
54
53
|
"./modules/elysia/error": "./dist/modules/elysia/error/index.js",
|
|
55
54
|
"./modules/elysia/microservice": "./dist/modules/elysia/microservice/index.js",
|
|
56
|
-
"./modules/elysia/
|
|
57
|
-
"./modules/elysia/
|
|
58
|
-
"./modules/elysia/
|
|
55
|
+
"./modules/elysia/rate-limit": "./dist/modules/elysia/rate-limit/index.js",
|
|
56
|
+
"./modules/elysia/rate-limit/enums": "./dist/modules/elysia/rate-limit/enums/index.js",
|
|
57
|
+
"./modules/elysia/rate-limit/types": "./dist/modules/elysia/rate-limit/types/index.js",
|
|
59
58
|
"./modules/jwt": "./dist/modules/jwt/index.js",
|
|
60
59
|
"./modules/jwt/enums": "./dist/modules/jwt/enums/index.js",
|
|
61
60
|
"./modules/jwt/utils": "./dist/modules/jwt/utils/index.js",
|
|
62
|
-
"./modules/
|
|
63
|
-
"./modules/
|
|
64
|
-
"./modules/
|
|
65
|
-
"./modules/
|
|
61
|
+
"./modules/kv-store/enums": "./dist/modules/kv-store/enums/index.js",
|
|
62
|
+
"./modules/kv-store/ioredis": "./dist/modules/kv-store/ioredis/index.js",
|
|
63
|
+
"./modules/kv-store/memory": "./dist/modules/kv-store/memory/index.js",
|
|
64
|
+
"./modules/kv-store/types": "./dist/modules/kv-store/types/index.js",
|
|
66
65
|
"./modules/logger": "./dist/modules/logger/index.js",
|
|
67
66
|
"./modules/logger/enums": "./dist/modules/logger/enums/index.js",
|
|
68
67
|
"./modules/logger/events": "./dist/modules/logger/events/index.js",
|
|
69
|
-
"./modules/logger/
|
|
68
|
+
"./modules/logger/sinks": "./dist/modules/logger/sinks/index.js",
|
|
70
69
|
"./modules/logger/types": "./dist/modules/logger/types/index.js",
|
|
71
70
|
"./modules/mailer": "./dist/modules/mailer/index.js",
|
|
72
71
|
"./modules/mailer/enums": "./dist/modules/mailer/enums/index.js",
|
|
73
72
|
"./modules/mailer/types": "./dist/modules/mailer/types/index.js",
|
|
74
73
|
"./modules/repository": "./dist/modules/repository/index.js",
|
|
75
74
|
"./modules/repository/types": "./dist/modules/repository/types/index.js",
|
|
76
|
-
"./modules/
|
|
77
|
-
"./modules/
|
|
75
|
+
"./modules/singleton-manager": "./dist/modules/singleton-manager/index.js",
|
|
76
|
+
"./modules/singleton-manager/enums": "./dist/modules/singleton-manager/enums/index.js",
|
|
78
77
|
"./modules/totp": "./dist/modules/totp/index.js",
|
|
79
78
|
"./modules/totp/enums": "./dist/modules/totp/enums/index.js",
|
|
80
79
|
"./modules/totp/types": "./dist/modules/totp/types/index.js",
|
|
81
80
|
"./modules/totp/utils": "./dist/modules/totp/utils/index.js",
|
|
82
|
-
"./modules/
|
|
83
|
-
"./modules/
|
|
84
|
-
"./
|
|
85
|
-
"./
|
|
86
|
-
"./utils
|
|
81
|
+
"./modules/typed-event-emitter": "./dist/modules/typed-event-emitter/index.js",
|
|
82
|
+
"./modules/typed-event-emitter/types": "./dist/modules/typed-event-emitter/types/index.js",
|
|
83
|
+
"./shared/enums": "./dist/shared/enums/index.js",
|
|
84
|
+
"./shared/types": "./dist/shared/types/index.js",
|
|
85
|
+
"./shared/utils": "./dist/shared/utils/index.js"
|
|
87
86
|
},
|
|
88
87
|
"changelog": {
|
|
89
88
|
"types": {
|
|
@@ -173,9 +172,9 @@
|
|
|
173
172
|
"fix-lint": "eslint --fix ./source",
|
|
174
173
|
"lint": "eslint ./source",
|
|
175
174
|
"start": "bun build/index.js",
|
|
176
|
-
"test:integration": "bun test --timeout
|
|
177
|
-
"test:unit": "bun test --timeout
|
|
178
|
-
"test": "bun test --coverage --timeout
|
|
175
|
+
"test:integration": "bun test --timeout 6000 $(find test/integration -name '*.spec.ts')",
|
|
176
|
+
"test:unit": "bun test --timeout 6000 --coverage $(find test/unit -name '*.spec.ts')",
|
|
177
|
+
"test": "bun test --coverage --timeout 6000"
|
|
179
178
|
},
|
|
180
179
|
"type": "module"
|
|
181
180
|
}
|
package/CHANGELOG.md
DELETED
|
@@ -1,98 +0,0 @@
|
|
|
1
|
-
|
|
2
|
-
## v2.8.0
|
|
3
|
-
|
|
4
|
-
[compare changes](https://github.com/MRX-Systems/MRX-Core/compare/v2.7.0...v2.8.0)
|
|
5
|
-
|
|
6
|
-
### 🚀 Enhancements
|
|
7
|
-
|
|
8
|
-
- **🚀:** [Add tags support to CRUD options] ([f38ec111](https://github.com/MRX-Systems/MRX-Core/commit/f38ec111))
|
|
9
|
-
- **🚀:** [Add prefix option to CRUD options] ([6305bcf3](https://github.com/MRX-Systems/MRX-Core/commit/6305bcf3))
|
|
10
|
-
- **🚀:** [Add JWT error keys enumeration] ([5fce607d](https://github.com/MRX-Systems/MRX-Core/commit/5fce607d))
|
|
11
|
-
- **🚀:** [Add parseHumanTimeToSeconds utility function] ([829511bc](https://github.com/MRX-Systems/MRX-Core/commit/829511bc))
|
|
12
|
-
- **🚀:** [Add JWT signing and verification functions] ([82fe48c3](https://github.com/MRX-Systems/MRX-Core/commit/82fe48c3))
|
|
13
|
-
- **🚀:** [Add error keys for human time parsing] ([d566df3e](https://github.com/MRX-Systems/MRX-Core/commit/d566df3e))
|
|
14
|
-
- **🚀:** [Enhance query returning with trigger modifications] ([c5b62b91](https://github.com/MRX-Systems/MRX-Core/commit/c5b62b91))
|
|
15
|
-
- **🚀:** [Add KV_STORE_ERROR_KEYS enum for error handling] ## Features - Introduced `KV_STORE_ERROR_KEYS` enum to standardize error messages. ([45fc7119](https://github.com/MRX-Systems/MRX-Core/commit/45fc7119))
|
|
16
|
-
- **🚀:** [Add IoRedisStore class for Redis-based key-value store] ([0181be2b](https://github.com/MRX-Systems/MRX-Core/commit/0181be2b))
|
|
17
|
-
- **🚀:** [Add MemoryStore class for in-memory key-value storage] ([4342e1f7](https://github.com/MRX-Systems/MRX-Core/commit/4342e1f7))
|
|
18
|
-
- **🚀:** [Add RATE_LIMIT_ERROR_KEYS export] ([1b819bea](https://github.com/MRX-Systems/MRX-Core/commit/1b819bea))
|
|
19
|
-
- **🚀:** [Add generateCacheKey utility for caching requests] ## Features - Introduced `generateCacheKey` function to create a unique cache key based on request properties. ([b80bd5e2](https://github.com/MRX-Systems/MRX-Core/commit/b80bd5e2))
|
|
20
|
-
- **🚀:** [Add caching functionality with cache utility] ([a54cd86f](https://github.com/MRX-Systems/MRX-Core/commit/a54cd86f))
|
|
21
|
-
- **🚀:** [Enhance caching mechanism with route tracking and metadata] ## Features - Implemented route tracking to cache responses based on request method and URL. - Enhanced cache storage to include metadata alongside the response. - Updated cache control headers to reflect cache hits and misses. ([1e77647f](https://github.com/MRX-Systems/MRX-Core/commit/1e77647f))
|
|
22
|
-
|
|
23
|
-
### 🔧 Fixes
|
|
24
|
-
|
|
25
|
-
- **🔧:** [Improve error handling in Repository class] ([af8b8ef2](https://github.com/MRX-Systems/MRX-Core/commit/af8b8ef2))
|
|
26
|
-
- **🔧:** [fix add x-cache MISS to the first request] - Added a check to ensure 'x-cache' header is set to 'MISS' if not already defined. - This change enhances the clarity of cache status in responses. ([26eb7929](https://github.com/MRX-Systems/MRX-Core/commit/26eb7929))
|
|
27
|
-
- **🔧:** [Update cache control headers to use metadata TTL] ([d70ce44a](https://github.com/MRX-Systems/MRX-Core/commit/d70ce44a))
|
|
28
|
-
|
|
29
|
-
### 🧹 Refactors
|
|
30
|
-
|
|
31
|
-
- **🧹:** [Totp module little clean] ([701c9a3b](https://github.com/MRX-Systems/MRX-Core/commit/701c9a3b))
|
|
32
|
-
- **🧹:** [Enhance error handling structure in error plugin] ## Refactoring - Improved the structure of the error handling in the error plugin. - Updated the validation error response to include detailed error information. ([883a17d2](https://github.com/MRX-Systems/MRX-Core/commit/883a17d2))
|
|
33
|
-
- **🧹:** [Remove JWT plugin and related files for cleanup] ([4805d0d0](https://github.com/MRX-Systems/MRX-Core/commit/4805d0d0))
|
|
34
|
-
- **🧹:** [Rename ResolveDbHeader to dbResolverHeader for consistency] ([239b7898](https://github.com/MRX-Systems/MRX-Core/commit/239b7898))
|
|
35
|
-
- **🧹:** [Refactor like operator to use where clause] ## Refactoring - Changed the implementation of the `$like` operator to use `where` instead of `whereLike`. (for non case sensitive) ([a2cf66d2](https://github.com/MRX-Systems/MRX-Core/commit/a2cf66d2))
|
|
36
|
-
- **🧹:** [Change 'like' operator to use uppercase syntax] ## Refactoring - Updated the 'like' operator in the query builder to use uppercase 'LIKE'. ([19057d82](https://github.com/MRX-Systems/MRX-Core/commit/19057d82))
|
|
37
|
-
- **🧹:** [Remove return await in ioredisStore] ([2019a41c](https://github.com/MRX-Systems/MRX-Core/commit/2019a41c))
|
|
38
|
-
- **🧹:** [Remove rate limiting store implementation] ([aec26501](https://github.com/MRX-Systems/MRX-Core/commit/aec26501))
|
|
39
|
-
- **🧹:** [Refactor rate limiting to use kvStore] ([1d42fb97](https://github.com/MRX-Systems/MRX-Core/commit/1d42fb97))
|
|
40
|
-
|
|
41
|
-
### 📖 Documentation
|
|
42
|
-
|
|
43
|
-
- **📖:** [fix tsdoc CoreError to BaseError] ([8db68847](https://github.com/MRX-Systems/MRX-Core/commit/8db68847))
|
|
44
|
-
|
|
45
|
-
### 📦 Build
|
|
46
|
-
|
|
47
|
-
- **📦:** [update dependencies in package.json] ([2c69bbb5](https://github.com/MRX-Systems/MRX-Core/commit/2c69bbb5))
|
|
48
|
-
- **📦:** [Update nodemailer type definitions to version 7.0.1] ([387ac697](https://github.com/MRX-Systems/MRX-Core/commit/387ac697))
|
|
49
|
-
- **📦:** [Refactor JWT module paths for better organization] ([9f504873](https://github.com/MRX-Systems/MRX-Core/commit/9f504873))
|
|
50
|
-
- **📦:** [Update JWT module paths and dependencies] ([71eaca98](https://github.com/MRX-Systems/MRX-Core/commit/71eaca98))
|
|
51
|
-
- **📦:** [Update package.json for improved dependency management] ([f48a7fa6](https://github.com/MRX-Systems/MRX-Core/commit/f48a7fa6))
|
|
52
|
-
- **📦:** [Add kvStore module paths to builder] ([3020bf8a](https://github.com/MRX-Systems/MRX-Core/commit/3020bf8a))
|
|
53
|
-
- **📦:** [Update dependencies and add kvStore module paths] ([056c4b2b](https://github.com/MRX-Systems/MRX-Core/commit/056c4b2b))
|
|
54
|
-
- **📦:** [Remove kvStore module from build process] ## Build Changes - Removed './source/modules/kvStore/index.ts' from the build configuration. ([502e25a2](https://github.com/MRX-Systems/MRX-Core/commit/502e25a2))
|
|
55
|
-
- **📦:** [Remove kvStore module from exports] ([b2a02bc6](https://github.com/MRX-Systems/MRX-Core/commit/b2a02bc6))
|
|
56
|
-
- **📦:** [Add cache module to builder configuration] ## Build - Included cache module paths in the builder configuration. ([63681c8b](https://github.com/MRX-Systems/MRX-Core/commit/63681c8b))
|
|
57
|
-
- **📦:** [Add cache module exports to package.json] ([ef662af9](https://github.com/MRX-Systems/MRX-Core/commit/ef662af9))
|
|
58
|
-
|
|
59
|
-
### 🌊 Types
|
|
60
|
-
|
|
61
|
-
- **🌊:** [Update throwIfNoResult type in QueryOptions interface] Updated the `throwIfNoResult` property in the `QueryOptions` interface to accept an object with optional `message` and `code` properties, enhancing error handling capabilities. ([644ff8be](https://github.com/MRX-Systems/MRX-Core/commit/644ff8be))
|
|
62
|
-
- **🌊:** [Add KvStore interface for key-value store operations] ([ec2c8dea](https://github.com/MRX-Systems/MRX-Core/commit/ec2c8dea))
|
|
63
|
-
- **🌊:** [Add CacheOptions type definition and index export] ([7f17d79b](https://github.com/MRX-Systems/MRX-Core/commit/7f17d79b))
|
|
64
|
-
- **🌊:** [Add CacheItem type definition for caching mechanism] ([a10a15f7](https://github.com/MRX-Systems/MRX-Core/commit/a10a15f7))
|
|
65
|
-
|
|
66
|
-
### 🦉 Chore
|
|
67
|
-
|
|
68
|
-
- **🦉:** [Clean up CHANGELOG.md for better readability] ([d66fac36](https://github.com/MRX-Systems/MRX-Core/commit/d66fac36))
|
|
69
|
-
|
|
70
|
-
### 🧪 Tests
|
|
71
|
-
|
|
72
|
-
- **🧪:** [totp tests little clean] ([238ac25b](https://github.com/MRX-Systems/MRX-Core/commit/238ac25b))
|
|
73
|
-
- **🧪:** [Add test to hande custom code and refacto custom message] ([c7737572](https://github.com/MRX-Systems/MRX-Core/commit/c7737572))
|
|
74
|
-
- **🧪:** [Update validation error handling tests for new structure] ([42184d86](https://github.com/MRX-Systems/MRX-Core/commit/42184d86))
|
|
75
|
-
- **🧪:** [Remove JWT tests for cleanup] ([08ca9a71](https://github.com/MRX-Systems/MRX-Core/commit/08ca9a71))
|
|
76
|
-
- **🧪:** [[Add comprehensive tests for parseHumanTimeToSeconds function] ([8d2c37c1](https://github.com/MRX-Systems/MRX-Core/commit/8d2c37c1))
|
|
77
|
-
- **🧪:** [Add comprehensive tests for JWT signing and verification] ([6c281486](https://github.com/MRX-Systems/MRX-Core/commit/6c281486))
|
|
78
|
-
- **🧪:** [Add tests for parseHumanTimeToSeconds utility function] ([6bf5dbca](https://github.com/MRX-Systems/MRX-Core/commit/6bf5dbca))
|
|
79
|
-
- **🧪:** [Rename ResolveDbHeader to dbResolverHeader for consistency] ([8a5a4dd2](https://github.com/MRX-Systems/MRX-Core/commit/8a5a4dd2))
|
|
80
|
-
- **🧪:** [Add case insensitive Q operator filter test] ## Tests - Introduced a new test case for the Q operator to ensure it is case insensitive. ([fccfb182](https://github.com/MRX-Systems/MRX-Core/commit/fccfb182))
|
|
81
|
-
- **🧪:** [Refactor MSSQL test setup and enhance findByNamePattern] ([e1dcea34](https://github.com/MRX-Systems/MRX-Core/commit/e1dcea34))
|
|
82
|
-
- **🧪:** [Add comprehensive tests for MemoryStore functionality] ([25c165ec](https://github.com/MRX-Systems/MRX-Core/commit/25c165ec))
|
|
83
|
-
- **🧪:** [Refactor rate limit tests to use MemoryStore] ([1311cd07](https://github.com/MRX-Systems/MRX-Core/commit/1311cd07))
|
|
84
|
-
- **🧪:** [Remove MemoryStore test suite] ([e0fe6f39](https://github.com/MRX-Systems/MRX-Core/commit/e0fe6f39))
|
|
85
|
-
- **🧪:** [Add tests for generateCacheKey utility function] ## Tests - Implement unit tests for the `generateCacheKey` function. - Cover scenarios for requests with and without bodies. - Validate that identical requests produce the same cache key. - Ensure different bodies generate different cache keys. ([90562c7a](https://github.com/MRX-Systems/MRX-Core/commit/90562c7a))
|
|
86
|
-
- **🧪:** [Add comprehensive tests for cache module functionality] ([28d28d3d](https://github.com/MRX-Systems/MRX-Core/commit/28d28d3d))
|
|
87
|
-
- **🧪:** [Add test for specific TTL handling in cache logic] - Implemented a test to verify that the cache correctly handles specific TTL values in the `isCached` option. - The test checks that the cache returns a MISS header on the first request and verifies the cache-control header. - It also ensures that after the TTL expires, the cache still returns a MISS header on subsequent requests. ([9ca8a99c](https://github.com/MRX-Systems/MRX-Core/commit/9ca8a99c))
|
|
88
|
-
- **🧪:** [fix test name CoreError to BaseError] ([c02afec2](https://github.com/MRX-Systems/MRX-Core/commit/c02afec2))
|
|
89
|
-
|
|
90
|
-
### 🎨 Styles
|
|
91
|
-
|
|
92
|
-
- **🎨:** [fix import order in HOTP tests] Rearranged the import statements in the HOTP test file for consistency and improved readability. ([a66d34d6](https://github.com/MRX-Systems/MRX-Core/commit/a66d34d6))
|
|
93
|
-
- **🎨:** [Remove unnecessary blank line in signJWT function] Removed an extra blank line in the signJWT function for improved code readability and consistency. ([8ea44aef](https://github.com/MRX-Systems/MRX-Core/commit/8ea44aef))
|
|
94
|
-
|
|
95
|
-
### ❤️ Contributors
|
|
96
|
-
|
|
97
|
-
- Ruby <necrelox@proton.me>
|
|
98
|
-
|
package/dist/chunk-45gt9273.js
DELETED
|
@@ -1,8 +0,0 @@
|
|
|
1
|
-
// source/modules/mailer/enums/mailerErrorKeys.ts
|
|
2
|
-
var MAILER_ERROR_KEYS = {
|
|
3
|
-
SMTP_CONNECTION_ERROR: "mailer.error.smtp.connection_error",
|
|
4
|
-
SMTP_NOT_CONNECTED: "mailer.error.smtp.not_connected",
|
|
5
|
-
SMTP_ALREADY_CONNECTED: "mailer.error.smtp.already_connected"
|
|
6
|
-
};
|
|
7
|
-
|
|
8
|
-
export { MAILER_ERROR_KEYS };
|
package/dist/chunk-4xs0e8cm.js
DELETED
|
@@ -1,9 +0,0 @@
|
|
|
1
|
-
// source/modules/logger/enums/loggerErrorKeys.ts
|
|
2
|
-
var LOGGER_ERROR_KEYS = {
|
|
3
|
-
STRATEGY_ALREADY_ADDED: "logger.error.strategy_already_added",
|
|
4
|
-
STRATEGY_NOT_FOUND: "logger.error.strategy_not_found",
|
|
5
|
-
NO_STRATEGY_ADDED: "logger.error.no_strategy_added",
|
|
6
|
-
STRATEGY_ERROR: "logger.error.strategy_error"
|
|
7
|
-
};
|
|
8
|
-
|
|
9
|
-
export { LOGGER_ERROR_KEYS };
|
package/dist/chunk-683sda6e.js
DELETED
|
@@ -1,28 +0,0 @@
|
|
|
1
|
-
import {
|
|
2
|
-
HTTP_ERROR_STATUS_CODES
|
|
3
|
-
} from "./chunk-9nw6qekv.js";
|
|
4
|
-
import {
|
|
5
|
-
BaseError
|
|
6
|
-
} from "./chunk-vknq69e0.js";
|
|
7
|
-
|
|
8
|
-
// source/errors/httpError.ts
|
|
9
|
-
class HttpError extends BaseError {
|
|
10
|
-
_httpStatusCode;
|
|
11
|
-
constructor(options) {
|
|
12
|
-
super(options);
|
|
13
|
-
super.name = "HttpError";
|
|
14
|
-
const statusCodeOption = options?.httpStatusCode;
|
|
15
|
-
this._httpStatusCode = typeof statusCodeOption === "number" ? statusCodeOption : HTTP_ERROR_STATUS_CODES[statusCodeOption ?? "INTERNAL_SERVER_ERROR"] ?? HTTP_ERROR_STATUS_CODES.INTERNAL_SERVER_ERROR;
|
|
16
|
-
}
|
|
17
|
-
get httpStatusCode() {
|
|
18
|
-
return this._httpStatusCode;
|
|
19
|
-
}
|
|
20
|
-
get isClientError() {
|
|
21
|
-
return this._httpStatusCode >= 400 && this._httpStatusCode < 500;
|
|
22
|
-
}
|
|
23
|
-
get isServerError() {
|
|
24
|
-
return this._httpStatusCode >= 500 && this._httpStatusCode < 600;
|
|
25
|
-
}
|
|
26
|
-
}
|
|
27
|
-
|
|
28
|
-
export { HttpError };
|
package/dist/chunk-7jsxw1ts.js
DELETED
|
@@ -1,40 +0,0 @@
|
|
|
1
|
-
import {
|
|
2
|
-
SINGLETON_MANAGER_ERROR_KEYS
|
|
3
|
-
} from "./chunk-hcc6g1fd.js";
|
|
4
|
-
import {
|
|
5
|
-
BaseError
|
|
6
|
-
} from "./chunk-vknq69e0.js";
|
|
7
|
-
|
|
8
|
-
// source/modules/singletonManager/singletonManager.ts
|
|
9
|
-
class SingletonManager {
|
|
10
|
-
static _registry = new Map;
|
|
11
|
-
static register(name, constructor, ...args) {
|
|
12
|
-
if (this._registry.has(name))
|
|
13
|
-
throw new BaseError({
|
|
14
|
-
message: SINGLETON_MANAGER_ERROR_KEYS.CLASS_CONSTRUCTOR_ALREADY_REGISTERED,
|
|
15
|
-
cause: { name }
|
|
16
|
-
});
|
|
17
|
-
this._registry.set(name, new constructor(...args));
|
|
18
|
-
}
|
|
19
|
-
static unregister(name) {
|
|
20
|
-
if (!this._registry.has(name))
|
|
21
|
-
throw new BaseError({
|
|
22
|
-
message: SINGLETON_MANAGER_ERROR_KEYS.CLASS_CONSTRUCTOR_NOT_REGISTERED,
|
|
23
|
-
cause: { name }
|
|
24
|
-
});
|
|
25
|
-
this._registry.delete(name);
|
|
26
|
-
}
|
|
27
|
-
static get(name) {
|
|
28
|
-
if (!this._registry.has(name))
|
|
29
|
-
throw new BaseError({
|
|
30
|
-
message: SINGLETON_MANAGER_ERROR_KEYS.CLASS_CONSTRUCTOR_NOT_REGISTERED,
|
|
31
|
-
cause: { name }
|
|
32
|
-
});
|
|
33
|
-
return this._registry.get(name);
|
|
34
|
-
}
|
|
35
|
-
static has(name) {
|
|
36
|
-
return this._registry.has(name);
|
|
37
|
-
}
|
|
38
|
-
}
|
|
39
|
-
|
|
40
|
-
export { SingletonManager };
|
package/dist/chunk-dwfyt1m6.js
DELETED
package/dist/chunk-g821m8gq.js
DELETED
|
@@ -1,77 +0,0 @@
|
|
|
1
|
-
import {
|
|
2
|
-
createCountResponse200Schema,
|
|
3
|
-
createCountSchema,
|
|
4
|
-
createDeleteSchema,
|
|
5
|
-
createFindSchema,
|
|
6
|
-
createIdParamSchema,
|
|
7
|
-
createResponse200Schema,
|
|
8
|
-
createSelectedFieldsSchema,
|
|
9
|
-
createUpdateOneSchema,
|
|
10
|
-
createUpdateSchema
|
|
11
|
-
} from "./chunk-26brdrbz.js";
|
|
12
|
-
|
|
13
|
-
// source/modules/elysia/crudSchema/crudSchema.ts
|
|
14
|
-
import { Elysia } from "elysia";
|
|
15
|
-
|
|
16
|
-
// source/modules/elysia/crudSchema/utils/createInsertSchema.ts
|
|
17
|
-
import { t } from "elysia";
|
|
18
|
-
var createInsertSchema = (schema) => t.Object({
|
|
19
|
-
queryOptions: t.Optional(t.Object({
|
|
20
|
-
selectedFields: createSelectedFieldsSchema(schema)
|
|
21
|
-
})),
|
|
22
|
-
data: t.Union([
|
|
23
|
-
schema,
|
|
24
|
-
t.Array(schema, {
|
|
25
|
-
minItems: 1,
|
|
26
|
-
uniqueItems: true
|
|
27
|
-
})
|
|
28
|
-
])
|
|
29
|
-
});
|
|
30
|
-
|
|
31
|
-
// source/modules/elysia/crudSchema/crudSchema.ts
|
|
32
|
-
var crudSchema = ({
|
|
33
|
-
sourceSchemaName,
|
|
34
|
-
sourceSchema,
|
|
35
|
-
sourceInsertSchema = sourceSchema,
|
|
36
|
-
sourceFindSchema = sourceSchema,
|
|
37
|
-
sourceCountSchema = sourceSchema,
|
|
38
|
-
sourceUpdateSchema = sourceSchema,
|
|
39
|
-
sourceDeleteSchema = sourceSchema,
|
|
40
|
-
sourceResponseSchema = sourceSchema,
|
|
41
|
-
operations = {
|
|
42
|
-
count: true,
|
|
43
|
-
find: true,
|
|
44
|
-
findOne: true,
|
|
45
|
-
insert: true,
|
|
46
|
-
update: true,
|
|
47
|
-
updateOne: true,
|
|
48
|
-
delete: true,
|
|
49
|
-
deleteOne: true
|
|
50
|
-
}
|
|
51
|
-
}) => {
|
|
52
|
-
const models = {};
|
|
53
|
-
if (operations.insert)
|
|
54
|
-
models[`${sourceSchemaName}Insert`] = createInsertSchema(sourceInsertSchema);
|
|
55
|
-
if (operations.find)
|
|
56
|
-
models[`${sourceSchemaName}Find`] = createFindSchema(sourceFindSchema);
|
|
57
|
-
if (operations.count)
|
|
58
|
-
models[`${sourceSchemaName}Count`] = createCountSchema(sourceCountSchema);
|
|
59
|
-
if (operations.update)
|
|
60
|
-
models[`${sourceSchemaName}Update`] = createUpdateSchema(sourceUpdateSchema);
|
|
61
|
-
if (operations.updateOne)
|
|
62
|
-
models[`${sourceSchemaName}UpdateOne`] = createUpdateOneSchema(sourceUpdateSchema);
|
|
63
|
-
if (operations.delete)
|
|
64
|
-
models[`${sourceSchemaName}Delete`] = createDeleteSchema(sourceDeleteSchema);
|
|
65
|
-
if (operations.findOne || operations.updateOne || operations.deleteOne)
|
|
66
|
-
models[`${sourceSchemaName}IdParam`] = createIdParamSchema();
|
|
67
|
-
if (operations.find || operations.findOne || operations.insert || operations.update || operations.updateOne || operations.delete || operations.deleteOne)
|
|
68
|
-
models[`${sourceSchemaName}Response200`] = createResponse200Schema(sourceResponseSchema);
|
|
69
|
-
if (operations.count)
|
|
70
|
-
models[`${sourceSchemaName}CountResponse200`] = createCountResponse200Schema();
|
|
71
|
-
const app = new Elysia({
|
|
72
|
-
name: `crudSchemaPlugin-${sourceSchemaName}`
|
|
73
|
-
}).model(models);
|
|
74
|
-
return app;
|
|
75
|
-
};
|
|
76
|
-
|
|
77
|
-
export { crudSchema };
|
package/dist/chunk-hcc6g1fd.js
DELETED
|
@@ -1,7 +0,0 @@
|
|
|
1
|
-
// source/modules/singletonManager/enums/singletonManagerErrorKeys.ts
|
|
2
|
-
var SINGLETON_MANAGER_ERROR_KEYS = {
|
|
3
|
-
CLASS_CONSTRUCTOR_ALREADY_REGISTERED: "singletonManager.error.class_constructor_already_registered",
|
|
4
|
-
CLASS_CONSTRUCTOR_NOT_REGISTERED: "singletonManager.error.class_constructor_not_registered"
|
|
5
|
-
};
|
|
6
|
-
|
|
7
|
-
export { SINGLETON_MANAGER_ERROR_KEYS };
|
package/dist/chunk-ncc0m208.js
DELETED
package/dist/chunk-vknq69e0.js
DELETED
|
@@ -1,23 +0,0 @@
|
|
|
1
|
-
// source/errors/baseError.ts
|
|
2
|
-
import { randomUUID } from "crypto";
|
|
3
|
-
|
|
4
|
-
class BaseError extends Error {
|
|
5
|
-
cause;
|
|
6
|
-
_uuid = randomUUID();
|
|
7
|
-
_date = new Date;
|
|
8
|
-
constructor(options) {
|
|
9
|
-
super(options?.message, {
|
|
10
|
-
cause: options?.cause
|
|
11
|
-
});
|
|
12
|
-
super.name = "BaseError";
|
|
13
|
-
this.cause = options?.cause;
|
|
14
|
-
}
|
|
15
|
-
get uuid() {
|
|
16
|
-
return this._uuid;
|
|
17
|
-
}
|
|
18
|
-
get date() {
|
|
19
|
-
return this._date;
|
|
20
|
-
}
|
|
21
|
-
}
|
|
22
|
-
|
|
23
|
-
export { BaseError };
|
package/dist/chunk-y78xrx17.js
DELETED
|
@@ -1,54 +0,0 @@
|
|
|
1
|
-
import {
|
|
2
|
-
SingletonManager
|
|
3
|
-
} from "./chunk-7jsxw1ts.js";
|
|
4
|
-
import {
|
|
5
|
-
DB_RESOLVER_ERROR_KEYS
|
|
6
|
-
} from "./chunk-dwfyt1m6.js";
|
|
7
|
-
import {
|
|
8
|
-
MSSQL
|
|
9
|
-
} from "./chunk-m18th1g5.js";
|
|
10
|
-
import {
|
|
11
|
-
HttpError
|
|
12
|
-
} from "./chunk-683sda6e.js";
|
|
13
|
-
|
|
14
|
-
// source/modules/elysia/dbResolver/dbResolver.ts
|
|
15
|
-
import { Elysia, t } from "elysia";
|
|
16
|
-
var _resolveDatabaseConnection = async (database, headers) => {
|
|
17
|
-
if (typeof database === "string")
|
|
18
|
-
return {
|
|
19
|
-
staticDB: SingletonManager.get(`database:${database}`)
|
|
20
|
-
};
|
|
21
|
-
const databaseName = headers["database-using"];
|
|
22
|
-
if (!databaseName)
|
|
23
|
-
throw new HttpError({
|
|
24
|
-
message: DB_RESOLVER_ERROR_KEYS.DB_RESOLVER_HEADER_KEY_NOT_FOUND,
|
|
25
|
-
httpStatusCode: "BAD_REQUEST"
|
|
26
|
-
});
|
|
27
|
-
if (!SingletonManager.has(`database:${databaseName}`)) {
|
|
28
|
-
SingletonManager.register(`database:${databaseName}`, MSSQL, {
|
|
29
|
-
...database.config,
|
|
30
|
-
databaseName
|
|
31
|
-
});
|
|
32
|
-
await SingletonManager.get(`database:${databaseName}`).connect();
|
|
33
|
-
}
|
|
34
|
-
return {
|
|
35
|
-
dynamicDB: SingletonManager.get(`database:${databaseName}`)
|
|
36
|
-
};
|
|
37
|
-
};
|
|
38
|
-
var dbResolver = (database) => {
|
|
39
|
-
const app = new Elysia({
|
|
40
|
-
name: "dbResolverPlugin",
|
|
41
|
-
seed: database
|
|
42
|
-
}).resolve({ as: "global" }, async ({ headers }) => _resolveDatabaseConnection(database, headers));
|
|
43
|
-
if (typeof database === "object")
|
|
44
|
-
app.model({
|
|
45
|
-
dbResolverHeader: t.Object({
|
|
46
|
-
"database-using": t.String({
|
|
47
|
-
description: "The name of the database to be used for the request"
|
|
48
|
-
})
|
|
49
|
-
})
|
|
50
|
-
});
|
|
51
|
-
return app;
|
|
52
|
-
};
|
|
53
|
-
|
|
54
|
-
export { dbResolver };
|
|
@@ -1,9 +0,0 @@
|
|
|
1
|
-
import type { BaseErrorOptions } from './types/baseErrorOptions';
|
|
2
|
-
export declare class BaseError<const TCause = unknown> extends Error {
|
|
3
|
-
readonly cause: TCause | undefined;
|
|
4
|
-
private readonly _uuid;
|
|
5
|
-
private readonly _date;
|
|
6
|
-
constructor(options?: Readonly<BaseErrorOptions<TCause>>);
|
|
7
|
-
get uuid(): string;
|
|
8
|
-
get date(): Date;
|
|
9
|
-
}
|
|
@@ -1,14 +0,0 @@
|
|
|
1
|
-
import { BaseError } from './baseError';
|
|
2
|
-
import type { HttpErrorOptions } from './types/httpErrorOptions';
|
|
3
|
-
/**
|
|
4
|
-
* Represents an HTTP error with a specific status code.
|
|
5
|
-
*
|
|
6
|
-
* @template TCause - The type of the cause of the error, if any.
|
|
7
|
-
*/
|
|
8
|
-
export declare class HttpError<const TCause = unknown> extends BaseError<TCause> {
|
|
9
|
-
private readonly _httpStatusCode;
|
|
10
|
-
constructor(options?: Readonly<HttpErrorOptions<TCause>>);
|
|
11
|
-
get httpStatusCode(): number;
|
|
12
|
-
get isClientError(): boolean;
|
|
13
|
-
get isServerError(): boolean;
|
|
14
|
-
}
|
|
@@ -1,15 +0,0 @@
|
|
|
1
|
-
/**
|
|
2
|
-
* Base options for all error types.
|
|
3
|
-
*
|
|
4
|
-
* @template TCause - The type of the cause of the error
|
|
5
|
-
*/
|
|
6
|
-
export interface BaseErrorOptions<TCause = unknown> {
|
|
7
|
-
/**
|
|
8
|
-
* The error message describing what went wrong
|
|
9
|
-
*/
|
|
10
|
-
message?: string;
|
|
11
|
-
/**
|
|
12
|
-
* The cause of the error, typically another error or additional context
|
|
13
|
-
*/
|
|
14
|
-
cause?: TCause;
|
|
15
|
-
}
|
|
@@ -1,13 +0,0 @@
|
|
|
1
|
-
import type { HTTP_ERROR_STATUS_CODES } from '../../errors/enums/httpErrorStatusCodes';
|
|
2
|
-
import type { BaseErrorOptions } from './baseErrorOptions';
|
|
3
|
-
/**
|
|
4
|
-
* Options for HTTP-related errors.
|
|
5
|
-
*
|
|
6
|
-
* @template TCause - The type of the cause of the error
|
|
7
|
-
*/
|
|
8
|
-
export interface HttpErrorOptions<TCause = unknown> extends BaseErrorOptions<TCause> {
|
|
9
|
-
/**
|
|
10
|
-
* The HTTP status code associated with the error
|
|
11
|
-
*/
|
|
12
|
-
httpStatusCode?: keyof typeof HTTP_ERROR_STATUS_CODES | typeof HTTP_ERROR_STATUS_CODES[keyof typeof HTTP_ERROR_STATUS_CODES];
|
|
13
|
-
}
|
|
@@ -1,6 +0,0 @@
|
|
|
1
|
-
import type { BaseMacro, InputSchema, LocalHook, RouteSchema, SingletonBase } from 'elysia/types';
|
|
2
|
-
export interface CrudOperationBaseOptions {
|
|
3
|
-
readonly path?: string;
|
|
4
|
-
readonly method?: 'GET' | 'POST' | 'PUT' | 'DELETE' | 'PATCH';
|
|
5
|
-
readonly hook?: LocalHook<InputSchema, RouteSchema, SingletonBase, Record<string, Error>, BaseMacro>;
|
|
6
|
-
}
|