@eui/mcp 1.5.1 → 1.5.2

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (481) hide show
  1. package/dist/main.js +540 -209
  2. package/package.json +3 -2
  3. package/dist/config/__tests__/schema.property.test.d.ts +0 -2
  4. package/dist/config/__tests__/schema.property.test.d.ts.map +0 -1
  5. package/dist/config/__tests__/schema.property.test.js +0 -203
  6. package/dist/config/__tests__/schema.property.test.js.map +0 -1
  7. package/dist/config/__tests__/schema.test.d.ts +0 -2
  8. package/dist/config/__tests__/schema.test.d.ts.map +0 -1
  9. package/dist/config/__tests__/schema.test.js +0 -454
  10. package/dist/config/__tests__/schema.test.js.map +0 -1
  11. package/dist/config/index.d.ts +0 -6
  12. package/dist/config/index.d.ts.map +0 -1
  13. package/dist/config/index.js +0 -6
  14. package/dist/config/index.js.map +0 -1
  15. package/dist/config/loader.d.ts +0 -27
  16. package/dist/config/loader.d.ts.map +0 -1
  17. package/dist/config/loader.js +0 -224
  18. package/dist/config/loader.js.map +0 -1
  19. package/dist/config/schema.d.ts +0 -171
  20. package/dist/config/schema.d.ts.map +0 -1
  21. package/dist/config/schema.js +0 -100
  22. package/dist/config/schema.js.map +0 -1
  23. package/dist/index.d.ts +0 -3
  24. package/dist/index.d.ts.map +0 -1
  25. package/dist/index.js +0 -27
  26. package/dist/index.js.map +0 -1
  27. package/dist/loader/__tests__/cache-manager.property.test.d.ts +0 -2
  28. package/dist/loader/__tests__/cache-manager.property.test.d.ts.map +0 -1
  29. package/dist/loader/__tests__/cache-manager.property.test.js +0 -245
  30. package/dist/loader/__tests__/cache-manager.property.test.js.map +0 -1
  31. package/dist/loader/__tests__/cache-manager.test.d.ts +0 -2
  32. package/dist/loader/__tests__/cache-manager.test.d.ts.map +0 -1
  33. package/dist/loader/__tests__/cache-manager.test.js +0 -256
  34. package/dist/loader/__tests__/cache-manager.test.js.map +0 -1
  35. package/dist/loader/__tests__/documentation-loader.integration.test.d.ts +0 -2
  36. package/dist/loader/__tests__/documentation-loader.integration.test.d.ts.map +0 -1
  37. package/dist/loader/__tests__/documentation-loader.integration.test.js +0 -498
  38. package/dist/loader/__tests__/documentation-loader.integration.test.js.map +0 -1
  39. package/dist/loader/__tests__/documentation-loader.property.test.d.ts +0 -2
  40. package/dist/loader/__tests__/documentation-loader.property.test.d.ts.map +0 -1
  41. package/dist/loader/__tests__/documentation-loader.property.test.js +0 -258
  42. package/dist/loader/__tests__/documentation-loader.property.test.js.map +0 -1
  43. package/dist/loader/__tests__/errors.test.d.ts +0 -2
  44. package/dist/loader/__tests__/errors.test.d.ts.map +0 -1
  45. package/dist/loader/__tests__/errors.test.js +0 -132
  46. package/dist/loader/__tests__/errors.test.js.map +0 -1
  47. package/dist/loader/__tests__/http-client.property.test.d.ts +0 -2
  48. package/dist/loader/__tests__/http-client.property.test.d.ts.map +0 -1
  49. package/dist/loader/__tests__/http-client.property.test.js +0 -288
  50. package/dist/loader/__tests__/http-client.property.test.js.map +0 -1
  51. package/dist/loader/__tests__/http-client.test.d.ts +0 -2
  52. package/dist/loader/__tests__/http-client.test.d.ts.map +0 -1
  53. package/dist/loader/__tests__/http-client.test.js +0 -497
  54. package/dist/loader/__tests__/http-client.test.js.map +0 -1
  55. package/dist/loader/__tests__/local-documentation-source.property.test.d.ts +0 -2
  56. package/dist/loader/__tests__/local-documentation-source.property.test.d.ts.map +0 -1
  57. package/dist/loader/__tests__/local-documentation-source.property.test.js +0 -373
  58. package/dist/loader/__tests__/local-documentation-source.property.test.js.map +0 -1
  59. package/dist/loader/__tests__/local-documentation-source.test.d.ts +0 -2
  60. package/dist/loader/__tests__/local-documentation-source.test.d.ts.map +0 -1
  61. package/dist/loader/__tests__/local-documentation-source.test.js +0 -544
  62. package/dist/loader/__tests__/local-documentation-source.test.js.map +0 -1
  63. package/dist/loader/__tests__/path-type-detector.property.test.d.ts +0 -2
  64. package/dist/loader/__tests__/path-type-detector.property.test.d.ts.map +0 -1
  65. package/dist/loader/__tests__/path-type-detector.property.test.js +0 -245
  66. package/dist/loader/__tests__/path-type-detector.property.test.js.map +0 -1
  67. package/dist/loader/__tests__/path-type-detector.test.d.ts +0 -2
  68. package/dist/loader/__tests__/path-type-detector.test.d.ts.map +0 -1
  69. package/dist/loader/__tests__/path-type-detector.test.js +0 -390
  70. package/dist/loader/__tests__/path-type-detector.test.js.map +0 -1
  71. package/dist/loader/__tests__/remote-documentation-source.property.test.d.ts +0 -2
  72. package/dist/loader/__tests__/remote-documentation-source.property.test.d.ts.map +0 -1
  73. package/dist/loader/__tests__/remote-documentation-source.property.test.js +0 -462
  74. package/dist/loader/__tests__/remote-documentation-source.property.test.js.map +0 -1
  75. package/dist/loader/__tests__/remote-documentation-source.test.d.ts +0 -2
  76. package/dist/loader/__tests__/remote-documentation-source.test.d.ts.map +0 -1
  77. package/dist/loader/__tests__/remote-documentation-source.test.js +0 -707
  78. package/dist/loader/__tests__/remote-documentation-source.test.js.map +0 -1
  79. package/dist/loader/cache-manager.d.ts +0 -74
  80. package/dist/loader/cache-manager.d.ts.map +0 -1
  81. package/dist/loader/cache-manager.js +0 -107
  82. package/dist/loader/cache-manager.js.map +0 -1
  83. package/dist/loader/documentation-loader.d.ts +0 -57
  84. package/dist/loader/documentation-loader.d.ts.map +0 -1
  85. package/dist/loader/documentation-loader.js +0 -85
  86. package/dist/loader/documentation-loader.js.map +0 -1
  87. package/dist/loader/documentation-source.d.ts +0 -37
  88. package/dist/loader/documentation-source.d.ts.map +0 -1
  89. package/dist/loader/documentation-source.js +0 -2
  90. package/dist/loader/documentation-source.js.map +0 -1
  91. package/dist/loader/errors.d.ts +0 -34
  92. package/dist/loader/errors.d.ts.map +0 -1
  93. package/dist/loader/errors.js +0 -65
  94. package/dist/loader/errors.js.map +0 -1
  95. package/dist/loader/http-client.d.ts +0 -43
  96. package/dist/loader/http-client.d.ts.map +0 -1
  97. package/dist/loader/http-client.js +0 -144
  98. package/dist/loader/http-client.js.map +0 -1
  99. package/dist/loader/index.d.ts +0 -6
  100. package/dist/loader/index.d.ts.map +0 -1
  101. package/dist/loader/index.js +0 -5
  102. package/dist/loader/index.js.map +0 -1
  103. package/dist/loader/local-documentation-source.d.ts +0 -62
  104. package/dist/loader/local-documentation-source.d.ts.map +0 -1
  105. package/dist/loader/local-documentation-source.js +0 -192
  106. package/dist/loader/local-documentation-source.js.map +0 -1
  107. package/dist/loader/path-type-detector.d.ts +0 -34
  108. package/dist/loader/path-type-detector.d.ts.map +0 -1
  109. package/dist/loader/path-type-detector.js +0 -78
  110. package/dist/loader/path-type-detector.js.map +0 -1
  111. package/dist/loader/remote-documentation-source.d.ts +0 -108
  112. package/dist/loader/remote-documentation-source.d.ts.map +0 -1
  113. package/dist/loader/remote-documentation-source.js +0 -250
  114. package/dist/loader/remote-documentation-source.js.map +0 -1
  115. package/dist/main.d.ts +0 -2
  116. package/dist/main.d.ts.map +0 -1
  117. package/dist/main.js.map +0 -1
  118. package/dist/mcp/__tests__/server.property.test.d.ts +0 -2
  119. package/dist/mcp/__tests__/server.property.test.d.ts.map +0 -1
  120. package/dist/mcp/__tests__/server.property.test.js +0 -286
  121. package/dist/mcp/__tests__/server.property.test.js.map +0 -1
  122. package/dist/mcp/__tests__/server.test.d.ts +0 -2
  123. package/dist/mcp/__tests__/server.test.d.ts.map +0 -1
  124. package/dist/mcp/__tests__/server.test.js +0 -101
  125. package/dist/mcp/__tests__/server.test.js.map +0 -1
  126. package/dist/mcp/index.d.ts +0 -5
  127. package/dist/mcp/index.d.ts.map +0 -1
  128. package/dist/mcp/index.js +0 -5
  129. package/dist/mcp/index.js.map +0 -1
  130. package/dist/mcp/server.d.ts +0 -65
  131. package/dist/mcp/server.d.ts.map +0 -1
  132. package/dist/mcp/server.js +0 -242
  133. package/dist/mcp/server.js.map +0 -1
  134. package/dist/publish/__tests__/publish-utils.test.d.ts +0 -5
  135. package/dist/publish/__tests__/publish-utils.test.d.ts.map +0 -1
  136. package/dist/publish/__tests__/publish-utils.test.js +0 -189
  137. package/dist/publish/__tests__/publish-utils.test.js.map +0 -1
  138. package/dist/publish/index.d.ts +0 -8
  139. package/dist/publish/index.d.ts.map +0 -1
  140. package/dist/publish/index.js +0 -8
  141. package/dist/publish/index.js.map +0 -1
  142. package/dist/publish/publish-utils.d.ts +0 -74
  143. package/dist/publish/publish-utils.d.ts.map +0 -1
  144. package/dist/publish/publish-utils.js +0 -170
  145. package/dist/publish/publish-utils.js.map +0 -1
  146. package/dist/query/__tests__/deprecation-parser.test.d.ts +0 -2
  147. package/dist/query/__tests__/deprecation-parser.test.d.ts.map +0 -1
  148. package/dist/query/__tests__/deprecation-parser.test.js +0 -154
  149. package/dist/query/__tests__/deprecation-parser.test.js.map +0 -1
  150. package/dist/query/__tests__/deprecation-query.test.d.ts +0 -2
  151. package/dist/query/__tests__/deprecation-query.test.d.ts.map +0 -1
  152. package/dist/query/__tests__/deprecation-query.test.js +0 -199
  153. package/dist/query/__tests__/deprecation-query.test.js.map +0 -1
  154. package/dist/query/__tests__/index-builder-debug.test.d.ts +0 -2
  155. package/dist/query/__tests__/index-builder-debug.test.d.ts.map +0 -1
  156. package/dist/query/__tests__/index-builder-debug.test.js +0 -34
  157. package/dist/query/__tests__/index-builder-debug.test.js.map +0 -1
  158. package/dist/query/__tests__/index-builder.property.test.d.ts +0 -2
  159. package/dist/query/__tests__/index-builder.property.test.d.ts.map +0 -1
  160. package/dist/query/__tests__/index-builder.property.test.js +0 -422
  161. package/dist/query/__tests__/index-builder.property.test.js.map +0 -1
  162. package/dist/query/__tests__/index-builder.test.d.ts +0 -2
  163. package/dist/query/__tests__/index-builder.test.d.ts.map +0 -1
  164. package/dist/query/__tests__/index-builder.test.js +0 -55
  165. package/dist/query/__tests__/index-builder.test.js.map +0 -1
  166. package/dist/query/__tests__/result-formatter-deprecation.test.d.ts +0 -2
  167. package/dist/query/__tests__/result-formatter-deprecation.test.d.ts.map +0 -1
  168. package/dist/query/__tests__/result-formatter-deprecation.test.js +0 -159
  169. package/dist/query/__tests__/result-formatter-deprecation.test.js.map +0 -1
  170. package/dist/query/__tests__/result-formatter.integration.test.d.ts +0 -2
  171. package/dist/query/__tests__/result-formatter.integration.test.d.ts.map +0 -1
  172. package/dist/query/__tests__/result-formatter.integration.test.js +0 -140
  173. package/dist/query/__tests__/result-formatter.integration.test.js.map +0 -1
  174. package/dist/query/__tests__/result-formatter.property.test.d.ts +0 -2
  175. package/dist/query/__tests__/result-formatter.property.test.d.ts.map +0 -1
  176. package/dist/query/__tests__/result-formatter.property.test.js +0 -163
  177. package/dist/query/__tests__/result-formatter.property.test.js.map +0 -1
  178. package/dist/query/__tests__/result-formatter.test.d.ts +0 -2
  179. package/dist/query/__tests__/result-formatter.test.d.ts.map +0 -1
  180. package/dist/query/__tests__/result-formatter.test.js +0 -85
  181. package/dist/query/__tests__/result-formatter.test.js.map +0 -1
  182. package/dist/query/__tests__/search-engine.property.test.d.ts +0 -2
  183. package/dist/query/__tests__/search-engine.property.test.d.ts.map +0 -1
  184. package/dist/query/__tests__/search-engine.property.test.js +0 -389
  185. package/dist/query/__tests__/search-engine.property.test.js.map +0 -1
  186. package/dist/query/component-query.d.ts +0 -33
  187. package/dist/query/component-query.d.ts.map +0 -1
  188. package/dist/query/component-query.js +0 -63
  189. package/dist/query/component-query.js.map +0 -1
  190. package/dist/query/deprecation-parser.d.ts +0 -46
  191. package/dist/query/deprecation-parser.d.ts.map +0 -1
  192. package/dist/query/deprecation-parser.js +0 -81
  193. package/dist/query/deprecation-parser.js.map +0 -1
  194. package/dist/query/deprecation-query.d.ts +0 -19
  195. package/dist/query/deprecation-query.d.ts.map +0 -1
  196. package/dist/query/deprecation-query.js +0 -73
  197. package/dist/query/deprecation-query.js.map +0 -1
  198. package/dist/query/index-builder.d.ts +0 -79
  199. package/dist/query/index-builder.d.ts.map +0 -1
  200. package/dist/query/index-builder.js +0 -217
  201. package/dist/query/index-builder.js.map +0 -1
  202. package/dist/query/index.d.ts +0 -5
  203. package/dist/query/index.d.ts.map +0 -1
  204. package/dist/query/index.js +0 -6
  205. package/dist/query/index.js.map +0 -1
  206. package/dist/query/result-formatter.d.ts +0 -135
  207. package/dist/query/result-formatter.d.ts.map +0 -1
  208. package/dist/query/result-formatter.js +0 -226
  209. package/dist/query/result-formatter.js.map +0 -1
  210. package/dist/query/search-engine.d.ts +0 -54
  211. package/dist/query/search-engine.d.ts.map +0 -1
  212. package/dist/query/search-engine.js +0 -178
  213. package/dist/query/search-engine.js.map +0 -1
  214. package/dist/tools/__tests__/deprecation-tools.test.d.ts +0 -2
  215. package/dist/tools/__tests__/deprecation-tools.test.d.ts.map +0 -1
  216. package/dist/tools/__tests__/deprecation-tools.test.js +0 -178
  217. package/dist/tools/__tests__/deprecation-tools.test.js.map +0 -1
  218. package/dist/tools/__tests__/get-component-docs.property.test.d.ts +0 -2
  219. package/dist/tools/__tests__/get-component-docs.property.test.d.ts.map +0 -1
  220. package/dist/tools/__tests__/get-component-docs.property.test.js +0 -594
  221. package/dist/tools/__tests__/get-component-docs.property.test.js.map +0 -1
  222. package/dist/tools/__tests__/get-component-docs.test.d.ts +0 -2
  223. package/dist/tools/__tests__/get-component-docs.test.d.ts.map +0 -1
  224. package/dist/tools/__tests__/get-component-docs.test.js +0 -137
  225. package/dist/tools/__tests__/get-component-docs.test.js.map +0 -1
  226. package/dist/tools/__tests__/get-component-examples.property.test.d.ts +0 -2
  227. package/dist/tools/__tests__/get-component-examples.property.test.d.ts.map +0 -1
  228. package/dist/tools/__tests__/get-component-examples.property.test.js +0 -245
  229. package/dist/tools/__tests__/get-component-examples.property.test.js.map +0 -1
  230. package/dist/tools/__tests__/get-component-examples.test.d.ts +0 -2
  231. package/dist/tools/__tests__/get-component-examples.test.d.ts.map +0 -1
  232. package/dist/tools/__tests__/get-component-examples.test.js +0 -128
  233. package/dist/tools/__tests__/get-component-examples.test.js.map +0 -1
  234. package/dist/tools/__tests__/get-component-inputs.property.test.d.ts +0 -2
  235. package/dist/tools/__tests__/get-component-inputs.property.test.d.ts.map +0 -1
  236. package/dist/tools/__tests__/get-component-inputs.property.test.js +0 -310
  237. package/dist/tools/__tests__/get-component-inputs.property.test.js.map +0 -1
  238. package/dist/tools/__tests__/get-component-inputs.test.d.ts +0 -2
  239. package/dist/tools/__tests__/get-component-inputs.test.d.ts.map +0 -1
  240. package/dist/tools/__tests__/get-component-inputs.test.js +0 -245
  241. package/dist/tools/__tests__/get-component-inputs.test.js.map +0 -1
  242. package/dist/tools/__tests__/get-component-outputs.property.test.d.ts +0 -2
  243. package/dist/tools/__tests__/get-component-outputs.property.test.d.ts.map +0 -1
  244. package/dist/tools/__tests__/get-component-outputs.property.test.js +0 -227
  245. package/dist/tools/__tests__/get-component-outputs.property.test.js.map +0 -1
  246. package/dist/tools/__tests__/get-component-outputs.test.d.ts +0 -2
  247. package/dist/tools/__tests__/get-component-outputs.test.d.ts.map +0 -1
  248. package/dist/tools/__tests__/get-component-outputs.test.js +0 -189
  249. package/dist/tools/__tests__/get-component-outputs.test.js.map +0 -1
  250. package/dist/tools/__tests__/get-library-version.property.test.d.ts +0 -2
  251. package/dist/tools/__tests__/get-library-version.property.test.d.ts.map +0 -1
  252. package/dist/tools/__tests__/get-library-version.property.test.js +0 -115
  253. package/dist/tools/__tests__/get-library-version.property.test.js.map +0 -1
  254. package/dist/tools/__tests__/get-library-version.test.d.ts +0 -2
  255. package/dist/tools/__tests__/get-library-version.test.d.ts.map +0 -1
  256. package/dist/tools/__tests__/get-library-version.test.js +0 -97
  257. package/dist/tools/__tests__/get-library-version.test.js.map +0 -1
  258. package/dist/tools/__tests__/list-components.property.test.d.ts +0 -2
  259. package/dist/tools/__tests__/list-components.property.test.d.ts.map +0 -1
  260. package/dist/tools/__tests__/list-components.property.test.js +0 -241
  261. package/dist/tools/__tests__/list-components.property.test.js.map +0 -1
  262. package/dist/tools/__tests__/list-components.test.d.ts +0 -2
  263. package/dist/tools/__tests__/list-components.test.d.ts.map +0 -1
  264. package/dist/tools/__tests__/list-components.test.js +0 -170
  265. package/dist/tools/__tests__/list-components.test.js.map +0 -1
  266. package/dist/tools/__tests__/search-components.test.d.ts +0 -2
  267. package/dist/tools/__tests__/search-components.test.d.ts.map +0 -1
  268. package/dist/tools/__tests__/search-components.test.js +0 -239
  269. package/dist/tools/__tests__/search-components.test.js.map +0 -1
  270. package/dist/tools/get-component-docs.d.ts +0 -43
  271. package/dist/tools/get-component-docs.d.ts.map +0 -1
  272. package/dist/tools/get-component-docs.js +0 -55
  273. package/dist/tools/get-component-docs.js.map +0 -1
  274. package/dist/tools/get-component-examples.d.ts +0 -45
  275. package/dist/tools/get-component-examples.d.ts.map +0 -1
  276. package/dist/tools/get-component-examples.js +0 -56
  277. package/dist/tools/get-component-examples.js.map +0 -1
  278. package/dist/tools/get-component-inputs.d.ts +0 -44
  279. package/dist/tools/get-component-inputs.d.ts.map +0 -1
  280. package/dist/tools/get-component-inputs.js +0 -55
  281. package/dist/tools/get-component-inputs.js.map +0 -1
  282. package/dist/tools/get-component-outputs.d.ts +0 -44
  283. package/dist/tools/get-component-outputs.d.ts.map +0 -1
  284. package/dist/tools/get-component-outputs.js +0 -55
  285. package/dist/tools/get-component-outputs.js.map +0 -1
  286. package/dist/tools/get-deprecation-info.d.ts +0 -42
  287. package/dist/tools/get-deprecation-info.d.ts.map +0 -1
  288. package/dist/tools/get-deprecation-info.js +0 -55
  289. package/dist/tools/get-deprecation-info.js.map +0 -1
  290. package/dist/tools/get-eui-cli-guide.d.ts +0 -33
  291. package/dist/tools/get-eui-cli-guide.d.ts.map +0 -1
  292. package/dist/tools/get-eui-cli-guide.js +0 -160
  293. package/dist/tools/get-eui-cli-guide.js.map +0 -1
  294. package/dist/tools/get-eui-cli-instructions.d.ts +0 -33
  295. package/dist/tools/get-eui-cli-instructions.d.ts.map +0 -1
  296. package/dist/tools/get-eui-cli-instructions.js +0 -375
  297. package/dist/tools/get-eui-cli-instructions.js.map +0 -1
  298. package/dist/tools/get-library-version.d.ts +0 -34
  299. package/dist/tools/get-library-version.d.ts.map +0 -1
  300. package/dist/tools/get-library-version.js +0 -62
  301. package/dist/tools/get-library-version.js.map +0 -1
  302. package/dist/tools/index.d.ts +0 -12
  303. package/dist/tools/index.d.ts.map +0 -1
  304. package/dist/tools/index.js +0 -13
  305. package/dist/tools/index.js.map +0 -1
  306. package/dist/tools/list-components.d.ts +0 -69
  307. package/dist/tools/list-components.d.ts.map +0 -1
  308. package/dist/tools/list-components.js +0 -84
  309. package/dist/tools/list-components.js.map +0 -1
  310. package/dist/tools/list-deprecated.d.ts +0 -47
  311. package/dist/tools/list-deprecated.d.ts.map +0 -1
  312. package/dist/tools/list-deprecated.js +0 -56
  313. package/dist/tools/list-deprecated.js.map +0 -1
  314. package/dist/tools/search-components.d.ts +0 -69
  315. package/dist/tools/search-components.d.ts.map +0 -1
  316. package/dist/tools/search-components.js +0 -98
  317. package/dist/tools/search-components.js.map +0 -1
  318. package/dist/types/compodoc.d.ts +0 -262
  319. package/dist/types/compodoc.d.ts.map +0 -1
  320. package/dist/types/compodoc.js +0 -5
  321. package/dist/types/compodoc.js.map +0 -1
  322. package/dist/types/deprecation.d.ts +0 -33
  323. package/dist/types/deprecation.d.ts.map +0 -1
  324. package/dist/types/deprecation.js +0 -5
  325. package/dist/types/deprecation.js.map +0 -1
  326. package/dist/types/index.d.ts +0 -5
  327. package/dist/types/index.d.ts.map +0 -1
  328. package/dist/types/index.js +0 -5
  329. package/dist/types/index.js.map +0 -1
  330. package/dist/utils/__tests__/credential-masking.property.test.d.ts +0 -2
  331. package/dist/utils/__tests__/credential-masking.property.test.d.ts.map +0 -1
  332. package/dist/utils/__tests__/credential-masking.property.test.js +0 -145
  333. package/dist/utils/__tests__/credential-masking.property.test.js.map +0 -1
  334. package/dist/utils/__tests__/credential-masking.test.d.ts +0 -2
  335. package/dist/utils/__tests__/credential-masking.test.d.ts.map +0 -1
  336. package/dist/utils/__tests__/credential-masking.test.js +0 -188
  337. package/dist/utils/__tests__/credential-masking.test.js.map +0 -1
  338. package/dist/utils/__tests__/errors.test.d.ts +0 -2
  339. package/dist/utils/__tests__/errors.test.d.ts.map +0 -1
  340. package/dist/utils/__tests__/errors.test.js +0 -110
  341. package/dist/utils/__tests__/errors.test.js.map +0 -1
  342. package/dist/utils/__tests__/integration.test.d.ts +0 -2
  343. package/dist/utils/__tests__/integration.test.d.ts.map +0 -1
  344. package/dist/utils/__tests__/integration.test.js +0 -136
  345. package/dist/utils/__tests__/integration.test.js.map +0 -1
  346. package/dist/utils/__tests__/logger.test.d.ts +0 -2
  347. package/dist/utils/__tests__/logger.test.d.ts.map +0 -1
  348. package/dist/utils/__tests__/logger.test.js +0 -90
  349. package/dist/utils/__tests__/logger.test.js.map +0 -1
  350. package/dist/utils/__tests__/retry.test.d.ts +0 -2
  351. package/dist/utils/__tests__/retry.test.d.ts.map +0 -1
  352. package/dist/utils/__tests__/retry.test.js +0 -84
  353. package/dist/utils/__tests__/retry.test.js.map +0 -1
  354. package/dist/utils/circuit-breaker.d.ts +0 -91
  355. package/dist/utils/circuit-breaker.d.ts.map +0 -1
  356. package/dist/utils/circuit-breaker.js +0 -186
  357. package/dist/utils/circuit-breaker.js.map +0 -1
  358. package/dist/utils/credential-masking.d.ts +0 -90
  359. package/dist/utils/credential-masking.d.ts.map +0 -1
  360. package/dist/utils/credential-masking.js +0 -201
  361. package/dist/utils/credential-masking.js.map +0 -1
  362. package/dist/utils/error-handler.d.ts +0 -68
  363. package/dist/utils/error-handler.d.ts.map +0 -1
  364. package/dist/utils/error-handler.js +0 -184
  365. package/dist/utils/error-handler.js.map +0 -1
  366. package/dist/utils/errors.d.ts +0 -156
  367. package/dist/utils/errors.d.ts.map +0 -1
  368. package/dist/utils/errors.js +0 -242
  369. package/dist/utils/errors.js.map +0 -1
  370. package/dist/utils/index.d.ts +0 -10
  371. package/dist/utils/index.d.ts.map +0 -1
  372. package/dist/utils/index.js +0 -16
  373. package/dist/utils/index.js.map +0 -1
  374. package/dist/utils/logger.d.ts +0 -24
  375. package/dist/utils/logger.d.ts.map +0 -1
  376. package/dist/utils/logger.js +0 -55
  377. package/dist/utils/logger.js.map +0 -1
  378. package/dist/utils/retry.d.ts +0 -19
  379. package/dist/utils/retry.d.ts.map +0 -1
  380. package/dist/utils/retry.js +0 -81
  381. package/dist/utils/retry.js.map +0 -1
  382. package/dist/version/__tests__/changelog-commit-grouping.property.test.d.ts +0 -2
  383. package/dist/version/__tests__/changelog-commit-grouping.property.test.d.ts.map +0 -1
  384. package/dist/version/__tests__/changelog-commit-grouping.property.test.js +0 -297
  385. package/dist/version/__tests__/changelog-commit-grouping.property.test.js.map +0 -1
  386. package/dist/version/__tests__/changelog-commit-parsing.property.test.d.ts +0 -2
  387. package/dist/version/__tests__/changelog-commit-parsing.property.test.d.ts.map +0 -1
  388. package/dist/version/__tests__/changelog-commit-parsing.property.test.js +0 -396
  389. package/dist/version/__tests__/changelog-commit-parsing.property.test.js.map +0 -1
  390. package/dist/version/__tests__/changelog-file-updates.property.test.d.ts +0 -11
  391. package/dist/version/__tests__/changelog-file-updates.property.test.d.ts.map +0 -1
  392. package/dist/version/__tests__/changelog-file-updates.property.test.js +0 -452
  393. package/dist/version/__tests__/changelog-file-updates.property.test.js.map +0 -1
  394. package/dist/version/__tests__/dry-run-action.property.test.d.ts +0 -8
  395. package/dist/version/__tests__/dry-run-action.property.test.d.ts.map +0 -1
  396. package/dist/version/__tests__/dry-run-action.property.test.js +0 -50
  397. package/dist/version/__tests__/dry-run-action.property.test.js.map +0 -1
  398. package/dist/version/__tests__/dry-run-changelog.property.test.d.ts +0 -8
  399. package/dist/version/__tests__/dry-run-changelog.property.test.d.ts.map +0 -1
  400. package/dist/version/__tests__/dry-run-changelog.property.test.js +0 -53
  401. package/dist/version/__tests__/dry-run-changelog.property.test.js.map +0 -1
  402. package/dist/version/__tests__/dry-run-utils.test.d.ts +0 -7
  403. package/dist/version/__tests__/dry-run-utils.test.d.ts.map +0 -1
  404. package/dist/version/__tests__/dry-run-utils.test.js +0 -195
  405. package/dist/version/__tests__/dry-run-utils.test.js.map +0 -1
  406. package/dist/version/__tests__/dry-run-version.property.test.d.ts +0 -8
  407. package/dist/version/__tests__/dry-run-version.property.test.d.ts.map +0 -1
  408. package/dist/version/__tests__/dry-run-version.property.test.js +0 -59
  409. package/dist/version/__tests__/dry-run-version.property.test.js.map +0 -1
  410. package/dist/version/__tests__/git-tag-annotation.property.test.d.ts +0 -11
  411. package/dist/version/__tests__/git-tag-annotation.property.test.d.ts.map +0 -1
  412. package/dist/version/__tests__/git-tag-annotation.property.test.js +0 -271
  413. package/dist/version/__tests__/git-tag-annotation.property.test.js.map +0 -1
  414. package/dist/version/__tests__/git-tag-format.property.test.d.ts +0 -11
  415. package/dist/version/__tests__/git-tag-format.property.test.d.ts.map +0 -1
  416. package/dist/version/__tests__/git-tag-format.property.test.js +0 -411
  417. package/dist/version/__tests__/git-tag-format.property.test.js.map +0 -1
  418. package/dist/version/__tests__/git-tag-utils.test.d.ts +0 -2
  419. package/dist/version/__tests__/git-tag-utils.test.d.ts.map +0 -1
  420. package/dist/version/__tests__/git-tag-utils.test.js +0 -142
  421. package/dist/version/__tests__/git-tag-utils.test.js.map +0 -1
  422. package/dist/version/__tests__/npm-tag-selection.property.test.d.ts +0 -2
  423. package/dist/version/__tests__/npm-tag-selection.property.test.d.ts.map +0 -1
  424. package/dist/version/__tests__/npm-tag-selection.property.test.js +0 -79
  425. package/dist/version/__tests__/npm-tag-selection.property.test.js.map +0 -1
  426. package/dist/version/__tests__/release-title-format.property.test.d.ts +0 -11
  427. package/dist/version/__tests__/release-title-format.property.test.d.ts.map +0 -1
  428. package/dist/version/__tests__/release-title-format.property.test.js +0 -422
  429. package/dist/version/__tests__/release-title-format.property.test.js.map +0 -1
  430. package/dist/version/__tests__/release-utils.test.d.ts +0 -7
  431. package/dist/version/__tests__/release-utils.test.d.ts.map +0 -1
  432. package/dist/version/__tests__/release-utils.test.js +0 -176
  433. package/dist/version/__tests__/release-utils.test.js.map +0 -1
  434. package/dist/version/__tests__/rollback-changelog.property.test.d.ts +0 -8
  435. package/dist/version/__tests__/rollback-changelog.property.test.d.ts.map +0 -1
  436. package/dist/version/__tests__/rollback-changelog.property.test.js +0 -61
  437. package/dist/version/__tests__/rollback-changelog.property.test.js.map +0 -1
  438. package/dist/version/__tests__/rollback-utils.test.d.ts +0 -7
  439. package/dist/version/__tests__/rollback-utils.test.d.ts.map +0 -1
  440. package/dist/version/__tests__/rollback-utils.test.js +0 -74
  441. package/dist/version/__tests__/rollback-utils.test.js.map +0 -1
  442. package/dist/version/__tests__/version-manager.property.test.d.ts +0 -2
  443. package/dist/version/__tests__/version-manager.property.test.d.ts.map +0 -1
  444. package/dist/version/__tests__/version-manager.property.test.js +0 -143
  445. package/dist/version/__tests__/version-manager.property.test.js.map +0 -1
  446. package/dist/version/__tests__/version-manager.test.d.ts +0 -2
  447. package/dist/version/__tests__/version-manager.test.d.ts.map +0 -1
  448. package/dist/version/__tests__/version-manager.test.js +0 -203
  449. package/dist/version/__tests__/version-manager.test.js.map +0 -1
  450. package/dist/version/changelog-file-utils.d.ts +0 -69
  451. package/dist/version/changelog-file-utils.d.ts.map +0 -1
  452. package/dist/version/changelog-file-utils.js +0 -161
  453. package/dist/version/changelog-file-utils.js.map +0 -1
  454. package/dist/version/changelog-utils.d.ts +0 -98
  455. package/dist/version/changelog-utils.d.ts.map +0 -1
  456. package/dist/version/changelog-utils.js +0 -200
  457. package/dist/version/changelog-utils.js.map +0 -1
  458. package/dist/version/dry-run-utils.d.ts +0 -108
  459. package/dist/version/dry-run-utils.d.ts.map +0 -1
  460. package/dist/version/dry-run-utils.js +0 -128
  461. package/dist/version/dry-run-utils.js.map +0 -1
  462. package/dist/version/git-tag-utils.d.ts +0 -50
  463. package/dist/version/git-tag-utils.d.ts.map +0 -1
  464. package/dist/version/git-tag-utils.js +0 -66
  465. package/dist/version/git-tag-utils.js.map +0 -1
  466. package/dist/version/index.d.ts +0 -11
  467. package/dist/version/index.d.ts.map +0 -1
  468. package/dist/version/index.js +0 -11
  469. package/dist/version/index.js.map +0 -1
  470. package/dist/version/release-utils.d.ts +0 -94
  471. package/dist/version/release-utils.d.ts.map +0 -1
  472. package/dist/version/release-utils.js +0 -170
  473. package/dist/version/release-utils.js.map +0 -1
  474. package/dist/version/rollback-utils.d.ts +0 -47
  475. package/dist/version/rollback-utils.d.ts.map +0 -1
  476. package/dist/version/rollback-utils.js +0 -73
  477. package/dist/version/rollback-utils.js.map +0 -1
  478. package/dist/version/version-manager.d.ts +0 -98
  479. package/dist/version/version-manager.d.ts.map +0 -1
  480. package/dist/version/version-manager.js +0 -154
  481. package/dist/version/version-manager.js.map +0 -1
