Skip to content

Commit 985a4af

Browse files
committed
chore: bump nx version
1 parent 1309457 commit 985a4af

File tree

23 files changed

+4455
-3578
lines changed

23 files changed

+4455
-3578
lines changed

.nxignore

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,2 +1,3 @@
1-
**/*.test-d.ts
2-
**/__test__/**/*
1+
libs/**/*.test-d.ts
2+
libs/json-api/**/___test___/
3+
Lines changed: 14 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -1,11 +1,20 @@
11
# json-api-nestjs-microorm
22

3-
This library was generated with [Nx](https://nx.dev).
3+
MocroOrm adapter for **[json-api-nestjs](https://github.com/klerick/nestjs-json-api/tree/master/libs/json-api/json-api-nestjs)**
44

5-
## Building
5+
## Installation
66

7-
Run `nx build json-api-nestjs-microorm` to build the library.
7+
```bash
8+
$ npm install @klerick/json-api-nestjs-microorm
9+
```
810

9-
## Running unit tests
11+
## Configuration params
1012

11-
Run `nx test json-api-nestjs-microorm` to execute the unit tests via [Jest](https://jestjs.io).
13+
The following interface is using for the configuration:
14+
15+
```typescript
16+
export type MicroOrmParam = {
17+
arrayType?: string[]; //Custom type for indicate of array
18+
};
19+
20+
```

libs/json-api/json-api-nestjs-microorm/package.json

Lines changed: 13 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -4,7 +4,19 @@
44
"type": "commonjs",
55
"main": "./src/index.js",
66
"types": "./src/index.d.ts",
7+
"description": "MicroOrm adapter for JsonApi Plugin for NestJs",
8+
"keywords": [
9+
"nestjs",
10+
"nest",
11+
"jsonapi",
12+
"json-api",
13+
"typeorm",
14+
"microorm",
15+
"CRUD"
16+
],
717
"dependencies": {
8-
"tslib": "^2.3.0"
18+
"tslib": ">2.3.0",
19+
"reflect-metadata": "^0.1.12 || ^0.2.0",
20+
"rxjs": "^7.1.0"
921
}
1022
}

libs/json-api/json-api-nestjs-microorm/project.json

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -57,6 +57,12 @@
5757
"options": {
5858
"packageRoot": "dist/{projectRoot}"
5959
}
60+
},
61+
"publish": {
62+
"command": "node tools/scripts/publish.mjs json-api-nestjs-microorm {args.ver} {args.tag}",
63+
"dependsOn": [
64+
"build"
65+
]
6066
}
6167
},
6268
"implicitDependencies": [

libs/json-api/json-api-nestjs-microorm/src/lib/micro-orm-json-api.module.ts

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -21,7 +21,6 @@ import {
2121
import { MicroOrmUtilService } from './service/micro-orm-util.service';
2222

2323
export class MicroOrmJsonApiModule {
24-
static module = 'microOrm' as const;
2524
static forRoot(options: PrepareParams<MicroOrmParam>): DynamicModule {
2625
const optionProvider = {
2726
provide: MODULE_OPTIONS_TOKEN,

libs/json-api/json-api-nestjs-sdk/package.json

Lines changed: 4 additions & 19 deletions
Original file line numberDiff line numberDiff line change
@@ -1,35 +1,20 @@
11
{
22
"name": "@klerick/json-api-nestjs-sdk",
33
"version": "9.0.0",
4-
"engines": {
5-
"node": ">= 16.0.0"
6-
},
74
"description": "Helper for client JsonAPi Plugin for NestJs",
8-
"contributors": [
9-
{
10-
"email": "[email protected]",
11-
"name": "Aleksandr Kharkovey"
12-
}
13-
],
14-
"repository": {
15-
"type": "git",
16-
"url": "https://github.com/klerick/nestjs-json-api.git"
17-
},
18-
"private": false,
19-
"license": "MIT",
20-
"files": [
21-
"**/*"
22-
],
235
"keywords": [
246
"nestjs",
257
"nest",
268
"jsonapi",
279
"json-api",
2810
"typeorm",
11+
"microorm",
2912
"CRUD"
3013
],
3114
"dependencies": {
32-
"tslib": ">2.3.0"
15+
"tslib": ">2.3.0",
16+
"reflect-metadata": "^0.1.12 || ^0.2.0",
17+
"rxjs": "^7.1.0"
3318
},
3419
"exports": {
3520
"./package.json": "./package.json",

libs/json-api/json-api-nestjs-sdk/project.json

Lines changed: 31 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -6,6 +6,15 @@
66
"tags": ["type:lib", "lib:json-api-nestjs", "lib:json-api-nestjs-sdk", "type:publish"],
77
"targets": {
88
"build-cjs": {
9+
"dependsOn": [
10+
{
11+
"projects": [
12+
"json-api-nestjs-shared"
13+
],
14+
"target": "build",
15+
"params": "ignore"
16+
}
17+
],
918
"executor": "@nx/js:tsc",
1019
"outputs": ["{options.outputPath}"],
1120
"options": {
@@ -17,15 +26,25 @@
1726
"input": "{projectRoot}",
1827
"output": "../"
1928
}],
20-
"updateBuildableProjectDepsInPackageJson": true,
2129
"buildableProjectDepsInPackageJsonType": "peerDependencies",
30+
"generateExportsField": true,
31+
"updateBuildableProjectDepsInPackageJson": true,
2232
"additionalEntryPoints": [
2333
"{projectRoot}/src/ngModule.ts"
2434
],
25-
"generateExportsField": true
35+
"externalBuildTargets": ["build-cjs"]
2636
}
2737
},
2838
"build-mjs": {
39+
"dependsOn": [
40+
{
41+
"projects": [
42+
"json-api-nestjs-shared"
43+
],
44+
"target": "build",
45+
"params": "ignore"
46+
}
47+
],
2948
"executor": "@nx/js:tsc",
3049
"outputs": ["{options.outputPath}"],
3150
"options": {
@@ -37,12 +56,12 @@
3756
"input": "{projectRoot}",
3857
"output": "../"
3958
}],
40-
"updateBuildableProjectDepsInPackageJson": true,
4159
"buildableProjectDepsInPackageJsonType": "peerDependencies",
60+
"generateExportsField": true,
61+
"updateBuildableProjectDepsInPackageJson": true,
4262
"additionalEntryPoints": [
4363
"{projectRoot}/src/ngModule.ts"
44-
],
45-
"generateExportsField": true
64+
]
4665
}
4766
},
4867
"build": {
@@ -54,11 +73,7 @@
5473
"outputPath": "dist/{projectRoot}",
5574
"commands": [
5675
{
57-
"command": "mv dist/{projectRoot}/cjs/package.json dist/{projectRoot}/package.json",
58-
"forwardAllArgs": false
59-
},
60-
{
61-
"command": "rm -rf dist/{projectRoot}/mjs/package.json",
76+
"command": "cp dist/{projectRoot}/cjs/package.json dist/{projectRoot}/package.json",
6277
"forwardAllArgs": false
6378
},
6479
{
@@ -78,6 +93,12 @@
7893
"options": {
7994
"packageRoot": "dist/{projectRoot}"
8095
}
96+
},
97+
"publish": {
98+
"command": "node tools/scripts/publish.mjs json-api-nestjs-sdk {args.ver} {args.tag}",
99+
"dependsOn": [
100+
"build"
101+
]
81102
}
82103
},
83104
"implicitDependencies": ["json-api-nestjs-shared"]

libs/json-api/json-api-nestjs-sdk/tsconfig-mjs.lib.json

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -3,6 +3,7 @@
33
"compilerOptions": {
44
"outDir": "../../../dist/out-tsc",
55
"declaration": true,
6+
"module": "es2015",
67
"target": "ES2022",
78
"types": [
89
"node"
Lines changed: 5 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -1,11 +1,9 @@
11
# json-api-nestjs-shared
22

3-
This library was generated with [Nx](https://nx.dev).
3+
Helper module for **[json-api-nestjs](https://github.com/klerick/nestjs-json-api/tree/master/libs/json-api/json-api-nestjs)**
44

5-
## Building
5+
## Installation
66

7-
Run `nx build json-api-nestjs-shared` to build the library.
8-
9-
## Running unit tests
10-
11-
Run `nx test json-api-nestjs-shared` to execute the unit tests via [Jest](https://jestjs.io).
7+
```bash
8+
$ npm install @klerick/json-api-nestjs-shared
9+
```

libs/json-api/json-api-nestjs-shared/package.json

Lines changed: 13 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,8 +1,20 @@
11
{
22
"name": "@klerick/json-api-nestjs-shared",
33
"version": "0.0.1",
4+
"description": "Shared Helper for JsonApi Plugin for NestJs",
5+
"keywords": [
6+
"nestjs",
7+
"nest",
8+
"jsonapi",
9+
"json-api",
10+
"typeorm",
11+
"microorm",
12+
"CRUD"
13+
],
414
"dependencies": {
5-
"tslib": "^2.3.0"
15+
"tslib": ">2.3.0",
16+
"reflect-metadata": "^0.1.12 || ^0.2.0",
17+
"rxjs": "^7.1.0"
618
},
719
"type": "commonjs",
820
"main": "./cjs/src/index.js",

libs/json-api/json-api-nestjs-shared/project.json

Lines changed: 10 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -52,21 +52,19 @@
5252
"build-mjs"
5353
],
5454
"options": {
55+
"outputPath": "dist/{projectRoot}",
5556
"commands": [
5657
{
57-
"command": "[ ! -f dist/{projectRoot}/cjs/package.json ] || mv dist/{projectRoot}/cjs/package.json dist/{projectRoot}/package.json",
58-
"forwardAllArgs": false
59-
},
60-
{
61-
"command": "rm -rf dist/{projectRoot}/mjs/package.json",
58+
"command": "[ ! -f dist/{projectRoot}/cjs/package.json ] || cp dist/{projectRoot}/cjs/package.json dist/{projectRoot}/package.json",
6259
"forwardAllArgs": false
6360
},
6461
{
6562
"command": "mkdir -p node_modules/@klerick && rm -rf node_modules/@klerick/json-api-nestjs-shared",
6663
"forwardAllArgs": false
6764
},
6865
{
69-
"command": "ln -s $(pwd)/dist/{projectRoot} node_modules/@klerick/json-api-nestjs-shared"
66+
"command": "ln -s $(pwd)/dist/{projectRoot} node_modules/@klerick/json-api-nestjs-shared",
67+
"forwardAllArgs": false
7068
}
7169
],
7270
"cwd": "./",
@@ -99,6 +97,12 @@
9997
"outputPath": "{workspaceRoot}/{projectRoot}"
10098
}
10199
},
100+
"publish": {
101+
"command": "node tools/scripts/publish.mjs json-api-nestjs-shared {args.ver} {args.tag}",
102+
"dependsOn": [
103+
"build"
104+
]
105+
},
102106
"nx-release-publish": {
103107
"options": {
104108
"packageRoot": "dist/{projectRoot}"
Lines changed: 18 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -1,11 +1,24 @@
11
# json-api-nestjs-typeorm
22

3-
This library was generated with [Nx](https://nx.dev).
3+
TypeOrm adapter for **[json-api-nestjs](https://github.com/klerick/nestjs-json-api/tree/master/libs/json-api/json-api-nestjs)**
44

5-
## Building
5+
## Installation
66

7-
Run `nx build json-api-nestjs-typeorm` to build the library.
7+
```bash
8+
$ npm install @klerick/json-api-nestjs-typeorm
9+
```
810

9-
## Running unit tests
1011

11-
Run `nx test json-api-nestjs-typeorm` to execute the unit tests via [Jest](https://jestjs.io).
12+
## Configuration params
13+
14+
The following interface is using for the configuration:
15+
16+
```typescript
17+
export type TypeOrmParam = {
18+
useSoftDelete?: boolean // Use soft delete
19+
runInTransaction?: <Func extends (...args: any) => any>(
20+
isolationLevel: IsolationLevel,
21+
fn: Func
22+
) => ReturnType<Func> // You can use cutom function for wrapping transaction in atomic operation, example: runInTransaction from https://github.com/Aliheym/typeorm-transactional
23+
};
24+
```

libs/json-api/json-api-nestjs-typeorm/package.json

Lines changed: 14 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -2,9 +2,21 @@
22
"name": "@klerick/json-api-nestjs-typeorm",
33
"version": "0.0.1",
44
"dependencies": {
5-
"tslib": "^2.3.0"
5+
"tslib": ">2.3.0",
6+
"reflect-metadata": "^0.1.12 || ^0.2.0",
7+
"rxjs": "^7.1.0"
68
},
79
"type": "commonjs",
810
"main": "./src/index.js",
9-
"typings": "./src/index.d.ts"
11+
"typings": "./src/index.d.ts",
12+
"description": "MicroOrm adapter for JsonApi Plugin for NestJs",
13+
"keywords": [
14+
"nestjs",
15+
"nest",
16+
"jsonapi",
17+
"json-api",
18+
"typeorm",
19+
"microorm",
20+
"CRUD"
21+
]
1022
}

libs/json-api/json-api-nestjs-typeorm/project.json

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -39,6 +39,12 @@
3939
"parallel": false,
4040
"outputPath": "{workspaceRoot}/{projectRoot}"
4141
}
42+
},
43+
"publish": {
44+
"command": "node tools/scripts/publish.mjs json-api-nestjs-typeorm {args.ver} {args.tag}",
45+
"dependsOn": [
46+
"build"
47+
]
4248
}
4349
},
4450
"implicitDependencies": ["json-api-nestjs"]

0 commit comments

Comments
 (0)