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