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