@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.
Files changed (69) hide show
  1. package/dist/analyzers/index.d.ts +69 -5
  2. package/dist/analyzers/index.js +1 -5
  3. package/dist/chunk-3PWXDB7B.js +153 -0
  4. package/dist/{generators/page-map-generator.js → chunk-3YFXZAP7.js} +322 -358
  5. package/dist/chunk-6F4PWJZI.js +1 -0
  6. package/dist/{generators/rails-map-generator.js → chunk-E4WRODSI.js} +86 -94
  7. package/dist/chunk-GNBMJMET.js +2519 -0
  8. package/dist/{server/doc-server.js → chunk-M6YNU536.js} +702 -290
  9. package/dist/chunk-OWM6WNLE.js +2610 -0
  10. package/dist/chunk-SSU6QFTX.js +1058 -0
  11. package/dist/cli.d.ts +0 -1
  12. package/dist/cli.js +348 -452
  13. package/dist/dataflow-analyzer-BfAiqVUp.d.ts +180 -0
  14. package/dist/env-detector-EEMVUEIA.js +1 -0
  15. package/dist/generators/index.d.ts +431 -3
  16. package/dist/generators/index.js +2 -3
  17. package/dist/index.d.ts +53 -10
  18. package/dist/index.js +8 -11
  19. package/dist/page-map-generator-6MJGPBVA.js +1 -0
  20. package/dist/rails-UWSDRS33.js +1 -0
  21. package/dist/rails-map-generator-D2URLMVJ.js +2 -0
  22. package/dist/server/index.d.ts +33 -1
  23. package/dist/server/index.js +7 -1
  24. package/dist/types.d.ts +39 -37
  25. package/dist/types.js +1 -5
  26. package/package.json +5 -3
  27. package/dist/analyzers/base-analyzer.d.ts +0 -45
  28. package/dist/analyzers/base-analyzer.js +0 -47
  29. package/dist/analyzers/dataflow-analyzer.d.ts +0 -29
  30. package/dist/analyzers/dataflow-analyzer.js +0 -425
  31. package/dist/analyzers/graphql-analyzer.d.ts +0 -22
  32. package/dist/analyzers/graphql-analyzer.js +0 -386
  33. package/dist/analyzers/pages-analyzer.d.ts +0 -84
  34. package/dist/analyzers/pages-analyzer.js +0 -1695
  35. package/dist/analyzers/rails/index.d.ts +0 -46
  36. package/dist/analyzers/rails/index.js +0 -145
  37. package/dist/analyzers/rails/rails-controller-analyzer.d.ts +0 -82
  38. package/dist/analyzers/rails/rails-controller-analyzer.js +0 -478
  39. package/dist/analyzers/rails/rails-grpc-analyzer.d.ts +0 -44
  40. package/dist/analyzers/rails/rails-grpc-analyzer.js +0 -262
  41. package/dist/analyzers/rails/rails-model-analyzer.d.ts +0 -88
  42. package/dist/analyzers/rails/rails-model-analyzer.js +0 -493
  43. package/dist/analyzers/rails/rails-react-analyzer.d.ts +0 -41
  44. package/dist/analyzers/rails/rails-react-analyzer.js +0 -529
  45. package/dist/analyzers/rails/rails-routes-analyzer.d.ts +0 -62
  46. package/dist/analyzers/rails/rails-routes-analyzer.js +0 -540
  47. package/dist/analyzers/rails/rails-view-analyzer.d.ts +0 -49
  48. package/dist/analyzers/rails/rails-view-analyzer.js +0 -386
  49. package/dist/analyzers/rails/ruby-parser.d.ts +0 -63
  50. package/dist/analyzers/rails/ruby-parser.js +0 -212
  51. package/dist/analyzers/rest-api-analyzer.d.ts +0 -65
  52. package/dist/analyzers/rest-api-analyzer.js +0 -479
  53. package/dist/core/cache.d.ts +0 -47
  54. package/dist/core/cache.js +0 -151
  55. package/dist/core/engine.d.ts +0 -46
  56. package/dist/core/engine.js +0 -319
  57. package/dist/core/index.d.ts +0 -2
  58. package/dist/core/index.js +0 -2
  59. package/dist/generators/markdown-generator.d.ts +0 -25
  60. package/dist/generators/markdown-generator.js +0 -782
  61. package/dist/generators/mermaid-generator.d.ts +0 -35
  62. package/dist/generators/mermaid-generator.js +0 -364
  63. package/dist/generators/page-map-generator.d.ts +0 -22
  64. package/dist/generators/rails-map-generator.d.ts +0 -21
  65. package/dist/server/doc-server.d.ts +0 -30
  66. package/dist/utils/env-detector.d.ts +0 -31
  67. package/dist/utils/env-detector.js +0 -188
  68. package/dist/utils/parallel.d.ts +0 -23
  69. package/dist/utils/parallel.js +0 -70
