@supernovaio/cli 2.0.38 → 2.0.40
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/README.md +1 -0
- package/dist/code-analyzer/analyzers/component-usage.d.ts +6 -0
- package/dist/code-analyzer/analyzers/component-usage.d.ts.map +1 -0
- package/dist/code-analyzer/analyzers/component-usage.js +344 -0
- package/dist/code-analyzer/analyzers/component-usage.js.map +1 -0
- package/dist/code-analyzer/analyzers/helpers.d.ts +11 -0
- package/dist/code-analyzer/analyzers/helpers.d.ts.map +1 -0
- package/dist/code-analyzer/analyzers/helpers.js +59 -0
- package/dist/code-analyzer/analyzers/helpers.js.map +1 -0
- package/dist/code-analyzer/analyzers/index.d.ts +8 -0
- package/dist/code-analyzer/analyzers/index.d.ts.map +1 -0
- package/dist/code-analyzer/analyzers/index.js +11 -0
- package/dist/code-analyzer/analyzers/index.js.map +1 -0
- package/dist/code-analyzer/analyzers/jsdoc.d.ts +3 -0
- package/dist/code-analyzer/analyzers/jsdoc.d.ts.map +1 -0
- package/dist/code-analyzer/analyzers/jsdoc.js +7 -0
- package/dist/code-analyzer/analyzers/jsdoc.js.map +1 -0
- package/dist/code-analyzer/analyzers/static-components.d.ts +3 -0
- package/dist/code-analyzer/analyzers/static-components.d.ts.map +1 -0
- package/dist/code-analyzer/analyzers/static-components.js +399 -0
- package/dist/code-analyzer/analyzers/static-components.js.map +1 -0
- package/dist/code-analyzer/analyzers/storybook-docs.d.ts +3 -0
- package/dist/code-analyzer/analyzers/storybook-docs.d.ts.map +1 -0
- package/dist/code-analyzer/analyzers/storybook-docs.js +163 -0
- package/dist/code-analyzer/analyzers/storybook-docs.js.map +1 -0
- package/dist/code-analyzer/analyzers/storybook-stories.d.ts +3 -0
- package/dist/code-analyzer/analyzers/storybook-stories.d.ts.map +1 -0
- package/dist/code-analyzer/analyzers/storybook-stories.js +91 -0
- package/dist/code-analyzer/analyzers/storybook-stories.js.map +1 -0
- package/dist/code-analyzer/analyzers/types.d.ts +88 -0
- package/dist/code-analyzer/analyzers/types.d.ts.map +1 -0
- package/dist/code-analyzer/analyzers/types.js +12 -0
- package/dist/code-analyzer/analyzers/types.js.map +1 -0
- package/dist/code-analyzer/analyzers/typescript-api.d.ts +3 -0
- package/dist/code-analyzer/analyzers/typescript-api.d.ts.map +1 -0
- package/dist/code-analyzer/analyzers/typescript-api.js +7 -0
- package/dist/code-analyzer/analyzers/typescript-api.js.map +1 -0
- package/dist/code-analyzer/components/analyze.d.ts +8 -0
- package/dist/code-analyzer/components/analyze.d.ts.map +1 -0
- package/dist/code-analyzer/components/analyze.js +38 -0
- package/dist/code-analyzer/components/analyze.js.map +1 -0
- package/dist/code-analyzer/components/mappers/component.d.ts +4 -0
- package/dist/code-analyzer/components/mappers/component.d.ts.map +1 -0
- package/dist/code-analyzer/components/mappers/component.js +20 -0
- package/dist/code-analyzer/components/mappers/component.js.map +1 -0
- package/dist/code-analyzer/components/mappers/property.d.ts +4 -0
- package/dist/code-analyzer/components/mappers/property.d.ts.map +1 -0
- package/dist/code-analyzer/components/mappers/property.js +19 -0
- package/dist/code-analyzer/components/mappers/property.js.map +1 -0
- package/dist/code-analyzer/components/parser/index.d.ts +6 -0
- package/dist/code-analyzer/components/parser/index.d.ts.map +1 -0
- package/dist/code-analyzer/components/parser/index.js +9 -0
- package/dist/code-analyzer/components/parser/index.js.map +1 -0
- package/dist/code-analyzer/components/parser/module-parser.d.ts +12 -0
- package/dist/code-analyzer/components/parser/module-parser.d.ts.map +1 -0
- package/dist/code-analyzer/components/parser/module-parser.js +116 -0
- package/dist/code-analyzer/components/parser/module-parser.js.map +1 -0
- package/dist/code-analyzer/components/parser/parser.d.ts +46 -0
- package/dist/code-analyzer/components/parser/parser.d.ts.map +1 -0
- package/dist/code-analyzer/components/parser/parser.js +904 -0
- package/dist/code-analyzer/components/parser/parser.js.map +1 -0
- package/dist/code-analyzer/components/parser/types.d.ts +123 -0
- package/dist/code-analyzer/components/parser/types.d.ts.map +1 -0
- package/dist/code-analyzer/components/parser/types.js +21 -0
- package/dist/code-analyzer/components/parser/types.js.map +1 -0
- package/dist/code-analyzer/components/parser/utils/build-filter.d.ts +3 -0
- package/dist/code-analyzer/components/parser/utils/build-filter.d.ts.map +1 -0
- package/dist/code-analyzer/components/parser/utils/build-filter.js +31 -0
- package/dist/code-analyzer/components/parser/utils/build-filter.js.map +1 -0
- package/dist/code-analyzer/components/parser/utils/filter-duplicates.d.ts +3 -0
- package/dist/code-analyzer/components/parser/utils/filter-duplicates.d.ts.map +1 -0
- package/dist/code-analyzer/components/parser/utils/filter-duplicates.js +17 -0
- package/dist/code-analyzer/components/parser/utils/filter-duplicates.js.map +1 -0
- package/dist/code-analyzer/components/parser/utils/is-react-component.d.ts +4 -0
- package/dist/code-analyzer/components/parser/utils/is-react-component.d.ts.map +1 -0
- package/dist/code-analyzer/components/parser/utils/is-react-component.js +43 -0
- package/dist/code-analyzer/components/parser/utils/is-react-component.js.map +1 -0
- package/dist/code-analyzer/components/parser/utils/trim-file-name.d.ts +2 -0
- package/dist/code-analyzer/components/parser/utils/trim-file-name.d.ts.map +1 -0
- package/dist/code-analyzer/components/parser/utils/trim-file-name.js +22 -0
- package/dist/code-analyzer/components/parser/utils/trim-file-name.js.map +1 -0
- package/dist/code-analyzer/components/types.d.ts +18 -0
- package/dist/code-analyzer/components/types.d.ts.map +1 -0
- package/dist/code-analyzer/components/types.js +5 -0
- package/dist/code-analyzer/components/types.js.map +1 -0
- package/dist/code-analyzer/components/utils/get-module-exports-path.d.ts +2 -0
- package/dist/code-analyzer/components/utils/get-module-exports-path.d.ts.map +1 -0
- package/dist/code-analyzer/components/utils/get-module-exports-path.js +60 -0
- package/dist/code-analyzer/components/utils/get-module-exports-path.js.map +1 -0
- package/dist/code-analyzer/index.d.ts +5 -0
- package/dist/code-analyzer/index.d.ts.map +1 -0
- package/dist/code-analyzer/index.js +8 -0
- package/dist/code-analyzer/index.js.map +1 -0
- package/dist/code-analyzer/orchestrator/index.d.ts +2 -0
- package/dist/code-analyzer/orchestrator/index.d.ts.map +1 -0
- package/dist/code-analyzer/orchestrator/index.js +5 -0
- package/dist/code-analyzer/orchestrator/index.js.map +1 -0
- package/dist/code-analyzer/orchestrator/run-analysis.d.ts +19 -0
- package/dist/code-analyzer/orchestrator/run-analysis.d.ts.map +1 -0
- package/dist/code-analyzer/orchestrator/run-analysis.js +109 -0
- package/dist/code-analyzer/orchestrator/run-analysis.js.map +1 -0
- package/dist/code-analyzer/snapshot/index.d.ts +2 -0
- package/dist/code-analyzer/snapshot/index.d.ts.map +1 -0
- package/dist/code-analyzer/snapshot/index.js +5 -0
- package/dist/code-analyzer/snapshot/index.js.map +1 -0
- package/dist/code-analyzer/snapshot/write-snapshot.d.ts +17 -0
- package/dist/code-analyzer/snapshot/write-snapshot.d.ts.map +1 -0
- package/dist/code-analyzer/snapshot/write-snapshot.js +60 -0
- package/dist/code-analyzer/snapshot/write-snapshot.js.map +1 -0
- package/dist/commands/analyze/adoption.d.ts +15 -0
- package/dist/commands/analyze/adoption.d.ts.map +1 -0
- package/dist/commands/analyze/adoption.js +34 -0
- package/dist/commands/analyze/adoption.js.map +1 -0
- package/dist/commands/analyze/components.d.ts +15 -0
- package/dist/commands/analyze/components.d.ts.map +1 -0
- package/dist/commands/analyze/components.js +34 -0
- package/dist/commands/analyze/components.js.map +1 -0
- package/dist/commands/analyze/status.d.ts +24 -0
- package/dist/commands/analyze/status.d.ts.map +1 -0
- package/dist/commands/analyze/status.js +54 -0
- package/dist/commands/analyze/status.js.map +1 -0
- package/dist/commands/analyze.d.ts +15 -0
- package/dist/commands/analyze.d.ts.map +1 -0
- package/dist/commands/analyze.js +34 -0
- package/dist/commands/analyze.js.map +1 -0
- package/dist/commands/components-import.d.ts +3 -3
- package/dist/commands/components-import.d.ts.map +1 -1
- package/dist/commands/components-import.js +9 -3
- package/dist/commands/components-import.js.map +1 -1
- package/dist/commands/publish-documentation.d.ts +2 -2
- package/dist/commands/run-local-exporter.js +2 -2
- package/dist/commands/run-local-exporter.js.map +1 -1
- package/dist/commands/storybook-import.d.ts +2 -2
- package/dist/commands/template-upload.d.ts.map +1 -1
- package/dist/commands/template-upload.js +10 -12
- package/dist/commands/template-upload.js.map +1 -1
- package/dist/types/config.d.ts +41 -5
- package/dist/types/config.d.ts.map +1 -1
- package/dist/types/config.js +9 -2
- package/dist/types/config.js.map +1 -1
- package/dist/types/types.js +2 -2
- package/dist/types/types.js.map +1 -1
- package/dist/utils/analyze-command.d.ts +42 -0
- package/dist/utils/analyze-command.d.ts.map +1 -0
- package/dist/utils/analyze-command.js +606 -0
- package/dist/utils/analyze-command.js.map +1 -0
- package/dist/utils/analyze-status.d.ts +7 -0
- package/dist/utils/analyze-status.d.ts.map +1 -0
- package/dist/utils/analyze-status.js +94 -0
- package/dist/utils/analyze-status.js.map +1 -0
- package/dist/utils/config.service.d.ts +1 -2
- package/dist/utils/config.service.d.ts.map +1 -1
- package/dist/utils/config.service.js +5 -7
- package/dist/utils/config.service.js.map +1 -1
- package/dist/utils/discover.d.ts +2 -2
- package/dist/utils/discover.d.ts.map +1 -1
- package/dist/utils/discover.js +25 -23
- package/dist/utils/discover.js.map +1 -1
- package/dist/utils/figma-tokens-data-loader.js +2 -2
- package/dist/utils/figma-tokens-data-loader.js.map +1 -1
- package/dist/utils/http-client.d.ts +4 -0
- package/dist/utils/http-client.d.ts.map +1 -0
- package/dist/utils/http-client.js +18 -0
- package/dist/utils/http-client.js.map +1 -0
- package/dist/utils/run-exporter/exporter-utils.js +2 -2
- package/dist/utils/run-exporter/exporter-utils.js.map +1 -1
- package/dist/utils/validate-templates.d.ts +1 -1
- package/dist/utils/validate-templates.d.ts.map +1 -1
- package/dist/utils/validate-templates.js +4 -4
- package/dist/utils/validate-templates.js.map +1 -1
- package/oclif.manifest.json +216 -1
- package/package.json +12 -4
package/README.md
CHANGED
|
@@ -205,6 +205,7 @@ See the additional use cases section for more information about available comman
|
|
|
205
205
|
Following is the list of use cases for Supernova CLI. We will be adding more over time, stay tuned!
|
|
206
206
|
|
|
207
207
|
- [Host private storybook](./docs/storybook-hosting.md)
|
|
208
|
+
- [Analyze code and push snapshots](./docs/code-analysis.md)
|
|
208
209
|
- [Synchronize Figma Token Plugin data](./docs/figma-tokens-sync.md)
|
|
209
210
|
- [List workspaces, design systems, brands and themes](./docs/list-workspaces.md)
|
|
210
211
|
|
|
@@ -0,0 +1,6 @@
|
|
|
1
|
+
import { ComponentDescriptor, UsageRecord } from "./types.js";
|
|
2
|
+
export declare function analyzeComponentUsage(projectRoot: string, components: ComponentDescriptor[], importFrom: string | string[], excludePaths?: string[]): Promise<{
|
|
3
|
+
components: ComponentDescriptor[];
|
|
4
|
+
records: Record<string, UsageRecord>;
|
|
5
|
+
}>;
|
|
6
|
+
//# sourceMappingURL=component-usage.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"component-usage.d.ts","sourceRoot":"","sources":["../../../src/code-analyzer/analyzers/component-usage.ts"],"names":[],"mappings":"AAIA,OAAO,EAAE,mBAAmB,EAAE,WAAW,EAAgB,MAAM,YAAY,CAAA;AAmS3E,wBAAsB,qBAAqB,CACzC,WAAW,EAAE,MAAM,EACnB,UAAU,EAAE,mBAAmB,EAAE,EACjC,UAAU,EAAE,MAAM,GAAG,MAAM,EAAE,EAC7B,YAAY,GAAE,MAAM,EAAO,GAC1B,OAAO,CAAC;IAAE,UAAU,EAAE,mBAAmB,EAAE,CAAC;IAAC,OAAO,EAAE,MAAM,CAAC,MAAM,EAAE,WAAW,CAAC,CAAA;CAAE,CAAC,CAiJtF"}
|
|
@@ -0,0 +1,344 @@
|
|
|
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]="cc1a69aa-37dd-535d-be5f-16be012f5e8a")}catch(e){}}();
|
|
3
|
+
import { readFile } from "node:fs/promises";
|
|
4
|
+
import ts from "typescript";
|
|
5
|
+
import { collectFiles, componentKeyFrom, toRelative } from "./helpers.js";
|
|
6
|
+
const sourcePattern = "**/*.{ts,tsx,js,jsx}";
|
|
7
|
+
const excludedFilePatterns = [".stories.", ".test.", ".spec."];
|
|
8
|
+
const minFallbackModuleScore = 3;
|
|
9
|
+
function escapeForRegex(input) {
|
|
10
|
+
return input.replaceAll(/[.*+?^${}()|[\]\\]/g, String.raw `\$&`);
|
|
11
|
+
}
|
|
12
|
+
function findImports(content, sourcePath) {
|
|
13
|
+
const imports = [];
|
|
14
|
+
const scriptKind = sourcePath.endsWith(".tsx")
|
|
15
|
+
? ts.ScriptKind.TSX
|
|
16
|
+
: sourcePath.endsWith(".jsx")
|
|
17
|
+
? ts.ScriptKind.JSX
|
|
18
|
+
: ts.ScriptKind.TS;
|
|
19
|
+
const sourceFile = ts.createSourceFile(sourcePath, content, ts.ScriptTarget.Latest, true, scriptKind);
|
|
20
|
+
sourceFile.forEachChild(node => {
|
|
21
|
+
if (!ts.isImportDeclaration(node) || !ts.isStringLiteral(node.moduleSpecifier)) {
|
|
22
|
+
return;
|
|
23
|
+
}
|
|
24
|
+
const { importClause } = node;
|
|
25
|
+
if (!importClause) {
|
|
26
|
+
return;
|
|
27
|
+
}
|
|
28
|
+
if (importClause.name) {
|
|
29
|
+
imports.push({
|
|
30
|
+
imported: "default",
|
|
31
|
+
local: importClause.name.getText(sourceFile),
|
|
32
|
+
moduleSpecifier: node.moduleSpecifier.text,
|
|
33
|
+
});
|
|
34
|
+
}
|
|
35
|
+
if (importClause.namedBindings && ts.isNamedImports(importClause.namedBindings)) {
|
|
36
|
+
for (const namedImport of importClause.namedBindings.elements) {
|
|
37
|
+
const imported = namedImport.propertyName
|
|
38
|
+
? namedImport.propertyName.getText(sourceFile)
|
|
39
|
+
: namedImport.name.getText(sourceFile);
|
|
40
|
+
const local = namedImport.name.getText(sourceFile);
|
|
41
|
+
imports.push({
|
|
42
|
+
imported,
|
|
43
|
+
local,
|
|
44
|
+
moduleSpecifier: node.moduleSpecifier.text,
|
|
45
|
+
});
|
|
46
|
+
}
|
|
47
|
+
}
|
|
48
|
+
});
|
|
49
|
+
return imports;
|
|
50
|
+
}
|
|
51
|
+
function findImportedLocalNames(content, importFrom, sourcePath) {
|
|
52
|
+
const importFromSet = new Set(Array.isArray(importFrom) ? importFrom : [importFrom]);
|
|
53
|
+
const isImportFromMatch = (moduleSpecifier) => {
|
|
54
|
+
for (const packageName of importFromSet) {
|
|
55
|
+
if (moduleSpecifier === packageName || moduleSpecifier.startsWith(`${packageName}/`)) {
|
|
56
|
+
return true;
|
|
57
|
+
}
|
|
58
|
+
}
|
|
59
|
+
return false;
|
|
60
|
+
};
|
|
61
|
+
return findImports(content, sourcePath)
|
|
62
|
+
.filter(binding => isImportFromMatch(binding.moduleSpecifier))
|
|
63
|
+
.map(binding => ({ imported: binding.imported, local: binding.local, moduleSpecifier: binding.moduleSpecifier }));
|
|
64
|
+
}
|
|
65
|
+
function lineAt(content, index) {
|
|
66
|
+
return content.slice(0, index).split("\n").length;
|
|
67
|
+
}
|
|
68
|
+
function extractJsxBlocks(content, localName, sourcePath) {
|
|
69
|
+
const escapedName = escapeForRegex(localName);
|
|
70
|
+
const tagPattern = new RegExp(`<\\/?${escapedName}\\b[^>]*>`, "g");
|
|
71
|
+
const tags = [...content.matchAll(tagPattern)];
|
|
72
|
+
const snippets = [];
|
|
73
|
+
for (let i = 0; i < tags.length; i++) {
|
|
74
|
+
const tag = tags[i];
|
|
75
|
+
const tagText = tag[0];
|
|
76
|
+
const startIndex = tag.index ?? 0;
|
|
77
|
+
if (tagText.startsWith("</")) {
|
|
78
|
+
continue;
|
|
79
|
+
}
|
|
80
|
+
if (tagText.endsWith("/>")) {
|
|
81
|
+
const endIndex = startIndex + tagText.length;
|
|
82
|
+
snippets.push({
|
|
83
|
+
lineEnd: lineAt(content, endIndex),
|
|
84
|
+
lineStart: lineAt(content, startIndex),
|
|
85
|
+
snippet: content.slice(startIndex, endIndex).trim(),
|
|
86
|
+
sourcePath,
|
|
87
|
+
});
|
|
88
|
+
continue;
|
|
89
|
+
}
|
|
90
|
+
let depth = 1;
|
|
91
|
+
let endIndex = startIndex + tagText.length;
|
|
92
|
+
for (let j = i + 1; j < tags.length; j++) {
|
|
93
|
+
const innerTag = tags[j];
|
|
94
|
+
const innerText = innerTag[0];
|
|
95
|
+
const innerIndex = innerTag.index ?? 0;
|
|
96
|
+
if (innerText.startsWith("</")) {
|
|
97
|
+
depth -= 1;
|
|
98
|
+
if (depth === 0) {
|
|
99
|
+
endIndex = innerIndex + innerText.length;
|
|
100
|
+
break;
|
|
101
|
+
}
|
|
102
|
+
continue;
|
|
103
|
+
}
|
|
104
|
+
if (!innerText.endsWith("/>")) {
|
|
105
|
+
depth += 1;
|
|
106
|
+
}
|
|
107
|
+
}
|
|
108
|
+
snippets.push({
|
|
109
|
+
lineEnd: lineAt(content, endIndex),
|
|
110
|
+
lineStart: lineAt(content, startIndex),
|
|
111
|
+
snippet: content.slice(startIndex, endIndex).trim(),
|
|
112
|
+
sourcePath,
|
|
113
|
+
});
|
|
114
|
+
}
|
|
115
|
+
return snippets;
|
|
116
|
+
}
|
|
117
|
+
function extractCallUsages(content, localName, sourcePath) {
|
|
118
|
+
const callPattern = new RegExp(`${escapeForRegex(localName)}\\s*\\(`, "g");
|
|
119
|
+
const snippets = [];
|
|
120
|
+
for (const match of content.matchAll(callPattern)) {
|
|
121
|
+
const index = match.index ?? 0;
|
|
122
|
+
const line = lineAt(content, index);
|
|
123
|
+
const lineText = content.split("\n")[line - 1] ?? "";
|
|
124
|
+
snippets.push({
|
|
125
|
+
lineEnd: line,
|
|
126
|
+
lineStart: line,
|
|
127
|
+
snippet: lineText.trim(),
|
|
128
|
+
sourcePath,
|
|
129
|
+
});
|
|
130
|
+
}
|
|
131
|
+
return snippets;
|
|
132
|
+
}
|
|
133
|
+
function normalizeValueText(input, maxLength = 120) {
|
|
134
|
+
const normalized = input.replaceAll(/\s+/g, " ").trim();
|
|
135
|
+
if (normalized.length <= maxLength) {
|
|
136
|
+
return normalized;
|
|
137
|
+
}
|
|
138
|
+
return `${normalized.slice(0, maxLength - 1)}…`;
|
|
139
|
+
}
|
|
140
|
+
function extractJsxPropUsage(content, localName, sourcePath) {
|
|
141
|
+
const propUsage = new Map();
|
|
142
|
+
const scriptKind = sourcePath.endsWith(".tsx")
|
|
143
|
+
? ts.ScriptKind.TSX
|
|
144
|
+
: sourcePath.endsWith(".jsx")
|
|
145
|
+
? ts.ScriptKind.JSX
|
|
146
|
+
: ts.ScriptKind.TS;
|
|
147
|
+
const sourceFile = ts.createSourceFile(sourcePath, content, ts.ScriptTarget.Latest, true, scriptKind);
|
|
148
|
+
const getTagName = (name) => {
|
|
149
|
+
if (ts.isIdentifier(name)) {
|
|
150
|
+
return name.text;
|
|
151
|
+
}
|
|
152
|
+
if (ts.isPropertyAccessExpression(name)) {
|
|
153
|
+
return name.name.text;
|
|
154
|
+
}
|
|
155
|
+
return null;
|
|
156
|
+
};
|
|
157
|
+
const readJsxAttributeValue = (attribute) => {
|
|
158
|
+
if (!attribute.initializer) {
|
|
159
|
+
return "{true}";
|
|
160
|
+
}
|
|
161
|
+
if (ts.isStringLiteral(attribute.initializer)) {
|
|
162
|
+
return `"${normalizeValueText(attribute.initializer.text)}"`;
|
|
163
|
+
}
|
|
164
|
+
if (ts.isJsxExpression(attribute.initializer)) {
|
|
165
|
+
if (!attribute.initializer.expression) {
|
|
166
|
+
return "{}";
|
|
167
|
+
}
|
|
168
|
+
const { expression } = attribute.initializer;
|
|
169
|
+
if (ts.isStringLiteralLike(expression) ||
|
|
170
|
+
ts.isNumericLiteral(expression) ||
|
|
171
|
+
expression.kind === ts.SyntaxKind.TrueKeyword ||
|
|
172
|
+
expression.kind === ts.SyntaxKind.FalseKeyword ||
|
|
173
|
+
expression.kind === ts.SyntaxKind.NullKeyword) {
|
|
174
|
+
return normalizeValueText(expression.getText(sourceFile));
|
|
175
|
+
}
|
|
176
|
+
return `{${normalizeValueText(expression.getText(sourceFile))}}`;
|
|
177
|
+
}
|
|
178
|
+
return normalizeValueText(attribute.initializer.getText(sourceFile));
|
|
179
|
+
};
|
|
180
|
+
const addPropUsage = (propName, value) => {
|
|
181
|
+
const existing = propUsage.get(propName) ?? { count: 0, values: new Map() };
|
|
182
|
+
existing.count += 1;
|
|
183
|
+
existing.values.set(value, (existing.values.get(value) ?? 0) + 1);
|
|
184
|
+
propUsage.set(propName, existing);
|
|
185
|
+
};
|
|
186
|
+
const inspectOpeningLikeElement = (node) => {
|
|
187
|
+
const tagName = getTagName(node.tagName);
|
|
188
|
+
if (tagName !== localName) {
|
|
189
|
+
return;
|
|
190
|
+
}
|
|
191
|
+
for (const attribute of node.attributes.properties) {
|
|
192
|
+
if (ts.isJsxSpreadAttribute(attribute)) {
|
|
193
|
+
continue;
|
|
194
|
+
}
|
|
195
|
+
const propName = attribute.name.getText(sourceFile);
|
|
196
|
+
const propValue = readJsxAttributeValue(attribute);
|
|
197
|
+
addPropUsage(propName, propValue);
|
|
198
|
+
}
|
|
199
|
+
};
|
|
200
|
+
const visit = (node) => {
|
|
201
|
+
if (ts.isJsxSelfClosingElement(node)) {
|
|
202
|
+
inspectOpeningLikeElement(node);
|
|
203
|
+
}
|
|
204
|
+
else if (ts.isJsxOpeningElement(node)) {
|
|
205
|
+
inspectOpeningLikeElement(node);
|
|
206
|
+
}
|
|
207
|
+
ts.forEachChild(node, visit);
|
|
208
|
+
};
|
|
209
|
+
visit(sourceFile);
|
|
210
|
+
return propUsage;
|
|
211
|
+
}
|
|
212
|
+
function mergePropUsage(target, incoming) {
|
|
213
|
+
const out = target ?? {};
|
|
214
|
+
for (const [propName, usage] of incoming.entries()) {
|
|
215
|
+
const existing = out[propName] ?? { count: 0, values: new Map() };
|
|
216
|
+
existing.count += usage.count;
|
|
217
|
+
for (const [value, valueCount] of usage.values.entries()) {
|
|
218
|
+
existing.values.set(value, (existing.values.get(value) ?? 0) + valueCount);
|
|
219
|
+
}
|
|
220
|
+
out[propName] = existing;
|
|
221
|
+
}
|
|
222
|
+
return out;
|
|
223
|
+
}
|
|
224
|
+
export async function analyzeComponentUsage(projectRoot, components, importFrom, excludePaths = []) {
|
|
225
|
+
const files = await collectFiles({
|
|
226
|
+
excludePaths,
|
|
227
|
+
pattern: sourcePattern,
|
|
228
|
+
projectRoot,
|
|
229
|
+
});
|
|
230
|
+
const records = {};
|
|
231
|
+
const componentByExportName = new Map(components.map(component => [component.exportName, component]));
|
|
232
|
+
const inferredComponentsByExportName = new Map();
|
|
233
|
+
const inferredKeys = new Set();
|
|
234
|
+
const fallbackModuleScores = new Map();
|
|
235
|
+
const resolveComponent = (imported, local, moduleSpecifier) => {
|
|
236
|
+
const known = componentByExportName.get(imported);
|
|
237
|
+
if (known) {
|
|
238
|
+
return known;
|
|
239
|
+
}
|
|
240
|
+
const inferredName = imported === "default" ? local : imported;
|
|
241
|
+
if (!inferredName || inferredName === "default") {
|
|
242
|
+
return undefined;
|
|
243
|
+
}
|
|
244
|
+
const existing = inferredComponentsByExportName.get(inferredName);
|
|
245
|
+
if (existing) {
|
|
246
|
+
return existing;
|
|
247
|
+
}
|
|
248
|
+
const descriptor = {
|
|
249
|
+
componentKey: componentKeyFrom(inferredName, `${moduleSpecifier}:${inferredName}`, inferredKeys),
|
|
250
|
+
componentPath: moduleSpecifier,
|
|
251
|
+
exportName: inferredName,
|
|
252
|
+
};
|
|
253
|
+
inferredComponentsByExportName.set(inferredName, descriptor);
|
|
254
|
+
return descriptor;
|
|
255
|
+
};
|
|
256
|
+
const runScan = async (targetImportFrom) => {
|
|
257
|
+
const targetImportFromList = Array.isArray(targetImportFrom) ? targetImportFrom : [targetImportFrom];
|
|
258
|
+
for (const file of files) {
|
|
259
|
+
if (excludedFilePatterns.some(pattern => file.includes(pattern))) {
|
|
260
|
+
continue;
|
|
261
|
+
}
|
|
262
|
+
const relativePath = toRelative(projectRoot, file);
|
|
263
|
+
const content = await readFile(file, "utf8");
|
|
264
|
+
for (const binding of findImports(content, relativePath)) {
|
|
265
|
+
if (binding.moduleSpecifier.startsWith(".")) {
|
|
266
|
+
continue;
|
|
267
|
+
}
|
|
268
|
+
if (!componentByExportName.has(binding.imported)) {
|
|
269
|
+
continue;
|
|
270
|
+
}
|
|
271
|
+
fallbackModuleScores.set(binding.moduleSpecifier, (fallbackModuleScores.get(binding.moduleSpecifier) ?? 0) + 1);
|
|
272
|
+
}
|
|
273
|
+
const importBindings = findImportedLocalNames(content, targetImportFromList, relativePath);
|
|
274
|
+
if (importBindings.length === 0) {
|
|
275
|
+
continue;
|
|
276
|
+
}
|
|
277
|
+
for (const importBinding of importBindings) {
|
|
278
|
+
const component = resolveComponent(importBinding.imported, importBinding.local, importBinding.moduleSpecifier);
|
|
279
|
+
if (!component) {
|
|
280
|
+
continue;
|
|
281
|
+
}
|
|
282
|
+
const jsxSnippets = extractJsxBlocks(content, importBinding.local, relativePath);
|
|
283
|
+
const snippets = jsxSnippets.length > 0 ? jsxSnippets : extractCallUsages(content, importBinding.local, relativePath);
|
|
284
|
+
const propUsage = extractJsxPropUsage(content, importBinding.local, relativePath);
|
|
285
|
+
if (snippets.length === 0) {
|
|
286
|
+
continue;
|
|
287
|
+
}
|
|
288
|
+
const existing = records[component.componentKey] ?? {
|
|
289
|
+
count: 0,
|
|
290
|
+
files: [],
|
|
291
|
+
propUsage: {},
|
|
292
|
+
snippets: [],
|
|
293
|
+
};
|
|
294
|
+
existing.count += snippets.length;
|
|
295
|
+
existing.files.push(relativePath);
|
|
296
|
+
existing.snippets.push(...snippets);
|
|
297
|
+
existing.propUsage = mergePropUsage(existing.propUsage, propUsage);
|
|
298
|
+
records[component.componentKey] = existing;
|
|
299
|
+
}
|
|
300
|
+
}
|
|
301
|
+
};
|
|
302
|
+
const importFromList = Array.isArray(importFrom) ? importFrom : [importFrom];
|
|
303
|
+
await runScan(importFromList);
|
|
304
|
+
const hasUsage = Object.values(records).some(record => record.count > 0);
|
|
305
|
+
if (!hasUsage) {
|
|
306
|
+
const bestFallback = [...fallbackModuleScores.entries()]
|
|
307
|
+
.filter(([moduleName, score]) => !importFromList.includes(moduleName) && score >= minFallbackModuleScore)
|
|
308
|
+
.sort((a, b) => b[1] - a[1])[0];
|
|
309
|
+
if (bestFallback) {
|
|
310
|
+
await runScan(bestFallback[0]);
|
|
311
|
+
}
|
|
312
|
+
}
|
|
313
|
+
for (const componentKey of Object.keys(records)) {
|
|
314
|
+
records[componentKey].files = [...new Set(records[componentKey].files)].sort((a, b) => a.localeCompare(b)).slice(0, 30);
|
|
315
|
+
records[componentKey].snippets = records[componentKey].snippets
|
|
316
|
+
.sort((a, b) => {
|
|
317
|
+
if (a.sourcePath === b.sourcePath) {
|
|
318
|
+
return a.lineStart - b.lineStart;
|
|
319
|
+
}
|
|
320
|
+
return a.sourcePath.localeCompare(b.sourcePath);
|
|
321
|
+
});
|
|
322
|
+
const currentPropUsage = records[componentKey].propUsage;
|
|
323
|
+
if (currentPropUsage) {
|
|
324
|
+
records[componentKey].propUsage = Object.fromEntries(Object.entries(currentPropUsage)
|
|
325
|
+
.sort((a, b) => b[1].count - a[1].count || a[0].localeCompare(b[0]))
|
|
326
|
+
.map(([propName, usage]) => [
|
|
327
|
+
propName,
|
|
328
|
+
{
|
|
329
|
+
count: usage.count,
|
|
330
|
+
values: [...usage.values.entries()]
|
|
331
|
+
.sort((a, b) => b[1] - a[1] || a[0].localeCompare(b[0]))
|
|
332
|
+
.map(([value, count]) => ({ count, value })),
|
|
333
|
+
},
|
|
334
|
+
]));
|
|
335
|
+
}
|
|
336
|
+
}
|
|
337
|
+
const resolvedComponents = components.length > 0 ? components : [...inferredComponentsByExportName.values()];
|
|
338
|
+
return {
|
|
339
|
+
components: resolvedComponents.sort((a, b) => a.componentKey.localeCompare(b.componentKey)),
|
|
340
|
+
records,
|
|
341
|
+
};
|
|
342
|
+
}
|
|
343
|
+
//# sourceMappingURL=component-usage.js.map
|
|
344
|
+
//# debugId=cc1a69aa-37dd-535d-be5f-16be012f5e8a
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"component-usage.js","sources":["../../../src/code-analyzer/analyzers/component-usage.ts"],"sourceRoot":"","sourcesContent":["import { readFile } from \"node:fs/promises\"\nimport ts from \"typescript\"\n\nimport { collectFiles, componentKeyFrom, toRelative } from \"./helpers.js\"\nimport { ComponentDescriptor, UsageRecord, UsageSnippet } from \"./types.js\"\n\nconst sourcePattern = \"**/*.{ts,tsx,js,jsx}\"\nconst excludedFilePatterns = [\".stories.\", \".test.\", \".spec.\"]\nconst minFallbackModuleScore = 3\n\ntype ImportBinding = {\n imported: string\n local: string\n moduleSpecifier: string\n}\n\ntype PropUsageAccumulator = {\n count: number\n values: Map<string, number>\n}\n\nfunction escapeForRegex(input: string): string {\n return input.replaceAll(/[.*+?^${}()|[\\]\\\\]/g, String.raw`\\$&`)\n}\n\nfunction findImports(content: string, sourcePath: string): ImportBinding[] {\n const imports: ImportBinding[] = []\n const scriptKind = sourcePath.endsWith(\".tsx\")\n ? ts.ScriptKind.TSX\n : sourcePath.endsWith(\".jsx\")\n ? ts.ScriptKind.JSX\n : ts.ScriptKind.TS\n\n const sourceFile = ts.createSourceFile(sourcePath, content, ts.ScriptTarget.Latest, true, scriptKind)\n\n sourceFile.forEachChild(node => {\n if (!ts.isImportDeclaration(node) || !ts.isStringLiteral(node.moduleSpecifier)) {\n return\n }\n\n const {importClause} = node\n if (!importClause) {\n return\n }\n\n if (importClause.name) {\n imports.push({\n imported: \"default\",\n local: importClause.name.getText(sourceFile),\n moduleSpecifier: node.moduleSpecifier.text,\n })\n }\n\n if (importClause.namedBindings && ts.isNamedImports(importClause.namedBindings)) {\n for (const namedImport of importClause.namedBindings.elements) {\n const imported = namedImport.propertyName\n ? namedImport.propertyName.getText(sourceFile)\n : namedImport.name.getText(sourceFile)\n const local = namedImport.name.getText(sourceFile)\n imports.push({\n imported,\n local,\n moduleSpecifier: node.moduleSpecifier.text,\n })\n }\n }\n })\n\n return imports\n}\n\nfunction findImportedLocalNames(\n content: string,\n importFrom: string | string[],\n sourcePath: string,\n): Array<{ imported: string; local: string; moduleSpecifier: string }> {\n const importFromSet = new Set(Array.isArray(importFrom) ? importFrom : [importFrom])\n\n const isImportFromMatch = (moduleSpecifier: string): boolean => {\n for (const packageName of importFromSet) {\n if (moduleSpecifier === packageName || moduleSpecifier.startsWith(`${packageName}/`)) {\n return true\n }\n }\n\n return false\n }\n\n return findImports(content, sourcePath)\n .filter(binding => isImportFromMatch(binding.moduleSpecifier))\n .map(binding => ({ imported: binding.imported, local: binding.local, moduleSpecifier: binding.moduleSpecifier }))\n}\n\nfunction lineAt(content: string, index: number): number {\n return content.slice(0, index).split(\"\\n\").length\n}\n\nfunction extractJsxBlocks(content: string, localName: string, sourcePath: string): UsageSnippet[] {\n const escapedName = escapeForRegex(localName)\n const tagPattern = new RegExp(`<\\\\/?${escapedName}\\\\b[^>]*>`, \"g\")\n const tags = [...content.matchAll(tagPattern)]\n const snippets: UsageSnippet[] = []\n\n for (let i = 0; i < tags.length; i++) {\n const tag = tags[i]\n const tagText = tag[0]\n const startIndex = tag.index ?? 0\n\n if (tagText.startsWith(\"</\")) {\n continue\n }\n\n if (tagText.endsWith(\"/>\")) {\n const endIndex = startIndex + tagText.length\n snippets.push({\n lineEnd: lineAt(content, endIndex),\n lineStart: lineAt(content, startIndex),\n snippet: content.slice(startIndex, endIndex).trim(),\n sourcePath,\n })\n continue\n }\n\n let depth = 1\n let endIndex = startIndex + tagText.length\n\n for (let j = i + 1; j < tags.length; j++) {\n const innerTag = tags[j]\n const innerText = innerTag[0]\n const innerIndex = innerTag.index ?? 0\n\n if (innerText.startsWith(\"</\")) {\n depth -= 1\n if (depth === 0) {\n endIndex = innerIndex + innerText.length\n break\n }\n\n continue\n }\n\n if (!innerText.endsWith(\"/>\")) {\n depth += 1\n }\n }\n\n snippets.push({\n lineEnd: lineAt(content, endIndex),\n lineStart: lineAt(content, startIndex),\n snippet: content.slice(startIndex, endIndex).trim(),\n sourcePath,\n })\n }\n\n return snippets\n}\n\nfunction extractCallUsages(content: string, localName: string, sourcePath: string): UsageSnippet[] {\n const callPattern = new RegExp(`${escapeForRegex(localName)}\\\\s*\\\\(`, \"g\")\n const snippets: UsageSnippet[] = []\n\n for (const match of content.matchAll(callPattern)) {\n const index = match.index ?? 0\n const line = lineAt(content, index)\n const lineText = content.split(\"\\n\")[line - 1] ?? \"\"\n\n snippets.push({\n lineEnd: line,\n lineStart: line,\n snippet: lineText.trim(),\n sourcePath,\n })\n }\n\n return snippets\n}\n\nfunction normalizeValueText(input: string, maxLength = 120): string {\n const normalized = input.replaceAll(/\\s+/g, \" \").trim()\n if (normalized.length <= maxLength) {\n return normalized\n }\n\n return `${normalized.slice(0, maxLength - 1)}…`\n}\n\nfunction extractJsxPropUsage(content: string, localName: string, sourcePath: string): Map<string, PropUsageAccumulator> {\n const propUsage = new Map<string, PropUsageAccumulator>()\n const scriptKind = sourcePath.endsWith(\".tsx\")\n ? ts.ScriptKind.TSX\n : sourcePath.endsWith(\".jsx\")\n ? ts.ScriptKind.JSX\n : ts.ScriptKind.TS\n const sourceFile = ts.createSourceFile(sourcePath, content, ts.ScriptTarget.Latest, true, scriptKind)\n\n const getTagName = (name: ts.JsxTagNameExpression): string | null => {\n if (ts.isIdentifier(name)) {\n return name.text\n }\n\n if (ts.isPropertyAccessExpression(name)) {\n return name.name.text\n }\n\n return null\n }\n\n const readJsxAttributeValue = (attribute: ts.JsxAttribute): string => {\n if (!attribute.initializer) {\n return \"{true}\"\n }\n\n if (ts.isStringLiteral(attribute.initializer)) {\n return `\"${normalizeValueText(attribute.initializer.text)}\"`\n }\n\n if (ts.isJsxExpression(attribute.initializer)) {\n if (!attribute.initializer.expression) {\n return \"{}\"\n }\n\n const {expression} = attribute.initializer\n if (\n ts.isStringLiteralLike(expression) ||\n ts.isNumericLiteral(expression) ||\n expression.kind === ts.SyntaxKind.TrueKeyword ||\n expression.kind === ts.SyntaxKind.FalseKeyword ||\n expression.kind === ts.SyntaxKind.NullKeyword\n ) {\n return normalizeValueText(expression.getText(sourceFile))\n }\n\n return `{${normalizeValueText(expression.getText(sourceFile))}}`\n }\n\n return normalizeValueText(attribute.initializer.getText(sourceFile))\n }\n\n const addPropUsage = (propName: string, value: string): void => {\n const existing = propUsage.get(propName) ?? { count: 0, values: new Map<string, number>() }\n existing.count += 1\n existing.values.set(value, (existing.values.get(value) ?? 0) + 1)\n propUsage.set(propName, existing)\n }\n\n const inspectOpeningLikeElement = (node: ts.JsxOpeningLikeElement): void => {\n const tagName = getTagName(node.tagName)\n if (tagName !== localName) {\n return\n }\n\n for (const attribute of node.attributes.properties) {\n if (ts.isJsxSpreadAttribute(attribute)) {\n continue\n }\n\n const propName = attribute.name.getText(sourceFile)\n const propValue = readJsxAttributeValue(attribute)\n addPropUsage(propName, propValue)\n }\n }\n\n const visit = (node: ts.Node): void => {\n if (ts.isJsxSelfClosingElement(node)) {\n inspectOpeningLikeElement(node)\n } else if (ts.isJsxOpeningElement(node)) {\n inspectOpeningLikeElement(node)\n }\n\n ts.forEachChild(node, visit)\n }\n\n visit(sourceFile)\n return propUsage\n}\n\nfunction mergePropUsage(\n target: Record<string, PropUsageAccumulator> | undefined,\n incoming: Map<string, PropUsageAccumulator>,\n): Record<string, PropUsageAccumulator> {\n const out = target ?? {}\n\n for (const [propName, usage] of incoming.entries()) {\n const existing = out[propName] ?? { count: 0, values: new Map<string, number>() }\n existing.count += usage.count\n for (const [value, valueCount] of usage.values.entries()) {\n existing.values.set(value, (existing.values.get(value) ?? 0) + valueCount)\n }\n\n out[propName] = existing\n }\n\n return out\n}\n\nexport async function analyzeComponentUsage(\n projectRoot: string,\n components: ComponentDescriptor[],\n importFrom: string | string[],\n excludePaths: string[] = [],\n): Promise<{ components: ComponentDescriptor[]; records: Record<string, UsageRecord> }> {\n const files = await collectFiles({\n excludePaths,\n pattern: sourcePattern,\n projectRoot,\n })\n const records: Record<string, UsageRecord> = {}\n const componentByExportName = new Map(components.map(component => [component.exportName, component]))\n const inferredComponentsByExportName = new Map<string, ComponentDescriptor>()\n const inferredKeys = new Set<string>()\n const fallbackModuleScores = new Map<string, number>()\n\n const resolveComponent = (imported: string, local: string, moduleSpecifier: string): ComponentDescriptor | undefined => {\n const known = componentByExportName.get(imported)\n if (known) {\n return known\n }\n\n const inferredName = imported === \"default\" ? local : imported\n if (!inferredName || inferredName === \"default\") {\n return undefined\n }\n\n const existing = inferredComponentsByExportName.get(inferredName)\n if (existing) {\n return existing\n }\n\n const descriptor: ComponentDescriptor = {\n componentKey: componentKeyFrom(inferredName, `${moduleSpecifier}:${inferredName}`, inferredKeys),\n componentPath: moduleSpecifier,\n exportName: inferredName,\n }\n inferredComponentsByExportName.set(inferredName, descriptor)\n return descriptor\n }\n\n const runScan = async (targetImportFrom: string | string[]): Promise<void> => {\n const targetImportFromList = Array.isArray(targetImportFrom) ? targetImportFrom : [targetImportFrom]\n for (const file of files) {\n if (excludedFilePatterns.some(pattern => file.includes(pattern))) {\n continue\n }\n\n const relativePath = toRelative(projectRoot, file)\n const content = await readFile(file, \"utf8\")\n\n // Gather potential fallback module names based on import overlap with known DS components.\n for (const binding of findImports(content, relativePath)) {\n if (binding.moduleSpecifier.startsWith(\".\")) {\n continue\n }\n\n if (!componentByExportName.has(binding.imported)) {\n continue\n }\n\n fallbackModuleScores.set(binding.moduleSpecifier, (fallbackModuleScores.get(binding.moduleSpecifier) ?? 0) + 1)\n }\n\n const importBindings = findImportedLocalNames(content, targetImportFromList, relativePath)\n if (importBindings.length === 0) {\n continue\n }\n\n for (const importBinding of importBindings) {\n const component = resolveComponent(importBinding.imported, importBinding.local, importBinding.moduleSpecifier)\n if (!component) {\n continue\n }\n\n const jsxSnippets = extractJsxBlocks(content, importBinding.local, relativePath)\n const snippets = jsxSnippets.length > 0 ? jsxSnippets : extractCallUsages(content, importBinding.local, relativePath)\n const propUsage = extractJsxPropUsage(content, importBinding.local, relativePath)\n\n if (snippets.length === 0) {\n continue\n }\n\n const existing = records[component.componentKey] ?? {\n count: 0,\n files: [],\n propUsage: {},\n snippets: [],\n }\n\n existing.count += snippets.length\n existing.files.push(relativePath)\n existing.snippets.push(...snippets)\n existing.propUsage = mergePropUsage(existing.propUsage as Record<string, PropUsageAccumulator> | undefined, propUsage) as unknown as UsageRecord[\"propUsage\"]\n records[component.componentKey] = existing\n }\n }\n }\n\n const importFromList = Array.isArray(importFrom) ? importFrom : [importFrom]\n await runScan(importFromList)\n\n const hasUsage = Object.values(records).some(record => record.count > 0)\n if (!hasUsage) {\n const bestFallback = [...fallbackModuleScores.entries()]\n .filter(([moduleName, score]) => !importFromList.includes(moduleName) && score >= minFallbackModuleScore)\n .sort((a, b) => b[1] - a[1])[0]\n\n if (bestFallback) {\n await runScan(bestFallback[0])\n }\n }\n\n for (const componentKey of Object.keys(records)) {\n records[componentKey].files = [...new Set(records[componentKey].files)].sort((a, b) => a.localeCompare(b)).slice(0, 30)\n records[componentKey].snippets = records[componentKey].snippets\n .sort((a, b) => {\n if (a.sourcePath === b.sourcePath) {\n return a.lineStart - b.lineStart\n }\n\n return a.sourcePath.localeCompare(b.sourcePath)\n })\n\n const currentPropUsage = records[componentKey].propUsage as unknown as Record<string, PropUsageAccumulator> | undefined\n if (currentPropUsage) {\n records[componentKey].propUsage = Object.fromEntries(\n Object.entries(currentPropUsage)\n .sort((a, b) => b[1].count - a[1].count || a[0].localeCompare(b[0]))\n .map(([propName, usage]) => [\n propName,\n {\n count: usage.count,\n values: [...usage.values.entries()]\n .sort((a, b) => b[1] - a[1] || a[0].localeCompare(b[0]))\n .map(([value, count]) => ({ count, value })),\n },\n ]),\n )\n }\n\n }\n\n const resolvedComponents = components.length > 0 ? components : [...inferredComponentsByExportName.values()]\n\n return {\n components: resolvedComponents.sort((a, b) => a.componentKey.localeCompare(b.componentKey)),\n records,\n }\n}\n"],"names":[],"mappings":";;AAAA,OAAO,EAAE,QAAQ,EAAE,MAAM,kBA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|
|
3
|
+
pattern: string;
|
|
4
|
+
projectRoot: string;
|
|
5
|
+
};
|
|
6
|
+
export declare function normalizeExcludePath(excludePath: string): string;
|
|
7
|
+
export declare function collectFiles(input: CollectFilesInput): Promise<string[]>;
|
|
8
|
+
export declare function componentKeyFrom(exportName: string, componentPath: string, existing: Set<string>): string;
|
|
9
|
+
export declare function toRelative(projectRoot: string, absolutePath: string): string;
|
|
10
|
+
export declare function uniqueSorted(values: string[]): string[];
|
|
11
|
+
//# sourceMappingURL=helpers.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"helpers.d.ts","sourceRoot":"","sources":["../../../src/code-analyzer/analyzers/helpers.ts"],"names":[],"mappings":"AAeA,MAAM,MAAM,iBAAiB,GAAG;IAC9B,YAAY,CAAC,EAAE,MAAM,EAAE,CAAA;IACvB,OAAO,EAAE,MAAM,CAAA;IACf,WAAW,EAAE,MAAM,CAAA;CACpB,CAAA;AAED,wBAAgB,oBAAoB,CAAC,WAAW,EAAE,MAAM,GAAG,MAAM,CAEhE;AAMD,wBAAsB,YAAY,CAAC,KAAK,EAAE,iBAAiB,GAAG,OAAO,CAAC,MAAM,EAAE,CAAC,CAe9E;AAED,wBAAgB,gBAAgB,CAAC,UAAU,EAAE,MAAM,EAAE,aAAa,EAAE,MAAM,EAAE,QAAQ,EAAE,GAAG,CAAC,MAAM,CAAC,GAAG,MAAM,CAiBzG;AAED,wBAAgB,UAAU,CAAC,WAAW,EAAE,MAAM,EAAE,YAAY,EAAE,MAAM,GAAG,MAAM,CAE5E;AAED,wBAAgB,YAAY,CAAC,MAAM,EAAE,MAAM,EAAE,GAAG,MAAM,EAAE,CAEvD"}
|
|
@@ -0,0 +1,59 @@
|
|
|
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]="43307c53-48e5-5451-9244-aa434fa6d8dc")}catch(e){}}();
|
|
3
|
+
import { createHash } from "node:crypto";
|
|
4
|
+
import { globSync } from "glob";
|
|
5
|
+
import path from "node:path";
|
|
6
|
+
const ignoredDirectories = [
|
|
7
|
+
"**/.git/**",
|
|
8
|
+
"**/.next/**",
|
|
9
|
+
"**/.supernova/**",
|
|
10
|
+
"**/build/**",
|
|
11
|
+
"**/coverage/**",
|
|
12
|
+
"**/dist/**",
|
|
13
|
+
"**/node_modules/**",
|
|
14
|
+
"**/out/**",
|
|
15
|
+
];
|
|
16
|
+
export function normalizeExcludePath(excludePath) {
|
|
17
|
+
return excludePath.trim().replaceAll("\\", "/").replace(/^\.?\//, "").replace(/\/+$/, "");
|
|
18
|
+
}
|
|
19
|
+
function isExcluded(relativePath, excludePaths) {
|
|
20
|
+
return excludePaths.some(excludePath => relativePath === excludePath || relativePath.startsWith(`${excludePath}/`));
|
|
21
|
+
}
|
|
22
|
+
export async function collectFiles(input) {
|
|
23
|
+
const excludePaths = (input.excludePaths ?? []).map(normalizeExcludePath).filter(path => path.length > 0);
|
|
24
|
+
const files = globSync(input.pattern, {
|
|
25
|
+
absolute: true,
|
|
26
|
+
cwd: input.projectRoot,
|
|
27
|
+
dot: false,
|
|
28
|
+
ignore: ignoredDirectories,
|
|
29
|
+
nodir: true,
|
|
30
|
+
});
|
|
31
|
+
const filtered = excludePaths.length > 0
|
|
32
|
+
? files.filter(file => !isExcluded(toRelative(input.projectRoot, file), excludePaths))
|
|
33
|
+
: files;
|
|
34
|
+
return filtered.sort((a, b) => a.localeCompare(b));
|
|
35
|
+
}
|
|
36
|
+
export function componentKeyFrom(exportName, componentPath, existing) {
|
|
37
|
+
const normalized = exportName
|
|
38
|
+
.replaceAll(/([a-z0-9])([A-Z])/g, "$1-$2")
|
|
39
|
+
.replaceAll(/[^a-zA-Z0-9]+/g, "-")
|
|
40
|
+
.replaceAll(/-{2,}/g, "-")
|
|
41
|
+
.replaceAll(/^-|-$/g, "")
|
|
42
|
+
.toLowerCase();
|
|
43
|
+
if (!existing.has(normalized)) {
|
|
44
|
+
existing.add(normalized);
|
|
45
|
+
return normalized;
|
|
46
|
+
}
|
|
47
|
+
const suffix = createHash("sha1").update(componentPath).digest("hex").slice(0, 6);
|
|
48
|
+
const key = `${normalized}-${suffix}`;
|
|
49
|
+
existing.add(key);
|
|
50
|
+
return key;
|
|
51
|
+
}
|
|
52
|
+
export function toRelative(projectRoot, absolutePath) {
|
|
53
|
+
return path.relative(projectRoot, absolutePath).split(path.sep).join("/");
|
|
54
|
+
}
|
|
55
|
+
export function uniqueSorted(values) {
|
|
56
|
+
return [...new Set(values)].sort((a, b) => a.localeCompare(b));
|
|
57
|
+
}
|
|
58
|
+
//# sourceMappingURL=helpers.js.map
|
|
59
|
+
//# debugId=43307c53-48e5-5451-9244-aa434fa6d8dc
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"helpers.js","sources":["../../../src/code-analyzer/analyzers/helpers.ts"],"sourceRoot":"","sourcesContent":["import { createHash } from \"node:crypto\"\nimport { globSync } from \"glob\"\nimport path from \"node:path\"\n\nconst ignoredDirectories = [\n \"**/.git/**\",\n \"**/.next/**\",\n \"**/.supernova/**\",\n \"**/build/**\",\n \"**/coverage/**\",\n \"**/dist/**\",\n \"**/node_modules/**\",\n \"**/out/**\",\n]\n\nexport type CollectFilesInput = {\n excludePaths?: string[]\n pattern: string\n projectRoot: string\n}\n\nexport function normalizeExcludePath(excludePath: string): string {\n return excludePath.trim().replaceAll(\"\\\\\", \"/\").replace(/^\\.?\\//, \"\").replace(/\\/+$/, \"\")\n}\n\nfunction isExcluded(relativePath: string, excludePaths: string[]): boolean {\n return excludePaths.some(excludePath => relativePath === excludePath || relativePath.startsWith(`${excludePath}/`))\n}\n\nexport async function collectFiles(input: CollectFilesInput): Promise<string[]> {\n const excludePaths = (input.excludePaths ?? []).map(normalizeExcludePath).filter(path => path.length > 0)\n const files = globSync(input.pattern, {\n absolute: true,\n cwd: input.projectRoot,\n dot: false,\n ignore: ignoredDirectories,\n nodir: true,\n })\n\n const filtered = excludePaths.length > 0\n ? files.filter(file => !isExcluded(toRelative(input.projectRoot, file), excludePaths))\n : files\n\n return filtered.sort((a, b) => a.localeCompare(b))\n}\n\nexport function componentKeyFrom(exportName: string, componentPath: string, existing: Set<string>): string {\n const normalized = exportName\n .replaceAll(/([a-z0-9])([A-Z])/g, \"$1-$2\")\n .replaceAll(/[^a-zA-Z0-9]+/g, \"-\")\n .replaceAll(/-{2,}/g, \"-\")\n .replaceAll(/^-|-$/g, \"\")\n .toLowerCase()\n\n if (!existing.has(normalized)) {\n existing.add(normalized)\n return normalized\n }\n\n const suffix = createHash(\"sha1\").update(componentPath).digest(\"hex\").slice(0, 6)\n const key = `${normalized}-${suffix}`\n existing.add(key)\n return key\n}\n\nexport function toRelative(projectRoot: string, absolutePath: string): string {\n return path.relative(projectRoot, absolutePath).split(path.sep).join(\"/\")\n}\n\nexport function uniqueSorted(values: string[]): string[] {\n return [...new Set(values)].sort((a, b) => a.localeCompare(b))\n}\n"],"names":[],"mappings":";;AAAA,OAAO,EAAE,UAAU,EAAE,MAAM,aAAa,CAAA;AACxC,OAAO,EAAE,QAAQ,EAAE,MAAM,MAAM,CAAA;AAC/B,OAAO,IAAI,MAAM,WAAW,CAAA;AAE5B,MAAM,kBAAkB,GAAG;IACzB,YAAY;IACZ,aAAa;IACb,kBAAkB;IAClB,aAAa;IACb,gBAAgB;IAChB,YAAY;IACZ,oBAAoB;IACpB,WAAW;CACZ,CAAA;AAQD,MAAM,UAAU,oBAAoB,CAAC,WAAmB;IACtD,OAAO,WAAW,CAAC,IAAI,EAAE,CAAC,UAAU,CAAC,IAAI,EAAE,GAAG,CAAC,CAAC,OAAO,CAAC,QAAQ,EAAE,EAAE,CAAC,CAAC,OAAO,CAAC,MAAM,EAAE,EAAE,CAAC,CAAA;AAC3F,CAAC;AAED,SAAS,UAAU,CAAC,YAAoB,EAAE,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CAAC,QAAQ,EAAE,EAAE,CAAC;SACxB,WAAW,EAAE,CAAA;IAEhB,IAAI,CAAC,QAAQ,CAAC,GAAG,CAAC,UAAU,CAAC,EAAE,CAAC;QAC9B,QAAQ,CAAC,GAAG,CAAC,UAAU,CAAC,CAAA;QACxB,OAAO,UAAU,CAAA;IACnB,CAAC;IAED,MAAM,MAAM,GAAG,UAAU,CAAC,MAAM,CAAC,CAAC,MAAM,CAAC,aAAa,CAAC,CAAC,MAAM,CAAC,KAAK,CAAC,CAAC,KAAK,CAAC,CAAC,EAAE,CAAC,CAAC,CAAA;IACjF,MAAM,GAAG,GAAG,GAAG,UAAU,IAAI,MAAM,EAAE,CAAA;IACrC,QAAQ,CAAC,GAAG,CAAC,GAAG,CAAC,CAAA;IACjB,OAAO,GAAG,CAAA;AACZ,CAAC;AAED,MAAM,UAAU,UAAU,CAAC,WAAmB,EAAE,YAAoB;IAClE,OAAO,IAAI,CAAC,QAAQ,CAAC,WAAW,EAAE,YAAY,CAAC,CAAC,KAAK,CAAC,IAAI,CAAC,GAAG,CAAC,CAAC,IAAI,CAAC,GAAG,CAAC,CAAA;AAC3E,CAAC;AAED,MAAM,UAAU,YAAY,CAAC,MAAgB;IAC3C,OAAO,CAAC,GAAG,IAAI,GAAG,CAAC,MAAM,CAAC,CAAC,CAAC,IAAI,CAAC,CAAC,CAAC,EAAE,CAAC,EAAE,EAAE,CAAC,CAAC,CAAC,aAAa,CAAC,CAAC,CAAC,CAAC,CAAA;AAChE,CAAC","debug_id":"43307c53-48e5-5451-9244-aa434fa6d8dc"}
|
|
@@ -0,0 +1,8 @@
|
|
|
1
|
+
export * from "./component-usage.js";
|
|
2
|
+
export * from "./jsdoc.js";
|
|
3
|
+
export * from "./static-components.js";
|
|
4
|
+
export * from "./storybook-docs.js";
|
|
5
|
+
export * from "./storybook-stories.js";
|
|
6
|
+
export * from "./types.js";
|
|
7
|
+
export * from "./typescript-api.js";
|
|
8
|
+
//# sourceMappingURL=index.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../src/code-analyzer/analyzers/index.ts"],"names":[],"mappings":"AAAA,cAAc,sBAAsB,CAAA;AACpC,cAAc,YAAY,CAAA;AAC1B,cAAc,wBAAwB,CAAA;AACtC,cAAc,qBAAqB,CAAA;AACnC,cAAc,wBAAwB,CAAA;AACtC,cAAc,YAAY,CAAA;AAC1B,cAAc,qBAAqB,CAAA"}
|
|
@@ -0,0 +1,11 @@
|
|
|
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]="d56c2179-2ee1-50d2-b46c-8d3cd6a08c67")}catch(e){}}();
|
|
3
|
+
export * from "./component-usage.js";
|
|
4
|
+
export * from "./jsdoc.js";
|
|
5
|
+
export * from "./static-components.js";
|
|
6
|
+
export * from "./storybook-docs.js";
|
|
7
|
+
export * from "./storybook-stories.js";
|
|
8
|
+
export * from "./types.js";
|
|
9
|
+
export * from "./typescript-api.js";
|
|
10
|
+
//# sourceMappingURL=index.js.map
|
|
11
|
+
//# debugId=d56c2179-2ee1-50d2-b46c-8d3cd6a08c67
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"index.js","sources":["../../../src/code-analyzer/analyzers/index.ts"],"sourceRoot":"","sourcesContent":["export * from \"./component-usage.js\"\nexport * from \"./jsdoc.js\"\nexport * from \"./static-components.js\"\nexport * from \"./storybook-docs.js\"\nexport * from \"./storybook-stories.js\"\nexport * from \"./types.js\"\nexport * from \"./typescript-api.js\"\n"],"names":[],"mappings":";;AAAA,cAAc,sBAAsB,CAAA;AACpC,cAAc,YAAY,CAAA;AAC1B,cAAc,wBAAwB,CAAA;AACtC,cAAc,qBAAqB,CAAA;AACnC,cAAc,wBAAwB,CAAA;AACtC,cAAc,YAAY,CAAA;AAC1B,cAAc,qBAAqB,CAAA","debug_id":"d56c2179-2ee1-50d2-b46c-8d3cd6a08c67"}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"jsdoc.d.ts","sourceRoot":"","sources":["../../../src/code-analyzer/analyzers/jsdoc.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,WAAW,EAAE,6BAA6B,EAAE,MAAM,YAAY,CAAA;AAEvE,wBAAsB,YAAY,CAChC,sBAAsB,EAAE,6BAA6B,GACpD,OAAO,CAAC,MAAM,CAAC,MAAM,EAAE,WAAW,CAAC,CAAC,CAEtC"}
|
|
@@ -0,0 +1,7 @@
|
|
|
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]="d212b647-6cc0-5c22-9a60-f3e400d4e881")}catch(e){}}();
|
|
3
|
+
export async function analyzeJsDoc(staticComponentsResult) {
|
|
4
|
+
return staticComponentsResult.jsdocByComponentKey;
|
|
5
|
+
}
|
|
6
|
+
//# sourceMappingURL=jsdoc.js.map
|
|
7
|
+
//# debugId=d212b647-6cc0-5c22-9a60-f3e400d4e881
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"jsdoc.js","sources":["../../../src/code-analyzer/analyzers/jsdoc.ts"],"sourceRoot":"","sourcesContent":["import { JsDocRecord, StaticComponentAnalyzerResult } from \"./types.js\"\n\nexport async function analyzeJsDoc(\n staticComponentsResult: StaticComponentAnalyzerResult,\n): Promise<Record<string, JsDocRecord>> {\n return staticComponentsResult.jsdocByComponentKey\n}\n"],"names":[],"mappings":";;AAEA,MAAM,CAAC,KAAK,UAAU,YAAY,CAChC,sBAAqD;IAErD,OAAO,sBAAsB,CAAC,mBAAmB,CAAA;AACnD,CAAC","debug_id":"d212b647-6cc0-5c22-9a60-f3e400d4e881"}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"static-components.d.ts","sourceRoot":"","sources":["../../../src/code-analyzer/analyzers/static-components.ts"],"names":[],"mappings":"AAQA,OAAO,EAKL,6BAA6B,EAC9B,MAAM,YAAY,CAAA;AAucnB,wBAAsB,uBAAuB,CAAC,WAAW,EAAE,MAAM,EAAE,UAAU,EAAE,MAAM,GAAG,OAAO,CAAC,6BAA6B,CAAC,CAwC7H"}
|