@xylabs/ts-scripts-yarn3 6.3.5 → 6.4.1

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (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 +195 -0
  22. package/dist/actions/deplint.mjs.map +1 -0
  23. package/dist/actions/deploy-major.mjs +20 -41
  24. package/dist/actions/deploy-major.mjs.map +1 -1
  25. package/dist/actions/deploy-minor.mjs +20 -41
  26. package/dist/actions/deploy-minor.mjs.map +1 -1
  27. package/dist/actions/deploy-next.mjs +20 -41
  28. package/dist/actions/deploy-next.mjs.map +1 -1
  29. package/dist/actions/deploy.mjs +20 -41
  30. package/dist/actions/deploy.mjs.map +1 -1
  31. package/dist/actions/dupdeps.mjs +26 -37
  32. package/dist/actions/dupdeps.mjs.map +1 -1
  33. package/dist/actions/fix.mjs +36 -54
  34. package/dist/actions/fix.mjs.map +1 -1
  35. package/dist/actions/gen-docs.mjs +25 -65
  36. package/dist/actions/gen-docs.mjs.map +1 -1
  37. package/dist/actions/gitignore-gen.mjs +28 -44
  38. package/dist/actions/gitignore-gen.mjs.map +1 -1
  39. package/dist/actions/gitlint-fix.mjs +5 -14
  40. package/dist/actions/gitlint-fix.mjs.map +1 -1
  41. package/dist/actions/gitlint.mjs +4 -7
  42. package/dist/actions/gitlint.mjs.map +1 -1
  43. package/dist/actions/index.mjs +864 -1241
  44. package/dist/actions/index.mjs.map +1 -1
  45. package/dist/actions/knip.mjs +16 -31
  46. package/dist/actions/knip.mjs.map +1 -1
  47. package/dist/actions/license.mjs +37 -51
  48. package/dist/actions/license.mjs.map +1 -1
  49. package/dist/actions/lint.mjs +33 -48
  50. package/dist/actions/lint.mjs.map +1 -1
  51. package/dist/actions/npmignore-gen.mjs +28 -44
  52. package/dist/actions/npmignore-gen.mjs.map +1 -1
  53. package/dist/actions/package/clean-outputs.mjs +6 -16
  54. package/dist/actions/package/clean-outputs.mjs.map +1 -1
  55. package/dist/actions/package/clean-typescript.mjs +6 -16
  56. package/dist/actions/package/clean-typescript.mjs.map +1 -1
  57. package/dist/actions/package/clean.mjs +12 -29
  58. package/dist/actions/package/clean.mjs.map +1 -1
  59. package/dist/actions/package/compile/buildEntries.mjs +7 -17
  60. package/dist/actions/package/compile/buildEntries.mjs.map +1 -1
  61. package/dist/actions/package/compile/compile.mjs +133 -169
  62. package/dist/actions/package/compile/compile.mjs.map +1 -1
  63. package/dist/actions/package/compile/compileTypes.mjs +43 -59
  64. package/dist/actions/package/compile/compileTypes.mjs.map +1 -1
  65. package/dist/actions/package/compile/copyTypeFiles.mjs +20 -23
  66. package/dist/actions/package/compile/copyTypeFiles.mjs.map +1 -1
  67. package/dist/actions/package/compile/deepMerge.mjs +0 -5
  68. package/dist/actions/package/compile/deepMerge.mjs.map +1 -1
  69. package/dist/actions/package/compile/getCompilerOptions.mjs +11 -10
  70. package/dist/actions/package/compile/getCompilerOptions.mjs.map +1 -1
  71. package/dist/actions/package/compile/index.mjs +133 -169
  72. package/dist/actions/package/compile/index.mjs.map +1 -1
  73. package/dist/actions/package/compile/inputs.mjs +3 -8
  74. package/dist/actions/package/compile/inputs.mjs.map +1 -1
  75. package/dist/actions/package/compile/packageCompileTsc.mjs +37 -52
  76. package/dist/actions/package/compile/packageCompileTsc.mjs.map +1 -1
  77. package/dist/actions/package/compile/packageCompileTscTypes.mjs +37 -52
  78. package/dist/actions/package/compile/packageCompileTscTypes.mjs.map +1 -1
  79. package/dist/actions/package/compile/packageCompileTsup.mjs +127 -163
  80. package/dist/actions/package/compile/packageCompileTsup.mjs.map +1 -1
  81. package/dist/actions/package/copy-assets.mjs +12 -21
  82. package/dist/actions/package/copy-assets.mjs.map +1 -1
  83. package/dist/actions/package/cycle.mjs +5 -14
  84. package/dist/actions/package/cycle.mjs.map +1 -1
  85. package/dist/actions/package/gen-docs.mjs +11 -12
  86. package/dist/actions/package/gen-docs.mjs.map +1 -1
  87. package/dist/actions/package/index.mjs +191 -271
  88. package/dist/actions/package/index.mjs.map +1 -1
  89. package/dist/actions/package/lint.mjs +16 -39
  90. package/dist/actions/package/lint.mjs.map +1 -1
  91. package/dist/actions/package/publint.mjs +4 -7
  92. package/dist/actions/package/publint.mjs.map +1 -1
  93. package/dist/actions/package/recompile.mjs +147 -197
  94. package/dist/actions/package/recompile.mjs.map +1 -1
  95. package/dist/actions/publint.mjs +37 -71
  96. package/dist/actions/publint.mjs.map +1 -1
  97. package/dist/actions/rebuild.mjs +17 -29
  98. package/dist/actions/rebuild.mjs.map +1 -1
  99. package/dist/actions/recompile.mjs +50 -67
  100. package/dist/actions/recompile.mjs.map +1 -1
  101. package/dist/actions/reinstall.mjs +25 -43
  102. package/dist/actions/reinstall.mjs.map +1 -1
  103. package/dist/actions/relint.mjs +40 -63
  104. package/dist/actions/relint.mjs.map +1 -1
  105. package/dist/actions/retest.mjs +17 -35
  106. package/dist/actions/retest.mjs.map +1 -1
  107. package/dist/actions/sonar.mjs +16 -32
  108. package/dist/actions/sonar.mjs.map +1 -1
  109. package/dist/actions/statics.mjs +27 -46
  110. package/dist/actions/statics.mjs.map +1 -1
  111. package/dist/actions/test.mjs +16 -30
  112. package/dist/actions/test.mjs.map +1 -1
  113. package/dist/actions/up.mjs +16 -27
  114. package/dist/actions/up.mjs.map +1 -1
  115. package/dist/actions/updo.mjs +18 -33
  116. package/dist/actions/updo.mjs.map +1 -1
  117. package/dist/actions/upplug.mjs +19 -53
  118. package/dist/actions/upplug.mjs.map +1 -1
  119. package/dist/actions/upyarn.mjs +16 -31
  120. package/dist/actions/upyarn.mjs.map +1 -1
  121. package/dist/actions/yarn3only.mjs +12 -23
  122. package/dist/actions/yarn3only.mjs.map +1 -1
  123. package/dist/bin/package/build-only.mjs +134 -172
  124. package/dist/bin/package/build-only.mjs.map +1 -1
  125. package/dist/bin/package/build.mjs +134 -172
  126. package/dist/bin/package/build.mjs.map +1 -1
  127. package/dist/bin/package/clean-outputs.mjs +6 -15
  128. package/dist/bin/package/clean-outputs.mjs.map +1 -1
  129. package/dist/bin/package/clean-typescript.mjs +6 -15
  130. package/dist/bin/package/clean-typescript.mjs.map +1 -1
  131. package/dist/bin/package/clean.mjs +12 -28
  132. package/dist/bin/package/clean.mjs.map +1 -1
  133. package/dist/bin/package/compile-only.mjs +134 -172
  134. package/dist/bin/package/compile-only.mjs.map +1 -1
  135. package/dist/bin/package/compile-tsup.mjs +128 -165
  136. package/dist/bin/package/compile-tsup.mjs.map +1 -1
  137. package/dist/bin/package/compile-types.mjs +44 -61
  138. package/dist/bin/package/compile-types.mjs.map +1 -1
  139. package/dist/bin/package/compile.mjs +134 -171
  140. package/dist/bin/package/compile.mjs.map +1 -1
  141. package/dist/bin/package/copy-assets-cjs.mjs +13 -23
  142. package/dist/bin/package/copy-assets-cjs.mjs.map +1 -1
  143. package/dist/bin/package/copy-assets-esm.mjs +13 -23
  144. package/dist/bin/package/copy-assets-esm.mjs.map +1 -1
  145. package/dist/bin/package/cycle.mjs +6 -16
  146. package/dist/bin/package/cycle.mjs.map +1 -1
  147. package/dist/bin/package/fix.mjs +16 -38
  148. package/dist/bin/package/fix.mjs.map +1 -1
  149. package/dist/bin/package/gen-docs.mjs +11 -11
  150. package/dist/bin/package/gen-docs.mjs.map +1 -1
  151. package/dist/bin/package/lint.mjs +16 -38
  152. package/dist/bin/package/lint.mjs.map +1 -1
  153. package/dist/bin/package/publint.mjs +4 -6
  154. package/dist/bin/package/publint.mjs.map +1 -1
  155. package/dist/bin/package/recompile.mjs +147 -196
  156. package/dist/bin/package/recompile.mjs.map +1 -1
  157. package/dist/bin/package/relint.mjs +16 -38
  158. package/dist/bin/package/relint.mjs.map +1 -1
  159. package/dist/bin/xy.mjs +1086 -1237
  160. package/dist/bin/xy.mjs.map +1 -1
  161. package/dist/index.d.ts +5 -1
  162. package/dist/index.mjs +1338 -1583
  163. package/dist/index.mjs.map +1 -1
  164. package/dist/lib/checkResult.mjs +2 -5
  165. package/dist/lib/checkResult.mjs.map +1 -1
  166. package/dist/lib/createBuildConfig.mjs +9 -24
  167. package/dist/lib/createBuildConfig.mjs.map +1 -1
  168. package/dist/lib/defaultBuildConfig.mjs +2 -6
  169. package/dist/lib/defaultBuildConfig.mjs.map +1 -1
  170. package/dist/lib/deleteGlob.mjs +3 -9
  171. package/dist/lib/deleteGlob.mjs.map +1 -1
  172. package/dist/lib/dependencies/DuplicateDetector.mjs +12 -23
  173. package/dist/lib/dependencies/DuplicateDetector.mjs.map +1 -1
  174. package/dist/lib/dependencies/detectDuplicateDependencies.mjs +22 -33
  175. package/dist/lib/dependencies/detectDuplicateDependencies.mjs.map +1 -1
  176. package/dist/lib/dependencies/index.mjs +22 -33
  177. package/dist/lib/dependencies/index.mjs.map +1 -1
  178. package/dist/lib/file/ReadFileSyncOptions.mjs +1 -3
  179. package/dist/lib/file/ReadFileSyncOptions.mjs.map +1 -1
  180. package/dist/lib/file/constants.mjs.map +1 -1
  181. package/dist/lib/file/fileLines.mjs +12 -13
  182. package/dist/lib/file/fileLines.mjs.map +1 -1
  183. package/dist/lib/file/index.mjs +14 -15
  184. package/dist/lib/file/index.mjs.map +1 -1
  185. package/dist/lib/file/tryReadFileSync.mjs +3 -8
  186. package/dist/lib/file/tryReadFileSync.mjs.map +1 -1
  187. package/dist/lib/generateIgnoreFiles.mjs +27 -43
  188. package/dist/lib/generateIgnoreFiles.mjs.map +1 -1
  189. package/dist/lib/index.mjs +100 -154
  190. package/dist/lib/index.mjs.map +1 -1
  191. package/dist/lib/jsonFormatters.mjs +2 -5
  192. package/dist/lib/jsonFormatters.mjs.map +1 -1
  193. package/dist/lib/loadConfig.mjs +4 -8
  194. package/dist/lib/loadConfig.mjs.map +1 -1
  195. package/dist/lib/parsedPackageJSON.mjs +2 -5
  196. package/dist/lib/parsedPackageJSON.mjs.map +1 -1
  197. package/dist/lib/processEx.mjs +6 -9
  198. package/dist/lib/processEx.mjs.map +1 -1
  199. package/dist/lib/runSteps.mjs +13 -19
  200. package/dist/lib/runSteps.mjs.map +1 -1
  201. package/dist/lib/runStepsAsync.mjs +22 -22
  202. package/dist/lib/runStepsAsync.mjs.map +1 -1
  203. package/dist/lib/runXy.mjs +19 -31
  204. package/dist/lib/runXy.mjs.map +1 -1
  205. package/dist/lib/runXyWithWarning.mjs +2 -5
  206. package/dist/lib/runXyWithWarning.mjs.map +1 -1
  207. package/dist/lib/safeExit.mjs +10 -13
  208. package/dist/lib/safeExit.mjs.map +1 -1
  209. package/dist/lib/string/empty.mjs +2 -5
  210. package/dist/lib/string/empty.mjs.map +1 -1
  211. package/dist/lib/string/index.mjs +3 -9
  212. package/dist/lib/string/index.mjs.map +1 -1
  213. package/dist/lib/string/union.mjs +1 -7
  214. package/dist/lib/string/union.mjs.map +1 -1
  215. package/dist/lib/withErrnoException.mjs +4 -7
  216. package/dist/lib/withErrnoException.mjs.map +1 -1
  217. package/dist/lib/withError.mjs +2 -5
  218. package/dist/lib/withError.mjs.map +1 -1
  219. package/dist/lib/yarn/index.mjs +11 -30
  220. package/dist/lib/yarn/index.mjs.map +1 -1
  221. package/dist/lib/yarn/isYarnVersionOrGreater.mjs +4 -15
  222. package/dist/lib/yarn/isYarnVersionOrGreater.mjs.map +1 -1
  223. package/dist/lib/yarn/workspace/index.mjs +5 -16
  224. package/dist/lib/yarn/workspace/index.mjs.map +1 -1
  225. package/dist/lib/yarn/workspace/yarnWorkspace.mjs +5 -16
  226. package/dist/lib/yarn/workspace/yarnWorkspace.mjs.map +1 -1
  227. package/dist/lib/yarn/workspace/yarnWorkspaces.mjs +3 -14
  228. package/dist/lib/yarn/workspace/yarnWorkspaces.mjs.map +1 -1
  229. package/dist/lib/yarn/yarnInitCwd.mjs +2 -5
  230. package/dist/lib/yarn/yarnInitCwd.mjs.map +1 -1
  231. package/dist/loadPackageConfig.mjs +3 -8
  232. package/dist/loadPackageConfig.mjs.map +1 -1
  233. package/dist/xy/index.mjs +1086 -1238
  234. package/dist/xy/index.mjs.map +1 -1
  235. package/dist/xy/param.mjs +3 -8
  236. package/dist/xy/param.mjs.map +1 -1
  237. package/dist/xy/xy.mjs +1086 -1238
  238. package/dist/xy/xy.mjs.map +1 -1
  239. package/dist/xy/xyBuildCommands.mjs +276 -382
  240. package/dist/xy/xyBuildCommands.mjs.map +1 -1
  241. package/dist/xy/xyCommonCommands.mjs +251 -335
  242. package/dist/xy/xyCommonCommands.mjs.map +1 -1
  243. package/dist/xy/xyDeployCommands.mjs +84 -130
  244. package/dist/xy/xyDeployCommands.mjs.map +1 -1
  245. package/dist/xy/xyInstallCommands.mjs +145 -193
  246. package/dist/xy/xyInstallCommands.mjs.map +1 -1
  247. package/dist/xy/xyLintCommands.mjs +413 -292
  248. package/dist/xy/xyLintCommands.mjs.map +1 -1
  249. package/dist/xy/xyParseOptions.mjs +4 -13
  250. package/dist/xy/xyParseOptions.mjs.map +1 -1
  251. package/package.json +3 -22
@@ -1,12 +1,9 @@
1
- var __defProp = Object.defineProperty;
2
- var __name = (target, value) => __defProp(target, "name", { value, configurable: true });
3
-
4
1
  // src/actions/build.ts
5
2
  import chalk5 from "chalk";
6
3
 
7
4
  // src/lib/checkResult.ts
8
5
  import chalk from "chalk";
9
- var checkResult = /* @__PURE__ */ __name((name, result, level = "error", exitOnFail = false) => {
6
+ var checkResult = (name, result, level = "error", exitOnFail = false) => {
10
7
  if (result) {
11
8
  const exiting = exitOnFail ? "[Exiting Process]" : "[Continuing]";
12
9
  const chalkFunc = level === "error" ? chalk.red : chalk.yellow;
@@ -15,23 +12,23 @@ var checkResult = /* @__PURE__ */ __name((name, result, level = "error", exitOnF
15
12
  process.exit(result);
16
13
  }
17
14
  }
18
- }, "checkResult");
15
+ };
19
16
 
20
17
  // src/lib/processEx.ts
21
18
  import chalk2 from "chalk";
22
19
 
23
20
  // src/lib/withError.ts
24
- var withError = /* @__PURE__ */ __name((ex, closure, predicate = (ex2) => !!ex2.name && !!ex2.message) => {
21
+ var withError = (ex, closure, predicate = (ex2) => !!ex2.name && !!ex2.message) => {
25
22
  return predicate(ex) ? closure(ex) : void 0;
26
- }, "withError");
23
+ };
27
24
 
28
25
  // src/lib/withErrnoException.ts
29
- var withErrnoException = /* @__PURE__ */ __name((ex, closure) => {
26
+ var withErrnoException = (ex, closure) => {
30
27
  return withError(ex, closure, (ex2) => ex2.errno !== void 0);
31
- }, "withErrnoException");
28
+ };
32
29
 
33
30
  // src/lib/processEx.ts
34
- var processEx = /* @__PURE__ */ __name((ex) => {
31
+ var processEx = (ex) => {
35
32
  const error = typeof ex === "string" ? new Error(ex) : ex;
36
33
  const exitCode = withErrnoException(error, (error2) => {
37
34
  if (error2.code === "ENOENT") {
@@ -48,10 +45,10 @@ var processEx = /* @__PURE__ */ __name((ex) => {
48
45
  return -1;
49
46
  })();
50
47
  process.exit(process.exitCode ?? exitCode);
51
- }, "processEx");
48
+ };
52
49
 
53
50
  // src/lib/safeExit.ts
54
- var safeExit = /* @__PURE__ */ __name((func, exitOnFail = true) => {
51
+ var safeExit = (func, exitOnFail = true) => {
55
52
  try {
56
53
  const result = func();
57
54
  if (result && exitOnFail) {
@@ -61,8 +58,8 @@ var safeExit = /* @__PURE__ */ __name((func, exitOnFail = true) => {
61
58
  } catch (ex) {
62
59
  return processEx(ex);
63
60
  }
64
- }, "safeExit");
65
- var safeExitAsync = /* @__PURE__ */ __name(async (func, exitOnFail = true) => {
61
+ };
62
+ var safeExitAsync = async (func, exitOnFail = true) => {
66
63
  try {
67
64
  const result = await func();
68
65
  if (result && exitOnFail) {
@@ -72,33 +69,25 @@ var safeExitAsync = /* @__PURE__ */ __name(async (func, exitOnFail = true) => {
72
69
  } catch (ex) {
73
70
  return processEx(ex);
74
71
  }
75
- }, "safeExitAsync");
72
+ };
76
73
 
77
74
  // src/lib/yarn/workspace/yarnWorkspaces.ts
78
75
  import { spawnSync } from "node:child_process";
79
- var yarnWorkspaces = /* @__PURE__ */ __name(() => {
80
- const result = spawnSync("yarn", [
81
- "workspaces",
82
- "list",
83
- "--json",
84
- "--recursive"
85
- ], {
86
- encoding: "utf8",
87
- shell: true
88
- });
76
+ var yarnWorkspaces = () => {
77
+ const result = spawnSync("yarn", ["workspaces", "list", "--json", "--recursive"], { encoding: "utf8", shell: true });
89
78
  if (result.error) {
90
79
  throw result.error;
91
80
  }
92
81
  return result.stdout.toString().split("\n").slice(0, -1).map((item) => {
93
82
  return JSON.parse(item);
94
83
  });
95
- }, "yarnWorkspaces");
84
+ };
96
85
 
97
86
  // src/lib/runSteps.ts
98
87
  import { spawnSync as spawnSync2 } from "node:child_process";
99
88
  import { existsSync } from "node:fs";
100
89
  import chalk3 from "chalk";
101
- var runSteps = /* @__PURE__ */ __name((name, steps, exitOnFail = true, messages) => {
90
+ var runSteps = (name, steps, exitOnFail = true, messages) => {
102
91
  return safeExit(() => {
103
92
  const pkgName = process.env.npm_package_name;
104
93
  console.log(chalk3.green(`${name} [${pkgName}]`));
@@ -114,10 +103,7 @@ var runSteps = /* @__PURE__ */ __name((name, steps, exitOnFail = true, messages)
114
103
  const status = spawnSync2(command, Array.isArray(args) ? args : args.split(" "), {
115
104
  ...config,
116
105
  encoding: "utf8",
117
- env: {
118
- FORCE_COLOR: "3",
119
- ...process.env
120
- },
106
+ env: { FORCE_COLOR: "3", ...process.env },
121
107
  shell: true,
122
108
  stdio: "inherit"
123
109
  }).status ?? 0;
@@ -126,13 +112,13 @@ var runSteps = /* @__PURE__ */ __name((name, steps, exitOnFail = true, messages)
126
112
  }
127
113
  return totalStatus;
128
114
  }, !!exitOnFail);
129
- }, "runSteps");
115
+ };
130
116
 
131
117
  // src/lib/runStepsAsync.ts
132
118
  import { spawn } from "node:child_process";
133
119
  import { existsSync as existsSync2 } from "node:fs";
134
120
  import chalk4 from "chalk";
135
- var runStepAsync = /* @__PURE__ */ __name((name, step, exitOnFail = true, message) => {
121
+ var runStepAsync = (name, step, exitOnFail = true, message) => {
136
122
  return new Promise((resolve) => {
137
123
  const [command, args, config] = step;
138
124
  if (message) {
@@ -144,15 +130,18 @@ var runStepAsync = /* @__PURE__ */ __name((name, step, exitOnFail = true, messag
144
130
  }
145
131
  spawn(command, Array.isArray(args) ? args : args.split(" "), {
146
132
  ...config,
147
- env: {
148
- FORCE_COLOR: "3",
149
- ...process.env
150
- },
133
+ env: { FORCE_COLOR: "3", ...process.env },
151
134
  shell: true,
152
135
  stdio: "inherit"
153
136
  }).on("close", (code) => {
154
137
  if (code) {
155
- console.error(chalk4.red(`Command Exited With Non-Zero Result [${chalk4.gray(code)}] | ${chalk4.yellow(command)} ${chalk4.white(Array.isArray(args) ? args.join(" ") : args)}`));
138
+ console.error(
139
+ chalk4.red(
140
+ `Command Exited With Non-Zero Result [${chalk4.gray(code)}] | ${chalk4.yellow(command)} ${chalk4.white(
141
+ Array.isArray(args) ? args.join(" ") : args
142
+ )}`
143
+ )
144
+ );
156
145
  checkResult(name, code, "error", exitOnFail);
157
146
  resolve(code);
158
147
  } else {
@@ -160,8 +149,8 @@ var runStepAsync = /* @__PURE__ */ __name((name, step, exitOnFail = true, messag
160
149
  }
161
150
  });
162
151
  });
163
- }, "runStepAsync");
164
- var runStepsAsync = /* @__PURE__ */ __name(async (name, steps, exitOnFail = true, messages) => {
152
+ };
153
+ var runStepsAsync = async (name, steps, exitOnFail = true, messages) => {
165
154
  return await safeExitAsync(async () => {
166
155
  const pkgName = process.env.npm_package_name;
167
156
  console.log(chalk4.green(`${name} [${pkgName}]`));
@@ -171,86 +160,45 @@ var runStepsAsync = /* @__PURE__ */ __name(async (name, steps, exitOnFail = true
171
160
  }
172
161
  return result;
173
162
  });
174
- }, "runStepsAsync");
163
+ };
175
164
 
176
165
  // src/actions/build.ts
177
- var build = /* @__PURE__ */ __name(async ({ incremental, jobs, target, verbose, pkg }) => {
166
+ var build = async ({
167
+ incremental,
168
+ jobs,
169
+ target,
170
+ verbose,
171
+ pkg
172
+ }) => {
178
173
  const start = Date.now();
179
- const pkgOptions = pkg ? [
180
- pkg
181
- ] : [];
182
- const incrementalOptions = incremental ? [
183
- "-i"
184
- ] : [];
185
- const verboseOptions = verbose ? [
186
- "-v"
187
- ] : [];
188
- const targetOptions = target ? [
189
- "-t",
190
- target
191
- ] : [];
192
- const jobsOptions = jobs ? [
193
- "-j",
194
- `${jobs}`
195
- ] : [];
174
+ const pkgOptions = pkg ? [pkg] : [];
175
+ const incrementalOptions = incremental ? ["-i"] : [];
176
+ const verboseOptions = verbose ? ["-v"] : [];
177
+ const targetOptions = target ? ["-t", target] : [];
178
+ const jobsOptions = jobs ? ["-j", `${jobs}`] : [];
196
179
  if (jobs) {
197
180
  console.log(chalk5.blue(`Jobs set to [${jobs}]`));
198
181
  }
199
182
  const result = await runStepsAsync(`Build${incremental ? "-Incremental" : ""} [${pkg ?? "All"}]`, [
200
- [
201
- "yarn",
202
- [
203
- "xy",
204
- "compile",
205
- ...pkgOptions,
206
- ...targetOptions,
207
- ...verboseOptions,
208
- ...jobsOptions,
209
- ...incrementalOptions,
210
- "--types",
211
- "tsup"
212
- ]
213
- ],
214
- [
215
- "yarn",
216
- [
217
- "xy",
218
- "publint",
219
- ...pkgOptions,
220
- ...verboseOptions,
221
- ...jobsOptions,
222
- ...incrementalOptions
223
- ]
224
- ],
225
- [
226
- "yarn",
227
- [
228
- "xy",
229
- "knip",
230
- ...pkgOptions,
231
- ...verboseOptions,
232
- ...jobsOptions,
233
- ...incrementalOptions
234
- ]
235
- ],
236
- [
237
- "yarn",
238
- [
239
- "xy",
240
- "lint",
241
- ...pkgOptions,
242
- ...verboseOptions,
243
- ...incrementalOptions
244
- ]
245
- ]
183
+ ["yarn", ["xy", "compile", ...pkgOptions, ...targetOptions, ...verboseOptions, ...jobsOptions, ...incrementalOptions, "--types", "tsup"]],
184
+ ["yarn", ["xy", "publint", ...pkgOptions, ...verboseOptions, ...jobsOptions, ...incrementalOptions]],
185
+ ["yarn", ["xy", "knip", ...pkgOptions, ...verboseOptions, ...jobsOptions, ...incrementalOptions]],
186
+ ["yarn", ["xy", "lint", ...pkgOptions, ...verboseOptions, ...incrementalOptions]]
246
187
  ]);
247
188
  console.log(`${chalk5.gray("Built in")} [${chalk5.magenta(((Date.now() - start) / 1e3).toFixed(2))}] ${chalk5.gray("seconds")}`);
248
189
  return result;
249
- }, "build");
190
+ };
250
191
 
251
192
  // src/actions/compile.ts
252
193
  import chalk6 from "chalk";
253
- var compile = /* @__PURE__ */ __name(({ verbose, target, pkg, incremental, publint, jobs }) => {
194
+ var compile = ({
195
+ verbose,
196
+ target,
197
+ pkg,
198
+ incremental,
199
+ publint,
200
+ jobs
201
+ }) => {
254
202
  return pkg ? compilePackage({
255
203
  pkg,
256
204
  publint,
@@ -263,164 +211,114 @@ var compile = /* @__PURE__ */ __name(({ verbose, target, pkg, incremental, publi
263
211
  verbose,
264
212
  jobs
265
213
  });
266
- }, "compile");
267
- var compilePackage = /* @__PURE__ */ __name(({ target, pkg }) => {
268
- const targetOptions = target ? [
269
- "-t",
270
- target
271
- ] : [];
272
- return runSteps(`Compile [${pkg}]`, [
273
- [
274
- "yarn",
275
- [
276
- "workspace",
277
- pkg,
278
- "run",
279
- "package-compile",
280
- ...targetOptions
281
- ]
282
- ]
283
- ]);
284
- }, "compilePackage");
285
- var compileAll = /* @__PURE__ */ __name(({ jobs, verbose, target, incremental }) => {
214
+ };
215
+ var compilePackage = ({ target, pkg }) => {
216
+ const targetOptions = target ? ["-t", target] : [];
217
+ return runSteps(
218
+ `Compile [${pkg}]`,
219
+ [["yarn", ["workspace", pkg, "run", "package-compile", ...targetOptions]]]
220
+ );
221
+ };
222
+ var compileAll = ({
223
+ jobs,
224
+ verbose,
225
+ target,
226
+ incremental
227
+ }) => {
286
228
  const start = Date.now();
287
- const verboseOptions = verbose ? [
288
- "--verbose"
289
- ] : [
290
- "--no-verbose"
291
- ];
292
- const targetOptions = target ? [
293
- "-t",
294
- target
295
- ] : [];
296
- const incrementalOptions = incremental ? [
297
- "--since",
298
- "-Apt",
299
- "--topological-dev"
300
- ] : [
301
- "--parallel",
302
- "-Apt",
303
- "--topological-dev"
304
- ];
305
- const jobsOptions = jobs ? [
306
- "-j",
307
- `${jobs}`
308
- ] : [];
229
+ const verboseOptions = verbose ? ["--verbose"] : ["--no-verbose"];
230
+ const targetOptions = target ? ["-t", target] : [];
231
+ const incrementalOptions = incremental ? ["--since", "-Apt", "--topological-dev"] : ["--parallel", "-Apt", "--topological-dev"];
232
+ const jobsOptions = jobs ? ["-j", `${jobs}`] : [];
309
233
  if (jobs) {
310
234
  console.log(chalk6.blue(`Jobs set to [${jobs}]`));
311
235
  }
312
236
  const result = runSteps(`Compile${incremental ? "-Incremental" : ""} [All]`, [
313
- [
314
- "yarn",
315
- [
316
- "workspaces",
317
- "foreach",
318
- ...incrementalOptions,
319
- ...jobsOptions,
320
- ...verboseOptions,
321
- "run",
322
- "package-compile",
323
- ...targetOptions
324
- ]
325
- ]
237
+ ["yarn", [
238
+ "workspaces",
239
+ "foreach",
240
+ ...incrementalOptions,
241
+ ...jobsOptions,
242
+ ...verboseOptions,
243
+ "run",
244
+ "package-compile",
245
+ ...targetOptions
246
+ ]]
326
247
  ]);
327
248
  console.log(`${chalk6.gray("Compiled in")} [${chalk6.magenta(((Date.now() - start) / 1e3).toFixed(2))}] ${chalk6.gray("seconds")}`);
328
249
  return result;
329
- }, "compileAll");
250
+ };
330
251
 
331
252
  // src/actions/compile-types.ts
332
253
  import chalk7 from "chalk";
333
- var compileTypes = /* @__PURE__ */ __name(({ verbose, pkg, incremental, jobs }) => {
254
+ var compileTypes = ({
255
+ verbose,
256
+ pkg,
257
+ incremental,
258
+ jobs
259
+ }) => {
334
260
  if (verbose) {
335
261
  console.log(chalk7.gray("Compiling Types"));
336
262
  }
337
- return pkg ? compileTypesPackage({
338
- pkg,
339
- verbose
340
- }) : compileTypesAll({
263
+ return pkg ? compileTypesPackage({ pkg, verbose }) : compileTypesAll({
341
264
  incremental,
342
265
  verbose,
343
266
  jobs
344
267
  });
345
- }, "compileTypes");
346
- var compileTypesPackage = /* @__PURE__ */ __name(({ verbose, pkg }) => {
268
+ };
269
+ var compileTypesPackage = ({ verbose, pkg }) => {
347
270
  if (verbose) {
348
271
  console.log(chalk7.gray("Compiling Types [Package]"));
349
272
  }
350
- return runSteps(`Compile [${pkg}]`, [
351
- [
352
- "yarn",
353
- [
354
- "workspace",
355
- pkg,
356
- "run",
357
- "package-compile-types"
358
- ]
359
- ]
360
- ]);
361
- }, "compileTypesPackage");
362
- var compileTypesAll = /* @__PURE__ */ __name(({ jobs, verbose, incremental }) => {
273
+ return runSteps(
274
+ `Compile [${pkg}]`,
275
+ [["yarn", ["workspace", pkg, "run", "package-compile-types"]]]
276
+ );
277
+ };
278
+ var compileTypesAll = ({
279
+ jobs,
280
+ verbose,
281
+ incremental
282
+ }) => {
363
283
  if (verbose) {
364
284
  console.log(chalk7.gray("Compiling Types [All]"));
365
285
  }
366
286
  const start = Date.now();
367
- const verboseOptions = verbose ? [
368
- "--verbose"
369
- ] : [
370
- "--no-verbose"
371
- ];
372
- const incrementalOptions = incremental ? [
373
- "--since",
374
- "-Apt"
375
- ] : [
376
- "--parallel",
377
- "-Apt"
378
- ];
379
- const jobsOptions = jobs ? [
380
- "-j",
381
- `${jobs}`
382
- ] : [];
287
+ const verboseOptions = verbose ? ["--verbose"] : ["--no-verbose"];
288
+ const incrementalOptions = incremental ? ["--since", "-Apt"] : ["--parallel", "-Apt"];
289
+ const jobsOptions = jobs ? ["-j", `${jobs}`] : [];
383
290
  if (jobs) {
384
291
  console.log(chalk7.blue(`Jobs set to [${jobs}]`));
385
292
  }
386
293
  const result = runSteps(`Compile Types ${incremental ? "[Incremental]" : ""} [All]`, [
387
- [
388
- "yarn",
389
- [
390
- "workspaces",
391
- "foreach",
392
- ...incrementalOptions,
393
- ...jobsOptions,
394
- ...verboseOptions,
395
- "run",
396
- "package-compile-types"
397
- ]
398
- ]
294
+ ["yarn", [
295
+ "workspaces",
296
+ "foreach",
297
+ ...incrementalOptions,
298
+ ...jobsOptions,
299
+ ...verboseOptions,
300
+ "run",
301
+ "package-compile-types"
302
+ ]]
399
303
  ]);
400
304
  console.log(`${chalk7.gray("Types Compiled in")} [${chalk7.magenta(((Date.now() - start) / 1e3).toFixed(2))}] ${chalk7.gray("seconds")}`);
401
305
  return result;
402
- }, "compileTypesAll");
306
+ };
403
307
 
404
308
  // src/actions/copy-assets.ts
405
309
  import path from "node:path/posix";
406
310
  import chalk8 from "chalk";
407
311
  import cpy from "cpy";
408
- var copyPackageTargetAssets = /* @__PURE__ */ __name(async (target, name, location) => {
312
+ var copyPackageTargetAssets = async (target, name, location) => {
409
313
  try {
410
- const values = await cpy([
411
- "**/*.jpg",
412
- "**/*.png",
413
- "**/*.gif",
414
- "**/*.svg",
415
- "**/*.webp",
416
- "**/*.sass",
417
- "**/*.scss",
418
- "**/*.gif",
419
- "**/*.css"
420
- ], `../dist/${target}`, {
421
- cwd: path.join(process.cwd(), location, "src"),
422
- flat: false
423
- });
314
+ const values = await cpy(
315
+ ["**/*.jpg", "**/*.png", "**/*.gif", "**/*.svg", "**/*.webp", "**/*.sass", "**/*.scss", "**/*.gif", "**/*.css"],
316
+ `../dist/${target}`,
317
+ {
318
+ cwd: path.join(process.cwd(), location, "src"),
319
+ flat: false
320
+ }
321
+ );
424
322
  for (const value of values) {
425
323
  console.log(`${value.split("/").pop()} => ./dist/${target}`);
426
324
  }
@@ -429,8 +327,8 @@ var copyPackageTargetAssets = /* @__PURE__ */ __name(async (target, name, locati
429
327
  console.log(`Copy Failed: ${name}: ${reason}`);
430
328
  return 1;
431
329
  }
432
- }, "copyPackageTargetAssets");
433
- var copyTargetAssets = /* @__PURE__ */ __name(async (target, pkg) => {
330
+ };
331
+ var copyTargetAssets = async (target, pkg) => {
434
332
  const workspaces = yarnWorkspaces();
435
333
  console.log(chalk8.green(`Copying Assets [${target.toUpperCase()}]`));
436
334
  const workspaceList = workspaces.filter(({ name }) => {
@@ -439,15 +337,17 @@ var copyTargetAssets = /* @__PURE__ */ __name(async (target, pkg) => {
439
337
  if (workspaceList.length === 0) {
440
338
  console.error(`Package not found [${pkg}]`);
441
339
  } else {
442
- const results = await Promise.all(workspaceList.map(async (workspace) => {
443
- const { location, name } = workspace;
444
- return await copyPackageTargetAssets(target, name, location);
445
- }));
340
+ const results = await Promise.all(
341
+ workspaceList.map(async (workspace) => {
342
+ const { location, name } = workspace;
343
+ return await copyPackageTargetAssets(target, name, location);
344
+ })
345
+ );
446
346
  return results.reduce((prev, result) => prev || result, 0);
447
347
  }
448
348
  return 0;
449
- }, "copyTargetAssets");
450
- var copyAssets = /* @__PURE__ */ __name(async ({ target, pkg }) => {
349
+ };
350
+ var copyAssets = async ({ target, pkg }) => {
451
351
  switch (target) {
452
352
  case "esm": {
453
353
  return await copyTargetAssets("esm", pkg);
@@ -459,25 +359,24 @@ var copyAssets = /* @__PURE__ */ __name(async ({ target, pkg }) => {
459
359
  return await copyTargetAssets("esm", pkg) || await copyTargetAssets("cjs", pkg);
460
360
  }
461
361
  }
462
- }, "copyAssets");
362
+ };
463
363
 
464
364
  // src/actions/rebuild.ts
465
- var rebuild = /* @__PURE__ */ __name(({ target }) => {
365
+ var rebuild = ({ target }) => {
466
366
  return runSteps("Rebuild", [
467
- [
468
- "yarn",
469
- "xy clean"
470
- ],
471
- [
472
- "yarn",
473
- target ? `xy build -t ${target}` : "xy build"
474
- ]
367
+ ["yarn", "xy clean"],
368
+ ["yarn", target ? `xy build -t ${target}` : "xy build"]
475
369
  ]);
476
- }, "rebuild");
370
+ };
477
371
 
478
372
  // src/actions/recompile.ts
479
373
  import chalk9 from "chalk";
480
- var recompile = /* @__PURE__ */ __name(async ({ verbose, target, pkg, incremental }) => {
374
+ var recompile = async ({
375
+ verbose,
376
+ target,
377
+ pkg,
378
+ incremental
379
+ }) => {
481
380
  return pkg ? await recompilePackage({
482
381
  pkg,
483
382
  target,
@@ -487,49 +386,25 @@ var recompile = /* @__PURE__ */ __name(async ({ verbose, target, pkg, incrementa
487
386
  target,
488
387
  verbose
489
388
  });
490
- }, "recompile");
491
- var recompilePackage = /* @__PURE__ */ __name(({ target, pkg }) => {
492
- const targetOptions = target ? [
493
- "-t",
494
- target
495
- ] : [];
496
- return runStepsAsync(`Recompile [${pkg}]`, [
497
- [
498
- "yarn",
499
- [
500
- "workspace",
501
- pkg,
502
- "run",
503
- "package-recompile",
504
- ...targetOptions
505
- ]
506
- ]
507
- ]);
508
- }, "recompilePackage");
509
- var recompileAll = /* @__PURE__ */ __name(async ({ jobs, verbose, target, incremental }) => {
389
+ };
390
+ var recompilePackage = ({ target, pkg }) => {
391
+ const targetOptions = target ? ["-t", target] : [];
392
+ return runStepsAsync(
393
+ `Recompile [${pkg}]`,
394
+ [["yarn", ["workspace", pkg, "run", "package-recompile", ...targetOptions]]]
395
+ );
396
+ };
397
+ var recompileAll = async ({
398
+ jobs,
399
+ verbose,
400
+ target,
401
+ incremental
402
+ }) => {
510
403
  const start = Date.now();
511
- const verboseOptions = verbose ? [
512
- "--verbose"
513
- ] : [
514
- "--no-verbose"
515
- ];
516
- const targetOptions = target ? [
517
- "-t",
518
- target
519
- ] : [];
520
- const incrementalOptions = incremental ? [
521
- "--since",
522
- "-Apt",
523
- "--topological-dev"
524
- ] : [
525
- "--parallel",
526
- "-Apt",
527
- "--topological-dev"
528
- ];
529
- const jobsOptions = jobs ? [
530
- "-j",
531
- `${jobs}`
532
- ] : [];
404
+ const verboseOptions = verbose ? ["--verbose"] : ["--no-verbose"];
405
+ const targetOptions = target ? ["-t", target] : [];
406
+ const incrementalOptions = incremental ? ["--since", "-Apt", "--topological-dev"] : ["--parallel", "-Apt", "--topological-dev"];
407
+ const jobsOptions = jobs ? ["-j", `${jobs}`] : [];
533
408
  if (jobs) {
534
409
  console.log(chalk9.blue(`Jobs set to [${jobs}]`));
535
410
  }
@@ -561,107 +436,126 @@ var recompileAll = /* @__PURE__ */ __name(async ({ jobs, verbose, target, increm
561
436
  ]
562
437
  ]
563
438
  ]);
564
- console.log(`${chalk9.gray("Recompiled in")} [${chalk9.magenta(((Date.now() - start) / 1e3).toFixed(2))}] ${chalk9.gray("seconds")}`);
439
+ console.log(
440
+ `${chalk9.gray("Recompiled in")} [${chalk9.magenta(((Date.now() - start) / 1e3).toFixed(2))}] ${chalk9.gray("seconds")}`
441
+ );
565
442
  return result;
566
- }, "recompileAll");
443
+ };
567
444
 
568
445
  // src/xy/xyBuildCommands.ts
569
- var xyBuildCommands = /* @__PURE__ */ __name((args) => {
570
- return args.command("build [package]", "Build - Compile & Lint", (yargs) => {
571
- return yargs.positional("package", {
572
- describe: "Specific package to build"
573
- });
574
- }, async (argv) => {
575
- if (argv.verbose) {
576
- console.log(`Building: ${argv.package ?? "all"}`);
446
+ var xyBuildCommands = (args) => {
447
+ return args.command(
448
+ "build [package]",
449
+ "Build - Compile & Lint",
450
+ (yargs) => {
451
+ return yargs.positional("package", { describe: "Specific package to build" });
452
+ },
453
+ async (argv) => {
454
+ if (argv.verbose) {
455
+ console.log(`Building: ${argv.package ?? "all"}`);
456
+ }
457
+ process.exitCode = await build({
458
+ incremental: !!argv.incremental,
459
+ jobs: argv.jobs,
460
+ pkg: argv.package,
461
+ target: argv.target,
462
+ verbose: !!argv.verbose
463
+ });
577
464
  }
578
- process.exitCode = await build({
579
- incremental: !!argv.incremental,
580
- jobs: argv.jobs,
581
- pkg: argv.package,
582
- target: argv.target,
583
- verbose: !!argv.verbose
584
- });
585
- }).command("compile [package]", "Compile with Typescript & Copy Images", (yargs) => {
586
- return yargs.positional("package", {
587
- describe: "Specific package to compile"
588
- });
589
- }, (argv) => {
590
- if (argv.verbose) {
591
- console.log(`Compiling: ${argv.package ?? "all"}`);
465
+ ).command(
466
+ "compile [package]",
467
+ "Compile with Typescript & Copy Images",
468
+ (yargs) => {
469
+ return yargs.positional("package", { describe: "Specific package to compile" });
470
+ },
471
+ (argv) => {
472
+ if (argv.verbose) {
473
+ console.log(`Compiling: ${argv.package ?? "all"}`);
474
+ }
475
+ process.exitCode = compile({
476
+ incremental: !!argv.incremental,
477
+ jobs: argv.jobs,
478
+ pkg: argv.package,
479
+ target: argv.target,
480
+ verbose: !!argv.verbose
481
+ });
592
482
  }
593
- process.exitCode = compile({
594
- incremental: !!argv.incremental,
595
- jobs: argv.jobs,
596
- pkg: argv.package,
597
- target: argv.target,
598
- verbose: !!argv.verbose
599
- });
600
- }).command("compile-types [package]", "Compile types with Typescript", (yargs) => {
601
- return yargs.positional("package", {
602
- describe: "Specific package to compile"
603
- });
604
- }, (argv) => {
605
- if (argv.verbose) {
606
- console.log(`Compiling: ${argv.package ?? "all"}`);
483
+ ).command(
484
+ "compile-types [package]",
485
+ "Compile types with Typescript",
486
+ (yargs) => {
487
+ return yargs.positional("package", { describe: "Specific package to compile" });
488
+ },
489
+ (argv) => {
490
+ if (argv.verbose) {
491
+ console.log(`Compiling: ${argv.package ?? "all"}`);
492
+ }
493
+ process.exitCode = compileTypes({
494
+ incremental: !!argv.incremental,
495
+ jobs: argv.jobs,
496
+ pkg: argv.package,
497
+ verbose: !!argv.verbose
498
+ });
607
499
  }
608
- process.exitCode = compileTypes({
609
- incremental: !!argv.incremental,
610
- jobs: argv.jobs,
611
- pkg: argv.package,
612
- verbose: !!argv.verbose
613
- });
614
- }).command("compile-only [package]", "Compile with Typescript & Copy Images (No Publint)", (yargs) => {
615
- return yargs.positional("package", {
616
- describe: "Specific package to compile"
617
- });
618
- }, (argv) => {
619
- if (argv.verbose) {
620
- console.log(`Compiling: ${argv.package ?? "all"}`);
500
+ ).command(
501
+ "compile-only [package]",
502
+ "Compile with Typescript & Copy Images (No Publint)",
503
+ (yargs) => {
504
+ return yargs.positional("package", { describe: "Specific package to compile" });
505
+ },
506
+ (argv) => {
507
+ if (argv.verbose) {
508
+ console.log(`Compiling: ${argv.package ?? "all"}`);
509
+ }
510
+ process.exitCode = compile({
511
+ incremental: !!argv.incremental,
512
+ jobs: argv.jobs,
513
+ pkg: argv.package,
514
+ publint: false,
515
+ target: argv.target,
516
+ verbose: !!argv.verbose
517
+ });
621
518
  }
622
- process.exitCode = compile({
623
- incremental: !!argv.incremental,
624
- jobs: argv.jobs,
625
- pkg: argv.package,
626
- publint: false,
627
- target: argv.target,
628
- verbose: !!argv.verbose
629
- });
630
- }).command("recompile [package]", "Re-compile with Typescript & Copy Images", (yargs) => {
631
- return yargs.positional("package", {
632
- describe: "Specific package to re-compile"
633
- });
634
- }, async (argv) => {
635
- if (argv.verbose) {
636
- console.log(`Re-compiling: ${argv.package ?? "all"}`);
519
+ ).command(
520
+ "recompile [package]",
521
+ "Re-compile with Typescript & Copy Images",
522
+ (yargs) => {
523
+ return yargs.positional("package", { describe: "Specific package to re-compile" });
524
+ },
525
+ async (argv) => {
526
+ if (argv.verbose) {
527
+ console.log(`Re-compiling: ${argv.package ?? "all"}`);
528
+ }
529
+ process.exitCode = await recompile({
530
+ incremental: !!argv.incremental,
531
+ jobs: argv.jobs,
532
+ pkg: argv.package,
533
+ target: argv.target,
534
+ verbose: !!argv.verbose
535
+ });
637
536
  }
638
- process.exitCode = await recompile({
639
- incremental: !!argv.incremental,
640
- jobs: argv.jobs,
641
- pkg: argv.package,
642
- target: argv.target,
643
- verbose: !!argv.verbose
644
- });
645
- }).command("rebuild [package]", "Rebuild - Clean, Compile & Lint", (yargs) => {
646
- return yargs.positional("package", {
647
- describe: "Specific package to rebuild"
648
- });
649
- }, (argv) => {
650
- if (argv.verbose) console.log(`Rebuilding: ${argv.package ?? "all"}`);
651
- process.exitCode = rebuild({
652
- target: argv.target
653
- });
654
- }).command("copy-assets [package]", "Copy Assets - Copy the assets from src to dist", (yargs) => {
655
- return yargs.positional("package", {
656
- describe: "Specific package to copy assets"
657
- });
658
- }, async (argv) => {
659
- if (argv.verbose) console.log(`Copying Assets: ${argv.package ?? "all"}`);
660
- process.exitCode = await copyAssets({
661
- target: argv.target
662
- });
663
- });
664
- }, "xyBuildCommands");
537
+ ).command(
538
+ "rebuild [package]",
539
+ "Rebuild - Clean, Compile & Lint",
540
+ (yargs) => {
541
+ return yargs.positional("package", { describe: "Specific package to rebuild" });
542
+ },
543
+ (argv) => {
544
+ if (argv.verbose) console.log(`Rebuilding: ${argv.package ?? "all"}`);
545
+ process.exitCode = rebuild({ target: argv.target });
546
+ }
547
+ ).command(
548
+ "copy-assets [package]",
549
+ "Copy Assets - Copy the assets from src to dist",
550
+ (yargs) => {
551
+ return yargs.positional("package", { describe: "Specific package to copy assets" });
552
+ },
553
+ async (argv) => {
554
+ if (argv.verbose) console.log(`Copying Assets: ${argv.package ?? "all"}`);
555
+ process.exitCode = await copyAssets({ target: argv.target });
556
+ }
557
+ );
558
+ };
665
559
  export {
666
560
  xyBuildCommands
667
561
  };