@mrxsys/mrx-core 2.11.0-2-and-275-20251029 → 2.11.0-2-and-276-20251029
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/errors/utils/is-nowarajs-error.ts.d.ts +2 -2
- package/dist/modules/data/transformers/camel-case.d.ts +2 -2
- package/dist/modules/data/transformers/kebab-case.d.ts +2 -2
- package/dist/modules/data/transformers/pascal-case.d.ts +2 -2
- package/dist/modules/data/transformers/snake-case.d.ts +2 -2
- package/dist/modules/data/types/transform-object-keys.d.ts +4 -4
- package/dist/modules/database/events/mssql-event-map.d.ts +1 -1
- package/dist/modules/database/events/table-event-map.d.ts +1 -1
- package/dist/modules/database/mssql.d.ts +2 -2
- package/dist/modules/database/table.d.ts +2 -2
- package/dist/modules/elysia/cache/cache.d.ts +1 -1
- package/dist/modules/elysia/crud/crud.d.ts +2 -2
- package/dist/modules/elysia/crud/operations/count.d.ts +3 -3
- package/dist/modules/elysia/crud/operations/delete.d.ts +3 -3
- package/dist/modules/elysia/crud/operations/deleteOne.d.ts +3 -3
- package/dist/modules/elysia/crud/operations/find.d.ts +3 -3
- package/dist/modules/elysia/crud/operations/findOne.d.ts +3 -3
- package/dist/modules/elysia/crud/operations/insert.d.ts +3 -3
- package/dist/modules/elysia/crud/operations/update.d.ts +3 -3
- package/dist/modules/elysia/crud/operations/updateOne.d.ts +3 -3
- package/dist/modules/elysia/crud/operations/utils/get-db-injection.d.ts +1 -1
- package/dist/modules/elysia/crud/types/crud-options.d.ts +1 -1
- package/dist/modules/elysia/crud/types/crud-schema-models-type.d.ts +9 -9
- package/dist/modules/elysia/crud/types/delete-schema.d.ts +2 -2
- package/dist/modules/elysia/crud/types/find-schema.d.ts +3 -3
- package/dist/modules/elysia/crud/types/insert-schema.d.ts +1 -1
- package/dist/modules/elysia/crud/types/properties-schema.d.ts +1 -1
- package/dist/modules/elysia/crud/types/response-200-schema.d.ts +1 -1
- package/dist/modules/elysia/crud/types/update-schema.d.ts +2 -2
- package/dist/modules/elysia/crud/utils/create-adaptive-where-clause-schema.d.ts +1 -1
- package/dist/modules/elysia/crud/utils/create-count-response-200-schema.d.ts +1 -1
- package/dist/modules/elysia/crud/utils/create-count-schema.d.ts +1 -1
- package/dist/modules/elysia/crud/utils/create-delete-schema.d.ts +1 -1
- package/dist/modules/elysia/crud/utils/create-filters-schema.d.ts +1 -1
- package/dist/modules/elysia/crud/utils/create-find-schema.d.ts +1 -1
- package/dist/modules/elysia/crud/utils/create-id-param-schema.d.ts +1 -1
- package/dist/modules/elysia/crud/utils/create-insert-schema.d.ts +1 -1
- package/dist/modules/elysia/crud/utils/create-order-schema.d.ts +1 -1
- package/dist/modules/elysia/crud/utils/create-properties-schema.d.ts +1 -1
- package/dist/modules/elysia/crud/utils/create-q-schema.d.ts +1 -1
- package/dist/modules/elysia/crud/utils/create-response-200-schema.d.ts +1 -1
- package/dist/modules/elysia/crud/utils/create-selected-fields-schema.d.ts +1 -1
- package/dist/modules/elysia/crud/utils/create-update-one-schema.d.ts +1 -1
- package/dist/modules/elysia/crud/utils/create-update-schema.d.ts +1 -1
- package/dist/modules/elysia/db-resolver/db-resolver.d.ts +2 -2
- package/dist/modules/elysia/rate-limit/rate-limit.d.ts +1 -1
- package/dist/modules/kv-store/bun-redis/bun-redis-store.d.ts +1 -1
- package/dist/modules/kv-store/ioredis/ioredis-store.d.ts +1 -1
- package/dist/modules/kv-store/memory/memory-store.d.ts +1 -1
- package/dist/modules/logger/events/logger-events.d.ts +1 -1
- package/dist/modules/logger/logger.d.ts +1 -1
- package/dist/modules/logger/sinks/console-logger.d.ts +2 -2
- package/dist/modules/logger/sinks/devnull-logger.d.ts +1 -1
- package/dist/modules/logger/sinks/file-logger/file-logger.d.ts +2 -2
- package/dist/modules/repository/repository.d.ts +2 -2
- package/dist/modules/repository/types/query-options.d.ts +1 -1
- package/dist/shared/utils/flatten.d.ts +1 -1
- package/package.json +4 -4
- package/dist/chunk-0d0zd2yg.js +0 -8
- package/dist/chunk-12qzn7jw.js +0 -7
- package/dist/chunk-441xs5k1.js +0 -53
- package/dist/chunk-4v86f7gp.js +0 -59
- package/dist/chunk-6w9ja96e.js +0 -9
- package/dist/chunk-7t524zqh.js +0 -26
- package/dist/chunk-8tffnbpn.js +0 -7
- package/dist/chunk-9cgzhc50.js +0 -15
- package/dist/chunk-9d3zvgp6.js +0 -9
- package/dist/chunk-9dzsj7f2.js +0 -23
- package/dist/chunk-9r5anep5.js +0 -11
- package/dist/chunk-afd82epa.js +0 -201
- package/dist/chunk-afyz8rg5.js +0 -209
- package/dist/chunk-dre2fgj0.js +0 -7
- package/dist/chunk-e30paw8a.js +0 -101
- package/dist/chunk-eeb7yskp.js +0 -61
- package/dist/chunk-fs3wm3p4.js +0 -32
- package/dist/chunk-grfyngq0.js +0 -39
- package/dist/chunk-gtn1kn0z.js +0 -79
- package/dist/chunk-jksb9ers.js +0 -7
- package/dist/chunk-m3grz32t.js +0 -27
- package/dist/chunk-mvrxngm7.js +0 -41
- package/dist/chunk-n0n14mf8.js +0 -7
- package/dist/chunk-p14h6jfs.js +0 -365
- package/dist/chunk-pjv1ekwr.js +0 -284
- package/dist/chunk-rz5p4j3p.js +0 -13
- package/dist/chunk-spnh9dzk.js +0 -10
- package/dist/chunk-sqts8vyk.js +0 -60
- package/dist/chunk-w7h898m3.js +0 -14
- package/dist/chunk-xhhj1gvj.js +0 -9
- package/dist/chunk-z0ct35ft.js +0 -8
- package/dist/errors/enums/index.js +0 -7
- package/dist/errors/index.js +0 -12
- package/dist/errors/utils/index.js +0 -16
- package/dist/modules/data/enums/index.js +0 -7
- package/dist/modules/data/index.js +0 -17
- package/dist/modules/data/transformers/index.js +0 -32
- package/dist/modules/data/types/index.js +0 -1
- package/dist/modules/database/enums/index.js +0 -9
- package/dist/modules/database/events/index.js +0 -1
- package/dist/modules/database/index.js +0 -16
- package/dist/modules/database/types/index.js +0 -1
- package/dist/modules/elysia/cache/index.js +0 -90
- package/dist/modules/elysia/cache/types/index.js +0 -1
- package/dist/modules/elysia/crud/enums/index.js +0 -7
- package/dist/modules/elysia/crud/index.js +0 -153
- package/dist/modules/elysia/crud/operations/index.js +0 -34
- package/dist/modules/elysia/crud/types/index.js +0 -1
- package/dist/modules/elysia/crud/utils/index.js +0 -41
- package/dist/modules/elysia/db-resolver/enums/index.js +0 -7
- package/dist/modules/elysia/db-resolver/index.js +0 -18
- package/dist/modules/elysia/error/enums/index.js +0 -7
- package/dist/modules/elysia/error/error.d.ts +0 -51
- package/dist/modules/elysia/error/index.js +0 -76
- package/dist/modules/elysia/microservice/enums/index.js +0 -7
- package/dist/modules/elysia/microservice/index.js +0 -100
- package/dist/modules/elysia/rate-limit/enums/index.js +0 -7
- package/dist/modules/elysia/rate-limit/index.js +0 -81
- package/dist/modules/elysia/rate-limit/types/index.js +0 -1
- package/dist/modules/jwt/enums/index.js +0 -11
- package/dist/modules/jwt/index.js +0 -51
- package/dist/modules/jwt/utils/index.js +0 -9
- package/dist/modules/kv-store/bun-redis/index.js +0 -84
- package/dist/modules/kv-store/enums/index.js +0 -7
- package/dist/modules/kv-store/ioredis/index.js +0 -86
- package/dist/modules/kv-store/memory/index.js +0 -9
- package/dist/modules/kv-store/types/index.js +0 -1
- package/dist/modules/logger/enums/index.js +0 -7
- package/dist/modules/logger/events/index.js +0 -1
- package/dist/modules/logger/index.js +0 -208
- package/dist/modules/logger/sinks/index.js +0 -66
- package/dist/modules/logger/types/index.js +0 -1
- package/dist/modules/mailer/enums/index.js +0 -7
- package/dist/modules/mailer/index.js +0 -55
- package/dist/modules/mailer/types/index.js +0 -1
- package/dist/modules/repository/index.js +0 -12
- package/dist/modules/repository/types/index.js +0 -1
- package/dist/modules/singleton-manager/enums/index.js +0 -7
- package/dist/modules/singleton-manager/index.js +0 -9
- package/dist/modules/totp/enums/index.js +0 -7
- package/dist/modules/totp/index.js +0 -104
- package/dist/modules/totp/types/index.js +0 -1
- package/dist/modules/totp/utils/index.js +0 -76
- package/dist/modules/typed-event-emitter/index.js +0 -7
- package/dist/modules/typed-event-emitter/types/index.js +0 -1
- package/dist/shared/enums/index.js +0 -7
- package/dist/shared/types/index.js +0 -1
- package/dist/shared/utils/index.js +0 -30
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { BaseError } from '
|
|
2
|
-
import { HttpError } from '
|
|
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;
|
|
@@ -1,5 +1,5 @@
|
|
|
1
|
-
import type { CamelCase } from '
|
|
2
|
-
import type { CaseTransformer } from '
|
|
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}).
|
|
@@ -1,5 +1,5 @@
|
|
|
1
|
-
import type { CaseTransformer } from '
|
|
2
|
-
import type { KebabCase } from '
|
|
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 '
|
|
2
|
-
import type { PascalCase } from '
|
|
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 '
|
|
2
|
-
import type { SnakeCase } from '
|
|
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}).
|
|
@@ -1,7 +1,7 @@
|
|
|
1
|
-
import type { CamelCaseTransformer } from '
|
|
2
|
-
import type { KebabCaseTransformer } from '
|
|
3
|
-
import type { PascalCaseTransformer } from '
|
|
4
|
-
import type { SnakeCaseTransformer } from '
|
|
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';
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import type { QueryContext } from '
|
|
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 '
|
|
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];
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import { type Knex } from 'knex';
|
|
2
|
-
import { Repository } from '
|
|
3
|
-
import { TypedEventEmitter } from '
|
|
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 '
|
|
2
|
-
import { TypedEventEmitter } from '
|
|
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.
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import { Elysia } from 'elysia';
|
|
2
|
-
import type { KvStore } from '
|
|
2
|
+
import type { KvStore } from '#/modules/kv-store/types/kv-store';
|
|
3
3
|
import type { CacheOptions } from './types/cache-options';
|
|
4
4
|
export declare const cache: (store?: KvStore) => Elysia<"", {
|
|
5
5
|
decorator: {};
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
import type { TObject, TString } from '@sinclair/typebox';
|
|
2
2
|
import { Elysia, type SingletonBase } from 'elysia';
|
|
3
|
-
import type { MSSQLDatabaseOptions } from '
|
|
4
|
-
import type { CrudSchemaModelsType } from '
|
|
3
|
+
import type { MSSQLDatabaseOptions } from '#/modules/database/types/mssql-database-option';
|
|
4
|
+
import type { CrudSchemaModelsType } from '#/modules/elysia/crud/types/crud-schema-models-type';
|
|
5
5
|
import type { CrudOperationCount } from './types/crud-operation-count';
|
|
6
6
|
import type { CrudOperationDelete } from './types/crud-operation-delete';
|
|
7
7
|
import type { CrudOperationDeleteOne } from './types/crud-operation-delete-one';
|
|
@@ -1,8 +1,8 @@
|
|
|
1
1
|
import type { TObject } from '@sinclair/typebox/type';
|
|
2
2
|
import { Elysia } from 'elysia';
|
|
3
|
-
import type { MSSQL } from '
|
|
4
|
-
import type { MSSQLDatabaseOptions } from '
|
|
5
|
-
import type { CrudOperationCount } from '
|
|
3
|
+
import type { MSSQL } from '#/modules/database/mssql';
|
|
4
|
+
import type { MSSQLDatabaseOptions } from '#/modules/database/types/mssql-database-option';
|
|
5
|
+
import type { CrudOperationCount } from '#/modules/elysia/crud/types/crud-operation-count';
|
|
6
6
|
export declare const count: <const TDatabase extends Omit<MSSQLDatabaseOptions, "databaseName"> | string, const TTableName extends string, const THeaderSchema extends TObject, const TSourceCountSchema extends TObject>(database: TDatabase, tableName: TTableName, { hook, method, path }: CrudOperationCount<THeaderSchema, TSourceCountSchema>) => Elysia<"", {
|
|
7
7
|
decorator: {};
|
|
8
8
|
store: {};
|
|
@@ -1,8 +1,8 @@
|
|
|
1
1
|
import type { TObject } from '@sinclair/typebox/type';
|
|
2
2
|
import { Elysia } from 'elysia';
|
|
3
|
-
import type { MSSQL } from '
|
|
4
|
-
import type { MSSQLDatabaseOptions } from '
|
|
5
|
-
import type { CrudOperationDelete } from '
|
|
3
|
+
import type { MSSQL } from '#/modules/database/mssql';
|
|
4
|
+
import type { MSSQLDatabaseOptions } from '#/modules/database/types/mssql-database-option';
|
|
5
|
+
import type { CrudOperationDelete } from '#/modules/elysia/crud/types/crud-operation-delete';
|
|
6
6
|
export declare const batchDelete: <const TDatabase extends Omit<MSSQLDatabaseOptions, "databaseName"> | string, const TTableName extends string, const THeaderSchema extends TObject, const TSourceDeleteSchema extends TObject, const TSourceResponseSchema extends TObject>(database: TDatabase, tableName: TTableName, { hook, method, path }: CrudOperationDelete<THeaderSchema, TSourceDeleteSchema, TSourceResponseSchema>) => Elysia<"", {
|
|
7
7
|
decorator: {};
|
|
8
8
|
store: {};
|
|
@@ -1,8 +1,8 @@
|
|
|
1
1
|
import type { TObject } from '@sinclair/typebox/type';
|
|
2
2
|
import { Elysia } from 'elysia';
|
|
3
|
-
import type { MSSQL } from '
|
|
4
|
-
import type { MSSQLDatabaseOptions } from '
|
|
5
|
-
import type { CrudOperationDeleteOne } from '
|
|
3
|
+
import type { MSSQL } from '#/modules/database/mssql';
|
|
4
|
+
import type { MSSQLDatabaseOptions } from '#/modules/database/types/mssql-database-option';
|
|
5
|
+
import type { CrudOperationDeleteOne } from '#/modules/elysia/crud/types/crud-operation-delete-one';
|
|
6
6
|
export declare const deleteOne: <const TDatabase extends Omit<MSSQLDatabaseOptions, "databaseName"> | string, const TTableName extends string, const THeaderSchema extends TObject, const TSourceResponseSchema extends TObject>(database: TDatabase, tableName: TTableName, { hook, method, path }: CrudOperationDeleteOne<THeaderSchema, TSourceResponseSchema>) => Elysia<"", {
|
|
7
7
|
decorator: {};
|
|
8
8
|
store: {};
|
|
@@ -1,8 +1,8 @@
|
|
|
1
1
|
import type { TObject } from '@sinclair/typebox/type';
|
|
2
2
|
import { Elysia } from 'elysia';
|
|
3
|
-
import type { MSSQL } from '
|
|
4
|
-
import type { MSSQLDatabaseOptions } from '
|
|
5
|
-
import type { CrudOperationFind } from '
|
|
3
|
+
import type { MSSQL } from '#/modules/database/mssql';
|
|
4
|
+
import type { MSSQLDatabaseOptions } from '#/modules/database/types/mssql-database-option';
|
|
5
|
+
import type { CrudOperationFind } from '#/modules/elysia/crud/types/crud-operation-find';
|
|
6
6
|
export declare const find: <const TDatabase extends Omit<MSSQLDatabaseOptions, "databaseName"> | string, const TTableName extends string, const THeaderSchema extends TObject, const TSourceFindSchema extends TObject, const TSourceResponseSchema extends TObject>(database: TDatabase, tableName: TTableName, { hook, method, path }: CrudOperationFind<THeaderSchema, TSourceFindSchema, TSourceResponseSchema>) => Elysia<"", {
|
|
7
7
|
decorator: {};
|
|
8
8
|
store: {};
|
|
@@ -1,8 +1,8 @@
|
|
|
1
1
|
import type { TObject } from '@sinclair/typebox/type';
|
|
2
2
|
import { Elysia } from 'elysia';
|
|
3
|
-
import type { MSSQL } from '
|
|
4
|
-
import type { MSSQLDatabaseOptions } from '
|
|
5
|
-
import type { CrudOperationFindOne } from '
|
|
3
|
+
import type { MSSQL } from '#/modules/database/mssql';
|
|
4
|
+
import type { MSSQLDatabaseOptions } from '#/modules/database/types/mssql-database-option';
|
|
5
|
+
import type { CrudOperationFindOne } from '#/modules/elysia/crud/types/crud-operation-find-one';
|
|
6
6
|
export declare const findOne: <const TDatabase extends Omit<MSSQLDatabaseOptions, "databaseName"> | string, const TTableName extends string, const THeaderSchema extends TObject, const TSourceResponseSchema extends TObject>(database: TDatabase, tableName: TTableName, { hook, method, path }: CrudOperationFindOne<THeaderSchema, TSourceResponseSchema>) => Elysia<"", {
|
|
7
7
|
decorator: {};
|
|
8
8
|
store: {};
|
|
@@ -1,8 +1,8 @@
|
|
|
1
1
|
import type { TObject } from '@sinclair/typebox/type';
|
|
2
2
|
import { Elysia } from 'elysia';
|
|
3
|
-
import type { MSSQL } from '
|
|
4
|
-
import type { MSSQLDatabaseOptions } from '
|
|
5
|
-
import type { CrudOperationInsert } from '
|
|
3
|
+
import type { MSSQL } from '#/modules/database/mssql';
|
|
4
|
+
import type { MSSQLDatabaseOptions } from '#/modules/database/types/mssql-database-option';
|
|
5
|
+
import type { CrudOperationInsert } from '#/modules/elysia/crud/types/crud-operation-insert';
|
|
6
6
|
export declare const insert: <const TDatabase extends Omit<MSSQLDatabaseOptions, "databaseName"> | string, const TTableName extends string, const THeaderSchema extends TObject, const TSourceInsertSchema extends TObject, const TSourceResponseSchema extends TObject>(database: TDatabase, tableName: TTableName, { hook, method, path }: CrudOperationInsert<THeaderSchema, TSourceInsertSchema, TSourceResponseSchema>) => Elysia<"", {
|
|
7
7
|
decorator: {};
|
|
8
8
|
store: {};
|
|
@@ -1,8 +1,8 @@
|
|
|
1
1
|
import type { TObject } from '@sinclair/typebox/type';
|
|
2
2
|
import { Elysia } from 'elysia';
|
|
3
|
-
import type { MSSQL } from '
|
|
4
|
-
import type { MSSQLDatabaseOptions } from '
|
|
5
|
-
import type { CrudOperationUpdate } from '
|
|
3
|
+
import type { MSSQL } from '#/modules/database/mssql';
|
|
4
|
+
import type { MSSQLDatabaseOptions } from '#/modules/database/types/mssql-database-option';
|
|
5
|
+
import type { CrudOperationUpdate } from '#/modules/elysia/crud/types/crud-operation-update';
|
|
6
6
|
export declare const update: <const TDatabase extends Omit<MSSQLDatabaseOptions, "databaseName"> | string, const TTableName extends string, const THeaderSchema extends TObject, const TSourceUpdateSchema extends TObject, const TSourceResponseSchema extends TObject>(database: TDatabase, tableName: TTableName, { hook, method, path }: CrudOperationUpdate<THeaderSchema, TSourceUpdateSchema, TSourceResponseSchema>) => Elysia<"", {
|
|
7
7
|
decorator: {};
|
|
8
8
|
store: {};
|
|
@@ -1,8 +1,8 @@
|
|
|
1
1
|
import type { TObject } from '@sinclair/typebox/type';
|
|
2
2
|
import { Elysia } from 'elysia';
|
|
3
|
-
import type { MSSQL } from '
|
|
4
|
-
import type { MSSQLDatabaseOptions } from '
|
|
5
|
-
import type { CrudOperationUpdateOne } from '
|
|
3
|
+
import type { MSSQL } from '#/modules/database/mssql';
|
|
4
|
+
import type { MSSQLDatabaseOptions } from '#/modules/database/types/mssql-database-option';
|
|
5
|
+
import type { CrudOperationUpdateOne } from '#/modules/elysia/crud/types/crud-operation-update-one';
|
|
6
6
|
export declare const updateOne: <const TDatabase extends Omit<MSSQLDatabaseOptions, "databaseName"> | string, const TTableName extends string, const THeaderSchema extends TObject, const TSourceUpdateSchema extends TObject, const TSourceResponseSchema extends TObject>(database: TDatabase, tableName: TTableName, { hook, method, path }: CrudOperationUpdateOne<THeaderSchema, TSourceUpdateSchema, TSourceResponseSchema>) => Elysia<"", {
|
|
7
7
|
decorator: {};
|
|
8
8
|
store: {};
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import type { MSSQLDatabaseOptions } from '
|
|
1
|
+
import type { MSSQLDatabaseOptions } from '#/modules/database/types/mssql-database-option';
|
|
2
2
|
export declare const getDbInjection: (database: Omit<MSSQLDatabaseOptions, "databaseName"> | string) => {
|
|
3
3
|
injectStaticDB: string;
|
|
4
4
|
injectDynamicDB?: never;
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import type { TObject, TString } from '@sinclair/typebox/type';
|
|
2
|
-
import type { MSSQLDatabaseOptions } from '
|
|
2
|
+
import type { MSSQLDatabaseOptions } from '#/modules/database/types/mssql-database-option';
|
|
3
3
|
import type { CrudOperationCount } from './crud-operation-count';
|
|
4
4
|
import type { CrudOperationDelete } from './crud-operation-delete';
|
|
5
5
|
import type { CrudOperationDeleteOne } from './crud-operation-delete-one';
|
|
@@ -1,12 +1,12 @@
|
|
|
1
1
|
import type { TObject } from '@sinclair/typebox/type';
|
|
2
|
-
import type { CountResponse200Schema } from '
|
|
3
|
-
import type { CountSchema } from '
|
|
4
|
-
import type { DeleteSchema } from '
|
|
5
|
-
import type { FindSchema } from '
|
|
6
|
-
import type { IdParamSchema } from '
|
|
7
|
-
import type { InsertSchema } from '
|
|
8
|
-
import type { Response200Schema } from '
|
|
9
|
-
import type { UpdateOneSchema } from '
|
|
10
|
-
import type { UpdateSchema } from '
|
|
2
|
+
import type { CountResponse200Schema } from '#/modules/elysia/crud/types/count-response-200-schema';
|
|
3
|
+
import type { CountSchema } from '#/modules/elysia/crud/types/count-schema';
|
|
4
|
+
import type { DeleteSchema } from '#/modules/elysia/crud/types/delete-schema';
|
|
5
|
+
import type { FindSchema } from '#/modules/elysia/crud/types/find-schema';
|
|
6
|
+
import type { IdParamSchema } from '#/modules/elysia/crud/types/id-param-schema';
|
|
7
|
+
import type { InsertSchema } from '#/modules/elysia/crud/types/insert-schema';
|
|
8
|
+
import type { Response200Schema } from '#/modules/elysia/crud/types/response-200-schema';
|
|
9
|
+
import type { UpdateOneSchema } from '#/modules/elysia/crud/types/update-one-schema';
|
|
10
|
+
import type { UpdateSchema } from '#/modules/elysia/crud/types/update-schema';
|
|
11
11
|
import type { CrudSchemaOperations } from './crud-schema-operations';
|
|
12
12
|
export type CrudSchemaModelsType<TSourceSchemaName extends string, TOperations extends CrudSchemaOperations, TSourceInsertSchema extends TObject, TSourceFindSchema extends TObject, TSourceCountSchema extends TObject, TSourceUpdateSchema extends TObject, TSourceDeleteSchema extends TObject, TSourceResponseSchema extends TObject> = (TOperations['insert'] extends true ? Record<`${TSourceSchemaName}Insert`, InsertSchema<TSourceInsertSchema>> : {}) & ((TOperations['find'] extends true ? true : false) extends true ? Record<`${TSourceSchemaName}Find`, FindSchema<TSourceFindSchema>> : {}) & ((TOperations['count'] extends true ? true : false) extends true ? Record<`${TSourceSchemaName}Count`, CountSchema<TSourceCountSchema>> : {}) & (TOperations['update'] extends true ? Record<`${TSourceSchemaName}Update`, UpdateSchema<TSourceUpdateSchema>> : {}) & (TOperations['updateOne'] extends true ? Record<`${TSourceSchemaName}UpdateOne`, UpdateOneSchema<TSourceUpdateSchema>> : {}) & (TOperations['delete'] extends true ? Record<`${TSourceSchemaName}Delete`, DeleteSchema<TSourceDeleteSchema>> : {}) & (((TOperations['findOne'] extends true ? true : TOperations['updateOne'] extends true ? true : TOperations['deleteOne'] extends true ? true : false) extends true ? Record<`${TSourceSchemaName}IdParam`, IdParamSchema> : {})) & ((TOperations['find'] extends true ? true : TOperations['findOne'] extends true ? true : TOperations['insert'] extends true ? true : TOperations['update'] extends true ? true : TOperations['updateOne'] extends true ? true : TOperations['delete'] extends true ? true : TOperations['deleteOne'] extends true ? true : false) extends true ? Record<`${TSourceSchemaName}Response200`, Response200Schema<TSourceResponseSchema>> : {}) & (TOperations['count'] extends true ? Record<`${TSourceSchemaName}CountResponse200`, CountResponse200Schema> : {});
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import type { TArray, TObject, TOptional, TPartial, TUnion } from '@sinclair/typebox/type';
|
|
2
|
-
import type { FiltersSchema } from '
|
|
3
|
-
import type { SelectedFieldsSchema } from '
|
|
2
|
+
import type { FiltersSchema } from '#/modules/elysia/crud/types/filter-schema';
|
|
3
|
+
import type { SelectedFieldsSchema } from '#/modules/elysia/crud/types/selected-field-schema';
|
|
4
4
|
export type DeleteSchema<TSourceDeleteSchema extends TObject> = TObject<{
|
|
5
5
|
queryOptions: TObject<{
|
|
6
6
|
selectedFields: TOptional<SelectedFieldsSchema<TSourceDeleteSchema>>;
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
import type { TArray, TNumber, TObject, TPartial, TUnion } from '@sinclair/typebox/type';
|
|
2
|
-
import type { FiltersSchema } from '
|
|
3
|
-
import type { OrderSchema } from '
|
|
4
|
-
import type { SelectedFieldsSchema } from '
|
|
2
|
+
import type { FiltersSchema } from '#/modules/elysia/crud/types/filter-schema';
|
|
3
|
+
import type { OrderSchema } from '#/modules/elysia/crud/types/order-schema';
|
|
4
|
+
import type { SelectedFieldsSchema } from '#/modules/elysia/crud/types/selected-field-schema';
|
|
5
5
|
export type FindSchema<TSourceFindSchema extends TObject> = TPartial<TObject<{
|
|
6
6
|
queryOptions: TPartial<TObject<{
|
|
7
7
|
selectedFields: SelectedFieldsSchema<TSourceFindSchema>;
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import type { TArray, TObject, TOptional, TUnion } from '@sinclair/typebox/type';
|
|
2
|
-
import type { SelectedFieldsSchema } from '
|
|
2
|
+
import type { SelectedFieldsSchema } from '#/modules/elysia/crud/types/selected-field-schema';
|
|
3
3
|
export type InsertSchema<TSourceInsertSchema extends TObject> = TObject<{
|
|
4
4
|
queryOptions: TOptional<TObject<{
|
|
5
5
|
selectedFields: SelectedFieldsSchema<TSourceInsertSchema>;
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import type { Static, TObject, TUnion } from '@sinclair/typebox/type';
|
|
2
|
-
import type { TFlatten } from '
|
|
2
|
+
import type { TFlatten } from '#/shared/types/tflatten';
|
|
3
3
|
import type { AdaptiveWhereClauseSchema } from './adaptive-where-clause-schema';
|
|
4
4
|
export type PropertiesSchema<TSourceSchema extends TObject> = TObject<{
|
|
5
5
|
[K in keyof Static<TSourceSchema>]: TFlatten<TUnion<[
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import type { Static, TArray, TNull, TObject, TPartial, TString, TUnion } from '@sinclair/typebox/type';
|
|
2
|
-
import type { TFlatten } from '
|
|
2
|
+
import type { TFlatten } from '#/shared/types/tflatten';
|
|
3
3
|
export type Response200Schema<TSourceResponseSchema extends TObject> = TObject<{
|
|
4
4
|
message: TString;
|
|
5
5
|
content: TArray<TPartial<TObject<{
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import type { TArray, TObject, TOptional, TPartial, TUnion } from '@sinclair/typebox/type';
|
|
2
|
-
import type { FiltersSchema } from '
|
|
3
|
-
import type { SelectedFieldsSchema } from '
|
|
2
|
+
import type { FiltersSchema } from '#/modules/elysia/crud/types/filter-schema';
|
|
3
|
+
import type { SelectedFieldsSchema } from '#/modules/elysia/crud/types/selected-field-schema';
|
|
4
4
|
export type UpdateSchema<TSourceUpdateSchema extends TObject> = TObject<{
|
|
5
5
|
queryOptions: TObject<{
|
|
6
6
|
selectedFields: TOptional<SelectedFieldsSchema<TSourceUpdateSchema>>;
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import { type TSchema } from '@sinclair/typebox/type';
|
|
2
|
-
import type { AdaptiveWhereClauseSchema } from '
|
|
2
|
+
import type { AdaptiveWhereClauseSchema } from '#/modules/elysia/crud/types/adaptive-where-clause-schema';
|
|
3
3
|
/**
|
|
4
4
|
* Creates an adaptive where clause schema with appropriate operators based on the field type.
|
|
5
5
|
*
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import type { CountResponse200Schema } from '
|
|
1
|
+
import type { CountResponse200Schema } from '#/modules/elysia/crud/types/count-response-200-schema';
|
|
2
2
|
/**
|
|
3
3
|
* Creates a schema for the response of a count operation.
|
|
4
4
|
* The response will contain a message and the count as content.
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import type { TObject } from '@sinclair/typebox/type';
|
|
2
|
-
import type { CountSchema } from '
|
|
2
|
+
import type { CountSchema } from '#/modules/elysia/crud/types/count-schema';
|
|
3
3
|
/**
|
|
4
4
|
* Creates a count schema for counting records with optional filtering.
|
|
5
5
|
*
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import type { TObject } from '@sinclair/typebox/type';
|
|
2
|
-
import type { DeleteSchema } from '
|
|
2
|
+
import type { DeleteSchema } from '#/modules/elysia/crud/types/delete-schema';
|
|
3
3
|
/**
|
|
4
4
|
* Creates a delete schema for deleting records with optional selected fields and required filtering.
|
|
5
5
|
*
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import type { TObject } from '@sinclair/typebox/type';
|
|
2
|
-
import type { FiltersSchema } from '
|
|
2
|
+
import type { FiltersSchema } from '#/modules/elysia/crud/types/filter-schema';
|
|
3
3
|
/**
|
|
4
4
|
* Creates a filters schema that combines search queries and property filters.
|
|
5
5
|
* The resulting schema includes a $q property for query operations and properties
|
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
import type { IdParamSchema } from '
|
|
1
|
+
import type { IdParamSchema } from '#/modules/elysia/crud/types/id-param-schema';
|
|
2
2
|
export declare const createIdParamSchema: () => IdParamSchema;
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import type { TArray, TObject, TOptional, TUnion } from '@sinclair/typebox/type';
|
|
2
|
-
import type { SelectedFieldsSchema } from '
|
|
2
|
+
import type { SelectedFieldsSchema } from '#/modules/elysia/crud/types/selected-field-schema';
|
|
3
3
|
export declare const createInsertSchema: <TSourceInsertSchema extends TObject>(schema: TSourceInsertSchema) => TObject<{
|
|
4
4
|
queryOptions: TOptional<TObject<{
|
|
5
5
|
selectedFields: SelectedFieldsSchema<TSourceInsertSchema>;
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import type { TObject } from '@sinclair/typebox/type';
|
|
2
|
-
import type { OrderSchema } from '
|
|
2
|
+
import type { OrderSchema } from '#/modules/elysia/crud/types/order-schema';
|
|
3
3
|
/**
|
|
4
4
|
* Creates order schema for query options.
|
|
5
5
|
*
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import type { TObject } from '@sinclair/typebox/type';
|
|
2
|
-
import type { PropertiesSchema } from '
|
|
2
|
+
import type { PropertiesSchema } from '#/modules/elysia/crud/types/properties-schema';
|
|
3
3
|
/**
|
|
4
4
|
* Creates property schemas.
|
|
5
5
|
*
|
|
@@ -1,3 +1,3 @@
|
|
|
1
1
|
import type { TObject } from '@sinclair/typebox/type';
|
|
2
|
-
import type { Response200Schema } from '
|
|
2
|
+
import type { Response200Schema } from '#/modules/elysia/crud/types/response-200-schema';
|
|
3
3
|
export declare const createResponse200Schema: <TSourceResponseSchema extends TObject>(schema: TSourceResponseSchema) => Response200Schema<TSourceResponseSchema>;
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import type { TObject } from '@sinclair/typebox/type';
|
|
2
|
-
import type { SelectedFieldsSchema } from '
|
|
2
|
+
import type { SelectedFieldsSchema } from '#/modules/elysia/crud/types/selected-field-schema';
|
|
3
3
|
/**
|
|
4
4
|
* Creates a schema for field selection in search results.
|
|
5
5
|
*
|
|
@@ -1,3 +1,3 @@
|
|
|
1
1
|
import type { TObject } from '@sinclair/typebox/type';
|
|
2
|
-
import type { UpdateOneSchema } from '
|
|
2
|
+
import type { UpdateOneSchema } from '#/modules/elysia/crud/types/update-one-schema';
|
|
3
3
|
export declare const createUpdateOneSchema: <TSourceUpdateSchema extends TObject>(schema: TSourceUpdateSchema) => UpdateOneSchema<TSourceUpdateSchema>;
|
|
@@ -1,3 +1,3 @@
|
|
|
1
1
|
import type { TObject } from '@sinclair/typebox/type';
|
|
2
|
-
import type { UpdateSchema } from '
|
|
2
|
+
import type { UpdateSchema } from '#/modules/elysia/crud/types/update-schema';
|
|
3
3
|
export declare const createUpdateSchema: <TSourceUpdateSchema extends TObject>(schema: TSourceUpdateSchema) => UpdateSchema<TSourceUpdateSchema>;
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import { Elysia } from 'elysia';
|
|
2
|
-
import { MSSQL } from '
|
|
3
|
-
import type { MSSQLDatabaseOptions } from '
|
|
2
|
+
import { MSSQL } from '#/modules/database/mssql';
|
|
3
|
+
import type { MSSQLDatabaseOptions } from '#/modules/database/types/mssql-database-option';
|
|
4
4
|
export declare const dbResolver: (prefixDatabaseName?: string) => Elysia<"", {
|
|
5
5
|
decorator: {};
|
|
6
6
|
store: {};
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import type { KvStore } from '
|
|
1
|
+
import type { KvStore } from '#/modules/kv-store/types/kv-store';
|
|
2
2
|
import { Elysia, type HTTPHeaders, type StatusMap } from 'elysia';
|
|
3
3
|
import type { RateLimitOptions } from './types/rate-limit-options';
|
|
4
4
|
/**
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { TypedEventEmitter } from '
|
|
1
|
+
import { TypedEventEmitter } from '#/modules/typed-event-emitter/typed-event-emitter';
|
|
2
2
|
import type { LoggerEvent } from './events/logger-events';
|
|
3
3
|
import type { LoggerOptions } from './types/logger-options';
|
|
4
4
|
import type { LoggerSink } from './types/logger-sink';
|
|
@@ -1,5 +1,5 @@
|
|
|
1
|
-
import type { LogLevels } from '
|
|
2
|
-
import type { LoggerSink } from '
|
|
1
|
+
import type { LogLevels } from '#/modules/logger/types/log-levels';
|
|
2
|
+
import type { LoggerSink } from '#/modules/logger/types/logger-sink';
|
|
3
3
|
/**
|
|
4
4
|
* ConsoleLoggerSink implements LoggerSink to provide logging functionality to the console.
|
|
5
5
|
*/
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import type { LoggerSink } from '
|
|
1
|
+
import type { LoggerSink } from '#/modules/logger/types/logger-sink';
|
|
2
2
|
/**
|
|
3
3
|
* DevNullLoggerSink implements LoggerSink to discard all logs (like /dev/null).
|
|
4
4
|
* Useful for benchmarking the logger overhead without I/O.
|
|
@@ -1,5 +1,5 @@
|
|
|
1
|
-
import type { LogLevels } from '
|
|
2
|
-
import type { LoggerSink } from '
|
|
1
|
+
import type { LogLevels } from '#/modules/logger/types/log-levels';
|
|
2
|
+
import type { LoggerSink } from '#/modules/logger/types/logger-sink';
|
|
3
3
|
export interface FileLoggerConfig {
|
|
4
4
|
/**
|
|
5
5
|
* Path to the file to log to.
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import type { Knex } from 'knex';
|
|
2
|
-
import type { Table } from '
|
|
3
|
-
import type { StreamWithAsyncIterable } from '
|
|
2
|
+
import type { Table } from '#/modules/database/table';
|
|
3
|
+
import type { StreamWithAsyncIterable } from '#/shared/types/stream-with-async-iterable';
|
|
4
4
|
import type { Filter } from './types/filter';
|
|
5
5
|
import type { OrderByItem } from './types/order-by-item';
|
|
6
6
|
import type { QueryOptions } from './types/query-options';
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import type { HTTP_STATUS_CODES } from '
|
|
1
|
+
import type { HTTP_STATUS_CODES } from '#/errors/enums/http-status-codes';
|
|
2
2
|
import type { Filter } from './filter';
|
|
3
3
|
import type { OrderByItem } from './order-by-item';
|
|
4
4
|
import type { SelectedFields } from './selected-fields';
|
package/package.json
CHANGED
|
@@ -1,13 +1,13 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@mrxsys/mrx-core",
|
|
3
|
-
"version": "2.11.0-2-and-
|
|
3
|
+
"version": "2.11.0-2-and-276-20251029",
|
|
4
4
|
"author": "Ruby",
|
|
5
5
|
"devDependencies": {
|
|
6
6
|
"@eslint/js": "^9.38.0",
|
|
7
7
|
"@sinclair/typebox": "0.34.41",
|
|
8
8
|
"@stylistic/eslint-plugin": "^5.5.0",
|
|
9
|
-
"@types/bun": "^1.3.
|
|
10
|
-
"@types/nodemailer": "^7.0.
|
|
9
|
+
"@types/bun": "^1.3.1",
|
|
10
|
+
"@types/nodemailer": "^7.0.3",
|
|
11
11
|
"elysia": "1.4.13",
|
|
12
12
|
"eslint": "^9.38.0",
|
|
13
13
|
"globals": "^16.4.0",
|
|
@@ -20,7 +20,7 @@
|
|
|
20
20
|
},
|
|
21
21
|
"peerDependencies": {
|
|
22
22
|
"@sinclair/typebox": "0.34.41",
|
|
23
|
-
"elysia": "^1.4.
|
|
23
|
+
"elysia": "^1.4.13",
|
|
24
24
|
"ioredis": "^5.8.2",
|
|
25
25
|
"jose": "^6.1.0",
|
|
26
26
|
"mssql": "^12.0.0",
|