@xylabs/ts-scripts-yarn3 2.19.12 → 3.0.0-rc.1

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (683) hide show
  1. package/dist/actions/build.d.ts +9 -0
  2. package/dist/actions/build.d.ts.map +1 -0
  3. package/dist/actions/build.js +21 -163
  4. package/dist/actions/build.js.map +1 -1
  5. package/dist/actions/clean-docs.d.ts +2 -0
  6. package/dist/actions/clean-docs.d.ts.map +1 -0
  7. package/dist/actions/clean-docs.js +13 -61
  8. package/dist/actions/clean-docs.js.map +1 -1
  9. package/dist/actions/clean-eslint.d.ts +2 -0
  10. package/dist/actions/clean-eslint.d.ts.map +1 -0
  11. package/dist/actions/clean-eslint.js +13 -47
  12. package/dist/actions/clean-eslint.js.map +1 -1
  13. package/dist/actions/clean-jest.d.ts +2 -0
  14. package/dist/actions/clean-jest.d.ts.map +1 -0
  15. package/dist/actions/clean-jest.js +6 -133
  16. package/dist/actions/clean-jest.js.map +1 -1
  17. package/dist/actions/clean.d.ts +12 -0
  18. package/dist/actions/clean.d.ts.map +1 -0
  19. package/dist/actions/clean.js +20 -247
  20. package/dist/actions/clean.js.map +1 -1
  21. package/dist/actions/compile.d.ts +16 -0
  22. package/dist/actions/compile.d.ts.map +1 -0
  23. package/dist/actions/compile.js +28 -156
  24. package/dist/actions/compile.js.map +1 -1
  25. package/dist/actions/copy-assets.d.ts +6 -0
  26. package/dist/actions/copy-assets.d.ts.map +1 -0
  27. package/dist/actions/copy-assets.js +48 -99
  28. package/dist/actions/copy-assets.js.map +1 -1
  29. package/dist/actions/cycle.d.ts +2 -0
  30. package/dist/actions/cycle.d.ts.map +1 -0
  31. package/dist/actions/cycle.js +8 -135
  32. package/dist/actions/cycle.js.map +1 -1
  33. package/dist/actions/dead.d.ts +2 -0
  34. package/dist/actions/dead.d.ts.map +1 -0
  35. package/dist/actions/dead.js +6 -133
  36. package/dist/actions/dead.js.map +1 -1
  37. package/dist/actions/deploy-major.d.ts +2 -0
  38. package/dist/actions/deploy-major.d.ts.map +1 -0
  39. package/dist/actions/deploy-major.js +14 -141
  40. package/dist/actions/deploy-major.js.map +1 -1
  41. package/dist/actions/deploy-minor.d.ts +2 -0
  42. package/dist/actions/deploy-minor.d.ts.map +1 -0
  43. package/dist/actions/deploy-minor.js +14 -141
  44. package/dist/actions/deploy-minor.js.map +1 -1
  45. package/dist/actions/deploy-next.d.ts +2 -0
  46. package/dist/actions/deploy-next.d.ts.map +1 -0
  47. package/dist/actions/deploy-next.js +14 -141
  48. package/dist/actions/deploy-next.js.map +1 -1
  49. package/dist/actions/deploy.d.ts +2 -0
  50. package/dist/actions/deploy.d.ts.map +1 -0
  51. package/dist/actions/deploy.js +15 -142
  52. package/dist/actions/deploy.js.map +1 -1
  53. package/dist/actions/deps.d.ts +12 -0
  54. package/dist/actions/deps.d.ts.map +1 -0
  55. package/dist/actions/deps.js +26 -153
  56. package/dist/actions/deps.js.map +1 -1
  57. package/dist/actions/dupdeps.d.ts +2 -0
  58. package/dist/actions/dupdeps.d.ts.map +1 -0
  59. package/dist/actions/dupdeps.js +12 -214
  60. package/dist/actions/dupdeps.js.map +1 -1
  61. package/dist/actions/fix.d.ts +2 -0
  62. package/dist/actions/fix.d.ts.map +1 -0
  63. package/dist/actions/fix.js +6 -133
  64. package/dist/actions/fix.js.map +1 -1
  65. package/dist/actions/gen-docs.d.ts +11 -0
  66. package/dist/actions/gen-docs.d.ts.map +1 -0
  67. package/dist/actions/gen-docs.js +18 -147
  68. package/dist/actions/gen-docs.js.map +1 -1
  69. package/dist/actions/gitignore-gen.d.ts +2 -0
  70. package/dist/actions/gitignore-gen.d.ts.map +1 -0
  71. package/dist/actions/gitignore-gen.js +6 -122
  72. package/dist/actions/gitignore-gen.js.map +1 -1
  73. package/dist/actions/gitlint-fix.d.ts +2 -0
  74. package/dist/actions/gitlint-fix.d.ts.map +1 -0
  75. package/dist/actions/gitlint-fix.js +23 -59
  76. package/dist/actions/gitlint-fix.js.map +1 -1
  77. package/dist/actions/gitlint.d.ts +2 -0
  78. package/dist/actions/gitlint.d.ts.map +1 -0
  79. package/dist/actions/gitlint.js +46 -80
  80. package/dist/actions/gitlint.js.map +1 -1
  81. package/dist/actions/index.d.ts +39 -0
  82. package/dist/actions/index.d.ts.map +1 -0
  83. package/dist/actions/index.js +40 -1693
  84. package/dist/actions/index.js.map +1 -1
  85. package/dist/actions/index.mjs +118 -303
  86. package/dist/actions/index.mjs.map +1 -1
  87. package/dist/actions/license.d.ts +2 -0
  88. package/dist/actions/license.d.ts.map +1 -0
  89. package/dist/actions/license.js +69 -116
  90. package/dist/actions/license.js.map +1 -1
  91. package/dist/actions/lint-clean.d.ts +2 -0
  92. package/dist/actions/lint-clean.d.ts.map +1 -0
  93. package/dist/actions/lint-clean.js +25 -180
  94. package/dist/actions/lint-clean.js.map +1 -1
  95. package/dist/actions/lint-profile.d.ts +2 -0
  96. package/dist/actions/lint-profile.d.ts.map +1 -0
  97. package/dist/actions/lint-profile.js +6 -133
  98. package/dist/actions/lint-profile.js.map +1 -1
  99. package/dist/actions/lint.d.ts +12 -0
  100. package/dist/actions/lint.d.ts.map +1 -0
  101. package/dist/actions/lint.js +30 -171
  102. package/dist/actions/lint.js.map +1 -1
  103. package/dist/actions/npmignore-gen.d.ts +2 -0
  104. package/dist/actions/npmignore-gen.d.ts.map +1 -0
  105. package/dist/actions/npmignore-gen.js +6 -122
  106. package/dist/actions/npmignore-gen.js.map +1 -1
  107. package/dist/actions/package/clean-outputs.d.ts +2 -0
  108. package/dist/actions/package/clean-outputs.d.ts.map +1 -0
  109. package/dist/actions/package/clean-outputs.js +16 -50
  110. package/dist/actions/package/clean-outputs.js.map +1 -1
  111. package/dist/actions/package/clean-typescript.d.ts +2 -0
  112. package/dist/actions/package/clean-typescript.d.ts.map +1 -0
  113. package/dist/actions/package/clean-typescript.js +16 -50
  114. package/dist/actions/package/clean-typescript.js.map +1 -1
  115. package/dist/actions/package/clean.d.ts +2 -0
  116. package/dist/actions/package/clean.d.ts.map +1 -0
  117. package/dist/actions/package/clean.js +8 -73
  118. package/dist/actions/package/clean.js.map +1 -1
  119. package/dist/actions/package/compile.d.ts +2 -0
  120. package/dist/actions/package/compile.d.ts.map +1 -0
  121. package/dist/actions/package/compile.js +60 -314
  122. package/dist/actions/package/compile.js.map +1 -1
  123. package/dist/actions/package/compile.mjs +53 -276
  124. package/dist/actions/package/compile.mjs.map +1 -1
  125. package/dist/actions/package/copy-assets.d.ts +5 -0
  126. package/dist/actions/package/copy-assets.d.ts.map +1 -0
  127. package/dist/actions/package/copy-assets.js +36 -73
  128. package/dist/actions/package/copy-assets.js.map +1 -1
  129. package/dist/actions/package/deps.d.ts +2 -0
  130. package/dist/actions/package/deps.d.ts.map +1 -0
  131. package/dist/actions/package/deps.js +89 -127
  132. package/dist/actions/package/deps.js.map +1 -1
  133. package/dist/actions/package/gen-docs.d.ts +2 -0
  134. package/dist/actions/package/gen-docs.d.ts.map +1 -0
  135. package/dist/actions/package/gen-docs.js +103 -135
  136. package/dist/actions/package/gen-docs.js.map +1 -1
  137. package/dist/actions/package/gen-docs.mjs +1 -1
  138. package/dist/actions/package/gen-docs.mjs.map +1 -1
  139. package/dist/actions/package/index.d.ts +11 -0
  140. package/dist/actions/package/index.d.ts.map +1 -0
  141. package/dist/actions/package/index.js +12 -590
  142. package/dist/actions/package/index.js.map +1 -1
  143. package/dist/actions/package/index.mjs +120 -263
  144. package/dist/actions/package/index.mjs.map +1 -1
  145. package/dist/actions/package/publint.d.ts +2 -0
  146. package/dist/actions/package/publint.d.ts.map +1 -0
  147. package/dist/actions/package/publint.js +41 -52
  148. package/dist/actions/package/publint.js.map +1 -1
  149. package/dist/actions/package/publint.mjs +1 -1
  150. package/dist/actions/package/publint.mjs.map +1 -1
  151. package/dist/actions/package/recompile.d.ts +2 -0
  152. package/dist/actions/package/recompile.d.ts.map +1 -0
  153. package/dist/actions/package/recompile.js +8 -361
  154. package/dist/actions/package/recompile.js.map +1 -1
  155. package/dist/actions/package/recompile.mjs +53 -276
  156. package/dist/actions/package/recompile.mjs.map +1 -1
  157. package/dist/actions/package/tsup.d.ts +2 -0
  158. package/dist/actions/package/tsup.d.ts.map +1 -0
  159. package/dist/actions/package/tsup.js +29 -0
  160. package/dist/actions/package/tsup.js.map +1 -0
  161. package/dist/actions/package/tsup.mjs +31 -0
  162. package/dist/actions/package/tsup.mjs.map +1 -0
  163. package/dist/actions/package/types.d.js +2 -0
  164. package/dist/actions/package/types.d.js.map +1 -0
  165. package/dist/actions/package/types.d.mjs +1 -0
  166. package/dist/actions/package/types.d.mjs.map +1 -0
  167. package/dist/actions/publint.d.ts +12 -0
  168. package/dist/actions/publint.d.ts.map +1 -0
  169. package/dist/actions/publint.js +17 -205
  170. package/dist/actions/publint.js.map +1 -1
  171. package/dist/actions/rebuild.d.ts +6 -0
  172. package/dist/actions/rebuild.d.ts.map +1 -0
  173. package/dist/actions/rebuild.js +10 -137
  174. package/dist/actions/rebuild.js.map +1 -1
  175. package/dist/actions/recompile.d.ts +16 -0
  176. package/dist/actions/recompile.d.ts.map +1 -0
  177. package/dist/actions/recompile.js +28 -172
  178. package/dist/actions/recompile.js.map +1 -1
  179. package/dist/actions/reinstall.d.ts +2 -0
  180. package/dist/actions/reinstall.d.ts.map +1 -0
  181. package/dist/actions/reinstall.js +26 -163
  182. package/dist/actions/reinstall.js.map +1 -1
  183. package/dist/actions/relint.d.ts +2 -0
  184. package/dist/actions/relint.d.ts.map +1 -0
  185. package/dist/actions/relint.js +24 -161
  186. package/dist/actions/relint.js.map +1 -1
  187. package/dist/actions/retest.d.ts +2 -0
  188. package/dist/actions/retest.d.ts.map +1 -0
  189. package/dist/actions/retest.js +10 -137
  190. package/dist/actions/retest.js.map +1 -1
  191. package/dist/actions/sonar.d.ts +2 -0
  192. package/dist/actions/sonar.d.ts.map +1 -0
  193. package/dist/actions/sonar.js +6 -133
  194. package/dist/actions/sonar.js.map +1 -1
  195. package/dist/actions/statics.d.ts +2 -0
  196. package/dist/actions/statics.d.ts.map +1 -0
  197. package/dist/actions/statics.js +12 -214
  198. package/dist/actions/statics.js.map +1 -1
  199. package/dist/actions/test.d.ts +2 -0
  200. package/dist/actions/test.d.ts.map +1 -0
  201. package/dist/actions/test.js +6 -133
  202. package/dist/actions/test.js.map +1 -1
  203. package/dist/actions/up.d.ts +2 -0
  204. package/dist/actions/up.d.ts.map +1 -0
  205. package/dist/actions/up.js +6 -133
  206. package/dist/actions/up.js.map +1 -1
  207. package/dist/actions/updo.d.ts +2 -0
  208. package/dist/actions/updo.d.ts.map +1 -0
  209. package/dist/actions/updo.js +11 -138
  210. package/dist/actions/updo.js.map +1 -1
  211. package/dist/actions/upplug.d.ts +2 -0
  212. package/dist/actions/upplug.d.ts.map +1 -0
  213. package/dist/actions/upplug.js +12 -139
  214. package/dist/actions/upplug.js.map +1 -1
  215. package/dist/actions/upyarn.d.ts +2 -0
  216. package/dist/actions/upyarn.d.ts.map +1 -0
  217. package/dist/actions/upyarn.js +6 -133
  218. package/dist/actions/upyarn.js.map +1 -1
  219. package/dist/actions/yarn3only.d.ts +2 -0
  220. package/dist/actions/yarn3only.d.ts.map +1 -0
  221. package/dist/actions/yarn3only.js +9 -93
  222. package/dist/actions/yarn3only.js.map +1 -1
  223. package/dist/bin/build.d.ts +3 -0
  224. package/dist/bin/build.d.ts.map +1 -0
  225. package/dist/bin/build.js +3 -33
  226. package/dist/bin/build.js.map +1 -1
  227. package/dist/bin/clean.d.ts +3 -0
  228. package/dist/bin/clean.d.ts.map +1 -0
  229. package/dist/bin/clean.js +3 -33
  230. package/dist/bin/clean.js.map +1 -1
  231. package/dist/bin/compile.d.ts +3 -0
  232. package/dist/bin/compile.d.ts.map +1 -0
  233. package/dist/bin/compile.js +3 -33
  234. package/dist/bin/compile.js.map +1 -1
  235. package/dist/bin/cycle.d.ts +3 -0
  236. package/dist/bin/cycle.d.ts.map +1 -0
  237. package/dist/bin/cycle.js +3 -33
  238. package/dist/bin/cycle.js.map +1 -1
  239. package/dist/bin/dead.d.ts +3 -0
  240. package/dist/bin/dead.d.ts.map +1 -0
  241. package/dist/bin/dead.js +3 -33
  242. package/dist/bin/dead.js.map +1 -1
  243. package/dist/bin/deploy-major.d.ts +3 -0
  244. package/dist/bin/deploy-major.d.ts.map +1 -0
  245. package/dist/bin/deploy-major.js +3 -33
  246. package/dist/bin/deploy-major.js.map +1 -1
  247. package/dist/bin/deploy-minor.d.ts +3 -0
  248. package/dist/bin/deploy-minor.d.ts.map +1 -0
  249. package/dist/bin/deploy-minor.js +3 -33
  250. package/dist/bin/deploy-minor.js.map +1 -1
  251. package/dist/bin/deploy-next.d.ts +3 -0
  252. package/dist/bin/deploy-next.d.ts.map +1 -0
  253. package/dist/bin/deploy-next.js +3 -33
  254. package/dist/bin/deploy-next.js.map +1 -1
  255. package/dist/bin/deploy.d.ts +3 -0
  256. package/dist/bin/deploy.d.ts.map +1 -0
  257. package/dist/bin/deploy.js +3 -33
  258. package/dist/bin/deploy.js.map +1 -1
  259. package/dist/bin/deps.d.ts +3 -0
  260. package/dist/bin/deps.d.ts.map +1 -0
  261. package/dist/bin/deps.js +3 -33
  262. package/dist/bin/deps.js.map +1 -1
  263. package/dist/bin/fix.d.ts +3 -0
  264. package/dist/bin/fix.d.ts.map +1 -0
  265. package/dist/bin/fix.js +3 -33
  266. package/dist/bin/fix.js.map +1 -1
  267. package/dist/bin/gen-docs.d.ts +3 -0
  268. package/dist/bin/gen-docs.d.ts.map +1 -0
  269. package/dist/bin/gen-docs.js +3 -33
  270. package/dist/bin/gen-docs.js.map +1 -1
  271. package/dist/bin/gitlint-fix.d.ts +3 -0
  272. package/dist/bin/gitlint-fix.d.ts.map +1 -0
  273. package/dist/bin/gitlint-fix.js +3 -33
  274. package/dist/bin/gitlint-fix.js.map +1 -1
  275. package/dist/bin/gitlint.d.ts +3 -0
  276. package/dist/bin/gitlint.d.ts.map +1 -0
  277. package/dist/bin/gitlint.js +3 -33
  278. package/dist/bin/gitlint.js.map +1 -1
  279. package/dist/bin/license.d.ts +3 -0
  280. package/dist/bin/license.d.ts.map +1 -0
  281. package/dist/bin/license.js +3 -33
  282. package/dist/bin/license.js.map +1 -1
  283. package/dist/bin/lint-clean.d.ts +3 -0
  284. package/dist/bin/lint-clean.d.ts.map +1 -0
  285. package/dist/bin/lint-clean.js +3 -33
  286. package/dist/bin/lint-clean.js.map +1 -1
  287. package/dist/bin/lint-fast.d.ts +3 -0
  288. package/dist/bin/lint-fast.d.ts.map +1 -0
  289. package/dist/bin/lint-fast.js +3 -33
  290. package/dist/bin/lint-fast.js.map +1 -1
  291. package/dist/bin/lint-profile.d.ts +3 -0
  292. package/dist/bin/lint-profile.d.ts.map +1 -0
  293. package/dist/bin/lint-profile.js +3 -33
  294. package/dist/bin/lint-profile.js.map +1 -1
  295. package/dist/bin/lint.d.ts +3 -0
  296. package/dist/bin/lint.d.ts.map +1 -0
  297. package/dist/bin/lint.js +3 -33
  298. package/dist/bin/lint.js.map +1 -1
  299. package/dist/bin/package/clean-outputs.d.ts +3 -0
  300. package/dist/bin/package/clean-outputs.d.ts.map +1 -0
  301. package/dist/bin/package/clean-outputs.js +3 -40
  302. package/dist/bin/package/clean-outputs.js.map +1 -1
  303. package/dist/bin/package/clean-typescript.d.ts +3 -0
  304. package/dist/bin/package/clean-typescript.d.ts.map +1 -0
  305. package/dist/bin/package/clean-typescript.js +3 -40
  306. package/dist/bin/package/clean-typescript.js.map +1 -1
  307. package/dist/bin/package/clean.d.ts +3 -0
  308. package/dist/bin/package/clean.d.ts.map +1 -0
  309. package/dist/bin/package/clean.js +3 -60
  310. package/dist/bin/package/clean.js.map +1 -1
  311. package/dist/bin/package/compile.d.ts +3 -0
  312. package/dist/bin/package/compile.d.ts.map +1 -0
  313. package/dist/bin/package/compile.js +7 -313
  314. package/dist/bin/package/compile.js.map +1 -1
  315. package/dist/bin/package/compile.mjs +55 -278
  316. package/dist/bin/package/compile.mjs.map +1 -1
  317. package/dist/bin/package/copy-assets-cjs.d.ts +3 -0
  318. package/dist/bin/package/copy-assets-cjs.d.ts.map +1 -0
  319. package/dist/bin/package/copy-assets-cjs.js +7 -70
  320. package/dist/bin/package/copy-assets-cjs.js.map +1 -1
  321. package/dist/bin/package/copy-assets-esm.d.ts +3 -0
  322. package/dist/bin/package/copy-assets-esm.d.ts.map +1 -0
  323. package/dist/bin/package/copy-assets-esm.js +7 -70
  324. package/dist/bin/package/copy-assets-esm.js.map +1 -1
  325. package/dist/bin/package/deps.d.ts +3 -0
  326. package/dist/bin/package/deps.d.ts.map +1 -0
  327. package/dist/bin/package/deps.js +7 -121
  328. package/dist/bin/package/deps.js.map +1 -1
  329. package/dist/bin/package/gen-docs.d.ts +3 -0
  330. package/dist/bin/package/gen-docs.d.ts.map +1 -0
  331. package/dist/bin/package/gen-docs.js +3 -134
  332. package/dist/bin/package/gen-docs.js.map +1 -1
  333. package/dist/bin/package/gen-docs.mjs +1 -1
  334. package/dist/bin/package/gen-docs.mjs.map +1 -1
  335. package/dist/bin/package/publint.d.ts +3 -0
  336. package/dist/bin/package/publint.d.ts.map +1 -0
  337. package/dist/bin/package/publint.js +7 -48
  338. package/dist/bin/package/publint.js.map +1 -1
  339. package/dist/bin/package/publint.mjs +2 -2
  340. package/dist/bin/package/publint.mjs.map +1 -1
  341. package/dist/bin/package/recompile.d.ts +3 -0
  342. package/dist/bin/package/recompile.d.ts.map +1 -0
  343. package/dist/bin/package/recompile.js +7 -353
  344. package/dist/bin/package/recompile.js.map +1 -1
  345. package/dist/bin/package/recompile.mjs +60 -283
  346. package/dist/bin/package/recompile.mjs.map +1 -1
  347. package/dist/bin/package/tsup.d.ts +3 -0
  348. package/dist/bin/package/tsup.d.ts.map +1 -0
  349. package/dist/bin/package/tsup.js +11 -0
  350. package/dist/bin/package/tsup.js.map +1 -0
  351. package/dist/bin/package/tsup.mjs +39 -0
  352. package/dist/bin/package/tsup.mjs.map +1 -0
  353. package/dist/bin/publint.d.ts +3 -0
  354. package/dist/bin/publint.d.ts.map +1 -0
  355. package/dist/bin/publint.js +3 -33
  356. package/dist/bin/publint.js.map +1 -1
  357. package/dist/bin/rebuild.d.ts +3 -0
  358. package/dist/bin/rebuild.d.ts.map +1 -0
  359. package/dist/bin/rebuild.js +3 -33
  360. package/dist/bin/rebuild.js.map +1 -1
  361. package/dist/bin/recompile.d.ts +3 -0
  362. package/dist/bin/recompile.d.ts.map +1 -0
  363. package/dist/bin/recompile.js +3 -33
  364. package/dist/bin/recompile.js.map +1 -1
  365. package/dist/bin/reinstall.d.ts +3 -0
  366. package/dist/bin/reinstall.d.ts.map +1 -0
  367. package/dist/bin/reinstall.js +3 -33
  368. package/dist/bin/reinstall.js.map +1 -1
  369. package/dist/bin/relint.d.ts +3 -0
  370. package/dist/bin/relint.d.ts.map +1 -0
  371. package/dist/bin/relint.js +3 -33
  372. package/dist/bin/relint.js.map +1 -1
  373. package/dist/bin/sonar.d.ts +3 -0
  374. package/dist/bin/sonar.d.ts.map +1 -0
  375. package/dist/bin/sonar.js +3 -33
  376. package/dist/bin/sonar.js.map +1 -1
  377. package/dist/bin/test.d.ts +3 -0
  378. package/dist/bin/test.d.ts.map +1 -0
  379. package/dist/bin/test.js +3 -33
  380. package/dist/bin/test.js.map +1 -1
  381. package/dist/bin/tsconfig-gen-clean.d.ts +3 -0
  382. package/dist/bin/tsconfig-gen-clean.d.ts.map +1 -0
  383. package/dist/bin/tsconfig-gen-clean.js +3 -33
  384. package/dist/bin/tsconfig-gen-clean.js.map +1 -1
  385. package/dist/bin/tsconfig-gen.d.ts +3 -0
  386. package/dist/bin/tsconfig-gen.d.ts.map +1 -0
  387. package/dist/bin/tsconfig-gen.js +3 -33
  388. package/dist/bin/tsconfig-gen.js.map +1 -1
  389. package/dist/bin/up.d.ts +3 -0
  390. package/dist/bin/up.d.ts.map +1 -0
  391. package/dist/bin/up.js +3 -33
  392. package/dist/bin/up.js.map +1 -1
  393. package/dist/bin/updo.d.ts +3 -0
  394. package/dist/bin/updo.d.ts.map +1 -0
  395. package/dist/bin/updo.js +3 -33
  396. package/dist/bin/updo.js.map +1 -1
  397. package/dist/bin/upplug.d.ts +3 -0
  398. package/dist/bin/upplug.d.ts.map +1 -0
  399. package/dist/bin/upplug.js +3 -33
  400. package/dist/bin/upplug.js.map +1 -1
  401. package/dist/bin/upyarn.d.ts +3 -0
  402. package/dist/bin/upyarn.d.ts.map +1 -0
  403. package/dist/bin/upyarn.js +3 -33
  404. package/dist/bin/upyarn.js.map +1 -1
  405. package/dist/bin/xy-ts.d.ts +3 -0
  406. package/dist/bin/xy-ts.d.ts.map +1 -0
  407. package/dist/bin/xy-ts.js +3 -1680
  408. package/dist/bin/xy-ts.js.map +1 -1
  409. package/dist/bin/xy-ts.mjs +15 -210
  410. package/dist/bin/xy-ts.mjs.map +1 -1
  411. package/dist/bin/xy.d.ts +3 -0
  412. package/dist/bin/xy.d.ts.map +1 -0
  413. package/dist/bin/xy.js +3 -1680
  414. package/dist/bin/xy.js.map +1 -1
  415. package/dist/bin/xy.mjs +15 -210
  416. package/dist/bin/xy.mjs.map +1 -1
  417. package/dist/bin/yarn3only.d.ts +3 -0
  418. package/dist/bin/yarn3only.d.ts.map +1 -0
  419. package/dist/bin/yarn3only.js +3 -33
  420. package/dist/bin/yarn3only.js.map +1 -1
  421. package/dist/index.d.mts +2 -22
  422. package/dist/index.d.ts +3 -319
  423. package/dist/index.d.ts.map +1 -0
  424. package/dist/index.js +4 -2333
  425. package/dist/index.js.map +1 -1
  426. package/dist/index.mjs +113 -280
  427. package/dist/index.mjs.map +1 -1
  428. package/dist/lib/checkResult.d.ts +2 -0
  429. package/dist/lib/checkResult.d.ts.map +1 -0
  430. package/dist/lib/checkResult.js +13 -47
  431. package/dist/lib/checkResult.js.map +1 -1
  432. package/dist/lib/createBuildConfig.d.ts +2 -0
  433. package/dist/lib/createBuildConfig.d.ts.map +1 -0
  434. package/dist/lib/createBuildConfig.js +31 -66
  435. package/dist/lib/createBuildConfig.js.map +1 -1
  436. package/dist/lib/defaultBuildConfig.d.ts +9 -0
  437. package/dist/lib/defaultBuildConfig.d.ts.map +1 -0
  438. package/dist/lib/defaultBuildConfig.js +9 -35
  439. package/dist/lib/defaultBuildConfig.js.map +1 -1
  440. package/dist/lib/dependencies/DuplicateDetector.d.ts +9 -0
  441. package/dist/lib/dependencies/DuplicateDetector.d.ts.map +1 -0
  442. package/dist/lib/dependencies/DuplicateDetector.js +65 -104
  443. package/dist/lib/dependencies/DuplicateDetector.js.map +1 -1
  444. package/dist/lib/dependencies/detectDuplicateDependencies.d.ts +2 -0
  445. package/dist/lib/dependencies/detectDuplicateDependencies.d.ts.map +1 -0
  446. package/dist/lib/dependencies/detectDuplicateDependencies.js +40 -192
  447. package/dist/lib/dependencies/detectDuplicateDependencies.js.map +1 -1
  448. package/dist/lib/dependencies/index.d.ts +3 -0
  449. package/dist/lib/dependencies/index.d.ts.map +1 -0
  450. package/dist/lib/dependencies/index.js +4 -199
  451. package/dist/lib/dependencies/index.js.map +1 -1
  452. package/dist/lib/file/ReadFileSyncOptions.d.ts +7 -0
  453. package/dist/lib/file/ReadFileSyncOptions.d.ts.map +1 -0
  454. package/dist/lib/file/ReadFileSyncOptions.js +3 -29
  455. package/dist/lib/file/ReadFileSyncOptions.js.map +1 -1
  456. package/dist/lib/file/constants.d.ts +3 -0
  457. package/dist/lib/file/constants.d.ts.map +1 -0
  458. package/dist/lib/file/constants.js +4 -32
  459. package/dist/lib/file/constants.js.map +1 -1
  460. package/dist/lib/file/fileLines.d.ts +6 -0
  461. package/dist/lib/file/fileLines.d.ts.map +1 -0
  462. package/dist/lib/file/fileLines.js +17 -53
  463. package/dist/lib/file/fileLines.js.map +1 -1
  464. package/dist/lib/file/index.d.ts +5 -0
  465. package/dist/lib/file/index.d.ts.map +1 -0
  466. package/dist/lib/file/index.js +6 -70
  467. package/dist/lib/file/index.js.map +1 -1
  468. package/dist/lib/file/tryReadFileSync.d.ts +4 -0
  469. package/dist/lib/file/tryReadFileSync.d.ts.map +1 -0
  470. package/dist/lib/file/tryReadFileSync.js +7 -36
  471. package/dist/lib/file/tryReadFileSync.js.map +1 -1
  472. package/dist/lib/generateIgnoreFiles.d.ts +2 -0
  473. package/dist/lib/generateIgnoreFiles.d.ts.map +1 -0
  474. package/dist/lib/generateIgnoreFiles.js +28 -115
  475. package/dist/lib/generateIgnoreFiles.js.map +1 -1
  476. package/dist/lib/index.d.ts +20 -0
  477. package/dist/lib/index.d.ts.map +1 -0
  478. package/dist/lib/index.js +21 -1788
  479. package/dist/lib/index.js.map +1 -1
  480. package/dist/lib/index.mjs +10 -163
  481. package/dist/lib/index.mjs.map +1 -1
  482. package/dist/lib/jsonFormatters.d.ts +2 -0
  483. package/dist/lib/jsonFormatters.d.ts.map +1 -0
  484. package/dist/lib/jsonFormatters.js +8 -33
  485. package/dist/lib/jsonFormatters.js.map +1 -1
  486. package/dist/lib/parsedPackageJSON.d.ts +2 -0
  487. package/dist/lib/parsedPackageJSON.d.ts.map +1 -0
  488. package/dist/lib/parsedPackageJSON.js +8 -33
  489. package/dist/lib/parsedPackageJSON.js.map +1 -1
  490. package/dist/lib/processEx.d.ts +2 -0
  491. package/dist/lib/processEx.d.ts.map +1 -0
  492. package/dist/lib/processEx.js +29 -68
  493. package/dist/lib/processEx.js.map +1 -1
  494. package/dist/lib/runSteps.d.ts +5 -0
  495. package/dist/lib/runSteps.d.ts.map +1 -0
  496. package/dist/lib/runSteps.js +36 -129
  497. package/dist/lib/runSteps.js.map +1 -1
  498. package/dist/lib/runStepsAsync.d.ts +4 -0
  499. package/dist/lib/runStepsAsync.d.ts.map +1 -0
  500. package/dist/lib/runStepsAsync.js +45 -144
  501. package/dist/lib/runStepsAsync.js.map +1 -1
  502. package/dist/lib/runXy.d.ts +2 -0
  503. package/dist/lib/runXy.d.ts.map +1 -0
  504. package/dist/lib/runXy.js +6 -135
  505. package/dist/lib/runXy.js.map +1 -1
  506. package/dist/lib/runXyWithWarning.d.ts +2 -0
  507. package/dist/lib/runXyWithWarning.d.ts.map +1 -0
  508. package/dist/lib/runXyWithWarning.js +9 -43
  509. package/dist/lib/runXyWithWarning.js.map +1 -1
  510. package/dist/lib/safeExit.d.ts +5 -0
  511. package/dist/lib/safeExit.d.ts.map +1 -0
  512. package/dist/lib/safeExit.js +25 -92
  513. package/dist/lib/safeExit.js.map +1 -1
  514. package/dist/lib/string/empty.d.ts +3 -0
  515. package/dist/lib/string/empty.d.ts.map +1 -0
  516. package/dist/lib/string/empty.js +6 -32
  517. package/dist/lib/string/empty.js.map +1 -1
  518. package/dist/lib/string/index.d.ts +3 -0
  519. package/dist/lib/string/index.d.ts.map +1 -0
  520. package/dist/lib/string/index.js +4 -39
  521. package/dist/lib/string/index.js.map +1 -1
  522. package/dist/lib/string/union.d.ts +2 -0
  523. package/dist/lib/string/union.d.ts.map +1 -0
  524. package/dist/lib/string/union.js +4 -29
  525. package/dist/lib/string/union.js.map +1 -1
  526. package/dist/lib/withErrnoException.d.ts +3 -0
  527. package/dist/lib/withErrnoException.d.ts.map +1 -0
  528. package/dist/lib/withErrnoException.js +8 -38
  529. package/dist/lib/withErrnoException.js.map +1 -1
  530. package/dist/lib/withError.d.ts +2 -0
  531. package/dist/lib/withError.d.ts.map +1 -0
  532. package/dist/lib/withError.js +7 -30
  533. package/dist/lib/withError.js.map +1 -1
  534. package/dist/lib/xy/index.d.ts +8 -0
  535. package/dist/lib/xy/index.d.ts.map +1 -0
  536. package/dist/lib/xy/index.js +9 -1707
  537. package/dist/lib/xy/index.js.map +1 -1
  538. package/dist/lib/xy/index.mjs +15 -210
  539. package/dist/lib/xy/index.mjs.map +1 -1
  540. package/dist/lib/xy/xy.d.ts +10 -0
  541. package/dist/lib/xy/xy.d.ts.map +1 -0
  542. package/dist/lib/xy/xy.js +20 -1691
  543. package/dist/lib/xy/xy.js.map +1 -1
  544. package/dist/lib/xy/xy.mjs +8 -203
  545. package/dist/lib/xy/xy.mjs.map +1 -1
  546. package/dist/lib/xy/xyBuildCommands.d.ts +3 -0
  547. package/dist/lib/xy/xyBuildCommands.d.ts.map +1 -0
  548. package/dist/lib/xy/xyBuildCommands.js +71 -426
  549. package/dist/lib/xy/xyBuildCommands.js.map +1 -1
  550. package/dist/lib/xy/xyCommonCommands.d.ts +3 -0
  551. package/dist/lib/xy/xyCommonCommands.d.ts.map +1 -0
  552. package/dist/lib/xy/xyCommonCommands.js +102 -807
  553. package/dist/lib/xy/xyCommonCommands.js.map +1 -1
  554. package/dist/lib/xy/xyCommonCommands.mjs +3 -198
  555. package/dist/lib/xy/xyCommonCommands.mjs.map +1 -1
  556. package/dist/lib/xy/xyDeployCommands.d.ts +3 -0
  557. package/dist/lib/xy/xyDeployCommands.d.ts.map +1 -0
  558. package/dist/lib/xy/xyDeployCommands.js +35 -227
  559. package/dist/lib/xy/xyDeployCommands.js.map +1 -1
  560. package/dist/lib/xy/xyInstallCommands.d.ts +3 -0
  561. package/dist/lib/xy/xyInstallCommands.d.ts.map +1 -0
  562. package/dist/lib/xy/xyInstallCommands.js +52 -491
  563. package/dist/lib/xy/xyInstallCommands.js.map +1 -1
  564. package/dist/lib/xy/xyLintCommands.d.ts +3 -0
  565. package/dist/lib/xy/xyLintCommands.d.ts.map +1 -0
  566. package/dist/lib/xy/xyLintCommands.js +71 -365
  567. package/dist/lib/xy/xyLintCommands.js.map +1 -1
  568. package/dist/lib/xy/xyParseOptions.d.ts +3 -0
  569. package/dist/lib/xy/xyParseOptions.d.ts.map +1 -0
  570. package/dist/lib/xy/xyParseOptions.js +52 -77
  571. package/dist/lib/xy/xyParseOptions.js.map +1 -1
  572. package/dist/lib/yarn/index.d.ts +4 -0
  573. package/dist/lib/yarn/index.d.ts.map +1 -0
  574. package/dist/lib/yarn/index.js +5 -77
  575. package/dist/lib/yarn/index.js.map +1 -1
  576. package/dist/lib/yarn/isYarnVersionOrGreater.d.ts +2 -0
  577. package/dist/lib/yarn/isYarnVersionOrGreater.d.ts.map +1 -0
  578. package/dist/lib/yarn/isYarnVersionOrGreater.js +15 -40
  579. package/dist/lib/yarn/isYarnVersionOrGreater.js.map +1 -1
  580. package/dist/lib/yarn/workspace/Workspace.d.ts +5 -0
  581. package/dist/lib/yarn/workspace/Workspace.d.ts.map +1 -0
  582. package/dist/lib/yarn/workspace/Workspace.js +1 -17
  583. package/dist/lib/yarn/workspace/Workspace.js.map +1 -1
  584. package/dist/lib/yarn/workspace/index.d.ts +4 -0
  585. package/dist/lib/yarn/workspace/index.d.ts.map +1 -0
  586. package/dist/lib/yarn/workspace/index.js +5 -51
  587. package/dist/lib/yarn/workspace/index.js.map +1 -1
  588. package/dist/lib/yarn/workspace/yarnWorkspace.d.ts +3 -0
  589. package/dist/lib/yarn/workspace/yarnWorkspace.d.ts.map +1 -0
  590. package/dist/lib/yarn/workspace/yarnWorkspace.js +10 -49
  591. package/dist/lib/yarn/workspace/yarnWorkspace.js.map +1 -1
  592. package/dist/lib/yarn/workspace/yarnWorkspaces.d.ts +3 -0
  593. package/dist/lib/yarn/workspace/yarnWorkspaces.d.ts.map +1 -0
  594. package/dist/lib/yarn/workspace/yarnWorkspaces.js +19 -38
  595. package/dist/lib/yarn/workspace/yarnWorkspaces.js.map +1 -1
  596. package/dist/lib/yarn/yarnInitCwd.d.ts +2 -0
  597. package/dist/lib/yarn/yarnInitCwd.d.ts.map +1 -0
  598. package/dist/lib/yarn/yarnInitCwd.js +7 -32
  599. package/dist/lib/yarn/yarnInitCwd.js.map +1 -1
  600. package/package.json +11 -5
  601. package/src/actions/index.ts +0 -5
  602. package/src/actions/package/compile.ts +64 -12
  603. package/src/actions/package/gen-docs.ts +1 -1
  604. package/src/actions/package/index.ts +1 -4
  605. package/src/actions/package/publint.ts +1 -2
  606. package/src/actions/package/tsup.ts +31 -0
  607. package/src/actions/package/types.d.ts +3 -0
  608. package/src/bin/package/publint.ts +1 -1
  609. package/src/bin/package/tsup.ts +9 -0
  610. package/src/lib/xy/xyCommonCommands.ts +0 -26
  611. package/tsconfig.build.json +8 -0
  612. package/tsconfig.json +4 -1
  613. package/dist/actions/package/compile-cjs.js +0 -268
  614. package/dist/actions/package/compile-cjs.js.map +0 -1
  615. package/dist/actions/package/compile-cjs.mjs +0 -231
  616. package/dist/actions/package/compile-cjs.mjs.map +0 -1
  617. package/dist/actions/package/compile-esm.js +0 -270
  618. package/dist/actions/package/compile-esm.js.map +0 -1
  619. package/dist/actions/package/compile-esm.mjs +0 -233
  620. package/dist/actions/package/compile-esm.mjs.map +0 -1
  621. package/dist/actions/package/tsconfig-gen-cjs.js +0 -111
  622. package/dist/actions/package/tsconfig-gen-cjs.js.map +0 -1
  623. package/dist/actions/package/tsconfig-gen-cjs.mjs +0 -76
  624. package/dist/actions/package/tsconfig-gen-cjs.mjs.map +0 -1
  625. package/dist/actions/package/tsconfig-gen-esm.js +0 -113
  626. package/dist/actions/package/tsconfig-gen-esm.js.map +0 -1
  627. package/dist/actions/package/tsconfig-gen-esm.mjs +0 -78
  628. package/dist/actions/package/tsconfig-gen-esm.mjs.map +0 -1
  629. package/dist/actions/tsconfig-gen-cjs.js +0 -134
  630. package/dist/actions/tsconfig-gen-cjs.js.map +0 -1
  631. package/dist/actions/tsconfig-gen-cjs.mjs +0 -99
  632. package/dist/actions/tsconfig-gen-cjs.mjs.map +0 -1
  633. package/dist/actions/tsconfig-gen-clean.js +0 -80
  634. package/dist/actions/tsconfig-gen-clean.js.map +0 -1
  635. package/dist/actions/tsconfig-gen-clean.mjs +0 -45
  636. package/dist/actions/tsconfig-gen-clean.mjs.map +0 -1
  637. package/dist/actions/tsconfig-gen-esm.js +0 -134
  638. package/dist/actions/tsconfig-gen-esm.js.map +0 -1
  639. package/dist/actions/tsconfig-gen-esm.mjs +0 -99
  640. package/dist/actions/tsconfig-gen-esm.mjs.map +0 -1
  641. package/dist/actions/tsconfig-gen-test.js +0 -97
  642. package/dist/actions/tsconfig-gen-test.js.map +0 -1
  643. package/dist/actions/tsconfig-gen-test.mjs +0 -62
  644. package/dist/actions/tsconfig-gen-test.mjs.map +0 -1
  645. package/dist/actions/tsconfig-gen.js +0 -215
  646. package/dist/actions/tsconfig-gen.js.map +0 -1
  647. package/dist/actions/tsconfig-gen.mjs +0 -178
  648. package/dist/actions/tsconfig-gen.mjs.map +0 -1
  649. package/dist/bin/package/compile-cjs.js +0 -262
  650. package/dist/bin/package/compile-cjs.js.map +0 -1
  651. package/dist/bin/package/compile-cjs.mjs +0 -239
  652. package/dist/bin/package/compile-cjs.mjs.map +0 -1
  653. package/dist/bin/package/compile-esm.js +0 -264
  654. package/dist/bin/package/compile-esm.js.map +0 -1
  655. package/dist/bin/package/compile-esm.mjs +0 -241
  656. package/dist/bin/package/compile-esm.mjs.map +0 -1
  657. package/dist/bin/package/tsconfig-gen-cjs.js +0 -99
  658. package/dist/bin/package/tsconfig-gen-cjs.js.map +0 -1
  659. package/dist/bin/package/tsconfig-gen-cjs.mjs +0 -76
  660. package/dist/bin/package/tsconfig-gen-cjs.mjs.map +0 -1
  661. package/dist/bin/package/tsconfig-gen-esm.js +0 -101
  662. package/dist/bin/package/tsconfig-gen-esm.js.map +0 -1
  663. package/dist/bin/package/tsconfig-gen-esm.mjs +0 -78
  664. package/dist/bin/package/tsconfig-gen-esm.mjs.map +0 -1
  665. package/dist/bin/package/tsconfig-gen.js +0 -131
  666. package/dist/bin/package/tsconfig-gen.js.map +0 -1
  667. package/dist/bin/package/tsconfig-gen.mjs +0 -108
  668. package/dist/bin/package/tsconfig-gen.mjs.map +0 -1
  669. package/src/actions/package/compile-cjs.ts +0 -15
  670. package/src/actions/package/compile-esm.ts +0 -15
  671. package/src/actions/package/tsconfig-gen-cjs.ts +0 -32
  672. package/src/actions/package/tsconfig-gen-esm.ts +0 -34
  673. package/src/actions/tsconfig-gen-cjs.ts +0 -35
  674. package/src/actions/tsconfig-gen-clean.ts +0 -22
  675. package/src/actions/tsconfig-gen-esm.ts +0 -34
  676. package/src/actions/tsconfig-gen-test.ts +0 -39
  677. package/src/actions/tsconfig-gen.ts +0 -19
  678. package/src/bin/package/compile-cjs.ts +0 -9
  679. package/src/bin/package/compile-esm.ts +0 -9
  680. package/src/bin/package/tsconfig-gen-cjs.ts +0 -5
  681. package/src/bin/package/tsconfig-gen-esm.ts +0 -5
  682. package/src/bin/package/tsconfig-gen.ts +0 -6
  683. package/tsup.config.ts +0 -16