@@ -1,144 +0,0 @@
1
- /**
2
- * HTTP client with timeout support and retry logic
3
- */
4
- export class HttpClient {
5
- options;
6
- constructor(options) {
7
- this.options = options;
8
- }
9
- /**
10
- * Fetch content from URL with timeout support and retry logic
11
- */
12
- async fetch(url, headers) {
13
- let lastError;
14
- for (let attempt = 0; attempt <= this.options.maxRetries; attempt++) {
15
- try {
16
- const response = await this.fetchOnce(url, headers);
17
- // Check if we should retry based on status code
18
- // If not retryable or no more retries, return the response
19
- if (!this.isRetryableError(undefined, response.status) || attempt >= this.options.maxRetries) {
20
- return response;
21
- }
22
- // Retry with backoff
23
- const delay = this.calculateBackoff(attempt);
24
- await this.sleep(delay);
25
- }
26
- catch (error) {
27
- lastError = error instanceof Error ? error : new Error(String(error));
28
- // Check if we should retry
29
- if (attempt < this.options.maxRetries && this.isRetryableError(lastError)) {
30
- const delay = this.calculateBackoff(attempt);
31
- await this.sleep(delay);
32
- continue;
33
- }
34
- // No more retries, throw the error
35
- throw lastError;
36
- }
37
- }
38
- // Should not reach here, but throw last error if we do
39
- throw lastError || new Error('Unknown error during fetch');
40
- }
41
- /**
42
- * Perform a single fetch attempt with timeout
43
- */
44
- async fetchOnce(url, headers) {
45
- const controller = new AbortController();
46
- const timeoutId = setTimeout(() => controller.abort(), this.options.timeout);
47
- try {
48
- // Build headers object
49
- const fetchHeaders = {
50
- 'Accept': 'application/json',
51
- 'User-Agent': this.options.userAgent || 'DocumentationLoader/1.0',
52
- };
53
- // Add custom headers if provided
54
- if (headers) {
55
- headers.forEach((value, key) => {
56
- fetchHeaders[key] = value;
57
- });
58
- }
59
- const response = await fetch(url, {
60
- signal: controller.signal,
61
- headers: fetchHeaders,
62
- });
63
- clearTimeout(timeoutId);
64
- // Parse response headers into Map
65
- const responseHeaders = new Map();
66
- response.headers.forEach((value, key) => {
67
- responseHeaders.set(key, value);
68
- });
69
- // Read response body
70
- const data = await response.text();
71
- return {
72
- status: response.status,
73
- statusText: response.statusText,
74
- data,
75
- headers: responseHeaders,
76
- };
77
- }
78
- catch (error) {
79
- clearTimeout(timeoutId);
80
- // Handle abort/timeout errors
81
- if (error instanceof Error && error.name === 'AbortError') {
82
- throw new Error(`Request timeout after ${this.options.timeout}ms`);
83
- }
84
- throw error;
85
- }
86
- }
87
- /**
88
- * Check if error is retryable
89
- * Retryable: network errors, timeouts, 5xx errors, 408, 429
90
- * Non-retryable: 4xx client errors (except 408, 429)
91
- */
92
- isRetryableError(error, statusCode) {
93
- // Check status code if provided
94
- if (statusCode !== undefined) {
95
- // 2xx and 3xx are successful, don't retry
96
- if (statusCode >= 200 && statusCode < 400) {
97
- return false;
98
- }
99
- // 5xx server errors are retryable
100
- if (statusCode >= 500) {
101
- return true;
102
- }
103
- // 408 Request Timeout and 429 Too Many Requests are retryable
104
- if (statusCode === 408 || statusCode === 429) {
105
- return true;
106
- }
107
- // Other 4xx client errors are not retryable
108
- if (statusCode >= 400 && statusCode < 500) {
109
- return false;
110
- }
111
- }
112
- // Network errors and timeouts are retryable
113
- if (error) {
114
- const errorMessage = error.message.toLowerCase();
115
- // Timeout errors
116
- if (errorMessage.includes('timeout')) {
117
- return true;
118
- }
119
- // Network errors
120
- if (errorMessage.includes('network') ||
121
- errorMessage.includes('econnrefused') ||
122
- errorMessage.includes('enotfound') ||
123
- errorMessage.includes('econnreset')) {
124
- return true;
125
- }
126
- }
127
- // Default to retryable for unknown errors
128
- return true;
129
- }
130
- /**
131
- * Calculate exponential backoff delay
132
- * Formula: retryDelay * (2 ^ attempt)
133
- */
134
- calculateBackoff(attempt) {
135
- return this.options.retryDelay * Math.pow(2, attempt);
136
- }
137
- /**
138
- * Sleep for specified milliseconds
139
- */
140
- sleep(ms) {
141
- return new Promise(resolve => setTimeout(resolve, ms));
142
- }
143
- }
144
- //# sourceMappingURL=http-client.js.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"http-client.js","sourceRoot":"","sources":["../../src/loader/http-client.ts"],"names":[],"mappings":"AAAA;;GAEG;AAgBH,MAAM,OAAO,UAAU;IACb,OAAO,CAAoB;IAEnC,YAAY,OAA0B;QACpC,IAAI,CAAC,OAAO,GAAG,OAAO,CAAC;IACzB,CAAC;IAED;;OAEG;IACH,KAAK,CAAC,KAAK,CAAC,GAAW,EAAE,OAA6B;QACpD,IAAI,SAA4B,CAAC;QAEjC,KAAK,IAAI,OAAO,GAAG,CAAC,EAAE,OAAO,IAAI,IAAI,CAAC,OAAO,CAAC,UAAU,EAAE,OAAO,EAAE,EAAE,CAAC;YACpE,IAAI,CAAC;gBACH,MAAM,QAAQ,GAAG,MAAM,IAAI,CAAC,SAAS,CAAC,GAAG,EAAE,OAAO,CAAC,CAAC;gBAEpD,gDAAgD;gBAChD,2DAA2D;gBAC3D,IAAI,CAAC,IAAI,CAAC,gBAAgB,CAAC,SAAS,EAAE,QAAQ,CAAC,MAAM,CAAC,IAAI,OAAO,IAAI,IAAI,CAAC,OAAO,CAAC,UAAU,EAAE,CAAC;oBAC7F,OAAO,QAAQ,CAAC;gBAClB,CAAC;gBAED,qBAAqB;gBACrB,MAAM,KAAK,GAAG,IAAI,CAAC,gBAAgB,CAAC,OAAO,CAAC,CAAC;gBAC7C,MAAM,IAAI,CAAC,KAAK,CAAC,KAAK,CAAC,CAAC;YAC1B,CAAC;YAAC,OAAO,KAAK,EAAE,CAAC;gBACf,SAAS,GAAG,KAAK,YAAY,KAAK,CAAC,C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,OAAO,IAAI,CAAC;YACd,CAAC;YAED,4CAA4C;YAC5C,IAAI,UAAU,IAAI,GAAG,IAAI,UAAU,GAAG,GAAG,EAAE,CAAC;gBAC1C,OAAO,KAAK,CAAC;YACf,CAAC;QACH,CAAC;QAED,4CAA4C;QAC5C,IAAI,KAAK,EAAE,CAAC;YACV,MAAM,YAAY,GAAG,KAAK,CAAC,OAAO,CAAC,WAAW,EAAE,CAAC;YAEjD,iBAAiB;YACjB,IAAI,YAAY,CAAC,QAAQ,CAAC,SAAS,CAAC,EAAE,CAAC;gBACrC,OAAO,IAAI,CAAC;YACd,CAAC;YAED,iBAAiB;YACjB,IACE,YAAY,CAAC,QAAQ,CAAC,SAAS,CAAC;gBAChC,YAAY,CAAC,QAAQ,CAAC,cAAc,CAAC;gBACrC,YAAY,CAAC,QAAQ,CAAC,WAAW,CAAC;gBAClC,YAAY,CAAC,QAAQ,CAAC,YAAY,CAAC,EACnC,CAAC;gBACD,OAAO,IAAI,CAAC;YACd,CAAC;QACH,CAAC;QAED,0CAA0C;QAC1C,OAAO,IAAI,CAAC;IACd,CAAC;IAED;;;OAGG;IACK,gBAAgB,CAAC,OAAe;QACtC,OAAO,IAAI,CAAC,OAAO,CAAC,UAAU,GAAG,IAAI,CAAC,GAAG,CAAC,CAAC,EAAE,OAAO,CAAC,CAAC;IACxD,CAAC;IAED;;OAEG;IACK,KAAK,CAAC,EAAU;QACtB,OAAO,IAAI,OAAO,CAAC,OAAO,CAAC,EAAE,CAAC,UAAU,CAAC,OAAO,EAAE,EAAE,CAAC,CAAC,CAAC;IACzD,CAAC;CACF"}
@@ -1,6 +0,0 @@
1
- /**
2
- * Documentation loader module exports
3
- */
4
- export { DocumentationLoader, DocumentationLoaderOptions, LoadResult, loadDocumentation, } from './documentation-loader.js';
5
- export { DocumentationSource } from './documentation-source.js';
6
- //# sourceMappingURL=index.d.ts.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../src/loader/index.ts"],"names":[],"mappings":"AAAA;;GAEG;AACH,OAAO,EACL,mBAAmB,EACnB,0BAA0B,EAC1B,UAAU,EACV,iBAAiB,GAClB,MAAM,2BAA2B,CAAC;AAEnC,OAAO,EAAE,mBAAmB,EAAE,MAAM,2BAA2B,CAAC"}
@@ -1,5 +0,0 @@
1
- /**
2
- * Documentation loader module exports
3
- */
4
- export { DocumentationLoader, loadDocumentation, } from './documentation-loader.js';
5
- //# sourceMappingURL=index.js.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"index.js","sourceRoot":"","sources":["../../src/loader/index.ts"],"names":[],"mappings":"AAAA;;GAEG;AACH,OAAO,EACL,mBAAmB,EAGnB,iBAAiB,GAClB,MAAM,2BAA2B,CAAC"}
@@ -1,62 +0,0 @@
1
- import { CompodocDocumentation } from '../types/compodoc.js';
2
- import { DocumentationSource } from './documentation-source.js';
3
- import { LoadResult } from './documentation-loader.js';
4
- export interface LocalSourceOptions {
5
- path: string;
6
- watchForChanges: boolean;
7
- reloadDebounce: number;
8
- onReload?: (data: CompodocDocumentation) => void;
9
- onError?: (error: Error) => void;
10
- }
11
- /**
12
- * LocalDocumentationSource class
13
- * Handles loading documentation from local file system with file watching support
14
- */
15
- export declare class LocalDocumentationSource implements DocumentationSource {
16
- private filePath;
17
- private watchForChanges;
18
- private reloadDebounce;
19
- private watcher?;
20
- private reloadTimer?;
21
- private onReloadCallback?;
22
- private onErrorCallback?;
23
- private currentData?;
24
- constructor(options: LocalSourceOptions);
25
- /**
26
- * Load the documentation.json file from local file system
27
- */
28
- load(): Promise<LoadResult>;
29
- /**
30
- * Start monitoring the file for changes using file watcher
31
- */
32
- startMonitoring(): void;
33
- /**
34
- * Stop monitoring the file for changes
35
- */
36
- stopMonitoring(): Promise<void>;
37
- /**
38
- * Get the currently loaded documentation
39
- */
40
- getCurrentData(): CompodocDocumentation | undefined;
41
- /**
42
- * Clean up resources
43
- */
44
- dispose(): Promise<void>;
45
- /**
46
- * Validate the basic structure of the documentation
47
- */
48
- private validateStructure;
49
- /**
50
- * Start watching the documentation file for changes
51
- */
52
- private startWatching;
53
- /**
54
- * Schedule a reload with debouncing
55
- */
56
- private scheduleReload;
57
- /**
58
- * Reload the documentation file
59
- */
60
- private reload;
61
- }
62
- //# sourceMappingURL=local-documentation-source.d.ts.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"local-documentation-source.d.ts","sourceRoot":"","sources":["../../src/loader/local-documentation-source.ts"],"names":[],"mappings":"AAMA,OAAO,EAAE,qBAAqB,EAAE,MAAM,sBAAsB,CAAC;AAC7D,OAAO,EAAE,mBAAmB,EAAE,MAAM,2BAA2B,CAAC;AAChE,OAAO,EAAE,UAAU,EAAE,MAAM,2BAA2B,CAAC;AAGvD,MAAM,WAAW,kBAAkB;IACjC,IAAI,EAAE,MAAM,CAAC;IACb,eAAe,EAAE,OAAO,CAAC;IACzB,cAAc,EAAE,MAAM,CAAC;IACvB,QAAQ,CAAC,EAAE,CAAC,IAAI,EAAE,qBAAqB,KAAK,IAAI,CAAC;IACjD,OAAO,CAAC,EAAE,CAAC,KAAK,EAAE,KAAK,KAAK,IAAI,CAAC;CAClC;AAED;;;GAGG;AACH,qBAAa,wBAAyB,YAAW,mBAAmB;IAClE,OAAO,CAAC,QAAQ,CAAS;IACzB,OAAO,CAAC,eAAe,CAAU;IACjC,OAAO,CAAC,cAAc,CAAS;IAC/B,OAAO,CAAC,OAAO,CAAC,CAAY;IAC5B,OAAO,CAAC,WAAW,CAAC,CAAiB;IACrC,OAAO,CAAC,gBAAgB,CAAC,CAAwC;IACjE,OAAO,CAAC,eAAe,CAAC,CAAyB;IACjD,OAAO,CAAC,WAAW,CAAC,CAAwB;gBAEhC,OAAO,EAAE,kBAAkB;IAQvC;;OAEG;IACG,IAAI,IAAI,OAAO,CAAC,UAAU,CAAC;IAsDjC;;OAEG;IACH,eAAe,IAAI,IAAI;IAQvB;;OAEG;IACG,cAAc,IAAI,OAAO,CAAC,IAAI,CAAC;IAarC;;OAEG;IACH,cAAc,IAAI,qBAAqB,GAAG,SAAS;IAInD;;OAEG;IACG,OAAO,IAAI,OAAO,CAAC,IAAI,CAAC;IAO9B;;OAEG;IACH,OAAO,CAAC,iBAAiB;IAmBzB;;OAEG;IACH,OAAO,CAAC,aAAa;IAyBrB;;OAEG;IACH,OAAO,CAAC,cAAc;IAYtB;;OAEG;YACW,MAAM;CAiBrB"}
@@ -1,192 +0,0 @@
1
- /**
2
- * Local documentation source - loads documentation from local file system
3
- */
4
- import * as fs from 'fs';
5
- import * as path from 'path';
6
- import { watch } from 'chokidar';
7
- import { getLogger } from '../utils/index.js';
8
- /**
9
- * LocalDocumentationSource class
10
- * Handles loading documentation from local file system with file watching support
11
- */
12
- export class LocalDocumentationSource {
13
- filePath;
14
- watchForChanges;
15
- reloadDebounce;
16
- watcher;
17
- reloadTimer;
18
- onReloadCallback;
19
- onErrorCallback;
20
- currentData;
21
- constructor(options) {
22
- this.filePath = path.resolve(options.path);
23
- this.watchForChanges = options.watchForChanges;
24
- this.reloadDebounce = options.reloadDebounce;
25
- this.onReloadCallback = options.onReload;
26
- this.onErrorCallback = options.onError;
27
- }
28
- /**
29
- * Load the documentation.json file from local file system
30
- */
31
- async load() {
32
- try {
33
- // Check if file exists
34
- if (!fs.existsSync(this.filePath)) {
35
- return {
36
- success: false,
37
- error: `Documentation file not found: ${this.filePath}`,
38
- };
39
- }
40
- // Read file
41
- const content = await fs.promises.readFile(this.filePath, 'utf-8');
42
- // Parse JSON
43
- let data;
44
- try {
45
- data = JSON.parse(content);
46
- }
47
- catch (parseError) {
48
- return {
49
- success: false,
50
- error: `Failed to parse JSON: ${parseError instanceof Error ? parseError.message : String(parseError)}`,
51
- };
52
- }
53
- // Validate structure
54
- const validationError = this.validateStructure(data);
55
- if (validationError) {
56
- return {
57
- success: false,
58
- error: validationError,
59
- };
60
- }
61
- // Store current data
62
- this.currentData = data;
63
- // Start watching if enabled
64
- if (this.watchForChanges && !this.watcher) {
65
- this.startMonitoring();
66
- }
67
- return {
68
- success: true,
69
- data,
70
- };
71
- }
72
- catch (error) {
73
- const errorMessage = error instanceof Error ? error.message : String(error);
74
- return {
75
- success: false,
76
- error: `Failed to load documentation: ${errorMessage}`,
77
- };
78
- }
79
- }
80
- /**
81
- * Start monitoring the file for changes using file watcher
82
- */
83
- startMonitoring() {
84
- if (!this.watchForChanges || this.watcher) {
85
- return;
86
- }
87
- this.startWatching();
88
- }
89
- /**
90
- * Stop monitoring the file for changes
91
- */
92
- async stopMonitoring() {
93
- if (this.reloadTimer) {
94
- clearTimeout(this.reloadTimer);
95
- this.reloadTimer = undefined;
96
- }
97
- if (this.watcher) {
98
- await this.watcher.close();
99
- this.watcher = undefined;
100
- getLogger().info('Stopped watching documentation file');
101
- }
102
- }
103
- /**
104
- * Get the currently loaded documentation
105
- */
106
- getCurrentData() {
107
- return this.currentData;
108
- }
109
- /**
110
- * Clean up resources
111
- */
112
- async dispose() {
113
- await this.stopMonitoring();
114
- this.currentData = undefined;
115
- this.onReloadCallback = undefined;
116
- this.onErrorCallback = undefined;
117
- }
118
- /**
119
- * Validate the basic structure of the documentation
120
- */
121
- validateStructure(data) {
122
- if (!data || typeof data !== 'object') {
123
- return 'Documentation must be an object';
124
- }
125
- const doc = data;
126
- // Check for required top-level arrays
127
- const requiredArrays = ['pipes', 'components', 'directives', 'injectables', 'interfaces', 'classes', 'modules'];
128
- for (const key of requiredArrays) {
129
- const value = doc[key];
130
- if (value !== undefined && !Array.isArray(value)) {
131
- return `${key} must be an array`;
132
- }
133
- }
134
- return null;
135
- }
136
- /**
137
- * Start watching the documentation file for changes
138
- */
139
- startWatching() {
140
- if (this.watcher) {
141
- return;
142
- }
143
- this.watcher = watch(this.filePath, {
144
- persistent: true,
145
- ignoreInitial: true,
146
- });
147
- this.watcher.on('change', () => {
148
- this.scheduleReload();
149
- });
150
- this.watcher.on('error', (error) => {
151
- const err = error instanceof Error ? error : new Error(String(error));
152
- getLogger().error('File watcher error', err);
153
- if (this.onErrorCallback) {
154
- this.onErrorCallback(err);
155
- }
156
- });
157
- getLogger().info(`Watching for changes: ${this.filePath}`);
158
- }
159
- /**
160
- * Schedule a reload with debouncing
161
- */
162
- scheduleReload() {
163
- // Clear existing timer
164
- if (this.reloadTimer) {
165
- clearTimeout(this.reloadTimer);
166
- }
167
- // Schedule new reload
168
- this.reloadTimer = setTimeout(() => {
169
- void this.reload();
170
- }, this.reloadDebounce);
171
- }
172
- /**
173
- * Reload the documentation file
174
- */
175
- async reload() {
176
- getLogger().info('Reloading documentation...');
177
- const result = await this.load();
178
- if (result.success && result.data) {
179
- getLogger().info('Documentation reloaded successfully');
180
- if (this.onReloadCallback) {
181
- this.onReloadCallback(result.data);
182
- }
183
- }
184
- else {
185
- getLogger().error('Failed to reload documentation', new Error(result.error));
186
- if (this.onErrorCallback) {
187
- this.onErrorCallback(new Error(result.error));
188
- }
189
- }
190
- }
191
- }
192
- //# sourceMappingURL=local-documentation-source.js.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"local-documentation-source.js","sourceRoot":"","sources":["../../src/loader/local-documentation-source.ts"],"names":[],"mappings":"AAAA;;GAEG;AACH,OAAO,KAAK,EAAE,MAAM,IAAI,CAAC;AACzB,OAAO,KAAK,IAAI,MAAM,MAAM,CAAC;AAC7B,OAAO,EAAE,KAAK,EAAa,MAAM,UAAU,CAAC;AAI5C,OAAO,EAAE,SAAS,EAAE,MAAM,mBAAmB,CAAC;AAU9C;;;GAGG;AACH,MAAM,OAAO,wBAAwB;IAC3B,QAAQ,CAAS;IACjB,eAAe,CAAU;IACzB,cAAc,CAAS;IACvB,OAAO,CAAa;IACpB,WAAW,CAAkB;IAC7B,gBAAgB,CAAyC;IACzD,eAAe,CAA0B;IACzC,WAAW,CAAyB;IAE5C,YAAY,OAA2B;QACrC,IAAI,CAAC,QAAQ,GAAG,IAAI,CAAC,OAAO,CAAC,OAAO,CAAC,IAAI,CAAC,CAAC;QAC3C,IAAI,CAAC,eAAe,GAAG,OAAO,CAAC,eAAe,CAAC;QAC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CAAC;QACH,CAAC;IACH,CAAC;CACF"}
@@ -1,34 +0,0 @@
1
- /**
2
- * Path type detection utilities for distinguishing between local paths and remote URLs
3
- */
4
- export declare enum PathType {
5
- LOCAL = "local",
6
- HTTP_URL = "http_url",
7
- HTTPS_URL = "https_url"
8
- }
9
- export interface PathInfo {
10
- type: PathType;
11
- originalPath: string;
12
- normalizedPath: string;
13
- }
14
- export declare class PathTypeDetector {
15
- /**
16
- * Detect whether a path is a local file path or URL
17
- * @param path - The path to analyze
18
- * @returns PathInfo object with type and normalized path
19
- */
20
- static detect(path: string): PathInfo;
21
- /**
22
- * Validate URL format
23
- * @param path - The path to validate
24
- * @returns true if the path is a valid URL (any protocol)
25
- */
26
- static isValidUrl(path: string): boolean;
27
- /**
28
- * Check if path is HTTP/HTTPS URL
29
- * @param path - The path to check
30
- * @returns true if the path is an HTTP or HTTPS URL
31
- */
32
- static isRemoteUrl(path: string): boolean;
33
- }
34
- //# sourceMappingURL=path-type-detector.d.ts.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"path-type-detector.d.ts","sourceRoot":"","sources":["../../src/loader/path-type-detector.ts"],"names":[],"mappings":"AAAA;;GAEG;AAEH,oBAAY,QAAQ;IAClB,KAAK,UAAU;IACf,QAAQ,aAAa;IACrB,SAAS,cAAc;CACxB;AAED,MAAM,WAAW,QAAQ;IACvB,IAAI,EAAE,QAAQ,CAAC;IACf,YAAY,EAAE,MAAM,CAAC;IACrB,cAAc,EAAE,MAAM,CAAC;CACxB;AAED,qBAAa,gBAAgB;IAC3B;;;;OAIG;IACH,MAAM,CAAC,MAAM,CAAC,IAAI,EAAE,MAAM,GAAG,QAAQ;IAsBrC;;;;OAIG;IACH,MAAM,CAAC,UAAU,CAAC,IAAI,EAAE,MAAM,GAAG,OAAO;IAUxC;;;;OAIG;IACH,MAAM,CAAC,WAAW,CAAC,IAAI,EAAE,MAAM,GAAG,OAAO;CA2B1C"}
@@ -1,78 +0,0 @@
1
- /**
2
- * Path type detection utilities for distinguishing between local paths and remote URLs
3
- */
4
- export var PathType;
5
- (function (PathType) {
6
- PathType["LOCAL"] = "local";
7
- PathType["HTTP_URL"] = "http_url";
8
- PathType["HTTPS_URL"] = "https_url";
9
- })(PathType || (PathType = {}));
10
- export class PathTypeDetector {
11
- /**
12
- * Detect whether a path is a local file path or URL
13
- * @param path - The path to analyze
14
- * @returns PathInfo object with type and normalized path
15
- */
16
- static detect(path) {
17
- const trimmedPath = path.trim();
18
- if (this.isRemoteUrl(trimmedPath)) {
19
- const url = new URL(trimmedPath);
20
- const type = url.protocol === 'https:' ? PathType.HTTPS_URL : PathType.HTTP_URL;
21
- return {
22
- type,
23
- originalPath: path,
24
- normalizedPath: trimmedPath,
25
- };
26
- }
27
- // Default to local path
28
- return {
29
- type: PathType.LOCAL,
30
- originalPath: path,
31
- normalizedPath: trimmedPath,
32
- };
33
- }
34
- /**
35
- * Validate URL format
36
- * @param path - The path to validate
37
- * @returns true if the path is a valid URL (any protocol)
38
- */
39
- static isValidUrl(path) {
40
- try {
41
- const url = new URL(path.trim());
42
- // URL constructor accepts any protocol, so we just check if it parses
43
- return url.protocol.length > 0;
44
- }
45
- catch {
46
- return false;
47
- }
48
- }
49
- /**
50
- * Check if path is HTTP/HTTPS URL
51
- * @param path - The path to check
52
- * @returns true if the path is an HTTP or HTTPS URL
53
- */
54
- static isRemoteUrl(path) {
55
- try {
56
- const trimmed = path.trim();
57
- // Must start with http:// or https:// to be a valid remote URL
58
- // This prevents malformed URLs like "http:example.com" from being accepted
59
- if (!trimmed.startsWith('http://') && !trimmed.startsWith('https://')) {
60
- return false;
61
- }
62
- const url = new URL(trimmed);
63
- // Must be http or https protocol
64
- if (url.protocol !== 'http:' && url.protocol !== 'https:') {
65
- return false;
66
- }
67
- // Must have a hostname (not empty)
68
- if (!url.hostname || url.hostname.length === 0) {
69
- return false;
70
- }
71
- return true;
72
- }
73
- catch {
74
- return false;
75
- }
76
- }
77
- }
78
- //# sourceMappingURL=path-type-detector.js.map
@@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C7B,IAAI,CAAC;YACH,MAAM,OAAO,GAAG,IAAI,CAAC,IAAI,EAAE,CAAC;YAE5B,+DAA+D;YAC/D,2EAA2E;YAC3E,IAAI,CAAC,OAAO,CAAC,UAAU,CAAC,SAAS,CAAC,IAAI,CAAC,OAAO,CAAC,UAAU,CAAC,UAAU,CAAC,EAAE,CAAC;gBACtE,OAAO,KAAK,CAAC;YACf,CAAC;YAED,MAAM,GAAG,GAAG,IAAI,GAAG,CAAC,OAAO,CAAC,CAAC;YAE7B,iCAAiC;YACjC,IAAI,GAAG,CAAC,QAAQ,KAAK,OAAO,IAAI,GAAG,CAAC,QAAQ,KAAK,QAAQ,EAAE,CAAC;gBAC1D,OAAO,KAAK,CAAC;YACf,CAAC;YAED,mCAAmC;YACnC,IAAI,CAAC,GAAG,CAAC,QAAQ,IAAI,GAAG,CAAC,QAAQ,CAAC,MAAM,KAAK,CAAC,EAAE,CAAC;gBAC/C,OAAO,KAAK,CAAC;YACf,CAAC;YAED,OAAO,IAAI,CAAC;QACd,CAAC;QAAC,MAAM,CAAC;YACP,OAAO,KAAK,CAAC;QACf,CAAC;IACH,CAAC;CACF"}
@@ -1,108 +0,0 @@
1
- /**
2
- * Remote documentation source - loads documentation from HTTP/HTTPS URLs
3
- */
4
- import { DocumentationSource } from './documentation-source.js';
5
- import { LoadResult } from './documentation-loader.js';
6
- import { CompodocDocumentation } from '../types/compodoc.js';
7
- /**
8
- * Options for RemoteDocumentationSource
9
- */
10
- export interface RemoteSourceOptions {
11
- /** The URL to fetch documentation from */
12
- url: string;
13
- /** Request timeout in milliseconds */
14
- timeout: number;
15
- /** Maximum number of retry attempts */
16
- maxRetries: number;
17
- /** Polling interval in milliseconds */
18
- pollingInterval: number;
19
- /** Callback invoked when documentation is reloaded */
20
- onReload?: (data: CompodocDocumentation) => void;
21
- /** Callback invoked when an error occurs */
22
- onError?: (error: Error) => void;
23
- }
24
- /**
25
- * RemoteDocumentationSource class
26
- * Implements DocumentationSource interface for remote HTTP/HTTPS sources
27
- *
28
- * Features:
29
- * - Fetches documentation from remote URLs
30
- * - Caches responses with ETag/Last-Modified headers
31
- * - Polls for updates using conditional requests
32
- * - Handles network errors with retry logic
33
- */
34
- export declare class RemoteDocumentationSource implements DocumentationSource {
35
- private url;
36
- private httpClient;
37
- private cacheManager;
38
- private pollingTimer?;
39
- private currentData?;
40
- private pollingInterval;
41
- private onReloadCallback?;
42
- private onErrorCallback?;
43
- constructor(options: RemoteSourceOptions);
44
- /**
45
- * Load documentation from the remote URL
46
- *
47
- * @returns Promise resolving to LoadResult with success status and data or error
48
- */
49
- load(): Promise<LoadResult>;
50
- /**
51
- * Start monitoring for changes by polling the remote URL
52
- *
53
- * Uses setInterval to periodically check for updates using conditional requests
54
- */
55
- startMonitoring(): void;
56
- /**
57
- * Stop monitoring for changes
58
- *
59
- * Clears the polling interval
60
- */
61
- stopMonitoring(): Promise<void>;
62
- /**
63
- * Get currently loaded documentation data
64
- *
65
- * @returns The currently loaded CompodocDocumentation or undefined if not loaded
66
- */
67
- getCurrentData(): CompodocDocumentation | undefined;
68
- /**
69
- * Clean up resources and dispose of the source
70
- *
71
- * Stops monitoring and clears cached data
72
- */
73
- dispose(): Promise<void>;
74
- /**
75
- * Poll for updates using conditional requests
76
- *
77
- * Uses If-None-Match (ETag) and If-Modified-Since (Last-Modified) headers
78
- * to minimize bandwidth. If the server returns 304 Not Modified, uses cached data.
79
- *
80
- * @private
81
- */
82
- private poll;
83
- /**
84
- * Fetch and parse documentation from the remote URL
85
- *
86
- * @private
87
- * @returns Promise resolving to LoadResult
88
- */
89
- private fetchDocumentation;
90
- /**
91
- * Parse JSON string into CompodocDocumentation
92
- *
93
- * @private
94
- * @param content - JSON string to parse
95
- * @returns Parsed CompodocDocumentation object
96
- * @throws ParseError if JSON is invalid
97
- */
98
- private parseJson;
99
- /**
100
- * Validate the basic structure of the documentation
101
- *
102
- * @private
103
- * @param data - Data to validate
104
- * @returns Error message if validation fails, null otherwise
105
- */
106
- private validateStructure;
107
- }
108
- //# sourceMappingURL=remote-documentation-source.d.ts.map