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

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