@xylabs/ts-scripts-yarn3 7.0.0-rc.8 → 7.0.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 (273) hide show
  1. package/dist/actions/build.mjs +87 -39
  2. package/dist/actions/build.mjs.map +1 -1
  3. package/dist/actions/clean-docs.mjs +22 -8
  4. package/dist/actions/clean-docs.mjs.map +1 -1
  5. package/dist/actions/clean-eslint.mjs +11 -5
  6. package/dist/actions/clean-eslint.mjs.map +1 -1
  7. package/dist/actions/clean-jest.mjs +29 -16
  8. package/dist/actions/clean-jest.mjs.map +1 -1
  9. package/dist/actions/clean.mjs +63 -32
  10. package/dist/actions/clean.mjs.map +1 -1
  11. package/dist/actions/compile.mjs +76 -50
  12. package/dist/actions/compile.mjs.map +1 -1
  13. package/dist/actions/copy-assets.mjs +38 -23
  14. package/dist/actions/copy-assets.mjs.map +1 -1
  15. package/dist/actions/cycle.mjs +57 -28
  16. package/dist/actions/cycle.mjs.map +1 -1
  17. package/dist/actions/dead.mjs +31 -16
  18. package/dist/actions/dead.mjs.map +1 -1
  19. package/dist/actions/deplint/checkPackage/checkPackage.mjs +74 -50
  20. package/dist/actions/deplint/checkPackage/checkPackage.mjs.map +1 -1
  21. package/dist/actions/deplint/checkPackage/getUnlistedDependencies.mjs +7 -7
  22. package/dist/actions/deplint/checkPackage/getUnlistedDependencies.mjs.map +1 -1
  23. package/dist/actions/deplint/checkPackage/getUnlistedDevDependencies.mjs +6 -10
  24. package/dist/actions/deplint/checkPackage/getUnlistedDevDependencies.mjs.map +1 -1
  25. package/dist/actions/deplint/checkPackage/getUnusedDependencies.mjs +5 -5
  26. package/dist/actions/deplint/checkPackage/getUnusedDependencies.mjs.map +1 -1
  27. package/dist/actions/deplint/checkPackage/getUnusedPeerDependencies.mjs +4 -0
  28. package/dist/actions/deplint/checkPackage/getUnusedPeerDependencies.mjs.map +1 -1
  29. package/dist/actions/deplint/checkPackage/index.mjs +74 -50
  30. package/dist/actions/deplint/checkPackage/index.mjs.map +1 -1
  31. package/dist/actions/deplint/deplint.mjs +89 -62
  32. package/dist/actions/deplint/deplint.mjs.map +1 -1
  33. package/dist/actions/deplint/findFiles.mjs +20 -4
  34. package/dist/actions/deplint/findFiles.mjs.map +1 -1
  35. package/dist/actions/deplint/findFilesByGlob.mjs +8 -1
  36. package/dist/actions/deplint/findFilesByGlob.mjs.map +1 -1
  37. package/dist/actions/deplint/getBasePackageName.mjs +4 -0
  38. package/dist/actions/deplint/getBasePackageName.mjs.map +1 -1
  39. package/dist/actions/deplint/getDependenciesFromPackageJson.mjs +4 -0
  40. package/dist/actions/deplint/getDependenciesFromPackageJson.mjs.map +1 -1
  41. package/dist/actions/deplint/getExternalImportsFromFiles.mjs +24 -12
  42. package/dist/actions/deplint/getExternalImportsFromFiles.mjs.map +1 -1
  43. package/dist/actions/deplint/getImportsFromFile.mjs +16 -9
  44. package/dist/actions/deplint/getImportsFromFile.mjs.map +1 -1
  45. package/dist/actions/deplint/index.mjs +89 -62
  46. package/dist/actions/deplint/index.mjs.map +1 -1
  47. package/dist/actions/deploy-major.mjs +57 -26
  48. package/dist/actions/deploy-major.mjs.map +1 -1
  49. package/dist/actions/deploy-minor.mjs +57 -26
  50. package/dist/actions/deploy-minor.mjs.map +1 -1
  51. package/dist/actions/deploy-next.mjs +57 -26
  52. package/dist/actions/deploy-next.mjs.map +1 -1
  53. package/dist/actions/deploy.mjs +57 -26
  54. package/dist/actions/deploy.mjs.map +1 -1
  55. package/dist/actions/dupdeps.mjs +37 -26
  56. package/dist/actions/dupdeps.mjs.map +1 -1
  57. package/dist/actions/fix.mjs +54 -36
  58. package/dist/actions/fix.mjs.map +1 -1
  59. package/dist/actions/gen-docs.mjs +65 -25
  60. package/dist/actions/gen-docs.mjs.map +1 -1
  61. package/dist/actions/gitignore-gen.mjs +44 -28
  62. package/dist/actions/gitignore-gen.mjs.map +1 -1
  63. package/dist/actions/gitlint-fix.mjs +14 -5
  64. package/dist/actions/gitlint-fix.mjs.map +1 -1
  65. package/dist/actions/gitlint.mjs +7 -4
  66. package/dist/actions/gitlint.mjs.map +1 -1
  67. package/dist/actions/index.mjs +1481 -901
  68. package/dist/actions/index.mjs.map +1 -1
  69. package/dist/actions/knip.mjs +31 -16
  70. package/dist/actions/knip.mjs.map +1 -1
  71. package/dist/actions/license.mjs +51 -37
  72. package/dist/actions/license.mjs.map +1 -1
  73. package/dist/actions/lint.mjs +48 -33
  74. package/dist/actions/lint.mjs.map +1 -1
  75. package/dist/actions/npmignore-gen.mjs +44 -28
  76. package/dist/actions/npmignore-gen.mjs.map +1 -1
  77. package/dist/actions/package/clean-outputs.mjs +16 -6
  78. package/dist/actions/package/clean-outputs.mjs.map +1 -1
  79. package/dist/actions/package/clean-typescript.mjs +16 -6
  80. package/dist/actions/package/clean-typescript.mjs.map +1 -1
  81. package/dist/actions/package/clean.mjs +29 -12
  82. package/dist/actions/package/clean.mjs.map +1 -1
  83. package/dist/actions/package/compile/buildEntries.mjs +36 -8
  84. package/dist/actions/package/compile/buildEntries.mjs.map +1 -1
  85. package/dist/actions/package/compile/compile.mjs +347 -144
  86. package/dist/actions/package/compile/compile.mjs.map +1 -1
  87. package/dist/actions/package/compile/copyTypeFiles.mjs +23 -20
  88. package/dist/actions/package/compile/copyTypeFiles.mjs.map +1 -1
  89. package/dist/actions/package/compile/deepMerge.mjs +5 -0
  90. package/dist/actions/package/compile/deepMerge.mjs.map +1 -1
  91. package/dist/actions/package/compile/getCompilerOptions.mjs +9 -23
  92. package/dist/actions/package/compile/getCompilerOptions.mjs.map +1 -1
  93. package/dist/actions/package/compile/index.mjs +347 -226
  94. package/dist/actions/package/compile/index.mjs.map +1 -1
  95. package/dist/actions/package/compile/inputs.mjs +26 -3
  96. package/dist/actions/package/compile/inputs.mjs.map +1 -1
  97. package/dist/actions/package/compile/packageCompileTsc.mjs +57 -96
  98. package/dist/actions/package/compile/packageCompileTsc.mjs.map +1 -1
  99. package/dist/actions/package/compile/packageCompileTscTypes.mjs +95 -24
  100. package/dist/actions/package/compile/packageCompileTscTypes.mjs.map +1 -1
  101. package/dist/actions/package/compile/packageCompileTsup.mjs +322 -126
  102. package/dist/actions/package/compile/packageCompileTsup.mjs.map +1 -1
  103. package/dist/actions/package/copy-assets.mjs +21 -12
  104. package/dist/actions/package/copy-assets.mjs.map +1 -1
  105. package/dist/actions/package/cycle.mjs +16 -9
  106. package/dist/actions/package/cycle.mjs.map +1 -1
  107. package/dist/actions/package/gen-docs.mjs +12 -11
  108. package/dist/actions/package/gen-docs.mjs.map +1 -1
  109. package/dist/actions/package/index.mjs +467 -304
  110. package/dist/actions/package/index.mjs.map +1 -1
  111. package/dist/actions/package/lint.mjs +39 -16
  112. package/dist/actions/package/lint.mjs.map +1 -1
  113. package/dist/actions/package/publint.mjs +7 -4
  114. package/dist/actions/package/publint.mjs.map +1 -1
  115. package/dist/actions/package/recompile.mjs +375 -158
  116. package/dist/actions/package/recompile.mjs.map +1 -1
  117. package/dist/actions/publint.mjs +71 -37
  118. package/dist/actions/publint.mjs.map +1 -1
  119. package/dist/actions/rebuild.mjs +29 -17
  120. package/dist/actions/rebuild.mjs.map +1 -1
  121. package/dist/actions/recompile.mjs +67 -50
  122. package/dist/actions/recompile.mjs.map +1 -1
  123. package/dist/actions/reinstall.mjs +43 -25
  124. package/dist/actions/reinstall.mjs.map +1 -1
  125. package/dist/actions/relint.mjs +63 -40
  126. package/dist/actions/relint.mjs.map +1 -1
  127. package/dist/actions/retest.mjs +35 -17
  128. package/dist/actions/retest.mjs.map +1 -1
  129. package/dist/actions/sonar.mjs +32 -16
  130. package/dist/actions/sonar.mjs.map +1 -1
  131. package/dist/actions/statics.mjs +46 -27
  132. package/dist/actions/statics.mjs.map +1 -1
  133. package/dist/actions/test.mjs +30 -16
  134. package/dist/actions/test.mjs.map +1 -1
  135. package/dist/actions/up.mjs +27 -16
  136. package/dist/actions/up.mjs.map +1 -1
  137. package/dist/actions/updo.mjs +33 -18
  138. package/dist/actions/updo.mjs.map +1 -1
  139. package/dist/actions/upplug.mjs +53 -19
  140. package/dist/actions/upplug.mjs.map +1 -1
  141. package/dist/actions/upyarn.mjs +31 -16
  142. package/dist/actions/upyarn.mjs.map +1 -1
  143. package/dist/actions/yarn3only.mjs +23 -12
  144. package/dist/actions/yarn3only.mjs.map +1 -1
  145. package/dist/bin/package/build-only.mjs +350 -148
  146. package/dist/bin/package/build-only.mjs.map +1 -1
  147. package/dist/bin/package/build.mjs +352 -148
  148. package/dist/bin/package/build.mjs.map +1 -1
  149. package/dist/bin/package/clean-outputs.mjs +15 -6
  150. package/dist/bin/package/clean-outputs.mjs.map +1 -1
  151. package/dist/bin/package/clean-typescript.mjs +15 -6
  152. package/dist/bin/package/clean-typescript.mjs.map +1 -1
  153. package/dist/bin/package/clean.mjs +28 -12
  154. package/dist/bin/package/clean.mjs.map +1 -1
  155. package/dist/bin/package/compile-only.mjs +349 -147
  156. package/dist/bin/package/compile-only.mjs.map +1 -1
  157. package/dist/bin/package/compile-tsup.mjs +324 -129
  158. package/dist/bin/package/compile-tsup.mjs.map +1 -1
  159. package/dist/bin/package/compile.mjs +350 -148
  160. package/dist/bin/package/compile.mjs.map +1 -1
  161. package/dist/bin/package/copy-assets-cjs.mjs +23 -13
  162. package/dist/bin/package/copy-assets-cjs.mjs.map +1 -1
  163. package/dist/bin/package/copy-assets-esm.mjs +23 -13
  164. package/dist/bin/package/copy-assets-esm.mjs.map +1 -1
  165. package/dist/bin/package/cycle.mjs +17 -11
  166. package/dist/bin/package/cycle.mjs.map +1 -1
  167. package/dist/bin/package/fix.mjs +38 -16
  168. package/dist/bin/package/fix.mjs.map +1 -1
  169. package/dist/bin/package/gen-docs.mjs +11 -11
  170. package/dist/bin/package/gen-docs.mjs.map +1 -1
  171. package/dist/bin/package/lint.mjs +38 -16
  172. package/dist/bin/package/lint.mjs.map +1 -1
  173. package/dist/bin/package/publint.mjs +6 -4
  174. package/dist/bin/package/publint.mjs.map +1 -1
  175. package/dist/bin/package/recompile.mjs +376 -160
  176. package/dist/bin/package/recompile.mjs.map +1 -1
  177. package/dist/bin/package/relint.mjs +38 -16
  178. package/dist/bin/package/relint.mjs.map +1 -1
  179. package/dist/bin/xy.mjs +1319 -1056
  180. package/dist/bin/xy.mjs.map +1 -1
  181. package/dist/index.d.ts +9 -26
  182. package/dist/index.mjs +1848 -1410
  183. package/dist/index.mjs.map +1 -1
  184. package/dist/lib/checkResult.mjs +5 -2
  185. package/dist/lib/checkResult.mjs.map +1 -1
  186. package/dist/lib/createBuildConfig.mjs +24 -9
  187. package/dist/lib/createBuildConfig.mjs.map +1 -1
  188. package/dist/lib/defaultBuildConfig.mjs +6 -2
  189. package/dist/lib/defaultBuildConfig.mjs.map +1 -1
  190. package/dist/lib/deleteGlob.mjs +9 -3
  191. package/dist/lib/deleteGlob.mjs.map +1 -1
  192. package/dist/lib/dependencies/DuplicateDetector.mjs +23 -12
  193. package/dist/lib/dependencies/DuplicateDetector.mjs.map +1 -1
  194. package/dist/lib/dependencies/detectDuplicateDependencies.mjs +33 -22
  195. package/dist/lib/dependencies/detectDuplicateDependencies.mjs.map +1 -1
  196. package/dist/lib/dependencies/index.mjs +33 -22
  197. package/dist/lib/dependencies/index.mjs.map +1 -1
  198. package/dist/lib/file/ReadFileSyncOptions.mjs +3 -1
  199. package/dist/lib/file/ReadFileSyncOptions.mjs.map +1 -1
  200. package/dist/lib/file/constants.mjs.map +1 -1
  201. package/dist/lib/file/fileLines.mjs +13 -12
  202. package/dist/lib/file/fileLines.mjs.map +1 -1
  203. package/dist/lib/file/index.mjs +15 -14
  204. package/dist/lib/file/index.mjs.map +1 -1
  205. package/dist/lib/file/tryReadFileSync.mjs +8 -3
  206. package/dist/lib/file/tryReadFileSync.mjs.map +1 -1
  207. package/dist/lib/generateIgnoreFiles.mjs +43 -27
  208. package/dist/lib/generateIgnoreFiles.mjs.map +1 -1
  209. package/dist/lib/index.mjs +166 -106
  210. package/dist/lib/index.mjs.map +1 -1
  211. package/dist/lib/jsonFormatters.mjs +5 -2
  212. package/dist/lib/jsonFormatters.mjs.map +1 -1
  213. package/dist/lib/loadConfig.mjs +20 -10
  214. package/dist/lib/loadConfig.mjs.map +1 -1
  215. package/dist/lib/parsedPackageJSON.mjs +5 -2
  216. package/dist/lib/parsedPackageJSON.mjs.map +1 -1
  217. package/dist/lib/processEx.mjs +9 -6
  218. package/dist/lib/processEx.mjs.map +1 -1
  219. package/dist/lib/runSteps.mjs +19 -13
  220. package/dist/lib/runSteps.mjs.map +1 -1
  221. package/dist/lib/runStepsAsync.mjs +22 -22
  222. package/dist/lib/runStepsAsync.mjs.map +1 -1
  223. package/dist/lib/runXy.mjs +31 -19
  224. package/dist/lib/runXy.mjs.map +1 -1
  225. package/dist/lib/runXyWithWarning.mjs +5 -2
  226. package/dist/lib/runXyWithWarning.mjs.map +1 -1
  227. package/dist/lib/safeExit.mjs +13 -10
  228. package/dist/lib/safeExit.mjs.map +1 -1
  229. package/dist/lib/string/empty.mjs +5 -2
  230. package/dist/lib/string/empty.mjs.map +1 -1
  231. package/dist/lib/string/index.mjs +9 -3
  232. package/dist/lib/string/index.mjs.map +1 -1
  233. package/dist/lib/string/union.mjs +7 -1
  234. package/dist/lib/string/union.mjs.map +1 -1
  235. package/dist/lib/withErrnoException.mjs +7 -4
  236. package/dist/lib/withErrnoException.mjs.map +1 -1
  237. package/dist/lib/withError.mjs +5 -2
  238. package/dist/lib/withError.mjs.map +1 -1
  239. package/dist/lib/yarn/index.mjs +30 -11
  240. package/dist/lib/yarn/index.mjs.map +1 -1
  241. package/dist/lib/yarn/isYarnVersionOrGreater.mjs +15 -4
  242. package/dist/lib/yarn/isYarnVersionOrGreater.mjs.map +1 -1
  243. package/dist/lib/yarn/workspace/index.mjs +16 -5
  244. package/dist/lib/yarn/workspace/index.mjs.map +1 -1
  245. package/dist/lib/yarn/workspace/yarnWorkspace.mjs +16 -5
  246. package/dist/lib/yarn/workspace/yarnWorkspace.mjs.map +1 -1
  247. package/dist/lib/yarn/workspace/yarnWorkspaces.mjs +14 -3
  248. package/dist/lib/yarn/workspace/yarnWorkspaces.mjs.map +1 -1
  249. package/dist/lib/yarn/yarnInitCwd.mjs +5 -2
  250. package/dist/lib/yarn/yarnInitCwd.mjs.map +1 -1
  251. package/dist/loadPackageConfig.mjs +8 -3
  252. package/dist/loadPackageConfig.mjs.map +1 -1
  253. package/dist/xy/index.mjs +1320 -1056
  254. package/dist/xy/index.mjs.map +1 -1
  255. package/dist/xy/param.mjs +9 -3
  256. package/dist/xy/param.mjs.map +1 -1
  257. package/dist/xy/xy.mjs +1320 -1056
  258. package/dist/xy/xy.mjs.map +1 -1
  259. package/dist/xy/xyBuildCommands.mjs +324 -305
  260. package/dist/xy/xyBuildCommands.mjs.map +1 -1
  261. package/dist/xy/xyCommonCommands.mjs +336 -251
  262. package/dist/xy/xyCommonCommands.mjs.map +1 -1
  263. package/dist/xy/xyDeployCommands.mjs +161 -99
  264. package/dist/xy/xyDeployCommands.mjs.map +1 -1
  265. package/dist/xy/xyInstallCommands.mjs +193 -145
  266. package/dist/xy/xyInstallCommands.mjs.map +1 -1
  267. package/dist/xy/xyLintCommands.mjs +405 -302
  268. package/dist/xy/xyLintCommands.mjs.map +1 -1
  269. package/dist/xy/xyParseOptions.mjs +5 -2
  270. package/dist/xy/xyParseOptions.mjs.map +1 -1
  271. package/package.json +11 -9
  272. package/dist/actions/compile-types.mjs +0 -153
  273. package/dist/actions/compile-types.mjs.map +0 -1
