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