@colbymchenry/codegraph-darwin-x64 0.9.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 (569) hide show
  1. package/bin/codegraph +3 -0
  2. package/lib/dist/bin/codegraph.d.ts +21 -0
  3. package/lib/dist/bin/codegraph.d.ts.map +1 -0
  4. package/lib/dist/bin/codegraph.js +1273 -0
  5. package/lib/dist/bin/codegraph.js.map +1 -0
  6. package/lib/dist/bin/node-version-check.d.ts +37 -0
  7. package/lib/dist/bin/node-version-check.d.ts.map +1 -0
  8. package/lib/dist/bin/node-version-check.js +79 -0
  9. package/lib/dist/bin/node-version-check.js.map +1 -0
  10. package/lib/dist/bin/uninstall.d.ts +14 -0
  11. package/lib/dist/bin/uninstall.d.ts.map +1 -0
  12. package/lib/dist/bin/uninstall.js +36 -0
  13. package/lib/dist/bin/uninstall.js.map +1 -0
  14. package/lib/dist/config.d.ts +51 -0
  15. package/lib/dist/config.d.ts.map +1 -0
  16. package/lib/dist/config.js +321 -0
  17. package/lib/dist/config.js.map +1 -0
  18. package/lib/dist/context/formatter.d.ts +30 -0
  19. package/lib/dist/context/formatter.d.ts.map +1 -0
  20. package/lib/dist/context/formatter.js +244 -0
  21. package/lib/dist/context/formatter.js.map +1 -0
  22. package/lib/dist/context/index.d.ts +97 -0
  23. package/lib/dist/context/index.d.ts.map +1 -0
  24. package/lib/dist/context/index.js +1050 -0
  25. package/lib/dist/context/index.js.map +1 -0
  26. package/lib/dist/db/index.d.ts +83 -0
  27. package/lib/dist/db/index.d.ts.map +1 -0
  28. package/lib/dist/db/index.js +219 -0
  29. package/lib/dist/db/index.js.map +1 -0
  30. package/lib/dist/db/migrations.d.ts +44 -0
  31. package/lib/dist/db/migrations.d.ts.map +1 -0
  32. package/lib/dist/db/migrations.js +131 -0
  33. package/lib/dist/db/migrations.js.map +1 -0
  34. package/lib/dist/db/queries.d.ts +253 -0
  35. package/lib/dist/db/queries.d.ts.map +1 -0
  36. package/lib/dist/db/queries.js +1207 -0
  37. package/lib/dist/db/queries.js.map +1 -0
  38. package/lib/dist/db/schema.sql +151 -0
  39. package/lib/dist/db/sqlite-adapter.d.ts +46 -0
  40. package/lib/dist/db/sqlite-adapter.d.ts.map +1 -0
  41. package/lib/dist/db/sqlite-adapter.js +114 -0
  42. package/lib/dist/db/sqlite-adapter.js.map +1 -0
  43. package/lib/dist/directory.d.ts +57 -0
  44. package/lib/dist/directory.d.ts.map +1 -0
  45. package/lib/dist/directory.js +264 -0
  46. package/lib/dist/directory.js.map +1 -0
  47. package/lib/dist/errors.d.ts +136 -0
  48. package/lib/dist/errors.d.ts.map +1 -0
  49. package/lib/dist/errors.js +219 -0
  50. package/lib/dist/errors.js.map +1 -0
  51. package/lib/dist/extraction/dfm-extractor.d.ts +31 -0
  52. package/lib/dist/extraction/dfm-extractor.d.ts.map +1 -0
  53. package/lib/dist/extraction/dfm-extractor.js +151 -0
  54. package/lib/dist/extraction/dfm-extractor.js.map +1 -0
  55. package/lib/dist/extraction/grammars.d.ts +78 -0
  56. package/lib/dist/extraction/grammars.d.ts.map +1 -0
  57. package/lib/dist/extraction/grammars.js +332 -0
  58. package/lib/dist/extraction/grammars.js.map +1 -0
  59. package/lib/dist/extraction/index.d.ts +130 -0
  60. package/lib/dist/extraction/index.d.ts.map +1 -0
  61. package/lib/dist/extraction/index.js +1305 -0
  62. package/lib/dist/extraction/index.js.map +1 -0
  63. package/lib/dist/extraction/languages/c-cpp.d.ts +4 -0
  64. package/lib/dist/extraction/languages/c-cpp.d.ts.map +1 -0
  65. package/lib/dist/extraction/languages/c-cpp.js +126 -0
  66. package/lib/dist/extraction/languages/c-cpp.js.map +1 -0
  67. package/lib/dist/extraction/languages/csharp.d.ts +3 -0
  68. package/lib/dist/extraction/languages/csharp.d.ts.map +1 -0
  69. package/lib/dist/extraction/languages/csharp.js +72 -0
  70. package/lib/dist/extraction/languages/csharp.js.map +1 -0
  71. package/lib/dist/extraction/languages/dart.d.ts +3 -0
  72. package/lib/dist/extraction/languages/dart.d.ts.map +1 -0
  73. package/lib/dist/extraction/languages/dart.js +192 -0
  74. package/lib/dist/extraction/languages/dart.js.map +1 -0
  75. package/lib/dist/extraction/languages/go.d.ts +3 -0
  76. package/lib/dist/extraction/languages/go.d.ts.map +1 -0
  77. package/lib/dist/extraction/languages/go.js +58 -0
  78. package/lib/dist/extraction/languages/go.js.map +1 -0
  79. package/lib/dist/extraction/languages/index.d.ts +10 -0
  80. package/lib/dist/extraction/languages/index.d.ts.map +1 -0
  81. package/lib/dist/extraction/languages/index.js +49 -0
  82. package/lib/dist/extraction/languages/index.js.map +1 -0
  83. package/lib/dist/extraction/languages/java.d.ts +3 -0
  84. package/lib/dist/extraction/languages/java.d.ts.map +1 -0
  85. package/lib/dist/extraction/languages/java.js +64 -0
  86. package/lib/dist/extraction/languages/java.js.map +1 -0
  87. package/lib/dist/extraction/languages/javascript.d.ts +3 -0
  88. package/lib/dist/extraction/languages/javascript.d.ts.map +1 -0
  89. package/lib/dist/extraction/languages/javascript.js +90 -0
  90. package/lib/dist/extraction/languages/javascript.js.map +1 -0
  91. package/lib/dist/extraction/languages/kotlin.d.ts +3 -0
  92. package/lib/dist/extraction/languages/kotlin.d.ts.map +1 -0
  93. package/lib/dist/extraction/languages/kotlin.js +253 -0
  94. package/lib/dist/extraction/languages/kotlin.js.map +1 -0
  95. package/lib/dist/extraction/languages/lua.d.ts +3 -0
  96. package/lib/dist/extraction/languages/lua.d.ts.map +1 -0
  97. package/lib/dist/extraction/languages/lua.js +150 -0
  98. package/lib/dist/extraction/languages/lua.js.map +1 -0
  99. package/lib/dist/extraction/languages/luau.d.ts +3 -0
  100. package/lib/dist/extraction/languages/luau.d.ts.map +1 -0
  101. package/lib/dist/extraction/languages/luau.js +37 -0
  102. package/lib/dist/extraction/languages/luau.js.map +1 -0
  103. package/lib/dist/extraction/languages/pascal.d.ts +3 -0
  104. package/lib/dist/extraction/languages/pascal.d.ts.map +1 -0
  105. package/lib/dist/extraction/languages/pascal.js +66 -0
  106. package/lib/dist/extraction/languages/pascal.js.map +1 -0
  107. package/lib/dist/extraction/languages/php.d.ts +3 -0
  108. package/lib/dist/extraction/languages/php.d.ts.map +1 -0
  109. package/lib/dist/extraction/languages/php.js +107 -0
  110. package/lib/dist/extraction/languages/php.js.map +1 -0
  111. package/lib/dist/extraction/languages/python.d.ts +3 -0
  112. package/lib/dist/extraction/languages/python.d.ts.map +1 -0
  113. package/lib/dist/extraction/languages/python.js +56 -0
  114. package/lib/dist/extraction/languages/python.js.map +1 -0
  115. package/lib/dist/extraction/languages/ruby.d.ts +3 -0
  116. package/lib/dist/extraction/languages/ruby.d.ts.map +1 -0
  117. package/lib/dist/extraction/languages/ruby.js +114 -0
  118. package/lib/dist/extraction/languages/ruby.js.map +1 -0
  119. package/lib/dist/extraction/languages/rust.d.ts +3 -0
  120. package/lib/dist/extraction/languages/rust.d.ts.map +1 -0
  121. package/lib/dist/extraction/languages/rust.js +109 -0
  122. package/lib/dist/extraction/languages/rust.js.map +1 -0
  123. package/lib/dist/extraction/languages/scala.d.ts +3 -0
  124. package/lib/dist/extraction/languages/scala.d.ts.map +1 -0
  125. package/lib/dist/extraction/languages/scala.js +139 -0
  126. package/lib/dist/extraction/languages/scala.js.map +1 -0
  127. package/lib/dist/extraction/languages/swift.d.ts +3 -0
  128. package/lib/dist/extraction/languages/swift.d.ts.map +1 -0
  129. package/lib/dist/extraction/languages/swift.js +91 -0
  130. package/lib/dist/extraction/languages/swift.js.map +1 -0
  131. package/lib/dist/extraction/languages/typescript.d.ts +3 -0
  132. package/lib/dist/extraction/languages/typescript.d.ts.map +1 -0
  133. package/lib/dist/extraction/languages/typescript.js +129 -0
  134. package/lib/dist/extraction/languages/typescript.js.map +1 -0
  135. package/lib/dist/extraction/liquid-extractor.d.ts +52 -0
  136. package/lib/dist/extraction/liquid-extractor.d.ts.map +1 -0
  137. package/lib/dist/extraction/liquid-extractor.js +313 -0
  138. package/lib/dist/extraction/liquid-extractor.js.map +1 -0
  139. package/lib/dist/extraction/parse-worker.d.ts +8 -0
  140. package/lib/dist/extraction/parse-worker.d.ts.map +1 -0
  141. package/lib/dist/extraction/parse-worker.js +94 -0
  142. package/lib/dist/extraction/parse-worker.js.map +1 -0
  143. package/lib/dist/extraction/svelte-extractor.d.ts +56 -0
  144. package/lib/dist/extraction/svelte-extractor.d.ts.map +1 -0
  145. package/lib/dist/extraction/svelte-extractor.js +272 -0
  146. package/lib/dist/extraction/svelte-extractor.js.map +1 -0
  147. package/lib/dist/extraction/tree-sitter-helpers.d.ts +28 -0
  148. package/lib/dist/extraction/tree-sitter-helpers.d.ts.map +1 -0
  149. package/lib/dist/extraction/tree-sitter-helpers.js +103 -0
  150. package/lib/dist/extraction/tree-sitter-helpers.js.map +1 -0
  151. package/lib/dist/extraction/tree-sitter-types.d.ts +179 -0
  152. package/lib/dist/extraction/tree-sitter-types.d.ts.map +1 -0
  153. package/lib/dist/extraction/tree-sitter-types.js +10 -0
  154. package/lib/dist/extraction/tree-sitter-types.js.map +1 -0
  155. package/lib/dist/extraction/tree-sitter.d.ts +233 -0
  156. package/lib/dist/extraction/tree-sitter.d.ts.map +1 -0
  157. package/lib/dist/extraction/tree-sitter.js +2425 -0
  158. package/lib/dist/extraction/tree-sitter.js.map +1 -0
  159. package/lib/dist/extraction/vue-extractor.d.ts +36 -0
  160. package/lib/dist/extraction/vue-extractor.d.ts.map +1 -0
  161. package/lib/dist/extraction/vue-extractor.js +163 -0
  162. package/lib/dist/extraction/vue-extractor.js.map +1 -0
  163. package/lib/dist/extraction/wasm/tree-sitter-lua.wasm +0 -0
  164. package/lib/dist/extraction/wasm/tree-sitter-luau.wasm +0 -0
  165. package/lib/dist/extraction/wasm/tree-sitter-pascal.wasm +0 -0
  166. package/lib/dist/extraction/wasm/tree-sitter-scala.wasm +0 -0
  167. package/lib/dist/graph/index.d.ts +8 -0
  168. package/lib/dist/graph/index.d.ts.map +1 -0
  169. package/lib/dist/graph/index.js +13 -0
  170. package/lib/dist/graph/index.js.map +1 -0
  171. package/lib/dist/graph/queries.d.ts +106 -0
  172. package/lib/dist/graph/queries.d.ts.map +1 -0
  173. package/lib/dist/graph/queries.js +366 -0
  174. package/lib/dist/graph/queries.js.map +1 -0
  175. package/lib/dist/graph/traversal.d.ts +127 -0
  176. package/lib/dist/graph/traversal.d.ts.map +1 -0
  177. package/lib/dist/graph/traversal.js +493 -0
  178. package/lib/dist/graph/traversal.js.map +1 -0
  179. package/lib/dist/index.d.ts +453 -0
  180. package/lib/dist/index.d.ts.map +1 -0
  181. package/lib/dist/index.js +833 -0
  182. package/lib/dist/index.js.map +1 -0
  183. package/lib/dist/installer/claude-md-template.d.ts +14 -0
  184. package/lib/dist/installer/claude-md-template.d.ts.map +1 -0
  185. package/lib/dist/installer/claude-md-template.js +21 -0
  186. package/lib/dist/installer/claude-md-template.js.map +1 -0
  187. package/lib/dist/installer/config-writer.d.ts +29 -0
  188. package/lib/dist/installer/config-writer.d.ts.map +1 -0
  189. package/lib/dist/installer/config-writer.js +111 -0
  190. package/lib/dist/installer/config-writer.js.map +1 -0
  191. package/lib/dist/installer/index.d.ts +65 -0
  192. package/lib/dist/installer/index.d.ts.map +1 -0
  193. package/lib/dist/installer/index.js +406 -0
  194. package/lib/dist/installer/index.js.map +1 -0
  195. package/lib/dist/installer/instructions-template.d.ts +28 -0
  196. package/lib/dist/installer/instructions-template.d.ts.map +1 -0
  197. package/lib/dist/installer/instructions-template.js +64 -0
  198. package/lib/dist/installer/instructions-template.js.map +1 -0
  199. package/lib/dist/installer/targets/claude.d.ts +47 -0
  200. package/lib/dist/installer/targets/claude.d.ts.map +1 -0
  201. package/lib/dist/installer/targets/claude.js +401 -0
  202. package/lib/dist/installer/targets/claude.js.map +1 -0
  203. package/lib/dist/installer/targets/codex.d.ts +18 -0
  204. package/lib/dist/installer/targets/codex.d.ts.map +1 -0
  205. package/lib/dist/installer/targets/codex.js +185 -0
  206. package/lib/dist/installer/targets/codex.js.map +1 -0
  207. package/lib/dist/installer/targets/cursor.d.ts +35 -0
  208. package/lib/dist/installer/targets/cursor.d.ts.map +1 -0
  209. package/lib/dist/installer/targets/cursor.js +229 -0
  210. package/lib/dist/installer/targets/cursor.js.map +1 -0
  211. package/lib/dist/installer/targets/opencode.d.ts +30 -0
  212. package/lib/dist/installer/targets/opencode.d.ts.map +1 -0
  213. package/lib/dist/installer/targets/opencode.js +235 -0
  214. package/lib/dist/installer/targets/opencode.js.map +1 -0
  215. package/lib/dist/installer/targets/registry.d.ts +35 -0
  216. package/lib/dist/installer/targets/registry.d.ts.map +1 -0
  217. package/lib/dist/installer/targets/registry.js +83 -0
  218. package/lib/dist/installer/targets/registry.js.map +1 -0
  219. package/lib/dist/installer/targets/shared.d.ts +77 -0
  220. package/lib/dist/installer/targets/shared.d.ts.map +1 -0
  221. package/lib/dist/installer/targets/shared.js +246 -0
  222. package/lib/dist/installer/targets/shared.js.map +1 -0
  223. package/lib/dist/installer/targets/toml.d.ts +52 -0
  224. package/lib/dist/installer/targets/toml.d.ts.map +1 -0
  225. package/lib/dist/installer/targets/toml.js +147 -0
  226. package/lib/dist/installer/targets/toml.js.map +1 -0
  227. package/lib/dist/installer/targets/types.d.ts +116 -0
  228. package/lib/dist/installer/targets/types.d.ts.map +1 -0
  229. package/lib/dist/installer/targets/types.js +16 -0
  230. package/lib/dist/installer/targets/types.js.map +1 -0
  231. package/lib/dist/mcp/index.d.ts +94 -0
  232. package/lib/dist/mcp/index.d.ts.map +1 -0
  233. package/lib/dist/mcp/index.js +453 -0
  234. package/lib/dist/mcp/index.js.map +1 -0
  235. package/lib/dist/mcp/server-instructions.d.ts +19 -0
  236. package/lib/dist/mcp/server-instructions.d.ts.map +1 -0
  237. package/lib/dist/mcp/server-instructions.js +71 -0
  238. package/lib/dist/mcp/server-instructions.js.map +1 -0
  239. package/lib/dist/mcp/tools.d.ts +257 -0
  240. package/lib/dist/mcp/tools.d.ts.map +1 -0
  241. package/lib/dist/mcp/tools.js +1646 -0
  242. package/lib/dist/mcp/tools.js.map +1 -0
  243. package/lib/dist/mcp/transport.d.ts +106 -0
  244. package/lib/dist/mcp/transport.d.ts.map +1 -0
  245. package/lib/dist/mcp/transport.js +233 -0
  246. package/lib/dist/mcp/transport.js.map +1 -0
  247. package/lib/dist/resolution/frameworks/cargo-workspace.d.ts +18 -0
  248. package/lib/dist/resolution/frameworks/cargo-workspace.d.ts.map +1 -0
  249. package/lib/dist/resolution/frameworks/cargo-workspace.js +225 -0
  250. package/lib/dist/resolution/frameworks/cargo-workspace.js.map +1 -0
  251. package/lib/dist/resolution/frameworks/csharp.d.ts +8 -0
  252. package/lib/dist/resolution/frameworks/csharp.d.ts.map +1 -0
  253. package/lib/dist/resolution/frameworks/csharp.js +213 -0
  254. package/lib/dist/resolution/frameworks/csharp.js.map +1 -0
  255. package/lib/dist/resolution/frameworks/express.d.ts +8 -0
  256. package/lib/dist/resolution/frameworks/express.d.ts.map +1 -0
  257. package/lib/dist/resolution/frameworks/express.js +225 -0
  258. package/lib/dist/resolution/frameworks/express.js.map +1 -0
  259. package/lib/dist/resolution/frameworks/go.d.ts +8 -0
  260. package/lib/dist/resolution/frameworks/go.d.ts.map +1 -0
  261. package/lib/dist/resolution/frameworks/go.js +158 -0
  262. package/lib/dist/resolution/frameworks/go.js.map +1 -0
  263. package/lib/dist/resolution/frameworks/index.d.ts +42 -0
  264. package/lib/dist/resolution/frameworks/index.d.ts.map +1 -0
  265. package/lib/dist/resolution/frameworks/index.js +133 -0
  266. package/lib/dist/resolution/frameworks/index.js.map +1 -0
  267. package/lib/dist/resolution/frameworks/java.d.ts +8 -0
  268. package/lib/dist/resolution/frameworks/java.d.ts.map +1 -0
  269. package/lib/dist/resolution/frameworks/java.js +177 -0
  270. package/lib/dist/resolution/frameworks/java.js.map +1 -0
  271. package/lib/dist/resolution/frameworks/laravel.d.ts +13 -0
  272. package/lib/dist/resolution/frameworks/laravel.d.ts.map +1 -0
  273. package/lib/dist/resolution/frameworks/laravel.js +248 -0
  274. package/lib/dist/resolution/frameworks/laravel.js.map +1 -0
  275. package/lib/dist/resolution/frameworks/nestjs.d.ts +26 -0
  276. package/lib/dist/resolution/frameworks/nestjs.d.ts.map +1 -0
  277. package/lib/dist/resolution/frameworks/nestjs.js +374 -0
  278. package/lib/dist/resolution/frameworks/nestjs.js.map +1 -0
  279. package/lib/dist/resolution/frameworks/python.d.ts +10 -0
  280. package/lib/dist/resolution/frameworks/python.d.ts.map +1 -0
  281. package/lib/dist/resolution/frameworks/python.js +278 -0
  282. package/lib/dist/resolution/frameworks/python.js.map +1 -0
  283. package/lib/dist/resolution/frameworks/react.d.ts +8 -0
  284. package/lib/dist/resolution/frameworks/react.d.ts.map +1 -0
  285. package/lib/dist/resolution/frameworks/react.js +272 -0
  286. package/lib/dist/resolution/frameworks/react.js.map +1 -0
  287. package/lib/dist/resolution/frameworks/ruby.d.ts +8 -0
  288. package/lib/dist/resolution/frameworks/ruby.d.ts.map +1 -0
  289. package/lib/dist/resolution/frameworks/ruby.js +198 -0
  290. package/lib/dist/resolution/frameworks/ruby.js.map +1 -0
  291. package/lib/dist/resolution/frameworks/rust.d.ts +8 -0
  292. package/lib/dist/resolution/frameworks/rust.d.ts.map +1 -0
  293. package/lib/dist/resolution/frameworks/rust.js +207 -0
  294. package/lib/dist/resolution/frameworks/rust.js.map +1 -0
  295. package/lib/dist/resolution/frameworks/svelte.d.ts +9 -0
  296. package/lib/dist/resolution/frameworks/svelte.d.ts.map +1 -0
  297. package/lib/dist/resolution/frameworks/svelte.js +249 -0
  298. package/lib/dist/resolution/frameworks/svelte.js.map +1 -0
  299. package/lib/dist/resolution/frameworks/swift.d.ts +10 -0
  300. package/lib/dist/resolution/frameworks/swift.d.ts.map +1 -0
  301. package/lib/dist/resolution/frameworks/swift.js +376 -0
  302. package/lib/dist/resolution/frameworks/swift.js.map +1 -0
  303. package/lib/dist/resolution/frameworks/vue.d.ts +9 -0
  304. package/lib/dist/resolution/frameworks/vue.d.ts.map +1 -0
  305. package/lib/dist/resolution/frameworks/vue.js +306 -0
  306. package/lib/dist/resolution/frameworks/vue.js.map +1 -0
  307. package/lib/dist/resolution/import-resolver.d.ts +40 -0
  308. package/lib/dist/resolution/import-resolver.d.ts.map +1 -0
  309. package/lib/dist/resolution/import-resolver.js +663 -0
  310. package/lib/dist/resolution/import-resolver.js.map +1 -0
  311. package/lib/dist/resolution/index.d.ts +106 -0
  312. package/lib/dist/resolution/index.d.ts.map +1 -0
  313. package/lib/dist/resolution/index.js +709 -0
  314. package/lib/dist/resolution/index.js.map +1 -0
  315. package/lib/dist/resolution/name-matcher.d.ts +32 -0
  316. package/lib/dist/resolution/name-matcher.d.ts.map +1 -0
  317. package/lib/dist/resolution/name-matcher.js +384 -0
  318. package/lib/dist/resolution/name-matcher.js.map +1 -0
  319. package/lib/dist/resolution/path-aliases.d.ts +68 -0
  320. package/lib/dist/resolution/path-aliases.d.ts.map +1 -0
  321. package/lib/dist/resolution/path-aliases.js +238 -0
  322. package/lib/dist/resolution/path-aliases.js.map +1 -0
  323. package/lib/dist/resolution/strip-comments.d.ts +27 -0
  324. package/lib/dist/resolution/strip-comments.d.ts.map +1 -0
  325. package/lib/dist/resolution/strip-comments.js +441 -0
  326. package/lib/dist/resolution/strip-comments.js.map +1 -0
  327. package/lib/dist/resolution/types.d.ts +172 -0
  328. package/lib/dist/resolution/types.d.ts.map +1 -0
  329. package/lib/dist/resolution/types.js +8 -0
  330. package/lib/dist/resolution/types.js.map +1 -0
  331. package/lib/dist/search/query-parser.d.ts +57 -0
  332. package/lib/dist/search/query-parser.d.ts.map +1 -0
  333. package/lib/dist/search/query-parser.js +177 -0
  334. package/lib/dist/search/query-parser.js.map +1 -0
  335. package/lib/dist/search/query-utils.d.ts +53 -0
  336. package/lib/dist/search/query-utils.d.ts.map +1 -0
  337. package/lib/dist/search/query-utils.js +350 -0
  338. package/lib/dist/search/query-utils.js.map +1 -0
  339. package/lib/dist/sync/git-hooks.d.ts +45 -0
  340. package/lib/dist/sync/git-hooks.d.ts.map +1 -0
  341. package/lib/dist/sync/git-hooks.js +223 -0
  342. package/lib/dist/sync/git-hooks.js.map +1 -0
  343. package/lib/dist/sync/index.d.ts +17 -0
  344. package/lib/dist/sync/index.d.ts.map +1 -0
  345. package/lib/dist/sync/index.js +28 -0
  346. package/lib/dist/sync/index.js.map +1 -0
  347. package/lib/dist/sync/watch-policy.d.ts +48 -0
  348. package/lib/dist/sync/watch-policy.d.ts.map +1 -0
  349. package/lib/dist/sync/watch-policy.js +124 -0
  350. package/lib/dist/sync/watch-policy.js.map +1 -0
  351. package/lib/dist/sync/watcher.d.ts +81 -0
  352. package/lib/dist/sync/watcher.d.ts.map +1 -0
  353. package/lib/dist/sync/watcher.js +194 -0
  354. package/lib/dist/sync/watcher.js.map +1 -0
  355. package/lib/dist/types.d.ts +423 -0
  356. package/lib/dist/types.d.ts.map +1 -0
  357. package/lib/dist/types.js +262 -0
  358. package/lib/dist/types.js.map +1 -0
  359. package/lib/dist/ui/glyphs.d.ts +42 -0
  360. package/lib/dist/ui/glyphs.d.ts.map +1 -0
  361. package/lib/dist/ui/glyphs.js +78 -0
  362. package/lib/dist/ui/glyphs.js.map +1 -0
  363. package/lib/dist/ui/shimmer-progress.d.ts +11 -0
  364. package/lib/dist/ui/shimmer-progress.d.ts.map +1 -0
  365. package/lib/dist/ui/shimmer-progress.js +90 -0
  366. package/lib/dist/ui/shimmer-progress.js.map +1 -0
  367. package/lib/dist/ui/shimmer-worker.d.ts +2 -0
  368. package/lib/dist/ui/shimmer-worker.d.ts.map +1 -0
  369. package/lib/dist/ui/shimmer-worker.js +118 -0
  370. package/lib/dist/ui/shimmer-worker.js.map +1 -0
  371. package/lib/dist/ui/types.d.ts +17 -0
  372. package/lib/dist/ui/types.d.ts.map +1 -0
  373. package/lib/dist/ui/types.js +3 -0
  374. package/lib/dist/ui/types.js.map +1 -0
  375. package/lib/dist/utils.d.ts +205 -0
  376. package/lib/dist/utils.d.ts.map +1 -0
  377. package/lib/dist/utils.js +549 -0
  378. package/lib/dist/utils.js.map +1 -0
  379. package/lib/node_modules/.package-lock.json +116 -0
  380. package/lib/node_modules/@clack/core/CHANGELOG.md +348 -0
  381. package/lib/node_modules/@clack/core/LICENSE +9 -0
  382. package/lib/node_modules/@clack/core/README.md +22 -0
  383. package/lib/node_modules/@clack/core/dist/index.d.mts +363 -0
  384. package/lib/node_modules/@clack/core/dist/index.mjs +17 -0
  385. package/lib/node_modules/@clack/core/dist/index.mjs.map +1 -0
  386. package/lib/node_modules/@clack/core/package.json +63 -0
  387. package/lib/node_modules/@clack/prompts/CHANGELOG.md +591 -0
  388. package/lib/node_modules/@clack/prompts/LICENSE +9 -0
  389. package/lib/node_modules/@clack/prompts/README.md +375 -0
  390. package/lib/node_modules/@clack/prompts/dist/index.d.mts +396 -0
  391. package/lib/node_modules/@clack/prompts/dist/index.mjs +144 -0
  392. package/lib/node_modules/@clack/prompts/dist/index.mjs.map +1 -0
  393. package/lib/node_modules/@clack/prompts/package.json +68 -0
  394. package/lib/node_modules/commander/LICENSE +22 -0
  395. package/lib/node_modules/commander/Readme.md +1176 -0
  396. package/lib/node_modules/commander/esm.mjs +16 -0
  397. package/lib/node_modules/commander/index.js +24 -0
  398. package/lib/node_modules/commander/lib/argument.js +150 -0
  399. package/lib/node_modules/commander/lib/command.js +2777 -0
  400. package/lib/node_modules/commander/lib/error.js +39 -0
  401. package/lib/node_modules/commander/lib/help.js +747 -0
  402. package/lib/node_modules/commander/lib/option.js +380 -0
  403. package/lib/node_modules/commander/lib/suggestSimilar.js +101 -0
  404. package/lib/node_modules/commander/package-support.json +19 -0
  405. package/lib/node_modules/commander/package.json +82 -0
  406. package/lib/node_modules/commander/typings/esm.d.mts +3 -0
  407. package/lib/node_modules/commander/typings/index.d.ts +1113 -0
  408. package/lib/node_modules/fast-string-truncated-width/dist/index.d.ts +4 -0
  409. package/lib/node_modules/fast-string-truncated-width/dist/index.js +111 -0
  410. package/lib/node_modules/fast-string-truncated-width/dist/types.d.ts +19 -0
  411. package/lib/node_modules/fast-string-truncated-width/dist/types.js +2 -0
  412. package/lib/node_modules/fast-string-truncated-width/dist/utils.d.ts +4 -0
  413. package/lib/node_modules/fast-string-truncated-width/dist/utils.js +20 -0
  414. package/lib/node_modules/fast-string-truncated-width/license +21 -0
  415. package/lib/node_modules/fast-string-truncated-width/package.json +35 -0
  416. package/lib/node_modules/fast-string-truncated-width/readme.md +59 -0
  417. package/lib/node_modules/fast-string-width/dist/index.d.ts +4 -0
  418. package/lib/node_modules/fast-string-width/dist/index.js +14 -0
  419. package/lib/node_modules/fast-string-width/license +21 -0
  420. package/lib/node_modules/fast-string-width/package.json +34 -0
  421. package/lib/node_modules/fast-string-width/readme.md +42 -0
  422. package/lib/node_modules/fast-wrap-ansi/LICENSE +23 -0
  423. package/lib/node_modules/fast-wrap-ansi/README.md +26 -0
  424. package/lib/node_modules/fast-wrap-ansi/lib/main.d.ts +6 -0
  425. package/lib/node_modules/fast-wrap-ansi/lib/main.js +219 -0
  426. package/lib/node_modules/fast-wrap-ansi/lib/main.js.map +1 -0
  427. package/lib/node_modules/fast-wrap-ansi/package.json +51 -0
  428. package/lib/node_modules/jsonc-parser/CHANGELOG.md +76 -0
  429. package/lib/node_modules/jsonc-parser/LICENSE.md +21 -0
  430. package/lib/node_modules/jsonc-parser/README.md +364 -0
  431. package/lib/node_modules/jsonc-parser/SECURITY.md +41 -0
  432. package/lib/node_modules/jsonc-parser/lib/esm/impl/edit.js +185 -0
  433. package/lib/node_modules/jsonc-parser/lib/esm/impl/format.js +261 -0
  434. package/lib/node_modules/jsonc-parser/lib/esm/impl/parser.js +659 -0
  435. package/lib/node_modules/jsonc-parser/lib/esm/impl/scanner.js +443 -0
  436. package/lib/node_modules/jsonc-parser/lib/esm/impl/string-intern.js +29 -0
  437. package/lib/node_modules/jsonc-parser/lib/esm/main.d.ts +351 -0
  438. package/lib/node_modules/jsonc-parser/lib/esm/main.js +178 -0
  439. package/lib/node_modules/jsonc-parser/lib/umd/impl/edit.js +201 -0
  440. package/lib/node_modules/jsonc-parser/lib/umd/impl/format.js +275 -0
  441. package/lib/node_modules/jsonc-parser/lib/umd/impl/parser.js +682 -0
  442. package/lib/node_modules/jsonc-parser/lib/umd/impl/scanner.js +456 -0
  443. package/lib/node_modules/jsonc-parser/lib/umd/impl/string-intern.js +42 -0
  444. package/lib/node_modules/jsonc-parser/lib/umd/main.d.ts +351 -0
  445. package/lib/node_modules/jsonc-parser/lib/umd/main.js +194 -0
  446. package/lib/node_modules/jsonc-parser/package.json +37 -0
  447. package/lib/node_modules/picomatch/LICENSE +21 -0
  448. package/lib/node_modules/picomatch/README.md +738 -0
  449. package/lib/node_modules/picomatch/index.js +17 -0
  450. package/lib/node_modules/picomatch/lib/constants.js +180 -0
  451. package/lib/node_modules/picomatch/lib/parse.js +1085 -0
  452. package/lib/node_modules/picomatch/lib/picomatch.js +341 -0
  453. package/lib/node_modules/picomatch/lib/scan.js +391 -0
  454. package/lib/node_modules/picomatch/lib/utils.js +72 -0
  455. package/lib/node_modules/picomatch/package.json +83 -0
  456. package/lib/node_modules/picomatch/posix.js +3 -0
  457. package/lib/node_modules/sisteransi/license +21 -0
  458. package/lib/node_modules/sisteransi/package.json +34 -0
  459. package/lib/node_modules/sisteransi/readme.md +113 -0
  460. package/lib/node_modules/sisteransi/src/index.js +58 -0
  461. package/lib/node_modules/sisteransi/src/sisteransi.d.ts +35 -0
  462. package/lib/node_modules/tree-sitter-wasms/LICENSE +24 -0
  463. package/lib/node_modules/tree-sitter-wasms/README.md +23 -0
  464. package/lib/node_modules/tree-sitter-wasms/out/tree-sitter-bash.wasm +0 -0
  465. package/lib/node_modules/tree-sitter-wasms/out/tree-sitter-c.wasm +0 -0
  466. package/lib/node_modules/tree-sitter-wasms/out/tree-sitter-c_sharp.wasm +0 -0
  467. package/lib/node_modules/tree-sitter-wasms/out/tree-sitter-cpp.wasm +0 -0
  468. package/lib/node_modules/tree-sitter-wasms/out/tree-sitter-css.wasm +0 -0
  469. package/lib/node_modules/tree-sitter-wasms/out/tree-sitter-dart.wasm +0 -0
  470. package/lib/node_modules/tree-sitter-wasms/out/tree-sitter-elisp.wasm +0 -0
  471. package/lib/node_modules/tree-sitter-wasms/out/tree-sitter-elixir.wasm +0 -0
  472. package/lib/node_modules/tree-sitter-wasms/out/tree-sitter-elm.wasm +0 -0
  473. package/lib/node_modules/tree-sitter-wasms/out/tree-sitter-embedded_template.wasm +0 -0
  474. package/lib/node_modules/tree-sitter-wasms/out/tree-sitter-go.wasm +0 -0
  475. package/lib/node_modules/tree-sitter-wasms/out/tree-sitter-html.wasm +0 -0
  476. package/lib/node_modules/tree-sitter-wasms/out/tree-sitter-java.wasm +0 -0
  477. package/lib/node_modules/tree-sitter-wasms/out/tree-sitter-javascript.wasm +0 -0
  478. package/lib/node_modules/tree-sitter-wasms/out/tree-sitter-json.wasm +0 -0
  479. package/lib/node_modules/tree-sitter-wasms/out/tree-sitter-kotlin.wasm +0 -0
  480. package/lib/node_modules/tree-sitter-wasms/out/tree-sitter-lua.wasm +0 -0
  481. package/lib/node_modules/tree-sitter-wasms/out/tree-sitter-objc.wasm +0 -0
  482. package/lib/node_modules/tree-sitter-wasms/out/tree-sitter-ocaml.wasm +0 -0
  483. package/lib/node_modules/tree-sitter-wasms/out/tree-sitter-php.wasm +0 -0
  484. package/lib/node_modules/tree-sitter-wasms/out/tree-sitter-python.wasm +0 -0
  485. package/lib/node_modules/tree-sitter-wasms/out/tree-sitter-ql.wasm +0 -0
  486. package/lib/node_modules/tree-sitter-wasms/out/tree-sitter-rescript.wasm +0 -0
  487. package/lib/node_modules/tree-sitter-wasms/out/tree-sitter-ruby.wasm +0 -0
  488. package/lib/node_modules/tree-sitter-wasms/out/tree-sitter-rust.wasm +0 -0
  489. package/lib/node_modules/tree-sitter-wasms/out/tree-sitter-scala.wasm +0 -0
  490. package/lib/node_modules/tree-sitter-wasms/out/tree-sitter-solidity.wasm +0 -0
  491. package/lib/node_modules/tree-sitter-wasms/out/tree-sitter-swift.wasm +0 -0
  492. package/lib/node_modules/tree-sitter-wasms/out/tree-sitter-systemrdl.wasm +0 -0
  493. package/lib/node_modules/tree-sitter-wasms/out/tree-sitter-tlaplus.wasm +0 -0
  494. package/lib/node_modules/tree-sitter-wasms/out/tree-sitter-toml.wasm +0 -0
  495. package/lib/node_modules/tree-sitter-wasms/out/tree-sitter-tsx.wasm +0 -0
  496. package/lib/node_modules/tree-sitter-wasms/out/tree-sitter-typescript.wasm +0 -0
  497. package/lib/node_modules/tree-sitter-wasms/out/tree-sitter-vue.wasm +0 -0
  498. package/lib/node_modules/tree-sitter-wasms/out/tree-sitter-yaml.wasm +0 -0
  499. package/lib/node_modules/tree-sitter-wasms/out/tree-sitter-zig.wasm +0 -0
  500. package/lib/node_modules/tree-sitter-wasms/package.json +64 -0
  501. package/lib/node_modules/web-tree-sitter/LICENSE +21 -0
  502. package/lib/node_modules/web-tree-sitter/README.md +269 -0
  503. package/lib/node_modules/web-tree-sitter/debug/tree-sitter.cjs +4558 -0
  504. package/lib/node_modules/web-tree-sitter/debug/tree-sitter.cjs.map +7 -0
  505. package/lib/node_modules/web-tree-sitter/debug/tree-sitter.js +4516 -0
  506. package/lib/node_modules/web-tree-sitter/debug/tree-sitter.js.map +7 -0
  507. package/lib/node_modules/web-tree-sitter/debug/tree-sitter.wasm +0 -0
  508. package/lib/node_modules/web-tree-sitter/debug/tree-sitter.wasm.map +31 -0
  509. package/lib/node_modules/web-tree-sitter/lib/alloc.c +48 -0
  510. package/lib/node_modules/web-tree-sitter/lib/alloc.h +41 -0
  511. package/lib/node_modules/web-tree-sitter/lib/array.h +291 -0
  512. package/lib/node_modules/web-tree-sitter/lib/atomic.h +68 -0
  513. package/lib/node_modules/web-tree-sitter/lib/clock.h +146 -0
  514. package/lib/node_modules/web-tree-sitter/lib/error_costs.h +11 -0
  515. package/lib/node_modules/web-tree-sitter/lib/get_changed_ranges.c +523 -0
  516. package/lib/node_modules/web-tree-sitter/lib/get_changed_ranges.h +36 -0
  517. package/lib/node_modules/web-tree-sitter/lib/host.h +21 -0
  518. package/lib/node_modules/web-tree-sitter/lib/language.c +293 -0
  519. package/lib/node_modules/web-tree-sitter/lib/language.h +293 -0
  520. package/lib/node_modules/web-tree-sitter/lib/length.h +52 -0
  521. package/lib/node_modules/web-tree-sitter/lib/lexer.c +483 -0
  522. package/lib/node_modules/web-tree-sitter/lib/lexer.h +54 -0
  523. package/lib/node_modules/web-tree-sitter/lib/lib.c +12 -0
  524. package/lib/node_modules/web-tree-sitter/lib/node.c +875 -0
  525. package/lib/node_modules/web-tree-sitter/lib/parser.c +2297 -0
  526. package/lib/node_modules/web-tree-sitter/lib/parser.h +286 -0
  527. package/lib/node_modules/web-tree-sitter/lib/point.h +48 -0
  528. package/lib/node_modules/web-tree-sitter/lib/query.c +4347 -0
  529. package/lib/node_modules/web-tree-sitter/lib/reduce_action.h +34 -0
  530. package/lib/node_modules/web-tree-sitter/lib/reusable_node.h +95 -0
  531. package/lib/node_modules/web-tree-sitter/lib/stack.c +912 -0
  532. package/lib/node_modules/web-tree-sitter/lib/stack.h +133 -0
  533. package/lib/node_modules/web-tree-sitter/lib/subtree.c +1034 -0
  534. package/lib/node_modules/web-tree-sitter/lib/subtree.h +399 -0
  535. package/lib/node_modules/web-tree-sitter/lib/tree-sitter.c +987 -0
  536. package/lib/node_modules/web-tree-sitter/lib/tree-sitter.cjs +2988 -0
  537. package/lib/node_modules/web-tree-sitter/lib/tree-sitter.wasm +0 -0
  538. package/lib/node_modules/web-tree-sitter/lib/tree-sitter.wasm.map +1 -0
  539. package/lib/node_modules/web-tree-sitter/lib/tree.c +170 -0
  540. package/lib/node_modules/web-tree-sitter/lib/tree.h +31 -0
  541. package/lib/node_modules/web-tree-sitter/lib/tree_cursor.c +716 -0
  542. package/lib/node_modules/web-tree-sitter/lib/tree_cursor.h +48 -0
  543. package/lib/node_modules/web-tree-sitter/lib/ts_assert.h +11 -0
  544. package/lib/node_modules/web-tree-sitter/lib/unicode.h +75 -0
  545. package/lib/node_modules/web-tree-sitter/lib/wasm_store.c +1937 -0
  546. package/lib/node_modules/web-tree-sitter/lib/wasm_store.h +31 -0
  547. package/lib/node_modules/web-tree-sitter/package.json +98 -0
  548. package/lib/node_modules/web-tree-sitter/src/bindings.ts +26 -0
  549. package/lib/node_modules/web-tree-sitter/src/constants.ts +133 -0
  550. package/lib/node_modules/web-tree-sitter/src/index.ts +31 -0
  551. package/lib/node_modules/web-tree-sitter/src/language.ts +291 -0
  552. package/lib/node_modules/web-tree-sitter/src/lookahead_iterator.ts +75 -0
  553. package/lib/node_modules/web-tree-sitter/src/marshal.ts +176 -0
  554. package/lib/node_modules/web-tree-sitter/src/node.ts +646 -0
  555. package/lib/node_modules/web-tree-sitter/src/parser.ts +325 -0
  556. package/lib/node_modules/web-tree-sitter/src/query.ts +973 -0
  557. package/lib/node_modules/web-tree-sitter/src/tree.ts +145 -0
  558. package/lib/node_modules/web-tree-sitter/src/tree_cursor.ts +318 -0
  559. package/lib/node_modules/web-tree-sitter/tree-sitter.cjs +4031 -0
  560. package/lib/node_modules/web-tree-sitter/tree-sitter.cjs.map +7 -0
  561. package/lib/node_modules/web-tree-sitter/tree-sitter.js +3980 -0
  562. package/lib/node_modules/web-tree-sitter/tree-sitter.js.map +7 -0
  563. package/lib/node_modules/web-tree-sitter/tree-sitter.wasm +0 -0
  564. package/lib/node_modules/web-tree-sitter/tree-sitter.wasm.map +30 -0
  565. package/lib/node_modules/web-tree-sitter/web-tree-sitter.d.ts +1030 -0
  566. package/lib/node_modules/web-tree-sitter/web-tree-sitter.d.ts.map +56 -0
  567. package/lib/package.json +55 -0
  568. package/node +0 -0
  569. package/package.json +17 -0
