@xylabs/ts-scripts-yarn3 6.3.5 → 6.4.0

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