@flusys/nestjs-shared 5.3.0 → 5.3.1

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.
@@ -2,9 +2,17 @@
2
2
  Object.defineProperty(exports, "__esModule", {
3
3
  value: true
4
4
  });
5
- Object.defineProperty(exports, "getJsonColumnType", {
6
- enumerable: true,
7
- get: function() {
5
+ function _export(target, all) {
6
+ for(var name in all)Object.defineProperty(target, name, {
7
+ enumerable: true,
8
+ get: Object.getOwnPropertyDescriptor(all, name).get
9
+ });
10
+ }
11
+ _export(exports, {
12
+ get getCastIntType () {
13
+ return getCastIntType;
14
+ },
15
+ get getJsonColumnType () {
8
16
  return getJsonColumnType;
9
17
  }
10
18
  });
@@ -15,3 +23,7 @@ function getJsonColumnType() {
15
23
  if (driver === 'mysql') return 'json';
16
24
  return 'simple-json';
17
25
  }
26
+ function getCastIntType() {
27
+ const driver = _nestjscore.envConfig.getTypeOrmConfig().type;
28
+ return driver === 'postgres' ? 'INTEGER' : 'UNSIGNED';
29
+ }
@@ -1 +1,2 @@
1
1
  export declare function getJsonColumnType(): "simple-json" | "json" | "jsonb";
2
+ export declare function getCastIntType(): string;
@@ -5,3 +5,7 @@ export function getJsonColumnType() {
5
5
  if (driver === 'mysql') return 'json';
6
6
  return 'simple-json';
7
7
  }
8
+ export function getCastIntType() {
9
+ const driver = envConfig.getTypeOrmConfig().type;
10
+ return driver === 'postgres' ? 'INTEGER' : 'UNSIGNED';
11
+ }
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@flusys/nestjs-shared",
3
- "version": "5.3.0",
3
+ "version": "5.3.1",
4
4
  "description": "Common shared utilities for Flusys NestJS applications",
5
5
  "main": "cjs/index.js",
6
6
  "module": "fesm/index.js",
@@ -112,6 +112,6 @@
112
112
  "rxjs": "^7.8.0"
113
113
  },
114
114
  "dependencies": {
115
- "@flusys/nestjs-core": "5.3.0"
115
+ "@flusys/nestjs-core": "5.3.1"
116
116
  }
117
117
  }