ffc-pay-etl-framework 0.0.11 → 0.1.12
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/destinations/postgresDestination.js +1 -1
- package/dist/cjs/transformers/index.js +2 -0
- package/dist/cjs/transformers/stringReplaceTransformer.js +27 -0
- package/dist/cjs/types/destinations/consoleDestination.d.ts.map +1 -1
- package/dist/cjs/types/destinations/csvFileDestination.d.ts.map +1 -1
- package/dist/cjs/types/destinations/postgresDestination.d.ts.map +1 -1
- package/dist/cjs/types/destinations/sqlFileDestination.d.ts +2 -2
- package/dist/cjs/types/destinations/sqlFileDestination.d.ts.map +1 -1
- package/dist/cjs/types/lib/index.d.ts +5 -5
- package/dist/cjs/types/lib/index.d.ts.map +1 -1
- package/dist/cjs/types/loaders/csvloader.d.ts +1 -0
- package/dist/cjs/types/loaders/csvloader.d.ts.map +1 -1
- package/dist/cjs/types/transformers/fakerTransformer.d.ts.map +1 -1
- package/dist/cjs/types/transformers/index.d.ts +2 -1
- package/dist/cjs/types/transformers/stringReplaceTransformer.d.ts +25 -0
- package/dist/cjs/types/transformers/stringReplaceTransformer.d.ts.map +1 -0
- package/dist/cjs/types/transformers/toUpperCaseTransformer.d.ts.map +1 -1
- package/dist/cjs/types/validators/multiToolValidator.d.ts.map +1 -1
- package/dist/cjs/types/validators/requiredValidator.d.ts.map +1 -1
- package/dist/cjs/types/validators/uniqueValidator.d.ts.map +1 -1
- package/dist/esm/destinations/consoleDestination.js +1 -0
- package/dist/esm/destinations/csvFileDestination.js +1 -0
- package/dist/esm/destinations/index.js +1 -0
- package/dist/esm/destinations/postgresDestination.js +2 -1
- package/dist/esm/destinations/sqlFileDestination.js +1 -0
- package/dist/esm/index.mjs +1 -0
- package/dist/esm/lib/index.js +1 -0
- package/dist/esm/lib/rowMetaData.js +1 -0
- package/dist/esm/loaders/csvloader.js +1 -0
- package/dist/esm/loaders/index.js +1 -0
- package/dist/esm/transformers/fakerTransformer.js +1 -0
- package/dist/esm/transformers/index.js +3 -0
- package/dist/esm/transformers/stringReplaceTransformer.js +29 -0
- package/dist/esm/transformers/toUpperCaseTransformer.js +1 -0
- package/dist/esm/types/destinations/consoleDestination.d.ts.map +1 -1
- package/dist/esm/types/destinations/csvFileDestination.d.ts.map +1 -1
- package/dist/esm/types/destinations/postgresDestination.d.ts.map +1 -1
- package/dist/esm/types/destinations/sqlFileDestination.d.ts +2 -2
- package/dist/esm/types/destinations/sqlFileDestination.d.ts.map +1 -1
- package/dist/esm/types/lib/index.d.ts +5 -5
- package/dist/esm/types/lib/index.d.ts.map +1 -1
- package/dist/esm/types/loaders/csvloader.d.ts +1 -0
- package/dist/esm/types/loaders/csvloader.d.ts.map +1 -1
- package/dist/esm/types/transformers/fakerTransformer.d.ts.map +1 -1
- package/dist/esm/types/transformers/index.d.ts +2 -1
- package/dist/esm/types/transformers/stringReplaceTransformer.d.ts +25 -0
- package/dist/esm/types/transformers/stringReplaceTransformer.d.ts.map +1 -0
- package/dist/esm/types/transformers/toUpperCaseTransformer.d.ts.map +1 -1
- package/dist/esm/types/validators/multiToolValidator.d.ts.map +1 -1
- package/dist/esm/types/validators/requiredValidator.d.ts.map +1 -1
- package/dist/esm/types/validators/uniqueValidator.d.ts.map +1 -1
- package/dist/esm/validators/index.js +1 -0
- package/dist/esm/validators/multiToolValidator.js +1 -0
- package/dist/esm/validators/requiredValidator.js +1 -0
- package/dist/esm/validators/uniqueValidator.js +1 -0
- package/package.json +32 -3
|
@@ -1,6 +1,8 @@
|
|
|
1
1
|
const { ToUpperCaseTransformer } = require("./toUpperCaseTransformer");
|
|
2
2
|
const { FakerTransformer } = require("./fakerTransformer");
|
|
3
|
+
const { StringReplaceTransformer } = require("./stringReplaceTransformer");
|
|
3
4
|
module.exports = {
|
|
5
|
+
StringReplaceTransformer,
|
|
4
6
|
ToUpperCaseTransformer,
|
|
5
7
|
FakerTransformer
|
|
6
8
|
};
|
|
@@ -0,0 +1,27 @@
|
|
|
1
|
+
const { Transform } = require("node:stream");
|
|
2
|
+
/**
|
|
3
|
+
*
|
|
4
|
+
* @param {Object} options
|
|
5
|
+
* @param {String} options.column
|
|
6
|
+
* @returns Writable
|
|
7
|
+
*/
|
|
8
|
+
function StringReplaceTransformer(options) {
|
|
9
|
+
let self = this;
|
|
10
|
+
self.replacements = options;
|
|
11
|
+
return new Transform({
|
|
12
|
+
readableObjectMode: true,
|
|
13
|
+
writableObjectMode: true,
|
|
14
|
+
transform(chunk, _, callback) {
|
|
15
|
+
const { _columns } = chunk;
|
|
16
|
+
// @ts-ignore
|
|
17
|
+
self.replacements.forEach(r => {
|
|
18
|
+
const colIndex = _columns.indexOf(r.column);
|
|
19
|
+
chunk[colIndex] = chunk[colIndex].replace(r.find, r.replace);
|
|
20
|
+
});
|
|
21
|
+
callback(null, chunk);
|
|
22
|
+
}
|
|
23
|
+
});
|
|
24
|
+
}
|
|
25
|
+
module.exports = {
|
|
26
|
+
StringReplaceTransformer
|
|
27
|
+
};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"consoleDestination.d.ts","sourceRoot":"","sources":["../../../../src/destinations/consoleDestination.js"],"names":[],"mappings":"AAEA;;;;;GAKG;AACH
|
|
1
|
+
{"version":3,"file":"consoleDestination.d.ts","sourceRoot":"","sources":["../../../../src/destinations/consoleDestination.js"],"names":[],"mappings":"AAEA;;;;;GAKG;AACH;IAH2B,aAAa;aAavC"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"csvFileDestination.d.ts","sourceRoot":"","sources":["../../../../src/destinations/csvFileDestination.js"],"names":[],"mappings":"AAKA;;;;;;;;GAQG;AACH
|
|
1
|
+
{"version":3,"file":"csvFileDestination.d.ts","sourceRoot":"","sources":["../../../../src/destinations/csvFileDestination.js"],"names":[],"mappings":"AAKA;;;;;;;;GAQG;AACH;IAN2B,QAAQ;IACP,OAAO;IACP,aAAa;IACb,cAAc;aAyCzC"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"postgresDestination.d.ts","sourceRoot":"","sources":["../../../../src/destinations/postgresDestination.js"],"names":[],"mappings":"AAMA;;;;;;;;;;;;GAYG;AACH
|
|
1
|
+
{"version":3,"file":"postgresDestination.d.ts","sourceRoot":"","sources":["../../../../src/destinations/postgresDestination.js"],"names":[],"mappings":"AAMA;;;;;;;;;;;;GAYG;AACH;IAV2B,KAAK;IACL,QAAQ;IACR,QAAQ;IACR,QAAQ;IACR,IAAI;IACJ,IAAI;IACJ,OAAO;IACP,aAAa;cAqGvC"}
|
|
@@ -17,8 +17,8 @@ export function SQLFileDestination(options: {
|
|
|
17
17
|
}): Writable;
|
|
18
18
|
export type SQL_MODE = number;
|
|
19
19
|
export namespace SQL_MODE {
|
|
20
|
-
|
|
21
|
-
|
|
20
|
+
const INSERT_MODE: number;
|
|
21
|
+
const UPDATE_MODE: number;
|
|
22
22
|
}
|
|
23
23
|
import { Writable } from "stream";
|
|
24
24
|
//# sourceMappingURL=sqlFileDestination.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"sqlFileDestination.d.ts","sourceRoot":"","sources":["../../../../src/destinations/sqlFileDestination.js"],"names":[],"mappings":"AAWA;;;;;;;;;GASG;AACH
|
|
1
|
+
{"version":3,"file":"sqlFileDestination.d.ts","sourceRoot":"","sources":["../../../../src/destinations/sqlFileDestination.js"],"names":[],"mappings":"AAWA;;;;;;;;;GASG;AACH;IAP2B,QAAQ;IACN,IAAI,EAAtB,QAAQ;IACQ,KAAK;IACN,OAAO;IACL,aAAa;aA6CxC;uBA3DS,MAAM"}
|
|
@@ -16,10 +16,10 @@ export class Etl {
|
|
|
16
16
|
validatorList: any[];
|
|
17
17
|
transformationList: any[];
|
|
18
18
|
destinationList: any[];
|
|
19
|
-
loader: (loader: any) =>
|
|
20
|
-
pump: () =>
|
|
21
|
-
validator: (validator: any) =>
|
|
22
|
-
destination: (destination: any) =>
|
|
23
|
-
transform: (transform: any) =>
|
|
19
|
+
loader: (loader: any) => Etl;
|
|
20
|
+
pump: () => Etl;
|
|
21
|
+
validator: (validator: any) => Etl;
|
|
22
|
+
destination: (destination: any) => Etl;
|
|
23
|
+
transform: (transform: any) => Etl;
|
|
24
24
|
}
|
|
25
25
|
//# sourceMappingURL=index.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../../src/lib/index.js"],"names":[],"mappings":";AAMA;;;;;;;GAOG;AAEH;;;GAGG;AACH,4BA2CC;;IAxCG,qBAAuB;IACvB,0BAA4B;IAC5B,uBAAyB;IAEzB,
|
|
1
|
+
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../../src/lib/index.js"],"names":[],"mappings":";AAMA;;;;;;;GAOG;AAEH;;;GAGG;AACH,4BA2CC;;IAxCG,qBAAuB;IACvB,0BAA4B;IAC5B,uBAAyB;IAEzB,6BAGC;IAED,gBAaC;IAED,mCAGC;IAED,uCAGC;IAED,mCAGC"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"csvloader.d.ts","sourceRoot":"","sources":["../../../../src/loaders/csvloader.js"],"names":[],"mappings":"AAMA;;;;;GAKG;AACH
|
|
1
|
+
{"version":3,"file":"csvloader.d.ts","sourceRoot":"","sources":["../../../../src/loaders/csvloader.js"],"names":[],"mappings":";AAMA;;;;;GAKG;AACH;IAH2B,IAAI;kBAwB9B"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"fakerTransformer.d.ts","sourceRoot":"","sources":["../../../../src/transformers/fakerTransformer.js"],"names":[],"mappings":"AAEA;;;;;;;;;;;;;GAaG;AACH
|
|
1
|
+
{"version":3,"file":"fakerTransformer.d.ts","sourceRoot":"","sources":["../../../../src/transformers/fakerTransformer.js"],"names":[],"mappings":"AAEA;;;;;;;;;;;;;GAaG;AACH;IAX0B,OAAO;IAQN,MAAM;cA8BhC;;IAzCD;;;;;;;;;;;;;OAaG;IACH;QAX0B,OAAO;QAQN,MAAM;OA8BhC;IAzBG,eAA8B"}
|
|
@@ -1,4 +1,5 @@
|
|
|
1
|
+
import { StringReplaceTransformer } from "./stringReplaceTransformer";
|
|
1
2
|
import { ToUpperCaseTransformer } from "./toUpperCaseTransformer";
|
|
2
3
|
import { FakerTransformer } from "./fakerTransformer";
|
|
3
|
-
export { ToUpperCaseTransformer, FakerTransformer };
|
|
4
|
+
export { StringReplaceTransformer, ToUpperCaseTransformer, FakerTransformer };
|
|
4
5
|
//# sourceMappingURL=index.d.ts.map
|
|
@@ -0,0 +1,25 @@
|
|
|
1
|
+
/**
|
|
2
|
+
*
|
|
3
|
+
* @param {Object} options
|
|
4
|
+
* @param {String} options.column
|
|
5
|
+
* @returns Writable
|
|
6
|
+
*/
|
|
7
|
+
export function StringReplaceTransformer(options: {
|
|
8
|
+
column: string;
|
|
9
|
+
}): Transform;
|
|
10
|
+
export class StringReplaceTransformer {
|
|
11
|
+
/**
|
|
12
|
+
*
|
|
13
|
+
* @param {Object} options
|
|
14
|
+
* @param {String} options.column
|
|
15
|
+
* @returns Writable
|
|
16
|
+
*/
|
|
17
|
+
constructor(options: {
|
|
18
|
+
column: string;
|
|
19
|
+
});
|
|
20
|
+
replacements: {
|
|
21
|
+
column: string;
|
|
22
|
+
};
|
|
23
|
+
}
|
|
24
|
+
import { Transform } from "stream";
|
|
25
|
+
//# sourceMappingURL=stringReplaceTransformer.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"stringReplaceTransformer.d.ts","sourceRoot":"","sources":["../../../../src/transformers/stringReplaceTransformer.js"],"names":[],"mappings":"AAEA;;;;;GAKG;AACH;IAH2B,MAAM;cAqBhC;;IAxBD;;;;;OAKG;IACH;QAH2B,MAAM;OAqBhC;IAhBG;;MAA2B"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"toUpperCaseTransformer.d.ts","sourceRoot":"","sources":["../../../../src/transformers/toUpperCaseTransformer.js"],"names":[],"mappings":"AAEA;;;;;GAKG;AACH
|
|
1
|
+
{"version":3,"file":"toUpperCaseTransformer.d.ts","sourceRoot":"","sources":["../../../../src/transformers/toUpperCaseTransformer.js"],"names":[],"mappings":"AAEA;;;;;GAKG;AACH;IAH2B,MAAM;cAiBhC;;IApBD;;;;;OAKG;IACH;QAH2B,MAAM;OAiBhC;IAZG,eAA4B"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"multiToolValidator.d.ts","sourceRoot":"","sources":["../../../../src/validators/multiToolValidator.js"],"names":[],"mappings":"AAIA;;;;;;;;;;;;;;;;;GAiBG;AACH
|
|
1
|
+
{"version":3,"file":"multiToolValidator.d.ts","sourceRoot":"","sources":["../../../../src/validators/multiToolValidator.js"],"names":[],"mappings":"AAIA;;;;;;;;;;;;;;;;;GAiBG;AACH;IAf0B,OAAO;cAsChC"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"requiredValidator.d.ts","sourceRoot":"","sources":["../../../../src/validators/requiredValidator.js"],"names":[],"mappings":"AAGA;;;;;;GAMG;AACH
|
|
1
|
+
{"version":3,"file":"requiredValidator.d.ts","sourceRoot":"","sources":["../../../../src/validators/requiredValidator.js"],"names":[],"mappings":"AAGA;;;;;;GAMG;AACH;IAJ2B,OAAO;IACR,OAAO;cAuBhC"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"uniqueValidator.d.ts","sourceRoot":"","sources":["../../../../src/validators/uniqueValidator.js"],"names":[],"mappings":"AAEA;;;;;;GAMG;AACH
|
|
1
|
+
{"version":3,"file":"uniqueValidator.d.ts","sourceRoot":"","sources":["../../../../src/validators/uniqueValidator.js"],"names":[],"mappings":"AAEA;;;;;;GAMG;AACH;IAJ2B,OAAO;IACP,MAAM;cA8BhC;;IAlCD;;;;;;OAMG;IACH;QAJ2B,OAAO;QACP,MAAM;OA8BhC;IAzBG,eAA4B;IAC5B,gBAAwF;IACxF,wBAA0B"}
|
|
@@ -1,4 +1,5 @@
|
|
|
1
1
|
"use strict";
|
|
2
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
2
3
|
const { ConsoleDestination } = require("./consoleDestination");
|
|
3
4
|
const { SQLFileDestination, SQL_MODE } = require("./sqlFileDestination");
|
|
4
5
|
const { CSVFileDestination } = require("./csvFileDestination");
|
|
@@ -1,4 +1,5 @@
|
|
|
1
1
|
"use strict";
|
|
2
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
2
3
|
const EventEmitter = require('node:events');
|
|
3
4
|
const util = require('node:util');
|
|
4
5
|
const { Transform } = require('node:stream');
|
|
@@ -104,7 +105,7 @@ function PostgresDestination(options) {
|
|
|
104
105
|
chunk.errors.push(error);
|
|
105
106
|
lastChunk = chunk;
|
|
106
107
|
// @ts-ignore
|
|
107
|
-
callback(
|
|
108
|
+
callback(error, chunk);
|
|
108
109
|
});
|
|
109
110
|
}
|
|
110
111
|
else {
|
package/dist/esm/index.mjs
CHANGED
package/dist/esm/lib/index.js
CHANGED
|
@@ -1,7 +1,10 @@
|
|
|
1
1
|
"use strict";
|
|
2
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
2
3
|
const { ToUpperCaseTransformer } = require("./toUpperCaseTransformer");
|
|
3
4
|
const { FakerTransformer } = require("./fakerTransformer");
|
|
5
|
+
const { StringReplaceTransformer } = require("./stringReplaceTransformer");
|
|
4
6
|
module.exports = {
|
|
7
|
+
StringReplaceTransformer,
|
|
5
8
|
ToUpperCaseTransformer,
|
|
6
9
|
FakerTransformer
|
|
7
10
|
};
|
|
@@ -0,0 +1,29 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
+
const { Transform } = require("node:stream");
|
|
4
|
+
/**
|
|
5
|
+
*
|
|
6
|
+
* @param {Object} options
|
|
7
|
+
* @param {String} options.column
|
|
8
|
+
* @returns Writable
|
|
9
|
+
*/
|
|
10
|
+
function StringReplaceTransformer(options) {
|
|
11
|
+
let self = this;
|
|
12
|
+
self.replacements = options;
|
|
13
|
+
return new Transform({
|
|
14
|
+
readableObjectMode: true,
|
|
15
|
+
writableObjectMode: true,
|
|
16
|
+
transform(chunk, _, callback) {
|
|
17
|
+
const { _columns } = chunk;
|
|
18
|
+
// @ts-ignore
|
|
19
|
+
self.replacements.forEach(r => {
|
|
20
|
+
const colIndex = _columns.indexOf(r.column);
|
|
21
|
+
chunk[colIndex] = chunk[colIndex].replace(r.find, r.replace);
|
|
22
|
+
});
|
|
23
|
+
callback(null, chunk);
|
|
24
|
+
}
|
|
25
|
+
});
|
|
26
|
+
}
|
|
27
|
+
module.exports = {
|
|
28
|
+
StringReplaceTransformer
|
|
29
|
+
};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"consoleDestination.d.ts","sourceRoot":"","sources":["../../../../src/destinations/consoleDestination.js"],"names":[],"mappings":"AAEA;;;;;GAKG;AACH
|
|
1
|
+
{"version":3,"file":"consoleDestination.d.ts","sourceRoot":"","sources":["../../../../src/destinations/consoleDestination.js"],"names":[],"mappings":"AAEA;;;;;GAKG;AACH;IAH2B,aAAa;aAavC"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"csvFileDestination.d.ts","sourceRoot":"","sources":["../../../../src/destinations/csvFileDestination.js"],"names":[],"mappings":"AAKA;;;;;;;;GAQG;AACH
|
|
1
|
+
{"version":3,"file":"csvFileDestination.d.ts","sourceRoot":"","sources":["../../../../src/destinations/csvFileDestination.js"],"names":[],"mappings":"AAKA;;;;;;;;GAQG;AACH;IAN2B,QAAQ;IACP,OAAO;IACP,aAAa;IACb,cAAc;aAyCzC"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"postgresDestination.d.ts","sourceRoot":"","sources":["../../../../src/destinations/postgresDestination.js"],"names":[],"mappings":"AAMA;;;;;;;;;;;;GAYG;AACH
|
|
1
|
+
{"version":3,"file":"postgresDestination.d.ts","sourceRoot":"","sources":["../../../../src/destinations/postgresDestination.js"],"names":[],"mappings":"AAMA;;;;;;;;;;;;GAYG;AACH;IAV2B,KAAK;IACL,QAAQ;IACR,QAAQ;IACR,QAAQ;IACR,IAAI;IACJ,IAAI;IACJ,OAAO;IACP,aAAa;cAqGvC"}
|
|
@@ -17,8 +17,8 @@ export function SQLFileDestination(options: {
|
|
|
17
17
|
}): Writable;
|
|
18
18
|
export type SQL_MODE = number;
|
|
19
19
|
export namespace SQL_MODE {
|
|
20
|
-
|
|
21
|
-
|
|
20
|
+
const INSERT_MODE: number;
|
|
21
|
+
const UPDATE_MODE: number;
|
|
22
22
|
}
|
|
23
23
|
import { Writable } from "stream";
|
|
24
24
|
//# sourceMappingURL=sqlFileDestination.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"sqlFileDestination.d.ts","sourceRoot":"","sources":["../../../../src/destinations/sqlFileDestination.js"],"names":[],"mappings":"AAWA;;;;;;;;;GASG;AACH
|
|
1
|
+
{"version":3,"file":"sqlFileDestination.d.ts","sourceRoot":"","sources":["../../../../src/destinations/sqlFileDestination.js"],"names":[],"mappings":"AAWA;;;;;;;;;GASG;AACH;IAP2B,QAAQ;IACN,IAAI,EAAtB,QAAQ;IACQ,KAAK;IACN,OAAO;IACL,aAAa;aA6CxC;uBA3DS,MAAM"}
|
|
@@ -16,10 +16,10 @@ export class Etl {
|
|
|
16
16
|
validatorList: any[];
|
|
17
17
|
transformationList: any[];
|
|
18
18
|
destinationList: any[];
|
|
19
|
-
loader: (loader: any) =>
|
|
20
|
-
pump: () =>
|
|
21
|
-
validator: (validator: any) =>
|
|
22
|
-
destination: (destination: any) =>
|
|
23
|
-
transform: (transform: any) =>
|
|
19
|
+
loader: (loader: any) => Etl;
|
|
20
|
+
pump: () => Etl;
|
|
21
|
+
validator: (validator: any) => Etl;
|
|
22
|
+
destination: (destination: any) => Etl;
|
|
23
|
+
transform: (transform: any) => Etl;
|
|
24
24
|
}
|
|
25
25
|
//# sourceMappingURL=index.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../../src/lib/index.js"],"names":[],"mappings":";AAMA;;;;;;;GAOG;AAEH;;;GAGG;AACH,4BA2CC;;IAxCG,qBAAuB;IACvB,0BAA4B;IAC5B,uBAAyB;IAEzB,
|
|
1
|
+
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../../src/lib/index.js"],"names":[],"mappings":";AAMA;;;;;;;GAOG;AAEH;;;GAGG;AACH,4BA2CC;;IAxCG,qBAAuB;IACvB,0BAA4B;IAC5B,uBAAyB;IAEzB,6BAGC;IAED,gBAaC;IAED,mCAGC;IAED,uCAGC;IAED,mCAGC"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"csvloader.d.ts","sourceRoot":"","sources":["../../../../src/loaders/csvloader.js"],"names":[],"mappings":"AAMA;;;;;GAKG;AACH
|
|
1
|
+
{"version":3,"file":"csvloader.d.ts","sourceRoot":"","sources":["../../../../src/loaders/csvloader.js"],"names":[],"mappings":";AAMA;;;;;GAKG;AACH;IAH2B,IAAI;kBAwB9B"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"fakerTransformer.d.ts","sourceRoot":"","sources":["../../../../src/transformers/fakerTransformer.js"],"names":[],"mappings":"AAEA;;;;;;;;;;;;;GAaG;AACH
|
|
1
|
+
{"version":3,"file":"fakerTransformer.d.ts","sourceRoot":"","sources":["../../../../src/transformers/fakerTransformer.js"],"names":[],"mappings":"AAEA;;;;;;;;;;;;;GAaG;AACH;IAX0B,OAAO;IAQN,MAAM;cA8BhC;;IAzCD;;;;;;;;;;;;;OAaG;IACH;QAX0B,OAAO;QAQN,MAAM;OA8BhC;IAzBG,eAA8B"}
|
|
@@ -1,4 +1,5 @@
|
|
|
1
|
+
import { StringReplaceTransformer } from "./stringReplaceTransformer";
|
|
1
2
|
import { ToUpperCaseTransformer } from "./toUpperCaseTransformer";
|
|
2
3
|
import { FakerTransformer } from "./fakerTransformer";
|
|
3
|
-
export { ToUpperCaseTransformer, FakerTransformer };
|
|
4
|
+
export { StringReplaceTransformer, ToUpperCaseTransformer, FakerTransformer };
|
|
4
5
|
//# sourceMappingURL=index.d.ts.map
|
|
@@ -0,0 +1,25 @@
|
|
|
1
|
+
/**
|
|
2
|
+
*
|
|
3
|
+
* @param {Object} options
|
|
4
|
+
* @param {String} options.column
|
|
5
|
+
* @returns Writable
|
|
6
|
+
*/
|
|
7
|
+
export function StringReplaceTransformer(options: {
|
|
8
|
+
column: string;
|
|
9
|
+
}): Transform;
|
|
10
|
+
export class StringReplaceTransformer {
|
|
11
|
+
/**
|
|
12
|
+
*
|
|
13
|
+
* @param {Object} options
|
|
14
|
+
* @param {String} options.column
|
|
15
|
+
* @returns Writable
|
|
16
|
+
*/
|
|
17
|
+
constructor(options: {
|
|
18
|
+
column: string;
|
|
19
|
+
});
|
|
20
|
+
replacements: {
|
|
21
|
+
column: string;
|
|
22
|
+
};
|
|
23
|
+
}
|
|
24
|
+
import { Transform } from "stream";
|
|
25
|
+
//# sourceMappingURL=stringReplaceTransformer.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"stringReplaceTransformer.d.ts","sourceRoot":"","sources":["../../../../src/transformers/stringReplaceTransformer.js"],"names":[],"mappings":"AAEA;;;;;GAKG;AACH;IAH2B,MAAM;cAqBhC;;IAxBD;;;;;OAKG;IACH;QAH2B,MAAM;OAqBhC;IAhBG;;MAA2B"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"toUpperCaseTransformer.d.ts","sourceRoot":"","sources":["../../../../src/transformers/toUpperCaseTransformer.js"],"names":[],"mappings":"AAEA;;;;;GAKG;AACH
|
|
1
|
+
{"version":3,"file":"toUpperCaseTransformer.d.ts","sourceRoot":"","sources":["../../../../src/transformers/toUpperCaseTransformer.js"],"names":[],"mappings":"AAEA;;;;;GAKG;AACH;IAH2B,MAAM;cAiBhC;;IApBD;;;;;OAKG;IACH;QAH2B,MAAM;OAiBhC;IAZG,eAA4B"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"multiToolValidator.d.ts","sourceRoot":"","sources":["../../../../src/validators/multiToolValidator.js"],"names":[],"mappings":"AAIA;;;;;;;;;;;;;;;;;GAiBG;AACH
|
|
1
|
+
{"version":3,"file":"multiToolValidator.d.ts","sourceRoot":"","sources":["../../../../src/validators/multiToolValidator.js"],"names":[],"mappings":"AAIA;;;;;;;;;;;;;;;;;GAiBG;AACH;IAf0B,OAAO;cAsChC"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"requiredValidator.d.ts","sourceRoot":"","sources":["../../../../src/validators/requiredValidator.js"],"names":[],"mappings":"AAGA;;;;;;GAMG;AACH
|
|
1
|
+
{"version":3,"file":"requiredValidator.d.ts","sourceRoot":"","sources":["../../../../src/validators/requiredValidator.js"],"names":[],"mappings":"AAGA;;;;;;GAMG;AACH;IAJ2B,OAAO;IACR,OAAO;cAuBhC"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"uniqueValidator.d.ts","sourceRoot":"","sources":["../../../../src/validators/uniqueValidator.js"],"names":[],"mappings":"AAEA;;;;;;GAMG;AACH
|
|
1
|
+
{"version":3,"file":"uniqueValidator.d.ts","sourceRoot":"","sources":["../../../../src/validators/uniqueValidator.js"],"names":[],"mappings":"AAEA;;;;;;GAMG;AACH;IAJ2B,OAAO;IACP,MAAM;cA8BhC;;IAlCD;;;;;;OAMG;IACH;QAJ2B,OAAO;QACP,MAAM;OA8BhC;IAzBG,eAA4B;IAC5B,gBAAwF;IACxF,wBAA0B"}
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "ffc-pay-etl-framework",
|
|
3
|
-
"version": "0.
|
|
3
|
+
"version": "0.1.12",
|
|
4
4
|
"publisher": "Defra",
|
|
5
5
|
"main": "dist/cjs/index.js",
|
|
6
6
|
"private": false,
|
|
@@ -25,12 +25,42 @@
|
|
|
25
25
|
"jest": {
|
|
26
26
|
"setupFiles": [
|
|
27
27
|
"<rootDir>/jest/setEnvVars.js"
|
|
28
|
+
],
|
|
29
|
+
"collectCoverage": true,
|
|
30
|
+
"collectCoverageFrom": [
|
|
31
|
+
"**/*.js",
|
|
32
|
+
"!**/*.test.js"
|
|
33
|
+
],
|
|
34
|
+
"coverageDirectory": "test-output",
|
|
35
|
+
"coverageReporters": [
|
|
36
|
+
"text-summary",
|
|
37
|
+
"lcov"
|
|
38
|
+
],
|
|
39
|
+
"coveragePathIgnorePatterns": [
|
|
40
|
+
"<rootDir>/node_modules/",
|
|
41
|
+
"<rootDir>/test-output/",
|
|
42
|
+
"<rootDir>/test/"
|
|
43
|
+
],
|
|
44
|
+
"modulePathIgnorePatterns": [
|
|
45
|
+
"node_modules"
|
|
46
|
+
],
|
|
47
|
+
"reporters": [
|
|
48
|
+
"default",
|
|
49
|
+
[
|
|
50
|
+
"jest-junit",
|
|
51
|
+
{
|
|
52
|
+
"suiteName": "jest tests",
|
|
53
|
+
"outputDirectory": "test-output",
|
|
54
|
+
"outputName": "junit.xml"
|
|
55
|
+
}
|
|
56
|
+
]
|
|
28
57
|
]
|
|
29
58
|
},
|
|
30
59
|
"devDependencies": {
|
|
31
60
|
"all-contributors-cli": "^6.26.1",
|
|
32
61
|
"debug": "^4.3.6",
|
|
33
62
|
"jest": "^29.7.0",
|
|
63
|
+
"jest-junit": "^16.0.0",
|
|
34
64
|
"nodemon": "^3.1.4",
|
|
35
65
|
"prettier": "3.3.3",
|
|
36
66
|
"supports-color": "^9.4.0"
|
|
@@ -44,9 +74,8 @@
|
|
|
44
74
|
"pg": "^8.12.0",
|
|
45
75
|
"pg-hstore": "^2.3.4",
|
|
46
76
|
"sequelize": "^6.37.3",
|
|
47
|
-
"sqlite3": "^5.1.7",
|
|
48
77
|
"tedious": "^18.2.4",
|
|
49
|
-
"typescript": "^
|
|
78
|
+
"typescript": "^4.0.0",
|
|
50
79
|
"validator": "^13.12.0"
|
|
51
80
|
},
|
|
52
81
|
"files": [
|