@forzalabs/remora 0.2.5 → 0.2.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.
package/Constants.js
CHANGED
package/drivers/LocalDriver.js
CHANGED
|
@@ -158,7 +158,7 @@ class LocalSourceDriver {
|
|
|
158
158
|
totalLineCount = yield copyLocally(fileKey, dataset.getFirstLine(), appendMode, sourceFilename, streamXLS);
|
|
159
159
|
break;
|
|
160
160
|
default:
|
|
161
|
-
totalLineCount = yield copyLocally(fileKey, dataset.getFirstLine(),
|
|
161
|
+
totalLineCount = yield copyLocally(fileKey, dataset.getFirstLine(), appendMode, sourceFilename);
|
|
162
162
|
break;
|
|
163
163
|
}
|
|
164
164
|
return totalLineCount;
|
|
@@ -177,7 +177,7 @@ class LocalSourceDriver {
|
|
|
177
177
|
const currentFileKey = allFileKeys[i];
|
|
178
178
|
// Pass the filename (just the basename) if includeSourceFilename is enabled
|
|
179
179
|
const sourceFilename = includeSourceFilename ? path_1.default.basename(currentFileKey) : undefined;
|
|
180
|
-
totalLineCount += yield handleFileAndGetLineCount(currentFileKey,
|
|
180
|
+
totalLineCount += yield handleFileAndGetLineCount(currentFileKey, i > 0, file.fileType, sourceFilename); // Append mode for subsequent files
|
|
181
181
|
}
|
|
182
182
|
dataset.setCount(totalLineCount);
|
|
183
183
|
return dataset;
|
|
@@ -50,7 +50,10 @@ class TransformationEngineClass {
|
|
|
50
50
|
break;
|
|
51
51
|
case 'fail':
|
|
52
52
|
default:
|
|
53
|
-
|
|
53
|
+
if (field.transform)
|
|
54
|
+
throw new Error(`an error occured during the transformation ${field.transform} on filedKey: ${fieldKey} the error is the following: ${error}`);
|
|
55
|
+
else
|
|
56
|
+
throw new Error(`an error occured at filedKey: ${fieldKey} the error is the following: ${error}`);
|
|
54
57
|
}
|
|
55
58
|
}
|
|
56
59
|
}
|