@forzalabs/remora 0.0.53-nasco.3 → 0.0.55-nasco.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.
- package/Constants.js +1 -1
- package/engines/dataset/Dataset.js +6 -2
- package/package.json +2 -2
package/Constants.js
CHANGED
|
@@ -32,8 +32,10 @@ const XMLParser_1 = __importDefault(require("../parsing/XMLParser"));
|
|
|
32
32
|
const DriverFactory_1 = __importDefault(require("../../drivers/DriverFactory"));
|
|
33
33
|
const Helper_1 = __importDefault(require("../../helper/Helper"));
|
|
34
34
|
const Algo_1 = __importDefault(require("../../core/Algo"));
|
|
35
|
+
const Environment_1 = __importDefault(require("../Environment"));
|
|
35
36
|
class Dataset {
|
|
36
|
-
constructor(name, file, batchSize
|
|
37
|
+
constructor(name, file, batchSize) {
|
|
38
|
+
var _a;
|
|
37
39
|
this._pipeline = [];
|
|
38
40
|
this.getPath = () => this._path;
|
|
39
41
|
this.setPath = (path) => {
|
|
@@ -695,6 +697,8 @@ class Dataset {
|
|
|
695
697
|
for (let i = 0; i < fields.length; i++) {
|
|
696
698
|
const { cField } = fields[i];
|
|
697
699
|
const currentMatch = structuredClone(this._dimensions.find(x => x.name === cField.key));
|
|
700
|
+
if (!currentMatch && !cField.fixed)
|
|
701
|
+
throw new Error(`The requested field "${cField.key}" from the consumer is not present in the underlying dataset "${this._name}" (${this._dimensions.map(x => x.name).join(', ')})`);
|
|
698
702
|
updates.push({
|
|
699
703
|
currentDimension: currentMatch,
|
|
700
704
|
newName: (_a = cField.alias) !== null && _a !== void 0 ? _a : cField.key,
|
|
@@ -843,7 +847,7 @@ class Dataset {
|
|
|
843
847
|
};
|
|
844
848
|
this._name = name;
|
|
845
849
|
this._file = file;
|
|
846
|
-
this._batchSize = batchSize;
|
|
850
|
+
this._batchSize = (_a = batchSize !== null && batchSize !== void 0 ? batchSize : parseInt(Environment_1.default.get('MAX_ITEMS_IN_MEMORY'))) !== null && _a !== void 0 ? _a : Constants_1.default.defaults.MAX_ITEMS_IN_MEMORY;
|
|
847
851
|
this._dimensions = [];
|
|
848
852
|
this._delimiter = ',';
|
|
849
853
|
this._size = 0;
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@forzalabs/remora",
|
|
3
|
-
"version": "0.0.
|
|
3
|
+
"version": "0.0.55-nasco.3",
|
|
4
4
|
"description": "A powerful CLI tool for seamless data translation.",
|
|
5
5
|
"main": "index.js",
|
|
6
6
|
"private": false,
|
|
@@ -9,7 +9,7 @@
|
|
|
9
9
|
},
|
|
10
10
|
"scripts": {
|
|
11
11
|
"sync": "cd ../dev_ops && npm run sync",
|
|
12
|
-
"dev": "
|
|
12
|
+
"dev": "npx tsx scripts/dev.ts",
|
|
13
13
|
"tsc-check": "npx tsc --noemit",
|
|
14
14
|
"init": "npx tsx ./src/index.ts init",
|
|
15
15
|
"version": "npx tsx ./src/index.ts -v",
|