nest-knexjs 0.0.15 → 0.0.17
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.
|
@@ -13,7 +13,7 @@ jobs:
|
|
|
13
13
|
|
|
14
14
|
strategy:
|
|
15
15
|
matrix:
|
|
16
|
-
node-version: [
|
|
16
|
+
node-version: [16.x, 18.x]
|
|
17
17
|
|
|
18
18
|
steps:
|
|
19
19
|
- uses: actions/checkout@v3
|
|
@@ -30,7 +30,7 @@ jobs:
|
|
|
30
30
|
|
|
31
31
|
strategy:
|
|
32
32
|
matrix:
|
|
33
|
-
node-version: [
|
|
33
|
+
node-version: [16.x, 18.x]
|
|
34
34
|
needs: [build]
|
|
35
35
|
|
|
36
36
|
steps:
|
|
@@ -1,3 +1,3 @@
|
|
|
1
1
|
import { KnexModuleOptions } from '../interfaces/knex-options.interface';
|
|
2
|
-
export declare const InjectModel: (connection?: string) =>
|
|
2
|
+
export declare const InjectModel: (connection?: string) => PropertyDecorator & ParameterDecorator;
|
|
3
3
|
export declare const InjectConnection: (connection?: KnexModuleOptions | string) => ParameterDecorator;
|
|
@@ -17,4 +17,4 @@ export declare function getConnectionToken(connection?: KnexModuleOptions | stri
|
|
|
17
17
|
export declare function getConnectionPrefix(connection?: KnexModuleOptions | string): string;
|
|
18
18
|
export declare function handleRetry(retryAttempts?: number, retryDelay?: number): <T>(source: Observable<T>) => Observable<T>;
|
|
19
19
|
export declare function getConnectionName(options: KnexModuleOptions): string;
|
|
20
|
-
export declare const generateString: () =>
|
|
20
|
+
export declare const generateString: () => `${string}-${string}-${string}-${string}-${string}`;
|
|
@@ -3,7 +3,7 @@ Object.defineProperty(exports, "__esModule", { value: true });
|
|
|
3
3
|
exports.generateString = exports.getConnectionName = exports.handleRetry = exports.getConnectionPrefix = exports.getConnectionToken = exports.getModelToken = void 0;
|
|
4
4
|
const knex_constants_1 = require("../knex.constants");
|
|
5
5
|
const operators_1 = require("rxjs/operators");
|
|
6
|
-
const
|
|
6
|
+
const node_crypto_1 = require("node:crypto");
|
|
7
7
|
const common_1 = require("@nestjs/common");
|
|
8
8
|
const circular_dependency_exception_1 = require("../exceptions/circular-dependency.exception");
|
|
9
9
|
const logger = new common_1.Logger('KnexModule');
|
|
@@ -61,5 +61,5 @@ function getConnectionName(options) {
|
|
|
61
61
|
return options && options.name ? options.name : knex_constants_1.DEFAULT_CONNECTION_NAME;
|
|
62
62
|
}
|
|
63
63
|
exports.getConnectionName = getConnectionName;
|
|
64
|
-
const generateString = () => (0,
|
|
64
|
+
const generateString = () => (0, node_crypto_1.randomUUID)();
|
|
65
65
|
exports.generateString = generateString;
|
package/dist/knex-core.module.js
CHANGED
|
@@ -20,7 +20,7 @@ const knex_constants_1 = require("./knex.constants");
|
|
|
20
20
|
const knex_1 = require("knex");
|
|
21
21
|
const core_1 = require("@nestjs/core");
|
|
22
22
|
const rxjs_1 = require("rxjs");
|
|
23
|
-
let KnexCoreModule = KnexCoreModule_1 = class KnexCoreModule {
|
|
23
|
+
let KnexCoreModule = exports.KnexCoreModule = KnexCoreModule_1 = class KnexCoreModule {
|
|
24
24
|
constructor(options, moduleRef) {
|
|
25
25
|
this.options = options;
|
|
26
26
|
this.moduleRef = moduleRef;
|
|
@@ -98,10 +98,9 @@ let KnexCoreModule = KnexCoreModule_1 = class KnexCoreModule {
|
|
|
98
98
|
}).pipe((0, knex_utils_1.handleRetry)(options.retryAttempts, options.retryDelay)));
|
|
99
99
|
}
|
|
100
100
|
};
|
|
101
|
-
KnexCoreModule = KnexCoreModule_1 = __decorate([
|
|
101
|
+
exports.KnexCoreModule = KnexCoreModule = KnexCoreModule_1 = __decorate([
|
|
102
102
|
(0, common_1.Global)(),
|
|
103
103
|
(0, common_1.Module)({}),
|
|
104
104
|
__param(0, (0, common_1.Inject)(knex_constants_1.KNEX_MODULE_OPTIONS)),
|
|
105
105
|
__metadata("design:paramtypes", [Object, core_1.ModuleRef])
|
|
106
106
|
], KnexCoreModule);
|
|
107
|
-
exports.KnexCoreModule = KnexCoreModule;
|
package/dist/knex.module.js
CHANGED
|
@@ -10,7 +10,7 @@ Object.defineProperty(exports, "__esModule", { value: true });
|
|
|
10
10
|
exports.KnexModule = void 0;
|
|
11
11
|
const common_1 = require("@nestjs/common");
|
|
12
12
|
const knex_core_module_1 = require("./knex-core.module");
|
|
13
|
-
let KnexModule = KnexModule_1 = class KnexModule {
|
|
13
|
+
let KnexModule = exports.KnexModule = KnexModule_1 = class KnexModule {
|
|
14
14
|
static forRoot(options, connection) {
|
|
15
15
|
return {
|
|
16
16
|
module: KnexModule_1,
|
|
@@ -24,7 +24,6 @@ let KnexModule = KnexModule_1 = class KnexModule {
|
|
|
24
24
|
};
|
|
25
25
|
}
|
|
26
26
|
};
|
|
27
|
-
KnexModule = KnexModule_1 = __decorate([
|
|
27
|
+
exports.KnexModule = KnexModule = KnexModule_1 = __decorate([
|
|
28
28
|
(0, common_1.Module)({})
|
|
29
29
|
], KnexModule);
|
|
30
|
-
exports.KnexModule = KnexModule;
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "nest-knexjs",
|
|
3
|
-
"version": "0.0.
|
|
3
|
+
"version": "0.0.17",
|
|
4
4
|
"description": "Knexjs module for Nest framework (node.js) 😻",
|
|
5
5
|
"author": "Tony133",
|
|
6
6
|
"license": "MIT",
|
|
@@ -19,38 +19,38 @@
|
|
|
19
19
|
"prepare": "husky install"
|
|
20
20
|
},
|
|
21
21
|
"devDependencies": {
|
|
22
|
-
"@commitlint/cli": "17.5
|
|
23
|
-
"@commitlint/config-angular": "17.
|
|
24
|
-
"@nestjs/common": "
|
|
25
|
-
"@nestjs/core": "
|
|
26
|
-
"@nestjs/platform-express": "
|
|
27
|
-
"@nestjs/testing": "
|
|
22
|
+
"@commitlint/cli": "17.6.5",
|
|
23
|
+
"@commitlint/config-angular": "17.6.5",
|
|
24
|
+
"@nestjs/common": "10.0.0",
|
|
25
|
+
"@nestjs/core": "10.0.0",
|
|
26
|
+
"@nestjs/platform-express": "10.0.0",
|
|
27
|
+
"@nestjs/testing": "10.0.0",
|
|
28
28
|
"@types/express": "4.17.17",
|
|
29
|
-
"@types/jest": "29.5.
|
|
30
|
-
"@types/node": "
|
|
29
|
+
"@types/jest": "29.5.2",
|
|
30
|
+
"@types/node": "20.3.1",
|
|
31
31
|
"@types/supertest": "2.0.12",
|
|
32
|
-
"@typescript-eslint/eslint-plugin": "5.
|
|
33
|
-
"@typescript-eslint/parser": "5.
|
|
34
|
-
"eslint": "8.
|
|
32
|
+
"@typescript-eslint/eslint-plugin": "5.59.11",
|
|
33
|
+
"@typescript-eslint/parser": "5.59.11",
|
|
34
|
+
"eslint": "8.42.0",
|
|
35
35
|
"eslint-config-prettier": "8.8.0",
|
|
36
36
|
"eslint-plugin-import": "2.27.5",
|
|
37
37
|
"husky": "8.0.3",
|
|
38
38
|
"jest": "29.5.0",
|
|
39
39
|
"knex": "2.4.2",
|
|
40
40
|
"mysql": "2.18.1",
|
|
41
|
-
"prettier": "2.8.
|
|
41
|
+
"prettier": "2.8.8",
|
|
42
42
|
"reflect-metadata": "0.1.13",
|
|
43
|
-
"release-it": "15.
|
|
44
|
-
"rxjs": "7.8.
|
|
43
|
+
"release-it": "15.11.0",
|
|
44
|
+
"rxjs": "7.8.1",
|
|
45
45
|
"supertest": "6.3.3",
|
|
46
|
-
"ts-jest": "29.0
|
|
46
|
+
"ts-jest": "29.1.0",
|
|
47
47
|
"ts-node": "10.9.1",
|
|
48
48
|
"tsconfig-paths": "4.2.0",
|
|
49
|
-
"typescript": "5.
|
|
49
|
+
"typescript": "5.1.3"
|
|
50
50
|
},
|
|
51
51
|
"peerDependencies": {
|
|
52
|
-
"@nestjs/common": "^7.0.0 || ^8.0.0 || ^9.0.0",
|
|
53
|
-
"@nestjs/core": "^7.0.0 || ^8.0.0 || ^9.0.0",
|
|
52
|
+
"@nestjs/common": "^7.0.0 || ^8.0.0 || ^9.0.0 || ^10.0.0",
|
|
53
|
+
"@nestjs/core": "^7.0.0 || ^8.0.0 || ^9.0.0 || ^10.0.0",
|
|
54
54
|
"knex": "^0.21.17 || ^0.95.0 || ^1.0.0 || ^2.0.0",
|
|
55
55
|
"reflect-metadata": "^0.1.13",
|
|
56
56
|
"rxjs": "^6.6.3 || ^7.2.0"
|
|
@@ -61,8 +61,5 @@
|
|
|
61
61
|
"repository": {
|
|
62
62
|
"type": "git",
|
|
63
63
|
"url": "https://github.com/tony133/nestjs-knexjs"
|
|
64
|
-
},
|
|
65
|
-
"dependencies": {
|
|
66
|
-
"uuid": "9.0.0"
|
|
67
64
|
}
|
|
68
65
|
}
|