aspectcode 0.2.2 → 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 (311) hide show
  1. package/dist/cli.d.ts +15 -47
  2. package/dist/cli.d.ts.map +1 -1
  3. package/dist/cli.js +18 -17
  4. package/dist/cli.js.map +1 -1
  5. package/dist/config.d.ts +14 -24
  6. package/dist/config.d.ts.map +1 -1
  7. package/dist/config.js +5 -60
  8. package/dist/config.js.map +1 -1
  9. package/dist/kbBuilder.d.ts +14 -0
  10. package/dist/kbBuilder.d.ts.map +1 -0
  11. package/dist/kbBuilder.js +106 -0
  12. package/dist/kbBuilder.js.map +1 -0
  13. package/dist/main.d.ts +4 -5
  14. package/dist/main.d.ts.map +1 -1
  15. package/dist/main.js +45 -124
  16. package/dist/main.js.map +1 -1
  17. package/dist/optimize.d.ts +14 -0
  18. package/dist/optimize.d.ts.map +1 -0
  19. package/dist/optimize.js +131 -0
  20. package/dist/optimize.js.map +1 -0
  21. package/dist/pipeline.d.ts +15 -0
  22. package/dist/pipeline.d.ts.map +1 -0
  23. package/dist/pipeline.js +212 -0
  24. package/dist/pipeline.js.map +1 -0
  25. package/dist/toolIngestion.d.ts +15 -0
  26. package/dist/toolIngestion.d.ts.map +1 -0
  27. package/dist/toolIngestion.js +47 -0
  28. package/dist/toolIngestion.js.map +1 -0
  29. package/dist/writer.d.ts +17 -0
  30. package/dist/writer.d.ts.map +1 -0
  31. package/dist/writer.js +26 -0
  32. package/dist/writer.js.map +1 -0
  33. package/node_modules/@aspectcode/core/dist/analysis/analyzer.d.ts +34 -0
  34. package/node_modules/@aspectcode/core/dist/analysis/analyzer.d.ts.map +1 -0
  35. package/node_modules/@aspectcode/core/dist/analysis/analyzer.js +240 -0
  36. package/node_modules/@aspectcode/core/dist/analysis/analyzer.js.map +1 -0
  37. package/node_modules/@aspectcode/core/dist/analysis/dependencyAdapters.d.ts +32 -0
  38. package/node_modules/@aspectcode/core/dist/analysis/dependencyAdapters.d.ts.map +1 -0
  39. package/node_modules/@aspectcode/core/dist/analysis/dependencyAdapters.js +133 -0
  40. package/node_modules/@aspectcode/core/dist/analysis/dependencyAdapters.js.map +1 -0
  41. package/node_modules/@aspectcode/core/dist/analysis/importParsers.d.ts +30 -0
  42. package/node_modules/@aspectcode/core/dist/analysis/importParsers.d.ts.map +1 -0
  43. package/node_modules/@aspectcode/core/dist/analysis/importParsers.js +92 -0
  44. package/node_modules/@aspectcode/core/dist/analysis/importParsers.js.map +1 -0
  45. package/node_modules/@aspectcode/core/dist/analysis/index.d.ts +9 -0
  46. package/node_modules/@aspectcode/core/dist/analysis/index.d.ts.map +1 -0
  47. package/node_modules/@aspectcode/core/dist/analysis/index.js +9 -0
  48. package/node_modules/@aspectcode/core/dist/analysis/index.js.map +1 -0
  49. package/node_modules/@aspectcode/core/dist/analysis/moduleResolver.d.ts +34 -0
  50. package/node_modules/@aspectcode/core/dist/analysis/moduleResolver.d.ts.map +1 -0
  51. package/node_modules/@aspectcode/core/dist/analysis/moduleResolver.js +240 -0
  52. package/node_modules/@aspectcode/core/dist/analysis/moduleResolver.js.map +1 -0
  53. package/node_modules/@aspectcode/core/dist/analysis/repo.d.ts +33 -0
  54. package/node_modules/@aspectcode/core/dist/analysis/repo.d.ts.map +1 -0
  55. package/node_modules/@aspectcode/core/dist/analysis/repo.js +246 -0
  56. package/node_modules/@aspectcode/core/dist/analysis/repo.js.map +1 -0
  57. package/node_modules/@aspectcode/core/dist/classifiers.d.ts +24 -0
  58. package/node_modules/@aspectcode/core/dist/classifiers.d.ts.map +1 -0
  59. package/node_modules/@aspectcode/core/dist/classifiers.js +119 -0
  60. package/node_modules/@aspectcode/core/dist/classifiers.js.map +1 -0
  61. package/node_modules/@aspectcode/core/dist/fs/exclusions.d.ts +26 -0
  62. package/node_modules/@aspectcode/core/dist/fs/exclusions.d.ts.map +1 -0
  63. package/node_modules/@aspectcode/core/dist/fs/exclusions.js +130 -0
  64. package/node_modules/@aspectcode/core/dist/fs/exclusions.js.map +1 -0
  65. package/node_modules/@aspectcode/core/dist/fs/fingerprint.d.ts +42 -0
  66. package/node_modules/@aspectcode/core/dist/fs/fingerprint.d.ts.map +1 -0
  67. package/node_modules/@aspectcode/core/dist/fs/fingerprint.js +125 -0
  68. package/node_modules/@aspectcode/core/dist/fs/fingerprint.js.map +1 -0
  69. package/node_modules/@aspectcode/core/dist/fs/index.d.ts +9 -0
  70. package/node_modules/@aspectcode/core/dist/fs/index.d.ts.map +1 -0
  71. package/node_modules/@aspectcode/core/dist/fs/index.js +26 -0
  72. package/node_modules/@aspectcode/core/dist/fs/index.js.map +1 -0
  73. package/node_modules/@aspectcode/core/dist/fs/walker.d.ts +23 -0
  74. package/node_modules/@aspectcode/core/dist/fs/walker.d.ts.map +1 -0
  75. package/node_modules/@aspectcode/core/dist/fs/walker.js +94 -0
  76. package/node_modules/@aspectcode/core/dist/fs/walker.js.map +1 -0
  77. package/node_modules/@aspectcode/core/dist/host.d.ts +38 -0
  78. package/node_modules/@aspectcode/core/dist/host.d.ts.map +1 -0
  79. package/node_modules/@aspectcode/core/dist/host.js +110 -0
  80. package/node_modules/@aspectcode/core/dist/host.js.map +1 -0
  81. package/node_modules/@aspectcode/core/dist/index.d.ts +23 -0
  82. package/node_modules/@aspectcode/core/dist/index.d.ts.map +1 -0
  83. package/node_modules/@aspectcode/core/dist/index.js +59 -0
  84. package/node_modules/@aspectcode/core/dist/index.js.map +1 -0
  85. package/node_modules/@aspectcode/core/dist/model.d.ts +90 -0
  86. package/node_modules/@aspectcode/core/dist/model.d.ts.map +1 -0
  87. package/node_modules/@aspectcode/core/dist/model.js +9 -0
  88. package/node_modules/@aspectcode/core/dist/model.js.map +1 -0
  89. package/node_modules/@aspectcode/core/dist/parsers/csharpExtractors.d.ts +17 -0
  90. package/node_modules/@aspectcode/core/dist/parsers/csharpExtractors.d.ts.map +1 -0
  91. package/node_modules/@aspectcode/core/dist/parsers/csharpExtractors.js +225 -0
  92. package/node_modules/@aspectcode/core/dist/parsers/csharpExtractors.js.map +1 -0
  93. package/node_modules/@aspectcode/core/dist/parsers/grammarLoader.d.ts +30 -0
  94. package/node_modules/@aspectcode/core/dist/parsers/grammarLoader.d.ts.map +1 -0
  95. package/node_modules/@aspectcode/core/dist/parsers/grammarLoader.js +71 -0
  96. package/node_modules/@aspectcode/core/dist/parsers/grammarLoader.js.map +1 -0
  97. package/node_modules/@aspectcode/core/dist/parsers/index.d.ts +13 -0
  98. package/node_modules/@aspectcode/core/dist/parsers/index.d.ts.map +1 -0
  99. package/node_modules/@aspectcode/core/dist/parsers/index.js +32 -0
  100. package/node_modules/@aspectcode/core/dist/parsers/index.js.map +1 -0
  101. package/node_modules/@aspectcode/core/dist/parsers/javaExtractors.d.ts +17 -0
  102. package/node_modules/@aspectcode/core/dist/parsers/javaExtractors.d.ts.map +1 -0
  103. package/node_modules/@aspectcode/core/dist/parsers/javaExtractors.js +182 -0
  104. package/node_modules/@aspectcode/core/dist/parsers/javaExtractors.js.map +1 -0
  105. package/node_modules/@aspectcode/core/dist/parsers/languages.d.ts +44 -0
  106. package/node_modules/@aspectcode/core/dist/parsers/languages.d.ts.map +1 -0
  107. package/node_modules/@aspectcode/core/dist/parsers/languages.js +64 -0
  108. package/node_modules/@aspectcode/core/dist/parsers/languages.js.map +1 -0
  109. package/node_modules/@aspectcode/core/dist/parsers/pythonExtractors.d.ts +18 -0
  110. package/node_modules/@aspectcode/core/dist/parsers/pythonExtractors.d.ts.map +1 -0
  111. package/node_modules/@aspectcode/core/dist/parsers/pythonExtractors.js +139 -0
  112. package/node_modules/@aspectcode/core/dist/parsers/pythonExtractors.js.map +1 -0
  113. package/node_modules/@aspectcode/core/dist/parsers/tsJsExtractors.d.ts +22 -0
  114. package/node_modules/@aspectcode/core/dist/parsers/tsJsExtractors.d.ts.map +1 -0
  115. package/node_modules/@aspectcode/core/dist/parsers/tsJsExtractors.js +240 -0
  116. package/node_modules/@aspectcode/core/dist/parsers/tsJsExtractors.js.map +1 -0
  117. package/node_modules/@aspectcode/core/dist/parsers/utils.d.ts +7 -0
  118. package/node_modules/@aspectcode/core/dist/parsers/utils.d.ts.map +1 -0
  119. package/node_modules/@aspectcode/core/dist/parsers/utils.js +11 -0
  120. package/node_modules/@aspectcode/core/dist/parsers/utils.js.map +1 -0
  121. package/node_modules/@aspectcode/core/dist/paths.d.ts +27 -0
  122. package/node_modules/@aspectcode/core/dist/paths.d.ts.map +1 -0
  123. package/node_modules/@aspectcode/core/dist/paths.js +45 -0
  124. package/node_modules/@aspectcode/core/dist/paths.js.map +1 -0
  125. package/node_modules/@aspectcode/core/dist/stats.d.ts +41 -0
  126. package/node_modules/@aspectcode/core/dist/stats.d.ts.map +1 -0
  127. package/node_modules/@aspectcode/core/dist/stats.js +88 -0
  128. package/node_modules/@aspectcode/core/dist/stats.js.map +1 -0
  129. package/node_modules/@aspectcode/core/package.json +41 -0
  130. package/node_modules/@aspectcode/core/parsers/c_sharp.wasm +0 -0
  131. package/node_modules/@aspectcode/core/parsers/java.wasm +0 -0
  132. package/node_modules/@aspectcode/core/parsers/javascript.wasm +0 -0
  133. package/node_modules/@aspectcode/core/parsers/python.wasm +0 -0
  134. package/node_modules/@aspectcode/core/parsers/tree-sitter.wasm +0 -0
  135. package/node_modules/@aspectcode/core/parsers/tsx.wasm +0 -0
  136. package/node_modules/@aspectcode/core/parsers/typescript.wasm +0 -0
  137. package/node_modules/@aspectcode/emitters/dist/emitter.d.ts +72 -0
  138. package/node_modules/@aspectcode/emitters/dist/emitter.d.ts.map +1 -0
  139. package/node_modules/@aspectcode/emitters/dist/emitter.js +10 -0
  140. package/node_modules/@aspectcode/emitters/dist/emitter.js.map +1 -0
  141. package/node_modules/@aspectcode/emitters/dist/host.d.ts +31 -0
  142. package/node_modules/@aspectcode/emitters/dist/host.d.ts.map +1 -0
  143. package/node_modules/@aspectcode/emitters/dist/host.js +86 -0
  144. package/node_modules/@aspectcode/emitters/dist/host.js.map +1 -0
  145. package/node_modules/@aspectcode/emitters/dist/index.d.ts +27 -0
  146. package/node_modules/@aspectcode/emitters/dist/index.d.ts.map +1 -0
  147. package/node_modules/@aspectcode/emitters/dist/index.js +116 -0
  148. package/node_modules/@aspectcode/emitters/dist/index.js.map +1 -0
  149. package/node_modules/@aspectcode/emitters/dist/instructions/content.d.ts +15 -0
  150. package/node_modules/@aspectcode/emitters/dist/instructions/content.d.ts.map +1 -0
  151. package/node_modules/@aspectcode/emitters/dist/instructions/content.js +289 -0
  152. package/node_modules/@aspectcode/emitters/dist/instructions/content.js.map +1 -0
  153. package/node_modules/@aspectcode/emitters/dist/instructions/detection.d.ts +13 -0
  154. package/node_modules/@aspectcode/emitters/dist/instructions/detection.d.ts.map +1 -0
  155. package/node_modules/@aspectcode/emitters/dist/instructions/detection.js +55 -0
  156. package/node_modules/@aspectcode/emitters/dist/instructions/detection.js.map +1 -0
  157. package/node_modules/@aspectcode/emitters/dist/instructions/formats.d.ts +17 -0
  158. package/node_modules/@aspectcode/emitters/dist/instructions/formats.d.ts.map +1 -0
  159. package/node_modules/@aspectcode/emitters/dist/instructions/formats.js +23 -0
  160. package/node_modules/@aspectcode/emitters/dist/instructions/formats.js.map +1 -0
  161. package/node_modules/@aspectcode/emitters/dist/instructions/index.d.ts +5 -0
  162. package/node_modules/@aspectcode/emitters/dist/instructions/index.d.ts.map +1 -0
  163. package/node_modules/@aspectcode/emitters/dist/instructions/index.js +12 -0
  164. package/node_modules/@aspectcode/emitters/dist/instructions/index.js.map +1 -0
  165. package/node_modules/@aspectcode/emitters/dist/instructions/instructionsEmitter.d.ts +9 -0
  166. package/node_modules/@aspectcode/emitters/dist/instructions/instructionsEmitter.d.ts.map +1 -0
  167. package/node_modules/@aspectcode/emitters/dist/instructions/instructionsEmitter.js +30 -0
  168. package/node_modules/@aspectcode/emitters/dist/instructions/instructionsEmitter.js.map +1 -0
  169. package/node_modules/@aspectcode/emitters/dist/kb/analyzers.d.ts +64 -0
  170. package/node_modules/@aspectcode/emitters/dist/kb/analyzers.d.ts.map +1 -0
  171. package/node_modules/@aspectcode/emitters/dist/kb/analyzers.js +504 -0
  172. package/node_modules/@aspectcode/emitters/dist/kb/analyzers.js.map +1 -0
  173. package/node_modules/@aspectcode/emitters/dist/kb/architectureEmitter.d.ts +24 -0
  174. package/node_modules/@aspectcode/emitters/dist/kb/architectureEmitter.d.ts.map +1 -0
  175. package/node_modules/@aspectcode/emitters/dist/kb/architectureEmitter.js +238 -0
  176. package/node_modules/@aspectcode/emitters/dist/kb/architectureEmitter.js.map +1 -0
  177. package/node_modules/@aspectcode/emitters/dist/kb/classifiers.d.ts +8 -0
  178. package/node_modules/@aspectcode/emitters/dist/kb/classifiers.d.ts.map +1 -0
  179. package/node_modules/@aspectcode/emitters/dist/kb/classifiers.js +14 -0
  180. package/node_modules/@aspectcode/emitters/dist/kb/classifiers.js.map +1 -0
  181. package/node_modules/@aspectcode/emitters/dist/kb/constants.d.ts +35 -0
  182. package/node_modules/@aspectcode/emitters/dist/kb/constants.d.ts.map +1 -0
  183. package/node_modules/@aspectcode/emitters/dist/kb/constants.js +38 -0
  184. package/node_modules/@aspectcode/emitters/dist/kb/constants.js.map +1 -0
  185. package/node_modules/@aspectcode/emitters/dist/kb/contextEmitter.d.ts +20 -0
  186. package/node_modules/@aspectcode/emitters/dist/kb/contextEmitter.d.ts.map +1 -0
  187. package/node_modules/@aspectcode/emitters/dist/kb/contextEmitter.js +155 -0
  188. package/node_modules/@aspectcode/emitters/dist/kb/contextEmitter.js.map +1 -0
  189. package/node_modules/@aspectcode/emitters/dist/kb/conventions.d.ts +52 -0
  190. package/node_modules/@aspectcode/emitters/dist/kb/conventions.d.ts.map +1 -0
  191. package/node_modules/@aspectcode/emitters/dist/kb/conventions.js +391 -0
  192. package/node_modules/@aspectcode/emitters/dist/kb/conventions.js.map +1 -0
  193. package/node_modules/@aspectcode/emitters/dist/kb/depData.d.ts +18 -0
  194. package/node_modules/@aspectcode/emitters/dist/kb/depData.d.ts.map +1 -0
  195. package/node_modules/@aspectcode/emitters/dist/kb/depData.js +31 -0
  196. package/node_modules/@aspectcode/emitters/dist/kb/depData.js.map +1 -0
  197. package/node_modules/@aspectcode/emitters/dist/kb/detectors.d.ts +18 -0
  198. package/node_modules/@aspectcode/emitters/dist/kb/detectors.d.ts.map +1 -0
  199. package/node_modules/@aspectcode/emitters/dist/kb/detectors.js +317 -0
  200. package/node_modules/@aspectcode/emitters/dist/kb/detectors.js.map +1 -0
  201. package/node_modules/@aspectcode/emitters/dist/kb/entryPoints.d.ts +33 -0
  202. package/node_modules/@aspectcode/emitters/dist/kb/entryPoints.d.ts.map +1 -0
  203. package/node_modules/@aspectcode/emitters/dist/kb/entryPoints.js +323 -0
  204. package/node_modules/@aspectcode/emitters/dist/kb/entryPoints.js.map +1 -0
  205. package/node_modules/@aspectcode/emitters/dist/kb/helpers.d.ts +27 -0
  206. package/node_modules/@aspectcode/emitters/dist/kb/helpers.d.ts.map +1 -0
  207. package/node_modules/@aspectcode/emitters/dist/kb/helpers.js +63 -0
  208. package/node_modules/@aspectcode/emitters/dist/kb/helpers.js.map +1 -0
  209. package/node_modules/@aspectcode/emitters/dist/kb/index.d.ts +27 -0
  210. package/node_modules/@aspectcode/emitters/dist/kb/index.d.ts.map +1 -0
  211. package/node_modules/@aspectcode/emitters/dist/kb/index.js +72 -0
  212. package/node_modules/@aspectcode/emitters/dist/kb/index.js.map +1 -0
  213. package/node_modules/@aspectcode/emitters/dist/kb/kbEmitter.d.ts +21 -0
  214. package/node_modules/@aspectcode/emitters/dist/kb/kbEmitter.d.ts.map +1 -0
  215. package/node_modules/@aspectcode/emitters/dist/kb/kbEmitter.js +125 -0
  216. package/node_modules/@aspectcode/emitters/dist/kb/kbEmitter.js.map +1 -0
  217. package/node_modules/@aspectcode/emitters/dist/kb/mapEmitter.d.ts +26 -0
  218. package/node_modules/@aspectcode/emitters/dist/kb/mapEmitter.d.ts.map +1 -0
  219. package/node_modules/@aspectcode/emitters/dist/kb/mapEmitter.js +255 -0
  220. package/node_modules/@aspectcode/emitters/dist/kb/mapEmitter.js.map +1 -0
  221. package/node_modules/@aspectcode/emitters/dist/kb/policy.d.ts +12 -0
  222. package/node_modules/@aspectcode/emitters/dist/kb/policy.d.ts.map +1 -0
  223. package/node_modules/@aspectcode/emitters/dist/kb/policy.js +29 -0
  224. package/node_modules/@aspectcode/emitters/dist/kb/policy.js.map +1 -0
  225. package/node_modules/@aspectcode/emitters/dist/kb/symbols.d.ts +43 -0
  226. package/node_modules/@aspectcode/emitters/dist/kb/symbols.d.ts.map +1 -0
  227. package/node_modules/@aspectcode/emitters/dist/kb/symbols.js +343 -0
  228. package/node_modules/@aspectcode/emitters/dist/kb/symbols.js.map +1 -0
  229. package/node_modules/@aspectcode/emitters/dist/manifest.d.ts +37 -0
  230. package/node_modules/@aspectcode/emitters/dist/manifest.d.ts.map +1 -0
  231. package/node_modules/@aspectcode/emitters/dist/manifest.js +50 -0
  232. package/node_modules/@aspectcode/emitters/dist/manifest.js.map +1 -0
  233. package/node_modules/@aspectcode/emitters/dist/report.d.ts +22 -0
  234. package/node_modules/@aspectcode/emitters/dist/report.d.ts.map +1 -0
  235. package/node_modules/@aspectcode/emitters/dist/report.js +3 -0
  236. package/node_modules/@aspectcode/emitters/dist/report.js.map +1 -0
  237. package/node_modules/@aspectcode/emitters/dist/stableJson.d.ts +14 -0
  238. package/node_modules/@aspectcode/emitters/dist/stableJson.d.ts.map +1 -0
  239. package/node_modules/@aspectcode/emitters/dist/stableJson.js +40 -0
  240. package/node_modules/@aspectcode/emitters/dist/stableJson.js.map +1 -0
  241. package/node_modules/@aspectcode/emitters/dist/transaction.d.ts +29 -0
  242. package/node_modules/@aspectcode/emitters/dist/transaction.d.ts.map +1 -0
  243. package/node_modules/@aspectcode/emitters/dist/transaction.js +104 -0
  244. package/node_modules/@aspectcode/emitters/dist/transaction.js.map +1 -0
  245. package/node_modules/@aspectcode/emitters/package.json +39 -0
  246. package/node_modules/@aspectcode/optimizer/dist/agent.d.ts +18 -0
  247. package/node_modules/@aspectcode/optimizer/dist/agent.d.ts.map +1 -0
  248. package/node_modules/@aspectcode/optimizer/dist/agent.js +123 -0
  249. package/node_modules/@aspectcode/optimizer/dist/agent.js.map +1 -0
  250. package/node_modules/@aspectcode/optimizer/dist/index.d.ts +15 -0
  251. package/node_modules/@aspectcode/optimizer/dist/index.d.ts.map +1 -0
  252. package/node_modules/@aspectcode/optimizer/dist/index.js +31 -0
  253. package/node_modules/@aspectcode/optimizer/dist/index.js.map +1 -0
  254. package/node_modules/@aspectcode/optimizer/dist/prompts.d.ts +39 -0
  255. package/node_modules/@aspectcode/optimizer/dist/prompts.d.ts.map +1 -0
  256. package/node_modules/@aspectcode/optimizer/dist/prompts.js +156 -0
  257. package/node_modules/@aspectcode/optimizer/dist/prompts.js.map +1 -0
  258. package/node_modules/@aspectcode/optimizer/dist/providers/anthropic.d.ts +20 -0
  259. package/node_modules/@aspectcode/optimizer/dist/providers/anthropic.d.ts.map +1 -0
  260. package/node_modules/@aspectcode/optimizer/dist/providers/anthropic.js +126 -0
  261. package/node_modules/@aspectcode/optimizer/dist/providers/anthropic.js.map +1 -0
  262. package/node_modules/@aspectcode/optimizer/dist/providers/index.d.ts +28 -0
  263. package/node_modules/@aspectcode/optimizer/dist/providers/index.d.ts.map +1 -0
  264. package/node_modules/@aspectcode/optimizer/dist/providers/index.js +142 -0
  265. package/node_modules/@aspectcode/optimizer/dist/providers/index.js.map +1 -0
  266. package/node_modules/@aspectcode/optimizer/dist/providers/openai.d.ts +19 -0
  267. package/node_modules/@aspectcode/optimizer/dist/providers/openai.d.ts.map +1 -0
  268. package/node_modules/@aspectcode/optimizer/dist/providers/openai.js +98 -0
  269. package/node_modules/@aspectcode/optimizer/dist/providers/openai.js.map +1 -0
  270. package/node_modules/@aspectcode/optimizer/dist/providers/retry.d.ts +19 -0
  271. package/node_modules/@aspectcode/optimizer/dist/providers/retry.d.ts.map +1 -0
  272. package/node_modules/@aspectcode/optimizer/dist/providers/retry.js +87 -0
  273. package/node_modules/@aspectcode/optimizer/dist/providers/retry.js.map +1 -0
  274. package/node_modules/@aspectcode/optimizer/dist/types.d.ts +93 -0
  275. package/node_modules/@aspectcode/optimizer/dist/types.d.ts.map +1 -0
  276. package/node_modules/@aspectcode/optimizer/dist/types.js +20 -0
  277. package/node_modules/@aspectcode/optimizer/dist/types.js.map +1 -0
  278. package/node_modules/@aspectcode/optimizer/package.json +41 -0
  279. package/node_modules/dotenv/CHANGELOG.md +520 -0
  280. package/node_modules/dotenv/LICENSE +23 -0
  281. package/node_modules/dotenv/README-es.md +411 -0
  282. package/node_modules/dotenv/README.md +645 -0
  283. package/node_modules/dotenv/SECURITY.md +1 -0
  284. package/node_modules/dotenv/config.d.ts +1 -0
  285. package/node_modules/dotenv/config.js +9 -0
  286. package/node_modules/dotenv/lib/cli-options.js +17 -0
  287. package/node_modules/dotenv/lib/env-options.js +28 -0
  288. package/node_modules/dotenv/lib/main.d.ts +162 -0
  289. package/node_modules/dotenv/lib/main.js +386 -0
  290. package/node_modules/dotenv/package.json +62 -0
  291. package/package.json +16 -4
  292. package/dist/commands/deps.d.ts +0 -11
  293. package/dist/commands/deps.d.ts.map +0 -1
  294. package/dist/commands/deps.js +0 -197
  295. package/dist/commands/deps.js.map +0 -1
  296. package/dist/commands/generate.d.ts +0 -8
  297. package/dist/commands/generate.d.ts.map +0 -1
  298. package/dist/commands/generate.js +0 -162
  299. package/dist/commands/generate.js.map +0 -1
  300. package/dist/commands/settings.d.ts +0 -9
  301. package/dist/commands/settings.d.ts.map +0 -1
  302. package/dist/commands/settings.js +0 -165
  303. package/dist/commands/settings.js.map +0 -1
  304. package/dist/commands/watch.d.ts +0 -6
  305. package/dist/commands/watch.d.ts.map +0 -1
  306. package/dist/commands/watch.js +0 -180
  307. package/dist/commands/watch.js.map +0 -1
  308. package/dist/connections.d.ts +0 -24
  309. package/dist/connections.d.ts.map +0 -1
  310. package/dist/connections.js +0 -89
  311. package/dist/connections.js.map +0 -1
