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