@strapi/upgrade 0.0.0-experimental.00380841fe1b29f71fe755bb387fa1f75073621b

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 (423) hide show
  1. package/LICENSE +37 -0
  2. package/README.md +171 -0
  3. package/bin/upgrade.js +2 -0
  4. package/dist/cli.js +16 -0
  5. package/dist/cli.js.map +1 -0
  6. package/dist/cli.mjs +14 -0
  7. package/dist/cli.mjs.map +1 -0
  8. package/dist/index.d.ts +3 -0
  9. package/dist/index.d.ts.map +1 -0
  10. package/dist/index.js +10 -0
  11. package/dist/index.js.map +1 -0
  12. package/dist/index.mjs +5 -0
  13. package/dist/index.mjs.map +1 -0
  14. package/dist/modules/codemod/codemod.d.ts +17 -0
  15. package/dist/modules/codemod/codemod.d.ts.map +1 -0
  16. package/dist/modules/codemod/constants.d.ts +6 -0
  17. package/dist/modules/codemod/constants.d.ts.map +1 -0
  18. package/dist/modules/codemod/index.d.ts +4 -0
  19. package/dist/modules/codemod/index.d.ts.map +1 -0
  20. package/dist/modules/codemod/types.d.ts +26 -0
  21. package/dist/modules/codemod/types.d.ts.map +1 -0
  22. package/dist/modules/codemod-repository/constants.d.ts +2 -0
  23. package/dist/modules/codemod-repository/constants.d.ts.map +1 -0
  24. package/dist/modules/codemod-repository/index.d.ts +4 -0
  25. package/dist/modules/codemod-repository/index.d.ts.map +1 -0
  26. package/dist/modules/codemod-repository/repository.d.ts +22 -0
  27. package/dist/modules/codemod-repository/repository.d.ts.map +1 -0
  28. package/dist/modules/codemod-repository/types.d.ts +16 -0
  29. package/dist/modules/codemod-repository/types.d.ts.map +1 -0
  30. package/dist/modules/codemod-runner/codemod-runner.d.ts +22 -0
  31. package/dist/modules/codemod-runner/codemod-runner.d.ts.map +1 -0
  32. package/dist/modules/codemod-runner/index.d.ts +3 -0
  33. package/dist/modules/codemod-runner/index.d.ts.map +1 -0
  34. package/dist/modules/codemod-runner/types.d.ts +20 -0
  35. package/dist/modules/codemod-runner/types.d.ts.map +1 -0
  36. package/dist/modules/common/types.d.ts +3 -0
  37. package/dist/modules/common/types.d.ts.map +1 -0
  38. package/dist/modules/error/index.d.ts +2 -0
  39. package/dist/modules/error/index.d.ts.map +1 -0
  40. package/dist/modules/error/utils.d.ts +13 -0
  41. package/dist/modules/error/utils.d.ts.map +1 -0
  42. package/dist/modules/file-scanner/index.d.ts +3 -0
  43. package/dist/modules/file-scanner/index.d.ts.map +1 -0
  44. package/dist/modules/file-scanner/scanner.d.ts +8 -0
  45. package/dist/modules/file-scanner/scanner.d.ts.map +1 -0
  46. package/dist/modules/file-scanner/types.d.ts +5 -0
  47. package/dist/modules/file-scanner/types.d.ts.map +1 -0
  48. package/dist/modules/format/formats.d.ts +17 -0
  49. package/dist/modules/format/formats.d.ts.map +1 -0
  50. package/dist/modules/format/index.d.ts +2 -0
  51. package/dist/modules/format/index.d.ts.map +1 -0
  52. package/dist/modules/index.d.ts +14 -0
  53. package/dist/modules/index.d.ts.map +1 -0
  54. package/dist/modules/json/file.d.ts +4 -0
  55. package/dist/modules/json/file.d.ts.map +1 -0
  56. package/dist/modules/json/index.d.ts +4 -0
  57. package/dist/modules/json/index.d.ts.map +1 -0
  58. package/dist/modules/json/transform-api.d.ts +15 -0
  59. package/dist/modules/json/transform-api.d.ts.map +1 -0
  60. package/dist/modules/json/types.d.ts +11 -0
  61. package/dist/modules/json/types.d.ts.map +1 -0
  62. package/dist/modules/logger/index.d.ts +3 -0
  63. package/dist/modules/logger/index.d.ts.map +1 -0
  64. package/dist/modules/logger/logger.d.ts +27 -0
  65. package/dist/modules/logger/logger.d.ts.map +1 -0
  66. package/dist/modules/logger/types.d.ts +25 -0
  67. package/dist/modules/logger/types.d.ts.map +1 -0
  68. package/dist/modules/npm/constants.d.ts +2 -0
  69. package/dist/modules/npm/constants.d.ts.map +1 -0
  70. package/dist/modules/npm/index.d.ts +4 -0
  71. package/dist/modules/npm/index.d.ts.map +1 -0
  72. package/dist/modules/npm/package.d.ts +18 -0
  73. package/dist/modules/npm/package.d.ts.map +1 -0
  74. package/dist/modules/npm/types.d.ts +103 -0
  75. package/dist/modules/npm/types.d.ts.map +1 -0
  76. package/dist/modules/project/constants.d.ts +10 -0
  77. package/dist/modules/project/constants.d.ts.map +1 -0
  78. package/dist/modules/project/index.d.ts +6 -0
  79. package/dist/modules/project/index.d.ts.map +1 -0
  80. package/dist/modules/project/project.d.ts +45 -0
  81. package/dist/modules/project/project.d.ts.map +1 -0
  82. package/dist/modules/project/types.d.ts +19 -0
  83. package/dist/modules/project/types.d.ts.map +1 -0
  84. package/dist/modules/project/utils.d.ts +6 -0
  85. package/dist/modules/project/utils.d.ts.map +1 -0
  86. package/dist/modules/report/index.d.ts +3 -0
  87. package/dist/modules/report/index.d.ts.map +1 -0
  88. package/dist/modules/report/report.d.ts +5 -0
  89. package/dist/modules/report/report.d.ts.map +1 -0
  90. package/dist/modules/report/types.d.ts +15 -0
  91. package/dist/modules/report/types.d.ts.map +1 -0
  92. package/dist/modules/requirement/index.d.ts +3 -0
  93. package/dist/modules/requirement/index.d.ts.map +1 -0
  94. package/dist/modules/requirement/requirement.d.ts +15 -0
  95. package/dist/modules/requirement/requirement.d.ts.map +1 -0
  96. package/dist/modules/requirement/types.d.ts +47 -0
  97. package/dist/modules/requirement/types.d.ts.map +1 -0
  98. package/dist/modules/runner/code/code.d.ts +10 -0
  99. package/dist/modules/runner/code/code.d.ts.map +1 -0
  100. package/dist/modules/runner/code/index.d.ts +3 -0
  101. package/dist/modules/runner/code/index.d.ts.map +1 -0
  102. package/dist/modules/runner/code/types.d.ts +11 -0
  103. package/dist/modules/runner/code/types.d.ts.map +1 -0
  104. package/dist/modules/runner/index.d.ts +4 -0
  105. package/dist/modules/runner/index.d.ts.map +1 -0
  106. package/dist/modules/runner/json/index.d.ts +3 -0
  107. package/dist/modules/runner/json/index.d.ts.map +1 -0
  108. package/dist/modules/runner/json/json.d.ts +9 -0
  109. package/dist/modules/runner/json/json.d.ts.map +1 -0
  110. package/dist/modules/runner/json/transform.d.ts +4 -0
  111. package/dist/modules/runner/json/transform.d.ts.map +1 -0
  112. package/dist/modules/runner/json/types.d.ts +16 -0
  113. package/dist/modules/runner/json/types.d.ts.map +1 -0
  114. package/dist/modules/runner/runner.d.ts +11 -0
  115. package/dist/modules/runner/runner.d.ts.map +1 -0
  116. package/dist/modules/runner/types.d.ts +14 -0
  117. package/dist/modules/runner/types.d.ts.map +1 -0
  118. package/dist/modules/timer/constants.d.ts +2 -0
  119. package/dist/modules/timer/constants.d.ts.map +1 -0
  120. package/dist/modules/timer/index.d.ts +4 -0
  121. package/dist/modules/timer/index.d.ts.map +1 -0
  122. package/dist/modules/timer/timer.d.ts +12 -0
  123. package/dist/modules/timer/timer.d.ts.map +1 -0
  124. package/dist/modules/timer/types.d.ts +12 -0
  125. package/dist/modules/timer/types.d.ts.map +1 -0
  126. package/dist/modules/upgrader/constants.d.ts +2 -0
  127. package/dist/modules/upgrader/constants.d.ts.map +1 -0
  128. package/dist/modules/upgrader/index.d.ts +4 -0
  129. package/dist/modules/upgrader/index.d.ts.map +1 -0
  130. package/dist/modules/upgrader/types.d.ts +29 -0
  131. package/dist/modules/upgrader/types.d.ts.map +1 -0
  132. package/dist/modules/upgrader/upgrader.d.ts +40 -0
  133. package/dist/modules/upgrader/upgrader.d.ts.map +1 -0
  134. package/dist/modules/version/index.d.ts +4 -0
  135. package/dist/modules/version/index.d.ts.map +1 -0
  136. package/dist/modules/version/range.d.ts +8 -0
  137. package/dist/modules/version/range.d.ts.map +1 -0
  138. package/dist/modules/version/semver.d.ts +8 -0
  139. package/dist/modules/version/semver.d.ts.map +1 -0
  140. package/dist/modules/version/types.d.ts +11 -0
  141. package/dist/modules/version/types.d.ts.map +1 -0
  142. package/dist/package.json.js +6 -0
  143. package/dist/package.json.js.map +1 -0
  144. package/dist/package.json.mjs +4 -0
  145. package/dist/package.json.mjs.map +1 -0
  146. package/dist/src/cli/commands/codemods.js +121 -0
  147. package/dist/src/cli/commands/codemods.js.map +1 -0
  148. package/dist/src/cli/commands/codemods.mjs +117 -0
  149. package/dist/src/cli/commands/codemods.mjs.map +1 -0
  150. package/dist/src/cli/commands/upgrade.js +99 -0
  151. package/dist/src/cli/commands/upgrade.js.map +1 -0
  152. package/dist/src/cli/commands/upgrade.mjs +96 -0
  153. package/dist/src/cli/commands/upgrade.mjs.map +1 -0
  154. package/dist/src/cli/errors.js +18 -0
  155. package/dist/src/cli/errors.js.map +1 -0
  156. package/dist/src/cli/errors.mjs +16 -0
  157. package/dist/src/cli/errors.mjs.map +1 -0
  158. package/dist/src/cli/options.js +26 -0
  159. package/dist/src/cli/options.js.map +1 -0
  160. package/dist/src/cli/options.mjs +19 -0
  161. package/dist/src/cli/options.mjs.map +1 -0
  162. package/dist/src/modules/codemod/codemod.js +44 -0
  163. package/dist/src/modules/codemod/codemod.js.map +1 -0
  164. package/dist/src/modules/codemod/codemod.mjs +41 -0
  165. package/dist/src/modules/codemod/codemod.mjs.map +1 -0
  166. package/dist/src/modules/codemod/constants.js +17 -0
  167. package/dist/src/modules/codemod/constants.js.map +1 -0
  168. package/dist/src/modules/codemod/constants.mjs +11 -0
  169. package/dist/src/modules/codemod/constants.mjs.map +1 -0
  170. package/dist/src/modules/codemod/index.js +10 -0
  171. package/dist/src/modules/codemod/index.js.map +1 -0
  172. package/dist/src/modules/codemod/index.mjs +4 -0
  173. package/dist/src/modules/codemod/index.mjs.map +1 -0
  174. package/dist/src/modules/codemod-repository/constants.js +9 -0
  175. package/dist/src/modules/codemod-repository/constants.js.map +1 -0
  176. package/dist/src/modules/codemod-repository/constants.mjs +7 -0
  177. package/dist/src/modules/codemod-repository/constants.mjs.map +1 -0
  178. package/dist/src/modules/codemod-repository/index.js +10 -0
  179. package/dist/src/modules/codemod-repository/index.js.map +1 -0
  180. package/dist/src/modules/codemod-repository/index.mjs +4 -0
  181. package/dist/src/modules/codemod-repository/index.mjs.map +1 -0
  182. package/dist/src/modules/codemod-repository/repository.js +127 -0
  183. package/dist/src/modules/codemod-repository/repository.js.map +1 -0
  184. package/dist/src/modules/codemod-repository/repository.mjs +123 -0
  185. package/dist/src/modules/codemod-repository/repository.mjs.map +1 -0
  186. package/dist/src/modules/codemod-runner/codemod-runner.js +113 -0
  187. package/dist/src/modules/codemod-runner/codemod-runner.js.map +1 -0
  188. package/dist/src/modules/codemod-runner/codemod-runner.mjs +110 -0
  189. package/dist/src/modules/codemod-runner/codemod-runner.mjs.map +1 -0
  190. package/dist/src/modules/error/index.js +11 -0
  191. package/dist/src/modules/error/index.js.map +1 -0
  192. package/dist/src/modules/error/index.mjs +2 -0
  193. package/dist/src/modules/error/index.mjs.map +1 -0
  194. package/dist/src/modules/error/utils.js +33 -0
  195. package/dist/src/modules/error/utils.js.map +1 -0
  196. package/dist/src/modules/error/utils.mjs +28 -0
  197. package/dist/src/modules/error/utils.mjs.map +1 -0
  198. package/dist/src/modules/file-scanner/index.js +8 -0
  199. package/dist/src/modules/file-scanner/index.js.map +1 -0
  200. package/dist/src/modules/file-scanner/index.mjs +2 -0
  201. package/dist/src/modules/file-scanner/index.mjs.map +1 -0
  202. package/dist/src/modules/file-scanner/scanner.js +23 -0
  203. package/dist/src/modules/file-scanner/scanner.js.map +1 -0
  204. package/dist/src/modules/file-scanner/scanner.mjs +20 -0
  205. package/dist/src/modules/file-scanner/scanner.mjs.map +1 -0
  206. package/dist/src/modules/format/formats.js +107 -0
  207. package/dist/src/modules/format/formats.js.map +1 -0
  208. package/dist/src/modules/format/formats.mjs +94 -0
  209. package/dist/src/modules/format/formats.mjs.map +1 -0
  210. package/dist/src/modules/format/index.js +19 -0
  211. package/dist/src/modules/format/index.js.map +1 -0
  212. package/dist/src/modules/format/index.mjs +2 -0
  213. package/dist/src/modules/format/index.mjs.map +1 -0
  214. package/dist/src/modules/index.js +32 -0
  215. package/dist/src/modules/index.js.map +1 -0
  216. package/dist/src/modules/index.mjs +27 -0
  217. package/dist/src/modules/index.mjs.map +1 -0
  218. package/dist/src/modules/json/file.js +16 -0
  219. package/dist/src/modules/json/file.js.map +1 -0
  220. package/dist/src/modules/json/file.mjs +13 -0
  221. package/dist/src/modules/json/file.mjs.map +1 -0
  222. package/dist/src/modules/json/transform-api.js +38 -0
  223. package/dist/src/modules/json/transform-api.js.map +1 -0
  224. package/dist/src/modules/json/transform-api.mjs +35 -0
  225. package/dist/src/modules/json/transform-api.mjs.map +1 -0
  226. package/dist/src/modules/logger/index.js +8 -0
  227. package/dist/src/modules/logger/index.js.map +1 -0
  228. package/dist/src/modules/logger/index.mjs +2 -0
  229. package/dist/src/modules/logger/index.mjs.map +1 -0
  230. package/dist/src/modules/logger/logger.js +76 -0
  231. package/dist/src/modules/logger/logger.js.map +1 -0
  232. package/dist/src/modules/logger/logger.mjs +73 -0
  233. package/dist/src/modules/logger/logger.mjs.map +1 -0
  234. package/dist/src/modules/npm/constants.js +6 -0
  235. package/dist/src/modules/npm/constants.js.map +1 -0
  236. package/dist/src/modules/npm/constants.mjs +4 -0
  237. package/dist/src/modules/npm/constants.mjs.map +1 -0
  238. package/dist/src/modules/npm/package.js +61 -0
  239. package/dist/src/modules/npm/package.js.map +1 -0
  240. package/dist/src/modules/npm/package.mjs +58 -0
  241. package/dist/src/modules/npm/package.mjs.map +1 -0
  242. package/dist/src/modules/project/constants.js +45 -0
  243. package/dist/src/modules/project/constants.js.map +1 -0
  244. package/dist/src/modules/project/constants.mjs +35 -0
  245. package/dist/src/modules/project/constants.mjs.map +1 -0
  246. package/dist/src/modules/project/index.js +15 -0
  247. package/dist/src/modules/project/index.js.map +1 -0
  248. package/dist/src/modules/project/index.mjs +5 -0
  249. package/dist/src/modules/project/index.mjs.map +1 -0
  250. package/dist/src/modules/project/project.js +208 -0
  251. package/dist/src/modules/project/project.js.map +1 -0
  252. package/dist/src/modules/project/project.mjs +203 -0
  253. package/dist/src/modules/project/project.mjs.map +1 -0
  254. package/dist/src/modules/project/utils.js +26 -0
  255. package/dist/src/modules/project/utils.js.map +1 -0
  256. package/dist/src/modules/project/utils.mjs +21 -0
  257. package/dist/src/modules/project/utils.mjs.map +1 -0
  258. package/dist/src/modules/report/index.js +9 -0
  259. package/dist/src/modules/report/index.js.map +1 -0
  260. package/dist/src/modules/report/index.mjs +2 -0
  261. package/dist/src/modules/report/index.mjs.map +1 -0
  262. package/dist/src/modules/report/report.js +13 -0
  263. package/dist/src/modules/report/report.js.map +1 -0
  264. package/dist/src/modules/report/report.mjs +10 -0
  265. package/dist/src/modules/report/report.mjs.map +1 -0
  266. package/dist/src/modules/requirement/index.js +8 -0
  267. package/dist/src/modules/requirement/index.js.map +1 -0
  268. package/dist/src/modules/requirement/index.mjs +2 -0
  269. package/dist/src/modules/requirement/index.mjs.map +1 -0
  270. package/dist/src/modules/requirement/requirement.js +55 -0
  271. package/dist/src/modules/requirement/requirement.js.map +1 -0
  272. package/dist/src/modules/requirement/requirement.mjs +52 -0
  273. package/dist/src/modules/requirement/requirement.mjs.map +1 -0
  274. package/dist/src/modules/runner/code/code.js +21 -0
  275. package/dist/src/modules/runner/code/code.js.map +1 -0
  276. package/dist/src/modules/runner/code/code.mjs +18 -0
  277. package/dist/src/modules/runner/code/code.mjs.map +1 -0
  278. package/dist/src/modules/runner/code/index.js +8 -0
  279. package/dist/src/modules/runner/code/index.js.map +1 -0
  280. package/dist/src/modules/runner/code/index.mjs +2 -0
  281. package/dist/src/modules/runner/code/index.mjs.map +1 -0
  282. package/dist/src/modules/runner/index.js +10 -0
  283. package/dist/src/modules/runner/index.js.map +1 -0
  284. package/dist/src/modules/runner/index.mjs +5 -0
  285. package/dist/src/modules/runner/index.mjs.map +1 -0
  286. package/dist/src/modules/runner/json/index.js +8 -0
  287. package/dist/src/modules/runner/json/index.js.map +1 -0
  288. package/dist/src/modules/runner/json/index.mjs +2 -0
  289. package/dist/src/modules/runner/json/index.mjs.map +1 -0
  290. package/dist/src/modules/runner/json/json.js +21 -0
  291. package/dist/src/modules/runner/json/json.js.map +1 -0
  292. package/dist/src/modules/runner/json/json.mjs +18 -0
  293. package/dist/src/modules/runner/json/json.mjs.map +1 -0
  294. package/dist/src/modules/runner/json/transform.js +85 -0
  295. package/dist/src/modules/runner/json/transform.js.map +1 -0
  296. package/dist/src/modules/runner/json/transform.mjs +83 -0
  297. package/dist/src/modules/runner/json/transform.mjs.map +1 -0
  298. package/dist/src/modules/runner/runner.js +22 -0
  299. package/dist/src/modules/runner/runner.js.map +1 -0
  300. package/dist/src/modules/runner/runner.mjs +20 -0
  301. package/dist/src/modules/runner/runner.mjs.map +1 -0
  302. package/dist/src/modules/timer/constants.js +6 -0
  303. package/dist/src/modules/timer/constants.js.map +1 -0
  304. package/dist/src/modules/timer/constants.mjs +4 -0
  305. package/dist/src/modules/timer/constants.mjs.map +1 -0
  306. package/dist/src/modules/timer/index.js +10 -0
  307. package/dist/src/modules/timer/index.js.map +1 -0
  308. package/dist/src/modules/timer/index.mjs +4 -0
  309. package/dist/src/modules/timer/index.mjs.map +1 -0
  310. package/dist/src/modules/timer/timer.js +33 -0
  311. package/dist/src/modules/timer/timer.js.map +1 -0
  312. package/dist/src/modules/timer/timer.mjs +30 -0
  313. package/dist/src/modules/timer/timer.mjs.map +1 -0
  314. package/dist/src/modules/upgrader/constants.js +6 -0
  315. package/dist/src/modules/upgrader/constants.js.map +1 -0
  316. package/dist/src/modules/upgrader/constants.mjs +4 -0
  317. package/dist/src/modules/upgrader/constants.mjs.map +1 -0
  318. package/dist/src/modules/upgrader/index.js +10 -0
  319. package/dist/src/modules/upgrader/index.js.map +1 -0
  320. package/dist/src/modules/upgrader/index.mjs +4 -0
  321. package/dist/src/modules/upgrader/index.mjs.map +1 -0
  322. package/dist/src/modules/upgrader/upgrader.js +266 -0
  323. package/dist/src/modules/upgrader/upgrader.js.map +1 -0
  324. package/dist/src/modules/upgrader/upgrader.mjs +263 -0
  325. package/dist/src/modules/upgrader/upgrader.mjs.map +1 -0
  326. package/dist/src/modules/version/index.js +20 -0
  327. package/dist/src/modules/version/index.js.map +1 -0
  328. package/dist/src/modules/version/index.mjs +5 -0
  329. package/dist/src/modules/version/index.mjs.map +1 -0
  330. package/dist/src/modules/version/range.js +81 -0
  331. package/dist/src/modules/version/range.js.map +1 -0
  332. package/dist/src/modules/version/range.mjs +75 -0
  333. package/dist/src/modules/version/range.mjs.map +1 -0
  334. package/dist/src/modules/version/semver.js +26 -0
  335. package/dist/src/modules/version/semver.js.map +1 -0
  336. package/dist/src/modules/version/semver.mjs +20 -0
  337. package/dist/src/modules/version/semver.mjs.map +1 -0
  338. package/dist/src/modules/version/types.js +12 -0
  339. package/dist/src/modules/version/types.js.map +1 -0
  340. package/dist/src/modules/version/types.mjs +12 -0
  341. package/dist/src/modules/version/types.mjs.map +1 -0
  342. package/dist/src/tasks/codemods/list-codemods.js +40 -0
  343. package/dist/src/tasks/codemods/list-codemods.js.map +1 -0
  344. package/dist/src/tasks/codemods/list-codemods.mjs +38 -0
  345. package/dist/src/tasks/codemods/list-codemods.mjs.map +1 -0
  346. package/dist/src/tasks/codemods/run-codemods.js +36 -0
  347. package/dist/src/tasks/codemods/run-codemods.js.map +1 -0
  348. package/dist/src/tasks/codemods/run-codemods.mjs +34 -0
  349. package/dist/src/tasks/codemods/run-codemods.mjs.map +1 -0
  350. package/dist/src/tasks/codemods/utils.js +54 -0
  351. package/dist/src/tasks/codemods/utils.js.map +1 -0
  352. package/dist/src/tasks/codemods/utils.mjs +50 -0
  353. package/dist/src/tasks/codemods/utils.mjs.map +1 -0
  354. package/dist/src/tasks/index.js +15 -0
  355. package/dist/src/tasks/index.js.map +1 -0
  356. package/dist/src/tasks/index.mjs +7 -0
  357. package/dist/src/tasks/index.mjs.map +1 -0
  358. package/dist/src/tasks/upgrade/prompts/latest.js +48 -0
  359. package/dist/src/tasks/upgrade/prompts/latest.js.map +1 -0
  360. package/dist/src/tasks/upgrade/prompts/latest.mjs +46 -0
  361. package/dist/src/tasks/upgrade/prompts/latest.mjs.map +1 -0
  362. package/dist/src/tasks/upgrade/requirements/common.js +40 -0
  363. package/dist/src/tasks/upgrade/requirements/common.js.map +1 -0
  364. package/dist/src/tasks/upgrade/requirements/common.mjs +35 -0
  365. package/dist/src/tasks/upgrade/requirements/common.mjs.map +1 -0
  366. package/dist/src/tasks/upgrade/requirements/major.js +29 -0
  367. package/dist/src/tasks/upgrade/requirements/major.js.map +1 -0
  368. package/dist/src/tasks/upgrade/requirements/major.mjs +26 -0
  369. package/dist/src/tasks/upgrade/requirements/major.mjs.map +1 -0
  370. package/dist/src/tasks/upgrade/upgrade.js +69 -0
  371. package/dist/src/tasks/upgrade/upgrade.js.map +1 -0
  372. package/dist/src/tasks/upgrade/upgrade.mjs +67 -0
  373. package/dist/src/tasks/upgrade/upgrade.mjs.map +1 -0
  374. package/dist/tasks/codemods/index.d.ts +3 -0
  375. package/dist/tasks/codemods/index.d.ts.map +1 -0
  376. package/dist/tasks/codemods/list-codemods.d.ts +3 -0
  377. package/dist/tasks/codemods/list-codemods.d.ts.map +1 -0
  378. package/dist/tasks/codemods/run-codemods.d.ts +3 -0
  379. package/dist/tasks/codemods/run-codemods.d.ts.map +1 -0
  380. package/dist/tasks/codemods/types.d.ts +19 -0
  381. package/dist/tasks/codemods/types.d.ts.map +1 -0
  382. package/dist/tasks/codemods/utils.d.ts +6 -0
  383. package/dist/tasks/codemods/utils.d.ts.map +1 -0
  384. package/dist/tasks/index.d.ts +4 -0
  385. package/dist/tasks/index.d.ts.map +1 -0
  386. package/dist/tasks/upgrade/index.d.ts +4 -0
  387. package/dist/tasks/upgrade/index.d.ts.map +1 -0
  388. package/dist/tasks/upgrade/prompts/index.d.ts +2 -0
  389. package/dist/tasks/upgrade/prompts/index.d.ts.map +1 -0
  390. package/dist/tasks/upgrade/prompts/latest.d.ts +9 -0
  391. package/dist/tasks/upgrade/prompts/latest.d.ts.map +1 -0
  392. package/dist/tasks/upgrade/requirements/common.d.ts +5 -0
  393. package/dist/tasks/upgrade/requirements/common.d.ts.map +1 -0
  394. package/dist/tasks/upgrade/requirements/index.d.ts +3 -0
  395. package/dist/tasks/upgrade/requirements/index.d.ts.map +1 -0
  396. package/dist/tasks/upgrade/requirements/major.d.ts +3 -0
  397. package/dist/tasks/upgrade/requirements/major.d.ts.map +1 -0
  398. package/dist/tasks/upgrade/types.d.ts +12 -0
  399. package/dist/tasks/upgrade/types.d.ts.map +1 -0
  400. package/dist/tasks/upgrade/upgrade.d.ts +3 -0
  401. package/dist/tasks/upgrade/upgrade.d.ts.map +1 -0
  402. package/dist/types.d.ts +6 -0
  403. package/dist/types.d.ts.map +1 -0
  404. package/package.json +91 -0
  405. package/resources/codemods/5.0.0/.gitkeep +0 -0
  406. package/resources/codemods/5.0.0/comment-out-lifecycle-files.code.ts +63 -0
  407. package/resources/codemods/5.0.0/dependency-remove-strapi-plugin-i18n.json.ts +31 -0
  408. package/resources/codemods/5.0.0/dependency-upgrade-react-and-react-dom.json.ts +67 -0
  409. package/resources/codemods/5.0.0/dependency-upgrade-react-router-dom.json.ts +59 -0
  410. package/resources/codemods/5.0.0/dependency-upgrade-styled-components.json.ts +49 -0
  411. package/resources/codemods/5.0.0/deprecate-helper-plugin.code.ts +192 -0
  412. package/resources/codemods/5.0.0/entity-service-document-service.code.ts +437 -0
  413. package/resources/codemods/5.0.0/s3-keys-wrapped-in-credentials.code.ts +169 -0
  414. package/resources/codemods/5.0.0/sqlite3-to-better-sqlite3.json.ts +39 -0
  415. package/resources/codemods/5.0.0/strapi-public-interface.code.ts +126 -0
  416. package/resources/codemods/5.0.0/use-uid-for-config-namespace.code.ts +45 -0
  417. package/resources/codemods/5.0.0/utils-public-interface.code.ts +320 -0
  418. package/resources/codemods/5.1.0/dependency-better-sqlite3.json.ts +48 -0
  419. package/resources/examples/console.log-to-console.info.code.ts +37 -0
  420. package/resources/examples/disable-jsx-buttons.code.ts +42 -0
  421. package/resources/examples/upgrade-strapi-version.json.ts +29 -0
  422. package/resources/utils/change-import.ts +118 -0
  423. package/resources/utils/replace-jsx.ts +49 -0
