@wtdlee/repomap 0.3.0 → 0.3.2

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 (72) hide show
  1. package/dist/analyzers/index.d.ts +69 -5
  2. package/dist/analyzers/index.js +1 -5
  3. package/dist/{server/doc-server.js → chunk-4K4MGTPV.js} +41 -329
  4. package/dist/chunk-6F4PWJZI.js +0 -0
  5. package/dist/chunk-J2CM7T7U.js +1 -0
  6. package/dist/{generators/page-map-generator.js → chunk-MOEA75XK.js} +278 -503
  7. package/dist/{generators/rails-map-generator.js → chunk-SL2GMDBN.js} +48 -129
  8. package/dist/chunk-UJT5KTVK.js +36 -0
  9. package/dist/chunk-VV3A3UE3.js +1 -0
  10. package/dist/chunk-XWZH2RDG.js +19 -0
  11. package/dist/cli.d.ts +0 -1
  12. package/dist/cli.js +29 -499
  13. package/dist/dataflow-analyzer-BfAiqVUp.d.ts +180 -0
  14. package/dist/env-detector-BIWJ7OYF.js +1 -0
  15. package/dist/generators/assets/common.css +564 -23
  16. package/dist/generators/index.d.ts +431 -3
  17. package/dist/generators/index.js +1 -3
  18. package/dist/index.d.ts +53 -10
  19. package/dist/index.js +1 -11
  20. package/dist/page-map-generator-XNZ4TDJT.js +1 -0
  21. package/dist/rails-TJCDGBBF.js +1 -0
  22. package/dist/rails-map-generator-JL5PKHYP.js +1 -0
  23. package/dist/server/index.d.ts +33 -1
  24. package/dist/server/index.js +1 -1
  25. package/dist/types.d.ts +39 -37
  26. package/dist/types.js +1 -5
  27. package/package.json +4 -2
  28. package/dist/analyzers/base-analyzer.d.ts +0 -45
  29. package/dist/analyzers/base-analyzer.js +0 -47
  30. package/dist/analyzers/dataflow-analyzer.d.ts +0 -29
  31. package/dist/analyzers/dataflow-analyzer.js +0 -425
  32. package/dist/analyzers/graphql-analyzer.d.ts +0 -22
  33. package/dist/analyzers/graphql-analyzer.js +0 -386
  34. package/dist/analyzers/pages-analyzer.d.ts +0 -84
  35. package/dist/analyzers/pages-analyzer.js +0 -1695
  36. package/dist/analyzers/rails/index.d.ts +0 -46
  37. package/dist/analyzers/rails/index.js +0 -145
  38. package/dist/analyzers/rails/rails-controller-analyzer.d.ts +0 -82
  39. package/dist/analyzers/rails/rails-controller-analyzer.js +0 -478
  40. package/dist/analyzers/rails/rails-grpc-analyzer.d.ts +0 -44
  41. package/dist/analyzers/rails/rails-grpc-analyzer.js +0 -262
  42. package/dist/analyzers/rails/rails-model-analyzer.d.ts +0 -88
  43. package/dist/analyzers/rails/rails-model-analyzer.js +0 -493
  44. package/dist/analyzers/rails/rails-react-analyzer.d.ts +0 -41
  45. package/dist/analyzers/rails/rails-react-analyzer.js +0 -529
  46. package/dist/analyzers/rails/rails-routes-analyzer.d.ts +0 -62
  47. package/dist/analyzers/rails/rails-routes-analyzer.js +0 -540
  48. package/dist/analyzers/rails/rails-view-analyzer.d.ts +0 -49
  49. package/dist/analyzers/rails/rails-view-analyzer.js +0 -386
  50. package/dist/analyzers/rails/ruby-parser.d.ts +0 -63
  51. package/dist/analyzers/rails/ruby-parser.js +0 -212
  52. package/dist/analyzers/rest-api-analyzer.d.ts +0 -65
  53. package/dist/analyzers/rest-api-analyzer.js +0 -479
  54. package/dist/core/cache.d.ts +0 -47
  55. package/dist/core/cache.js +0 -151
  56. package/dist/core/engine.d.ts +0 -46
  57. package/dist/core/engine.js +0 -319
  58. package/dist/core/index.d.ts +0 -2
  59. package/dist/core/index.js +0 -2
  60. package/dist/generators/markdown-generator.d.ts +0 -25
  61. package/dist/generators/markdown-generator.js +0 -782
  62. package/dist/generators/mermaid-generator.d.ts +0 -35
  63. package/dist/generators/mermaid-generator.js +0 -364
  64. package/dist/generators/page-map-generator.d.ts +0 -22
  65. package/dist/generators/rails-map-generator.d.ts +0 -21
  66. package/dist/server/doc-server.d.ts +0 -30
  67. package/dist/utils/env-detector.d.ts +0 -31
  68. package/dist/utils/env-detector.js +0 -188
  69. package/dist/utils/parallel.d.ts +0 -23
  70. package/dist/utils/parallel.js +0 -70
  71. package/dist/utils/port.d.ts +0 -15
  72. package/dist/utils/port.js +0 -41
@@ -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{a as detectEnvironments,b as getAnalyzersForEnvironments}from'./chunk-VV3A3UE3.js';