@xylabs/ts-scripts-yarn3 7.0.0-rc.9 → 7.0.1

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 +84 -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 +84 -50
  30. package/dist/actions/deplint/checkPackage/index.mjs.map +1 -1
  31. package/dist/actions/deplint/deplint.mjs +120 -81
  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 +120 -81
  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 +1555 -966
  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 +341 -185
  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 +341 -267
  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 +13 -12
  108. package/dist/actions/package/gen-docs.mjs.map +1 -1
  109. package/dist/actions/package/index.mjs +507 -347
  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 +9 -6
  114. package/dist/actions/package/publint.mjs.map +1 -1
  115. package/dist/actions/package/recompile.mjs +371 -201
  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 +346 -191
  146. package/dist/bin/package/build-only.mjs.map +1 -1
  147. package/dist/bin/package/build.mjs +348 -191
  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 +345 -190
  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 +346 -191
  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 +12 -12
  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 +8 -6
  174. package/dist/bin/package/publint.mjs.map +1 -1
  175. package/dist/bin/package/recompile.mjs +372 -203
  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 +1351 -1075
  180. package/dist/bin/xy.mjs.map +1 -1
  181. package/dist/index.d.ts +133 -121
  182. package/dist/index.mjs +1908 -1460
  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 +1351 -1074
  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 +1351 -1074
  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 +437 -321
  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 +13 -12
  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,349 +921,469 @@ 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, verbose = false }) {
904
1023
  const { srcFiles, distFiles } = findFiles(location);
1024
+ if (verbose) {
1025
+ console.info(`Checking package: ${name} at ${location}`);
1026
+ console.info(`Source files: ${srcFiles.length}, Distribution files: ${distFiles.length}`);
1027
+ for (const file of srcFiles) {
1028
+ console.info(`Source file: ${file}`);
1029
+ }
1030
+ for (const file of distFiles) {
1031
+ console.info(`Distribution file: ${file}`);
1032
+ }
1033
+ }
905
1034
  const checkDeps = deps || !(deps || devDeps || peerDeps);
906
1035
  const checkDevDeps = devDeps || !(deps || devDeps || peerDeps);
907
1036
  const checkPeerDeps = peerDeps;
908
- const sourceParams = getExternalImportsFromFiles({ srcFiles, distFiles });
1037
+ const sourceParams = getExternalImportsFromFiles({
1038
+ srcFiles,
1039
+ distFiles
1040
+ });
909
1041
  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;
1042
+ const unlistedDependencies = checkDeps ? getUnlistedDependencies({
1043
+ name,
1044
+ location
1045
+ }, packageParams, sourceParams) : 0;
1046
+ const unusedDependencies = checkDeps ? getUnusedDependencies({
1047
+ name,
1048
+ location
1049
+ }, packageParams, sourceParams) : 0;
1050
+ const unlistedDevDependencies = checkDevDeps ? getUnlistedDevDependencies({
1051
+ name,
1052
+ location
1053
+ }, packageParams, sourceParams) : 0;
1054
+ const unusedPeerDependencies = checkPeerDeps ? getUnusedPeerDependencies({
1055
+ name,
1056
+ location
1057
+ }, packageParams, sourceParams) : 0;
914
1058
  const totalErrors = unlistedDependencies + unlistedDevDependencies + unusedDependencies + unusedPeerDependencies;
915
1059
  return totalErrors;
916
1060
  }
1061
+ __name(checkPackage, "checkPackage");
917
1062
 
918
1063
  // src/actions/deplint/deplint.ts
919
- var deplint = ({
920
- pkg,
921
- deps,
922
- devDeps,
923
- peerDeps
924
- }) => {
925
- if (pkg) {
926
- const { location, name } = yarnWorkspace(pkg);
927
- console.log(`Running Deplint for ${name}`);
928
- checkPackage({
929
- name,
930
- location,
931
- devDeps,
932
- deps,
933
- peerDeps
934
- });
935
- } else {
1064
+ var deplint = /* @__PURE__ */ __name(({ pkg, deps, devDeps, peerDeps, verbose }) => {
1065
+ let totalErrors = 0;
1066
+ if (pkg === void 0) {
936
1067
  const workspaces = yarnWorkspaces();
937
- console.log("Deplint Started...");
938
- let totalErrors = 0;
1068
+ console.info("Deplint Started...");
939
1069
  for (const workspace of workspaces) {
940
1070
  totalErrors += checkPackage({
941
1071
  ...workspace,
942
1072
  deps,
943
1073
  devDeps,
944
- peerDeps
1074
+ peerDeps,
1075
+ verbose
945
1076
  });
946
1077
  }
947
- if (totalErrors > 0) {
948
- console.log(`Deplint: Found ${chalk16.red(totalErrors)} dependency problems. ${chalk16.red("\u2716")}`);
949
- } else {
950
- console.log(`Deplint: Found no dependency problems. ${chalk16.green("\u2714")}`);
951
- }
1078
+ } else {
1079
+ const { location, name } = yarnWorkspace(pkg);
1080
+ console.info(`Running Deplint for ${name}`);
1081
+ totalErrors += checkPackage({
1082
+ name,
1083
+ location,
1084
+ devDeps,
1085
+ deps,
1086
+ peerDeps,
1087
+ verbose
1088
+ });
1089
+ }
1090
+ if (totalErrors > 0) {
1091
+ console.warn(`Deplint: Found ${chalk15.red(totalErrors)} dependency problems. ${chalk15.red("\u2716")}`);
1092
+ } else {
1093
+ console.info(`Deplint: Found no dependency problems. ${chalk15.green("\u2714")}`);
952
1094
  }
953
1095
  return 0;
954
- };
1096
+ }, "deplint");
955
1097
 
956
1098
  // src/actions/deploy.ts
957
1099
  import { readFileSync as readFileSync3 } from "fs";
958
- var privatePackageExcludeList = () => {
1100
+ var privatePackageExcludeList = /* @__PURE__ */ __name(() => {
959
1101
  const possibleDeployablePackages = yarnWorkspaces().map((workspace) => [
960
1102
  workspace,
961
- JSON.parse(readFileSync3(`${workspace.location}/package.json`, { encoding: "utf8" }))
1103
+ JSON.parse(readFileSync3(`${workspace.location}/package.json`, {
1104
+ encoding: "utf8"
1105
+ }))
962
1106
  ]);
963
1107
  const privatePackages = possibleDeployablePackages.filter(([_, pkg]) => pkg.private).map(([workspace]) => workspace);
964
1108
  const excludeList = privatePackages.map((workspace) => `--exclude ${workspace.name}`);
965
1109
  return excludeList;
966
- };
967
- var deploy = () => {
1110
+ }, "privatePackageExcludeList");
1111
+ var deploy = /* @__PURE__ */ __name(() => {
968
1112
  const excludeList = privatePackageExcludeList();
969
1113
  if (excludeList.length > 0) {
970
1114
  console.log("Excluding private packages from deployment:", excludeList);
971
1115
  }
972
1116
  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`]
1117
+ [
1118
+ "yarn",
1119
+ "workspaces foreach --all version patch --deferred"
1120
+ ],
1121
+ [
1122
+ "yarn",
1123
+ "xy clean"
1124
+ ],
1125
+ [
1126
+ "yarn",
1127
+ "xy build"
1128
+ ],
1129
+ [
1130
+ "yarn",
1131
+ "version apply --all"
1132
+ ],
1133
+ [
1134
+ "yarn",
1135
+ `workspaces foreach --all ${excludeList.join(" ")} --parallel npm publish`
1136
+ ]
978
1137
  ]);
979
- };
1138
+ }, "deploy");
980
1139
 
981
1140
  // src/actions/deploy-major.ts
982
1141
  import { readFileSync as readFileSync4 } from "fs";
983
- var privatePackageExcludeList2 = () => {
1142
+ var privatePackageExcludeList2 = /* @__PURE__ */ __name(() => {
984
1143
  const possibleDeployablePackages = yarnWorkspaces().map((workspace) => [
985
1144
  workspace,
986
- JSON.parse(readFileSync4(`${workspace.location}/package.json`, { encoding: "utf8" }))
1145
+ JSON.parse(readFileSync4(`${workspace.location}/package.json`, {
1146
+ encoding: "utf8"
1147
+ }))
987
1148
  ]);
988
1149
  const privatePackages = possibleDeployablePackages.filter(([_, pkg]) => pkg.private).map(([workspace]) => workspace);
989
1150
  const excludeList = privatePackages.map((workspace) => `--exclude ${workspace.name}`);
990
1151
  return excludeList;
991
- };
992
- var deployMajor = () => {
1152
+ }, "privatePackageExcludeList");
1153
+ var deployMajor = /* @__PURE__ */ __name(() => {
993
1154
  const excludeList = privatePackageExcludeList2();
994
1155
  if (excludeList.length > 0) {
995
1156
  console.log("Excluding private packages from deployment:", excludeList);
996
1157
  }
997
1158
  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`]
1159
+ [
1160
+ "yarn",
1161
+ "workspaces foreach --all version major --deferred"
1162
+ ],
1163
+ [
1164
+ "yarn",
1165
+ "xy clean"
1166
+ ],
1167
+ [
1168
+ "yarn",
1169
+ "xy build"
1170
+ ],
1171
+ [
1172
+ "yarn",
1173
+ "version apply --all"
1174
+ ],
1175
+ [
1176
+ "yarn",
1177
+ `workspaces foreach --all ${excludeList.join(" ")} --parallel npm publish`
1178
+ ]
1003
1179
  ]);
1004
- };
1180
+ }, "deployMajor");
1005
1181
 
