@onivoro/server-typeorm-postgres 0.1.0 → 0.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/package.json +2 -2
- package/src/lib/decorators/table.decorator.js +2 -2
- package/src/lib/decorators/table.decorator.js.map +1 -1
- package/src/lib/server-typeorm-postgres.module.d.ts +1 -1
- package/src/lib/server-typeorm-postgres.module.js +7 -7
- package/src/lib/server-typeorm-postgres.module.js.map +1 -1
package/package.json
CHANGED
|
@@ -1,15 +1,15 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@onivoro/server-typeorm-postgres",
|
|
3
|
-
"version": "0.1.
|
|
3
|
+
"version": "0.1.2",
|
|
4
4
|
"dependencies": {
|
|
5
5
|
"@nestjs/common": "^9.3.9",
|
|
6
6
|
"@nestjs/swagger": "^6.2.1",
|
|
7
|
-
"lodash.snakecase": "^4.1.1",
|
|
8
7
|
"rxjs": "^7.8.0",
|
|
9
8
|
"typeorm": "^0.3.12",
|
|
10
9
|
"typeorm-naming-strategies": "^4.1.0"
|
|
11
10
|
},
|
|
12
11
|
"peerDependencies": {
|
|
12
|
+
"@onivoro/isomorphic-common": "0.0.1",
|
|
13
13
|
"tslib": "^2.3.0"
|
|
14
14
|
},
|
|
15
15
|
"main": "./src/index.js",
|
|
@@ -3,9 +3,9 @@ Object.defineProperty(exports, "__esModule", { value: true });
|
|
|
3
3
|
exports.Table = void 0;
|
|
4
4
|
const common_1 = require("@nestjs/common");
|
|
5
5
|
const typeorm_1 = require("typeorm");
|
|
6
|
-
const
|
|
6
|
+
const isomorphic_common_1 = require("@onivoro/isomorphic-common");
|
|
7
7
|
const Table = (EntityClass) => {
|
|
8
|
-
const tableName = (0,
|
|
8
|
+
const tableName = (0, isomorphic_common_1.snakeCase)(EntityClass.name);
|
|
9
9
|
return (0, common_1.applyDecorators)((0, typeorm_1.Entity)(tableName));
|
|
10
10
|
};
|
|
11
11
|
exports.Table = Table;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"table.decorator.js","sourceRoot":"","sources":["../../../../../../libs/server-typeorm-postgres/src/lib/decorators/table.decorator.ts"],"names":[],"mappings":";;;AAAA,2CAAiD;AACjD,qCAAiC;AACjC,
|
|
1
|
+
{"version":3,"file":"table.decorator.js","sourceRoot":"","sources":["../../../../../../libs/server-typeorm-postgres/src/lib/decorators/table.decorator.ts"],"names":[],"mappings":";;;AAAA,2CAAiD;AACjD,qCAAiC;AACjC,kEAAuD;AAEhD,MAAM,KAAK,GAAG,CAAC,WAA6B,EAAE,EAAE;IACnD,MAAM,SAAS,GAAG,IAAA,6BAAS,EAAC,WAAW,CAAC,IAAI,CAAC,CAAC;IAC9C,OAAO,IAAA,wBAAe,EAAC,IAAA,gBAAM,EAAC,SAAS,CAAC,CAAC,CAAC;AAC9C,CAAC,CAAC;AAHW,QAAA,KAAK,SAGhB"}
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import { DynamicModule } from '@nestjs/common';
|
|
2
2
|
import { IDataSourceOptions } from './types/data-source-options.interface';
|
|
3
|
-
export declare class
|
|
3
|
+
export declare class ServerTypeormPostgresModule {
|
|
4
4
|
static configure(injectables: any[], entities: any[], options: IDataSourceOptions, name?: string): DynamicModule;
|
|
5
5
|
}
|
|
@@ -1,13 +1,13 @@
|
|
|
1
1
|
"use strict";
|
|
2
|
-
var
|
|
2
|
+
var ServerTypeormPostgresModule_1;
|
|
3
3
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
4
|
-
exports.
|
|
4
|
+
exports.ServerTypeormPostgresModule = void 0;
|
|
5
5
|
const tslib_1 = require("tslib");
|
|
6
6
|
const common_1 = require("@nestjs/common");
|
|
7
7
|
const typeorm_1 = require("typeorm");
|
|
8
8
|
const data_source_factory_function_1 = require("./functions/data-source-factory.function");
|
|
9
9
|
const dataSourceMap = new Map();
|
|
10
|
-
let
|
|
10
|
+
let ServerTypeormPostgresModule = ServerTypeormPostgresModule_1 = class ServerTypeormPostgresModule {
|
|
11
11
|
static configure(injectables, entities, options, name = 'default') {
|
|
12
12
|
const providers = [
|
|
13
13
|
{
|
|
@@ -32,14 +32,14 @@ let ServerTypeormPostgres = ServerTypeormPostgres_1 = class ServerTypeormPostgre
|
|
|
32
32
|
...injectables,
|
|
33
33
|
];
|
|
34
34
|
return {
|
|
35
|
-
module:
|
|
35
|
+
module: ServerTypeormPostgresModule_1,
|
|
36
36
|
exports: providers,
|
|
37
37
|
providers,
|
|
38
38
|
};
|
|
39
39
|
}
|
|
40
40
|
};
|
|
41
|
-
|
|
41
|
+
ServerTypeormPostgresModule = ServerTypeormPostgresModule_1 = tslib_1.__decorate([
|
|
42
42
|
(0, common_1.Module)({})
|
|
43
|
-
],
|
|
44
|
-
exports.
|
|
43
|
+
], ServerTypeormPostgresModule);
|
|
44
|
+
exports.ServerTypeormPostgresModule = ServerTypeormPostgresModule;
|
|
45
45
|
//# sourceMappingURL=server-typeorm-postgres.module.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"server-typeorm-postgres.module.js","sourceRoot":"","sources":["../../../../../libs/server-typeorm-postgres/src/lib/server-typeorm-postgres.module.ts"],"names":[],"mappings":";;;;;AAAA,2CAAuD;AACvD,qCAAoD;AACpD,2FAA6E;AAG7E,MAAM,aAAa,GAAG,IAAI,GAAG,EAAE,CAAC;AAGzB,IAAM,
|
|
1
|
+
{"version":3,"file":"server-typeorm-postgres.module.js","sourceRoot":"","sources":["../../../../../libs/server-typeorm-postgres/src/lib/server-typeorm-postgres.module.ts"],"names":[],"mappings":";;;;;AAAA,2CAAuD;AACvD,qCAAoD;AACpD,2FAA6E;AAG7E,MAAM,aAAa,GAAG,IAAI,GAAG,EAAE,CAAC;AAGzB,IAAM,2BAA2B,mCAAjC,MAAM,2BAA2B;IACtC,MAAM,CAAC,SAAS,CACd,WAAkB,EAClB,QAAe,EACf,OAA2B,EAC3B,IAAI,GAAG,SAAS;QAEhB,MAAM,SAAS,GAAG;YAChB;gBACE,OAAO,EAAE,oBAAU;gBACnB,UAAU,EAAE,GAAS,EAAE;oBACrB,MAAM,gBAAgB,GAAG,aAAa,CAAC,GAAG,CAAC,IAAI,CAAC,CAAC;oBACjD,IAAI,CAAC,gBAAgB,EAAE;wBACrB,MAAM,UAAU,GAAe,IAAA,gDAAiB,EAAC,IAAI,EAAE,OAAO,EAAE,QAAQ,CAAC,CAAC;wBAC1E,MAAM,UAAU,CAAC,UAAU,EAAE,CAAC;wBAC9B,aAAa,CAAC,GAAG,CAAC,IAAI,EAAE,UAAU,CAAC,CAAC;qBACrC;oBACD,OAAO,aAAa,CAAC,GAAG,CAAC,IAAI,CAAC,CAAC;gBACjC,CAAC,CAAA;aACF;YACD;gBACE,OAAO,EAAE,uBAAa;gBACtB,UAAU,EAAE,CAAC,UAAsB,EAAE,EAAE;oBACrC,OAAO,UAAU,CAAC,OAAO,CAAC;gBAC5B,CAAC;gBACD,MAAM,EAAE,CAAC,oBAAU,CAAC;aACrB;YACD,GAAG,WAAW;SACf,CAAC;QACF,OAAO;YACL,MAAM,EAAE,6BAA2B;YACnC,OAAO,EAAE,SAAS;YAClB,SAAS;SACV,CAAC;IACJ,CAAC;CACF,CAAA;AAnCY,2BAA2B;IADvC,IAAA,eAAM,EAAC,EAAE,CAAC;GACE,2BAA2B,CAmCvC;AAnCY,kEAA2B"}
|