@wtdlee/repomap 0.2.0 → 0.3.1
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/dist/analyzers/index.d.ts +69 -5
- package/dist/analyzers/index.js +1 -5
- package/dist/chunk-3PWXDB7B.js +153 -0
- package/dist/{generators/page-map-generator.js → chunk-3YFXZAP7.js} +322 -358
- package/dist/chunk-6F4PWJZI.js +1 -0
- package/dist/{generators/rails-map-generator.js → chunk-E4WRODSI.js} +86 -94
- package/dist/chunk-GNBMJMET.js +2519 -0
- package/dist/{server/doc-server.js → chunk-M6YNU536.js} +702 -290
- package/dist/chunk-OWM6WNLE.js +2610 -0
- package/dist/chunk-SSU6QFTX.js +1058 -0
- package/dist/cli.d.ts +0 -1
- package/dist/cli.js +348 -452
- package/dist/dataflow-analyzer-BfAiqVUp.d.ts +180 -0
- package/dist/env-detector-EEMVUEIA.js +1 -0
- package/dist/generators/index.d.ts +431 -3
- package/dist/generators/index.js +2 -3
- package/dist/index.d.ts +53 -10
- package/dist/index.js +8 -11
- package/dist/page-map-generator-6MJGPBVA.js +1 -0
- package/dist/rails-UWSDRS33.js +1 -0
- package/dist/rails-map-generator-D2URLMVJ.js +2 -0
- package/dist/server/index.d.ts +33 -1
- package/dist/server/index.js +7 -1
- package/dist/types.d.ts +39 -37
- package/dist/types.js +1 -5
- package/package.json +5 -3
- package/dist/analyzers/base-analyzer.d.ts +0 -45
- package/dist/analyzers/base-analyzer.js +0 -47
- package/dist/analyzers/dataflow-analyzer.d.ts +0 -29
- package/dist/analyzers/dataflow-analyzer.js +0 -425
- package/dist/analyzers/graphql-analyzer.d.ts +0 -22
- package/dist/analyzers/graphql-analyzer.js +0 -386
- package/dist/analyzers/pages-analyzer.d.ts +0 -84
- package/dist/analyzers/pages-analyzer.js +0 -1695
- package/dist/analyzers/rails/index.d.ts +0 -46
- package/dist/analyzers/rails/index.js +0 -145
- package/dist/analyzers/rails/rails-controller-analyzer.d.ts +0 -82
- package/dist/analyzers/rails/rails-controller-analyzer.js +0 -478
- package/dist/analyzers/rails/rails-grpc-analyzer.d.ts +0 -44
- package/dist/analyzers/rails/rails-grpc-analyzer.js +0 -262
- package/dist/analyzers/rails/rails-model-analyzer.d.ts +0 -88
- package/dist/analyzers/rails/rails-model-analyzer.js +0 -493
- package/dist/analyzers/rails/rails-react-analyzer.d.ts +0 -41
- package/dist/analyzers/rails/rails-react-analyzer.js +0 -529
- package/dist/analyzers/rails/rails-routes-analyzer.d.ts +0 -62
- package/dist/analyzers/rails/rails-routes-analyzer.js +0 -540
- package/dist/analyzers/rails/rails-view-analyzer.d.ts +0 -49
- package/dist/analyzers/rails/rails-view-analyzer.js +0 -386
- package/dist/analyzers/rails/ruby-parser.d.ts +0 -63
- package/dist/analyzers/rails/ruby-parser.js +0 -212
- package/dist/analyzers/rest-api-analyzer.d.ts +0 -65
- package/dist/analyzers/rest-api-analyzer.js +0 -479
- package/dist/core/cache.d.ts +0 -47
- package/dist/core/cache.js +0 -151
- package/dist/core/engine.d.ts +0 -46
- package/dist/core/engine.js +0 -319
- package/dist/core/index.d.ts +0 -2
- package/dist/core/index.js +0 -2
- package/dist/generators/markdown-generator.d.ts +0 -25
- package/dist/generators/markdown-generator.js +0 -782
- package/dist/generators/mermaid-generator.d.ts +0 -35
- package/dist/generators/mermaid-generator.js +0 -364
- package/dist/generators/page-map-generator.d.ts +0 -22
- package/dist/generators/rails-map-generator.d.ts +0 -21
- package/dist/server/doc-server.d.ts +0 -30
- package/dist/utils/env-detector.d.ts +0 -31
- package/dist/utils/env-detector.js +0 -188
- package/dist/utils/parallel.d.ts +0 -23
- package/dist/utils/parallel.js +0 -70
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export { RailsControllerAnalyzer, RailsGrpcAnalyzer, RailsModelAnalyzer, RailsRoutesAnalyzer, analyzeRailsApp, analyzeRailsViews, analyzeReactComponents, findNodes, initRubyParser, parseRuby, parseRubyFile } from './chunk-OWM6WNLE.js';
|
package/dist/server/index.d.ts
CHANGED
|
@@ -1 +1,33 @@
|
|
|
1
|
-
|
|
1
|
+
import { DocGeneratorConfig } from '../types.js';
|
|
2
|
+
|
|
3
|
+
interface DocServerOptions {
|
|
4
|
+
noCache?: boolean;
|
|
5
|
+
}
|
|
6
|
+
/**
|
|
7
|
+
* Documentation server with live reload
|
|
8
|
+
* ライブリロード機能付きドキュメントサーバー
|
|
9
|
+
*/
|
|
10
|
+
declare class DocServer {
|
|
11
|
+
private config;
|
|
12
|
+
private port;
|
|
13
|
+
private app;
|
|
14
|
+
private server;
|
|
15
|
+
private io;
|
|
16
|
+
private engine;
|
|
17
|
+
private currentReport;
|
|
18
|
+
private envResult;
|
|
19
|
+
private railsAnalysis;
|
|
20
|
+
constructor(config: DocGeneratorConfig, port?: number, options?: DocServerOptions);
|
|
21
|
+
private setupRoutes;
|
|
22
|
+
private setupSocketIO;
|
|
23
|
+
private renderPage;
|
|
24
|
+
private getGraphQLData;
|
|
25
|
+
private getApiCallsData;
|
|
26
|
+
private getHtmlTemplate;
|
|
27
|
+
start(openBrowser?: boolean): Promise<void>;
|
|
28
|
+
private regenerate;
|
|
29
|
+
private watchForChanges;
|
|
30
|
+
stop(): void;
|
|
31
|
+
}
|
|
32
|
+
|
|
33
|
+
export { DocServer, type DocServerOptions };
|
package/dist/server/index.js
CHANGED
|
@@ -1 +1,7 @@
|
|
|
1
|
-
export
|
|
1
|
+
export { DocServer } from '../chunk-M6YNU536.js';
|
|
2
|
+
import '../chunk-E4WRODSI.js';
|
|
3
|
+
import '../chunk-3PWXDB7B.js';
|
|
4
|
+
import '../chunk-GNBMJMET.js';
|
|
5
|
+
import '../chunk-SSU6QFTX.js';
|
|
6
|
+
import '../chunk-3YFXZAP7.js';
|
|
7
|
+
import '../chunk-OWM6WNLE.js';
|
package/dist/types.d.ts
CHANGED
|
@@ -2,7 +2,7 @@
|
|
|
2
2
|
* Type definitions for the documentation generator
|
|
3
3
|
* ドキュメント生成ツールの型定義
|
|
4
4
|
*/
|
|
5
|
-
|
|
5
|
+
interface DocGeneratorConfig {
|
|
6
6
|
outputDir: string;
|
|
7
7
|
site: SiteConfig;
|
|
8
8
|
repositories: RepositoryConfig[];
|
|
@@ -11,12 +11,12 @@ export interface DocGeneratorConfig {
|
|
|
11
11
|
watch: WatchConfig;
|
|
12
12
|
integrations: IntegrationsConfig;
|
|
13
13
|
}
|
|
14
|
-
|
|
14
|
+
interface SiteConfig {
|
|
15
15
|
title: string;
|
|
16
16
|
description: string;
|
|
17
17
|
baseUrl: string;
|
|
18
18
|
}
|
|
19
|
-
|
|
19
|
+
interface RepositoryConfig {
|
|
20
20
|
name: string;
|
|
21
21
|
displayName: string;
|
|
22
22
|
description: string;
|
|
@@ -27,23 +27,23 @@ export interface RepositoryConfig {
|
|
|
27
27
|
analyzers: AnalyzerType[];
|
|
28
28
|
settings: Record<string, string>;
|
|
29
29
|
}
|
|
30
|
-
|
|
31
|
-
|
|
30
|
+
type AnalyzerType = 'pages' | 'graphql' | 'components' | 'dataflow' | 'rest-api' | 'api-endpoints' | 'graphql-schema' | 'models' | 'controllers' | 'routes' | 'grpc';
|
|
31
|
+
interface AnalysisConfig {
|
|
32
32
|
include: string[];
|
|
33
33
|
exclude: string[];
|
|
34
34
|
maxDepth: number;
|
|
35
35
|
}
|
|
36
|
-
|
|
36
|
+
interface DiagramConfig {
|
|
37
37
|
enabled: boolean;
|
|
38
38
|
types: DiagramType[];
|
|
39
39
|
theme: string;
|
|
40
40
|
}
|
|
41
|
-
|
|
42
|
-
|
|
41
|
+
type DiagramType = 'flowchart' | 'sequence' | 'er' | 'class';
|
|
42
|
+
interface WatchConfig {
|
|
43
43
|
enabled: boolean;
|
|
44
44
|
debounce: number;
|
|
45
45
|
}
|
|
46
|
-
|
|
46
|
+
interface IntegrationsConfig {
|
|
47
47
|
github: {
|
|
48
48
|
enabled: boolean;
|
|
49
49
|
organization: string;
|
|
@@ -53,7 +53,7 @@ export interface IntegrationsConfig {
|
|
|
53
53
|
webhook?: string;
|
|
54
54
|
};
|
|
55
55
|
}
|
|
56
|
-
|
|
56
|
+
interface AnalysisResult {
|
|
57
57
|
repository: string;
|
|
58
58
|
timestamp: string;
|
|
59
59
|
version: string;
|
|
@@ -71,7 +71,7 @@ export interface AnalysisResult {
|
|
|
71
71
|
* Frontend API call information
|
|
72
72
|
* フロントエンドAPIコール情報
|
|
73
73
|
*/
|
|
74
|
-
|
|
74
|
+
interface APICall {
|
|
75
75
|
/** Unique identifier */
|
|
76
76
|
id: string;
|
|
77
77
|
/** HTTP method (GET, POST, PUT, DELETE, etc.) */
|
|
@@ -99,7 +99,7 @@ export interface APICall {
|
|
|
99
99
|
/** API category (e.g., 'HubSpot', 'AWS S3', 'Internal API') */
|
|
100
100
|
category?: string;
|
|
101
101
|
}
|
|
102
|
-
|
|
102
|
+
interface PageInfo {
|
|
103
103
|
path: string;
|
|
104
104
|
filePath: string;
|
|
105
105
|
component: string;
|
|
@@ -113,7 +113,7 @@ export interface PageInfo {
|
|
|
113
113
|
/** Multi-step flow information (wizard, onboarding, etc.) */
|
|
114
114
|
steps?: StepInfo[];
|
|
115
115
|
}
|
|
116
|
-
|
|
116
|
+
interface StepInfo {
|
|
117
117
|
/** Step number or identifier */
|
|
118
118
|
id: number | string;
|
|
119
119
|
/** Step name/label if available */
|
|
@@ -123,24 +123,24 @@ export interface StepInfo {
|
|
|
123
123
|
/** Condition to show this step */
|
|
124
124
|
condition?: string;
|
|
125
125
|
}
|
|
126
|
-
|
|
126
|
+
interface AuthRequirement {
|
|
127
127
|
required: boolean;
|
|
128
128
|
roles?: string[];
|
|
129
129
|
condition?: string;
|
|
130
130
|
}
|
|
131
|
-
|
|
131
|
+
interface DataFetchingInfo {
|
|
132
132
|
type: 'useQuery' | 'useMutation' | 'useLazyQuery' | 'getServerSideProps' | 'getStaticProps' | 'component' | 'useSubscription';
|
|
133
133
|
operationName: string;
|
|
134
134
|
variables?: string[];
|
|
135
135
|
source?: string;
|
|
136
136
|
}
|
|
137
|
-
|
|
137
|
+
interface NavigationInfo {
|
|
138
138
|
visible: boolean;
|
|
139
139
|
currentNavItem: string | null;
|
|
140
140
|
mini?: boolean;
|
|
141
141
|
mainPageStyle?: Record<string, unknown>;
|
|
142
142
|
}
|
|
143
|
-
|
|
143
|
+
interface GraphQLOperation {
|
|
144
144
|
name: string;
|
|
145
145
|
type: 'query' | 'mutation' | 'subscription' | 'fragment';
|
|
146
146
|
filePath: string;
|
|
@@ -150,17 +150,17 @@ export interface GraphQLOperation {
|
|
|
150
150
|
fragments: string[];
|
|
151
151
|
fields: GraphQLField[];
|
|
152
152
|
}
|
|
153
|
-
|
|
153
|
+
interface GraphQLField {
|
|
154
154
|
name: string;
|
|
155
155
|
type?: string;
|
|
156
156
|
fields?: GraphQLField[];
|
|
157
157
|
}
|
|
158
|
-
|
|
158
|
+
interface VariableInfo {
|
|
159
159
|
name: string;
|
|
160
160
|
type: string;
|
|
161
161
|
required: boolean;
|
|
162
162
|
}
|
|
163
|
-
|
|
163
|
+
interface ComponentInfo {
|
|
164
164
|
name: string;
|
|
165
165
|
filePath: string;
|
|
166
166
|
type: 'page' | 'container' | 'presentational' | 'layout' | 'hook';
|
|
@@ -170,13 +170,13 @@ export interface ComponentInfo {
|
|
|
170
170
|
hooks: string[];
|
|
171
171
|
stateManagement: string[];
|
|
172
172
|
}
|
|
173
|
-
|
|
173
|
+
interface PropInfo {
|
|
174
174
|
name: string;
|
|
175
175
|
type: string;
|
|
176
176
|
required: boolean;
|
|
177
177
|
defaultValue?: string;
|
|
178
178
|
}
|
|
179
|
-
|
|
179
|
+
interface DataFlow {
|
|
180
180
|
id: string;
|
|
181
181
|
name: string;
|
|
182
182
|
description: string;
|
|
@@ -185,12 +185,12 @@ export interface DataFlow {
|
|
|
185
185
|
via: DataFlowNode[];
|
|
186
186
|
operations: string[];
|
|
187
187
|
}
|
|
188
|
-
|
|
188
|
+
interface DataFlowNode {
|
|
189
189
|
type: 'component' | 'hook' | 'context' | 'api' | 'cache' | 'store';
|
|
190
190
|
name: string;
|
|
191
191
|
repository?: string;
|
|
192
192
|
}
|
|
193
|
-
|
|
193
|
+
interface APIEndpoint {
|
|
194
194
|
method: string;
|
|
195
195
|
path: string;
|
|
196
196
|
controller: string;
|
|
@@ -200,18 +200,18 @@ export interface APIEndpoint {
|
|
|
200
200
|
parameters: ParameterInfo[];
|
|
201
201
|
responses: ResponseInfo[];
|
|
202
202
|
}
|
|
203
|
-
|
|
203
|
+
interface ParameterInfo {
|
|
204
204
|
name: string;
|
|
205
205
|
type: string;
|
|
206
206
|
location: 'path' | 'query' | 'body' | 'header';
|
|
207
207
|
required: boolean;
|
|
208
208
|
}
|
|
209
|
-
|
|
209
|
+
interface ResponseInfo {
|
|
210
210
|
status: number;
|
|
211
211
|
description: string;
|
|
212
212
|
schema?: string;
|
|
213
213
|
}
|
|
214
|
-
|
|
214
|
+
interface ModelInfo {
|
|
215
215
|
name: string;
|
|
216
216
|
tableName: string;
|
|
217
217
|
filePath: string;
|
|
@@ -220,19 +220,19 @@ export interface ModelInfo {
|
|
|
220
220
|
validations: string[];
|
|
221
221
|
scopes: string[];
|
|
222
222
|
}
|
|
223
|
-
|
|
223
|
+
interface AttributeInfo {
|
|
224
224
|
name: string;
|
|
225
225
|
type: string;
|
|
226
226
|
nullable: boolean;
|
|
227
227
|
default?: string;
|
|
228
228
|
}
|
|
229
|
-
|
|
229
|
+
interface AssociationInfo {
|
|
230
230
|
type: 'belongs_to' | 'has_one' | 'has_many' | 'has_and_belongs_to_many';
|
|
231
231
|
name: string;
|
|
232
232
|
model: string;
|
|
233
233
|
foreignKey?: string;
|
|
234
234
|
}
|
|
235
|
-
|
|
235
|
+
interface CrossRepoLink {
|
|
236
236
|
sourceRepo: string;
|
|
237
237
|
sourcePath: string;
|
|
238
238
|
targetRepo: string;
|
|
@@ -240,19 +240,19 @@ export interface CrossRepoLink {
|
|
|
240
240
|
linkType: 'api-call' | 'shared-type' | 'graphql-operation' | 'navigation';
|
|
241
241
|
description: string;
|
|
242
242
|
}
|
|
243
|
-
|
|
243
|
+
interface MermaidDiagram {
|
|
244
244
|
type: DiagramType;
|
|
245
245
|
title: string;
|
|
246
246
|
content: string;
|
|
247
247
|
relatedFiles: string[];
|
|
248
248
|
}
|
|
249
|
-
|
|
249
|
+
interface DocumentationReport {
|
|
250
250
|
generatedAt: string;
|
|
251
251
|
repositories: RepositoryReport[];
|
|
252
252
|
crossRepoAnalysis: CrossRepoAnalysis;
|
|
253
253
|
diagrams: MermaidDiagram[];
|
|
254
254
|
}
|
|
255
|
-
|
|
255
|
+
interface RepositoryReport {
|
|
256
256
|
name: string;
|
|
257
257
|
displayName: string;
|
|
258
258
|
version: string;
|
|
@@ -260,7 +260,7 @@ export interface RepositoryReport {
|
|
|
260
260
|
analysis: AnalysisResult;
|
|
261
261
|
summary: RepositorySummary;
|
|
262
262
|
}
|
|
263
|
-
|
|
263
|
+
interface RepositorySummary {
|
|
264
264
|
totalPages: number;
|
|
265
265
|
totalComponents: number;
|
|
266
266
|
totalGraphQLOperations: number;
|
|
@@ -268,19 +268,19 @@ export interface RepositorySummary {
|
|
|
268
268
|
authRequiredPages: number;
|
|
269
269
|
publicPages: number;
|
|
270
270
|
}
|
|
271
|
-
|
|
271
|
+
interface CrossRepoAnalysis {
|
|
272
272
|
sharedTypes: string[];
|
|
273
273
|
apiConnections: APIConnection[];
|
|
274
274
|
navigationFlows: NavigationFlow[];
|
|
275
275
|
dataFlowAcrossRepos: DataFlow[];
|
|
276
276
|
}
|
|
277
|
-
|
|
277
|
+
interface APIConnection {
|
|
278
278
|
frontend: string;
|
|
279
279
|
backend: string;
|
|
280
280
|
endpoint: string;
|
|
281
281
|
operations: string[];
|
|
282
282
|
}
|
|
283
|
-
|
|
283
|
+
interface NavigationFlow {
|
|
284
284
|
from: {
|
|
285
285
|
repo: string;
|
|
286
286
|
page: string;
|
|
@@ -291,3 +291,5 @@ export interface NavigationFlow {
|
|
|
291
291
|
};
|
|
292
292
|
trigger: string;
|
|
293
293
|
}
|
|
294
|
+
|
|
295
|
+
export type { APICall, APIConnection, APIEndpoint, AnalysisConfig, AnalysisResult, AnalyzerType, AssociationInfo, AttributeInfo, AuthRequirement, ComponentInfo, CrossRepoAnalysis, CrossRepoLink, DataFetchingInfo, DataFlow, DataFlowNode, DiagramConfig, DiagramType, DocGeneratorConfig, DocumentationReport, GraphQLField, GraphQLOperation, IntegrationsConfig, MermaidDiagram, ModelInfo, NavigationFlow, NavigationInfo, PageInfo, ParameterInfo, PropInfo, RepositoryConfig, RepositoryReport, RepositorySummary, ResponseInfo, SiteConfig, StepInfo, VariableInfo, WatchConfig };
|
package/dist/types.js
CHANGED
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@wtdlee/repomap",
|
|
3
|
-
"version": "0.
|
|
3
|
+
"version": "0.3.1",
|
|
4
4
|
"description": "Interactive documentation generator for code repositories - visualize pages, components, GraphQL operations, and data flows",
|
|
5
5
|
"type": "module",
|
|
6
6
|
"main": "dist/index.js",
|
|
@@ -79,6 +79,7 @@
|
|
|
79
79
|
"@babel/traverse": "^7.23.0",
|
|
80
80
|
"chalk": "^5.3.0",
|
|
81
81
|
"commander": "^14.0.2",
|
|
82
|
+
"express": "^5.2.1",
|
|
82
83
|
"fast-glob": "^3.3.2",
|
|
83
84
|
"glob": "^13.0.0",
|
|
84
85
|
"graphql": "^16.8.1",
|
|
@@ -100,18 +101,19 @@
|
|
|
100
101
|
"eslint": "^9.39.1",
|
|
101
102
|
"eslint-config-prettier": "^10.1.8",
|
|
102
103
|
"eslint-plugin-prettier": "^5.5.4",
|
|
103
|
-
"express": "^5.2.1",
|
|
104
104
|
"globals": "^16.5.0",
|
|
105
105
|
"husky": "^9.1.7",
|
|
106
106
|
"lint-staged": "^16.2.7",
|
|
107
107
|
"prettier": "^3.7.4",
|
|
108
|
+
"tsup": "^8.5.1",
|
|
108
109
|
"tsx": "^4.6.2",
|
|
109
110
|
"typescript": "^5.3.2",
|
|
110
111
|
"typescript-eslint": "^8.49.0",
|
|
111
112
|
"vitest": "^4.0.15"
|
|
112
113
|
},
|
|
113
114
|
"scripts": {
|
|
114
|
-
"build": "
|
|
115
|
+
"build": "tsup",
|
|
116
|
+
"build:tsc": "tsc && npm run copy-assets",
|
|
115
117
|
"copy-assets": "mkdir -p dist/generators/assets && cp src/generators/assets/*.css dist/generators/assets/",
|
|
116
118
|
"dev": "tsx watch src/cli.ts",
|
|
117
119
|
"dev:serve": "tsx watch --clear-screen=false src/cli.ts serve --no-cache",
|
|
@@ -1,45 +0,0 @@
|
|
|
1
|
-
import type { RepositoryConfig, AnalysisResult } from '../types.js';
|
|
2
|
-
/**
|
|
3
|
-
* Base class for all analyzers
|
|
4
|
-
* 全分析器の基底クラス
|
|
5
|
-
*/
|
|
6
|
-
export declare abstract class BaseAnalyzer {
|
|
7
|
-
protected config: RepositoryConfig;
|
|
8
|
-
protected basePath: string;
|
|
9
|
-
constructor(config: RepositoryConfig);
|
|
10
|
-
/**
|
|
11
|
-
* Run the analysis
|
|
12
|
-
* 分析を実行
|
|
13
|
-
*/
|
|
14
|
-
abstract analyze(): Promise<Partial<AnalysisResult>>;
|
|
15
|
-
/**
|
|
16
|
-
* Get the analyzer name
|
|
17
|
-
* 分析器名を取得
|
|
18
|
-
*/
|
|
19
|
-
abstract getName(): string;
|
|
20
|
-
/**
|
|
21
|
-
* Resolve path relative to repository root
|
|
22
|
-
* リポジトリルートからの相対パスを解決
|
|
23
|
-
*/
|
|
24
|
-
protected resolvePath(relativePath: string): string;
|
|
25
|
-
/**
|
|
26
|
-
* Get setting value with fallback
|
|
27
|
-
* 設定値を取得(フォールバック付き)
|
|
28
|
-
*/
|
|
29
|
-
protected getSetting(key: string, defaultValue?: string): string;
|
|
30
|
-
/**
|
|
31
|
-
* Log analysis progress
|
|
32
|
-
* 分析進捗をログ出力
|
|
33
|
-
*/
|
|
34
|
-
protected log(message: string): void;
|
|
35
|
-
/**
|
|
36
|
-
* Log warning
|
|
37
|
-
* 警告をログ出力
|
|
38
|
-
*/
|
|
39
|
-
protected warn(message: string): void;
|
|
40
|
-
/**
|
|
41
|
-
* Log error
|
|
42
|
-
* エラーをログ出力
|
|
43
|
-
*/
|
|
44
|
-
protected error(message: string, error?: Error): void;
|
|
45
|
-
}
|
|
@@ -1,47 +0,0 @@
|
|
|
1
|
-
/**
|
|
2
|
-
* Base class for all analyzers
|
|
3
|
-
* 全分析器の基底クラス
|
|
4
|
-
*/
|
|
5
|
-
export class BaseAnalyzer {
|
|
6
|
-
config;
|
|
7
|
-
basePath;
|
|
8
|
-
constructor(config) {
|
|
9
|
-
this.config = config;
|
|
10
|
-
this.basePath = config.path;
|
|
11
|
-
}
|
|
12
|
-
/**
|
|
13
|
-
* Resolve path relative to repository root
|
|
14
|
-
* リポジトリルートからの相対パスを解決
|
|
15
|
-
*/
|
|
16
|
-
resolvePath(relativePath) {
|
|
17
|
-
return `${this.basePath}/${relativePath}`;
|
|
18
|
-
}
|
|
19
|
-
/**
|
|
20
|
-
* Get setting value with fallback
|
|
21
|
-
* 設定値を取得(フォールバック付き)
|
|
22
|
-
*/
|
|
23
|
-
getSetting(key, defaultValue = '') {
|
|
24
|
-
return this.config.settings[key] ?? defaultValue;
|
|
25
|
-
}
|
|
26
|
-
/**
|
|
27
|
-
* Log analysis progress
|
|
28
|
-
* 分析進捗をログ出力
|
|
29
|
-
*/
|
|
30
|
-
log(message) {
|
|
31
|
-
console.log(`[${this.getName()}] ${message}`);
|
|
32
|
-
}
|
|
33
|
-
/**
|
|
34
|
-
* Log warning
|
|
35
|
-
* 警告をログ出力
|
|
36
|
-
*/
|
|
37
|
-
warn(message) {
|
|
38
|
-
console.warn(`[${this.getName()}] ⚠️ ${message}`);
|
|
39
|
-
}
|
|
40
|
-
/**
|
|
41
|
-
* Log error
|
|
42
|
-
* エラーをログ出力
|
|
43
|
-
*/
|
|
44
|
-
error(message, error) {
|
|
45
|
-
console.error(`[${this.getName()}] ❌ ${message}`, error?.message || '');
|
|
46
|
-
}
|
|
47
|
-
}
|
|
@@ -1,29 +0,0 @@
|
|
|
1
|
-
import { BaseAnalyzer } from './base-analyzer.js';
|
|
2
|
-
import type { AnalysisResult, RepositoryConfig } from '../types.js';
|
|
3
|
-
/**
|
|
4
|
-
* Analyzer for data flow patterns
|
|
5
|
-
* データフローパターンの分析器
|
|
6
|
-
*/
|
|
7
|
-
export declare class DataFlowAnalyzer extends BaseAnalyzer {
|
|
8
|
-
private project;
|
|
9
|
-
private componentCache;
|
|
10
|
-
constructor(config: RepositoryConfig);
|
|
11
|
-
getName(): string;
|
|
12
|
-
analyze(): Promise<Partial<AnalysisResult>>;
|
|
13
|
-
private analyzeComponents;
|
|
14
|
-
private analyzeComponentFile;
|
|
15
|
-
private isComponentName;
|
|
16
|
-
private extractComponentInfo;
|
|
17
|
-
private extractHookInfo;
|
|
18
|
-
private extractProps;
|
|
19
|
-
private extractHooksUsed;
|
|
20
|
-
private extractOperationName;
|
|
21
|
-
private extractContextName;
|
|
22
|
-
private extractDependencies;
|
|
23
|
-
private extractStateManagement;
|
|
24
|
-
private buildDependencyGraph;
|
|
25
|
-
private analyzeDataFlows;
|
|
26
|
-
private analyzeContextFlows;
|
|
27
|
-
private analyzeApolloFlows;
|
|
28
|
-
private analyzePropDrilling;
|
|
29
|
-
}
|