@rsdoctor/core 1.6.1 → 2.0.0-alpha.1

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (411) hide show
  1. package/dist/build-utils/build/chunks/assetsModules.d.ts +1 -1
  2. package/dist/build-utils/build/chunks/assetsModules.js +1 -1
  3. package/dist/build-utils/build/chunks/index.d.ts +0 -1
  4. package/dist/build-utils/build/chunks/index.js +0 -1
  5. package/dist/build-utils/build/chunks/rspack/transform.d.ts +1 -1
  6. package/dist/build-utils/build/chunks/rspack/transform.js +1 -1
  7. package/dist/build-utils/build/envinfo.d.ts +13 -0
  8. package/dist/build-utils/build/envinfo.js +60 -0
  9. package/dist/build-utils/build/file/cache.d.ts +5 -0
  10. package/dist/build-utils/build/file/cache.js +24 -0
  11. package/dist/build-utils/build/file/index.d.ts +3 -0
  12. package/dist/build-utils/build/file/index.js +5 -0
  13. package/dist/build-utils/build/file/sharding.d.ts +21 -0
  14. package/dist/build-utils/build/file/sharding.js +38 -0
  15. package/dist/build-utils/build/index.d.ts +5 -0
  16. package/dist/build-utils/build/index.js +11 -6
  17. package/dist/build-utils/build/json.d.ts +3 -0
  18. package/dist/build-utils/build/json.js +67 -0
  19. package/dist/build-utils/build/loader/probeLoader.d.ts +2 -2
  20. package/dist/build-utils/build/loader/probeLoader.js +4 -4
  21. package/dist/build-utils/build/loader/probeLoaderPlugin.d.ts +1 -1
  22. package/dist/build-utils/build/loader/probeLoaderPlugin.js +1 -1
  23. package/dist/build-utils/build/module-graph/index.d.ts +0 -3
  24. package/dist/build-utils/build/module-graph/index.js +0 -3
  25. package/dist/build-utils/build/module-graph/parser.d.ts +1 -1
  26. package/dist/build-utils/build/module-graph/parser.js +1 -1
  27. package/dist/build-utils/build/module-graph/rspack/transform.d.ts +1 -1
  28. package/dist/build-utils/build/module-graph/rspack/transform.js +7 -5
  29. package/dist/build-utils/build/module-graph/utils.d.ts +1 -1
  30. package/dist/build-utils/build/module-graph/utils.js +5 -4
  31. package/dist/build-utils/build/process.d.ts +2 -0
  32. package/dist/build-utils/build/process.js +18 -0
  33. package/dist/build-utils/build/server.d.ts +15 -0
  34. package/dist/build-utils/build/server.js +107 -0
  35. package/dist/build-utils/build/utils/loader.d.ts +2 -2
  36. package/dist/build-utils/build/utils/loader.js +10 -19
  37. package/dist/build-utils/build/utils/parseBundle.d.ts +1 -1
  38. package/dist/build-utils/build/utils/parseBundle.js +6 -8
  39. package/dist/build-utils/build/utils/plugin.d.ts +1 -1
  40. package/dist/build-utils/build/utils/plugin.js +1 -2
  41. package/dist/build-utils/index.d.ts +10 -0
  42. package/dist/build-utils/index.js +12 -2
  43. package/dist/collection.d.ts +1 -0
  44. package/dist/collection.js +2 -0
  45. package/dist/common/file.d.ts +2 -0
  46. package/dist/common/file.js +8 -0
  47. package/dist/common/global-config.d.ts +21 -0
  48. package/dist/common/global-config.js +33 -0
  49. package/dist/common/index.d.ts +4 -0
  50. package/dist/common/index.js +6 -0
  51. package/dist/common-browser.d.ts +1 -0
  52. package/dist/common-browser.js +2 -0
  53. package/dist/error/error.d.ts +35 -0
  54. package/dist/error/error.js +143 -0
  55. package/dist/error/index.d.ts +2 -0
  56. package/dist/error/index.js +3 -0
  57. package/dist/error/transform.d.ts +3 -0
  58. package/dist/error/transform.js +138 -0
  59. package/dist/error/utils.d.ts +4 -0
  60. package/dist/error/utils.js +23 -0
  61. package/dist/graph/index.d.ts +1 -0
  62. package/dist/graph/index.js +2 -0
  63. package/dist/index.d.ts +2 -0
  64. package/dist/index.js +4 -2
  65. package/dist/inner-plugins/constants.d.ts +1 -1
  66. package/dist/inner-plugins/constants.js +1 -1
  67. package/dist/inner-plugins/loaders/proxy.d.ts +4 -4
  68. package/dist/inner-plugins/plugins/base.d.ts +1 -1
  69. package/dist/inner-plugins/plugins/bundle.d.ts +1 -1
  70. package/dist/inner-plugins/plugins/bundle.js +4 -20
  71. package/dist/inner-plugins/plugins/ensureModulesChunkGraph.d.ts +6 -8
  72. package/dist/inner-plugins/plugins/ensureModulesChunkGraph.js +12 -77
  73. package/dist/inner-plugins/plugins/errors.d.ts +3 -3
  74. package/dist/inner-plugins/plugins/errors.js +6 -6
  75. package/dist/inner-plugins/plugins/index.d.ts +0 -1
  76. package/dist/inner-plugins/plugins/index.js +0 -1
  77. package/dist/inner-plugins/plugins/loader.d.ts +1 -1
  78. package/dist/inner-plugins/plugins/loader.js +8 -20
  79. package/dist/inner-plugins/plugins/plugins.d.ts +1 -1
  80. package/dist/inner-plugins/plugins/plugins.js +3 -3
  81. package/dist/inner-plugins/plugins/progress.d.ts +3 -3
  82. package/dist/inner-plugins/plugins/progress.js +16 -18
  83. package/dist/inner-plugins/plugins/resolver.d.ts +2 -3
  84. package/dist/inner-plugins/plugins/resolver.js +2 -2
  85. package/dist/inner-plugins/plugins/rspack.d.ts +8 -3
  86. package/dist/inner-plugins/plugins/rspack.js +18 -4
  87. package/dist/inner-plugins/plugins/rules.d.ts +1 -1
  88. package/dist/inner-plugins/plugins/rules.js +6 -6
  89. package/dist/inner-plugins/plugins/sourcemapTool.d.ts +2 -2
  90. package/dist/inner-plugins/plugins/sourcemapTool.js +2 -2
  91. package/dist/inner-plugins/plugins/summary.d.ts +1 -1
  92. package/dist/inner-plugins/plugins/summary.js +3 -3
  93. package/dist/inner-plugins/utils/config.d.ts +3 -4
  94. package/dist/inner-plugins/utils/config.js +4 -17
  95. package/dist/inner-plugins/utils/loader.d.ts +4 -7
  96. package/dist/inner-plugins/utils/loader.js +10 -36
  97. package/dist/inner-plugins/utils/normalize-config.d.ts +4 -7
  98. package/dist/inner-plugins/utils/openBrowser.d.ts +1 -0
  99. package/dist/inner-plugins/utils/openBrowser.js +55 -0
  100. package/dist/inner-plugins/utils/plugin-common.js +4 -4
  101. package/dist/inner-plugins/utils/plugin.d.ts +1 -1
  102. package/dist/inner-plugins/utils/plugin.js +1 -1
  103. package/dist/inner-plugins/utils/sdk.d.ts +2 -3
  104. package/dist/inner-plugins/utils/sdk.js +2 -2
  105. package/dist/logger.d.ts +9 -0
  106. package/dist/logger.js +51 -0
  107. package/dist/{inner-plugins/constants.d.cts → rspack-plugin/constants.d.ts} +4 -1
  108. package/dist/rspack-plugin/constants.js +23 -0
  109. package/dist/rspack-plugin/index.d.ts +2 -0
  110. package/dist/rspack-plugin/index.js +3 -0
  111. package/dist/rspack-plugin/multiple.d.ts +8 -0
  112. package/dist/rspack-plugin/multiple.js +39 -0
  113. package/dist/rspack-plugin/plugin.d.ts +25 -0
  114. package/dist/rspack-plugin/plugin.js +133 -0
  115. package/dist/rule-utils/document/document.d.ts +16 -0
  116. package/dist/rule-utils/document/document.js +46 -0
  117. package/dist/rule-utils/document/index.d.ts +3 -0
  118. package/dist/rule-utils/document/index.js +4 -0
  119. package/dist/rule-utils/document/server.d.ts +4 -0
  120. package/dist/rule-utils/document/server.js +13 -0
  121. package/dist/rule-utils/document/types.d.ts +31 -0
  122. package/dist/rule-utils/index.d.ts +2 -0
  123. package/dist/rule-utils/index.js +3 -0
  124. package/dist/rule-utils/parser/asserts.d.ts +81 -0
  125. package/dist/rule-utils/parser/asserts.js +105 -0
  126. package/dist/rule-utils/parser/index.d.ts +4 -0
  127. package/dist/rule-utils/parser/index.js +5 -0
  128. package/dist/rule-utils/parser/parser.d.ts +118 -0
  129. package/dist/rule-utils/parser/parser.js +24 -0
  130. package/dist/rule-utils/parser/types.d.ts +30 -0
  131. package/dist/rule-utils/parser/types.js +8 -0
  132. package/dist/rule-utils/parser/utils.d.ts +30 -0
  133. package/dist/rule-utils/parser/utils.js +106 -0
  134. package/dist/rules/linter.d.ts +1 -1
  135. package/dist/rules/linter.js +1 -1
  136. package/dist/rules/rule.d.ts +2 -2
  137. package/dist/rules/rule.js +2 -2
  138. package/dist/rules/rules/cjs-require/index.d.ts +1 -1
  139. package/dist/rules/rules/cjs-require/index.js +3 -3
  140. package/dist/rules/rules/cross-chunks-package/index.d.ts +1 -1
  141. package/dist/rules/rules/cross-chunks-package/index.js +2 -2
  142. package/dist/rules/rules/default-import-check/index.d.ts +1 -1
  143. package/dist/rules/rules/default-import-check/index.js +2 -2
  144. package/dist/rules/rules/default-import-check/utils.d.ts +2 -2
  145. package/dist/rules/rules/default-import-check/utils.js +2 -2
  146. package/dist/rules/rules/duplicate-package/index.d.ts +3 -3
  147. package/dist/rules/rules/duplicate-package/index.js +3 -3
  148. package/dist/rules/rules/duplicate-package/utils.d.ts +1 -1
  149. package/dist/rules/rules/ecma-version-check/index.d.ts +3 -2
  150. package/dist/rules/rules/ecma-version-check/index.js +1 -1
  151. package/dist/rules/rules/ecma-version-check/types.d.ts +1 -2
  152. package/dist/rules/rules/ecma-version-check/utils.d.ts +1 -1
  153. package/dist/rules/rules/esm-resolved-to-cjs/index.d.ts +1 -1
  154. package/dist/rules/rules/esm-resolved-to-cjs/index.js +3 -18
  155. package/dist/rules/rules/index.d.ts +1 -1
  156. package/dist/rules/rules/loader-performance-optimization/index.d.ts +1 -1
  157. package/dist/rules/rules/loader-performance-optimization/index.js +3 -3
  158. package/dist/rules/rules/loader-performance-optimization/types.d.ts +1 -1
  159. package/dist/rules/rules/module-mixed-chunks/index.d.ts +1 -1
  160. package/dist/rules/rules/module-mixed-chunks/index.js +2 -2
  161. package/dist/rules/rules/side-effects-only-imports/index.d.ts +1 -1
  162. package/dist/rules/rules/side-effects-only-imports/index.js +2 -2
  163. package/dist/rules/utils.d.ts +1 -1
  164. package/dist/rules/utils.js +1 -1
  165. package/dist/sdk/index.d.ts +2 -0
  166. package/dist/sdk/index.js +3 -0
  167. package/dist/sdk/multiple/controller.d.ts +12 -0
  168. package/dist/sdk/multiple/controller.js +42 -0
  169. package/dist/sdk/multiple/index.d.ts +2 -0
  170. package/dist/sdk/multiple/index.js +3 -0
  171. package/dist/sdk/multiple/primary.d.ts +32 -0
  172. package/dist/sdk/multiple/primary.js +64 -0
  173. package/dist/sdk/multiple/server.d.ts +7 -0
  174. package/dist/sdk/multiple/server.js +14 -0
  175. package/dist/sdk/sdk/core.d.ts +33 -0
  176. package/dist/sdk/sdk/core.js +163 -0
  177. package/dist/sdk/sdk/index.d.ts +52 -0
  178. package/dist/sdk/sdk/index.js +435 -0
  179. package/dist/sdk/sdk/types.d.ts +26 -0
  180. package/dist/sdk/sdk/types.js +1 -0
  181. package/dist/sdk/server/apis/alerts.d.ts +5 -0
  182. package/dist/sdk/server/apis/alerts.js +30 -0
  183. package/dist/sdk/server/apis/base.d.ts +11 -0
  184. package/dist/sdk/server/apis/base.js +22 -0
  185. package/dist/sdk/server/apis/bundle-diff.d.ts +6 -0
  186. package/dist/sdk/server/apis/bundle-diff.js +51 -0
  187. package/dist/sdk/server/apis/data.d.ts +6 -0
  188. package/dist/sdk/server/apis/data.js +44 -0
  189. package/dist/sdk/server/apis/fs.d.ts +5 -0
  190. package/dist/sdk/server/apis/fs.js +28 -0
  191. package/dist/sdk/server/apis/graph.d.ts +12 -0
  192. package/dist/sdk/server/apis/graph.js +116 -0
  193. package/dist/sdk/server/apis/index.d.ts +10 -0
  194. package/dist/sdk/server/apis/index.js +11 -0
  195. package/dist/sdk/server/apis/loader.d.ts +15 -0
  196. package/dist/sdk/server/apis/loader.js +120 -0
  197. package/dist/sdk/server/apis/plugin.d.ts +6 -0
  198. package/dist/sdk/server/apis/plugin.js +39 -0
  199. package/dist/sdk/server/apis/project.d.ts +8 -0
  200. package/dist/sdk/server/apis/project.js +59 -0
  201. package/dist/sdk/server/apis/renderer.d.ts +6 -0
  202. package/dist/sdk/server/apis/renderer.js +33 -0
  203. package/dist/sdk/server/apis/resolver.d.ts +6 -0
  204. package/dist/sdk/server/apis/resolver.js +38 -0
  205. package/dist/sdk/server/client.d.ts +3 -0
  206. package/dist/sdk/server/client.js +8 -0
  207. package/dist/sdk/server/fakeServer.d.ts +9 -0
  208. package/dist/sdk/server/fakeServer.js +12 -0
  209. package/dist/sdk/server/index.d.ts +44 -0
  210. package/dist/sdk/server/index.js +292 -0
  211. package/dist/sdk/server/json-body.d.ts +6 -0
  212. package/dist/sdk/server/json-body.js +150 -0
  213. package/dist/sdk/server/router.d.ts +24 -0
  214. package/dist/sdk/server/router.js +83 -0
  215. package/dist/sdk/server/security.d.ts +5 -0
  216. package/dist/sdk/server/security.js +47 -0
  217. package/dist/sdk/server/socket/api.d.ts +15 -0
  218. package/dist/sdk/server/socket/api.js +22 -0
  219. package/dist/sdk/server/socket/index.d.ts +48 -0
  220. package/dist/sdk/server/socket/index.js +166 -0
  221. package/dist/sdk/server/utils.d.ts +6 -0
  222. package/dist/sdk/server/utils.js +19 -0
  223. package/dist/sdk/utils/base.d.ts +1 -0
  224. package/dist/sdk/utils/base.js +22 -0
  225. package/dist/sdk/utils/constant.d.ts +1 -0
  226. package/dist/sdk/utils/constant.js +4 -0
  227. package/dist/sdk/utils/index.d.ts +3 -0
  228. package/dist/sdk/utils/index.js +4 -0
  229. package/dist/sdk/utils/openBrowser.d.ts +4 -0
  230. package/dist/sdk/utils/openBrowser.js +53 -0
  231. package/dist/sdk/utils/upload.d.ts +2 -0
  232. package/dist/sdk/utils/upload.js +6 -0
  233. package/dist/sdk.d.ts +1 -0
  234. package/dist/sdk.js +2 -0
  235. package/dist/types/index.d.ts +0 -1
  236. package/dist/types/index.js +0 -1
  237. package/dist/types/loader.d.ts +1 -1
  238. package/dist/types/plugin.d.ts +7 -28
  239. package/dist/types/rules.d.ts +4 -4
  240. package/package.json +123 -55
  241. package/static/openChrome.applescript +95 -0
  242. package/dist/build-utils/build/chunks/assetsModules.cjs +0 -46
  243. package/dist/build-utils/build/chunks/assetsModules.d.cts +0 -17
  244. package/dist/build-utils/build/chunks/chunkTransform.cjs +0 -43
  245. package/dist/build-utils/build/chunks/chunkTransform.d.cts +0 -4
  246. package/dist/build-utils/build/chunks/chunkTransform.d.ts +0 -4
  247. package/dist/build-utils/build/chunks/chunkTransform.js +0 -6
  248. package/dist/build-utils/build/chunks/index.cjs +0 -76
  249. package/dist/build-utils/build/chunks/index.d.cts +0 -3
  250. package/dist/build-utils/build/chunks/rspack/transform.cjs +0 -84
  251. package/dist/build-utils/build/chunks/rspack/transform.d.cts +0 -13
  252. package/dist/build-utils/build/index.cjs +0 -56
  253. package/dist/build-utils/build/index.d.cts +0 -5
  254. package/dist/build-utils/build/loader/index.cjs +0 -69
  255. package/dist/build-utils/build/loader/index.d.cts +0 -2
  256. package/dist/build-utils/build/loader/probeLoader.cjs +0 -93
  257. package/dist/build-utils/build/loader/probeLoader.d.cts +0 -4
  258. package/dist/build-utils/build/loader/probeLoaderPlugin.cjs +0 -69
  259. package/dist/build-utils/build/loader/probeLoaderPlugin.d.cts +0 -5
  260. package/dist/build-utils/build/module-graph/index.cjs +0 -83
  261. package/dist/build-utils/build/module-graph/index.d.cts +0 -4
  262. package/dist/build-utils/build/module-graph/parser.cjs +0 -50
  263. package/dist/build-utils/build/module-graph/parser.d.cts +0 -2
  264. package/dist/build-utils/build/module-graph/rspack/transform.cjs +0 -155
  265. package/dist/build-utils/build/module-graph/rspack/transform.d.cts +0 -26
  266. package/dist/build-utils/build/module-graph/transform.cjs +0 -44
  267. package/dist/build-utils/build/module-graph/transform.d.cts +0 -4
  268. package/dist/build-utils/build/module-graph/transform.d.ts +0 -4
  269. package/dist/build-utils/build/module-graph/transform.js +0 -7
  270. package/dist/build-utils/build/module-graph/treeShaking.cjs +0 -110
  271. package/dist/build-utils/build/module-graph/treeShaking.d.cts +0 -2
  272. package/dist/build-utils/build/module-graph/treeShaking.d.ts +0 -2
  273. package/dist/build-utils/build/module-graph/treeShaking.js +0 -73
  274. package/dist/build-utils/build/module-graph/utils.cjs +0 -99
  275. package/dist/build-utils/build/module-graph/utils.d.cts +0 -3
  276. package/dist/build-utils/build/module-graph/webpack/transform.cjs +0 -174
  277. package/dist/build-utils/build/module-graph/webpack/transform.d.cts +0 -16
  278. package/dist/build-utils/build/module-graph/webpack/transform.d.ts +0 -16
  279. package/dist/build-utils/build/module-graph/webpack/transform.js +0 -124
  280. package/dist/build-utils/build/utils/index.cjs +0 -76
  281. package/dist/build-utils/build/utils/index.d.cts +0 -3
  282. package/dist/build-utils/build/utils/loader.cjs +0 -358
  283. package/dist/build-utils/build/utils/loader.d.cts +0 -20
  284. package/dist/build-utils/build/utils/parseBundle.cjs +0 -287
  285. package/dist/build-utils/build/utils/parseBundle.d.cts +0 -12
  286. package/dist/build-utils/build/utils/plugin.cjs +0 -65
  287. package/dist/build-utils/build/utils/plugin.d.cts +0 -5
  288. package/dist/build-utils/index.cjs +0 -40
  289. package/dist/build-utils/index.d.cts +0 -1
  290. package/dist/index.cjs +0 -85
  291. package/dist/index.d.cts +0 -3
  292. package/dist/inner-plugins/constants.cjs +0 -68
  293. package/dist/inner-plugins/index.cjs +0 -69
  294. package/dist/inner-plugins/index.d.cts +0 -2
  295. package/dist/inner-plugins/loaders/proxy.cjs +0 -108
  296. package/dist/inner-plugins/loaders/proxy.d.cts +0 -7
  297. package/dist/inner-plugins/plugins/base.cjs +0 -57
  298. package/dist/inner-plugins/plugins/base.d.cts +0 -12
  299. package/dist/inner-plugins/plugins/bundle.cjs +0 -116
  300. package/dist/inner-plugins/plugins/bundle.d.cts +0 -15
  301. package/dist/inner-plugins/plugins/bundleTagPlugin.cjs +0 -88
  302. package/dist/inner-plugins/plugins/bundleTagPlugin.d.cts +0 -6
  303. package/dist/inner-plugins/plugins/bundleTagPlugin.d.ts +0 -6
  304. package/dist/inner-plugins/plugins/bundleTagPlugin.js +0 -51
  305. package/dist/inner-plugins/plugins/ensureModulesChunkGraph.cjs +0 -182
  306. package/dist/inner-plugins/plugins/ensureModulesChunkGraph.d.cts +0 -36
  307. package/dist/inner-plugins/plugins/errors.cjs +0 -102
  308. package/dist/inner-plugins/plugins/errors.d.cts +0 -11
  309. package/dist/inner-plugins/plugins/index.cjs +0 -132
  310. package/dist/inner-plugins/plugins/index.d.cts +0 -11
  311. package/dist/inner-plugins/plugins/loader.cjs +0 -169
  312. package/dist/inner-plugins/plugins/loader.d.cts +0 -10
  313. package/dist/inner-plugins/plugins/plugins.cjs +0 -77
  314. package/dist/inner-plugins/plugins/plugins.d.cts +0 -8
  315. package/dist/inner-plugins/plugins/progress.cjs +0 -74
  316. package/dist/inner-plugins/plugins/progress.d.cts +0 -8
  317. package/dist/inner-plugins/plugins/resolver.cjs +0 -94
  318. package/dist/inner-plugins/plugins/resolver.d.cts +0 -13
  319. package/dist/inner-plugins/plugins/rspack.cjs +0 -122
  320. package/dist/inner-plugins/plugins/rspack.d.cts +0 -4
  321. package/dist/inner-plugins/plugins/rules.cjs +0 -101
  322. package/dist/inner-plugins/plugins/rules.d.cts +0 -8
  323. package/dist/inner-plugins/plugins/sourcemapTool.cjs +0 -279
  324. package/dist/inner-plugins/plugins/sourcemapTool.d.cts +0 -52
  325. package/dist/inner-plugins/plugins/summary.cjs +0 -129
  326. package/dist/inner-plugins/plugins/summary.d.cts +0 -14
  327. package/dist/inner-plugins/utils/circleDetect.cjs +0 -53
  328. package/dist/inner-plugins/utils/circleDetect.d.cts +0 -4
  329. package/dist/inner-plugins/utils/config.cjs +0 -207
  330. package/dist/inner-plugins/utils/config.d.cts +0 -5
  331. package/dist/inner-plugins/utils/index.cjs +0 -110
  332. package/dist/inner-plugins/utils/index.d.cts +0 -9
  333. package/dist/inner-plugins/utils/loader.cjs +0 -222
  334. package/dist/inner-plugins/utils/loader.d.cts +0 -13
  335. package/dist/inner-plugins/utils/normalize-config.cjs +0 -126
  336. package/dist/inner-plugins/utils/normalize-config.d.cts +0 -40
  337. package/dist/inner-plugins/utils/plugin-common.cjs +0 -147
  338. package/dist/inner-plugins/utils/plugin-common.d.cts +0 -11
  339. package/dist/inner-plugins/utils/plugin.cjs +0 -110
  340. package/dist/inner-plugins/utils/plugin.d.cts +0 -4
  341. package/dist/inner-plugins/utils/sdk.cjs +0 -59
  342. package/dist/inner-plugins/utils/sdk.d.cts +0 -8
  343. package/dist/rslib-runtime.js +0 -19
  344. package/dist/rules/index.cjs +0 -85
  345. package/dist/rules/index.d.cts +0 -3
  346. package/dist/rules/linter.cjs +0 -76
  347. package/dist/rules/linter.d.cts +0 -9
  348. package/dist/rules/rule.cjs +0 -141
  349. package/dist/rules/rule.d.cts +0 -27
  350. package/dist/rules/rules/cjs-require/index.cjs +0 -87
  351. package/dist/rules/rules/cjs-require/index.d.cts +0 -4
  352. package/dist/rules/rules/cjs-require/types.cjs +0 -18
  353. package/dist/rules/rules/cjs-require/types.d.cts +0 -7
  354. package/dist/rules/rules/cross-chunks-package/index.cjs +0 -78
  355. package/dist/rules/rules/cross-chunks-package/index.d.cts +0 -4
  356. package/dist/rules/rules/cross-chunks-package/types.cjs +0 -18
  357. package/dist/rules/rules/cross-chunks-package/types.d.cts +0 -3
  358. package/dist/rules/rules/cross-chunks-package/utils.cjs +0 -44
  359. package/dist/rules/rules/cross-chunks-package/utils.d.cts +0 -1
  360. package/dist/rules/rules/default-import-check/index.cjs +0 -120
  361. package/dist/rules/rules/default-import-check/index.d.cts +0 -4
  362. package/dist/rules/rules/default-import-check/types.cjs +0 -18
  363. package/dist/rules/rules/default-import-check/types.d.cts +0 -4
  364. package/dist/rules/rules/default-import-check/utils.cjs +0 -101
  365. package/dist/rules/rules/default-import-check/utils.d.cts +0 -10
  366. package/dist/rules/rules/duplicate-package/index.cjs +0 -76
  367. package/dist/rules/rules/duplicate-package/index.d.cts +0 -4
  368. package/dist/rules/rules/duplicate-package/types.cjs +0 -64
  369. package/dist/rules/rules/duplicate-package/types.d.cts +0 -24
  370. package/dist/rules/rules/duplicate-package/utils.cjs +0 -88
  371. package/dist/rules/rules/duplicate-package/utils.d.cts +0 -3
  372. package/dist/rules/rules/ecma-version-check/index.cjs +0 -100
  373. package/dist/rules/rules/ecma-version-check/index.d.cts +0 -4
  374. package/dist/rules/rules/ecma-version-check/types.cjs +0 -18
  375. package/dist/rules/rules/ecma-version-check/types.d.cts +0 -3
  376. package/dist/rules/rules/ecma-version-check/utils.cjs +0 -43
  377. package/dist/rules/rules/ecma-version-check/utils.d.cts +0 -2
  378. package/dist/rules/rules/esm-resolved-to-cjs/index.cjs +0 -256
  379. package/dist/rules/rules/esm-resolved-to-cjs/index.d.cts +0 -4
  380. package/dist/rules/rules/esm-resolved-to-cjs/types.cjs +0 -18
  381. package/dist/rules/rules/esm-resolved-to-cjs/types.d.cts +0 -8
  382. package/dist/rules/rules/index.cjs +0 -59
  383. package/dist/rules/rules/index.d.cts +0 -2
  384. package/dist/rules/rules/loader-performance-optimization/index.cjs +0 -123
  385. package/dist/rules/rules/loader-performance-optimization/index.d.cts +0 -4
  386. package/dist/rules/rules/loader-performance-optimization/types.cjs +0 -18
  387. package/dist/rules/rules/loader-performance-optimization/types.d.cts +0 -22
  388. package/dist/rules/rules/loader-performance-optimization/utils.cjs +0 -47
  389. package/dist/rules/rules/loader-performance-optimization/utils.d.cts +0 -1
  390. package/dist/rules/rules/module-mixed-chunks/index.cjs +0 -89
  391. package/dist/rules/rules/module-mixed-chunks/index.d.cts +0 -4
  392. package/dist/rules/rules/module-mixed-chunks/types.cjs +0 -18
  393. package/dist/rules/rules/module-mixed-chunks/types.d.cts +0 -3
  394. package/dist/rules/rules/side-effects-only-imports/index.cjs +0 -118
  395. package/dist/rules/rules/side-effects-only-imports/index.d.cts +0 -4
  396. package/dist/rules/rules/side-effects-only-imports/types.cjs +0 -18
  397. package/dist/rules/rules/side-effects-only-imports/types.d.cts +0 -9
  398. package/dist/rules/utils.cjs +0 -50
  399. package/dist/rules/utils.d.cts +0 -3
  400. package/dist/types/chunks.cjs +0 -18
  401. package/dist/types/chunks.d.cts +0 -6
  402. package/dist/types/chunks.d.ts +0 -6
  403. package/dist/types/index.cjs +0 -83
  404. package/dist/types/index.d.cts +0 -4
  405. package/dist/types/loader.cjs +0 -18
  406. package/dist/types/loader.d.cts +0 -19
  407. package/dist/types/plugin.cjs +0 -18
  408. package/dist/types/plugin.d.cts +0 -51
  409. package/dist/types/rules.cjs +0 -18
  410. package/dist/types/rules.d.cts +0 -7
  411. /package/dist/{types/chunks.js → rule-utils/document/types.js} +0 -0
