@xylabs/ts-scripts-yarn3 2.19.12 → 2.20.0-rc.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 (915) hide show
  1. package/dist/actions/build.d.ts +9 -0
  2. package/dist/actions/build.d.ts.map +1 -0
  3. package/dist/actions/build.js +21 -163
  4. package/dist/actions/build.js.map +1 -1
  5. package/dist/actions/clean-docs.d.ts +2 -0
  6. package/dist/actions/clean-docs.d.ts.map +1 -0
  7. package/dist/actions/clean-docs.js +13 -61
  8. package/dist/actions/clean-docs.js.map +1 -1
  9. package/dist/actions/clean-eslint.d.ts +2 -0
  10. package/dist/actions/clean-eslint.d.ts.map +1 -0
  11. package/dist/actions/clean-eslint.js +13 -47
  12. package/dist/actions/clean-eslint.js.map +1 -1
  13. package/dist/actions/clean-jest.d.ts +2 -0
  14. package/dist/actions/clean-jest.d.ts.map +1 -0
  15. package/dist/actions/clean-jest.js +6 -133
  16. package/dist/actions/clean-jest.js.map +1 -1
  17. package/dist/actions/clean.d.ts +12 -0
  18. package/dist/actions/clean.d.ts.map +1 -0
  19. package/dist/actions/clean.js +20 -247
  20. package/dist/actions/clean.js.map +1 -1
  21. package/dist/actions/compile.d.ts +16 -0
  22. package/dist/actions/compile.d.ts.map +1 -0
  23. package/dist/actions/compile.js +28 -156
  24. package/dist/actions/compile.js.map +1 -1
  25. package/dist/actions/copy-assets.d.ts +6 -0
  26. package/dist/actions/copy-assets.d.ts.map +1 -0
  27. package/dist/actions/copy-assets.js +48 -99
  28. package/dist/actions/copy-assets.js.map +1 -1
  29. package/dist/actions/cycle.d.ts +2 -0
  30. package/dist/actions/cycle.d.ts.map +1 -0
  31. package/dist/actions/cycle.js +8 -135
  32. package/dist/actions/cycle.js.map +1 -1
  33. package/dist/actions/dead.d.ts +2 -0
  34. package/dist/actions/dead.d.ts.map +1 -0
  35. package/dist/actions/dead.js +6 -133
  36. package/dist/actions/dead.js.map +1 -1
  37. package/dist/actions/deploy-major.d.ts +2 -0
  38. package/dist/actions/deploy-major.d.ts.map +1 -0
  39. package/dist/actions/deploy-major.js +14 -141
  40. package/dist/actions/deploy-major.js.map +1 -1
  41. package/dist/actions/deploy-minor.d.ts +2 -0
  42. package/dist/actions/deploy-minor.d.ts.map +1 -0
  43. package/dist/actions/deploy-minor.js +14 -141
  44. package/dist/actions/deploy-minor.js.map +1 -1
  45. package/dist/actions/deploy-next.d.ts +2 -0
  46. package/dist/actions/deploy-next.d.ts.map +1 -0
  47. package/dist/actions/deploy-next.js +14 -141
  48. package/dist/actions/deploy-next.js.map +1 -1
  49. package/dist/actions/deploy.d.ts +2 -0
  50. package/dist/actions/deploy.d.ts.map +1 -0
  51. package/dist/actions/deploy.js +15 -142
  52. package/dist/actions/deploy.js.map +1 -1
  53. package/dist/actions/deps.d.ts +12 -0
  54. package/dist/actions/deps.d.ts.map +1 -0
  55. package/dist/actions/deps.js +26 -153
  56. package/dist/actions/deps.js.map +1 -1
  57. package/dist/actions/dupdeps.d.ts +2 -0
  58. package/dist/actions/dupdeps.d.ts.map +1 -0
  59. package/dist/actions/dupdeps.js +12 -214
  60. package/dist/actions/dupdeps.js.map +1 -1
  61. package/dist/actions/fix.d.ts +2 -0
  62. package/dist/actions/fix.d.ts.map +1 -0
  63. package/dist/actions/fix.js +6 -133
  64. package/dist/actions/fix.js.map +1 -1
  65. package/dist/actions/gen-docs.d.ts +11 -0
  66. package/dist/actions/gen-docs.d.ts.map +1 -0
  67. package/dist/actions/gen-docs.js +18 -147
  68. package/dist/actions/gen-docs.js.map +1 -1
  69. package/dist/actions/gitignore-gen.d.ts +2 -0
  70. package/dist/actions/gitignore-gen.d.ts.map +1 -0
  71. package/dist/actions/gitignore-gen.js +6 -122
  72. package/dist/actions/gitignore-gen.js.map +1 -1
  73. package/dist/actions/gitlint-fix.d.ts +2 -0
  74. package/dist/actions/gitlint-fix.d.ts.map +1 -0
  75. package/dist/actions/gitlint-fix.js +23 -59
  76. package/dist/actions/gitlint-fix.js.map +1 -1
  77. package/dist/actions/gitlint.d.ts +2 -0
  78. package/dist/actions/gitlint.d.ts.map +1 -0
  79. package/dist/actions/gitlint.js +46 -80
  80. package/dist/actions/gitlint.js.map +1 -1
  81. package/dist/actions/index.d.ts +39 -0
  82. package/dist/actions/index.d.ts.map +1 -0
  83. package/dist/actions/index.js +40 -1693
  84. package/dist/actions/index.js.map +1 -1
  85. package/dist/actions/license.d.ts +2 -0
  86. package/dist/actions/license.d.ts.map +1 -0
  87. package/dist/actions/license.js +69 -116
  88. package/dist/actions/license.js.map +1 -1
  89. package/dist/actions/lint-clean.d.ts +2 -0
  90. package/dist/actions/lint-clean.d.ts.map +1 -0
  91. package/dist/actions/lint-clean.js +25 -180
  92. package/dist/actions/lint-clean.js.map +1 -1
  93. package/dist/actions/lint-profile.d.ts +2 -0
  94. package/dist/actions/lint-profile.d.ts.map +1 -0
  95. package/dist/actions/lint-profile.js +6 -133
  96. package/dist/actions/lint-profile.js.map +1 -1
  97. package/dist/actions/lint.d.ts +12 -0
  98. package/dist/actions/lint.d.ts.map +1 -0
  99. package/dist/actions/lint.js +30 -171
  100. package/dist/actions/lint.js.map +1 -1
  101. package/dist/actions/npmignore-gen.d.ts +2 -0
  102. package/dist/actions/npmignore-gen.d.ts.map +1 -0
  103. package/dist/actions/npmignore-gen.js +6 -122
  104. package/dist/actions/npmignore-gen.js.map +1 -1
  105. package/dist/actions/package/clean-outputs.d.ts +2 -0
  106. package/dist/actions/package/clean-outputs.d.ts.map +1 -0
  107. package/dist/actions/package/clean-outputs.js +16 -50
  108. package/dist/actions/package/clean-outputs.js.map +1 -1
  109. package/dist/actions/package/clean-typescript.d.ts +2 -0
  110. package/dist/actions/package/clean-typescript.d.ts.map +1 -0
  111. package/dist/actions/package/clean-typescript.js +16 -50
  112. package/dist/actions/package/clean-typescript.js.map +1 -1
  113. package/dist/actions/package/clean.d.ts +2 -0
  114. package/dist/actions/package/clean.d.ts.map +1 -0
  115. package/dist/actions/package/clean.js +8 -73
  116. package/dist/actions/package/clean.js.map +1 -1
  117. package/dist/actions/package/compile.d.ts +2 -0
  118. package/dist/actions/package/compile.d.ts.map +1 -0
  119. package/dist/actions/package/compile.js +60 -314
  120. package/dist/actions/package/compile.js.map +1 -1
  121. package/dist/actions/package/copy-assets.d.ts +5 -0
  122. package/dist/actions/package/copy-assets.d.ts.map +1 -0
  123. package/dist/actions/package/copy-assets.js +36 -73
  124. package/dist/actions/package/copy-assets.js.map +1 -1
  125. package/dist/actions/package/deps.d.ts +2 -0
  126. package/dist/actions/package/deps.d.ts.map +1 -0
  127. package/dist/actions/package/deps.js +89 -127
  128. package/dist/actions/package/deps.js.map +1 -1
  129. package/dist/actions/package/gen-docs.d.ts +2 -0
  130. package/dist/actions/package/gen-docs.d.ts.map +1 -0
  131. package/dist/actions/package/gen-docs.js +103 -135
  132. package/dist/actions/package/gen-docs.js.map +1 -1
  133. package/dist/actions/package/index.d.ts +11 -0
  134. package/dist/actions/package/index.d.ts.map +1 -0
  135. package/dist/actions/package/index.js +12 -590
  136. package/dist/actions/package/index.js.map +1 -1
  137. package/dist/actions/package/publint.d.ts +2 -0
  138. package/dist/actions/package/publint.d.ts.map +1 -0
  139. package/dist/actions/package/publint.js +41 -52
  140. package/dist/actions/package/publint.js.map +1 -1
  141. package/dist/actions/package/recompile.d.ts +2 -0
  142. package/dist/actions/package/recompile.d.ts.map +1 -0
  143. package/dist/actions/package/recompile.js +8 -361
  144. package/dist/actions/package/recompile.js.map +1 -1
  145. package/dist/actions/package/tsup.d.ts +2 -0
  146. package/dist/actions/package/tsup.d.ts.map +1 -0
  147. package/dist/actions/package/tsup.js +29 -0
  148. package/dist/actions/package/tsup.js.map +1 -0
  149. package/dist/actions/publint.d.ts +12 -0
  150. package/dist/actions/publint.d.ts.map +1 -0
  151. package/dist/actions/publint.js +17 -205
  152. package/dist/actions/publint.js.map +1 -1
  153. package/dist/actions/rebuild.d.ts +6 -0
  154. package/dist/actions/rebuild.d.ts.map +1 -0
  155. package/dist/actions/rebuild.js +10 -137
  156. package/dist/actions/rebuild.js.map +1 -1
  157. package/dist/actions/recompile.d.ts +16 -0
  158. package/dist/actions/recompile.d.ts.map +1 -0
  159. package/dist/actions/recompile.js +28 -172
  160. package/dist/actions/recompile.js.map +1 -1
  161. package/dist/actions/reinstall.d.ts +2 -0
  162. package/dist/actions/reinstall.d.ts.map +1 -0
  163. package/dist/actions/reinstall.js +26 -163
  164. package/dist/actions/reinstall.js.map +1 -1
  165. package/dist/actions/relint.d.ts +2 -0
  166. package/dist/actions/relint.d.ts.map +1 -0
  167. package/dist/actions/relint.js +24 -161
  168. package/dist/actions/relint.js.map +1 -1
  169. package/dist/actions/retest.d.ts +2 -0
  170. package/dist/actions/retest.d.ts.map +1 -0
  171. package/dist/actions/retest.js +10 -137
  172. package/dist/actions/retest.js.map +1 -1
  173. package/dist/actions/sonar.d.ts +2 -0
  174. package/dist/actions/sonar.d.ts.map +1 -0
  175. package/dist/actions/sonar.js +6 -133
  176. package/dist/actions/sonar.js.map +1 -1
  177. package/dist/actions/statics.d.ts +2 -0
  178. package/dist/actions/statics.d.ts.map +1 -0
  179. package/dist/actions/statics.js +12 -214
  180. package/dist/actions/statics.js.map +1 -1
  181. package/dist/actions/test.d.ts +2 -0
  182. package/dist/actions/test.d.ts.map +1 -0
  183. package/dist/actions/test.js +6 -133
  184. package/dist/actions/test.js.map +1 -1
  185. package/dist/actions/up.d.ts +2 -0
  186. package/dist/actions/up.d.ts.map +1 -0
  187. package/dist/actions/up.js +6 -133
  188. package/dist/actions/up.js.map +1 -1
  189. package/dist/actions/updo.d.ts +2 -0
  190. package/dist/actions/updo.d.ts.map +1 -0
  191. package/dist/actions/updo.js +11 -138
  192. package/dist/actions/updo.js.map +1 -1
  193. package/dist/actions/upplug.d.ts +2 -0
  194. package/dist/actions/upplug.d.ts.map +1 -0
  195. package/dist/actions/upplug.js +12 -139
  196. package/dist/actions/upplug.js.map +1 -1
  197. package/dist/actions/upyarn.d.ts +2 -0
  198. package/dist/actions/upyarn.d.ts.map +1 -0
  199. package/dist/actions/upyarn.js +6 -133
  200. package/dist/actions/upyarn.js.map +1 -1
  201. package/dist/actions/yarn3only.d.ts +2 -0
  202. package/dist/actions/yarn3only.d.ts.map +1 -0
  203. package/dist/actions/yarn3only.js +9 -93
  204. package/dist/actions/yarn3only.js.map +1 -1
  205. package/dist/bin/build.d.ts +3 -0
  206. package/dist/bin/build.d.ts.map +1 -0
  207. package/dist/bin/build.js +3 -33
  208. package/dist/bin/build.js.map +1 -1
  209. package/dist/bin/clean.d.ts +3 -0
  210. package/dist/bin/clean.d.ts.map +1 -0
  211. package/dist/bin/clean.js +3 -33
  212. package/dist/bin/clean.js.map +1 -1
  213. package/dist/bin/compile.d.ts +3 -0
  214. package/dist/bin/compile.d.ts.map +1 -0
  215. package/dist/bin/compile.js +3 -33
  216. package/dist/bin/compile.js.map +1 -1
  217. package/dist/bin/cycle.d.ts +3 -0
  218. package/dist/bin/cycle.d.ts.map +1 -0
  219. package/dist/bin/cycle.js +3 -33
  220. package/dist/bin/cycle.js.map +1 -1
  221. package/dist/bin/dead.d.ts +3 -0
  222. package/dist/bin/dead.d.ts.map +1 -0
  223. package/dist/bin/dead.js +3 -33
  224. package/dist/bin/dead.js.map +1 -1
  225. package/dist/bin/deploy-major.d.ts +3 -0
  226. package/dist/bin/deploy-major.d.ts.map +1 -0
  227. package/dist/bin/deploy-major.js +3 -33
  228. package/dist/bin/deploy-major.js.map +1 -1
  229. package/dist/bin/deploy-minor.d.ts +3 -0
  230. package/dist/bin/deploy-minor.d.ts.map +1 -0
  231. package/dist/bin/deploy-minor.js +3 -33
  232. package/dist/bin/deploy-minor.js.map +1 -1
  233. package/dist/bin/deploy-next.d.ts +3 -0
  234. package/dist/bin/deploy-next.d.ts.map +1 -0
  235. package/dist/bin/deploy-next.js +3 -33
  236. package/dist/bin/deploy-next.js.map +1 -1
  237. package/dist/bin/deploy.d.ts +3 -0
  238. package/dist/bin/deploy.d.ts.map +1 -0
  239. package/dist/bin/deploy.js +3 -33
  240. package/dist/bin/deploy.js.map +1 -1
  241. package/dist/bin/deps.d.ts +3 -0
  242. package/dist/bin/deps.d.ts.map +1 -0
  243. package/dist/bin/deps.js +3 -33
  244. package/dist/bin/deps.js.map +1 -1
  245. package/dist/bin/fix.d.ts +3 -0
  246. package/dist/bin/fix.d.ts.map +1 -0
  247. package/dist/bin/fix.js +3 -33
  248. package/dist/bin/fix.js.map +1 -1
  249. package/dist/bin/gen-docs.d.ts +3 -0
  250. package/dist/bin/gen-docs.d.ts.map +1 -0
  251. package/dist/bin/gen-docs.js +3 -33
  252. package/dist/bin/gen-docs.js.map +1 -1
  253. package/dist/bin/gitlint-fix.d.ts +3 -0
  254. package/dist/bin/gitlint-fix.d.ts.map +1 -0
  255. package/dist/bin/gitlint-fix.js +3 -33
  256. package/dist/bin/gitlint-fix.js.map +1 -1
  257. package/dist/bin/gitlint.d.ts +3 -0
  258. package/dist/bin/gitlint.d.ts.map +1 -0
  259. package/dist/bin/gitlint.js +3 -33
  260. package/dist/bin/gitlint.js.map +1 -1
  261. package/dist/bin/license.d.ts +3 -0
  262. package/dist/bin/license.d.ts.map +1 -0
  263. package/dist/bin/license.js +3 -33
  264. package/dist/bin/license.js.map +1 -1
  265. package/dist/bin/lint-clean.d.ts +3 -0
  266. package/dist/bin/lint-clean.d.ts.map +1 -0
  267. package/dist/bin/lint-clean.js +3 -33
  268. package/dist/bin/lint-clean.js.map +1 -1
  269. package/dist/bin/lint-fast.d.ts +3 -0
  270. package/dist/bin/lint-fast.d.ts.map +1 -0
  271. package/dist/bin/lint-fast.js +3 -33
  272. package/dist/bin/lint-fast.js.map +1 -1
  273. package/dist/bin/lint-profile.d.ts +3 -0
  274. package/dist/bin/lint-profile.d.ts.map +1 -0
  275. package/dist/bin/lint-profile.js +3 -33
  276. package/dist/bin/lint-profile.js.map +1 -1
  277. package/dist/bin/lint.d.ts +3 -0
  278. package/dist/bin/lint.d.ts.map +1 -0
  279. package/dist/bin/lint.js +3 -33
  280. package/dist/bin/lint.js.map +1 -1
  281. package/dist/bin/package/clean-outputs.d.ts +3 -0
  282. package/dist/bin/package/clean-outputs.d.ts.map +1 -0
  283. package/dist/bin/package/clean-outputs.js +3 -40
  284. package/dist/bin/package/clean-outputs.js.map +1 -1
  285. package/dist/bin/package/clean-typescript.d.ts +3 -0
  286. package/dist/bin/package/clean-typescript.d.ts.map +1 -0
  287. package/dist/bin/package/clean-typescript.js +3 -40
  288. package/dist/bin/package/clean-typescript.js.map +1 -1
  289. package/dist/bin/package/clean.d.ts +3 -0
  290. package/dist/bin/package/clean.d.ts.map +1 -0
  291. package/dist/bin/package/clean.js +3 -60
  292. package/dist/bin/package/clean.js.map +1 -1
  293. package/dist/bin/package/compile.d.ts +3 -0
  294. package/dist/bin/package/compile.d.ts.map +1 -0
  295. package/dist/bin/package/compile.js +7 -313
  296. package/dist/bin/package/compile.js.map +1 -1
  297. package/dist/bin/package/copy-assets-cjs.d.ts +3 -0
  298. package/dist/bin/package/copy-assets-cjs.d.ts.map +1 -0
  299. package/dist/bin/package/copy-assets-cjs.js +7 -70
  300. package/dist/bin/package/copy-assets-cjs.js.map +1 -1
  301. package/dist/bin/package/copy-assets-esm.d.ts +3 -0
  302. package/dist/bin/package/copy-assets-esm.d.ts.map +1 -0
  303. package/dist/bin/package/copy-assets-esm.js +7 -70
  304. package/dist/bin/package/copy-assets-esm.js.map +1 -1
  305. package/dist/bin/package/deps.d.ts +3 -0
  306. package/dist/bin/package/deps.d.ts.map +1 -0
  307. package/dist/bin/package/deps.js +7 -121
  308. package/dist/bin/package/deps.js.map +1 -1
  309. package/dist/bin/package/gen-docs.d.ts +3 -0
  310. package/dist/bin/package/gen-docs.d.ts.map +1 -0
  311. package/dist/bin/package/gen-docs.js +3 -134
  312. package/dist/bin/package/gen-docs.js.map +1 -1
  313. package/dist/bin/package/publint.d.ts +3 -0
  314. package/dist/bin/package/publint.d.ts.map +1 -0
  315. package/dist/bin/package/publint.js +7 -48
  316. package/dist/bin/package/publint.js.map +1 -1
  317. package/dist/bin/package/recompile.d.ts +3 -0
  318. package/dist/bin/package/recompile.d.ts.map +1 -0
  319. package/dist/bin/package/recompile.js +7 -353
  320. package/dist/bin/package/recompile.js.map +1 -1
  321. package/dist/bin/package/tsup.d.ts +3 -0
  322. package/dist/bin/package/tsup.d.ts.map +1 -0
  323. package/dist/bin/package/tsup.js +11 -0
  324. package/dist/bin/package/tsup.js.map +1 -0
  325. package/dist/bin/publint.d.ts +3 -0
  326. package/dist/bin/publint.d.ts.map +1 -0
  327. package/dist/bin/publint.js +3 -33
  328. package/dist/bin/publint.js.map +1 -1
  329. package/dist/bin/rebuild.d.ts +3 -0
  330. package/dist/bin/rebuild.d.ts.map +1 -0
  331. package/dist/bin/rebuild.js +3 -33
  332. package/dist/bin/rebuild.js.map +1 -1
  333. package/dist/bin/recompile.d.ts +3 -0
  334. package/dist/bin/recompile.d.ts.map +1 -0
  335. package/dist/bin/recompile.js +3 -33
  336. package/dist/bin/recompile.js.map +1 -1
  337. package/dist/bin/reinstall.d.ts +3 -0
  338. package/dist/bin/reinstall.d.ts.map +1 -0
  339. package/dist/bin/reinstall.js +3 -33
  340. package/dist/bin/reinstall.js.map +1 -1
  341. package/dist/bin/relint.d.ts +3 -0
  342. package/dist/bin/relint.d.ts.map +1 -0
  343. package/dist/bin/relint.js +3 -33
  344. package/dist/bin/relint.js.map +1 -1
  345. package/dist/bin/sonar.d.ts +3 -0
  346. package/dist/bin/sonar.d.ts.map +1 -0
  347. package/dist/bin/sonar.js +3 -33
  348. package/dist/bin/sonar.js.map +1 -1
  349. package/dist/bin/test.d.ts +3 -0
  350. package/dist/bin/test.d.ts.map +1 -0
  351. package/dist/bin/test.js +3 -33
  352. package/dist/bin/test.js.map +1 -1
  353. package/dist/bin/tsconfig-gen-clean.d.ts +3 -0
  354. package/dist/bin/tsconfig-gen-clean.d.ts.map +1 -0
  355. package/dist/bin/tsconfig-gen-clean.js +3 -33
  356. package/dist/bin/tsconfig-gen-clean.js.map +1 -1
  357. package/dist/bin/tsconfig-gen.d.ts +3 -0
  358. package/dist/bin/tsconfig-gen.d.ts.map +1 -0
  359. package/dist/bin/tsconfig-gen.js +3 -33
  360. package/dist/bin/tsconfig-gen.js.map +1 -1
  361. package/dist/bin/up.d.ts +3 -0
  362. package/dist/bin/up.d.ts.map +1 -0
  363. package/dist/bin/up.js +3 -33
  364. package/dist/bin/up.js.map +1 -1
  365. package/dist/bin/updo.d.ts +3 -0
  366. package/dist/bin/updo.d.ts.map +1 -0
  367. package/dist/bin/updo.js +3 -33
  368. package/dist/bin/updo.js.map +1 -1
  369. package/dist/bin/upplug.d.ts +3 -0
  370. package/dist/bin/upplug.d.ts.map +1 -0
  371. package/dist/bin/upplug.js +3 -33
  372. package/dist/bin/upplug.js.map +1 -1
  373. package/dist/bin/upyarn.d.ts +3 -0
  374. package/dist/bin/upyarn.d.ts.map +1 -0
  375. package/dist/bin/upyarn.js +3 -33
  376. package/dist/bin/upyarn.js.map +1 -1
  377. package/dist/bin/xy-ts.d.ts +3 -0
  378. package/dist/bin/xy-ts.d.ts.map +1 -0
  379. package/dist/bin/xy-ts.js +3 -1680
  380. package/dist/bin/xy-ts.js.map +1 -1
  381. package/dist/bin/xy.d.ts +3 -0
  382. package/dist/bin/xy.d.ts.map +1 -0
  383. package/dist/bin/xy.js +3 -1680
  384. package/dist/bin/xy.js.map +1 -1
  385. package/dist/bin/yarn3only.d.ts +3 -0
  386. package/dist/bin/yarn3only.d.ts.map +1 -0
  387. package/dist/bin/yarn3only.js +3 -33
  388. package/dist/bin/yarn3only.js.map +1 -1
  389. package/dist/index.d.ts +3 -319
  390. package/dist/index.d.ts.map +1 -0
  391. package/dist/index.js +4 -2333
  392. package/dist/index.js.map +1 -1
  393. package/dist/lib/checkResult.d.ts +2 -0
  394. package/dist/lib/checkResult.d.ts.map +1 -0
  395. package/dist/lib/checkResult.js +13 -47
  396. package/dist/lib/checkResult.js.map +1 -1
  397. package/dist/lib/createBuildConfig.d.ts +2 -0
  398. package/dist/lib/createBuildConfig.d.ts.map +1 -0
  399. package/dist/lib/createBuildConfig.js +31 -66
  400. package/dist/lib/createBuildConfig.js.map +1 -1
  401. package/dist/lib/defaultBuildConfig.d.ts +9 -0
  402. package/dist/lib/defaultBuildConfig.d.ts.map +1 -0
  403. package/dist/lib/defaultBuildConfig.js +9 -35
  404. package/dist/lib/defaultBuildConfig.js.map +1 -1
  405. package/dist/lib/dependencies/DuplicateDetector.d.ts +9 -0
  406. package/dist/lib/dependencies/DuplicateDetector.d.ts.map +1 -0
  407. package/dist/lib/dependencies/DuplicateDetector.js +65 -104
  408. package/dist/lib/dependencies/DuplicateDetector.js.map +1 -1
  409. package/dist/lib/dependencies/detectDuplicateDependencies.d.ts +2 -0
  410. package/dist/lib/dependencies/detectDuplicateDependencies.d.ts.map +1 -0
  411. package/dist/lib/dependencies/detectDuplicateDependencies.js +40 -192
  412. package/dist/lib/dependencies/detectDuplicateDependencies.js.map +1 -1
  413. package/dist/lib/dependencies/index.d.ts +3 -0
  414. package/dist/lib/dependencies/index.d.ts.map +1 -0
  415. package/dist/lib/dependencies/index.js +4 -199
  416. package/dist/lib/dependencies/index.js.map +1 -1
  417. package/dist/lib/file/ReadFileSyncOptions.d.ts +7 -0
  418. package/dist/lib/file/ReadFileSyncOptions.d.ts.map +1 -0
  419. package/dist/lib/file/ReadFileSyncOptions.js +3 -29
  420. package/dist/lib/file/ReadFileSyncOptions.js.map +1 -1
  421. package/dist/lib/file/constants.d.ts +3 -0
  422. package/dist/lib/file/constants.d.ts.map +1 -0
  423. package/dist/lib/file/constants.js +4 -32
  424. package/dist/lib/file/constants.js.map +1 -1
  425. package/dist/lib/file/fileLines.d.ts +6 -0
  426. package/dist/lib/file/fileLines.d.ts.map +1 -0
  427. package/dist/lib/file/fileLines.js +17 -53
  428. package/dist/lib/file/fileLines.js.map +1 -1
  429. package/dist/lib/file/index.d.ts +5 -0
  430. package/dist/lib/file/index.d.ts.map +1 -0
  431. package/dist/lib/file/index.js +6 -70
  432. package/dist/lib/file/index.js.map +1 -1
  433. package/dist/lib/file/tryReadFileSync.d.ts +4 -0
  434. package/dist/lib/file/tryReadFileSync.d.ts.map +1 -0
  435. package/dist/lib/file/tryReadFileSync.js +7 -36
  436. package/dist/lib/file/tryReadFileSync.js.map +1 -1
  437. package/dist/lib/generateIgnoreFiles.d.ts +2 -0
  438. package/dist/lib/generateIgnoreFiles.d.ts.map +1 -0
  439. package/dist/lib/generateIgnoreFiles.js +28 -115
  440. package/dist/lib/generateIgnoreFiles.js.map +1 -1
  441. package/dist/lib/index.d.ts +20 -0
  442. package/dist/lib/index.d.ts.map +1 -0
  443. package/dist/lib/index.js +21 -1788
  444. package/dist/lib/index.js.map +1 -1
  445. package/dist/lib/jsonFormatters.d.ts +2 -0
  446. package/dist/lib/jsonFormatters.d.ts.map +1 -0
  447. package/dist/lib/jsonFormatters.js +8 -33
  448. package/dist/lib/jsonFormatters.js.map +1 -1
  449. package/dist/lib/parsedPackageJSON.d.ts +2 -0
  450. package/dist/lib/parsedPackageJSON.d.ts.map +1 -0
  451. package/dist/lib/parsedPackageJSON.js +8 -33
  452. package/dist/lib/parsedPackageJSON.js.map +1 -1
  453. package/dist/lib/processEx.d.ts +2 -0
  454. package/dist/lib/processEx.d.ts.map +1 -0
  455. package/dist/lib/processEx.js +29 -68
  456. package/dist/lib/processEx.js.map +1 -1
  457. package/dist/lib/runSteps.d.ts +5 -0
  458. package/dist/lib/runSteps.d.ts.map +1 -0
  459. package/dist/lib/runSteps.js +36 -129
  460. package/dist/lib/runSteps.js.map +1 -1
  461. package/dist/lib/runStepsAsync.d.ts +4 -0
  462. package/dist/lib/runStepsAsync.d.ts.map +1 -0
  463. package/dist/lib/runStepsAsync.js +45 -144
  464. package/dist/lib/runStepsAsync.js.map +1 -1
  465. package/dist/lib/runXy.d.ts +2 -0
  466. package/dist/lib/runXy.d.ts.map +1 -0
  467. package/dist/lib/runXy.js +6 -135
  468. package/dist/lib/runXy.js.map +1 -1
  469. package/dist/lib/runXyWithWarning.d.ts +2 -0
  470. package/dist/lib/runXyWithWarning.d.ts.map +1 -0
  471. package/dist/lib/runXyWithWarning.js +9 -43
  472. package/dist/lib/runXyWithWarning.js.map +1 -1
  473. package/dist/lib/safeExit.d.ts +5 -0
  474. package/dist/lib/safeExit.d.ts.map +1 -0
  475. package/dist/lib/safeExit.js +25 -92
  476. package/dist/lib/safeExit.js.map +1 -1
  477. package/dist/lib/string/empty.d.ts +3 -0
  478. package/dist/lib/string/empty.d.ts.map +1 -0
  479. package/dist/lib/string/empty.js +6 -32
  480. package/dist/lib/string/empty.js.map +1 -1
  481. package/dist/lib/string/index.d.ts +3 -0
  482. package/dist/lib/string/index.d.ts.map +1 -0
  483. package/dist/lib/string/index.js +4 -39
  484. package/dist/lib/string/index.js.map +1 -1
  485. package/dist/lib/string/union.d.ts +2 -0
  486. package/dist/lib/string/union.d.ts.map +1 -0
  487. package/dist/lib/string/union.js +4 -29
  488. package/dist/lib/string/union.js.map +1 -1
  489. package/dist/lib/withErrnoException.d.ts +3 -0
  490. package/dist/lib/withErrnoException.d.ts.map +1 -0
  491. package/dist/lib/withErrnoException.js +8 -38
  492. package/dist/lib/withErrnoException.js.map +1 -1
  493. package/dist/lib/withError.d.ts +2 -0
  494. package/dist/lib/withError.d.ts.map +1 -0
  495. package/dist/lib/withError.js +7 -30
  496. package/dist/lib/withError.js.map +1 -1
  497. package/dist/lib/xy/index.d.ts +8 -0
  498. package/dist/lib/xy/index.d.ts.map +1 -0
  499. package/dist/lib/xy/index.js +9 -1707
  500. package/dist/lib/xy/index.js.map +1 -1
  501. package/dist/lib/xy/xy.d.ts +10 -0
  502. package/dist/lib/xy/xy.d.ts.map +1 -0
  503. package/dist/lib/xy/xy.js +20 -1691
  504. package/dist/lib/xy/xy.js.map +1 -1
  505. package/dist/lib/xy/xyBuildCommands.d.ts +3 -0
  506. package/dist/lib/xy/xyBuildCommands.d.ts.map +1 -0
  507. package/dist/lib/xy/xyBuildCommands.js +71 -426
  508. package/dist/lib/xy/xyBuildCommands.js.map +1 -1
  509. package/dist/lib/xy/xyCommonCommands.d.ts +3 -0
  510. package/dist/lib/xy/xyCommonCommands.d.ts.map +1 -0
  511. package/dist/lib/xy/xyCommonCommands.js +102 -807
  512. package/dist/lib/xy/xyCommonCommands.js.map +1 -1
  513. package/dist/lib/xy/xyDeployCommands.d.ts +3 -0
  514. package/dist/lib/xy/xyDeployCommands.d.ts.map +1 -0
  515. package/dist/lib/xy/xyDeployCommands.js +35 -227
  516. package/dist/lib/xy/xyDeployCommands.js.map +1 -1
  517. package/dist/lib/xy/xyInstallCommands.d.ts +3 -0
  518. package/dist/lib/xy/xyInstallCommands.d.ts.map +1 -0
  519. package/dist/lib/xy/xyInstallCommands.js +52 -491
  520. package/dist/lib/xy/xyInstallCommands.js.map +1 -1
  521. package/dist/lib/xy/xyLintCommands.d.ts +3 -0
  522. package/dist/lib/xy/xyLintCommands.d.ts.map +1 -0
  523. package/dist/lib/xy/xyLintCommands.js +71 -365
  524. package/dist/lib/xy/xyLintCommands.js.map +1 -1
  525. package/dist/lib/xy/xyParseOptions.d.ts +3 -0
  526. package/dist/lib/xy/xyParseOptions.d.ts.map +1 -0
  527. package/dist/lib/xy/xyParseOptions.js +52 -77
  528. package/dist/lib/xy/xyParseOptions.js.map +1 -1
  529. package/dist/lib/yarn/index.d.ts +4 -0
  530. package/dist/lib/yarn/index.d.ts.map +1 -0
  531. package/dist/lib/yarn/index.js +5 -77
  532. package/dist/lib/yarn/index.js.map +1 -1
  533. package/dist/lib/yarn/isYarnVersionOrGreater.d.ts +2 -0
  534. package/dist/lib/yarn/isYarnVersionOrGreater.d.ts.map +1 -0
  535. package/dist/lib/yarn/isYarnVersionOrGreater.js +15 -40
  536. package/dist/lib/yarn/isYarnVersionOrGreater.js.map +1 -1
  537. package/dist/lib/yarn/workspace/Workspace.d.ts +5 -0
  538. package/dist/lib/yarn/workspace/Workspace.d.ts.map +1 -0
  539. package/dist/lib/yarn/workspace/Workspace.js +1 -17
  540. package/dist/lib/yarn/workspace/Workspace.js.map +1 -1
  541. package/dist/lib/yarn/workspace/index.d.ts +4 -0
  542. package/dist/lib/yarn/workspace/index.d.ts.map +1 -0
  543. package/dist/lib/yarn/workspace/index.js +5 -51
  544. package/dist/lib/yarn/workspace/index.js.map +1 -1
  545. package/dist/lib/yarn/workspace/yarnWorkspace.d.ts +3 -0
  546. package/dist/lib/yarn/workspace/yarnWorkspace.d.ts.map +1 -0
  547. package/dist/lib/yarn/workspace/yarnWorkspace.js +10 -49
  548. package/dist/lib/yarn/workspace/yarnWorkspace.js.map +1 -1
  549. package/dist/lib/yarn/workspace/yarnWorkspaces.d.ts +3 -0
  550. package/dist/lib/yarn/workspace/yarnWorkspaces.d.ts.map +1 -0
  551. package/dist/lib/yarn/workspace/yarnWorkspaces.js +19 -38
  552. package/dist/lib/yarn/workspace/yarnWorkspaces.js.map +1 -1
  553. package/dist/lib/yarn/yarnInitCwd.d.ts +2 -0
  554. package/dist/lib/yarn/yarnInitCwd.d.ts.map +1 -0
  555. package/dist/lib/yarn/yarnInitCwd.js +7 -32
  556. package/dist/lib/yarn/yarnInitCwd.js.map +1 -1
  557. package/package.json +11 -5
  558. package/src/actions/index.ts +0 -5
  559. package/src/actions/package/compile.ts +64 -12
  560. package/src/actions/package/gen-docs.ts +1 -1
  561. package/src/actions/package/index.ts +1 -4
  562. package/src/actions/package/publint.ts +1 -2
  563. package/src/actions/package/tsup.ts +31 -0
  564. package/src/actions/package/types.d.ts +3 -0
  565. package/src/bin/package/publint.ts +1 -1
  566. package/src/bin/package/tsup.ts +9 -0
  567. package/src/lib/xy/xyCommonCommands.ts +0 -26
  568. package/tsconfig.build.json +8 -0
  569. package/tsconfig.json +4 -1
  570. package/dist/actions/build.mjs +0 -133
  571. package/dist/actions/build.mjs.map +0 -1
  572. package/dist/actions/clean-docs.mjs +0 -29
  573. package/dist/actions/clean-docs.mjs.map +0 -1
  574. package/dist/actions/clean-eslint.mjs +0 -15
  575. package/dist/actions/clean-eslint.mjs.map +0 -1
  576. package/dist/actions/clean-jest.mjs +0 -100
  577. package/dist/actions/clean-jest.mjs.map +0 -1
  578. package/dist/actions/clean.mjs +0 -210
  579. package/dist/actions/clean.mjs.map +0 -1
  580. package/dist/actions/compile.mjs +0 -124
  581. package/dist/actions/compile.mjs.map +0 -1
  582. package/dist/actions/copy-assets.mjs +0 -71
  583. package/dist/actions/copy-assets.mjs.map +0 -1
  584. package/dist/actions/cycle.mjs +0 -100
  585. package/dist/actions/cycle.mjs.map +0 -1
  586. package/dist/actions/dead.mjs +0 -99
  587. package/dist/actions/dead.mjs.map +0 -1
  588. package/dist/actions/deploy-major.mjs +0 -106
  589. package/dist/actions/deploy-major.mjs.map +0 -1
  590. package/dist/actions/deploy-minor.mjs +0 -106
  591. package/dist/actions/deploy-minor.mjs.map +0 -1
  592. package/dist/actions/deploy-next.mjs +0 -106
  593. package/dist/actions/deploy-next.mjs.map +0 -1
  594. package/dist/actions/deploy.mjs +0 -107
  595. package/dist/actions/deploy.mjs.map +0 -1
  596. package/dist/actions/deps.mjs +0 -121
  597. package/dist/actions/deps.mjs.map +0 -1
  598. package/dist/actions/dupdeps.mjs +0 -181
  599. package/dist/actions/dupdeps.mjs.map +0 -1
  600. package/dist/actions/fix.mjs +0 -99
  601. package/dist/actions/fix.mjs.map +0 -1
  602. package/dist/actions/gen-docs.mjs +0 -110
  603. package/dist/actions/gen-docs.mjs.map +0 -1
  604. package/dist/actions/gitignore-gen.mjs +0 -87
  605. package/dist/actions/gitignore-gen.mjs.map +0 -1
  606. package/dist/actions/gitlint-fix.mjs +0 -27
  607. package/dist/actions/gitlint-fix.mjs.map +0 -1
  608. package/dist/actions/gitlint.mjs +0 -48
  609. package/dist/actions/gitlint.mjs.map +0 -1
  610. package/dist/actions/index.mjs +0 -1590
  611. package/dist/actions/index.mjs.map +0 -1
  612. package/dist/actions/license.mjs +0 -87
  613. package/dist/actions/license.mjs.map +0 -1
  614. package/dist/actions/lint-clean.mjs +0 -147
  615. package/dist/actions/lint-clean.mjs.map +0 -1
  616. package/dist/actions/lint-profile.mjs +0 -99
  617. package/dist/actions/lint-profile.mjs.map +0 -1
  618. package/dist/actions/lint.mjs +0 -137
  619. package/dist/actions/lint.mjs.map +0 -1
  620. package/dist/actions/npmignore-gen.mjs +0 -87
  621. package/dist/actions/npmignore-gen.mjs.map +0 -1
  622. package/dist/actions/package/clean-outputs.mjs +0 -18
  623. package/dist/actions/package/clean-outputs.mjs.map +0 -1
  624. package/dist/actions/package/clean-typescript.mjs +0 -18
  625. package/dist/actions/package/clean-typescript.mjs.map +0 -1
  626. package/dist/actions/package/clean.mjs +0 -38
  627. package/dist/actions/package/clean.mjs.map +0 -1
  628. package/dist/actions/package/compile-cjs.js +0 -268
  629. package/dist/actions/package/compile-cjs.js.map +0 -1
  630. package/dist/actions/package/compile-cjs.mjs +0 -231
  631. package/dist/actions/package/compile-cjs.mjs.map +0 -1
  632. package/dist/actions/package/compile-esm.js +0 -270
  633. package/dist/actions/package/compile-esm.js.map +0 -1
  634. package/dist/actions/package/compile-esm.mjs +0 -233
  635. package/dist/actions/package/compile-esm.mjs.map +0 -1
  636. package/dist/actions/package/compile.mjs +0 -286
  637. package/dist/actions/package/compile.mjs.map +0 -1
  638. package/dist/actions/package/copy-assets.mjs +0 -43
  639. package/dist/actions/package/copy-assets.mjs.map +0 -1
  640. package/dist/actions/package/deps.mjs +0 -96
  641. package/dist/actions/package/deps.mjs.map +0 -1
  642. package/dist/actions/package/gen-docs.mjs +0 -112
  643. package/dist/actions/package/gen-docs.mjs.map +0 -1
  644. package/dist/actions/package/index.mjs +0 -543
  645. package/dist/actions/package/index.mjs.map +0 -1
  646. package/dist/actions/package/publint.mjs +0 -21
  647. package/dist/actions/package/publint.mjs.map +0 -1
  648. package/dist/actions/package/recompile.mjs +0 -326
  649. package/dist/actions/package/recompile.mjs.map +0 -1
  650. package/dist/actions/package/tsconfig-gen-cjs.js +0 -111
  651. package/dist/actions/package/tsconfig-gen-cjs.js.map +0 -1
  652. package/dist/actions/package/tsconfig-gen-cjs.mjs +0 -76
  653. package/dist/actions/package/tsconfig-gen-cjs.mjs.map +0 -1
  654. package/dist/actions/package/tsconfig-gen-esm.js +0 -113
  655. package/dist/actions/package/tsconfig-gen-esm.js.map +0 -1
  656. package/dist/actions/package/tsconfig-gen-esm.mjs +0 -78
  657. package/dist/actions/package/tsconfig-gen-esm.mjs.map +0 -1
  658. package/dist/actions/publint.mjs +0 -168
  659. package/dist/actions/publint.mjs.map +0 -1
  660. package/dist/actions/rebuild.mjs +0 -102
  661. package/dist/actions/rebuild.mjs.map +0 -1
  662. package/dist/actions/recompile.mjs +0 -140
  663. package/dist/actions/recompile.mjs.map +0 -1
  664. package/dist/actions/reinstall.mjs +0 -130
  665. package/dist/actions/reinstall.mjs.map +0 -1
  666. package/dist/actions/relint.mjs +0 -128
  667. package/dist/actions/relint.mjs.map +0 -1
  668. package/dist/actions/retest.mjs +0 -102
  669. package/dist/actions/retest.mjs.map +0 -1
  670. package/dist/actions/sonar.mjs +0 -99
  671. package/dist/actions/sonar.mjs.map +0 -1
  672. package/dist/actions/statics.mjs +0 -181
  673. package/dist/actions/statics.mjs.map +0 -1
  674. package/dist/actions/test.mjs +0 -99
  675. package/dist/actions/test.mjs.map +0 -1
  676. package/dist/actions/tsconfig-gen-cjs.js +0 -134
  677. package/dist/actions/tsconfig-gen-cjs.js.map +0 -1
  678. package/dist/actions/tsconfig-gen-cjs.mjs +0 -99
  679. package/dist/actions/tsconfig-gen-cjs.mjs.map +0 -1
  680. package/dist/actions/tsconfig-gen-clean.js +0 -80
  681. package/dist/actions/tsconfig-gen-clean.js.map +0 -1
  682. package/dist/actions/tsconfig-gen-clean.mjs +0 -45
  683. package/dist/actions/tsconfig-gen-clean.mjs.map +0 -1
  684. package/dist/actions/tsconfig-gen-esm.js +0 -134
  685. package/dist/actions/tsconfig-gen-esm.js.map +0 -1
  686. package/dist/actions/tsconfig-gen-esm.mjs +0 -99
  687. package/dist/actions/tsconfig-gen-esm.mjs.map +0 -1
  688. package/dist/actions/tsconfig-gen-test.js +0 -97
  689. package/dist/actions/tsconfig-gen-test.js.map +0 -1
  690. package/dist/actions/tsconfig-gen-test.mjs +0 -62
  691. package/dist/actions/tsconfig-gen-test.mjs.map +0 -1
  692. package/dist/actions/tsconfig-gen.js +0 -215
  693. package/dist/actions/tsconfig-gen.js.map +0 -1
  694. package/dist/actions/tsconfig-gen.mjs +0 -178
  695. package/dist/actions/tsconfig-gen.mjs.map +0 -1
  696. package/dist/actions/up.mjs +0 -99
  697. package/dist/actions/up.mjs.map +0 -1
  698. package/dist/actions/updo.mjs +0 -103
  699. package/dist/actions/updo.mjs.map +0 -1
  700. package/dist/actions/upplug.mjs +0 -104
  701. package/dist/actions/upplug.mjs.map +0 -1
  702. package/dist/actions/upyarn.mjs +0 -99
  703. package/dist/actions/upyarn.mjs.map +0 -1
  704. package/dist/actions/yarn3only.mjs +0 -60
  705. package/dist/actions/yarn3only.mjs.map +0 -1
  706. package/dist/bin/build.mjs +0 -13
  707. package/dist/bin/build.mjs.map +0 -1
  708. package/dist/bin/clean.mjs +0 -13
  709. package/dist/bin/clean.mjs.map +0 -1
  710. package/dist/bin/compile.mjs +0 -13
  711. package/dist/bin/compile.mjs.map +0 -1
  712. package/dist/bin/cycle.mjs +0 -13
  713. package/dist/bin/cycle.mjs.map +0 -1
  714. package/dist/bin/dead.mjs +0 -13
  715. package/dist/bin/dead.mjs.map +0 -1
  716. package/dist/bin/deploy-major.mjs +0 -13
  717. package/dist/bin/deploy-major.mjs.map +0 -1
  718. package/dist/bin/deploy-minor.mjs +0 -13
  719. package/dist/bin/deploy-minor.mjs.map +0 -1
  720. package/dist/bin/deploy-next.mjs +0 -13
  721. package/dist/bin/deploy-next.mjs.map +0 -1
  722. package/dist/bin/deploy.mjs +0 -13
  723. package/dist/bin/deploy.mjs.map +0 -1
  724. package/dist/bin/deps.mjs +0 -13
  725. package/dist/bin/deps.mjs.map +0 -1
  726. package/dist/bin/fix.mjs +0 -13
  727. package/dist/bin/fix.mjs.map +0 -1
  728. package/dist/bin/gen-docs.mjs +0 -13
  729. package/dist/bin/gen-docs.mjs.map +0 -1
  730. package/dist/bin/gitlint-fix.mjs +0 -13
  731. package/dist/bin/gitlint-fix.mjs.map +0 -1
  732. package/dist/bin/gitlint.mjs +0 -13
  733. package/dist/bin/gitlint.mjs.map +0 -1
  734. package/dist/bin/license.mjs +0 -13
  735. package/dist/bin/license.mjs.map +0 -1
  736. package/dist/bin/lint-clean.mjs +0 -13
  737. package/dist/bin/lint-clean.mjs.map +0 -1
  738. package/dist/bin/lint-fast.mjs +0 -13
  739. package/dist/bin/lint-fast.mjs.map +0 -1
  740. package/dist/bin/lint-profile.mjs +0 -13
  741. package/dist/bin/lint-profile.mjs.map +0 -1
  742. package/dist/bin/lint.mjs +0 -13
  743. package/dist/bin/lint.mjs.map +0 -1
  744. package/dist/bin/package/clean-outputs.mjs +0 -20
  745. package/dist/bin/package/clean-outputs.mjs.map +0 -1
  746. package/dist/bin/package/clean-typescript.mjs +0 -20
  747. package/dist/bin/package/clean-typescript.mjs.map +0 -1
  748. package/dist/bin/package/clean.mjs +0 -40
  749. package/dist/bin/package/clean.mjs.map +0 -1
  750. package/dist/bin/package/compile-cjs.js +0 -262
  751. package/dist/bin/package/compile-cjs.js.map +0 -1
  752. package/dist/bin/package/compile-cjs.mjs +0 -239
  753. package/dist/bin/package/compile-cjs.mjs.map +0 -1
  754. package/dist/bin/package/compile-esm.js +0 -264
  755. package/dist/bin/package/compile-esm.js.map +0 -1
  756. package/dist/bin/package/compile-esm.mjs +0 -241
  757. package/dist/bin/package/compile-esm.mjs.map +0 -1
  758. package/dist/bin/package/compile.mjs +0 -294
  759. package/dist/bin/package/compile.mjs.map +0 -1
  760. package/dist/bin/package/copy-assets-cjs.mjs +0 -51
  761. package/dist/bin/package/copy-assets-cjs.mjs.map +0 -1
  762. package/dist/bin/package/copy-assets-esm.mjs +0 -51
  763. package/dist/bin/package/copy-assets-esm.mjs.map +0 -1
  764. package/dist/bin/package/deps.mjs +0 -102
  765. package/dist/bin/package/deps.mjs.map +0 -1
  766. package/dist/bin/package/gen-docs.mjs +0 -114
  767. package/dist/bin/package/gen-docs.mjs.map +0 -1
  768. package/dist/bin/package/publint.mjs +0 -29
  769. package/dist/bin/package/publint.mjs.map +0 -1
  770. package/dist/bin/package/recompile.mjs +0 -334
  771. package/dist/bin/package/recompile.mjs.map +0 -1
  772. package/dist/bin/package/tsconfig-gen-cjs.js +0 -99
  773. package/dist/bin/package/tsconfig-gen-cjs.js.map +0 -1
  774. package/dist/bin/package/tsconfig-gen-cjs.mjs +0 -76
  775. package/dist/bin/package/tsconfig-gen-cjs.mjs.map +0 -1
  776. package/dist/bin/package/tsconfig-gen-esm.js +0 -101
  777. package/dist/bin/package/tsconfig-gen-esm.js.map +0 -1
  778. package/dist/bin/package/tsconfig-gen-esm.mjs +0 -78
  779. package/dist/bin/package/tsconfig-gen-esm.mjs.map +0 -1
  780. package/dist/bin/package/tsconfig-gen.js +0 -131
  781. package/dist/bin/package/tsconfig-gen.js.map +0 -1
  782. package/dist/bin/package/tsconfig-gen.mjs +0 -108
  783. package/dist/bin/package/tsconfig-gen.mjs.map +0 -1
  784. package/dist/bin/publint.mjs +0 -13
  785. package/dist/bin/publint.mjs.map +0 -1
  786. package/dist/bin/rebuild.mjs +0 -13
  787. package/dist/bin/rebuild.mjs.map +0 -1
  788. package/dist/bin/recompile.mjs +0 -13
  789. package/dist/bin/recompile.mjs.map +0 -1
  790. package/dist/bin/reinstall.mjs +0 -13
  791. package/dist/bin/reinstall.mjs.map +0 -1
  792. package/dist/bin/relint.mjs +0 -13
  793. package/dist/bin/relint.mjs.map +0 -1
  794. package/dist/bin/sonar.mjs +0 -13
  795. package/dist/bin/sonar.mjs.map +0 -1
  796. package/dist/bin/test.mjs +0 -13
  797. package/dist/bin/test.mjs.map +0 -1
  798. package/dist/bin/tsconfig-gen-clean.mjs +0 -13
  799. package/dist/bin/tsconfig-gen-clean.mjs.map +0 -1
  800. package/dist/bin/tsconfig-gen.mjs +0 -13
  801. package/dist/bin/tsconfig-gen.mjs.map +0 -1
  802. package/dist/bin/up.mjs +0 -13
  803. package/dist/bin/up.mjs.map +0 -1
  804. package/dist/bin/updo.mjs +0 -13
  805. package/dist/bin/updo.mjs.map +0 -1
  806. package/dist/bin/upplug.mjs +0 -13
  807. package/dist/bin/upplug.mjs.map +0 -1
  808. package/dist/bin/upyarn.mjs +0 -13
  809. package/dist/bin/upyarn.mjs.map +0 -1
  810. package/dist/bin/xy-ts.mjs +0 -1660
  811. package/dist/bin/xy-ts.mjs.map +0 -1
  812. package/dist/bin/xy.mjs +0 -1660
  813. package/dist/bin/xy.mjs.map +0 -1
  814. package/dist/bin/yarn3only.mjs +0 -13
  815. package/dist/bin/yarn3only.mjs.map +0 -1
  816. package/dist/index.d.mts +0 -319
  817. package/dist/index.mjs +0 -2191
  818. package/dist/index.mjs.map +0 -1
  819. package/dist/lib/checkResult.mjs +0 -16
  820. package/dist/lib/checkResult.mjs.map +0 -1
  821. package/dist/lib/createBuildConfig.mjs +0 -45
  822. package/dist/lib/createBuildConfig.mjs.map +0 -1
  823. package/dist/lib/defaultBuildConfig.mjs +0 -13
  824. package/dist/lib/defaultBuildConfig.mjs.map +0 -1
  825. package/dist/lib/dependencies/DuplicateDetector.mjs +0 -77
  826. package/dist/lib/dependencies/DuplicateDetector.mjs.map +0 -1
  827. package/dist/lib/dependencies/detectDuplicateDependencies.mjs +0 -162
  828. package/dist/lib/dependencies/detectDuplicateDependencies.mjs.map +0 -1
  829. package/dist/lib/dependencies/index.mjs +0 -163
  830. package/dist/lib/dependencies/index.mjs.map +0 -1
  831. package/dist/lib/file/ReadFileSyncOptions.mjs +0 -6
  832. package/dist/lib/file/ReadFileSyncOptions.mjs.map +0 -1
  833. package/dist/lib/file/constants.mjs +0 -8
  834. package/dist/lib/file/constants.mjs.map +0 -1
  835. package/dist/lib/file/fileLines.mjs +0 -29
  836. package/dist/lib/file/fileLines.mjs.map +0 -1
  837. package/dist/lib/file/index.mjs +0 -39
  838. package/dist/lib/file/index.mjs.map +0 -1
  839. package/dist/lib/file/tryReadFileSync.mjs +0 -14
  840. package/dist/lib/file/tryReadFileSync.mjs.map +0 -1
  841. package/dist/lib/generateIgnoreFiles.mjs +0 -83
  842. package/dist/lib/generateIgnoreFiles.mjs.map +0 -1
  843. package/dist/lib/index.mjs +0 -1715
  844. package/dist/lib/index.mjs.map +0 -1
  845. package/dist/lib/jsonFormatters.mjs +0 -11
  846. package/dist/lib/jsonFormatters.mjs.map +0 -1
  847. package/dist/lib/parsedPackageJSON.mjs +0 -11
  848. package/dist/lib/parsedPackageJSON.mjs.map +0 -1
  849. package/dist/lib/processEx.mjs +0 -36
  850. package/dist/lib/processEx.mjs.map +0 -1
  851. package/dist/lib/runSteps.mjs +0 -96
  852. package/dist/lib/runSteps.mjs.map +0 -1
  853. package/dist/lib/runStepsAsync.mjs +0 -113
  854. package/dist/lib/runStepsAsync.mjs.map +0 -1
  855. package/dist/lib/runXy.mjs +0 -101
  856. package/dist/lib/runXy.mjs.map +0 -1
  857. package/dist/lib/runXyWithWarning.mjs +0 -11
  858. package/dist/lib/runXyWithWarning.mjs.map +0 -1
  859. package/dist/lib/safeExit.mjs +0 -61
  860. package/dist/lib/safeExit.mjs.map +0 -1
  861. package/dist/lib/string/empty.mjs +0 -8
  862. package/dist/lib/string/empty.mjs.map +0 -1
  863. package/dist/lib/string/index.mjs +0 -12
  864. package/dist/lib/string/index.mjs.map +0 -1
  865. package/dist/lib/string/union.mjs +0 -6
  866. package/dist/lib/string/union.mjs.map +0 -1
  867. package/dist/lib/withErrnoException.mjs +0 -13
  868. package/dist/lib/withErrnoException.mjs.map +0 -1
  869. package/dist/lib/withError.mjs +0 -8
  870. package/dist/lib/withError.mjs.map +0 -1
  871. package/dist/lib/xy/index.mjs +0 -1666
  872. package/dist/lib/xy/index.mjs.map +0 -1
  873. package/dist/lib/xy/xy.mjs +0 -1660
  874. package/dist/lib/xy/xy.mjs.map +0 -1
  875. package/dist/lib/xy/xyBuildCommands.mjs +0 -393
  876. package/dist/lib/xy/xyBuildCommands.mjs.map +0 -1
  877. package/dist/lib/xy/xyCommonCommands.mjs +0 -774
  878. package/dist/lib/xy/xyCommonCommands.mjs.map +0 -1
  879. package/dist/lib/xy/xyDeployCommands.mjs +0 -192
  880. package/dist/lib/xy/xyDeployCommands.mjs.map +0 -1
  881. package/dist/lib/xy/xyInstallCommands.mjs +0 -459
  882. package/dist/lib/xy/xyInstallCommands.mjs.map +0 -1
  883. package/dist/lib/xy/xyLintCommands.mjs +0 -334
  884. package/dist/lib/xy/xyLintCommands.mjs.map +0 -1
  885. package/dist/lib/xy/xyParseOptions.mjs +0 -45
  886. package/dist/lib/xy/xyParseOptions.mjs.map +0 -1
  887. package/dist/lib/yarn/index.mjs +0 -49
  888. package/dist/lib/yarn/index.mjs.map +0 -1
  889. package/dist/lib/yarn/isYarnVersionOrGreater.mjs +0 -18
  890. package/dist/lib/yarn/isYarnVersionOrGreater.mjs.map +0 -1
  891. package/dist/lib/yarn/workspace/Workspace.mjs +0 -1
  892. package/dist/lib/yarn/workspace/Workspace.mjs.map +0 -1
  893. package/dist/lib/yarn/workspace/index.mjs +0 -25
  894. package/dist/lib/yarn/workspace/index.mjs.map +0 -1
  895. package/dist/lib/yarn/workspace/yarnWorkspace.mjs +0 -24
  896. package/dist/lib/yarn/workspace/yarnWorkspace.mjs.map +0 -1
  897. package/dist/lib/yarn/workspace/yarnWorkspaces.mjs +0 -16
  898. package/dist/lib/yarn/workspace/yarnWorkspaces.mjs.map +0 -1
  899. package/dist/lib/yarn/yarnInitCwd.mjs +0 -10
  900. package/dist/lib/yarn/yarnInitCwd.mjs.map +0 -1
  901. package/src/actions/package/compile-cjs.ts +0 -15
  902. package/src/actions/package/compile-esm.ts +0 -15
  903. package/src/actions/package/tsconfig-gen-cjs.ts +0 -32
  904. package/src/actions/package/tsconfig-gen-esm.ts +0 -34
  905. package/src/actions/tsconfig-gen-cjs.ts +0 -35
  906. package/src/actions/tsconfig-gen-clean.ts +0 -22
  907. package/src/actions/tsconfig-gen-esm.ts +0 -34
  908. package/src/actions/tsconfig-gen-test.ts +0 -39
  909. package/src/actions/tsconfig-gen.ts +0 -19
  910. package/src/bin/package/compile-cjs.ts +0 -9
  911. package/src/bin/package/compile-esm.ts +0 -9
  912. package/src/bin/package/tsconfig-gen-cjs.ts +0 -5
  913. package/src/bin/package/tsconfig-gen-esm.ts +0 -5
  914. package/src/bin/package/tsconfig-gen.ts +0 -6
  915. package/tsup.config.ts +0 -16
