@supernovaio/cli 2.0.39 → 2.0.41

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.
Files changed (143) hide show
  1. package/dist/code-analyzer/analyzers/component-usage.d.ts +6 -0
  2. package/dist/code-analyzer/analyzers/component-usage.d.ts.map +1 -0
  3. package/dist/code-analyzer/analyzers/component-usage.js +344 -0
  4. package/dist/code-analyzer/analyzers/component-usage.js.map +1 -0
  5. package/dist/code-analyzer/analyzers/helpers.d.ts +11 -0
  6. package/dist/code-analyzer/analyzers/helpers.d.ts.map +1 -0
  7. package/dist/code-analyzer/analyzers/helpers.js +59 -0
  8. package/dist/code-analyzer/analyzers/helpers.js.map +1 -0
  9. package/dist/code-analyzer/analyzers/index.d.ts +8 -0
  10. package/dist/code-analyzer/analyzers/index.d.ts.map +1 -0
  11. package/dist/code-analyzer/analyzers/index.js +11 -0
  12. package/dist/code-analyzer/analyzers/index.js.map +1 -0
  13. package/dist/code-analyzer/analyzers/jsdoc.d.ts +3 -0
  14. package/dist/code-analyzer/analyzers/jsdoc.d.ts.map +1 -0
  15. package/dist/code-analyzer/analyzers/jsdoc.js +7 -0
  16. package/dist/code-analyzer/analyzers/jsdoc.js.map +1 -0
  17. package/dist/code-analyzer/analyzers/static-components.d.ts +3 -0
  18. package/dist/code-analyzer/analyzers/static-components.d.ts.map +1 -0
  19. package/dist/code-analyzer/analyzers/static-components.js +399 -0
  20. package/dist/code-analyzer/analyzers/static-components.js.map +1 -0
  21. package/dist/code-analyzer/analyzers/storybook-docs.d.ts +3 -0
  22. package/dist/code-analyzer/analyzers/storybook-docs.d.ts.map +1 -0
  23. package/dist/code-analyzer/analyzers/storybook-docs.js +163 -0
  24. package/dist/code-analyzer/analyzers/storybook-docs.js.map +1 -0
  25. package/dist/code-analyzer/analyzers/storybook-stories.d.ts +3 -0
  26. package/dist/code-analyzer/analyzers/storybook-stories.d.ts.map +1 -0
  27. package/dist/code-analyzer/analyzers/storybook-stories.js +91 -0
  28. package/dist/code-analyzer/analyzers/storybook-stories.js.map +1 -0
  29. package/dist/code-analyzer/analyzers/types.d.ts +88 -0
  30. package/dist/code-analyzer/analyzers/types.d.ts.map +1 -0
  31. package/dist/code-analyzer/analyzers/types.js +12 -0
  32. package/dist/code-analyzer/analyzers/types.js.map +1 -0
  33. package/dist/code-analyzer/analyzers/typescript-api.d.ts +3 -0
  34. package/dist/code-analyzer/analyzers/typescript-api.d.ts.map +1 -0
  35. package/dist/code-analyzer/analyzers/typescript-api.js +7 -0
  36. package/dist/code-analyzer/analyzers/typescript-api.js.map +1 -0
  37. package/dist/code-analyzer/components/analyze.d.ts +8 -0
  38. package/dist/code-analyzer/components/analyze.d.ts.map +1 -0
  39. package/dist/code-analyzer/components/analyze.js +38 -0
  40. package/dist/code-analyzer/components/analyze.js.map +1 -0
  41. package/dist/code-analyzer/components/mappers/component.d.ts +4 -0
  42. package/dist/code-analyzer/components/mappers/component.d.ts.map +1 -0
  43. package/dist/code-analyzer/components/mappers/component.js +20 -0
  44. package/dist/code-analyzer/components/mappers/component.js.map +1 -0
  45. package/dist/code-analyzer/components/mappers/property.d.ts +4 -0
  46. package/dist/code-analyzer/components/mappers/property.d.ts.map +1 -0
  47. package/dist/code-analyzer/components/mappers/property.js +19 -0
  48. package/dist/code-analyzer/components/mappers/property.js.map +1 -0
  49. package/dist/code-analyzer/components/parser/index.d.ts +6 -0
  50. package/dist/code-analyzer/components/parser/index.d.ts.map +1 -0
  51. package/dist/code-analyzer/components/parser/index.js +9 -0
  52. package/dist/code-analyzer/components/parser/index.js.map +1 -0
  53. package/dist/code-analyzer/components/parser/module-parser.d.ts +12 -0
  54. package/dist/code-analyzer/components/parser/module-parser.d.ts.map +1 -0
  55. package/dist/code-analyzer/components/parser/module-parser.js +116 -0
  56. package/dist/code-analyzer/components/parser/module-parser.js.map +1 -0
  57. package/dist/code-analyzer/components/parser/parser.d.ts +46 -0
  58. package/dist/code-analyzer/components/parser/parser.d.ts.map +1 -0
  59. package/dist/code-analyzer/components/parser/parser.js +904 -0
  60. package/dist/code-analyzer/components/parser/parser.js.map +1 -0
  61. package/dist/code-analyzer/components/parser/types.d.ts +123 -0
  62. package/dist/code-analyzer/components/parser/types.d.ts.map +1 -0
  63. package/dist/code-analyzer/components/parser/types.js +21 -0
  64. package/dist/code-analyzer/components/parser/types.js.map +1 -0
  65. package/dist/code-analyzer/components/parser/utils/build-filter.d.ts +3 -0
  66. package/dist/code-analyzer/components/parser/utils/build-filter.d.ts.map +1 -0
  67. package/dist/code-analyzer/components/parser/utils/build-filter.js +31 -0
  68. package/dist/code-analyzer/components/parser/utils/build-filter.js.map +1 -0
  69. package/dist/code-analyzer/components/parser/utils/filter-duplicates.d.ts +3 -0
  70. package/dist/code-analyzer/components/parser/utils/filter-duplicates.d.ts.map +1 -0
  71. package/dist/code-analyzer/components/parser/utils/filter-duplicates.js +17 -0
  72. package/dist/code-analyzer/components/parser/utils/filter-duplicates.js.map +1 -0
  73. package/dist/code-analyzer/components/parser/utils/is-react-component.d.ts +4 -0
  74. package/dist/code-analyzer/components/parser/utils/is-react-component.d.ts.map +1 -0
  75. package/dist/code-analyzer/components/parser/utils/is-react-component.js +43 -0
  76. package/dist/code-analyzer/components/parser/utils/is-react-component.js.map +1 -0
  77. package/dist/code-analyzer/components/parser/utils/trim-file-name.d.ts +2 -0
  78. package/dist/code-analyzer/components/parser/utils/trim-file-name.d.ts.map +1 -0
  79. package/dist/code-analyzer/components/parser/utils/trim-file-name.js +22 -0
  80. package/dist/code-analyzer/components/parser/utils/trim-file-name.js.map +1 -0
  81. package/dist/code-analyzer/components/types.d.ts +18 -0
  82. package/dist/code-analyzer/components/types.d.ts.map +1 -0
  83. package/dist/code-analyzer/components/types.js +5 -0
  84. package/dist/code-analyzer/components/types.js.map +1 -0
  85. package/dist/code-analyzer/components/utils/get-module-exports-path.d.ts +2 -0
  86. package/dist/code-analyzer/components/utils/get-module-exports-path.d.ts.map +1 -0
  87. package/dist/code-analyzer/components/utils/get-module-exports-path.js +60 -0
  88. package/dist/code-analyzer/components/utils/get-module-exports-path.js.map +1 -0
  89. package/dist/code-analyzer/index.d.ts +5 -0
  90. package/dist/code-analyzer/index.d.ts.map +1 -0
  91. package/dist/code-analyzer/index.js +8 -0
  92. package/dist/code-analyzer/index.js.map +1 -0
  93. package/dist/code-analyzer/orchestrator/index.d.ts +2 -0
  94. package/dist/code-analyzer/orchestrator/index.d.ts.map +1 -0
  95. package/dist/code-analyzer/orchestrator/index.js +5 -0
  96. package/dist/code-analyzer/orchestrator/index.js.map +1 -0
  97. package/dist/code-analyzer/orchestrator/run-analysis.d.ts +19 -0
  98. package/dist/code-analyzer/orchestrator/run-analysis.d.ts.map +1 -0
  99. package/dist/code-analyzer/orchestrator/run-analysis.js +109 -0
  100. package/dist/code-analyzer/orchestrator/run-analysis.js.map +1 -0
  101. package/dist/code-analyzer/snapshot/index.d.ts +2 -0
  102. package/dist/code-analyzer/snapshot/index.d.ts.map +1 -0
  103. package/dist/code-analyzer/snapshot/index.js +5 -0
  104. package/dist/code-analyzer/snapshot/index.js.map +1 -0
  105. package/dist/code-analyzer/snapshot/write-snapshot.d.ts +17 -0
  106. package/dist/code-analyzer/snapshot/write-snapshot.d.ts.map +1 -0
  107. package/dist/code-analyzer/snapshot/write-snapshot.js +60 -0
  108. package/dist/code-analyzer/snapshot/write-snapshot.js.map +1 -0
  109. package/dist/commands/analyze.d.ts +0 -1
  110. package/dist/commands/analyze.d.ts.map +1 -1
  111. package/dist/commands/analyze.js +25 -5
  112. package/dist/commands/analyze.js.map +1 -1
  113. package/dist/commands/components-import.js +3 -3
  114. package/dist/commands/components-import.js.map +1 -1
  115. package/dist/commands/publish-documentation.d.ts +2 -2
  116. package/dist/commands/run-local-exporter.js +2 -2
  117. package/dist/commands/run-local-exporter.js.map +1 -1
  118. package/dist/commands/storybook-import.d.ts +2 -2
  119. package/dist/commands/template-upload.d.ts +1 -0
  120. package/dist/commands/template-upload.d.ts.map +1 -1
  121. package/dist/commands/template-upload.js +57 -18
  122. package/dist/commands/template-upload.js.map +1 -1
  123. package/dist/docker-scripts/extract-private-packages-tarball.js +282 -0
  124. package/dist/types/config.d.ts +5 -5
  125. package/dist/types/types.js +2 -2
  126. package/dist/types/types.js.map +1 -1
  127. package/dist/utils/analyze-command.d.ts.map +1 -1
  128. package/dist/utils/analyze-command.js +30 -3
  129. package/dist/utils/analyze-command.js.map +1 -1
  130. package/dist/utils/discover.d.ts +2 -2
  131. package/dist/utils/discover.d.ts.map +1 -1
  132. package/dist/utils/discover.js +25 -23
  133. package/dist/utils/discover.js.map +1 -1
  134. package/dist/utils/figma-tokens-data-loader.js +2 -2
  135. package/dist/utils/figma-tokens-data-loader.js.map +1 -1
  136. package/dist/utils/run-exporter/exporter-utils.js +2 -2
  137. package/dist/utils/run-exporter/exporter-utils.js.map +1 -1
  138. package/dist/utils/validate-templates.d.ts +1 -1
  139. package/dist/utils/validate-templates.d.ts.map +1 -1
  140. package/dist/utils/validate-templates.js +4 -4
  141. package/dist/utils/validate-templates.js.map +1 -1
  142. package/oclif.manifest.json +13 -5
  143. package/package.json +8 -3
