@nathapp/nestjs-data 1.0.0-rc.7 → 1.0.0-rc.8
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/dist/typeorm/index.d.ts
CHANGED
|
@@ -1,5 +1,5 @@
|
|
|
1
|
-
import { BaseTypeOrmModuleOptionFactory } from "./base-typeorm-options-factory";
|
|
1
|
+
import { BaseTypeOrmModuleOptionFactory, OptionWithoutEntities } from "./base-typeorm-options-factory";
|
|
2
2
|
import { defaultExtraOptions, defaultMongoExtraOptions, defaultMysqlExtraOptions } from "./constants";
|
|
3
3
|
import { DEFAULT_DATA_SOURCE_NAME, SupportedConnectionType, TypeOrmExModule } from "./typeorm-ex.module";
|
|
4
4
|
import { sanatizeTypeOrmOptions } from "./typeorm-utils";
|
|
5
|
-
export { TypeOrmExModule, DEFAULT_DATA_SOURCE_NAME, defaultExtraOptions, defaultMysqlExtraOptions, defaultMongoExtraOptions, SupportedConnectionType, sanatizeTypeOrmOptions, BaseTypeOrmModuleOptionFactory, };
|
|
5
|
+
export { TypeOrmExModule, DEFAULT_DATA_SOURCE_NAME, defaultExtraOptions, defaultMysqlExtraOptions, defaultMongoExtraOptions, SupportedConnectionType, sanatizeTypeOrmOptions, BaseTypeOrmModuleOptionFactory, OptionWithoutEntities, };
|
|
@@ -10,6 +10,8 @@ export declare const sanatizeTypeOrmOptions: (connectionType: SupportedConnectio
|
|
|
10
10
|
} & {
|
|
11
11
|
supportBigNumbers: boolean;
|
|
12
12
|
bigNumberStrings: boolean;
|
|
13
|
+
} & {
|
|
14
|
+
type: SupportedConnectionType;
|
|
13
15
|
} & OptionWithoutEntities) | ({
|
|
14
16
|
entities: any[];
|
|
15
17
|
logging: boolean;
|
|
@@ -19,4 +21,6 @@ export declare const sanatizeTypeOrmOptions: (connectionType: SupportedConnectio
|
|
|
19
21
|
} & {
|
|
20
22
|
useNewUrlParser: boolean;
|
|
21
23
|
useUnifiedTopology: boolean;
|
|
24
|
+
} & {
|
|
25
|
+
type: SupportedConnectionType;
|
|
22
26
|
} & OptionWithoutEntities);
|
|
@@ -3,12 +3,13 @@ Object.defineProperty(exports, "__esModule", { value: true });
|
|
|
3
3
|
exports.sanatizeTypeOrmOptions = void 0;
|
|
4
4
|
const constants_1 = require("./constants");
|
|
5
5
|
const sanatizeTypeOrmOptions = (connectionType, options) => {
|
|
6
|
+
const dbType = { type: connectionType };
|
|
6
7
|
switch (connectionType) {
|
|
7
8
|
case "mysql":
|
|
8
9
|
case "mariadb":
|
|
9
|
-
return Object.assign(constants_1.defaultExtraOptions, constants_1.defaultMysqlExtraOptions, options);
|
|
10
|
+
return Object.assign(constants_1.defaultExtraOptions, constants_1.defaultMysqlExtraOptions, dbType, options);
|
|
10
11
|
case "mongodb":
|
|
11
|
-
return Object.assign(constants_1.defaultExtraOptions, constants_1.defaultMongoExtraOptions, options);
|
|
12
|
+
return Object.assign(constants_1.defaultExtraOptions, constants_1.defaultMongoExtraOptions, dbType, options);
|
|
12
13
|
}
|
|
13
14
|
};
|
|
14
15
|
exports.sanatizeTypeOrmOptions = sanatizeTypeOrmOptions;
|
package/package.json
CHANGED
|
@@ -1,28 +1,33 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@nathapp/nestjs-data",
|
|
3
|
-
"version": "1.0.0-rc.
|
|
3
|
+
"version": "1.0.0-rc.8",
|
|
4
4
|
"description": "@nathapp/nestjs-data",
|
|
5
5
|
"scripts": {
|
|
6
6
|
"build": "rimraf dist && tsc -p tsconfig.json",
|
|
7
7
|
"precommit": "lint-staged",
|
|
8
|
-
"test": "jest",
|
|
9
|
-
"test:
|
|
10
|
-
"test:
|
|
11
|
-
"test:e2e": "jest --config ./test/jest-e2e.json",
|
|
8
|
+
"test": "jest --config ./test/jest-test.json",
|
|
9
|
+
"test:cov": "jest --config ./test/jest-test.json --coverage",
|
|
10
|
+
"test:watch": "jest --config ./test/jest-test.json --watch",
|
|
12
11
|
"lint": "eslint -c .eslintrc.js"
|
|
13
12
|
},
|
|
14
13
|
"author": "",
|
|
15
14
|
"license": "ISC",
|
|
16
15
|
"devDependencies": {
|
|
16
|
+
"@golevelup/ts-jest": "^0.3.7",
|
|
17
17
|
"@nestjs/platform-express": "^9.0.0",
|
|
18
18
|
"@nestjs/platform-fastify": "^9.0.0",
|
|
19
|
+
"@nestjs/testing": "^9.4.3",
|
|
20
|
+
"@types/jest": "^29.5.2",
|
|
19
21
|
"@types/node": "^17.0.22",
|
|
20
22
|
"@typescript-eslint/eslint-plugin": "^4",
|
|
21
23
|
"@typescript-eslint/parser": "^4",
|
|
22
24
|
"eslint": "*",
|
|
23
25
|
"eslint-config-prettier": "^6",
|
|
24
26
|
"eslint-plugin-prettier": "^3",
|
|
27
|
+
"jest": "^29.5.0",
|
|
25
28
|
"prettier": "^2",
|
|
29
|
+
"supertest": "^6.3.3",
|
|
30
|
+
"ts-jest": "^29.1.0",
|
|
26
31
|
"typescript": "^4"
|
|
27
32
|
},
|
|
28
33
|
"types": "./index.d.ts",
|