Comparing version 0.1.2-beta.1 to 0.1.2-beta.2
@@ -22,14 +22,18 @@ "use strict"; | ||
function extendParamsAstWithNatspec(node) { | ||
return node.parameters === null | ||
? null | ||
: node.parameters.map(function (parameter) { return (__assign(__assign({}, parameter), { natspec: parameter.name === null || node.natspec === null | ||
? '' | ||
: node.natspec.params[parameter.name] })); }); | ||
if (node.parameters === null) { | ||
return null; | ||
} | ||
return node.parameters.map(function (parameter) { return (__assign(__assign({}, parameter), { natspec: parameter.name === null || | ||
node.natspec === null || | ||
node.natspec.params === undefined | ||
? '' | ||
: node.natspec.params[parameter.name] })); }); | ||
} | ||
function extendReturnParamsAstWithNatspec(node) { | ||
return node.returnParameters === null | ||
? null | ||
: node.returnParameters.map(function (parameter) { return (__assign(__assign({}, parameter), { natspec: node.natspec === null | ||
? '' | ||
: node.natspec.return })); }); | ||
if (node.returnParameters === null || node.returnParameters === undefined) { | ||
return null; | ||
} | ||
return node.returnParameters.map(function (parameter) { return (__assign(__assign({}, parameter), { natspec: node.natspec === null | ||
? '' | ||
: node.natspec.return })); }); | ||
} | ||
@@ -61,15 +65,6 @@ /** | ||
EventDefinition: function (node) { | ||
var paramComments = new Map(); | ||
var rawComments; | ||
if (rawContractData.comments.event !== undefined) { | ||
if (rawContractData.comments.event.get(node.name) !== undefined) { | ||
paramComments = rawContractData.comments.event.get(node.name).param; | ||
rawComments = rawContractData.comments.event.get(node.name); | ||
} | ||
} | ||
contractDataWithComments.events.push({ | ||
ast: node, | ||
comments: rawComments, | ||
paramComments: paramComments, | ||
params: function () { return function (val, render) { return paramComments.get(render(val)); }; }, | ||
parameters: extendParamsAstWithNatspec(node), | ||
returnParameters: extendReturnParamsAstWithNatspec(node), | ||
}); | ||
@@ -79,11 +74,6 @@ }, | ||
if (node.isConstructor) { | ||
var paramComments_1 = new Map(); | ||
if (rawContractData.comments.constructor !== undefined) { | ||
paramComments_1 = rawContractData.comments.constructor.param; | ||
} | ||
contractDataWithComments.constructor = { | ||
ast: node, | ||
comments: rawContractData.comments.constructor, | ||
paramComments: paramComments_1, | ||
params: function () { return function (val, render) { return paramComments_1.get(render(val)); }; }, | ||
parameters: extendParamsAstWithNatspec(node), | ||
returnParameters: extendReturnParamsAstWithNatspec(node), | ||
}; | ||
@@ -90,0 +80,0 @@ } |
{ | ||
"name": "soldoc", | ||
"version": "0.1.2-beta.1", | ||
"version": "0.1.2-beta.2", | ||
"description": "An html page and pdf solidity documentation generator, based in NatSpec format.", | ||
@@ -5,0 +5,0 @@ "main": "dist/index.js", |
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
Major refactor
Supply chain riskPackage has recently undergone a major refactor. It may be unstable or indicate significant internal changes. Use caution when updating to versions that include significant changes.
Found 1 instance in 1 package
0
112606
677