@@ -0,0 +1,83 @@
1
+ "use strict";
2
+ /**
3
+ * Registry of all known agent targets.
4
+ *
5
+ * Adding a new target = create `targets/<id>.ts` exporting an
6
+ * `AgentTarget`, then add it to the array below. Order here is the
7
+ * order they appear in the multiselect prompt, in `--target=all`,
8
+ * and in `--print-config`'s help listing — keep it stable.
9
+ */
10
+ Object.defineProperty(exports, "__esModule", { value: true });
11
+ exports.ALL_TARGETS = void 0;
12
+ exports.getTarget = getTarget;
13
+ exports.listTargetIds = listTargetIds;
14
+ exports.detectAll = detectAll;
15
+ exports.resolveTargetFlag = resolveTargetFlag;
16
+ const claude_1 = require("./claude");
17
+ const cursor_1 = require("./cursor");
18
+ const codex_1 = require("./codex");
19
+ const opencode_1 = require("./opencode");
20
+ exports.ALL_TARGETS = Object.freeze([
21
+ claude_1.claudeTarget,
22
+ cursor_1.cursorTarget,
23
+ codex_1.codexTarget,
24
+ opencode_1.opencodeTarget,
25
+ ]);
26
+ function getTarget(id) {
27
+ return exports.ALL_TARGETS.find((t) => t.id === id);
28
+ }
29
+ function listTargetIds() {
30
+ return exports.ALL_TARGETS.map((t) => t.id);
31
+ }
32
+ /**
33
+ * Run `detect()` for every target at the given location. Returns the
34
+ * full registry zipped with detection results — orchestrator uses
35
+ * this to seed the multiselect prompt with installed agents
36
+ * pre-checked.
37
+ */
38
+ function detectAll(loc) {
39
+ return exports.ALL_TARGETS.map((target) => ({
40
+ target,
41
+ detection: target.detect(loc),
42
+ }));
43
+ }
44
+ /**
45
+ * Resolve a `--target=` flag value to a list of `AgentTarget`
46
+ * instances. Accepts:
47
+ *
48
+ * - `auto` — return all targets whose `detect().installed` is true,
49
+ * or `['claude']` as a fallback if none detected (least-surprise
50
+ * for existing users).
51
+ * - `all` — every target in the registry.
52
+ * - `none` — empty list (caller skips agent writes entirely).
53
+ * - csv list — `'claude,cursor'` etc. Unknown ids throw.
54
+ */
55
+ function resolveTargetFlag(value, loc) {
56
+ if (value === 'none')
57
+ return [];
58
+ if (value === 'all')
59
+ return [...exports.ALL_TARGETS];
60
+ if (value === 'auto') {
61
+ const detected = detectAll(loc).filter(({ detection }) => detection.installed);
62
+ if (detected.length > 0)
63
+ return detected.map(({ target }) => target);
64
+ const fallback = getTarget('claude');
65
+ return fallback ? [fallback] : [];
66
+ }
67
+ const ids = value.split(',').map((s) => s.trim()).filter(Boolean);
68
+ const resolved = [];
69
+ const unknown = [];
70
+ for (const id of ids) {
71
+ const t = getTarget(id);
72
+ if (t)
73
+ resolved.push(t);
74
+ else
75
+ unknown.push(id);
76
+ }
77
+ if (unknown.length > 0) {
78
+ const known = listTargetIds().join(', ');
79
+ throw new Error(`Unknown --target id(s): ${unknown.join(', ')}. Known: ${known}, plus 'auto' / 'all' / 'none'.`);
80
+ }
81
+ return resolved;
82
+ }
83
+ //# sourceMappingURL=registry.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"registry.js","sourceRoot":"","sources":["../../../src/installer/targets/registry.ts"],"names":[],"mappings":";AAAA;;;;;;;GAOG;;;AAeH,8BAEC;AAED,sCAEC;AAQD,8BAQC;AAaD,8CAyBC;AAxED,qCAAwC;AACxC,qCAAwC;AACxC,mCAAsC;AACtC,yCAA4C;AAE/B,QAAA,WAAW,GAA2B,MAAM,CAAC,MAAM,CAAC;IAC/D,qBAAY;IACZ,qBAAY;IACZ,mBAAW;IACX,yBAAc;CACf,CAAC,CAAC;AAEH,SAAgB,SAAS,CAAC,EAAU;IAClC,OAAO,mBAAW,CAAC,IAAI,CAAC,CAAC,CAAC,EAAE,EAAE,CAAC,CAAC,CAAC,EAAE,KAAK,EAAE,CAAC,CAAC;AAC9C,CAAC;AAED,SAAgB,aAAa;IAC3B,OAAO,mBAAW,CAAC,GAAG,CAAC,CAAC,CAAC,EAAE,EAAE,CAAC,CAAC,CAAC,EAAE,CAAC,CAAC;AACtC,CAAC;AAED;;;;;GAKG;AACH,SAAgB,SAAS,CAAC,GAAa;IAIrC,OAAO,mBAAW,CAAC,GAAG,CAAC,CAAC,MAAM,EAAE,EAAE,CAAC,CAAC;QAClC,MAAM;QACN,SAAS,EAAE,MAAM,CAAC,MAAM,CAAC,GAAG,CAAC;KAC9B,CAAC,CAAC,CAAC;AACN,CAAC;AAED;;;;;;;;;;GAUG;AACH,SAAgB,iBAAiB,CAAC,KAAa,EAAE,GAAa;IAC5D,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ACb,2BAA2B,OAAO,CAAC,IAAI,CAAC,IAAI,CAAC,YAAY,KAAK,iCAAiC,CAChG,CAAC;IACJ,CAAC;IACD,OAAO,QAAQ,CAAC;AAClB,CAAC"}
@@ -0,0 +1,77 @@
1
+ /**
2
+ * Helpers shared across `AgentTarget` implementations.
3
+ *
4
+ * Lifted from the original `config-writer.ts` so each target can
5
+ * compose them without inheritance. Kept deliberately small — the
6
+ * targets are different enough (JSON vs TOML vs Markdown, varying
7
+ * idempotency markers) that a base class would force the awkward
8
+ * shape onto everyone.
9
+ */
10
+ /**
11
+ * The MCP-server config block codegraph injects. Same shape across
12
+ * all JSON-shaped agent configs (Claude, Cursor, opencode), only the
13
+ * surrounding wrapper differs. Codex (TOML) builds its own block.
14
+ */
15
+ export declare function getMcpServerConfig(): {
16
+ type: string;
17
+ command: string;
18
+ args: string[];
19
+ };
20
+ /**
21
+ * Permissions list for Claude `settings.json`. Other targets that
22
+ * have a permissions concept can compose this list directly. The
23
+ * permission strings follow Claude's `mcp__<server>__<tool>` format.
24
+ */
25
+ export declare function getCodeGraphPermissions(): string[];
26
+ /**
27
+ * Read a JSON file, returning `{}` when missing or unparseable.
28
+ *
29
+ * Unparseable files are backed up to `<path>.backup` BEFORE we return
30
+ * `{}` — so an idempotent re-run never silently deletes a user's
31
+ * existing config that happened to break JSON parse temporarily.
32
+ */
33
+ export declare function readJsonFile(filePath: string): Record<string, any>;
34
+ /**
35
+ * Write a file atomically: write to `<path>.tmp.<pid>`, then rename.
36
+ *
37
+ * Prevents corruption if the process crashes mid-write. The temp
38
+ * file is cleaned up on rename failure.
39
+ */
40
+ export declare function atomicWriteFileSync(filePath: string, content: string): void;
41
+ /**
42
+ * Atomic JSON write. Trailing newline matches the convention every
43
+ * existing target had — preserves diff-friendly file shape.
44
+ */
45
+ export declare function writeJsonFile(filePath: string, data: Record<string, any>): void;
46
+ /**
47
+ * Compare two JSON values for deep equality, ignoring key order.
48
+ *
49
+ * Used for idempotency: when the on-disk config already exactly
50
+ * matches what we'd write, return action=`unchanged` instead of
51
+ * re-writing (and emitting a confusing "Updated" log line).
52
+ */
53
+ export declare function jsonDeepEqual(a: unknown, b: unknown): boolean;
54
+ /**
55
+ * Replace or append a marker-delimited section in a markdown-ish file.
56
+ *
57
+ * Used by Claude / Codex for the `<!-- CODEGRAPH_START --> ... <!--
58
+ * CODEGRAPH_END -->` block. Preserves all content outside the
59
+ * markers verbatim.
60
+ *
61
+ * Returns `created` when the file didn't exist; `updated` when
62
+ * markers were found and content swapped; `appended` when markers
63
+ * weren't found and section was added at end. `unchanged` when the
64
+ * existing block already matches `body`.
65
+ */
66
+ export declare function replaceOrAppendMarkedSection(filePath: string, body: string, startMarker: string, endMarker: string): 'created' | 'updated' | 'appended' | 'unchanged';
67
+ /**
68
+ * Inverse of `replaceOrAppendMarkedSection`. Strips the marker
69
+ * block from `filePath` if present. If the file becomes empty after
70
+ * removal, deletes the file entirely (matches the existing Claude
71
+ * uninstall behavior).
72
+ *
73
+ * Returns `removed` when content was stripped, `not-found` when
74
+ * the markers weren't present, `kept` when the file didn't exist.
75
+ */
76
+ export declare function removeMarkedSection(filePath: string, startMarker: string, endMarker: string): 'removed' | 'not-found' | 'kept';
77
+ //# sourceMappingURL=shared.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"shared.d.ts","sourceRoot":"","sources":["../../../src/installer/targets/shared.ts"],"names":[],"mappings":"AAAA;;;;;;;;GAQG;AAKH;;;;GAIG;AACH,wBAAgB,kBAAkB,IAAI;IAAE,IAAI,EAAE,MAAM,CAAC;IAAC,OAAO,EAAE,MAAM,CAAC;IAAC,IAAI,EAAE,MAAM,EAAE,CAAA;CAAE,CAMtF;AAED;;;;GAIG;AACH,wBAAgB,uBAAuB,IAAI,MAAM,EAAE,CAUlD;AAED;;;;;;GAMG;AACH,wBAAgB,YAAY,CAAC,QAAQ,EAAE,MAAM,GAAG,MAAM,CAAC,MAAM,EAAE,GAAG,CAAC,CAelE;AAED;;;;;GAKG;AACH,wBAAgB,mBAAmB,CAAC,QAAQ,EAAE,MAAM,EAAE,OAAO,EAAE,MAAM,GAAG,IAAI,CAa3E;AAED;;;GAGG;AACH,wBAAgB,aAAa,CAAC,QAAQ,EAAE,MAAM,EAAE,IAAI,EAAE,MAAM,CAAC,MAAM,EAAE,GAAG,CAAC,GAAG,IAAI,CAE/E;AAED;;;;;;GAMG;AACH,wBAAgB,aAAa,CAAC,CAAC,EAAE,OAAO,EAAE,CAAC,EAAE,OAAO,GAAG,OAAO,CAiB7D;AAED;;;;;;;;;;;GAWG;AACH,wBAAgB,4BAA4B,CAC1C,QAAQ,EAAE,MAAM,EAChB,IAAI,EAAE,MAAM,EACZ,WAAW,EAAE,MAAM,EACnB,SAAS,EAAE,MAAM,GAChB,SAAS,GAAG,SAAS,GAAG,UAAU,GAAG,WAAW,CA2BlD;AAED;;;;;;;;GAQG;AACH,wBAAgB,mBAAmB,CACjC,QAAQ,EAAE,MAAM,EAChB,WAAW,EAAE,MAAM,EACnB,SAAS,EAAE,MAAM,GAChB,SAAS,GAAG,WAAW,GAAG,MAAM,CAwBlC"}
@@ -0,0 +1,246 @@
1
+ "use strict";
2
+ /**
3
+ * Helpers shared across `AgentTarget` implementations.
4
+ *
5
+ * Lifted from the original `config-writer.ts` so each target can
6
+ * compose them without inheritance. Kept deliberately small — the
7
+ * targets are different enough (JSON vs TOML vs Markdown, varying
8
+ * idempotency markers) that a base class would force the awkward
9
+ * shape onto everyone.
10
+ */
11
+ var __createBinding = (this && this.__createBinding) || (Object.create ? (function(o, m, k, k2) {
12
+ if (k2 === undefined) k2 = k;
13
+ var desc = Object.getOwnPropertyDescriptor(m, k);
14
+ if (!desc || ("get" in desc ? !m.__esModule : desc.writable || desc.configurable)) {
15
+ desc = { enumerable: true, get: function() { return m[k]; } };
16
+ }
17
+ Object.defineProperty(o, k2, desc);
18
+ }) : (function(o, m, k, k2) {
19
+ if (k2 === undefined) k2 = k;
20
+ o[k2] = m[k];
21
+ }));
22
+ var __setModuleDefault = (this && this.__setModuleDefault) || (Object.create ? (function(o, v) {
23
+ Object.defineProperty(o, "default", { enumerable: true, value: v });
24
+ }) : function(o, v) {
25
+ o["default"] = v;
26
+ });
27
+ var __importStar = (this && this.__importStar) || (function () {
28
+ var ownKeys = function(o) {
29
+ ownKeys = Object.getOwnPropertyNames || function (o) {
30
+ var ar = [];
31
+ for (var k in o) if (Object.prototype.hasOwnProperty.call(o, k)) ar[ar.length] = k;
32
+ return ar;
33
+ };
34
+ return ownKeys(o);
35
+ };
36
+ return function (mod) {
37
+ if (mod && mod.__esModule) return mod;
38
+ var result = {};
39
+ if (mod != null) for (var k = ownKeys(mod), i = 0; i < k.length; i++) if (k[i] !== "default") __createBinding(result, mod, k[i]);
40
+ __setModuleDefault(result, mod);
41
+ return result;
42
+ };
43
+ })();
44
+ Object.defineProperty(exports, "__esModule", { value: true });
45
+ exports.getMcpServerConfig = getMcpServerConfig;
46
+ exports.getCodeGraphPermissions = getCodeGraphPermissions;
47
+ exports.readJsonFile = readJsonFile;
48
+ exports.atomicWriteFileSync = atomicWriteFileSync;
49
+ exports.writeJsonFile = writeJsonFile;
50
+ exports.jsonDeepEqual = jsonDeepEqual;
51
+ exports.replaceOrAppendMarkedSection = replaceOrAppendMarkedSection;
52
+ exports.removeMarkedSection = removeMarkedSection;
53
+ const fs = __importStar(require("fs"));
54
+ const path = __importStar(require("path"));
55
+ /**
56
+ * The MCP-server config block codegraph injects. Same shape across
57
+ * all JSON-shaped agent configs (Claude, Cursor, opencode), only the
58
+ * surrounding wrapper differs. Codex (TOML) builds its own block.
59
+ */
60
+ function getMcpServerConfig() {
61
+ return {
62
+ type: 'stdio',
63
+ command: 'codegraph',
64
+ args: ['serve', '--mcp'],
65
+ };
66
+ }
67
+ /**
68
+ * Permissions list for Claude `settings.json`. Other targets that
69
+ * have a permissions concept can compose this list directly. The
70
+ * permission strings follow Claude's `mcp__<server>__<tool>` format.
71
+ */
72
+ function getCodeGraphPermissions() {
73
+ return [
74
+ 'mcp__codegraph__codegraph_search',
75
+ 'mcp__codegraph__codegraph_context',
76
+ 'mcp__codegraph__codegraph_callers',
77
+ 'mcp__codegraph__codegraph_callees',
78
+ 'mcp__codegraph__codegraph_impact',
79
+ 'mcp__codegraph__codegraph_node',
80
+ 'mcp__codegraph__codegraph_status',
81
+ ];
82
+ }
83
+ /**
84
+ * Read a JSON file, returning `{}` when missing or unparseable.
85
+ *
86
+ * Unparseable files are backed up to `<path>.backup` BEFORE we return
87
+ * `{}` — so an idempotent re-run never silently deletes a user's
88
+ * existing config that happened to break JSON parse temporarily.
89
+ */
90
+ function readJsonFile(filePath) {
91
+ if (!fs.existsSync(filePath)) {
92
+ return {};
93
+ }
94
+ try {
95
+ return JSON.parse(fs.readFileSync(filePath, 'utf-8'));
96
+ }
97
+ catch (err) {
98
+ const msg = err instanceof Error ? err.message : String(err);
99
+ console.warn(` Warning: Could not parse ${path.basename(filePath)}: ${msg}`);
100
+ console.warn(` A backup will be created before overwriting.`);
101
+ try {
102
+ fs.copyFileSync(filePath, filePath + '.backup');
103
+ }
104
+ catch { /* ignore backup failure */ }
105
+ return {};
106
+ }
107
+ }
108
+ /**
109
+ * Write a file atomically: write to `<path>.tmp.<pid>`, then rename.
110
+ *
111
+ * Prevents corruption if the process crashes mid-write. The temp
112
+ * file is cleaned up on rename failure.
113
+ */
114
+ function atomicWriteFileSync(filePath, content) {
115
+ const dir = path.dirname(filePath);
116
+ if (!fs.existsSync(dir)) {
117
+ fs.mkdirSync(dir, { recursive: true });
118
+ }
119
+ const tmpPath = filePath + '.tmp.' + process.pid;
120
+ try {
121
+ fs.writeFileSync(tmpPath, content);
122
+ fs.renameSync(tmpPath, filePath);
123
+ }
124
+ catch (err) {
125
+ try {
126
+ fs.unlinkSync(tmpPath);
127
+ }
128
+ catch { /* ignore */ }
129
+ throw err;
130
+ }
131
+ }
132
+ /**
133
+ * Atomic JSON write. Trailing newline matches the convention every
134
+ * existing target had — preserves diff-friendly file shape.
135
+ */
136
+ function writeJsonFile(filePath, data) {
137
+ atomicWriteFileSync(filePath, JSON.stringify(data, null, 2) + '\n');
138
+ }
139
+ /**
140
+ * Compare two JSON values for deep equality, ignoring key order.
141
+ *
142
+ * Used for idempotency: when the on-disk config already exactly
143
+ * matches what we'd write, return action=`unchanged` instead of
144
+ * re-writing (and emitting a confusing "Updated" log line).
145
+ */
146
+ function jsonDeepEqual(a, b) {
147
+ if (a === b)
148
+ return true;
149
+ if (typeof a !== typeof b)
150
+ return false;
151
+ if (a === null || b === null)
152
+ return a === b;
153
+ if (typeof a !== 'object')
154
+ return false;
155
+ if (Array.isArray(a) !== Array.isArray(b))
156
+ return false;
157
+ if (Array.isArray(a) && Array.isArray(b)) {
158
+ if (a.length !== b.length)
159
+ return false;
160
+ return a.every((v, i) => jsonDeepEqual(v, b[i]));
161
+ }
162
+ const ao = a;
163
+ const bo = b;
164
+ const ak = Object.keys(ao).sort();
165
+ const bk = Object.keys(bo).sort();
166
+ if (ak.length !== bk.length)
167
+ return false;
168
+ if (!ak.every((k, i) => k === bk[i]))
169
+ return false;
170
+ return ak.every((k) => jsonDeepEqual(ao[k], bo[k]));
171
+ }
172
+ /**
173
+ * Replace or append a marker-delimited section in a markdown-ish file.
174
+ *
175
+ * Used by Claude / Codex for the `<!-- CODEGRAPH_START --> ... <!--
176
+ * CODEGRAPH_END -->` block. Preserves all content outside the
177
+ * markers verbatim.
178
+ *
179
+ * Returns `created` when the file didn't exist; `updated` when
180
+ * markers were found and content swapped; `appended` when markers
181
+ * weren't found and section was added at end. `unchanged` when the
182
+ * existing block already matches `body`.
183
+ */
184
+ function replaceOrAppendMarkedSection(filePath, body, startMarker, endMarker) {
185
+ if (!fs.existsSync(filePath)) {
186
+ atomicWriteFileSync(filePath, body + '\n');
187
+ return 'created';
188
+ }
189
+ const content = fs.readFileSync(filePath, 'utf-8');
190
+ const startIdx = content.indexOf(startMarker);
191
+ const endIdx = content.indexOf(endMarker);
192
+ if (startIdx !== -1 && endIdx > startIdx) {
193
+ const existingBlock = content.substring(startIdx, endIdx + endMarker.length);
194
+ if (existingBlock === body) {
195
+ return 'unchanged';
196
+ }
197
+ const before = content.substring(0, startIdx);
198
+ const after = content.substring(endIdx + endMarker.length);
199
+ atomicWriteFileSync(filePath, before + body + after);
200
+ return 'updated';
201
+ }
202
+ // No markers — append. Preserve existing content with a separating
203
+ // blank line.
204
+ const trimmed = content.trimEnd();
205
+ const sep = trimmed.length > 0 ? '\n\n' : '';
206
+ atomicWriteFileSync(filePath, trimmed + sep + body + '\n');
207
+ return 'appended';
208
+ }
209
+ /**
210
+ * Inverse of `replaceOrAppendMarkedSection`. Strips the marker
211
+ * block from `filePath` if present. If the file becomes empty after
212
+ * removal, deletes the file entirely (matches the existing Claude
213
+ * uninstall behavior).
214
+ *
215
+ * Returns `removed` when content was stripped, `not-found` when
216
+ * the markers weren't present, `kept` when the file didn't exist.
217
+ */
218
+ function removeMarkedSection(filePath, startMarker, endMarker) {
219
+ if (!fs.existsSync(filePath))
220
+ return 'kept';
221
+ let content;
222
+ try {
223
+ content = fs.readFileSync(filePath, 'utf-8');
224
+ }
225
+ catch {
226
+ return 'kept';
227
+ }
228
+ const startIdx = content.indexOf(startMarker);
229
+ const endIdx = content.indexOf(endMarker);
230
+ if (startIdx === -1 || endIdx <= startIdx)
231
+ return 'not-found';
232
+ const before = content.substring(0, startIdx).trimEnd();
233
+ const after = content.substring(endIdx + endMarker.length).trimStart();
234
+ const joined = before + (before && after ? '\n\n' : '') + after;
235
+ if (joined.trim() === '') {
236
+ try {
237
+ fs.unlinkSync(filePath);
238
+ }
239
+ catch { /* ignore */ }
240
+ }
241
+ else {
242
+ atomicWriteFileSync(filePath, joined.trim() + '\n');
243
+ }
244
+ return 'removed';
245
+ }
246
+ //# sourceMappingURL=shared.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"shared.js","sourceRoot":"","sources":["../../../src/installer/targets/shared.ts"],"names":[],"mappings":";AAAA;;;;;;;;GAQG;;;;;;;;;;;;;;;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AAC;AACnB,CAAC"}
@@ -0,0 +1,52 @@
1
+ /**
2
+ * Tiny TOML helpers — just enough to inject / replace / remove a
3
+ * single dotted-key table block (`[mcp_servers.codegraph]`) inside an
4
+ * existing `~/.codex/config.toml`. We deliberately do NOT try to be a
5
+ * general TOML parser/serializer; that would mean pulling in a
6
+ * dependency (~50KB) for ~6 lines of output.
7
+ *
8
+ * Strategy: treat the file as text. Find the `[mcp_servers.codegraph]`
9
+ * header line, splice it (and the lines that follow it until the next
10
+ * `[...]` header or EOF) in or out. Everything outside that block is
11
+ * preserved verbatim, byte-for-byte.
12
+ *
13
+ * Limitations (acceptable for our narrow use):
14
+ * - Only handles top-level table headers; not array-of-tables or
15
+ * subtables nested inside `[mcp_servers]` itself (we always write
16
+ * the full dotted key `[mcp_servers.codegraph]`).
17
+ * - Doesn't validate sibling TOML — if the file is malformed
18
+ * elsewhere, our injection won't fix it but won't make it worse.
19
+ * - Quotes string values with double quotes; escapes `\` and `"`.
20
+ */
21
+ /**
22
+ * Serialize a record into the body lines of a TOML table. Values
23
+ * supported: string, string[]. Other types throw — the codex MCP
24
+ * config only needs these two.
25
+ */
26
+ export declare function serializeTomlTableBody(values: Record<string, string | string[]>): string;
27
+ /**
28
+ * Build a full table block: header line + body. Suitable for direct
29
+ * insertion into a TOML file.
30
+ */
31
+ export declare function buildTomlTable(header: string, values: Record<string, string | string[]>): string;
32
+ /**
33
+ * Insert or replace a top-level dotted-key TOML table block in the
34
+ * given file content. Preserves all other content verbatim.
35
+ *
36
+ * Returns `'inserted'` when the table was newly added, `'replaced'`
37
+ * when an existing one was rewritten, `'unchanged'` when the
38
+ * existing block already matches `block` byte-for-byte.
39
+ */
40
+ export declare function upsertTomlTable(fileContent: string, header: string, block: string): {
41
+ content: string;
42
+ action: 'inserted' | 'replaced' | 'unchanged';
43
+ };
44
+ /**
45
+ * Remove a top-level dotted-key TOML table block. Returns the
46
+ * possibly-empty new content + an action flag.
47
+ */
48
+ export declare function removeTomlTable(fileContent: string, header: string): {
49
+ content: string;
50
+ action: 'removed' | 'not-found';
51
+ };
52
+ //# sourceMappingURL=toml.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"toml.d.ts","sourceRoot":"","sources":["../../../src/installer/targets/toml.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;;;;;;GAmBG;AAEH;;;;GAIG;AACH,wBAAgB,sBAAsB,CAAC,MAAM,EAAE,MAAM,CAAC,MAAM,EAAE,MAAM,GAAG,MAAM,EAAE,CAAC,GAAG,MAAM,CAaxF;AAQD;;;GAGG;AACH,wBAAgB,cAAc,CAAC,MAAM,EAAE,MAAM,EAAE,MAAM,EAAE,MAAM,CAAC,MAAM,EAAE,MAAM,GAAG,MAAM,EAAE,CAAC,GAAG,MAAM,CAEhG;AAED;;;;;;;GAOG;AACH,wBAAgB,eAAe,CAC7B,WAAW,EAAE,MAAM,EACnB,MAAM,EAAE,MAAM,EACd,KAAK,EAAE,MAAM,GACZ;IAAE,OAAO,EAAE,MAAM,CAAC;IAAC,MAAM,EAAE,UAAU,GAAG,UAAU,GAAG,WAAW,CAAA;CAAE,CAkCpE;AAED;;;GAGG;AACH,wBAAgB,eAAe,CAC7B,WAAW,EAAE,MAAM,EACnB,MAAM,EAAE,MAAM,GACb;IAAE,OAAO,EAAE,MAAM,CAAC;IAAC,MAAM,EAAE,SAAS,GAAG,WAAW,CAAA;CAAE,CAUtD"}
@@ -0,0 +1,147 @@
1
+ "use strict";
2
+ /**
3
+ * Tiny TOML helpers — just enough to inject / replace / remove a
4
+ * single dotted-key table block (`[mcp_servers.codegraph]`) inside an
5
+ * existing `~/.codex/config.toml`. We deliberately do NOT try to be a
6
+ * general TOML parser/serializer; that would mean pulling in a
7
+ * dependency (~50KB) for ~6 lines of output.
8
+ *
9
+ * Strategy: treat the file as text. Find the `[mcp_servers.codegraph]`
10
+ * header line, splice it (and the lines that follow it until the next
11
+ * `[...]` header or EOF) in or out. Everything outside that block is
12
+ * preserved verbatim, byte-for-byte.
13
+ *
14
+ * Limitations (acceptable for our narrow use):
15
+ * - Only handles top-level table headers; not array-of-tables or
16
+ * subtables nested inside `[mcp_servers]` itself (we always write
17
+ * the full dotted key `[mcp_servers.codegraph]`).
18
+ * - Doesn't validate sibling TOML — if the file is malformed
19
+ * elsewhere, our injection won't fix it but won't make it worse.
20
+ * - Quotes string values with double quotes; escapes `\` and `"`.
21
+ */
22
+ Object.defineProperty(exports, "__esModule", { value: true });
23
+ exports.serializeTomlTableBody = serializeTomlTableBody;
24
+ exports.buildTomlTable = buildTomlTable;
25
+ exports.upsertTomlTable = upsertTomlTable;
26
+ exports.removeTomlTable = removeTomlTable;
27
+ /**
28
+ * Serialize a record into the body lines of a TOML table. Values
29
+ * supported: string, string[]. Other types throw — the codex MCP
30
+ * config only needs these two.
31
+ */
32
+ function serializeTomlTableBody(values) {
33
+ const lines = [];
34
+ for (const [key, value] of Object.entries(values)) {
35
+ if (typeof value === 'string') {
36
+ lines.push(`${key} = ${quoteString(value)}`);
37
+ }
38
+ else if (Array.isArray(value) && value.every((v) => typeof v === 'string')) {
39
+ const parts = value.map(quoteString).join(', ');
40
+ lines.push(`${key} = [${parts}]`);
41
+ }
42
+ else {
43
+ throw new Error(`Unsupported TOML value type for key "${key}"`);
44
+ }
45
+ }
46
+ return lines.join('\n');
47
+ }
48
+ function quoteString(s) {
49
+ // TOML basic strings: backslash and double-quote escapes; control
50
+ // chars not expected in our payload (paths/args).
51
+ return '"' + s.replace(/\\/g, '\\\\').replace(/"/g, '\\"') + '"';
52
+ }
53
+ /**
54
+ * Build a full table block: header line + body. Suitable for direct
55
+ * insertion into a TOML file.
56
+ */
57
+ function buildTomlTable(header, values) {
58
+ return `[${header}]\n${serializeTomlTableBody(values)}`;
59
+ }
60
+ /**
61
+ * Insert or replace a top-level dotted-key TOML table block in the
62
+ * given file content. Preserves all other content verbatim.
63
+ *
64
+ * Returns `'inserted'` when the table was newly added, `'replaced'`
65
+ * when an existing one was rewritten, `'unchanged'` when the
66
+ * existing block already matches `block` byte-for-byte.
67
+ */
68
+ function upsertTomlTable(fileContent, header, block) {
69
+ const headerLine = `[${header}]`;
70
+ const headerIdx = findHeaderIndex(fileContent, headerLine);
71
+ if (headerIdx === -1) {
72
+ // Insert at end with separating blank line if there's existing content.
73
+ const trimmed = fileContent.trimEnd();
74
+ const sep = trimmed.length > 0 ? '\n\n' : '';
75
+ return {
76
+ content: trimmed + sep + block + '\n',
77
+ action: 'inserted',
78
+ };
79
+ }
80
+ // Find the end of this block: next `[...]` header (at line start) or EOF.
81
+ const blockEnd = findNextTableHeader(fileContent, headerIdx + headerLine.length);
82
+ const existingBlock = fileContent.substring(headerIdx, blockEnd).replace(/\n+$/, '');
83
+ if (existingBlock === block) {
84
+ return { content: fileContent, action: 'unchanged' };
85
+ }
86
+ const before = fileContent.substring(0, headerIdx);
87
+ const after = fileContent.substring(blockEnd);
88
+ // Trim trailing blank lines from `before` (we'll re-add one) and
89
+ // leading blank lines from `after` so the file shape stays clean.
90
+ const beforeClean = before.replace(/\n+$/, '');
91
+ const afterClean = after.replace(/^\n+/, '');
92
+ const sepBefore = beforeClean.length > 0 ? '\n\n' : '';
93
+ const sepAfter = afterClean.length > 0 ? '\n\n' : '\n';
94
+ return {
95
+ content: beforeClean + sepBefore + block + sepAfter + afterClean,
96
+ action: 'replaced',
97
+ };
98
+ }
99
+ /**
100
+ * Remove a top-level dotted-key TOML table block. Returns the
101
+ * possibly-empty new content + an action flag.
102
+ */
103
+ function removeTomlTable(fileContent, header) {
104
+ const headerLine = `[${header}]`;
105
+ const headerIdx = findHeaderIndex(fileContent, headerLine);
106
+ if (headerIdx === -1)
107
+ return { content: fileContent, action: 'not-found' };
108
+ const blockEnd = findNextTableHeader(fileContent, headerIdx + headerLine.length);
109
+ const before = fileContent.substring(0, headerIdx).replace(/\n+$/, '');
110
+ const after = fileContent.substring(blockEnd).replace(/^\n+/, '');
111
+ const joined = before + (before && after ? '\n\n' : '') + after;
112
+ return { content: joined, action: 'removed' };
113
+ }
114
+ /**
115
+ * Locate the byte index of a header line (`[foo.bar]`) when it
116
+ * appears at the start of a line. Returns -1 if not found.
117
+ */
118
+ function findHeaderIndex(content, headerLine) {
119
+ // Search BOL or right after a newline.
120
+ if (content.startsWith(headerLine))
121
+ return 0;
122
+ const needle = '\n' + headerLine;
123
+ const idx = content.indexOf(needle);
124
+ return idx === -1 ? -1 : idx + 1;
125
+ }
126
+ /**
127
+ * Find the byte index of the next top-level `[...]` table header
128
+ * (excluding array-of-tables `[[...]]`) starting from `from`, or
129
+ * return content length when none.
130
+ */
131
+ function findNextTableHeader(content, from) {
132
+ // Look for "\n[" but skip "\n[[" (array of tables).
133
+ let i = from;
134
+ while (i < content.length) {
135
+ const nlIdx = content.indexOf('\n[', i);
136
+ if (nlIdx === -1)
137
+ return content.length;
138
+ if (content[nlIdx + 2] === '[') {
139
+ // [[...]] — keep searching past it.
140
+ i = nlIdx + 2;
141
+ continue;
142
+ }
143
+ return nlIdx + 1;
144
+ }
145
+ return content.length;
146
+ }
147
+ //# sourceMappingURL=toml.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"toml.js","sourceRoot":"","sources":["../../../src/installer/targets/toml.ts"],"names":[],"mappings":";AAAA;;;;;;;;;;;;;;;;;;;GAmBG;;AAOH,wDAaC;AAYD,wCAEC;AAUD,0CAsCC;AAMD,0CAaC;AAnGD;;;;GAIG;AACH,SAAgB,sBAAsB,CAAC,MAAyC;IAC9E,MAAM,KAAK,GAAa,EAAE,CAAC;IAC3B,KAAK,MAAM,CAAC,GAAG,EAAE,KAAK,CAAC,IAAI,MAAM,CAAC,OAAO,CAAC,MAAM,CAAC,EAAE,CAAC;QAClD,IAAI,OAAO,KAAK,KAAK,QAAQ,EAAE,CAAC;YAC9B,KAAK,CAAC,IAAI,CAAC,GAAG,GAAG,MAAM,WAAW,CAAC,KAAK,CAAC,EAAE,CAAC,CAAC;QAC/C,CAAC;aAAM,IAAI,KAAK,CAAC,OAAO,CAAC,KAAK,CAAC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