genaicode 0.6.1 → 0.8.0

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 (261) hide show
  1. package/README.md +0 -2
  2. package/dist/ai-service/ai-studio.js +7 -1
  3. package/dist/ai-service/ai-studio.js.map +1 -1
  4. package/dist/ai-service/anthropic.js +49 -19
  5. package/dist/ai-service/anthropic.js.map +1 -1
  6. package/dist/ai-service/chat-gpt.js +28 -11
  7. package/dist/ai-service/chat-gpt.js.map +1 -1
  8. package/dist/ai-service/common.d.ts +5 -4
  9. package/dist/ai-service/common.js +3 -4
  10. package/dist/ai-service/common.js.map +1 -1
  11. package/dist/ai-service/common.test.js +1 -1
  12. package/dist/ai-service/vertex-ai-claude.js +1 -1
  13. package/dist/ai-service/vertex-ai-claude.js.map +1 -1
  14. package/dist/ai-service/vertex-ai.js +7 -1
  15. package/dist/ai-service/vertex-ai.js.map +1 -1
  16. package/dist/cli/cli-options.js +0 -12
  17. package/dist/cli/cli-options.js.map +1 -1
  18. package/dist/cli/cli-params.d.ts +1 -4
  19. package/dist/cli/cli-params.js +1 -10
  20. package/dist/cli/cli-params.js.map +1 -1
  21. package/dist/cli/validate-cli-params.js +1 -7
  22. package/dist/cli/validate-cli-params.js.map +1 -1
  23. package/dist/cli/validate-cli-params.test.js +1 -1
  24. package/dist/cli/validate-cli-params.test.js.map +1 -1
  25. package/dist/eval/codegen-summary.test.d.ts +1 -0
  26. package/dist/eval/codegen-summary.test.js +93 -0
  27. package/dist/eval/codegen-summary.test.js.map +1 -0
  28. package/dist/eval/current-prompt-plugin.d.ts +3 -0
  29. package/dist/eval/current-prompt-plugin.js +10 -0
  30. package/dist/eval/current-prompt-plugin.js.map +1 -0
  31. package/dist/eval/data/current-prompt.d.ts +34 -0
  32. package/dist/eval/data/current-prompt.js +59 -0
  33. package/dist/eval/data/current-prompt.js.map +1 -0
  34. package/dist/eval/data/prompt-assistant-image.d.ts +49 -0
  35. package/dist/eval/data/prompt-assistant-image.js +67 -0
  36. package/dist/eval/data/prompt-assistant-image.js.map +1 -0
  37. package/dist/eval/data/prompt3.d.ts +34 -0
  38. package/dist/eval/data/prompt3.js +71 -0
  39. package/dist/eval/data/prompt3.js.map +1 -0
  40. package/dist/eval/prompt-debug.test.d.ts +1 -0
  41. package/dist/eval/prompt-debug.test.js +76 -0
  42. package/dist/eval/prompt-debug.test.js.map +1 -0
  43. package/dist/eval/prompt2.d.ts +34 -0
  44. package/dist/eval/prompt2.js +125 -0
  45. package/dist/eval/prompt2.js.map +1 -0
  46. package/dist/files/read-files.d.ts +29 -6
  47. package/dist/files/read-files.js +31 -10
  48. package/dist/files/read-files.js.map +1 -1
  49. package/dist/files/read-files.test.js +15 -9
  50. package/dist/files/read-files.test.js.map +1 -1
  51. package/dist/files/source-code-tree.d.ts +17 -0
  52. package/dist/files/source-code-tree.js +70 -0
  53. package/dist/files/source-code-tree.js.map +1 -0
  54. package/dist/main/codegen-types.d.ts +8 -5
  55. package/dist/main/codegen.ai-services.test.d.ts +3 -0
  56. package/dist/main/codegen.ai-services.test.js +198 -0
  57. package/dist/main/codegen.ai-services.test.js.map +1 -0
  58. package/dist/main/codegen.cli-options.test.d.ts +3 -0
  59. package/dist/main/codegen.cli-options.test.js +171 -0
  60. package/dist/main/codegen.cli-options.test.js.map +1 -0
  61. package/dist/main/codegen.image-generation.test.d.ts +3 -0
  62. package/dist/main/codegen.image-generation.test.js +187 -0
  63. package/dist/main/codegen.image-generation.test.js.map +1 -0
  64. package/dist/main/codegen.js +2 -5
  65. package/dist/main/codegen.js.map +1 -1
  66. package/dist/main/codegen.test-utils.d.ts +81 -0
  67. package/dist/main/codegen.test-utils.js +88 -0
  68. package/dist/main/codegen.test-utils.js.map +1 -0
  69. package/dist/main/codegen.test.js +47 -28
  70. package/dist/main/codegen.test.js.map +1 -1
  71. package/dist/main/common/content-bus-types.d.ts +6 -0
  72. package/dist/main/common/content-bus.d.ts +2 -2
  73. package/dist/main/common/content-bus.js +3 -1
  74. package/dist/main/common/content-bus.js.map +1 -1
  75. package/dist/main/common/user-actions.d.ts +8 -2
  76. package/dist/main/common/user-actions.js.map +1 -1
  77. package/dist/main/config-lib.js +20 -2
  78. package/dist/main/config-lib.js.map +1 -1
  79. package/dist/main/config.js +4 -28
  80. package/dist/main/config.js.map +1 -1
  81. package/dist/main/interactive/codegen-interactive.js +0 -4
  82. package/dist/main/interactive/codegen-interactive.js.map +1 -1
  83. package/dist/main/interactive/codegen-interactive.test.js +1 -7
  84. package/dist/main/interactive/codegen-interactive.test.js.map +1 -1
  85. package/dist/main/interactive/common.d.ts +1 -1
  86. package/dist/main/interactive/common.js +0 -2
  87. package/dist/main/interactive/common.js.map +1 -1
  88. package/dist/main/interactive/configure.js +0 -2
  89. package/dist/main/interactive/configure.js.map +1 -1
  90. package/dist/main/interactive/help.js +0 -2
  91. package/dist/main/interactive/help.js.map +1 -1
  92. package/dist/main/interactive/task-file.js +1 -1
  93. package/dist/main/interactive/task-file.js.map +1 -1
  94. package/dist/main/interactive/text-prompt.js +1 -1
  95. package/dist/main/interactive/text-prompt.js.map +1 -1
  96. package/dist/main/interactive/user-action-handlers.js +4 -2
  97. package/dist/main/interactive/user-action-handlers.js.map +1 -1
  98. package/dist/main/plugin-loader.d.ts +7 -1
  99. package/dist/main/plugin-loader.js +61 -0
  100. package/dist/main/plugin-loader.js.map +1 -1
  101. package/dist/main/ui/backend/api.js +9 -3
  102. package/dist/main/ui/backend/api.js.map +1 -1
  103. package/dist/main/ui/backend/service.d.ts +2 -1
  104. package/dist/main/ui/backend/service.js +6 -3
  105. package/dist/main/ui/backend/service.js.map +1 -1
  106. package/dist/main/ui/frontend/assets/index-QOcNx5ac.js +812 -0
  107. package/dist/main/ui/frontend/index.html +1 -1
  108. package/dist/main/ui/user-action-handlers.js +1 -1
  109. package/dist/main/ui/user-action-handlers.js.map +1 -1
  110. package/dist/project-profiles/detection.d.ts +40 -0
  111. package/dist/project-profiles/detection.js +131 -0
  112. package/dist/project-profiles/detection.js.map +1 -0
  113. package/dist/project-profiles/index.d.ts +35 -0
  114. package/dist/project-profiles/index.js +72 -0
  115. package/dist/project-profiles/index.js.map +1 -0
  116. package/dist/project-profiles/profiles/golang.d.ts +65 -0
  117. package/dist/project-profiles/profiles/golang.js +208 -0
  118. package/dist/project-profiles/profiles/golang.js.map +1 -0
  119. package/dist/project-profiles/profiles/java-maven.d.ts +80 -0
  120. package/dist/project-profiles/profiles/java-maven.js +165 -0
  121. package/dist/project-profiles/profiles/java-maven.js.map +1 -0
  122. package/dist/project-profiles/profiles/javascript-npm.d.ts +40 -0
  123. package/dist/project-profiles/profiles/javascript-npm.js +118 -0
  124. package/dist/project-profiles/profiles/javascript-npm.js.map +1 -0
  125. package/dist/project-profiles/profiles/javascript-react.d.ts +46 -0
  126. package/dist/project-profiles/profiles/javascript-react.js +147 -0
  127. package/dist/project-profiles/profiles/javascript-react.js.map +1 -0
  128. package/dist/project-profiles/profiles/python-django.d.ts +58 -0
  129. package/dist/project-profiles/profiles/python-django.js +200 -0
  130. package/dist/project-profiles/profiles/python-django.js.map +1 -0
  131. package/dist/project-profiles/types.d.ts +122 -0
  132. package/dist/project-profiles/types.js +77 -0
  133. package/dist/project-profiles/types.js.map +1 -0
  134. package/dist/prompt/function-calling.js +8 -3
  135. package/dist/prompt/function-calling.js.map +1 -1
  136. package/dist/prompt/function-defs/ask-question.d.ts +5 -0
  137. package/dist/prompt/function-defs/ask-question.js +140 -60
  138. package/dist/prompt/function-defs/ask-question.js.map +1 -1
  139. package/dist/prompt/function-defs/codegen-planning.d.ts +8 -0
  140. package/dist/prompt/function-defs/codegen-planning.js +50 -0
  141. package/dist/prompt/function-defs/codegen-planning.js.map +1 -0
  142. package/dist/prompt/function-defs/codegen-summary.js +2 -2
  143. package/dist/prompt/function-defs/codegen-summary.js.map +1 -1
  144. package/dist/prompt/function-defs/get-source-code.js +32 -2
  145. package/dist/prompt/function-defs/get-source-code.js.map +1 -1
  146. package/dist/prompt/function-defs/optimize-context.js +35 -12
  147. package/dist/prompt/function-defs/optimize-context.js.map +1 -1
  148. package/dist/prompt/function-defs/set-summaries.js +20 -1
  149. package/dist/prompt/function-defs/set-summaries.js.map +1 -1
  150. package/dist/prompt/limits.js +2 -2
  151. package/dist/prompt/limits.js.map +1 -1
  152. package/dist/prompt/limits.test.js +3 -3
  153. package/dist/prompt/limits.test.js.map +1 -1
  154. package/dist/prompt/prompt-codegen.js +7 -79
  155. package/dist/prompt/prompt-codegen.js.map +1 -1
  156. package/dist/prompt/prompt-codegen.test.js +8 -14
  157. package/dist/prompt/prompt-codegen.test.js.map +1 -1
  158. package/dist/prompt/prompt-service-ask-question.test.js +27 -80
  159. package/dist/prompt/prompt-service-ask-question.test.js.map +1 -1
  160. package/dist/prompt/prompt-service.ai-services.test.d.ts +1 -0
  161. package/dist/prompt/prompt-service.ai-services.test.js +149 -0
  162. package/dist/prompt/prompt-service.ai-services.test.js.map +1 -0
  163. package/dist/prompt/prompt-service.context-optimization.test.d.ts +1 -0
  164. package/dist/prompt/prompt-service.context-optimization.test.js +212 -0
  165. package/dist/prompt/prompt-service.context-optimization.test.js.map +1 -0
  166. package/dist/prompt/prompt-service.image-handling.test.d.ts +1 -0
  167. package/dist/prompt/prompt-service.image-handling.test.js +212 -0
  168. package/dist/prompt/prompt-service.image-handling.test.js.map +1 -0
  169. package/dist/prompt/prompt-service.js +41 -127
  170. package/dist/prompt/prompt-service.js.map +1 -1
  171. package/dist/prompt/prompt-service.test-utils.d.ts +66 -0
  172. package/dist/prompt/prompt-service.test-utils.js +169 -0
  173. package/dist/prompt/prompt-service.test-utils.js.map +1 -0
  174. package/dist/prompt/prompt-service.test.js +96 -20
  175. package/dist/prompt/prompt-service.test.js.map +1 -1
  176. package/dist/prompt/prompt-service.validation-recovery.test.d.ts +1 -0
  177. package/dist/prompt/prompt-service.validation-recovery.test.js +263 -0
  178. package/dist/prompt/prompt-service.validation-recovery.test.js.map +1 -0
  179. package/dist/prompt/static-prompts.d.ts +16 -0
  180. package/dist/prompt/static-prompts.js +22 -0
  181. package/dist/prompt/static-prompts.js.map +1 -0
  182. package/dist/prompt/steps/step-ask-question/handlers/cancel-code-generation.js +1 -3
  183. package/dist/prompt/steps/step-ask-question/handlers/cancel-code-generation.js.map +1 -1
  184. package/dist/prompt/steps/step-ask-question/handlers/code-generation.d.ts +2 -0
  185. package/dist/prompt/steps/step-ask-question/handlers/code-generation.js +58 -0
  186. package/dist/prompt/steps/step-ask-question/handlers/code-generation.js.map +1 -0
  187. package/dist/prompt/steps/step-ask-question/handlers/confirm-code-generation.d.ts +1 -1
  188. package/dist/prompt/steps/step-ask-question/handlers/confirm-code-generation.js +8 -7
  189. package/dist/prompt/steps/step-ask-question/handlers/confirm-code-generation.js.map +1 -1
  190. package/dist/prompt/steps/step-ask-question/handlers/context-optimization.js +6 -6
  191. package/dist/prompt/steps/step-ask-question/handlers/context-optimization.js.map +1 -1
  192. package/dist/prompt/steps/step-ask-question/handlers/default-action.js +1 -4
  193. package/dist/prompt/steps/step-ask-question/handlers/default-action.js.map +1 -1
  194. package/dist/prompt/steps/step-ask-question/handlers/handle-request-answer-with-image.d.ts +2 -0
  195. package/dist/prompt/steps/step-ask-question/handlers/handle-request-answer-with-image.js +86 -0
  196. package/dist/prompt/steps/step-ask-question/handlers/handle-request-answer-with-image.js.map +1 -0
  197. package/dist/prompt/steps/step-ask-question/handlers/handle-send-message-with-image.d.ts +2 -0
  198. package/dist/prompt/steps/step-ask-question/handlers/handle-send-message-with-image.js +97 -0
  199. package/dist/prompt/steps/step-ask-question/handlers/handle-send-message-with-image.js.map +1 -0
  200. package/dist/prompt/steps/step-ask-question/handlers/handle-send-message.d.ts +2 -0
  201. package/dist/prompt/steps/step-ask-question/handlers/handle-send-message.js +20 -0
  202. package/dist/prompt/steps/step-ask-question/handlers/handle-send-message.js.map +1 -0
  203. package/dist/prompt/steps/step-ask-question/handlers/handler-utils.d.ts +0 -0
  204. package/dist/prompt/steps/step-ask-question/handlers/handler-utils.js +2 -0
  205. package/dist/prompt/steps/step-ask-question/handlers/handler-utils.js.map +1 -0
  206. package/dist/prompt/steps/step-ask-question/handlers/remove-files-from-context.d.ts +1 -1
  207. package/dist/prompt/steps/step-ask-question/handlers/remove-files-from-context.js +57 -15
  208. package/dist/prompt/steps/step-ask-question/handlers/remove-files-from-context.js.map +1 -1
  209. package/dist/prompt/steps/step-ask-question/handlers/request-files-content.d.ts +1 -1
  210. package/dist/prompt/steps/step-ask-question/handlers/request-files-content.js +109 -12
  211. package/dist/prompt/steps/step-ask-question/handlers/request-files-content.js.map +1 -1
  212. package/dist/prompt/steps/step-ask-question/handlers/request-permissions.d.ts +1 -1
  213. package/dist/prompt/steps/step-ask-question/handlers/request-permissions.js +48 -26
  214. package/dist/prompt/steps/step-ask-question/handlers/request-permissions.js.map +1 -1
  215. package/dist/prompt/steps/step-ask-question/handlers/start-code-generation.js +1 -1
  216. package/dist/prompt/steps/step-ask-question/handlers/start-code-generation.js.map +1 -1
  217. package/dist/prompt/steps/step-ask-question/step-ask-question-reflect.js +1 -0
  218. package/dist/prompt/steps/step-ask-question/step-ask-question-reflect.js.map +1 -1
  219. package/dist/prompt/steps/step-ask-question/step-ask-question-types.d.ts +25 -21
  220. package/dist/prompt/steps/step-ask-question/step-ask-question.d.ts +2 -5
  221. package/dist/prompt/steps/step-ask-question/step-ask-question.js +36 -33
  222. package/dist/prompt/steps/step-ask-question/step-ask-question.js.map +1 -1
  223. package/dist/prompt/steps/step-codegen-planning.d.ts +10 -0
  224. package/dist/prompt/steps/step-codegen-planning.js +69 -0
  225. package/dist/prompt/steps/step-codegen-planning.js.map +1 -0
  226. package/dist/prompt/steps/step-codegen-summary.d.ts +7 -0
  227. package/dist/prompt/steps/step-codegen-summary.js +106 -0
  228. package/dist/prompt/steps/step-codegen-summary.js.map +1 -0
  229. package/dist/prompt/steps/step-codegen-summary.test.d.ts +1 -0
  230. package/dist/prompt/steps/step-codegen-summary.test.js +136 -0
  231. package/dist/prompt/steps/step-codegen-summary.test.js.map +1 -0
  232. package/dist/prompt/steps/step-context-optimization.js +243 -126
  233. package/dist/prompt/steps/step-context-optimization.js.map +1 -1
  234. package/dist/prompt/steps/step-context-optimization.test.d.ts +2 -0
  235. package/dist/prompt/steps/step-context-optimization.test.js +475 -0
  236. package/dist/prompt/steps/step-context-optimization.test.js.map +1 -0
  237. package/dist/prompt/steps/step-ensure-context.d.ts +15 -0
  238. package/dist/prompt/steps/step-ensure-context.js +102 -0
  239. package/dist/prompt/steps/step-ensure-context.js.map +1 -0
  240. package/dist/prompt/steps/step-ensure-context.test.d.ts +1 -0
  241. package/dist/prompt/steps/step-ensure-context.test.js +242 -0
  242. package/dist/prompt/steps/step-ensure-context.test.js.map +1 -0
  243. package/dist/prompt/steps/step-generate-image.d.ts +8 -1
  244. package/dist/prompt/steps/step-generate-image.js +1 -0
  245. package/dist/prompt/steps/step-generate-image.js.map +1 -1
  246. package/dist/prompt/steps/step-summarization.d.ts +2 -2
  247. package/dist/prompt/steps/step-summarization.js +45 -9
  248. package/dist/prompt/steps/step-summarization.js.map +1 -1
  249. package/dist/prompt/steps/step-validate-recover.js +24 -15
  250. package/dist/prompt/steps/step-validate-recover.js.map +1 -1
  251. package/dist/prompt/steps/steps-types.d.ts +2 -0
  252. package/dist/prompt/steps/steps-types.js.map +1 -1
  253. package/dist/prompt/systemprompt.d.ts +2 -2
  254. package/dist/prompt/systemprompt.js +74 -176
  255. package/dist/prompt/systemprompt.js.map +1 -1
  256. package/dist/prompt/systemprompt.test.js +4 -5
  257. package/dist/prompt/systemprompt.test.js.map +1 -1
  258. package/dist/vite-genaicode/vite-genaicode-plugin.js +0 -2
  259. package/dist/vite-genaicode/vite-genaicode-plugin.js.map +1 -1
  260. package/package.json +6 -2
  261. package/dist/main/ui/frontend/assets/index-Dk_qaEQg.js +0 -782
