@xylabs/ts-scripts-yarn3 6.3.4 → 6.4.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (251) hide show
  1. package/dist/actions/build.mjs +39 -87
  2. package/dist/actions/build.mjs.map +1 -1
  3. package/dist/actions/clean-docs.mjs +8 -22
  4. package/dist/actions/clean-docs.mjs.map +1 -1
  5. package/dist/actions/clean-eslint.mjs +5 -11
  6. package/dist/actions/clean-eslint.mjs.map +1 -1
  7. package/dist/actions/clean-jest.mjs +16 -29
  8. package/dist/actions/clean-jest.mjs.map +1 -1
  9. package/dist/actions/clean.mjs +32 -63
  10. package/dist/actions/clean.mjs.map +1 -1
  11. package/dist/actions/compile-types.mjs +45 -68
  12. package/dist/actions/compile-types.mjs.map +1 -1
  13. package/dist/actions/compile.mjs +50 -76
  14. package/dist/actions/compile.mjs.map +1 -1
  15. package/dist/actions/copy-assets.mjs +23 -38
  16. package/dist/actions/copy-assets.mjs.map +1 -1
  17. package/dist/actions/cycle.mjs +28 -57
  18. package/dist/actions/cycle.mjs.map +1 -1
  19. package/dist/actions/dead.mjs +16 -31
  20. package/dist/actions/dead.mjs.map +1 -1
  21. package/dist/actions/deplint.mjs +191 -0
  22. package/dist/actions/deplint.mjs.map +1 -0
  23. package/dist/actions/deploy-major.mjs +20 -41
  24. package/dist/actions/deploy-major.mjs.map +1 -1
  25. package/dist/actions/deploy-minor.mjs +20 -41
  26. package/dist/actions/deploy-minor.mjs.map +1 -1
  27. package/dist/actions/deploy-next.mjs +20 -41
  28. package/dist/actions/deploy-next.mjs.map +1 -1
  29. package/dist/actions/deploy.mjs +20 -41
  30. package/dist/actions/deploy.mjs.map +1 -1
  31. package/dist/actions/dupdeps.mjs +26 -37
  32. package/dist/actions/dupdeps.mjs.map +1 -1
  33. package/dist/actions/fix.mjs +36 -50
  34. package/dist/actions/fix.mjs.map +1 -1
  35. package/dist/actions/gen-docs.mjs +25 -65
  36. package/dist/actions/gen-docs.mjs.map +1 -1
  37. package/dist/actions/gitignore-gen.mjs +28 -44
  38. package/dist/actions/gitignore-gen.mjs.map +1 -1
  39. package/dist/actions/gitlint-fix.mjs +5 -14
  40. package/dist/actions/gitlint-fix.mjs.map +1 -1
  41. package/dist/actions/gitlint.mjs +4 -7
  42. package/dist/actions/gitlint.mjs.map +1 -1
  43. package/dist/actions/index.mjs +860 -1237
  44. package/dist/actions/index.mjs.map +1 -1
  45. package/dist/actions/knip.mjs +16 -31
  46. package/dist/actions/knip.mjs.map +1 -1
  47. package/dist/actions/license.mjs +37 -51
  48. package/dist/actions/license.mjs.map +1 -1
  49. package/dist/actions/lint.mjs +33 -44
  50. package/dist/actions/lint.mjs.map +1 -1
  51. package/dist/actions/npmignore-gen.mjs +28 -44
  52. package/dist/actions/npmignore-gen.mjs.map +1 -1
  53. package/dist/actions/package/clean-outputs.mjs +6 -16
  54. package/dist/actions/package/clean-outputs.mjs.map +1 -1
  55. package/dist/actions/package/clean-typescript.mjs +6 -16
  56. package/dist/actions/package/clean-typescript.mjs.map +1 -1
  57. package/dist/actions/package/clean.mjs +12 -29
  58. package/dist/actions/package/clean.mjs.map +1 -1
  59. package/dist/actions/package/compile/buildEntries.mjs +7 -17
  60. package/dist/actions/package/compile/buildEntries.mjs.map +1 -1
  61. package/dist/actions/package/compile/compile.mjs +133 -169
  62. package/dist/actions/package/compile/compile.mjs.map +1 -1
  63. package/dist/actions/package/compile/compileTypes.mjs +43 -59
  64. package/dist/actions/package/compile/compileTypes.mjs.map +1 -1
  65. package/dist/actions/package/compile/copyTypeFiles.mjs +20 -23
  66. package/dist/actions/package/compile/copyTypeFiles.mjs.map +1 -1
  67. package/dist/actions/package/compile/deepMerge.mjs +0 -5
  68. package/dist/actions/package/compile/deepMerge.mjs.map +1 -1
  69. package/dist/actions/package/compile/getCompilerOptions.mjs +11 -10
  70. package/dist/actions/package/compile/getCompilerOptions.mjs.map +1 -1
  71. package/dist/actions/package/compile/index.mjs +133 -169
  72. package/dist/actions/package/compile/index.mjs.map +1 -1
  73. package/dist/actions/package/compile/inputs.mjs +3 -8
  74. package/dist/actions/package/compile/inputs.mjs.map +1 -1
  75. package/dist/actions/package/compile/packageCompileTsc.mjs +37 -52
  76. package/dist/actions/package/compile/packageCompileTsc.mjs.map +1 -1
  77. package/dist/actions/package/compile/packageCompileTscTypes.mjs +37 -52
  78. package/dist/actions/package/compile/packageCompileTscTypes.mjs.map +1 -1
  79. package/dist/actions/package/compile/packageCompileTsup.mjs +127 -163
  80. package/dist/actions/package/compile/packageCompileTsup.mjs.map +1 -1
  81. package/dist/actions/package/copy-assets.mjs +12 -21
  82. package/dist/actions/package/copy-assets.mjs.map +1 -1
  83. package/dist/actions/package/cycle.mjs +5 -14
  84. package/dist/actions/package/cycle.mjs.map +1 -1
  85. package/dist/actions/package/gen-docs.mjs +11 -12
  86. package/dist/actions/package/gen-docs.mjs.map +1 -1
  87. package/dist/actions/package/index.mjs +191 -271
  88. package/dist/actions/package/index.mjs.map +1 -1
  89. package/dist/actions/package/lint.mjs +16 -39
  90. package/dist/actions/package/lint.mjs.map +1 -1
  91. package/dist/actions/package/publint.mjs +4 -7
  92. package/dist/actions/package/publint.mjs.map +1 -1
  93. package/dist/actions/package/recompile.mjs +147 -197
  94. package/dist/actions/package/recompile.mjs.map +1 -1
  95. package/dist/actions/publint.mjs +37 -71
  96. package/dist/actions/publint.mjs.map +1 -1
  97. package/dist/actions/rebuild.mjs +17 -29
  98. package/dist/actions/rebuild.mjs.map +1 -1
  99. package/dist/actions/recompile.mjs +50 -67
  100. package/dist/actions/recompile.mjs.map +1 -1
  101. package/dist/actions/reinstall.mjs +25 -43
  102. package/dist/actions/reinstall.mjs.map +1 -1
  103. package/dist/actions/relint.mjs +40 -63
  104. package/dist/actions/relint.mjs.map +1 -1
  105. package/dist/actions/retest.mjs +17 -35
  106. package/dist/actions/retest.mjs.map +1 -1
  107. package/dist/actions/sonar.mjs +16 -32
  108. package/dist/actions/sonar.mjs.map +1 -1
  109. package/dist/actions/statics.mjs +27 -46
  110. package/dist/actions/statics.mjs.map +1 -1
  111. package/dist/actions/test.mjs +16 -30
  112. package/dist/actions/test.mjs.map +1 -1
  113. package/dist/actions/up.mjs +16 -27
  114. package/dist/actions/up.mjs.map +1 -1
  115. package/dist/actions/updo.mjs +18 -33
  116. package/dist/actions/updo.mjs.map +1 -1
  117. package/dist/actions/upplug.mjs +19 -53
  118. package/dist/actions/upplug.mjs.map +1 -1
  119. package/dist/actions/upyarn.mjs +16 -31
  120. package/dist/actions/upyarn.mjs.map +1 -1
  121. package/dist/actions/yarn3only.mjs +12 -23
  122. package/dist/actions/yarn3only.mjs.map +1 -1
  123. package/dist/bin/package/build-only.mjs +134 -172
  124. package/dist/bin/package/build-only.mjs.map +1 -1
  125. package/dist/bin/package/build.mjs +134 -172
  126. package/dist/bin/package/build.mjs.map +1 -1
  127. package/dist/bin/package/clean-outputs.mjs +6 -15
  128. package/dist/bin/package/clean-outputs.mjs.map +1 -1
  129. package/dist/bin/package/clean-typescript.mjs +6 -15
  130. package/dist/bin/package/clean-typescript.mjs.map +1 -1
  131. package/dist/bin/package/clean.mjs +12 -28
  132. package/dist/bin/package/clean.mjs.map +1 -1
  133. package/dist/bin/package/compile-only.mjs +134 -172
  134. package/dist/bin/package/compile-only.mjs.map +1 -1
  135. package/dist/bin/package/compile-tsup.mjs +128 -165
  136. package/dist/bin/package/compile-tsup.mjs.map +1 -1
  137. package/dist/bin/package/compile-types.mjs +44 -61
  138. package/dist/bin/package/compile-types.mjs.map +1 -1
  139. package/dist/bin/package/compile.mjs +134 -171
  140. package/dist/bin/package/compile.mjs.map +1 -1
  141. package/dist/bin/package/copy-assets-cjs.mjs +13 -23
  142. package/dist/bin/package/copy-assets-cjs.mjs.map +1 -1
  143. package/dist/bin/package/copy-assets-esm.mjs +13 -23
  144. package/dist/bin/package/copy-assets-esm.mjs.map +1 -1
  145. package/dist/bin/package/cycle.mjs +6 -16
  146. package/dist/bin/package/cycle.mjs.map +1 -1
  147. package/dist/bin/package/fix.mjs +16 -38
  148. package/dist/bin/package/fix.mjs.map +1 -1
  149. package/dist/bin/package/gen-docs.mjs +11 -11
  150. package/dist/bin/package/gen-docs.mjs.map +1 -1
  151. package/dist/bin/package/lint.mjs +16 -38
  152. package/dist/bin/package/lint.mjs.map +1 -1
  153. package/dist/bin/package/publint.mjs +4 -6
  154. package/dist/bin/package/publint.mjs.map +1 -1
  155. package/dist/bin/package/recompile.mjs +147 -196
  156. package/dist/bin/package/recompile.mjs.map +1 -1
  157. package/dist/bin/package/relint.mjs +16 -38
  158. package/dist/bin/package/relint.mjs.map +1 -1
  159. package/dist/bin/xy.mjs +1082 -1233
  160. package/dist/bin/xy.mjs.map +1 -1
  161. package/dist/index.d.ts +5 -1
  162. package/dist/index.mjs +1334 -1579
  163. package/dist/index.mjs.map +1 -1
  164. package/dist/lib/checkResult.mjs +2 -5
  165. package/dist/lib/checkResult.mjs.map +1 -1
  166. package/dist/lib/createBuildConfig.mjs +9 -24
  167. package/dist/lib/createBuildConfig.mjs.map +1 -1
  168. package/dist/lib/defaultBuildConfig.mjs +2 -6
  169. package/dist/lib/defaultBuildConfig.mjs.map +1 -1
  170. package/dist/lib/deleteGlob.mjs +3 -9
  171. package/dist/lib/deleteGlob.mjs.map +1 -1
  172. package/dist/lib/dependencies/DuplicateDetector.mjs +12 -23
  173. package/dist/lib/dependencies/DuplicateDetector.mjs.map +1 -1
  174. package/dist/lib/dependencies/detectDuplicateDependencies.mjs +22 -33
  175. package/dist/lib/dependencies/detectDuplicateDependencies.mjs.map +1 -1
  176. package/dist/lib/dependencies/index.mjs +22 -33
  177. package/dist/lib/dependencies/index.mjs.map +1 -1
  178. package/dist/lib/file/ReadFileSyncOptions.mjs +1 -3
  179. package/dist/lib/file/ReadFileSyncOptions.mjs.map +1 -1
  180. package/dist/lib/file/constants.mjs.map +1 -1
  181. package/dist/lib/file/fileLines.mjs +12 -13
  182. package/dist/lib/file/fileLines.mjs.map +1 -1
  183. package/dist/lib/file/index.mjs +14 -15
  184. package/dist/lib/file/index.mjs.map +1 -1
  185. package/dist/lib/file/tryReadFileSync.mjs +3 -8
  186. package/dist/lib/file/tryReadFileSync.mjs.map +1 -1
  187. package/dist/lib/generateIgnoreFiles.mjs +27 -43
  188. package/dist/lib/generateIgnoreFiles.mjs.map +1 -1
  189. package/dist/lib/index.mjs +100 -154
  190. package/dist/lib/index.mjs.map +1 -1
  191. package/dist/lib/jsonFormatters.mjs +2 -5
  192. package/dist/lib/jsonFormatters.mjs.map +1 -1
  193. package/dist/lib/loadConfig.mjs +4 -8
  194. package/dist/lib/loadConfig.mjs.map +1 -1
  195. package/dist/lib/parsedPackageJSON.mjs +2 -5
  196. package/dist/lib/parsedPackageJSON.mjs.map +1 -1
  197. package/dist/lib/processEx.mjs +6 -9
  198. package/dist/lib/processEx.mjs.map +1 -1
  199. package/dist/lib/runSteps.mjs +13 -19
  200. package/dist/lib/runSteps.mjs.map +1 -1
  201. package/dist/lib/runStepsAsync.mjs +22 -22
  202. package/dist/lib/runStepsAsync.mjs.map +1 -1
  203. package/dist/lib/runXy.mjs +19 -31
  204. package/dist/lib/runXy.mjs.map +1 -1
  205. package/dist/lib/runXyWithWarning.mjs +2 -5
  206. package/dist/lib/runXyWithWarning.mjs.map +1 -1
  207. package/dist/lib/safeExit.mjs +10 -13
  208. package/dist/lib/safeExit.mjs.map +1 -1
  209. package/dist/lib/string/empty.mjs +2 -5
  210. package/dist/lib/string/empty.mjs.map +1 -1
  211. package/dist/lib/string/index.mjs +3 -9
  212. package/dist/lib/string/index.mjs.map +1 -1
  213. package/dist/lib/string/union.mjs +1 -7
  214. package/dist/lib/string/union.mjs.map +1 -1
  215. package/dist/lib/withErrnoException.mjs +4 -7
  216. package/dist/lib/withErrnoException.mjs.map +1 -1
  217. package/dist/lib/withError.mjs +2 -5
  218. package/dist/lib/withError.mjs.map +1 -1
  219. package/dist/lib/yarn/index.mjs +11 -30
  220. package/dist/lib/yarn/index.mjs.map +1 -1
  221. package/dist/lib/yarn/isYarnVersionOrGreater.mjs +4 -15
  222. package/dist/lib/yarn/isYarnVersionOrGreater.mjs.map +1 -1
  223. package/dist/lib/yarn/workspace/index.mjs +5 -16
  224. package/dist/lib/yarn/workspace/index.mjs.map +1 -1
  225. package/dist/lib/yarn/workspace/yarnWorkspace.mjs +5 -16
  226. package/dist/lib/yarn/workspace/yarnWorkspace.mjs.map +1 -1
  227. package/dist/lib/yarn/workspace/yarnWorkspaces.mjs +3 -14
  228. package/dist/lib/yarn/workspace/yarnWorkspaces.mjs.map +1 -1
  229. package/dist/lib/yarn/yarnInitCwd.mjs +2 -5
  230. package/dist/lib/yarn/yarnInitCwd.mjs.map +1 -1
  231. package/dist/loadPackageConfig.mjs +3 -8
  232. package/dist/loadPackageConfig.mjs.map +1 -1
  233. package/dist/xy/index.mjs +1082 -1234
  234. package/dist/xy/index.mjs.map +1 -1
  235. package/dist/xy/param.mjs +3 -8
  236. package/dist/xy/param.mjs.map +1 -1
  237. package/dist/xy/xy.mjs +1082 -1234
  238. package/dist/xy/xy.mjs.map +1 -1
  239. package/dist/xy/xyBuildCommands.mjs +276 -382
  240. package/dist/xy/xyBuildCommands.mjs.map +1 -1
  241. package/dist/xy/xyCommonCommands.mjs +251 -335
  242. package/dist/xy/xyCommonCommands.mjs.map +1 -1
  243. package/dist/xy/xyDeployCommands.mjs +84 -130
  244. package/dist/xy/xyDeployCommands.mjs.map +1 -1
  245. package/dist/xy/xyInstallCommands.mjs +145 -193
  246. package/dist/xy/xyInstallCommands.mjs.map +1 -1
  247. package/dist/xy/xyLintCommands.mjs +409 -288
  248. package/dist/xy/xyLintCommands.mjs.map +1 -1
  249. package/dist/xy/xyParseOptions.mjs +4 -13
  250. package/dist/xy/xyParseOptions.mjs.map +1 -1
  251. package/package.json +5 -24