1006
1182
  // src/actions/deploy-minor.ts
1007
1183
  import { readFileSync as readFileSync5 } from "fs";
1008
- var privatePackageExcludeList3 = () => {
1184
+ var privatePackageExcludeList3 = /* @__PURE__ */ __name(() => {
1009
1185
  const possibleDeployablePackages = yarnWorkspaces().map((workspace) => [
1010
1186
  workspace,
1011
- JSON.parse(readFileSync5(`${workspace.location}/package.json`, { encoding: "utf8" }))
1187
+ JSON.parse(readFileSync5(`${workspace.location}/package.json`, {
1188
+ encoding: "utf8"
1189
+ }))
1012
1190
  ]);
1013
1191
  const privatePackages = possibleDeployablePackages.filter(([_, pkg]) => pkg.private).map(([workspace]) => workspace);
1014
1192
  const excludeList = privatePackages.map((workspace) => `--exclude ${workspace.name}`);
1015
1193
  return excludeList;
1016
- };
1017
- var deployMinor = () => {
1194
+ }, "privatePackageExcludeList");
1195
+ var deployMinor = /* @__PURE__ */ __name(() => {
1018
1196
  const excludeList = privatePackageExcludeList3();
1019
1197
  if (excludeList.length > 0) {
1020
1198
  console.log("Excluding private packages from deployment:", excludeList);
1021
1199
  }
1022
1200
  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`]
1201
+ [
1202
+ "yarn",
1203
+ "workspaces foreach --all version minor --deferred"
1204
+ ],
1205
+ [
1206
+ "yarn",
1207
+ "xy clean"
1208
+ ],
1209
+ [
1210
+ "yarn",
1211
+ "xy build"
1212
+ ],
1213
+ [
1214
+ "yarn",
1215
+ "version apply --all"
1216
+ ],
1217
+ [
1218
+ "yarn",
1219
+ `workspaces foreach --all ${excludeList.join(" ")} --parallel npm publish`
1220
+ ]
1028
1221
  ]);
1029
- };
1222
+ }, "deployMinor");
1030
1223
 
1031
1224
  // src/actions/deploy-next.ts
1032
1225
  import { readFileSync as readFileSync6 } from "fs";
1033
- var privatePackageExcludeList4 = () => {
1226
+ var privatePackageExcludeList4 = /* @__PURE__ */ __name(() => {
1034
1227
  const possibleDeployablePackages = yarnWorkspaces().map((workspace) => [
1035
1228
  workspace,
1036
- JSON.parse(readFileSync6(`${workspace.location}/package.json`, { encoding: "utf8" }))
1229
+ JSON.parse(readFileSync6(`${workspace.location}/package.json`, {
1230
+ encoding: "utf8"
1231
+ }))
1037
1232
  ]);
1038
1233
  const privatePackages = possibleDeployablePackages.filter(([_, pkg]) => pkg.private).map(([workspace]) => workspace);
1039
1234
  const excludeList = privatePackages.map((workspace) => `--exclude ${workspace.name}`);
1040
1235
  return excludeList;
1041
- };
1042
- var deployNext = () => {
1236
+ }, "privatePackageExcludeList");
1237
+ var deployNext = /* @__PURE__ */ __name(() => {
1043
1238
  const excludeList = privatePackageExcludeList4();
1044
1239
  if (excludeList.length > 0) {
1045
1240
  console.log("Excluding private packages from deployment:", excludeList);
1046
1241
  }
1047
1242
  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`]
1053
- ]);
1054
- };
1243
+ [
1244
+ "yarn",
1245
+ "workspaces foreach --all version minor --deferred"
1246
+ ],
1247
+ [
1248
+ "yarn",
1249
+ "xy clean"
1250
+ ],
1251
+ [
1252
+ "yarn",
1253
+ "xy build"
1254
+ ],
1255
+ [
1256
+ "yarn",
1257
+ "version apply --all --prerelease"
1258
+ ],
1259
+ [
1260
+ "yarn",
1261
+ `workspaces foreach --all ${excludeList.join(" ")} --parallel npm publish --tag next`
1262
+ ]
1263
+ ]);
1264
+ }, "deployNext");
1055
1265
 
1056
1266
  // src/actions/dupdeps.ts
1057
- import chalk17 from "chalk";
1058
- var dupdeps = () => {
1059
- console.log(chalk17.green("Checking all Dependencies for Duplicates"));
1267
+ import chalk16 from "chalk";
1268
+ var dupdeps = /* @__PURE__ */ __name(() => {
1269
+ console.log(chalk16.green("Checking all Dependencies for Duplicates"));
1060
1270
  const allDependencies = parsedPackageJSON()?.dependencies;
1061
1271
  const dependencies = Object.entries(allDependencies).map(([k]) => k);
1062
1272
  return detectDuplicateDependencies(dependencies);
1063
- };
1273
+ }, "dupdeps");
1064
1274
 
1065
1275
  // src/actions/lint.ts
