@nathapp/nestjs-typeorm 3.1.1 → 3.1.2
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/CLAUDE.md +135 -18
- package/dist/transaction/index.d.ts +2 -0
- package/dist/transaction/index.js +2 -0
- package/dist/transaction/index.js.map +1 -1
- package/dist/transaction/typeorm-transaction-manager.token.d.ts +2 -0
- package/dist/transaction/typeorm-transaction-manager.token.js +9 -0
- package/dist/transaction/typeorm-transaction-manager.token.js.map +1 -0
- package/dist/transaction/typeorm-transaction.constants.d.ts +1 -0
- package/dist/transaction/typeorm-transaction.constants.js +5 -0
- package/dist/transaction/typeorm-transaction.constants.js.map +1 -0
- package/dist/typeorm/typeorm-ex.module.d.ts +1 -0
- package/dist/typeorm/typeorm-ex.module.js +56 -11
- package/dist/typeorm/typeorm-ex.module.js.map +1 -1
- package/package.json +2 -2
package/CLAUDE.md
CHANGED
|
@@ -16,35 +16,152 @@ TypeORM integration (renamed from `@nathapp/nestjs-data`).
|
|
|
16
16
|
`AbstractTypeOrmRepository<TDomain, TEntity, TId>` implements
|
|
17
17
|
`IRepository<TDomain, TId>` from `@nathapp/nestjs-data`. Use it when services
|
|
18
18
|
should depend on the portable interface (decoupled from TypeORM). Subclass and
|
|
19
|
-
implement `toDomain`, `toPersistenceCreate`, `toPersistenceUpdate`.
|
|
19
|
+
implement `toDomain`, `toPersistenceCreate`, `toPersistenceUpdate`. Add bespoke
|
|
20
|
+
TypeORM-specific methods (e.g. `createQueryBuilder`) on top — they are
|
|
21
|
+
automatically transaction-aware via the protected `repo` getter.
|
|
20
22
|
|
|
21
|
-
For
|
|
22
|
-
|
|
23
|
+
For ORM-specific power that does not need the portable contract, keep using
|
|
24
|
+
`BaseRepository` / `BaseSpRepository` — they are unrelated and remain unchanged.
|
|
23
25
|
|
|
24
|
-
|
|
25
|
-
named `"id"`. Schemas using a different PK name must bypass this base class.
|
|
26
|
+
### Wiring via `forCustomRepository`
|
|
26
27
|
|
|
27
|
-
|
|
28
|
+
`TypeOrmExModule.forCustomRepository` is the standard wiring path for all three
|
|
29
|
+
repository styles. The factory branches on the base class:
|
|
30
|
+
|
|
31
|
+
- `extends AbstractTypeOrmRepository` → `new repo(tx, entity)` from `@CustomRepository(Entity)` metadata + injected per-DataSource tx manager token
|
|
32
|
+
- `extends BaseRepository` → `new repo(dataSource)`
|
|
33
|
+
- `extends Repository<T>` → manager-getter trick + ALS retrofit (transaction-aware when `forRoot({ transaction: true })`)
|
|
28
34
|
|
|
29
35
|
```typescript
|
|
30
|
-
@
|
|
31
|
-
|
|
32
|
-
|
|
33
|
-
|
|
36
|
+
import { CustomRepository, AbstractTypeOrmRepository, TypeOrmExModule } from '@nathapp/nestjs-typeorm';
|
|
37
|
+
import { Repository } from 'typeorm';
|
|
38
|
+
|
|
39
|
+
// New code: portable IRepository<User> — no manual constructor needed
|
|
40
|
+
@CustomRepository(UserEntity)
|
|
41
|
+
export class UserRepository extends AbstractTypeOrmRepository<User, UserEntity, string> {
|
|
42
|
+
protected toDomain(e: UserEntity): User { return { id: e.id, email: e.email_address, name: e.full_name }; }
|
|
43
|
+
protected toPersistenceCreate(d: User): UserEntity { /* ... */ }
|
|
44
|
+
protected toPersistenceUpdate(p: Partial<User>): Partial<UserEntity> { /* ... */ }
|
|
45
|
+
|
|
46
|
+
// Bespoke TypeORM-specific method — already tx-aware via this.repo
|
|
47
|
+
async findActiveByEmail(email: string): Promise<User | null> {
|
|
48
|
+
const e = await this.repo
|
|
49
|
+
.createQueryBuilder('u')
|
|
50
|
+
.where('u.email_address = :email AND u.status = 1', { email })
|
|
51
|
+
.getOne();
|
|
52
|
+
return e ? this.toDomain(e) : null;
|
|
34
53
|
}
|
|
35
|
-
// ...mapper implementations
|
|
36
54
|
}
|
|
37
55
|
|
|
38
|
-
//
|
|
39
|
-
|
|
40
|
-
|
|
41
|
-
|
|
42
|
-
|
|
56
|
+
// Legacy / coupling-explicit: extend Repository<T> directly
|
|
57
|
+
@CustomRepository(InvoiceEntity)
|
|
58
|
+
export class InvoiceRepository extends Repository<InvoiceEntity> {
|
|
59
|
+
// QueryBuilder, raw SQL, etc. — automatically participates in txManager.run()
|
|
60
|
+
// when the module is registered with forRoot({ transaction: true }).
|
|
61
|
+
}
|
|
62
|
+
|
|
63
|
+
@Module({
|
|
64
|
+
imports: [
|
|
65
|
+
TypeOrmExModule.forRoot({ type: 'mysql', /* ... */, transaction: true }),
|
|
66
|
+
TypeOrmExModule.forCustomRepository([UserRepository, InvoiceRepository]),
|
|
67
|
+
],
|
|
68
|
+
providers: [
|
|
69
|
+
// Bind the IRepository<User> token to the concrete class.
|
|
70
|
+
{ provide: USER_REPOSITORY, useExisting: UserRepository },
|
|
71
|
+
],
|
|
72
|
+
exports: [USER_REPOSITORY],
|
|
73
|
+
})
|
|
74
|
+
export class UserModule {}
|
|
75
|
+
|
|
76
|
+
// Service depends on the portable contract:
|
|
77
|
+
@Injectable()
|
|
78
|
+
export class UserService {
|
|
79
|
+
constructor(@Inject(USER_REPOSITORY) private readonly users: IRepository<User>) {}
|
|
80
|
+
}
|
|
81
|
+
```
|
|
82
|
+
|
|
83
|
+
### Multi-DataSource binding
|
|
84
|
+
|
|
85
|
+
Pass the DataSource name as the second argument to `forCustomRepository` so the
|
|
86
|
+
factory injects the matching per-DataSource tx manager token:
|
|
43
87
|
|
|
44
|
-
|
|
45
|
-
|
|
88
|
+
```typescript
|
|
89
|
+
@Module({
|
|
90
|
+
imports: [
|
|
91
|
+
TypeOrmExModule.forRoot({ name: 'analytics', type: 'mysql', /* ... */, transaction: true }),
|
|
92
|
+
TypeOrmExModule.forCustomRepository([AnalyticsRepo], 'analytics'),
|
|
93
|
+
],
|
|
94
|
+
providers: [
|
|
95
|
+
{ provide: ANALYTICS_REPOSITORY, useExisting: AnalyticsRepo },
|
|
96
|
+
],
|
|
97
|
+
})
|
|
98
|
+
export class AnalyticsModule {}
|
|
46
99
|
```
|
|
47
100
|
|
|
101
|
+
### Limitations
|
|
102
|
+
|
|
103
|
+
- The `AbstractTypeOrmRepository` branch instantiates with `(tx, entity)` only.
|
|
104
|
+
Subclasses that need to inject additional providers (e.g. a logger) must
|
|
105
|
+
register manually via `providers: [...]` instead of `forCustomRepository`.
|
|
106
|
+
- Legacy `@Transactional` method decorator and `BaseSpRepository.callQuery` use a
|
|
107
|
+
separate `transactionContext` ALS that is not unified with `TypeOrmTransactionManager`.
|
|
108
|
+
Out of scope; tracked as a follow-up.
|
|
109
|
+
|
|
110
|
+
## Multi-DB
|
|
111
|
+
|
|
112
|
+
Multiple TypeORM DataSources in one process are wired by repeating
|
|
113
|
+
`TypeOrmExModule.forRoot` with different `name` values. Each call publishes a
|
|
114
|
+
per-DataSource transaction manager token via `getTypeOrmTransactionManagerToken(name)`.
|
|
115
|
+
The **default** DataSource additionally aliases the global `TRANSACTION_MANAGER`
|
|
116
|
+
symbol from `@nathapp/nestjs-data`, so single-DB consumers do not change.
|
|
117
|
+
|
|
118
|
+
```typescript
|
|
119
|
+
import {
|
|
120
|
+
TypeOrmExModule,
|
|
121
|
+
getTypeOrmTransactionManagerToken,
|
|
122
|
+
} from '@nathapp/nestjs-typeorm';
|
|
123
|
+
import { ITransactionManager } from '@nathapp/nestjs-data';
|
|
124
|
+
|
|
125
|
+
@Module({
|
|
126
|
+
imports: [
|
|
127
|
+
TypeOrmExModule.forRoot({ /* default DS config */, transaction: true }),
|
|
128
|
+
TypeOrmExModule.forRoot({ name: 'analytics', /* ... */, transaction: true }),
|
|
129
|
+
],
|
|
130
|
+
})
|
|
131
|
+
export class AppModule {}
|
|
132
|
+
|
|
133
|
+
@Injectable()
|
|
134
|
+
export class AnalyticsService {
|
|
135
|
+
constructor(
|
|
136
|
+
@Inject(getTypeOrmTransactionManagerToken('analytics'))
|
|
137
|
+
private readonly tx: ITransactionManager,
|
|
138
|
+
) {}
|
|
139
|
+
|
|
140
|
+
async ingest(events: Event[]) {
|
|
141
|
+
return this.tx.run(async () => {
|
|
142
|
+
// Wraps analytics-DS writes only.
|
|
143
|
+
});
|
|
144
|
+
}
|
|
145
|
+
}
|
|
146
|
+
```
|
|
147
|
+
|
|
148
|
+
### Atomicity boundary — read this carefully
|
|
149
|
+
|
|
150
|
+
A `tx.run()` on a named tx manager covers **only** that DataSource's writes. If
|
|
151
|
+
code inside `tx.run('dbA')` also writes to dbB via a different tx manager, those
|
|
152
|
+
dbB writes are **independent** — they commit/roll back on their own. There is no
|
|
153
|
+
2PC, no distributed transaction, no cross-DB atomicity.
|
|
154
|
+
|
|
155
|
+
**This is intentional.** Cross-DB consistency in microservices is solved with
|
|
156
|
+
sagas / outbox patterns, not transactions.
|
|
157
|
+
|
|
158
|
+
### Default connection convenience
|
|
159
|
+
|
|
160
|
+
For services that only ever talk to one DataSource, keep using
|
|
161
|
+
`@Inject(TRANSACTION_MANAGER)` from `@nathapp/nestjs-data`. It is registered as
|
|
162
|
+
an alias for `getTypeOrmTransactionManagerToken()` (the default DataSource)
|
|
163
|
+
automatically. No multi-DB token churn for single-DB code.
|
|
164
|
+
|
|
48
165
|
## Gotchas
|
|
49
166
|
- Pagination types (`Page`, `PageOption`) moved to `@nathapp/nestjs-common` — import from there.
|
|
50
167
|
- Uses `import * as dayjs` (NOT default import) — do NOT add `esModuleInterop` to this package's tsconfig.
|
|
@@ -17,4 +17,6 @@ Object.defineProperty(exports, "__esModule", { value: true });
|
|
|
17
17
|
__exportStar(require("./transactional.decorator"), exports);
|
|
18
18
|
__exportStar(require("./transaction.service"), exports);
|
|
19
19
|
__exportStar(require("./typeorm-transaction-manager"), exports);
|
|
20
|
+
__exportStar(require("./typeorm-transaction-manager.token"), exports);
|
|
21
|
+
__exportStar(require("./typeorm-transaction.constants"), exports);
|
|
20
22
|
//# sourceMappingURL=index.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.js","sourceRoot":"","sources":["../../lib/transaction/index.ts"],"names":[],"mappings":";;;;;;;;;;;;;;;;AAAA,4DAA0C;AAC1C,wDAAsC;AACtC,gEAA8C"}
|
|
1
|
+
{"version":3,"file":"index.js","sourceRoot":"","sources":["../../lib/transaction/index.ts"],"names":[],"mappings":";;;;;;;;;;;;;;;;AAAA,4DAA0C;AAC1C,wDAAsC;AACtC,gEAA8C;AAC9C,sEAAoD;AACpD,kEAAgD"}
|
|
@@ -0,0 +1,9 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
+
exports.getTypeOrmTransactionManagerToken = exports.DEFAULT_TYPEORM_DATA_SOURCE_NAME = void 0;
|
|
4
|
+
exports.DEFAULT_TYPEORM_DATA_SOURCE_NAME = 'default';
|
|
5
|
+
const getTypeOrmTransactionManagerToken = (name) => name && name !== exports.DEFAULT_TYPEORM_DATA_SOURCE_NAME
|
|
6
|
+
? `TYPEORM_TRANSACTION_MANAGER_${name}`
|
|
7
|
+
: 'TYPEORM_TRANSACTION_MANAGER_DEFAULT';
|
|
8
|
+
exports.getTypeOrmTransactionManagerToken = getTypeOrmTransactionManagerToken;
|
|
9
|
+
//# sourceMappingURL=typeorm-transaction-manager.token.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"typeorm-transaction-manager.token.js","sourceRoot":"","sources":["../../lib/transaction/typeorm-transaction-manager.token.ts"],"names":[],"mappings":";;;AAAa,QAAA,gCAAgC,GAAG,SAAS,CAAC;AAqBnD,MAAM,iCAAiC,GAAG,CAAC,IAAa,EAAU,EAAE,CACzE,IAAI,IAAI,IAAI,KAAK,wCAAgC;IAC/C,CAAC,CAAC,+BAA+B,IAAI,EAAE;IACvC,CAAC,CAAC,qCAAqC,CAAC;AAH/B,QAAA,iCAAiC,qCAGF"}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export declare const TYPEORM_TRANSACTION_ALS: unique symbol;
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"typeorm-transaction.constants.js","sourceRoot":"","sources":["../../lib/transaction/typeorm-transaction.constants.ts"],"names":[],"mappings":";;;AAWa,QAAA,uBAAuB,GAAG,MAAM,CAAC,yBAAyB,CAAC,CAAC"}
|
|
@@ -15,5 +15,6 @@ export declare class TypeOrmExModule {
|
|
|
15
15
|
static forRootAsync(options?: TypeOrmExModuleAsyncOptions): DynamicModule;
|
|
16
16
|
static forFeature(entities?: EntityClassOrSchema[], dataSource?: string): DynamicModule;
|
|
17
17
|
static forCustomRepository<T extends new (...args: any[]) => any>(repositories: T[], dataSource?: DataSource | DataSourceOptions | string): DynamicModule;
|
|
18
|
+
private static getTxTokenForCustomRepository;
|
|
18
19
|
private static sanitizeOptions;
|
|
19
20
|
}
|
|
@@ -6,7 +6,10 @@ const async_hooks_1 = require("async_hooks");
|
|
|
6
6
|
const decorator_1 = require("../decorator");
|
|
7
7
|
const typeorm_utils_1 = require("./typeorm-utils");
|
|
8
8
|
const repository_1 = require("../repository");
|
|
9
|
+
const abstract_typeorm_repository_1 = require("../repository/abstract-typeorm.repository");
|
|
9
10
|
const typeorm_transaction_manager_1 = require("../transaction/typeorm-transaction-manager");
|
|
11
|
+
const typeorm_transaction_manager_token_1 = require("../transaction/typeorm-transaction-manager.token");
|
|
12
|
+
const typeorm_transaction_constants_1 = require("../transaction/typeorm-transaction.constants");
|
|
10
13
|
const nestjs_data_1 = require("@nathapp/nestjs-data");
|
|
11
14
|
exports.DEFAULT_DATA_SOURCE_NAME = 'default';
|
|
12
15
|
class TypeOrmExModule {
|
|
@@ -21,13 +24,23 @@ class TypeOrmExModule {
|
|
|
21
24
|
const als = new async_hooks_1.AsyncLocalStorage();
|
|
22
25
|
const dataSourceName = typeOrmOptions.name || exports.DEFAULT_DATA_SOURCE_NAME;
|
|
23
26
|
const dataSourceToken = (0, typeorm_1.getDataSourceToken)(dataSourceName === exports.DEFAULT_DATA_SOURCE_NAME ? undefined : dataSourceName);
|
|
27
|
+
const namedTxToken = (0, typeorm_transaction_manager_token_1.getTypeOrmTransactionManagerToken)(dataSourceName);
|
|
28
|
+
const isDefaultConnection = dataSourceName === exports.DEFAULT_DATA_SOURCE_NAME;
|
|
29
|
+
const alsProvider = {
|
|
30
|
+
provide: typeorm_transaction_constants_1.TYPEORM_TRANSACTION_ALS,
|
|
31
|
+
useValue: als,
|
|
32
|
+
};
|
|
24
33
|
const transactionManagerProvider = {
|
|
25
|
-
provide:
|
|
34
|
+
provide: namedTxToken,
|
|
26
35
|
inject: [dataSourceToken],
|
|
27
36
|
useFactory: (dataSource) => new typeorm_transaction_manager_1.TypeOrmTransactionManager(dataSource, als),
|
|
28
37
|
};
|
|
29
|
-
result.providers = [transactionManagerProvider];
|
|
30
|
-
result.exports = [
|
|
38
|
+
result.providers = [alsProvider, transactionManagerProvider];
|
|
39
|
+
result.exports = [namedTxToken, typeorm_transaction_constants_1.TYPEORM_TRANSACTION_ALS];
|
|
40
|
+
if (isDefaultConnection) {
|
|
41
|
+
result.providers.push({ provide: nestjs_data_1.TRANSACTION_MANAGER, useExisting: namedTxToken });
|
|
42
|
+
result.exports.push(nestjs_data_1.TRANSACTION_MANAGER);
|
|
43
|
+
}
|
|
31
44
|
}
|
|
32
45
|
return result;
|
|
33
46
|
}
|
|
@@ -41,13 +54,23 @@ class TypeOrmExModule {
|
|
|
41
54
|
const als = new async_hooks_1.AsyncLocalStorage();
|
|
42
55
|
const dataSourceName = typeOrmAsyncOptions.name || exports.DEFAULT_DATA_SOURCE_NAME;
|
|
43
56
|
const dataSourceToken = (0, typeorm_1.getDataSourceToken)(dataSourceName === exports.DEFAULT_DATA_SOURCE_NAME ? undefined : dataSourceName);
|
|
57
|
+
const namedTxToken = (0, typeorm_transaction_manager_token_1.getTypeOrmTransactionManagerToken)(dataSourceName);
|
|
58
|
+
const isDefaultConnection = dataSourceName === exports.DEFAULT_DATA_SOURCE_NAME;
|
|
59
|
+
const alsProvider = {
|
|
60
|
+
provide: typeorm_transaction_constants_1.TYPEORM_TRANSACTION_ALS,
|
|
61
|
+
useValue: als,
|
|
62
|
+
};
|
|
44
63
|
const transactionManagerProvider = {
|
|
45
|
-
provide:
|
|
64
|
+
provide: namedTxToken,
|
|
46
65
|
inject: [dataSourceToken],
|
|
47
66
|
useFactory: (dataSource) => new typeorm_transaction_manager_1.TypeOrmTransactionManager(dataSource, als),
|
|
48
67
|
};
|
|
49
|
-
result.providers = [transactionManagerProvider];
|
|
50
|
-
result.exports = [
|
|
68
|
+
result.providers = [alsProvider, transactionManagerProvider];
|
|
69
|
+
result.exports = [namedTxToken, typeorm_transaction_constants_1.TYPEORM_TRANSACTION_ALS];
|
|
70
|
+
if (isDefaultConnection) {
|
|
71
|
+
result.providers.push({ provide: nestjs_data_1.TRANSACTION_MANAGER, useExisting: namedTxToken });
|
|
72
|
+
result.exports.push(nestjs_data_1.TRANSACTION_MANAGER);
|
|
73
|
+
}
|
|
51
74
|
}
|
|
52
75
|
return result;
|
|
53
76
|
}
|
|
@@ -64,18 +87,32 @@ class TypeOrmExModule {
|
|
|
64
87
|
if (!entity) {
|
|
65
88
|
continue;
|
|
66
89
|
}
|
|
90
|
+
if (repository.prototype instanceof abstract_typeorm_repository_1.AbstractTypeOrmRepository) {
|
|
91
|
+
const txToken = this.getTxTokenForCustomRepository(dataSource);
|
|
92
|
+
providers.push({
|
|
93
|
+
inject: [txToken],
|
|
94
|
+
provide: repository,
|
|
95
|
+
useFactory: (tx) => new repository(tx, entity),
|
|
96
|
+
});
|
|
97
|
+
continue;
|
|
98
|
+
}
|
|
67
99
|
providers.push({
|
|
68
|
-
inject: [
|
|
100
|
+
inject: [
|
|
101
|
+
(0, typeorm_1.getDataSourceToken)(dataSource),
|
|
102
|
+
{ token: typeorm_transaction_constants_1.TYPEORM_TRANSACTION_ALS, optional: true },
|
|
103
|
+
],
|
|
69
104
|
provide: repository,
|
|
70
|
-
useFactory: (
|
|
105
|
+
useFactory: (ds, als) => {
|
|
71
106
|
if (repository.prototype instanceof repository_1.BaseRepository) {
|
|
72
|
-
return new repository(
|
|
107
|
+
return new repository(ds);
|
|
73
108
|
}
|
|
74
|
-
const baseRepository =
|
|
109
|
+
const baseRepository = ds.getRepository(entity);
|
|
75
110
|
const customRepository = new repository(baseRepository.target, baseRepository.manager);
|
|
76
111
|
Object.defineProperty(customRepository, 'manager', {
|
|
77
112
|
get() {
|
|
78
|
-
|
|
113
|
+
var _a;
|
|
114
|
+
const qr = als === null || als === void 0 ? void 0 : als.getStore();
|
|
115
|
+
return (_a = qr === null || qr === void 0 ? void 0 : qr.manager) !== null && _a !== void 0 ? _a : baseRepository.manager;
|
|
79
116
|
},
|
|
80
117
|
});
|
|
81
118
|
return customRepository;
|
|
@@ -88,6 +125,14 @@ class TypeOrmExModule {
|
|
|
88
125
|
providers,
|
|
89
126
|
};
|
|
90
127
|
}
|
|
128
|
+
static getTxTokenForCustomRepository(dataSource) {
|
|
129
|
+
if (typeof dataSource === 'string') {
|
|
130
|
+
return dataSource === exports.DEFAULT_DATA_SOURCE_NAME
|
|
131
|
+
? (0, typeorm_transaction_manager_token_1.getTypeOrmTransactionManagerToken)()
|
|
132
|
+
: (0, typeorm_transaction_manager_token_1.getTypeOrmTransactionManagerToken)(dataSource);
|
|
133
|
+
}
|
|
134
|
+
return (0, typeorm_transaction_manager_token_1.getTypeOrmTransactionManagerToken)();
|
|
135
|
+
}
|
|
91
136
|
static sanitizeOptions(options) {
|
|
92
137
|
let connectionType;
|
|
93
138
|
if (options.type) {
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"typeorm-ex.module.js","sourceRoot":"","sources":["../../lib/typeorm/typeorm-ex.module.ts"],"names":[],"mappings":";;;AACA,6CAAqH;AAErH,6CAAgD;AAChD,4CAA4D;AAC5D,mDAAyD;AACzD,8CAA+C;AAC/C,4FAAuF;AACvF,sDAA2D;AAE9C,QAAA,wBAAwB,GAAG,SAAS,CAAC;AAoDlD,MAAa,eAAe;IAGnB,MAAM,CAAC,OAAO,CAAC,UAAkC,EAA4B;QAClF,MAAM,EAAE,WAAW,EAAE,GAAG,cAAc,EAAE,GAAG,OAA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|
|
1
1
|
{
|
|
2
2
|
"name": "@nathapp/nestjs-typeorm",
|
|
3
|
-
"version": "3.1.
|
|
3
|
+
"version": "3.1.2",
|
|
4
4
|
"description": "@nathapp/nestjs-typeorm",
|
|
5
5
|
"scripts": {
|
|
6
6
|
"clean": "rimraf dist/ .turbo/",
|
|
@@ -20,7 +20,7 @@
|
|
|
20
20
|
},
|
|
21
21
|
"dependencies": {
|
|
22
22
|
"@nathapp/nestjs-common": "^3.0.0",
|
|
23
|
-
"@nathapp/nestjs-data": "^3.0.
|
|
23
|
+
"@nathapp/nestjs-data": "^3.0.3",
|
|
24
24
|
"dayjs": "^1.11.13"
|
|
25
25
|
},
|
|
26
26
|
"devDependencies": {
|