@@ -1,9 +1,6 @@
1
- var __defProp = Object.defineProperty;
2
- var __name = (target, value) => __defProp(target, "name", { value, configurable: true });
3
-
4
1
  // src/lib/checkResult.ts
5
2
  import chalk from "chalk";
6
- var checkResult = /* @__PURE__ */ __name((name, result, level = "error", exitOnFail = false) => {
3
+ var checkResult = (name, result, level = "error", exitOnFail = false) => {
7
4
  if (result) {
8
5
  const exiting = exitOnFail ? "[Exiting Process]" : "[Continuing]";
9
6
  const chalkFunc = level === "error" ? chalk.red : chalk.yellow;
@@ -12,7 +9,7 @@ var checkResult = /* @__PURE__ */ __name((name, result, level = "error", exitOnF
12
9
  process.exit(result);
13
10
  }
14
11
  }
15
- }, "checkResult");
12
+ };
16
13
 
17
14
  // src/lib/createBuildConfig.ts
18
15
  import { readFileSync } from "node:fs";
@@ -21,9 +18,7 @@ import { readFileSync } from "node:fs";
21
18
  var defaultBuildConfig = {
22
19
  compilerOptions: {
23
20
  rootDir: "src",
24
- rootDirs: [
25
- "package.json"
26
- ]
21
+ rootDirs: ["package.json"]
27
22
  },
28
23
  exclude: [
29
24
  "**/build",
@@ -36,24 +31,20 @@ var defaultBuildConfig = {
36
31
  "**/spec/*",
37
32
  "**/stories/*"
38
33
  ],
39
- include: [
40
- "src"
41
- ]
34
+ include: ["src"]
42
35
  };
43
36
 
44
37
  // src/lib/createBuildConfig.ts
45
- var getGeneralTypescriptConfig = /* @__PURE__ */ __name((location) => {
38
+ var getGeneralTypescriptConfig = (location) => {
46
39
  let generalConfig;
47
40
  try {
48
- generalConfig = readFileSync(`${location}/tsconfig.json`, {
49
- encoding: "utf8"
50
- });
41
+ generalConfig = readFileSync(`${location}/tsconfig.json`, { encoding: "utf8" });
51
42
  } catch {
52
43
  return false;
53
44
  }
54
45
  return JSON.parse(generalConfig);
55
- }, "getGeneralTypescriptConfig");
56
- var createBuildConfig = /* @__PURE__ */ __name((location, module, target, outDirSuffix) => {
46
+ };
47
+ var createBuildConfig = (location, module, target, outDirSuffix) => {
57
48
  const generalConfigObject = getGeneralTypescriptConfig(location);
58
49
  if (generalConfigObject === false) {
59
50
  return void 0;
@@ -67,29 +58,20 @@ var createBuildConfig = /* @__PURE__ */ __name((location, module, target, outDir
67
58
  outDir: `./${generalConfigObject.compilerOptions?.outDir ?? "dist"}/${outDirSuffix}`,
68
59
  target
69
60
  },
70
- exclude: [
71
- ...generalConfigObject.exclude ?? [],
72
- ...defaultBuildConfig.exclude
73
- ],
74
- include: [
75
- ...generalConfigObject.include ?? [],
76
- ...defaultBuildConfig.include
77
- ]
61
+ exclude: [...generalConfigObject.exclude ?? [], ...defaultBuildConfig.exclude],
62
+ include: [...generalConfigObject.include ?? [], ...defaultBuildConfig.include]
78
63
  };
79
- }, "createBuildConfig");
64
+ };
80
65
 
81
66
  // src/lib/deleteGlob.ts
82
67
  import fs from "node:fs";
83
68
  import { glob } from "glob";
84
- var deleteGlob = /* @__PURE__ */ __name((globPath) => {
69
+ var deleteGlob = (globPath) => {
85
70
  const files = glob.sync(globPath);
86
71
  for (const file of files) {
87
- fs.rmSync(file, {
88
- recursive: true,
89
- force: true
90
- });
72
+ fs.rmSync(file, { recursive: true, force: true });
91
73
  }
92
- }, "deleteGlob");
74
+ };
93
75
 
94
76
  // src/lib/dependencies/detectDuplicateDependencies.ts
95
77
  import { execSync } from "node:child_process";
@@ -98,17 +80,17 @@ import { execSync } from "node:child_process";
98
80
  import chalk2 from "chalk";
99
81
 
100
82
  // src/lib/withError.ts
101
- var withError = /* @__PURE__ */ __name((ex, closure, predicate = (ex2) => !!ex2.name && !!ex2.message) => {
83
+ var withError = (ex, closure, predicate = (ex2) => !!ex2.name && !!ex2.message) => {
102
84
  return predicate(ex) ? closure(ex) : void 0;
103
- }, "withError");
85
+ };
104
86
 
105
87
  // src/lib/withErrnoException.ts
106
- var withErrnoException = /* @__PURE__ */ __name((ex, closure) => {
88
+ var withErrnoException = (ex, closure) => {
107
89
  return withError(ex, closure, (ex2) => ex2.errno !== void 0);
108
- }, "withErrnoException");
90
+ };
109
91
 
110
92
  // src/lib/processEx.ts
111
- var processEx = /* @__PURE__ */ __name((ex) => {
93
+ var processEx = (ex) => {
112
94
  const error = typeof ex === "string" ? new Error(ex) : ex;
113
95
  const exitCode = withErrnoException(error, (error2) => {
114
96
  if (error2.code === "ENOENT") {
@@ -125,10 +107,10 @@ var processEx = /* @__PURE__ */ __name((ex) => {
125
107
  return -1;
126
108
  })();
127
109
  process.exit(process.exitCode ?? exitCode);
128
- }, "processEx");
110
+ };
129
111
 
130
112
  // src/lib/safeExit.ts
131
- var safeExit = /* @__PURE__ */ __name((func, exitOnFail = true) => {
113
+ var safeExit = (func, exitOnFail = true) => {
132
114
  try {
133
115
  const result = func();
134
116
  if (result && exitOnFail) {
@@ -138,8 +120,8 @@ var safeExit = /* @__PURE__ */ __name((func, exitOnFail = true) => {
138
120
  } catch (ex) {
139
121
  return processEx(ex);
140
122
  }
141
- }, "safeExit");
142
- var safeExitAsync = /* @__PURE__ */ __name(async (func, exitOnFail = true) => {
123
+ };
124
+ var safeExitAsync = async (func, exitOnFail = true) => {
143
125
  try {
144
126
  const result = await func();
145
127
  if (result && exitOnFail) {
@@ -149,22 +131,22 @@ var safeExitAsync = /* @__PURE__ */ __name(async (func, exitOnFail = true) => {
149
131
  } catch (ex) {
150
132
  return processEx(ex);
151
133
  }
152
- }, "safeExitAsync");
134
+ };
153
135
 
154
136
  // src/lib/dependencies/DuplicateDetector.ts
155
137
  import { EOL } from "node:os";
156
138
  import chalk3 from "chalk";
157
139
 
158
140
  // src/lib/jsonFormatters.ts
159
- var multiLineToJSONArray = /* @__PURE__ */ __name((output) => {
141
+ var multiLineToJSONArray = (output) => {
160
142
  const withCommas = output.replaceAll("\r\n", "").replaceAll("\n", ",");
161
143
  const cleanCollection = withCommas.slice(0, Math.max(0, withCommas.length - 1));
162
144
  const collection = `[${cleanCollection}]`;
163
145
  return JSON.parse(collection);
164
- }, "multiLineToJSONArray");
146
+ };
165
147
 
166
148
  // src/lib/dependencies/DuplicateDetector.ts
167
- var trimVirtualMeta = /* @__PURE__ */ __name((value) => {
149
+ var trimVirtualMeta = (value) => {
168
150
  const virtualParts = value.split("virtual:");
169
151
  if (virtualParts.length > 1) {
170
152
  const hashParts = virtualParts[1].split("#");
@@ -172,8 +154,8 @@ var trimVirtualMeta = /* @__PURE__ */ __name((value) => {
172
154
  } else {
173
155
  return value;
174
156
  }
175
- }, "trimVirtualMeta");
176
- var trimObjectDependencyVirtualMeta = /* @__PURE__ */ __name((obj) => {
157
+ };
158
+ var trimObjectDependencyVirtualMeta = (obj) => {
177
159
  const resultObj = {};
178
160
  for (const [key, value] of Object.entries(obj)) {
179
161
  resultObj[trimVirtualMeta(key)] = {
@@ -182,19 +164,13 @@ var trimObjectDependencyVirtualMeta = /* @__PURE__ */ __name((obj) => {
182
164
  };
183
165
  }
184
166
  return resultObj;
185
- }, "trimObjectDependencyVirtualMeta");
186
- var trimDependencyVirtualMeta = /* @__PURE__ */ __name((dependencies) => {
167
+ };
168
+ var trimDependencyVirtualMeta = (dependencies) => {
187
169
  return dependencies.map((dependency) => {
188
- return {
189
- children: trimObjectDependencyVirtualMeta(dependency.children),
190
- value: trimVirtualMeta(dependency.value)
191
- };
170
+ return { children: trimObjectDependencyVirtualMeta(dependency.children), value: trimVirtualMeta(dependency.value) };
192
171
  });
193
- }, "trimDependencyVirtualMeta");
172
+ };
194
173
  var DuplicateDetector = class {
195
- static {
196
- __name(this, "DuplicateDetector");
197
- }
198
174
  dependency;
199
175
  dependencyEntries;
200
176
  constructor(output, dependency) {
@@ -224,21 +200,19 @@ var DuplicateDetector = class {
224
200
  acc.duplicateVersions.push(acc.currentVersion);
225
201
  }
226
202
  acc.duplicateVersions.push(version);
227
- acc.duplicateVersions = [
228
- ...new Set(acc.duplicateVersions)
229
- ];
203
+ acc.duplicateVersions = [...new Set(acc.duplicateVersions)];
230
204
  }
231
205
  return acc;
232
206
  }
233
- resultsFactory = /* @__PURE__ */ __name((dependency) => ({
207
+ resultsFactory = (dependency) => ({
234
208
  currentVersion: void 0,
235
209
  dependency,
236
210
  duplicateVersions: []
237
- }), "resultsFactory");
211
+ });
238
212
  };
239
213
 
240
214
  // src/lib/dependencies/detectDuplicateDependencies.ts
241
- var detectDuplicateDependencies = /* @__PURE__ */ __name((depsFromPackageJSON, DefaultDependencies) => {
215
+ var detectDuplicateDependencies = (depsFromPackageJSON, DefaultDependencies) => {
242
216
  let exitCode = 0;
243
217
  const dependencies = depsFromPackageJSON?.length ? depsFromPackageJSON : DefaultDependencies;
244
218
  return safeExit(() => {
@@ -269,57 +243,51 @@ var detectDuplicateDependencies = /* @__PURE__ */ __name((depsFromPackageJSON, D
269
243
  return exitCode;
270
244
  }
271
245
  });
272
- }, "detectDuplicateDependencies");
246
+ };
273
247
 
274
248
  // src/lib/file/constants.ts
275
249
  var WINDOWS_NEWLINE_REGEX = /\r\n/g;
276
250
  var CROSS_PLATFORM_NEWLINE = "\n";
277
251
 
278
252
  // src/lib/file/fileLines.ts
279
- import { existsSync, readFileSync as readFileSync2, writeFileSync } from "node:fs";
253
+ import {
254
+ existsSync,
255
+ readFileSync as readFileSync2,
256
+ writeFileSync
257
+ } from "node:fs";
280
258
 
281
259
  // src/lib/string/empty.ts
282
- var empty = /* @__PURE__ */ __name((value) => value?.trim().length === 0, "empty");
283
- var notEmpty = /* @__PURE__ */ __name((value) => !empty(value), "notEmpty");
260
+ var empty = (value) => value?.trim().length === 0;
261
+ var notEmpty = (value) => !empty(value);
284
262
 
285
263
  // src/lib/string/union.ts
286
- var union = /* @__PURE__ */ __name((a, b) => /* @__PURE__ */ new Set([
287
- ...new Set(a),
288
- ...new Set(b)
289
- ]), "union");
264
+ var union = (a, b) => /* @__PURE__ */ new Set([...new Set(a), ...new Set(b)]);
290
265
 
291
266
  // src/lib/file/ReadFileSyncOptions.ts
292
- var defaultReadFileSyncOptions = {
293
- encoding: "utf8"
294
- };
267
+ var defaultReadFileSyncOptions = { encoding: "utf8" };
295
268
 
296
269
  // src/lib/file/fileLines.ts
297
- var readLines = /* @__PURE__ */ __name((uri, options = defaultReadFileSyncOptions) => existsSync(uri) ? readFileSync2(uri, options).replace(WINDOWS_NEWLINE_REGEX, CROSS_PLATFORM_NEWLINE).split(CROSS_PLATFORM_NEWLINE) : [], "readLines");
298
- var readNonEmptyLines = /* @__PURE__ */ __name((uri, options = defaultReadFileSyncOptions) => readLines(uri, options).filter(notEmpty), "readNonEmptyLines");
299
- var writeLines = /* @__PURE__ */ __name((uri, lines, options = defaultReadFileSyncOptions) => {
270
+ var readLines = (uri, options = defaultReadFileSyncOptions) => existsSync(uri) ? readFileSync2(uri, options).replace(WINDOWS_NEWLINE_REGEX, CROSS_PLATFORM_NEWLINE).split(CROSS_PLATFORM_NEWLINE) : [];
271
+ var readNonEmptyLines = (uri, options = defaultReadFileSyncOptions) => readLines(uri, options).filter(notEmpty);
272
+ var writeLines = (uri, lines, options = defaultReadFileSyncOptions) => {
300
273
  const existing = existsSync(uri) ? readFileSync2(uri, options) : void 0;
301
274
  const desired = lines.join(CROSS_PLATFORM_NEWLINE);
302
275
  if (existing !== desired) writeFileSync(uri, desired, options);
303
- }, "writeLines");
276
+ };
304
277
 
305
278
  // src/lib/file/tryReadFileSync.ts
306
279
  import { existsSync as existsSync2, readFileSync as readFileSync3 } from "node:fs";
307
- var tryReadFileSync = /* @__PURE__ */ __name((uri, options = defaultReadFileSyncOptions) => {
280
+ var tryReadFileSync = (uri, options = defaultReadFileSyncOptions) => {
308
281
  return existsSync2(uri) ? readFileSync3(uri, options) : void 0;
309
- }, "tryReadFileSync");
282
+ };
310
283
 
311
284
  // src/lib/generateIgnoreFiles.ts
312
285
  import chalk4 from "chalk";
313
286
 
314
287
  // src/lib/yarn/isYarnVersionOrGreater.ts
315
288
  import { spawnSync } from "node:child_process";
316
- var isYarnVersionOrGreater = /* @__PURE__ */ __name((major, minor, patch) => {
317
- const result = spawnSync("yarn", [
318
- "-v"
319
- ], {
320
- encoding: "utf8",
321
- shell: true
322
- });
289
+ var isYarnVersionOrGreater = (major, minor, patch) => {
290
+ const result = spawnSync("yarn", ["-v"], { encoding: "utf8", shell: true });
323
291
  const version = result.stdout.toString().replaceAll("\n", "");
324
292
  const versionNumbers = version.split(".").map((ver) => Number.parseInt(ver));
325
293
  const majorDelta = versionNumbers[0] - major;
@@ -328,58 +296,43 @@ var isYarnVersionOrGreater = /* @__PURE__ */ __name((major, minor, patch) => {
328
296
  const majorOk = majorDelta >= 0;
329
297
  const minorOk = majorDelta > 0 || minorDelta >= 0;
330
298
  const patchOk = majorDelta > 0 || minorDelta > 0 || patchDelta >= 0;
331
- return [
332
- majorOk && minorOk && patchOk,
333
- version
334
- ];
335
- }, "isYarnVersionOrGreater");
299
+ return [majorOk && minorOk && patchOk, version];
300
+ };
336
301
 
337
302
  // src/lib/yarn/workspace/yarnWorkspaces.ts
338
303
  import { spawnSync as spawnSync2 } from "node:child_process";
339
- var yarnWorkspaces = /* @__PURE__ */ __name(() => {
340
- const result = spawnSync2("yarn", [
341
- "workspaces",
342
- "list",
343
- "--json",
344
- "--recursive"
345
- ], {
346
- encoding: "utf8",
347
- shell: true
348
- });
304
+ var yarnWorkspaces = () => {
305
+ const result = spawnSync2("yarn", ["workspaces", "list", "--json", "--recursive"], { encoding: "utf8", shell: true });
349
306
  if (result.error) {
350
307
  throw result.error;
351
308
  }
352
309
  return result.stdout.toString().split("\n").slice(0, -1).map((item) => {
353
310
  return JSON.parse(item);
354
311
  });
355
- }, "yarnWorkspaces");
312
+ };
356
313
 
357
314
  // src/lib/yarn/workspace/yarnWorkspace.ts
358
- var yarnWorkspace = /* @__PURE__ */ __name((pkg) => {
315
+ var yarnWorkspace = (pkg) => {
359
316
  const workspace = yarnWorkspaces().find(({ name }) => name === pkg);
360
317
  if (!workspace) throw new Error(`Workspace ${pkg} not found`);
361
318
  return workspace;
362
- }, "yarnWorkspace");
319
+ };
363
320
 
364
321
  // src/lib/yarn/yarnInitCwd.ts
365
- var INIT_CWD = /* @__PURE__ */ __name(() => {
322
+ var INIT_CWD = () => {
366
323
  if (!process.env.INIT_CWD) console.error("Missing INIT_CWD");
367
324
  return process.env.INIT_CWD;
368
- }, "INIT_CWD");
325
+ };
369
326
 
370
327
  // src/lib/generateIgnoreFiles.ts
371
- var localeCompare = /* @__PURE__ */ __name((a, b) => a.localeCompare(b), "localeCompare");
372
- var mergeEntries = /* @__PURE__ */ __name((a, b) => [
373
- ...union(a, b)
374
- ].sort(localeCompare), "mergeEntries");
375
- var generateIgnoreFiles = /* @__PURE__ */ __name((filename, pkg) => {
328
+ var localeCompare = (a, b) => a.localeCompare(b);
329
+ var mergeEntries = (a, b) => [...union(a, b)].sort(localeCompare);
330
+ var generateIgnoreFiles = (filename, pkg) => {
376
331
  console.log(chalk4.green(`Generate ${filename} Files`));
377
332
  const cwd = INIT_CWD() ?? ".";
378
- const workspaces = pkg ? [
379
- yarnWorkspace(pkg)
380
- ] : yarnWorkspaces();
381
- const readEntries = /* @__PURE__ */ __name((location) => readNonEmptyLines(`${location}/${filename}`), "readEntries");
382
- const writeEntries = /* @__PURE__ */ __name((location, entries) => writeLines(`${location}/${filename}`, entries), "writeEntries");
333
+ const workspaces = pkg ? [yarnWorkspace(pkg)] : yarnWorkspaces();
334
+ const readEntries = (location) => readNonEmptyLines(`${location}/${filename}`);
335
+ const writeEntries = (location, entries) => writeLines(`${location}/${filename}`, entries);
383
336
  const results = workspaces.map(({ location, name }) => {
384
337
  try {
385
338
  writeEntries(location, mergeEntries(readEntries(cwd), readEntries(location)));
@@ -392,41 +345,40 @@ var generateIgnoreFiles = /* @__PURE__ */ __name((filename, pkg) => {
392
345
  });
393
346
  const succeeded = results.every((result) => result === 0);
394
347
  return succeeded ? 0 : 1;
395
- }, "generateIgnoreFiles");
348
+ };
396
349
 
397
350
  // src/lib/loadConfig.ts
398
351
  import chalk5 from "chalk";
399
352
  import { cosmiconfig } from "cosmiconfig";
353
+ import { TypeScriptLoader } from "cosmiconfig-typescript-loader";
400
354
  import deepmerge from "deepmerge";
401
355
  var config;
402
- var loadConfig = /* @__PURE__ */ __name(async (params) => {
356
+ var loadConfig = async (params) => {
403
357
  if (config) {
404
358
  return deepmerge(config, params ?? {});
405
359
  }
406
- const cosmicConfigResult = await cosmiconfig("xy", {
407
- cache: true
408
- }).search();
360
+ const cosmicConfigResult = await cosmiconfig("xy", { cache: true, loaders: { ".ts": TypeScriptLoader() } }).search();
409
361
  config = cosmicConfigResult?.config;
410
362
  const configFilePath = cosmicConfigResult?.filepath;
411
363
  if (configFilePath) {
412
364
  console.log(chalk5.gray(`Loading config from ${configFilePath}`));
413
365
  }
414
366
  return deepmerge(config, params ?? {});
415
- }, "loadConfig");
367
+ };
416
368
 
417
369
  // src/lib/parsedPackageJSON.ts
418
370
  import { readFileSync as readFileSync4 } from "node:fs";
419
- var parsedPackageJSON = /* @__PURE__ */ __name((path) => {
371
+ var parsedPackageJSON = (path) => {
420
372
  const pathToPackageJSON = path ?? process.env.npm_package_json ?? "";
421
373
  const packageJSON = readFileSync4(pathToPackageJSON).toString();
422
374
  return JSON.parse(packageJSON);
423
- }, "parsedPackageJSON");
375
+ };
424
376
 
425
377
  // src/lib/runSteps.ts
426
378
  import { spawnSync as spawnSync3 } from "node:child_process";
427
379
  import { existsSync as existsSync3 } from "node:fs";
428
380
  import chalk6 from "chalk";
429
- var runSteps = /* @__PURE__ */ __name((name, steps, exitOnFail = true, messages) => {
381
+ var runSteps = (name, steps, exitOnFail = true, messages) => {
430
382
  return safeExit(() => {
431
383
  const pkgName = process.env.npm_package_name;
432
384
  console.log(chalk6.green(`${name} [${pkgName}]`));
@@ -442,10 +394,7 @@ var runSteps = /* @__PURE__ */ __name((name, steps, exitOnFail = true, messages)
442
394
  const status = spawnSync3(command, Array.isArray(args) ? args : args.split(" "), {
443
395
  ...config2,
444
396
  encoding: "utf8",
445
- env: {
446
- FORCE_COLOR: "3",
447
- ...process.env
448
- },
397
+ env: { FORCE_COLOR: "3", ...process.env },
449
398
  shell: true,
450
399
  stdio: "inherit"
451
400
  }).status ?? 0;
@@ -454,13 +403,13 @@ var runSteps = /* @__PURE__ */ __name((name, steps, exitOnFail = true, messages)
454
403
  }
455
404
  return totalStatus;
456
405
  }, !!exitOnFail);
457
- }, "runSteps");
406
+ };
458
407
 
459
408
  // src/lib/runStepsAsync.ts
460
409
  import { spawn } from "node:child_process";
461
410
  import { existsSync as existsSync4 } from "node:fs";
462
411
  import chalk7 from "chalk";
463
- var runStepAsync = /* @__PURE__ */ __name((name, step, exitOnFail = true, message) => {
412
+ var runStepAsync = (name, step, exitOnFail = true, message) => {
464
413
  return new Promise((resolve) => {
465
414
  const [command, args, config2] = step;
466
415
  if (message) {
@@ -472,15 +421,18 @@ var runStepAsync = /* @__PURE__ */ __name((name, step, exitOnFail = true, messag
472
421
  }
473
422
  spawn(command, Array.isArray(args) ? args : args.split(" "), {
474
423
  ...config2,
475
- env: {
476
- FORCE_COLOR: "3",
477
- ...process.env
478
- },
424
+ env: { FORCE_COLOR: "3", ...process.env },
479
425
  shell: true,
480
426
  stdio: "inherit"
481
427
  }).on("close", (code) => {
482
428
  if (code) {
483
- console.error(chalk7.red(`Command Exited With Non-Zero Result [${chalk7.gray(code)}] | ${chalk7.yellow(command)} ${chalk7.white(Array.isArray(args) ? args.join(" ") : args)}`));
429
+ console.error(
430
+ chalk7.red(
431
+ `Command Exited With Non-Zero Result [${chalk7.gray(code)}] | ${chalk7.yellow(command)} ${chalk7.white(
432
+ Array.isArray(args) ? args.join(" ") : args
433
+ )}`
434
+ )
435
+ );
484
436
  checkResult(name, code, "error", exitOnFail);
485
437
  resolve(code);
486
438
  } else {
@@ -488,8 +440,8 @@ var runStepAsync = /* @__PURE__ */ __name((name, step, exitOnFail = true, messag
488
440
  }
489
441
  });
490
442
  });
491
- }, "runStepAsync");
492
- var runStepsAsync = /* @__PURE__ */ __name(async (name, steps, exitOnFail = true, messages) => {
443
+ };
444
+ var runStepsAsync = async (name, steps, exitOnFail = true, messages) => {
493
445
  return await safeExitAsync(async () => {
494
446
  const pkgName = process.env.npm_package_name;
495
447
  console.log(chalk7.green(`${name} [${pkgName}]`));
@@ -499,31 +451,25 @@ var runStepsAsync = /* @__PURE__ */ __name(async (name, steps, exitOnFail = true
499
451
  }
500
452
  return result;
501
453
  });
502
- }, "runStepsAsync");
454
+ };
503
455
 
504
456
  // src/lib/runXy.ts
505
- var runXy = /* @__PURE__ */ __name((command) => {
506
- return runSteps(`XY [${command}]`, [
507
- [
508
- "yarn",
509
- [
510
- "xy",
511
- command,
512
- ...process.argv.filter((value, index) => index > 1 ? value : void 0)
513
- ]
514
- ]
515
- ]);
516
- }, "runXy");
457
+ var runXy = (command) => {
458
+ return runSteps(
459
+ `XY [${command}]`,
460
+ [["yarn", ["xy", command, ...process.argv.filter((value, index) => index > 1 ? value : void 0)]]]
461
+ );
462
+ };
517
463
 
518
464
  // src/lib/runXyWithWarning.ts
519
465
  import chalk8 from "chalk";
520
- var runXyWithWarning = /* @__PURE__ */ __name((command) => {
466
+ var runXyWithWarning = (command) => {
521
467
  const commandString = `yarn ${command}`;
522
468
  const commandXyString = `yarn xy ${command}`;
523
469
  console.warn(chalk8.yellow(`WARNING: [${chalk8.white(commandString)}] is deprecated for XY Labs Scripts.`));
524
470
  console.warn(chalk8.gray(`Did you mean [${chalk8.magenta(commandXyString)}]?`));
525
471
  return 1;
526
- }, "runXyWithWarning");
472
+ };
527
473
  export {
528
474
  CROSS_PLATFORM_NEWLINE,
529
475
  DuplicateDetector,