@xylabs/ts-scripts-yarn3 7.4.22 → 7.4.23
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/claude-settings.mjs +2 -2
- package/dist/actions/claude-settings.mjs.map +1 -1
- package/dist/actions/index.mjs +168 -12
- package/dist/actions/index.mjs.map +1 -1
- package/dist/actions/package-lint.mjs +178 -0
- package/dist/actions/package-lint.mjs.map +1 -0
- package/dist/bin/xy.mjs +204 -32
- package/dist/bin/xy.mjs.map +1 -1
- package/dist/index.d.ts +3 -1
- package/dist/index.mjs +205 -32
- package/dist/index.mjs.map +1 -1
- package/dist/xy/common/claude/index.mjs +2 -2
- package/dist/xy/common/claude/index.mjs.map +1 -1
- package/dist/xy/common/claude/initCommand.mjs +2 -2
- package/dist/xy/common/claude/initCommand.mjs.map +1 -1
- package/dist/xy/common/claude/settingsCommand.mjs +2 -2
- package/dist/xy/common/claude/settingsCommand.mjs.map +1 -1
- package/dist/xy/common/index.mjs +2 -2
- package/dist/xy/common/index.mjs.map +1 -1
- package/dist/xy/index.mjs +204 -32
- package/dist/xy/index.mjs.map +1 -1
- package/dist/xy/lint/index.mjs +200 -22
- package/dist/xy/lint/index.mjs.map +1 -1
- package/dist/xy/lint/packageLintCommand.mjs +193 -0
- package/dist/xy/lint/packageLintCommand.mjs.map +1 -0
- package/dist/xy/xy.mjs +204 -32
- package/dist/xy/xy.mjs.map +1 -1
- package/package.json +2 -2
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"sources":["../../src/actions/claude-settings.ts","../../src/lib/yarn/yarnInitCwd.ts"],"sourcesContent":["import {\n existsSync, mkdirSync, writeFileSync,\n} from 'node:fs'\nimport PATH from 'node:path'\nimport { createInterface } from 'node:readline'\n\nimport chalk from 'chalk'\n\nimport { INIT_CWD } from '../lib/yarn/index.ts'\n\nconst DEFAULT_SETTINGS = {\n permissions: {\n allow: [\n 'Bash(git *)',\n 'Bash(yarn *)',\n 'Bash(npx *)',\n 'Bash(node *)',\n 'Bash(ls *)',\n 'Bash(mkdir *)',\n 'Bash(cp *)',\n 'Bash(mv *)',\n 'Bash(rm *)',\n 'Bash(cat *)',\n 'Bash(head *)',\n 'Bash(tail *)',\n 'Bash(echo *)',\n 'Bash(pwd)',\n 'Bash(which *)',\n 'Bash(gh *)',\n 'Read',\n 'Edit',\n 'Write',\n 'Glob',\n 'Grep',\n 'Skill',\n ],\n deny: [\n 'Bash(git push --force*)',\n 'Bash(git reset --hard*)',\n 'Bash(rm -rf /*)',\n ],\n },\n}\n\nfunction askConfirmation(question: string): Promise<boolean> {\n const rl = createInterface({ input: process.stdin, output: process.stdout })\n return new Promise((resolve) => {\n rl.question(question, (answer) => {\n rl.close()\n resolve(answer.toLowerCase() === 'y' || answer.toLowerCase() === 'yes')\n })\n })\n}\n\nexport async function claudeSettings(): Promise<number> {\n const cwd = INIT_CWD() ?? process.cwd()\n const claudeDir = PATH.resolve(cwd, '.claude')\n const settingsPath = PATH.resolve(claudeDir, 'settings.local.json')\n\n mkdirSync(claudeDir, { recursive: true })\n\n if (existsSync(settingsPath)) {\n const confirmed = await askConfirmation(\n chalk.yellow(`${settingsPath} already exists. Replace it? (y/N) `),\n )\n if (!confirmed) {\n console.log(chalk.gray('Skipped — existing settings.local.json preserved'))\n return 0\n }\n }\n\n writeFileSync(settingsPath, `${JSON.stringify(DEFAULT_SETTINGS, null, 2)}\\n`, 'utf8')\n console.log(chalk.green('Generated .claude/settings.local.json'))\n return 0\n}\n","export const INIT_CWD = () => {\n if (!process.env.INIT_CWD) console.error('Missing INIT_CWD')\n return process.env.INIT_CWD\n}\n"],"mappings":";AAAA;AAAA,EACE;AAAA,EAAY;AAAA,EAAW;AAAA,OAClB;AACP,OAAO,UAAU;AACjB,SAAS,uBAAuB;AAEhC,OAAO,WAAW;;;ACNX,IAAM,WAAW,MAAM;AAC5B,MAAI,CAAC,QAAQ,IAAI,SAAU,SAAQ,MAAM,kBAAkB;AAC3D,SAAO,QAAQ,IAAI;AACrB;;;ADOA,IAAM,mBAAmB;AAAA,EACvB,aAAa;AAAA,IACX,OAAO;AAAA,MACL;AAAA,MACA;AAAA,MACA;AAAA,MACA;AAAA,MACA;AAAA,MACA;AAAA,MACA;AAAA,MACA;AAAA,MACA;AAAA,MACA;AAAA,MACA;AAAA,MACA;AAAA,MACA;AAAA,MACA;AAAA,MACA;AAAA,MACA;AAAA,MACA;AAAA,MACA;AAAA,MACA;AAAA,MACA;AAAA,MACA;AAAA,MACA;AAAA,IACF;AAAA,IACA,MAAM;AAAA,MACJ;AAAA,MACA;AAAA,MACA;AAAA,IACF;AAAA,EACF;AACF;AAEA,SAAS,gBAAgB,UAAoC;AAC3D,QAAM,KAAK,gBAAgB,EAAE,OAAO,QAAQ,OAAO,QAAQ,QAAQ,OAAO,CAAC;AAC3E,SAAO,IAAI,QAAQ,CAAC,YAAY;AAC9B,OAAG,SAAS,UAAU,CAAC,WAAW;AAChC,SAAG,MAAM;AACT,cAAQ,OAAO,YAAY,MAAM,OAAO,OAAO,YAAY,MAAM,KAAK;AAAA,IACxE,CAAC;AAAA,EACH,CAAC;AACH;AAEA,eAAsB,iBAAkC;AACtD,QAAM,MAAM,SAAS,KAAK,QAAQ,IAAI;AACtC,QAAM,YAAY,KAAK,QAAQ,KAAK,SAAS;AAC7C,QAAM,eAAe,KAAK,QAAQ,WAAW,qBAAqB;AAElE,YAAU,WAAW,EAAE,WAAW,KAAK,CAAC;AAExC,MAAI,WAAW,YAAY,GAAG;AAC5B,UAAM,YAAY,MAAM;AAAA,MACtB,MAAM,OAAO,GAAG,YAAY,qCAAqC;AAAA,IACnE;AACA,QAAI,CAAC,WAAW;AACd,cAAQ,IAAI,MAAM,KAAK,uDAAkD,CAAC;AAC1E,aAAO;AAAA,IACT;AAAA,EACF;AAEA,gBAAc,cAAc,GAAG,KAAK,UAAU,kBAAkB,MAAM,CAAC,CAAC;AAAA,GAAM,MAAM;AACpF,UAAQ,IAAI,MAAM,MAAM,uCAAuC,CAAC;AAChE,SAAO;AACT;","names":[]}
|
|
1
|
+
{"version":3,"sources":["../../src/actions/claude-settings.ts","../../src/lib/yarn/yarnInitCwd.ts"],"sourcesContent":["import {\n existsSync, mkdirSync, writeFileSync,\n} from 'node:fs'\nimport PATH from 'node:path'\nimport { createInterface } from 'node:readline'\n\nimport chalk from 'chalk'\n\nimport { INIT_CWD } from '../lib/yarn/index.ts'\n\nconst DEFAULT_SETTINGS = {\n permissions: {\n allow: [\n 'Bash(git *)',\n 'Bash(yarn *)',\n 'Bash(npx *)',\n 'Bash(node *)',\n 'Bash(ls *)',\n 'Bash(mkdir *)',\n 'Bash(cp *)',\n 'Bash(mv *)',\n 'Bash(rm *)',\n 'Bash(cat *)',\n 'Bash(head *)',\n 'Bash(tail *)',\n 'Bash(echo *)',\n 'Bash(pwd)',\n 'Bash(which *)',\n 'Bash(gh *)',\n 'Read',\n 'Edit',\n 'Write',\n 'Glob',\n 'Grep',\n 'Skill',\n ],\n deny: [\n 'Bash(git push --force *)',\n 'Bash(git reset --hard *)',\n 'Bash(rm -rf /*)',\n ],\n },\n}\n\nfunction askConfirmation(question: string): Promise<boolean> {\n const rl = createInterface({ input: process.stdin, output: process.stdout })\n return new Promise((resolve) => {\n rl.question(question, (answer) => {\n rl.close()\n resolve(answer.toLowerCase() === 'y' || answer.toLowerCase() === 'yes')\n })\n })\n}\n\nexport async function claudeSettings(): Promise<number> {\n const cwd = INIT_CWD() ?? process.cwd()\n const claudeDir = PATH.resolve(cwd, '.claude')\n const settingsPath = PATH.resolve(claudeDir, 'settings.local.json')\n\n mkdirSync(claudeDir, { recursive: true })\n\n if (existsSync(settingsPath)) {\n const confirmed = await askConfirmation(\n chalk.yellow(`${settingsPath} already exists. Replace it? (y/N) `),\n )\n if (!confirmed) {\n console.log(chalk.gray('Skipped — existing settings.local.json preserved'))\n return 0\n }\n }\n\n writeFileSync(settingsPath, `${JSON.stringify(DEFAULT_SETTINGS, null, 2)}\\n`, 'utf8')\n console.log(chalk.green('Generated .claude/settings.local.json'))\n return 0\n}\n","export const INIT_CWD = () => {\n if (!process.env.INIT_CWD) console.error('Missing INIT_CWD')\n return process.env.INIT_CWD\n}\n"],"mappings":";AAAA;AAAA,EACE;AAAA,EAAY;AAAA,EAAW;AAAA,OAClB;AACP,OAAO,UAAU;AACjB,SAAS,uBAAuB;AAEhC,OAAO,WAAW;;;ACNX,IAAM,WAAW,MAAM;AAC5B,MAAI,CAAC,QAAQ,IAAI,SAAU,SAAQ,MAAM,kBAAkB;AAC3D,SAAO,QAAQ,IAAI;AACrB;;;ADOA,IAAM,mBAAmB;AAAA,EACvB,aAAa;AAAA,IACX,OAAO;AAAA,MACL;AAAA,MACA;AAAA,MACA;AAAA,MACA;AAAA,MACA;AAAA,MACA;AAAA,MACA;AAAA,MACA;AAAA,MACA;AAAA,MACA;AAAA,MACA;AAAA,MACA;AAAA,MACA;AAAA,MACA;AAAA,MACA;AAAA,MACA;AAAA,MACA;AAAA,MACA;AAAA,MACA;AAAA,MACA;AAAA,MACA;AAAA,MACA;AAAA,IACF;AAAA,IACA,MAAM;AAAA,MACJ;AAAA,MACA;AAAA,MACA;AAAA,IACF;AAAA,EACF;AACF;AAEA,SAAS,gBAAgB,UAAoC;AAC3D,QAAM,KAAK,gBAAgB,EAAE,OAAO,QAAQ,OAAO,QAAQ,QAAQ,OAAO,CAAC;AAC3E,SAAO,IAAI,QAAQ,CAAC,YAAY;AAC9B,OAAG,SAAS,UAAU,CAAC,WAAW;AAChC,SAAG,MAAM;AACT,cAAQ,OAAO,YAAY,MAAM,OAAO,OAAO,YAAY,MAAM,KAAK;AAAA,IACxE,CAAC;AAAA,EACH,CAAC;AACH;AAEA,eAAsB,iBAAkC;AACtD,QAAM,MAAM,SAAS,KAAK,QAAQ,IAAI;AACtC,QAAM,YAAY,KAAK,QAAQ,KAAK,SAAS;AAC7C,QAAM,eAAe,KAAK,QAAQ,WAAW,qBAAqB;AAElE,YAAU,WAAW,EAAE,WAAW,KAAK,CAAC;AAExC,MAAI,WAAW,YAAY,GAAG;AAC5B,UAAM,YAAY,MAAM;AAAA,MACtB,MAAM,OAAO,GAAG,YAAY,qCAAqC;AAAA,IACnE;AACA,QAAI,CAAC,WAAW;AACd,cAAQ,IAAI,MAAM,KAAK,uDAAkD,CAAC;AAC1E,aAAO;AAAA,IACT;AAAA,EACF;AAEA,gBAAc,cAAc,GAAG,KAAK,UAAU,kBAAkB,MAAM,CAAC,CAAC;AAAA,GAAM,MAAM;AACpF,UAAQ,IAAI,MAAM,MAAM,uCAAuC,CAAC;AAChE,SAAO;AACT;","names":[]}
|
package/dist/actions/index.mjs
CHANGED
|
@@ -988,8 +988,8 @@ var DEFAULT_SETTINGS = {
|
|
|
988
988
|
"Skill"
|
|
989
989
|
],
|
|
990
990
|
deny: [
|
|
991
|
-
"Bash(git push --force*)",
|
|
992
|
-
"Bash(git reset --hard*)",
|
|
991
|
+
"Bash(git push --force *)",
|
|
992
|
+
"Bash(git reset --hard *)",
|
|
993
993
|
"Bash(rm -rf /*)"
|
|
994
994
|
]
|
|
995
995
|
}
|
|
@@ -3195,6 +3195,161 @@ var packageRecompile = async () => {
|
|
|
3195
3195
|
return await packageClean() || await packageCompile();
|
|
3196
3196
|
};
|
|
3197
3197
|
|
|
3198
|
+
// src/actions/package-lint.ts
|
|
3199
|
+
import { readFileSync as readFileSync13, writeFileSync as writeFileSync6 } from "fs";
|
|
3200
|
+
import PATH9 from "path";
|
|
3201
|
+
import chalk41 from "chalk";
|
|
3202
|
+
import picomatch2 from "picomatch";
|
|
3203
|
+
function emptyResult() {
|
|
3204
|
+
return {
|
|
3205
|
+
errors: [],
|
|
3206
|
+
fixable: [],
|
|
3207
|
+
warnings: []
|
|
3208
|
+
};
|
|
3209
|
+
}
|
|
3210
|
+
function readRootPackageJson(cwd5) {
|
|
3211
|
+
const raw = readFileSync13(PATH9.resolve(cwd5, "package.json"), "utf8");
|
|
3212
|
+
return JSON.parse(raw);
|
|
3213
|
+
}
|
|
3214
|
+
function writeRootPackageJson(cwd5, pkg) {
|
|
3215
|
+
const path14 = PATH9.resolve(cwd5, "package.json");
|
|
3216
|
+
writeFileSync6(path14, `${JSON.stringify(pkg, null, 2)}
|
|
3217
|
+
`, "utf8");
|
|
3218
|
+
}
|
|
3219
|
+
function isMonorepo(pkg) {
|
|
3220
|
+
const workspaces = pkg.workspaces;
|
|
3221
|
+
return Array.isArray(workspaces) && workspaces.length > 0;
|
|
3222
|
+
}
|
|
3223
|
+
function checkPackagesFolder(workspaces) {
|
|
3224
|
+
const result = emptyResult();
|
|
3225
|
+
for (const { location, name } of workspaces) {
|
|
3226
|
+
if (location === ".") continue;
|
|
3227
|
+
if (!location.startsWith("packages/") && !location.startsWith("packages\\")) {
|
|
3228
|
+
result.errors.push(`${name} (${location}) is not inside a packages/ folder`);
|
|
3229
|
+
}
|
|
3230
|
+
}
|
|
3231
|
+
return result;
|
|
3232
|
+
}
|
|
3233
|
+
function checkRootPrivate(pkg) {
|
|
3234
|
+
const result = emptyResult();
|
|
3235
|
+
if (!pkg.private) {
|
|
3236
|
+
result.fixable.push("Root package.json must be private to prevent accidental publishing");
|
|
3237
|
+
}
|
|
3238
|
+
return result;
|
|
3239
|
+
}
|
|
3240
|
+
function fixRootPrivate(cwd5, pkg) {
|
|
3241
|
+
pkg.private = true;
|
|
3242
|
+
writeRootPackageJson(cwd5, pkg);
|
|
3243
|
+
console.log(chalk41.green(' \u2714 Fixed: set "private": true in root package.json'));
|
|
3244
|
+
}
|
|
3245
|
+
function checkNoPublishConfigOnPrivate(pkg) {
|
|
3246
|
+
const result = emptyResult();
|
|
3247
|
+
if (pkg.private && pkg.publishConfig) {
|
|
3248
|
+
result.fixable.push("Root package.json has publishConfig but is private \u2014 publishConfig is unnecessary");
|
|
3249
|
+
}
|
|
3250
|
+
return result;
|
|
3251
|
+
}
|
|
3252
|
+
function fixNoPublishConfigOnPrivate(cwd5, pkg) {
|
|
3253
|
+
delete pkg.publishConfig;
|
|
3254
|
+
writeRootPackageJson(cwd5, pkg);
|
|
3255
|
+
console.log(chalk41.green(" \u2714 Fixed: removed publishConfig from private root package.json"));
|
|
3256
|
+
}
|
|
3257
|
+
function checkDiscoverable(pkg, workspaces) {
|
|
3258
|
+
const result = emptyResult();
|
|
3259
|
+
const globs = pkg.workspaces;
|
|
3260
|
+
const matchers = globs.map((glob3) => picomatch2(glob3));
|
|
3261
|
+
const isMatch = (location) => matchers.some((m) => m(location));
|
|
3262
|
+
for (const { location, name } of workspaces) {
|
|
3263
|
+
if (location === ".") continue;
|
|
3264
|
+
if (!isMatch(location)) {
|
|
3265
|
+
result.errors.push(`${name} (${location}) is not matched by any workspace glob in package.json`);
|
|
3266
|
+
}
|
|
3267
|
+
}
|
|
3268
|
+
return result;
|
|
3269
|
+
}
|
|
3270
|
+
function logResults(label, result, fix2) {
|
|
3271
|
+
let errors = 0;
|
|
3272
|
+
let fixed = 0;
|
|
3273
|
+
for (const error of result.errors) {
|
|
3274
|
+
console.log(chalk41.red(` \u2717 ${error}`));
|
|
3275
|
+
errors++;
|
|
3276
|
+
}
|
|
3277
|
+
for (const fixable of result.fixable) {
|
|
3278
|
+
if (fix2) {
|
|
3279
|
+
fixed++;
|
|
3280
|
+
} else {
|
|
3281
|
+
console.log(chalk41.red(` \u2717 ${fixable} (fixable)`));
|
|
3282
|
+
errors++;
|
|
3283
|
+
}
|
|
3284
|
+
}
|
|
3285
|
+
for (const warning of result.warnings) {
|
|
3286
|
+
console.log(chalk41.yellow(` \u26A0 ${warning}`));
|
|
3287
|
+
}
|
|
3288
|
+
if (errors === 0 && fixed === 0 && result.warnings.length === 0) {
|
|
3289
|
+
console.log(chalk41.green(` \u2713 ${label}`));
|
|
3290
|
+
}
|
|
3291
|
+
return { errors, fixed };
|
|
3292
|
+
}
|
|
3293
|
+
function runChecks(entries, cwd5, pkg, fix2) {
|
|
3294
|
+
let totalErrors = 0;
|
|
3295
|
+
let totalFixed = 0;
|
|
3296
|
+
for (const entry of entries) {
|
|
3297
|
+
const result = entry.check();
|
|
3298
|
+
const log = logResults(entry.label, result, fix2);
|
|
3299
|
+
if (fix2 && entry.fix && result.fixable.length > 0) {
|
|
3300
|
+
entry.fix(cwd5, pkg);
|
|
3301
|
+
}
|
|
3302
|
+
totalErrors += log.errors;
|
|
3303
|
+
totalFixed += log.fixed;
|
|
3304
|
+
}
|
|
3305
|
+
return { errors: totalErrors, fixed: totalFixed };
|
|
3306
|
+
}
|
|
3307
|
+
function logSummary(errors, fixed) {
|
|
3308
|
+
if (fixed > 0) {
|
|
3309
|
+
console.log(chalk41.green(`
|
|
3310
|
+
Fixed ${fixed} issue(s)`));
|
|
3311
|
+
}
|
|
3312
|
+
if (errors > 0) {
|
|
3313
|
+
console.log(chalk41.red(`
|
|
3314
|
+
${errors} error(s) found`));
|
|
3315
|
+
} else if (fixed === 0) {
|
|
3316
|
+
console.log(chalk41.green("\n All checks passed"));
|
|
3317
|
+
}
|
|
3318
|
+
}
|
|
3319
|
+
function packageLintMonorepo(fix2 = false) {
|
|
3320
|
+
const cwd5 = INIT_CWD() ?? process.cwd();
|
|
3321
|
+
let pkg;
|
|
3322
|
+
try {
|
|
3323
|
+
pkg = readRootPackageJson(cwd5);
|
|
3324
|
+
} catch {
|
|
3325
|
+
console.error(chalk41.red("Could not read package.json"));
|
|
3326
|
+
return 1;
|
|
3327
|
+
}
|
|
3328
|
+
if (!isMonorepo(pkg)) {
|
|
3329
|
+
console.log(chalk41.gray("Not a monorepo \u2014 skipping package-lint checks"));
|
|
3330
|
+
return 0;
|
|
3331
|
+
}
|
|
3332
|
+
console.log(chalk41.green("Package Lint"));
|
|
3333
|
+
const workspaces = yarnWorkspaces();
|
|
3334
|
+
const checks = [
|
|
3335
|
+
{
|
|
3336
|
+
check: () => checkRootPrivate(pkg),
|
|
3337
|
+
fix: fixRootPrivate,
|
|
3338
|
+
label: "Root package is private"
|
|
3339
|
+
},
|
|
3340
|
+
{
|
|
3341
|
+
check: () => checkNoPublishConfigOnPrivate(pkg),
|
|
3342
|
+
fix: fixNoPublishConfigOnPrivate,
|
|
3343
|
+
label: "No publishConfig on private root"
|
|
3344
|
+
},
|
|
3345
|
+
{ check: () => checkPackagesFolder(workspaces), label: "All packages are in packages/ folder" },
|
|
3346
|
+
{ check: () => checkDiscoverable(pkg, workspaces), label: "All packages are discoverable from workspace globs" }
|
|
3347
|
+
];
|
|
3348
|
+
const { errors, fixed } = runChecks(checks, cwd5, pkg, fix2);
|
|
3349
|
+
logSummary(errors, fixed);
|
|
3350
|
+
return errors > 0 ? 1 : 0;
|
|
3351
|
+
}
|
|
3352
|
+
|
|
3198
3353
|
// src/actions/publint.ts
|
|
3199
3354
|
var publint = async ({ verbose, pkg }) => {
|
|
3200
3355
|
return pkg === void 0 ? publintAll({ verbose }) : await publintPackage({ pkg, verbose });
|
|
@@ -3248,7 +3403,7 @@ var rebuild = ({ target }) => {
|
|
|
3248
3403
|
};
|
|
3249
3404
|
|
|
3250
3405
|
// src/actions/recompile.ts
|
|
3251
|
-
import
|
|
3406
|
+
import chalk42 from "chalk";
|
|
3252
3407
|
var recompile = async ({
|
|
3253
3408
|
verbose,
|
|
3254
3409
|
target,
|
|
@@ -3284,7 +3439,7 @@ var recompileAll = async ({
|
|
|
3284
3439
|
const incrementalOptions = incremental ? ["--since", "-Apt", "--topological-dev"] : ["--parallel", "-Apt", "--topological-dev"];
|
|
3285
3440
|
const jobsOptions = jobs ? ["-j", `${jobs}`] : [];
|
|
3286
3441
|
if (jobs) {
|
|
3287
|
-
console.log(
|
|
3442
|
+
console.log(chalk42.blue(`Jobs set to [${jobs}]`));
|
|
3288
3443
|
}
|
|
3289
3444
|
const result = await runStepsAsync(`Recompile${incremental ? "-Incremental" : ""} [All]`, [
|
|
3290
3445
|
[
|
|
@@ -3315,7 +3470,7 @@ var recompileAll = async ({
|
|
|
3315
3470
|
]
|
|
3316
3471
|
]);
|
|
3317
3472
|
console.log(
|
|
3318
|
-
`${
|
|
3473
|
+
`${chalk42.gray("Recompiled in")} [${chalk42.magenta(((Date.now() - start) / 1e3).toFixed(2))}] ${chalk42.gray("seconds")}`
|
|
3319
3474
|
);
|
|
3320
3475
|
return result;
|
|
3321
3476
|
};
|
|
@@ -3346,13 +3501,13 @@ var reinstall = () => {
|
|
|
3346
3501
|
};
|
|
3347
3502
|
|
|
3348
3503
|
// src/actions/relint.ts
|
|
3349
|
-
import
|
|
3504
|
+
import chalk43 from "chalk";
|
|
3350
3505
|
var relintPackage = ({
|
|
3351
3506
|
pkg,
|
|
3352
3507
|
fix: fix2,
|
|
3353
3508
|
verbose
|
|
3354
3509
|
}) => {
|
|
3355
|
-
console.log(
|
|
3510
|
+
console.log(chalk43.gray(`${fix2 ? "Fix" : "Lint"} [${pkg}]`));
|
|
3356
3511
|
const start = Date.now();
|
|
3357
3512
|
const result = runSteps(`${fix2 ? "Fix" : "Lint"} [${pkg}]`, [
|
|
3358
3513
|
["yarn", [
|
|
@@ -3362,7 +3517,7 @@ var relintPackage = ({
|
|
|
3362
3517
|
fix2 ? "package-fix" : verbose ? "package-lint-verbose" : "package-lint"
|
|
3363
3518
|
]]
|
|
3364
3519
|
]);
|
|
3365
|
-
console.log(
|
|
3520
|
+
console.log(chalk43.gray(`${fix2 ? "Fixed in" : "Linted in"} [${chalk43.magenta(((Date.now() - start) / 1e3).toFixed(2))}] ${chalk43.gray("seconds")}`));
|
|
3366
3521
|
return result;
|
|
3367
3522
|
};
|
|
3368
3523
|
var relint = ({
|
|
@@ -3382,13 +3537,13 @@ var relint = ({
|
|
|
3382
3537
|
});
|
|
3383
3538
|
};
|
|
3384
3539
|
var relintAllPackages = ({ fix: fix2 = false } = {}) => {
|
|
3385
|
-
console.log(
|
|
3540
|
+
console.log(chalk43.gray(`${fix2 ? "Fix" : "Lint"} [All-Packages]`));
|
|
3386
3541
|
const start = Date.now();
|
|
3387
3542
|
const fixOptions = fix2 ? ["--fix"] : [];
|
|
3388
3543
|
const result = runSteps(`${fix2 ? "Fix" : "Lint"} [All-Packages]`, [
|
|
3389
3544
|
["yarn", ["eslint", ...fixOptions]]
|
|
3390
3545
|
]);
|
|
3391
|
-
console.log(
|
|
3546
|
+
console.log(chalk43.gray(`${fix2 ? "Fixed in" : "Linted in"} [${chalk43.magenta(((Date.now() - start) / 1e3).toFixed(2))}] ${chalk43.gray("seconds")}`));
|
|
3392
3547
|
return result;
|
|
3393
3548
|
};
|
|
3394
3549
|
|
|
@@ -3406,10 +3561,10 @@ var sonar = () => {
|
|
|
3406
3561
|
};
|
|
3407
3562
|
|
|
3408
3563
|
// src/actions/statics.ts
|
|
3409
|
-
import
|
|
3564
|
+
import chalk44 from "chalk";
|
|
3410
3565
|
var DefaultDependencies = ["axios", "@xylabs/pixel", "react", "graphql", "react-router", "@mui/material", "@mui/system"];
|
|
3411
3566
|
var statics = () => {
|
|
3412
|
-
console.log(
|
|
3567
|
+
console.log(chalk44.green("Check Required Static Dependencies"));
|
|
3413
3568
|
const statics2 = parsedPackageJSON()?.xy?.deps?.statics;
|
|
3414
3569
|
return detectDuplicateDependencies(statics2, DefaultDependencies);
|
|
3415
3570
|
};
|
|
@@ -3507,6 +3662,7 @@ export {
|
|
|
3507
3662
|
packageCycle,
|
|
3508
3663
|
packageGenDocs,
|
|
3509
3664
|
packageLint,
|
|
3665
|
+
packageLintMonorepo,
|
|
3510
3666
|
packagePublint,
|
|
3511
3667
|
packageRecompile,
|
|
3512
3668
|
publint,
|