@saptools/service-flow 0.1.60 → 0.1.61
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.
- package/CHANGELOG.md +5 -0
- package/dist/cli.js +8 -2
- package/dist/cli.js.map +1 -1
- package/package.json +1 -1
- package/src/parsers/symbol-parser.ts +11 -1
package/package.json
CHANGED
|
@@ -242,7 +242,17 @@ export async function parseExecutableSymbols(
|
|
|
242
242
|
if (localName) addSymbol('method', localName, node, parentClass);
|
|
243
243
|
} else if (ts.isPropertyDeclaration(node) && parentClass && node.initializer && (ts.isArrowFunction(node.initializer) || ts.isFunctionExpression(node.initializer))) {
|
|
244
244
|
const localName = nameOf(node.name);
|
|
245
|
-
if (localName)
|
|
245
|
+
if (localName) {
|
|
246
|
+
const flags = ts.getCombinedModifierFlags(node);
|
|
247
|
+
const staticPublicExported = exportedClasses.has(parentClass) && (flags & ts.ModifierFlags.Static) !== 0 && (flags & ts.ModifierFlags.Private) === 0 && (flags & ts.ModifierFlags.Protected) === 0;
|
|
248
|
+
const isArrow = ts.isArrowFunction(node.initializer);
|
|
249
|
+
const memberKind = isArrow
|
|
250
|
+
? (staticPublicExported ? 'static_arrow_function' : 'arrow_function_property')
|
|
251
|
+
: (staticPublicExported ? 'static_function_expression' : 'function_expression_property');
|
|
252
|
+
addSymbol('method', localName, node.initializer, parentClass, staticPublicExported ? `${parentClass}.${localName}` : undefined, staticPublicExported
|
|
253
|
+
? { source: 'exported_class_member', exportedClass: parentClass, memberKind }
|
|
254
|
+
: { source: 'class_property_function', memberKind });
|
|
255
|
+
}
|
|
246
256
|
} else if (ts.isFunctionDeclaration(node) && node.name) addSymbol('function', node.name.text, node, undefined, exported(node) ? node.name.text : undefined);
|
|
247
257
|
else if (ts.isVariableStatement(node)) {
|
|
248
258
|
for (const d of node.declarationList.declarations) {
|