Comparing version 0.42.0 to 0.43.0
@@ -0,1 +1,14 @@ | ||
0.43.0 / 2021-11-12 | ||
=================== | ||
* [DOC] Create SECURITY.md (#1165) | ||
* [ENHANCEMENT] Publicly expose wsdl in Client (#1167) | ||
* [ENHANCEMENT] add native support for long deserialization (#1160) | ||
* [FIX] Fix typo in ISoapFault12 (#1166) | ||
* [FIX] error when soapaction header is not set (#1171) | ||
* [FIX] lastElapsedTime for non streaming requests (#1162) | ||
* [FIX] minor fix for ntlm request (#1163) | ||
* [FIX] undefined targetNamespace (#1161) | ||
* [FIX] xsi:type currently requires a namespace, resulting in undefined if no XMLNS is defined. Making attributes working without namespace or xmlns definitions. (#1159) | ||
* [MAINTENANCE] Bump httpntlm, doctoc as well as other dependencies (#1158) | ||
0.42.0 / 2021-08-23 | ||
@@ -2,0 +15,0 @@ =================== |
@@ -35,3 +35,3 @@ /// <reference types="node" /> | ||
lastResponseAttachments: IMTOMAttachments; | ||
private wsdl; | ||
wsdl: WSDL; | ||
private httpClient; | ||
@@ -38,0 +38,0 @@ private soapHeaders; |
@@ -472,2 +472,3 @@ "use strict"; | ||
} | ||
var startTime = Date.now(); | ||
return this.httpClient.request(location, xml, function (err, response, body) { | ||
@@ -477,3 +478,3 @@ _this_1.lastResponse = body; | ||
_this_1.lastResponseHeaders = response.headers; | ||
_this_1.lastElapsedTime = response.headers.date; | ||
_this_1.lastElapsedTime = Date.now() - startTime; | ||
_this_1.lastResponseAttachments = response.mtomResponseAttachments; | ||
@@ -480,0 +481,0 @@ // Added mostly for testability, but possibly useful for debugging |
@@ -80,5 +80,7 @@ "use strict"; | ||
headers: headers, | ||
validateStatus: null, | ||
transformResponse: function (data) { return data; } | ||
}; | ||
if (!exoptions.ntlm) { | ||
options.validateStatus = null; | ||
} | ||
if (exoptions.forceMTOM || attachments.length > 0) { | ||
@@ -158,3 +160,4 @@ var start = uuid_1.v4(); | ||
password: exoptions.password, | ||
domain: exoptions.domain | ||
workstation: exoptions.workstation || '', | ||
domain: exoptions.domain || '' | ||
}); | ||
@@ -161,0 +164,0 @@ req = ntlmReq(options); |
@@ -242,2 +242,5 @@ "use strict"; | ||
Server.prototype._getSoapAction = function (req) { | ||
if (typeof req.headers.soapaction === 'undefined') { | ||
return; | ||
} | ||
var soapAction = req.headers.soapaction; | ||
@@ -363,3 +366,3 @@ return (soapAction.indexOf('"') === 0) | ||
Value: 'SOAP-ENV:Server', | ||
Subcode: { value: 'InternalServerError' } | ||
Subcode: { Value: 'InternalServerError' } | ||
}, | ||
@@ -383,3 +386,3 @@ Reason: { Text: authResult.toString() }, | ||
Value: 'SOAP-ENV:Server', | ||
Subcode: { value: 'InternalServerError' } | ||
Subcode: { Value: 'InternalServerError' } | ||
}, | ||
@@ -395,3 +398,3 @@ Reason: { Text: error.toString() }, | ||
Value: 'SOAP-ENV:Client', | ||
Subcode: { value: 'AuthenticationFailure' } | ||
Subcode: { Value: 'AuthenticationFailure' } | ||
}, | ||
@@ -470,3 +473,3 @@ Reason: { Text: 'Invalid username or password' }, | ||
Value: 'SOAP-ENV:Server', | ||
Subcode: { value: 'InternalServerError' } | ||
Subcode: { Value: 'InternalServerError' } | ||
}, | ||
@@ -473,0 +476,0 @@ Reason: { Text: error.toString() }, |
@@ -33,3 +33,3 @@ /// <reference types="node" /> | ||
Subcode?: { | ||
value: string; | ||
Value: string; | ||
}; | ||
@@ -36,0 +36,0 @@ }; |
@@ -841,4 +841,5 @@ "use strict"; | ||
TypesElement.prototype.addChild = function (child) { | ||
var _a; | ||
assert_1.ok(child instanceof SchemaElement); | ||
var targetNamespace = child.$targetNamespace; | ||
var targetNamespace = child.$targetNamespace || ((_a = child.includes[0]) === null || _a === void 0 ? void 0 : _a.namespace); | ||
if (!this.schemas.hasOwnProperty(targetNamespace)) { | ||
@@ -845,0 +846,0 @@ this.schemas[targetNamespace] = child; |
@@ -388,3 +388,3 @@ "use strict"; | ||
else { | ||
if (name === 'int' || name === 'integer' || name === 'short') { | ||
if (name === 'int' || name === 'integer' || name === 'short' || name === 'long') { | ||
value = parseInt(text, 10); | ||
@@ -873,29 +873,33 @@ } | ||
} | ||
var attrObj = child[this.options.attributesKey]; | ||
var attrObj = child[this.options.attributesKey] || {}; | ||
if (attrObj && attrObj.xsi_type) { | ||
var xsiType = attrObj.xsi_type; | ||
var prefix = xsiType.prefix || xsiType.namespace; | ||
// Generate a new namespace for complex extension if one not provided | ||
if (!prefix) { | ||
prefix = nsContext.registerNamespace(xsiType.xmlns); | ||
if (xsiType.xmlns) { | ||
// Generate a new namespace for complex extension if one not provided | ||
if (!prefix) { | ||
prefix = nsContext.registerNamespace(xsiType.xmlns); | ||
} | ||
else { | ||
nsContext.declareNamespace(prefix, xsiType.xmlns); | ||
} | ||
xsiType.prefix = prefix; | ||
} | ||
else { | ||
nsContext.declareNamespace(prefix, xsiType.xmlns); | ||
} | ||
xsiType.prefix = prefix; | ||
} | ||
if (attrObj) { | ||
for (var attrKey in attrObj) { | ||
// handle complex extension separately | ||
if (attrKey === 'xsi_type') { | ||
var attrValue = attrObj[attrKey]; | ||
attr += ' xsi:type="' + attrValue.prefix + ':' + attrValue.type + '"'; | ||
attr += ' xmlns:' + attrValue.prefix + '="' + attrValue.xmlns + '"'; | ||
continue; | ||
Object.keys(attrObj).forEach(function (k) { | ||
var v = attrObj[k]; | ||
if (k === 'xsi_type') { | ||
var name_2 = v.type; | ||
if (v.prefix) { | ||
name_2 = v.prefix + ":" + name_2; | ||
} | ||
else { | ||
attr += ' ' + attrKey + '="' + utils_1.xmlEscape(attrObj[attrKey]) + '"'; | ||
attr += " xsi:type=\"" + name_2 + "\""; | ||
if (v.xmlns) { | ||
attr += " xmlns:" + v.prefix + "=\"" + v.xmlns + "\""; | ||
} | ||
} | ||
} | ||
else { | ||
attr += " " + k + "=\"" + utils_1.xmlEscape(v) + "\""; | ||
} | ||
}); | ||
return attr; | ||
@@ -902,0 +906,0 @@ }; |
{ | ||
"name": "soap", | ||
"version": "0.42.0", | ||
"version": "0.43.0", | ||
"description": "A minimal node SOAP client", | ||
@@ -11,8 +11,7 @@ "engines": { | ||
"axios": "^0.21.1", | ||
"axios-ntlm": "^1.1.6", | ||
"axios-ntlm": "^1.2.0", | ||
"content-type-parser": "^1.0.2", | ||
"debug": "^4.3.1", | ||
"debug": "^4.3.2", | ||
"formidable": "^1.2.2", | ||
"get-stream": "^6.0.1", | ||
"httpntlm": "^1.5.2", | ||
"lodash": "^4.17.21", | ||
@@ -51,14 +50,14 @@ "sax": ">=0.6", | ||
"devDependencies": { | ||
"@types/debug": "^4.1.2", | ||
"@types/express": "^4.16.1", | ||
"@types/lodash": "^4.14.169", | ||
"@types/debug": "^4.1.7", | ||
"@types/express": "^4.17.13", | ||
"@types/lodash": "^4.14.172", | ||
"@types/node": "^11.15.54", | ||
"@types/request": "^2.48.1", | ||
"@types/sax": "^1.0.1", | ||
"@types/uuid": "^8.3.0", | ||
"@types/request": "^2.48.7", | ||
"@types/sax": "^1.2.3", | ||
"@types/uuid": "^8.3.1", | ||
"body-parser": "^1.15.2", | ||
"colors": "^1.3.3", | ||
"coveralls": "^3.0.5", | ||
"coveralls": "^3.1.1", | ||
"diff": "^4.0.1", | ||
"doctoc": "^1.4.0", | ||
"doctoc": "^2.0.1", | ||
"duplexer": "~0.1.1", | ||
@@ -68,3 +67,3 @@ "express": "^4.16.4", | ||
"glob": "^7.1.7", | ||
"jshint": "^2.10.1", | ||
"jshint": "^2.13.1", | ||
"mocha": "^6.1.4", | ||
@@ -80,5 +79,5 @@ "nyc": "^14.1.1", | ||
"tslint": "^5.18.0", | ||
"typedoc": "^0.20.36", | ||
"typescript": "^3.3.3333" | ||
"typedoc": "^0.20.37", | ||
"typescript": "^3.9.10" | ||
} | ||
} |
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
467833
11
60
5885
- Removedhttpntlm@^1.5.2
- Removedhttpntlm@1.8.13(transitive)
- Removedhttpreq@1.1.1(transitive)
- Removedunderscore@1.12.1(transitive)
Updatedaxios-ntlm@^1.2.0
Updateddebug@^4.3.2