1066
- import chalk18 from "chalk";
1067
- var lintPackage = ({ pkg, fix: fix2 }) => {
1068
- console.log(chalk18.gray(`${fix2 ? "Fix" : "Lint"} [${pkg}]`));
1276
+ import chalk17 from "chalk";
1277
+ var lintPackage = /* @__PURE__ */ __name(({ pkg, fix: fix2 }) => {
1278
+ console.log(chalk17.gray(`${fix2 ? "Fix" : "Lint"} [${pkg}]`));
1069
1279
  const start = Date.now();
1070
1280
  const result = runSteps(`${fix2 ? "Fix" : "Lint"} [${pkg}]`, [
1071
- ["yarn", [
1072
- "workspace",
1073
- pkg,
1074
- "run",
1075
- fix2 ? "package-fix" : "package-lint"
1076
- ]]
1281
+ [
1282
+ "yarn",
1283
+ [
1284
+ "workspace",
1285
+ pkg,
1286
+ "run",
1287
+ fix2 ? "package-fix" : "package-lint"
1288
+ ]
1289
+ ]
1077
1290
  ]);
1078
- console.log(chalk18.gray(`${fix2 ? "Fixed in" : "Linted in"} [${chalk18.magenta(((Date.now() - start) / 1e3).toFixed(2))}] ${chalk18.gray("seconds")}`));
1291
+ console.log(chalk17.gray(`${fix2 ? "Fixed in" : "Linted in"} [${chalk17.magenta(((Date.now() - start) / 1e3).toFixed(2))}] ${chalk17.gray("seconds")}`));
1079
1292
  return result;
1080
- };
1081
- var lint = ({
1082
- pkg,
1083
- verbose,
1084
- incremental,
1085
- fix: fix2
1086
- } = {}) => {
1293
+ }, "lintPackage");
1294
+ var lint = /* @__PURE__ */ __name(({ pkg, verbose, incremental, fix: fix2 } = {}) => {
1087
1295
  return pkg === void 0 ? lintAllPackages({
1088
1296
  verbose,
1089
1297
  incremental,
1090
1298
  fix: fix2
1091
- }) : lintPackage({ pkg, fix: fix2 });
1092
- };
1093
- var lintAllPackages = ({ fix: fix2 = false } = {}) => {
1094
- console.log(chalk18.gray(`${fix2 ? "Fix" : "Lint"} [All-Packages]`));
1299
+ }) : lintPackage({
1300
+ pkg,
1301
+ fix: fix2
1302
+ });
1303
+ }, "lint");
1304
+ var lintAllPackages = /* @__PURE__ */ __name(({ fix: fix2 = false } = {}) => {
1305
+ console.log(chalk17.gray(`${fix2 ? "Fix" : "Lint"} [All-Packages]`));
1095
1306
  const start = Date.now();
1096
- const fixOptions = fix2 ? ["--fix"] : [];
1307
+ const fixOptions = fix2 ? [
1308
+ "--fix"
1309
+ ] : [];
1097
1310
  const result = runSteps(`${fix2 ? "Fix" : "Lint"} [All-Packages]`, [
1098
- ["yarn", ["eslint", ...fixOptions]]
1311
+ [
1312
+ "yarn",
1313
+ [
1314
+ "eslint",
1315
+ ...fixOptions
1316
+ ]
1317
+ ]
1099
1318
  ]);
1100
- console.log(chalk18.gray(`${fix2 ? "Fixed in" : "Linted in"} [${chalk18.magenta(((Date.now() - start) / 1e3).toFixed(2))}] ${chalk18.gray("seconds")}`));
1319
+ console.log(chalk17.gray(`${fix2 ? "Fixed in" : "Linted in"} [${chalk17.magenta(((Date.now() - start) / 1e3).toFixed(2))}] ${chalk17.gray("seconds")}`));
1101
1320
  return result;
1102
- };
1321
+ }, "lintAllPackages");
1103
1322
 
1104
1323
  // src/actions/fix.ts
1105
- var fix = (params) => {
1106
- return lint({ ...params, fix: true });
1107
- };
1324
+ var fix = /* @__PURE__ */ __name((params) => {
1325
+ return lint({
1326
+ ...params,
1327
+ fix: true
1328
+ });
1329
+ }, "fix");
1108
1330
 
1109
1331
  // 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
- };
1332
+ var genDocs = /* @__PURE__ */ __name(({ pkg, incremental }) => {
1333
+ return pkg ? genDocsPackage({
1334
+ pkg
1335
+ }) : genDocsAll({
1336
+ incremental
1337
+ });
1338
+ }, "genDocs");
1339
+ var genDocsPackage = /* @__PURE__ */ __name(({ pkg }) => {
1340
+ const steps = [
1341
+ [
1342
+ "yarn",
1343
+ [
1344
+ "workspace",
1345
+ pkg,
1346
+ "run",
1347
+ "package-gen-docs"
1348
+ ]
1349
+ ]
1350
+ ];
1351
+ return runSteps(`GenDocs [${pkg}]`, [
1352
+ ...steps
1353
+ ]);
1354
+ }, "genDocsPackage");
1355
+ var genDocsAll = /* @__PURE__ */ __name(({ incremental }) => {
1356
+ const incrementalOptions = incremental ? [
1357
+ "--since",
1358
+ "-pA"
1359
+ ] : [
1360
+ "-pA"
1361
+ ];
1362
+ const steps = [
1363
+ [
1364
+ "yarn",
1365
+ [
1366
+ "workspaces",
1367
+ "foreach",
1368
+ ...incrementalOptions,
1369
+ "run",
1370
+ "package-gen-docs"
1371
+ ]
1372
+ ]
1373
+ ];
1374
+ return runSteps(`GenDocs [All${incremental ? "-Incremental" : ""}]`, [
1375
+ ...steps
1376
+ ]);
1377
+ }, "genDocsAll");
1122
1378
 
1123
1379
  // src/actions/gitignore-gen.ts
1124
1380
  var filename = ".gitignore";
1125
- var gitignoreGen = (pkg) => generateIgnoreFiles(filename, pkg);
1381
+ var gitignoreGen = /* @__PURE__ */ __name((pkg) => generateIgnoreFiles(filename, pkg), "gitignoreGen");
1126
1382
 
1127
1383
  // src/actions/gitlint.ts
1128
- import chalk19 from "chalk";
1384
+ import chalk18 from "chalk";
1129
1385
  import ParseGitConfig from "parse-git-config";
1130
- var gitlint = () => {
1386
+ var gitlint = /* @__PURE__ */ __name(() => {
1131
1387
  console.log(`
1132
1388
  Gitlint Start [${process.cwd()}]
1133
1389
  `);
@@ -1135,10 +1391,10 @@ Gitlint Start [${process.cwd()}]
1135
1391
  let warnings = 0;
1136
1392
  const errors = 0;
1137
1393
  const gitConfig = ParseGitConfig.sync();
1138
- const warn = (message) => {
1139
- console.warn(chalk19.yellow(`Warning: ${message}`));
1394
+ const warn = /* @__PURE__ */ __name((message) => {
1395
+ console.warn(chalk18.yellow(`Warning: ${message}`));
1140
1396
  warnings++;
1141
- };
1397
+ }, "warn");
1142
1398
  if (gitConfig.core.ignorecase) {
1143
1399
  warn("Please set core.ignorecase to FALSE in .git/config file [run yarn gitlint-fix]");
1144
1400
  } else {
@@ -1156,52 +1412,67 @@ Gitlint Start [${process.cwd()}]
1156
1412
  }
1157
1413
  const resultMessages = [];
1158
1414
  if (valid > 0) {
1159
- resultMessages.push(chalk19.green(`Passed: ${valid}`));
1415
+ resultMessages.push(chalk18.green(`Passed: ${valid}`));
1160
1416
  }
1161
1417
  if (warnings > 0) {
1162
- resultMessages.push(chalk19.yellow(`Warnings: ${warnings}`));
1418
+ resultMessages.push(chalk18.yellow(`Warnings: ${warnings}`));
1163
1419
  }
1164
1420
  if (errors > 0) {
1165
- resultMessages.push(chalk19.red(` Errors: ${errors}`));
1421
+ resultMessages.push(chalk18.red(` Errors: ${errors}`));
1166
1422
  }
1167
1423
  console.warn(`Gitlint Finish [ ${resultMessages.join(" | ")} ]
1168
1424
  `);
1169
1425
  return warnings + errors === 0 ? 1 : 0;
1170
- };
1426
+ }, "gitlint");
1171
1427
 
1172
1428
  // src/actions/gitlint-fix.ts
1173
1429
  import { execSync as execSync2 } from "child_process";
1174
- import chalk20 from "chalk";
1430
+ import chalk19 from "chalk";
1175
1431
  import ParseGitConfig2 from "parse-git-config";
