diff --git a/.gitignore b/.gitignore index aacf0c0..43e1e76 100644 --- a/.gitignore +++ b/.gitignore @@ -1,3 +1,4 @@ node_modules/ p.js -*.svclog \ No newline at end of file +*.svclog +package-lock.json diff --git a/lib/ws.js b/lib/ws.js index 082b1c4..7fe851b 100644 --- a/lib/ws.js +++ b/lib/ws.js @@ -49,8 +49,8 @@ function addAttachment(ctx, property, xpath, file, contentType) { , doc = new Dom().parseFromString(prop) , elem = select(doc, xpath)[0]; var content; - - if (Buffer.isBuffer(file) content = file.toString("base64"); + + if (Buffer.isBuffer(file)) content = file.toString("base64"); else content = fs.readFileSync(file).toString("base64") utils.setElementValue(doc, elem, content) diff --git a/lib/xpath.js b/lib/xpath.js index 2230a71..38b09d4 100644 --- a/lib/xpath.js +++ b/lib/xpath.js @@ -3274,7 +3274,7 @@ NamespaceResolver.prototype.getNamespace = function(prefix, n) { // Functions ///////////////////////////////////////////////////////////////// -Functions = new Object(); +var Functions = new Object(); Functions.last = function() { var c = arguments[0]; @@ -3645,7 +3645,7 @@ Functions.round = function() { // Utilities ///////////////////////////////////////////////////////////////// -Utilities = new Object(); +var Utilities = new Object(); Utilities.splitQName = function(qn) { var i = qn.indexOf(":"); @@ -4286,4 +4286,4 @@ function SelectNodes(doc, xpath) return res.toArray(); } -exports.SelectNodes = SelectNodes; \ No newline at end of file +exports.SelectNodes = SelectNodes; diff --git a/package.json b/package.json index a8d71ea..56603dd 100644 --- a/package.json +++ b/package.json @@ -1,30 +1,47 @@ -{ - "name": "ws.js", - "version": "2.0.23", - "description": "WS-* implementation for node", - "engines": { "node": ">=0.4.0" }, - "author": "Yaron Naveh (yaronn01@gmail.com, http://webservices20.blogspot.com/)", - "dependencies": { - "bufferjs": ">= 1.0.2", - "formidable": "=1.1.1", - "request": ">=2.9.100", - "xmldom": "=0.1.7", - "dateformat": ">=1.0.2-1.2.3", - "xml-crypto": ">=0.0.4" - }, - "devDependencies": { - "nodeunit": ">=0.6.4" - }, - "repository" : { - "type":"git", - "url":"https://github.com/yaronn/ws.js.git" }, - "main": "./index.js", - "scripts": { - "test": "nodeunit ./test/unit ./test/unit/client ./test/integration/client/signature.js" - }, - "directories": { "lib": "./lib" }, - "keywords": ["ws-security", "mtom", "ws-addressing", "ws-star", "ws-*", "web service standards", "wsdl", "soap"], - "licenses": [{ - "type" : "MIT License", - "url" : "http://www.opensource.org/licenses/mit-license.php" }] -} +{ + "name": "ws.js", + "version": "2.0.24", + "description": "WS-* implementation for node", + "engines": { + "node": ">=0.4.0" + }, + "author": "Yaron Naveh (yaronn01@gmail.com, http://webservices20.blogspot.com/)", + "dependencies": { + "bufferjs": ">= 1.0.2", + "dateformat": ">=1.0.2-1.2.3", + "formidable": "=1.1.1", + "request": ">=2.9.100", + "xml-crypto": ">=0.0.4", + "xmldom": "0.1.19" + }, + "devDependencies": { + "nodeunit": ">=0.6.4" + }, + "repository": { + "type": "git", + "url": "https://github.com/yaronn/ws.js.git" + }, + "main": "./index.js", + "scripts": { + "test": "nodeunit ./test/unit ./test/unit/client ./test/integration/client/signature.js" + }, + "directories": { + "lib": "./lib" + }, + "keywords": [ + "ws-security", + "mtom", + "ws-addressing", + "ws-star", + "ws-*", + "web service standards", + "wsdl", + "soap" + ], + "licenses": [ + { + "type": "MIT License", + "url": "http://www.opensource.org/licenses/mit-license.php" + } + ] +}