@artilleryio/int-core
Advanced tools
Comparing version 2.13.0 to 2.14.0-533dfcd
@@ -21,2 +21,3 @@ /* This Source Code Form is subject to the terms of the Mozilla Public | ||
const wl = require('./weighted-pick'); | ||
const { pathToFileURL } = require('url'); | ||
@@ -90,3 +91,4 @@ const Engines = { | ||
if (processorPath.endsWith('.mjs')) { | ||
const exports = await import(processorPath); | ||
const fileUrl = pathToFileURL(processorPath); | ||
const exports = await import(fileUrl.href); | ||
script.config.processor = Object.assign( | ||
@@ -410,14 +412,23 @@ {}, | ||
_.each(script.config.payload, function (el) { | ||
// If data = [] (i.e. the CSV file is empty, or only has headers and | ||
// skipHeaders = true), then row could = undefined | ||
let row = el.reader(el.data) || []; | ||
_.each(el.fields, function (fieldName, j) { | ||
result[fieldName] = row[j]; | ||
}); | ||
if (typeof el.name !== 'undefined') { | ||
// Make the entire CSV available | ||
result[el.name] = el.reader(el.data); | ||
if (!el.loadAll) { | ||
// Load individual fields from the CSV into VU context variables | ||
// If data = [] (i.e. the CSV file is empty, or only has headers and | ||
// skipHeaders = true), then row could = undefined | ||
let row = el.reader(el.data) || []; | ||
_.each(el.fields, function (fieldName, j) { | ||
result[fieldName] = row[j]; | ||
}); | ||
} else { | ||
if (typeof el.name !== 'undefined') { | ||
// Make the entire CSV available | ||
result[el.name] = el.reader(el.data); | ||
} else { | ||
console.log( | ||
'WARNING: loadAll is set to true but no name is provided for the CSV data' | ||
); | ||
} | ||
} | ||
}); | ||
} | ||
return result; | ||
@@ -424,0 +435,0 @@ } |
{ | ||
"name": "@artilleryio/int-core", | ||
"version": "2.13.0", | ||
"version": "2.14.0-533dfcd", | ||
"main": "./index.js", | ||
"license": "MPL-2.0", | ||
"dependencies": { | ||
"@artilleryio/int-commons": "2.9.0", | ||
"@artilleryio/int-commons": "2.10.0-533dfcd", | ||
"@artilleryio/sketches-js": "^2.1.1", | ||
@@ -9,0 +9,0 @@ "agentkeepalive": "^4.1.0", |
No v1
QualityPackage is not semver >=1. This means it is not stable and does not support ^ ranges.
Found 1 instance in 1 package
121178
3073
2
+ Added@artilleryio/int-commons@2.10.0-533dfcd(transitive)
- Removed@artilleryio/int-commons@2.9.0(transitive)