@@ -1,6 +1,9 @@
1
+ var __defProp = Object.defineProperty;
2
+ var __name = (target, value) => __defProp(target, "name", { value, configurable: true });
3
+
1
4
  // src/lib/checkResult.ts
2
5
  import chalk from "chalk";
3
- var checkResult = (name, result, level = "error", exitOnFail = false) => {
6
+ var checkResult = /* @__PURE__ */ __name((name, result, level = "error", exitOnFail = false) => {
4
7
  if (result) {
5
8
  const exiting = exitOnFail ? "[Exiting Process]" : "[Continuing]";
6
9
  const chalkFunc = level === "error" ? chalk.red : chalk.yellow;
@@ -9,33 +12,36 @@ var checkResult = (name, result, level = "error", exitOnFail = false) => {
9
12
  process.exit(result);
10
13
  }
11
14
  }
12
- };
15
+ }, "checkResult");
13
16
 
14
17
  // src/lib/deleteGlob.ts
15
18
  import fs from "fs";
16
19
  import { glob } from "glob";
17
- var deleteGlob = (globPath) => {
20
+ var deleteGlob = /* @__PURE__ */ __name((globPath) => {
18
21
  const files = glob.sync(globPath);
19
22
  for (const file of files) {
20
- fs.rmSync(file, { recursive: true, force: true });
23
+ fs.rmSync(file, {
24
+ recursive: true,
25
+ force: true
26
+ });
21
27
  }
22
- };
28
+ }, "deleteGlob");
23
29
 