@@ -0,0 +1 @@
1
+ {"version":3,"file":"parser.js","sources":["../../../../src/code-analyzer/components/parser/parser.ts"],"sourceRoot":"","sourcesContent":["import path from \"node:path\"\nimport type { SymbolDisplayPart } from \"typescript\"\nimport * as ts from \"typescript\"\n\nimport {\n Component,\n ComponentDoc,\n ComponentNameResolver,\n InterfaceOrTypeAliasDeclaration,\n JSDoc,\n Method,\n MethodParameter,\n ParentType,\n ParserOptions,\n PropFilter,\n PropItemType,\n Props,\n ResolvedType,\n ResolvedTypeKind,\n StringIndexedObject,\n} from \"./types.js\"\nimport { buildFilter } from \"./utils/build-filter.js\"\nimport { isReactComponent } from \"./utils/is-react-component.js\"\nimport { trimFileName } from \"./utils/trim-file-name.js\"\n\nexport const defaultOptions: ts.CompilerOptions = {\n jsx: ts.JsxEmit.React,\n module: ts.ModuleKind.CommonJS,\n target: ts.ScriptTarget.Latest,\n}\n\nconst isOptional = (prop: ts.Symbol) =>\n // tslint:disable-next-line:no-bitwise\n // eslint-disable-next-line no-bitwise\n (prop.getFlags() & ts.SymbolFlags.Optional) !== 0\n\nconst defaultJSDoc: JSDoc = {\n description: \"\",\n fullComment: \"\",\n tags: {},\n}\n\nexport class Parser {\n private readonly checker: ts.TypeChecker\n private readonly propFilter: PropFilter\n private readonly savePropValueAsString: boolean\n private readonly shouldExtractLiteralValuesFromEnum: boolean\n private readonly shouldExtractValuesFromUnion: boolean\n private readonly shouldIncludeExpression: boolean\n private readonly shouldIncludePropTagMap: boolean\n private readonly shouldRemoveUndefinedFromOptional: boolean\n private readonly shouldSortUnions: boolean\n\n constructor(program: ts.Program, opts: ParserOptions) {\n const {\n savePropValueAsString,\n shouldExtractLiteralValuesFromEnum,\n shouldExtractValuesFromUnion,\n shouldIncludeExpression,\n shouldIncludePropTagMap,\n shouldRemoveUndefinedFromOptional,\n shouldSortUnions,\n } = opts\n this.checker = program.getTypeChecker()\n this.propFilter = buildFilter(opts)\n this.shouldExtractLiteralValuesFromEnum = Boolean(shouldExtractLiteralValuesFromEnum)\n this.shouldRemoveUndefinedFromOptional = Boolean(shouldRemoveUndefinedFromOptional)\n this.shouldExtractValuesFromUnion = Boolean(shouldExtractValuesFromUnion)\n this.shouldSortUnions = Boolean(shouldSortUnions)\n this.savePropValueAsString = Boolean(savePropValueAsString)\n this.shouldIncludePropTagMap = Boolean(shouldIncludePropTagMap)\n this.shouldIncludeExpression = Boolean(shouldIncludeExpression)\n }\n\n public extractDefaultPropsFromComponent(symbol: ts.Symbol, source: ts.SourceFile) {\n const possibleStatements = [\n ...source.statements\n // ensure that name property is available\n .filter(stmt => Boolean((stmt as ts.ClassDeclaration).name))\n .filter(stmt => this.checker.getSymbolAtLocation((stmt as ts.ClassDeclaration).name!) === symbol),\n ...source.statements.filter(stmt => ts.isExpressionStatement(stmt) || ts.isVariableStatement(stmt)),\n ]\n\n return possibleStatements.reduce((res, statement) => {\n if (statementIsClassDeclaration(statement) && statement.members.length > 0) {\n const possibleDefaultProps = statement.members.filter(\n member => member.name && getPropertyName(member.name) === \"defaultProps\",\n )\n\n if (possibleDefaultProps.length === 0) {\n return res\n }\n\n const defaultProps = possibleDefaultProps[0]\n let { initializer } = defaultProps as ts.PropertyDeclaration\n if (!initializer) {\n return res\n }\n\n let { properties } = initializer as ts.ObjectLiteralExpression\n\n while (ts.isIdentifier(initializer as ts.Identifier)) {\n const defaultPropsReference = this.checker.getSymbolAtLocation(initializer as ts.Node)\n if (defaultPropsReference) {\n const declarations = defaultPropsReference.getDeclarations()\n\n if (declarations) {\n if (ts.isImportSpecifier(declarations[0])) {\n const symbol = this.checker.getSymbolAtLocation(declarations[0].name)\n if (!symbol) {\n continue\n }\n\n const aliasedSymbol = this.checker.getAliasedSymbol(symbol)\n if (aliasedSymbol && aliasedSymbol.declarations && aliasedSymbol.declarations.length > 0) {\n initializer = (aliasedSymbol.declarations[0] as ts.VariableDeclaration).initializer\n } else {\n continue\n }\n } else {\n initializer = (declarations[0] as ts.VariableDeclaration).initializer\n }\n\n properties = (initializer as ts.ObjectLiteralExpression).properties\n }\n }\n }\n\n let propMap = {}\n\n if (properties) {\n propMap = this.getPropMap(properties as ts.NodeArray<ts.PropertyAssignment>)\n }\n\n return {\n ...res,\n ...propMap,\n }\n }\n\n if (statementIsStatelessWithDefaultProps(statement)) {\n let propMap = {}\n for (const child of (statement as ts.ExpressionStatement).getChildren()) {\n let { right } = child as ts.BinaryExpression\n\n if (right && ts.isIdentifier(right)) {\n const value = ((source as any).locals as ts.SymbolTable).get(right.escapedText)\n\n if (\n value &&\n value.valueDeclaration &&\n ts.isVariableDeclaration(value.valueDeclaration) &&\n value.valueDeclaration.initializer\n ) {\n right = value.valueDeclaration.initializer\n }\n }\n\n if (right) {\n const { properties } = right as ts.ObjectLiteralExpression\n if (properties) {\n propMap = this.getPropMap(properties as ts.NodeArray<ts.PropertyAssignment>)\n }\n }\n }\n\n return {\n ...res,\n ...propMap,\n }\n }\n\n const functionStatement = this.getFunctionStatement(statement)\n\n // Extracting default values from props destructuring\n if (functionStatement && functionStatement.parameters && functionStatement.parameters.length > 0) {\n const { name } = functionStatement.parameters[0]\n\n if (ts.isObjectBindingPattern(name)) {\n return {\n ...res,\n ...this.getPropMap(name.elements),\n }\n }\n }\n\n return res\n }, {})\n }\n\n public extractMembersFromType(type: ts.Type): ts.Symbol[] {\n const methodSymbols: ts.Symbol[] = []\n\n /**\n * Need to loop over properties first so we capture any\n * static methods. static methods aren't captured in type.symbol.members\n */\n for (const property of type.getProperties()) {\n // Only add members, don't add non-member properties\n if (this.getCallSignature(property)) {\n methodSymbols.push(property)\n }\n }\n\n if (type.symbol && type.symbol.members) {\n for (const [_, member] of type.symbol.members) {\n methodSymbols.push(member)\n }\n }\n\n return methodSymbols\n }\n\n public extractPropsFromTypeIfStatefulComponent(type: ts.Type): null | ts.Symbol {\n const constructSignatures = type.getConstructSignatures()\n\n if (constructSignatures.length > 0) {\n // React.Component. Is a class, so the props object we're interested\n // in is the type of 'props' property of the object constructed by the class.\n\n for (const sig of constructSignatures) {\n const instanceType = sig.getReturnType()\n\n const props = instanceType.getProperty(\"props\")\n\n if (props) {\n return props\n }\n }\n }\n\n return null\n }\n\n public extractPropsFromTypeIfStatelessComponent(type: ts.Type): null | ts.Symbol {\n const callSignatures = type.getCallSignatures()\n\n if (callSignatures.length > 0) {\n // Could be a stateless component. Is a function, so the props object we're interested\n // in is the (only) parameter.\n\n for (const sig of callSignatures) {\n const params = sig.getParameters()\n if (params.length === 0) {\n continue\n }\n\n // Maybe we could check return type instead,\n // but not sure if Element, ReactElement<T> are all possible values\n const propsParam = params[0]\n if (propsParam.name === \"props\" || params.length === 1) {\n return propsParam\n }\n }\n }\n\n return null\n }\n\n public findDocComment(symbol: ts.Symbol): JSDoc {\n const comment = this.getFullJsDocComment(symbol)\n if (comment.fullComment || comment.tags.default) {\n return comment\n }\n\n const rootSymbols = this.checker.getRootSymbols(symbol)\n const commentsOnRootSymbols = rootSymbols\n .filter(x => x !== symbol)\n .map(x => this.getFullJsDocComment(x))\n .filter(x => Boolean(x.fullComment) || Boolean(comment.tags.default))\n\n if (commentsOnRootSymbols.length > 0) {\n return commentsOnRootSymbols[0]\n }\n\n return defaultJSDoc\n }\n\n public getCallSignature(symbol: ts.Symbol) {\n const symbolType = this.checker.getTypeOfSymbolAtLocation(symbol, symbol.valueDeclaration!)\n\n return symbolType.getCallSignatures()[0]\n }\n\n public getComponentInfo(\n exp: ts.Symbol,\n source: ts.SourceFile,\n componentNameResolver: ComponentNameResolver = () => undefined,\n customComponentTypes: ParserOptions[\"customComponentTypes\"] = [],\n ): ComponentDoc | null {\n const rootExportName = exp.getName()\n if (exp.declarations && exp.declarations.length === 0) {\n return null\n }\n\n let rootExp = this.getComponentFromExpression(exp)\n const declaration = rootExp.valueDeclaration || rootExp.declarations![0]\n const type = this.checker.getTypeOfSymbolAtLocation(rootExp, declaration)\n\n let commentSource = rootExp\n const typeSymbol = type.symbol || type.aliasSymbol\n const originalName = rootExp.getName()\n\n // get file path of aliased symbol. E.g. when there is named export we want to get filename of exported symbol not the file that declares the named export\n const filePath =\n exp.flags & ts.SymbolFlags.Alias\n ? this.checker.getAliasedSymbol(exp).declarations?.[0]?.getSourceFile().fileName || source.fileName\n : source.fileName\n\n if (!rootExp.valueDeclaration) {\n if (!typeSymbol && (rootExp.flags & ts.SymbolFlags.Alias) !== 0) {\n commentSource = this.checker.getAliasedSymbol(commentSource)\n } else if (typeSymbol) {\n rootExp = typeSymbol\n const expName = rootExp.getName()\n\n const defaultComponentTypes = [\n \"__function\",\n \"StatelessComponent\",\n \"Stateless\",\n \"StyledComponentClass\",\n \"StyledComponent\",\n \"IStyledComponent\",\n \"FunctionComponent\",\n \"ForwardRefExoticComponent\",\n \"MemoExoticComponent\",\n ]\n\n const supportedComponentTypes = [...defaultComponentTypes, ...customComponentTypes]\n\n commentSource = supportedComponentTypes.includes(expName)\n ? this.checker.getAliasedSymbol(commentSource)\n : rootExp\n } else {\n return null\n }\n } else if (type.symbol && (ts.isPropertyAccessExpression(declaration) || ts.isPropertyDeclaration(declaration))) {\n commentSource = type.symbol\n }\n\n // Skip over PropTypes that are exported\n if (typeSymbol && (typeSymbol.getEscapedName() === \"Requireable\" || typeSymbol.getEscapedName() === \"Validator\")) {\n return null\n }\n\n const propsType =\n this.extractPropsFromTypeIfStatelessComponent(type) || this.extractPropsFromTypeIfStatefulComponent(type)\n\n const nameSource = originalName === \"default\" ? rootExp : commentSource\n\n const resolvedComponentName = componentNameResolver(nameSource, source)\n const { description, tags } = this.findDocComment(commentSource)\n\n const exportName = computeComponentExportName(nameSource, source, customComponentTypes, rootExportName)\n\n const displayName = resolvedComponentName || tags.visibleName || computeComponentDisplayName(nameSource, source)\n\n const methods = this.getMethodsInfo(type)\n\n let result: ComponentDoc | null = null\n\n if (propsType) {\n // if there is no value declaration then don't pick up default props\n const defaultProps = commentSource.valueDeclaration\n ? this.extractDefaultPropsFromComponent(commentSource, commentSource.valueDeclaration.getSourceFile())\n : {}\n const props = this.getPropsInfo(propsType, defaultProps)\n\n for (const propName of Object.keys(props)) {\n const prop = props[propName]\n const component: Component = { name: exportName }\n if (!this.propFilter(prop, component)) {\n delete props[propName]\n }\n }\n\n result = {\n description,\n displayName,\n exportName,\n filePath,\n methods,\n props,\n tags,\n }\n } else if (exportName) {\n result = {\n description,\n displayName,\n exportName,\n filePath,\n methods,\n props: {},\n tags,\n }\n }\n\n if (result !== null && this.shouldIncludeExpression) {\n result.expression = rootExp\n result.rootExpression = exp\n }\n\n return result\n }\n\n /**\n * Gets the TypeScript type structure for a given type\n */\n public getResolvedType({\n propType,\n skipUndefinedInUnion,\n visitedTypes = new Set(),\n }: {\n propType: ts.Type\n skipUndefinedInUnion?: boolean\n visitedTypes?: Set<string>\n }): ResolvedType {\n const typeString = this.checker.typeToString(propType)\n const raw = typeString\n\n // Prevent infinite recursion\n if (visitedTypes.has(typeString)) {\n return { kind: ResolvedTypeKind.Any, raw }\n }\n\n // Add current type to visited set\n const newVisitedTypes = new Set(visitedTypes)\n newVisitedTypes.add(typeString)\n\n // Handle function types\n if (propType.getCallSignatures().length > 0) {\n return { kind: ResolvedTypeKind.Function, raw }\n }\n\n // Handle React node types\n if (/^(ReactNode|ReactElement|Element)<?.*$/i.test(typeString)) {\n return { kind: ResolvedTypeKind.Slot, raw }\n }\n\n // we need to check if the type is not boolean because boolean is recognized as union\n if (propType.isUnion() && (propType.flags & ts.TypeFlags.Boolean) === 0) {\n const types = propType.types\n .filter(type => {\n if (skipUndefinedInUnion && type.flags & ts.TypeFlags.Undefined) {\n return false\n }\n\n return true\n })\n .map(subType => this.getResolvedType({ propType: subType, visitedTypes: newVisitedTypes }))\n .filter((type): type is ResolvedType => type !== null)\n\n if (types.length === 1) {\n return types[0]\n }\n\n return {\n kind: ResolvedTypeKind.Union,\n raw: skipUndefinedInUnion ? raw.replaceAll(\" | undefined\", \"\") : raw,\n types,\n }\n }\n\n if (propType.isIntersection()) {\n const isEverySubTypeObject = propType.types.every(subType => subType.flags & ts.TypeFlags.Object)\n\n if (isEverySubTypeObject) {\n return {\n kind: ResolvedTypeKind.Object,\n raw,\n }\n }\n\n return {\n kind: ResolvedTypeKind.Any,\n raw,\n }\n }\n\n // Handle array types\n if (this.checker.isArrayType(propType)) {\n // Get the element type of the array\n const elementType = this.checker.getTypeArguments(propType as ts.TypeReference)[0]\n const baseType = this.getResolvedType({ propType: elementType, visitedTypes: newVisitedTypes })\n return {\n ...baseType,\n raw,\n isArray: true,\n }\n }\n\n // literal string type e.g. \"Hello\", \"World\"\n if (propType.isStringLiteral()) {\n return { kind: ResolvedTypeKind.StringLiteral, raw: raw.replaceAll('\"', \"\") }\n }\n\n // Handle primitive types\n if ((propType.flags & ts.TypeFlags.String) !== 0) {\n return { kind: ResolvedTypeKind.String, raw }\n }\n\n // literal number type e.g. 1, 2, 3\n if (propType.isNumberLiteral()) {\n return { kind: ResolvedTypeKind.NumberLiteral, raw }\n }\n\n if ((propType.flags & ts.TypeFlags.Number) !== 0) {\n return { kind: ResolvedTypeKind.Number, raw }\n }\n\n // literal type, e.g. true, false\n if ((propType.flags & ts.TypeFlags.BooleanLiteral) !== 0) {\n return { kind: ResolvedTypeKind.BooleanLiteral, raw }\n }\n\n if ((propType.flags & ts.TypeFlags.Boolean) !== 0) {\n return { kind: ResolvedTypeKind.Boolean, raw }\n }\n\n if ((propType.flags & ts.TypeFlags.Null) !== 0) {\n return { kind: ResolvedTypeKind.Null, raw }\n }\n\n if ((propType.flags & ts.TypeFlags.Undefined) !== 0) {\n return { kind: ResolvedTypeKind.Undefined, raw }\n }\n\n // Handle object types\n if ((propType.flags & ts.TypeFlags.Object) !== 0) {\n const rawDeclaration = propType.symbol?.declarations?.[0]?.getText()\n const isDeclarationFromReact = propType.symbol?.declarations?.[0]\n ?.getSourceFile()\n .fileName.includes(\"@types/react\")\n\n return { kind: ResolvedTypeKind.Object, raw: rawDeclaration && !isDeclarationFromReact ? rawDeclaration : raw }\n }\n\n return { kind: ResolvedTypeKind.Any, raw }\n }\n\n /**\n * This is implementation of original docgen type resolving. We have custom resolving of types right now so this is not needed.\n */\n public getDocgenType(propType: ts.Type, isRequired: boolean): PropItemType {\n // When we are going to process the type, we check if this type has a constraint (is a generic type with constraint)\n if (propType.getConstraint()) {\n // If so, we assing the property the type that is the constraint\n propType = propType.getConstraint()!\n }\n\n let propTypeString = this.checker.typeToString(propType)\n if (this.shouldRemoveUndefinedFromOptional && !isRequired) {\n propTypeString = propTypeString.replace(\" | undefined\", \"\")\n }\n\n if (\n propType.isUnion() &&\n (this.shouldExtractValuesFromUnion ||\n (this.shouldExtractLiteralValuesFromEnum &&\n propType.types.every(\n type =>\n type.getFlags() &\n (ts.TypeFlags.StringLiteral |\n ts.TypeFlags.NumberLiteral |\n ts.TypeFlags.EnumLiteral |\n ts.TypeFlags.Undefined),\n )))\n ) {\n let value = propType.types.map(type => this.getInfoFromUnionType(type))\n\n if (this.shouldRemoveUndefinedFromOptional && !isRequired) {\n value = value.filter(option => option.value != \"undefined\")\n }\n\n if (this.shouldSortUnions) {\n value.sort((a, b) => a.value.toString().localeCompare(b.value.toString()))\n }\n\n return {\n name: \"enum\",\n raw: propTypeString,\n value,\n }\n }\n\n if (this.shouldRemoveUndefinedFromOptional && !isRequired) {\n propTypeString = propTypeString.replace(\" | undefined\", \"\")\n }\n\n return { name: propTypeString }\n }\n\n /**\n * Extracts a full JsDoc comment from a symbol, even\n * though TypeScript has broken down the JsDoc comment into plain\n * text and JsDoc tags.\n */\n public getFullJsDocComment(symbol: ts.Symbol): JSDoc {\n // in some cases this can be undefined (Pick<Type, 'prop1'|'prop2'>)\n if (symbol.getDocumentationComment === undefined) {\n return defaultJSDoc\n }\n\n let mainComment = ts.displayPartsToString(symbol.getDocumentationComment(this.checker))\n\n if (mainComment) {\n mainComment = mainComment.replaceAll(\"\\r\\n\", \"\\n\")\n }\n\n const tags = symbol.getJsDocTags() || []\n\n const tagComments: string[] = []\n const tagMap: StringIndexedObject<string> = {}\n\n for (const tag of tags) {\n const trimmedText = ts.displayPartsToString(tag.text).trim()\n const currentValue = tagMap[tag.name]\n tagMap[tag.name] = currentValue ? currentValue + \"\\n\" + trimmedText : trimmedText\n\n if (![\"default\", \"type\"].includes(tag.name)) {\n tagComments.push(formatTag(tag))\n }\n }\n\n return {\n description: mainComment,\n fullComment: (mainComment + \"\\n\" + tagComments.join(\"\\n\")).trim(),\n tags: tagMap,\n }\n }\n\n getFunctionStatement(statement: ts.Statement) {\n if (ts.isFunctionDeclaration(statement)) {\n return statement\n }\n\n if (ts.isVariableStatement(statement)) {\n let initializer = statement.declarationList && statement.declarationList.declarations[0].initializer\n\n // Look at forwardRef function argument\n if (initializer && ts.isCallExpression(initializer)) {\n const symbol = this.checker.getSymbolAtLocation(initializer.expression)\n if (!symbol || symbol.getName() !== \"forwardRef\") return\n initializer = initializer.arguments[0]\n }\n\n if (initializer && (ts.isArrowFunction(initializer) || ts.isFunctionExpression(initializer))) {\n return initializer\n }\n }\n\n return undefined\n }\n\n public getLiteralValueFromImportSpecifier(\n property: ts.ImportSpecifier,\n ): boolean | null | number | string | undefined {\n if (ts.isImportSpecifier(property)) {\n const symbol = this.checker.getSymbolAtLocation(property.name)\n\n if (!symbol) {\n return null\n }\n\n const aliasedSymbol = this.checker.getAliasedSymbol(symbol)\n if (aliasedSymbol && aliasedSymbol.declarations && aliasedSymbol.declarations.length > 0) {\n return this.getLiteralValueFromPropertyAssignment(aliasedSymbol.declarations[0] as ts.BindingElement)\n }\n\n return null\n }\n\n return null\n }\n\n public getLiteralValueFromPropertyAssignment(\n property: ts.BindingElement | ts.PropertyAssignment,\n ): boolean | null | number | string | undefined {\n let { initializer } = property\n\n // Shorthand properties, so inflect their actual value\n if (!initializer && ts.isShorthandPropertyAssignment(property)) {\n const symbol = this.checker.getShorthandAssignmentValueSymbol(property)\n const decl = symbol && (symbol.valueDeclaration as ts.VariableDeclaration)\n\n if (decl && decl.initializer) {\n initializer = decl.initializer!\n }\n }\n\n if (!initializer) {\n return undefined\n }\n\n // Literal values\n switch (initializer.kind) {\n case ts.SyntaxKind.FalseKeyword: {\n return this.savePropValueAsString ? \"false\" : false\n }\n\n case ts.SyntaxKind.Identifier: {\n if ((initializer as ts.Identifier).text === \"undefined\") {\n return \"undefined\"\n }\n\n const symbol = this.checker.getSymbolAtLocation(initializer as ts.Identifier)\n\n if (symbol && symbol.declarations && symbol.declarations.length > 0) {\n if (ts.isImportSpecifier(symbol.declarations[0])) {\n return this.getLiteralValueFromImportSpecifier(symbol.declarations[0] as ts.ImportSpecifier)\n }\n\n return this.getLiteralValueFromPropertyAssignment(symbol.declarations[0] as ts.BindingElement)\n }\n\n return null\n }\n\n case ts.SyntaxKind.NullKeyword: {\n return this.savePropValueAsString ? \"null\" : null\n }\n\n case ts.SyntaxKind.NumericLiteral: {\n return this.savePropValueAsString\n ? `${(initializer as ts.NumericLiteral).text}`\n : Number((initializer as ts.NumericLiteral).text)\n }\n\n case ts.SyntaxKind.PrefixUnaryExpression: {\n return this.savePropValueAsString\n ? initializer.getFullText().trim()\n : Number((initializer as ts.PrefixUnaryExpression).getFullText())\n }\n\n case ts.SyntaxKind.StringLiteral: {\n return (initializer as ts.StringLiteral).text.trim()\n }\n\n case ts.SyntaxKind.TrueKeyword: {\n return this.savePropValueAsString ? \"true\" : true\n }\n\n case ts.SyntaxKind.PropertyAccessExpression: {\n const symbol = this.checker.getSymbolAtLocation(initializer as ts.PropertyAccessExpression)\n\n if (symbol && symbol.declarations && symbol.declarations.length > 0) {\n const declaration = symbol.declarations[0]\n\n if (ts.isBindingElement(declaration) || ts.isPropertyAssignment(declaration)) {\n return this.getLiteralValueFromPropertyAssignment(declaration)\n }\n }\n\n return null\n }\n\n case ts.SyntaxKind.ObjectLiteralExpression:\n default: {\n try {\n return initializer.getText()\n } catch {\n return null\n }\n }\n }\n }\n\n public getMethodsInfo(type: ts.Type): Method[] {\n const members = this.extractMembersFromType(type)\n const methods: Method[] = []\n for (const member of members) {\n if (!this.isTaggedPublic(member)) {\n continue\n }\n\n const name = member.getName()\n const docblock = this.getFullJsDocComment(member).fullComment\n const callSignature = this.getCallSignature(member)\n const params = this.getParameterInfo(callSignature)\n const description = ts.displayPartsToString(member.getDocumentationComment(this.checker))\n const returnType = this.checker.typeToString(callSignature.getReturnType())\n const returnDescription = ts.displayPartsToString(this.getReturnDescription(member))\n const modifiers = this.getModifiers(member)\n\n methods.push({\n description,\n docblock,\n modifiers,\n name,\n params,\n returns: returnDescription\n ? {\n description: returnDescription,\n type: returnType,\n }\n : null,\n })\n }\n\n return methods\n }\n\n public getModifiers(member: ts.Symbol) {\n const modifiers: string[] = []\n if (!member.valueDeclaration) {\n return modifiers\n }\n\n const flags = ts.getCombinedModifierFlags(member.valueDeclaration)\n const isStatic = (flags & ts.ModifierFlags.Static) !== 0 // tslint:disable-line no-bitwise\n\n if (isStatic) {\n modifiers.push(\"static\")\n }\n\n return modifiers\n }\n\n public getParameterInfo(callSignature: ts.Signature): MethodParameter[] {\n return callSignature.parameters.map(param => {\n const paramType = this.checker.getTypeOfSymbolAtLocation(param, param.valueDeclaration!)\n const paramDeclaration = this.checker.symbolToParameterDeclaration(param, undefined, undefined)\n const isOptionalParam: boolean = Boolean(paramDeclaration && paramDeclaration.questionToken)\n\n return {\n description: ts.displayPartsToString(param.getDocumentationComment(this.checker)) || null,\n name: param.getName() + (isOptionalParam ? \"?\" : \"\"),\n type: { name: this.checker.typeToString(paramType) },\n }\n })\n }\n\n public getPropMap(\n properties: ts.NodeArray<ts.BindingElement | ts.PropertyAssignment>,\n ): StringIndexedObject<boolean | null | number | string> {\n return properties.reduce(\n (acc, property) => {\n if (ts.isSpreadAssignment(property) || !property.name) {\n return acc\n }\n\n const literalValue = this.getLiteralValueFromPropertyAssignment(property)\n const propertyName = getPropertyName(property.name)\n\n if (\n (typeof literalValue === \"string\" ||\n typeof literalValue === \"number\" ||\n typeof literalValue === \"boolean\" ||\n literalValue === null) &&\n propertyName !== null\n ) {\n acc[propertyName] = literalValue\n }\n\n return acc\n },\n {} as StringIndexedObject<boolean | null | number | string>,\n )\n }\n\n public getPropsInfo(propsObj: ts.Symbol, defaultProps: StringIndexedObject<string> = {}): Props {\n if (!propsObj.valueDeclaration) {\n return {}\n }\n\n const propsType = this.checker.getTypeOfSymbolAtLocation(propsObj, propsObj.valueDeclaration)\n const baseProps = propsType.getApparentProperties()\n let propertiesOfProps = baseProps\n\n if (propsType.isUnionOrIntersection()) {\n propertiesOfProps = [\n // Resolve extra properties in the union/intersection\n ...(propertiesOfProps = (this.checker as any).getAllPossiblePropertiesOfTypes(propsType.types)),\n // But props we already have override those as they are already correct.\n ...baseProps,\n ]\n\n if (propertiesOfProps.length === 0) {\n const isUnionType = (type: ts.Type): boolean => (type.flags & ts.TypeFlags.Union) !== 0\n\n const types: ts.Type[] = isUnionType(propsType) ? (propsType as ts.UnionType).types : [propsType]\n\n const subTypes = (this.checker as any).getAllPossiblePropertiesOfTypes(\n types.reduce<ts.Symbol[]>((all, t) => {\n const typeArray = isUnionType(t) ? (t as ts.UnionType).types : [t]\n return [...all, ...(typeArray.map(t => t.symbol!).filter(s => s !== undefined) as ts.Symbol[])]\n }, []),\n )\n\n propertiesOfProps = [...subTypes, ...baseProps]\n }\n }\n\n const result: Props = {}\n\n for (const prop of propertiesOfProps) {\n const propName = prop.getName()\n\n // Find type of prop by looking in context of the props object itself.\n const propType = this.checker.getTypeOfSymbolAtLocation(prop, propsObj.valueDeclaration!)\n\n const jsDocComment = this.findDocComment(prop)\n const hasCodeBasedDefault = defaultProps[propName] !== undefined\n\n let defaultValue: null | { value: any } = null\n\n if (hasCodeBasedDefault) {\n defaultValue = { value: defaultProps[propName] }\n } else if (jsDocComment.tags.default) {\n defaultValue = { value: jsDocComment.tags.default }\n }\n\n const parent = getParentType(prop)\n const parents = getDeclarations(prop)\n const declarations = prop.declarations || []\n\n const baseProp = baseProps.find(p => p.getName() === propName)\n\n const required =\n !isOptional(prop) &&\n !hasCodeBasedDefault &&\n // If in a intersection or union check original declaration for \"?\"\n declarations.every(d => !((ts.isPropertySignature(d) || ts.isPropertyDeclaration(d) || ts.isParameter(d)) && d.questionToken)) &&\n (!baseProp || !isOptional(baseProp))\n\n const type = jsDocComment.tags.type\n ? {\n name: jsDocComment.tags.type,\n }\n : this.getDocgenType(propType, required)\n\n const propTags = this.shouldIncludePropTagMap ? { tags: jsDocComment.tags } : {}\n const description = this.shouldIncludePropTagMap\n ? jsDocComment.description.replaceAll(\"\\r\\n\", \"\\n\")\n : jsDocComment.fullComment.replaceAll(\"\\r\\n\", \"\\n\")\n\n const resolvedType = this.getResolvedType({ propType, skipUndefinedInUnion: !required })\n\n result[propName] = {\n resolvedType,\n declarations: parents,\n defaultValue,\n description,\n name: propName,\n parent,\n required,\n type,\n ...propTags,\n }\n }\n\n return result\n }\n\n public getReturnDescription(symbol: ts.Symbol): SymbolDisplayPart[] | undefined {\n const tags = symbol.getJsDocTags()\n const returnTag = tags.find(tag => tag.name === \"returns\")\n if (!returnTag || !Array.isArray(returnTag.text)) {\n return\n }\n\n return returnTag.text\n }\n\n public isTaggedPublic(symbol: ts.Symbol) {\n const jsDocTags = symbol.getJsDocTags()\n return Boolean(jsDocTags.find(tag => tag.name === \"public\"))\n }\n\n /**\n * Parses a symbol that is an export from a source file.\n */\n public parseExportSymbol(exp: ts.Symbol, sourceFile: ts.SourceFile) {\n if (!isReactComponent(exp, sourceFile, this.checker)) {\n return []\n }\n\n const componentDocs: ComponentDoc[] = []\n const doc = this.getComponentInfo(exp, sourceFile)\n\n if (doc) {\n componentDocs.push(doc)\n }\n\n if (!exp.exports) {\n return componentDocs\n }\n\n // Then document any static sub-components\n for (const [_, symbol] of exp.exports) {\n if (symbol.flags & ts.SymbolFlags.Prototype) {\n continue\n }\n\n if (symbol.flags & ts.SymbolFlags.Method) {\n const signature = this.getCallSignature(symbol)\n const returnType = this.checker.typeToString(signature.getReturnType())\n\n if (returnType !== \"Element\") {\n continue\n }\n }\n\n const doc = this.getComponentInfo(symbol, sourceFile)\n\n if (doc) {\n const prefix = exp.escapedName === \"default\" ? \"\" : `${exp.escapedName}.`\n\n componentDocs.push({\n ...doc,\n displayName: `${prefix}${symbol.escapedName}`,\n })\n }\n }\n\n return componentDocs\n }\n\n private getComponentFromExpression(exp: ts.Symbol) {\n const declaration = exp.valueDeclaration || exp.declarations![0]\n const type = this.checker.getTypeOfSymbolAtLocation(exp, declaration)\n const typeSymbol = type.symbol || type.aliasSymbol\n\n if (!typeSymbol) {\n return exp\n }\n\n const symbolName = typeSymbol.getName()\n\n if (\n (symbolName === \"MemoExoticComponent\" || symbolName === \"ForwardRefExoticComponent\") &&\n exp.valueDeclaration &&\n ts.isExportAssignment(exp.valueDeclaration) &&\n ts.isCallExpression(exp.valueDeclaration.expression)\n ) {\n const component = this.checker.getSymbolAtLocation(exp.valueDeclaration.expression.arguments[0])\n\n if (component) {\n exp = component\n }\n }\n\n return exp\n }\n\n private getInfoFromUnionType(type: ts.Type): Partial<JSDoc> & {\n value: number | string\n } {\n let commentInfo = {}\n if (type.getSymbol()) {\n commentInfo = { ...this.getFullJsDocComment(type.getSymbol()!) }\n }\n\n return {\n value: this.getValuesFromUnionType(type),\n ...commentInfo,\n }\n }\n\n private getValuesFromUnionType(type: ts.Type): number | string {\n if (type.isStringLiteral()) return `\"${type.value}\"`\n if (type.isNumberLiteral()) return `${type.value}`\n return this.checker.typeToString(type)\n }\n}\n\nfunction statementIsClassDeclaration(statement: ts.Statement): statement is ts.ClassDeclaration {\n return Boolean((statement as ts.ClassDeclaration).members)\n}\n\nfunction statementIsStatelessWithDefaultProps(statement: ts.Statement): boolean {\n const children = (statement as ts.ExpressionStatement).getChildren()\n for (const child of children) {\n const { left } = child as ts.BinaryExpression\n if (left) {\n const { name } = left as ts.PropertyAccessExpression\n if (name && name.escapedText === \"defaultProps\") {\n return true\n }\n }\n }\n\n return false\n}\n\nfunction getPropertyName(name: ts.BindingPattern | ts.PropertyName): null | string {\n switch (name.kind) {\n case ts.SyntaxKind.ComputedPropertyName: {\n return name.getText()\n }\n\n case ts.SyntaxKind.Identifier:\n case ts.SyntaxKind.NumericLiteral:\n case ts.SyntaxKind.StringLiteral: {\n return name.text\n }\n\n default: {\n return null\n }\n }\n}\n\nfunction formatTag(tag: ts.JSDocTagInfo) {\n let result = \"@\" + tag.name\n if (tag.text) {\n result += \" \" + ts.displayPartsToString(tag.text)\n }\n\n return result\n}\n\nfunction getTextValueOfClassMember(classDeclaration: ts.ClassDeclaration, memberName: string): string {\n const classDeclarationMembers = classDeclaration.members || []\n const [textValue] =\n classDeclarationMembers &&\n classDeclarationMembers\n .filter(member => ts.isPropertyDeclaration(member))\n .filter(member => {\n const name = ts.getNameOfDeclaration(member) as ts.Identifier\n return name && name.text === memberName\n })\n .map(member => {\n const property = member as ts.PropertyDeclaration\n return property.initializer && (property.initializer as ts.Identifier).text\n })\n\n return textValue || \"\"\n}\n\nfunction getTextValueOfFunctionProperty(_exp: ts.Symbol, source: ts.SourceFile, propertyName: string) {\n const [textValue] = source.statements\n .filter(statement => ts.isExpressionStatement(statement))\n .filter(statement => {\n const expr = (statement as ts.ExpressionStatement).expression as ts.BinaryExpression\n return (\n expr.left &&\n (expr.left as ts.PropertyAccessExpression).name &&\n (expr.left as ts.PropertyAccessExpression).name.escapedText === propertyName\n )\n })\n .filter(statement =>\n ts.isStringLiteral(((statement as ts.ExpressionStatement).expression as ts.BinaryExpression).right),\n )\n .map(\n statement =>\n (((statement as ts.ExpressionStatement).expression as ts.BinaryExpression).right as ts.Identifier).text,\n )\n\n return textValue || \"\"\n}\n\nfunction computeComponentDisplayName(exp: ts.Symbol, source: ts.SourceFile) {\n const statelessDisplayName = getTextValueOfFunctionProperty(exp, source, \"displayName\")\n\n const statefulDisplayName =\n exp.valueDeclaration &&\n ts.isClassDeclaration(exp.valueDeclaration) &&\n getTextValueOfClassMember(exp.valueDeclaration, \"displayName\")\n\n return statelessDisplayName || statefulDisplayName || null\n}\n\nfunction computeComponentExportName(\n rootExport: ts.Symbol,\n source: ts.SourceFile,\n customComponentTypes: ParserOptions[\"customComponentTypes\"] = [],\n rootExportName: string,\n) {\n const exportName = rootExport.getName()\n\n const defaultComponentTypes = [\n \"default\",\n \"__function\",\n \"Stateless\",\n \"StyledComponentClass\",\n \"StyledComponent\",\n \"IStyledComponent\",\n \"FunctionComponent\",\n \"StatelessComponent\",\n \"ForwardRefExoticComponent\",\n \"MemoExoticComponent\",\n ]\n\n const supportedComponentTypes = [...defaultComponentTypes, ...customComponentTypes]\n\n if (!defaultComponentTypes.includes(rootExportName)) {\n return rootExportName\n }\n\n if (supportedComponentTypes.includes(exportName)) {\n return getDefaultExportForFile(source)\n }\n\n return exportName\n}\n\n// Default export for a file: named after file\nexport function getDefaultExportForFile(source: ts.SourceFile) {\n const name = path.basename(source.fileName).split(\".\")[0]\n const filename = name === \"index\" ? path.basename(path.dirname(source.fileName)) : name\n\n // JS identifiers must starts with a letter, and contain letters and/or numbers\n // So, you could not take filename as is\n const identifier = filename.replaceAll(/^[^A-Z]*/gi, \"\").replaceAll(/[^A-Z0-9]*/gi, \"\")\n\n return identifier.length > 0 ? identifier : \"DefaultName\"\n}\n\nfunction isTypeLiteral(node: ts.Node): node is ts.TypeLiteralNode {\n return node.kind === ts.SyntaxKind.TypeLiteral\n}\n\nfunction getDeclarations(prop: ts.Symbol): ParentType[] | undefined {\n const declarations = prop.getDeclarations()\n\n if (declarations === undefined || declarations.length === 0) {\n return undefined\n }\n\n const parents: ParentType[] = []\n\n for (const declaration of declarations) {\n const { parent } = declaration\n\n if (!isTypeLiteral(parent) && !isInterfaceOrTypeAliasDeclaration(parent)) {\n continue\n }\n\n const parentName = \"name\" in parent ? (parent as InterfaceOrTypeAliasDeclaration).name.text : \"TypeLiteral\"\n\n const { fileName } = (parent as InterfaceOrTypeAliasDeclaration | ts.TypeLiteralNode).getSourceFile()\n\n parents.push({\n fileName,\n name: parentName,\n })\n }\n\n return parents\n}\n\nfunction getParentType(prop: ts.Symbol): ParentType | undefined {\n const declarations = prop.getDeclarations()\n\n if (declarations == null || declarations.length === 0) {\n return undefined\n }\n\n // Props can be declared only in one place\n const { parent } = declarations[0]\n\n if (!isInterfaceOrTypeAliasDeclaration(parent)) {\n return undefined\n }\n\n const parentName = parent.name.text\n const { fileName } = parent.getSourceFile()\n\n return {\n fileName: trimFileName(fileName),\n name: parentName,\n }\n}\n\nfunction isInterfaceOrTypeAliasDeclaration(node: ts.Node): node is ts.InterfaceDeclaration | ts.TypeAliasDeclaration {\n return node.kind === ts.SyntaxKind.InterfaceDeclaration || node.kind === ts.SyntaxKind.TypeAliasDeclaration\n}\n"],"names":[],"mappings":";;AAAA,OAAO,IAAI,MAAM,WAAW,CAAA;AAE5B,OAAO,KAAK,EAAE,MAAM,YAAY,CAAA;AAEhC,OAAO,EAcL,gBAAgB,GAEjB,MAAM,YAAY,CAAA;AACnB,OAAO,EAAE,WAAW,EAAE,MAAM,yBAAyB,CAAA;AACrD,OAAO,E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,IAAI,IAAI,IAAI,YAAY,CAAC,MAAM,KAAK,CAAC,EAAE,CAAC;QACtD,OAAO,SAAS,CAAA;IAClB,CAAC;IAGD,MAAM,EAAE,MAAM,EAAE,GAAG,YAAY,CAAC,CAAC,CAAC,CAAA;IAElC,IAAI,CAAC,iCAAiC,CAAC,MAAM,CAAC,EAAE,CAAC;QAC/C,OAAO,SAAS,CAAA;IAClB,CAAC;IAED,MAAM,UAAU,GAAG,MAAM,CAAC,IAAI,CAAC,IAAI,CAAA;IACnC,MAAM,EAAE,QAAQ,EAAE,GAAG,MAAM,CAAC,aAAa,EAAE,CAAA;IAE3C,OAAO;QACL,QAAQ,EAAE,YAAY,CAAC,QAAQ,CAAC;QAChC,IAAI,EAAE,UAAU;KACjB,CAAA;AACH,CAAC;AAED,SAAS,iCAAiC,CAAC,IAAa;IACtD,OAAO,IAAI,CAAC,IAAI,KAAK,EAAE,CAAC,UAAU,CAAC,oBAAoB,IAAI,IAAI,CAAC,IAAI,KAAK,EAAE,CAAC,UAAU,CAAC,oBAAoB,CAAA;AAC7G,CAAC","debug_id":"f43107ed-302c-5e6b-965c-db25f3a82db1"}
@@ -0,0 +1,123 @@
1
+ import * as ts from "typescript";
2
+ export type InterfaceOrTypeAliasDeclaration = ts.InterfaceDeclaration | ts.TypeAliasDeclaration;
3
+ export interface StringIndexedObject<T> {
4
+ [key: string]: T;
5
+ }
6
+ export interface ComponentDoc {
7
+ description: string;
8
+ displayName: string | null;
9
+ exportName: string;
10
+ expression?: ts.Symbol;
11
+ filePath: string;
12
+ methods: Method[];
13
+ props: Props;
14
+ rootExpression?: ts.Symbol;
15
+ tags?: StringIndexedObject<string>;
16
+ }
17
+ export interface Props extends StringIndexedObject<PropItem> {
18
+ }
19
+ export interface PropItem {
20
+ declarations?: ParentType[];
21
+ defaultValue: any;
22
+ description: string;
23
+ name: string;
24
+ parent?: ParentType;
25
+ required: boolean;
26
+ resolvedType: ResolvedType;
27
+ tags?: {};
28
+ type: PropItemType;
29
+ }
30
+ export interface Method {
31
+ description: string;
32
+ docblock: string;
33
+ modifiers: string[];
34
+ name: string;
35
+ params: MethodParameter[];
36
+ returns?: null | {
37
+ description?: null | string;
38
+ type?: string;
39
+ };
40
+ }
41
+ export interface MethodParameter {
42
+ description?: null | string;
43
+ name: string;
44
+ type: MethodParameterType;
45
+ }
46
+ export interface MethodParameterType {
47
+ name: string;
48
+ }
49
+ export interface Component {
50
+ name: string;
51
+ }
52
+ export interface ResolvedPropItemType {
53
+ name: string;
54
+ raw?: string;
55
+ value?: any;
56
+ }
57
+ export interface PropItemType {
58
+ name: string;
59
+ raw?: string;
60
+ value?: any;
61
+ }
62
+ export interface ParentType {
63
+ fileName: string;
64
+ name: string;
65
+ }
66
+ export type PropFilter = (props: PropItem, component: Component) => boolean;
67
+ export type ComponentNameResolver = (exp: ts.Symbol, source: ts.SourceFile) => false | null | string | undefined;
68
+ export interface ParserOptions {
69
+ componentNameResolver?: ComponentNameResolver;
70
+ customComponentTypes?: string[];
71
+ propFilter?: PropFilter | StaticPropFilter;
72
+ savePropValueAsString?: boolean;
73
+ shouldExtractLiteralValuesFromEnum?: boolean;
74
+ shouldExtractValuesFromUnion?: boolean;
75
+ shouldIncludeExpression?: boolean;
76
+ shouldIncludePropTagMap?: boolean;
77
+ shouldRemoveUndefinedFromOptional?: boolean;
78
+ shouldSortUnions?: boolean;
79
+ skipChildrenPropWithoutDoc?: boolean;
80
+ }
81
+ export interface StaticPropFilter {
82
+ skipPropsWithName?: string | string[];
83
+ skipPropsWithoutDoc?: boolean;
84
+ }
85
+ export declare const defaultParserOpts: ParserOptions;
86
+ export interface FileParser {
87
+ parse(filePathOrPaths: string | string[]): ComponentDoc[];
88
+ parseWithProgramProvider(filePathOrPaths: string | string[], programProvider?: () => ts.Program): ComponentDoc[];
89
+ }
90
+ export interface JSDoc {
91
+ description: string;
92
+ fullComment: string;
93
+ tags: StringIndexedObject<string>;
94
+ }
95
+ interface ResolvedTypeBase {
96
+ isArray?: boolean;
97
+ raw: string;
98
+ }
99
+ interface ResolvedUnionType extends ResolvedTypeBase {
100
+ kind: ResolvedTypeKind.Union;
101
+ types: ResolvedType[];
102
+ }
103
+ interface ResolvedSpecificType extends ResolvedTypeBase {
104
+ kind: Exclude<ResolvedTypeKind, ResolvedTypeKind.Union>;
105
+ }
106
+ export type ResolvedType = ResolvedUnionType | ResolvedSpecificType;
107
+ export declare enum ResolvedTypeKind {
108
+ Any = "any",
109
+ Boolean = "boolean",
110
+ BooleanLiteral = "booleanLiteral",
111
+ Function = "function",
112
+ Null = "null",
113
+ Number = "number",
114
+ NumberLiteral = "numberLiteral",
115
+ Object = "object",
116
+ Slot = "slot",
117
+ String = "string",
118
+ StringLiteral = "stringLiteral",
119
+ Undefined = "undefined",
120
+ Union = "union"
121
+ }
122
+ export {};
123
+ //# sourceMappingURL=types.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"types.d.ts","sourceRoot":"","sources":["../../../../src/code-analyzer/components/parser/types.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,MAAM,YAAY,CAAA;AAEhC,MAAM,MAAM,+BAA+B,GAAG,EAAE,CAAC,oBAAoB,GAAG,EAAE,CAAC,oBAAoB,CAAA;AAC/F,MAAM,WAAW,mBAAmB,CAAC,CAAC;IACpC,CAAC,GAAG,EAAE,MAAM,GAAG,CAAC,CAAA;CACjB;AAED,MAAM,WAAW,YAAY;IAC3B,WAAW,EAAE,MAAM,CAAA;IACnB,WAAW,EAAE,MAAM,GAAG,IAAI,CAAA;IAC1B,UAAU,EAAE,MAAM,CAAA;IAClB,UAAU,CAAC,EAAE,EAAE,CAAC,MAAM,CAAA;IACtB,QAAQ,EAAE,MAAM,CAAA;IAChB,OAAO,EAAE,MAAM,EAAE,CAAA;IACjB,KAAK,EAAE,KAAK,CAAA;IACZ,cAAc,CAAC,EAAE,EAAE,CAAC,MAAM,CAAA;IAC1B,IAAI,CAAC,EAAE,mBAAmB,CAAC,MAAM,CAAC,CAAA;C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YAAY,EAAE,CAAA;CACjH;AAED,MAAM,WAAW,KAAK;IACpB,WAAW,EAAE,MAAM,CAAA;IACnB,WAAW,EAAE,MAAM,CAAA;IACnB,IAAI,EAAE,mBAAmB,CAAC,MAAM,CAAC,CAAA;CAClC;AAED,UAAU,gBAAgB;IACxB,OAAO,CAAC,EAAE,OAAO,CAAA;IACjB,GAAG,EAAE,MAAM,CAAA;CACZ;AAED,UAAU,iBAAkB,SAAQ,gBAAgB;IAClD,IAAI,EAAE,gBAAgB,CAAC,KAAK,CAAA;IAE5B,KAAK,EAAE,YAAY,EAAE,CAAA;CACtB;AAED,UAAU,oBAAqB,SAAQ,gBAAgB;IACrD,IAAI,EAAE,OAAO,CAAC,gBAAgB,EAAE,gBAAgB,CAAC,KAAK,CAAC,CAAA;CACxD;AAKD,MAAM,MAAM,YAAY,GAAG,iBAAiB,GAAG,oBAAoB,CAAA;AAKnE,oBAAY,gBAAgB;IAC1B,GAAG,QAAQ;IACX,OAAO,YAAY;IACnB,cAAc,mBAAmB;IACjC,QAAQ,aAAa;IACrB,IAAI,SAAS;IACb,MAAM,WAAW;IACjB,aAAa,kBAAkB;IAC/B,MAAM,WAAW;IACjB,IAAI,SAAS;IACb,MAAM,WAAW;IACjB,aAAa,kBAAkB;IAC/B,SAAS,cAAc;IACvB,KAAK,UAAU;CAChB"}
@@ -0,0 +1,21 @@
1
+
2
+ !function(){try{var e="undefined"!=typeof window?window:"undefined"!=typeof global?global:"undefined"!=typeof globalThis?globalThis:"undefined"!=typeof self?self:{},n=(new e.Error).stack;n&&(e._sentryDebugIds=e._sentryDebugIds||{},e._sentryDebugIds[n]="f68f3b5a-b9d4-575a-a444-9ec17ddea751")}catch(e){}}();
3
+ export const defaultParserOpts = {};
4
+ export var ResolvedTypeKind;
5
+ (function (ResolvedTypeKind) {
6
+ ResolvedTypeKind["Any"] = "any";
7
+ ResolvedTypeKind["Boolean"] = "boolean";
8
+ ResolvedTypeKind["BooleanLiteral"] = "booleanLiteral";
9
+ ResolvedTypeKind["Function"] = "function";
10
+ ResolvedTypeKind["Null"] = "null";
11
+ ResolvedTypeKind["Number"] = "number";
12
+ ResolvedTypeKind["NumberLiteral"] = "numberLiteral";
13
+ ResolvedTypeKind["Object"] = "object";
14
+ ResolvedTypeKind["Slot"] = "slot";
15
+ ResolvedTypeKind["String"] = "string";
16
+ ResolvedTypeKind["StringLiteral"] = "stringLiteral";
17
+ ResolvedTypeKind["Undefined"] = "undefined";
18
+ ResolvedTypeKind["Union"] = "union";
19
+ })(ResolvedTypeKind || (ResolvedTypeKind = {}));
20
+ //# sourceMappingURL=types.js.map
21
+ //# debugId=f68f3b5a-b9d4-575a-a444-9ec17ddea751
@@ -0,0 +1 @@
1
+ {"version":3,"file":"types.js","sources":["../../../../src/code-analyzer/components/parser/types.ts"],"sourceRoot":"","sourcesContent":["import * as ts from \"typescript\"\n\nexport type InterfaceOrTypeAliasDeclaration = ts.InterfaceDeclaration | ts.TypeAliasDeclaration\nexport interface StringIndexedObject<T> {\n [key: string]: T\n}\n\nexport interface ComponentDoc {\n description: string\n displayName: string | null\n exportName: string\n expression?: ts.Symbol\n filePath: string\n methods: Method[]\n props: Props\n rootExpression?: ts.Symbol\n tags?: StringIndexedObject<string>\n}\n\nexport interface Props extends StringIndexedObject<PropItem> {}\n\nexport interface PropItem {\n declarations?: ParentType[]\n defaultValue: any\n description: string\n name: string\n parent?: ParentType\n required: boolean\n resolvedType: ResolvedType\n tags?: {}\n type: PropItemType\n}\n\nexport interface Method {\n description: string\n docblock: string\n modifiers: string[]\n name: string\n params: MethodParameter[]\n returns?: null | {\n description?: null | string\n type?: string\n }\n}\n\nexport interface MethodParameter {\n description?: null | string\n name: string\n type: MethodParameterType\n}\n\nexport interface MethodParameterType {\n name: string\n}\n\nexport interface Component {\n name: string\n}\n\nexport interface ResolvedPropItemType {\n name: string\n raw?: string\n value?: any\n}\n\nexport interface PropItemType {\n name: string\n raw?: string\n value?: any\n}\n\nexport interface ParentType {\n fileName: string\n name: string\n}\n\nexport type PropFilter = (props: PropItem, component: Component) => boolean\n\nexport type ComponentNameResolver = (exp: ts.Symbol, source: ts.SourceFile) => false | null | string | undefined\n\nexport interface ParserOptions {\n componentNameResolver?: ComponentNameResolver\n customComponentTypes?: string[]\n propFilter?: PropFilter | StaticPropFilter\n savePropValueAsString?: boolean\n shouldExtractLiteralValuesFromEnum?: boolean\n shouldExtractValuesFromUnion?: boolean\n shouldIncludeExpression?: boolean\n shouldIncludePropTagMap?: boolean\n shouldRemoveUndefinedFromOptional?: boolean\n shouldSortUnions?: boolean\n skipChildrenPropWithoutDoc?: boolean\n}\n\nexport interface StaticPropFilter {\n skipPropsWithName?: string | string[]\n skipPropsWithoutDoc?: boolean\n}\n\nexport const defaultParserOpts: ParserOptions = {}\n\nexport interface FileParser {\n parse(filePathOrPaths: string | string[]): ComponentDoc[]\n parseWithProgramProvider(filePathOrPaths: string | string[], programProvider?: () => ts.Program): ComponentDoc[]\n}\n\nexport interface JSDoc {\n description: string\n fullComment: string\n tags: StringIndexedObject<string>\n}\n\ninterface ResolvedTypeBase {\n isArray?: boolean\n raw: string\n}\n\ninterface ResolvedUnionType extends ResolvedTypeBase {\n kind: ResolvedTypeKind.Union\n /** Types included in union */\n types: ResolvedType[]\n}\n\ninterface ResolvedSpecificType extends ResolvedTypeBase {\n kind: Exclude<ResolvedTypeKind, ResolvedTypeKind.Union>\n}\n\n/**\n * Represents a TypeScript type with its structure\n */\nexport type ResolvedType = ResolvedUnionType | ResolvedSpecificType\n\n/**\n * Kinds of TypeScript types\n */\nexport enum ResolvedTypeKind {\n Any = \"any\",\n Boolean = \"boolean\",\n BooleanLiteral = \"booleanLiteral\",\n Function = \"function\",\n Null = \"null\",\n Number = \"number\",\n NumberLiteral = \"numberLiteral\",\n Object = \"object\",\n Slot = \"slot\", // For React components/elements\n String = \"string\",\n StringLiteral = \"stringLiteral\",\n Undefined = \"undefined\",\n Union = \"union\",\n}\n"],"names":[],"mappings":";;AAmGA,MAAM,CAAC,MAAM,iBAAiB,GAAkB,EAAE,CAAA;AAoClD,MAAM,CAAN,IAAY,gBAcX;AAdD,WAAY,gBAAgB;IAC1B,+BAAW,CAAA;IACX,uCAAmB,CAAA;IACnB,qDAAiC,CAAA;IACjC,yCAAqB,CAAA;IACrB,iCAAa,CAAA;IACb,qCAAiB,CAAA;IACjB,mDAA+B,CAAA;IAC/B,qCAAiB,CAAA;IACjB,iCAAa,CAAA;IACb,qCAAiB,CAAA;IACjB,mDAA+B,CAAA;IAC/B,2CAAuB,CAAA;IACvB,mCAAe,CAAA;AACjB,CAAC,EAdW,gBAAgB,KAAhB,gBAAgB,QAc3B","debug_id":"f68f3b5a-b9d4-575a-a444-9ec17ddea751"}
@@ -0,0 +1,3 @@
1
+ import { ParserOptions, PropFilter } from "../types.js";
2
+ export declare function buildFilter(opts: ParserOptions): PropFilter;
3
+ //# sourceMappingURL=build-filter.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"build-filter.d.ts","sourceRoot":"","sources":["../../../../../src/code-analyzer/components/parser/utils/build-filter.ts"],"names":[],"mappings":"AAAA,OAAO,EAAa,aAAa,EAAE,UAAU,EAA8B,MAAM,aAAa,CAAA;AAE9F,wBAAgB,WAAW,CAAC,IAAI,EAAE,aAAa,GAAG,UAAU,CA8B3D"}
@@ -0,0 +1,31 @@
1
+
2
+ !function(){try{var e="undefined"!=typeof window?window:"undefined"!=typeof global?global:"undefined"!=typeof globalThis?globalThis:"undefined"!=typeof self?self:{},n=(new e.Error).stack;n&&(e._sentryDebugIds=e._sentryDebugIds||{},e._sentryDebugIds[n]="04849526-d02f-53c7-ba4f-d166b05ca545")}catch(e){}}();
3
+ export function buildFilter(opts) {
4
+ return (prop, component) => {
5
+ const { propFilter } = opts;
6
+ if (prop.name === "children" && prop.description.length === 0 && opts.skipChildrenPropWithoutDoc !== false) {
7
+ return false;
8
+ }
9
+ if (typeof propFilter === "function") {
10
+ const keep = propFilter(prop, component);
11
+ if (!keep) {
12
+ return false;
13
+ }
14
+ }
15
+ else if (typeof propFilter === "object") {
16
+ const { skipPropsWithName, skipPropsWithoutDoc } = propFilter;
17
+ if (typeof skipPropsWithName === "string" && skipPropsWithName === prop.name) {
18
+ return false;
19
+ }
20
+ if (Array.isArray(skipPropsWithName) && skipPropsWithName.includes(prop.name)) {
21
+ return false;
22
+ }
23
+ if (skipPropsWithoutDoc && prop.description.length === 0) {
24
+ return false;
25
+ }
26
+ }
27
+ return true;
28
+ };
29
+ }
30
+ //# sourceMappingURL=build-filter.js.map
31
+ //# debugId=04849526-d02f-53c7-ba4f-d166b05ca545
@@ -0,0 +1 @@
1
+ {"version":3,"file":"build-filter.js","sources":["../../../../../src/code-analyzer/components/parser/utils/build-filter.ts"],"sourceRoot":"","sourcesContent":["import { Component, ParserOptions, PropFilter, PropItem, StaticPropFilter } from \"../types.js\"\n\nexport function buildFilter(opts: ParserOptions): PropFilter {\n return (prop: PropItem, component: Component) => {\n const { propFilter } = opts\n // skip children property in case it has no custom documentation\n if (prop.name === \"children\" && prop.description.length === 0 && opts.skipChildrenPropWithoutDoc !== false) {\n return false\n }\n\n if (typeof propFilter === \"function\") {\n const keep = propFilter(prop, component)\n if (!keep) {\n return false\n }\n } else if (typeof propFilter === \"object\") {\n const { skipPropsWithName, skipPropsWithoutDoc } = propFilter as StaticPropFilter\n if (typeof skipPropsWithName === \"string\" && skipPropsWithName === prop.name) {\n return false\n }\n\n if (Array.isArray(skipPropsWithName) && skipPropsWithName.includes(prop.name)) {\n return false\n }\n\n if (skipPropsWithoutDoc && prop.description.length === 0) {\n return false\n }\n }\n\n return true\n }\n}\n"],"names":[],"mappings":";;AAEA,MAAM,UAAU,WAAW,CAAC,IAAmB;IAC7C,OAAO,CAAC,IAAc,EAAE,SAAoB,EAAE,EAAE;QAC9C,MAAM,EAAE,UAAU,EAAE,GAAG,IAAI,CAAA;QAE3B,IAAI,IAAI,CAAC,IAAI,KAAK,UAAU,IAAI,IAAI,CAAC,WAAW,CAAC,MAAM,KAAK,CAAC,IAAI,IAAI,CAAC,0BAA0B,KAAK,KAAK,EAAE,CAAC;YAC3G,OAAO,KAAK,CAAA;QACd,CAAC;QAED,IAAI,OAAO,UAAU,KAAK,UAAU,EAAE,CAAC;YACrC,MAAM,IAAI,GAAG,UAAU,CAAC,IAAI,EAAE,SAAS,CAAC,CAAA;YACxC,IAAI,CAAC,IAAI,EAAE,CAAC;gBACV,OAAO,KAAK,CAAA;YACd,CAAC;QACH,CAAC;aAAM,IAAI,OAAO,UAAU,KAAK,QAAQ,EAAE,CAAC;YAC1C,MAAM,EAAE,iBAAiB,EAAE,mBAAmB,EAAE,GAAG,UAA8B,CAAA;YACjF,IAAI,OAAO,iBAAiB,KAAK,QAAQ,IAAI,iBAAiB,KAAK,IAAI,CAAC,IAAI,EAAE,CAAC;gBAC7E,OAAO,KAAK,CAAA;YACd,CAAC;YAED,IAAI,KAAK,CAAC,OAAO,CAAC,iBAAiB,CAAC,IAAI,iBAAiB,CAAC,QAAQ,CAAC,IAAI,CAAC,IAAI,CAAC,EAAE,CAAC;gBAC9E,OAAO,KAAK,CAAA;YACd,CAAC;YAED,IAAI,mBAAmB,IAAI,IAAI,CAAC,WAAW,CAAC,MAAM,KAAK,CAAC,EAAE,CAAC;gBACzD,OAAO,KAAK,CAAA;YACd,CAAC;QACH,CAAC;QAED,OAAO,IAAI,CAAA;IACb,CAAC,CAAA;AACH,CAAC","debug_id":"04849526-d02f-53c7-ba4f-d166b05ca545"}
@@ -0,0 +1,3 @@
1
+ import { ComponentDoc } from "../types.js";
2
+ export declare function filterDuplicates(components: ComponentDoc[]): ComponentDoc[];
3
+ //# sourceMappingURL=filter-duplicates.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"filter-duplicates.d.ts","sourceRoot":"","sources":["../../../../../src/code-analyzer/components/parser/utils/filter-duplicates.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,YAAY,EAAE,MAAM,aAAa,CAAA;AAE1C,wBAAgB,gBAAgB,CAAC,UAAU,EAAE,YAAY,EAAE,kBAgB1D"}
@@ -0,0 +1,17 @@
1
+
2
+ !function(){try{var e="undefined"!=typeof window?window:"undefined"!=typeof global?global:"undefined"!=typeof globalThis?globalThis:"undefined"!=typeof self?self:{},n=(new e.Error).stack;n&&(e._sentryDebugIds=e._sentryDebugIds||{},e._sentryDebugIds[n]="44adf6bc-a987-5df9-bebc-77cb10e8c5e2")}catch(e){}}();
3
+ export function filterDuplicates(components) {
4
+ const componentDocsNoDuplicates = (() => {
5
+ const uniqueComponents = [];
6
+ for (const comp of components) {
7
+ const duplicate = uniqueComponents.find(component => component.exportName === comp.exportName);
8
+ if (!duplicate) {
9
+ uniqueComponents.push(comp);
10
+ }
11
+ }
12
+ return uniqueComponents;
13
+ })();
14
+ return componentDocsNoDuplicates.filter((comp, index, comps) => comps.slice(index + 1).every(innerComp => innerComp.exportName !== comp.exportName));
15
+ }
16
+ //# sourceMappingURL=filter-duplicates.js.map
17
+ //# debugId=44adf6bc-a987-5df9-bebc-77cb10e8c5e2
@@ -0,0 +1 @@
1
+ {"version":3,"file":"filter-duplicates.js","sources":["../../../../../src/code-analyzer/components/parser/utils/filter-duplicates.ts"],"sourceRoot":"","sourcesContent":["import { ComponentDoc } from \"../types.js\"\n\nexport function filterDuplicates(components: ComponentDoc[]) {\n const componentDocsNoDuplicates = (() => {\n const uniqueComponents: ComponentDoc[] = []\n for (const comp of components) {\n const duplicate = uniqueComponents.find(component => component!.exportName === comp!.exportName)\n if (!duplicate) {\n uniqueComponents.push(comp)\n }\n }\n\n return uniqueComponents\n })()\n\n return componentDocsNoDuplicates.filter((comp, index, comps) =>\n comps.slice(index + 1).every(innerComp => innerComp!.exportName !== comp!.exportName),\n )\n}\n"],"names":[],"mappings":";;AAEA,MAAM,UAAU,gBAAgB,CAAC,UAA0B;IACzD,MAAM,yBAAyB,GAAG,CAAC,GAAG,EAAE;QACtC,MAAM,gBAAgB,GAAmB,EAAE,CAAA;QAC3C,KAAK,MAAM,IAAI,IAAI,UAAU,EAAE,CAAC;YAC9B,MAAM,SAAS,GAAG,gBAAgB,CAAC,IAAI,CAAC,SAAS,CAAC,EAAE,CAAC,SAAU,CAAC,UAAU,KAAK,IAAK,CAAC,UAAU,CAAC,CAAA;YAChG,IAAI,CAAC,SAAS,EAAE,CAAC;gBACf,gBAAgB,CAAC,IAAI,CAAC,IAAI,CAAC,CAAA;YAC7B,CAAC;QACH,CAAC;QAED,OAAO,gBAAgB,CAAA;IACzB,CAAC,CAAC,EAAE,CAAA;IAEJ,OAAO,yBAAyB,CAAC,MAAM,CAAC,CAAC,IAAI,EAAE,KAAK,EAAE,KAAK,EAAE,EAAE,CAC7D,KAAK,CAAC,KAAK,CAAC,KAAK,GAAG,CAAC,CAAC,CAAC,KAAK,CAAC,SAAS,CAAC,EAAE,CAAC,SAAU,CAAC,UAAU,KAAK,IAAK,CAAC,UAAU,CAAC,CACtF,CAAA;AACH,CAAC","debug_id":"44adf6bc-a987-5df9-bebc-77cb10e8c5e2"}
@@ -0,0 +1,4 @@
1
+ import * as ts from "typescript";
2
+ export declare function isTypeFromReact(type: ts.Type, checker: ts.TypeChecker): boolean;
3
+ export declare function isReactComponent(symbol: ts.Symbol, _sourceFile: ts.SourceFile, checker: ts.TypeChecker): boolean;
4
+ //# sourceMappingURL=is-react-component.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"is-react-component.d.ts","sourceRoot":"","sources":["../../../../../src/code-analyzer/components/parser/utils/is-react-component.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,MAAM,YAAY,CAAA;AAehC,wBAAgB,eAAe,CAAC,IAAI,EAAE,EAAE,CAAC,IAAI,EAAE,OAAO,EAAE,EAAE,CAAC,WAAW,GAAG,OAAO,CAoB/E;AAKD,wBAAgB,gBAAgB,CAAC,MAAM,EAAE,EAAE,CAAC,MAAM,EAAE,WAAW,EAAE,EAAE,CAAC,UAAU,EAAE,OAAO,EAAE,EAAE,CAAC,WAAW,WAqBtG"}
@@ -0,0 +1,43 @@
1
+
2
+ !function(){try{var e="undefined"!=typeof window?window:"undefined"!=typeof global?global:"undefined"!=typeof globalThis?globalThis:"undefined"!=typeof self?self:{},n=(new e.Error).stack;n&&(e._sentryDebugIds=e._sentryDebugIds||{},e._sentryDebugIds[n]="178af39f-58b8-56d2-87e4-134a2b5ee97c")}catch(e){}}();
3
+ import * as ts from "typescript";
4
+ const validReactTypes = [
5
+ "FC",
6
+ "FunctionComponent",
7
+ "Component",
8
+ "Element",
9
+ "ReactElement",
10
+ "ForwardRefExoticComponent",
11
+ "ReactNode",
12
+ ];
13
+ export function isTypeFromReact(type, checker) {
14
+ if (type.isUnion()) {
15
+ return type.types.some(t => isTypeFromReact(t, checker));
16
+ }
17
+ if (type.symbol && type.symbol.declarations && type.symbol.declarations.length > 0) {
18
+ const declaration = type.symbol.declarations[0];
19
+ const sourceFile = declaration.getSourceFile();
20
+ const { fileName } = sourceFile;
21
+ const typeString = checker.typeToString(type);
22
+ const isReactType = Boolean(typeString.match(new RegExp(`^(React[.])?${validReactTypes.join("|")}.*`))?.length);
23
+ return isReactType && fileName.includes("@types/react");
24
+ }
25
+ return false;
26
+ }
27
+ export function isReactComponent(symbol, _sourceFile, checker) {
28
+ const actualSymbol = symbol.flags & ts.SymbolFlags.Alias ? checker.getAliasedSymbol(symbol) : symbol;
29
+ const type = checker.getTypeOfSymbol(actualSymbol);
30
+ if (isTypeFromReact(type, checker)) {
31
+ return true;
32
+ }
33
+ const [signature] = type.getCallSignatures();
34
+ if (signature) {
35
+ const returnType = checker.getReturnTypeOfSignature(signature);
36
+ if (isTypeFromReact(returnType, checker)) {
37
+ return true;
38
+ }
39
+ }
40
+ return false;
41
+ }
42
+ //# sourceMappingURL=is-react-component.js.map
43
+ //# debugId=178af39f-58b8-56d2-87e4-134a2b5ee97c
@@ -0,0 +1 @@
1
+ {"version":3,"file":"is-react-component.js","sources":["../../../../../src/code-analyzer/components/parser/utils/is-react-component.ts"],"sourceRoot":"","sourcesContent":["import * as ts from \"typescript\"\n\nconst validReactTypes = [\n \"FC\",\n \"FunctionComponent\",\n \"Component\",\n \"Element\",\n \"ReactElement\",\n \"ForwardRefExoticComponent\",\n \"ReactNode\",\n]\n\n/**\n * Helper function to check if type is from React\n */\nexport function isTypeFromReact(type: ts.Type, checker: ts.TypeChecker): boolean {\n if (type.isUnion()) {\n // in case the return type is a union we need to check if any of the types are from react\n return type.types.some(t => isTypeFromReact(t, checker))\n }\n\n if (type.symbol && type.symbol.declarations && type.symbol.declarations.length > 0) {\n const declaration = type.symbol.declarations[0]\n const sourceFile = declaration.getSourceFile()\n const { fileName } = sourceFile\n\n const typeString = checker.typeToString(type)\n\n const isReactType = Boolean(typeString.match(new RegExp(`^(React[.])?${validReactTypes.join(\"|\")}.*`))?.length)\n\n // Check if it's from react package\n return isReactType && fileName.includes(\"@types/react\")\n }\n\n return false\n}\n\n/**\n * Helper function to check if a symbol is a React component. It checks cases when react component is a function or reassigned to different variable.\n */\nexport function isReactComponent(symbol: ts.Symbol, _sourceFile: ts.SourceFile, checker: ts.TypeChecker) {\n // Get the actual symbol if it's an alias - component reassigned to different variable\n const actualSymbol = symbol.flags & ts.SymbolFlags.Alias ? checker.getAliasedSymbol(symbol) : symbol\n\n const type = checker.getTypeOfSymbol(actualSymbol)\n\n if (isTypeFromReact(type, checker)) {\n return true\n }\n\n // check case when it might be a function\n const [signature] = type.getCallSignatures()\n\n if (signature) {\n const returnType = checker.getReturnTypeOfSignature(signature)\n if (isTypeFromReact(returnType, checker)) {\n return true\n }\n }\n\n return false\n}\n"],"names":[],"mappings":";;AAAA,OAAO,KAAK,EAAE,MAAM,YAAY,CAAA;AAEhC,MAAM,eAAe,GAAG;IACtB,IAAI;IACJ,mBAAmB;IACnB,WAAW;IACX,SAAS;IACT,cAAc;IACd,2BAA2B;IAC3B,WAAW;CACZ,CAAA;AAKD,MAAM,UAAU,eAAe,CAAC,IAAa,EAAE,OAAuB;IACpE,IAAI,IAAI,CAAC,OAAO,EAAE,EA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AC,GAAG,IAAI,CAAC,iBAAiB,EAAE,CAAA;IAE5C,IAAI,SAAS,EAAE,CAAC;QACd,MAAM,UAAU,GAAG,OAAO,CAAC,wBAAwB,CAAC,SAAS,CAAC,CAAA;QAC9D,IAAI,eAAe,CAAC,UAAU,EAAE,OAAO,CAAC,EAAE,CAAC;YACzC,OAAO,IAAI,CAAA;QACb,CAAC;IACH,CAAC;IAED,OAAO,KAAK,CAAA;AACd,CAAC","debug_id":"178af39f-58b8-56d2-87e4-134a2b5ee97c"}
@@ -0,0 +1,2 @@
1
+ export declare function trimFileName(fileName: string, cwd?: string, platform?: "posix" | "win32"): string;
2
+ //# sourceMappingURL=trim-file-name.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"trim-file-name.d.ts","sourceRoot":"","sources":["../../../../../src/code-analyzer/components/parser/utils/trim-file-name.ts"],"names":[],"mappings":"AAIA,wBAAgB,YAAY,CAAC,QAAQ,EAAE,MAAM,EAAE,GAAG,GAAE,MAAsB,EAAE,QAAQ,CAAC,EAAE,OAAO,GAAG,OAAO,UAgCvG"}
@@ -0,0 +1,22 @@
1
+
2
+ !function(){try{var e="undefined"!=typeof window?window:"undefined"!=typeof global?global:"undefined"!=typeof globalThis?globalThis:"undefined"!=typeof self?self:{},n=(new e.Error).stack;n&&(e._sentryDebugIds=e._sentryDebugIds||{},e._sentryDebugIds[n]="2dabe1ff-5512-5ef7-813f-572f6a4a2409")}catch(e){}}();
3
+ import path from "node:path";
4
+ const slashRegex = /[\\/]/g;
5
+ export function trimFileName(fileName, cwd = process.cwd(), platform) {
6
+ const pathLib = platform ? path[platform] : path;
7
+ const originalSep = fileName.match(slashRegex)?.[0] || pathLib.sep;
8
+ const normalizedFileName = pathLib.normalize(fileName);
9
+ const { root } = pathLib.parse(cwd);
10
+ let parent = cwd;
11
+ do {
12
+ if (normalizedFileName.startsWith(parent)) {
13
+ return (pathLib
14
+ .relative(pathLib.dirname(parent), normalizedFileName)
15
+ .replaceAll(slashRegex, originalSep));
16
+ }
17
+ parent = pathLib.dirname(parent);
18
+ } while (parent !== root);
19
+ return fileName;
20
+ }
21
+ //# sourceMappingURL=trim-file-name.js.map
22
+ //# debugId=2dabe1ff-5512-5ef7-813f-572f6a4a2409
@@ -0,0 +1 @@
1
+ {"version":3,"file":"trim-file-name.js","sources":["../../../../../src/code-analyzer/components/parser/utils/trim-file-name.ts"],"sourceRoot":"","sourcesContent":["import path from \"node:path\"\n\nconst slashRegex = /[\\\\/]/g\n\nexport function trimFileName(fileName: string, cwd: string = process.cwd(), platform?: \"posix\" | \"win32\") {\n // This allows tests to run regardless of current platform\n const pathLib = platform ? path[platform] : path\n\n // Typescript formats Windows paths with forward slashes. For easier use of\n // the path utilities, normalize to platform-standard slashes, then restore\n // the original slashes when returning the result.\n const originalSep = fileName.match(slashRegex)?.[0] || pathLib.sep\n const normalizedFileName = pathLib.normalize(fileName)\n const { root } = pathLib.parse(cwd)\n\n // Walk up paths from the current directory until we find a common ancestor,\n // and return the path relative to that. This will work in either a single-\n // package repo or a monorepo (where dependencies may be installed at the\n // root, but commands may be run in a package folder).\n let parent = cwd\n do {\n if (normalizedFileName.startsWith(parent)) {\n return (\n pathLib\n // Preserve the parent directory name to match existing behavior\n .relative(pathLib.dirname(parent), normalizedFileName)\n // Restore original type of slashes\n .replaceAll(slashRegex, originalSep)\n )\n }\n\n parent = pathLib.dirname(parent)\n } while (parent !== root)\n\n // No common ancestor, so return the path as-is\n return fileName\n}\n"],"names":[],"mappings":";;AAAA,OAAO,IAAI,MAAM,WAAW,CAAA;AAE5B,MAAM,UAAU,GAAG,QAAQ,CAAA;AAE3B,MAAM,UAAU,YAAY,CAAC,QAAgB,EAAE,MAAc,OAAO,CAAC,GAAG,EAAE,EAAE,QAA4B;IAEtG,MAAM,OAAO,GAAG,QAAQ,CAAC,CAAC,CAAC,IAAI,CAAC,QAAQ,CAAC,CAAC,CAAC,CAAC,IAAI,CAAA;IAKhD,MAAM,WAAW,GAAG,QAAQ,CAAC,KAAK,CAAC,UAAU,CAAC,EAAE,CAAC,CAAC,CAAC,IAAI,OAAO,CAAC,GAAG,CAAA;IAClE,MAAM,kBAAkB,GAAG,OAAO,CAAC,SAAS,CAAC,QAAQ,CAAC,CAAA;IACtD,MAAM,EAAE,IAAI,EAAE,GAAG,OAAO,CAAC,KAAK,CAAC,GAAG,CAAC,CAAA;IAMnC,IAAI,MAAM,GAAG,GAAG,CAAA;IAChB,GAAG,CAAC;QACF,IAAI,kBAAkB,CAAC,UAAU,CAAC,MAAM,CAAC,EAAE,CAAC;YAC1C,OAAO,CACL,OAAO;iBAEJ,QAAQ,CAAC,OAAO,CAAC,OAAO,CAAC,MAAM,CAAC,EAAE,kBAAkB,CAAC;iBAErD,UAAU,CAAC,UAAU,EAAE,WAAW,CAAC,CACvC,CAAA;QACH,CAAC;QAED,MAAM,GAAG,OAAO,CAAC,OAAO,CAAC,MAAM,CAAC,CAAA;IAClC,CAAC,QAAQ,MAAM,KAAK,IAAI,EAAC;IAGzB,OAAO,QAAQ,CAAA;AACjB,CAAC","debug_id":"2dabe1ff-5512-5ef7-813f-572f6a4a2409"}
@@ -0,0 +1,18 @@
1
+ import { ParentType, ResolvedType, StringIndexedObject } from "./parser/types.js";
2
+ export type Component = {
3
+ exportName: string;
4
+ componentPath: string;
5
+ description: string;
6
+ tags: StringIndexedObject<string> | null;
7
+ properties: Record<string, ComponentProperty>;
8
+ };
9
+ export type ComponentProperty = {
10
+ defaultValue: string | undefined;
11
+ name: string;
12
+ required: boolean;
13
+ type: ResolvedType;
14
+ declarations: ParentType[] | undefined;
15
+ tags: StringIndexedObject<string> | undefined;
16
+ description: string;
17
+ };
18
+ //# sourceMappingURL=types.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"types.d.ts","sourceRoot":"","sources":["../../../src/code-analyzer/components/types.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,UAAU,EAAE,YAAY,EAAE,mBAAmB,EAAE,MAAM,mBAAmB,CAAA;AAEjF,MAAM,MAAM,SAAS,GAAG;IAItB,UAAU,EAAE,MAAM,CAAA;IAKlB,aAAa,EAAE,MAAM,CAAA;IAKrB,WAAW,EAAE,MAAM,CAAA;IAKnB,IAAI,EAAE,mBAAmB,CAAC,MAAM,CAAC,GAAG,IAAI,CAAA;IAKxC,UAAU,EAAE,MAAM,CAAC,MAAM,EAAE,iBAAiB,CAAC,CAAA;CAC9C,CAAA;AAED,MAAM,MAAM,iBAAiB,GAAG;IAS9B,YAAY,EAAE,MAAM,GAAG,SAAS,CAAA;IAKhC,IAAI,EAAE,MAAM,CAAA;IAKZ,QAAQ,EAAE,OAAO,CAAA;IAKjB,IAAI,EAAE,YAAY,CAAA;IAKlB,YAAY,EAAE,UAAU,EAAE,GAAG,SAAS,CAAA;IAKtC,IAAI,EAAE,mBAAmB,CAAC,MAAM,CAAC,GAAG,SAAS,CAAA;IAK7C,WAAW,EAAE,MAAM,CAAA;CACpB,CAAA"}
@@ -0,0 +1,5 @@
1
+
2
+ !function(){try{var e="undefined"!=typeof window?window:"undefined"!=typeof global?global:"undefined"!=typeof globalThis?globalThis:"undefined"!=typeof self?self:{},n=(new e.Error).stack;n&&(e._sentryDebugIds=e._sentryDebugIds||{},e._sentryDebugIds[n]="4cb88c65-f378-5ec6-a380-0e98cf9fb7a1")}catch(e){}}();
3
+ export {};
4
+ //# sourceMappingURL=types.js.map
5
+ //# debugId=4cb88c65-f378-5ec6-a380-0e98cf9fb7a1
@@ -0,0 +1 @@
1
+ {"version":3,"file":"types.js","sources":["../../../src/code-analyzer/components/types.ts"],"sourceRoot":"","sourcesContent":["import { ParentType, ResolvedType, StringIndexedObject } from \"./parser/types.js\"\n\nexport type Component = {\n /**\n * Exported name of the component used to import the component from the library / path\n */\n exportName: string\n\n /**\n * Path to the component file\n */\n componentPath: string\n\n /**\n * Description of the component\n */\n description: string\n\n /**\n * Tags of the component\n */\n tags: StringIndexedObject<string> | null\n\n /**\n * Map of the component's name to their descriptors\n */\n properties: Record<string, ComponentProperty>\n}\n\nexport type ComponentProperty = {\n /**\n * Type of control used to edit the property\n */\n // control: ControlTypeInfo\n\n /**\n * Default value of the property\n */\n defaultValue: string | undefined\n\n /**\n * Code name of the property\n */\n name: string\n\n /**\n * False if the property is optional (annotated with `?`), true otherwise\n */\n required: boolean\n\n /**\n * Resolved type of the property\n */\n type: ResolvedType\n\n /**\n * Declarations of the property\n */\n declarations: ParentType[] | undefined\n\n /**\n * Tags of the property\n */\n tags: StringIndexedObject<string> | undefined\n\n /**\n * Description of the property\n */\n description: string\n}\n"],"names":[],"mappings":"","debug_id":"4cb88c65-f378-5ec6-a380-0e98cf9fb7a1"}
@@ -0,0 +1,2 @@
1
+ export declare function getModuleEntryPath(rootDir: string, modulePath: string): Promise<string>;
2
+ //# sourceMappingURL=get-module-exports-path.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"get-module-exports-path.d.ts","sourceRoot":"","sources":["../../../../src/code-analyzer/components/utils/get-module-exports-path.ts"],"names":[],"mappings":"AAoBA,wBAAsB,kBAAkB,CAAC,OAAO,EAAE,MAAM,EAAE,UAAU,EAAE,MAAM,GAAG,OAAO,CAAC,MAAM,CAAC,CA4C7F"}