@onivoro/server-typeorm-postgres 0.1.27 → 0.1.28
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/cjs/lib/functions/data-source-config-factory.function.js +3 -3
- package/dist/cjs/lib/functions/data-source-factory.function.d.ts +2 -8
- package/dist/cjs/lib/types/data-source-options.interface.d.ts +1 -0
- package/dist/esm/lib/functions/data-source-config-factory.function.js +3 -3
- package/dist/esm/lib/functions/data-source-factory.function.d.ts +2 -8
- package/dist/esm/lib/types/data-source-options.interface.d.ts +1 -0
- package/dist/types/lib/functions/data-source-factory.function.d.ts +2 -8
- package/dist/types/lib/types/data-source-options.interface.d.ts +1 -0
- package/package.json +1 -1
|
@@ -3,15 +3,15 @@ Object.defineProperty(exports, "__esModule", { value: true });
|
|
|
3
3
|
exports.dataSourceConfigFactory = void 0;
|
|
4
4
|
const typeorm_naming_strategies_1 = require("typeorm-naming-strategies");
|
|
5
5
|
function dataSourceConfigFactory(name, options, entities) {
|
|
6
|
-
const { database, host, password, port, username, synchronize = false, logging = false } = options;
|
|
6
|
+
const { ca, database, host, password, port, username, synchronize = false, logging = false } = options;
|
|
7
7
|
const config = {
|
|
8
8
|
name,
|
|
9
|
-
autoLoadEntities: true,
|
|
10
9
|
type: 'postgres',
|
|
11
10
|
host,
|
|
12
|
-
port,
|
|
11
|
+
port: port,
|
|
13
12
|
username,
|
|
14
13
|
password,
|
|
14
|
+
ssl: ca ? { ca } : undefined,
|
|
15
15
|
database,
|
|
16
16
|
synchronize,
|
|
17
17
|
logging,
|
|
@@ -1,9 +1,3 @@
|
|
|
1
1
|
import { DataSource } from 'typeorm';
|
|
2
|
-
|
|
3
|
-
|
|
4
|
-
host: string;
|
|
5
|
-
port: string;
|
|
6
|
-
username: string;
|
|
7
|
-
password: string;
|
|
8
|
-
synchronize?: boolean;
|
|
9
|
-
}, entities: any[]) => DataSource;
|
|
2
|
+
import { IDataSourceOptions } from '../types/data-source-options.interface';
|
|
3
|
+
export declare const dataSourceFactory: (name: string, options: IDataSourceOptions, entities: any[]) => DataSource;
|
|
@@ -3,15 +3,15 @@ Object.defineProperty(exports, "__esModule", { value: true });
|
|
|
3
3
|
exports.dataSourceConfigFactory = void 0;
|
|
4
4
|
const typeorm_naming_strategies_1 = require("typeorm-naming-strategies");
|
|
5
5
|
function dataSourceConfigFactory(name, options, entities) {
|
|
6
|
-
const { database, host, password, port, username, synchronize = false, logging = false } = options;
|
|
6
|
+
const { ca, database, host, password, port, username, synchronize = false, logging = false } = options;
|
|
7
7
|
const config = {
|
|
8
8
|
name,
|
|
9
|
-
autoLoadEntities: true,
|
|
10
9
|
type: 'postgres',
|
|
11
10
|
host,
|
|
12
|
-
port,
|
|
11
|
+
port: port,
|
|
13
12
|
username,
|
|
14
13
|
password,
|
|
14
|
+
ssl: ca ? { ca } : undefined,
|
|
15
15
|
database,
|
|
16
16
|
synchronize,
|
|
17
17
|
logging,
|
|
@@ -1,9 +1,3 @@
|
|
|
1
1
|
import { DataSource } from 'typeorm';
|
|
2
|
-
|
|
3
|
-
|
|
4
|
-
host: string;
|
|
5
|
-
port: string;
|
|
6
|
-
username: string;
|
|
7
|
-
password: string;
|
|
8
|
-
synchronize?: boolean;
|
|
9
|
-
}, entities: any[]) => DataSource;
|
|
2
|
+
import { IDataSourceOptions } from '../types/data-source-options.interface';
|
|
3
|
+
export declare const dataSourceFactory: (name: string, options: IDataSourceOptions, entities: any[]) => DataSource;
|
|
@@ -1,9 +1,3 @@
|
|
|
1
1
|
import { DataSource } from 'typeorm';
|
|
2
|
-
|
|
3
|
-
|
|
4
|
-
host: string;
|
|
5
|
-
port: string;
|
|
6
|
-
username: string;
|
|
7
|
-
password: string;
|
|
8
|
-
synchronize?: boolean;
|
|
9
|
-
}, entities: any[]) => DataSource;
|
|
2
|
+
import { IDataSourceOptions } from '../types/data-source-options.interface';
|
|
3
|
+
export declare const dataSourceFactory: (name: string, options: IDataSourceOptions, entities: any[]) => DataSource;
|