@xylabs/ts-scripts-yarn3 5.1.14 → 6.0.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/compile-types.mjs +176 -0
- package/dist/actions/compile-types.mjs.map +1 -0
- package/dist/actions/fix.mjs +2 -2
- package/dist/actions/fix.mjs.map +1 -1
- package/dist/actions/index.mjs +253 -139
- package/dist/actions/index.mjs.map +1 -1
- package/dist/actions/lint-clean.mjs +2 -2
- package/dist/actions/lint-clean.mjs.map +1 -1
- package/dist/actions/lint.mjs +2 -2
- package/dist/actions/lint.mjs.map +1 -1
- package/dist/actions/package/compile/compile.mjs +88 -64
- package/dist/actions/package/compile/compile.mjs.map +1 -1
- package/dist/actions/package/compile/compileTypes.mjs +164 -0
- package/dist/actions/package/compile/compileTypes.mjs.map +1 -0
- package/dist/actions/package/compile/deepMerge.mjs +31 -0
- package/dist/actions/package/compile/deepMerge.mjs.map +1 -0
- package/dist/actions/package/compile/index.mjs +101 -65
- package/dist/actions/package/compile/index.mjs.map +1 -1
- package/dist/actions/package/compile/packageCompileTscTypes.mjs +3 -2
- package/dist/actions/package/compile/packageCompileTscTypes.mjs.map +1 -1
- package/dist/actions/package/compile/packageCompileTsup.mjs +90 -65
- package/dist/actions/package/compile/packageCompileTsup.mjs.map +1 -1
- package/dist/actions/package/index.mjs +118 -80
- package/dist/actions/package/index.mjs.map +1 -1
- package/dist/actions/package/lint.mjs +2 -0
- package/dist/actions/package/lint.mjs.map +1 -1
- package/dist/actions/package/recompile.mjs +88 -64
- package/dist/actions/package/recompile.mjs.map +1 -1
- package/dist/bin/package/build-only.mjs +88 -64
- package/dist/bin/package/build-only.mjs.map +1 -1
- package/dist/bin/package/build.mjs +88 -64
- package/dist/bin/package/build.mjs.map +1 -1
- package/dist/bin/package/compile-only.mjs +88 -64
- package/dist/bin/package/compile-only.mjs.map +1 -1
- package/dist/bin/package/compile-tsup.mjs +88 -64
- package/dist/bin/package/compile-tsup.mjs.map +1 -1
- package/dist/bin/package/compile-types.mjs +173 -0
- package/dist/bin/package/compile-types.mjs.map +1 -0
- package/dist/bin/package/compile.mjs +88 -64
- package/dist/bin/package/compile.mjs.map +1 -1
- package/dist/bin/package/fix.mjs +2 -0
- package/dist/bin/package/fix.mjs.map +1 -1
- package/dist/bin/package/lint.mjs +2 -0
- package/dist/bin/package/lint.mjs.map +1 -1
- package/dist/bin/package/recompile.mjs +88 -64
- package/dist/bin/package/recompile.mjs.map +1 -1
- package/dist/bin/xy.mjs +132 -45
- package/dist/bin/xy.mjs.map +1 -1
- package/dist/index.d.ts +21 -1
- package/dist/index.mjs +277 -149
- package/dist/index.mjs.map +1 -1
- package/dist/xy/index.mjs +132 -45
- package/dist/xy/index.mjs.map +1 -1
- package/dist/xy/xy.mjs +132 -45
- package/dist/xy/xy.mjs.map +1 -1
- package/dist/xy/xyBuildCommands.mjs +92 -5
- package/dist/xy/xyBuildCommands.mjs.map +1 -1
- package/dist/xy/xyLintCommands.mjs +2 -2
- package/dist/xy/xyLintCommands.mjs.map +1 -1
- package/package.json +18 -49
- package/src/actions/compile-types.ts +67 -0
- package/src/actions/index.ts +1 -0
- package/src/actions/lint.ts +1 -1
- package/src/actions/package/compile/compileTypes.ts +13 -0
- package/src/actions/package/compile/deepMerge.ts +33 -0
- package/src/actions/package/compile/index.ts +2 -0
- package/src/actions/package/compile/packageCompileTscTypes.ts +3 -2
- package/src/actions/package/compile/packageCompileTsup.ts +39 -53
- package/src/actions/package/lint.ts +2 -0
- package/src/bin/package/compile-types.ts +16 -0
- package/src/bin/xy.ts +1 -1
- package/src/xy/xyBuildCommands.ts +19 -1
- package/dist/bin/build.mjs +0 -17
- package/dist/bin/build.mjs.map +0 -1
- package/dist/bin/clean.mjs +0 -17
- package/dist/bin/clean.mjs.map +0 -1
- package/dist/bin/compile-only.mjs +0 -17
- package/dist/bin/compile-only.mjs.map +0 -1
- package/dist/bin/compile.mjs +0 -17
- package/dist/bin/compile.mjs.map +0 -1
- package/dist/bin/cycle.mjs +0 -17
- package/dist/bin/cycle.mjs.map +0 -1
- package/dist/bin/dead.mjs +0 -17
- package/dist/bin/dead.mjs.map +0 -1
- package/dist/bin/deploy-major.mjs +0 -17
- package/dist/bin/deploy-major.mjs.map +0 -1
- package/dist/bin/deploy-minor.mjs +0 -17
- package/dist/bin/deploy-minor.mjs.map +0 -1
- package/dist/bin/deploy-next.mjs +0 -17
- package/dist/bin/deploy-next.mjs.map +0 -1
- package/dist/bin/deploy.mjs +0 -17
- package/dist/bin/deploy.mjs.map +0 -1
- package/dist/bin/deps.mjs +0 -17
- package/dist/bin/deps.mjs.map +0 -1
- package/dist/bin/fix.mjs +0 -17
- package/dist/bin/fix.mjs.map +0 -1
- package/dist/bin/gen-docs.mjs +0 -17
- package/dist/bin/gen-docs.mjs.map +0 -1
- package/dist/bin/gitlint-fix.mjs +0 -17
- package/dist/bin/gitlint-fix.mjs.map +0 -1
- package/dist/bin/gitlint.mjs +0 -17
- package/dist/bin/gitlint.mjs.map +0 -1
- package/dist/bin/license.mjs +0 -17
- package/dist/bin/license.mjs.map +0 -1
- package/dist/bin/lint-clean.mjs +0 -17
- package/dist/bin/lint-clean.mjs.map +0 -1
- package/dist/bin/lint-fast.mjs +0 -17
- package/dist/bin/lint-fast.mjs.map +0 -1
- package/dist/bin/lint-profile.mjs +0 -17
- package/dist/bin/lint-profile.mjs.map +0 -1
- package/dist/bin/lint.mjs +0 -17
- package/dist/bin/lint.mjs.map +0 -1
- package/dist/bin/publint.mjs +0 -17
- package/dist/bin/publint.mjs.map +0 -1
- package/dist/bin/rebuild.mjs +0 -17
- package/dist/bin/rebuild.mjs.map +0 -1
- package/dist/bin/recompile.mjs +0 -17
- package/dist/bin/recompile.mjs.map +0 -1
- package/dist/bin/reinstall.mjs +0 -17
- package/dist/bin/reinstall.mjs.map +0 -1
- package/dist/bin/relint.mjs +0 -17
- package/dist/bin/relint.mjs.map +0 -1
- package/dist/bin/sonar.mjs +0 -17
- package/dist/bin/sonar.mjs.map +0 -1
- package/dist/bin/test.mjs +0 -17
- package/dist/bin/test.mjs.map +0 -1
- package/dist/bin/up.mjs +0 -17
- package/dist/bin/up.mjs.map +0 -1
- package/dist/bin/updo.mjs +0 -17
- package/dist/bin/updo.mjs.map +0 -1
- package/dist/bin/upplug.mjs +0 -17
- package/dist/bin/upplug.mjs.map +0 -1
- package/dist/bin/upyarn.mjs +0 -17
- package/dist/bin/upyarn.mjs.map +0 -1
- package/dist/bin/xy-ts.mjs +0 -1930
- package/dist/bin/xy-ts.mjs.map +0 -1
- package/dist/bin/yarn3only.mjs +0 -17
- package/dist/bin/yarn3only.mjs.map +0 -1
- package/src/bin/build.ts +0 -5
- package/src/bin/clean.ts +0 -5
- package/src/bin/compile-only.ts +0 -5
- package/src/bin/compile.ts +0 -5
- package/src/bin/cycle.ts +0 -5
- package/src/bin/dead.ts +0 -5
- package/src/bin/deploy-major.ts +0 -5
- package/src/bin/deploy-minor.ts +0 -5
- package/src/bin/deploy-next.ts +0 -5
- package/src/bin/deploy.ts +0 -5
- package/src/bin/deps.ts +0 -5
- package/src/bin/fix.ts +0 -5
- package/src/bin/gen-docs.ts +0 -5
- package/src/bin/gitlint-fix.ts +0 -5
- package/src/bin/gitlint.ts +0 -5
- package/src/bin/license.ts +0 -5
- package/src/bin/lint-clean.ts +0 -5
- package/src/bin/lint-fast.ts +0 -5
- package/src/bin/lint-profile.ts +0 -5
- package/src/bin/lint.ts +0 -5
- package/src/bin/publint.ts +0 -5
- package/src/bin/rebuild.ts +0 -5
- package/src/bin/recompile.ts +0 -5
- package/src/bin/reinstall.ts +0 -5
- package/src/bin/relint.ts +0 -5
- package/src/bin/sonar.ts +0 -5
- package/src/bin/test.ts +0 -5
- package/src/bin/up.ts +0 -5
- package/src/bin/updo.ts +0 -5
- package/src/bin/upplug.ts +0 -5
- package/src/bin/upyarn.ts +0 -5
- package/src/bin/xy-ts.ts +0 -12
- package/src/bin/yarn3only.ts +0 -5
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";
|
|
@@ -616,9 +616,82 @@ var compileAll = /* @__PURE__ */ __name(({ jobs, verbose, target, incremental, t
|
|
|
616
616
|
return result;
|
|
617
617
|
}, "compileAll");
|
|
618
618
|
|
|
619
|
+
// src/actions/compile-types.ts
|
|
620
|
+
import chalk10 from "chalk";
|
|
621
|
+
var compileTypes = /* @__PURE__ */ __name(({ verbose, pkg, incremental, jobs }) => {
|
|
622
|
+
if (verbose) {
|
|
623
|
+
console.log(chalk10.gray("Compiling Types"));
|
|
624
|
+
}
|
|
625
|
+
return pkg ? compileTypesPackage({
|
|
626
|
+
pkg,
|
|
627
|
+
verbose
|
|
628
|
+
}) : compileTypesAll({
|
|
629
|
+
incremental,
|
|
630
|
+
verbose,
|
|
631
|
+
jobs
|
|
632
|
+
});
|
|
633
|
+
}, "compileTypes");
|
|
634
|
+
var compileTypesPackage = /* @__PURE__ */ __name(({ verbose, pkg }) => {
|
|
635
|
+
if (verbose) {
|
|
636
|
+
console.log(chalk10.gray("Compiling Types [Package]"));
|
|
637
|
+
}
|
|
638
|
+
return runSteps(`Compile [${pkg}]`, [
|
|
639
|
+
[
|
|
640
|
+
"yarn",
|
|
641
|
+
[
|
|
642
|
+
"workspace",
|
|
643
|
+
pkg,
|
|
644
|
+
"run",
|
|
645
|
+
"package-compile-types"
|
|
646
|
+
]
|
|
647
|
+
]
|
|
648
|
+
]);
|
|
649
|
+
}, "compileTypesPackage");
|
|
650
|
+
var compileTypesAll = /* @__PURE__ */ __name(({ jobs, verbose, incremental }) => {
|
|
651
|
+
if (verbose) {
|
|
652
|
+
console.log(chalk10.gray("Compiling Types [All]"));
|
|
653
|
+
}
|
|
654
|
+
const start = Date.now();
|
|
655
|
+
const verboseOptions = verbose ? [
|
|
656
|
+
"--verbose"
|
|
657
|
+
] : [
|
|
658
|
+
"--no-verbose"
|
|
659
|
+
];
|
|
660
|
+
const incrementalOptions = incremental ? [
|
|
661
|
+
"--since",
|
|
662
|
+
"-Ap"
|
|
663
|
+
] : [
|
|
664
|
+
"--parallel",
|
|
665
|
+
"-Ap"
|
|
666
|
+
];
|
|
667
|
+
const jobsOptions = jobs ? [
|
|
668
|
+
"-j",
|
|
669
|
+
`${jobs}`
|
|
670
|
+
] : [];
|
|
671
|
+
if (jobs) {
|
|
672
|
+
console.log(chalk10.blue(`Jobs set to [${jobs}]`));
|
|
673
|
+
}
|
|
674
|
+
const result = runSteps(`Compile Types ${incremental ? "[Incremental]" : ""} [All]`, [
|
|
675
|
+
[
|
|
676
|
+
"yarn",
|
|
677
|
+
[
|
|
678
|
+
"workspaces",
|
|
679
|
+
"foreach",
|
|
680
|
+
...incrementalOptions,
|
|
681
|
+
...jobsOptions,
|
|
682
|
+
...verboseOptions,
|
|
683
|
+
"run",
|
|
684
|
+
"package-compile-types"
|
|
685
|
+
]
|
|
686
|
+
]
|
|
687
|
+
]);
|
|
688
|
+
console.log(`${chalk10.gray("Types Compiled in")} [${chalk10.magenta(((Date.now() - start) / 1e3).toFixed(2))}] ${chalk10.gray("seconds")}`);
|
|
689
|
+
return result;
|
|
690
|
+
}, "compileTypesAll");
|
|
691
|
+
|
|
619
692
|
// src/actions/copy-assets.ts
|
|
620
693
|
import path2 from "node:path/posix";
|
|
621
|
-
import
|
|
694
|
+
import chalk11 from "chalk";
|
|
622
695
|
import cpy from "cpy";
|
|
623
696
|
var copyPackageTargetAssets = /* @__PURE__ */ __name(async (target, name, location) => {
|
|
624
697
|
try {
|
|
@@ -647,7 +720,7 @@ var copyPackageTargetAssets = /* @__PURE__ */ __name(async (target, name, locati
|
|
|
647
720
|
}, "copyPackageTargetAssets");
|
|
648
721
|
var copyTargetAssets = /* @__PURE__ */ __name(async (target, pkg) => {
|
|
649
722
|
const workspaces = yarnWorkspaces();
|
|
650
|
-
console.log(
|
|
723
|
+
console.log(chalk11.green(`Copying Assets [${target.toUpperCase()}]`));
|
|
651
724
|
const workspaceList = workspaces.filter(({ name }) => {
|
|
652
725
|
return pkg === void 0 || name === pkg;
|
|
653
726
|
});
|
|
@@ -821,7 +894,7 @@ var deployNext = /* @__PURE__ */ __name(() => {
|
|
|
821
894
|
}, "deployNext");
|
|
822
895
|
|
|
823
896
|
// src/actions/deps.ts
|
|
824
|
-
import
|
|
897
|
+
import chalk12 from "chalk";
|
|
825
898
|
var deps = /* @__PURE__ */ __name(({ pkg, incremental }) => {
|
|
826
899
|
pkg ? depsPackage({
|
|
827
900
|
pkg
|
|
@@ -858,7 +931,7 @@ var depsAll = /* @__PURE__ */ __name(({ incremental, jobs, verbose }) => {
|
|
|
858
931
|
"--no-verbose"
|
|
859
932
|
];
|
|
860
933
|
if (jobs) {
|
|
861
|
-
console.log(
|
|
934
|
+
console.log(chalk12.blue(`Jobs set to [${jobs}]`));
|
|
862
935
|
}
|
|
863
936
|
const incrementalOptions = incremental ? [
|
|
864
937
|
"--since",
|
|
@@ -883,21 +956,21 @@ var depsAll = /* @__PURE__ */ __name(({ incremental, jobs, verbose }) => {
|
|
|
883
956
|
const result = runSteps(`Deps${incremental ? "-Incremental" : ""} [All]`, [
|
|
884
957
|
...steps
|
|
885
958
|
]);
|
|
886
|
-
console.log(`${
|
|
959
|
+
console.log(`${chalk12.gray("Dep checked in")} [${chalk12.magenta(((Date.now() - start) / 1e3).toFixed(2))}] ${chalk12.gray("seconds")}`);
|
|
887
960
|
return result;
|
|
888
961
|
}, "depsAll");
|
|
889
962
|
|
|
890
963
|
// src/actions/dupdeps.ts
|
|
891
|
-
import
|
|
964
|
+
import chalk13 from "chalk";
|
|
892
965
|
var dupdeps = /* @__PURE__ */ __name(() => {
|
|
893
|
-
console.log(
|
|
966
|
+
console.log(chalk13.green("Checking all Dependencies for Duplicates"));
|
|
894
967
|
const allDependencies = parsedPackageJSON()?.dependencies;
|
|
895
968
|
const dependencies = Object.entries(allDependencies).map(([k]) => k);
|
|
896
969
|
return detectDuplicateDependencies(dependencies);
|
|
897
970
|
}, "dupdeps");
|
|
898
971
|
|
|
899
972
|
// src/actions/lint.ts
|
|
900
|
-
import
|
|
973
|
+
import chalk14 from "chalk";
|
|
901
974
|
import { ESLint as ESLint2 } from "eslint";
|
|
902
975
|
var dumpMessages = /* @__PURE__ */ __name((lintResults) => {
|
|
903
976
|
const colors = [
|
|
@@ -912,9 +985,9 @@ var dumpMessages = /* @__PURE__ */ __name((lintResults) => {
|
|
|
912
985
|
];
|
|
913
986
|
for (const lintResult of lintResults) {
|
|
914
987
|
if (lintResult.messages.length > 0) {
|
|
915
|
-
console.log(
|
|
988
|
+
console.log(chalk14.gray(`${lintResult.filePath}`));
|
|
916
989
|
for (const message of lintResult.messages) {
|
|
917
|
-
console.log(
|
|
990
|
+
console.log(chalk14.gray(` ${message.line}:${message.column}`), chalk14[colors[message.severity]](` ${severity[message.severity]}`), chalk14.white(` ${message.message}`), chalk14.gray(` ${message.ruleId}`));
|
|
918
991
|
}
|
|
919
992
|
}
|
|
920
993
|
}
|
|
@@ -922,7 +995,7 @@ var dumpMessages = /* @__PURE__ */ __name((lintResults) => {
|
|
|
922
995
|
var lintPackage = /* @__PURE__ */ __name(async ({ pkg, fix: fix2 }) => {
|
|
923
996
|
const workspace = yarnWorkspaces().find((workspace2) => workspace2.name === pkg);
|
|
924
997
|
if (!workspace) {
|
|
925
|
-
console.error(
|
|
998
|
+
console.error(chalk14.red(`Unable to locate package [${chalk14.magenta(pkg)}]`));
|
|
926
999
|
process.exit(1);
|
|
927
1000
|
}
|
|
928
1001
|
const engine = new ESLint2({
|
|
@@ -944,7 +1017,7 @@ var lint = /* @__PURE__ */ __name(async ({ pkg, verbose, incremental, fix: fix2
|
|
|
944
1017
|
});
|
|
945
1018
|
}, "lint");
|
|
946
1019
|
var lintAllPackages = /* @__PURE__ */ __name(({ fix: fix2, verbose = true, incremental } = {}) => {
|
|
947
|
-
console.log(
|
|
1020
|
+
console.log(chalk14.gray(`${fix2 ? "Fix" : "Lint"} [All-Packages]`));
|
|
948
1021
|
const start = Date.now();
|
|
949
1022
|
const verboseOptions = verbose ? [
|
|
950
1023
|
"--verbose"
|
|
@@ -953,10 +1026,10 @@ var lintAllPackages = /* @__PURE__ */ __name(({ fix: fix2, verbose = true, incre
|
|
|
953
1026
|
];
|
|
954
1027
|
const incrementalOptions = incremental ? [
|
|
955
1028
|
"--since",
|
|
956
|
-
"-
|
|
1029
|
+
"-Ap"
|
|
957
1030
|
] : [
|
|
958
1031
|
"--parallel",
|
|
959
|
-
"-
|
|
1032
|
+
"-Ap"
|
|
960
1033
|
];
|
|
961
1034
|
const result = runSteps(`${fix2 ? "Fix" : "Lint"} [All-Packages]`, [
|
|
962
1035
|
[
|
|
@@ -971,7 +1044,7 @@ var lintAllPackages = /* @__PURE__ */ __name(({ fix: fix2, verbose = true, incre
|
|
|
971
1044
|
]
|
|
972
1045
|
]
|
|
973
1046
|
]);
|
|
974
|
-
console.log(
|
|
1047
|
+
console.log(chalk14.gray(`${fix2 ? "Fixed in" : "Linted in"} [${chalk14.magenta(((Date.now() - start) / 1e3).toFixed(2))}] ${chalk14.gray("seconds")}`));
|
|
975
1048
|
return result;
|
|
976
1049
|
}, "lintAllPackages");
|
|
977
1050
|
|
|
@@ -1035,7 +1108,7 @@ var filename = ".gitignore";
|
|
|
1035
1108
|
var gitignoreGen = /* @__PURE__ */ __name((pkg) => generateIgnoreFiles(filename, pkg), "gitignoreGen");
|
|
1036
1109
|
|
|
1037
1110
|
// src/actions/gitlint.ts
|
|
1038
|
-
import
|
|
1111
|
+
import chalk15 from "chalk";
|
|
1039
1112
|
import ParseGitConfig from "parse-git-config";
|
|
1040
1113
|
var gitlint = /* @__PURE__ */ __name(() => {
|
|
1041
1114
|
console.log(`
|
|
@@ -1046,7 +1119,7 @@ Gitlint Start [${process.cwd()}]
|
|
|
1046
1119
|
const errors = 0;
|
|
1047
1120
|
const gitConfig = ParseGitConfig.sync();
|
|
1048
1121
|
const warn = /* @__PURE__ */ __name((message) => {
|
|
1049
|
-
console.warn(
|
|
1122
|
+
console.warn(chalk15.yellow(`Warning: ${message}`));
|
|
1050
1123
|
warnings++;
|
|
1051
1124
|
}, "warn");
|
|
1052
1125
|
if (gitConfig.core.ignorecase) {
|
|
@@ -1066,13 +1139,13 @@ Gitlint Start [${process.cwd()}]
|
|
|
1066
1139
|
}
|
|
1067
1140
|
const resultMessages = [];
|
|
1068
1141
|
if (valid > 0) {
|
|
1069
|
-
resultMessages.push(
|
|
1142
|
+
resultMessages.push(chalk15.green(`Passed: ${valid}`));
|
|
1070
1143
|
}
|
|
1071
1144
|
if (warnings > 0) {
|
|
1072
|
-
resultMessages.push(
|
|
1145
|
+
resultMessages.push(chalk15.yellow(`Warnings: ${warnings}`));
|
|
1073
1146
|
}
|
|
1074
1147
|
if (errors > 0) {
|
|
1075
|
-
resultMessages.push(
|
|
1148
|
+
resultMessages.push(chalk15.red(` Errors: ${errors}`));
|
|
1076
1149
|
}
|
|
1077
1150
|
console.warn(`Gitlint Finish [ ${resultMessages.join(" | ")} ]
|
|
1078
1151
|
`);
|
|
@@ -1081,7 +1154,7 @@ Gitlint Start [${process.cwd()}]
|
|
|
1081
1154
|
|
|
1082
1155
|
// src/actions/gitlint-fix.ts
|
|
1083
1156
|
import { execSync as execSync2 } from "node:child_process";
|
|
1084
|
-
import
|
|
1157
|
+
import chalk16 from "chalk";
|
|
1085
1158
|
import ParseGitConfig2 from "parse-git-config";
|
|
1086
1159
|
var gitlintFix = /* @__PURE__ */ __name(() => {
|
|
1087
1160
|
console.log(`
|
|
@@ -1092,25 +1165,25 @@ Gitlint Fix Start [${process.cwd()}]
|
|
|
1092
1165
|
execSync2("git config core.ignorecase false", {
|
|
1093
1166
|
stdio: "inherit"
|
|
1094
1167
|
});
|
|
1095
|
-
console.warn(
|
|
1168
|
+
console.warn(chalk16.yellow("\nGitlint Fix: Updated core.ignorecase to be false\n"));
|
|
1096
1169
|
}
|
|
1097
1170
|
if (gitConfig.core.autocrlf !== false) {
|
|
1098
1171
|
execSync2("git config core.autocrlf false", {
|
|
1099
1172
|
stdio: "inherit"
|
|
1100
1173
|
});
|
|
1101
|
-
console.warn(
|
|
1174
|
+
console.warn(chalk16.yellow("\nGitlint Fix: Updated core.autocrlf to be false\n"));
|
|
1102
1175
|
}
|
|
1103
1176
|
if (gitConfig.core.eol !== "lf") {
|
|
1104
1177
|
execSync2("git config core.eol lf", {
|
|
1105
1178
|
stdio: "inherit"
|
|
1106
1179
|
});
|
|
1107
|
-
console.warn(
|
|
1180
|
+
console.warn(chalk16.yellow('\nGitlint Fix: Updated core.eol to be "lf"\n'));
|
|
1108
1181
|
}
|
|
1109
1182
|
return 1;
|
|
1110
1183
|
}, "gitlintFix");
|
|
1111
1184
|
|
|
1112
1185
|
// src/actions/license.ts
|
|
1113
|
-
import
|
|
1186
|
+
import chalk17 from "chalk";
|
|
1114
1187
|
import { init } from "license-checker";
|
|
1115
1188
|
var license = /* @__PURE__ */ __name(async (pkg) => {
|
|
1116
1189
|
const workspaces = yarnWorkspaces();
|
|
@@ -1135,7 +1208,7 @@ var license = /* @__PURE__ */ __name(async (pkg) => {
|
|
|
1135
1208
|
"LGPL-3.0-or-later",
|
|
1136
1209
|
"Python-2.0"
|
|
1137
1210
|
]);
|
|
1138
|
-
console.log(
|
|
1211
|
+
console.log(chalk17.green("License Checker"));
|
|
1139
1212
|
return (await Promise.all(workspaceList.map(({ location, name }) => {
|
|
1140
1213
|
return new Promise((resolve) => {
|
|
1141
1214
|
init({
|
|
@@ -1143,12 +1216,12 @@ var license = /* @__PURE__ */ __name(async (pkg) => {
|
|
|
1143
1216
|
start: location
|
|
1144
1217
|
}, (error, packages) => {
|
|
1145
1218
|
if (error) {
|
|
1146
|
-
console.error(
|
|
1147
|
-
console.error(
|
|
1219
|
+
console.error(chalk17.red(`License Checker [${name}] Error`));
|
|
1220
|
+
console.error(chalk17.gray(error));
|
|
1148
1221
|
console.log("\n");
|
|
1149
1222
|
resolve(1);
|
|
1150
1223
|
} else {
|
|
1151
|
-
console.log(
|
|
1224
|
+
console.log(chalk17.green(`License Checker [${name}]`));
|
|
1152
1225
|
let count = 0;
|
|
1153
1226
|
for (const [name2, info] of Object.entries(packages)) {
|
|
1154
1227
|
const licenses = Array.isArray(info.licenses) ? info.licenses : [
|
|
@@ -1166,7 +1239,7 @@ var license = /* @__PURE__ */ __name(async (pkg) => {
|
|
|
1166
1239
|
}
|
|
1167
1240
|
if (!orLicenseFound) {
|
|
1168
1241
|
count++;
|
|
1169
|
-
console.warn(
|
|
1242
|
+
console.warn(chalk17.yellow(`${name2}: Package License not allowed [${license2}]`));
|
|
1170
1243
|
}
|
|
1171
1244
|
}
|
|
1172
1245
|
}
|
|
@@ -1260,7 +1333,7 @@ var rebuild = /* @__PURE__ */ __name(({ target }) => {
|
|
|
1260
1333
|
}, "rebuild");
|
|
1261
1334
|
|
|
1262
1335
|
// src/actions/recompile.ts
|
|
1263
|
-
import
|
|
1336
|
+
import chalk18 from "chalk";
|
|
1264
1337
|
var recompile = /* @__PURE__ */ __name(async ({ verbose, target, pkg, incremental }) => {
|
|
1265
1338
|
return pkg ? await recompilePackage({
|
|
1266
1339
|
pkg,
|
|
@@ -1321,7 +1394,7 @@ var recompileAll = /* @__PURE__ */ __name(async ({ jobs, verbose, target, increm
|
|
|
1321
1394
|
`${jobs}`
|
|
1322
1395
|
] : [];
|
|
1323
1396
|
if (jobs) {
|
|
1324
|
-
console.log(
|
|
1397
|
+
console.log(chalk18.blue(`Jobs set to [${jobs}]`));
|
|
1325
1398
|
}
|
|
1326
1399
|
const result = await runStepsAsync(`Recompile${incremental ? "-Incremental" : ""} [All]`, [
|
|
1327
1400
|
[
|
|
@@ -1351,7 +1424,7 @@ var recompileAll = /* @__PURE__ */ __name(async ({ jobs, verbose, target, increm
|
|
|
1351
1424
|
]
|
|
1352
1425
|
]
|
|
1353
1426
|
]);
|
|
1354
|
-
console.log(`${
|
|
1427
|
+
console.log(`${chalk18.gray("Recompiled in")} [${chalk18.magenta(((Date.now() - start) / 1e3).toFixed(2))}] ${chalk18.gray("seconds")}`);
|
|
1355
1428
|
return result;
|
|
1356
1429
|
}, "recompileAll");
|
|
1357
1430
|
|
|
@@ -1451,7 +1524,7 @@ var sonar = /* @__PURE__ */ __name(() => {
|
|
|
1451
1524
|
}, "sonar");
|
|
1452
1525
|
|
|
1453
1526
|
// src/actions/statics.ts
|
|
1454
|
-
import
|
|
1527
|
+
import chalk19 from "chalk";
|
|
1455
1528
|
var DefaultDependencies = [
|
|
1456
1529
|
"axios",
|
|
1457
1530
|
"@xylabs/pixel",
|
|
@@ -1462,7 +1535,7 @@ var DefaultDependencies = [
|
|
|
1462
1535
|
"@mui/system"
|
|
1463
1536
|
];
|
|
1464
1537
|
var statics = /* @__PURE__ */ __name(() => {
|
|
1465
|
-
console.log(
|
|
1538
|
+
console.log(chalk19.green("Check Required Static Dependencies"));
|
|
1466
1539
|
const statics2 = parsedPackageJSON()?.xy?.deps?.statics;
|
|
1467
1540
|
return detectDuplicateDependencies(statics2, DefaultDependencies);
|
|
1468
1541
|
}, "statics");
|
|
@@ -1602,6 +1675,20 @@ var xyBuildCommands = /* @__PURE__ */ __name((args) => {
|
|
|
1602
1675
|
types: argv.types,
|
|
1603
1676
|
verbose: !!argv.verbose
|
|
1604
1677
|
});
|
|
1678
|
+
}).command("compile-types [package]", "Compile types with Typescript", (yargs2) => {
|
|
1679
|
+
return yargs2.positional("package", {
|
|
1680
|
+
describe: "Specific package to compile"
|
|
1681
|
+
});
|
|
1682
|
+
}, (argv) => {
|
|
1683
|
+
if (argv.verbose) {
|
|
1684
|
+
console.log(`Compiling: ${argv.package ?? "all"}`);
|
|
1685
|
+
}
|
|
1686
|
+
process.exitCode = compileTypes({
|
|
1687
|
+
incremental: !!argv.incremental,
|
|
1688
|
+
jobs: argv.jobs,
|
|
1689
|
+
pkg: argv.package,
|
|
1690
|
+
verbose: !!argv.verbose
|
|
1691
|
+
});
|
|
1605
1692
|
}).command("compile-only [package]", "Compile with Typescript & Copy Images (No Publint)", (yargs2) => {
|
|
1606
1693
|
return yargs2.positional("package", {
|
|
1607
1694
|
describe: "Specific package to compile"
|
|
@@ -1804,7 +1891,7 @@ var xyInstallCommands = /* @__PURE__ */ __name((args) => {
|
|
|
1804
1891
|
}, "xyInstallCommands");
|
|
1805
1892
|
|
|
1806
1893
|
// src/xy/xyLintCommands.ts
|
|
1807
|
-
import
|
|
1894
|
+
import chalk20 from "chalk";
|
|
1808
1895
|
var xyLintCommands = /* @__PURE__ */ __name((args) => {
|
|
1809
1896
|
return args.command("cycle [package]", "Cycle - Check for dependency cycles", (yargs2) => {
|
|
1810
1897
|
return packagePositionalParam(yargs2);
|
|
@@ -1812,7 +1899,7 @@ var xyLintCommands = /* @__PURE__ */ __name((args) => {
|
|
|
1812
1899
|
const start = Date.now();
|
|
1813
1900
|
if (argv.verbose) console.log("Cycle");
|
|
1814
1901
|
process.exitCode = await cycle();
|
|
1815
|
-
console.log(
|
|
1902
|
+
console.log(chalk20.blue(`Finished in ${Date.now() - start}ms`));
|
|
1816
1903
|
}).command("lint [package]", "Lint - Run Eslint", (yargs2) => {
|
|
1817
1904
|
return packagePositionalParam(yargs2);
|
|
1818
1905
|
}, async (argv) => {
|
|
@@ -1821,21 +1908,21 @@ var xyLintCommands = /* @__PURE__ */ __name((args) => {
|
|
|
1821
1908
|
process.exitCode = argv.fix ? await fix() : argv.profile ? lintProfile() : await lint({
|
|
1822
1909
|
pkg: argv.package
|
|
1823
1910
|
});
|
|
1824
|
-
console.log(
|
|
1911
|
+
console.log(chalk20.blue(`Finished in ${Date.now() - start}ms`));
|
|
1825
1912
|
}).command("fix [package]", "Fix - Run Eslint w/fix", (yargs2) => {
|
|
1826
1913
|
return packagePositionalParam(yargs2);
|
|
1827
1914
|
}, async (argv) => {
|
|
1828
1915
|
const start = Date.now();
|
|
1829
1916
|
if (argv.verbose) console.log("Fix");
|
|
1830
1917
|
process.exitCode = await fix();
|
|
1831
|
-
console.log(
|
|
1918
|
+
console.log(chalk20.blue(`Finished in ${Date.now() - start}ms`));
|
|
1832
1919
|
}).command("relint [package]", "Relint - Clean & Lint", (yargs2) => {
|
|
1833
1920
|
return packagePositionalParam(yargs2);
|
|
1834
1921
|
}, (argv) => {
|
|
1835
1922
|
if (argv.verbose) console.log("Relinting");
|
|
1836
1923
|
const start = Date.now();
|
|
1837
1924
|
process.exitCode = relint();
|
|
1838
|
-
console.log(
|
|
1925
|
+
console.log(chalk20.blue(`Finished in ${Date.now() - start}ms`));
|
|
1839
1926
|
}).command("publint [package]", "Publint - Run Publint", (yargs2) => {
|
|
1840
1927
|
return packagePositionalParam(yargs2);
|
|
1841
1928
|
}, async (argv) => {
|
|
@@ -1845,14 +1932,14 @@ var xyLintCommands = /* @__PURE__ */ __name((args) => {
|
|
|
1845
1932
|
pkg: argv.package,
|
|
1846
1933
|
verbose: !!argv.verbose
|
|
1847
1934
|
});
|
|
1848
|
-
console.log(
|
|
1935
|
+
console.log(chalk20.blue(`Finished in ${Date.now() - start}ms`));
|
|
1849
1936
|
}).command("sonar", "Sonar - Run Sonar Check", (yargs2) => {
|
|
1850
1937
|
return packagePositionalParam(yargs2);
|
|
1851
1938
|
}, (argv) => {
|
|
1852
1939
|
const start = Date.now();
|
|
1853
1940
|
if (argv.verbose) console.log("Sonar Check");
|
|
1854
1941
|
process.exitCode = sonar();
|
|
1855
|
-
console.log(
|
|
1942
|
+
console.log(chalk20.blue(`Finished in ${Date.now() - start}ms`));
|
|
1856
1943
|
});
|
|
1857
1944
|
}, "xyLintCommands");
|
|
1858
1945
|
|
|
@@ -1914,8 +2001,8 @@ var xyParseOptions = /* @__PURE__ */ __name(() => {
|
|
|
1914
2001
|
var xy = /* @__PURE__ */ __name(async () => {
|
|
1915
2002
|
const options = xyParseOptions();
|
|
1916
2003
|
return await xyBuildCommands(xyCommonCommands(xyInstallCommands(xyDeployCommands(xyLintCommands(options))))).demandCommand(1).command("*", "", () => {
|
|
1917
|
-
console.error(
|
|
1918
|
-
console.log(
|
|
2004
|
+
console.error(chalk21.yellow(`Command not found [${chalk21.magenta(process.argv[2])}]`));
|
|
2005
|
+
console.log(chalk21.gray("Try 'yarn xy --help' for list of commands"));
|
|
1919
2006
|
}).version().help().argv;
|
|
1920
2007
|
}, "xy");
|
|
1921
2008
|
export {
|