ffc-pay-etl-framework 0.0.4 → 0.0.5-alpha.3

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.
@@ -1,5 +1,6 @@
1
1
  const { Transform } = require("node:stream");
2
2
  const { Sequelize } = require('sequelize');
3
+ const DEFAULT_PORT = 5432;
3
4
  /**
4
5
  *
5
6
  * @param {Object} options
@@ -8,6 +9,7 @@ const { Sequelize } = require('sequelize');
8
9
  * @param {Object} options.password
9
10
  * @param {Object} options.database
10
11
  * @param {Object} options.host
12
+ * @param {Object} options.port
11
13
  * @param {Object} options.mapping
12
14
  * @param {Object} options.includeErrors
13
15
  * @returns Transform
@@ -18,10 +20,12 @@ function PostgresDestination(options) {
18
20
  const password = options.password;
19
21
  const database = options.database;
20
22
  const host = options.host;
23
+ const port = options.port || DEFAULT_PORT;
21
24
  const mapping = options.mapping;
22
25
  const includeErrors = options.includeErrors;
23
26
  const sequelize = new Sequelize(database, username, password, {
24
27
  host: host,
28
+ port: port,
25
29
  dialect: 'postgres',
26
30
  logging: false
27
31
  });
@@ -6,6 +6,7 @@
6
6
  * @param {Object} options.password
7
7
  * @param {Object} options.database
8
8
  * @param {Object} options.host
9
+ * @param {Object} options.port
9
10
  * @param {Object} options.mapping
10
11
  * @param {Object} options.includeErrors
11
12
  * @returns Transform
@@ -16,6 +17,7 @@ export function PostgresDestination(options: {
16
17
  password: any;
17
18
  database: any;
18
19
  host: any;
20
+ port: any;
19
21
  mapping: any;
20
22
  includeErrors: any;
21
23
  }): Transform;
@@ -1 +1 @@
1
- {"version":3,"file":"postgresDestination.d.ts","sourceRoot":"","sources":["../../../../src/destinations/postgresDestination.js"],"names":[],"mappings":"AAGA;;;;;;;;;;;GAWG;AACH,6CATG;IAAwB,KAAK;IACL,QAAQ;IACR,QAAQ;IACR,QAAQ;IACR,IAAI;IACJ,OAAO;IACP,aAAa;CACrC,aAuDF"}
1
+ {"version":3,"file":"postgresDestination.d.ts","sourceRoot":"","sources":["../../../../src/destinations/postgresDestination.js"],"names":[],"mappings":"AAIA;;;;;;;;;;;;GAYG;AACH,6CAVG;IAAwB,KAAK;IACL,QAAQ;IACR,QAAQ;IACR,QAAQ;IACR,IAAI;IACJ,IAAI;IACJ,OAAO;IACP,aAAa;CACrC,aAyDF"}
@@ -1,6 +1,7 @@
1
1
  "use strict";
2
2
  const { Transform } = require("node:stream");
3
3
  const { Sequelize } = require('sequelize');
4
+ const DEFAULT_PORT = 5432;
4
5
  /**
5
6
  *
6
7
  * @param {Object} options
@@ -9,6 +10,7 @@ const { Sequelize } = require('sequelize');
9
10
  * @param {Object} options.password
10
11
  * @param {Object} options.database
11
12
  * @param {Object} options.host
13
+ * @param {Object} options.port
12
14
  * @param {Object} options.mapping
13
15
  * @param {Object} options.includeErrors
14
16
  * @returns Transform
@@ -19,10 +21,12 @@ function PostgresDestination(options) {
19
21
  const password = options.password;
20
22
  const database = options.database;
21
23
  const host = options.host;
24
+ const port = options.port || DEFAULT_PORT;
22
25
  const mapping = options.mapping;
23
26
  const includeErrors = options.includeErrors;
24
27
  const sequelize = new Sequelize(database, username, password, {
25
28
  host: host,
29
+ port: port,
26
30
  dialect: 'postgres',
27
31
  logging: false
28
32
  });
@@ -6,6 +6,7 @@
6
6
  * @param {Object} options.password
7
7
  * @param {Object} options.database
8
8
  * @param {Object} options.host
9
+ * @param {Object} options.port
9
10
  * @param {Object} options.mapping
10
11
  * @param {Object} options.includeErrors
11
12
  * @returns Transform
@@ -16,6 +17,7 @@ export function PostgresDestination(options: {
16
17
  password: any;
17
18
  database: any;
18
19
  host: any;
20
+ port: any;
19
21
  mapping: any;
20
22
  includeErrors: any;
21
23
  }): Transform;
@@ -1 +1 @@
1
- {"version":3,"file":"postgresDestination.d.ts","sourceRoot":"","sources":["../../../../src/destinations/postgresDestination.js"],"names":[],"mappings":"AAGA;;;;;;;;;;;GAWG;AACH,6CATG;IAAwB,KAAK;IACL,QAAQ;IACR,QAAQ;IACR,QAAQ;IACR,IAAI;IACJ,OAAO;IACP,aAAa;CACrC,aAuDF"}
1
+ {"version":3,"file":"postgresDestination.d.ts","sourceRoot":"","sources":["../../../../src/destinations/postgresDestination.js"],"names":[],"mappings":"AAIA;;;;;;;;;;;;GAYG;AACH,6CAVG;IAAwB,KAAK;IACL,QAAQ;IACR,QAAQ;IACR,QAAQ;IACR,IAAI;IACJ,IAAI;IACJ,OAAO;IACP,aAAa;CACrC,aAyDF"}
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "ffc-pay-etl-framework",
3
- "version": "0.0.4",
3
+ "version": "0.0.5-alpha.3",
4
4
  "publisher": "Defra",
5
5
  "main": "dist/cjs/index.js",
6
6
  "private": false,