package/LICENSE ADDED
@@ -0,0 +1,37 @@
1
+ Copyright (c) 2015-present Strapi Solutions SAS
2
+
3
+ Portions of the Strapi software are licensed as follows:
4
+
5
+ * All software that resides under an "ee/" directory (the “EE Software”), if that directory exists, is licensed under the license defined below.
6
+
7
+ Enterprise License
8
+
9
+ If you or the company you represent has entered into a written agreement referencing the Enterprise Edition of the Strapi source code available at
10
+ https://github.com/strapi/strapi, then such agreement applies to your use of the Enterprise Edition of the Strapi Software. If you or the company you
11
+ represent is using the Enterprise Edition of the Strapi Software in connection with a subscription to our cloud offering, then the agreement you have
12
+ agreed to with respect to our cloud offering and the licenses included in such agreement apply to your use of the Enterprise Edition of the Strapi Software.
13
+ Otherwise, the Strapi Enterprise Software License Agreement (found here https://strapi.io/enterprise-terms) applies to your use of the Enterprise Edition of the Strapi Software.
14
+
15
+ BY ACCESSING OR USING THE ENTERPRISE EDITION OF THE STRAPI SOFTWARE, YOU ARE AGREEING TO BE BOUND BY THE RELEVANT REFERENCED AGREEMENT.
16
+ IF YOU ARE NOT AUTHORIZED TO ACCEPT THESE TERMS ON BEHALF OF THE COMPANY YOU REPRESENT OR IF YOU DO NOT AGREE TO ALL OF THE RELEVANT TERMS AND CONDITIONS REFERENCED AND YOU
17
+ HAVE NOT OTHERWISE EXECUTED A WRITTEN AGREEMENT WITH STRAPI, YOU ARE NOT AUTHORIZED TO ACCESS OR USE OR ALLOW ANY USER TO ACCESS OR USE ANY PART OF
18
+ THE ENTERPRISE EDITION OF THE STRAPI SOFTWARE. YOUR ACCESS RIGHTS ARE CONDITIONAL ON YOUR CONSENT TO THE RELEVANT REFERENCED TERMS TO THE EXCLUSION OF ALL OTHER TERMS;
19
+ IF THE RELEVANT REFERENCED TERMS ARE CONSIDERED AN OFFER BY YOU, ACCEPTANCE IS EXPRESSLY LIMITED TO THE RELEVANT REFERENCED TERMS.
20
+
21
+ * All software outside of the above-mentioned directories or restrictions above is available under the "MIT Expat" license as set forth below.
22
+
23
+ MIT Expat License
24
+
25
+ Permission is hereby granted, free of charge, to any person obtaining a copy
26
+ of this software and associated documentation files (the "Software"), to deal
27
+ in the Software without restriction, including without limitation the rights
28
+ to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
29
+ copies of the Software, and to permit persons to whom the Software is
30
+ furnished to do so, subject to the following conditions:
31
+
32
+ The above copyright notice and this permission notice shall be included in all
33
+ copies or substantial portions of the Software.
34
+
35
+ THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
36
+ FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY,
37
+ WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
package/README.md ADDED
@@ -0,0 +1,171 @@
1
+ # Strapi Upgrade Tool
2
+
3
+ ## Description
4
+
5
+ The Strapi Upgrade Tool is the CLI for facilitating upgrades between Strapi versions.
6
+
7
+ It handles updating a project's package.json with the correct version of Strapi, running the package installer, and running suggested code transforms for breaking changes (in major versions).
8
+
9
+ Once released, it will be the recommended way to update to any major, minor, and patch versions of Strapi instead of manually modifying package.json files.
10
+
11
+ The tool offers the following commands:
12
+
13
+ ```
14
+ major [options] Upgrade to the next available major version of Strapi
15
+ minor [options] Upgrade to the latest minor and patch version of Strapi for the
16
+ current major
17
+ patch [options] Upgrade to latest patch version of Strapi for the current major
18
+ and minor
19
+ codemods [options] Run a set of available codemods for the selected target version
20
+ without updating the Strapi dependencies
21
+ ```
22
+
23
+ ### What's a codemod / code transform?
24
+
25
+ Codemods are a scripted way to refactor code. Here we are providing and running these scripts for users for any changes necessary in user code between Strapi versions.
26
+
27
+ For example, if we need to rename a package used by Strapi projects, instead of instructing users to change the import, we provide a script that searches through the user's project and does the replacement for them.
28
+
29
+ ### Types of Transforms
30
+
31
+ The upgrade tool provides two types of transforms:
32
+
33
+ - `json`: for updating a project's .json files, primarily intended for the `package.json`
34
+ - `code`: codemods; for updating a project's .js and .ts files
35
+
36
+ ### Data Migrations
37
+
38
+ Data migrations are not handled by the upgrade tool.
39
+
40
+ For Strapi v4, no data migrations will be allowed and no support is planned (except in extenuating circumstances eg, a critical security issue somehow relating to the database shape)
41
+
42
+ For Strapi v5, automated data migrations can be added in the `packages/core/database` package of the `develop` branch of this repo.
43
+
44
+ ## Usage
45
+
46
+ This package is not yet released, so currently it can be run on a project in the monorepo /examples directory with the following command:
47
+
48
+ `../../packages/utils/upgrade/bin/upgrade`
49
+
50
+ Run the command with the `--help` option to see all the available options.
51
+
52
+ [Coming Soon] The Strapi Upgrade tool will be available using `npx @strapi/upgrade` and an alias for that within a project using `strapi upgrade`
53
+
54
+ ## Writing a code transforms
55
+
56
+ To begin your code transform script, create a file `upgrade/resources/codemods/{X.X.X}/{short-description-of-action}.{code|json}.ts` where `X.X.X` is the target version of Strapi the codemod will be run for.
57
+
58
+ For example, all breaking changes for the initial release of Strapi v5 will go in `upgrade/resources/codemods/5.0.0`
59
+
60
+ Note that "short-description-of-action" will be converted to text displayed to the user with hyphens converted to spaces, for example: "short description of action"
61
+
62
+ ### 'json' transforms
63
+
64
+ Your transform will be called for every json file in a user's project, and you must return the json object (modified or not) at the end to be passed to the next transform.
65
+
66
+ Here is an example JSON Transform script:
67
+
68
+ ```typescript
69
+ import path from 'node:path';
70
+
71
+ import type { JSONTransform } from '../../..';
72
+
73
+ const transform: JSONTransform = (file, params) => {
74
+ // Extract the json api and the cwd so we can target specific files
75
+ const { cwd, json } = params;
76
+
77
+ // To target only a root level package.json file:
78
+ const rootPackageJsonPath = path.join(cwd, 'package.json');
79
+ if (file.path !== rootPackageJsonPath) {
80
+ // Return the json object unmodified to pass it to the next transform
81
+ return file.json;
82
+ }
83
+
84
+ // Use json() to get useful helpers for performing your transform
85
+ const j = json(file.json);
86
+
87
+ const strapiDepAddress = 'dependencies.@strapi/strapi';
88
+
89
+ // if this file contains a value at dependencies.@strapi/strapi
90
+ if (j.has(strapiDepAddress)) {
91
+ // we set the value to 5.0.0
92
+ j.set(strapiDepAddress, '5.0.0');
93
+ }
94
+
95
+ // at the end we must return the modified json object
96
+ return j.root();
97
+ };
98
+
99
+ export default transform;
100
+ ```
101
+
102
+ For reference, these are the types for the relevant objects, which can be found in `packages/utils/upgrade/src/modules/json/types.ts`:
103
+
104
+ ```typescript
105
+ export interface JSONTransformParams {
106
+ cwd: string;
107
+ json: (object: Utils.JSONObject) => JSONTransformAPI;
108
+ }
109
+
110
+ export interface JSONTransformAPI {
111
+ get<T extends Utils.JSONValue>(path?: string, defaultValue?: T): T | undefined;
112
+ has(path: string): boolean;
113
+ set(path: string, value: Utils.JSONValue): this;
114
+ merge(other: Utils.JSONObject): this;
115
+ root(): Utils.JSONObject;
116
+ remove(path: string): this;
117
+ }
118
+
119
+ export type JSONTransform = (file: JSONSourceFile, params: JSONTransformParams) => Utils.JSONObject;
120
+ ```
121
+
122
+ The methods available from `json()` are wrappers for the lodash methods of the same name:
123
+
124
+ - **get(path, default)**: get path or default if not found
125
+ - **set(path, value)**: set path (such as 'engines.node', 'dependencies', 'author.name') to value
126
+ - **has(path)**: checks if path exists
127
+ - **merge(obj)**: merges two json objects
128
+ - **root()**: returns the whole json object
129
+ - **remove(path)**: removes the attribute given the path (such as 'dependencies.strapi')
130
+
131
+ ### 'code' codemod transforms
132
+
133
+ Codemod transforms use the [`jscodeshift`](https://github.com/facebook/jscodeshift) library to modify code passed in. Please see their documentation for advanced details.
134
+
135
+ The `file` and `api` parameters come directly from the [jsoncodeshift arguments of the same name](https://github.com/facebook/jscodeshift#arguments).
136
+
137
+ ```typescript
138
+ import type { Transform } from 'jscodeshift';
139
+
140
+ const transform: Transform = (file, api) => {
141
+ // Extract the jscodeshift API
142
+ const { j } = api;
143
+ // Parse the file content
144
+ const root = j(file.source);
145
+
146
+ root
147
+ // Find console.log calls expressions
148
+ .find(j.CallExpression, {
149
+ callee: { object: { name: 'console' }, property: { name: 'log' } },
150
+ })
151
+ // For each call expression
152
+ .forEach((path) => {
153
+ const { callee } = path.node;
154
+
155
+ if (
156
+ // Make sure the callee is a member expression (object/property)
157
+ j.MemberExpression.check(callee) &&
158
+ // Make sure the property is an actual identifier (contains a name property)
159
+ j.Identifier.check(callee.property)
160
+ ) {
161
+ // Update the property's identifier name
162
+ callee.property.name = 'info';
163
+ }
164
+ });
165
+
166
+ // Return the updated file content
167
+ return root.toSource();
168
+ };
169
+
170
+ export default transform;
171
+ ```
package/bin/upgrade.js ADDED
@@ -0,0 +1,2 @@
1
+ #!/usr/bin/env node
2
+ require('../dist/cli.js');
package/dist/cli.js ADDED
@@ -0,0 +1,16 @@
1
+ 'use strict';
2
+
3
+ var os = require('os');
4
+ var chalk = require('chalk');
5
+ var commander = require('commander');
6
+ var upgrade = require('./src/cli/commands/upgrade.js');
7
+ var codemods = require('./src/cli/commands/codemods.js');
8
+ var _package = require('./package.json.js');
9
+
10
+ upgrade.register(commander.program);
11
+ codemods.register(commander.program);
12
+ commander.program.usage('<command> [options]').on('command:*', ([invalidCmd])=>{
13
+ console.error(chalk.red(`[ERROR] Invalid command: ${invalidCmd}.${os.EOL} See --help for a list of available commands.`));
14
+ process.exit(1);
15
+ }).helpOption('-h, --help', 'Print command line options').addHelpCommand('help [command]', 'Print options for a specific command').version(_package.version).parse(process.argv);
16
+ //# sourceMappingURL=cli.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"cli.js","sources":["../src/cli/index.ts"],"sourcesContent":["import os from 'os';\nimport chalk from 'chalk';\nimport { program } from 'commander';\n\nimport { register as registerUpgradeCommands } from './commands/upgrade';\nimport { register as registerCodemodsCommands } from './commands/codemods';\n\nimport { version as packageJSONVersion } from '../../package.json';\n\nregisterUpgradeCommands(program);\nregisterCodemodsCommands(program);\n\nprogram\n .usage('<command> [options]')\n .on('command:*', ([invalidCmd]) => {\n console.error(\n chalk.red(\n `[ERROR] Invalid command: ${invalidCmd}.${os.EOL} See --help for a list of available commands.`\n )\n );\n\n process.exit(1);\n })\n .helpOption('-h, --help', 'Print command line options')\n .addHelpCommand('help [command]', 'Print options for a specific command')\n .version(packageJSONVersion)\n .parse(process.argv);\n"],"names":["registerUpgradeCommands","program","registerCodemodsCommands","usage","on","invalidCmd","console","error","chalk","red","os","EOL","process","exit","helpOption","addHelpCommand","version","packageJSONVersion","parse","argv"],"mappings":";;;;;;;;;AASAA,gBAAwBC,CAAAA,iBAAAA,CAAAA;AACxBC,iBAAyBD,CAAAA,iBAAAA,CAAAA;AAEzBA,iBACGE,CAAAA,KAAK,CAAC,qBACNC,CAAAA,CAAAA,EAAE,CAAC,WAAa,EAAA,CAAC,CAACC,UAAW,CAAA,GAAA;AAC5BC,IAAAA,OAAAA,CAAQC,KAAK,CACXC,KAAMC,CAAAA,GAAG,CACP,CAAC,yBAAyB,EAAEJ,UAAAA,CAAW,CAAC,EAAEK,EAAAA,CAAGC,GAAG,CAAC,6CAA6C,CAAC,CAAA,CAAA;AAInGC,IAAAA,OAAAA,CAAQC,IAAI,CAAC,CAAA,CAAA;AACf,CAAA,CAAA,CACCC,UAAU,CAAC,YAAc,EAAA,4BAAA,CAAA,CACzBC,cAAc,CAAC,gBAAA,EAAkB,sCACjCC,CAAAA,CAAAA,OAAO,CAACC,gBAAAA,CAAAA,CACRC,KAAK,CAACN,QAAQO,IAAI,CAAA;;"}
package/dist/cli.mjs ADDED
@@ -0,0 +1,14 @@
1
+ import os from 'os';
2
+ import chalk from 'chalk';
3
+ import { program } from 'commander';
4
+ import { register } from './src/cli/commands/upgrade.mjs';
5
+ import { register as register$1 } from './src/cli/commands/codemods.mjs';
6
+ import { version } from './package.json.mjs';
7
+
8
+ register(program);
9
+ register$1(program);
10
+ program.usage('<command> [options]').on('command:*', ([invalidCmd])=>{
11
+ console.error(chalk.red(`[ERROR] Invalid command: ${invalidCmd}.${os.EOL} See --help for a list of available commands.`));
12
+ process.exit(1);
13
+ }).helpOption('-h, --help', 'Print command line options').addHelpCommand('help [command]', 'Print options for a specific command').version(version).parse(process.argv);
14
+ //# sourceMappingURL=cli.mjs.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"cli.mjs","sources":["../src/cli/index.ts"],"sourcesContent":["import os from 'os';\nimport chalk from 'chalk';\nimport { program } from 'commander';\n\nimport { register as registerUpgradeCommands } from './commands/upgrade';\nimport { register as registerCodemodsCommands } from './commands/codemods';\n\nimport { version as packageJSONVersion } from '../../package.json';\n\nregisterUpgradeCommands(program);\nregisterCodemodsCommands(program);\n\nprogram\n .usage('<command> [options]')\n .on('command:*', ([invalidCmd]) => {\n console.error(\n chalk.red(\n `[ERROR] Invalid command: ${invalidCmd}.${os.EOL} See --help for a list of available commands.`\n )\n );\n\n process.exit(1);\n })\n .helpOption('-h, --help', 'Print command line options')\n .addHelpCommand('help [command]', 'Print options for a specific command')\n .version(packageJSONVersion)\n .parse(process.argv);\n"],"names":["registerUpgradeCommands","program","registerCodemodsCommands","usage","on","invalidCmd","console","error","chalk","red","os","EOL","process","exit","helpOption","addHelpCommand","version","packageJSONVersion","parse","argv"],"mappings":";;;;;;;AASAA,QAAwBC,CAAAA,OAAAA,CAAAA;AACxBC,UAAyBD,CAAAA,OAAAA,CAAAA;AAEzBA,OACGE,CAAAA,KAAK,CAAC,qBACNC,CAAAA,CAAAA,EAAE,CAAC,WAAa,EAAA,CAAC,CAACC,UAAW,CAAA,GAAA;AAC5BC,IAAAA,OAAAA,CAAQC,KAAK,CACXC,KAAMC,CAAAA,GAAG,CACP,CAAC,yBAAyB,EAAEJ,UAAAA,CAAW,CAAC,EAAEK,EAAAA,CAAGC,GAAG,CAAC,6CAA6C,CAAC,CAAA,CAAA;AAInGC,IAAAA,OAAAA,CAAQC,IAAI,CAAC,CAAA,CAAA;AACf,CAAA,CAAA,CACCC,UAAU,CAAC,YAAc,EAAA,4BAAA,CAAA,CACzBC,cAAc,CAAC,gBAAA,EAAkB,sCACjCC,CAAAA,CAAAA,OAAO,CAACC,OAAAA,CAAAA,CACRC,KAAK,CAACN,QAAQO,IAAI,CAAA"}
@@ -0,0 +1,3 @@
1
+ export * as tasks from './tasks';
2
+ export * as modules from './modules';
3
+ //# sourceMappingURL=index.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../src/index.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,KAAK,MAAM,SAAS,CAAC;AACjC,OAAO,KAAK,OAAO,MAAM,WAAW,CAAC"}
package/dist/index.js ADDED
@@ -0,0 +1,10 @@
1
+ 'use strict';
2
+
3
+ var index = require('./src/tasks/index.js');
4
+ var index$1 = require('./src/modules/index.js');
5
+
6
+
7
+
8
+ exports.tasks = index;
9
+ exports.modules = index$1;
10
+ //# sourceMappingURL=index.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"index.js","sources":[],"sourcesContent":[],"names":[],"mappings":";;;;;;;;"}
package/dist/index.mjs ADDED
@@ -0,0 +1,5 @@
1
+ import * as index from './src/tasks/index.mjs';
2
+ export { index as tasks };
3
+ import * as index$1 from './src/modules/index.mjs';
4
+ export { index$1 as modules };
5
+ //# sourceMappingURL=index.mjs.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"index.mjs","sources":[],"sourcesContent":[],"names":[],"mappings":";;;"}
@@ -0,0 +1,17 @@
1
+ import type { Codemod as CodemodInterface, FormatOptions, Kind, UID } from './types';
2
+ import type { Version } from '../version';
3
+ type CreateCodemodPayload = Pick<CodemodInterface, 'kind' | 'version' | 'baseDirectory' | 'filename'>;
4
+ export declare class Codemod implements CodemodInterface {
5
+ uid: UID;
6
+ kind: Kind;
7
+ version: Version.SemVer;
8
+ baseDirectory: string;
9
+ filename: string;
10
+ path: string;
11
+ constructor(options: CreateCodemodPayload);
12
+ private createUID;
13
+ format(options?: FormatOptions): string;
14
+ }
15
+ export declare const codemodFactory: (options: CreateCodemodPayload) => Codemod;
16
+ export {};
17
+ //# sourceMappingURL=codemod.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"codemod.d.ts","sourceRoot":"","sources":["../../../src/modules/codemod/codemod.ts"],"names":[],"mappings":"AAIA,OAAO,KAAK,EAAE,OAAO,IAAI,gBAAgB,EAAE,aAAa,EAAE,IAAI,EAAE,GAAG,EAAE,MAAM,SAAS,CAAC;AACrF,OAAO,KAAK,EAAE,OAAO,EAAE,MAAM,YAAY,CAAC;AAE1C,KAAK,oBAAoB,GAAG,IAAI,CAC9B,gBAAgB,EAChB,MAAM,GAAG,SAAS,GAAG,eAAe,GAAG,UAAU,CAClD,CAAC;AAEF,qBAAa,OAAQ,YAAW,gBAAgB;IAC9C,GAAG,EAAE,GAAG,CAAC;IAET,IAAI,EAAE,IAAI,CAAC;IAEX,OAAO,EAAE,OAAO,CAAC,MAAM,CAAC;IAExB,aAAa,EAAE,MAAM,CAAC;IAEtB,QAAQ,EAAE,MAAM,CAAC;IAEjB,IAAI,EAAE,MAAM,CAAC;gBAED,OAAO,EAAE,oBAAoB;IAUzC,OAAO,CAAC,SAAS;IAQjB,MAAM,CAAC,OAAO,CAAC,EAAE,aAAa;CAqB/B;AAED,eAAO,MAAM,cAAc,YAAa,oBAAoB,YAAyB,CAAC"}
@@ -0,0 +1,6 @@
1
+ export declare const CODEMOD_CODE_SUFFIX = "code";
2
+ export declare const CODEMOD_JSON_SUFFIX = "json";
3
+ export declare const CODEMOD_ALLOWED_SUFFIXES: string[];
4
+ export declare const CODEMOD_EXTENSION = "ts";
5
+ export declare const CODEMOD_FILE_REGEXP: RegExp;
6
+ //# sourceMappingURL=constants.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"constants.d.ts","sourceRoot":"","sources":["../../../src/modules/codemod/constants.ts"],"names":[],"mappings":"AAAA,eAAO,MAAM,mBAAmB,SAAS,CAAC;AAE1C,eAAO,MAAM,mBAAmB,SAAS,CAAC;AAE1C,eAAO,MAAM,wBAAwB,UAA6C,CAAC;AAEnF,eAAO,MAAM,iBAAiB,OAAO,CAAC;AAEtC,eAAO,MAAM,mBAAmB,QAE/B,CAAC"}
@@ -0,0 +1,4 @@
1
+ export type * as Codemod from './types';
2
+ export { codemodFactory } from './codemod';
3
+ export * as constants from './constants';
4
+ //# sourceMappingURL=index.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../src/modules/codemod/index.ts"],"names":[],"mappings":"AAAA,YAAY,KAAK,OAAO,MAAM,SAAS,CAAC;AAExC,OAAO,EAAE,cAAc,EAAE,MAAM,WAAW,CAAC;AAC3C,OAAO,KAAK,SAAS,MAAM,aAAa,CAAC"}
@@ -0,0 +1,26 @@
1
+ import type { Version } from '../version';
2
+ export type Kind = 'code' | 'json';
3
+ export type UID = `${Version.LiteralSemVer}-${string}-${Kind}`;
4
+ export interface Codemod {
5
+ uid: UID;
6
+ kind: Kind;
7
+ version: Version.SemVer;
8
+ baseDirectory: string;
9
+ filename: string;
10
+ path: string;
11
+ /**
12
+ * Return a formatted version of the codemod name
13
+ */
14
+ format(options?: FormatOptions): string;
15
+ }
16
+ export interface FormatOptions {
17
+ stripKind?: boolean;
18
+ stripExtension?: boolean;
19
+ stripHyphens?: boolean;
20
+ }
21
+ export type List = Codemod[];
22
+ export interface VersionedCollection {
23
+ version: Version.SemVer;
24
+ codemods: List;
25
+ }
26
+ //# sourceMappingURL=types.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"types.d.ts","sourceRoot":"","sources":["../../../src/modules/codemod/types.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,OAAO,EAAE,MAAM,YAAY,CAAC;AAE1C,MAAM,MAAM,IAAI,GAAG,MAAM,GAAG,MAAM,CAAC;AACnC,MAAM,MAAM,GAAG,GAAG,GAAG,OAAO,CAAC,aAAa,IAAI,MAAM,IAAI,IAAI,EAAE,CAAC;AAE/D,MAAM,WAAW,OAAO;IACtB,GAAG,EAAE,GAAG,CAAC;IACT,IAAI,EAAE,IAAI,CAAC;IACX,OAAO,EAAE,OAAO,CAAC,MAAM,CAAC;IACxB,aAAa,EAAE,MAAM,CAAC;IACtB,QAAQ,EAAE,MAAM,CAAC;IACjB,IAAI,EAAE,MAAM,CAAC;IAEb;;OAEG;IACH,MAAM,CAAC,OAAO,CAAC,EAAE,aAAa,GAAG,MAAM,CAAC;CACzC;AAED,MAAM,WAAW,aAAa;IAC5B,SAAS,CAAC,EAAE,OAAO,CAAC;IACpB,cAAc,CAAC,EAAE,OAAO,CAAC;IACzB,YAAY,CAAC,EAAE,OAAO,CAAC;CACxB;AAED,MAAM,MAAM,IAAI,GAAG,OAAO,EAAE,CAAC;AAE7B,MAAM,WAAW,mBAAmB;IAClC,OAAO,EAAE,OAAO,CAAC,MAAM,CAAC;IACxB,QAAQ,EAAE,IAAI,CAAC;CAChB"}
@@ -0,0 +1,2 @@
1
+ export declare const INTERNAL_CODEMODS_DIRECTORY: string;
2
+ //# sourceMappingURL=constants.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"constants.d.ts","sourceRoot":"","sources":["../../../src/modules/codemod-repository/constants.ts"],"names":[],"mappings":"AAEA,eAAO,MAAM,2BAA2B,QAQvC,CAAC"}
@@ -0,0 +1,4 @@
1
+ export type * from './types';
2
+ export { codemodRepositoryFactory } from './repository';
3
+ export * as constants from './constants';
4
+ //# sourceMappingURL=index.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../src/modules/codemod-repository/index.ts"],"names":[],"mappings":"AAAA,mBAAmB,SAAS,CAAC;AAE7B,OAAO,EAAE,wBAAwB,EAAE,MAAM,cAAc,CAAC;AACxD,OAAO,KAAK,SAAS,MAAM,aAAa,CAAC"}
@@ -0,0 +1,22 @@
1
+ import type { Codemod } from '../codemod';
2
+ import type { Version } from '../version';
3
+ import type { CodemodRepository as CodemodRepositoryInterface, FindQuery } from './types';
4
+ export declare class CodemodRepository implements CodemodRepositoryInterface {
5
+ private groups;
6
+ private versions;
7
+ cwd: string;
8
+ constructor(cwd: string);
9
+ refresh(): this;
10
+ count(version: Version.SemVer): number;
11
+ versionExists(version: Version.SemVer): boolean;
12
+ has(uid: string): boolean;
13
+ find(q: FindQuery): Codemod.VersionedCollection[];
14
+ findByVersion(version: Version.SemVer): Codemod.Codemod[];
15
+ findAll(): Codemod.VersionedCollection[];
16
+ private refreshAvailableVersions;
17
+ private refreshAvailableFiles;
18
+ private refreshAvailableFilesForVersion;
19
+ }
20
+ export declare const parseCodemodKindFromFilename: (filename: string) => Codemod.Kind;
21
+ export declare const codemodRepositoryFactory: (cwd?: string) => CodemodRepository;
22
+ //# sourceMappingURL=repository.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"repository.d.ts","sourceRoot":"","sources":["../../../src/modules/codemod-repository/repository.ts"],"names":[],"mappings":"AAUA,OAAO,KAAK,EAAE,OAAO,EAAE,MAAM,YAAY,CAAC;AAC1C,OAAO,KAAK,EAAE,OAAO,EAAE,MAAM,YAAY,CAAC;AAE1C,OAAO,KAAK,EAAE,iBAAiB,IAAI,0BAA0B,EAAE,SAAS,EAAE,MAAM,SAAS,CAAC;AAE1F,qBAAa,iBAAkB,YAAW,0BAA0B;IAClE,OAAO,CAAC,MAAM,CAAmD;IAEjE,OAAO,CAAC,QAAQ,CAAmB;IAE5B,GAAG,EAAE,MAAM,CAAC;gBAEP,GAAG,EAAE,MAAM;IASvB,OAAO;IAOP,KAAK,CAAC,OAAO,EAAE,OAAO,CAAC,MAAM;IAI7B,aAAa,CAAC,OAAO,EAAE,OAAO,CAAC,MAAM;IAIrC,GAAG,CAAC,GAAG,EAAE,MAAM;IAYf,IAAI,CAAC,CAAC,EAAE,SAAS;IAkCjB,aAAa,CAAC,OAAO,EAAE,OAAO,CAAC,MAAM;IAOrC,OAAO;IASP,OAAO,CAAC,wBAAwB;IAchC,OAAO,CAAC,qBAAqB;IAQ7B,OAAO,CAAC,+BAA+B;CAsBxC;AAED,eAAO,MAAM,4BAA4B,aAAc,MAAM,KAAG,QAAQ,IAOvE,CAAC;AAEF,eAAO,MAAM,wBAAwB,SAAS,MAAM,sBAEnD,CAAC"}
@@ -0,0 +1,16 @@
1
+ import type { Codemod } from '../codemod';
2
+ import type { Version } from '../version';
3
+ export interface FindQuery {
4
+ range?: Version.Range;
5
+ uids?: string[];
6
+ }
7
+ export interface CodemodRepository {
8
+ cwd: string;
9
+ refresh(): this;
10
+ find(query: FindQuery): Codemod.VersionedCollection[];
11
+ findByVersion(version: Version.SemVer): Codemod.List;
12
+ versionExists(version: Version.SemVer): boolean;
13
+ has(uid: string): boolean;
14
+ count(version: Version.SemVer): number;
15
+ }
16
+ //# sourceMappingURL=types.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"types.d.ts","sourceRoot":"","sources":["../../../src/modules/codemod-repository/types.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,OAAO,EAAE,MAAM,YAAY,CAAC;AAC1C,OAAO,KAAK,EAAE,OAAO,EAAE,MAAM,YAAY,CAAC;AAE1C,MAAM,WAAW,SAAS;IACxB,KAAK,CAAC,EAAE,OAAO,CAAC,KAAK,CAAC;IACtB,IAAI,CAAC,EAAE,MAAM,EAAE,CAAC;CACjB;AAED,MAAM,WAAW,iBAAiB;IAChC,GAAG,EAAE,MAAM,CAAC;IAEZ,OAAO,IAAI,IAAI,CAAC;IAEhB,IAAI,CAAC,KAAK,EAAE,SAAS,GAAG,OAAO,CAAC,mBAAmB,EAAE,CAAC;IAEtD,aAAa,CAAC,OAAO,EAAE,OAAO,CAAC,MAAM,GAAG,OAAO,CAAC,IAAI,CAAC;IAErD,aAAa,CAAC,OAAO,EAAE,OAAO,CAAC,MAAM,GAAG,OAAO,CAAC;IAChD,GAAG,CAAC,GAAG,EAAE,MAAM,GAAG,OAAO,CAAC;IAE1B,KAAK,CAAC,OAAO,EAAE,OAAO,CAAC,MAAM,GAAG,MAAM,CAAC;CACxC"}
@@ -0,0 +1,22 @@
1
+ import type { Logger } from '../logger';
2
+ import type { Project } from '../project';
3
+ import type { CodemodRunnerInterface, CodemodRunnerReport, SelectCodemodsCallback } from './types';
4
+ import type { Version } from '../version';
5
+ export declare class CodemodRunner implements CodemodRunnerInterface {
6
+ private readonly project;
7
+ private range;
8
+ private isDry;
9
+ private logger;
10
+ private selectCodemodsCallback;
11
+ constructor(project: Project, range: Version.Range);
12
+ setRange(range: Version.Range): this;
13
+ setLogger(logger: Logger): this;
14
+ onSelectCodemods(callback: SelectCodemodsCallback | null): this;
15
+ dry(enabled?: boolean): this;
16
+ private createRepository;
17
+ private safeRunAndReport;
18
+ runByUID(uid: string, codemodsDirectory?: string): Promise<CodemodRunnerReport>;
19
+ run(codemodsDirectory?: string): Promise<CodemodRunnerReport>;
20
+ }
21
+ export declare const codemodRunnerFactory: (project: Project, range: Version.Range) => CodemodRunner;
22
+ //# sourceMappingURL=codemod-runner.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"codemod-runner.d.ts","sourceRoot":"","sources":["../../../src/modules/codemod-runner/codemod-runner.ts"],"names":[],"mappings":"AAWA,OAAO,KAAK,EAAE,MAAM,EAAE,MAAM,WAAW,CAAC;AACxC,OAAO,KAAK,EAAE,OAAO,EAAE,MAAM,YAAY,CAAC;AAE1C,OAAO,KAAK,EAAE,sBAAsB,EAAE,mBAAmB,EAAE,sBAAsB,EAAE,MAAM,SAAS,CAAC;AACnG,OAAO,KAAK,EAAE,OAAO,EAAE,MAAM,YAAY,CAAC;AAE1C,qBAAa,aAAc,YAAW,sBAAsB;IAC1D,OAAO,CAAC,QAAQ,CAAC,OAAO,CAAU;IAElC,OAAO,CAAC,KAAK,CAAgB;IAE7B,OAAO,CAAC,KAAK,CAAU;IAEvB,OAAO,CAAC,MAAM,CAAgB;IAE9B,OAAO,CAAC,sBAAsB,CAAgC;gBAElD,OAAO,EAAE,OAAO,EAAE,KAAK,EAAE,OAAO,CAAC,KAAK;IAUlD,QAAQ,CAAC,KAAK,EAAE,OAAO,CAAC,KAAK;IAK7B,SAAS,CAAC,MAAM,EAAE,MAAM;IAKxB,gBAAgB,CAAC,QAAQ,EAAE,sBAAsB,GAAG,IAAI;IAKxD,GAAG,CAAC,OAAO,GAAE,OAAc;IAK3B,OAAO,CAAC,gBAAgB;YAWV,gBAAgB;IA4BxB,QAAQ,CAAC,GAAG,EAAE,MAAM,EAAE,iBAAiB,CAAC,EAAE,MAAM,GAAG,OAAO,CAAC,mBAAmB,CAAC;IAa/E,GAAG,CAAC,iBAAiB,CAAC,EAAE,MAAM,GAAG,OAAO,CAAC,mBAAmB,CAAC;CAmCpE;AAED,eAAO,MAAM,oBAAoB,YAAa,OAAO,SAAS,aAAa,kBAE1E,CAAC"}
@@ -0,0 +1,3 @@
1
+ export type * from './types';
2
+ export { codemodRunnerFactory } from './codemod-runner';
3
+ //# sourceMappingURL=index.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../src/modules/codemod-runner/index.ts"],"names":[],"mappings":"AAAA,mBAAmB,SAAS,CAAC;AAE7B,OAAO,EAAE,oBAAoB,EAAE,MAAM,kBAAkB,CAAC"}
@@ -0,0 +1,20 @@
1
+ import { Codemod } from '../codemod';
2
+ import type { Logger } from '../logger';
3
+ import type { Version } from '../version';
4
+ export type SelectCodemodsCallback = (codemods: Codemod.VersionedCollection[]) => Promise<Codemod.VersionedCollection[]>;
5
+ export type CodemodRunnerReport = {
6
+ success: true;
7
+ error: null;
8
+ } | {
9
+ success: false;
10
+ error: Error;
11
+ };
12
+ export interface CodemodRunnerInterface {
13
+ setRange(range: Version.Range): this;
14
+ setLogger(logger: Logger): this;
15
+ dry(enabled?: boolean): this;
16
+ onSelectCodemods(callback: SelectCodemodsCallback | null): this;
17
+ run(codemodsDirectory?: string): Promise<CodemodRunnerReport>;
18
+ runByUID(uid: string, codemodsDirectory?: string): Promise<CodemodRunnerReport>;
19
+ }
20
+ //# sourceMappingURL=types.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"types.d.ts","sourceRoot":"","sources":["../../../src/modules/codemod-runner/types.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,OAAO,EAAE,MAAM,YAAY,CAAC;AAErC,OAAO,KAAK,EAAE,MAAM,EAAE,MAAM,WAAW,CAAC;AACxC,OAAO,KAAK,EAAE,OAAO,EAAE,MAAM,YAAY,CAAC;AAE1C,MAAM,MAAM,sBAAsB,GAAG,CACnC,QAAQ,EAAE,OAAO,CAAC,mBAAmB,EAAE,KACpC,OAAO,CAAC,OAAO,CAAC,mBAAmB,EAAE,CAAC,CAAC;AAE5C,MAAM,MAAM,mBAAmB,GAC3B;IACE,OAAO,EAAE,IAAI,CAAC;IACd,KAAK,EAAE,IAAI,CAAC;CACb,GACD;IAAE,OAAO,EAAE,KAAK,CAAC;IAAC,KAAK,EAAE,KAAK,CAAA;CAAE,CAAC;AAErC,MAAM,WAAW,sBAAsB;IACrC,QAAQ,CAAC,KAAK,EAAE,OAAO,CAAC,KAAK,GAAG,IAAI,CAAC;IACrC,SAAS,CAAC,MAAM,EAAE,MAAM,GAAG,IAAI,CAAC;IAEhC,GAAG,CAAC,OAAO,CAAC,EAAE,OAAO,GAAG,IAAI,CAAC;IAC7B,gBAAgB,CAAC,QAAQ,EAAE,sBAAsB,GAAG,IAAI,GAAG,IAAI,CAAC;IAEhE,GAAG,CAAC,iBAAiB,CAAC,EAAE,MAAM,GAAG,OAAO,CAAC,mBAAmB,CAAC,CAAC;IAC9D,QAAQ,CAAC,GAAG,EAAE,MAAM,EAAE,iBAAiB,CAAC,EAAE,MAAM,GAAG,OAAO,CAAC,mBAAmB,CAAC,CAAC;CACjF"}
@@ -0,0 +1,3 @@
1
+ import { MaybePromise } from '../../types';
2
+ export type ConfirmationCallback = (message: string) => MaybePromise<boolean>;
3
+ //# sourceMappingURL=types.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"types.d.ts","sourceRoot":"","sources":["../../../src/modules/common/types.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,YAAY,EAAE,MAAM,aAAa,CAAC;AAE3C,MAAM,MAAM,oBAAoB,GAAG,CAAC,OAAO,EAAE,MAAM,KAAK,YAAY,CAAC,OAAO,CAAC,CAAC"}
@@ -0,0 +1,2 @@
1
+ export * from './utils';
2
+ //# sourceMappingURL=index.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../src/modules/error/index.ts"],"names":[],"mappings":"AAAA,cAAc,SAAS,CAAC"}
@@ -0,0 +1,13 @@
1
+ import type { Version } from '../version';
2
+ export declare class UnexpectedError extends Error {
3
+ constructor();
4
+ }
5
+ export declare class NPMCandidateNotFoundError extends Error {
6
+ target: Version.SemVer | Version.Range | Version.ReleaseType;
7
+ constructor(target: Version.SemVer | Version.Range | Version.ReleaseType, message?: string);
8
+ }
9
+ export declare class AbortedError extends Error {
10
+ constructor(message?: string);
11
+ }
12
+ export declare const unknownToError: (e: unknown) => Error;
13
+ //# sourceMappingURL=utils.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"utils.d.ts","sourceRoot":"","sources":["../../../src/modules/error/utils.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,OAAO,EAAE,MAAM,YAAY,CAAC;AAE1C,qBAAa,eAAgB,SAAQ,KAAK;;CAIzC;AAED,qBAAa,yBAA0B,SAAQ,KAAK;IAClD,MAAM,EAAE,OAAO,CAAC,MAAM,GAAG,OAAO,CAAC,KAAK,GAAG,OAAO,CAAC,WAAW,CAAC;gBAG3D,MAAM,EAAE,OAAO,CAAC,MAAM,GAAG,OAAO,CAAC,KAAK,GAAG,OAAO,CAAC,WAAW,EAC5D,OAAO,GAAE,MAA8D;CAM1E;AAED,qBAAa,YAAa,SAAQ,KAAK;gBACzB,OAAO,GAAE,MAA0B;CAGhD;AAED,eAAO,MAAM,cAAc,MAAO,OAAO,KAAG,KAU3C,CAAC"}
@@ -0,0 +1,3 @@
1
+ export type * from './types';
2
+ export { fileScannerFactory } from './scanner';
3
+ //# sourceMappingURL=index.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../src/modules/file-scanner/index.ts"],"names":[],"mappings":"AAAA,mBAAmB,SAAS,CAAC;AAE7B,OAAO,EAAE,kBAAkB,EAAE,MAAM,WAAW,CAAC"}
@@ -0,0 +1,8 @@
1
+ import type { FileScanner as FileScannerInterface } from './types';
2
+ export declare class FileScanner implements FileScannerInterface {
3
+ cwd: string;
4
+ constructor(cwd: string);
5
+ scan(patterns: string[]): string[];
6
+ }
7
+ export declare const fileScannerFactory: (cwd: string) => FileScanner;
8
+ //# sourceMappingURL=scanner.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"scanner.d.ts","sourceRoot":"","sources":["../../../src/modules/file-scanner/scanner.ts"],"names":[],"mappings":"AAGA,OAAO,KAAK,EAAE,WAAW,IAAI,oBAAoB,EAAE,MAAM,SAAS,CAAC;AAEnE,qBAAa,WAAY,YAAW,oBAAoB;IAC/C,GAAG,EAAE,MAAM,CAAC;gBAEP,GAAG,EAAE,MAAM;IAIvB,IAAI,CAAC,QAAQ,EAAE,MAAM,EAAE;CASxB;AAED,eAAO,MAAM,kBAAkB,QAAS,MAAM,gBAAyB,CAAC"}
@@ -0,0 +1,5 @@
1
+ export interface FileScanner {
2
+ cwd: string;
3
+ scan(patterns: string[]): string[];
4
+ }
5
+ //# sourceMappingURL=types.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"types.d.ts","sourceRoot":"","sources":["../../../src/modules/file-scanner/types.ts"],"names":[],"mappings":"AAAA,MAAM,WAAW,WAAW;IAC1B,GAAG,EAAE,MAAM,CAAC;IAEZ,IAAI,CAAC,QAAQ,EAAE,MAAM,EAAE,GAAG,MAAM,EAAE,CAAC;CACpC"}
@@ -0,0 +1,17 @@
1
+ import type { AppProject, PluginProject, ProjectType } from '../project';
2
+ import type { Codemod } from '../codemod';
3
+ import type { Version } from '../version';
4
+ import type { Report } from '../report';
5
+ export declare const path: (path: string) => string;
6
+ export declare const version: (version: Version.LiteralVersion | Version.SemVer) => string;
7
+ export declare const codemodUID: (uid: string) => string;
8
+ export declare const projectDetails: (project: AppProject | PluginProject) => string;
9
+ export declare const projectType: (type: ProjectType) => string;
10
+ export declare const versionRange: (range: Version.Range) => string;
11
+ export declare const transform: (transformFilePath: string) => string;
12
+ export declare const highlight: (arg: unknown) => string;
13
+ export declare const upgradeStep: (text: string, step: [current: number, total: number]) => string;
14
+ export declare const reports: (reports: Report.CodemodReport[]) => string;
15
+ export declare const codemodList: (codemods: Codemod.List) => string;
16
+ export declare const durationMs: (elapsedMs: number) => string;
17
+ //# sourceMappingURL=formats.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"formats.d.ts","sourceRoot":"","sources":["../../../src/modules/format/formats.ts"],"names":[],"mappings":"AAKA,OAAO,KAAK,EAAE,UAAU,EAAE,aAAa,EAAE,WAAW,EAAE,MAAM,YAAY,CAAC;AACzE,OAAO,KAAK,EAAE,OAAO,EAAE,MAAM,YAAY,CAAC;AAC1C,OAAO,KAAK,EAAE,OAAO,EAAE,MAAM,YAAY,CAAC;AAC1C,OAAO,KAAK,EAAE,MAAM,EAAE,MAAM,WAAW,CAAC;AAExC,eAAO,MAAM,IAAI,SAAU,MAAM,WAAqB,CAAC;AAEvD,eAAO,MAAM,OAAO,YAAa,QAAQ,cAAc,GAAG,QAAQ,MAAM,WAEvE,CAAC;AAEF,eAAO,MAAM,UAAU,QAAS,MAAM,WAErC,CAAC;AAEF,eAAO,MAAM,cAAc,YAAa,UAAU,GAAG,aAAa,WAEjE,CAAC;AAEF,eAAO,MAAM,WAAW,SAAU,WAAW,WAAqB,CAAC;AAEnE,eAAO,MAAM,YAAY,UAAW,aAAa,WAAmC,CAAC;AAErF,eAAO,MAAM,SAAS,sBAAuB,MAAM,WAAkC,CAAC;AAEtF,eAAO,MAAM,SAAS,QAAS,OAAO,WAA8B,CAAC;AAErE,eAAO,MAAM,WAAW,SAAU,MAAM,QAAQ,CAAC,OAAO,EAAE,MAAM,EAAE,KAAK,EAAE,MAAM,CAAC,WAE/E,CAAC;AAEF,eAAO,MAAM,OAAO,YAAa,OAAO,aAAa,EAAE,WAgCtD,CAAC;AAEF,eAAO,MAAM,WAAW,oCA2BvB,CAAC;AAEF,eAAO,MAAM,UAAU,cAAe,MAAM,WAI3C,CAAC"}
@@ -0,0 +1,2 @@
1
+ export * from './formats';
2
+ //# sourceMappingURL=index.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../src/modules/format/index.ts"],"names":[],"mappings":"AAAA,cAAc,WAAW,CAAC"}
@@ -0,0 +1,14 @@
1
+ export * as codemod from './codemod';
2
+ export * as codemodRepository from './codemod-repository';
3
+ export * as error from './error';
4
+ export * as fileScanner from './file-scanner';
5
+ export * as f from './format';
6
+ export * as logger from './logger';
7
+ export * as project from './project';
8
+ export * as report from './report';
9
+ export * as requirement from './requirement';
10
+ export * as runner from './runner';
11
+ export * as timer from './timer';
12
+ export * as upgrader from './upgrader';
13
+ export * as version from './version';
14
+ //# sourceMappingURL=index.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../src/modules/index.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,OAAO,MAAM,WAAW,CAAC;AACrC,OAAO,KAAK,iBAAiB,MAAM,sBAAsB,CAAC;AAC1D,OAAO,KAAK,KAAK,MAAM,SAAS,CAAC;AACjC,OAAO,KAAK,WAAW,MAAM,gBAAgB,CAAC;AAC9C,OAAO,KAAK,CAAC,MAAM,UAAU,CAAC;AAC9B,OAAO,KAAK,MAAM,MAAM,UAAU,CAAC;AACnC,OAAO,KAAK,OAAO,MAAM,WAAW,CAAC;AACrC,OAAO,KAAK,MAAM,MAAM,UAAU,CAAC;AACnC,OAAO,KAAK,WAAW,MAAM,eAAe,CAAC;AAC7C,OAAO,KAAK,MAAM,MAAM,UAAU,CAAC;AACnC,OAAO,KAAK,KAAK,MAAM,SAAS,CAAC;AACjC,OAAO,KAAK,QAAQ,MAAM,YAAY,CAAC;AACvC,OAAO,KAAK,OAAO,MAAM,WAAW,CAAC"}