@@ -0,0 +1,180 @@
1
+ import { RepositoryConfig, AnalysisResult } from './types.js';
2
+
3
+ /**
4
+ * Base class for all analyzers
5
+ * 全分析器の基底クラス
6
+ */
7
+ declare abstract class BaseAnalyzer {
8
+ protected config: RepositoryConfig;
9
+ protected basePath: string;
10
+ constructor(config: RepositoryConfig);
11
+ /**
12
+ * Run the analysis
13
+ * 分析を実行
14
+ */
15
+ abstract analyze(): Promise<Partial<AnalysisResult>>;
16
+ /**
17
+ * Get the analyzer name
18
+ * 分析器名を取得
19
+ */
20
+ abstract getName(): string;
21
+ /**
22
+ * Resolve path relative to repository root
23
+ * リポジトリルートからの相対パスを解決
24
+ */
25
+ protected resolvePath(relativePath: string): string;
26
+ /**
27
+ * Get setting value with fallback
28
+ * 設定値を取得(フォールバック付き)
29
+ */
30
+ protected getSetting(key: string, defaultValue?: string): string;
31
+ /**
32
+ * Log analysis progress
33
+ * 分析進捗をログ出力
34
+ */
35
+ protected log(message: string): void;
36
+ /**
37
+ * Log warning
38
+ * 警告をログ出力
39
+ */
40
+ protected warn(message: string): void;
41
+ /**
42
+ * Log error
43
+ * エラーをログ出力
44
+ */
45
+ protected error(message: string, error?: Error): void;
46
+ }
47
+
48
+ /**
49
+ * Analyzer for Next.js pages
50
+ * Next.jsページの分析器
51
+ */
52
+ declare class PagesAnalyzer extends BaseAnalyzer {
53
+ private project;
54
+ private codegenMap;
55
+ constructor(config: RepositoryConfig);
56
+ /**
57
+ * Extract GraphQL operation name from a gql template literal or function call
58
+ * Handles multiple patterns:
59
+ * - gql`query Name { ... }`
60
+ * - gql(/‌* GraphQL *‌/ `query Name { ... }`)
61
+ * - graphql(`query Name { ... }`)
62
+ */
63
+ private extractOperationNameFromGql;
64
+ /**
65
+ * Find and extract operation name from a variable declaration in source file
66
+ * Handles cases like: const Query = gql(comment `query ActualName...`)
67
+ */
68
+ private findOperationNameFromVariable;
69
+ getName(): string;
70
+ analyze(): Promise<Partial<AnalysisResult>>;
71
+ private analyzePageFile;
72
+ /**
73
+ * Detect the pages root directory from a file path
74
+ * e.g., /project/src/pages/users/index.tsx -> /project/src/pages
75
+ */
76
+ private detectPagesRoot;
77
+ private filePathToRoutePath;
78
+ private extractRouteParams;
79
+ private findPageComponent;
80
+ private extractLayout;
81
+ private extractAuthRequirement;
82
+ private extractRolesFromCondition;
83
+ private extractPermissions;
84
+ private extractDataFetching;
85
+ private symbolTraceCache;
86
+ /**
87
+ * Analyze an imported component file for GraphQL queries with full symbol tracing
88
+ * 임포트된 컴포넌트를 재귀적으로 완전 추적
89
+ */
90
+ private analyzeImportedComponent;
91
+ /**
92
+ * Analyze a custom hook file for GraphQL queries with recursive tracing
93
+ */
94
+ private analyzeCustomHook;
95
+ private globalContextQueries;
96
+ /**
97
+ * Find page files from multiple possible locations
98
+ * Next.js, React, Rails+React 구조 모두 지원
99
+ */
100
+ private findPageFiles;
101
+ /**
102
+ * Analyze _app.tsx for global providers that use GraphQL
103
+ * _app.tsx에서 전역 Context Provider의 GraphQL 분석
104
+ */
105
+ private analyzeAppFile;
106
+ /**
107
+ * Load codegen mapping from __generated__ folders (optional)
108
+ * 코드젠 폴더가 있으면 Document → Operation name 매핑 로드
109
+ */
110
+ private loadCodegenMapping;
111
+ /**
112
+ * Resolve Document name to operation name using codegen map
113
+ */
114
+ private resolveDocumentName;
115
+ /**
116
+ * Follow re-export in index file to find the actual component file
117
+ */
118
+ private followReExport;
119
+ /**
120
+ * Check if a name looks like a React component (PascalCase with common suffixes)
121
+ */
122
+ private isComponentName;
123
+ private extractNavigation;
124
+ /**
125
+ * Extract multi-step flow information (wizard, stepper, onboarding)
126
+ */
127
+ private extractSteps;
128
+ private extractLinkedPages;
129
+ }
130
+
131
+ /**
132
+ * Analyzer for GraphQL operations
133
+ * GraphQL操作の分析器
134
+ */
135
+ declare class GraphQLAnalyzer extends BaseAnalyzer {
136
+ private project;
137
+ constructor(config: RepositoryConfig);
138
+ getName(): string;
139
+ analyze(): Promise<Partial<AnalysisResult>>;
140
+ private analyzeGraphQLFiles;
141
+ private analyzeInlineGraphQL;
142
+ private extractOperationsFromDocument;
143
+ private extractOperation;
144
+ private extractFields;
145
+ private extractVariables;
146
+ private typeNodeToString;
147
+ private extractFragmentReferences;
148
+ private inferReturnType;
149
+ private findOperationUsage;
150
+ }
151
+
152
+ /**
153
+ * Analyzer for data flow patterns
154
+ * データフローパターンの分析器
155
+ */
156
+ declare class DataFlowAnalyzer extends BaseAnalyzer {
157
+ private project;
158
+ private componentCache;
159
+ constructor(config: RepositoryConfig);
160
+ getName(): string;
161
+ analyze(): Promise<Partial<AnalysisResult>>;
162
+ private analyzeComponents;
163
+ private analyzeComponentFile;
164
+ private isComponentName;
165
+ private extractComponentInfo;
166
+ private extractHookInfo;
167
+ private extractProps;
168
+ private extractHooksUsed;
169
+ private extractOperationName;
170
+ private extractContextName;
171
+ private extractDependencies;
172
+ private extractStateManagement;
173
+ private buildDependencyGraph;
174
+ private analyzeDataFlows;
175
+ private analyzeContextFlows;
176
+ private analyzeApolloFlows;
177
+ private analyzePropDrilling;
178
+ }
179
+
180
+ export { BaseAnalyzer as B, DataFlowAnalyzer as D, GraphQLAnalyzer as G, PagesAnalyzer as P };
@@ -0,0 +1 @@
1
+ export { detectEnvironments, getAnalyzersForEnvironments } from './chunk-3PWXDB7B.js';
@@ -1,3 +1,431 @@
1
- export * from './mermaid-generator.js';
2
- export * from './markdown-generator.js';
3
- export * from './page-map-generator.js';
1
+ import { AnalysisResult, CrossRepoLink, MermaidDiagram, DataFlow, DocumentationReport } from '../types.js';
2
+
3
+ /**
4
+ * Mermaid diagram generator
5
+ * Mermaidダイアグラム生成器
6
+ */
7
+ declare class MermaidGenerator {
8
+ /**
9
+ * Generate all diagrams from analysis result
10
+ */
11
+ generateAll(results: AnalysisResult[], crossRepoLinks: CrossRepoLink[]): MermaidDiagram[];
12
+ /**
13
+ * Generate navigation flowchart - grouped by URL category
14
+ */
15
+ generateNavigationDiagram(result: AnalysisResult): MermaidDiagram;
16
+ /**
17
+ * Generate data flow diagram
18
+ */
19
+ generateDataFlowDiagram(result: AnalysisResult): MermaidDiagram;
20
+ /**
21
+ * Generate component hierarchy diagram
22
+ */
23
+ generateComponentDiagram(result: AnalysisResult): MermaidDiagram;
24
+ /**
25
+ * Generate GraphQL operations diagram
26
+ */
27
+ generateGraphQLDiagram(result: AnalysisResult): MermaidDiagram;
28
+ /**
29
+ * Generate cross-repository diagram
30
+ */
31
+ generateCrossRepoDiagram(results: AnalysisResult[], crossRepoLinks: CrossRepoLink[]): MermaidDiagram;
32
+ /**
33
+ * Generate sequence diagram for a specific flow
34
+ */
35
+ generateSequenceDiagram(flow: DataFlow): MermaidDiagram;
36
+ }
37
+
38
+ /**
39
+ * Markdown documentation generator
40
+ * Markdownドキュメント生成器
41
+ */
42
+ declare class MarkdownGenerator {
43
+ /**
44
+ * Generate complete documentation
45
+ */
46
+ generateDocumentation(report: DocumentationReport): Map<string, string>;
47
+ private generateIndex;
48
+ private generateRepoIndex;
49
+ private generatePagesDoc;
50
+ private generateComponentsDoc;
51
+ private extractFeatureFromPage;
52
+ private extractFeatureFromComponent;
53
+ private formatComponentDataOps;
54
+ private generateGraphQLDoc;
55
+ private formatGraphQLFields;
56
+ private generateDataFlowDoc;
57
+ private getPageOperations;
58
+ private generateCrossRepoDoc;
59
+ private createPageDataFlowDiagram;
60
+ private generateDiagramsDoc;
61
+ }
62
+
63
+ /**
64
+ * Environment detection utilities
65
+ * 環境検出ユーティリティ
66
+ */
67
+ type EnvironmentType = 'nextjs' | 'react' | 'rails' | 'generic';
68
+ interface DetectedEnvironment {
69
+ type: EnvironmentType;
70
+ detected: boolean;
71
+ version?: string;
72
+ path: string;
73
+ features: string[];
74
+ }
75
+ interface EnvironmentDetectionResult {
76
+ environments: DetectedEnvironment[];
77
+ hasNextjs: boolean;
78
+ hasReact: boolean;
79
+ hasRails: boolean;
80
+ primary: EnvironmentType;
81
+ }
82
+
83
+ /**
84
+ * Rails Routes Analyzer using tree-sitter
85
+ * tree-sitterを使用してroutes.rbを解析する
86
+ */
87
+ interface RailsRoute {
88
+ method: 'GET' | 'POST' | 'PUT' | 'PATCH' | 'DELETE' | 'ALL';
89
+ path: string;
90
+ controller: string;
91
+ action: string;
92
+ name?: string;
93
+ namespace?: string;
94
+ authenticated?: boolean;
95
+ line: number;
96
+ }
97
+ interface ResourceInfo {
98
+ name: string;
99
+ controller: string;
100
+ only?: string[];
101
+ except?: string[];
102
+ nested: ResourceInfo[];
103
+ memberRoutes: RailsRoute[];
104
+ collectionRoutes: RailsRoute[];
105
+ line: number;
106
+ }
107
+ interface MountedEngine {
108
+ engine: string;
109
+ mountPath: string;
110
+ line: number;
111
+ }
112
+ interface RailsRoutesResult {
113
+ routes: RailsRoute[];
114
+ namespaces: string[];
115
+ resources: ResourceInfo[];
116
+ mountedEngines: MountedEngine[];
117
+ drawnFiles: string[];
118
+ errors: string[];
119
+ }
120
+
121
+ /**
122
+ * Rails Controller Analyzer using tree-sitter
123
+ * tree-sitterを使用してコントローラファイルを解析する
124
+ */
125
+ interface ControllerInfo {
126
+ name: string;
127
+ filePath: string;
128
+ className: string;
129
+ parentClass: string;
130
+ namespace?: string;
131
+ actions: ActionInfo[];
132
+ beforeActions: FilterInfo[];
133
+ afterActions: FilterInfo[];
134
+ aroundActions: FilterInfo[];
135
+ skipBeforeActions: FilterInfo[];
136
+ concerns: string[];
137
+ helpers: string[];
138
+ rescueFrom: RescueInfo[];
139
+ layoutInfo?: LayoutInfo;
140
+ line: number;
141
+ }
142
+ interface InstanceVarAssignment {
143
+ name: string;
144
+ assignedType?: string;
145
+ assignedValue?: string;
146
+ line?: number;
147
+ }
148
+ interface ActionInfo {
149
+ name: string;
150
+ line: number;
151
+ visibility: 'public' | 'private' | 'protected';
152
+ parameters: string[];
153
+ rendersJson?: boolean;
154
+ rendersHtml?: boolean;
155
+ redirectsTo?: string;
156
+ respondsTo?: string[];
157
+ servicesCalled: string[];
158
+ modelsCalled: string[];
159
+ methodCalls: string[];
160
+ instanceVarAssignments?: InstanceVarAssignment[];
161
+ }
162
+ interface FilterInfo {
163
+ name: string;
164
+ only?: string[];
165
+ except?: string[];
166
+ if?: string;
167
+ unless?: string;
168
+ line: number;
169
+ }
170
+ interface RescueInfo {
171
+ exception: string;
172
+ handler: string;
173
+ line: number;
174
+ }
175
+ interface LayoutInfo {
176
+ name: string;
177
+ conditions?: string;
178
+ }
179
+ interface RailsControllersResult {
180
+ controllers: ControllerInfo[];
181
+ totalActions: number;
182
+ namespaces: string[];
183
+ concerns: string[];
184
+ errors: string[];
185
+ }
186
+
187
+ /**
188
+ * Rails Model Analyzer using tree-sitter
189
+ * tree-sitterを使用してモデルファイルを解析する
190
+ */
191
+ interface ModelInfo {
192
+ name: string;
193
+ filePath: string;
194
+ className: string;
195
+ parentClass: string;
196
+ tableName?: string;
197
+ associations: AssociationInfo[];
198
+ validations: ValidationInfo[];
199
+ callbacks: CallbackInfo[];
200
+ scopes: ScopeInfo[];
201
+ concerns: string[];
202
+ enums: EnumInfo[];
203
+ attributes: AttributeInfo[];
204
+ classMethodsCount: number;
205
+ instanceMethodsCount: number;
206
+ line: number;
207
+ }
208
+ interface AssociationInfo {
209
+ type: 'belongs_to' | 'has_one' | 'has_many' | 'has_and_belongs_to_many';
210
+ name: string;
211
+ className?: string;
212
+ foreignKey?: string;
213
+ through?: string;
214
+ polymorphic?: boolean;
215
+ dependent?: string;
216
+ optional?: boolean;
217
+ line: number;
218
+ }
219
+ interface ValidationInfo {
220
+ type: string;
221
+ attributes: string[];
222
+ options?: Record<string, string>;
223
+ line: number;
224
+ }
225
+ interface CallbackInfo {
226
+ type: string;
227
+ method: string;
228
+ conditions?: string;
229
+ line: number;
230
+ }
231
+ interface ScopeInfo {
232
+ name: string;
233
+ lambda: boolean;
234
+ line: number;
235
+ }
236
+ interface EnumInfo {
237
+ name: string;
238
+ values: string[];
239
+ line: number;
240
+ }
241
+ interface AttributeInfo {
242
+ name: string;
243
+ type?: string;
244
+ default?: string;
245
+ line: number;
246
+ }
247
+ interface RailsModelsResult {
248
+ models: ModelInfo[];
249
+ totalAssociations: number;
250
+ totalValidations: number;
251
+ concerns: string[];
252
+ namespaces: string[];
253
+ errors: string[];
254
+ }
255
+
256
+ /**
257
+ * Rails gRPC Service Analyzer using tree-sitter
258
+ * tree-sitterを使用してgRPCサービスを解析する
259
+ */
260
+ interface GrpcServiceInfo {
261
+ name: string;
262
+ filePath: string;
263
+ className: string;
264
+ parentClass: string;
265
+ namespace?: string;
266
+ protoService?: string;
267
+ rpcs: RpcMethodInfo[];
268
+ policies: string[];
269
+ serializers: string[];
270
+ concerns: string[];
271
+ line: number;
272
+ }
273
+ interface RpcMethodInfo {
274
+ name: string;
275
+ requestType?: string;
276
+ responseType?: string;
277
+ streaming?: 'none' | 'server' | 'client' | 'bidirectional';
278
+ policyMethod?: string;
279
+ modelsUsed: string[];
280
+ servicesUsed: string[];
281
+ line: number;
282
+ }
283
+ interface RailsGrpcResult {
284
+ services: GrpcServiceInfo[];
285
+ totalRpcs: number;
286
+ namespaces: string[];
287
+ errors: string[];
288
+ }
289
+
290
+ interface ReactComponentRef {
291
+ name: string;
292
+ propsVar?: string;
293
+ ssr?: boolean;
294
+ line?: number;
295
+ }
296
+ interface RailsViewInfo {
297
+ name: string;
298
+ path: string;
299
+ controller: string;
300
+ action: string;
301
+ format: string;
302
+ template: 'haml' | 'erb' | 'yml' | 'other';
303
+ routePath?: string;
304
+ partials: string[];
305
+ helpers: string[];
306
+ instanceVars: string[];
307
+ reactComponents: ReactComponentRef[];
308
+ line?: number;
309
+ }
310
+ interface RailsPageInfo {
311
+ route: string;
312
+ method: string;
313
+ controller: string;
314
+ action: string;
315
+ view?: RailsViewInfo;
316
+ apis: RailsApiCall[];
317
+ services: string[];
318
+ grpcCalls: string[];
319
+ modelAccess: string[];
320
+ }
321
+ interface RailsApiCall {
322
+ type: 'grpc' | 'service' | 'http' | 'internal';
323
+ name: string;
324
+ method?: string;
325
+ source: string;
326
+ line?: number;
327
+ }
328
+ interface RailsViewAnalysisResult {
329
+ views: RailsViewInfo[];
330
+ pages: RailsPageInfo[];
331
+ summary: {
332
+ totalViews: number;
333
+ totalPages: number;
334
+ byController: Record<string, number>;
335
+ byTemplate: Record<string, number>;
336
+ };
337
+ }
338
+
339
+ interface ReactComponentMapping {
340
+ name: string;
341
+ entryFile?: string;
342
+ sourceFile?: string;
343
+ importPath?: string;
344
+ ssr: boolean;
345
+ usedIn: ReactComponentUsage[];
346
+ }
347
+ interface ReactComponentUsage {
348
+ viewPath: string;
349
+ controller: string;
350
+ action: string;
351
+ propsVar?: string;
352
+ line?: number;
353
+ pattern: ReactMountPattern;
354
+ }
355
+ type ReactMountPattern = 'data-react-component' | 'render_react_component' | 'react_component' | 'redux_store' | 'stimulus-reflex' | 'turbo-frame-react';
356
+ interface ReactAnalysisResult {
357
+ components: ReactComponentMapping[];
358
+ entryPoints: EntryPointInfo[];
359
+ detectedPaths: DetectedPaths;
360
+ summary: {
361
+ totalComponents: number;
362
+ totalEntryPoints: number;
363
+ ssrComponents: number;
364
+ clientComponents: number;
365
+ };
366
+ }
367
+ interface EntryPointInfo {
368
+ file: string;
369
+ fullPath: string;
370
+ componentName: string;
371
+ imports: string[];
372
+ selector?: string;
373
+ }
374
+ interface DetectedPaths {
375
+ entryDirs: string[];
376
+ componentDirs: string[];
377
+ integrationPattern: 'react-rails' | 'react_on_rails' | 'webpacker' | 'vite' | 'custom' | 'unknown';
378
+ }
379
+
380
+ /**
381
+ * Rails Analyzers - Index
382
+ * Rails分析モジュールのエクスポート
383
+ */
384
+
385
+ interface RailsAnalysisResult {
386
+ routes: RailsRoutesResult;
387
+ controllers: RailsControllersResult;
388
+ models: RailsModelsResult;
389
+ grpc: RailsGrpcResult;
390
+ views: RailsViewAnalysisResult;
391
+ react: ReactAnalysisResult;
392
+ summary: RailsSummary;
393
+ }
394
+ interface RailsSummary {
395
+ totalRoutes: number;
396
+ totalControllers: number;
397
+ totalActions: number;
398
+ totalModels: number;
399
+ totalAssociations: number;
400
+ totalValidations: number;
401
+ totalGrpcServices: number;
402
+ totalRpcs: number;
403
+ totalViews: number;
404
+ totalPages: number;
405
+ totalReactComponents: number;
406
+ ssrReactComponents: number;
407
+ namespaces: string[];
408
+ concerns: string[];
409
+ }
410
+
411
+ interface PageMapOptions {
412
+ envResult?: EnvironmentDetectionResult | null;
413
+ railsAnalysis?: RailsAnalysisResult | null;
414
+ activeTab?: 'pages' | 'rails' | 'api';
415
+ staticMode?: boolean;
416
+ }
417
+ /**
418
+ * Interactive page map generator
419
+ */
420
+ declare class PageMapGenerator {
421
+ private graphqlOps;
422
+ private apiCalls;
423
+ private components;
424
+ generatePageMapHtml(report: DocumentationReport, options?: PageMapOptions): string;
425
+ private buildHierarchy;
426
+ private renderPageMapHtml;
427
+ private buildTreeHtml;
428
+ private getPageType;
429
+ }
430
+
431
+ export { MarkdownGenerator, MermaidGenerator, PageMapGenerator, type PageMapOptions };
@@ -1,3 +1,2 @@
1
- export * from './mermaid-generator.js';
2
- export * from './markdown-generator.js';
3
- export * from './page-map-generator.js';
1
+ export { MarkdownGenerator, MermaidGenerator } from '../chunk-SSU6QFTX.js';
2
+ export { PageMapGenerator } from '../chunk-3YFXZAP7.js';
package/dist/index.d.ts CHANGED
@@ -1,10 +1,53 @@
1
- export * from './types.js';
2
- export * from './core/engine.js';
3
- export * from './analyzers/base-analyzer.js';
4
- export * from './analyzers/pages-analyzer.js';
5
- export * from './analyzers/graphql-analyzer.js';
6
- export * from './analyzers/dataflow-analyzer.js';
7
- export * from './generators/mermaid-generator.js';
8
- export * from './generators/markdown-generator.js';
9
- export * from './generators/page-map-generator.js';
10
- export * from './server/doc-server.js';
1
+ import { DocGeneratorConfig, DocumentationReport } from './types.js';
2
+ export { APICall, APIConnection, APIEndpoint, AnalysisConfig, AnalysisResult, AnalyzerType, AssociationInfo, AttributeInfo, AuthRequirement, ComponentInfo, CrossRepoAnalysis, CrossRepoLink, DataFetchingInfo, DataFlow, DataFlowNode, DiagramConfig, DiagramType, GraphQLField, GraphQLOperation, IntegrationsConfig, MermaidDiagram, ModelInfo, NavigationFlow, NavigationInfo, PageInfo, ParameterInfo, PropInfo, RepositoryConfig, RepositoryReport, RepositorySummary, ResponseInfo, SiteConfig, StepInfo, VariableInfo, WatchConfig } from './types.js';
3
+ export { B as BaseAnalyzer, D as DataFlowAnalyzer, G as GraphQLAnalyzer, P as PagesAnalyzer } from './dataflow-analyzer-BfAiqVUp.js';
4
+ export { MarkdownGenerator, MermaidGenerator, PageMapGenerator, PageMapOptions } from './generators/index.js';
5
+ export { DocServer, DocServerOptions } from './server/index.js';
6
+
7
+ /**
8
+ * Main documentation generation engine
9
+ * メインドキュメント生成エンジン
10
+ */
11
+ declare class DocGeneratorEngine {
12
+ private config;
13
+ private mermaidGenerator;
14
+ private markdownGenerator;
15
+ private noCache;
16
+ constructor(config: DocGeneratorConfig, options?: {
17
+ noCache?: boolean;
18
+ });
19
+ /**
20
+ * Run documentation generation for all configured repositories
21
+ */
22
+ generate(): Promise<DocumentationReport>;
23
+ /**
24
+ * Analyze a single repository (with caching)
25
+ */
26
+ private analyzeRepository;
27
+ /**
28
+ * Get repository version and commit info
29
+ */
30
+ private getRepoInfo;
31
+ /**
32
+ * Create analyzer instance based on type
33
+ */
34
+ private createAnalyzer;
35
+ /**
36
+ * Merge multiple analysis results
37
+ */
38
+ private mergeAnalysisResults;
39
+ /**
40
+ * Analyze cross-repository relationships
41
+ */
42
+ private analyzeCrossRepo;
43
+ /**
44
+ * Extract cross-repository links
45
+ */
46
+ private extractCrossRepoLinks;
47
+ /**
48
+ * Write documentation to output directory
49
+ */
50
+ private writeDocumentation;
51
+ }
52
+
53
+ export { DocGeneratorConfig, DocGeneratorEngine, DocumentationReport };
package/dist/index.js CHANGED
@@ -1,11 +1,8 @@
1
- // Main exports for the documentation generator
2
- export * from './types.js';
3
- export * from './core/engine.js';
4
- export * from './analyzers/base-analyzer.js';
5
- export * from './analyzers/pages-analyzer.js';
6
- export * from './analyzers/graphql-analyzer.js';
7
- export * from './analyzers/dataflow-analyzer.js';
8
- export * from './generators/mermaid-generator.js';
9
- export * from './generators/markdown-generator.js';
10
- export * from './generators/page-map-generator.js';
11
- export * from './server/doc-server.js';
1
+ import './chunk-6F4PWJZI.js';
2
+ export { DocGeneratorEngine, DocServer } from './chunk-M6YNU536.js';
3
+ import './chunk-E4WRODSI.js';
4
+ import './chunk-3PWXDB7B.js';
5
+ export { BaseAnalyzer, DataFlowAnalyzer, GraphQLAnalyzer, PagesAnalyzer } from './chunk-GNBMJMET.js';
6
+ export { MarkdownGenerator, MermaidGenerator } from './chunk-SSU6QFTX.js';
7
+ export { PageMapGenerator } from './chunk-3YFXZAP7.js';
8
+ import './chunk-OWM6WNLE.js';
@@ -0,0 +1 @@
1
+ export { PageMapGenerator } from './chunk-3YFXZAP7.js';