@xylabs/ts-scripts-yarn3 6.0.3 → 6.0.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/fix.mjs +28 -59
- package/dist/actions/fix.mjs.map +1 -1
- package/dist/actions/index.mjs +93 -119
- package/dist/actions/index.mjs.map +1 -1
- package/dist/actions/lint.mjs +25 -65
- package/dist/actions/lint.mjs.map +1 -1
- package/dist/actions/relint.mjs +61 -45
- package/dist/actions/relint.mjs.map +1 -1
- package/dist/bin/package/relint.mjs +106 -0
- package/dist/bin/package/relint.mjs.map +1 -0
- package/dist/bin/xy.mjs +100 -94
- package/dist/bin/xy.mjs.map +1 -1
- package/dist/index.d.ts +28 -22
- package/dist/index.mjs +109 -133
- package/dist/index.mjs.map +1 -1
- package/dist/xy/index.mjs +100 -94
- package/dist/xy/index.mjs.map +1 -1
- package/dist/xy/xy.mjs +100 -94
- package/dist/xy/xy.mjs.map +1 -1
- package/dist/xy/xyLintCommands.mjs +97 -111
- package/dist/xy/xyLintCommands.mjs.map +1 -1
- package/package.json +5 -4
- package/src/actions/fix.ts +3 -2
- package/src/actions/index.ts +0 -2
- package/src/actions/lint.ts +19 -42
- package/src/actions/relint.ts +73 -18
- package/src/bin/package/relint.ts +16 -0
- package/src/xy/xyLintCommands.ts +6 -8
- package/dist/actions/lint-clean.mjs +0 -222
- package/dist/actions/lint-clean.mjs.map +0 -1
- package/dist/actions/lint-profile.mjs +0 -118
- package/dist/actions/lint-profile.mjs.map +0 -1
- package/src/actions/lint-clean.ts +0 -24
- package/src/actions/lint-profile.ts +0 -5
package/dist/index.d.ts
CHANGED
|
@@ -96,7 +96,21 @@ declare const depsAll: ({ incremental, jobs, verbose, }: DepsParams) => number;
|
|
|
96
96
|
|
|
97
97
|
declare const dupdeps: () => number;
|
|
98
98
|
|
|
99
|
-
|
|
99
|
+
interface LintParams {
|
|
100
|
+
fix?: boolean;
|
|
101
|
+
incremental?: boolean;
|
|
102
|
+
pkg?: string;
|
|
103
|
+
verbose?: boolean;
|
|
104
|
+
}
|
|
105
|
+
interface LintPackageParams {
|
|
106
|
+
pkg: string;
|
|
107
|
+
verbose?: boolean;
|
|
108
|
+
}
|
|
109
|
+
declare const lintPackage: ({ pkg, fix, verbose, }: LintParams & Required<Pick<LintParams, "pkg">>) => number;
|
|
110
|
+
declare const lint: ({ pkg, verbose, incremental, fix, }?: LintParams) => number;
|
|
111
|
+
declare const lintAllPackages: ({ fix, verbose, incremental, }?: LintParams) => number;
|
|
112
|
+
|
|
113
|
+
declare const fix: (params?: LintParams) => number;
|
|
100
114
|
|
|
101
115
|
interface GenDocsParams {
|
|
102
116
|
incremental?: boolean;
|
|
@@ -117,25 +131,6 @@ declare const gitlintFix: () => number;
|
|
|
117
131
|
|
|
118
132
|
declare const license: (pkg?: string) => Promise<number>;
|
|
119
133
|
|
|
120
|
-
interface LintParams {
|
|
121
|
-
fix?: boolean;
|
|
122
|
-
incremental?: boolean;
|
|
123
|
-
pkg?: string;
|
|
124
|
-
verbose?: boolean;
|
|
125
|
-
}
|
|
126
|
-
interface LintPackageParams {
|
|
127
|
-
pkg: string;
|
|
128
|
-
verbose?: boolean;
|
|
129
|
-
}
|
|
130
|
-
declare const lintPackage: ({ pkg, fix }: LintParams) => Promise<number>;
|
|
131
|
-
declare const lintAll: ({ fix }: LintParams) => Promise<number>;
|
|
132
|
-
declare const lint: ({ pkg, verbose, incremental, fix, }?: LintParams) => Promise<number>;
|
|
133
|
-
declare const lintAllPackages: ({ fix, verbose, incremental, }?: LintParams) => number;
|
|
134
|
-
|
|
135
|
-
declare const lintClean: () => Promise<number>;
|
|
136
|
-
|
|
137
|
-
declare const lintProfile: () => number;
|
|
138
|
-
|
|
139
134
|
declare const npmignoreGen: (pkg?: string) => 1 | 0;
|
|
140
135
|
|
|
141
136
|
declare const packageClean: () => Promise<number>;
|
|
@@ -252,7 +247,18 @@ declare const recompileAll: ({ jobs, verbose, target, incremental, }: RecompileP
|
|
|
252
247
|
|
|
253
248
|
declare const reinstall: () => number;
|
|
254
249
|
|
|
255
|
-
|
|
250
|
+
interface RelintParams {
|
|
251
|
+
incremental?: boolean;
|
|
252
|
+
pkg?: string;
|
|
253
|
+
verbose?: boolean;
|
|
254
|
+
}
|
|
255
|
+
interface RelintPackageParams {
|
|
256
|
+
pkg: string;
|
|
257
|
+
verbose?: boolean;
|
|
258
|
+
}
|
|
259
|
+
declare const relintPackage: ({ pkg, verbose }: RelintParams & Required<Pick<RelintParams, "pkg">>) => number;
|
|
260
|
+
declare const relint: ({ pkg, verbose, incremental, }?: RelintParams) => number;
|
|
261
|
+
declare const relintAllPackages: ({ verbose, incremental }?: RelintParams) => number;
|
|
256
262
|
|
|
257
263
|
declare const retest: () => number;
|
|
258
264
|
|
|
@@ -385,4 +391,4 @@ declare const xyLintCommands: (args: Argv) => Argv<{}>;
|
|
|
385
391
|
|
|
386
392
|
declare const xyParseOptions: () => Argv;
|
|
387
393
|
|
|
388
|
-
export { type BuildParams, CROSS_PLATFORM_NEWLINE, type CleanPackageParams, type CleanParams, type CompileConfig, type CompileMode, type CompileParams, type CompileTypesParams, type CopyAssetsParams, type DepsPackageParams, type DepsParams, DuplicateDetector, type DynamicShareConfig, type EntryMode, type GenDocsPackageParams, type GenDocsParams, INIT_CWD, type LintPackageParams, type LintParams, type LiveShareConfig, type PackageCompileTscConfig, type PackageCompileTsupConfig, type PackageCopyAssetsParams, type PackageJsonEx, type PackagePublintParams, type PathConfig, type PublintPackageParams, type PublintParams, type ReadFileSyncOptions, type RebuildParams, type RecompilePackageParams, type RecompileParams, type ScriptStep, WINDOWS_NEWLINE_REGEX, type Workspace, type XyConfig, type XyConfigBase, type XyTscConfig, type XyTsupConfig, build, checkResult, clean, cleanAll, cleanDocs, cleanPackage, compile, compileAll, compilePackage, compileTypes, compileTypesAll, compileTypesPackage, copyAssets, createBuildConfig, cycle, dead, defaultBuildConfig, defaultReadFileSyncOptions, deleteGlob, deploy, deployMajor, deployMinor, deployNext, deps, depsAll, depsPackage, detectDuplicateDependencies, dupdeps, empty, fix, genDocs, genDocsAll, genDocsPackage, generateIgnoreFiles, gitignoreGen, gitlint, gitlintFix, isYarnVersionOrGreater, license, lint,
|
|
394
|
+
export { type BuildParams, CROSS_PLATFORM_NEWLINE, type CleanPackageParams, type CleanParams, type CompileConfig, type CompileMode, type CompileParams, type CompileTypesParams, type CopyAssetsParams, type DepsPackageParams, type DepsParams, DuplicateDetector, type DynamicShareConfig, type EntryMode, type GenDocsPackageParams, type GenDocsParams, INIT_CWD, type LintPackageParams, type LintParams, type LiveShareConfig, type PackageCompileTscConfig, type PackageCompileTsupConfig, type PackageCopyAssetsParams, type PackageJsonEx, type PackagePublintParams, type PathConfig, type PublintPackageParams, type PublintParams, type ReadFileSyncOptions, type RebuildParams, type RecompilePackageParams, type RecompileParams, type RelintPackageParams, type RelintParams, type ScriptStep, WINDOWS_NEWLINE_REGEX, type Workspace, type XyConfig, type XyConfigBase, type XyTscConfig, type XyTsupConfig, build, checkResult, clean, cleanAll, cleanDocs, cleanPackage, compile, compileAll, compilePackage, compileTypes, compileTypesAll, compileTypesPackage, copyAssets, createBuildConfig, cycle, dead, defaultBuildConfig, defaultReadFileSyncOptions, deleteGlob, deploy, deployMajor, deployMinor, deployNext, deps, depsAll, depsPackage, detectDuplicateDependencies, dupdeps, empty, fix, genDocs, genDocsAll, genDocsPackage, generateIgnoreFiles, gitignoreGen, gitlint, gitlintFix, isYarnVersionOrGreater, license, lint, lintAllPackages, lintPackage, loadConfig, loadPackageConfig, multiLineToJSONArray, notEmpty, npmignoreGen, packageClean, packageCleanOutputs, packageCleanTypescript, packageCompile, packageCompileTsc, packageCompileTscTypes, packageCompileTsup, packageCompileTypes, packageCopyAssets, packageDeps, packageGenDocs, packageLint, packagePublint, packageRecompile, parsedPackageJSON, processEx, publint, publintAll, publintPackage, readLines, readNonEmptyLines, rebuild, recompile, recompileAll, recompilePackage, reinstall, relint, relintAllPackages, relintPackage, retest, runStepAsync, runSteps, runStepsAsync, runXy, runXyWithWarning, safeExit, safeExitAsync, sonar, statics, test, tryReadFileSync, tsupOptions, union, up, updateYarnPlugins, updateYarnVersion, updo, withErrnoException, withError, writeLines, xy, xyBuildCommands, xyCommonCommands, xyDeployCommands, xyInstallCommands, xyLintCommands, xyParseOptions, yarn3Only, yarnWorkspace, yarnWorkspaces };
|
package/dist/index.mjs
CHANGED
|
@@ -1082,50 +1082,31 @@ var dupdeps = /* @__PURE__ */ __name(() => {
|
|
|
1082
1082
|
|
|
1083
1083
|
// src/actions/lint.ts
|
|
1084
1084
|
import chalk16 from "chalk";
|
|
1085
|
-
|
|
1086
|
-
|
|
1087
|
-
const
|
|
1088
|
-
|
|
1089
|
-
"
|
|
1090
|
-
|
|
1091
|
-
|
|
1092
|
-
const severity = [
|
|
1093
|
-
"none",
|
|
1094
|
-
"warning",
|
|
1095
|
-
"error"
|
|
1085
|
+
var lintPackage = /* @__PURE__ */ __name(({ pkg, fix: fix2, verbose }) => {
|
|
1086
|
+
console.log(chalk16.gray(`${fix2 ? "Fix" : "Lint"} [All-Packages]`));
|
|
1087
|
+
const start = Date.now();
|
|
1088
|
+
const verboseOptions = verbose ? [
|
|
1089
|
+
"--verbose"
|
|
1090
|
+
] : [
|
|
1091
|
+
"--no-verbose"
|
|
1096
1092
|
];
|
|
1097
|
-
|
|
1098
|
-
|
|
1099
|
-
|
|
1100
|
-
|
|
1101
|
-
|
|
1102
|
-
|
|
1103
|
-
|
|
1104
|
-
|
|
1105
|
-
|
|
1106
|
-
|
|
1107
|
-
|
|
1108
|
-
|
|
1109
|
-
|
|
1110
|
-
|
|
1111
|
-
}
|
|
1112
|
-
const engine = new ESLint2({
|
|
1113
|
-
cache: true,
|
|
1114
|
-
fix: fix2
|
|
1115
|
-
});
|
|
1116
|
-
const lintResults = await engine.lintFiles(workspace.location);
|
|
1117
|
-
dumpMessages(lintResults);
|
|
1118
|
-
return lintResults.reduce((prev, lintResult) => prev + lintResult.errorCount, 0);
|
|
1093
|
+
const result = runSteps(`${fix2 ? "Fix" : "Lint"} [All-Packages]`, [
|
|
1094
|
+
[
|
|
1095
|
+
"yarn",
|
|
1096
|
+
[
|
|
1097
|
+
"workspace",
|
|
1098
|
+
pkg,
|
|
1099
|
+
...verboseOptions,
|
|
1100
|
+
"run",
|
|
1101
|
+
fix2 ? "package-fix" : "package-lint"
|
|
1102
|
+
]
|
|
1103
|
+
]
|
|
1104
|
+
]);
|
|
1105
|
+
console.log(chalk16.gray(`${fix2 ? "Fixed in" : "Linted in"} [${chalk16.magenta(((Date.now() - start) / 1e3).toFixed(2))}] ${chalk16.gray("seconds")}`));
|
|
1106
|
+
return result;
|
|
1119
1107
|
}, "lintPackage");
|
|
1120
|
-
var
|
|
1121
|
-
|
|
1122
|
-
return (await Promise.all(workspace.map((ws) => lintPackage({
|
|
1123
|
-
pkg: ws.name,
|
|
1124
|
-
fix: fix2
|
|
1125
|
-
})))).reduce((prev, curr) => prev + curr, 0);
|
|
1126
|
-
}, "lintAll");
|
|
1127
|
-
var lint = /* @__PURE__ */ __name(async ({ pkg, verbose, incremental, fix: fix2 } = {}) => {
|
|
1128
|
-
return pkg ? await lintPackage({
|
|
1108
|
+
var lint = /* @__PURE__ */ __name(({ pkg, verbose, incremental, fix: fix2 } = {}) => {
|
|
1109
|
+
return pkg ? lintPackage({
|
|
1129
1110
|
pkg,
|
|
1130
1111
|
fix: fix2
|
|
1131
1112
|
}) : lintAllPackages({
|
|
@@ -1167,8 +1148,9 @@ var lintAllPackages = /* @__PURE__ */ __name(({ fix: fix2, verbose = true, incre
|
|
|
1167
1148
|
}, "lintAllPackages");
|
|
1168
1149
|
|
|
1169
1150
|
// src/actions/fix.ts
|
|
1170
|
-
var fix = /* @__PURE__ */ __name(
|
|
1171
|
-
return
|
|
1151
|
+
var fix = /* @__PURE__ */ __name((params) => {
|
|
1152
|
+
return lint({
|
|
1153
|
+
...params,
|
|
1172
1154
|
fix: true
|
|
1173
1155
|
});
|
|
1174
1156
|
}, "fix");
|
|
@@ -1370,47 +1352,6 @@ var license = /* @__PURE__ */ __name(async (pkg) => {
|
|
|
1370
1352
|
}))).reduce((prev, value) => prev || value, 0);
|
|
1371
1353
|
}, "license");
|
|
1372
1354
|
|
|
1373
|
-
// src/actions/lint-clean.ts
|
|
1374
|
-
import { rmSync } from "node:fs";
|
|
1375
|
-
var lintClean = /* @__PURE__ */ __name(async () => {
|
|
1376
|
-
console.log("Lint Clean [.eslintcache]");
|
|
1377
|
-
const workspaces = yarnWorkspaces();
|
|
1378
|
-
const result = workspaces.map(({ location, name }) => {
|
|
1379
|
-
const dist = `${location}/.eslintcache`;
|
|
1380
|
-
try {
|
|
1381
|
-
rmSync(dist, {
|
|
1382
|
-
force: true,
|
|
1383
|
-
recursive: true
|
|
1384
|
-
});
|
|
1385
|
-
return 0;
|
|
1386
|
-
} catch (ex) {
|
|
1387
|
-
const error = ex;
|
|
1388
|
-
console.error(`Lint Clean [.eslintcache] Failed [${name}, ${error.message}]`);
|
|
1389
|
-
return 1;
|
|
1390
|
-
}
|
|
1391
|
-
}).reduce((prev, result2) => prev || result2, 0);
|
|
1392
|
-
return result || await lint();
|
|
1393
|
-
}, "lintClean");
|
|
1394
|
-
|
|
1395
|
-
// src/actions/lint-profile.ts
|
|
1396
|
-
var lintProfile = /* @__PURE__ */ __name(() => {
|
|
1397
|
-
return runSteps("Lint Profile", [
|
|
1398
|
-
[
|
|
1399
|
-
"yarn",
|
|
1400
|
-
[
|
|
1401
|
-
"xy",
|
|
1402
|
-
"lint"
|
|
1403
|
-
],
|
|
1404
|
-
{
|
|
1405
|
-
env: {
|
|
1406
|
-
...process.env,
|
|
1407
|
-
TIMING: "1"
|
|
1408
|
-
}
|
|
1409
|
-
}
|
|
1410
|
-
]
|
|
1411
|
-
]);
|
|
1412
|
-
}, "lintProfile");
|
|
1413
|
-
|
|
1414
1355
|
// src/actions/npmignore-gen.ts
|
|
1415
1356
|
var filename2 = ".npmignore";
|
|
1416
1357
|
var npmignoreGen = /* @__PURE__ */ __name((pkg) => generateIgnoreFiles(filename2, pkg), "npmignoreGen");
|
|
@@ -2205,10 +2146,10 @@ import path7 from "node:path";
|
|
|
2205
2146
|
import { cwd as cwd4 } from "node:process";
|
|
2206
2147
|
import { pathToFileURL } from "node:url";
|
|
2207
2148
|
import chalk30 from "chalk";
|
|
2208
|
-
import { ESLint as
|
|
2149
|
+
import { ESLint as ESLint2 } from "eslint";
|
|
2209
2150
|
import { findUp } from "find-up";
|
|
2210
2151
|
import picomatch from "picomatch";
|
|
2211
|
-
var
|
|
2152
|
+
var dumpMessages = /* @__PURE__ */ __name((lintResults) => {
|
|
2212
2153
|
const colors = [
|
|
2213
2154
|
"white",
|
|
2214
2155
|
"yellow",
|
|
@@ -2268,7 +2209,7 @@ var packageLint = /* @__PURE__ */ __name(async (fix2 = false, verbose = false, c
|
|
|
2268
2209
|
".vscode",
|
|
2269
2210
|
".github"
|
|
2270
2211
|
];
|
|
2271
|
-
const engine = new
|
|
2212
|
+
const engine = new ESLint2({
|
|
2272
2213
|
baseConfig: [
|
|
2273
2214
|
...eslintConfig
|
|
2274
2215
|
],
|
|
@@ -2281,9 +2222,9 @@ var packageLint = /* @__PURE__ */ __name(async (fix2 = false, verbose = false, c
|
|
|
2281
2222
|
console.log(chalk30.green(`Linting ${pkg} [files = ${files.length}]`));
|
|
2282
2223
|
}
|
|
2283
2224
|
const lintResults = await engine.lintFiles(files);
|
|
2284
|
-
|
|
2225
|
+
dumpMessages(lintResults);
|
|
2285
2226
|
if (fix2) {
|
|
2286
|
-
await
|
|
2227
|
+
await ESLint2.outputFixes(lintResults);
|
|
2287
2228
|
}
|
|
2288
2229
|
return lintResults.reduce((prev, lintResult) => prev + lintResult.errorCount, 0);
|
|
2289
2230
|
}, "packageLint");
|
|
@@ -2447,7 +2388,7 @@ var recompileAll = /* @__PURE__ */ __name(async ({ jobs, verbose, target, increm
|
|
|
2447
2388
|
}, "recompileAll");
|
|
2448
2389
|
|
|
2449
2390
|
// src/actions/reinstall.ts
|
|
2450
|
-
import { closeSync, openSync, rmSync
|
|
2391
|
+
import { closeSync, openSync, rmSync } from "node:fs";
|
|
2451
2392
|
var reinstall = /* @__PURE__ */ __name(() => {
|
|
2452
2393
|
console.log("Reinstall [Clear Lock File]");
|
|
2453
2394
|
closeSync(openSync("./yarn.lock", "w"));
|
|
@@ -2456,7 +2397,7 @@ var reinstall = /* @__PURE__ */ __name(() => {
|
|
|
2456
2397
|
const result = workspaces.map(({ location, name }) => {
|
|
2457
2398
|
const dist = `${location}/node_modules`;
|
|
2458
2399
|
try {
|
|
2459
|
-
|
|
2400
|
+
rmSync(dist, {
|
|
2460
2401
|
force: true,
|
|
2461
2402
|
recursive: true
|
|
2462
2403
|
});
|
|
@@ -2476,35 +2417,69 @@ var reinstall = /* @__PURE__ */ __name(() => {
|
|
|
2476
2417
|
}, "reinstall");
|
|
2477
2418
|
|
|
2478
2419
|
// src/actions/relint.ts
|
|
2479
|
-
import
|
|
2480
|
-
var
|
|
2481
|
-
console.log("Relint -
|
|
2482
|
-
const
|
|
2483
|
-
const
|
|
2484
|
-
|
|
2485
|
-
|
|
2486
|
-
|
|
2487
|
-
|
|
2488
|
-
|
|
2489
|
-
});
|
|
2490
|
-
return 0;
|
|
2491
|
-
} catch (ex) {
|
|
2492
|
-
const error = ex;
|
|
2493
|
-
console.error(`Relint - Cleaning [.eslintcache] Failed [${name}, ${error.message}]`);
|
|
2494
|
-
return 1;
|
|
2495
|
-
}
|
|
2496
|
-
}).reduce((prev, result2) => prev || result2, 0);
|
|
2497
|
-
return result || runSteps("Relint", [
|
|
2420
|
+
import chalk32 from "chalk";
|
|
2421
|
+
var relintPackage = /* @__PURE__ */ __name(({ pkg, verbose }) => {
|
|
2422
|
+
console.log(chalk32.gray(`${"Relint"} [All-Packages]`));
|
|
2423
|
+
const start = Date.now();
|
|
2424
|
+
const verboseOptions = verbose ? [
|
|
2425
|
+
"--verbose"
|
|
2426
|
+
] : [
|
|
2427
|
+
"--no-verbose"
|
|
2428
|
+
];
|
|
2429
|
+
const result = runSteps("Relint [All-Packages]", [
|
|
2498
2430
|
[
|
|
2499
2431
|
"yarn",
|
|
2500
2432
|
[
|
|
2501
|
-
"
|
|
2502
|
-
|
|
2503
|
-
|
|
2433
|
+
"workspace",
|
|
2434
|
+
pkg,
|
|
2435
|
+
...verboseOptions,
|
|
2436
|
+
"run",
|
|
2437
|
+
"package-relint"
|
|
2504
2438
|
]
|
|
2505
2439
|
]
|
|
2506
2440
|
]);
|
|
2441
|
+
console.log(chalk32.gray(`${"Relinted in"} [${chalk32.magenta(((Date.now() - start) / 1e3).toFixed(2))}] ${chalk32.gray("seconds")}`));
|
|
2442
|
+
return result;
|
|
2443
|
+
}, "relintPackage");
|
|
2444
|
+
var relint = /* @__PURE__ */ __name(({ pkg, verbose, incremental } = {}) => {
|
|
2445
|
+
return pkg ? relintPackage({
|
|
2446
|
+
pkg
|
|
2447
|
+
}) : relintAllPackages({
|
|
2448
|
+
verbose,
|
|
2449
|
+
incremental
|
|
2450
|
+
});
|
|
2507
2451
|
}, "relint");
|
|
2452
|
+
var relintAllPackages = /* @__PURE__ */ __name(({ verbose = true, incremental } = {}) => {
|
|
2453
|
+
console.log(chalk32.gray(`${"Relint"} [All-Packages]`));
|
|
2454
|
+
const start = Date.now();
|
|
2455
|
+
const verboseOptions = verbose ? [
|
|
2456
|
+
"--verbose"
|
|
2457
|
+
] : [
|
|
2458
|
+
"--no-verbose"
|
|
2459
|
+
];
|
|
2460
|
+
const incrementalOptions = incremental ? [
|
|
2461
|
+
"--since",
|
|
2462
|
+
"-Ap"
|
|
2463
|
+
] : [
|
|
2464
|
+
"--parallel",
|
|
2465
|
+
"-Ap"
|
|
2466
|
+
];
|
|
2467
|
+
const result = runSteps(`${"Relint"} [All-Packages]`, [
|
|
2468
|
+
[
|
|
2469
|
+
"yarn",
|
|
2470
|
+
[
|
|
2471
|
+
"workspaces",
|
|
2472
|
+
"foreach",
|
|
2473
|
+
...verboseOptions,
|
|
2474
|
+
...incrementalOptions,
|
|
2475
|
+
"run",
|
|
2476
|
+
"package-relint"
|
|
2477
|
+
]
|
|
2478
|
+
]
|
|
2479
|
+
]);
|
|
2480
|
+
console.log(chalk32.gray(`Relinted in [${chalk32.magenta(((Date.now() - start) / 1e3).toFixed(2))}] ${chalk32.gray("seconds")}`));
|
|
2481
|
+
return result;
|
|
2482
|
+
}, "relintAllPackages");
|
|
2508
2483
|
|
|
2509
2484
|
// src/actions/retest.ts
|
|
2510
2485
|
var retest = /* @__PURE__ */ __name(() => {
|
|
@@ -2542,7 +2517,7 @@ var sonar = /* @__PURE__ */ __name(() => {
|
|
|
2542
2517
|
}, "sonar");
|
|
2543
2518
|
|
|
2544
2519
|
// src/actions/statics.ts
|
|
2545
|
-
import
|
|
2520
|
+
import chalk33 from "chalk";
|
|
2546
2521
|
var DefaultDependencies = [
|
|
2547
2522
|
"axios",
|
|
2548
2523
|
"@xylabs/pixel",
|
|
@@ -2553,7 +2528,7 @@ var DefaultDependencies = [
|
|
|
2553
2528
|
"@mui/system"
|
|
2554
2529
|
];
|
|
2555
2530
|
var statics = /* @__PURE__ */ __name(() => {
|
|
2556
|
-
console.log(
|
|
2531
|
+
console.log(chalk33.green("Check Required Static Dependencies"));
|
|
2557
2532
|
const statics2 = parsedPackageJSON()?.xy?.deps?.statics;
|
|
2558
2533
|
return detectDuplicateDependencies(statics2, DefaultDependencies);
|
|
2559
2534
|
}, "statics");
|
|
@@ -2671,7 +2646,7 @@ var loadPackageConfig = /* @__PURE__ */ __name(async () => {
|
|
|
2671
2646
|
}, "loadPackageConfig");
|
|
2672
2647
|
|
|
2673
2648
|
// src/xy/xy.ts
|
|
2674
|
-
import
|
|
2649
|
+
import chalk35 from "chalk";
|
|
2675
2650
|
|
|
2676
2651
|
// src/xy/xyBuildCommands.ts
|
|
2677
2652
|
var xyBuildCommands = /* @__PURE__ */ __name((args) => {
|
|
@@ -2922,7 +2897,7 @@ var xyInstallCommands = /* @__PURE__ */ __name((args) => {
|
|
|
2922
2897
|
}, "xyInstallCommands");
|
|
2923
2898
|
|
|
2924
2899
|
// src/xy/xyLintCommands.ts
|
|
2925
|
-
import
|
|
2900
|
+
import chalk34 from "chalk";
|
|
2926
2901
|
var xyLintCommands = /* @__PURE__ */ __name((args) => {
|
|
2927
2902
|
return args.command("cycle [package]", "Cycle - Check for dependency cycles", (yargs2) => {
|
|
2928
2903
|
return packagePositionalParam(yargs2);
|
|
@@ -2930,30 +2905,32 @@ var xyLintCommands = /* @__PURE__ */ __name((args) => {
|
|
|
2930
2905
|
const start = Date.now();
|
|
2931
2906
|
if (argv.verbose) console.log("Cycle");
|
|
2932
2907
|
process.exitCode = await cycle();
|
|
2933
|
-
console.log(
|
|
2908
|
+
console.log(chalk34.blue(`Finished in ${Date.now() - start}ms`));
|
|
2934
2909
|
}).command("lint [package]", "Lint - Run Eslint", (yargs2) => {
|
|
2935
2910
|
return packagePositionalParam(yargs2);
|
|
2936
|
-
},
|
|
2911
|
+
}, (argv) => {
|
|
2937
2912
|
if (argv.verbose) console.log("Lint");
|
|
2938
2913
|
const start = Date.now();
|
|
2939
|
-
process.exitCode = argv.fix ?
|
|
2914
|
+
process.exitCode = argv.fix ? fix({
|
|
2915
|
+
pkg: argv.package
|
|
2916
|
+
}) : lint({
|
|
2940
2917
|
pkg: argv.package
|
|
2941
2918
|
});
|
|
2942
|
-
console.log(
|
|
2919
|
+
console.log(chalk34.blue(`Finished in ${Date.now() - start}ms`));
|
|
2943
2920
|
}).command("fix [package]", "Fix - Run Eslint w/fix", (yargs2) => {
|
|
2944
2921
|
return packagePositionalParam(yargs2);
|
|
2945
|
-
},
|
|
2922
|
+
}, (argv) => {
|
|
2946
2923
|
const start = Date.now();
|
|
2947
2924
|
if (argv.verbose) console.log("Fix");
|
|
2948
|
-
process.exitCode =
|
|
2949
|
-
console.log(
|
|
2925
|
+
process.exitCode = fix();
|
|
2926
|
+
console.log(chalk34.blue(`Finished in ${Date.now() - start}ms`));
|
|
2950
2927
|
}).command("relint [package]", "Relint - Clean & Lint", (yargs2) => {
|
|
2951
2928
|
return packagePositionalParam(yargs2);
|
|
2952
2929
|
}, (argv) => {
|
|
2953
2930
|
if (argv.verbose) console.log("Relinting");
|
|
2954
2931
|
const start = Date.now();
|
|
2955
2932
|
process.exitCode = relint();
|
|
2956
|
-
console.log(
|
|
2933
|
+
console.log(chalk34.blue(`Finished in ${Date.now() - start}ms`));
|
|
2957
2934
|
}).command("publint [package]", "Publint - Run Publint", (yargs2) => {
|
|
2958
2935
|
return packagePositionalParam(yargs2);
|
|
2959
2936
|
}, async (argv) => {
|
|
@@ -2963,14 +2940,14 @@ var xyLintCommands = /* @__PURE__ */ __name((args) => {
|
|
|
2963
2940
|
pkg: argv.package,
|
|
2964
2941
|
verbose: !!argv.verbose
|
|
2965
2942
|
});
|
|
2966
|
-
console.log(
|
|
2943
|
+
console.log(chalk34.blue(`Finished in ${Date.now() - start}ms`));
|
|
2967
2944
|
}).command("sonar", "Sonar - Run Sonar Check", (yargs2) => {
|
|
2968
2945
|
return packagePositionalParam(yargs2);
|
|
2969
2946
|
}, (argv) => {
|
|
2970
2947
|
const start = Date.now();
|
|
2971
2948
|
if (argv.verbose) console.log("Sonar Check");
|
|
2972
2949
|
process.exitCode = sonar();
|
|
2973
|
-
console.log(
|
|
2950
|
+
console.log(chalk34.blue(`Finished in ${Date.now() - start}ms`));
|
|
2974
2951
|
});
|
|
2975
2952
|
}, "xyLintCommands");
|
|
2976
2953
|
|
|
@@ -3032,8 +3009,8 @@ var xyParseOptions = /* @__PURE__ */ __name(() => {
|
|
|
3032
3009
|
var xy = /* @__PURE__ */ __name(async () => {
|
|
3033
3010
|
const options = xyParseOptions();
|
|
3034
3011
|
return await xyBuildCommands(xyCommonCommands(xyInstallCommands(xyDeployCommands(xyLintCommands(options))))).demandCommand(1).command("*", "", () => {
|
|
3035
|
-
console.error(
|
|
3036
|
-
console.log(
|
|
3012
|
+
console.error(chalk35.yellow(`Command not found [${chalk35.magenta(process.argv[2])}]`));
|
|
3013
|
+
console.log(chalk35.gray("Try 'yarn xy --help' for list of commands"));
|
|
3037
3014
|
}).version().help().argv;
|
|
3038
3015
|
}, "xy");
|
|
3039
3016
|
export {
|
|
@@ -3081,11 +3058,8 @@ export {
|
|
|
3081
3058
|
isYarnVersionOrGreater,
|
|
3082
3059
|
license,
|
|
3083
3060
|
lint,
|
|
3084
|
-
lintAll,
|
|
3085
3061
|
lintAllPackages,
|
|
3086
|
-
lintClean,
|
|
3087
3062
|
lintPackage,
|
|
3088
|
-
lintProfile,
|
|
3089
3063
|
loadConfig,
|
|
3090
3064
|
loadPackageConfig,
|
|
3091
3065
|
multiLineToJSONArray,
|
|
@@ -3118,6 +3092,8 @@ export {
|
|
|
3118
3092
|
recompilePackage,
|
|
3119
3093
|
reinstall,
|
|
3120
3094
|
relint,
|
|
3095
|
+
relintAllPackages,
|
|
3096
|
+
relintPackage,
|
|
3121
3097
|
retest,
|
|
3122
3098
|
runStepAsync,
|
|
3123
3099
|
runSteps,
|