1176
- var gitlintFix = () => {
1432
+ var gitlintFix = /* @__PURE__ */ __name(() => {
1177
1433
  console.log(`
1178
1434
  Gitlint Fix Start [${process.cwd()}]
1179
1435
  `);
1180
1436
  const gitConfig = ParseGitConfig2.sync();
1181
1437
  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"));
1438
+ execSync2("git config core.ignorecase false", {
1439
+ stdio: "inherit"
1440
+ });
1441
+ console.warn(chalk19.yellow("\nGitlint Fix: Updated core.ignorecase to be false\n"));
1184
1442
  }
1185
1443
  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"));
1444
+ execSync2("git config core.autocrlf false", {
1445
+ stdio: "inherit"
1446
+ });
1447
+ console.warn(chalk19.yellow("\nGitlint Fix: Updated core.autocrlf to be false\n"));
1188
1448
  }
1189
1449
  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'));
1450
+ execSync2("git config core.eol lf", {
1451
+ stdio: "inherit"
1452
+ });
1453
+ console.warn(chalk19.yellow('\nGitlint Fix: Updated core.eol to be "lf"\n'));
1192
1454
  }
1193
1455
  return 1;
1194
- };
1456
+ }, "gitlintFix");
1195
1457
 
1196
1458
  // src/actions/knip.ts
1197
- var knip = () => {
1198
- return runSteps("Knip", [["yarn", ["knip", "--dependencies", "--no-exit-code"]]]);
1199
- };
1459
+ var knip = /* @__PURE__ */ __name(() => {
1460
+ return runSteps("Knip", [
1461
+ [
1462
+ "yarn",
1463
+ [
1464
+ "knip",
1465
+ "--dependencies",
1466
+ "--no-exit-code"
1467
+ ]
1468
+ ]
1469
+ ]);
1470
+ }, "knip");
1200
1471
 
1201
1472
  // src/actions/license.ts
1202
- import chalk21 from "chalk";
1473
+ import chalk20 from "chalk";
1203
1474
  import { init } from "license-checker";
1204
- var license = async (pkg) => {
1475
+ var license = /* @__PURE__ */ __name(async (pkg) => {
1205
1476
  const workspaces = yarnWorkspaces();
1206
1477
  const workspaceList = workspaces.filter(({ name }) => {
1207
1478
  return pkg === void 0 || name === pkg;
@@ -1224,79 +1495,114 @@ var license = async (pkg) => {
1224
1495
  "LGPL-3.0-or-later",
1225
1496
  "Python-2.0"
1226
1497
  ]);
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}]`));
1498
+ console.log(chalk20.green("License Checker"));
1499
+ return (await Promise.all(workspaceList.map(({ location, name }) => {
1500
+ return new Promise((resolve) => {
1501
+ init({
1502
+ production: true,
1503
+ start: location
1504
+ }, (error, packages) => {
1505
+ if (error) {
1506
+ console.error(chalk20.red(`License Checker [${name}] Error`));
1507
+ console.error(chalk20.gray(error));
1508
+ console.log("\n");
1509
+ resolve(1);
1510
+ } else {
1511
+ console.log(chalk20.green(`License Checker [${name}]`));
1512
+ let count = 0;
1513
+ for (const [name2, info] of Object.entries(packages)) {
1514
+ const licenses = Array.isArray(info.licenses) ? info.licenses : [
1515
+ info.licenses
1516
+ ];
1517
+ for (let license2 of licenses) {
1518
+ if (license2) {
1519
+ const processedLicense = license2[0] === "(" && license2.at(-1) === ")" ? license2.slice(1, -2) : license2;
1520
+ const orLicenses = processedLicense.split(" OR ");
1521
+ let orLicenseFound = false;
1522
+ for (const orLicense of orLicenses) {
1523
+ if (exclude.has(orLicense)) {
1524
+ orLicenseFound = true;
1255
1525
  }
1256
1526
  }
1527
+ if (!orLicenseFound) {
1528
+ count++;
1529
+ console.warn(chalk20.yellow(`${name2}: Package License not allowed [${license2}]`));
1530
+ }
1257
1531
  }
1258
1532
  }
1259
- console.log("\n");
1260
- resolve(count);
1261
1533
  }
1262
- });
1534
+ console.log("\n");
1535
+ resolve(count);
1536
+ }
1263
1537
  });
1264
- })
1265
- )).reduce((prev, value) => prev || value, 0);
1266
- };
1538
+ });
1539
+ }))).reduce((prev, value) => prev || value, 0);
1540
+ }, "license");
1267
1541
 
1268
1542
  // src/actions/npmignore-gen.ts
1269
1543
  var filename2 = ".npmignore";
1270
- var npmignoreGen = (pkg) => generateIgnoreFiles(filename2, pkg);
1544
+ var npmignoreGen = /* @__PURE__ */ __name((pkg) => generateIgnoreFiles(filename2, pkg), "npmignoreGen");
1271
1545
 
1272
1546
  // 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
- };
1547
+ var publint = /* @__PURE__ */ __name(async ({ verbose, pkg }) => {
1548
+ return pkg === void 0 ? publintAll({
1549
+ verbose
1550
+ }) : await publintPackage({
1551
+ pkg,
1552
+ verbose
1553
+ });
1554
+ }, "publint");
1555
+ var publintPackage = /* @__PURE__ */ __name(({ pkg }) => {
1556
+ return runStepsAsync(`Publint [${pkg}]`, [
1557
+ [
1558
+ "yarn",
1559
+ [
1560
+ "workspace",
1561
+ pkg,
1562
+ "run",
1563
+ "package-publint"
1564
+ ]
1565
+ ]
1566
+ ]);
1567
+ }, "publintPackage");
1568
+ var publintAll = /* @__PURE__ */ __name(({ verbose }) => {
1569
+ const verboseOptions = verbose ? [
1570
+ "--verbose"
1571
+ ] : [
1572
+ "--no-verbose"
1573
+ ];
1574
+ return runSteps("Publint", [
1575
+ [
1576
+ "yarn",
1577
+ [
1578
+ "workspaces",
1579
+ "foreach",
1580
+ "-pA",
1581
+ ...verboseOptions,
1582
+ "run",
1583
+ "package-publint"
1584
+ ]
1585
+ ]
1586
+ ]);
1587
+ }, "publintAll");
1283
1588
 
1284
1589
  // src/actions/rebuild.ts
1285
- var rebuild = ({ target }) => {
1590
+ var rebuild = /* @__PURE__ */ __name(({ target }) => {
1286
1591
  return runSteps("Rebuild", [
1287
- ["yarn", "xy clean"],
1288
- ["yarn", target ? `xy build -t ${target}` : "xy build"]
1592
+ [
1593
+ "yarn",
1594
+ "xy clean"
1595
+ ],
1596
+ [
1597
+ "yarn",
1598
+ target ? `xy build -t ${target}` : "xy build"
1599
+ ]
1289
1600
  ]);
1290
- };
1601
+ }, "rebuild");
1291
1602
 
1292
1603
  // src/actions/recompile.ts
1293
- import chalk22 from "chalk";
1294
- var recompile = async ({
1295
- verbose,
1296
- target,
1297
- pkg,
1298
- incremental
1299
- }) => {
1604
+ import chalk21 from "chalk";
1605
+ var recompile = /* @__PURE__ */ __name(async ({ verbose, target, pkg, incremental }) => {
1300
1606
  return pkg ? await recompilePackage({
1301
1607
  pkg,
1302
1608
  target,
@@ -1306,27 +1612,51 @@ var recompile = async ({
1306
1612
  target,
1307
1613
  verbose
1308
1614
  });
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
- }) => {
1615
+ }, "recompile");
1616
+ var recompilePackage = /* @__PURE__ */ __name(({ target, pkg }) => {
1617
+ const targetOptions = target ? [
1618
+ "-t",
1619
+ target
1620
+ ] : [];
1621
+ return runStepsAsync(`Recompile [${pkg}]`, [
1622
+ [
1623
+ "yarn",
1624
+ [
1625
+ "workspace",
1626
+ pkg,
1627
+ "run",
1628
+ "package-recompile",
1629
+ ...targetOptions
1630
+ ]
1631
+ ]
1632
+ ]);
1633
+ }, "recompilePackage");
1634
+ var recompileAll = /* @__PURE__ */ __name(async ({ jobs, verbose, target, incremental }) => {
1323
1635
  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}`] : [];
1636
+ const verboseOptions = verbose ? [
1637
+ "--verbose"
1638
+ ] : [
1639
+ "--no-verbose"
1640
+ ];
1641
+ const targetOptions = target ? [
1642
+ "-t",
1643
+ target
1644
+ ] : [];
1645
+ const incrementalOptions = incremental ? [
1646
+ "--since",
1647
+ "-Apt",
1648
+ "--topological-dev"
1649
+ ] : [
1650
+ "--parallel",
1651
+ "-Apt",
1652
+ "--topological-dev"
1653
+ ];
1654
+ const jobsOptions = jobs ? [
1655
+ "-j",
1656
+ `${jobs}`
1657
+ ] : [];
1328
1658
  if (jobs) {
1329
- console.log(chalk22.blue(`Jobs set to [${jobs}]`));
1659
+ console.log(chalk21.blue(`Jobs set to [${jobs}]`));
1330
1660
  }
1331
1661
  const result = await runStepsAsync(`Recompile${incremental ? "-Incremental" : ""} [All]`, [
1332
1662
  [
@@ -1356,19 +1686,13 @@ var recompileAll = async ({
1356
1686
  ]
1357
1687
  ]
1358
1688
  ]);
1359
- console.log(
1360
- `${chalk22.gray("Recompiled in")} [${chalk22.magenta(((Date.now() - start) / 1e3).toFixed(2))}] ${chalk22.gray("seconds")}`
1361
- );
1689
+ console.log(`${chalk21.gray("Recompiled in")} [${chalk21.magenta(((Date.now() - start) / 1e3).toFixed(2))}] ${chalk21.gray("seconds")}`);
1362
1690
  return result;
1363
- };
1691
+ }, "recompileAll");
1364
1692
 