@@ -1,197 +0,0 @@
1
- "use strict";
2
- /**
3
- * `aspectcode deps` — dependency analysis commands.
4
- *
5
- * Subcommands:
6
- * deps list — list raw dependency connections
7
- * deps impact — compute impact summary for a single file
8
- */
9
- var __createBinding = (this && this.__createBinding) || (Object.create ? (function(o, m, k, k2) {
10
- if (k2 === undefined) k2 = k;
11
- var desc = Object.getOwnPropertyDescriptor(m, k);
12
- if (!desc || ("get" in desc ? !m.__esModule : desc.writable || desc.configurable)) {
13
- desc = { enumerable: true, get: function() { return m[k]; } };
14
- }
15
- Object.defineProperty(o, k2, desc);
16
- }) : (function(o, m, k, k2) {
17
- if (k2 === undefined) k2 = k;
18
- o[k2] = m[k];
19
- }));
20
- var __setModuleDefault = (this && this.__setModuleDefault) || (Object.create ? (function(o, v) {
21
- Object.defineProperty(o, "default", { enumerable: true, value: v });
22
- }) : function(o, v) {
23
- o["default"] = v;
24
- });
25
- var __importStar = (this && this.__importStar) || (function () {
26
- var ownKeys = function(o) {
27
- ownKeys = Object.getOwnPropertyNames || function (o) {
28
- var ar = [];
29
- for (var k in o) if (Object.prototype.hasOwnProperty.call(o, k)) ar[ar.length] = k;
30
- return ar;
31
- };
32
- return ownKeys(o);
33
- };
34
- return function (mod) {
35
- if (mod && mod.__esModule) return mod;
36
- var result = {};
37
- if (mod != null) for (var k = ownKeys(mod), i = 0; i < k.length; i++) if (k[i] !== "default") __createBinding(result, mod, k[i]);
38
- __setModuleDefault(result, mod);
39
- return result;
40
- };
41
- })();
42
- Object.defineProperty(exports, "__esModule", { value: true });
43
- exports.runDepsList = runDepsList;
44
- exports.runDepsImpact = runDepsImpact;
45
- const fs = __importStar(require("fs"));
46
- const path = __importStar(require("path"));
47
- const core_1 = require("@aspectcode/core");
48
- const cli_1 = require("../cli");
49
- const logger_1 = require("../logger");
50
- const connections_1 = require("../connections");
51
- const workspace_1 = require("../workspace");
52
- // ── deps list ────────────────────────────────────────────────
53
- async function runDepsList(ctx) {
54
- const { root, flags, config, log } = ctx;
55
- const allConnections = await (0, connections_1.collectConnections)(root, config, log);
56
- const filtered = (0, connections_1.filterConnectionsByFile)(allConnections, root, flags.file);
57
- const connections = filtered.connections;
58
- if (filtered.error) {
59
- log.error(filtered.error);
60
- return { exitCode: cli_1.ExitCode.USAGE };
61
- }
62
- if (filtered.fileFilter && connections.length === 0) {
63
- log.info(`No dependency connections found for ${logger_1.fmt.cyan(filtered.fileFilter)}.`);
64
- return { exitCode: cli_1.ExitCode.OK };
65
- }
66
- if (filtered.fileFilter) {
67
- log.info(`Filtering by file: ${logger_1.fmt.cyan(filtered.fileFilter)}`);
68
- }
69
- if (connections.length === 0) {
70
- log.info('No dependency connections found.');
71
- return { exitCode: cli_1.ExitCode.OK };
72
- }
73
- log.info(logger_1.fmt.bold('Dependency connections:'));
74
- for (const row of connections) {
75
- const symbols = row.symbols.length > 0 ? ` [${row.symbols.join(', ')}]` : '';
76
- const lineInfo = row.lines.length > 0 ? ` @${row.lines.join(',')}` : '';
77
- const bidi = row.bidirectional ? ' <->' : '';
78
- log.info(`${logger_1.fmt.cyan(row.source)} -> ${logger_1.fmt.cyan(row.target)} ` +
79
- `(${row.type})${bidi}${symbols}${lineInfo}`);
80
- }
81
- log.blank();
82
- log.info(`${connections.length} connections listed`);
83
- return { exitCode: cli_1.ExitCode.OK };
84
- }
85
- async function runDepsImpact(ctx) {
86
- const { root, flags, config, log } = ctx;
87
- const targetFile = flags.file;
88
- if (!targetFile) {
89
- log.error(`${logger_1.fmt.bold('--file')} is required for the impact command.`);
90
- return { exitCode: cli_1.ExitCode.USAGE };
91
- }
92
- const absoluteTarget = path.resolve(root, targetFile);
93
- // Verify the target file exists.
94
- if (!fs.existsSync(absoluteTarget)) {
95
- log.error(`File not found: ${logger_1.fmt.cyan(absoluteTarget)}`);
96
- return { exitCode: cli_1.ExitCode.ERROR };
97
- }
98
- // Discover and read files using shared helper.
99
- const workspace = await (0, workspace_1.loadWorkspaceFiles)(root, config, log, { quiet: flags.quiet });
100
- if (workspace.discoveredPaths.length === 0) {
101
- return { exitCode: cli_1.ExitCode.ERROR };
102
- }
103
- // Analyze dependencies.
104
- const analyzer = new core_1.DependencyAnalyzer();
105
- analyzer.setFileContentsCache(workspace.absoluteFiles);
106
- const links = await analyzer.analyzeDependencies(workspace.discoveredPaths, workspace.host);
107
- // Compute degree stats.
108
- const stats = new Map();
109
- for (const file of workspace.discoveredPaths) {
110
- stats.set(file, { inDegree: 0, outDegree: 0 });
111
- }
112
- for (const link of links) {
113
- const src = stats.get(link.source);
114
- const tgt = stats.get(link.target);
115
- if (src)
116
- src.outDegree++;
117
- if (tgt)
118
- tgt.inDegree++;
119
- }
120
- // Compute impact summary.
121
- const normalizedTarget = path.resolve(absoluteTarget);
122
- const targetClass = (0, core_1.classifyFile)(normalizedTarget, root);
123
- if (targetClass === 'third_party') {
124
- const summary = {
125
- file: rel(normalizedTarget, root),
126
- dependents_count: 0,
127
- top_dependents: [],
128
- generated_at: new Date().toISOString(),
129
- };
130
- return outputSummary(summary, flags, log);
131
- }
132
- const dependentAbs = dedupe(links
133
- .filter((l) => l.target && path.resolve(l.target) === normalizedTarget)
134
- .map((l) => l.source)
135
- .filter(Boolean)
136
- .filter((s) => s !== normalizedTarget)
137
- .filter((s) => (0, core_1.classifyFile)(s, root) !== 'third_party'));
138
- const appOrTestDependents = dependentAbs.filter((s) => {
139
- const c = (0, core_1.classifyFile)(s, root);
140
- return c === 'app' || c === 'test';
141
- });
142
- const dependentsToUse = appOrTestDependents.length > 0 ? appOrTestDependents : dependentAbs;
143
- const dependentsWithCounts = dependentsToUse
144
- .map((dep) => ({
145
- abs: dep,
146
- dependent_count: stats.get(dep)?.inDegree ?? 0,
147
- }))
148
- .sort((a, b) => b.dependent_count - a.dependent_count || a.abs.localeCompare(b.abs));
149
- const dependentsCount = dependentsWithCounts.length;
150
- const topDependents = dependentsWithCounts.slice(0, 5).map((d) => ({
151
- file: rel(d.abs, root),
152
- dependent_count: d.dependent_count,
153
- }));
154
- const summary = {
155
- file: rel(normalizedTarget, root),
156
- dependents_count: dependentsCount,
157
- top_dependents: topDependents,
158
- generated_at: new Date().toISOString(),
159
- };
160
- return outputSummary(summary, flags, log);
161
- }
162
- // ── Shared helpers ───────────────────────────────────────────
163
- function outputSummary(summary, flags, log) {
164
- if (flags.json) {
165
- console.log(JSON.stringify(summary, null, 2));
166
- }
167
- else {
168
- log.info(`File: ${logger_1.fmt.cyan(summary.file)}`);
169
- log.info(`Dependents: ${logger_1.fmt.bold(String(summary.dependents_count))}`);
170
- if (summary.top_dependents.length > 0) {
171
- log.info('Top dependents:');
172
- for (const dep of summary.top_dependents) {
173
- log.info(` - ${dep.file} (${dep.dependent_count} dependents)`);
174
- }
175
- }
176
- }
177
- return { exitCode: cli_1.ExitCode.OK };
178
- }
179
- function rel(absPath, workspaceRoot) {
180
- const normalized = absPath.replace(/\\/g, '/');
181
- const normalizedRoot = workspaceRoot.replace(/\\/g, '/').replace(/\/$/, '');
182
- if (normalized.startsWith(normalizedRoot)) {
183
- return normalized.substring(normalizedRoot.length).replace(/^\//, '');
184
- }
185
- return path.basename(absPath);
186
- }
187
- function dedupe(items) {
188
- const seen = new Set();
189
- return items.filter((item) => {
190
- const key = String(item);
191
- if (seen.has(key))
192
- return false;
193
- seen.add(key);
194
- return true;
195
- });
196
- }
197
- //# sourceMappingURL=deps.js.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"deps.js","sourceRoot":"","sources":["../../src/commands/deps.ts"],"names":[],"mappings":";AAAA;;;;;;GAMG;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;AAoBH,kCAuCC;AAWD,sCA0FC;AA9JD,uCAAyB;AACzB,2CAA6B;AAC7B,2CAG0B;AAE1B,gCAAkC;AAElC,sCAAgC;AAChC,gDAGwB;AACxB,4CAAkD;AAElD,gEAAgE;AAEzD,KAAK,UAAU,WAAW,CAAC,GAAmB;IACnD,MAAM,EAAE,IAAI,EAAE,KAAK,EAAE,MAAM,EAAE,GAAG,EAAE,GAAG,GAAG,CAAC;IACzC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AAO,IAAI,CAAC,QAAQ,CAAC,OAAO,CAAC,CAAC;AAChC,CAAC;AAED,SAAS,MAAM,CAAI,KAAU;IAC3B,MAAM,IAAI,GAAG,IAAI,GAAG,EAAU,CAAC;IAC/B,OAAO,KAAK,CAAC,MAAM,CAAC,CAAC,IAAI,EAAE,EAAE;QAC3B,MAAM,GAAG,GAAG,MAAM,CAAC,IAAI,CAAC,CAAC;QACzB,IAAI,IAAI,CAAC,GAAG,CAAC,GAAG,CAAC;YAAE,OAAO,KAAK,CAAC;QAChC,IAAI,CAAC,GAAG,CAAC,GAAG,CAAC,CAAC;QACd,OAAO,IAAI,CAAC;IACd,CAAC,CAAC,CAAC;AACL,CAAC"}
@@ -1,8 +0,0 @@
1
- /**
2
- * `aspectcode generate` — discover, analyze, and emit artifacts.
3
- *
4
- * Pipeline: discoverFiles → readAll → analyzeRepoWithDependencies → runEmitters → report
5
- */
6
- import type { CommandContext, CommandResult } from '../cli';
7
- export declare function runGenerate(ctx: CommandContext): Promise<CommandResult>;
8
- //# sourceMappingURL=generate.d.ts.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"generate.d.ts","sourceRoot":"","sources":["../../src/commands/generate.ts"],"names":[],"mappings":"AAAA;;;;GAIG;AAWH,OAAO,KAAK,EAAE,cAAc,EAAE,aAAa,EAAE,MAAM,QAAQ,CAAC;AAM5D,wBAAsB,WAAW,CAAC,GAAG,EAAE,cAAc,GAAG,OAAO,CAAC,aAAa,CAAC,CAsI7E"}
@@ -1,162 +0,0 @@
1
- "use strict";
2
- /**
3
- * `aspectcode generate` — discover, analyze, and emit artifacts.
4
- *
5
- * Pipeline: discoverFiles → readAll → analyzeRepoWithDependencies → runEmitters → report
6
- */
7
- var __createBinding = (this && this.__createBinding) || (Object.create ? (function(o, m, k, k2) {
8
- if (k2 === undefined) k2 = k;
9
- var desc = Object.getOwnPropertyDescriptor(m, k);
10
- if (!desc || ("get" in desc ? !m.__esModule : desc.writable || desc.configurable)) {
11
- desc = { enumerable: true, get: function() { return m[k]; } };
12
- }
13
- Object.defineProperty(o, k2, desc);
14
- }) : (function(o, m, k, k2) {
15
- if (k2 === undefined) k2 = k;
16
- o[k2] = m[k];
17
- }));
18
- var __setModuleDefault = (this && this.__setModuleDefault) || (Object.create ? (function(o, v) {
19
- Object.defineProperty(o, "default", { enumerable: true, value: v });
20
- }) : function(o, v) {
21
- o["default"] = v;
22
- });
23
- var __importStar = (this && this.__importStar) || (function () {
24
- var ownKeys = function(o) {
25
- ownKeys = Object.getOwnPropertyNames || function (o) {
26
- var ar = [];
27
- for (var k in o) if (Object.prototype.hasOwnProperty.call(o, k)) ar[ar.length] = k;
28
- return ar;
29
- };
30
- return ownKeys(o);
31
- };
32
- return function (mod) {
33
- if (mod && mod.__esModule) return mod;
34
- var result = {};
35
- if (mod != null) for (var k = ownKeys(mod), i = 0; i < k.length; i++) if (k[i] !== "default") __createBinding(result, mod, k[i]);
36
- __setModuleDefault(result, mod);
37
- return result;
38
- };
39
- })();
40
- Object.defineProperty(exports, "__esModule", { value: true });
41
- exports.runGenerate = runGenerate;
42
- const path = __importStar(require("path"));
43
- const core_1 = require("@aspectcode/core");
44
- const emitters_1 = require("@aspectcode/emitters");
45
- const cli_1 = require("../cli");
46
- const logger_1 = require("../logger");
47
- const workspace_1 = require("../workspace");
48
- const connections_1 = require("../connections");
49
- async function runGenerate(ctx) {
50
- const { root, flags, config, log } = ctx;
51
- const startMs = Date.now();
52
- // ── 1. Resolve options ────────────────────────────────────
53
- const resolvedOut = flags.out ? path.resolve(root, flags.out) : root;
54
- if (!flags.json) {
55
- log.info(`Workspace: ${logger_1.fmt.cyan(root)}`);
56
- if (flags.out)
57
- log.info(`Output: ${logger_1.fmt.cyan(resolvedOut)}`);
58
- log.blank();
59
- }
60
- // ── 2. Discover & read files ───────────────────────────────
61
- const workspace = await (0, workspace_1.loadWorkspaceFiles)(root, config, log, { quiet: flags.quiet });
62
- if (workspace.discoveredPaths.length === 0) {
63
- log.warn('Check your exclude patterns.');
64
- return { exitCode: cli_1.ExitCode.ERROR };
65
- }
66
- const { relativeFiles: fileContents, absoluteFiles: absoluteFileContents } = workspace;
67
- // ── 3. Analyze ────────────────────────────────────────────
68
- const spinAnalyze = (0, logger_1.createSpinner)('Analyzing…', { quiet: flags.quiet });
69
- const model = await (0, core_1.analyzeRepoWithDependencies)(root, fileContents, absoluteFileContents, workspace.host);
70
- spinAnalyze.stop(`Analyzed ${model.files.length} files, ${model.graph.edges.length} edges`);
71
- // ── 4. Resolve instruction target ─────────────────────────
72
- const host = (0, emitters_1.createNodeEmitterHost)();
73
- const instructionsMode = flags.kbOnly
74
- ? 'off'
75
- : (flags.instructionsMode ?? 'safe');
76
- // KB generation: explicit --kb flag, --kb-only, or config setting
77
- const generateKb = flags.kb || flags.kbOnly || config?.generateKb || false;
78
- if (!flags.kbOnly && !flags.json) {
79
- log.info(`Instructions: ${logger_1.fmt.cyan('AGENTS.md')}`);
80
- }
81
- // ── 5. Emit artifacts ─────────────────────────────────────
82
- const spinEmit = (0, logger_1.createSpinner)('Writing artifacts…', { quiet: flags.quiet });
83
- const emitOpts = {
84
- workspaceRoot: root,
85
- outDir: resolvedOut,
86
- instructionsMode,
87
- generateKb,
88
- fileContents,
89
- };
90
- const report = await (0, emitters_1.runEmitters)(model, host, emitOpts);
91
- spinEmit.stop(`Wrote ${report.wrote.length} files`);
92
- let connections;
93
- if (flags.listConnections || flags.json) {
94
- const spinDeps = (0, logger_1.createSpinner)('Computing dependencies…', { quiet: flags.quiet });
95
- const allConnections = await (0, connections_1.collectConnections)(root, config, log);
96
- const filtered = (0, connections_1.filterConnectionsByFile)(allConnections, root, flags.file);
97
- if (filtered.error) {
98
- spinDeps.fail('Dependency error');
99
- log.error(filtered.error);
100
- return { exitCode: cli_1.ExitCode.USAGE };
101
- }
102
- connections = filtered.connections;
103
- spinDeps.stop(`Found ${connections.length} connections`);
104
- if (filtered.fileFilter && !flags.json) {
105
- log.info(`Filtered by: ${logger_1.fmt.cyan(filtered.fileFilter)}`);
106
- }
107
- }
108
- // ── 6. Report ─────────────────────────────────────────────
109
- const elapsedMs = Date.now() - startMs;
110
- if (flags.json) {
111
- const payload = {
112
- schemaVersion: report.schemaVersion,
113
- wrote: report.wrote.map((w) => ({
114
- path: path.relative(root, w.path).replace(/\\/g, '/'),
115
- bytes: w.bytes,
116
- })),
117
- skipped: report.skipped,
118
- stats: report.stats,
119
- connections,
120
- };
121
- console.log(JSON.stringify(payload, null, 2));
122
- }
123
- else {
124
- log.blank();
125
- for (const w of report.wrote) {
126
- const rel = path.relative(root, w.path).replace(/\\/g, '/');
127
- log.success(`${rel} (${formatBytes(w.bytes)})`);
128
- }
129
- }
130
- if (report.skipped) {
131
- for (const s of report.skipped) {
132
- log.debug(` skipped: ${s.id} — ${s.reason}`);
133
- }
134
- }
135
- if (flags.listConnections && !flags.json) {
136
- log.blank();
137
- log.info(logger_1.fmt.bold('Dependency connections:'));
138
- for (const row of connections ?? []) {
139
- const symbols = row.symbols.length > 0 ? ` [${row.symbols.join(', ')}]` : '';
140
- const lineInfo = row.lines.length > 0 ? ` @${row.lines.join(',')}` : '';
141
- const bidi = row.bidirectional ? ' <->' : '';
142
- log.info(`${logger_1.fmt.cyan(row.source)} -> ${logger_1.fmt.cyan(row.target)} ` +
143
- `(${row.type})${bidi}${symbols}${lineInfo}`);
144
- }
145
- }
146
- if (!flags.json) {
147
- log.blank();
148
- log.info(logger_1.fmt.dim(`Done in ${(elapsedMs / 1000).toFixed(1)}s — `) +
149
- `${report.wrote.length} files written`);
150
- }
151
- return { exitCode: cli_1.ExitCode.OK, report };
152
- }
153
- function formatBytes(bytes) {
154
- if (bytes < 1024)
155
- return `${bytes} B`;
156
- const kb = bytes / 1024;
157
- if (kb < 1024)
158
- return `${kb.toFixed(1)} KB`;
159
- const mb = kb / 1024;
160
- return `${mb.toFixed(1)} MB`;
161
- }
162
- //# sourceMappingURL=generate.js.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"generate.js","sourceRoot":"","sources":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AAC,KAAa;IAChC,IAAI,KAAK,GAAG,IAAI;QAAE,OAAO,GAAG,KAAK,IAAI,CAAC;IACtC,MAAM,EAAE,GAAG,KAAK,GAAG,IAAI,CAAC;IACxB,IAAI,EAAE,GAAG,IAAI;QAAE,OAAO,GAAG,EAAE,CAAC,OAAO,CAAC,CAAC,CAAC,KAAK,CAAC;IAC5C,MAAM,EAAE,GAAG,EAAE,GAAG,IAAI,CAAC;IACrB,OAAO,GAAG,EAAE,CAAC,OAAO,CAAC,CAAC,CAAC,KAAK,CAAC;AAC/B,CAAC"}
@@ -1,9 +0,0 @@
1
- /**
2
- * `aspectcode` settings commands.
3
- */
4
- import type { CommandContext, CommandResult } from '../cli';
5
- export declare function runShowConfig(ctx: CommandContext): Promise<CommandResult>;
6
- export declare function runSetUpdateRate(ctx: CommandContext, value: string): Promise<CommandResult>;
7
- export declare function runAddExclude(ctx: CommandContext, value: string): Promise<CommandResult>;
8
- export declare function runRemoveExclude(ctx: CommandContext, value: string): Promise<CommandResult>;
9
- //# sourceMappingURL=settings.d.ts.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"settings.d.ts","sourceRoot":"","sources":["../../src/commands/settings.ts"],"names":[],"mappings":"AAAA;;GAEG;AAEH,OAAO,KAAK,EAAY,cAAc,EAAE,aAAa,EAAE,MAAM,QAAQ,CAAC;AAqBtE,wBAAsB,aAAa,CACjC,GAAG,EAAE,cAAc,GAClB,OAAO,CAAC,aAAa,CAAC,CAsBxB;AAED,wBAAsB,gBAAgB,CACpC,GAAG,EAAE,cAAc,EACnB,KAAK,EAAE,MAAM,GACZ,OAAO,CAAC,aAAa,CAAC,CAexB;AAED,wBAAsB,aAAa,CACjC,GAAG,EAAE,cAAc,EACnB,KAAK,EAAE,MAAM,GACZ,OAAO,CAAC,aAAa,CAAC,CAaxB;AAED,wBAAsB,gBAAgB,CACpC,GAAG,EAAE,cAAc,EACnB,KAAK,EAAE,MAAM,GACZ,OAAO,CAAC,aAAa,CAAC,CAcxB"}
@@ -1,165 +0,0 @@
1
- "use strict";
2
- /**
3
- * `aspectcode` settings commands.
4
- */
5
- Object.defineProperty(exports, "__esModule", { value: true });
6
- exports.runShowConfig = runShowConfig;
7
- exports.runSetUpdateRate = runSetUpdateRate;
8
- exports.runAddExclude = runAddExclude;
9
- exports.runRemoveExclude = runRemoveExclude;
10
- const cli_1 = require("../cli");
11
- const config_1 = require("../config");
12
- const logger_1 = require("../logger");
13
- async function runShowConfig(ctx) {
14
- const { root, flags, log } = ctx;
15
- const command = 'show-config';
16
- try {
17
- const current = (0, config_1.loadRawConfig)(root) ?? {};
18
- const displayConfig = withCanonicalUpdateRate(current);
19
- if (flags.json) {
20
- emitJson({
21
- ok: true,
22
- command,
23
- config: displayConfig,
24
- });
25
- }
26
- else {
27
- log.info(JSON.stringify(displayConfig, null, 2));
28
- }
29
- return { exitCode: cli_1.ExitCode.OK };
30
- }
31
- catch (error) {
32
- return outputError(command, flags, log, error);
33
- }
34
- }
35
- async function runSetUpdateRate(ctx, value) {
36
- const parsed = parseUpdateRate(value);
37
- if (!parsed) {
38
- return outputUsageError('set-update-rate', ctx.flags, ctx.log, `Invalid update rate: ${logger_1.fmt.bold(value)}. Expected manual|onChange|idle.`);
39
- }
40
- return runSettingsMutation(ctx, 'set-update-rate', ['updateRate', 'autoRegenerateKb'], (cfg) => {
41
- cfg.updateRate = parsed;
42
- delete cfg.autoRegenerateKb;
43
- });
44
- }
45
- async function runAddExclude(ctx, value) {
46
- const excludePath = value.trim();
47
- if (!excludePath) {
48
- return outputUsageError('add-exclude', ctx.flags, ctx.log, `${logger_1.fmt.bold('add-exclude')} requires a non-empty path value.`);
49
- }
50
- return runSettingsMutation(ctx, 'add-exclude', ['exclude'], (cfg) => {
51
- const list = normalizeExcludeList(cfg.exclude);
52
- if (!list.includes(excludePath)) {
53
- list.push(excludePath);
54
- }
55
- cfg.exclude = list;
56
- });
57
- }
58
- async function runRemoveExclude(ctx, value) {
59
- const excludePath = value.trim();
60
- if (!excludePath) {
61
- return outputUsageError('remove-exclude', ctx.flags, ctx.log, `${logger_1.fmt.bold('remove-exclude')} requires a non-empty path value.`);
62
- }
63
- return runSettingsMutation(ctx, 'remove-exclude', ['exclude'], (cfg) => {
64
- const list = normalizeExcludeList(cfg.exclude).filter((entry) => entry !== excludePath);
65
- if (list.length > 0) {
66
- cfg.exclude = list;
67
- }
68
- else {
69
- delete cfg.exclude;
70
- }
71
- });
72
- }
73
- // ── Shared mutation runner ───────────────────────────────────
74
- /**
75
- * Generic helper for settings mutation commands.
76
- *
77
- * Encapsulates the try/catch + load → mutate → save → output pattern
78
- * shared by all mutation commands.
79
- */
80
- function runSettingsMutation(ctx, command, changed, mutate) {
81
- const { root, flags, log } = ctx;
82
- try {
83
- const nextConfig = updateRawConfig(root, mutate);
84
- return outputSuccess(command, flags, log, nextConfig, changed);
85
- }
86
- catch (error) {
87
- return outputError(command, flags, log, error);
88
- }
89
- }
90
- function updateRawConfig(root, apply) {
91
- const nextConfig = { ...((0, config_1.loadRawConfig)(root) ?? {}) };
92
- apply(nextConfig);
93
- (0, config_1.saveRawConfig)(root, nextConfig);
94
- return nextConfig;
95
- }
96
- function withCanonicalUpdateRate(config) {
97
- if (config.updateRate || !config.autoRegenerateKb) {
98
- return { ...config };
99
- }
100
- let mapped;
101
- if (config.autoRegenerateKb === 'off') {
102
- mapped = 'manual';
103
- }
104
- else if (config.autoRegenerateKb === 'onSave') {
105
- mapped = 'onChange';
106
- }
107
- else if (config.autoRegenerateKb === 'idle') {
108
- mapped = 'idle';
109
- }
110
- if (!mapped) {
111
- return { ...config };
112
- }
113
- return {
114
- ...config,
115
- updateRate: mapped,
116
- };
117
- }
118
- function parseUpdateRate(value) {
119
- const normalized = value.trim();
120
- if (normalized === 'manual' || normalized === 'onChange' || normalized === 'idle') {
121
- return normalized;
122
- }
123
- return undefined;
124
- }
125
- function normalizeExcludeList(value) {
126
- if (!Array.isArray(value)) {
127
- return [];
128
- }
129
- return value.filter((item) => typeof item === 'string');
130
- }
131
- function outputSuccess(command, flags, log, config, changed) {
132
- if (flags.json) {
133
- const payload = { ok: true, command, config, changed };
134
- emitJson(payload);
135
- }
136
- else {
137
- log.success(`Updated ${logger_1.fmt.cyan('aspectcode.json')} via ${logger_1.fmt.bold(command)}.`);
138
- }
139
- return { exitCode: cli_1.ExitCode.OK };
140
- }
141
- function outputUsageError(command, flags, log, message) {
142
- if (flags.json) {
143
- const payload = { ok: false, command, error: message };
144
- emitJson(payload);
145
- }
146
- else {
147
- log.error(message);
148
- }
149
- return { exitCode: cli_1.ExitCode.USAGE };
150
- }
151
- function outputError(command, flags, log, error) {
152
- const message = error instanceof Error ? error.message : String(error);
153
- if (flags.json) {
154
- const payload = { ok: false, command, error: message };
155
- emitJson(payload);
156
- }
157
- else {
158
- log.error(message);
159
- }
160
- return { exitCode: cli_1.ExitCode.ERROR };
161
- }
162
- function emitJson(payload) {
163
- console.log(JSON.stringify(payload, null, 2));
164
- }
165
- //# sourceMappingURL=settings.js.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"settings.js","sourceRoot":"","sources":["../../src/commands/settings.ts"],"names":[],"mappings":";AAAA;;GAEG;;AAuBH,sCAwBC;AAED,4CAkBC;AAED,sCAgBC;AAED,4CAiBC;AArGD,gCAAkC;AAClC,sCAAmF;AAEnF,sCAAgC;AAiBzB,KAAK,UAAU,aAAa,CACjC,GAAmB;IAEnB,MAAM,EAAE,IAAI,EAAE,KAAK,EAAE,GAAG,EAAE,GAAG,GAAG,CAAC;IACjC,MAAM,OAAO,GAAG,aAAa,CAAC;IAE9B,IAAI,CAAC;QACH,MAAM,OAAO,GAAG,IAAA,sBAAa,EAAC,IAAI,CAAC,IAAI,EAAE,CAAC;QAC1C,MAAM,aAAa,GAAG,uBAAuB,CAAC,OAAO,CAAC,CAAC;QAEvD,IAAI,KAAK,CAAC,IAAI,EAAE,CAAC;YACf,QAAQ,CAAC;gBACP,EAAE,EAAE,IAAI;gBACR,OAAO;gBACP,MAAM,EAAE,aAAa;aAC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;QACzE,QAAQ,CAAC,OAAO,CAAC,CAAC;IACpB,CAAC;SAAM,CAAC;QACN,GAAG,CAAC,KAAK,CAAC,OAAO,CAAC,CAAC;IACrB,CAAC;IAED,OAAO,EAAE,QAAQ,EAAE,cAAQ,CAAC,KAAK,EAAE,CAAC;AACtC,CAAC;AAED,SAAS,WAAW,CAClB,OAAe,EACf,KAAe,EACf,GAAW,EACX,KAAc;IAEd,MAAM,OAAO,GAAG,KAAK,YAAY,KAAK,CAAC,CAAC,CAAC,KAAK,CAAC,OAAO,CAAC,CAAC,CAAC,MAAM,CAAC,KAAK,CAAC,CAAC;IACvE,IAAI,KAAK,CAAC,IAAI,EAAE,CAAC;QACf,MAAM,OAAO,GAAqB,EAAE,EAAE,EAAE,KAAK,EAAE,OAAO,EAAE,KAAK,EAAE,OAAO,EAAE,CAAC;QACzE,QAAQ,CAAC,OAAO,CAAC,CAAC;IACpB,CAAC;SAAM,CAAC;QACN,GAAG,CAAC,KAAK,CAAC,OAAO,CAAC,CAAC;IACrB,CAAC;IAED,OAAO,EAAE,QAAQ,EAAE,cAAQ,CAAC,KAAK,EAAE,CAAC;AACtC,CAAC;AAED,SAAS,QAAQ,CAAC,OAA8C;IAC9D,OAAO,CAAC,GAAG,CAAC,IAAI,CAAC,SAAS,CAAC,OAAO,EAAE,IAAI,EAAE,CAAC,CAAC,CAAC,CAAC;AAChD,CAAC"}
@@ -1,6 +0,0 @@
1
- import type { CliFlags, CommandContext, CommandResult } from '../cli';
2
- import type { AspectCodeConfig } from '../config';
3
- export type WatchMode = 'manual' | 'onChange' | 'idle';
4
- export declare function resolveWatchMode(flags: CliFlags, config: AspectCodeConfig | undefined): WatchMode;
5
- export declare function runWatch(ctx: CommandContext): Promise<CommandResult>;
6
- //# sourceMappingURL=watch.d.ts.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"watch.d.ts","sourceRoot":"","sources":["../../src/commands/watch.ts"],"names":[],"mappings":"AAEA,OAAO,KAAK,EAAE,QAAQ,EAAE,cAAc,EAAE,aAAa,EAAE,MAAM,QAAQ,CAAC;AAEtE,OAAO,KAAK,EAAE,gBAAgB,EAAE,MAAM,WAAW,CAAC;AAIlD,MAAM,MAAM,SAAS,GAAG,QAAQ,GAAG,UAAU,GAAG,MAAM,CAAC;AAsBvD,wBAAgB,gBAAgB,CAC9B,KAAK,EAAE,QAAQ,EACf,MAAM,EAAE,gBAAgB,GAAG,SAAS,GACnC,SAAS,CAEX;AAYD,wBAAsB,QAAQ,CAAC,GAAG,EAAE,cAAc,GAAG,OAAO,CAAC,aAAa,CAAC,CA2H1E"}