@xylabs/ts-scripts-yarn3 7.0.0-rc.8 → 7.0.0

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