1365
1693
  // src/actions/reinstall.ts
1366
- import {
1367
- closeSync,
1368
- openSync,
1369
- rmSync
1370
- } from "fs";
1371
- var reinstall = () => {
1694
+ import { closeSync, openSync, rmSync } from "fs";
1695
+ var reinstall = /* @__PURE__ */ __name(() => {
1372
1696
  console.log("Reinstall [Clear Lock File]");
1373
1697
  closeSync(openSync("./yarn.lock", "w"));
1374
1698
  console.log("Reinstall [Clear Node Modules]");
@@ -1376,7 +1700,10 @@ var reinstall = () => {
1376
1700
  const result = workspaces.map(({ location, name }) => {
1377
1701
  const dist = `${location}/node_modules`;
1378
1702
  try {
1379
- rmSync(dist, { force: true, recursive: true });
1703
+ rmSync(dist, {
1704
+ force: true,
1705
+ recursive: true
1706
+ });
1380
1707
  return 0;
1381
1708
  } catch (ex) {
1382
1709
  const error = ex;
@@ -1384,610 +1711,560 @@ var reinstall = () => {
1384
1711
  return 1;
1385
1712
  }
1386
1713
  }).reduce((prev, result2) => prev || result2, 0);
1387
- return result || runSteps("Reinstall", [["yarn", "install --network-timeout 10000"]]);
1388
- };
1714
+ return result || runSteps("Reinstall", [
1715
+ [
1716
+ "yarn",
1717
+ "install --network-timeout 10000"
1718
+ ]
1719
+ ]);
1720
+ }, "reinstall");
1389
1721
 
1390
1722
  // src/actions/relint.ts
1391
- import chalk23 from "chalk";
1392
- var relintPackage = ({ pkg }) => {
1393
- console.log(chalk23.gray(`${"Relint"} [All-Packages]`));
1723
+ import chalk22 from "chalk";
1724
+ var relintPackage = /* @__PURE__ */ __name(({ pkg }) => {
1725
+ console.log(chalk22.gray(`${"Relint"} [All-Packages]`));
1394
1726
  const start = Date.now();
1395
1727
  const result = runSteps("Relint [All-Packages]", [
1396
- ["yarn", [
1397
- "workspace",
1398
- pkg,
1399
- "run",
1400
- "package-relint"
1401
- ]]
1728
+ [
1729
+ "yarn",
1730
+ [
1731
+ "workspace",
1732
+ pkg,
1733
+ "run",
1734
+ "package-relint"
1735
+ ]
1736
+ ]
1402
1737
  ]);
1403
- console.log(chalk23.gray(`${"Relinted in"} [${chalk23.magenta(((Date.now() - start) / 1e3).toFixed(2))}] ${chalk23.gray("seconds")}`));
1738
+ console.log(chalk22.gray(`${"Relinted in"} [${chalk22.magenta(((Date.now() - start) / 1e3).toFixed(2))}] ${chalk22.gray("seconds")}`));
1404
1739
  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]`));
1740
+ }, "relintPackage");
1741
+ var relint = /* @__PURE__ */ __name(({ pkg, verbose, incremental } = {}) => {
1742
+ return pkg ? relintPackage({
1743
+ pkg
1744
+ }) : relintAllPackages({
1745
+ verbose,
1746
+ incremental
1747
+ });
1748
+ }, "relint");
1749
+ var relintAllPackages = /* @__PURE__ */ __name(({ verbose = false, incremental } = {}) => {
1750
+ console.log(chalk22.gray(`${"Relint"} [All-Packages]`));
1415
1751
  const start = Date.now();
1416
- const verboseOptions = verbose ? ["--verbose"] : ["--no-verbose"];
1417
- const incrementalOptions = incremental ? ["--since", "-Ap"] : ["--parallel", "-Ap"];
1752
+ const verboseOptions = verbose ? [
1753
+ "--verbose"
1754
+ ] : [
1755
+ "--no-verbose"
1756
+ ];
1757
+ const incrementalOptions = incremental ? [
1758
+ "--since",
1759
+ "-Ap"
1760
+ ] : [
1761
+ "--parallel",
1762
+ "-Ap"
1763
+ ];
1418
1764
  const result = runSteps(`${"Relint"} [All-Packages]`, [
1419
- ["yarn", [
1420
- "workspaces",
1421
- "foreach",
1422
- ...verboseOptions,
1423
- ...incrementalOptions,
1424
- "run",
1425
- "package-relint"
1426
- ]]
1765
+ [
1766
+ "yarn",
1767
+ [
1768
+ "workspaces",
1769
+ "foreach",
1770
+ ...verboseOptions,
1771
+ ...incrementalOptions,
1772
+ "run",
1773
+ "package-relint"
1774
+ ]
1775
+ ]
1427
1776
  ]);
1428
- console.log(chalk23.gray(`Relinted in [${chalk23.magenta(((Date.now() - start) / 1e3).toFixed(2))}] ${chalk23.gray("seconds")}`));
1777
+ console.log(chalk22.gray(`Relinted in [${chalk22.magenta(((Date.now() - start) / 1e3).toFixed(2))}] ${chalk22.gray("seconds")}`));
1429
1778
  return result;
1430
- };
1779
+ }, "relintAllPackages");
1431
1780
 
1432
1781
  // src/actions/retest.ts
1433
- var retest = () => {
1782
+ var retest = /* @__PURE__ */ __name(() => {
1434
1783
  return runSteps("Test", [
1435
- ["yarn", ["jest", "--clearCache"]],
1436
- ["yarn", ["jest", "."]]
1784
+ [
1785
+ "yarn",
1786
+ [
1787
+ "jest",
1788
+ "--clearCache"
1789
+ ]
1790
+ ],
1791
+ [
1792
+ "yarn",
1793
+ [
1794
+ "jest",
1795
+ "."
1796
+ ]
1797
+ ]
1437
1798
  ]);
1438
- };
1799
+ }, "retest");
1439
1800
 
1440
1801
  // src/actions/sonar.ts
1441
- var sonar = () => {
1442
- return runSteps("Sonar", [["yarn", ["eslint", "-c", "sonar.eslintrc", "."]]]);
1443
- };
1802
+ var sonar = /* @__PURE__ */ __name(() => {
1803
+ return runSteps("Sonar", [
1804
+ [
1805
+ "yarn",
1806
+ [
1807
+ "eslint",
1808
+ "-c",
1809
+ "sonar.eslintrc",
1810
+ "."
1811
+ ]
1812
+ ]
1813
+ ]);
1814
+ }, "sonar");
1444
1815
 
1445
1816
  // 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"));
1817
+ import chalk23 from "chalk";
1818
+ var DefaultDependencies = [
1819
+ "axios",
1820
+ "@xylabs/pixel",
1821
+ "react",
1822
+ "graphql",
1823
+ "react-router",
1824
+ "@mui/material",
1825
+ "@mui/system"
1826
+ ];
1827
+ var statics = /* @__PURE__ */ __name(() => {
1828
+ console.log(chalk23.green("Check Required Static Dependencies"));
1450
1829
  const statics2 = parsedPackageJSON()?.xy?.deps?.statics;
1451
1830
  return detectDuplicateDependencies(statics2, DefaultDependencies);
1452
- };
1831
+ }, "statics");
1453
1832
 
1454
1833
  // src/actions/test.ts
1455
- var test = () => {
1456
- return runSteps("Test", [["yarn", ["vitest", "."]]]);
1457
- };
1834
+ var test = /* @__PURE__ */ __name(() => {
1835
+ return runSteps("Test", [
1836
+ [
1837
+ "yarn",
1838
+ [
1839
+ "vitest",
1840
+ "."
1841
+ ]
1842
+ ]
1843
+ ]);
1844
+ }, "test");
1458
1845
 
1459
1846
  // src/actions/up.ts
1460
- var up = () => {
1461
- return runSteps("Up", [["yarn", "outdated"]]);
1462
- };
1847
+ var up = /* @__PURE__ */ __name(() => {
1848
+ return runSteps("Up", [
1849
+ [
1850
+ "yarn",
1851
+ "outdated"
1852
+ ]
1853
+ ]);
1854
+ }, "up");
1463
1855
 
1464
1856
  // src/actions/updo.ts
1465
- var updo = () => {
1857
+ var updo = /* @__PURE__ */ __name(() => {
1466
1858
  return runSteps("Updo", [
1467
- ["yarn", "install"],
1468
- ["yarn", "upgrade-interactive"],
1469
- ["yarn", "dedupe"]
1859
+ [
1860
+ "yarn",
1861
+ "install"
1862
+ ],
1863
+ [
1864
+ "yarn",
1865
+ "upgrade-interactive"
1866
+ ],
1867
+ [
1868
+ "yarn",
1869
+ "dedupe"
1870
+ ]
1470
1871
  ]);
1471
- };
1872
+ }, "updo");
1472
1873
 
1473
1874
  // src/actions/upplug.ts
1474
- var updateYarnPlugins = () => {
1875
+ var updateYarnPlugins = /* @__PURE__ */ __name(() => {
1475
1876
  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"]]
1877
+ [
1878
+ "yarn",
1879
+ [
1880
+ "plugin",
1881
+ "import",
1882
+ "https://mskelton.dev/yarn-outdated/v3"
1883
+ ]
1884
+ ],
1885
+ [
1886
+ "yarn",
1887
+ [
1888
+ "plugin",
1889
+ "import",
1890
+ "version"
1891
+ ]
1892
+ ],
1893
+ [
1894
+ "yarn",
1895
+ [
1896
+ "plugin",
1897
+ "import",
1898
+ "interactive-tools"
1899
+ ]
1900
+ ],
1901
+ [
1902
+ "yarn",
1903
+ [
1904
+ "plugin",
1905
+ "import",
1906
+ "workspace-tools"
1907
+ ]
1908
+ ]
1480
1909
  ]);
1481
- };
1910
+ }, "updateYarnPlugins");
1482
1911
 
1483
1912
  // src/actions/upyarn.ts
1484
- var updateYarnVersion = () => {
1485
- return runSteps("Update Yarn Version", [["yarn", ["set", "version", "latest"]]]);
1486
- };
1913
+ var updateYarnVersion = /* @__PURE__ */ __name(() => {
1914
+ return runSteps("Update Yarn Version", [
1915
+ [
1916
+ "yarn",
1917
+ [
1918
+ "set",
1919
+ "version",
1920
+ "latest"
1921
+ ]
1922
+ ]
1923
+ ]);
1924
+ }, "updateYarnVersion");
1487
1925
 
1488
1926
  // src/actions/yarn3only.ts
1489
- var yarn3Only = () => {
1927
+ var yarn3Only = /* @__PURE__ */ __name(() => {
1490
1928
  const [valid, version] = isYarnVersionOrGreater(3);
1491
1929
  if (!valid) {
1492
1930
  processEx(`Invalid Yarn version [${version}]`);
1493
1931
  }
1494
1932
  return 0;
1495
- };
1933
+ }, "yarn3Only");
1496
1934
 
1497
1935
  // 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
- });
1936
+ var xyBuildCommands = /* @__PURE__ */ __name((args) => {
1937
+ return args.command("build [package]", "Build - Compile & Lint", (yargs2) => {
1938
+ return yargs2.positional("package", {
1939
+ describe: "Specific package to build"
1940
+ });
1941
+ }, async (argv) => {
1942
+ if (argv.verbose) {
1943
+ console.log(`Building: ${argv.package ?? "all"}`);
1570
1944
  }
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
- });
1945
+ process.exitCode = await build({
1946
+ incremental: !!argv.incremental,
1947
+ jobs: argv.jobs,
1948
+ pkg: argv.package,
1949
+ target: argv.target,
1950
+ verbose: !!argv.verbose
1951
+ });
1952
+ }).command("compile [package]", "Compile with Typescript & Copy Images", (yargs2) => {
1953
+ return yargs2.positional("package", {
1954
+ describe: "Specific package to compile"
1955
+ });
1956
+ }, (argv) => {
1957
+ if (argv.verbose) {
1958
+ console.log(`Compiling: ${argv.package ?? "all"}`);
1588
1959
  }
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 });
1960
+ process.exitCode = compile({
1961
+ incremental: !!argv.incremental,
1962
+ jobs: argv.jobs,
1963
+ pkg: argv.package,
1964
+ target: argv.target,
1965
+ verbose: !!argv.verbose
1966
+ });
1967
+ }).command("compile-only [package]", "Compile with Typescript & Copy Images (No Publint)", (yargs2) => {
1968
+ return yargs2.positional("package", {
1969
+ describe: "Specific package to compile"
1970
+ });
1971
+ }, (argv) => {
1972
+ if (argv.verbose) {
1973
+ console.log(`Compiling: ${argv.package ?? "all"}`);
1598
1974
  }
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 });
1975
+ process.exitCode = compile({
1976
+ incremental: !!argv.incremental,
1977
+ jobs: argv.jobs,
1978
+ pkg: argv.package,
1979
+ publint: false,
1980
+ target: argv.target,
1981
+ verbose: !!argv.verbose
1982
+ });
1983
+ }).command("recompile [package]", "Re-compile with Typescript & Copy Images", (yargs2) => {
1984
+ return yargs2.positional("package", {
1985
+ describe: "Specific package to re-compile"
1986
+ });
1987
+ }, async (argv) => {
1988
+ if (argv.verbose) {
1989
+ console.log(`Re-compiling: ${argv.package ?? "all"}`);
1608
1990
  }
1609
- );
1610
- };
1991
+ process.exitCode = await recompile({
1992
+ incremental: !!argv.incremental,
1993
+ jobs: argv.jobs,
1994
+ pkg: argv.package,
1995
+ target: argv.target,
1996
+ verbose: !!argv.verbose
1997
+ });
1998
+ }).command("rebuild [package]", "Rebuild - Clean, Compile & Lint", (yargs2) => {
1999
+ return yargs2.positional("package", {
2000
+ describe: "Specific package to rebuild"
2001
+ });
2002
+ }, (argv) => {
2003
+ if (argv.verbose) console.log(`Rebuilding: ${argv.package ?? "all"}`);
2004
+ process.exitCode = rebuild({
2005
+ target: argv.target
2006
+ });
2007
+ }).command("copy-assets [package]", "Copy Assets - Copy the assets from src to dist", (yargs2) => {
2008
+ return yargs2.positional("package", {
2009
+ describe: "Specific package to copy assets"
2010
+ });
2011
+ }, async (argv) => {
2012
+ if (argv.verbose) console.log(`Copying Assets: ${argv.package ?? "all"}`);
2013
+ process.exitCode = await copyAssets({
2014
+ target: argv.target
2015
+ });
2016
+ });
2017
+ }, "xyBuildCommands");
1611
2018
 
1612
2019
  // src/xy/param.ts
1613
- var packagePositionalParam = (yargs2) => {
1614
- return yargs2.positional("package", { describe: "Specific package to target", type: "string" });
1615
- };
2020
+ var packagePositionalParam = /* @__PURE__ */ __name((yargs2) => {
2021
+ return yargs2.positional("package", {
2022
+ describe: "Specific package to target",
2023
+ type: "string"
2024
+ });
2025
+ }, "packagePositionalParam");
1616
2026
 
1617
2027
  // 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
- };
2028
+ var xyCommonCommands = /* @__PURE__ */ __name((args) => {
2029
+ return args.command("license [package]", "License - Check licenses of dependencies", (yargs2) => {
2030
+ return packagePositionalParam(yargs2);
2031
+ }, async (argv) => {
2032
+ if (argv.verbose) console.log(`License: ${argv.package ?? "all"}`);
2033
+ process.exitCode = await license();
2034
+ }).command("dead [package]", "Dead - Check for dead code", (yargs2) => {
2035
+ return packagePositionalParam(yargs2);
2036
+ }, (argv) => {
2037
+ if (argv.verbose) console.log("Dead");
2038
+ process.exitCode = dead();
2039
+ }).command("gen-docs [package]", "GenDocs - Generate TypeDocs", (yargs2) => {
2040
+ return packagePositionalParam(yargs2);
2041
+ }, (argv) => {
2042
+ if (argv.verbose) console.log(`Generating TypeDocs: ${argv.package ?? "all"}`);
2043
+ process.exitCode = genDocs({
2044
+ incremental: !!argv.incremental,
2045
+ pkg: argv.package
2046
+ });
2047
+ }).command("clean-docs", "CleanDocs - Clean TypeDocs", (yargs2) => yargs2, (argv) => {
2048
+ if (argv.verbose) console.log("Cleaning TypeDocs: all");
2049
+ process.exitCode = cleanDocs();
2050
+ }).command("gitlint [package]", "Gitlint - Lint your git config", (yargs2) => {
2051
+ return yargs2;
2052
+ }, (argv) => {
2053
+ if (argv.verbose) console.log("Gitlint");
2054
+ process.exitCode = argv.fix ? gitlintFix() : gitlint();
2055
+ }).command("gitignore-gen", "GitIgnore Gen - Generate .gitignore files", (yargs2) => {
2056
+ return yargs2;
2057
+ }, (argv) => {
2058
+ if (argv.verbose) console.log("GitIgnore Gen");
2059
+ process.exitCode = gitignoreGen();
2060
+ }).command("npmignore-gen", "NpmIgnore Gen - Generate .npmignore files", (yargs2) => {
2061
+ return yargs2;
2062
+ }, (argv) => {
2063
+ if (argv.verbose) console.log("NpmIgnore Gen");
2064
+ process.exitCode = npmignoreGen();
2065
+ }).command("retest", "Re-Test - Run Jest Tests with cleaned cache", (yargs2) => {
2066
+ return yargs2;
2067
+ }, (argv) => {
2068
+ if (argv.verbose) console.log("Re-Testing");
2069
+ process.exitCode = retest();
2070
+ }).command("test", "Test - Run Jest Tests", (yargs2) => {
2071
+ return yargs2;
2072
+ }, (argv) => {
2073
+ if (argv.verbose) console.log("Testing");
2074
+ process.exitCode = test();
2075
+ }).command("upplug", "UpPlug - Update Yarn Plugins", (yargs2) => {
2076
+ return yargs2;
2077
+ }, (argv) => {
2078
+ if (argv.verbose) console.log("UpPlug");
2079
+ process.exitCode = updateYarnPlugins();
2080
+ }).command("upyarn", "UpYarn - Update Yarn Version", (yargs2) => {
2081
+ return yargs2;
2082
+ }, (argv) => {
2083
+ if (argv.verbose) console.log("UpYarn");
2084
+ process.exitCode = updateYarnVersion();
2085
+ }).command("yarn3only", "Yarn3Only - Check if using Yarn v3", (yargs2) => {
2086
+ return yargs2;
2087
+ }, (argv) => {
2088
+ if (argv.verbose) console.log("Yarn 3 Check");
2089
+ process.exitCode = yarn3Only();
2090
+ });
2091
+ }, "xyCommonCommands");
1739
2092
 
1740
2093
  // 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
- };
2094
+ var xyDeployCommands = /* @__PURE__ */ __name((args) => {
2095
+ return args.command("deploy", "Deploy - Deploy patch", (yargs2) => {
2096
+ return yargs2;
2097
+ }, (argv) => {
2098
+ if (argv.verbose) console.log("Deploy patch");
2099
+ process.exitCode = deploy();
2100
+ }).command("deploy-minor", "Deploy - Deploy minor", (yargs2) => {
2101
+ return yargs2;
2102
+ }, (argv) => {
2103
+ if (argv.verbose) console.log("Deploy minor");
2104
+ process.exitCode = deployMinor();
2105
+ }).command("deploy-major", "Deploy - Deploy major", (yargs2) => {
2106
+ return yargs2;
2107
+ }, (argv) => {
2108
+ if (argv.verbose) console.log("Deploy major");
2109
+ process.exitCode = deployMajor();
2110
+ }).command("deploy-next", "Deploy - Deploy next", (yargs2) => {
2111
+ return yargs2;
2112
+ }, (argv) => {
2113
+ if (argv.verbose) console.log("Deploy next");
2114
+ process.exitCode = deployNext();
2115
+ });
2116
+ }, "xyDeployCommands");
1784
2117
 
1785
2118
  // 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();
2119
+ var xyInstallCommands = /* @__PURE__ */ __name((args) => {
2120
+ return args.command("clean [package]", "Clean", (yargs2) => {
2121
+ return yargs2.positional("package", {
2122
+ describe: "Specific package to clean"
2123
+ });
2124
+ }, async (argv) => {
2125
+ if (argv.verbose) {
2126
+ console.log(`Cleaning: ${argv.package ?? "all"}`);
1851
2127
  }
1852
- );
1853
- };
2128
+ process.exitCode = await clean({
2129
+ pkg: argv.package,
2130
+ verbose: !!argv.verbose
2131
+ });
2132
+ }).command("reinstall", "Reinstall - Clean & Install", (yargs2) => {
2133
+ return yargs2;
2134
+ }, (argv) => {
2135
+ if (argv.verbose) console.log("Reinstalling");
2136
+ process.exitCode = reinstall();
2137
+ }).command("up", "Up - Update dependencies", (yargs2) => {
2138
+ return yargs2;
2139
+ }, (argv) => {
2140
+ if (argv.verbose) console.log("Up");
2141
+ process.exitCode = up();
2142
+ }).command("updo", "Updo - Update dependencies [Interactive]", (yargs2) => {
2143
+ return yargs2;
2144
+ }, (argv) => {
2145
+ if (argv.verbose) console.log("Updo");
2146
+ process.exitCode = updo();
2147
+ }).command("statics", "Statics - Confirming Static Packages", (yargs2) => {
2148
+ return yargs2;
2149
+ }, (argv) => {
2150
+ if (argv.verbose) console.log("Statics");
2151
+ process.exitCode = statics();
2152
+ }).command("dupdeps", "Dupdeps - Duplicate Dependencies in package.json", (yargs2) => {
2153
+ return yargs2;
2154
+ }, (argv) => {
2155
+ if (argv.verbose) console.log("Dupdeps");
2156
+ process.exitCode = dupdeps();
2157
+ });
2158
+ }, "xyInstallCommands");
1854
2159
 
1855
2160
  // 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
- };
2161
+ import chalk24 from "chalk";
2162
+ var xyLintCommands = /* @__PURE__ */ __name((args) => {
2163
+ return args.command("cycle [package]", "Cycle - Check for dependency cycles", (yargs2) => {
2164
+ return packagePositionalParam(yargs2);
2165
+ }, async (argv) => {
2166
+ const start = Date.now();
2167
+ if (argv.verbose) console.log("Cycle");
2168
+ process.exitCode = await cycle({
2169
+ pkg: argv.package
2170
+ });
2171
+ console.log(chalk24.blue(`Finished in ${Date.now() - start}ms`));
2172
+ }).command("lint [package]", "Lint - Run Eslint", (yargs2) => {
2173
+ return packagePositionalParam(yargs2).option("fix", {
2174
+ alias: "f",
2175
+ default: false,
2176
+ description: "Fix fixable issues",
2177
+ type: "boolean"
2178
+ }).option("cache", {
2179
+ alias: "c",
2180
+ default: false,
2181
+ description: "Use caching for performance",
2182
+ type: "boolean"
2183
+ });
2184
+ }, (argv) => {
2185
+ if (argv.verbose) console.log("Lint");
2186
+ const start = Date.now();
2187
+ process.exitCode = argv.fix ? fix({
2188
+ pkg: argv.package,
2189
+ cache: argv.cache
2190
+ }) : lint({
2191
+ pkg: argv.package,
2192
+ cache: argv.cache
2193
+ });
2194
+ console.log(chalk24.blue(`Finished in ${Date.now() - start}ms`));
2195
+ }).command("deplint [package]", "Deplint - Run Deplint", (yargs2) => {
2196
+ return packagePositionalParam(yargs2).option("deps", {
2197
+ alias: "d",
2198
+ default: false,
2199
+ description: "Check dependencies",
2200
+ type: "boolean"
2201
+ }).option("devDeps", {
2202
+ alias: "v",
2203
+ default: false,
2204
+ description: "Check devDependencies",
2205
+ type: "boolean"
2206
+ }).option("peerDeps", {
2207
+ alias: "p",
2208
+ default: false,
2209
+ description: "Check peerDependencies",
2210
+ type: "boolean"
2211
+ });
2212
+ }, (argv) => {
2213
+ if (argv.verbose) console.log("Deplint");
2214
+ const start = Date.now();
2215
+ process.exitCode = deplint({
2216
+ pkg: argv.package,
2217
+ deps: !!argv.deps,
2218
+ devDeps: !!argv.devDeps,
2219
+ peerDeps: !!argv.peerDeps,
2220
+ verbose: !!argv.verbose
2221
+ });
2222
+ console.log(chalk24.blue(`Finished in ${Date.now() - start}ms`));
2223
+ }).command("fix [package]", "Fix - Run Eslint w/fix", (yargs2) => {
2224
+ return packagePositionalParam(yargs2);
2225
+ }, (argv) => {
2226
+ const start = Date.now();
2227
+ if (argv.verbose) console.log("Fix");
2228
+ process.exitCode = fix();
2229
+ console.log(chalk24.blue(`Finished in ${Date.now() - start}ms`));
2230
+ }).command("relint [package]", "Relint - Clean & Lint", (yargs2) => {
2231
+ return packagePositionalParam(yargs2);
2232
+ }, (argv) => {
2233
+ if (argv.verbose) console.log("Relinting");
2234
+ const start = Date.now();
2235
+ process.exitCode = relint();
2236
+ console.log(chalk24.blue(`Finished in ${Date.now() - start}ms`));
2237
+ }).command("publint [package]", "Publint - Run Publint", (yargs2) => {
2238
+ return packagePositionalParam(yargs2);
2239
+ }, async (argv) => {
2240
+ if (argv.verbose) console.log("Publint");
2241
+ const start = Date.now();
2242
+ process.exitCode = await publint({
2243
+ pkg: argv.package,
2244
+ verbose: !!argv.verbose
2245
+ });
2246
+ console.log(chalk24.blue(`Finished in ${Date.now() - start}ms`));
2247
+ }).command("knip", "Knip - Run Knip", (yargs2) => {
2248
+ return packagePositionalParam(yargs2);
2249
+ }, (argv) => {
2250
+ if (argv.verbose) console.log("Knip");
2251
+ const start = Date.now();
2252
+ process.exitCode = knip();
2253
+ console.log(chalk24.blue(`Knip finished in ${Date.now() - start}ms`));
2254
+ }).command("sonar", "Sonar - Run Sonar Check", (yargs2) => {
2255
+ return packagePositionalParam(yargs2);
2256
+ }, (argv) => {
2257
+ const start = Date.now();
2258
+ if (argv.verbose) console.log("Sonar Check");
2259
+ process.exitCode = sonar();
2260
+ console.log(chalk24.blue(`Finished in ${Date.now() - start}ms`));
2261
+ });
2262
+ }, "xyLintCommands");
1986
2263
 
1987
2264
  // src/xy/xyParseOptions.ts
1988
2265
  import yargs from "yargs";
1989
2266
  import { hideBin } from "yargs/helpers";
1990
- var xyParseOptions = () => {
2267
+ var xyParseOptions = /* @__PURE__ */ __name(() => {
1991
2268
  return yargs(hideBin(process.argv)).scriptName("yarn xy").option("jobs", {
1992
2269
  alias: "j",
1993
2270
  default: void 0,
@@ -2009,16 +2286,16 @@ var xyParseOptions = () => {
2009
2286
  description: "Profile action",
2010
2287
  type: "boolean"
2011
2288
  });
2012
- };
2289
+ }, "xyParseOptions");
2013
2290
 
2014
2291
  // src/xy/xy.ts
2015
- var xy = async () => {
2292
+ var xy = /* @__PURE__ */ __name(async () => {
2016
2293
  const options = xyParseOptions();
2017
2294
  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"));
2295
+ console.error(chalk25.yellow(`Command not found [${chalk25.magenta(process.argv[2])}]`));
2296
+ console.log(chalk25.gray("Try 'yarn xy --help' for list of commands"));
2020
2297
  }).version().help().argv;
2021
- };
2298
+ }, "xy");
2022
2299
  export {
2023
2300
  xy,
2024
2301
  xyBuildCommands,