@@ -0,0 +1,30 @@
1
+ import "node:module";
2
+ import { SDK } from "@rsdoctor/shared/types";
3
+ import { BaseAPI } from "./base.js";
4
+ import { Router } from "../router.js";
5
+ function _ts_decorate(decorators, target, key, desc) {
6
+ var c = arguments.length, r = c < 3 ? target : null === desc ? desc = Object.getOwnPropertyDescriptor(target, key) : desc, d;
7
+ if ("object" == typeof Reflect && "function" == typeof Reflect.decorate) r = Reflect.decorate(decorators, target, key, desc);
8
+ else for(var i = decorators.length - 1; i >= 0; i--)if (d = decorators[i]) r = (c < 3 ? d(r) : c > 3 ? d(target, key, r) : d(target, key)) || r;
9
+ return c > 3 && r && Object.defineProperty(target, key, r), r;
10
+ }
11
+ function _ts_metadata(k, v) {
12
+ if ("object" == typeof Reflect && "function" == typeof Reflect.metadata) return Reflect.metadata(k, v);
13
+ }
14
+ class AlertsAPI extends BaseAPI {
15
+ async getPackageRelationAlertDetails() {
16
+ const { req } = this.ctx;
17
+ const { id, target } = req.body;
18
+ return this.dataLoader.loadAPI(SDK.ServerAPI.API.GetPackageRelationAlertDetails, {
19
+ id,
20
+ target
21
+ });
22
+ }
23
+ }
24
+ _ts_decorate([
25
+ Router.post(SDK.ServerAPI.API.GetPackageRelationAlertDetails),
26
+ _ts_metadata("design:type", Function),
27
+ _ts_metadata("design:paramtypes", []),
28
+ _ts_metadata("design:returntype", Promise)
29
+ ], AlertsAPI.prototype, "getPackageRelationAlertDetails", null);
30
+ export { AlertsAPI };
@@ -0,0 +1,11 @@
1
+ import { Data } from '../../../common/index.js';
2
+ import { Manifest, SDK } from '@rsdoctor/shared/types';
3
+ export declare class BaseAPI implements Manifest.ManifestDataLoader {
4
+ [key: string | symbol]: any;
5
+ readonly ctx: SDK.ServerAPI.APIContext;
6
+ protected dataLoader: Data.APIDataLoader;
7
+ constructor(sdk: SDK.RsdoctorSDKInstance, server: SDK.RsdoctorServerInstance);
8
+ loadManifest(): Promise<Manifest.RsdoctorManifestWithShardingFiles>;
9
+ loadData<T extends Manifest.RsdoctorManifestMappingKeys>(key: T): Promise<Manifest.InferManifestDataValue<T>>;
10
+ loadData(key: string): Promise<void>;
11
+ }
@@ -0,0 +1,22 @@
1
+ import "node:module";
2
+ import { Data } from "../../../common/index.js";
3
+ class BaseAPI {
4
+ async loadManifest() {
5
+ return this.ctx.sdk.getManifestData();
6
+ }
7
+ async loadData(key) {
8
+ const data = this.ctx.sdk.getStoreData();
9
+ const sep = '.';
10
+ let res = data[key];
11
+ if (key.includes(sep)) res = key.split(sep).reduce((t, k)=>t[k], data);
12
+ return res;
13
+ }
14
+ constructor(sdk, server){
15
+ this.ctx = {
16
+ sdk,
17
+ server
18
+ };
19
+ this.dataLoader = new Data.APIDataLoader(this);
20
+ }
21
+ }
22
+ export { BaseAPI };
@@ -0,0 +1,6 @@
1
+ import { SDK } from '@rsdoctor/shared/types';
2
+ import { BaseAPI } from './base.js';
3
+ export declare class BundleDiffAPI extends BaseAPI {
4
+ getBundleDiffSummary(): Promise<SDK.ServerAPI.InferResponseType<SDK.ServerAPI.API.GetBundleDiffSummary>>;
5
+ bundleDiffManifest(): Promise<SDK.ServerAPI.InferResponseType<SDK.ServerAPI.API.BundleDiffManifest>>;
6
+ }
@@ -0,0 +1,51 @@
1
+ import "node:module";
2
+ import { SDK } from "@rsdoctor/shared/types";
3
+ import { BaseAPI } from "./base.js";
4
+ import { Router } from "../router.js";
5
+ function _ts_decorate(decorators, target, key, desc) {
6
+ var c = arguments.length, r = c < 3 ? target : null === desc ? desc = Object.getOwnPropertyDescriptor(target, key) : desc, d;
7
+ if ("object" == typeof Reflect && "function" == typeof Reflect.decorate) r = Reflect.decorate(decorators, target, key, desc);
8
+ else for(var i = decorators.length - 1; i >= 0; i--)if (d = decorators[i]) r = (c < 3 ? d(r) : c > 3 ? d(target, key, r) : d(target, key)) || r;
9
+ return c > 3 && r && Object.defineProperty(target, key, r), r;
10
+ }
11
+ function _ts_metadata(k, v) {
12
+ if ("object" == typeof Reflect && "function" == typeof Reflect.metadata) return Reflect.metadata(k, v);
13
+ }
14
+ class BundleDiffAPI extends BaseAPI {
15
+ async getBundleDiffSummary() {
16
+ const { sdk } = this.ctx;
17
+ const { root, hash, errors, chunkGraph, moduleGraph, packageGraph, configs, moduleCodeMap, cloudManifestUrl } = sdk.getStoreData();
18
+ let outputFilename = '';
19
+ if ('string' == typeof configs?.[0]?.config?.output?.filename) outputFilename = configs?.[0]?.config?.output?.filename;
20
+ return {
21
+ root,
22
+ hash,
23
+ errors,
24
+ chunkGraph,
25
+ moduleGraph,
26
+ packageGraph,
27
+ outputFilename,
28
+ moduleCodeMap,
29
+ cloudManifestUrl
30
+ };
31
+ }
32
+ async bundleDiffManifest() {
33
+ const { sdk } = this.ctx;
34
+ const data = sdk.getStoreData();
35
+ return data;
36
+ }
37
+ }
38
+ _ts_decorate([
39
+ Router.get(SDK.ServerAPI.API.GetBundleDiffSummary),
40
+ Router.post(SDK.ServerAPI.API.GetBundleDiffSummary),
41
+ _ts_metadata("design:type", Function),
42
+ _ts_metadata("design:paramtypes", []),
43
+ _ts_metadata("design:returntype", Promise)
44
+ ], BundleDiffAPI.prototype, "getBundleDiffSummary", null);
45
+ _ts_decorate([
46
+ Router.get(SDK.ServerAPI.API.BundleDiffManifest),
47
+ _ts_metadata("design:type", Function),
48
+ _ts_metadata("design:paramtypes", []),
49
+ _ts_metadata("design:returntype", Promise)
50
+ ], BundleDiffAPI.prototype, "bundleDiffManifest", null);
51
+ export { BundleDiffAPI };
@@ -0,0 +1,6 @@
1
+ import { SDK } from '@rsdoctor/shared/types';
2
+ import { BaseAPI } from './base.js';
3
+ export declare class DataAPI extends BaseAPI {
4
+ loadDataByKey(): Promise<SDK.ServerAPI.InferResponseType<SDK.ServerAPI.API.LoadDataByKey>>;
5
+ sendMessageToClient(): Promise<SDK.ServerAPI.InferResponseType<SDK.ServerAPI.API.SendAPIDataToClient>>;
6
+ }
@@ -0,0 +1,44 @@
1
+ import "node:module";
2
+ import { SDK } from "@rsdoctor/shared/types";
3
+ import { BaseAPI } from "./base.js";
4
+ import { Router } from "../router.js";
5
+ function _ts_decorate(decorators, target, key, desc) {
6
+ var c = arguments.length, r = c < 3 ? target : null === desc ? desc = Object.getOwnPropertyDescriptor(target, key) : desc, d;
7
+ if ("object" == typeof Reflect && "function" == typeof Reflect.decorate) r = Reflect.decorate(decorators, target, key, desc);
8
+ else for(var i = decorators.length - 1; i >= 0; i--)if (d = decorators[i]) r = (c < 3 ? d(r) : c > 3 ? d(target, key, r) : d(target, key)) || r;
9
+ return c > 3 && r && Object.defineProperty(target, key, r), r;
10
+ }
11
+ function _ts_metadata(k, v) {
12
+ if ("object" == typeof Reflect && "function" == typeof Reflect.metadata) return Reflect.metadata(k, v);
13
+ }
14
+ class DataAPI extends BaseAPI {
15
+ async loadDataByKey() {
16
+ const { req } = this.ctx;
17
+ const { url } = req;
18
+ let { key } = req.body;
19
+ if (!key && url) {
20
+ const uri = new URL(url, 'http://127.0.0.1');
21
+ key = uri.pathname.replace(/^\//, '');
22
+ }
23
+ const data = await this.loadData(key);
24
+ return data;
25
+ }
26
+ async sendMessageToClient() {
27
+ const { req, server } = this.ctx;
28
+ const { api, data } = req.body;
29
+ await server.sendAPIDataToClient(api, data);
30
+ }
31
+ }
32
+ _ts_decorate([
33
+ Router.post(SDK.ServerAPI.API.LoadDataByKey),
34
+ _ts_metadata("design:type", Function),
35
+ _ts_metadata("design:paramtypes", []),
36
+ _ts_metadata("design:returntype", Promise)
37
+ ], DataAPI.prototype, "loadDataByKey", null);
38
+ _ts_decorate([
39
+ Router.post(SDK.ServerAPI.API.SendAPIDataToClient),
40
+ _ts_metadata("design:type", Function),
41
+ _ts_metadata("design:paramtypes", []),
42
+ _ts_metadata("design:returntype", Promise)
43
+ ], DataAPI.prototype, "sendMessageToClient", null);
44
+ export { DataAPI };
@@ -0,0 +1,5 @@
1
+ import { SDK } from '@rsdoctor/shared/types';
2
+ import { BaseAPI } from './base.js';
3
+ export declare class FileSystemAPI extends BaseAPI {
4
+ applyErrorFix(): Promise<SDK.ServerAPI.InferResponseType<SDK.ServerAPI.API.ApplyErrorFix>>;
5
+ }
@@ -0,0 +1,28 @@
1
+ import "node:module";
2
+ import { SDK } from "@rsdoctor/shared/types";
3
+ import { BaseAPI } from "./base.js";
4
+ import { Router } from "../router.js";
5
+ function _ts_decorate(decorators, target, key, desc) {
6
+ var c = arguments.length, r = c < 3 ? target : null === desc ? desc = Object.getOwnPropertyDescriptor(target, key) : desc, d;
7
+ if ("object" == typeof Reflect && "function" == typeof Reflect.decorate) r = Reflect.decorate(decorators, target, key, desc);
8
+ else for(var i = decorators.length - 1; i >= 0; i--)if (d = decorators[i]) r = (c < 3 ? d(r) : c > 3 ? d(target, key, r) : d(target, key)) || r;
9
+ return c > 3 && r && Object.defineProperty(target, key, r), r;
10
+ }
11
+ function _ts_metadata(k, v) {
12
+ if ("object" == typeof Reflect && "function" == typeof Reflect.metadata) return Reflect.metadata(k, v);
13
+ }
14
+ class FileSystemAPI extends BaseAPI {
15
+ async applyErrorFix() {
16
+ const { body } = this.ctx.req;
17
+ const data = body;
18
+ await this.ctx.sdk.applyErrorFix(data.id);
19
+ return 'success';
20
+ }
21
+ }
22
+ _ts_decorate([
23
+ Router.post(SDK.ServerAPI.API.ApplyErrorFix),
24
+ _ts_metadata("design:type", Function),
25
+ _ts_metadata("design:paramtypes", []),
26
+ _ts_metadata("design:returntype", Promise)
27
+ ], FileSystemAPI.prototype, "applyErrorFix", null);
28
+ export { FileSystemAPI };
@@ -0,0 +1,12 @@
1
+ import { SDK } from '@rsdoctor/shared/types';
2
+ import { BaseAPI } from './base.js';
3
+ export declare class GraphAPI extends BaseAPI {
4
+ getAssetsSummary(): Promise<SDK.ServerAPI.InferResponseType<SDK.ServerAPI.API.GetAssetsSummary>>;
5
+ getModuleGraphForAsset(): Promise<SDK.ServerAPI.InferResponseType<SDK.ServerAPI.API.GetAssetDetails>>;
6
+ getChunksByModuleId(): Promise<SDK.ServerAPI.InferResponseType<SDK.ServerAPI.API.GetChunksByModuleId>>;
7
+ getModuleDetails(): Promise<SDK.ServerAPI.InferResponseType<SDK.ServerAPI.API.GetModuleDetails>>;
8
+ getDependencyByResolvedRequest(): Promise<SDK.ServerAPI.InferResponseType<SDK.ServerAPI.API.GetModulesByModuleIds>>;
9
+ getModuleCodeByModuleId(): Promise<SDK.ServerAPI.InferResponseType<SDK.ServerAPI.API.GetModuleCodeByModuleId>>;
10
+ getModuleCodeByModuleIds(): Promise<SDK.ServerAPI.InferResponseType<SDK.ServerAPI.API.GetModuleCodeByModuleIds>>;
11
+ getEntryModulesSummary(): Promise<SDK.ServerAPI.InferResponseType<SDK.ServerAPI.API.GetEntryPoints>>;
12
+ }
@@ -0,0 +1,116 @@
1
+ import "node:module";
2
+ import { SDK } from "@rsdoctor/shared/types";
3
+ import { BaseAPI } from "./base.js";
4
+ import { Router } from "../router.js";
5
+ function _ts_decorate(decorators, target, key, desc) {
6
+ var c = arguments.length, r = c < 3 ? target : null === desc ? desc = Object.getOwnPropertyDescriptor(target, key) : desc, d;
7
+ if ("object" == typeof Reflect && "function" == typeof Reflect.decorate) r = Reflect.decorate(decorators, target, key, desc);
8
+ else for(var i = decorators.length - 1; i >= 0; i--)if (d = decorators[i]) r = (c < 3 ? d(r) : c > 3 ? d(target, key, r) : d(target, key)) || r;
9
+ return c > 3 && r && Object.defineProperty(target, key, r), r;
10
+ }
11
+ function _ts_metadata(k, v) {
12
+ if ("object" == typeof Reflect && "function" == typeof Reflect.metadata) return Reflect.metadata(k, v);
13
+ }
14
+ class GraphAPI extends BaseAPI {
15
+ async getAssetsSummary() {
16
+ const { req } = this.ctx;
17
+ const { withFileContent } = req.body;
18
+ return this.dataLoader.loadAPI(SDK.ServerAPI.API.GetAssetsSummary, {
19
+ withFileContent
20
+ });
21
+ }
22
+ async getModuleGraphForAsset() {
23
+ const { req } = this.ctx;
24
+ const { assetPath } = req.body;
25
+ return this.dataLoader.loadAPI(SDK.ServerAPI.API.GetAssetDetails, {
26
+ assetPath
27
+ });
28
+ }
29
+ async getChunksByModuleId() {
30
+ const { req } = this.ctx;
31
+ const { moduleId } = req.body;
32
+ return this.dataLoader.loadAPI(SDK.ServerAPI.API.GetChunksByModuleId, {
33
+ moduleId
34
+ });
35
+ }
36
+ async getModuleDetails() {
37
+ const { req } = this.ctx;
38
+ const { moduleId } = req.body;
39
+ return this.dataLoader.loadAPI(SDK.ServerAPI.API.GetModuleDetails, {
40
+ moduleId
41
+ });
42
+ }
43
+ async getDependencyByResolvedRequest() {
44
+ const { req } = this.ctx;
45
+ const { moduleIds = [] } = req.body;
46
+ return this.dataLoader.loadAPI(SDK.ServerAPI.API.GetModulesByModuleIds, {
47
+ moduleIds
48
+ });
49
+ }
50
+ async getModuleCodeByModuleId() {
51
+ const { req } = this.ctx;
52
+ const { moduleId } = req.body;
53
+ return this.dataLoader.loadAPI(SDK.ServerAPI.API.GetModuleCodeByModuleId, {
54
+ moduleId
55
+ });
56
+ }
57
+ async getModuleCodeByModuleIds() {
58
+ const { req } = this.ctx;
59
+ const { moduleIds } = req.body;
60
+ return this.dataLoader.loadAPI(SDK.ServerAPI.API.GetModuleCodeByModuleIds, {
61
+ moduleIds
62
+ });
63
+ }
64
+ async getEntryModulesSummary() {
65
+ return this.dataLoader.loadAPI(SDK.ServerAPI.API.GetEntryPoints);
66
+ }
67
+ }
68
+ _ts_decorate([
69
+ Router.post(SDK.ServerAPI.API.GetAssetsSummary),
70
+ _ts_metadata("design:type", Function),
71
+ _ts_metadata("design:paramtypes", []),
72
+ _ts_metadata("design:returntype", Promise)
73
+ ], GraphAPI.prototype, "getAssetsSummary", null);
74
+ _ts_decorate([
75
+ Router.post(SDK.ServerAPI.API.GetAssetDetails),
76
+ _ts_metadata("design:type", Function),
77
+ _ts_metadata("design:paramtypes", []),
78
+ _ts_metadata("design:returntype", Promise)
79
+ ], GraphAPI.prototype, "getModuleGraphForAsset", null);
80
+ _ts_decorate([
81
+ Router.post(SDK.ServerAPI.API.GetChunksByModuleId),
82
+ _ts_metadata("design:type", Function),
83
+ _ts_metadata("design:paramtypes", []),
84
+ _ts_metadata("design:returntype", Promise)
85
+ ], GraphAPI.prototype, "getChunksByModuleId", null);
86
+ _ts_decorate([
87
+ Router.post(SDK.ServerAPI.API.GetModuleDetails),
88
+ _ts_metadata("design:type", Function),
89
+ _ts_metadata("design:paramtypes", []),
90
+ _ts_metadata("design:returntype", Promise)
91
+ ], GraphAPI.prototype, "getModuleDetails", null);
92
+ _ts_decorate([
93
+ Router.post(SDK.ServerAPI.API.GetModulesByModuleIds),
94
+ _ts_metadata("design:type", Function),
95
+ _ts_metadata("design:paramtypes", []),
96
+ _ts_metadata("design:returntype", Promise)
97
+ ], GraphAPI.prototype, "getDependencyByResolvedRequest", null);
98
+ _ts_decorate([
99
+ Router.post(SDK.ServerAPI.API.GetModuleCodeByModuleId),
100
+ _ts_metadata("design:type", Function),
101
+ _ts_metadata("design:paramtypes", []),
102
+ _ts_metadata("design:returntype", Promise)
103
+ ], GraphAPI.prototype, "getModuleCodeByModuleId", null);
104
+ _ts_decorate([
105
+ Router.post(SDK.ServerAPI.API.GetModuleCodeByModuleIds),
106
+ _ts_metadata("design:type", Function),
107
+ _ts_metadata("design:paramtypes", []),
108
+ _ts_metadata("design:returntype", Promise)
109
+ ], GraphAPI.prototype, "getModuleCodeByModuleIds", null);
110
+ _ts_decorate([
111
+ Router.post(SDK.ServerAPI.API.GetEntryPoints),
112
+ _ts_metadata("design:type", Function),
113
+ _ts_metadata("design:paramtypes", []),
114
+ _ts_metadata("design:returntype", Promise)
115
+ ], GraphAPI.prototype, "getEntryModulesSummary", null);
116
+ export { GraphAPI };
@@ -0,0 +1,10 @@
1
+ export * from './alerts.js';
2
+ export * from './bundle-diff.js';
3
+ export { DataAPI } from './data.js';
4
+ export * from './fs.js';
5
+ export * from './loader.js';
6
+ export * from './graph.js';
7
+ export * from './plugin.js';
8
+ export * from './project.js';
9
+ export * from './renderer.js';
10
+ export * from './resolver.js';
@@ -0,0 +1,11 @@
1
+ import "node:module";
2
+ export * from "./alerts.js";
3
+ export * from "./bundle-diff.js";
4
+ export * from "./fs.js";
5
+ export * from "./loader.js";
6
+ export * from "./graph.js";
7
+ export * from "./plugin.js";
8
+ export * from "./project.js";
9
+ export * from "./renderer.js";
10
+ export * from "./resolver.js";
11
+ export { DataAPI } from "./data.js";
@@ -0,0 +1,15 @@
1
+ import { SDK } from '@rsdoctor/shared/types';
2
+ import { BaseAPI } from './base.js';
3
+ export declare class LoaderAPI extends BaseAPI {
4
+ /** report loader data api */
5
+ reportLoader(): Promise<SDK.ServerAPI.InferResponseType<SDK.ServerAPI.API.ReportLoader>>;
6
+ /** report sourcemap data api */
7
+ reportSourceMap(): Promise<SDK.ServerAPI.InferResponseType<SDK.ServerAPI.API.ReportLoader>>;
8
+ getLoaderNames(): Promise<SDK.ServerAPI.InferResponseType<SDK.ServerAPI.API.GetLoaderNames>>;
9
+ getLoaderChartData(): Promise<SDK.ServerAPI.InferResponseType<SDK.ServerAPI.API.GetLoaderChartData>>;
10
+ getLoaderFileTree(): Promise<SDK.ServerAPI.InferResponseType<SDK.ServerAPI.API.GetLoaderFileTree>>;
11
+ getLoaderFileDetails(): Promise<SDK.ServerAPI.InferResponseType<SDK.ServerAPI.API.GetLoaderFileDetails>>;
12
+ getLoaderFolderStatistics(): Promise<SDK.ServerAPI.InferResponseType<SDK.ServerAPI.API.GetLoaderFolderStatistics>>;
13
+ getLoaderFileFirstInput(): Promise<SDK.ServerAPI.InferResponseType<SDK.ServerAPI.API.GetLoaderFileFirstInput>>;
14
+ getLoaderFileInputAndOutput(): Promise<SDK.ServerAPI.InferResponseType<SDK.ServerAPI.API.GetLoaderFileInputAndOutput>>;
15
+ }
@@ -0,0 +1,120 @@
1
+ import "node:module";
2
+ import { SDK } from "@rsdoctor/shared/types";
3
+ import { BaseAPI } from "./base.js";
4
+ import { Router } from "../router.js";
5
+ function _ts_decorate(decorators, target, key, desc) {
6
+ var c = arguments.length, r = c < 3 ? target : null === desc ? desc = Object.getOwnPropertyDescriptor(target, key) : desc, d;
7
+ if ("object" == typeof Reflect && "function" == typeof Reflect.decorate) r = Reflect.decorate(decorators, target, key, desc);
8
+ else for(var i = decorators.length - 1; i >= 0; i--)if (d = decorators[i]) r = (c < 3 ? d(r) : c > 3 ? d(target, key, r) : d(target, key)) || r;
9
+ return c > 3 && r && Object.defineProperty(target, key, r), r;
10
+ }
11
+ function _ts_metadata(k, v) {
12
+ if ("object" == typeof Reflect && "function" == typeof Reflect.metadata) return Reflect.metadata(k, v);
13
+ }
14
+ class LoaderAPI extends BaseAPI {
15
+ async reportLoader() {
16
+ const { req, sdk } = this.ctx;
17
+ const { body } = req;
18
+ sdk.reportLoader(body);
19
+ return 'ok';
20
+ }
21
+ async reportSourceMap() {
22
+ const { req: { body }, sdk } = this.ctx;
23
+ sdk.reportSourceMap(body);
24
+ return 'ok';
25
+ }
26
+ async getLoaderNames() {
27
+ return this.dataLoader.loadAPI(SDK.ServerAPI.API.GetLoaderNames);
28
+ }
29
+ async getLoaderChartData() {
30
+ return this.dataLoader.loadAPI(SDK.ServerAPI.API.GetLoaderChartData);
31
+ }
32
+ async getLoaderFileTree() {
33
+ return this.dataLoader.loadAPI(SDK.ServerAPI.API.GetLoaderFileTree);
34
+ }
35
+ async getLoaderFileDetails() {
36
+ const { req } = this.ctx;
37
+ const { path } = req.body;
38
+ return this.dataLoader.loadAPI(SDK.ServerAPI.API.GetLoaderFileDetails, {
39
+ path
40
+ });
41
+ }
42
+ async getLoaderFolderStatistics() {
43
+ const { req } = this.ctx;
44
+ const { folder } = req.body;
45
+ return this.dataLoader.loadAPI(SDK.ServerAPI.API.GetLoaderFolderStatistics, {
46
+ folder
47
+ });
48
+ }
49
+ async getLoaderFileFirstInput() {
50
+ const { req } = this.ctx;
51
+ const { file } = req.body;
52
+ return this.dataLoader.loadAPI(SDK.ServerAPI.API.GetLoaderFileFirstInput, {
53
+ file
54
+ });
55
+ }
56
+ async getLoaderFileInputAndOutput() {
57
+ const { req } = this.ctx;
58
+ const { file, loader, loaderIndex } = req.body;
59
+ return this.dataLoader.loadAPI(SDK.ServerAPI.API.GetLoaderFileInputAndOutput, {
60
+ file,
61
+ loader,
62
+ loaderIndex
63
+ });
64
+ }
65
+ }
66
+ _ts_decorate([
67
+ Router.post(SDK.ServerAPI.API.ReportLoader),
68
+ _ts_metadata("design:type", Function),
69
+ _ts_metadata("design:paramtypes", []),
70
+ _ts_metadata("design:returntype", Promise)
71
+ ], LoaderAPI.prototype, "reportLoader", null);
72
+ _ts_decorate([
73
+ Router.post(SDK.ServerAPI.API.ReportSourceMap),
74
+ _ts_metadata("design:type", Function),
75
+ _ts_metadata("design:paramtypes", []),
76
+ _ts_metadata("design:returntype", Promise)
77
+ ], LoaderAPI.prototype, "reportSourceMap", null);
78
+ _ts_decorate([
79
+ Router.post(SDK.ServerAPI.API.GetLoaderNames),
80
+ _ts_metadata("design:type", Function),
81
+ _ts_metadata("design:paramtypes", []),
82
+ _ts_metadata("design:returntype", Promise)
83
+ ], LoaderAPI.prototype, "getLoaderNames", null);
84
+ _ts_decorate([
85
+ Router.post(SDK.ServerAPI.API.GetLoaderChartData),
86
+ _ts_metadata("design:type", Function),
87
+ _ts_metadata("design:paramtypes", []),
88
+ _ts_metadata("design:returntype", Promise)
89
+ ], LoaderAPI.prototype, "getLoaderChartData", null);
90
+ _ts_decorate([
91
+ Router.post(SDK.ServerAPI.API.GetLoaderFileTree),
92
+ _ts_metadata("design:type", Function),
93
+ _ts_metadata("design:paramtypes", []),
94
+ _ts_metadata("design:returntype", Promise)
95
+ ], LoaderAPI.prototype, "getLoaderFileTree", null);
96
+ _ts_decorate([
97
+ Router.post(SDK.ServerAPI.API.GetLoaderFileDetails),
98
+ _ts_metadata("design:type", Function),
99
+ _ts_metadata("design:paramtypes", []),
100
+ _ts_metadata("design:returntype", Promise)
101
+ ], LoaderAPI.prototype, "getLoaderFileDetails", null);
102
+ _ts_decorate([
103
+ Router.post(SDK.ServerAPI.API.GetLoaderFolderStatistics),
104
+ _ts_metadata("design:type", Function),
105
+ _ts_metadata("design:paramtypes", []),
106
+ _ts_metadata("design:returntype", Promise)
107
+ ], LoaderAPI.prototype, "getLoaderFolderStatistics", null);
108
+ _ts_decorate([
109
+ Router.post(SDK.ServerAPI.API.GetLoaderFileFirstInput),
110
+ _ts_metadata("design:type", Function),
111
+ _ts_metadata("design:paramtypes", []),
112
+ _ts_metadata("design:returntype", Promise)
113
+ ], LoaderAPI.prototype, "getLoaderFileFirstInput", null);
114
+ _ts_decorate([
115
+ Router.post(SDK.ServerAPI.API.GetLoaderFileInputAndOutput),
116
+ _ts_metadata("design:type", Function),
117
+ _ts_metadata("design:paramtypes", []),
118
+ _ts_metadata("design:returntype", Promise)
119
+ ], LoaderAPI.prototype, "getLoaderFileInputAndOutput", null);
120
+ export { LoaderAPI };
@@ -0,0 +1,6 @@
1
+ import { SDK } from '@rsdoctor/shared/types';
2
+ import { BaseAPI } from './base.js';
3
+ export declare class PluginAPI extends BaseAPI {
4
+ getPluginSummary(): Promise<SDK.ServerAPI.InferResponseType<SDK.ServerAPI.API.GetPluginSummary>>;
5
+ getPluginData(): Promise<SDK.ServerAPI.InferResponseType<SDK.ServerAPI.API.GetPluginData>>;
6
+ }
@@ -0,0 +1,39 @@
1
+ import "node:module";
2
+ import { SDK } from "@rsdoctor/shared/types";
3
+ import { BaseAPI } from "./base.js";
4
+ import { Router } from "../router.js";
5
+ function _ts_decorate(decorators, target, key, desc) {
6
+ var c = arguments.length, r = c < 3 ? target : null === desc ? desc = Object.getOwnPropertyDescriptor(target, key) : desc, d;
7
+ if ("object" == typeof Reflect && "function" == typeof Reflect.decorate) r = Reflect.decorate(decorators, target, key, desc);
8
+ else for(var i = decorators.length - 1; i >= 0; i--)if (d = decorators[i]) r = (c < 3 ? d(r) : c > 3 ? d(target, key, r) : d(target, key)) || r;
9
+ return c > 3 && r && Object.defineProperty(target, key, r), r;
10
+ }
11
+ function _ts_metadata(k, v) {
12
+ if ("object" == typeof Reflect && "function" == typeof Reflect.metadata) return Reflect.metadata(k, v);
13
+ }
14
+ class PluginAPI extends BaseAPI {
15
+ async getPluginSummary() {
16
+ return this.dataLoader.loadAPI(SDK.ServerAPI.API.GetPluginSummary);
17
+ }
18
+ async getPluginData() {
19
+ const { req } = this.ctx;
20
+ const { hooks = [], tapNames = [] } = req.body;
21
+ return this.dataLoader.loadAPI(SDK.ServerAPI.API.GetPluginData, {
22
+ hooks,
23
+ tapNames
24
+ });
25
+ }
26
+ }
27
+ _ts_decorate([
28
+ Router.post(SDK.ServerAPI.API.GetPluginSummary),
29
+ _ts_metadata("design:type", Function),
30
+ _ts_metadata("design:paramtypes", []),
31
+ _ts_metadata("design:returntype", Promise)
32
+ ], PluginAPI.prototype, "getPluginSummary", null);
33
+ _ts_decorate([
34
+ Router.post(SDK.ServerAPI.API.GetPluginData),
35
+ _ts_metadata("design:type", Function),
36
+ _ts_metadata("design:paramtypes", []),
37
+ _ts_metadata("design:returntype", Promise)
38
+ ], PluginAPI.prototype, "getPluginData", null);
39
+ export { PluginAPI };
@@ -0,0 +1,8 @@
1
+ import { SDK } from '@rsdoctor/shared/types';
2
+ import { BaseAPI } from './base.js';
3
+ export declare class ProjectAPI extends BaseAPI {
4
+ env(): Promise<SDK.ServerAPI.InferResponseType<SDK.ServerAPI.API.Env>>;
5
+ manifest(): Promise<SDK.ServerAPI.InferResponseType<SDK.ServerAPI.API.Manifest>>;
6
+ getProjectInfo(): Promise<SDK.ServerAPI.InferResponseType<SDK.ServerAPI.API.GetProjectInfo>>;
7
+ getClientRoutes(): Promise<SDK.ServerAPI.InferResponseType<SDK.ServerAPI.API.GetClientRoutes>>;
8
+ }
@@ -0,0 +1,59 @@
1
+ import "node:module";
2
+ import { SDK } from "@rsdoctor/shared/types";
3
+ import { BaseAPI } from "./base.js";
4
+ import { Router } from "../router.js";
5
+ import { getLocalIpAddress } from "../utils.js";
6
+ function _ts_decorate(decorators, target, key, desc) {
7
+ var c = arguments.length, r = c < 3 ? target : null === desc ? desc = Object.getOwnPropertyDescriptor(target, key) : desc, d;
8
+ if ("object" == typeof Reflect && "function" == typeof Reflect.decorate) r = Reflect.decorate(decorators, target, key, desc);
9
+ else for(var i = decorators.length - 1; i >= 0; i--)if (d = decorators[i]) r = (c < 3 ? d(r) : c > 3 ? d(target, key, r) : d(target, key)) || r;
10
+ return c > 3 && r && Object.defineProperty(target, key, r), r;
11
+ }
12
+ function _ts_metadata(k, v) {
13
+ if ("object" == typeof Reflect && "function" == typeof Reflect.metadata) return Reflect.metadata(k, v);
14
+ }
15
+ class ProjectAPI extends BaseAPI {
16
+ async env() {
17
+ const { server } = this.ctx;
18
+ return {
19
+ ip: getLocalIpAddress(),
20
+ port: server.port
21
+ };
22
+ }
23
+ async manifest() {
24
+ const { sdk } = this.ctx;
25
+ const data = sdk.getManifestData();
26
+ return JSON.stringify(data);
27
+ }
28
+ async getProjectInfo() {
29
+ return this.dataLoader.loadAPI(SDK.ServerAPI.API.GetProjectInfo);
30
+ }
31
+ async getClientRoutes() {
32
+ return this.dataLoader.loadAPI(SDK.ServerAPI.API.GetClientRoutes);
33
+ }
34
+ }
35
+ _ts_decorate([
36
+ Router.get(SDK.ServerAPI.API.Env),
37
+ _ts_metadata("design:type", Function),
38
+ _ts_metadata("design:paramtypes", []),
39
+ _ts_metadata("design:returntype", Promise)
40
+ ], ProjectAPI.prototype, "env", null);
41
+ _ts_decorate([
42
+ Router.get(SDK.ServerAPI.API.Manifest),
43
+ _ts_metadata("design:type", Function),
44
+ _ts_metadata("design:paramtypes", []),
45
+ _ts_metadata("design:returntype", Promise)
46
+ ], ProjectAPI.prototype, "manifest", null);
47
+ _ts_decorate([
48
+ Router.post(SDK.ServerAPI.API.GetProjectInfo),
49
+ _ts_metadata("design:type", Function),
50
+ _ts_metadata("design:paramtypes", []),
51
+ _ts_metadata("design:returntype", Promise)
52
+ ], ProjectAPI.prototype, "getProjectInfo", null);
53
+ _ts_decorate([
54
+ Router.post(SDK.ServerAPI.API.GetClientRoutes),
55
+ _ts_metadata("design:type", Function),
56
+ _ts_metadata("design:paramtypes", []),
57
+ _ts_metadata("design:returntype", Promise)
58
+ ], ProjectAPI.prototype, "getClientRoutes", null);
59
+ export { ProjectAPI };
@@ -0,0 +1,6 @@
1
+ import { SDK } from '@rsdoctor/shared/types';
2
+ import { BaseAPI } from './base.js';
3
+ export declare class RendererAPI extends BaseAPI {
4
+ /** sdk manifest api */
5
+ entryHtml(): Promise<SDK.ServerAPI.InferResponseType<SDK.ServerAPI.API.EntryHtml>>;
6
+ }