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