New Case Study:See how Anthropic automated 95% of dependency reviews with Socket.Learn More
Socket
Sign inDemoInstall
Socket

artillery-core

Package Overview
Dependencies
Maintainers
1
Versions
57
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

artillery-core - npm Package Compare versions

Comparing version 1.6.0-0 to 1.6.0

37

lib/engine_http.js

@@ -20,4 +20,9 @@ /* This Source Code Form is subject to the terms of the Mozilla Public

const fs = require('fs');
const xml = require('libxmljs');
let xmlCapture = null;
try {
xmlCapture = require('artillery-xml-capture');
} catch (e) {
}
module.exports = HttpEngine;

@@ -134,5 +139,5 @@

extractor = extractJSONPath;
} else if ((params.capture && params.capture.xpath) || (params.match && params.match.xpath)) {
parser = parseXML;
extractor = extractXPath;
} else if (xmlCapture && (params.capture && params.capture.xpath) || (params.match && params.match.xpath)) {
parser = xmlCapture.parseXML;
extractor = xmlCapture.extractXPath;
} else if ((params.capture && params.capture.regexp) || (params.match && params.match.regexp)) {

@@ -145,5 +150,5 @@ parser = dummyParser;

extractor = extractJSONPath;
} else if (isXML(res)) {
parser = parseXML;
extractor = extractXPath;
} else if (xmlCapture && isXML(res)) {
parser = xmlCapture.parseXML;
extractor = xmlCapture.extractXPath;
} else {

@@ -330,14 +335,2 @@ // We really don't know what to do here.

/*
* Wrap XML parser in a callback
*/
function parseXML(body, callback) {
try {
let doc = xml.parseXml(body);
return callback(null, doc);
} catch(err) {
return callback(err, null);
}
}
function dummyParser(body, callback) {

@@ -357,8 +350,2 @@ return callback(null, body);

// doc is an libxmljs document object
function extractXPath(doc, expr) {
let result = doc.get(expr).text();
return result;
}
// doc is a string or an object (body parsed by Request when headers indicate JSON)

@@ -365,0 +352,0 @@ function extractRegExp(doc, expr) {

{
"name": "artillery-core",
"version": "1.6.0-0",
"version": "1.6.0",
"description": "core load-generating functionality of Artillery",

@@ -54,3 +54,6 @@ "main": "index.js",

"is_linted"
]
],
"optionalDependencies": {
"artillery-xml-capture": "^1.0.0"
}
}
SocketSocket SOC 2 Logo

Product

  • Package Alerts
  • Integrations
  • Docs
  • Pricing
  • FAQ
  • Roadmap
  • Changelog

Packages

npm

Stay in touch

Get open source security insights delivered straight into your inbox.


  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc