@xylabs/ts-scripts-yarn3 3.14.2 → 3.15.0

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