@xylabs/ts-scripts-yarn3 6.1.15 → 6.2.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.
- package/dist/actions/fix.mjs +2 -19
- package/dist/actions/fix.mjs.map +1 -1
- package/dist/actions/index.mjs +69 -36471
- package/dist/actions/index.mjs.map +1 -1
- package/dist/actions/lint.mjs +2 -19
- package/dist/actions/lint.mjs.map +1 -1
- package/dist/actions/package/compile/compile.mjs +1 -0
- package/dist/actions/package/compile/compile.mjs.map +1 -1
- package/dist/actions/package/compile/compileTypes.mjs +1 -0
- package/dist/actions/package/compile/compileTypes.mjs.map +1 -1
- package/dist/actions/package/compile/index.mjs +1 -0
- package/dist/actions/package/compile/index.mjs.map +1 -1
- package/dist/actions/package/compile/packageCompileTsup.mjs +1 -0
- package/dist/actions/package/compile/packageCompileTsup.mjs.map +1 -1
- package/dist/actions/package/index.mjs +35 -36363
- package/dist/actions/package/index.mjs.map +1 -1
- package/dist/actions/package/lint.mjs +1 -36157
- package/dist/actions/package/lint.mjs.map +1 -1
- package/dist/actions/package/recompile.mjs +1 -0
- package/dist/actions/package/recompile.mjs.map +1 -1
- package/dist/bin/package/build-only.mjs +1 -0
- package/dist/bin/package/build-only.mjs.map +1 -1
- package/dist/bin/package/build.mjs +1 -0
- package/dist/bin/package/build.mjs.map +1 -1
- package/dist/bin/package/compile-only.mjs +1 -0
- package/dist/bin/package/compile-only.mjs.map +1 -1
- package/dist/bin/package/compile-tsup.mjs +1 -0
- package/dist/bin/package/compile-tsup.mjs.map +1 -1
- package/dist/bin/package/compile-types.mjs +1 -0
- package/dist/bin/package/compile-types.mjs.map +1 -1
- package/dist/bin/package/compile.mjs +1 -0
- package/dist/bin/package/compile.mjs.map +1 -1
- package/dist/bin/package/fix.mjs +1 -36157
- package/dist/bin/package/fix.mjs.map +1 -1
- package/dist/bin/package/lint.mjs +1 -36157
- package/dist/bin/package/lint.mjs.map +1 -1
- package/dist/bin/package/recompile.mjs +1 -0
- package/dist/bin/package/recompile.mjs.map +1 -1
- package/dist/bin/package/relint.mjs +1 -36157
- package/dist/bin/package/relint.mjs.map +1 -1
- package/dist/bin/xy.mjs +45 -138
- package/dist/bin/xy.mjs.map +1 -1
- package/dist/index.d.ts +2 -17
- package/dist/index.mjs +80 -36491
- package/dist/index.mjs.map +1 -1
- package/dist/xy/index.mjs +45 -138
- package/dist/xy/index.mjs.map +1 -1
- package/dist/xy/xy.mjs +45 -138
- package/dist/xy/xy.mjs.map +1 -1
- package/dist/xy/xyCommonCommands.mjs +15 -91
- package/dist/xy/xyCommonCommands.mjs.map +1 -1
- package/dist/xy/xyLintCommands.mjs +2 -19
- package/dist/xy/xyLintCommands.mjs.map +1 -1
- package/package.json +5 -9
- package/dist/actions/deps.mjs +0 -170
- package/dist/actions/deps.mjs.map +0 -1
- package/dist/actions/package/deps.mjs +0 -180
- package/dist/actions/package/deps.mjs.map +0 -1
- package/dist/bin/package/deps.mjs +0 -185
- package/dist/bin/package/deps.mjs.map +0 -1
package/dist/xy/xy.mjs
CHANGED
|
@@ -2,7 +2,7 @@ var __defProp = Object.defineProperty;
|
|
|
2
2
|
var __name = (target, value) => __defProp(target, "name", { value, configurable: true });
|
|
3
3
|
|
|
4
4
|
// src/xy/xy.ts
|
|
5
|
-
import
|
|
5
|
+
import chalk21 from "chalk";
|
|
6
6
|
|
|
7
7
|
// src/actions/build.ts
|
|
8
8
|
import chalk7 from "chalk";
|
|
@@ -902,86 +902,19 @@ var deployNext = /* @__PURE__ */ __name(() => {
|
|
|
902
902
|
]);
|
|
903
903
|
}, "deployNext");
|
|
904
904
|
|
|
905
|
-
// src/actions/deps.ts
|
|
906
|
-
import chalk12 from "chalk";
|
|
907
|
-
var deps = /* @__PURE__ */ __name(({ pkg, incremental }) => {
|
|
908
|
-
pkg ? depsPackage({
|
|
909
|
-
pkg
|
|
910
|
-
}) : depsAll({
|
|
911
|
-
incremental
|
|
912
|
-
});
|
|
913
|
-
return 0;
|
|
914
|
-
}, "deps");
|
|
915
|
-
var depsPackage = /* @__PURE__ */ __name(({ pkg }) => {
|
|
916
|
-
const steps = [
|
|
917
|
-
[
|
|
918
|
-
"yarn",
|
|
919
|
-
[
|
|
920
|
-
"workspace",
|
|
921
|
-
pkg,
|
|
922
|
-
"run",
|
|
923
|
-
"package-deps"
|
|
924
|
-
]
|
|
925
|
-
]
|
|
926
|
-
];
|
|
927
|
-
return runSteps(`Deps [${pkg}]`, [
|
|
928
|
-
...steps
|
|
929
|
-
]);
|
|
930
|
-
}, "depsPackage");
|
|
931
|
-
var depsAll = /* @__PURE__ */ __name(({ incremental, jobs, verbose }) => {
|
|
932
|
-
const start = Date.now();
|
|
933
|
-
const jobsOptions = jobs ? [
|
|
934
|
-
"-j",
|
|
935
|
-
`${jobs}`
|
|
936
|
-
] : [];
|
|
937
|
-
const verboseOptions = verbose ? [
|
|
938
|
-
"--verbose"
|
|
939
|
-
] : [
|
|
940
|
-
"--no-verbose"
|
|
941
|
-
];
|
|
942
|
-
if (jobs) {
|
|
943
|
-
console.log(chalk12.blue(`Jobs set to [${jobs}]`));
|
|
944
|
-
}
|
|
945
|
-
const incrementalOptions = incremental ? [
|
|
946
|
-
"--since",
|
|
947
|
-
"-pA"
|
|
948
|
-
] : [
|
|
949
|
-
"-pA"
|
|
950
|
-
];
|
|
951
|
-
const steps = [
|
|
952
|
-
[
|
|
953
|
-
"yarn",
|
|
954
|
-
[
|
|
955
|
-
"workspaces",
|
|
956
|
-
"foreach",
|
|
957
|
-
...jobsOptions,
|
|
958
|
-
...incrementalOptions,
|
|
959
|
-
...verboseOptions,
|
|
960
|
-
"run",
|
|
961
|
-
"package-deps"
|
|
962
|
-
]
|
|
963
|
-
]
|
|
964
|
-
];
|
|
965
|
-
const result = runSteps(`Deps${incremental ? "-Incremental" : ""} [All]`, [
|
|
966
|
-
...steps
|
|
967
|
-
]);
|
|
968
|
-
console.log(`${chalk12.gray("Dep checked in")} [${chalk12.magenta(((Date.now() - start) / 1e3).toFixed(2))}] ${chalk12.gray("seconds")}`);
|
|
969
|
-
return result;
|
|
970
|
-
}, "depsAll");
|
|
971
|
-
|
|
972
905
|
// src/actions/dupdeps.ts
|
|
973
|
-
import
|
|
906
|
+
import chalk12 from "chalk";
|
|
974
907
|
var dupdeps = /* @__PURE__ */ __name(() => {
|
|
975
|
-
console.log(
|
|
908
|
+
console.log(chalk12.green("Checking all Dependencies for Duplicates"));
|
|
976
909
|
const allDependencies = parsedPackageJSON()?.dependencies;
|
|
977
910
|
const dependencies = Object.entries(allDependencies).map(([k]) => k);
|
|
978
911
|
return detectDuplicateDependencies(dependencies);
|
|
979
912
|
}, "dupdeps");
|
|
980
913
|
|
|
981
914
|
// src/actions/lint.ts
|
|
982
|
-
import
|
|
915
|
+
import chalk13 from "chalk";
|
|
983
916
|
var lintPackage = /* @__PURE__ */ __name(({ pkg, fix: fix2 }) => {
|
|
984
|
-
console.log(
|
|
917
|
+
console.log(chalk13.gray(`${fix2 ? "Fix" : "Lint"} [${pkg}]`));
|
|
985
918
|
const start = Date.now();
|
|
986
919
|
const result = runSteps(`${fix2 ? "Fix" : "Lint"} [${pkg}]`, [
|
|
987
920
|
[
|
|
@@ -994,7 +927,7 @@ var lintPackage = /* @__PURE__ */ __name(({ pkg, fix: fix2 }) => {
|
|
|
994
927
|
]
|
|
995
928
|
]
|
|
996
929
|
]);
|
|
997
|
-
console.log(
|
|
930
|
+
console.log(chalk13.gray(`${fix2 ? "Fixed in" : "Linted in"} [${chalk13.magenta(((Date.now() - start) / 1e3).toFixed(2))}] ${chalk13.gray("seconds")}`));
|
|
998
931
|
return result;
|
|
999
932
|
}, "lintPackage");
|
|
1000
933
|
var lint = /* @__PURE__ */ __name(({ pkg, verbose, incremental, fix: fix2 } = {}) => {
|
|
@@ -1007,35 +940,18 @@ var lint = /* @__PURE__ */ __name(({ pkg, verbose, incremental, fix: fix2 } = {}
|
|
|
1007
940
|
fix: fix2
|
|
1008
941
|
});
|
|
1009
942
|
}, "lint");
|
|
1010
|
-
var lintAllPackages = /* @__PURE__ */ __name(({ fix: fix2
|
|
1011
|
-
console.log(
|
|
943
|
+
var lintAllPackages = /* @__PURE__ */ __name(({ fix: fix2 = false } = {}) => {
|
|
944
|
+
console.log(chalk13.gray(`${fix2 ? "Fix" : "Lint"} [All-Packages]`));
|
|
1012
945
|
const start = Date.now();
|
|
1013
|
-
const verboseOptions = verbose ? [
|
|
1014
|
-
"--verbose"
|
|
1015
|
-
] : [
|
|
1016
|
-
"--no-verbose"
|
|
1017
|
-
];
|
|
1018
|
-
const incrementalOptions = incremental ? [
|
|
1019
|
-
"--since",
|
|
1020
|
-
"-Ap"
|
|
1021
|
-
] : [
|
|
1022
|
-
"--parallel",
|
|
1023
|
-
"-Ap"
|
|
1024
|
-
];
|
|
1025
946
|
const result = runSteps(`${fix2 ? "Fix" : "Lint"} [All-Packages]`, [
|
|
1026
947
|
[
|
|
1027
948
|
"yarn",
|
|
1028
949
|
[
|
|
1029
|
-
"
|
|
1030
|
-
"foreach",
|
|
1031
|
-
...verboseOptions,
|
|
1032
|
-
...incrementalOptions,
|
|
1033
|
-
"run",
|
|
1034
|
-
fix2 ? "package-fix" : "package-lint"
|
|
950
|
+
"eslint"
|
|
1035
951
|
]
|
|
1036
952
|
]
|
|
1037
953
|
]);
|
|
1038
|
-
console.log(
|
|
954
|
+
console.log(chalk13.gray(`${fix2 ? "Fixed in" : "Linted in"} [${chalk13.magenta(((Date.now() - start) / 1e3).toFixed(2))}] ${chalk13.gray("seconds")}`));
|
|
1039
955
|
return result;
|
|
1040
956
|
}, "lintAllPackages");
|
|
1041
957
|
|
|
@@ -1100,7 +1016,7 @@ var filename = ".gitignore";
|
|
|
1100
1016
|
var gitignoreGen = /* @__PURE__ */ __name((pkg) => generateIgnoreFiles(filename, pkg), "gitignoreGen");
|
|
1101
1017
|
|
|
1102
1018
|
// src/actions/gitlint.ts
|
|
1103
|
-
import
|
|
1019
|
+
import chalk14 from "chalk";
|
|
1104
1020
|
import ParseGitConfig from "parse-git-config";
|
|
1105
1021
|
var gitlint = /* @__PURE__ */ __name(() => {
|
|
1106
1022
|
console.log(`
|
|
@@ -1111,7 +1027,7 @@ Gitlint Start [${process.cwd()}]
|
|
|
1111
1027
|
const errors = 0;
|
|
1112
1028
|
const gitConfig = ParseGitConfig.sync();
|
|
1113
1029
|
const warn = /* @__PURE__ */ __name((message) => {
|
|
1114
|
-
console.warn(
|
|
1030
|
+
console.warn(chalk14.yellow(`Warning: ${message}`));
|
|
1115
1031
|
warnings++;
|
|
1116
1032
|
}, "warn");
|
|
1117
1033
|
if (gitConfig.core.ignorecase) {
|
|
@@ -1131,13 +1047,13 @@ Gitlint Start [${process.cwd()}]
|
|
|
1131
1047
|
}
|
|
1132
1048
|
const resultMessages = [];
|
|
1133
1049
|
if (valid > 0) {
|
|
1134
|
-
resultMessages.push(
|
|
1050
|
+
resultMessages.push(chalk14.green(`Passed: ${valid}`));
|
|
1135
1051
|
}
|
|
1136
1052
|
if (warnings > 0) {
|
|
1137
|
-
resultMessages.push(
|
|
1053
|
+
resultMessages.push(chalk14.yellow(`Warnings: ${warnings}`));
|
|
1138
1054
|
}
|
|
1139
1055
|
if (errors > 0) {
|
|
1140
|
-
resultMessages.push(
|
|
1056
|
+
resultMessages.push(chalk14.red(` Errors: ${errors}`));
|
|
1141
1057
|
}
|
|
1142
1058
|
console.warn(`Gitlint Finish [ ${resultMessages.join(" | ")} ]
|
|
1143
1059
|
`);
|
|
@@ -1146,7 +1062,7 @@ Gitlint Start [${process.cwd()}]
|
|
|
1146
1062
|
|
|
1147
1063
|
// src/actions/gitlint-fix.ts
|
|
1148
1064
|
import { execSync as execSync2 } from "node:child_process";
|
|
1149
|
-
import
|
|
1065
|
+
import chalk15 from "chalk";
|
|
1150
1066
|
import ParseGitConfig2 from "parse-git-config";
|
|
1151
1067
|
var gitlintFix = /* @__PURE__ */ __name(() => {
|
|
1152
1068
|
console.log(`
|
|
@@ -1157,19 +1073,19 @@ Gitlint Fix Start [${process.cwd()}]
|
|
|
1157
1073
|
execSync2("git config core.ignorecase false", {
|
|
1158
1074
|
stdio: "inherit"
|
|
1159
1075
|
});
|
|
1160
|
-
console.warn(
|
|
1076
|
+
console.warn(chalk15.yellow("\nGitlint Fix: Updated core.ignorecase to be false\n"));
|
|
1161
1077
|
}
|
|
1162
1078
|
if (gitConfig.core.autocrlf !== false) {
|
|
1163
1079
|
execSync2("git config core.autocrlf false", {
|
|
1164
1080
|
stdio: "inherit"
|
|
1165
1081
|
});
|
|
1166
|
-
console.warn(
|
|
1082
|
+
console.warn(chalk15.yellow("\nGitlint Fix: Updated core.autocrlf to be false\n"));
|
|
1167
1083
|
}
|
|
1168
1084
|
if (gitConfig.core.eol !== "lf") {
|
|
1169
1085
|
execSync2("git config core.eol lf", {
|
|
1170
1086
|
stdio: "inherit"
|
|
1171
1087
|
});
|
|
1172
|
-
console.warn(
|
|
1088
|
+
console.warn(chalk15.yellow('\nGitlint Fix: Updated core.eol to be "lf"\n'));
|
|
1173
1089
|
}
|
|
1174
1090
|
return 1;
|
|
1175
1091
|
}, "gitlintFix");
|
|
@@ -1189,7 +1105,7 @@ var knip = /* @__PURE__ */ __name(() => {
|
|
|
1189
1105
|
}, "knip");
|
|
1190
1106
|
|
|
1191
1107
|
// src/actions/license.ts
|
|
1192
|
-
import
|
|
1108
|
+
import chalk16 from "chalk";
|
|
1193
1109
|
import { init } from "license-checker";
|
|
1194
1110
|
var license = /* @__PURE__ */ __name(async (pkg) => {
|
|
1195
1111
|
const workspaces = yarnWorkspaces();
|
|
@@ -1214,7 +1130,7 @@ var license = /* @__PURE__ */ __name(async (pkg) => {
|
|
|
1214
1130
|
"LGPL-3.0-or-later",
|
|
1215
1131
|
"Python-2.0"
|
|
1216
1132
|
]);
|
|
1217
|
-
console.log(
|
|
1133
|
+
console.log(chalk16.green("License Checker"));
|
|
1218
1134
|
return (await Promise.all(workspaceList.map(({ location, name }) => {
|
|
1219
1135
|
return new Promise((resolve) => {
|
|
1220
1136
|
init({
|
|
@@ -1222,12 +1138,12 @@ var license = /* @__PURE__ */ __name(async (pkg) => {
|
|
|
1222
1138
|
start: location
|
|
1223
1139
|
}, (error, packages) => {
|
|
1224
1140
|
if (error) {
|
|
1225
|
-
console.error(
|
|
1226
|
-
console.error(
|
|
1141
|
+
console.error(chalk16.red(`License Checker [${name}] Error`));
|
|
1142
|
+
console.error(chalk16.gray(error));
|
|
1227
1143
|
console.log("\n");
|
|
1228
1144
|
resolve(1);
|
|
1229
1145
|
} else {
|
|
1230
|
-
console.log(
|
|
1146
|
+
console.log(chalk16.green(`License Checker [${name}]`));
|
|
1231
1147
|
let count = 0;
|
|
1232
1148
|
for (const [name2, info] of Object.entries(packages)) {
|
|
1233
1149
|
const licenses = Array.isArray(info.licenses) ? info.licenses : [
|
|
@@ -1245,7 +1161,7 @@ var license = /* @__PURE__ */ __name(async (pkg) => {
|
|
|
1245
1161
|
}
|
|
1246
1162
|
if (!orLicenseFound) {
|
|
1247
1163
|
count++;
|
|
1248
|
-
console.warn(
|
|
1164
|
+
console.warn(chalk16.yellow(`${name2}: Package License not allowed [${license2}]`));
|
|
1249
1165
|
}
|
|
1250
1166
|
}
|
|
1251
1167
|
}
|
|
@@ -1320,7 +1236,7 @@ var rebuild = /* @__PURE__ */ __name(({ target }) => {
|
|
|
1320
1236
|
}, "rebuild");
|
|
1321
1237
|
|
|
1322
1238
|
// src/actions/recompile.ts
|
|
1323
|
-
import
|
|
1239
|
+
import chalk17 from "chalk";
|
|
1324
1240
|
var recompile = /* @__PURE__ */ __name(async ({ verbose, target, pkg, incremental }) => {
|
|
1325
1241
|
return pkg ? await recompilePackage({
|
|
1326
1242
|
pkg,
|
|
@@ -1375,7 +1291,7 @@ var recompileAll = /* @__PURE__ */ __name(async ({ jobs, verbose, target, increm
|
|
|
1375
1291
|
`${jobs}`
|
|
1376
1292
|
] : [];
|
|
1377
1293
|
if (jobs) {
|
|
1378
|
-
console.log(
|
|
1294
|
+
console.log(chalk17.blue(`Jobs set to [${jobs}]`));
|
|
1379
1295
|
}
|
|
1380
1296
|
const result = await runStepsAsync(`Recompile${incremental ? "-Incremental" : ""} [All]`, [
|
|
1381
1297
|
[
|
|
@@ -1405,7 +1321,7 @@ var recompileAll = /* @__PURE__ */ __name(async ({ jobs, verbose, target, increm
|
|
|
1405
1321
|
]
|
|
1406
1322
|
]
|
|
1407
1323
|
]);
|
|
1408
|
-
console.log(`${
|
|
1324
|
+
console.log(`${chalk17.gray("Recompiled in")} [${chalk17.magenta(((Date.now() - start) / 1e3).toFixed(2))}] ${chalk17.gray("seconds")}`);
|
|
1409
1325
|
return result;
|
|
1410
1326
|
}, "recompileAll");
|
|
1411
1327
|
|
|
@@ -1439,9 +1355,9 @@ var reinstall = /* @__PURE__ */ __name(() => {
|
|
|
1439
1355
|
}, "reinstall");
|
|
1440
1356
|
|
|
1441
1357
|
// src/actions/relint.ts
|
|
1442
|
-
import
|
|
1358
|
+
import chalk18 from "chalk";
|
|
1443
1359
|
var relintPackage = /* @__PURE__ */ __name(({ pkg }) => {
|
|
1444
|
-
console.log(
|
|
1360
|
+
console.log(chalk18.gray(`${"Relint"} [All-Packages]`));
|
|
1445
1361
|
const start = Date.now();
|
|
1446
1362
|
const result = runSteps("Relint [All-Packages]", [
|
|
1447
1363
|
[
|
|
@@ -1454,7 +1370,7 @@ var relintPackage = /* @__PURE__ */ __name(({ pkg }) => {
|
|
|
1454
1370
|
]
|
|
1455
1371
|
]
|
|
1456
1372
|
]);
|
|
1457
|
-
console.log(
|
|
1373
|
+
console.log(chalk18.gray(`${"Relinted in"} [${chalk18.magenta(((Date.now() - start) / 1e3).toFixed(2))}] ${chalk18.gray("seconds")}`));
|
|
1458
1374
|
return result;
|
|
1459
1375
|
}, "relintPackage");
|
|
1460
1376
|
var relint = /* @__PURE__ */ __name(({ pkg, verbose, incremental } = {}) => {
|
|
@@ -1466,7 +1382,7 @@ var relint = /* @__PURE__ */ __name(({ pkg, verbose, incremental } = {}) => {
|
|
|
1466
1382
|
});
|
|
1467
1383
|
}, "relint");
|
|
1468
1384
|
var relintAllPackages = /* @__PURE__ */ __name(({ verbose = true, incremental } = {}) => {
|
|
1469
|
-
console.log(
|
|
1385
|
+
console.log(chalk18.gray(`${"Relint"} [All-Packages]`));
|
|
1470
1386
|
const start = Date.now();
|
|
1471
1387
|
const verboseOptions = verbose ? [
|
|
1472
1388
|
"--verbose"
|
|
@@ -1493,7 +1409,7 @@ var relintAllPackages = /* @__PURE__ */ __name(({ verbose = true, incremental }
|
|
|
1493
1409
|
]
|
|
1494
1410
|
]
|
|
1495
1411
|
]);
|
|
1496
|
-
console.log(
|
|
1412
|
+
console.log(chalk18.gray(`Relinted in [${chalk18.magenta(((Date.now() - start) / 1e3).toFixed(2))}] ${chalk18.gray("seconds")}`));
|
|
1497
1413
|
return result;
|
|
1498
1414
|
}, "relintAllPackages");
|
|
1499
1415
|
|
|
@@ -1533,7 +1449,7 @@ var sonar = /* @__PURE__ */ __name(() => {
|
|
|
1533
1449
|
}, "sonar");
|
|
1534
1450
|
|
|
1535
1451
|
// src/actions/statics.ts
|
|
1536
|
-
import
|
|
1452
|
+
import chalk19 from "chalk";
|
|
1537
1453
|
var DefaultDependencies = [
|
|
1538
1454
|
"axios",
|
|
1539
1455
|
"@xylabs/pixel",
|
|
@@ -1544,7 +1460,7 @@ var DefaultDependencies = [
|
|
|
1544
1460
|
"@mui/system"
|
|
1545
1461
|
];
|
|
1546
1462
|
var statics = /* @__PURE__ */ __name(() => {
|
|
1547
|
-
console.log(
|
|
1463
|
+
console.log(chalk19.green("Check Required Static Dependencies"));
|
|
1548
1464
|
const statics2 = parsedPackageJSON()?.xy?.deps?.statics;
|
|
1549
1465
|
return detectDuplicateDependencies(statics2, DefaultDependencies);
|
|
1550
1466
|
}, "statics");
|
|
@@ -1768,15 +1684,6 @@ var xyCommonCommands = /* @__PURE__ */ __name((args) => {
|
|
|
1768
1684
|
}, (argv) => {
|
|
1769
1685
|
if (argv.verbose) console.log("Dead");
|
|
1770
1686
|
process.exitCode = dead();
|
|
1771
|
-
}).command("deps [package]", "Deps - Check for unused or missing dependencies", (yargs2) => {
|
|
1772
|
-
return packagePositionalParam(yargs2);
|
|
1773
|
-
}, (argv) => {
|
|
1774
|
-
if (argv.verbose) console.log(`Checking Dependencies: ${argv.package ?? "all"}`);
|
|
1775
|
-
process.exitCode = deps({
|
|
1776
|
-
incremental: !!argv.incremental,
|
|
1777
|
-
jobs: argv.jobs,
|
|
1778
|
-
pkg: argv.package
|
|
1779
|
-
});
|
|
1780
1687
|
}).command("gen-docs [package]", "GenDocs - Generate TypeDocs", (yargs2) => {
|
|
1781
1688
|
return packagePositionalParam(yargs2);
|
|
1782
1689
|
}, (argv) => {
|
|
@@ -1899,7 +1806,7 @@ var xyInstallCommands = /* @__PURE__ */ __name((args) => {
|
|
|
1899
1806
|
}, "xyInstallCommands");
|
|
1900
1807
|
|
|
1901
1808
|
// src/xy/xyLintCommands.ts
|
|
1902
|
-
import
|
|
1809
|
+
import chalk20 from "chalk";
|
|
1903
1810
|
var xyLintCommands = /* @__PURE__ */ __name((args) => {
|
|
1904
1811
|
return args.command("cycle [package]", "Cycle - Check for dependency cycles", (yargs2) => {
|
|
1905
1812
|
return packagePositionalParam(yargs2);
|
|
@@ -1907,7 +1814,7 @@ var xyLintCommands = /* @__PURE__ */ __name((args) => {
|
|
|
1907
1814
|
const start = Date.now();
|
|
1908
1815
|
if (argv.verbose) console.log("Cycle");
|
|
1909
1816
|
process.exitCode = await cycle();
|
|
1910
|
-
console.log(
|
|
1817
|
+
console.log(chalk20.blue(`Finished in ${Date.now() - start}ms`));
|
|
1911
1818
|
}).command("lint [package]", "Lint - Run Eslint", (yargs2) => {
|
|
1912
1819
|
return packagePositionalParam(yargs2);
|
|
1913
1820
|
}, (argv) => {
|
|
@@ -1918,21 +1825,21 @@ var xyLintCommands = /* @__PURE__ */ __name((args) => {
|
|
|
1918
1825
|
}) : lint({
|
|
1919
1826
|
pkg: argv.package
|
|
1920
1827
|
});
|
|
1921
|
-
console.log(
|
|
1828
|
+
console.log(chalk20.blue(`Finished in ${Date.now() - start}ms`));
|
|
1922
1829
|
}).command("fix [package]", "Fix - Run Eslint w/fix", (yargs2) => {
|
|
1923
1830
|
return packagePositionalParam(yargs2);
|
|
1924
1831
|
}, (argv) => {
|
|
1925
1832
|
const start = Date.now();
|
|
1926
1833
|
if (argv.verbose) console.log("Fix");
|
|
1927
1834
|
process.exitCode = fix();
|
|
1928
|
-
console.log(
|
|
1835
|
+
console.log(chalk20.blue(`Finished in ${Date.now() - start}ms`));
|
|
1929
1836
|
}).command("relint [package]", "Relint - Clean & Lint", (yargs2) => {
|
|
1930
1837
|
return packagePositionalParam(yargs2);
|
|
1931
1838
|
}, (argv) => {
|
|
1932
1839
|
if (argv.verbose) console.log("Relinting");
|
|
1933
1840
|
const start = Date.now();
|
|
1934
1841
|
process.exitCode = relint();
|
|
1935
|
-
console.log(
|
|
1842
|
+
console.log(chalk20.blue(`Finished in ${Date.now() - start}ms`));
|
|
1936
1843
|
}).command("publint [package]", "Publint - Run Publint", (yargs2) => {
|
|
1937
1844
|
return packagePositionalParam(yargs2);
|
|
1938
1845
|
}, async (argv) => {
|
|
@@ -1942,21 +1849,21 @@ var xyLintCommands = /* @__PURE__ */ __name((args) => {
|
|
|
1942
1849
|
pkg: argv.package,
|
|
1943
1850
|
verbose: !!argv.verbose
|
|
1944
1851
|
});
|
|
1945
|
-
console.log(
|
|
1852
|
+
console.log(chalk20.blue(`Finished in ${Date.now() - start}ms`));
|
|
1946
1853
|
}).command("knip", "Knip - Run Knip", (yargs2) => {
|
|
1947
1854
|
return packagePositionalParam(yargs2);
|
|
1948
1855
|
}, (argv) => {
|
|
1949
1856
|
if (argv.verbose) console.log("Knip");
|
|
1950
1857
|
const start = Date.now();
|
|
1951
1858
|
process.exitCode = knip();
|
|
1952
|
-
console.log(
|
|
1859
|
+
console.log(chalk20.blue(`Knip finished in ${Date.now() - start}ms`));
|
|
1953
1860
|
}).command("sonar", "Sonar - Run Sonar Check", (yargs2) => {
|
|
1954
1861
|
return packagePositionalParam(yargs2);
|
|
1955
1862
|
}, (argv) => {
|
|
1956
1863
|
const start = Date.now();
|
|
1957
1864
|
if (argv.verbose) console.log("Sonar Check");
|
|
1958
1865
|
process.exitCode = sonar();
|
|
1959
|
-
console.log(
|
|
1866
|
+
console.log(chalk20.blue(`Finished in ${Date.now() - start}ms`));
|
|
1960
1867
|
});
|
|
1961
1868
|
}, "xyLintCommands");
|
|
1962
1869
|
|
|
@@ -2018,8 +1925,8 @@ var xyParseOptions = /* @__PURE__ */ __name(() => {
|
|
|
2018
1925
|
var xy = /* @__PURE__ */ __name(async () => {
|
|
2019
1926
|
const options = xyParseOptions();
|
|
2020
1927
|
return await xyBuildCommands(xyCommonCommands(xyInstallCommands(xyDeployCommands(xyLintCommands(options))))).demandCommand(1).command("*", "", () => {
|
|
2021
|
-
console.error(
|
|
2022
|
-
console.log(
|
|
1928
|
+
console.error(chalk21.yellow(`Command not found [${chalk21.magenta(process.argv[2])}]`));
|
|
1929
|
+
console.log(chalk21.gray("Try 'yarn xy --help' for list of commands"));
|
|
2023
1930
|
}).version().help().argv;
|
|
2024
1931
|
}, "xy");
|
|
2025
1932
|
export {
|