Comparing version 0.37.0 to 0.38.0
@@ -0,1 +1,9 @@ | ||
0.38.0 / 2021-05-14 | ||
=================== | ||
* [DOC] Remove duplicate paragraph and example code in Readme. (#1140) | ||
* [ENHANCEMENT] Add an option to for an envelopeKey for WSSecurity (#1143) | ||
* [FIX] Circular element references inside wsdl - assistance needed (#1142) | ||
* [MAINTENANCE] Bump typedoc to 0.20.36, update package-lock.json (#1141) | ||
0.37.0 / 2021-04-07 | ||
@@ -2,0 +10,0 @@ =================== |
@@ -20,2 +20,3 @@ "use strict"; | ||
exports.__esModule = true; | ||
exports.Client = void 0; | ||
var assert = require("assert"); | ||
@@ -22,0 +23,0 @@ var debugBuilder = require("debug"); |
@@ -11,7 +11,10 @@ "use strict"; | ||
if (s != null && typeof Object.getOwnPropertySymbols === "function") | ||
for (var i = 0, p = Object.getOwnPropertySymbols(s); i < p.length; i++) if (e.indexOf(p[i]) < 0) | ||
t[p[i]] = s[p[i]]; | ||
for (var i = 0, p = Object.getOwnPropertySymbols(s); i < p.length; i++) { | ||
if (e.indexOf(p[i]) < 0 && Object.prototype.propertyIsEnumerable.call(s, p[i])) | ||
t[p[i]] = s[p[i]]; | ||
} | ||
return t; | ||
}; | ||
exports.__esModule = true; | ||
exports.HttpClient = void 0; | ||
var debugBuilder = require("debug"); | ||
@@ -18,0 +21,0 @@ var httpNtlm = require("httpntlm"); |
"use strict"; | ||
exports.__esModule = true; | ||
exports.NamespaceContext = void 0; | ||
/** | ||
@@ -4,0 +5,0 @@ * Scope for XML namespaces |
"use strict"; | ||
exports.__esModule = true; | ||
exports.BasicAuthSecurity = void 0; | ||
var _ = require("lodash"); | ||
@@ -4,0 +5,0 @@ var BasicAuthSecurity = /** @class */ (function () { |
"use strict"; | ||
exports.__esModule = true; | ||
exports.BearerSecurity = void 0; | ||
var _ = require("lodash"); | ||
@@ -4,0 +5,0 @@ var BearerSecurity = /** @class */ (function () { |
"use strict"; | ||
exports.__esModule = true; | ||
exports.ClientSSLSecurity = void 0; | ||
var fs = require("fs"); | ||
@@ -4,0 +5,0 @@ var https = require("https"); |
"use strict"; | ||
exports.__esModule = true; | ||
exports.ClientSSLSecurityPFX = void 0; | ||
var fs = require("fs"); | ||
@@ -4,0 +5,0 @@ var https = require("https"); |
"use strict"; | ||
function __export(m) { | ||
for (var p in m) if (!exports.hasOwnProperty(p)) exports[p] = m[p]; | ||
} | ||
var __createBinding = (this && this.__createBinding) || (Object.create ? (function(o, m, k, k2) { | ||
if (k2 === undefined) k2 = k; | ||
Object.defineProperty(o, k2, { enumerable: true, get: function() { return m[k]; } }); | ||
}) : (function(o, m, k, k2) { | ||
if (k2 === undefined) k2 = k; | ||
o[k2] = m[k]; | ||
})); | ||
var __exportStar = (this && this.__exportStar) || function(m, exports) { | ||
for (var p in m) if (p !== "default" && !exports.hasOwnProperty(p)) __createBinding(exports, m, p); | ||
}; | ||
exports.__esModule = true; | ||
__export(require("./BasicAuthSecurity")); | ||
__export(require("./BearerSecurity")); | ||
__export(require("./ClientSSLSecurity")); | ||
__export(require("./ClientSSLSecurityPFX")); | ||
__export(require("./NTLMSecurity")); | ||
__export(require("./WSSecurity")); | ||
__export(require("./WSSecurityCert")); | ||
__exportStar(require("./BasicAuthSecurity"), exports); | ||
__exportStar(require("./BearerSecurity"), exports); | ||
__exportStar(require("./ClientSSLSecurity"), exports); | ||
__exportStar(require("./ClientSSLSecurityPFX"), exports); | ||
__exportStar(require("./NTLMSecurity"), exports); | ||
__exportStar(require("./WSSecurity"), exports); | ||
__exportStar(require("./WSSecurityCert"), exports); | ||
//# sourceMappingURL=index.js.map |
"use strict"; | ||
exports.__esModule = true; | ||
exports.NTLMSecurity = void 0; | ||
var _ = require("lodash"); | ||
@@ -4,0 +5,0 @@ var NTLMSecurity = /** @class */ (function () { |
@@ -9,2 +9,3 @@ import { ISecurity } from '../types'; | ||
mustUnderstand?: any; | ||
envelopeKey?: string; | ||
} | ||
@@ -20,4 +21,5 @@ export declare class WSSecurity implements ISecurity { | ||
private _mustUnderstand; | ||
private _envelopeKey; | ||
constructor(username: string, password: string, options?: string | IWSSecurityOptions); | ||
toXML(): string; | ||
} |
"use strict"; | ||
exports.__esModule = true; | ||
exports.WSSecurity = void 0; | ||
var crypto = require("crypto"); | ||
@@ -11,2 +12,3 @@ var utils_1 = require("../utils"); | ||
this._password = password; | ||
this._envelopeKey = 'soap'; | ||
// must account for backward compatibility for passwordType String param as well as object options defaults: passwordType = 'PasswordText', hasTimeStamp = true | ||
@@ -35,2 +37,5 @@ if (typeof options === 'string') { | ||
} | ||
if (options.envelopeKey) { | ||
this._envelopeKey = options.envelopeKey; | ||
} | ||
} | ||
@@ -80,4 +85,4 @@ WSSecurity.prototype.toXML = function () { | ||
} | ||
return '<wsse:Security ' + (this._actor ? 'soap:actor="' + this._actor + '" ' : '') + | ||
(this._mustUnderstand ? 'soap:mustUnderstand="1" ' : '') + | ||
return '<wsse:Security ' + (this._actor ? this._envelopeKey + ":actor=\"" + this._actor + "\" " : '') + | ||
(this._mustUnderstand ? this._envelopeKey + ":mustUnderstand=\"1\" " : '') + | ||
'xmlns:wsse="http://docs.oasis-open.org/wss/2004/01/oasis-200401-wss-wssecurity-secext-1.0.xsd" xmlns:wsu="http://docs.oasis-open.org/wss/2004/01/oasis-200401-wss-wssecurity-utility-1.0.xsd">' + | ||
@@ -84,0 +89,0 @@ timeStampXml + |
"use strict"; | ||
exports.__esModule = true; | ||
exports.WSSecurityCert = void 0; | ||
var uuid_1 = require("uuid"); | ||
@@ -37,4 +38,4 @@ var xml_crypto_1 = require("xml-crypto"); | ||
function WSSecurityCert(privatePEM, publicP12PEM, password, options) { | ||
var _this = this; | ||
if (options === void 0) { options = {}; } | ||
var _this = this; | ||
this.signerOptions = {}; | ||
@@ -95,3 +96,3 @@ this.additionalReferences = []; | ||
("xmlns:wsu=\"" + oasisBaseUri + "/oasis-200401-wss-wssecurity-utility-1.0.xsd\" ") + | ||
"soap:mustUnderstand=\"1\">" + | ||
(envelopeKey + ":mustUnderstand=\"1\">") + | ||
"<wsse:BinarySecurityToken " + | ||
@@ -98,0 +99,0 @@ ("EncodingType=\"" + oasisBaseUri + "/oasis-200401-wss-soap-message-security-1.0#Base64Binary\" ") + |
@@ -20,2 +20,3 @@ "use strict"; | ||
exports.__esModule = true; | ||
exports.Server = void 0; | ||
var events_1 = require("events"); | ||
@@ -22,0 +23,0 @@ var url = require("url"); |
@@ -6,3 +6,14 @@ "use strict"; | ||
*/ | ||
var __createBinding = (this && this.__createBinding) || (Object.create ? (function(o, m, k, k2) { | ||
if (k2 === undefined) k2 = k; | ||
Object.defineProperty(o, k2, { enumerable: true, get: function() { return m[k]; } }); | ||
}) : (function(o, m, k, k2) { | ||
if (k2 === undefined) k2 = k; | ||
o[k2] = m[k]; | ||
})); | ||
var __exportStar = (this && this.__exportStar) || function(m, exports) { | ||
for (var p in m) if (p !== "default" && !exports.hasOwnProperty(p)) __createBinding(exports, m, p); | ||
}; | ||
exports.__esModule = true; | ||
exports.listen = exports.createClientAsync = exports.createClient = exports.security = void 0; | ||
var debugBuilder = require("debug"); | ||
@@ -16,19 +27,20 @@ var client_1 = require("./client"); | ||
var client_2 = require("./client"); | ||
exports.Client = client_2.Client; | ||
__createBinding(exports, client_2, "Client"); | ||
var http_1 = require("./http"); | ||
exports.HttpClient = http_1.HttpClient; | ||
__createBinding(exports, http_1, "HttpClient"); | ||
var security_1 = require("./security"); | ||
exports.BasicAuthSecurity = security_1.BasicAuthSecurity; | ||
exports.BearerSecurity = security_1.BearerSecurity; | ||
exports.ClientSSLSecurity = security_1.ClientSSLSecurity; | ||
exports.ClientSSLSecurityPFX = security_1.ClientSSLSecurityPFX; | ||
exports.NTLMSecurity = security_1.NTLMSecurity; | ||
exports.WSSecurity = security_1.WSSecurity; | ||
exports.WSSecurityCert = security_1.WSSecurityCert; | ||
__createBinding(exports, security_1, "BasicAuthSecurity"); | ||
__createBinding(exports, security_1, "BearerSecurity"); | ||
__createBinding(exports, security_1, "ClientSSLSecurity"); | ||
__createBinding(exports, security_1, "ClientSSLSecurityPFX"); | ||
__createBinding(exports, security_1, "NTLMSecurity"); | ||
__createBinding(exports, security_1, "WSSecurity"); | ||
__createBinding(exports, security_1, "WSSecurityCert"); | ||
var server_2 = require("./server"); | ||
exports.Server = server_2.Server; | ||
__createBinding(exports, server_2, "Server"); | ||
var utils_1 = require("./utils"); | ||
exports.passwordDigest = utils_1.passwordDigest; | ||
__createBinding(exports, utils_1, "passwordDigest"); | ||
__exportStar(require("./types"), exports); | ||
var wsdl_2 = require("./wsdl"); | ||
exports.WSDL = wsdl_2.WSDL; | ||
__createBinding(exports, wsdl_2, "WSDL"); | ||
function createCache() { | ||
@@ -35,0 +47,0 @@ var cache = {}; |
"use strict"; | ||
exports.__esModule = true; | ||
exports.xmlEscape = exports.splitQName = exports.findPrefix = exports.TNS_PREFIX = exports.passwordDigest = void 0; | ||
var crypto = require("crypto"); | ||
@@ -4,0 +5,0 @@ function passwordDigest(nonce, created, password) { |
@@ -300,2 +300,5 @@ import { IWsdlBaseOptions } from '../types'; | ||
}; | ||
elements: { | ||
[key: string]: Element; | ||
}; | ||
}; | ||
@@ -302,0 +305,0 @@ init(): void; |
@@ -16,2 +16,3 @@ "use strict"; | ||
exports.__esModule = true; | ||
exports.ImportElement = exports.IncludeElement = exports.BodyElement = exports.DefinitionsElement = exports.ServiceElement = exports.PortElement = exports.BindingElement = exports.PortTypeElement = exports.OperationElement = exports.TypesElement = exports.SchemaElement = exports.DocumentationElement = exports.MessageElement = exports.AllElement = exports.SequenceElement = exports.SimpleContentElement = exports.ComplexContentElement = exports.ComplexTypeElement = exports.EnumerationElement = exports.ChoiceElement = exports.ExtensionElement = exports.RestrictionElement = exports.SimpleTypeElement = exports.OutputElement = exports.InputElement = exports.AnyElement = exports.ElementElement = exports.Element = void 0; | ||
var assert_1 = require("assert"); | ||
@@ -199,2 +200,3 @@ var debugBuilder = require("debug"); | ||
var typeElement = schema && (this.$type ? schema.complexTypes[typeName] || schema.types[typeName] : schema.elements[typeName]); | ||
var typeStorage = this.$type ? definitions.descriptions.types : definitions.descriptions.elements; | ||
if (ns && definitions.schemas[ns]) { | ||
@@ -204,7 +206,5 @@ xmlns = definitions.schemas[ns].xmlns; | ||
if (typeElement && !(typeName in Primitives)) { | ||
if (!(typeName in definitions.descriptions.types)) { | ||
if (!(typeName in typeStorage)) { | ||
var elem_1 = {}; | ||
if (!this.$ref) { | ||
definitions.descriptions.types[typeName] = elem_1; | ||
} | ||
typeStorage[typeName] = elem_1; | ||
var description_1 = typeElement.description(definitions, xmlns); | ||
@@ -229,10 +229,10 @@ if (typeof description_1 === 'string') { | ||
} | ||
definitions.descriptions.types[typeName] = elem_1; | ||
typeStorage[typeName] = elem_1; | ||
} | ||
else { | ||
if (this.$ref) { | ||
element = definitions.descriptions.types[typeName]; | ||
element = typeStorage[typeName]; | ||
} | ||
else { | ||
element[name] = definitions.descriptions.types[typeName]; | ||
element[name] = typeStorage[typeName]; | ||
} | ||
@@ -1102,3 +1102,4 @@ } | ||
_this.descriptions = { | ||
types: {} | ||
types: {}, | ||
elements: {} | ||
}; | ||
@@ -1105,0 +1106,0 @@ return _this; |
@@ -9,2 +9,3 @@ "use strict"; | ||
exports.__esModule = true; | ||
exports.open_wsdl = exports.WSDL = void 0; | ||
var assert_1 = require("assert"); | ||
@@ -1175,3 +1176,4 @@ var debugBuilder = require("debug"); | ||
this.definitions.descriptions = { | ||
types: {} | ||
types: {}, | ||
elements: {} | ||
}; | ||
@@ -1178,0 +1180,0 @@ this.xml = xml; |
{ | ||
"name": "soap", | ||
"version": "0.37.0", | ||
"version": "0.38.0", | ||
"description": "A minimal node SOAP client", | ||
@@ -74,5 +74,5 @@ "engines": { | ||
"tslint": "^5.18.0", | ||
"typedoc": "^0.14.2", | ||
"typedoc": "^0.20.36", | ||
"typescript": "^3.3.3333" | ||
} | ||
} |
@@ -1325,13 +1325,2 @@ # Soap [![NPM version][npm-image]][npm-url] [![Downloads][downloads-image]][npm-url] [![Build Status][travis-image]][travis-url] [![Coveralls Status][coveralls-image]][coveralls-url] [![Gitter chat][gitter-image]][gitter-url] | ||
If you want to override the default ignored namespaces you would simply pass the following `ignoredNamespaces` object within the `options`: | ||
``` | ||
var options = { | ||
ignoredNamespaces: { | ||
namespaces: ['namespaceToIgnore', 'someOtherNamespace'], | ||
override: true | ||
} | ||
} | ||
``` | ||
This would override the default `ignoredNamespaces` of the `WSDL` processor to `['namespaceToIgnore', 'someOtherNamespace']`. (This shouldn't be necessary, anyways). | ||
## Handling "ignoreBaseNameSpaces" attribute | ||
@@ -1338,0 +1327,0 @@ If an Element in a `schema` definition depends has a basenamespace defined but the request does not need that value, for example you have a "sentJob" with basenamespace "v20" |
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
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
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
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
454643
5740
1411