easy-soap-request 4.4.0 → 4.5.0

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/README.md CHANGED
@@ -14,9 +14,6 @@ A small library to make SOAP requests easier via Node.js, Deno, and your browser
14
14
  npm install easy-soap-request
15
15
  ```
16
16
 
17
- ## Requirements
18
- - Node.js >=7.6.0 (async/await support)
19
-
20
17
  ## Usage
21
18
 
22
19
  ### Node.js
@@ -16,7 +16,7 @@ var soapRequest;
16
16
  \******************/
17
17
  /***/ ((module, __unused_webpack_exports, __webpack_require__) => {
18
18
 
19
- eval("const axios = __webpack_require__(/*! axios */ \"./node_modules/axios/index.js\")[\"default\"];\n\n/**\n * @author Caleb Lemoine\n * @param {object} opts easy-soap-request options\n * @param {string} opts.method HTTP request method\n * @param {string} opts.url endpoint URL\n * @param {object} opts.headers HTTP headers, can be string or object\n * @param {string} opts.xml SOAP envelope, can be read from file or passed as string\n * @param {int} opts.timeout Milliseconds before timing out request\n * @param {object} opts.proxy Object with proxy configuration\n * @param {int} opts.maxBodyLength Limit body size being sent(bytes)\n * @param {int} opts.maxContentLength Limit content size being sent(bytes)\n * @param {object} opts.extraOpts Object of additional axios parameters\n * @promise response\n * @reject {error}\n * @fulfill {body,statusCode}\n * @returns {Promise.response{body,statusCode}}\n */\nmodule.exports = function soapRequest(opts = {\n method: 'POST',\n url: '',\n headers: {},\n xml: '',\n timeout: 10000,\n proxy: {},\n maxBodyLength: Infinity,\n maxContentLength: Infinity,\n extraOpts: {},\n}) {\n const {\n method,\n url,\n headers,\n xml,\n timeout,\n proxy,\n maxBodyLength,\n maxContentLength,\n extraOpts,\n } = opts;\n return new Promise((resolve, reject) => {\n axios({\n method: method || 'POST',\n url,\n headers,\n data: xml,\n timeout,\n proxy,\n maxBodyLength,\n maxContentLength,\n ...extraOpts,\n }).then((response) => {\n resolve({\n response: {\n headers: response.headers,\n body: response.data,\n statusCode: response.status,\n },\n });\n }).catch((error) => {\n if (error.response) {\n reject(error.response.data);\n } else {\n reject(error);\n }\n });\n });\n};\n\n\n//# sourceURL=webpack://soapRequest/./index.js?");
19
+ eval("const axios = (__webpack_require__(/*! axios */ \"./node_modules/axios/index.js\")[\"default\"]);\n\n/**\n * @author Caleb Lemoine\n * @param {object} opts easy-soap-request options\n * @param {string} opts.method HTTP request method\n * @param {string} opts.url endpoint URL\n * @param {object} opts.headers HTTP headers, can be string or object\n * @param {string} opts.xml SOAP envelope, can be read from file or passed as string\n * @param {int} opts.timeout Milliseconds before timing out request\n * @param {object} opts.proxy Object with proxy configuration\n * @param {int} opts.maxBodyLength Limit body size being sent(bytes)\n * @param {int} opts.maxContentLength Limit content size being sent(bytes)\n * @param {object} opts.extraOpts Object of additional axios parameters\n * @promise response\n * @reject {error}\n * @fulfill {body,statusCode}\n * @returns {Promise.response{body,statusCode}}\n */\nmodule.exports = function soapRequest(opts = {\n method: 'POST',\n url: '',\n headers: {},\n xml: '',\n timeout: 10000,\n proxy: {},\n maxBodyLength: Infinity,\n maxContentLength: Infinity,\n extraOpts: {},\n}) {\n const {\n method,\n url,\n headers,\n xml,\n timeout,\n proxy,\n maxBodyLength,\n maxContentLength,\n extraOpts,\n } = opts;\n return new Promise((resolve, reject) => {\n axios({\n method: method || 'POST',\n url,\n headers,\n data: xml,\n timeout,\n proxy,\n maxBodyLength,\n maxContentLength,\n ...extraOpts,\n }).then((response) => {\n resolve({\n response: {\n headers: response.headers,\n body: response.data,\n statusCode: response.status,\n },\n });\n }).catch((error) => {\n if (error.response) {\n reject(error.response.data);\n } else {\n reject(error);\n }\n });\n });\n};\n\n\n//# sourceURL=webpack://soapRequest/./index.js?");
20
20
 
21
21
  /***/ }),
22
22
 
@@ -48,7 +48,7 @@ eval("\n\nvar utils = __webpack_require__(/*! ./../utils */ \"./node_modules/axi
48
48
  /***/ ((module, __unused_webpack_exports, __webpack_require__) => {
49
49
 
50
50
  "use strict";
51
- eval("\n\nvar utils = __webpack_require__(/*! ./utils */ \"./node_modules/axios/lib/utils.js\");\nvar bind = __webpack_require__(/*! ./helpers/bind */ \"./node_modules/axios/lib/helpers/bind.js\");\nvar Axios = __webpack_require__(/*! ./core/Axios */ \"./node_modules/axios/lib/core/Axios.js\");\nvar mergeConfig = __webpack_require__(/*! ./core/mergeConfig */ \"./node_modules/axios/lib/core/mergeConfig.js\");\nvar defaults = __webpack_require__(/*! ./defaults */ \"./node_modules/axios/lib/defaults.js\");\n\n/**\n * Create an instance of Axios\n *\n * @param {Object} defaultConfig The default config for the instance\n * @return {Axios} A new instance of Axios\n */\nfunction createInstance(defaultConfig) {\n var context = new Axios(defaultConfig);\n var instance = bind(Axios.prototype.request, context);\n\n // Copy axios.prototype to instance\n utils.extend(instance, Axios.prototype, context);\n\n // Copy context to instance\n utils.extend(instance, context);\n\n // Factory for creating new instances\n instance.create = function create(instanceConfig) {\n return createInstance(mergeConfig(defaultConfig, instanceConfig));\n };\n\n return instance;\n}\n\n// Create the default instance to be exported\nvar axios = createInstance(defaults);\n\n// Expose Axios class to allow class inheritance\naxios.Axios = Axios;\n\n// Expose Cancel & CancelToken\naxios.Cancel = __webpack_require__(/*! ./cancel/Cancel */ \"./node_modules/axios/lib/cancel/Cancel.js\");\naxios.CancelToken = __webpack_require__(/*! ./cancel/CancelToken */ \"./node_modules/axios/lib/cancel/CancelToken.js\");\naxios.isCancel = __webpack_require__(/*! ./cancel/isCancel */ \"./node_modules/axios/lib/cancel/isCancel.js\");\naxios.VERSION = __webpack_require__(/*! ./env/data */ \"./node_modules/axios/lib/env/data.js\").version;\n\n// Expose all/spread\naxios.all = function all(promises) {\n return Promise.all(promises);\n};\naxios.spread = __webpack_require__(/*! ./helpers/spread */ \"./node_modules/axios/lib/helpers/spread.js\");\n\n// Expose isAxiosError\naxios.isAxiosError = __webpack_require__(/*! ./helpers/isAxiosError */ \"./node_modules/axios/lib/helpers/isAxiosError.js\");\n\nmodule.exports = axios;\n\n// Allow use of default import syntax in TypeScript\nmodule.exports[\"default\"] = axios;\n\n\n//# sourceURL=webpack://soapRequest/./node_modules/axios/lib/axios.js?");
51
+ eval("\n\nvar utils = __webpack_require__(/*! ./utils */ \"./node_modules/axios/lib/utils.js\");\nvar bind = __webpack_require__(/*! ./helpers/bind */ \"./node_modules/axios/lib/helpers/bind.js\");\nvar Axios = __webpack_require__(/*! ./core/Axios */ \"./node_modules/axios/lib/core/Axios.js\");\nvar mergeConfig = __webpack_require__(/*! ./core/mergeConfig */ \"./node_modules/axios/lib/core/mergeConfig.js\");\nvar defaults = __webpack_require__(/*! ./defaults */ \"./node_modules/axios/lib/defaults.js\");\n\n/**\n * Create an instance of Axios\n *\n * @param {Object} defaultConfig The default config for the instance\n * @return {Axios} A new instance of Axios\n */\nfunction createInstance(defaultConfig) {\n var context = new Axios(defaultConfig);\n var instance = bind(Axios.prototype.request, context);\n\n // Copy axios.prototype to instance\n utils.extend(instance, Axios.prototype, context);\n\n // Copy context to instance\n utils.extend(instance, context);\n\n // Factory for creating new instances\n instance.create = function create(instanceConfig) {\n return createInstance(mergeConfig(defaultConfig, instanceConfig));\n };\n\n return instance;\n}\n\n// Create the default instance to be exported\nvar axios = createInstance(defaults);\n\n// Expose Axios class to allow class inheritance\naxios.Axios = Axios;\n\n// Expose Cancel & CancelToken\naxios.Cancel = __webpack_require__(/*! ./cancel/Cancel */ \"./node_modules/axios/lib/cancel/Cancel.js\");\naxios.CancelToken = __webpack_require__(/*! ./cancel/CancelToken */ \"./node_modules/axios/lib/cancel/CancelToken.js\");\naxios.isCancel = __webpack_require__(/*! ./cancel/isCancel */ \"./node_modules/axios/lib/cancel/isCancel.js\");\naxios.VERSION = (__webpack_require__(/*! ./env/data */ \"./node_modules/axios/lib/env/data.js\").version);\n\n// Expose all/spread\naxios.all = function all(promises) {\n return Promise.all(promises);\n};\naxios.spread = __webpack_require__(/*! ./helpers/spread */ \"./node_modules/axios/lib/helpers/spread.js\");\n\n// Expose isAxiosError\naxios.isAxiosError = __webpack_require__(/*! ./helpers/isAxiosError */ \"./node_modules/axios/lib/helpers/isAxiosError.js\");\n\nmodule.exports = axios;\n\n// Allow use of default import syntax in TypeScript\nmodule.exports[\"default\"] = axios;\n\n\n//# sourceURL=webpack://soapRequest/./node_modules/axios/lib/axios.js?");
52
52
 
53
53
  /***/ }),
54
54
 
@@ -201,7 +201,7 @@ eval("\n\nvar utils = __webpack_require__(/*! ./utils */ \"./node_modules/axios/
201
201
  \********************************************/
202
202
  /***/ ((module) => {
203
203
 
204
- eval("module.exports = {\n \"version\": \"0.23.0\"\n};\n\n//# sourceURL=webpack://soapRequest/./node_modules/axios/lib/env/data.js?");
204
+ eval("module.exports = {\n \"version\": \"0.24.0\"\n};\n\n//# sourceURL=webpack://soapRequest/./node_modules/axios/lib/env/data.js?");
205
205
 
206
206
  /***/ }),
207
207
 
@@ -322,7 +322,7 @@ eval("\n\n/**\n * Syntactic sugar for invoking a function and expanding an array
322
322
  /***/ ((module, __unused_webpack_exports, __webpack_require__) => {
323
323
 
324
324
  "use strict";
325
- eval("\n\nvar VERSION = __webpack_require__(/*! ../env/data */ \"./node_modules/axios/lib/env/data.js\").version;\n\nvar validators = {};\n\n// eslint-disable-next-line func-names\n['object', 'boolean', 'number', 'function', 'string', 'symbol'].forEach(function(type, i) {\n validators[type] = function validator(thing) {\n return typeof thing === type || 'a' + (i < 1 ? 'n ' : ' ') + type;\n };\n});\n\nvar deprecatedWarnings = {};\n\n/**\n * Transitional option validator\n * @param {function|boolean?} validator - set to false if the transitional option has been removed\n * @param {string?} version - deprecated version / removed since version\n * @param {string?} message - some message with additional info\n * @returns {function}\n */\nvalidators.transitional = function transitional(validator, version, message) {\n function formatMessage(opt, desc) {\n return '[Axios v' + VERSION + '] Transitional option \\'' + opt + '\\'' + desc + (message ? '. ' + message : '');\n }\n\n // eslint-disable-next-line func-names\n return function(value, opt, opts) {\n if (validator === false) {\n throw new Error(formatMessage(opt, ' has been removed' + (version ? ' in ' + version : '')));\n }\n\n if (version && !deprecatedWarnings[opt]) {\n deprecatedWarnings[opt] = true;\n // eslint-disable-next-line no-console\n console.warn(\n formatMessage(\n opt,\n ' has been deprecated since v' + version + ' and will be removed in the near future'\n )\n );\n }\n\n return validator ? validator(value, opt, opts) : true;\n };\n};\n\n/**\n * Assert object's properties type\n * @param {object} options\n * @param {object} schema\n * @param {boolean?} allowUnknown\n */\n\nfunction assertOptions(options, schema, allowUnknown) {\n if (typeof options !== 'object') {\n throw new TypeError('options must be an object');\n }\n var keys = Object.keys(options);\n var i = keys.length;\n while (i-- > 0) {\n var opt = keys[i];\n var validator = schema[opt];\n if (validator) {\n var value = options[opt];\n var result = value === undefined || validator(value, opt, options);\n if (result !== true) {\n throw new TypeError('option ' + opt + ' must be ' + result);\n }\n continue;\n }\n if (allowUnknown !== true) {\n throw Error('Unknown option ' + opt);\n }\n }\n}\n\nmodule.exports = {\n assertOptions: assertOptions,\n validators: validators\n};\n\n\n//# sourceURL=webpack://soapRequest/./node_modules/axios/lib/helpers/validator.js?");
325
+ eval("\n\nvar VERSION = (__webpack_require__(/*! ../env/data */ \"./node_modules/axios/lib/env/data.js\").version);\n\nvar validators = {};\n\n// eslint-disable-next-line func-names\n['object', 'boolean', 'number', 'function', 'string', 'symbol'].forEach(function(type, i) {\n validators[type] = function validator(thing) {\n return typeof thing === type || 'a' + (i < 1 ? 'n ' : ' ') + type;\n };\n});\n\nvar deprecatedWarnings = {};\n\n/**\n * Transitional option validator\n * @param {function|boolean?} validator - set to false if the transitional option has been removed\n * @param {string?} version - deprecated version / removed since version\n * @param {string?} message - some message with additional info\n * @returns {function}\n */\nvalidators.transitional = function transitional(validator, version, message) {\n function formatMessage(opt, desc) {\n return '[Axios v' + VERSION + '] Transitional option \\'' + opt + '\\'' + desc + (message ? '. ' + message : '');\n }\n\n // eslint-disable-next-line func-names\n return function(value, opt, opts) {\n if (validator === false) {\n throw new Error(formatMessage(opt, ' has been removed' + (version ? ' in ' + version : '')));\n }\n\n if (version && !deprecatedWarnings[opt]) {\n deprecatedWarnings[opt] = true;\n // eslint-disable-next-line no-console\n console.warn(\n formatMessage(\n opt,\n ' has been deprecated since v' + version + ' and will be removed in the near future'\n )\n );\n }\n\n return validator ? validator(value, opt, opts) : true;\n };\n};\n\n/**\n * Assert object's properties type\n * @param {object} options\n * @param {object} schema\n * @param {boolean?} allowUnknown\n */\n\nfunction assertOptions(options, schema, allowUnknown) {\n if (typeof options !== 'object') {\n throw new TypeError('options must be an object');\n }\n var keys = Object.keys(options);\n var i = keys.length;\n while (i-- > 0) {\n var opt = keys[i];\n var validator = schema[opt];\n if (validator) {\n var value = options[opt];\n var result = value === undefined || validator(value, opt, options);\n if (result !== true) {\n throw new TypeError('option ' + opt + ' must be ' + result);\n }\n continue;\n }\n if (allowUnknown !== true) {\n throw Error('Unknown option ' + opt);\n }\n }\n}\n\nmodule.exports = {\n assertOptions: assertOptions,\n validators: validators\n};\n\n\n//# sourceURL=webpack://soapRequest/./node_modules/axios/lib/helpers/validator.js?");
326
326
 
327
327
  /***/ }),
328
328
 
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "easy-soap-request",
3
- "version": "4.4.0",
3
+ "version": "4.5.0",
4
4
  "description": "A small library to make SOAP requests easier",
5
5
  "main": "index.js",
6
6
  "scripts": {
@@ -24,9 +24,6 @@
24
24
  "xml",
25
25
  "wsdl"
26
26
  ],
27
- "engines": {
28
- "node": ">=7.6.0"
29
- },
30
27
  "author": "Caleb Lemoine",
31
28
  "license": "MIT",
32
29
  "bugs": {
@@ -34,21 +31,21 @@
34
31
  },
35
32
  "homepage": "https://github.com/circa10a/easy-soap-request#readme",
36
33
  "dependencies": {
37
- "axios": "^0.23.0"
34
+ "axios": "^0.24.0"
38
35
  },
39
36
  "devDependencies": {
40
37
  "chai": "^4.3.4",
41
38
  "coveralls": "^3.1.1",
42
- "eslint": "^7.32.0",
43
- "eslint-config-airbnb-base": "^14.2.1",
39
+ "eslint": "^8.3.0",
40
+ "eslint-config-airbnb-base": "^15.0.0",
44
41
  "eslint-plugin-chai-friendly": "^0.7.2",
45
- "eslint-plugin-import": "^2.24.2",
42
+ "eslint-plugin-import": "^2.25.3",
46
43
  "eslint-plugin-mocha": "^9.0.0",
47
44
  "mocha": "^9.1.3",
48
- "nock": "^13.1.3",
45
+ "nock": "^13.2.1",
49
46
  "nyc": "^15.1.0",
50
- "webpack": "^5.58.2",
51
- "webpack-cli": "^4.9.0",
52
- "webpack-dev-server": "^4.3.1"
47
+ "webpack": "^5.64.4",
48
+ "webpack-cli": "^4.9.1",
49
+ "webpack-dev-server": "^4.6.0"
53
50
  }
54
51
  }