package/dist/bin/xy.mjs DELETED
@@ -1,1660 +0,0 @@
1
- #!/usr/bin/env node
2
-
3
- // src/lib/checkResult.ts
4
- import chalk from "chalk";
5
- var checkResult = (name, result, level = "error", exitOnFail = false) => {
6
- if (result) {
7
- const exiting = exitOnFail ? "[Exiting Process]" : "[Continuing]";
8
- const chalkFunc = level === "error" ? chalk.red : chalk.yellow;
9
- console[level](chalkFunc(`${name} had ${result} failures ${exiting}`));
10
- if (exitOnFail) {
11
- process.exit(result);
12
- }
13
- }
14
- };
15
-
16
- // src/lib/createBuildConfig.ts
17
- import { readFileSync } from "fs";
18
-
19
- // src/lib/defaultBuildConfig.ts
20
- var defaultBuildConfig = {
21
- compilerOptions: {
22
- rootDir: "src",
23
- rootDirs: ["package.json"]
24
- },
25
- exclude: ["**/build", "**/dist", "**/node_modules", "**/*.spec.*", "**/*.spec", "**/*.stories.*", "**/*.example.*", "**/spec/*", "**/stories/*"],
26
- include: ["src"]
27
- };
28
-
29
- // src/lib/createBuildConfig.ts
30
- var getGeneralTypescriptConfig = (location) => {
31
- let generalConfig;
32
- try {
33
- generalConfig = readFileSync(`${location}/tsconfig.json`, { encoding: "utf8" });
34
- } catch (ex) {
35
- return false;
36
- }
37
- return JSON.parse(generalConfig);
38
- };
39
- var createBuildConfig = (location, module, target, outDirSuffix) => {
40
- const generalConfigObject = getGeneralTypescriptConfig(location);
41
- if (generalConfigObject === false) {
42
- return void 0;
43
- }
44
- return {
45
- ...generalConfigObject,
46
- compilerOptions: {
47
- ...defaultBuildConfig.compilerOptions,
48
- ...generalConfigObject.compilerOptions ?? {},
49
- module,
50
- outDir: `./${generalConfigObject.compilerOptions?.outDir ?? "dist"}/${outDirSuffix}`,
51
- target
52
- },
53
- exclude: [...generalConfigObject.exclude ?? [], ...defaultBuildConfig.exclude],
54
- include: [...generalConfigObject.include ?? [], ...defaultBuildConfig.include]
55
- };
56
- };
57
-
58
- // src/lib/dependencies/detectDuplicateDependencies.ts
59
- import { execSync } from "child_process";
60
-
61
- // src/lib/processEx.ts
62
- import chalk2 from "chalk";
63
-
64
- // src/lib/withError.ts
65
- var withError = (ex, closure, predicate = (ex2) => ex2.name !== void 0 && ex2.message !== void 0) => {
66
- return predicate(ex) ? closure(ex) : void 0;
67
- };
68
-
69
- // src/lib/withErrnoException.ts
70
- var withErrnoException = (ex, closure) => {
71
- return withError(ex, closure, (ex2) => ex2.errno !== void 0);
72
- };
73
-
74
- // src/lib/processEx.ts
75
- var processEx = (ex) => {
76
- const error = typeof ex === "string" ? Error(ex) : ex;
77
- const exitCode = withErrnoException(error, (error2) => {
78
- if (error2.code === "ENOENT") {
79
- console.error(chalk2.red(`'${error2.path}' not found.`));
80
- } else {
81
- console.error(chalk2.red(`Errno: ${error2.code}`));
82
- }
83
- return error2.errno ?? -1;
84
- }) ?? withError(error, (error2) => {
85
- console.error(chalk2.red(`${error2.name}: ${error2.message}`));
86
- return -1;
87
- }) ?? (() => {
88
- console.error(chalk2.red(`Unexpected Error: ${JSON.stringify(ex, null, 2)}`));
89
- return -1;
90
- })();
91
- process.exit(process.exitCode ?? exitCode);
92
- };
93
-
94
- // src/lib/safeExit.ts
95
- var safeExit = (func, exitOnFail = true) => {
96
- try {
97
- const result = func();
98
- if (result && exitOnFail) {
99
- process.exit(result);
100
- }
101
- return result;
102
- } catch (ex) {
103
- return processEx(ex);
104
- }
105
- };
106
- var safeExitAsync = async (func, exitOnFail = true) => {
107
- try {
108
- const result = await func();
109
- if (result && exitOnFail) {
110
- process.exit(result);
111
- }
112
- return result;
113
- } catch (ex) {
114
- return processEx(ex);
115
- }
116
- };
117
-
118
- // src/lib/dependencies/DuplicateDetector.ts
119
- import chalk3 from "chalk";
120
- import uniq from "lodash/uniq";
121
- import { EOL } from "os";
122
-
123
- // src/lib/jsonFormatters.ts
124
- var multiLineToJSONArray = (output) => {
125
- const withCommas = output.replace(/\r\n/g, "").replace(/\n/g, ",");
126
- const cleanCollection = withCommas.substring(0, withCommas.length - 1);
127
- const collection = `[${cleanCollection}]`;
128
- return JSON.parse(collection);
129
- };
130
-
131
- // src/lib/dependencies/DuplicateDetector.ts
132
- var trimVirtualMeta = (value) => {
133
- const virtualParts = value.split("virtual:");
134
- if (virtualParts.length > 1) {
135
- const hashParts = virtualParts[1].split("#");
136
- return virtualParts[0] + hashParts[1];
137
- } else {
138
- return value;
139
- }
140
- };
141
- var trimObjectDependencyVirtualMeta = (obj) => {
142
- const resultObj = {};
143
- Object.entries(obj).forEach(([key, value]) => {
144
- resultObj[trimVirtualMeta(key)] = {
145
- descriptor: trimVirtualMeta(value.descriptor),
146
- locator: trimVirtualMeta(value.locator)
147
- };
148
- });
149
- return resultObj;
150
- };
151
- var trimDependencyVirtualMeta = (dependencies) => {
152
- return dependencies.map((dependency) => {
153
- return { children: trimObjectDependencyVirtualMeta(dependency.children), value: trimVirtualMeta(dependency.value) };
154
- });
155
- };
156
- var DuplicateDetector = class {
157
- dependency;
158
- dependencyEntries;
159
- constructor(output, dependency) {
160
- this.dependency = dependency;
161
- this.dependencyEntries = trimDependencyVirtualMeta(multiLineToJSONArray(output));
162
- }
163
- detect() {
164
- const result = this.dependencyEntries.reduce(this.detectReducer, this.resultsFactory(this.dependency));
165
- if (result.duplicateVersions.length) {
166
- console.log(chalk3.yellow(`${EOL}Duplicates found for: ${this.dependency}`));
167
- console.log(chalk3.grey(` ${result.duplicateVersions.toString().replaceAll(",", `${EOL} `)}`, EOL));
168
- return 1;
169
- } else {
170
- console.log(`${this.dependency} - OK`);
171
- return 0;
172
- }
173
- }
174
- detectReducer(acc, entry) {
175
- const version = Object.entries(entry.children).map(([k]) => k)[0];
176
- if (!acc.currentVersion) {
177
- acc.currentVersion = version;
178
- return acc;
179
- }
180
- if (acc.currentVersion && acc.currentVersion !== version && !version.includes("@virtual:")) {
181
- if (acc.duplicateVersions.length === 0) {
182
- acc.duplicateVersions.push(acc.currentVersion);
183
- }
184
- acc.duplicateVersions.push(version);
185
- acc.duplicateVersions = uniq(acc.duplicateVersions);
186
- }
187
- return acc;
188
- }
189
- resultsFactory = (dependency) => ({ currentVersion: void 0, dependency, duplicateVersions: [] });
190
- };
191
-
192
- // src/lib/dependencies/detectDuplicateDependencies.ts
193
- var detectDuplicateDependencies = (depsFromPackageJSON, DefaultDependencies2) => {
194
- let exitCode = 0;
195
- const dependencies = depsFromPackageJSON?.length ? depsFromPackageJSON : DefaultDependencies2;
196
- return safeExit(() => {
197
- if (dependencies) {
198
- dependencies.forEach((dependency) => {
199
- let output;
200
- try {
201
- const cmd = `yarn why ${dependency} --json`;
202
- output = execSync(cmd).toString();
203
- } catch (e) {
204
- console.error(`Error running yarn why: ${e}`);
205
- exitCode = 1;
206
- return exitCode;
207
- }
208
- if (output) {
209
- exitCode = new DuplicateDetector(output, dependency).detect();
210
- return exitCode;
211
- } else {
212
- console.log(`${dependency} - N/A`);
213
- if (depsFromPackageJSON) {
214
- exitCode = 1;
215
- console.log(`\u{1F6A8} Library ${dependency} was requested in package.json but not found`);
216
- }
217
- return exitCode;
218
- }
219
- });
220
- return exitCode;
221
- } else {
222
- console.log("\u{1F6A8} No dependencies where passed");
223
- return exitCode;
224
- }
225
- });
226
- };
227
-
228
- // src/lib/file/constants.ts
229
- var WINDOWS_NEWLINE_REGEX = /\r\n/g;
230
- var CROSS_PLATFORM_NEWLINE = "\n";
231
-
232
- // src/lib/file/fileLines.ts
233
- import { existsSync, readFileSync as readFileSync2, writeFileSync } from "node:fs";
234
-
235
- // src/lib/string/empty.ts
236
- var empty = (value) => value?.trim().length === 0;
237
- var notEmpty = (value) => !empty(value);
238
-
239
- // src/lib/string/union.ts
240
- var union = (a, b) => /* @__PURE__ */ new Set([...new Set(a), ...new Set(b)]);
241
-
242
- // src/lib/file/ReadFileSyncOptions.ts
243
- var defaultReadFileSyncOptions = { encoding: "utf-8" };
244
-
245
- // src/lib/file/fileLines.ts
246
- var readLines = (uri, options = defaultReadFileSyncOptions) => existsSync(uri) ? readFileSync2(uri, options).replace(WINDOWS_NEWLINE_REGEX, CROSS_PLATFORM_NEWLINE).split(CROSS_PLATFORM_NEWLINE) : [];
247
- var readNonEmptyLines = (uri, options = defaultReadFileSyncOptions) => readLines(uri, options).filter(notEmpty);
248
- var writeLines = (uri, lines, options = defaultReadFileSyncOptions) => {
249
- const existing = existsSync(uri) ? readFileSync2(uri, options) : void 0;
250
- const desired = lines.join(CROSS_PLATFORM_NEWLINE);
251
- if (existing !== desired)
252
- writeFileSync(uri, desired, options);
253
- };
254
-
255
- // src/lib/generateIgnoreFiles.ts
256
- import chalk4 from "chalk";
257
-
258
- // src/lib/yarn/isYarnVersionOrGreater.ts
259
- import { spawnSync } from "child_process";
260
- var isYarnVersionOrGreater = (major, minor, patch) => {
261
- const result = spawnSync("yarn", ["-v"], { encoding: "utf8", shell: true });
262
- const version = result.stdout.toString().replaceAll("\n", "");
263
- const versionNumbers = version.split(".").map((ver) => parseInt(ver));
264
- const majorDelta = versionNumbers[0] - major;
265
- const minorDelta = versionNumbers[1] - (minor ?? versionNumbers[1]);
266
- const patchDelta = versionNumbers[2] - (patch ?? versionNumbers[2]);
267
- const majorOk = majorDelta >= 0;
268
- const minorOk = majorDelta > 0 || minorDelta >= 0;
269
- const patchOk = majorDelta > 0 || minorDelta > 0 || patchDelta >= 0;
270
- return [majorOk && minorOk && patchOk, version];
271
- };
272
-
273
- // src/lib/yarn/workspace/yarnWorkspaces.ts
274
- import { spawnSync as spawnSync2 } from "child_process";
275
- var yarnWorkspaces = () => {
276
- const result = spawnSync2("yarn", ["workspaces", "list", "--json", "--recursive"], { encoding: "utf8", shell: true });
277
- if (result.error) {
278
- throw result.error;
279
- }
280
- const list = result.stdout.toString().split("\n").slice(0, -1).map((item) => {
281
- return JSON.parse(item);
282
- });
283
- return list;
284
- };
285
-
286
- // src/lib/yarn/workspace/yarnWorkspace.ts
287
- var yarnWorkspace = (pkg) => {
288
- const workspace = yarnWorkspaces().find(({ name }) => name === pkg);
289
- if (!workspace)
290
- throw new Error(`Workspace ${pkg} not found`);
291
- return workspace;
292
- };
293
-
294
- // src/lib/yarn/yarnInitCwd.ts
295
- var INIT_CWD = () => {
296
- if (!process.env.INIT_CWD)
297
- console.error("Missing INIT_CWD");
298
- return process.env.INIT_CWD;
299
- };
300
-
301
- // src/lib/generateIgnoreFiles.ts
302
- var mergeEntries = (a, b) => [...union(a, b)].sort();
303
- var generateIgnoreFiles = (filename3, pkg) => {
304
- console.log(chalk4.green(`Generate ${filename3} Files`));
305
- const cwd = INIT_CWD() ?? ".";
306
- const workspaces = pkg ? [yarnWorkspace(pkg)] : yarnWorkspaces();
307
- const readEntries = (location) => readNonEmptyLines(`${location}/${filename3}`);
308
- const writeEntries = (location, entries) => writeLines(`${location}/${filename3}`, entries);
309
- const results = workspaces.map(({ location, name }) => {
310
- try {
311
- writeEntries(location, mergeEntries(readEntries(cwd), readEntries(location)));
312
- return 0;
313
- } catch (ex) {
314
- const error = ex;
315
- console.error(`Generate ${filename3} Files [${name}] [${error.message}]`);
316
- return 1;
317
- }
318
- });
319
- const succeeded = results.every((result) => result === 0);
320
- return succeeded ? 0 : 1;
321
- };
322
-
323
- // src/lib/parsedPackageJSON.ts
324
- import { readFileSync as readFileSync3 } from "fs";
325
- var parsedPackageJSON = (path4) => {
326
- const pathToPackageJSON = path4 ?? process.env.npm_package_json ?? "";
327
- const packageJSON = readFileSync3(pathToPackageJSON).toString();
328
- return JSON.parse(packageJSON);
329
- };
330
-
331
- // src/lib/runSteps.ts
332
- import chalk5 from "chalk";
333
- import { spawnSync as spawnSync3 } from "child_process";
334
- import { existsSync as existsSync2 } from "fs";
335
- var runSteps = (name, steps, exitOnFail = true, messages) => {
336
- return safeExit(() => {
337
- const pkgName = process.env.npm_package_name;
338
- console.log(chalk5.green(`${name} [${pkgName}]`));
339
- let totalStatus = 0;
340
- for (let i = 0; i < steps.length; i++) {
341
- const [command, args, config] = steps[i];
342
- if (messages?.[i]) {
343
- console.log(chalk5.gray(messages?.[i]));
344
- }
345
- const argList = Array.isArray(args) ? args : args.split(" ");
346
- if (command === "node" && !existsSync2(argList[0])) {
347
- throw Error(`File not found [${argList[0]}]`);
348
- }
349
- const status = spawnSync3(command, Array.isArray(args) ? args : args.split(" "), {
350
- ...config,
351
- encoding: "utf8",
352
- env: { FORCE_COLOR: "3", ...process.env },
353
- shell: true,
354
- stdio: "inherit"
355
- }).status ?? 0;
356
- checkResult(name, status, "error", exitOnFail);
357
- totalStatus += status ?? 0;
358
- }
359
- return totalStatus;
360
- }, !!exitOnFail);
361
- };
362
-
363
- // src/lib/runStepsAsync.ts
364
- import chalk6 from "chalk";
365
- import { spawn } from "child_process";
366
- import { existsSync as existsSync3 } from "fs";
367
- var runStepAsync = (name, step, exitOnFail = true, message) => {
368
- return new Promise((resolve) => {
369
- const [command, args, config] = step;
370
- if (message) {
371
- console.log(chalk6.gray(message));
372
- }
373
- const argList = Array.isArray(args) ? args : args.split(" ");
374
- if (command === "node" && !existsSync3(argList[0])) {
375
- throw Error(`File not found [${argList[0]}]`);
376
- }
377
- spawn(command, Array.isArray(args) ? args : args.split(" "), {
378
- ...config,
379
- env: { FORCE_COLOR: "3", ...process.env },
380
- shell: true,
381
- stdio: "inherit"
382
- }).on("close", (code) => {
383
- if (code) {
384
- console.error(
385
- chalk6.red(
386
- `Command Exited With Non-Zero Result [${chalk6.gray(code)}] | ${chalk6.yellow(command)} ${chalk6.white(
387
- Array.isArray(args) ? args.join(" ") : args
388
- )}`
389
- )
390
- );
391
- checkResult(name, code, "error", exitOnFail);
392
- resolve(code);
393
- } else {
394
- resolve(0);
395
- }
396
- });
397
- });
398
- };
399
- var runStepsAsync = async (name, steps, exitOnFail = true, messages) => {
400
- return await safeExitAsync(async () => {
401
- const pkgName = process.env.npm_package_name;
402
- console.log(chalk6.green(`${name} [${pkgName}]`));
403
- let result = 0;
404
- for (let i = 0; i < steps.length; i++) {
405
- result += await runStepAsync(name, steps[i], exitOnFail, messages?.[i]);
406
- }
407
- return result;
408
- });
409
- };
410
-
411
- // src/lib/xy/xy.ts
412
- import chalk25 from "chalk";
413
-
414
- // src/actions/build.ts
415
- import chalk7 from "chalk";
416
- var build = async ({ incremental, jobs, target, verbose, pkg }) => {
417
- const start = Date.now();
418
- const pkgOptions = pkg ? [pkg] : [];
419
- const incrementalOptions = incremental ? ["-i"] : [];
420
- const verboseOptions = verbose ? ["-v"] : [];
421
- const targetOptions = target ? ["-t", target] : [];
422
- const jobsOptions = jobs ? ["-j", `${jobs}`] : [];
423
- if (jobs) {
424
- console.log(chalk7.blue(`Jobs set to [${jobs}]`));
425
- }
426
- const result = await runStepsAsync(`Build${incremental ? "-Incremental" : ""} [${pkg ?? "All"}]`, [
427
- ["yarn", ["xy", "compile", ...pkgOptions, ...targetOptions, ...verboseOptions, ...jobsOptions, ...incrementalOptions]],
428
- ["yarn", ["xy", "lint", ...pkgOptions, ...verboseOptions, ...incrementalOptions]],
429
- ["yarn", ["xy", "deps", ...pkgOptions, ...verboseOptions, ...jobsOptions, ...incrementalOptions]]
430
- ]);
431
- console.log(`${chalk7.gray("Built in")} [${chalk7.magenta(((Date.now() - start) / 1e3).toFixed(2))}] ${chalk7.gray("seconds")}`);
432
- return result;
433
- };
434
-
435
- // src/actions/clean-docs.ts
436
- import chalk8 from "chalk";
437
- import path from "path";
438
- import { rimrafSync } from "rimraf";
439
- var cleanDocs = () => {
440
- const pkgName = process.env.npm_package_name;
441
- console.log(chalk8.green(`Cleaning Docs [${pkgName}]`));
442
- yarnWorkspaces().map(({ location }) => rimrafSync(path.join(location, "docs"), { glob: true }));
443
- return 0;
444
- };
445
-
446
- // src/actions/clean-eslint.ts
447
- import chalk9 from "chalk";
448
- import path2 from "path";
449
- import { rimrafSync as rimrafSync2 } from "rimraf";
450
- var cleanESLint = () => {
451
- const pkg = process.env.INIT_CWD ?? ".";
452
- const pkgName = process.env.npm_package_name;
453
- console.log(chalk9.green(`Cleaning ESLint [${pkgName}]`));
454
- rimrafSync2(path2.join(pkg, ".eslintcache"), { glob: true });
455
- return 0;
456
- };
457
-
458
- // src/actions/clean-jest.ts
459
- var cleanJest = () => {
460
- const pkgName = process.env.npm_package_name;
461
- return runSteps(`Cleaning Jest [${pkgName}]`, [["jest", ["--clearCache"]]]);
462
- };
463
-
464
- // src/actions/clean.ts
465
- var clean = async ({ verbose, pkg }) => {
466
- return pkg ? await cleanPackage({ pkg, verbose }) : cleanAll({ verbose });
467
- };
468
- var cleanPackage = ({ verbose, pkg }) => {
469
- const verboseOptions = verbose ? ["-v"] : [];
470
- return runStepsAsync(`Clean [${pkg}]`, [["yarn", ["workspace", pkg, "run", "package-clean", ...verboseOptions]]]);
471
- };
472
- var cleanAll = ({ verbose }) => {
473
- const verboseOptions = verbose ? ["-v"] : [];
474
- return cleanJest() + cleanESLint() + cleanDocs() + runSteps("Clean", [["yarn", ["workspaces foreach -pA run package-clean", ...verboseOptions]]]);
475
- };
476
-
477
- // src/actions/compile.ts
478
- import chalk10 from "chalk";
479
- var compile = ({ verbose, target, pkg, incremental }) => {
480
- return pkg ? compilePackage({ pkg, target, verbose }) : compileAll({ incremental, target, verbose });
481
- };
482
- var compilePackage = ({ verbose, target, pkg }) => {
483
- const verboseOptions = verbose ? ["-v"] : [];
484
- const targetOptions = target ? ["-t", target] : [];
485
- return runSteps(`Compile [${pkg}]`, [["yarn", ["workspace", pkg, "run", "package-compile", ...verboseOptions, ...targetOptions]]]);
486
- };
487
- var compileAll = ({ jobs, verbose, target, incremental }) => {
488
- const start = Date.now();
489
- const verboseOptions = verbose ? ["-v"] : [];
490
- const targetOptions = target ? ["-t", target] : [];
491
- const incrementalOptions = incremental ? ["--since", "-ptA"] : ["-ptA"];
492
- const jobsOptions = jobs ? ["-j", `${jobs}`] : [];
493
- if (jobs) {
494
- console.log(chalk10.blue(`Jobs set to [${jobs}]`));
495
- }
496
- const result = runSteps(`Compile${incremental ? "-Incremental" : ""} [All]`, [
497
- ["yarn", ["workspaces", "foreach", ...incrementalOptions, ...jobsOptions, "run", "package-compile", ...verboseOptions, ...targetOptions]]
498
- ]);
499
- console.log(`${chalk10.gray("Compiled in")} [${chalk10.magenta(((Date.now() - start) / 1e3).toFixed(2))}] ${chalk10.gray("seconds")}`);
500
- return result;
501
- };
502
-
503
- // src/actions/copy-assets.ts
504
- import chalk11 from "chalk";
505
- import cpy from "cpy";
506
- import path3 from "path/posix";
507
- var copyPackageTargetAssets = async (target, name, location) => {
508
- try {
509
- const values = await cpy(
510
- ["**/*.jpg", "**/*.png", "**/*.gif", "**/*.svg", "**/*.webp", "**/*.sass", "**/*.scss", "**/*.gif", "**/*.css"],
511
- `../dist/${target}`,
512
- {
513
- cwd: path3.join(process.cwd(), location, "src"),
514
- parents: true
515
- }
516
- );
517
- values.forEach((value) => {
518
- console.log(`${value.split("/").pop()} => ./dist/${target}`);
519
- });
520
- return 0;
521
- } catch (reason) {
522
- console.log(`Copy Failed: ${name}: ${reason}`);
523
- return 1;
524
- }
525
- };
526
- var copyTargetAssets = async (target, pkg) => {
527
- const workspaces = yarnWorkspaces();
528
- console.log(chalk11.green(`Copying Assets [${target.toUpperCase()}]`));
529
- const workspaceList = workspaces.filter(({ name }) => {
530
- return pkg === void 0 || name === pkg;
531
- });
532
- if (workspaceList.length === 0) {
533
- console.error(`Package not found [${pkg}]`);
534
- } else {
535
- const results = await Promise.all(
536
- workspaceList.map(async (workspace) => {
537
- const { location, name } = workspace;
538
- return await copyPackageTargetAssets(target, name, location);
539
- })
540
- );
541
- return results.reduce((prev, result) => prev || result, 0);
542
- }
543
- return 0;
544
- };
545
- var copyAssets = async ({ target, pkg }) => {
546
- switch (target) {
547
- case "esm":
548
- return await copyTargetAssets("esm", pkg);
549
- case "cjs":
550
- return await copyTargetAssets("cjs", pkg);
551
- default:
552
- return await copyTargetAssets("esm", pkg) || await copyTargetAssets("cjs", pkg);
553
- }
554
- };
555
-
556
- // src/actions/cycle.ts
557
- var cycle = () => {
558
- const rules = [`"'import/no-cycle': [1, { maxDepth: 6 }]"`, `"'import/no-internal-modules': ['off']"`];
559
- return runSteps("Cycle", [["yarn", ["eslint", ...rules.map((rule) => ["--rule", rule]).flat(), "--cache", "."]]]);
560
- };
561
-
562
- // src/actions/dead.ts
563
- var dead = () => {
564
- return runSteps("Dead", [["yarn", ["ts-prune", "-p", "tsconfig.json"]]]);
565
- };
566
-
567
- // src/actions/deploy.ts
568
- var deploy = () => {
569
- return runSteps("Deploy [Patch]", [
570
- ["yarn", "workspaces foreach --all version patch --deferred"],
571
- ["yarn", "xy clean"],
572
- ["yarn", "xy build"],
573
- ["yarn", "xy cycle"],
574
- ["yarn", "xy gen-docs"],
575
- ["yarn", "version apply --all"],
576
- ["yarn", "workspaces foreach -pt npm publish"]
577
- ]);
578
- };
579
-
580
- // src/actions/deploy-major.ts
581
- var deployMajor = () => {
582
- return runSteps("Deploy [Major]", [
583
- ["yarn", "workspaces foreach --all version major --deferred"],
584
- ["yarn", "xy clean"],
585
- ["yarn", "xy build"],
586
- ["yarn", "xy cycle"],
587
- ["yarn", "version apply --all"],
588
- ["yarn", "workspaces foreach -pt npm publish"]
589
- ]);
590
- };
591
-
592
- // src/actions/deploy-minor.ts
593
- var deployMinor = () => {
594
- return runSteps("Deploy [Minor]", [
595
- ["yarn", "workspaces foreach --all version minor --deferred"],
596
- ["yarn", "xy clean"],
597
- ["yarn", "xy build"],
598
- ["yarn", "xy cycle"],
599
- ["yarn", "version apply --all"],
600
- ["yarn", "workspaces foreach -pt npm publish"]
601
- ]);
602
- };
603
-
604
- // src/actions/deploy-next.ts
605
- var deployNext = () => {
606
- return runSteps("Deploy [Next]", [
607
- ["yarn", "workspaces foreach --all version minor --deferred"],
608
- ["yarn", "xy clean"],
609
- ["yarn", "xy build"],
610
- ["yarn", "xy cycle"],
611
- ["yarn", "version apply --all --prerelease"],
612
- ["yarn", "workspaces foreach -pt npm publish --tag next"]
613
- ]);
614
- };
615
-
616
- // src/actions/deps.ts
617
- import chalk12 from "chalk";
618
- var deps = ({ pkg, incremental }) => {
619
- pkg ? depsPackage({ pkg }) : depsAll({ incremental });
620
- return 0;
621
- };
622
- var depsPackage = ({ pkg }) => {
623
- const steps = [["yarn", ["workspace", pkg, "run", "package-deps"]]];
624
- return runSteps(`Deps [${pkg}]`, [...steps]);
625
- };
626
- var depsAll = ({ incremental, jobs }) => {
627
- const start = Date.now();
628
- const jobsOptions = jobs ? ["-j", `${jobs}`] : [];
629
- if (jobs) {
630
- console.log(chalk12.blue(`Jobs set to [${jobs}]`));
631
- }
632
- const incrementalOptions = incremental ? ["--since", "-pA"] : ["-pA"];
633
- const steps = [["yarn", ["workspaces", "foreach", ...jobsOptions, ...incrementalOptions, "run", "package-deps"]]];
634
- const result = runSteps(`Deps${incremental ? "-Incremental" : ""} [All]`, [...steps]);
635
- console.log(`${chalk12.gray("Dep checked in")} [${chalk12.magenta(((Date.now() - start) / 1e3).toFixed(2))}] ${chalk12.gray("seconds")}`);
636
- return result;
637
- };
638
-
639
- // src/actions/dupdeps.ts
640
- import chalk13 from "chalk";
641
- var dupdeps = () => {
642
- console.log(chalk13.green("Checking all Dependencies for Duplicates"));
643
- const allDependencies = parsedPackageJSON()?.dependencies;
644
- const dependencies = Object.entries(allDependencies).map(([k]) => k);
645
- return detectDuplicateDependencies(dependencies);
646
- };
647
-
648
- // src/actions/fix.ts
649
- var fix = () => {
650
- return runSteps("Fix", [["yarn", ["eslint", ".", "--fix", "--cache"]]]);
651
- };
652
-
653
- // src/actions/gen-docs.ts
654
- var genDocs = ({ pkg, incremental }) => {
655
- return pkg ? genDocsPackage({ pkg }) : genDocsAll({ incremental });
656
- };
657
- var genDocsPackage = ({ pkg }) => {
658
- const steps = [["yarn", ["workspace", pkg, "run", "package-gen-docs"]]];
659
- return runSteps(`GenDocs [${pkg}]`, [...steps]);
660
- };
661
- var genDocsAll = ({ incremental }) => {
662
- const incrementalOptions = incremental ? ["--since", "-pA"] : ["-pA"];
663
- const steps = [["yarn", ["workspaces", "foreach", ...incrementalOptions, "run", "package-gen-docs"]]];
664
- return runSteps(`GenDocs [All${incremental ? "-Incremental" : ""}]`, [...steps]);
665
- };
666
-
667
- // src/actions/gitignore-gen.ts
668
- var filename = ".gitignore";
669
- var gitignoreGen = (pkg) => generateIgnoreFiles(filename, pkg);
670
-
671
- // src/actions/gitlint.ts
672
- import chalk14 from "chalk";
673
- import { sync } from "parse-git-config";
674
- var gitlint = () => {
675
- console.log(`
676
- Gitlint Start [${process.cwd()}]
677
- `);
678
- let valid = 0;
679
- let warnings = 0;
680
- const errors = 0;
681
- const gitConfig = sync();
682
- const warn = (message) => {
683
- console.warn(chalk14.yellow(`Warning: ${message}`));
684
- warnings++;
685
- };
686
- if (gitConfig.core.ignorecase) {
687
- warn("Please set core.ignorecase to FALSE in .git/config file [run yarn gitlint-fix]");
688
- } else {
689
- valid++;
690
- }
691
- if (gitConfig.core.autocrlf !== false) {
692
- warn("Please set core.autocrlf to FALSE in .git/config file [run yarn gitlint-fix]");
693
- } else {
694
- valid++;
695
- }
696
- if (gitConfig.core.eol !== "lf") {
697
- warn('Please set core.eol to "lf" in .git/config file [run yarn gitlint-fix]');
698
- } else {
699
- valid++;
700
- }
701
- const resultMessages = [];
702
- if (valid > 0) {
703
- resultMessages.push(chalk14.green(`Passed: ${valid}`));
704
- }
705
- if (warnings > 0) {
706
- resultMessages.push(chalk14.yellow(`Warnings: ${warnings}`));
707
- }
708
- if (errors > 0) {
709
- resultMessages.push(chalk14.red(` Errors: ${errors}`));
710
- }
711
- console.warn(`Gitlint Finish [ ${resultMessages.join(" | ")} ]
712
- `);
713
- return warnings + errors === 0 ? 1 : 0;
714
- };
715
-
716
- // src/actions/gitlint-fix.ts
717
- import chalk15 from "chalk";
718
- import { execSync as execSync2 } from "child_process";
719
- import { sync as sync2 } from "parse-git-config";
720
- var gitlintFix = () => {
721
- console.log(`
722
- Gitlint Fix Start [${process.cwd()}]
723
- `);
724
- const gitConfig = sync2();
725
- if (gitConfig.core.ignorecase) {
726
- execSync2("git config core.ignorecase false", { stdio: "inherit" });
727
- console.warn(chalk15.yellow("\nGitlint Fix: Updated core.ignorecase to be false\n"));
728
- }
729
- if (gitConfig.core.autocrlf !== false) {
730
- execSync2("git config core.autocrlf false", { stdio: "inherit" });
731
- console.warn(chalk15.yellow("\nGitlint Fix: Updated core.autocrlf to be false\n"));
732
- }
733
- if (gitConfig.core.eol !== "lf") {
734
- execSync2("git config core.eol lf", { stdio: "inherit" });
735
- console.warn(chalk15.yellow('\nGitlint Fix: Updated core.eol to be "lf"\n'));
736
- }
737
- return 1;
738
- };
739
-
740
- // src/actions/license.ts
741
- import chalk16 from "chalk";
742
- import { init } from "license-checker";
743
- var license = async (pkg) => {
744
- const workspaces = yarnWorkspaces();
745
- const workspaceList = workspaces.filter(({ name }) => {
746
- return pkg === void 0 || name === pkg;
747
- });
748
- const exclude = [
749
- "MIT",
750
- "MIT*",
751
- "ISC",
752
- "Apache-2.0",
753
- "BSD",
754
- "BSD*",
755
- "BSD-2-Clause",
756
- "BSD-3-Clause",
757
- "CC-BY-4.0",
758
- "Unlicense",
759
- "CC-BY-3.0",
760
- "CC0-1.0",
761
- "LGPL-3.0-only",
762
- "LGPL-3.0",
763
- "LGPL-3.0-or-later",
764
- "Python-2.0"
765
- ];
766
- console.log(chalk16.green("License Checker"));
767
- return (await Promise.all(
768
- workspaceList.map(({ location, name }) => {
769
- return new Promise((resolve) => {
770
- init({ production: true, start: location }, (error, packages) => {
771
- if (error) {
772
- console.error(chalk16.red(`License Checker [${name}] Error`));
773
- console.error(chalk16.gray(error));
774
- console.log("\n");
775
- resolve(1);
776
- } else {
777
- console.log(chalk16.green(`License Checker [${name}]`));
778
- let count = 0;
779
- Object.entries(packages).forEach(([name2, info]) => {
780
- const licenses = Array.isArray(info.licenses) ? info.licenses : [info.licenses];
781
- licenses.forEach((license2) => {
782
- if (license2) {
783
- if (license2[0] === "(" && license2[license2.length - 1] === ")") {
784
- license2 = license2.substring(1, license2.length - 2);
785
- }
786
- const orLicenses = license2.split(" OR ");
787
- let orLicenseFound = false;
788
- orLicenses.forEach((orLicense) => {
789
- if (exclude.includes(orLicense)) {
790
- orLicenseFound = true;
791
- }
792
- });
793
- if (!orLicenseFound) {
794
- count++;
795
- console.warn(chalk16.yellow(`${name2}: Package License not allowed [${license2}]`));
796
- }
797
- }
798
- });
799
- });
800
- console.log("\n");
801
- resolve(count);
802
- }
803
- });
804
- });
805
- })
806
- )).reduce((prev, value) => prev || value, 0);
807
- };
808
-
809
- // src/actions/lint.ts
810
- import chalk17 from "chalk";
811
- import { ESLint } from "eslint";
812
- var lintPackage = async ({ pkg }) => {
813
- const workspace = yarnWorkspaces().find((workspace2) => workspace2.name === pkg);
814
- if (!workspace) {
815
- console.error(chalk17.red(`Unable to locate package [${chalk17.magenta(pkg)}]`));
816
- process.exit(1);
817
- }
818
- const engine = new ESLint({ cache: true });
819
- const lintResults = await engine.lintFiles(workspace.location);
820
- console.log(lintResults);
821
- const errorCount = lintResults.reduce((prev, lintResult) => prev + lintResult.errorCount, 0);
822
- return errorCount;
823
- };
824
- var lint = async ({ pkg } = {}) => {
825
- return pkg ? await lintPackage({ pkg }) : runSteps("Lint-Caching [All]", [["yarn", ["eslint", ".", "--cache"]]]);
826
- };
827
-
828
- // src/actions/lint-profile.ts
829
- var lintProfile = () => {
830
- return runSteps("Lint Profile", [["yarn", ["xy", "lint"], { env: { ...process.env, TIMING: "1" } }]]);
831
- };
832
-
833
- // src/actions/npmignore-gen.ts
834
- var filename2 = ".npmignore";
835
- var npmignoreGen = (pkg) => generateIgnoreFiles(filename2, pkg);
836
-
837
- // src/actions/publint.ts
838
- var publint = async ({ verbose, pkg }) => {
839
- return pkg ? await publintPackage({ pkg, verbose }) : publintAll({ verbose });
840
- };
841
- var publintPackage = ({ verbose, pkg }) => {
842
- const verboseOptions = verbose ? ["-v"] : [];
843
- return runStepsAsync(`Publint [${pkg}]`, [["yarn", ["workspace", pkg, "run", "package-publint", ...verboseOptions]]]);
844
- };
845
- var publintAll = ({ verbose }) => {
846
- const verboseOptions = verbose ? ["-v"] : [];
847
- return runSteps("Publint", [["yarn", ["workspaces foreach -pA run package-publint", ...verboseOptions]]]);
848
- };
849
-
850
- // src/actions/rebuild.ts
851
- var rebuild = ({ target }) => {
852
- return runSteps("Rebuild", [
853
- ["yarn", "xy clean"],
854
- ["yarn", target ? `xy build -t ${target}` : "xy build"]
855
- ]);
856
- };
857
-
858
- // src/actions/recompile.ts
859
- import chalk18 from "chalk";
860
- var recompile = async ({ verbose, target, pkg, incremental }) => {
861
- return pkg ? await recompilePackage({ pkg, target, verbose }) : await recompileAll({ incremental, target, verbose });
862
- };
863
- var recompilePackage = ({ verbose, target, pkg }) => {
864
- const verboseOptions = verbose ? ["-v"] : [];
865
- const targetOptions = target ? ["-t", target] : [];
866
- return runStepsAsync(`Recompile [${pkg}]`, [["yarn", ["workspace", pkg, "run", "package-recompile", ...verboseOptions, ...targetOptions]]]);
867
- };
868
- var recompileAll = async ({ jobs, verbose, target, incremental }) => {
869
- const start = Date.now();
870
- const verboseOptions = verbose ? ["-v"] : [];
871
- const targetOptions = target ? ["-t", target] : [];
872
- const incrementalOptions = incremental ? ["--since", "-ptA"] : ["-ptA"];
873
- const jobsOptions = jobs ? ["-j", `${jobs}`] : [];
874
- if (jobs) {
875
- console.log(chalk18.blue(`Jobs set to [${jobs}]`));
876
- }
877
- const result = await runStepsAsync(`Recompile${incremental ? "-Incremental" : ""} [All]`, [
878
- ["yarn", ["workspaces", "foreach", ...incrementalOptions, ...jobsOptions, "run", "package-recompile", ...verboseOptions, ...targetOptions]]
879
- ]);
880
- console.log(`${chalk18.gray("Recompiled in")} [${chalk18.magenta(((Date.now() - start) / 1e3).toFixed(2))}] ${chalk18.gray("seconds")}`);
881
- return result;
882
- };
883
-
884
- // src/actions/reinstall.ts
885
- import { closeSync, openSync, rmSync } from "fs";
886
- var reinstall = () => {
887
- console.log("Reinstall [Clear Lock File]");
888
- closeSync(openSync("./yarn.lock", "w"));
889
- console.log("Reinstall [Clear Node Modules]");
890
- const workspaces = yarnWorkspaces();
891
- const result = workspaces.map(({ location, name }) => {
892
- const dist = `${location}/node_modules`;
893
- try {
894
- rmSync(dist, { force: true, recursive: true });
895
- return 0;
896
- } catch (ex) {
897
- const error = ex;
898
- console.error(`Reinstall [Clear Node Modules] Failed [${name}, ${error.message}]`);
899
- return 1;
900
- }
901
- }).reduce((prev, result2) => prev || result2, 0);
902
- return result || runSteps("Reinstall", [["yarn", "install --network-timeout 10000"]]);
903
- };
904
-
905
- // src/actions/relint.ts
906
- import { rmSync as rmSync2 } from "fs";
907
- var relint = () => {
908
- console.log("Relint - Cleaning [.eslintcache]");
909
- const workspaces = yarnWorkspaces();
910
- const result = workspaces.map(({ location, name }) => {
911
- const dist = `${location}/.eslintcache`;
912
- try {
913
- rmSync2(dist, { force: true, recursive: true });
914
- return 0;
915
- } catch (ex) {
916
- const error = ex;
917
- console.error(`Relint - Cleaning [.eslintcache] Failed [${name}, ${error.message}]`);
918
- return 1;
919
- }
920
- }).reduce((prev, result2) => prev || result2, 0);
921
- return result || runSteps("Relint", [["yarn", ["eslint", ".", "--cache"]]]);
922
- };
923
-
924
- // src/actions/retest.ts
925
- var retest = () => {
926
- return runSteps("Test", [
927
- ["yarn", ["jest", "--clearCache"]],
928
- ["yarn", ["jest", "."]]
929
- ]);
930
- };
931
-
932
- // src/actions/sonar.ts
933
- var sonar = () => {
934
- return runSteps("Sonar", [["yarn", ["eslint", "-c", "sonar.eslintrc", "."]]]);
935
- };
936
-
937
- // src/actions/statics.ts
938
- import chalk19 from "chalk";
939
- var DefaultDependencies = ["axios", "@xylabs/pixel", "react", "graphql", "react-router", "@mui/material", "@mui/styles", "@mui/system"];
940
- var statics = () => {
941
- console.log(chalk19.green("Check Required Static Dependencies"));
942
- const statics2 = parsedPackageJSON()?.xy?.deps?.statics;
943
- return detectDuplicateDependencies(statics2, DefaultDependencies);
944
- };
945
-
946
- // src/actions/test.ts
947
- var test = () => {
948
- return runSteps("Test", [["yarn", ["jest", "."]]]);
949
- };
950
-
951
- // src/actions/tsconfig-gen-cjs.ts
952
- import chalk20 from "chalk";
953
- import { readFileSync as readFileSync4, writeFileSync as writeFileSync2 } from "fs";
954
- var tsconfigGenCjs = (pkg) => {
955
- const workspaces = pkg ? [yarnWorkspace(pkg)] : yarnWorkspaces();
956
- console.log(chalk20.green("Generate Configs [CJS]"));
957
- return workspaces.map(({ location, name }) => {
958
- try {
959
- const configObject = createBuildConfig(location, "CommonJS", "ES6", "cjs");
960
- if (configObject) {
961
- const config = JSON.stringify(createBuildConfig(location, "CommonJS", "ES6", "cjs"), null, 2);
962
- let currentConfig;
963
- try {
964
- currentConfig = readFileSync4(`${location}/.tsconfig.build.cjs.json`, { encoding: "utf8" });
965
- } catch (ex) {
966
- currentConfig = void 0;
967
- }
968
- if (currentConfig !== config) {
969
- console.log(chalk20.gray(`Updating CJS tsconfig [${name}]`));
970
- writeFileSync2(`${location}/.tsconfig.build.cjs.json`, config, { encoding: "utf8" });
971
- }
972
- }
973
- return 0;
974
- } catch (ex) {
975
- const error = ex;
976
- console.error(`tsconfig (CJS) generate failed [${name}] [${error.message}]`);
977
- return 1;
978
- }
979
- }).reduce((prev, value) => prev || value, 0);
980
- };
981
-
982
- // src/actions/tsconfig-gen-esm.ts
983
- import chalk21 from "chalk";
984
- import { readFileSync as readFileSync5, writeFileSync as writeFileSync3 } from "fs";
985
- var tsconfigGenEsm = (pkg) => {
986
- const workspaces = pkg ? [yarnWorkspace(pkg)] : yarnWorkspaces();
987
- console.log(chalk21.green("Generate Configs [ESM]"));
988
- return workspaces.map(({ location, name }) => {
989
- try {
990
- const configObject = createBuildConfig(location, "ESNext", "ESNext", "esm");
991
- if (configObject) {
992
- const config = JSON.stringify(configObject, null, 2);
993
- let currentConfig;
994
- try {
995
- currentConfig = readFileSync5(`${location}/.tsconfig.build.esm.json`, { encoding: "utf8" });
996
- } catch (ex) {
997
- currentConfig = void 0;
998
- }
999
- if (currentConfig !== config) {
1000
- console.log(chalk21.gray(`Updating ESM tsconfig [${name}]`));
1001
- writeFileSync3(`${location}/.tsconfig.build.esm.json`, config, { encoding: "utf8" });
1002
- }
1003
- }
1004
- return 0;
1005
- } catch (ex) {
1006
- const error = ex;
1007
- console.error(`tsconfig (ESM) generate failed [${name}] [${error.message}]`);
1008
- return 1;
1009
- }
1010
- }).reduce((prev, value) => prev || value, 0);
1011
- };
1012
-
1013
- // src/actions/tsconfig-gen-test.ts
1014
- import chalk22 from "chalk";
1015
- import { readFileSync as readFileSync6, writeFileSync as writeFileSync4 } from "fs";
1016
- var tsconfigName = ".tsconfig.build.test.json";
1017
- var tsconfig = JSON.stringify(
1018
- {
1019
- extends: "./tsconfig.json",
1020
- include: ["src/**/*.spec.ts"]
1021
- },
1022
- null,
1023
- 2
1024
- );
1025
- var tsconfigGenTest = (pkg) => {
1026
- const workspaces = pkg ? [yarnWorkspace(pkg)] : yarnWorkspaces();
1027
- console.log(chalk22.green("Generate Configs [Test]"));
1028
- return workspaces.map(({ location, name }) => {
1029
- try {
1030
- let currentConfig;
1031
- try {
1032
- currentConfig = readFileSync6(`${location}/${tsconfigName}`, { encoding: "utf8" });
1033
- } catch (ex) {
1034
- currentConfig = void 0;
1035
- }
1036
- if (currentConfig !== tsconfig) {
1037
- console.log(chalk22.gray(`Updating TEST tsconfig [${name}]`));
1038
- writeFileSync4(`${location}/${tsconfigName}`, tsconfig, { encoding: "utf8" });
1039
- }
1040
- return 0;
1041
- } catch (ex) {
1042
- const error = ex;
1043
- console.error(`tsconfig (TEST) generate failed [${name}] [${error.message}]`);
1044
- return 1;
1045
- }
1046
- }).reduce((prev, value) => prev || value, 0);
1047
- };
1048
-
1049
- // src/actions/tsconfig-gen.ts
1050
- var tsconfigGen = ({ target, pkg }) => {
1051
- switch (target) {
1052
- case "esm":
1053
- return tsconfigGenEsm(pkg) || tsconfigGenTest(pkg);
1054
- case "cjs":
1055
- return tsconfigGenCjs(pkg) || tsconfigGenTest(pkg);
1056
- default:
1057
- return tsconfigGenEsm(pkg) || tsconfigGenCjs(pkg) || tsconfigGenTest(pkg);
1058
- }
1059
- };
1060
-
1061
- // src/actions/tsconfig-gen-clean.ts
1062
- import chalk23 from "chalk";
1063
- import { rmSync as rmSync3 } from "fs";
1064
- var tsconfigGenClean = (pkg) => {
1065
- const workspaces = pkg ? [yarnWorkspace(pkg)] : yarnWorkspaces();
1066
- console.log(chalk23.green("Clean TSConfigs"));
1067
- return workspaces.map(({ location, name }) => {
1068
- const dist = `${location}/**/.tsconfig*`;
1069
- try {
1070
- rmSync3(dist, { force: true, recursive: true });
1071
- return 0;
1072
- } catch (ex) {
1073
- const error = ex;
1074
- console.error(`Clean Failed [${name}, ${error.message}]`);
1075
- return 1;
1076
- }
1077
- }).reduce((prev, result) => prev || result, 0);
1078
- };
1079
-
1080
- // src/actions/up.ts
1081
- var up = () => {
1082
- return runSteps("Up", [["yarn", "outdated"]]);
1083
- };
1084
-
1085
- // src/actions/updo.ts
1086
- var updo = () => {
1087
- return runSteps("Updo", [
1088
- ["yarn", "install"],
1089
- ["yarn", "upgrade-interactive"],
1090
- ["yarn", "dedupe"]
1091
- ]);
1092
- };
1093
-
1094
- // src/actions/upplug.ts
1095
- var updateYarnPlugins = () => {
1096
- return runSteps("Update Yarn Plugins", [
1097
- ["yarn", ["plugin", "import", "https://mskelton.dev/yarn-outdated/v3"]],
1098
- ["yarn", ["plugin", "import", "version"]],
1099
- ["yarn", ["plugin", "import", "interactive-tools"]],
1100
- ["yarn", ["plugin", "import", "workspace-tools"]]
1101
- ]);
1102
- };
1103
-
1104
- // src/actions/upyarn.ts
1105
- var updateYarnVersion = () => {
1106
- return runSteps("Update Yarn Version", [["yarn", ["set", "version", "latest"]]]);
1107
- };
1108
-
1109
- // src/actions/yarn3only.ts
1110
- var yarn3Only = () => {
1111
- const [valid, version] = isYarnVersionOrGreater(3);
1112
- if (!valid) {
1113
- processEx(`Invalid Yarn version [${version}]`);
1114
- }
1115
- return 0;
1116
- };
1117
-
1118
- // src/lib/xy/xyBuildCommands.ts
1119
- var xyBuildCommands = (args) => {
1120
- return args.command(
1121
- "build [package]",
1122
- "Build - Compile & Lint",
1123
- (yargs2) => {
1124
- return yargs2.positional("package", {
1125
- describe: "Specific package to build"
1126
- });
1127
- },
1128
- async (argv) => {
1129
- if (argv.verbose) {
1130
- console.log(`Building: ${argv.package ?? "all"}`);
1131
- }
1132
- process.exitCode = await build({
1133
- incremental: !!argv.incremental,
1134
- jobs: argv.jobs,
1135
- pkg: argv.package,
1136
- target: argv.target,
1137
- verbose: !!argv.verbose
1138
- });
1139
- }
1140
- ).command(
1141
- "compile [package]",
1142
- "Compile with Typescript & Copy Images",
1143
- (yargs2) => {
1144
- return yargs2.positional("package", {
1145
- describe: "Specific package to compile"
1146
- });
1147
- },
1148
- async (argv) => {
1149
- if (argv.verbose) {
1150
- console.log(`Compiling: ${argv.package ?? "all"}`);
1151
- }
1152
- process.exitCode = await compile({
1153
- incremental: !!argv.incremental,
1154
- jobs: argv.jobs,
1155
- pkg: argv.package,
1156
- target: argv.target,
1157
- verbose: !!argv.verbose
1158
- });
1159
- }
1160
- ).command(
1161
- "recompile [package]",
1162
- "Re-compile with Typescript & Copy Images",
1163
- (yargs2) => {
1164
- return yargs2.positional("package", {
1165
- describe: "Specific package to re-compile"
1166
- });
1167
- },
1168
- async (argv) => {
1169
- if (argv.verbose) {
1170
- console.log(`Re-compiling: ${argv.package ?? "all"}`);
1171
- }
1172
- process.exitCode = await recompile({
1173
- incremental: !!argv.incremental,
1174
- jobs: argv.jobs,
1175
- pkg: argv.package,
1176
- target: argv.target,
1177
- verbose: !!argv.verbose
1178
- });
1179
- }
1180
- ).command(
1181
- "rebuild [package]",
1182
- "Rebuild - Clean, Compile & Lint",
1183
- (yargs2) => {
1184
- return yargs2.positional("package", {
1185
- describe: "Specific package to rebuild"
1186
- });
1187
- },
1188
- (argv) => {
1189
- if (argv.verbose)
1190
- console.log(`Rebuilding: ${argv.package ?? "all"}`);
1191
- process.exitCode = rebuild({ target: argv.target });
1192
- }
1193
- ).command(
1194
- "copy-assets [package]",
1195
- "Copy Assets - Copy the assets from src to dist",
1196
- (yargs2) => {
1197
- return yargs2.positional("package", {
1198
- describe: "Specific package to copy assets"
1199
- });
1200
- },
1201
- async (argv) => {
1202
- if (argv.verbose)
1203
- console.log(`Copying Assets: ${argv.package ?? "all"}`);
1204
- process.exitCode = await copyAssets({ target: argv.target });
1205
- }
1206
- );
1207
- };
1208
-
1209
- // src/lib/xy/xyCommonCommands.ts
1210
- var xyCommonCommands = (args) => {
1211
- return args.command(
1212
- "license [package]",
1213
- "License - Check licenses of dependencies",
1214
- (yargs2) => {
1215
- return yargs2.positional("package", {
1216
- describe: "Specific package to check"
1217
- });
1218
- },
1219
- async (argv) => {
1220
- if (argv.verbose)
1221
- console.log(`License: ${argv.package ?? "all"}`);
1222
- process.exitCode = await license();
1223
- }
1224
- ).command(
1225
- "dead [package]",
1226
- "Dead - Check for dead code",
1227
- (yargs2) => {
1228
- return yargs2.positional("package", {
1229
- describe: "Specific package to check"
1230
- });
1231
- },
1232
- (argv) => {
1233
- if (argv.verbose)
1234
- console.log("Dead");
1235
- process.exitCode = dead();
1236
- }
1237
- ).command(
1238
- "deps [package]",
1239
- "Deps - Check for unused or missing dependencies",
1240
- (yargs2) => {
1241
- return yargs2.positional("package", {
1242
- describe: "Specific package to check"
1243
- });
1244
- },
1245
- (argv) => {
1246
- if (argv.verbose)
1247
- console.log(`Checking Dependencies: ${argv.package ?? "all"}`);
1248
- process.exitCode = deps({ incremental: !!argv.incremental, jobs: argv.jobs, pkg: argv.package });
1249
- }
1250
- ).command(
1251
- "gen-docs [package]",
1252
- "GenDocs - Generate TypeDocs",
1253
- (yargs2) => {
1254
- return yargs2.positional("package", {
1255
- describe: "Specific package to generate docs for"
1256
- });
1257
- },
1258
- (argv) => {
1259
- if (argv.verbose)
1260
- console.log(`Generating TypeDocs: ${argv.package ?? "all"}`);
1261
- process.exitCode = genDocs({ incremental: !!argv.incremental, pkg: argv.package });
1262
- }
1263
- ).command(
1264
- "clean-docs",
1265
- "CleanDocs - Clean TypeDocs",
1266
- (yargs2) => yargs2,
1267
- (argv) => {
1268
- if (argv.verbose)
1269
- console.log("Cleaning TypeDocs: all");
1270
- process.exitCode = cleanDocs();
1271
- }
1272
- ).command(
1273
- "gitlint [package]",
1274
- "Gitlint - Lint your git config",
1275
- (yargs2) => {
1276
- return yargs2;
1277
- },
1278
- (argv) => {
1279
- if (argv.verbose)
1280
- console.log("Gitlint");
1281
- process.exitCode = argv.fix ? gitlintFix() : gitlint();
1282
- }
1283
- ).command(
1284
- "gitignore-gen",
1285
- "GitIgnore Gen - Generate .gitignore files",
1286
- (yargs2) => {
1287
- return yargs2;
1288
- },
1289
- (argv) => {
1290
- if (argv.verbose)
1291
- console.log("GitIgnore Gen");
1292
- process.exitCode = gitignoreGen();
1293
- }
1294
- ).command(
1295
- "npmignore-gen",
1296
- "NpmIgnore Gen - Generate .npmignore files",
1297
- (yargs2) => {
1298
- return yargs2;
1299
- },
1300
- (argv) => {
1301
- if (argv.verbose)
1302
- console.log("NpmIgnore Gen");
1303
- process.exitCode = npmignoreGen();
1304
- }
1305
- ).command(
1306
- "retest",
1307
- "Re-Test - Run Jest Tests with cleaned cache",
1308
- (yargs2) => {
1309
- return yargs2;
1310
- },
1311
- (argv) => {
1312
- if (argv.verbose)
1313
- console.log("Re-Testing");
1314
- process.exitCode = retest();
1315
- }
1316
- ).command(
1317
- "test",
1318
- "Test - Run Jest Tests",
1319
- (yargs2) => {
1320
- return yargs2;
1321
- },
1322
- (argv) => {
1323
- if (argv.verbose)
1324
- console.log("Testing");
1325
- process.exitCode = test();
1326
- }
1327
- ).command(
1328
- "tsconfig-gen [package]",
1329
- "Tsconfig Gen - Generate tsconfig.json file for building",
1330
- (yargs2) => {
1331
- return yargs2.positional("package", {
1332
- describe: "Specific package for generation"
1333
- });
1334
- },
1335
- (argv) => {
1336
- if (argv.verbose)
1337
- console.log(`TsconfigGen: ${argv.package ?? "all"}`);
1338
- process.exitCode = tsconfigGen({ pkg: argv.package, target: argv.target });
1339
- }
1340
- ).command(
1341
- "tsconfig-clean",
1342
- "Tsconfig Clean - Remove generated tsconfig.json files",
1343
- (yargs2) => {
1344
- return yargs2;
1345
- },
1346
- (argv) => {
1347
- if (argv.verbose)
1348
- console.log("Tsconfig Clean");
1349
- process.exitCode = tsconfigGenClean();
1350
- }
1351
- ).command(
1352
- "upplug",
1353
- "UpPlug - Update Yarn Plugins",
1354
- (yargs2) => {
1355
- return yargs2;
1356
- },
1357
- (argv) => {
1358
- if (argv.verbose)
1359
- console.log("UpPlug");
1360
- process.exitCode = updateYarnPlugins();
1361
- }
1362
- ).command(
1363
- "upyarn",
1364
- "UpYarn - Update Yarn Version",
1365
- (yargs2) => {
1366
- return yargs2;
1367
- },
1368
- (argv) => {
1369
- if (argv.verbose)
1370
- console.log("UpYarn");
1371
- process.exitCode = updateYarnVersion();
1372
- }
1373
- ).command(
1374
- "yarn3only",
1375
- "Yarn3Only - Check if using Yarn v3",
1376
- (yargs2) => {
1377
- return yargs2;
1378
- },
1379
- (argv) => {
1380
- if (argv.verbose)
1381
- console.log("Yarn 3 Check");
1382
- process.exitCode = yarn3Only();
1383
- }
1384
- );
1385
- };
1386
-
1387
- // src/lib/xy/xyDeployCommands.ts
1388
- var xyDeployCommands = (args) => {
1389
- return args.command(
1390
- "deploy",
1391
- "Deploy - Deploy patch",
1392
- (yargs2) => {
1393
- return yargs2;
1394
- },
1395
- (argv) => {
1396
- if (argv.verbose)
1397
- console.log("Deploy patch");
1398
- process.exitCode = deploy();
1399
- }
1400
- ).command(
1401
- "deploy-minor",
1402
- "Deploy - Deploy minor",
1403
- (yargs2) => {
1404
- return yargs2;
1405
- },
1406
- (argv) => {
1407
- if (argv.verbose)
1408
- console.log("Deploy minor");
1409
- process.exitCode = deployMinor();
1410
- }
1411
- ).command(
1412
- "deploy-major",
1413
- "Deploy - Deploy major",
1414
- (yargs2) => {
1415
- return yargs2;
1416
- },
1417
- (argv) => {
1418
- if (argv.verbose)
1419
- console.log("Deploy major");
1420
- process.exitCode = deployMajor();
1421
- }
1422
- ).command(
1423
- "deploy-next",
1424
- "Deploy - Deploy next",
1425
- (yargs2) => {
1426
- return yargs2;
1427
- },
1428
- (argv) => {
1429
- if (argv.verbose)
1430
- console.log("Deploy next");
1431
- process.exitCode = deployNext();
1432
- }
1433
- );
1434
- };
1435
-
1436
- // src/lib/xy/xyInstallCommands.ts
1437
- var xyInstallCommands = (args) => {
1438
- return args.command(
1439
- "clean [package]",
1440
- "Clean",
1441
- (yargs2) => {
1442
- return yargs2.positional("package", {
1443
- describe: "Specific package to clean"
1444
- });
1445
- },
1446
- async (argv) => {
1447
- if (argv.verbose) {
1448
- console.log(`Cleaning: ${argv.package ?? "all"}`);
1449
- }
1450
- process.exitCode = await clean({
1451
- pkg: argv.package,
1452
- verbose: !!argv.verbose
1453
- });
1454
- }
1455
- ).command(
1456
- "reinstall",
1457
- "Reinstall - Clean & Install",
1458
- (yargs2) => {
1459
- return yargs2;
1460
- },
1461
- (argv) => {
1462
- if (argv.verbose)
1463
- console.log("Reinstalling");
1464
- process.exitCode = reinstall();
1465
- }
1466
- ).command(
1467
- "up",
1468
- "Up - Update dependencies",
1469
- (yargs2) => {
1470
- return yargs2;
1471
- },
1472
- (argv) => {
1473
- if (argv.verbose)
1474
- console.log("Up");
1475
- process.exitCode = up();
1476
- }
1477
- ).command(
1478
- "updo",
1479
- "Updo - Update dependencies [Interactive]",
1480
- (yargs2) => {
1481
- return yargs2;
1482
- },
1483
- (argv) => {
1484
- if (argv.verbose)
1485
- console.log("Updo");
1486
- process.exitCode = updo();
1487
- }
1488
- ).command(
1489
- "statics",
1490
- "Statics - Confirming Static Packages",
1491
- (yargs2) => {
1492
- return yargs2;
1493
- },
1494
- (argv) => {
1495
- if (argv.verbose)
1496
- console.log("Statics");
1497
- process.exitCode = statics();
1498
- }
1499
- ).command(
1500
- "dupdeps",
1501
- "Dupdeps - Duplicate Dependencies in package.json",
1502
- (yargs2) => {
1503
- return yargs2;
1504
- },
1505
- (argv) => {
1506
- if (argv.verbose)
1507
- console.log("Dupdeps");
1508
- process.exitCode = dupdeps();
1509
- }
1510
- );
1511
- };
1512
-
1513
- // src/lib/xy/xyLintCommands.ts
1514
- import chalk24 from "chalk";
1515
- var xyLintCommands = (args) => {
1516
- return args.command(
1517
- "cycle [package]",
1518
- "Cycle - Check for dependency cycles",
1519
- (yargs2) => {
1520
- return yargs2.positional("package", {
1521
- describe: "Specific package to check"
1522
- });
1523
- },
1524
- (argv) => {
1525
- const start = Date.now();
1526
- if (argv.verbose)
1527
- console.log("Cycle");
1528
- process.exitCode = cycle();
1529
- console.log(chalk24.blue(`Finished in ${Date.now() - start}ms`));
1530
- }
1531
- ).command(
1532
- "lint [package]",
1533
- "Lint - Run Eslint",
1534
- (yargs2) => {
1535
- return yargs2.positional("package", {
1536
- describe: "Specific package to check"
1537
- });
1538
- },
1539
- async (argv) => {
1540
- if (argv.verbose)
1541
- console.log("Lint");
1542
- const start = Date.now();
1543
- process.exitCode = argv.fix ? fix() : argv.profile ? lintProfile() : await lint({ pkg: argv.package });
1544
- console.log(chalk24.blue(`Finished in ${Date.now() - start}ms`));
1545
- }
1546
- ).command(
1547
- "fix [package]",
1548
- "Fix - Run Eslint w/fix",
1549
- (yargs2) => {
1550
- return yargs2.positional("package", {
1551
- describe: "Specific package to check"
1552
- });
1553
- },
1554
- (argv) => {
1555
- const start = Date.now();
1556
- if (argv.verbose)
1557
- console.log("Fix");
1558
- process.exitCode = fix();
1559
- console.log(chalk24.blue(`Finished in ${Date.now() - start}ms`));
1560
- }
1561
- ).command(
1562
- "relint [package]",
1563
- "Relint - Clean & Lint",
1564
- (yargs2) => {
1565
- return yargs2.positional("package", {
1566
- describe: "Specific package to relint"
1567
- });
1568
- },
1569
- (argv) => {
1570
- if (argv.verbose)
1571
- console.log("Relinting");
1572
- const start = Date.now();
1573
- process.exitCode = relint();
1574
- console.log(chalk24.blue(`Finished in ${Date.now() - start}ms`));
1575
- }
1576
- ).command(
1577
- "publint [package]",
1578
- "Publint - Run Publint",
1579
- (yargs2) => {
1580
- return yargs2.positional("package", {
1581
- describe: "Specific package to publint"
1582
- });
1583
- },
1584
- async (argv) => {
1585
- if (argv.verbose)
1586
- console.log("Publint");
1587
- const start = Date.now();
1588
- process.exitCode = await publint({ pkg: argv.package, verbose: !!argv.verbose });
1589
- console.log(chalk24.blue(`Finished in ${Date.now() - start}ms`));
1590
- }
1591
- ).command(
1592
- "sonar",
1593
- "Sonar - Run Sonar Check",
1594
- (yargs2) => {
1595
- return yargs2;
1596
- },
1597
- (argv) => {
1598
- const start = Date.now();
1599
- if (argv.verbose)
1600
- console.log("Sonar Check");
1601
- process.exitCode = sonar();
1602
- console.log(chalk24.blue(`Finished in ${Date.now() - start}ms`));
1603
- }
1604
- );
1605
- };
1606
-
1607
- // src/lib/xy/xyParseOptions.ts
1608
- import yargs from "yargs";
1609
- import { hideBin } from "yargs/helpers";
1610
- var xyParseOptions = () => {
1611
- return yargs(hideBin(process.argv)).scriptName("yarn xy").option("jobs", {
1612
- alias: "j",
1613
- default: void 0,
1614
- description: "Max parallel jobs",
1615
- type: "number"
1616
- }).option("verbose", {
1617
- alias: "v",
1618
- default: false,
1619
- description: "Run with verbose logging",
1620
- type: "boolean"
1621
- }).option("target", {
1622
- alias: "t",
1623
- choices: ["esm", "cjs"],
1624
- description: "Limit output to specific target",
1625
- type: "string"
1626
- }).option("incremental", {
1627
- alias: "i",
1628
- default: false,
1629
- description: "Attempt to perform the action only on changed packages",
1630
- type: "boolean"
1631
- }).option("fix", {
1632
- alias: "f",
1633
- default: false,
1634
- description: "Try to fix errors",
1635
- type: "boolean"
1636
- }).option("cache", {
1637
- alias: "c",
1638
- default: false,
1639
- description: "Use caching for performance",
1640
- type: "boolean"
1641
- }).option("profile", {
1642
- alias: "p",
1643
- default: false,
1644
- description: "Profile action",
1645
- type: "boolean"
1646
- });
1647
- };
1648
-
1649
- // src/lib/xy/xy.ts
1650
- var xy = () => {
1651
- const options = xyParseOptions();
1652
- return xyBuildCommands(xyCommonCommands(xyInstallCommands(xyDeployCommands(xyLintCommands(options))))).demandCommand(1).command("*", "", () => {
1653
- console.error(chalk25.yellow(`Command not found [${chalk25.magenta(process.argv[2])}]`));
1654
- console.log(chalk25.gray("Try 'yarn xy --help' for list of commands"));
1655
- }).version().help().argv;
1656
- };
1657
-
1658
- // src/bin/xy.ts
1659
- xy();
1660
- //# sourceMappingURL=xy.mjs.map