ffc-pay-etl-framework 1.1.0-alpha.3 → 1.1.0-alpha.6

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.
@@ -108,6 +108,7 @@ function PostgresDestination(options) {
108
108
  }
109
109
  });
110
110
  Object.assign(Transform.prototype, {
111
+ type: 'PostgresDestination',
111
112
  setConnection: function (connection) {
112
113
  this.connection = connection;
113
114
  }.bind(transform),
@@ -3,6 +3,7 @@ const EventEmitter = require('node:events');
3
3
  const util = require('node:util');
4
4
  const { RowMetaData } = require("./rowMetaData");
5
5
  const { compose } = require("node:stream");
6
+ const { Destinations } = require('..');
6
7
  /**
7
8
  * @typedef {Object} Etl
8
9
  * @function loader
@@ -65,6 +66,9 @@ function Etl() {
65
66
  if (connection) {
66
67
  destination.setConnection(connection);
67
68
  }
69
+ else if (destination.type === 'PostgresDestination') {
70
+ throw new Error(`No connection could be found with name ${connectionname}`);
71
+ }
68
72
  if (tasks) {
69
73
  for (const task of tasks) {
70
74
  task.setETL(self);
@@ -1 +1 @@
1
- {"version":3,"file":"postgresDestination.d.ts","sourceRoot":"","sources":["../../../../src/destinations/postgresDestination.js"],"names":[],"mappings":"AAyDA;;;;;;;;GAQG;AACH;IAN2B,KAAK;IACL,cAAc;IACd,OAAO;IACP,aAAa;cA+DvC;AAxGD,yFAiCC;AAlDD,gDAEC;AAED,oEAGC;AAED,2DAEC;AAED,uDAEC"}
1
+ {"version":3,"file":"postgresDestination.d.ts","sourceRoot":"","sources":["../../../../src/destinations/postgresDestination.js"],"names":[],"mappings":"AAyDA;;;;;;;;GAQG;AACH;IAN2B,KAAK;IACL,cAAc;IACd,OAAO;IACP,aAAa;cAgEvC;AAzGD,yFAiCC;AAlDD,gDAEC;AAED,oEAGC;AAED,2DAEC;AAED,uDAEC"}
@@ -1 +1 @@
1
- {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../../src/lib/index.js"],"names":[],"mappings":";AAMA;;;;;;;;GAQG;AAEH;;;GAGG;AACH,4BA+EC;;IA5EG,aAAe;IACf,qBAAuB;IACvB,sBAAwB;IACxB,qBAAuB;IACvB,0BAA4B;IAC5B,uBAAyB;IAEzB,6BAGC;IAED,gBAgBC;IAED,sCAUC;IAED,qCAGC;IAED,mCAGC;IAED,wDAgBC;IAED,mCAGC"}
1
+ {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../../src/lib/index.js"],"names":[],"mappings":";AAOA;;;;;;;;GAQG;AAEH;;;GAGG;AACH,4BAgFC;;IA7EG,aAAe;IACf,qBAAuB;IACvB,sBAAwB;IACxB,qBAAuB;IACvB,0BAA4B;IAC5B,uBAAyB;IAEzB,6BAGC;IAED,gBAgBC;IAED,sCAUC;IAED,qCAGC;IAED,mCAGC;IAED,wDAiBC;IAED,mCAGC"}
@@ -109,6 +109,7 @@ function PostgresDestination(options) {
109
109
  }
110
110
  });
111
111
  Object.assign(Transform.prototype, {
112
+ type: 'PostgresDestination',
112
113
  setConnection: function (connection) {
113
114
  this.connection = connection;
114
115
  }.bind(transform),
@@ -5,6 +5,7 @@ const EventEmitter = require('node:events');
5
5
  const util = require('node:util');
6
6
  const { RowMetaData } = require("./rowMetaData");
7
7
  const { compose } = require("node:stream");
8
+ const { Destinations } = require('..');
8
9
  /**
9
10
  * @typedef {Object} Etl
10
11
  * @function loader
@@ -67,6 +68,9 @@ function Etl() {
67
68
  if (connection) {
68
69
  destination.setConnection(connection);
69
70
  }
71
+ else if (destination.type === 'PostgresDestination') {
72
+ throw new Error(`No connection could be found with name ${connectionname}`);
73
+ }
70
74
  if (tasks) {
71
75
  for (const task of tasks) {
72
76
  task.setETL(self);
@@ -1 +1 @@
1
- {"version":3,"file":"postgresDestination.d.ts","sourceRoot":"","sources":["../../../../src/destinations/postgresDestination.js"],"names":[],"mappings":"AAyDA;;;;;;;;GAQG;AACH;IAN2B,KAAK;IACL,cAAc;IACd,OAAO;IACP,aAAa;cA+DvC;AAxGD,yFAiCC;AAlDD,gDAEC;AAED,oEAGC;AAED,2DAEC;AAED,uDAEC"}
1
+ {"version":3,"file":"postgresDestination.d.ts","sourceRoot":"","sources":["../../../../src/destinations/postgresDestination.js"],"names":[],"mappings":"AAyDA;;;;;;;;GAQG;AACH;IAN2B,KAAK;IACL,cAAc;IACd,OAAO;IACP,aAAa;cAgEvC;AAzGD,yFAiCC;AAlDD,gDAEC;AAED,oEAGC;AAED,2DAEC;AAED,uDAEC"}
@@ -1 +1 @@
1
- {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../../src/lib/index.js"],"names":[],"mappings":";AAMA;;;;;;;;GAQG;AAEH;;;GAGG;AACH,4BA+EC;;IA5EG,aAAe;IACf,qBAAuB;IACvB,sBAAwB;IACxB,qBAAuB;IACvB,0BAA4B;IAC5B,uBAAyB;IAEzB,6BAGC;IAED,gBAgBC;IAED,sCAUC;IAED,qCAGC;IAED,mCAGC;IAED,wDAgBC;IAED,mCAGC"}
1
+ {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../../src/lib/index.js"],"names":[],"mappings":";AAOA;;;;;;;;GAQG;AAEH;;;GAGG;AACH,4BAgFC;;IA7EG,aAAe;IACf,qBAAuB;IACvB,sBAAwB;IACxB,qBAAuB;IACvB,0BAA4B;IAC5B,uBAAyB;IAEzB,6BAGC;IAED,gBAgBC;IAED,sCAUC;IAED,qCAGC;IAED,mCAGC;IAED,wDAiBC;IAED,mCAGC"}
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "ffc-pay-etl-framework",
3
- "version": "1.1.0-alpha.3",
3
+ "version": "1.1.0-alpha.6",
4
4
  "publisher": "Defra",
5
5
  "main": "dist/cjs/index.js",
6
6
  "private": false,