24
30
  // src/lib/processEx.ts
25
31
  import chalk2 from "chalk";
26
32
 
27
33
  // src/lib/withError.ts
28
- var withError = (ex, closure, predicate = (ex2) => !!ex2.name && !!ex2.message) => {
34
+ var withError = /* @__PURE__ */ __name((ex, closure, predicate = (ex2) => !!ex2.name && !!ex2.message) => {
29
35
  return predicate(ex) ? closure(ex) : void 0;
30
- };
36
+ }, "withError");
31
37
 
32
38
  // src/lib/withErrnoException.ts
33
- var withErrnoException = (ex, closure) => {
39
+ var withErrnoException = /* @__PURE__ */ __name((ex, closure) => {
34
40
  return withError(ex, closure, (ex2) => ex2.errno !== void 0);
35
- };
41
+ }, "withErrnoException");
36
42
 
37
43
  // src/lib/processEx.ts
38
- var processEx = (ex) => {
44
+ var processEx = /* @__PURE__ */ __name((ex) => {
39
45
  const error = typeof ex === "string" ? new Error(ex) : ex;
40
46
  const exitCode = withErrnoException(error, (error2) => {
41
47
  if (error2.code === "ENOENT") {
@@ -52,10 +58,10 @@ var processEx = (ex) => {
52
58
  return -1;
53
59
  })();
54
60
  process.exit(process.exitCode ?? exitCode);
55
- };
61
+ }, "processEx");
56
62
 
57
63
  // src/lib/safeExit.ts
58
- var safeExit = (func, exitOnFail = true) => {
64
+ var safeExit = /* @__PURE__ */ __name((func, exitOnFail = true) => {
59
65
  try {
60
66
  const result = func();
61
67
  if (result && exitOnFail) {
@@ -65,45 +71,51 @@ var safeExit = (func, exitOnFail = true) => {
65
71
  } catch (ex) {
66
72
  return processEx(ex);
67
73
  }
68
- };
74
+ }, "safeExit");
69
75
 
70
76
  // src/lib/file/constants.ts
71
77
  var WINDOWS_NEWLINE_REGEX = /\r\n/g;
72
78
  var CROSS_PLATFORM_NEWLINE = "\n";
73
79
 
74
80
  // src/lib/file/fileLines.ts
75
- import {
76
- existsSync,
77
- readFileSync,
78
- writeFileSync
79
- } from "fs";
81
+ import { existsSync, readFileSync, writeFileSync } from "fs";
80
82
 
81
83
  // src/lib/string/empty.ts
82
- var empty = (value) => value?.trim().length === 0;
83
- var notEmpty = (value) => !empty(value);
84
+ var empty = /* @__PURE__ */ __name((value) => value?.trim().length === 0, "empty");
85
+ var notEmpty = /* @__PURE__ */ __name((value) => !empty(value), "notEmpty");
84
86
 
85
87
  // src/lib/string/union.ts
86
- var union = (a, b) => /* @__PURE__ */ new Set([...new Set(a), ...new Set(b)]);
88
+ var union = /* @__PURE__ */ __name((a, b) => /* @__PURE__ */ new Set([
89
+ ...new Set(a),
90
+ ...new Set(b)
91
+ ]), "union");
87
92
 
88
93
  // src/lib/file/ReadFileSyncOptions.ts
89
- var defaultReadFileSyncOptions = { encoding: "utf8" };
94
+ var defaultReadFileSyncOptions = {
95
+ encoding: "utf8"
96
+ };
90
97
 
91
98
  // src/lib/file/fileLines.ts
92
- var readLines = (uri, options = defaultReadFileSyncOptions) => existsSync(uri) ? readFileSync(uri, options).replace(WINDOWS_NEWLINE_REGEX, CROSS_PLATFORM_NEWLINE).split(CROSS_PLATFORM_NEWLINE) : [];
93
- var readNonEmptyLines = (uri, options = defaultReadFileSyncOptions) => readLines(uri, options).filter(notEmpty);
94
- var writeLines = (uri, lines, options = defaultReadFileSyncOptions) => {
99
+ var readLines = /* @__PURE__ */ __name((uri, options = defaultReadFileSyncOptions) => existsSync(uri) ? readFileSync(uri, options).replace(WINDOWS_NEWLINE_REGEX, CROSS_PLATFORM_NEWLINE).split(CROSS_PLATFORM_NEWLINE) : [], "readLines");
100
+ var readNonEmptyLines = /* @__PURE__ */ __name((uri, options = defaultReadFileSyncOptions) => readLines(uri, options).filter(notEmpty), "readNonEmptyLines");
101
+ var writeLines = /* @__PURE__ */ __name((uri, lines, options = defaultReadFileSyncOptions) => {
95
102
  const existing = existsSync(uri) ? readFileSync(uri, options) : void 0;
96
103
  const desired = lines.join(CROSS_PLATFORM_NEWLINE);
97
104
  if (existing !== desired) writeFileSync(uri, desired, options);
98
- };
105
+ }, "writeLines");
99
106
 
100
107
  // src/lib/generateIgnoreFiles.ts
101
108
  import chalk3 from "chalk";
102
109
 
103
110
  // src/lib/yarn/isYarnVersionOrGreater.ts
104
111
  import { spawnSync } from "child_process";
105
- var isYarnVersionOrGreater = (major, minor, patch) => {
106
- const result = spawnSync("yarn", ["-v"], { encoding: "utf8", shell: true });
112
+ var isYarnVersionOrGreater = /* @__PURE__ */ __name((major, minor, patch) => {
113
+ const result = spawnSync("yarn", [
114
+ "-v"
115
+ ], {
116
+ encoding: "utf8",
117
+ shell: true
118
+ });
107
119
  const version = result.stdout.toString().replaceAll("\n", "");
108
120
  const versionNumbers = version.split(".").map((ver) => Number.parseInt(ver));
109
121
  const majorDelta = versionNumbers[0] - major;
@@ -112,43 +124,58 @@ var isYarnVersionOrGreater = (major, minor, patch) => {
112
124
  const majorOk = majorDelta >= 0;
113
125
  const minorOk = majorDelta > 0 || minorDelta >= 0;
114
126
  const patchOk = majorDelta > 0 || minorDelta > 0 || patchDelta >= 0;
115
- return [majorOk && minorOk && patchOk, version];
116
- };
127
+ return [
128
+ majorOk && minorOk && patchOk,
129
+ version
130
+ ];
131
+ }, "isYarnVersionOrGreater");
117
132
 
118
133
  // src/lib/yarn/workspace/yarnWorkspaces.ts
119
134
  import { spawnSync as spawnSync2 } from "child_process";
120
- var yarnWorkspaces = () => {
121
- const result = spawnSync2("yarn", ["workspaces", "list", "--json", "--recursive"], { encoding: "utf8", shell: true });
135
+ var yarnWorkspaces = /* @__PURE__ */ __name(() => {
136
+ const result = spawnSync2("yarn", [
137
+ "workspaces",
138
+ "list",
139
+ "--json",
140
+ "--recursive"
141
+ ], {
142
+ encoding: "utf8",
143
+ shell: true
144
+ });
122
145
  if (result.error) {
123
146
  throw result.error;
124
147
  }
125
148
  return result.stdout.toString().split("\n").slice(0, -1).map((item) => {
126
149
  return JSON.parse(item);
127
150
  });
128
- };
151
+ }, "yarnWorkspaces");
129
152
 
130
153
  // src/lib/yarn/workspace/yarnWorkspace.ts
131
- var yarnWorkspace = (pkg) => {
154
+ var yarnWorkspace = /* @__PURE__ */ __name((pkg) => {
132
155
  const workspace = yarnWorkspaces().find(({ name }) => name === pkg);
133
156
  if (!workspace) throw new Error(`Workspace ${pkg} not found`);
134
157
  return workspace;
135
- };
158
+ }, "yarnWorkspace");
136
159
 
137
160
  // src/lib/yarn/yarnInitCwd.ts
138
- var INIT_CWD = () => {
161
+ var INIT_CWD = /* @__PURE__ */ __name(() => {
139
162
  if (!process.env.INIT_CWD) console.error("Missing INIT_CWD");
140
163
  return process.env.INIT_CWD;
141
- };
164
+ }, "INIT_CWD");
142
165
 
143
166
  // src/lib/generateIgnoreFiles.ts
144
- var localeCompare = (a, b) => a.localeCompare(b);
145
- var mergeEntries = (a, b) => [...union(a, b)].sort(localeCompare);
146
- var generateIgnoreFiles = (filename3, pkg) => {
167
+ var localeCompare = /* @__PURE__ */ __name((a, b) => a.localeCompare(b), "localeCompare");
168
+ var mergeEntries = /* @__PURE__ */ __name((a, b) => [
169
+ ...union(a, b)
170
+ ].sort(localeCompare), "mergeEntries");
171
+ var generateIgnoreFiles = /* @__PURE__ */ __name((filename3, pkg) => {
147
172
  console.log(chalk3.green(`Generate ${filename3} Files`));
148
173
  const cwd = INIT_CWD() ?? ".";
149
- const workspaces = pkg ? [yarnWorkspace(pkg)] : yarnWorkspaces();
150
- const readEntries = (location) => readNonEmptyLines(`${location}/${filename3}`);
151
- const writeEntries = (location, entries) => writeLines(`${location}/${filename3}`, entries);
174
+ const workspaces = pkg ? [
175
+ yarnWorkspace(pkg)
176
+ ] : yarnWorkspaces();
177
+ const readEntries = /* @__PURE__ */ __name((location) => readNonEmptyLines(`${location}/${filename3}`), "readEntries");
178
+ const writeEntries = /* @__PURE__ */ __name((location, entries) => writeLines(`${location}/${filename3}`, entries), "writeEntries");
152
179
  const results = workspaces.map(({ location, name }) => {
153
180
  try {
154
181
  writeEntries(location, mergeEntries(readEntries(cwd), readEntries(location)));
@@ -161,13 +188,13 @@ var generateIgnoreFiles = (filename3, pkg) => {
161
188
  });
162
189
  const succeeded = results.every((result) => result === 0);
163
190
  return succeeded ? 0 : 1;
164
- };
191
+ }, "generateIgnoreFiles");
165
192
 
166
193
  // src/lib/runSteps.ts
167
194
  import { spawnSync as spawnSync3 } from "child_process";
168
195
  import { existsSync as existsSync2 } from "fs";
169
196
  import chalk4 from "chalk";
170
- var runSteps = (name, steps, exitOnFail = true, messages) => {
197
+ var runSteps = /* @__PURE__ */ __name((name, steps, exitOnFail = true, messages) => {
171
198
  return safeExit(() => {
172
199
  const pkgName = process.env.npm_package_name;
173
200
  console.log(chalk4.green(`${name} [${pkgName}]`));
@@ -183,7 +210,10 @@ var runSteps = (name, steps, exitOnFail = true, messages) => {
183
210
  const status = spawnSync3(command, Array.isArray(args) ? args : args.split(" "), {
184
211
  ...config,
185
212
  encoding: "utf8",
186
- env: { FORCE_COLOR: "3", ...process.env },
213
+ env: {
214
+ FORCE_COLOR: "3",
215
+ ...process.env
216
+ },
187
217
  shell: true,
188
218
  stdio: "inherit"
189
219
  }).status ?? 0;
@@ -192,45 +222,88 @@ var runSteps = (name, steps, exitOnFail = true, messages) => {
192
222
  }
193
223
  return totalStatus;
194
224
  }, !!exitOnFail);
195
- };
225
+ }, "runSteps");
196
226
 
197
227
  // src/actions/clean-docs.ts
198
228
  import path from "path";
199
229
  import chalk5 from "chalk";
200
- var cleanDocs = () => {
230
+ var cleanDocs = /* @__PURE__ */ __name(() => {
201
231
  const pkgName = process.env.npm_package_name;
202
232
  console.log(chalk5.green(`Cleaning Docs [${pkgName}]`));
203
233
  for (const { location } of yarnWorkspaces()) deleteGlob(path.join(location, "docs"));
204
234
  return 0;
205
- };
235
+ }, "cleanDocs");
206
236
 
207
237
  // src/actions/dead.ts
208
- var dead = () => {
209
- return runSteps("Dead", [["yarn", ["ts-prune", "-p", "tsconfig.json"]]]);
210
- };
238
+ var dead = /* @__PURE__ */ __name(() => {
239
+ return runSteps("Dead", [
240
+ [
241
+ "yarn",
242
+ [
243
+ "ts-prune",
244
+ "-p",
245
+ "tsconfig.json"
246
+ ]
247
+ ]
248
+ ]);
249
+ }, "dead");
211
250
 
212
251
  // src/actions/gen-docs.ts
213
- var genDocs = ({ pkg, incremental }) => {
214
- return pkg ? genDocsPackage({ pkg }) : genDocsAll({ incremental });
215
- };
216
- var genDocsPackage = ({ pkg }) => {
217
- const steps = [["yarn", ["workspace", pkg, "run", "package-gen-docs"]]];
218
- return runSteps(`GenDocs [${pkg}]`, [...steps]);
219
- };
220
- var genDocsAll = ({ incremental }) => {
221
- const incrementalOptions = incremental ? ["--since", "-pA"] : ["-pA"];
222
- const steps = [["yarn", ["workspaces", "foreach", ...incrementalOptions, "run", "package-gen-docs"]]];
223
- return runSteps(`GenDocs [All${incremental ? "-Incremental" : ""}]`, [...steps]);
224
- };
252
+ var genDocs = /* @__PURE__ */ __name(({ pkg, incremental }) => {
253
+ return pkg ? genDocsPackage({
254
+ pkg
255
+ }) : genDocsAll({
256
+ incremental
257
+ });
258
+ }, "genDocs");
259
+ var genDocsPackage = /* @__PURE__ */ __name(({ pkg }) => {
260
+ const steps = [
261
+ [
262
+ "yarn",
263
+ [
264
+ "workspace",
265
+ pkg,
266
+ "run",
267
+ "package-gen-docs"
268
+ ]
269
+ ]
270
+ ];
271
+ return runSteps(`GenDocs [${pkg}]`, [
272
+ ...steps
273
+ ]);
274
+ }, "genDocsPackage");
275
+ var genDocsAll = /* @__PURE__ */ __name(({ incremental }) => {
276
+ const incrementalOptions = incremental ? [
277
+ "--since",
278
+ "-pA"
279
+ ] : [
280
+ "-pA"
281
+ ];
282
+ const steps = [
283
+ [
284
+ "yarn",
285
+ [
286
+ "workspaces",
287
+ "foreach",
288
+ ...incrementalOptions,
289
+ "run",
290
+ "package-gen-docs"
291
+ ]
292
+ ]
293
+ ];
294
+ return runSteps(`GenDocs [All${incremental ? "-Incremental" : ""}]`, [
295
+ ...steps
296
+ ]);
297
+ }, "genDocsAll");
225
298
 
226
299
  // src/actions/gitignore-gen.ts
227
300
  var filename = ".gitignore";
228
- var gitignoreGen = (pkg) => generateIgnoreFiles(filename, pkg);
301
+ var gitignoreGen = /* @__PURE__ */ __name((pkg) => generateIgnoreFiles(filename, pkg), "gitignoreGen");
229
302
 
230
303
  // src/actions/gitlint.ts
231
304
  import chalk6 from "chalk";
232
305
  import ParseGitConfig from "parse-git-config";
233
- var gitlint = () => {
306
+ var gitlint = /* @__PURE__ */ __name(() => {
234
307
  console.log(`
235
308
  Gitlint Start [${process.cwd()}]
236
309
  `);
@@ -238,10 +311,10 @@ Gitlint Start [${process.cwd()}]
238
311
  let warnings = 0;
239
312
  const errors = 0;
240
313
  const gitConfig = ParseGitConfig.sync();
241
- const warn = (message) => {
314
+ const warn = /* @__PURE__ */ __name((message) => {
242
315
  console.warn(chalk6.yellow(`Warning: ${message}`));
243
316
  warnings++;
244
- };
317
+ }, "warn");
245
318
  if (gitConfig.core.ignorecase) {
246
319
  warn("Please set core.ignorecase to FALSE in .git/config file [run yarn gitlint-fix]");
247
320
  } else {
@@ -270,36 +343,42 @@ Gitlint Start [${process.cwd()}]
270
343
  console.warn(`Gitlint Finish [ ${resultMessages.join(" | ")} ]
271
344
  `);
272
345
  return warnings + errors === 0 ? 1 : 0;
273
- };
346
+ }, "gitlint");
274
347
 
275
348
  // src/actions/gitlint-fix.ts
276
349
  import { execSync } from "child_process";
277
350
  import chalk7 from "chalk";
278
351
  import ParseGitConfig2 from "parse-git-config";
279
- var gitlintFix = () => {
352
+ var gitlintFix = /* @__PURE__ */ __name(() => {
280
353
  console.log(`
281
354
  Gitlint Fix Start [${process.cwd()}]
282
355
  `);
283
356
  const gitConfig = ParseGitConfig2.sync();
284
357
  if (gitConfig.core.ignorecase) {
285
- execSync("git config core.ignorecase false", { stdio: "inherit" });
358
+ execSync("git config core.ignorecase false", {
359
+ stdio: "inherit"
360
+ });
286
361
  console.warn(chalk7.yellow("\nGitlint Fix: Updated core.ignorecase to be false\n"));
287
362
  }
288
363
  if (gitConfig.core.autocrlf !== false) {
289
- execSync("git config core.autocrlf false", { stdio: "inherit" });
364
+ execSync("git config core.autocrlf false", {
365
+ stdio: "inherit"
366
+ });
290
367
  console.warn(chalk7.yellow("\nGitlint Fix: Updated core.autocrlf to be false\n"));
291
368
  }
292
369
  if (gitConfig.core.eol !== "lf") {
293
- execSync("git config core.eol lf", { stdio: "inherit" });
370
+ execSync("git config core.eol lf", {
371
+ stdio: "inherit"
372
+ });
294
373
  console.warn(chalk7.yellow('\nGitlint Fix: Updated core.eol to be "lf"\n'));
295
374
  }
296
375
  return 1;
297
- };
376
+ }, "gitlintFix");
298
377
 
299
378
  // src/actions/license.ts
300
379
  import chalk8 from "chalk";
301
380
  import { init } from "license-checker";
302
- var license = async (pkg) => {
381
+ var license = /* @__PURE__ */ __name(async (pkg) => {
303
382
  const workspaces = yarnWorkspaces();
304
383
  const workspaceList = workspaces.filter(({ name }) => {
305
384
  return pkg === void 0 || name === pkg;
@@ -323,214 +402,220 @@ var license = async (pkg) => {
323
402
  "Python-2.0"
324
403
  ]);
325
404
  console.log(chalk8.green("License Checker"));
326
- return (await Promise.all(
327
- workspaceList.map(({ location, name }) => {
328
- return new Promise((resolve) => {
329
- init({ production: true, start: location }, (error, packages) => {
330
- if (error) {
331
- console.error(chalk8.red(`License Checker [${name}] Error`));
332
- console.error(chalk8.gray(error));
333
- console.log("\n");
334
- resolve(1);
335
- } else {
336
- console.log(chalk8.green(`License Checker [${name}]`));
337
- let count = 0;
338
- for (const [name2, info] of Object.entries(packages)) {
339
- const licenses = Array.isArray(info.licenses) ? info.licenses : [info.licenses];
340
- for (let license2 of licenses) {
341
- if (license2) {
342
- const processedLicense = license2[0] === "(" && license2.at(-1) === ")" ? license2.slice(1, -2) : license2;
343
- const orLicenses = processedLicense.split(" OR ");
344
- let orLicenseFound = false;
345
- for (const orLicense of orLicenses) {
346
- if (exclude.has(orLicense)) {
347
- orLicenseFound = true;
348
- }
349
- }
350
- if (!orLicenseFound) {
351
- count++;
352
- console.warn(chalk8.yellow(`${name2}: Package License not allowed [${license2}]`));
405
+ return (await Promise.all(workspaceList.map(({ location, name }) => {
406
+ return new Promise((resolve) => {
407
+ init({
408
+ production: true,
409
+ start: location
410
+ }, (error, packages) => {
411
+ if (error) {
412
+ console.error(chalk8.red(`License Checker [${name}] Error`));
413
+ console.error(chalk8.gray(error));
414
+ console.log("\n");
415
+ resolve(1);
416
+ } else {
417
+ console.log(chalk8.green(`License Checker [${name}]`));
418
+ let count = 0;
419
+ for (const [name2, info] of Object.entries(packages)) {
420
+ const licenses = Array.isArray(info.licenses) ? info.licenses : [
421
+ info.licenses
422
+ ];
423
+ for (let license2 of licenses) {
424
+ if (license2) {
425
+ const processedLicense = license2[0] === "(" && license2.at(-1) === ")" ? license2.slice(1, -2) : license2;
426
+ const orLicenses = processedLicense.split(" OR ");
427
+ let orLicenseFound = false;
428
+ for (const orLicense of orLicenses) {
429
+ if (exclude.has(orLicense)) {
430
+ orLicenseFound = true;
353
431
  }
354
432
  }
433
+ if (!orLicenseFound) {
434
+ count++;
435
+ console.warn(chalk8.yellow(`${name2}: Package License not allowed [${license2}]`));
436
+ }
355
437
  }
356
438
  }
357
- console.log("\n");
358
- resolve(count);
359
439
  }
360
- });
440
+ console.log("\n");
441
+ resolve(count);
442
+ }
361
443
  });
362
- })
363
- )).reduce((prev, value) => prev || value, 0);
364
- };
444
+ });
445
+ }))).reduce((prev, value) => prev || value, 0);
446
+ }, "license");
365
447
 
366
448
  // src/actions/npmignore-gen.ts
367
449
  var filename2 = ".npmignore";
368
- var npmignoreGen = (pkg) => generateIgnoreFiles(filename2, pkg);
450
+ var npmignoreGen = /* @__PURE__ */ __name((pkg) => generateIgnoreFiles(filename2, pkg), "npmignoreGen");
369
451
 
370
452
  // src/actions/retest.ts
371
- var retest = () => {
453
+ var retest = /* @__PURE__ */ __name(() => {
372
454
  return runSteps("Test", [
373
- ["yarn", ["jest", "--clearCache"]],
374
- ["yarn", ["jest", "."]]
455
+ [
456
+ "yarn",
457
+ [
458
+ "jest",
459
+ "--clearCache"
460
+ ]
461
+ ],
462
+ [
463
+ "yarn",
464
+ [
465
+ "jest",
466
+ "."
467
+ ]
468
+ ]
375
469
  ]);
376
- };
470
+ }, "retest");
377
471
 
378
472
  // src/actions/test.ts
379
- var test = () => {
380
- return runSteps("Test", [["yarn", ["vitest", "."]]]);
381
- };
473
+ var test = /* @__PURE__ */ __name(() => {
474
+ return runSteps("Test", [
475
+ [
476
+ "yarn",
477
+ [
478
+ "vitest",
479
+ "."
480
+ ]
481
+ ]
482
+ ]);
483
+ }, "test");
382
484
 
383
485
  // src/actions/upplug.ts
384
- var updateYarnPlugins = () => {
486
+ var updateYarnPlugins = /* @__PURE__ */ __name(() => {
385
487
  return runSteps("Update Yarn Plugins", [
386
- ["yarn", ["plugin", "import", "https://mskelton.dev/yarn-outdated/v3"]],
387
- ["yarn", ["plugin", "import", "version"]],
388
- ["yarn", ["plugin", "import", "interactive-tools"]],
389
- ["yarn", ["plugin", "import", "workspace-tools"]]
488
+ [
489
+ "yarn",
490
+ [
491
+ "plugin",
492
+ "import",
493
+ "https://mskelton.dev/yarn-outdated/v3"
494
+ ]
495
+ ],
496
+ [
497
+ "yarn",
498
+ [
499
+ "plugin",
500
+ "import",
501
+ "version"
502
+ ]
503
+ ],
504
+ [
505
+ "yarn",
506
+ [
507
+ "plugin",
508
+ "import",
509
+ "interactive-tools"
510
+ ]
511
+ ],
512
+ [
513
+ "yarn",
514
+ [
515
+ "plugin",
516
+ "import",
517
+ "workspace-tools"
518
+ ]
519
+ ]
390
520
  ]);
391
- };
521
+ }, "updateYarnPlugins");
392
522
 
393
523
  // src/actions/upyarn.ts
394
- var updateYarnVersion = () => {
395
- return runSteps("Update Yarn Version", [["yarn", ["set", "version", "latest"]]]);
396
- };
524
+ var updateYarnVersion = /* @__PURE__ */ __name(() => {
525
+ return runSteps("Update Yarn Version", [
526
+ [
527
+ "yarn",
528
+ [
529
+ "set",
530
+ "version",
531
+ "latest"
532
+ ]
533
+ ]
534
+ ]);
535
+ }, "updateYarnVersion");
397
536
 
398
537
  // src/actions/yarn3only.ts
399
- var yarn3Only = () => {
538
+ var yarn3Only = /* @__PURE__ */ __name(() => {
400
539
  const [valid, version] = isYarnVersionOrGreater(3);
401
540
  if (!valid) {
402
541
  processEx(`Invalid Yarn version [${version}]`);
403
542
  }
404
543
  return 0;
405
- };
544
+ }, "yarn3Only");
406
545
 
407
546
  // src/xy/param.ts
408
- var packagePositionalParam = (yargs) => {
409
- return yargs.positional("package", { describe: "Specific package to target", type: "string" });
410
- };
547
+ var packagePositionalParam = /* @__PURE__ */ __name((yargs) => {
548
+ return yargs.positional("package", {
549
+ describe: "Specific package to target",
550
+ type: "string"
551
+ });
552
+ }, "packagePositionalParam");
411
553
 
412
554
  // src/xy/xyCommonCommands.ts
413
- var xyCommonCommands = (args) => {
414
- return args.command(
415
- "license [package]",
416
- "License - Check licenses of dependencies",
417
- (yargs) => {
418
- return packagePositionalParam(yargs);
419
- },
420
- async (argv) => {
421
- if (argv.verbose) console.log(`License: ${argv.package ?? "all"}`);
422
- process.exitCode = await license();
423
- }
424
- ).command(
425
- "dead [package]",
426
- "Dead - Check for dead code",
427
- (yargs) => {
428
- return packagePositionalParam(yargs);
429
- },
430
- (argv) => {
431
- if (argv.verbose) console.log("Dead");
432
- process.exitCode = dead();
433
- }
434
- ).command(
435
- "gen-docs [package]",
436
- "GenDocs - Generate TypeDocs",
437
- (yargs) => {
438
- return packagePositionalParam(yargs);
439
- },
440
- (argv) => {
441
- if (argv.verbose) console.log(`Generating TypeDocs: ${argv.package ?? "all"}`);
442
- process.exitCode = genDocs({ incremental: !!argv.incremental, pkg: argv.package });
443
- }
444
- ).command(
445
- "clean-docs",
446
- "CleanDocs - Clean TypeDocs",
447
- (yargs) => yargs,
448
- (argv) => {
449
- if (argv.verbose) console.log("Cleaning TypeDocs: all");
450
- process.exitCode = cleanDocs();
451
- }
452
- ).command(
453
- "gitlint [package]",
454
- "Gitlint - Lint your git config",
455
- (yargs) => {
456
- return yargs;
457
- },
458
- (argv) => {
459
- if (argv.verbose) console.log("Gitlint");
460
- process.exitCode = argv.fix ? gitlintFix() : gitlint();
461
- }
462
- ).command(
463
- "gitignore-gen",
464
- "GitIgnore Gen - Generate .gitignore files",
465
- (yargs) => {
466
- return yargs;
467
- },
468
- (argv) => {
469
- if (argv.verbose) console.log("GitIgnore Gen");
470
- process.exitCode = gitignoreGen();
471
- }
472
- ).command(
473
- "npmignore-gen",
474
- "NpmIgnore Gen - Generate .npmignore files",
475
- (yargs) => {
476
- return yargs;
477
- },
478
- (argv) => {
479
- if (argv.verbose) console.log("NpmIgnore Gen");
480
- process.exitCode = npmignoreGen();
481
- }
482
- ).command(
483
- "retest",
484
- "Re-Test - Run Jest Tests with cleaned cache",
485
- (yargs) => {
486
- return yargs;
487
- },
488
- (argv) => {
489
- if (argv.verbose) console.log("Re-Testing");
490
- process.exitCode = retest();
491
- }
492
- ).command(
493
- "test",
494
- "Test - Run Jest Tests",
495
- (yargs) => {
496
- return yargs;
497
- },
498
- (argv) => {
499
- if (argv.verbose) console.log("Testing");
500
- process.exitCode = test();
501
- }
502
- ).command(
503
- "upplug",
504
- "UpPlug - Update Yarn Plugins",
505
- (yargs) => {
506
- return yargs;
507
- },
508
- (argv) => {
509
- if (argv.verbose) console.log("UpPlug");
510
- process.exitCode = updateYarnPlugins();
511
- }
512
- ).command(
513
- "upyarn",
514
- "UpYarn - Update Yarn Version",
515
- (yargs) => {
516
- return yargs;
517
- },
518
- (argv) => {
519
- if (argv.verbose) console.log("UpYarn");
520
- process.exitCode = updateYarnVersion();
521
- }
522
- ).command(
523
- "yarn3only",
524
- "Yarn3Only - Check if using Yarn v3",
525
- (yargs) => {
526
- return yargs;
527
- },
528
- (argv) => {
529
- if (argv.verbose) console.log("Yarn 3 Check");
530
- process.exitCode = yarn3Only();
531
- }
532
- );
533
- };
555
+ var xyCommonCommands = /* @__PURE__ */ __name((args) => {
556
+ return args.command("license [package]", "License - Check licenses of dependencies", (yargs) => {
557
+ return packagePositionalParam(yargs);
558
+ }, async (argv) => {
559
+ if (argv.verbose) console.log(`License: ${argv.package ?? "all"}`);
560
+ process.exitCode = await license();
561
+ }).command("dead [package]", "Dead - Check for dead code", (yargs) => {
562
+ return packagePositionalParam(yargs);
563
+ }, (argv) => {
564
+ if (argv.verbose) console.log("Dead");
565
+ process.exitCode = dead();
566
+ }).command("gen-docs [package]", "GenDocs - Generate TypeDocs", (yargs) => {
567
+ return packagePositionalParam(yargs);
568
+ }, (argv) => {
569
+ if (argv.verbose) console.log(`Generating TypeDocs: ${argv.package ?? "all"}`);
570
+ process.exitCode = genDocs({
571
+ incremental: !!argv.incremental,
572
+ pkg: argv.package
573
+ });
574
+ }).command("clean-docs", "CleanDocs - Clean TypeDocs", (yargs) => yargs, (argv) => {
575
+ if (argv.verbose) console.log("Cleaning TypeDocs: all");
576
+ process.exitCode = cleanDocs();
577
+ }).command("gitlint [package]", "Gitlint - Lint your git config", (yargs) => {
578
+ return yargs;
579
+ }, (argv) => {
580
+ if (argv.verbose) console.log("Gitlint");
581
+ process.exitCode = argv.fix ? gitlintFix() : gitlint();
582
+ }).command("gitignore-gen", "GitIgnore Gen - Generate .gitignore files", (yargs) => {
583
+ return yargs;
584
+ }, (argv) => {
585
+ if (argv.verbose) console.log("GitIgnore Gen");
586
+ process.exitCode = gitignoreGen();
587
+ }).command("npmignore-gen", "NpmIgnore Gen - Generate .npmignore files", (yargs) => {
588
+ return yargs;
589
+ }, (argv) => {
590
+ if (argv.verbose) console.log("NpmIgnore Gen");
591
+ process.exitCode = npmignoreGen();
592
+ }).command("retest", "Re-Test - Run Jest Tests with cleaned cache", (yargs) => {
593
+ return yargs;
594
+ }, (argv) => {
595
+ if (argv.verbose) console.log("Re-Testing");
596
+ process.exitCode = retest();
597
+ }).command("test", "Test - Run Jest Tests", (yargs) => {
598
+ return yargs;
599
+ }, (argv) => {
600
+ if (argv.verbose) console.log("Testing");
601
+ process.exitCode = test();
602
+ }).command("upplug", "UpPlug - Update Yarn Plugins", (yargs) => {
603
+ return yargs;
604
+ }, (argv) => {
605
+ if (argv.verbose) console.log("UpPlug");
606
+ process.exitCode = updateYarnPlugins();
607
+ }).command("upyarn", "UpYarn - Update Yarn Version", (yargs) => {
608
+ return yargs;
609
+ }, (argv) => {
610
+ if (argv.verbose) console.log("UpYarn");
611
+ process.exitCode = updateYarnVersion();
612
+ }).command("yarn3only", "Yarn3Only - Check if using Yarn v3", (yargs) => {
613
+ return yargs;
614
+ }, (argv) => {
615
+ if (argv.verbose) console.log("Yarn 3 Check");
616
+ process.exitCode = yarn3Only();
617
+ });
618
+ }, "xyCommonCommands");
534
619
  export {
535
620
  xyCommonCommands
536
621
  };