@xylabs/ts-scripts-yarn3 6.3.2 → 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/build.mjs +0 -11
- package/dist/actions/build.mjs.map +1 -1
- package/dist/actions/cycle.mjs +42 -44
- package/dist/actions/cycle.mjs.map +1 -1
- package/dist/actions/index.mjs +106 -119
- package/dist/actions/index.mjs.map +1 -1
- package/dist/actions/package/cycle.mjs +4 -4
- package/dist/actions/package/cycle.mjs.map +1 -1
- package/dist/actions/package/index.mjs +4 -4
- package/dist/actions/package/index.mjs.map +1 -1
- package/dist/bin/package/cycle.mjs +4 -4
- package/dist/bin/package/cycle.mjs.map +1 -1
- package/dist/bin/xy.mjs +87 -100
- package/dist/bin/xy.mjs.map +1 -1
- package/dist/index.d.ts +4 -2
- package/dist/index.mjs +119 -132
- package/dist/index.mjs.map +1 -1
- package/dist/xy/index.mjs +87 -100
- package/dist/xy/index.mjs.map +1 -1
- package/dist/xy/xy.mjs +87 -100
- package/dist/xy/xy.mjs.map +1 -1
- package/dist/xy/xyBuildCommands.mjs +0 -11
- package/dist/xy/xyBuildCommands.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/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";
|
|
@@ -455,17 +455,6 @@ var build = /* @__PURE__ */ __name(async ({ incremental, jobs, target, verbose,
|
|
|
455
455
|
"tsup"
|
|
456
456
|
]
|
|
457
457
|
],
|
|
458
|
-
[
|
|
459
|
-
"yarn",
|
|
460
|
-
[
|
|
461
|
-
"xy",
|
|
462
|
-
"cycle",
|
|
463
|
-
...pkgOptions,
|
|
464
|
-
...verboseOptions,
|
|
465
|
-
...jobsOptions,
|
|
466
|
-
...incrementalOptions
|
|
467
|
-
]
|
|
468
|
-
],
|
|
469
458
|
[
|
|
470
459
|
"yarn",
|
|
471
460
|
[
|
|
@@ -770,15 +759,13 @@ var copyAssets = /* @__PURE__ */ __name(async ({ target, pkg }) => {
|
|
|
770
759
|
}, "copyAssets");
|
|
771
760
|
|
|
772
761
|
// src/actions/cycle.ts
|
|
773
|
-
import
|
|
774
|
-
var cycle = /* @__PURE__ */ __name(({ verbose, pkg
|
|
762
|
+
import { cruise } from "dependency-cruiser";
|
|
763
|
+
var cycle = /* @__PURE__ */ __name(async ({ verbose, pkg } = {}) => {
|
|
775
764
|
return pkg ? cyclePackage({
|
|
776
765
|
pkg,
|
|
777
766
|
verbose
|
|
778
|
-
}) : cycleAll({
|
|
779
|
-
|
|
780
|
-
verbose,
|
|
781
|
-
jobs
|
|
767
|
+
}) : await cycleAll({
|
|
768
|
+
verbose
|
|
782
769
|
});
|
|
783
770
|
}, "cycle");
|
|
784
771
|
var cyclePackage = /* @__PURE__ */ __name(({ pkg, verbose }) => {
|
|
@@ -800,45 +787,45 @@ var cyclePackage = /* @__PURE__ */ __name(({ pkg, verbose }) => {
|
|
|
800
787
|
]
|
|
801
788
|
]);
|
|
802
789
|
}, "cyclePackage");
|
|
803
|
-
var cycleAll = /* @__PURE__ */ __name(({
|
|
804
|
-
const
|
|
805
|
-
const
|
|
806
|
-
|
|
807
|
-
|
|
808
|
-
|
|
809
|
-
|
|
810
|
-
|
|
811
|
-
|
|
812
|
-
|
|
813
|
-
|
|
814
|
-
|
|
815
|
-
|
|
816
|
-
|
|
817
|
-
];
|
|
818
|
-
const jobsOptions = jobs ? [
|
|
819
|
-
"-j",
|
|
820
|
-
`${jobs}`
|
|
821
|
-
] : [];
|
|
822
|
-
if (jobs) {
|
|
823
|
-
console.log(chalk12.blue(`Jobs set to [${jobs}]`));
|
|
824
|
-
}
|
|
825
|
-
const result = runSteps(`Cycle${incremental ? "-Incremental" : ""} [All]`, [
|
|
826
|
-
[
|
|
827
|
-
"yarn",
|
|
828
|
-
[
|
|
829
|
-
"workspaces",
|
|
830
|
-
"foreach",
|
|
831
|
-
...incrementalOptions,
|
|
832
|
-
...jobsOptions,
|
|
833
|
-
...verboseOptions,
|
|
834
|
-
"run",
|
|
835
|
-
"package-cycle",
|
|
836
|
-
...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
|
+
}
|
|
837
804
|
]
|
|
838
|
-
|
|
839
|
-
|
|
840
|
-
|
|
841
|
-
|
|
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;
|
|
842
829
|
}, "cycleAll");
|
|
843
830
|
|
|
844
831
|
// src/actions/dead.ts
|
|
@@ -960,18 +947,18 @@ var deployNext = /* @__PURE__ */ __name(() => {
|
|
|
960
947
|
}, "deployNext");
|
|
961
948
|
|
|
962
949
|
// src/actions/dupdeps.ts
|
|
963
|
-
import
|
|
950
|
+
import chalk12 from "chalk";
|
|
964
951
|
var dupdeps = /* @__PURE__ */ __name(() => {
|
|
965
|
-
console.log(
|
|
952
|
+
console.log(chalk12.green("Checking all Dependencies for Duplicates"));
|
|
966
953
|
const allDependencies = parsedPackageJSON()?.dependencies;
|
|
967
954
|
const dependencies = Object.entries(allDependencies).map(([k]) => k);
|
|
968
955
|
return detectDuplicateDependencies(dependencies);
|
|
969
956
|
}, "dupdeps");
|
|
970
957
|
|
|
971
958
|
// src/actions/lint.ts
|
|
972
|
-
import
|
|
959
|
+
import chalk13 from "chalk";
|
|
973
960
|
var lintPackage = /* @__PURE__ */ __name(({ pkg, fix: fix2 }) => {
|
|
974
|
-
console.log(
|
|
961
|
+
console.log(chalk13.gray(`${fix2 ? "Fix" : "Lint"} [${pkg}]`));
|
|
975
962
|
const start = Date.now();
|
|
976
963
|
const result = runSteps(`${fix2 ? "Fix" : "Lint"} [${pkg}]`, [
|
|
977
964
|
[
|
|
@@ -984,7 +971,7 @@ var lintPackage = /* @__PURE__ */ __name(({ pkg, fix: fix2 }) => {
|
|
|
984
971
|
]
|
|
985
972
|
]
|
|
986
973
|
]);
|
|
987
|
-
console.log(
|
|
974
|
+
console.log(chalk13.gray(`${fix2 ? "Fixed in" : "Linted in"} [${chalk13.magenta(((Date.now() - start) / 1e3).toFixed(2))}] ${chalk13.gray("seconds")}`));
|
|
988
975
|
return result;
|
|
989
976
|
}, "lintPackage");
|
|
990
977
|
var lint = /* @__PURE__ */ __name(({ pkg, verbose, incremental, fix: fix2 } = {}) => {
|
|
@@ -998,7 +985,7 @@ var lint = /* @__PURE__ */ __name(({ pkg, verbose, incremental, fix: fix2 } = {}
|
|
|
998
985
|
});
|
|
999
986
|
}, "lint");
|
|
1000
987
|
var lintAllPackages = /* @__PURE__ */ __name(({ fix: fix2 = false } = {}) => {
|
|
1001
|
-
console.log(
|
|
988
|
+
console.log(chalk13.gray(`${fix2 ? "Fix" : "Lint"} [All-Packages]`));
|
|
1002
989
|
const start = Date.now();
|
|
1003
990
|
const result = runSteps(`${fix2 ? "Fix" : "Lint"} [All-Packages]`, [
|
|
1004
991
|
[
|
|
@@ -1008,7 +995,7 @@ var lintAllPackages = /* @__PURE__ */ __name(({ fix: fix2 = false } = {}) => {
|
|
|
1008
995
|
]
|
|
1009
996
|
]
|
|
1010
997
|
]);
|
|
1011
|
-
console.log(
|
|
998
|
+
console.log(chalk13.gray(`${fix2 ? "Fixed in" : "Linted in"} [${chalk13.magenta(((Date.now() - start) / 1e3).toFixed(2))}] ${chalk13.gray("seconds")}`));
|
|
1012
999
|
return result;
|
|
1013
1000
|
}, "lintAllPackages");
|
|
1014
1001
|
|
|
@@ -1073,7 +1060,7 @@ var filename = ".gitignore";
|
|
|
1073
1060
|
var gitignoreGen = /* @__PURE__ */ __name((pkg) => generateIgnoreFiles(filename, pkg), "gitignoreGen");
|
|
1074
1061
|
|
|
1075
1062
|
// src/actions/gitlint.ts
|
|
1076
|
-
import
|
|
1063
|
+
import chalk14 from "chalk";
|
|
1077
1064
|
import ParseGitConfig from "parse-git-config";
|
|
1078
1065
|
var gitlint = /* @__PURE__ */ __name(() => {
|
|
1079
1066
|
console.log(`
|
|
@@ -1084,7 +1071,7 @@ Gitlint Start [${process.cwd()}]
|
|
|
1084
1071
|
const errors = 0;
|
|
1085
1072
|
const gitConfig = ParseGitConfig.sync();
|
|
1086
1073
|
const warn = /* @__PURE__ */ __name((message) => {
|
|
1087
|
-
console.warn(
|
|
1074
|
+
console.warn(chalk14.yellow(`Warning: ${message}`));
|
|
1088
1075
|
warnings++;
|
|
1089
1076
|
}, "warn");
|
|
1090
1077
|
if (gitConfig.core.ignorecase) {
|
|
@@ -1104,13 +1091,13 @@ Gitlint Start [${process.cwd()}]
|
|
|
1104
1091
|
}
|
|
1105
1092
|
const resultMessages = [];
|
|
1106
1093
|
if (valid > 0) {
|
|
1107
|
-
resultMessages.push(
|
|
1094
|
+
resultMessages.push(chalk14.green(`Passed: ${valid}`));
|
|
1108
1095
|
}
|
|
1109
1096
|
if (warnings > 0) {
|
|
1110
|
-
resultMessages.push(
|
|
1097
|
+
resultMessages.push(chalk14.yellow(`Warnings: ${warnings}`));
|
|
1111
1098
|
}
|
|
1112
1099
|
if (errors > 0) {
|
|
1113
|
-
resultMessages.push(
|
|
1100
|
+
resultMessages.push(chalk14.red(` Errors: ${errors}`));
|
|
1114
1101
|
}
|
|
1115
1102
|
console.warn(`Gitlint Finish [ ${resultMessages.join(" | ")} ]
|
|
1116
1103
|
`);
|
|
@@ -1119,7 +1106,7 @@ Gitlint Start [${process.cwd()}]
|
|
|
1119
1106
|
|
|
1120
1107
|
// src/actions/gitlint-fix.ts
|
|
1121
1108
|
import { execSync as execSync2 } from "node:child_process";
|
|
1122
|
-
import
|
|
1109
|
+
import chalk15 from "chalk";
|
|
1123
1110
|
import ParseGitConfig2 from "parse-git-config";
|
|
1124
1111
|
var gitlintFix = /* @__PURE__ */ __name(() => {
|
|
1125
1112
|
console.log(`
|
|
@@ -1130,19 +1117,19 @@ Gitlint Fix Start [${process.cwd()}]
|
|
|
1130
1117
|
execSync2("git config core.ignorecase false", {
|
|
1131
1118
|
stdio: "inherit"
|
|
1132
1119
|
});
|
|
1133
|
-
console.warn(
|
|
1120
|
+
console.warn(chalk15.yellow("\nGitlint Fix: Updated core.ignorecase to be false\n"));
|
|
1134
1121
|
}
|
|
1135
1122
|
if (gitConfig.core.autocrlf !== false) {
|
|
1136
1123
|
execSync2("git config core.autocrlf false", {
|
|
1137
1124
|
stdio: "inherit"
|
|
1138
1125
|
});
|
|
1139
|
-
console.warn(
|
|
1126
|
+
console.warn(chalk15.yellow("\nGitlint Fix: Updated core.autocrlf to be false\n"));
|
|
1140
1127
|
}
|
|
1141
1128
|
if (gitConfig.core.eol !== "lf") {
|
|
1142
1129
|
execSync2("git config core.eol lf", {
|
|
1143
1130
|
stdio: "inherit"
|
|
1144
1131
|
});
|
|
1145
|
-
console.warn(
|
|
1132
|
+
console.warn(chalk15.yellow('\nGitlint Fix: Updated core.eol to be "lf"\n'));
|
|
1146
1133
|
}
|
|
1147
1134
|
return 1;
|
|
1148
1135
|
}, "gitlintFix");
|
|
@@ -1162,7 +1149,7 @@ var knip = /* @__PURE__ */ __name(() => {
|
|
|
1162
1149
|
}, "knip");
|
|
1163
1150
|
|
|
1164
1151
|
// src/actions/license.ts
|
|
1165
|
-
import
|
|
1152
|
+
import chalk16 from "chalk";
|
|
1166
1153
|
import { init } from "license-checker";
|
|
1167
1154
|
var license = /* @__PURE__ */ __name(async (pkg) => {
|
|
1168
1155
|
const workspaces = yarnWorkspaces();
|
|
@@ -1187,7 +1174,7 @@ var license = /* @__PURE__ */ __name(async (pkg) => {
|
|
|
1187
1174
|
"LGPL-3.0-or-later",
|
|
1188
1175
|
"Python-2.0"
|
|
1189
1176
|
]);
|
|
1190
|
-
console.log(
|
|
1177
|
+
console.log(chalk16.green("License Checker"));
|
|
1191
1178
|
return (await Promise.all(workspaceList.map(({ location, name }) => {
|
|
1192
1179
|
return new Promise((resolve) => {
|
|
1193
1180
|
init({
|
|
@@ -1195,12 +1182,12 @@ var license = /* @__PURE__ */ __name(async (pkg) => {
|
|
|
1195
1182
|
start: location
|
|
1196
1183
|
}, (error, packages) => {
|
|
1197
1184
|
if (error) {
|
|
1198
|
-
console.error(
|
|
1199
|
-
console.error(
|
|
1185
|
+
console.error(chalk16.red(`License Checker [${name}] Error`));
|
|
1186
|
+
console.error(chalk16.gray(error));
|
|
1200
1187
|
console.log("\n");
|
|
1201
1188
|
resolve(1);
|
|
1202
1189
|
} else {
|
|
1203
|
-
console.log(
|
|
1190
|
+
console.log(chalk16.green(`License Checker [${name}]`));
|
|
1204
1191
|
let count = 0;
|
|
1205
1192
|
for (const [name2, info] of Object.entries(packages)) {
|
|
1206
1193
|
const licenses = Array.isArray(info.licenses) ? info.licenses : [
|
|
@@ -1218,7 +1205,7 @@ var license = /* @__PURE__ */ __name(async (pkg) => {
|
|
|
1218
1205
|
}
|
|
1219
1206
|
if (!orLicenseFound) {
|
|
1220
1207
|
count++;
|
|
1221
|
-
console.warn(
|
|
1208
|
+
console.warn(chalk16.yellow(`${name2}: Package License not allowed [${license2}]`));
|
|
1222
1209
|
}
|
|
1223
1210
|
}
|
|
1224
1211
|
}
|
|
@@ -1293,7 +1280,7 @@ var rebuild = /* @__PURE__ */ __name(({ target }) => {
|
|
|
1293
1280
|
}, "rebuild");
|
|
1294
1281
|
|
|
1295
1282
|
// src/actions/recompile.ts
|
|
1296
|
-
import
|
|
1283
|
+
import chalk17 from "chalk";
|
|
1297
1284
|
var recompile = /* @__PURE__ */ __name(async ({ verbose, target, pkg, incremental }) => {
|
|
1298
1285
|
return pkg ? await recompilePackage({
|
|
1299
1286
|
pkg,
|
|
@@ -1348,7 +1335,7 @@ var recompileAll = /* @__PURE__ */ __name(async ({ jobs, verbose, target, increm
|
|
|
1348
1335
|
`${jobs}`
|
|
1349
1336
|
] : [];
|
|
1350
1337
|
if (jobs) {
|
|
1351
|
-
console.log(
|
|
1338
|
+
console.log(chalk17.blue(`Jobs set to [${jobs}]`));
|
|
1352
1339
|
}
|
|
1353
1340
|
const result = await runStepsAsync(`Recompile${incremental ? "-Incremental" : ""} [All]`, [
|
|
1354
1341
|
[
|
|
@@ -1378,7 +1365,7 @@ var recompileAll = /* @__PURE__ */ __name(async ({ jobs, verbose, target, increm
|
|
|
1378
1365
|
]
|
|
1379
1366
|
]
|
|
1380
1367
|
]);
|
|
1381
|
-
console.log(`${
|
|
1368
|
+
console.log(`${chalk17.gray("Recompiled in")} [${chalk17.magenta(((Date.now() - start) / 1e3).toFixed(2))}] ${chalk17.gray("seconds")}`);
|
|
1382
1369
|
return result;
|
|
1383
1370
|
}, "recompileAll");
|
|
1384
1371
|
|
|
@@ -1412,9 +1399,9 @@ var reinstall = /* @__PURE__ */ __name(() => {
|
|
|
1412
1399
|
}, "reinstall");
|
|
1413
1400
|
|
|
1414
1401
|
// src/actions/relint.ts
|
|
1415
|
-
import
|
|
1402
|
+
import chalk18 from "chalk";
|
|
1416
1403
|
var relintPackage = /* @__PURE__ */ __name(({ pkg }) => {
|
|
1417
|
-
console.log(
|
|
1404
|
+
console.log(chalk18.gray(`${"Relint"} [All-Packages]`));
|
|
1418
1405
|
const start = Date.now();
|
|
1419
1406
|
const result = runSteps("Relint [All-Packages]", [
|
|
1420
1407
|
[
|
|
@@ -1427,7 +1414,7 @@ var relintPackage = /* @__PURE__ */ __name(({ pkg }) => {
|
|
|
1427
1414
|
]
|
|
1428
1415
|
]
|
|
1429
1416
|
]);
|
|
1430
|
-
console.log(
|
|
1417
|
+
console.log(chalk18.gray(`${"Relinted in"} [${chalk18.magenta(((Date.now() - start) / 1e3).toFixed(2))}] ${chalk18.gray("seconds")}`));
|
|
1431
1418
|
return result;
|
|
1432
1419
|
}, "relintPackage");
|
|
1433
1420
|
var relint = /* @__PURE__ */ __name(({ pkg, verbose, incremental } = {}) => {
|
|
@@ -1439,7 +1426,7 @@ var relint = /* @__PURE__ */ __name(({ pkg, verbose, incremental } = {}) => {
|
|
|
1439
1426
|
});
|
|
1440
1427
|
}, "relint");
|
|
1441
1428
|
var relintAllPackages = /* @__PURE__ */ __name(({ verbose = true, incremental } = {}) => {
|
|
1442
|
-
console.log(
|
|
1429
|
+
console.log(chalk18.gray(`${"Relint"} [All-Packages]`));
|
|
1443
1430
|
const start = Date.now();
|
|
1444
1431
|
const verboseOptions = verbose ? [
|
|
1445
1432
|
"--verbose"
|
|
@@ -1466,7 +1453,7 @@ var relintAllPackages = /* @__PURE__ */ __name(({ verbose = true, incremental }
|
|
|
1466
1453
|
]
|
|
1467
1454
|
]
|
|
1468
1455
|
]);
|
|
1469
|
-
console.log(
|
|
1456
|
+
console.log(chalk18.gray(`Relinted in [${chalk18.magenta(((Date.now() - start) / 1e3).toFixed(2))}] ${chalk18.gray("seconds")}`));
|
|
1470
1457
|
return result;
|
|
1471
1458
|
}, "relintAllPackages");
|
|
1472
1459
|
|
|
@@ -1506,7 +1493,7 @@ var sonar = /* @__PURE__ */ __name(() => {
|
|
|
1506
1493
|
}, "sonar");
|
|
1507
1494
|
|
|
1508
1495
|
// src/actions/statics.ts
|
|
1509
|
-
import
|
|
1496
|
+
import chalk19 from "chalk";
|
|
1510
1497
|
var DefaultDependencies = [
|
|
1511
1498
|
"axios",
|
|
1512
1499
|
"@xylabs/pixel",
|
|
@@ -1517,7 +1504,7 @@ var DefaultDependencies = [
|
|
|
1517
1504
|
"@mui/system"
|
|
1518
1505
|
];
|
|
1519
1506
|
var statics = /* @__PURE__ */ __name(() => {
|
|
1520
|
-
console.log(
|
|
1507
|
+
console.log(chalk19.green("Check Required Static Dependencies"));
|
|
1521
1508
|
const statics2 = parsedPackageJSON()?.xy?.deps?.statics;
|
|
1522
1509
|
return detectDuplicateDependencies(statics2, DefaultDependencies);
|
|
1523
1510
|
}, "statics");
|
|
@@ -1863,17 +1850,17 @@ var xyInstallCommands = /* @__PURE__ */ __name((args) => {
|
|
|
1863
1850
|
}, "xyInstallCommands");
|
|
1864
1851
|
|
|
1865
1852
|
// src/xy/xyLintCommands.ts
|
|
1866
|
-
import
|
|
1853
|
+
import chalk20 from "chalk";
|
|
1867
1854
|
var xyLintCommands = /* @__PURE__ */ __name((args) => {
|
|
1868
1855
|
return args.command("cycle [package]", "Cycle - Check for dependency cycles", (yargs2) => {
|
|
1869
1856
|
return packagePositionalParam(yargs2);
|
|
1870
|
-
}, (argv) => {
|
|
1857
|
+
}, async (argv) => {
|
|
1871
1858
|
const start = Date.now();
|
|
1872
1859
|
if (argv.verbose) console.log("Cycle");
|
|
1873
|
-
process.exitCode = cycle({
|
|
1860
|
+
process.exitCode = await cycle({
|
|
1874
1861
|
pkg: argv.package
|
|
1875
1862
|
});
|
|
1876
|
-
console.log(
|
|
1863
|
+
console.log(chalk20.blue(`Finished in ${Date.now() - start}ms`));
|
|
1877
1864
|
}).command("lint [package]", "Lint - Run Eslint", (yargs2) => {
|
|
1878
1865
|
return packagePositionalParam(yargs2);
|
|
1879
1866
|
}, (argv) => {
|
|
@@ -1884,21 +1871,21 @@ var xyLintCommands = /* @__PURE__ */ __name((args) => {
|
|
|
1884
1871
|
}) : lint({
|
|
1885
1872
|
pkg: argv.package
|
|
1886
1873
|
});
|
|
1887
|
-
console.log(
|
|
1874
|
+
console.log(chalk20.blue(`Finished in ${Date.now() - start}ms`));
|
|
1888
1875
|
}).command("fix [package]", "Fix - Run Eslint w/fix", (yargs2) => {
|
|
1889
1876
|
return packagePositionalParam(yargs2);
|
|
1890
1877
|
}, (argv) => {
|
|
1891
1878
|
const start = Date.now();
|
|
1892
1879
|
if (argv.verbose) console.log("Fix");
|
|
1893
1880
|
process.exitCode = fix();
|
|
1894
|
-
console.log(
|
|
1881
|
+
console.log(chalk20.blue(`Finished in ${Date.now() - start}ms`));
|
|
1895
1882
|
}).command("relint [package]", "Relint - Clean & Lint", (yargs2) => {
|
|
1896
1883
|
return packagePositionalParam(yargs2);
|
|
1897
1884
|
}, (argv) => {
|
|
1898
1885
|
if (argv.verbose) console.log("Relinting");
|
|
1899
1886
|
const start = Date.now();
|
|
1900
1887
|
process.exitCode = relint();
|
|
1901
|
-
console.log(
|
|
1888
|
+
console.log(chalk20.blue(`Finished in ${Date.now() - start}ms`));
|
|
1902
1889
|
}).command("publint [package]", "Publint - Run Publint", (yargs2) => {
|
|
1903
1890
|
return packagePositionalParam(yargs2);
|
|
1904
1891
|
}, async (argv) => {
|
|
@@ -1908,21 +1895,21 @@ var xyLintCommands = /* @__PURE__ */ __name((args) => {
|
|
|
1908
1895
|
pkg: argv.package,
|
|
1909
1896
|
verbose: !!argv.verbose
|
|
1910
1897
|
});
|
|
1911
|
-
console.log(
|
|
1898
|
+
console.log(chalk20.blue(`Finished in ${Date.now() - start}ms`));
|
|
1912
1899
|
}).command("knip", "Knip - Run Knip", (yargs2) => {
|
|
1913
1900
|
return packagePositionalParam(yargs2);
|
|
1914
1901
|
}, (argv) => {
|
|
1915
1902
|
if (argv.verbose) console.log("Knip");
|
|
1916
1903
|
const start = Date.now();
|
|
1917
1904
|
process.exitCode = knip();
|
|
1918
|
-
console.log(
|
|
1905
|
+
console.log(chalk20.blue(`Knip finished in ${Date.now() - start}ms`));
|
|
1919
1906
|
}).command("sonar", "Sonar - Run Sonar Check", (yargs2) => {
|
|
1920
1907
|
return packagePositionalParam(yargs2);
|
|
1921
1908
|
}, (argv) => {
|
|
1922
1909
|
const start = Date.now();
|
|
1923
1910
|
if (argv.verbose) console.log("Sonar Check");
|
|
1924
1911
|
process.exitCode = sonar();
|
|
1925
|
-
console.log(
|
|
1912
|
+
console.log(chalk20.blue(`Finished in ${Date.now() - start}ms`));
|
|
1926
1913
|
});
|
|
1927
1914
|
}, "xyLintCommands");
|
|
1928
1915
|
|
|
@@ -1984,8 +1971,8 @@ var xyParseOptions = /* @__PURE__ */ __name(() => {
|
|
|
1984
1971
|
var xy = /* @__PURE__ */ __name(async () => {
|
|
1985
1972
|
const options = xyParseOptions();
|
|
1986
1973
|
return await xyBuildCommands(xyCommonCommands(xyInstallCommands(xyDeployCommands(xyLintCommands(options))))).demandCommand(1).command("*", "", () => {
|
|
1987
|
-
console.error(
|
|
1988
|
-
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"));
|
|
1989
1976
|
}).version().help().argv;
|
|
1990
1977
|
}, "xy");
|
|
1991
1978
|
export {
|