@mrxsys/mrx-core 2.6.0-canary-20250805-40e4647 → 2.6.0
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/CHANGELOG.md
CHANGED
|
@@ -1,4 +1,20 @@
|
|
|
1
1
|
|
|
2
|
+
## v2.6.0
|
|
3
|
+
|
|
4
|
+
[compare changes](https://github.com/MRX-Systems/MRX-Core/compare/v2.6.0-canary-20250805-40e4647...v2.6.0)
|
|
5
|
+
|
|
6
|
+
### 🌊 Types
|
|
7
|
+
|
|
8
|
+
- **🌊:** [fix TOperations with default CrudOperationsOptions] ([b8b6169d](https://github.com/MRX-Systems/MRX-Core/commit/b8b6169d))
|
|
9
|
+
|
|
10
|
+
### 🤖 CI
|
|
11
|
+
|
|
12
|
+
- **🤖:** [Add CI workflows for build, test, and deployment] ([7d98d68b](https://github.com/MRX-Systems/MRX-Core/commit/7d98d68b))
|
|
13
|
+
|
|
14
|
+
### ❤️ Contributors
|
|
15
|
+
|
|
16
|
+
- Ruby <necrelox@proton.me>
|
|
17
|
+
|
|
2
18
|
## v2.6.0-canary-20250805-40e4647
|
|
3
19
|
|
|
4
20
|
[compare changes](https://github.com/MRX-Systems/MRX-Core/compare/v2.5.1...v2.6.0-canary-20250805-40e4647)
|
|
@@ -14,14 +14,14 @@ import type { CrudOperationUpdateOneOptions } from './types/crudOperationUpdateO
|
|
|
14
14
|
import type { CrudOperationUpdateOptions } from './types/crudOperationUpdateOptions';
|
|
15
15
|
import type { CrudOptions } from './types/crudOptions';
|
|
16
16
|
export declare const crud: <const TDatabase extends DynamicDbOptions | string, const TTableName extends string, const TSourceSchema extends TObject, const TOperations extends CrudOperationsOptions = {
|
|
17
|
-
find: true;
|
|
18
|
-
findOne: true;
|
|
19
|
-
insert: true;
|
|
20
|
-
update: true;
|
|
21
|
-
updateOne: true;
|
|
22
|
-
delete: true;
|
|
23
|
-
deleteOne: true;
|
|
24
|
-
count: true;
|
|
17
|
+
find: CrudOperationFindOptions | true;
|
|
18
|
+
findOne: CrudOperationFindOneOptions | true;
|
|
19
|
+
insert: CrudOperationInsertOptions | true;
|
|
20
|
+
update: CrudOperationUpdateOptions | true;
|
|
21
|
+
updateOne: CrudOperationUpdateOneOptions | true;
|
|
22
|
+
delete: CrudOperationDeleteOptions | true;
|
|
23
|
+
deleteOne: CrudOperationDeleteOneOptions | true;
|
|
24
|
+
count: CrudOperationCountOptions | true;
|
|
25
25
|
}, const TSourceFindSchema extends TObject = TSourceSchema, const TSourceCountSchema extends TObject = TSourceSchema, const TSourceInsertSchema extends TObject = TSourceSchema, const TSourceUpdateSchema extends TObject = TSourceSchema, const TSourceDeleteSchema extends TObject = TSourceSchema, const TSourceResponseSchema extends TObject = TSourceSchema>({ database, tableName, schema, operations }: CrudOptions<TDatabase, TTableName, TSourceSchema, TOperations, TSourceFindSchema, TSourceCountSchema, TSourceInsertSchema, TSourceUpdateSchema, TSourceDeleteSchema, TSourceResponseSchema>) => Elysia<TTableName, {
|
|
26
26
|
decorator: SingletonBase["decorator"];
|
|
27
27
|
store: SingletonBase["store"];
|
|
@@ -7,7 +7,7 @@ import type { CrudOperationsOptions } from './crudOperationsOptions';
|
|
|
7
7
|
* @template TSourceSchema - The type of the object to be used in the CRUD operations extending {@link TObject}
|
|
8
8
|
* @template KEnumPermission - The type of the enum for permissions extending {@link String}
|
|
9
9
|
*/
|
|
10
|
-
export interface CrudOptions<TDatabase extends DynamicDbOptions | string, TTableName extends string, TSourceSchema extends TObject, TOperations extends CrudOperationsOptions
|
|
10
|
+
export interface CrudOptions<TDatabase extends DynamicDbOptions | string, TTableName extends string, TSourceSchema extends TObject, TOperations extends CrudOperationsOptions, TSourceFindSchema extends TObject = TSourceSchema, TSourceCountSchema extends TObject = TSourceSchema, TSourceInsertSchema extends TObject = TSourceSchema, TSourceUpdateSchema extends TObject = TSourceSchema, TSourceDeleteSchema extends TObject = TSourceSchema, TSourceResponseSchema extends TObject = TSourceSchema> {
|
|
11
11
|
readonly database: TDatabase;
|
|
12
12
|
readonly tableName: TTableName;
|
|
13
13
|
readonly schema: {
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@mrxsys/mrx-core",
|
|
3
|
-
"version": "2.6.0
|
|
3
|
+
"version": "2.6.0",
|
|
4
4
|
"author": "Ruby",
|
|
5
5
|
"description": " Core provides a set of tools to help you build a microservice",
|
|
6
6
|
"type": "module",
|
|
@@ -62,8 +62,8 @@
|
|
|
62
62
|
"fix-lint": "eslint --fix ./source",
|
|
63
63
|
"lint": "eslint ./source",
|
|
64
64
|
"start": "bun build/index.js",
|
|
65
|
-
"test:integration": "bun test --timeout
|
|
66
|
-
"test:unit": "bun test --timeout
|
|
65
|
+
"test:integration": "bun test --timeout 5800 $(find test/integration -name '*.spec.ts')",
|
|
66
|
+
"test:unit": "bun test --timeout 5800 --coverage $(find test/unit -name '*.spec.ts')",
|
|
67
67
|
"test": "bun test --coverage --timeout 5500"
|
|
68
68
|
},
|
|
69
69
|
"devDependencies": {
|