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