virtualbox-soap
Advanced tools
Comparing version 3.0.0 to 3.0.1
@@ -59,3 +59,3 @@ /* | ||
result: function(node) { | ||
if (checkParent("library")) { | ||
if (checkParent("application")) { | ||
const attributes = node.attributes; | ||
@@ -224,2 +224,10 @@ results[attributes.name] = attributes.value; | ||
const objectKeysNonEmpty = function(map) { | ||
const array = Object.keys(map); | ||
if (array.length === 0) { | ||
throw new Error("Expected a non-empty object!"); | ||
} | ||
return array; | ||
}; | ||
saxStream.on("end", function() { | ||
@@ -272,7 +280,7 @@ const output = [ | ||
]; | ||
Object.keys(enums).forEach(function(keyName) { | ||
objectKeysNonEmpty(enums).forEach(function(keyName) { | ||
output.push(`export const enum ${keyName} {`); | ||
const enumInfo = enums[keyName]; | ||
const values = enumInfo.values; | ||
Object.keys(values).forEach(function(enumName) { | ||
objectKeysNonEmpty(values).forEach(function(enumName) { | ||
output.push(`${enumName} = ${JSON.stringify(enumName)},`); | ||
@@ -282,3 +290,3 @@ }); | ||
}); | ||
Object.keys(interfaces).forEach(function(interfaceName) { | ||
objectKeysNonEmpty(interfaces).forEach(function(interfaceName) { | ||
const interfaceObject = interfaces[interfaceName]; | ||
@@ -328,3 +336,3 @@ const parentClass = interfaceObject.parent | ||
}); | ||
Object.keys(results).forEach(function(keyName) { | ||
objectKeysNonEmpty(results).forEach(function(keyName) { | ||
output.push(`export const ${keyName} = ${results[keyName]};`); | ||
@@ -331,0 +339,0 @@ }); |
{ | ||
"author": "ariatemplates <contact@ariatemplates.com> (http://github.com/ariatemplates)", | ||
"name": "virtualbox-soap", | ||
"version": "3.0.0", | ||
"version": "3.0.1", | ||
"description": "A wrapper for the SOAP API of Virtual Box.", | ||
@@ -6,0 +6,0 @@ "repository": { |
Sorry, the diff of this file is too big to display
Sorry, the diff of this file is too big to display
Sorry, the diff of this file is too big to display
4736917
15318