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