@@ -0,0 +1,80 @@
1
+ /**
2
+ * Java/Maven Project Profile
3
+ *
4
+ * This profile handles Java projects using Maven as the build system.
5
+ * It includes support for:
6
+ * - Standard Maven projects
7
+ * - Spring Boot applications
8
+ * - Jakarta EE applications
9
+ * - Maven multi-module projects
10
+ */
11
+ import { ProjectProfile } from '../types.js';
12
+ /**
13
+ * Different types of Java/Maven projects we can detect
14
+ */
15
+ declare const MAVEN_PROJECT_TYPES: {
16
+ readonly SPRING_BOOT: "spring-boot";
17
+ readonly JAKARTA_EE: "jakarta-ee";
18
+ readonly MULTI_MODULE: "multi-module";
19
+ readonly STANDARD: "standard";
20
+ };
21
+ type MavenProjectType = (typeof MAVEN_PROJECT_TYPES)[keyof typeof MAVEN_PROJECT_TYPES];
22
+ interface MavenPom {
23
+ project?: {
24
+ packaging?: string[];
25
+ modules?: {
26
+ module: string[];
27
+ }[];
28
+ parent?: {
29
+ groupId: string[];
30
+ artifactId: string[];
31
+ }[];
32
+ dependencies?: {
33
+ dependency: {
34
+ groupId: string[];
35
+ artifactId: string[];
36
+ }[];
37
+ }[];
38
+ properties?: Record<string, string[]>[];
39
+ };
40
+ }
41
+ /**
42
+ * Read and parse pom.xml file
43
+ */
44
+ declare function readPomXml(pomPath: string): Promise<MavenPom | null>;
45
+ /**
46
+ * Detect specific Maven project type
47
+ */
48
+ declare function detectMavenProjectType(rootDir: string): Promise<{
49
+ type: MavenProjectType;
50
+ weight: number;
51
+ }>;
52
+ /**
53
+ * Check for Maven wrapper and return appropriate maven command
54
+ */
55
+ declare function getMavenCommand(rootDir: string): Promise<string>;
56
+ /**
57
+ * Get appropriate lint command based on project configuration
58
+ */
59
+ declare function detectLintCommand(rootDir: string): Promise<string | undefined>;
60
+ /**
61
+ * Get Java project specific extensions
62
+ */
63
+ declare function getJavaExtensions(rootDir: string): Promise<string[]>;
64
+ /**
65
+ * Get project specific ignore paths
66
+ */
67
+ declare function getJavaIgnorePaths(projectType: MavenProjectType): Promise<string[]>;
68
+ /**
69
+ * Maven project profile
70
+ */
71
+ export declare const mavenProfile: ProjectProfile;
72
+ export declare const mavenUtils: {
73
+ readPomXml: typeof readPomXml;
74
+ detectMavenProjectType: typeof detectMavenProjectType;
75
+ getMavenCommand: typeof getMavenCommand;
76
+ detectLintCommand: typeof detectLintCommand;
77
+ getJavaExtensions: typeof getJavaExtensions;
78
+ getJavaIgnorePaths: typeof getJavaIgnorePaths;
79
+ };
80
+ export {};
@@ -0,0 +1,165 @@
1
+ /**
2
+ * Java/Maven Project Profile
3
+ *
4
+ * This profile handles Java projects using Maven as the build system.
5
+ * It includes support for:
6
+ * - Standard Maven projects
7
+ * - Spring Boot applications
8
+ * - Jakarta EE applications
9
+ * - Maven multi-module projects
10
+ */
11
+ import path from 'path';
12
+ import fs from 'fs';
13
+ import { parseStringPromise } from 'xml2js';
14
+ import { PROJECT_FILE_PATTERNS, DETECTION_WEIGHTS, DEFAULT_EXTENSIONS, DEFAULT_IGNORE_PATHS, } from '../types.js';
15
+ import { profileUtils } from '../detection.js';
16
+ /**
17
+ * Different types of Java/Maven projects we can detect
18
+ */
19
+ const MAVEN_PROJECT_TYPES = {
20
+ SPRING_BOOT: 'spring-boot',
21
+ JAKARTA_EE: 'jakarta-ee',
22
+ MULTI_MODULE: 'multi-module',
23
+ STANDARD: 'standard',
24
+ };
25
+ /**
26
+ * Read and parse pom.xml file
27
+ */
28
+ async function readPomXml(pomPath) {
29
+ try {
30
+ const content = await fs.promises.readFile(pomPath, 'utf-8');
31
+ return await parseStringPromise(content);
32
+ }
33
+ catch {
34
+ return null;
35
+ }
36
+ }
37
+ /**
38
+ * Detect specific Maven project type
39
+ */
40
+ async function detectMavenProjectType(rootDir) {
41
+ const pomPath = path.join(rootDir, PROJECT_FILE_PATTERNS.JAVA.MAVEN);
42
+ const pom = await readPomXml(pomPath);
43
+ if (!pom?.project) {
44
+ return { type: MAVEN_PROJECT_TYPES.STANDARD, weight: DETECTION_WEIGHTS.BASE.JAVA_BASE };
45
+ }
46
+ // Check for multi-module project
47
+ if ((pom.project?.modules?.[0]?.module?.length ?? 0) > 0) {
48
+ return { type: MAVEN_PROJECT_TYPES.MULTI_MODULE, weight: DETECTION_WEIGHTS.FRAMEWORK.SPRING };
49
+ }
50
+ // Check dependencies for project type
51
+ const dependencies = pom.project.dependencies?.[0]?.dependency ?? [];
52
+ const hasSpringBoot = dependencies.some((dep) => dep.groupId[0] === 'org.springframework.boot' ||
53
+ pom.project?.parent?.[0]?.groupId[0] === 'org.springframework.boot');
54
+ if (hasSpringBoot) {
55
+ return { type: MAVEN_PROJECT_TYPES.SPRING_BOOT, weight: DETECTION_WEIGHTS.FRAMEWORK.SPRING };
56
+ }
57
+ const hasJakarta = dependencies.some((dep) => dep.groupId[0].startsWith('jakarta.') || dep.groupId[0].startsWith('javax.'));
58
+ if (hasJakarta) {
59
+ return { type: MAVEN_PROJECT_TYPES.JAKARTA_EE, weight: DETECTION_WEIGHTS.FRAMEWORK.SPRING };
60
+ }
61
+ return { type: MAVEN_PROJECT_TYPES.STANDARD, weight: DETECTION_WEIGHTS.BASE.JAVA_BASE };
62
+ }
63
+ /**
64
+ * Check for Maven wrapper and return appropriate maven command
65
+ */
66
+ async function getMavenCommand(rootDir) {
67
+ const hasWrapper = await profileUtils.anyFileExists(rootDir, ['mvnw', 'mvnw.cmd']);
68
+ return hasWrapper ? './mvnw' : 'mvn';
69
+ }
70
+ /**
71
+ * Get appropriate lint command based on project configuration
72
+ */
73
+ async function detectLintCommand(rootDir) {
74
+ const mvnCmd = await getMavenCommand(rootDir);
75
+ // Check for checkstyle plugin in pom.xml
76
+ const pomPath = path.join(rootDir, PROJECT_FILE_PATTERNS.JAVA.MAVEN);
77
+ const pom = await readPomXml(pomPath);
78
+ if (!pom?.project)
79
+ return undefined;
80
+ // Look for checkstyle plugin in build plugins
81
+ const hasCheckstyle = pom.project.properties?.[0]?.['checkstyle.version'] !== undefined;
82
+ if (hasCheckstyle) {
83
+ return `${mvnCmd} checkstyle:check`;
84
+ }
85
+ // Default lint command for Maven projects
86
+ return `${mvnCmd} verify -DskipTests`;
87
+ }
88
+ /**
89
+ * Get Java project specific extensions
90
+ */
91
+ async function getJavaExtensions(rootDir) {
92
+ const baseExtensions = [...DEFAULT_EXTENSIONS.JAVA];
93
+ // Check for Kotlin support
94
+ const pomPath = path.join(rootDir, PROJECT_FILE_PATTERNS.JAVA.MAVEN);
95
+ const pom = await readPomXml(pomPath);
96
+ if (pom?.project?.properties?.[0]?.['kotlin.version']) {
97
+ baseExtensions.push('.kt', '.kts');
98
+ }
99
+ // Check for Scala support
100
+ if (pom?.project?.properties?.[0]?.['scala.version']) {
101
+ baseExtensions.push('.scala');
102
+ }
103
+ return baseExtensions;
104
+ }
105
+ /**
106
+ * Get project specific ignore paths
107
+ */
108
+ async function getJavaIgnorePaths(projectType) {
109
+ const baseIgnorePaths = [...DEFAULT_IGNORE_PATHS.JAVA];
110
+ switch (projectType) {
111
+ case MAVEN_PROJECT_TYPES.SPRING_BOOT:
112
+ return [...baseIgnorePaths, 'target', '.mvn', '*.log'];
113
+ case MAVEN_PROJECT_TYPES.MULTI_MODULE:
114
+ return [...baseIgnorePaths, '**/target', '.mvn'];
115
+ default:
116
+ return baseIgnorePaths;
117
+ }
118
+ }
119
+ /**
120
+ * Maven project profile
121
+ */
122
+ export const mavenProfile = {
123
+ id: 'java-maven',
124
+ name: 'Java/Maven',
125
+ extensions: [...DEFAULT_EXTENSIONS.JAVA],
126
+ ignorePaths: [...DEFAULT_IGNORE_PATHS.JAVA],
127
+ detectionWeight: DETECTION_WEIGHTS.BASE.JAVA_BASE,
128
+ /**
129
+ * Detect if this is a Maven project
130
+ */
131
+ async detect(rootDir) {
132
+ // Check for pom.xml
133
+ const hasPom = await profileUtils.fileExists(rootDir, PROJECT_FILE_PATTERNS.JAVA.MAVEN);
134
+ if (!hasPom)
135
+ return false;
136
+ // Verify it's a valid pom.xml
137
+ const pomPath = path.join(rootDir, PROJECT_FILE_PATTERNS.JAVA.MAVEN);
138
+ const pom = await readPomXml(pomPath);
139
+ return pom !== null;
140
+ },
141
+ /**
142
+ * Initialize Maven-specific configuration
143
+ */
144
+ async initialize(rootDir) {
145
+ // Detect Maven project type
146
+ const { type: projectType } = await detectMavenProjectType(rootDir);
147
+ // Set Java-specific extensions
148
+ this.extensions = await getJavaExtensions(rootDir);
149
+ // Set Maven-specific ignore paths
150
+ this.ignorePaths = await getJavaIgnorePaths(projectType);
151
+ // Set appropriate lint command
152
+ this.lintCommand = await detectLintCommand(rootDir);
153
+ console.log(`Initialized Maven profile (${projectType})`);
154
+ },
155
+ };
156
+ // Export utilities for other profiles that might extend Maven
157
+ export const mavenUtils = {
158
+ readPomXml,
159
+ detectMavenProjectType,
160
+ getMavenCommand,
161
+ detectLintCommand,
162
+ getJavaExtensions,
163
+ getJavaIgnorePaths,
164
+ };
165
+ //# sourceMappingURL=java-maven.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"java-maven.js","sourceRoot":"","sources":["../../../src/project-profiles/profiles/java-maven.ts"],"names":[],"mappings":"AAAA;;;;;;;;;GASG;AAEH,OAAO,IAAI,MAAM,MAAM,CAAC;AACxB,OAAO,EAAE,MAAM,IAAI,CAAC;AACpB,OAAO,EAAE,kBAAkB,EAAE,MAAM,QAAQ,CAAC;AAC5C,OAAO,EAEL,qBAAqB,EACrB,iBAAiB,EACjB,kBAAkB,EAClB,oBAAoB,GACrB,MAAM,aAAa,CAAC;AACrB,OAAO,EAAE,YAAY,EAAE,MAAM,iBAAiB,CAAC;AAE/C;;GAEG;AACH,MAAM,mBAAmB,GAAG;IAC1B,WAAW,EAAE,aAAa;IAC1B,UAAU,EAAE,YAAY;IACxB,YAAY,EAAE,cAAc;IAC5B,QAAQ,EAAE,UAAU;CACZ,CAAC;AAmBX;;GAEG;AACH,KAAK,UAAU,UAAU,CAAC,OAAe;IACvC,IAAI,CAAC;QACH,MAAM,OAAO,GAAG,MAAM,EAAE,CAAC,QAAQ,CAAC,QAAQ,CAAC,OAAO,EAAE,OAAO,CAAC,CAAC;QAC7D,OAAO,MAAM,kBAAkB,CAAC,OAAO,CAAC,CAAC;IAC3C,CAAC;IAAC,MAAM,CA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D,CAAC;CACF,CAAC;AAEF,8DAA8D;AAC9D,MAAM,CAAC,MAAM,UAAU,GAAG;IACxB,UAAU;IACV,sBAAsB;IACtB,eAAe;IACf,iBAAiB;IACjB,iBAAiB;IACjB,kBAAkB;CACnB,CAAC"}
@@ -0,0 +1,40 @@
1
+ /**
2
+ * NPM/Node.js Project Profile
3
+ *
4
+ * This profile serves as the base for JavaScript/Node.js projects and
5
+ * can be extended by more specific framework profiles (React, Vue, etc.).
6
+ */
7
+ import { ProjectProfile } from '../types.js';
8
+ interface PackageJson {
9
+ name?: string;
10
+ scripts?: Record<string, string>;
11
+ dependencies?: Record<string, string>;
12
+ devDependencies?: Record<string, string>;
13
+ }
14
+ /**
15
+ * Read and parse package.json
16
+ */
17
+ declare function readPackageJson(rootDir: string): Promise<PackageJson | null>;
18
+ /**
19
+ * Find the best lint command from package.json scripts
20
+ */
21
+ declare function detectLintCommand(rootDir: string): Promise<string | undefined>;
22
+ /**
23
+ * Detect if this is a TypeScript project
24
+ */
25
+ declare function isTypeScriptProject(rootDir: string, packageJson?: PackageJson | null): Promise<boolean>;
26
+ /**
27
+ * Get appropriate extensions based on project configuration
28
+ */
29
+ declare function getProjectExtensions(rootDir: string): Promise<string[]>;
30
+ /**
31
+ * NPM/Node.js project profile
32
+ */
33
+ export declare const npmProfile: ProjectProfile;
34
+ export declare const npmUtils: {
35
+ readPackageJson: typeof readPackageJson;
36
+ detectLintCommand: typeof detectLintCommand;
37
+ isTypeScriptProject: typeof isTypeScriptProject;
38
+ getProjectExtensions: typeof getProjectExtensions;
39
+ };
40
+ export {};
@@ -0,0 +1,118 @@
1
+ /**
2
+ * NPM/Node.js Project Profile
3
+ *
4
+ * This profile serves as the base for JavaScript/Node.js projects and
5
+ * can be extended by more specific framework profiles (React, Vue, etc.).
6
+ */
7
+ import path from 'path';
8
+ import fs from 'fs';
9
+ import { PROJECT_FILE_PATTERNS, DETECTION_WEIGHTS, DEFAULT_EXTENSIONS, DEFAULT_IGNORE_PATHS, } from '../types.js';
10
+ import { profileUtils } from '../detection.js';
11
+ /**
12
+ * Read and parse package.json
13
+ */
14
+ async function readPackageJson(rootDir) {
15
+ try {
16
+ const packageJsonPath = path.join(rootDir, 'package.json');
17
+ const content = await fs.promises.readFile(packageJsonPath, 'utf-8');
18
+ return JSON.parse(content);
19
+ }
20
+ catch {
21
+ return null;
22
+ }
23
+ }
24
+ /**
25
+ * Find the best lint command from package.json scripts
26
+ */
27
+ async function detectLintCommand(rootDir) {
28
+ const packageJson = await readPackageJson(rootDir);
29
+ if (!packageJson?.scripts)
30
+ return undefined;
31
+ // Common lint script names in order of preference
32
+ const lintScriptNames = ['lint:fix', 'lint:all', 'lint', 'eslint:fix', 'eslint', 'tslint:fix', 'tslint'];
33
+ // Find the first matching lint script
34
+ const lintScript = lintScriptNames.find((scriptName) => packageJson.scripts?.[scriptName]);
35
+ return lintScript ? `npm run ${lintScript}` : undefined;
36
+ }
37
+ /**
38
+ * Detect if this is a TypeScript project
39
+ */
40
+ async function isTypeScriptProject(rootDir, packageJson) {
41
+ // Check for TypeScript configuration files
42
+ const tsConfigExists = await profileUtils.anyFileExists(rootDir, ['tsconfig.json', 'tsconfig.base.json']);
43
+ if (tsConfigExists)
44
+ return true;
45
+ // Check for TypeScript dependencies
46
+ if (packageJson) {
47
+ const allDeps = { ...packageJson.dependencies, ...packageJson.devDependencies };
48
+ return 'typescript' in allDeps;
49
+ }
50
+ return false;
51
+ }
52
+ /**
53
+ * Get appropriate extensions based on project configuration
54
+ */
55
+ async function getProjectExtensions(rootDir) {
56
+ const packageJson = await readPackageJson(rootDir);
57
+ const isTS = await isTypeScriptProject(rootDir, packageJson);
58
+ const extensions = [...DEFAULT_EXTENSIONS.JS];
59
+ // Add TypeScript extensions if detected
60
+ if (isTS) {
61
+ extensions.push('.ts', '.tsx', '.d.ts');
62
+ }
63
+ return extensions;
64
+ }
65
+ /**
66
+ * NPM/Node.js project profile
67
+ */
68
+ export const npmProfile = {
69
+ id: 'javascript-npm',
70
+ name: 'JavaScript/NPM',
71
+ extensions: [...DEFAULT_EXTENSIONS.JS],
72
+ ignorePaths: [...DEFAULT_IGNORE_PATHS.JS],
73
+ detectionWeight: DETECTION_WEIGHTS.BASE.JS_NPM,
74
+ /**
75
+ * Detect if this is an NPM/Node.js project
76
+ */
77
+ async detect(rootDir) {
78
+ // Check for package.json
79
+ const hasPackageJson = await profileUtils.fileExists(rootDir, PROJECT_FILE_PATTERNS.JS.NPM);
80
+ if (!hasPackageJson)
81
+ return false;
82
+ // Check for npm/yarn/pnpm lock files
83
+ const hasLockFile = await profileUtils.anyFileExists(rootDir, ['package-lock.json', 'yarn.lock', 'pnpm-lock.yaml']);
84
+ // Also check node_modules to confirm it's an active project
85
+ const hasNodeModules = await profileUtils.fileExists(rootDir, 'node_modules');
86
+ // Consider it an npm project if it has package.json and either a lock file or node_modules
87
+ return hasPackageJson && (hasLockFile || hasNodeModules);
88
+ },
89
+ /**
90
+ * Initialize the profile with project-specific settings
91
+ */
92
+ async initialize(rootDir) {
93
+ // Detect and set appropriate extensions
94
+ this.extensions = await getProjectExtensions(rootDir);
95
+ // Detect and set lint command
96
+ this.lintCommand = await detectLintCommand(rootDir);
97
+ // Add project-specific ignore paths
98
+ const extraIgnorePaths = [];
99
+ // Check for Next.js
100
+ if (await profileUtils.fileExists(rootDir, '.next')) {
101
+ extraIgnorePaths.push('.next');
102
+ }
103
+ // Check for Gatsby
104
+ if (await profileUtils.fileExists(rootDir, '.cache')) {
105
+ extraIgnorePaths.push('.cache', 'public');
106
+ }
107
+ // Update ignore paths
108
+ this.ignorePaths = [...DEFAULT_IGNORE_PATHS.JS, ...extraIgnorePaths];
109
+ },
110
+ };
111
+ // Export utility functions for use in other profiles
112
+ export const npmUtils = {
113
+ readPackageJson,
114
+ detectLintCommand,
115
+ isTypeScriptProject,
116
+ getProjectExtensions,
117
+ };
118
+ //# sourceMappingURL=javascript-npm.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"javascript-npm.js","sour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;IACtB,eAAe;IACf,iBAAiB;IACjB,mBAAmB;IACnB,oBAAoB;CACrB,CAAC"}
@@ -0,0 +1,46 @@
1
+ /**
2
+ * React Project Profile
3
+ *
4
+ * This profile extends the base NPM profile with React-specific configurations
5
+ * and detection logic. It supports various React project types including:
6
+ * - Create React App
7
+ * - Next.js
8
+ * - Vite + React
9
+ * - Custom React setups
10
+ */
11
+ import { ProjectProfile } from '../types.js';
12
+ /**
13
+ * Different types of React projects we can detect
14
+ */
15
+ declare const REACT_PROJECT_TYPES: {
16
+ readonly CRA: "create-react-app";
17
+ readonly NEXT: "next.js";
18
+ readonly VITE: "vite";
19
+ readonly CUSTOM: "custom";
20
+ };
21
+ type ReactProjectType = (typeof REACT_PROJECT_TYPES)[keyof typeof REACT_PROJECT_TYPES];
22
+ /**
23
+ * Detect specific React project type
24
+ */
25
+ declare function detectReactProjectType(rootDir: string): Promise<{
26
+ type: ReactProjectType;
27
+ weight: number;
28
+ }>;
29
+ /**
30
+ * Get React-specific file extensions
31
+ */
32
+ declare function getReactExtensions(rootDir: string): Promise<string[]>;
33
+ /**
34
+ * Get React-specific ignore paths
35
+ */
36
+ declare function getReactIgnorePaths(projectType: ReactProjectType): Promise<string[]>;
37
+ /**
38
+ * React project profile
39
+ */
40
+ export declare const reactProfile: ProjectProfile;
41
+ export declare const reactUtils: {
42
+ detectReactProjectType: typeof detectReactProjectType;
43
+ getReactExtensions: typeof getReactExtensions;
44
+ getReactIgnorePaths: typeof getReactIgnorePaths;
45
+ };
46
+ export {};
@@ -0,0 +1,147 @@
1
+ /**
2
+ * React Project Profile
3
+ *
4
+ * This profile extends the base NPM profile with React-specific configurations
5
+ * and detection logic. It supports various React project types including:
6
+ * - Create React App
7
+ * - Next.js
8
+ * - Vite + React
9
+ * - Custom React setups
10
+ */
11
+ import path from 'path';
12
+ import { PROJECT_FILE_PATTERNS, DETECTION_WEIGHTS, DEFAULT_IGNORE_PATHS } from '../types.js';
13
+ import { profileUtils } from '../detection.js';
14
+ import { npmProfile, npmUtils } from './javascript-npm.js';
15
+ /**
16
+ * Different types of React projects we can detect
17
+ */
18
+ const REACT_PROJECT_TYPES = {
19
+ CRA: 'create-react-app',
20
+ NEXT: 'next.js',
21
+ VITE: 'vite',
22
+ CUSTOM: 'custom',
23
+ };
24
+ /**
25
+ * Configuration files specific to different React setups
26
+ */
27
+ const REACT_CONFIG_FILES = {
28
+ CRA: {
29
+ CONFIG: 'react-scripts.json',
30
+ TEMPLATE: 'template.json',
31
+ },
32
+ NEXT: {
33
+ CONFIG: 'next.config.js',
34
+ CONFIG_TS: 'next.config.ts',
35
+ },
36
+ VITE: {
37
+ CONFIG: 'vite.config.js',
38
+ CONFIG_TS: 'vite.config.ts',
39
+ },
40
+ };
41
+ /**
42
+ * Detect specific React project type
43
+ */
44
+ async function detectReactProjectType(rootDir) {
45
+ const packageJson = await npmUtils.readPackageJson(rootDir);
46
+ if (!packageJson) {
47
+ return { type: REACT_PROJECT_TYPES.CUSTOM, weight: 0 };
48
+ }
49
+ const allDeps = { ...packageJson.dependencies, ...packageJson.devDependencies };
50
+ // Check for Next.js
51
+ if ('next' in allDeps ||
52
+ (await profileUtils.anyFileExists(rootDir, [REACT_CONFIG_FILES.NEXT.CONFIG, REACT_CONFIG_FILES.NEXT.CONFIG_TS]))) {
53
+ return { type: REACT_PROJECT_TYPES.NEXT, weight: DETECTION_WEIGHTS.FRAMEWORK.NEXT };
54
+ }
55
+ // Check for Create React App
56
+ if ('react-scripts' in allDeps || (await profileUtils.fileExists(rootDir, REACT_CONFIG_FILES.CRA.CONFIG))) {
57
+ return { type: REACT_PROJECT_TYPES.CRA, weight: DETECTION_WEIGHTS.FRAMEWORK.REACT };
58
+ }
59
+ // Check for Vite
60
+ if ('vite' in allDeps ||
61
+ (await profileUtils.anyFileExists(rootDir, [REACT_CONFIG_FILES.VITE.CONFIG, REACT_CONFIG_FILES.VITE.CONFIG_TS]))) {
62
+ return { type: REACT_PROJECT_TYPES.VITE, weight: DETECTION_WEIGHTS.FRAMEWORK.REACT };
63
+ }
64
+ // Custom React setup
65
+ return { type: REACT_PROJECT_TYPES.CUSTOM, weight: DETECTION_WEIGHTS.FRAMEWORK.REACT };
66
+ }
67
+ /**
68
+ * Get React-specific file extensions
69
+ */
70
+ async function getReactExtensions(rootDir) {
71
+ const baseExtensions = await npmUtils.getProjectExtensions(rootDir);
72
+ const isTypeScript = await npmUtils.isTypeScriptProject(rootDir);
73
+ // Add React-specific extensions
74
+ const reactExtensions = isTypeScript ? ['.tsx', '.jsx'] : ['.jsx'];
75
+ // Add CSS/SCSS extensions commonly used in React projects
76
+ const styleExtensions = ['.css', '.scss', '.sass', '.less', '.module.css', '.module.scss'];
77
+ return [...new Set([...baseExtensions, ...reactExtensions, ...styleExtensions])];
78
+ }
79
+ /**
80
+ * Get React-specific ignore paths
81
+ */
82
+ async function getReactIgnorePaths(projectType) {
83
+ const baseIgnorePaths = [...DEFAULT_IGNORE_PATHS.JS];
84
+ switch (projectType) {
85
+ case REACT_PROJECT_TYPES.NEXT:
86
+ return [...baseIgnorePaths, '.next', '.vercel'];
87
+ case REACT_PROJECT_TYPES.CRA:
88
+ return [...baseIgnorePaths, 'build', 'coverage'];
89
+ case REACT_PROJECT_TYPES.VITE:
90
+ return [...baseIgnorePaths, 'dist', '.vite'];
91
+ default:
92
+ return baseIgnorePaths;
93
+ }
94
+ }
95
+ /**
96
+ * React project profile
97
+ */
98
+ export const reactProfile = {
99
+ id: 'javascript-react',
100
+ name: 'React',
101
+ extensions: [...npmProfile.extensions],
102
+ ignorePaths: [...npmProfile.ignorePaths],
103
+ detectionWeight: DETECTION_WEIGHTS.FRAMEWORK.REACT,
104
+ /**
105
+ * Detect if this is a React project
106
+ */
107
+ async detect(rootDir) {
108
+ // First check if it's an npm project
109
+ const isNpmProject = await npmProfile.detect(rootDir);
110
+ if (!isNpmProject)
111
+ return false;
112
+ const packageJson = await npmUtils.readPackageJson(rootDir);
113
+ if (!packageJson)
114
+ return false;
115
+ const allDeps = { ...packageJson.dependencies, ...packageJson.devDependencies };
116
+ // Check for React dependency
117
+ if (!('react' in allDeps))
118
+ return false;
119
+ // Check for React component files
120
+ const hasReactComponents = await profileUtils.anyFileExists(rootDir, [
121
+ ...PROJECT_FILE_PATTERNS.JS.REACT.map((file) => path.join('src', file)),
122
+ ...PROJECT_FILE_PATTERNS.JS.REACT,
123
+ ]);
124
+ return hasReactComponents;
125
+ },
126
+ /**
127
+ * Initialize React-specific configuration
128
+ */
129
+ async initialize(rootDir) {
130
+ // Detect React project type
131
+ const { type: projectType } = await detectReactProjectType(rootDir);
132
+ // Set React-specific extensions
133
+ this.extensions = await getReactExtensions(rootDir);
134
+ // Set React-specific ignore paths
135
+ this.ignorePaths = await getReactIgnorePaths(projectType);
136
+ // Try to get lint command from package.json
137
+ this.lintCommand = await npmUtils.detectLintCommand(rootDir);
138
+ console.log(`Initialized React profile (${projectType})`);
139
+ },
140
+ };
141
+ // Export utilities for other profiles that might extend React
142
+ export const reactUtils = {
143
+ detectReactProjectType,
144
+ getReactExtensions,
145
+ getReactIgnorePaths,
146
+ };
147
+ //# sourceMappingURL=javascript-react.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"javascript-react.js","sourceRoot":"","sources":["../../../src/project-profiles/profiles/javascript-react.ts"],"names":[],"mappings":"AAAA;;;;;;;;;GASG;AAEH,OAAO,IAAI,MAAM,MAAM,CAAC;AACxB,OAAO,EAAkB,qBAAqB,EAAE,iBAAiB,EAAE,oBAAoB,EAAE,MAAM,aAAa,CAAC;AAC7G,OAAO,EAAE,YAAY,EAAE,MAAM,iBAAiB,CAAC;AAC/C,OAAO,EAAE,UAAU,EAAE,QAAQ,EAAE,MAAM,qBAAqB,CAAC;AAE3D;;GAEG;AACH,MAAM,mBAAmB,GAAG;IAC1B,GAAG,EAAE,kBAAkB;IACvB,IAAI,EAAE,SAAS;IACf,IAAI,EAAE,MAAM;IACZ,MAAM,EAAE,QAAQ;CACR,CAAC;AAIX;;GAEG;AACH,MAAM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