@xylabs/ts-scripts-yarn3 6.3.3 → 6.3.4
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/cycle.mjs +42 -44
- package/dist/actions/cycle.mjs.map +1 -1
- package/dist/actions/index.mjs +102 -104
- package/dist/actions/index.mjs.map +1 -1
- package/dist/bin/xy.mjs +87 -89
- package/dist/bin/xy.mjs.map +1 -1
- package/dist/index.d.ts +4 -2
- package/dist/index.mjs +115 -117
- package/dist/index.mjs.map +1 -1
- package/dist/xy/index.mjs +87 -89
- package/dist/xy/index.mjs.map +1 -1
- package/dist/xy/xy.mjs +87 -89
- package/dist/xy/xy.mjs.map +1 -1
- package/dist/xy/xyLintCommands.mjs +62 -64
- package/dist/xy/xyLintCommands.mjs.map +1 -1
- package/package.json +8 -8
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";
|
|
@@ -760,15 +760,13 @@ var copyAssets = /* @__PURE__ */ __name(async ({ target, pkg }) => {
|
|
|
760
760
|
}, "copyAssets");
|
|
761
761
|
|
|
762
762
|
// src/actions/cycle.ts
|
|
763
|
-
import
|
|
764
|
-
var cycle = /* @__PURE__ */ __name(({ verbose, pkg
|
|
763
|
+
import { cruise } from "dependency-cruiser";
|
|
764
|
+
var cycle = /* @__PURE__ */ __name(async ({ verbose, pkg } = {}) => {
|
|
765
765
|
return pkg ? cyclePackage({
|
|
766
766
|
pkg,
|
|
767
767
|
verbose
|
|
768
|
-
}) : cycleAll({
|
|
769
|
-
|
|
770
|
-
verbose,
|
|
771
|
-
jobs
|
|
768
|
+
}) : await cycleAll({
|
|
769
|
+
verbose
|
|
772
770
|
});
|
|
773
771
|
}, "cycle");
|
|
774
772
|
var cyclePackage = /* @__PURE__ */ __name(({ pkg, verbose }) => {
|
|
@@ -790,45 +788,45 @@ var cyclePackage = /* @__PURE__ */ __name(({ pkg, verbose }) => {
|
|
|
790
788
|
]
|
|
791
789
|
]);
|
|
792
790
|
}, "cyclePackage");
|
|
793
|
-
var cycleAll = /* @__PURE__ */ __name(({
|
|
794
|
-
const
|
|
795
|
-
const
|
|
796
|
-
|
|
797
|
-
|
|
798
|
-
|
|
799
|
-
|
|
800
|
-
|
|
801
|
-
|
|
802
|
-
|
|
803
|
-
|
|
804
|
-
|
|
805
|
-
|
|
806
|
-
|
|
807
|
-
];
|
|
808
|
-
const jobsOptions = jobs ? [
|
|
809
|
-
"-j",
|
|
810
|
-
`${jobs}`
|
|
811
|
-
] : [];
|
|
812
|
-
if (jobs) {
|
|
813
|
-
console.log(chalk12.blue(`Jobs set to [${jobs}]`));
|
|
814
|
-
}
|
|
815
|
-
const result = runSteps(`Cycle${incremental ? "-Incremental" : ""} [All]`, [
|
|
816
|
-
[
|
|
817
|
-
"yarn",
|
|
818
|
-
[
|
|
819
|
-
"workspaces",
|
|
820
|
-
"foreach",
|
|
821
|
-
...incrementalOptions,
|
|
822
|
-
...jobsOptions,
|
|
823
|
-
...verboseOptions,
|
|
824
|
-
"run",
|
|
825
|
-
"package-cycle",
|
|
826
|
-
...verboseOptions
|
|
791
|
+
var cycleAll = /* @__PURE__ */ __name(async ({ verbose = false }) => {
|
|
792
|
+
const pkgName = process.env.npm_package_name;
|
|
793
|
+
const cruiseOptions = {
|
|
794
|
+
ruleSet: {
|
|
795
|
+
forbidden: [
|
|
796
|
+
{
|
|
797
|
+
name: "no-circular",
|
|
798
|
+
severity: "error",
|
|
799
|
+
comment: "This dependency creates a circular reference",
|
|
800
|
+
from: {},
|
|
801
|
+
to: {
|
|
802
|
+
circular: true
|
|
803
|
+
}
|
|
804
|
+
}
|
|
827
805
|
]
|
|
828
|
-
|
|
829
|
-
|
|
830
|
-
|
|
831
|
-
|
|
806
|
+
},
|
|
807
|
+
exclude: "node_modules|packages/.*/packages",
|
|
808
|
+
validate: true,
|
|
809
|
+
doNotFollow: {
|
|
810
|
+
path: "node_modules|packages/.*/packages"
|
|
811
|
+
},
|
|
812
|
+
tsPreCompilationDeps: false,
|
|
813
|
+
combinedDependencies: true,
|
|
814
|
+
outputType: verbose ? "text" : "err"
|
|
815
|
+
};
|
|
816
|
+
const target = "**/src";
|
|
817
|
+
console.log(`Checking for circular dependencies in ${target}...`);
|
|
818
|
+
const result = await cruise([
|
|
819
|
+
target
|
|
820
|
+
], cruiseOptions);
|
|
821
|
+
if (result.output) {
|
|
822
|
+
console.log(result.output);
|
|
823
|
+
}
|
|
824
|
+
if (result.exitCode === 0) {
|
|
825
|
+
console.log(`${pkgName} \u2705 No dependency violations`);
|
|
826
|
+
} else {
|
|
827
|
+
console.error(`${pkgName} \u274C Dependency violations found`);
|
|
828
|
+
}
|
|
829
|
+
return result.exitCode;
|
|
832
830
|
}, "cycleAll");
|
|
833
831
|
|
|
834
832
|
// src/actions/dead.ts
|
|
@@ -950,18 +948,18 @@ var deployNext = /* @__PURE__ */ __name(() => {
|
|
|
950
948
|
}, "deployNext");
|
|
951
949
|
|
|
952
950
|
// src/actions/dupdeps.ts
|
|
953
|
-
import
|
|
951
|
+
import chalk12 from "chalk";
|
|
954
952
|
var dupdeps = /* @__PURE__ */ __name(() => {
|
|
955
|
-
console.log(
|
|
953
|
+
console.log(chalk12.green("Checking all Dependencies for Duplicates"));
|
|
956
954
|
const allDependencies = parsedPackageJSON()?.dependencies;
|
|
957
955
|
const dependencies = Object.entries(allDependencies).map(([k]) => k);
|
|
958
956
|
return detectDuplicateDependencies(dependencies);
|
|
959
957
|
}, "dupdeps");
|
|
960
958
|
|
|
961
959
|
// src/actions/lint.ts
|
|
962
|
-
import
|
|
960
|
+
import chalk13 from "chalk";
|
|
963
961
|
var lintPackage = /* @__PURE__ */ __name(({ pkg, fix: fix2 }) => {
|
|
964
|
-
console.log(
|
|
962
|
+
console.log(chalk13.gray(`${fix2 ? "Fix" : "Lint"} [${pkg}]`));
|
|
965
963
|
const start = Date.now();
|
|
966
964
|
const result = runSteps(`${fix2 ? "Fix" : "Lint"} [${pkg}]`, [
|
|
967
965
|
[
|
|
@@ -974,7 +972,7 @@ var lintPackage = /* @__PURE__ */ __name(({ pkg, fix: fix2 }) => {
|
|
|
974
972
|
]
|
|
975
973
|
]
|
|
976
974
|
]);
|
|
977
|
-
console.log(
|
|
975
|
+
console.log(chalk13.gray(`${fix2 ? "Fixed in" : "Linted in"} [${chalk13.magenta(((Date.now() - start) / 1e3).toFixed(2))}] ${chalk13.gray("seconds")}`));
|
|
978
976
|
return result;
|
|
979
977
|
}, "lintPackage");
|
|
980
978
|
var lint = /* @__PURE__ */ __name(({ pkg, verbose, incremental, fix: fix2 } = {}) => {
|
|
@@ -988,7 +986,7 @@ var lint = /* @__PURE__ */ __name(({ pkg, verbose, incremental, fix: fix2 } = {}
|
|
|
988
986
|
});
|
|
989
987
|
}, "lint");
|
|
990
988
|
var lintAllPackages = /* @__PURE__ */ __name(({ fix: fix2 = false } = {}) => {
|
|
991
|
-
console.log(
|
|
989
|
+
console.log(chalk13.gray(`${fix2 ? "Fix" : "Lint"} [All-Packages]`));
|
|
992
990
|
const start = Date.now();
|
|
993
991
|
const result = runSteps(`${fix2 ? "Fix" : "Lint"} [All-Packages]`, [
|
|
994
992
|
[
|
|
@@ -998,7 +996,7 @@ var lintAllPackages = /* @__PURE__ */ __name(({ fix: fix2 = false } = {}) => {
|
|
|
998
996
|
]
|
|
999
997
|
]
|
|
1000
998
|
]);
|
|
1001
|
-
console.log(
|
|
999
|
+
console.log(chalk13.gray(`${fix2 ? "Fixed in" : "Linted in"} [${chalk13.magenta(((Date.now() - start) / 1e3).toFixed(2))}] ${chalk13.gray("seconds")}`));
|
|
1002
1000
|
return result;
|
|
1003
1001
|
}, "lintAllPackages");
|
|
1004
1002
|
|
|
@@ -1063,7 +1061,7 @@ var filename = ".gitignore";
|
|
|
1063
1061
|
var gitignoreGen = /* @__PURE__ */ __name((pkg) => generateIgnoreFiles(filename, pkg), "gitignoreGen");
|
|
1064
1062
|
|
|
1065
1063
|
// src/actions/gitlint.ts
|
|
1066
|
-
import
|
|
1064
|
+
import chalk14 from "chalk";
|
|
1067
1065
|
import ParseGitConfig from "parse-git-config";
|
|
1068
1066
|
var gitlint = /* @__PURE__ */ __name(() => {
|
|
1069
1067
|
console.log(`
|
|
@@ -1074,7 +1072,7 @@ Gitlint Start [${process.cwd()}]
|
|
|
1074
1072
|
const errors = 0;
|
|
1075
1073
|
const gitConfig = ParseGitConfig.sync();
|
|
1076
1074
|
const warn = /* @__PURE__ */ __name((message) => {
|
|
1077
|
-
console.warn(
|
|
1075
|
+
console.warn(chalk14.yellow(`Warning: ${message}`));
|
|
1078
1076
|
warnings++;
|
|
1079
1077
|
}, "warn");
|
|
1080
1078
|
if (gitConfig.core.ignorecase) {
|
|
@@ -1094,13 +1092,13 @@ Gitlint Start [${process.cwd()}]
|
|
|
1094
1092
|
}
|
|
1095
1093
|
const resultMessages = [];
|
|
1096
1094
|
if (valid > 0) {
|
|
1097
|
-
resultMessages.push(
|
|
1095
|
+
resultMessages.push(chalk14.green(`Passed: ${valid}`));
|
|
1098
1096
|
}
|
|
1099
1097
|
if (warnings > 0) {
|
|
1100
|
-
resultMessages.push(
|
|
1098
|
+
resultMessages.push(chalk14.yellow(`Warnings: ${warnings}`));
|
|
1101
1099
|
}
|
|
1102
1100
|
if (errors > 0) {
|
|
1103
|
-
resultMessages.push(
|
|
1101
|
+
resultMessages.push(chalk14.red(` Errors: ${errors}`));
|
|
1104
1102
|
}
|
|
1105
1103
|
console.warn(`Gitlint Finish [ ${resultMessages.join(" | ")} ]
|
|
1106
1104
|
`);
|
|
@@ -1109,7 +1107,7 @@ Gitlint Start [${process.cwd()}]
|
|
|
1109
1107
|
|
|
1110
1108
|
// src/actions/gitlint-fix.ts
|
|
1111
1109
|
import { execSync as execSync2 } from "node:child_process";
|
|
1112
|
-
import
|
|
1110
|
+
import chalk15 from "chalk";
|
|
1113
1111
|
import ParseGitConfig2 from "parse-git-config";
|
|
1114
1112
|
var gitlintFix = /* @__PURE__ */ __name(() => {
|
|
1115
1113
|
console.log(`
|
|
@@ -1120,19 +1118,19 @@ Gitlint Fix Start [${process.cwd()}]
|
|
|
1120
1118
|
execSync2("git config core.ignorecase false", {
|
|
1121
1119
|
stdio: "inherit"
|
|
1122
1120
|
});
|
|
1123
|
-
console.warn(
|
|
1121
|
+
console.warn(chalk15.yellow("\nGitlint Fix: Updated core.ignorecase to be false\n"));
|
|
1124
1122
|
}
|
|
1125
1123
|
if (gitConfig.core.autocrlf !== false) {
|
|
1126
1124
|
execSync2("git config core.autocrlf false", {
|
|
1127
1125
|
stdio: "inherit"
|
|
1128
1126
|
});
|
|
1129
|
-
console.warn(
|
|
1127
|
+
console.warn(chalk15.yellow("\nGitlint Fix: Updated core.autocrlf to be false\n"));
|
|
1130
1128
|
}
|
|
1131
1129
|
if (gitConfig.core.eol !== "lf") {
|
|
1132
1130
|
execSync2("git config core.eol lf", {
|
|
1133
1131
|
stdio: "inherit"
|
|
1134
1132
|
});
|
|
1135
|
-
console.warn(
|
|
1133
|
+
console.warn(chalk15.yellow('\nGitlint Fix: Updated core.eol to be "lf"\n'));
|
|
1136
1134
|
}
|
|
1137
1135
|
return 1;
|
|
1138
1136
|
}, "gitlintFix");
|
|
@@ -1152,7 +1150,7 @@ var knip = /* @__PURE__ */ __name(() => {
|
|
|
1152
1150
|
}, "knip");
|
|
1153
1151
|
|
|
1154
1152
|
// src/actions/license.ts
|
|
1155
|
-
import
|
|
1153
|
+
import chalk16 from "chalk";
|
|
1156
1154
|
import { init } from "license-checker";
|
|
1157
1155
|
var license = /* @__PURE__ */ __name(async (pkg) => {
|
|
1158
1156
|
const workspaces = yarnWorkspaces();
|
|
@@ -1177,7 +1175,7 @@ var license = /* @__PURE__ */ __name(async (pkg) => {
|
|
|
1177
1175
|
"LGPL-3.0-or-later",
|
|
1178
1176
|
"Python-2.0"
|
|
1179
1177
|
]);
|
|
1180
|
-
console.log(
|
|
1178
|
+
console.log(chalk16.green("License Checker"));
|
|
1181
1179
|
return (await Promise.all(workspaceList.map(({ location, name }) => {
|
|
1182
1180
|
return new Promise((resolve) => {
|
|
1183
1181
|
init({
|
|
@@ -1185,12 +1183,12 @@ var license = /* @__PURE__ */ __name(async (pkg) => {
|
|
|
1185
1183
|
start: location
|
|
1186
1184
|
}, (error, packages) => {
|
|
1187
1185
|
if (error) {
|
|
1188
|
-
console.error(
|
|
1189
|
-
console.error(
|
|
1186
|
+
console.error(chalk16.red(`License Checker [${name}] Error`));
|
|
1187
|
+
console.error(chalk16.gray(error));
|
|
1190
1188
|
console.log("\n");
|
|
1191
1189
|
resolve(1);
|
|
1192
1190
|
} else {
|
|
1193
|
-
console.log(
|
|
1191
|
+
console.log(chalk16.green(`License Checker [${name}]`));
|
|
1194
1192
|
let count = 0;
|
|
1195
1193
|
for (const [name2, info] of Object.entries(packages)) {
|
|
1196
1194
|
const licenses = Array.isArray(info.licenses) ? info.licenses : [
|
|
@@ -1208,7 +1206,7 @@ var license = /* @__PURE__ */ __name(async (pkg) => {
|
|
|
1208
1206
|
}
|
|
1209
1207
|
if (!orLicenseFound) {
|
|
1210
1208
|
count++;
|
|
1211
|
-
console.warn(
|
|
1209
|
+
console.warn(chalk16.yellow(`${name2}: Package License not allowed [${license2}]`));
|
|
1212
1210
|
}
|
|
1213
1211
|
}
|
|
1214
1212
|
}
|
|
@@ -1283,7 +1281,7 @@ var rebuild = /* @__PURE__ */ __name(({ target }) => {
|
|
|
1283
1281
|
}, "rebuild");
|
|
1284
1282
|
|
|
1285
1283
|
// src/actions/recompile.ts
|
|
1286
|
-
import
|
|
1284
|
+
import chalk17 from "chalk";
|
|
1287
1285
|
var recompile = /* @__PURE__ */ __name(async ({ verbose, target, pkg, incremental }) => {
|
|
1288
1286
|
return pkg ? await recompilePackage({
|
|
1289
1287
|
pkg,
|
|
@@ -1338,7 +1336,7 @@ var recompileAll = /* @__PURE__ */ __name(async ({ jobs, verbose, target, increm
|
|
|
1338
1336
|
`${jobs}`
|
|
1339
1337
|
] : [];
|
|
1340
1338
|
if (jobs) {
|
|
1341
|
-
console.log(
|
|
1339
|
+
console.log(chalk17.blue(`Jobs set to [${jobs}]`));
|
|
1342
1340
|
}
|
|
1343
1341
|
const result = await runStepsAsync(`Recompile${incremental ? "-Incremental" : ""} [All]`, [
|
|
1344
1342
|
[
|
|
@@ -1368,7 +1366,7 @@ var recompileAll = /* @__PURE__ */ __name(async ({ jobs, verbose, target, increm
|
|
|
1368
1366
|
]
|
|
1369
1367
|
]
|
|
1370
1368
|
]);
|
|
1371
|
-
console.log(`${
|
|
1369
|
+
console.log(`${chalk17.gray("Recompiled in")} [${chalk17.magenta(((Date.now() - start) / 1e3).toFixed(2))}] ${chalk17.gray("seconds")}`);
|
|
1372
1370
|
return result;
|
|
1373
1371
|
}, "recompileAll");
|
|
1374
1372
|
|
|
@@ -1402,9 +1400,9 @@ var reinstall = /* @__PURE__ */ __name(() => {
|
|
|
1402
1400
|
}, "reinstall");
|
|
1403
1401
|
|
|
1404
1402
|
// src/actions/relint.ts
|
|
1405
|
-
import
|
|
1403
|
+
import chalk18 from "chalk";
|
|
1406
1404
|
var relintPackage = /* @__PURE__ */ __name(({ pkg }) => {
|
|
1407
|
-
console.log(
|
|
1405
|
+
console.log(chalk18.gray(`${"Relint"} [All-Packages]`));
|
|
1408
1406
|
const start = Date.now();
|
|
1409
1407
|
const result = runSteps("Relint [All-Packages]", [
|
|
1410
1408
|
[
|
|
@@ -1417,7 +1415,7 @@ var relintPackage = /* @__PURE__ */ __name(({ pkg }) => {
|
|
|
1417
1415
|
]
|
|
1418
1416
|
]
|
|
1419
1417
|
]);
|
|
1420
|
-
console.log(
|
|
1418
|
+
console.log(chalk18.gray(`${"Relinted in"} [${chalk18.magenta(((Date.now() - start) / 1e3).toFixed(2))}] ${chalk18.gray("seconds")}`));
|
|
1421
1419
|
return result;
|
|
1422
1420
|
}, "relintPackage");
|
|
1423
1421
|
var relint = /* @__PURE__ */ __name(({ pkg, verbose, incremental } = {}) => {
|
|
@@ -1429,7 +1427,7 @@ var relint = /* @__PURE__ */ __name(({ pkg, verbose, incremental } = {}) => {
|
|
|
1429
1427
|
});
|
|
1430
1428
|
}, "relint");
|
|
1431
1429
|
var relintAllPackages = /* @__PURE__ */ __name(({ verbose = true, incremental } = {}) => {
|
|
1432
|
-
console.log(
|
|
1430
|
+
console.log(chalk18.gray(`${"Relint"} [All-Packages]`));
|
|
1433
1431
|
const start = Date.now();
|
|
1434
1432
|
const verboseOptions = verbose ? [
|
|
1435
1433
|
"--verbose"
|
|
@@ -1456,7 +1454,7 @@ var relintAllPackages = /* @__PURE__ */ __name(({ verbose = true, incremental }
|
|
|
1456
1454
|
]
|
|
1457
1455
|
]
|
|
1458
1456
|
]);
|
|
1459
|
-
console.log(
|
|
1457
|
+
console.log(chalk18.gray(`Relinted in [${chalk18.magenta(((Date.now() - start) / 1e3).toFixed(2))}] ${chalk18.gray("seconds")}`));
|
|
1460
1458
|
return result;
|
|
1461
1459
|
}, "relintAllPackages");
|
|
1462
1460
|
|
|
@@ -1496,7 +1494,7 @@ var sonar = /* @__PURE__ */ __name(() => {
|
|
|
1496
1494
|
}, "sonar");
|
|
1497
1495
|
|
|
1498
1496
|
// src/actions/statics.ts
|
|
1499
|
-
import
|
|
1497
|
+
import chalk19 from "chalk";
|
|
1500
1498
|
var DefaultDependencies = [
|
|
1501
1499
|
"axios",
|
|
1502
1500
|
"@xylabs/pixel",
|
|
@@ -1507,7 +1505,7 @@ var DefaultDependencies = [
|
|
|
1507
1505
|
"@mui/system"
|
|
1508
1506
|
];
|
|
1509
1507
|
var statics = /* @__PURE__ */ __name(() => {
|
|
1510
|
-
console.log(
|
|
1508
|
+
console.log(chalk19.green("Check Required Static Dependencies"));
|
|
1511
1509
|
const statics2 = parsedPackageJSON()?.xy?.deps?.statics;
|
|
1512
1510
|
return detectDuplicateDependencies(statics2, DefaultDependencies);
|
|
1513
1511
|
}, "statics");
|
|
@@ -1853,17 +1851,17 @@ var xyInstallCommands = /* @__PURE__ */ __name((args) => {
|
|
|
1853
1851
|
}, "xyInstallCommands");
|
|
1854
1852
|
|
|
1855
1853
|
// src/xy/xyLintCommands.ts
|
|
1856
|
-
import
|
|
1854
|
+
import chalk20 from "chalk";
|
|
1857
1855
|
var xyLintCommands = /* @__PURE__ */ __name((args) => {
|
|
1858
1856
|
return args.command("cycle [package]", "Cycle - Check for dependency cycles", (yargs2) => {
|
|
1859
1857
|
return packagePositionalParam(yargs2);
|
|
1860
|
-
}, (argv) => {
|
|
1858
|
+
}, async (argv) => {
|
|
1861
1859
|
const start = Date.now();
|
|
1862
1860
|
if (argv.verbose) console.log("Cycle");
|
|
1863
|
-
process.exitCode = cycle({
|
|
1861
|
+
process.exitCode = await cycle({
|
|
1864
1862
|
pkg: argv.package
|
|
1865
1863
|
});
|
|
1866
|
-
console.log(
|
|
1864
|
+
console.log(chalk20.blue(`Finished in ${Date.now() - start}ms`));
|
|
1867
1865
|
}).command("lint [package]", "Lint - Run Eslint", (yargs2) => {
|
|
1868
1866
|
return packagePositionalParam(yargs2);
|
|
1869
1867
|
}, (argv) => {
|
|
@@ -1874,21 +1872,21 @@ var xyLintCommands = /* @__PURE__ */ __name((args) => {
|
|
|
1874
1872
|
}) : lint({
|
|
1875
1873
|
pkg: argv.package
|
|
1876
1874
|
});
|
|
1877
|
-
console.log(
|
|
1875
|
+
console.log(chalk20.blue(`Finished in ${Date.now() - start}ms`));
|
|
1878
1876
|
}).command("fix [package]", "Fix - Run Eslint w/fix", (yargs2) => {
|
|
1879
1877
|
return packagePositionalParam(yargs2);
|
|
1880
1878
|
}, (argv) => {
|
|
1881
1879
|
const start = Date.now();
|
|
1882
1880
|
if (argv.verbose) console.log("Fix");
|
|
1883
1881
|
process.exitCode = fix();
|
|
1884
|
-
console.log(
|
|
1882
|
+
console.log(chalk20.blue(`Finished in ${Date.now() - start}ms`));
|
|
1885
1883
|
}).command("relint [package]", "Relint - Clean & Lint", (yargs2) => {
|
|
1886
1884
|
return packagePositionalParam(yargs2);
|
|
1887
1885
|
}, (argv) => {
|
|
1888
1886
|
if (argv.verbose) console.log("Relinting");
|
|
1889
1887
|
const start = Date.now();
|
|
1890
1888
|
process.exitCode = relint();
|
|
1891
|
-
console.log(
|
|
1889
|
+
console.log(chalk20.blue(`Finished in ${Date.now() - start}ms`));
|
|
1892
1890
|
}).command("publint [package]", "Publint - Run Publint", (yargs2) => {
|
|
1893
1891
|
return packagePositionalParam(yargs2);
|
|
1894
1892
|
}, async (argv) => {
|
|
@@ -1898,21 +1896,21 @@ var xyLintCommands = /* @__PURE__ */ __name((args) => {
|
|
|
1898
1896
|
pkg: argv.package,
|
|
1899
1897
|
verbose: !!argv.verbose
|
|
1900
1898
|
});
|
|
1901
|
-
console.log(
|
|
1899
|
+
console.log(chalk20.blue(`Finished in ${Date.now() - start}ms`));
|
|
1902
1900
|
}).command("knip", "Knip - Run Knip", (yargs2) => {
|
|
1903
1901
|
return packagePositionalParam(yargs2);
|
|
1904
1902
|
}, (argv) => {
|
|
1905
1903
|
if (argv.verbose) console.log("Knip");
|
|
1906
1904
|
const start = Date.now();
|
|
1907
1905
|
process.exitCode = knip();
|
|
1908
|
-
console.log(
|
|
1906
|
+
console.log(chalk20.blue(`Knip finished in ${Date.now() - start}ms`));
|
|
1909
1907
|
}).command("sonar", "Sonar - Run Sonar Check", (yargs2) => {
|
|
1910
1908
|
return packagePositionalParam(yargs2);
|
|
1911
1909
|
}, (argv) => {
|
|
1912
1910
|
const start = Date.now();
|
|
1913
1911
|
if (argv.verbose) console.log("Sonar Check");
|
|
1914
1912
|
process.exitCode = sonar();
|
|
1915
|
-
console.log(
|
|
1913
|
+
console.log(chalk20.blue(`Finished in ${Date.now() - start}ms`));
|
|
1916
1914
|
});
|
|
1917
1915
|
}, "xyLintCommands");
|
|
1918
1916
|
|
|
@@ -1974,8 +1972,8 @@ var xyParseOptions = /* @__PURE__ */ __name(() => {
|
|
|
1974
1972
|
var xy = /* @__PURE__ */ __name(async () => {
|
|
1975
1973
|
const options = xyParseOptions();
|
|
1976
1974
|
return await xyBuildCommands(xyCommonCommands(xyInstallCommands(xyDeployCommands(xyLintCommands(options))))).demandCommand(1).command("*", "", () => {
|
|
1977
|
-
console.error(
|
|
1978
|
-
console.log(
|
|
1975
|
+
console.error(chalk21.yellow(`Command not found [${chalk21.magenta(process.argv[2])}]`));
|
|
1976
|
+
console.log(chalk21.gray("Try 'yarn xy --help' for list of commands"));
|
|
1979
1977
|
}).version().help().argv;
|
|
1980
1978
|
}, "xy");
|
|
1981
1979
|
|