@@ -1,811 +1,106 @@
1
1
  "use strict";
2
- var __create = Object.create;
3
- var __defProp = Object.defineProperty;
4
- var __getOwnPropDesc = Object.getOwnPropertyDescriptor;
5
- var __getOwnPropNames = Object.getOwnPropertyNames;
6
- var __getProtoOf = Object.getPrototypeOf;
7
- var __hasOwnProp = Object.prototype.hasOwnProperty;
8
- var __export = (target, all) => {
9
- for (var name in all)
10
- __defProp(target, name, { get: all[name], enumerable: true });
11
- };
12
- var __copyProps = (to, from, except, desc) => {
13
- if (from && typeof from === "object" || typeof from === "function") {
14
- for (let key of __getOwnPropNames(from))
15
- if (!__hasOwnProp.call(to, key) && key !== except)
16
- __defProp(to, key, { get: () => from[key], enumerable: !(desc = __getOwnPropDesc(from, key)) || desc.enumerable });
17
- }
18
- return to;
19
- };
20
- var __toESM = (mod, isNodeMode, target) => (target = mod != null ? __create(__getProtoOf(mod)) : {}, __copyProps(
21
- // If the importer is in node compatibility mode or this is not an ESM
22
- // file that has been converted to a CommonJS file using a Babel-
23
- // compatible transform (i.e. "__esModule" has not been set), then set
24
- // "default" to the CommonJS "module.exports" for node compatibility.
25
- isNodeMode || !mod || !mod.__esModule ? __defProp(target, "default", { value: mod, enumerable: true }) : target,
26
- mod
27
- ));
28
- var __toCommonJS = (mod) => __copyProps(__defProp({}, "__esModule", { value: true }), mod);
29
-
30
- // src/lib/xy/xyCommonCommands.ts
31
- var xyCommonCommands_exports = {};
32
- __export(xyCommonCommands_exports, {
33
- xyCommonCommands: () => xyCommonCommands
34
- });
35
- module.exports = __toCommonJS(xyCommonCommands_exports);
36
-
37
- // src/lib/checkResult.ts
38
- var import_chalk = __toESM(require("chalk"));
39
- var checkResult = (name, result, level = "error", exitOnFail = false) => {
40
- if (result) {
41
- const exiting = exitOnFail ? "[Exiting Process]" : "[Continuing]";
42
- const chalkFunc = level === "error" ? import_chalk.default.red : import_chalk.default.yellow;
43
- console[level](chalkFunc(`${name} had ${result} failures ${exiting}`));
44
- if (exitOnFail) {
45
- process.exit(result);
46
- }
47
- }
48
- };
49
-
50
- // src/lib/createBuildConfig.ts
51
- var import_fs = require("fs");
52
-
53
- // src/lib/defaultBuildConfig.ts
54
- var defaultBuildConfig = {
55
- compilerOptions: {
56
- rootDir: "src",
57
- rootDirs: ["package.json"]
58
- },
59
- exclude: ["**/build", "**/dist", "**/node_modules", "**/*.spec.*", "**/*.spec", "**/*.stories.*", "**/*.example.*", "**/spec/*", "**/stories/*"],
60
- include: ["src"]
61
- };
62
-
63
- // src/lib/createBuildConfig.ts
64
- var getGeneralTypescriptConfig = (location) => {
65
- let generalConfig;
66
- try {
67
- generalConfig = (0, import_fs.readFileSync)(`${location}/tsconfig.json`, { encoding: "utf8" });
68
- } catch (ex) {
69
- return false;
70
- }
71
- return JSON.parse(generalConfig);
72
- };
73
- var createBuildConfig = (location, module2, target, outDirSuffix) => {
74
- const generalConfigObject = getGeneralTypescriptConfig(location);
75
- if (generalConfigObject === false) {
76
- return void 0;
77
- }
78
- return {
79
- ...generalConfigObject,
80
- compilerOptions: {
81
- ...defaultBuildConfig.compilerOptions,
82
- ...generalConfigObject.compilerOptions ?? {},
83
- module: module2,
84
- outDir: `./${generalConfigObject.compilerOptions?.outDir ?? "dist"}/${outDirSuffix}`,
85
- target
86
- },
87
- exclude: [...generalConfigObject.exclude ?? [], ...defaultBuildConfig.exclude],
88
- include: [...generalConfigObject.include ?? [], ...defaultBuildConfig.include]
89
- };
90
- };
91
-
92
- // src/lib/processEx.ts
93
- var import_chalk2 = __toESM(require("chalk"));
94
-
95
- // src/lib/withError.ts
96
- var withError = (ex, closure, predicate = (ex2) => ex2.name !== void 0 && ex2.message !== void 0) => {
97
- return predicate(ex) ? closure(ex) : void 0;
98
- };
99
-
100
- // src/lib/withErrnoException.ts
101
- var withErrnoException = (ex, closure) => {
102
- return withError(ex, closure, (ex2) => ex2.errno !== void 0);
103
- };
104
-
105
- // src/lib/processEx.ts
106
- var processEx = (ex) => {
107
- const error = typeof ex === "string" ? Error(ex) : ex;
108
- const exitCode = withErrnoException(error, (error2) => {
109
- if (error2.code === "ENOENT") {
110
- console.error(import_chalk2.default.red(`'${error2.path}' not found.`));
111
- } else {
112
- console.error(import_chalk2.default.red(`Errno: ${error2.code}`));
113
- }
114
- return error2.errno ?? -1;
115
- }) ?? withError(error, (error2) => {
116
- console.error(import_chalk2.default.red(`${error2.name}: ${error2.message}`));
117
- return -1;
118
- }) ?? (() => {
119
- console.error(import_chalk2.default.red(`Unexpected Error: ${JSON.stringify(ex, null, 2)}`));
120
- return -1;
121
- })();
122
- process.exit(process.exitCode ?? exitCode);
123
- };
124
-
125
- // src/lib/safeExit.ts
126
- var safeExit = (func, exitOnFail = true) => {
127
- try {
128
- const result = func();
129
- if (result && exitOnFail) {
130
- process.exit(result);
131
- }
132
- return result;
133
- } catch (ex) {
134
- return processEx(ex);
135
- }
136
- };
137
-
138
- // src/lib/file/constants.ts
139
- var WINDOWS_NEWLINE_REGEX = /\r\n/g;
140
- var CROSS_PLATFORM_NEWLINE = "\n";
141
-
142
- // src/lib/file/fileLines.ts
143
- var import_node_fs = require("fs");
144
-
145
- // src/lib/string/empty.ts
146
- var empty = (value) => value?.trim().length === 0;
147
- var notEmpty = (value) => !empty(value);
148
-
149
- // src/lib/string/union.ts
150
- var union = (a, b) => /* @__PURE__ */ new Set([...new Set(a), ...new Set(b)]);
151
-
152
- // src/lib/file/ReadFileSyncOptions.ts
153
- var defaultReadFileSyncOptions = { encoding: "utf-8" };
154
-
155
- // src/lib/file/fileLines.ts
156
- var readLines = (uri, options = defaultReadFileSyncOptions) => (0, import_node_fs.existsSync)(uri) ? (0, import_node_fs.readFileSync)(uri, options).replace(WINDOWS_NEWLINE_REGEX, CROSS_PLATFORM_NEWLINE).split(CROSS_PLATFORM_NEWLINE) : [];
157
- var readNonEmptyLines = (uri, options = defaultReadFileSyncOptions) => readLines(uri, options).filter(notEmpty);
158
- var writeLines = (uri, lines, options = defaultReadFileSyncOptions) => {
159
- const existing = (0, import_node_fs.existsSync)(uri) ? (0, import_node_fs.readFileSync)(uri, options) : void 0;
160
- const desired = lines.join(CROSS_PLATFORM_NEWLINE);
161
- if (existing !== desired)
162
- (0, import_node_fs.writeFileSync)(uri, desired, options);
163
- };
164
-
165
- // src/lib/generateIgnoreFiles.ts
166
- var import_chalk3 = __toESM(require("chalk"));
167
-
168
- // src/lib/yarn/isYarnVersionOrGreater.ts
169
- var import_child_process = require("child_process");
170
- var isYarnVersionOrGreater = (major, minor, patch) => {
171
- const result = (0, import_child_process.spawnSync)("yarn", ["-v"], { encoding: "utf8", shell: true });
172
- const version = result.stdout.toString().replaceAll("\n", "");
173
- const versionNumbers = version.split(".").map((ver) => parseInt(ver));
174
- const majorDelta = versionNumbers[0] - major;
175
- const minorDelta = versionNumbers[1] - (minor ?? versionNumbers[1]);
176
- const patchDelta = versionNumbers[2] - (patch ?? versionNumbers[2]);
177
- const majorOk = majorDelta >= 0;
178
- const minorOk = majorDelta > 0 || minorDelta >= 0;
179
- const patchOk = majorDelta > 0 || minorDelta > 0 || patchDelta >= 0;
180
- return [majorOk && minorOk && patchOk, version];
181
- };
182
-
183
- // src/lib/yarn/workspace/yarnWorkspaces.ts
184
- var import_child_process2 = require("child_process");
185
- var yarnWorkspaces = () => {
186
- const result = (0, import_child_process2.spawnSync)("yarn", ["workspaces", "list", "--json", "--recursive"], { encoding: "utf8", shell: true });
187
- if (result.error) {
188
- throw result.error;
189
- }
190
- const list = result.stdout.toString().split("\n").slice(0, -1).map((item) => {
191
- return JSON.parse(item);
192
- });
193
- return list;
194
- };
195
-
196
- // src/lib/yarn/workspace/yarnWorkspace.ts
197
- var yarnWorkspace = (pkg) => {
198
- const workspace = yarnWorkspaces().find(({ name }) => name === pkg);
199
- if (!workspace)
200
- throw new Error(`Workspace ${pkg} not found`);
201
- return workspace;
202
- };
203
-
204
- // src/lib/yarn/yarnInitCwd.ts
205
- var INIT_CWD = () => {
206
- if (!process.env.INIT_CWD)
207
- console.error("Missing INIT_CWD");
208
- return process.env.INIT_CWD;
209
- };
210
-
211
- // src/lib/generateIgnoreFiles.ts
212
- var mergeEntries = (a, b) => [...union(a, b)].sort();
213
- var generateIgnoreFiles = (filename3, pkg) => {
214
- console.log(import_chalk3.default.green(`Generate ${filename3} Files`));
215
- const cwd = INIT_CWD() ?? ".";
216
- const workspaces = pkg ? [yarnWorkspace(pkg)] : yarnWorkspaces();
217
- const readEntries = (location) => readNonEmptyLines(`${location}/${filename3}`);
218
- const writeEntries = (location, entries) => writeLines(`${location}/${filename3}`, entries);
219
- const results = workspaces.map(({ location, name }) => {
220
- try {
221
- writeEntries(location, mergeEntries(readEntries(cwd), readEntries(location)));
222
- return 0;
223
- } catch (ex) {
224
- const error = ex;
225
- console.error(`Generate ${filename3} Files [${name}] [${error.message}]`);
226
- return 1;
227
- }
228
- });
229
- const succeeded = results.every((result) => result === 0);
230
- return succeeded ? 0 : 1;
231
- };
232
-
233
- // src/lib/runSteps.ts
234
- var import_chalk4 = __toESM(require("chalk"));
235
- var import_child_process3 = require("child_process");
236
- var import_fs2 = require("fs");
237
- var runSteps = (name, steps, exitOnFail = true, messages) => {
238
- return safeExit(() => {
239
- const pkgName = process.env.npm_package_name;
240
- console.log(import_chalk4.default.green(`${name} [${pkgName}]`));
241
- let totalStatus = 0;
242
- for (let i = 0; i < steps.length; i++) {
243
- const [command, args, config] = steps[i];
244
- if (messages?.[i]) {
245
- console.log(import_chalk4.default.gray(messages?.[i]));
246
- }
247
- const argList = Array.isArray(args) ? args : args.split(" ");
248
- if (command === "node" && !(0, import_fs2.existsSync)(argList[0])) {
249
- throw Error(`File not found [${argList[0]}]`);
250
- }
251
- const status = (0, import_child_process3.spawnSync)(command, Array.isArray(args) ? args : args.split(" "), {
252
- ...config,
253
- encoding: "utf8",
254
- env: { FORCE_COLOR: "3", ...process.env },
255
- shell: true,
256
- stdio: "inherit"
257
- }).status ?? 0;
258
- checkResult(name, status, "error", exitOnFail);
259
- totalStatus += status ?? 0;
260
- }
261
- return totalStatus;
262
- }, !!exitOnFail);
263
- };
264
-
265
- // src/actions/clean-docs.ts
266
- var import_chalk5 = __toESM(require("chalk"));
267
- var import_path = __toESM(require("path"));
268
- var import_rimraf = require("rimraf");
269
- var cleanDocs = () => {
270
- const pkgName = process.env.npm_package_name;
271
- console.log(import_chalk5.default.green(`Cleaning Docs [${pkgName}]`));
272
- yarnWorkspaces().map(({ location }) => (0, import_rimraf.rimrafSync)(import_path.default.join(location, "docs"), { glob: true }));
273
- return 0;
274
- };
275
-
276
- // src/actions/dead.ts
277
- var dead = () => {
278
- return runSteps("Dead", [["yarn", ["ts-prune", "-p", "tsconfig.json"]]]);
279
- };
280
-
281
- // src/actions/deps.ts
282
- var import_chalk6 = __toESM(require("chalk"));
283
- var deps = ({ pkg, incremental }) => {
284
- pkg ? depsPackage({ pkg }) : depsAll({ incremental });
285
- return 0;
286
- };
287
- var depsPackage = ({ pkg }) => {
288
- const steps = [["yarn", ["workspace", pkg, "run", "package-deps"]]];
289
- return runSteps(`Deps [${pkg}]`, [...steps]);
290
- };
291
- var depsAll = ({ incremental, jobs }) => {
292
- const start = Date.now();
293
- const jobsOptions = jobs ? ["-j", `${jobs}`] : [];
294
- if (jobs) {
295
- console.log(import_chalk6.default.blue(`Jobs set to [${jobs}]`));
296
- }
297
- const incrementalOptions = incremental ? ["--since", "-pA"] : ["-pA"];
298
- const steps = [["yarn", ["workspaces", "foreach", ...jobsOptions, ...incrementalOptions, "run", "package-deps"]]];
299
- const result = runSteps(`Deps${incremental ? "-Incremental" : ""} [All]`, [...steps]);
300
- console.log(`${import_chalk6.default.gray("Dep checked in")} [${import_chalk6.default.magenta(((Date.now() - start) / 1e3).toFixed(2))}] ${import_chalk6.default.gray("seconds")}`);
301
- return result;
302
- };
303
-
304
- // src/actions/gen-docs.ts
305
- var genDocs = ({ pkg, incremental }) => {
306
- return pkg ? genDocsPackage({ pkg }) : genDocsAll({ incremental });
307
- };
308
- var genDocsPackage = ({ pkg }) => {
309
- const steps = [["yarn", ["workspace", pkg, "run", "package-gen-docs"]]];
310
- return runSteps(`GenDocs [${pkg}]`, [...steps]);
311
- };
312
- var genDocsAll = ({ incremental }) => {
313
- const incrementalOptions = incremental ? ["--since", "-pA"] : ["-pA"];
314
- const steps = [["yarn", ["workspaces", "foreach", ...incrementalOptions, "run", "package-gen-docs"]]];
315
- return runSteps(`GenDocs [All${incremental ? "-Incremental" : ""}]`, [...steps]);
316
- };
317
-
318
- // src/actions/gitignore-gen.ts
319
- var filename = ".gitignore";
320
- var gitignoreGen = (pkg) => generateIgnoreFiles(filename, pkg);
321
-
322
- // src/actions/gitlint.ts
323
- var import_chalk7 = __toESM(require("chalk"));
324
- var import_parse_git_config = require("parse-git-config");
325
- var gitlint = () => {
326
- console.log(`
327
- Gitlint Start [${process.cwd()}]
328
- `);
329
- let valid = 0;
330
- let warnings = 0;
331
- const errors = 0;
332
- const gitConfig = (0, import_parse_git_config.sync)();
333
- const warn = (message) => {
334
- console.warn(import_chalk7.default.yellow(`Warning: ${message}`));
335
- warnings++;
336
- };
337
- if (gitConfig.core.ignorecase) {
338
- warn("Please set core.ignorecase to FALSE in .git/config file [run yarn gitlint-fix]");
339
- } else {
340
- valid++;
341
- }
342
- if (gitConfig.core.autocrlf !== false) {
343
- warn("Please set core.autocrlf to FALSE in .git/config file [run yarn gitlint-fix]");
344
- } else {
345
- valid++;
346
- }
347
- if (gitConfig.core.eol !== "lf") {
348
- warn('Please set core.eol to "lf" in .git/config file [run yarn gitlint-fix]');
349
- } else {
350
- valid++;
351
- }
352
- const resultMessages = [];
353
- if (valid > 0) {
354
- resultMessages.push(import_chalk7.default.green(`Passed: ${valid}`));
355
- }
356
- if (warnings > 0) {
357
- resultMessages.push(import_chalk7.default.yellow(`Warnings: ${warnings}`));
358
- }
359
- if (errors > 0) {
360
- resultMessages.push(import_chalk7.default.red(` Errors: ${errors}`));
361
- }
362
- console.warn(`Gitlint Finish [ ${resultMessages.join(" | ")} ]
363
- `);
364
- return warnings + errors === 0 ? 1 : 0;
365
- };
366
-
367
- // src/actions/gitlint-fix.ts
368
- var import_chalk8 = __toESM(require("chalk"));
369
- var import_child_process4 = require("child_process");
370
- var import_parse_git_config2 = require("parse-git-config");
371
- var gitlintFix = () => {
372
- console.log(`
373
- Gitlint Fix Start [${process.cwd()}]
374
- `);
375
- const gitConfig = (0, import_parse_git_config2.sync)();
376
- if (gitConfig.core.ignorecase) {
377
- (0, import_child_process4.execSync)("git config core.ignorecase false", { stdio: "inherit" });
378
- console.warn(import_chalk8.default.yellow("\nGitlint Fix: Updated core.ignorecase to be false\n"));
379
- }
380
- if (gitConfig.core.autocrlf !== false) {
381
- (0, import_child_process4.execSync)("git config core.autocrlf false", { stdio: "inherit" });
382
- console.warn(import_chalk8.default.yellow("\nGitlint Fix: Updated core.autocrlf to be false\n"));
383
- }
384
- if (gitConfig.core.eol !== "lf") {
385
- (0, import_child_process4.execSync)("git config core.eol lf", { stdio: "inherit" });
386
- console.warn(import_chalk8.default.yellow('\nGitlint Fix: Updated core.eol to be "lf"\n'));
387
- }
388
- return 1;
389
- };
390
-
391
- // src/actions/license.ts
392
- var import_chalk9 = __toESM(require("chalk"));
393
- var import_license_checker = require("license-checker");
394
- var license = async (pkg) => {
395
- const workspaces = yarnWorkspaces();
396
- const workspaceList = workspaces.filter(({ name }) => {
397
- return pkg === void 0 || name === pkg;
398
- });
399
- const exclude = [
400
- "MIT",
401
- "MIT*",
402
- "ISC",
403
- "Apache-2.0",
404
- "BSD",
405
- "BSD*",
406
- "BSD-2-Clause",
407
- "BSD-3-Clause",
408
- "CC-BY-4.0",
409
- "Unlicense",
410
- "CC-BY-3.0",
411
- "CC0-1.0",
412
- "LGPL-3.0-only",
413
- "LGPL-3.0",
414
- "LGPL-3.0-or-later",
415
- "Python-2.0"
416
- ];
417
- console.log(import_chalk9.default.green("License Checker"));
418
- return (await Promise.all(
419
- workspaceList.map(({ location, name }) => {
420
- return new Promise((resolve) => {
421
- (0, import_license_checker.init)({ production: true, start: location }, (error, packages) => {
422
- if (error) {
423
- console.error(import_chalk9.default.red(`License Checker [${name}] Error`));
424
- console.error(import_chalk9.default.gray(error));
425
- console.log("\n");
426
- resolve(1);
427
- } else {
428
- console.log(import_chalk9.default.green(`License Checker [${name}]`));
429
- let count = 0;
430
- Object.entries(packages).forEach(([name2, info]) => {
431
- const licenses = Array.isArray(info.licenses) ? info.licenses : [info.licenses];
432
- licenses.forEach((license2) => {
433
- if (license2) {
434
- if (license2[0] === "(" && license2[license2.length - 1] === ")") {
435
- license2 = license2.substring(1, license2.length - 2);
436
- }
437
- const orLicenses = license2.split(" OR ");
438
- let orLicenseFound = false;
439
- orLicenses.forEach((orLicense) => {
440
- if (exclude.includes(orLicense)) {
441
- orLicenseFound = true;
442
- }
443
- });
444
- if (!orLicenseFound) {
445
- count++;
446
- console.warn(import_chalk9.default.yellow(`${name2}: Package License not allowed [${license2}]`));
447
- }
448
- }
449
- });
450
- });
451
- console.log("\n");
452
- resolve(count);
453
- }
2
+ Object.defineProperty(exports, "__esModule", { value: true });
3
+ exports.xyCommonCommands = void 0;
4
+ const actions_1 = require("../../actions");
5
+ const xyCommonCommands = (args) => {
6
+ return args
7
+ .command('license [package]', 'License - Check licenses of dependencies', (yargs) => {
8
+ return yargs.positional('package', {
9
+ describe: 'Specific package to check',
454
10
  });
455
- });
11
+ }, async (argv) => {
12
+ if (argv.verbose)
13
+ console.log(`License: ${argv.package ?? 'all'}`);
14
+ process.exitCode = await (0, actions_1.license)();
456
15
  })
457
- )).reduce((prev, value) => prev || value, 0);
458
- };
459
-
460
- // src/actions/npmignore-gen.ts
461
- var filename2 = ".npmignore";
462
- var npmignoreGen = (pkg) => generateIgnoreFiles(filename2, pkg);
463
-
464
- // src/actions/retest.ts
465
- var retest = () => {
466
- return runSteps("Test", [
467
- ["yarn", ["jest", "--clearCache"]],
468
- ["yarn", ["jest", "."]]
469
- ]);
470
- };
471
-
472
- // src/actions/test.ts
473
- var test = () => {
474
- return runSteps("Test", [["yarn", ["jest", "."]]]);
475
- };
476
-
477
- // src/actions/tsconfig-gen-cjs.ts
478
- var import_chalk10 = __toESM(require("chalk"));
479
- var import_fs3 = require("fs");
480
- var tsconfigGenCjs = (pkg) => {
481
- const workspaces = pkg ? [yarnWorkspace(pkg)] : yarnWorkspaces();
482
- console.log(import_chalk10.default.green("Generate Configs [CJS]"));
483
- return workspaces.map(({ location, name }) => {
484
- try {
485
- const configObject = createBuildConfig(location, "CommonJS", "ES6", "cjs");
486
- if (configObject) {
487
- const config = JSON.stringify(createBuildConfig(location, "CommonJS", "ES6", "cjs"), null, 2);
488
- let currentConfig;
489
- try {
490
- currentConfig = (0, import_fs3.readFileSync)(`${location}/.tsconfig.build.cjs.json`, { encoding: "utf8" });
491
- } catch (ex) {
492
- currentConfig = void 0;
493
- }
494
- if (currentConfig !== config) {
495
- console.log(import_chalk10.default.gray(`Updating CJS tsconfig [${name}]`));
496
- (0, import_fs3.writeFileSync)(`${location}/.tsconfig.build.cjs.json`, config, { encoding: "utf8" });
497
- }
498
- }
499
- return 0;
500
- } catch (ex) {
501
- const error = ex;
502
- console.error(`tsconfig (CJS) generate failed [${name}] [${error.message}]`);
503
- return 1;
504
- }
505
- }).reduce((prev, value) => prev || value, 0);
506
- };
507
-
508
- // src/actions/tsconfig-gen-esm.ts
509
- var import_chalk11 = __toESM(require("chalk"));
510
- var import_fs4 = require("fs");
511
- var tsconfigGenEsm = (pkg) => {
512
- const workspaces = pkg ? [yarnWorkspace(pkg)] : yarnWorkspaces();
513
- console.log(import_chalk11.default.green("Generate Configs [ESM]"));
514
- return workspaces.map(({ location, name }) => {
515
- try {
516
- const configObject = createBuildConfig(location, "ESNext", "ESNext", "esm");
517
- if (configObject) {
518
- const config = JSON.stringify(configObject, null, 2);
519
- let currentConfig;
520
- try {
521
- currentConfig = (0, import_fs4.readFileSync)(`${location}/.tsconfig.build.esm.json`, { encoding: "utf8" });
522
- } catch (ex) {
523
- currentConfig = void 0;
524
- }
525
- if (currentConfig !== config) {
526
- console.log(import_chalk11.default.gray(`Updating ESM tsconfig [${name}]`));
527
- (0, import_fs4.writeFileSync)(`${location}/.tsconfig.build.esm.json`, config, { encoding: "utf8" });
528
- }
529
- }
530
- return 0;
531
- } catch (ex) {
532
- const error = ex;
533
- console.error(`tsconfig (ESM) generate failed [${name}] [${error.message}]`);
534
- return 1;
535
- }
536
- }).reduce((prev, value) => prev || value, 0);
537
- };
538
-
539
- // src/actions/tsconfig-gen-test.ts
540
- var import_chalk12 = __toESM(require("chalk"));
541
- var import_fs5 = require("fs");
542
- var tsconfigName = ".tsconfig.build.test.json";
543
- var tsconfig = JSON.stringify(
544
- {
545
- extends: "./tsconfig.json",
546
- include: ["src/**/*.spec.ts"]
547
- },
548
- null,
549
- 2
550
- );
551
- var tsconfigGenTest = (pkg) => {
552
- const workspaces = pkg ? [yarnWorkspace(pkg)] : yarnWorkspaces();
553
- console.log(import_chalk12.default.green("Generate Configs [Test]"));
554
- return workspaces.map(({ location, name }) => {
555
- try {
556
- let currentConfig;
557
- try {
558
- currentConfig = (0, import_fs5.readFileSync)(`${location}/${tsconfigName}`, { encoding: "utf8" });
559
- } catch (ex) {
560
- currentConfig = void 0;
561
- }
562
- if (currentConfig !== tsconfig) {
563
- console.log(import_chalk12.default.gray(`Updating TEST tsconfig [${name}]`));
564
- (0, import_fs5.writeFileSync)(`${location}/${tsconfigName}`, tsconfig, { encoding: "utf8" });
565
- }
566
- return 0;
567
- } catch (ex) {
568
- const error = ex;
569
- console.error(`tsconfig (TEST) generate failed [${name}] [${error.message}]`);
570
- return 1;
571
- }
572
- }).reduce((prev, value) => prev || value, 0);
573
- };
574
-
575
- // src/actions/tsconfig-gen.ts
576
- var tsconfigGen = ({ target, pkg }) => {
577
- switch (target) {
578
- case "esm":
579
- return tsconfigGenEsm(pkg) || tsconfigGenTest(pkg);
580
- case "cjs":
581
- return tsconfigGenCjs(pkg) || tsconfigGenTest(pkg);
582
- default:
583
- return tsconfigGenEsm(pkg) || tsconfigGenCjs(pkg) || tsconfigGenTest(pkg);
584
- }
585
- };
586
-
587
- // src/actions/tsconfig-gen-clean.ts
588
- var import_chalk13 = __toESM(require("chalk"));
589
- var import_fs6 = require("fs");
590
- var tsconfigGenClean = (pkg) => {
591
- const workspaces = pkg ? [yarnWorkspace(pkg)] : yarnWorkspaces();
592
- console.log(import_chalk13.default.green("Clean TSConfigs"));
593
- return workspaces.map(({ location, name }) => {
594
- const dist = `${location}/**/.tsconfig*`;
595
- try {
596
- (0, import_fs6.rmSync)(dist, { force: true, recursive: true });
597
- return 0;
598
- } catch (ex) {
599
- const error = ex;
600
- console.error(`Clean Failed [${name}, ${error.message}]`);
601
- return 1;
602
- }
603
- }).reduce((prev, result) => prev || result, 0);
604
- };
605
-
606
- // src/actions/upplug.ts
607
- var updateYarnPlugins = () => {
608
- return runSteps("Update Yarn Plugins", [
609
- ["yarn", ["plugin", "import", "https://mskelton.dev/yarn-outdated/v3"]],
610
- ["yarn", ["plugin", "import", "version"]],
611
- ["yarn", ["plugin", "import", "interactive-tools"]],
612
- ["yarn", ["plugin", "import", "workspace-tools"]]
613
- ]);
614
- };
615
-
616
- // src/actions/upyarn.ts
617
- var updateYarnVersion = () => {
618
- return runSteps("Update Yarn Version", [["yarn", ["set", "version", "latest"]]]);
619
- };
620
-
621
- // src/actions/yarn3only.ts
622
- var yarn3Only = () => {
623
- const [valid, version] = isYarnVersionOrGreater(3);
624
- if (!valid) {
625
- processEx(`Invalid Yarn version [${version}]`);
626
- }
627
- return 0;
628
- };
629
-
630
- // src/lib/xy/xyCommonCommands.ts
631
- var xyCommonCommands = (args) => {
632
- return args.command(
633
- "license [package]",
634
- "License - Check licenses of dependencies",
635
- (yargs) => {
636
- return yargs.positional("package", {
637
- describe: "Specific package to check"
638
- });
639
- },
640
- async (argv) => {
641
- if (argv.verbose)
642
- console.log(`License: ${argv.package ?? "all"}`);
643
- process.exitCode = await license();
644
- }
645
- ).command(
646
- "dead [package]",
647
- "Dead - Check for dead code",
648
- (yargs) => {
649
- return yargs.positional("package", {
650
- describe: "Specific package to check"
651
- });
652
- },
653
- (argv) => {
654
- if (argv.verbose)
655
- console.log("Dead");
656
- process.exitCode = dead();
657
- }
658
- ).command(
659
- "deps [package]",
660
- "Deps - Check for unused or missing dependencies",
661
- (yargs) => {
662
- return yargs.positional("package", {
663
- describe: "Specific package to check"
664
- });
665
- },
666
- (argv) => {
667
- if (argv.verbose)
668
- console.log(`Checking Dependencies: ${argv.package ?? "all"}`);
669
- process.exitCode = deps({ incremental: !!argv.incremental, jobs: argv.jobs, pkg: argv.package });
670
- }
671
- ).command(
672
- "gen-docs [package]",
673
- "GenDocs - Generate TypeDocs",
674
- (yargs) => {
675
- return yargs.positional("package", {
676
- describe: "Specific package to generate docs for"
677
- });
678
- },
679
- (argv) => {
680
- if (argv.verbose)
681
- console.log(`Generating TypeDocs: ${argv.package ?? "all"}`);
682
- process.exitCode = genDocs({ incremental: !!argv.incremental, pkg: argv.package });
683
- }
684
- ).command(
685
- "clean-docs",
686
- "CleanDocs - Clean TypeDocs",
687
- (yargs) => yargs,
688
- (argv) => {
689
- if (argv.verbose)
690
- console.log("Cleaning TypeDocs: all");
691
- process.exitCode = cleanDocs();
692
- }
693
- ).command(
694
- "gitlint [package]",
695
- "Gitlint - Lint your git config",
696
- (yargs) => {
697
- return yargs;
698
- },
699
- (argv) => {
700
- if (argv.verbose)
701
- console.log("Gitlint");
702
- process.exitCode = argv.fix ? gitlintFix() : gitlint();
703
- }
704
- ).command(
705
- "gitignore-gen",
706
- "GitIgnore Gen - Generate .gitignore files",
707
- (yargs) => {
708
- return yargs;
709
- },
710
- (argv) => {
711
- if (argv.verbose)
712
- console.log("GitIgnore Gen");
713
- process.exitCode = gitignoreGen();
714
- }
715
- ).command(
716
- "npmignore-gen",
717
- "NpmIgnore Gen - Generate .npmignore files",
718
- (yargs) => {
719
- return yargs;
720
- },
721
- (argv) => {
722
- if (argv.verbose)
723
- console.log("NpmIgnore Gen");
724
- process.exitCode = npmignoreGen();
725
- }
726
- ).command(
727
- "retest",
728
- "Re-Test - Run Jest Tests with cleaned cache",
729
- (yargs) => {
730
- return yargs;
731
- },
732
- (argv) => {
733
- if (argv.verbose)
734
- console.log("Re-Testing");
735
- process.exitCode = retest();
736
- }
737
- ).command(
738
- "test",
739
- "Test - Run Jest Tests",
740
- (yargs) => {
741
- return yargs;
742
- },
743
- (argv) => {
744
- if (argv.verbose)
745
- console.log("Testing");
746
- process.exitCode = test();
747
- }
748
- ).command(
749
- "tsconfig-gen [package]",
750
- "Tsconfig Gen - Generate tsconfig.json file for building",
751
- (yargs) => {
752
- return yargs.positional("package", {
753
- describe: "Specific package for generation"
754
- });
755
- },
756
- (argv) => {
757
- if (argv.verbose)
758
- console.log(`TsconfigGen: ${argv.package ?? "all"}`);
759
- process.exitCode = tsconfigGen({ pkg: argv.package, target: argv.target });
760
- }
761
- ).command(
762
- "tsconfig-clean",
763
- "Tsconfig Clean - Remove generated tsconfig.json files",
764
- (yargs) => {
765
- return yargs;
766
- },
767
- (argv) => {
768
- if (argv.verbose)
769
- console.log("Tsconfig Clean");
770
- process.exitCode = tsconfigGenClean();
771
- }
772
- ).command(
773
- "upplug",
774
- "UpPlug - Update Yarn Plugins",
775
- (yargs) => {
776
- return yargs;
777
- },
778
- (argv) => {
779
- if (argv.verbose)
780
- console.log("UpPlug");
781
- process.exitCode = updateYarnPlugins();
782
- }
783
- ).command(
784
- "upyarn",
785
- "UpYarn - Update Yarn Version",
786
- (yargs) => {
787
- return yargs;
788
- },
789
- (argv) => {
790
- if (argv.verbose)
791
- console.log("UpYarn");
792
- process.exitCode = updateYarnVersion();
793
- }
794
- ).command(
795
- "yarn3only",
796
- "Yarn3Only - Check if using Yarn v3",
797
- (yargs) => {
798
- return yargs;
799
- },
800
- (argv) => {
801
- if (argv.verbose)
802
- console.log("Yarn 3 Check");
803
- process.exitCode = yarn3Only();
804
- }
805
- );
806
- };
807
- // Annotate the CommonJS export names for ESM import in node:
808
- 0 && (module.exports = {
809
- xyCommonCommands
810
- });
16
+ .command('dead [package]', 'Dead - Check for dead code', (yargs) => {
17
+ return yargs.positional('package', {
18
+ describe: 'Specific package to check',
19
+ });
20
+ }, (argv) => {
21
+ if (argv.verbose)
22
+ console.log('Dead');
23
+ process.exitCode = (0, actions_1.dead)();
24
+ })
25
+ .command('deps [package]', 'Deps - Check for unused or missing dependencies', (yargs) => {
26
+ return yargs.positional('package', {
27
+ describe: 'Specific package to check',
28
+ });
29
+ }, (argv) => {
30
+ if (argv.verbose)
31
+ console.log(`Checking Dependencies: ${argv.package ?? 'all'}`);
32
+ process.exitCode = (0, actions_1.deps)({ incremental: !!argv.incremental, jobs: argv.jobs, pkg: argv.package });
33
+ })
34
+ .command('gen-docs [package]', 'GenDocs - Generate TypeDocs', (yargs) => {
35
+ return yargs.positional('package', {
36
+ describe: 'Specific package to generate docs for',
37
+ });
38
+ }, (argv) => {
39
+ if (argv.verbose)
40
+ console.log(`Generating TypeDocs: ${argv.package ?? 'all'}`);
41
+ process.exitCode = (0, actions_1.genDocs)({ incremental: !!argv.incremental, pkg: argv.package });
42
+ })
43
+ .command('clean-docs', 'CleanDocs - Clean TypeDocs', (yargs) => yargs, (argv) => {
44
+ if (argv.verbose)
45
+ console.log('Cleaning TypeDocs: all');
46
+ process.exitCode = (0, actions_1.cleanDocs)();
47
+ })
48
+ .command('gitlint [package]', 'Gitlint - Lint your git config', (yargs) => {
49
+ return yargs;
50
+ }, (argv) => {
51
+ if (argv.verbose)
52
+ console.log('Gitlint');
53
+ process.exitCode = argv.fix ? (0, actions_1.gitlintFix)() : (0, actions_1.gitlint)();
54
+ })
55
+ .command('gitignore-gen', 'GitIgnore Gen - Generate .gitignore files', (yargs) => {
56
+ return yargs;
57
+ }, (argv) => {
58
+ if (argv.verbose)
59
+ console.log('GitIgnore Gen');
60
+ process.exitCode = (0, actions_1.gitignoreGen)();
61
+ })
62
+ .command('npmignore-gen', 'NpmIgnore Gen - Generate .npmignore files', (yargs) => {
63
+ return yargs;
64
+ }, (argv) => {
65
+ if (argv.verbose)
66
+ console.log('NpmIgnore Gen');
67
+ process.exitCode = (0, actions_1.npmignoreGen)();
68
+ })
69
+ .command('retest', 'Re-Test - Run Jest Tests with cleaned cache', (yargs) => {
70
+ return yargs;
71
+ }, (argv) => {
72
+ if (argv.verbose)
73
+ console.log('Re-Testing');
74
+ process.exitCode = (0, actions_1.retest)();
75
+ })
76
+ .command('test', 'Test - Run Jest Tests', (yargs) => {
77
+ return yargs;
78
+ }, (argv) => {
79
+ if (argv.verbose)
80
+ console.log('Testing');
81
+ process.exitCode = (0, actions_1.test)();
82
+ })
83
+ .command('upplug', 'UpPlug - Update Yarn Plugins', (yargs) => {
84
+ return yargs;
85
+ }, (argv) => {
86
+ if (argv.verbose)
87
+ console.log('UpPlug');
88
+ process.exitCode = (0, actions_1.updateYarnPlugins)();
89
+ })
90
+ .command('upyarn', 'UpYarn - Update Yarn Version', (yargs) => {
91
+ return yargs;
92
+ }, (argv) => {
93
+ if (argv.verbose)
94
+ console.log('UpYarn');
95
+ process.exitCode = (0, actions_1.updateYarnVersion)();
96
+ })
97
+ .command('yarn3only', 'Yarn3Only - Check if using Yarn v3', (yargs) => {
98
+ return yargs;
99
+ }, (argv) => {
100
+ if (argv.verbose)
101
+ console.log('Yarn 3 Check');
102
+ process.exitCode = (0, actions_1.yarn3Only)();
103
+ });
104
+ };
105
+ exports.xyCommonCommands = xyCommonCommands;
811
106
  //# sourceMappingURL=xyCommonCommands.js.map