ffc-pay-etl-framework 1.1.0-alpha.9 → 1.1.0
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/index.js
CHANGED
|
@@ -63,12 +63,12 @@ function Etl() {
|
|
|
63
63
|
this.destination = (destination, ...tasks) => {
|
|
64
64
|
const connectionname = destination.getConnectionName();
|
|
65
65
|
const connection = this.connectionList.filter(c => c.name === connectionname)[0];
|
|
66
|
-
if (connection) {
|
|
67
|
-
destination.setConnection(connection);
|
|
68
|
-
}
|
|
69
|
-
else if (destination.type === 'PostgresDestination') {
|
|
66
|
+
if (!connection && destination.type === 'PostgresDestination') {
|
|
70
67
|
throw new Error(`No connection could be found with name ${connectionname}`);
|
|
71
68
|
}
|
|
69
|
+
else {
|
|
70
|
+
destination.setConnection(connection);
|
|
71
|
+
}
|
|
72
72
|
if (tasks) {
|
|
73
73
|
for (const task of tasks) {
|
|
74
74
|
task.setETL(self);
|
package/dist/esm/lib/index.js
CHANGED
|
@@ -65,12 +65,12 @@ function Etl() {
|
|
|
65
65
|
this.destination = (destination, ...tasks) => {
|
|
66
66
|
const connectionname = destination.getConnectionName();
|
|
67
67
|
const connection = this.connectionList.filter(c => c.name === connectionname)[0];
|
|
68
|
-
if (connection) {
|
|
69
|
-
destination.setConnection(connection);
|
|
70
|
-
}
|
|
71
|
-
else if (destination.type === 'PostgresDestination') {
|
|
68
|
+
if (!connection && destination.type === 'PostgresDestination') {
|
|
72
69
|
throw new Error(`No connection could be found with name ${connectionname}`);
|
|
73
70
|
}
|
|
71
|
+
else {
|
|
72
|
+
destination.setConnection(connection);
|
|
73
|
+
}
|
|
74
74
|
if (tasks) {
|
|
75
75
|
for (const task of tasks) {
|
|
76
76
|
task.setETL(self);
|