sol2uml 2.1.9 → 2.2.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
@@ -265,6 +265,7 @@ function parseContractDefinition(umlClass, node) {
265
265
  stereotype,
266
266
  parameters: parseParameters(subNode.parameters),
267
267
  returnParameters: parseParameters(subNode.returnParameters),
268
+ modifiers: subNode.modifiers.map((m) => m.name),
268
269
  });
269
270
  }
270
271
  // Recursively parse function parameters for associations
@@ -175,6 +175,9 @@ const dotOperators = (umlClass, vizGroup, operators, options) => {
175
175
  if (operator.returnParameters?.length > 0) {
176
176
  dotString += ': ' + dotParameters(operator.returnParameters, true);
177
177
  }
178
+ if (options.hideModifiers === false && operator.modifiers?.length > 0) {
179
+ dotString += ` \\<\\<${operator.modifiers.join(', ')}\\>\\>`;
180
+ }
178
181
  dotString += '\\l';
179
182
  }
180
183
  return dotString;
package/lib/umlClass.d.ts CHANGED
@@ -53,6 +53,7 @@ export interface Operator extends Attribute {
53
53
  parameters?: Parameter[];
54
54
  returnParameters?: Parameter[];
55
55
  isPayable?: boolean;
56
+ modifiers?: string[];
56
57
  }
57
58
  export declare enum ReferenceType {
58
59
  Memory = 0,
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "sol2uml",
3
- "version": "2.1.9",
3
+ "version": "2.2.0",
4
4
  "description": "Solidity contract visualisation tool.",
5
5
  "main": "./lib/index.js",
6
6
  "types": "./lib/index.d.ts",