@artilleryio/int-core 2.13.0-4f6f322 → 2.13.0-5f5adff
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/lib/runner.js +15 -6
- package/package.json +2 -2
package/lib/runner.js
CHANGED
|
@@ -407,18 +407,27 @@ function datafileVariables(script) {
|
|
|
407
407
|
let result = {};
|
|
408
408
|
if (script.config.payload) {
|
|
409
409
|
_.each(script.config.payload, function (el) {
|
|
410
|
-
//
|
|
411
|
-
|
|
412
|
-
|
|
413
|
-
|
|
414
|
-
|
|
415
|
-
|
|
410
|
+
//when loading all the csv, we don't set individual fields
|
|
411
|
+
if (!el.loadAll) {
|
|
412
|
+
// If data = [] (i.e. the CSV file is empty, or only has headers and
|
|
413
|
+
// skipHeaders = true), then row could = undefined
|
|
414
|
+
let row = el.reader(el.data) || [];
|
|
415
|
+
_.each(el.fields, function (fieldName, j) {
|
|
416
|
+
result[fieldName] = row[j];
|
|
417
|
+
});
|
|
418
|
+
}
|
|
419
|
+
|
|
416
420
|
if (typeof el.name !== 'undefined') {
|
|
417
421
|
// Make the entire CSV available
|
|
418
422
|
result[el.name] = el.reader(el.data);
|
|
423
|
+
} else {
|
|
424
|
+
console.log(
|
|
425
|
+
'WARNING: loadAll is set to true but no name is provided for the CSV data'
|
|
426
|
+
);
|
|
419
427
|
}
|
|
420
428
|
});
|
|
421
429
|
}
|
|
430
|
+
|
|
422
431
|
return result;
|
|
423
432
|
}
|
|
424
433
|
|
package/package.json
CHANGED
|
@@ -1,10 +1,10 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@artilleryio/int-core",
|
|
3
|
-
"version": "2.13.0-
|
|
3
|
+
"version": "2.13.0-5f5adff",
|
|
4
4
|
"main": "./index.js",
|
|
5
5
|
"license": "MPL-2.0",
|
|
6
6
|
"dependencies": {
|
|
7
|
-
"@artilleryio/int-commons": "2.9.0-
|
|
7
|
+
"@artilleryio/int-commons": "2.9.0-5f5adff",
|
|
8
8
|
"@artilleryio/sketches-js": "^2.1.1",
|
|
9
9
|
"agentkeepalive": "^4.1.0",
|
|
10
10
|
"arrivals": "^2.1.2",
|