nicot 1.2.11 → 1.2.13
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/README.md +408 -0
- package/dist/index.cjs +774 -32
- package/dist/index.cjs.map +4 -4
- package/dist/index.d.ts +1 -0
- package/dist/index.mjs +797 -32
- package/dist/index.mjs.map +4 -4
- package/dist/src/transactional-typeorm.module.d.ts +20 -0
- package/dist/src/utility/create-dynamic-fetcher-proxy.d.ts +1 -0
- package/dist/src/utility/create-inject-from-token-factory.d.ts +4 -0
- package/index.ts +1 -0
- package/package.json +5 -2
|
@@ -0,0 +1,20 @@
|
|
|
1
|
+
import { DataSource, DataSourceOptions, EntityManager } from 'typeorm';
|
|
2
|
+
import { DynamicModule } from '@nestjs/common';
|
|
3
|
+
import { CallHandler } from '@nestjs/common/interfaces/features/nest-interceptor.interface';
|
|
4
|
+
import { ExecutionContext } from '@nestjs/common/interfaces/features/execution-context.interface';
|
|
5
|
+
import { Observable } from 'rxjs';
|
|
6
|
+
export declare const TransactionalTypeOrmInterceptor: (dataSource?: DataSource | DataSourceOptions | string) => {
|
|
7
|
+
new (entityManager: EntityManager): {
|
|
8
|
+
entityManager: EntityManager;
|
|
9
|
+
intercept(context: ExecutionContext, next: CallHandler): Observable<any>;
|
|
10
|
+
};
|
|
11
|
+
};
|
|
12
|
+
export declare const getTransactionalEntityManagerToken: (dataSource?: DataSource | DataSourceOptions | string) => string;
|
|
13
|
+
export declare const getTransactionalEntityManagerProvider: (dataSource?: DataSource | DataSourceOptions | string) => import("nesties").TypedFactoryProvider<[string | Function, "REQUEST"], EntityManager>;
|
|
14
|
+
export declare const InjectTransactionalEntityManager: (dataSource?: string | DataSource | DataSourceOptions) => PropertyDecorator & ParameterDecorator;
|
|
15
|
+
export declare const getTransactionalRepositoryToken: (entity: Function, dataSource?: DataSource | DataSourceOptions | string) => string;
|
|
16
|
+
export declare const getTransactionalRepositoryProvider: (entity: Function, dataSource?: DataSource | DataSourceOptions | string) => import("nesties").TypedFactoryProvider<[string | Function, "REQUEST"], import("typeorm").Repository<import("typeorm").ObjectLiteral>>;
|
|
17
|
+
export declare const InjectTransactionalRepository: (entity: Function, dataSource?: string | DataSource | DataSourceOptions) => PropertyDecorator & ParameterDecorator;
|
|
18
|
+
export declare class TransactionalTypeOrmModule {
|
|
19
|
+
static forFeature(entities: Function | Function[], dataSource?: DataSource | DataSourceOptions | string): DynamicModule;
|
|
20
|
+
}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export declare const createDynamicFetcherProxy: <T extends object>(initial: T, fetcher: () => T) => T;
|
|
@@ -0,0 +1,4 @@
|
|
|
1
|
+
import { Inject } from '@nestjs/common';
|
|
2
|
+
type InjectToken = Parameters<typeof Inject>[0];
|
|
3
|
+
export declare const createInjectFromTokenFactory: <P extends any[]>(factory: (...params: P) => InjectToken) => (...params: P) => PropertyDecorator & ParameterDecorator;
|
|
4
|
+
export {};
|
package/index.ts
CHANGED
package/package.json
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "nicot",
|
|
3
3
|
"description": "Nest.js interacting with class-validator + OpenAPI + TypeORM for Nest.js Restful API development.",
|
|
4
|
-
"version": "1.2.
|
|
4
|
+
"version": "1.2.13",
|
|
5
5
|
"main": "dist/index.cjs",
|
|
6
6
|
"module": "dist/index.mjs",
|
|
7
7
|
"types": "dist/index.d.ts",
|
|
@@ -81,6 +81,7 @@
|
|
|
81
81
|
"jest": "^29.7.0",
|
|
82
82
|
"pg": "^8.7.3",
|
|
83
83
|
"prettier": "^2.7.1",
|
|
84
|
+
"rxjs": "^7.8.2",
|
|
84
85
|
"supertest": "^6.2.4",
|
|
85
86
|
"ts-jest": "^29.3.2",
|
|
86
87
|
"typescript": "^5.8.3"
|
|
@@ -88,14 +89,16 @@
|
|
|
88
89
|
"peerDependencies": {
|
|
89
90
|
"@nestjs/common": "^11.0.0 || ^9.4.0 || ^10.0.0",
|
|
90
91
|
"@nestjs/config": "^4.0.0 || ^3.0.0",
|
|
92
|
+
"@nestjs/core": "^11.0.0 || ^9.4.0 || ^10.0.0",
|
|
91
93
|
"@nestjs/swagger": "^11.0.0 || ^7.1.8 || ^6.3.0",
|
|
92
94
|
"class-transformer": "^0.5.1",
|
|
93
95
|
"class-validator": "^0.14.0",
|
|
96
|
+
"rxjs": ">=7.0.0",
|
|
94
97
|
"typeorm": "^0.3.27"
|
|
95
98
|
},
|
|
96
99
|
"dependencies": {
|
|
97
100
|
"lodash": "^4.17.21",
|
|
98
|
-
"nesties": "^1.1.
|
|
101
|
+
"nesties": "^1.1.23",
|
|
99
102
|
"nfkit": "^1.0.13",
|
|
100
103
|
"p-queue": "6.6.2",
|
|
101
104
|
"superjson": "1.13.3",
|