@xylabs/ts-scripts-yarn3 7.4.17 → 7.4.19
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/README.body.md +86 -0
- package/README.md +108 -0
- package/dist/actions/claude-commands.mjs +1 -1
- package/dist/actions/claude-commands.mjs.map +1 -1
- package/dist/actions/claude-rules.mjs +1 -1
- package/dist/actions/claude-rules.mjs.map +1 -1
- package/dist/actions/compile.mjs.map +1 -1
- package/dist/actions/cycle.mjs.map +1 -1
- package/dist/actions/dead.mjs.map +1 -1
- package/dist/actions/deplint/checkPackage/checkPackage.mjs +3 -0
- package/dist/actions/deplint/checkPackage/checkPackage.mjs.map +1 -1
- package/dist/actions/deplint/checkPackage/index.mjs +3 -0
- package/dist/actions/deplint/checkPackage/index.mjs.map +1 -1
- package/dist/actions/deplint/deplint.mjs +3 -0
- package/dist/actions/deplint/deplint.mjs.map +1 -1
- package/dist/actions/deplint/getExternalImportsFromFiles.mjs +3 -0
- package/dist/actions/deplint/getExternalImportsFromFiles.mjs.map +1 -1
- package/dist/actions/deplint/getImportsFromFile.mjs +3 -0
- package/dist/actions/deplint/getImportsFromFile.mjs.map +1 -1
- package/dist/actions/deplint/index.mjs +3 -0
- package/dist/actions/deplint/index.mjs.map +1 -1
- package/dist/actions/deploy-major.mjs.map +1 -1
- package/dist/actions/deploy-minor.mjs.map +1 -1
- package/dist/actions/deploy-next.mjs.map +1 -1
- package/dist/actions/deploy.mjs.map +1 -1
- package/dist/actions/fix.mjs.map +1 -1
- package/dist/actions/gen-docs.mjs.map +1 -1
- package/dist/actions/index.mjs +149 -41
- package/dist/actions/index.mjs.map +1 -1
- package/dist/actions/knip.mjs.map +1 -1
- package/dist/actions/lint.mjs.map +1 -1
- package/dist/actions/publint.mjs.map +1 -1
- package/dist/actions/publish.mjs.map +1 -1
- package/dist/actions/readme-gen.mjs +136 -20
- package/dist/actions/readme-gen.mjs.map +1 -1
- package/dist/actions/readme-init.mjs +83 -0
- package/dist/actions/readme-init.mjs.map +1 -0
- package/dist/actions/rebuild.mjs.map +1 -1
- package/dist/actions/reinstall.mjs.map +1 -1
- package/dist/actions/relint.mjs.map +1 -1
- package/dist/actions/retest.mjs +2 -2
- package/dist/actions/retest.mjs.map +1 -1
- package/dist/actions/sonar.mjs.map +1 -1
- package/dist/actions/test.mjs.map +1 -1
- package/dist/actions/up.mjs.map +1 -1
- package/dist/actions/updo.mjs.map +1 -1
- package/dist/actions/upplug.mjs.map +1 -1
- package/dist/actions/upyarn.mjs.map +1 -1
- package/dist/bin/xy.mjs +820 -576
- package/dist/bin/xy.mjs.map +1 -1
- package/dist/index.d.ts +42 -13
- package/dist/index.mjs +823 -573
- package/dist/index.mjs.map +1 -1
- package/dist/lib/claudeMdTemplate.mjs +1 -1
- package/dist/lib/claudeMdTemplate.mjs.map +1 -1
- package/dist/lib/generateReadmeFiles.mjs +118 -21
- package/dist/lib/generateReadmeFiles.mjs.map +1 -1
- package/dist/lib/index.mjs +120 -23
- package/dist/lib/index.mjs.map +1 -1
- package/dist/lib/runSteps.mjs.map +1 -1
- package/dist/lib/runXy.mjs.map +1 -1
- package/dist/xy/build/buildCommand.mjs +161 -0
- package/dist/xy/build/buildCommand.mjs.map +1 -0
- package/dist/xy/build/compileCommand.mjs +174 -0
- package/dist/xy/build/compileCommand.mjs.map +1 -0
- package/dist/xy/build/compileOnlyCommand.mjs +175 -0
- package/dist/xy/build/compileOnlyCommand.mjs.map +1 -0
- package/dist/xy/build/copyAssetsCommand.mjs +84 -0
- package/dist/xy/build/copyAssetsCommand.mjs.map +1 -0
- package/dist/xy/{xyBuildCommands.mjs → build/index.mjs} +111 -93
- package/dist/xy/build/index.mjs.map +1 -0
- package/dist/xy/build/rebuildCommand.mjs +114 -0
- package/dist/xy/build/rebuildCommand.mjs.map +1 -0
- package/dist/xy/build/recompileCommand.mjs +204 -0
- package/dist/xy/build/recompileCommand.mjs.map +1 -0
- package/dist/xy/common/claude/commandsCommand.mjs +107 -0
- package/dist/xy/common/claude/commandsCommand.mjs.map +1 -0
- package/dist/xy/common/claude/index.mjs +332 -0
- package/dist/xy/common/claude/index.mjs.map +1 -0
- package/dist/xy/common/claude/initCommand.mjs +283 -0
- package/dist/xy/common/claude/initCommand.mjs.map +1 -0
- package/dist/xy/common/claude/rulesCommand.mjs +129 -0
- package/dist/xy/common/claude/rulesCommand.mjs.map +1 -0
- package/dist/xy/common/claude/settingsCommand.mjs +90 -0
- package/dist/xy/common/claude/settingsCommand.mjs.map +1 -0
- package/dist/xy/common/cleanDocsCommand.mjs +45 -0
- package/dist/xy/common/cleanDocsCommand.mjs.map +1 -0
- package/dist/xy/common/deadCommand.mjs +116 -0
- package/dist/xy/common/deadCommand.mjs.map +1 -0
- package/dist/xy/common/genDocsCommand.mjs +125 -0
- package/dist/xy/common/genDocsCommand.mjs.map +1 -0
- package/dist/xy/common/gitignoreGenCommand.mjs +98 -0
- package/dist/xy/common/gitignoreGenCommand.mjs.map +1 -0
- package/dist/xy/common/gitlintCommand.mjs +82 -0
- package/dist/xy/common/gitlintCommand.mjs.map +1 -0
- package/dist/xy/{xyCommonCommands.mjs → common/index.mjs} +451 -241
- package/dist/xy/common/index.mjs.map +1 -0
- package/dist/xy/common/licenseCommand.mjs +100 -0
- package/dist/xy/common/licenseCommand.mjs.map +1 -0
- package/dist/xy/common/npmignoreGenCommand.mjs +98 -0
- package/dist/xy/common/npmignoreGenCommand.mjs.map +1 -0
- package/dist/xy/common/readme/genCommand.mjs +321 -0
- package/dist/xy/common/readme/genCommand.mjs.map +1 -0
- package/dist/xy/common/readme/index.mjs +361 -0
- package/dist/xy/common/readme/index.mjs.map +1 -0
- package/dist/xy/common/readme/initCommand.mjs +103 -0
- package/dist/xy/common/readme/initCommand.mjs.map +1 -0
- package/dist/xy/common/retestCommand.mjs +111 -0
- package/dist/xy/common/retestCommand.mjs.map +1 -0
- package/dist/xy/common/testCommand.mjs +108 -0
- package/dist/xy/common/testCommand.mjs.map +1 -0
- package/dist/xy/common/upplugCommand.mjs +113 -0
- package/dist/xy/common/upplugCommand.mjs.map +1 -0
- package/dist/xy/common/upyarnCommand.mjs +108 -0
- package/dist/xy/common/upyarnCommand.mjs.map +1 -0
- package/dist/xy/common/yarn3OnlyCommand.mjs +70 -0
- package/dist/xy/common/yarn3OnlyCommand.mjs.map +1 -0
- package/dist/xy/deploy/deployCommand.mjs +139 -0
- package/dist/xy/deploy/deployCommand.mjs.map +1 -0
- package/dist/xy/deploy/deployMajorCommand.mjs +139 -0
- package/dist/xy/deploy/deployMajorCommand.mjs.map +1 -0
- package/dist/xy/deploy/deployMinorCommand.mjs +139 -0
- package/dist/xy/deploy/deployMinorCommand.mjs.map +1 -0
- package/dist/xy/deploy/deployNextCommand.mjs +139 -0
- package/dist/xy/deploy/deployNextCommand.mjs.map +1 -0
- package/dist/xy/{xyDeployCommands.mjs → deploy/index.mjs} +53 -53
- package/dist/xy/deploy/index.mjs.map +1 -0
- package/dist/xy/deploy/publishCommand.mjs +108 -0
- package/dist/xy/deploy/publishCommand.mjs.map +1 -0
- package/dist/xy/index.mjs +820 -576
- package/dist/xy/index.mjs.map +1 -1
- package/dist/xy/install/cleanCommand.mjs +140 -0
- package/dist/xy/install/cleanCommand.mjs.map +1 -0
- package/dist/xy/install/dupdepsCommand.mjs +191 -0
- package/dist/xy/install/dupdepsCommand.mjs.map +1 -0
- package/dist/xy/{xyInstallCommands.mjs → install/index.mjs} +71 -68
- package/dist/xy/install/index.mjs.map +1 -0
- package/dist/xy/install/reinstallCommand.mjs +140 -0
- package/dist/xy/install/reinstallCommand.mjs.map +1 -0
- package/dist/xy/install/staticsCommand.mjs +191 -0
- package/dist/xy/install/staticsCommand.mjs.map +1 -0
- package/dist/{actions/clean-jest.mjs → xy/install/upCommand.mjs} +15 -6
- package/dist/xy/install/upCommand.mjs.map +1 -0
- package/dist/xy/install/updoCommand.mjs +112 -0
- package/dist/xy/install/updoCommand.mjs.map +1 -0
- package/dist/xy/lint/cycleCommand.mjs +163 -0
- package/dist/xy/lint/cycleCommand.mjs.map +1 -0
- package/dist/xy/lint/deplintCommand.mjs +814 -0
- package/dist/xy/lint/deplintCommand.mjs.map +1 -0
- package/dist/xy/lint/fixCommand.mjs +168 -0
- package/dist/xy/lint/fixCommand.mjs.map +1 -0
- package/dist/xy/{xyLintCommands.mjs → lint/index.mjs} +179 -145
- package/dist/xy/lint/index.mjs.map +1 -0
- package/dist/xy/lint/knipCommand.mjs +121 -0
- package/dist/xy/lint/knipCommand.mjs.map +1 -0
- package/dist/xy/lint/lintCommand.mjs +186 -0
- package/dist/xy/lint/lintCommand.mjs.map +1 -0
- package/dist/xy/lint/publintCommand.mjs +187 -0
- package/dist/xy/lint/publintCommand.mjs.map +1 -0
- package/dist/xy/lint/relintCommand.mjs +163 -0
- package/dist/xy/lint/relintCommand.mjs.map +1 -0
- package/dist/xy/lint/sonarCommand.mjs +121 -0
- package/dist/xy/lint/sonarCommand.mjs.map +1 -0
- package/dist/xy/xy.mjs +818 -574
- package/dist/xy/xy.mjs.map +1 -1
- package/package.json +2 -2
- package/templates/readme/README.body.md +11 -0
- package/templates/readme/README.template.md +22 -0
- package/dist/actions/clean-jest.mjs.map +0 -1
- package/dist/xy/xyBuildCommands.mjs.map +0 -1
- package/dist/xy/xyCommonCommands.mjs.map +0 -1
- package/dist/xy/xyDeployCommands.mjs.map +0 -1
- package/dist/xy/xyInstallCommands.mjs.map +0 -1
- package/dist/xy/xyLintCommands.mjs.map +0 -1
- /package/templates/{CLAUDE-project.md → claude/CLAUDE-project.md} +0 -0
- /package/templates/{commands → claude/commands}/xylabs-build.md +0 -0
- /package/templates/{commands → claude/commands}/xylabs-clean.md +0 -0
- /package/templates/{commands → claude/commands}/xylabs-compile.md +0 -0
- /package/templates/{commands → claude/commands}/xylabs-cycle.md +0 -0
- /package/templates/{commands → claude/commands}/xylabs-deplint.md +0 -0
- /package/templates/{commands → claude/commands}/xylabs-deploy-major.md +0 -0
- /package/templates/{commands → claude/commands}/xylabs-deploy-minor.md +0 -0
- /package/templates/{commands → claude/commands}/xylabs-deploy.md +0 -0
- /package/templates/{commands → claude/commands}/xylabs-fix.md +0 -0
- /package/templates/{commands → claude/commands}/xylabs-knip.md +0 -0
- /package/templates/{commands → claude/commands}/xylabs-lint.md +0 -0
- /package/templates/{commands → claude/commands}/xylabs-publint.md +0 -0
- /package/templates/{commands → claude/commands}/xylabs-rebuild.md +0 -0
- /package/templates/{commands → claude/commands}/xylabs-test.md +0 -0
- /package/templates/{rules → claude/rules}/xylabs-architecture.md +0 -0
- /package/templates/{rules → claude/rules}/xylabs-build.md +0 -0
- /package/templates/{rules → claude/rules}/xylabs-dependencies.md +0 -0
- /package/templates/{rules → claude/rules}/xylabs-error-handling.md +0 -0
- /package/templates/{rules → claude/rules}/xylabs-frameworks.md +0 -0
- /package/templates/{rules → claude/rules}/xylabs-git-workflow.md +0 -0
- /package/templates/{rules → claude/rules}/xylabs-linting.md +0 -0
- /package/templates/{rules → claude/rules}/xylabs-naming.md +0 -0
- /package/templates/{rules → claude/rules}/xylabs-style.md +0 -0
- /package/templates/{rules → claude/rules}/xylabs-typescript.md +0 -0
package/dist/bin/xy.mjs
CHANGED
|
@@ -1,8 +1,5 @@
|
|
|
1
1
|
#!/usr/bin/env node
|
|
2
2
|
|
|
3
|
-
// src/xy/xy.ts
|
|
4
|
-
import chalk31 from "chalk";
|
|
5
|
-
|
|
6
3
|
// src/actions/build.ts
|
|
7
4
|
import chalk9 from "chalk";
|
|
8
5
|
|
|
@@ -25,7 +22,7 @@ import { createRequire } from "module";
|
|
|
25
22
|
import PATH from "path";
|
|
26
23
|
var require2 = createRequire(import.meta.url);
|
|
27
24
|
var packageRoot = PATH.dirname(require2.resolve("@xylabs/ts-scripts-yarn3/package.json"));
|
|
28
|
-
var templatesDir = PATH.resolve(packageRoot, "templates");
|
|
25
|
+
var templatesDir = PATH.resolve(packageRoot, "templates", "claude");
|
|
29
26
|
var XYLABS_RULES_PREFIX = "xylabs-";
|
|
30
27
|
var XYLABS_COMMANDS_PREFIX = "xylabs-";
|
|
31
28
|
var claudeMdRuleTemplates = () => {
|
|
@@ -328,10 +325,19 @@ var generateIgnoreFiles = (filename3, pkg) => {
|
|
|
328
325
|
|
|
329
326
|
// src/lib/generateReadmeFiles.ts
|
|
330
327
|
import { execSync as execSync2 } from "child_process";
|
|
331
|
-
import FS from "fs";
|
|
332
|
-
import {
|
|
328
|
+
import FS, { readFileSync as readFileSync3 } from "fs";
|
|
329
|
+
import {
|
|
330
|
+
mkdir,
|
|
331
|
+
readFile,
|
|
332
|
+
writeFile
|
|
333
|
+
} from "fs/promises";
|
|
334
|
+
import { createRequire as createRequire2 } from "module";
|
|
333
335
|
import PATH2 from "path";
|
|
336
|
+
import { createInterface } from "readline";
|
|
334
337
|
import chalk5 from "chalk";
|
|
338
|
+
var require3 = createRequire2(import.meta.url);
|
|
339
|
+
var packageRoot2 = PATH2.dirname(require3.resolve("@xylabs/ts-scripts-yarn3/package.json"));
|
|
340
|
+
var readmeTemplatesDir = PATH2.resolve(packageRoot2, "templates", "readme");
|
|
335
341
|
function fillTemplate(template, data) {
|
|
336
342
|
const additionalData = { ...data, safeName: data.name.replaceAll("/", "__").replaceAll("@", "") };
|
|
337
343
|
return template.replaceAll(/\{\{(.*?)\}\}/g, (_, key) => additionalData[key.trim()] ?? "");
|
|
@@ -421,37 +427,120 @@ ${indent}### ${item.name}
|
|
|
421
427
|
}
|
|
422
428
|
return content;
|
|
423
429
|
}
|
|
430
|
+
function askConfirmation(question) {
|
|
431
|
+
const rl = createInterface({ input: process.stdin, output: process.stdout });
|
|
432
|
+
return new Promise((resolve) => {
|
|
433
|
+
rl.question(question, (answer) => {
|
|
434
|
+
rl.close();
|
|
435
|
+
resolve(answer.toLowerCase() === "y" || answer.toLowerCase() === "yes");
|
|
436
|
+
});
|
|
437
|
+
});
|
|
438
|
+
}
|
|
439
|
+
var DEFAULT_README_TEMPLATE = readFileSync3(PATH2.resolve(readmeTemplatesDir, "README.template.md"), "utf8");
|
|
440
|
+
var DEFAULT_README_BODY = readFileSync3(PATH2.resolve(readmeTemplatesDir, "README.body.md"), "utf8");
|
|
441
|
+
function applyLogoConfig(template, logoUrl, logoLinkUrl) {
|
|
442
|
+
let result = template;
|
|
443
|
+
if (logoUrl) {
|
|
444
|
+
result = result.replace(/\[logo]: .+/, `[logo]: ${logoUrl}`);
|
|
445
|
+
if (logoLinkUrl) {
|
|
446
|
+
result = result.replace(/\[!\[logo]\[]][^)]*\)/, `[![logo][]](${logoLinkUrl})`);
|
|
447
|
+
}
|
|
448
|
+
} else {
|
|
449
|
+
result = result.replace(/\[!\[logo]\[]][^\n]*\n*/, "");
|
|
450
|
+
result = result.replace(/\[logo]: [^\n]*\n?/, "");
|
|
451
|
+
}
|
|
452
|
+
return result;
|
|
453
|
+
}
|
|
454
|
+
function resolveTemplatePath(templatePath) {
|
|
455
|
+
const cwd = INIT_CWD() ?? ".";
|
|
456
|
+
return templatePath ?? PATH2.join(cwd, ".xy", "README.template.md");
|
|
457
|
+
}
|
|
458
|
+
async function loadOrCreateTemplate(resolvedTemplatePath) {
|
|
459
|
+
try {
|
|
460
|
+
const template = await readFile(resolvedTemplatePath, "utf8");
|
|
461
|
+
return { created: false, template };
|
|
462
|
+
} catch {
|
|
463
|
+
console.log(chalk5.yellow(`Template not found: ${resolvedTemplatePath}`));
|
|
464
|
+
const shouldCreate = await askConfirmation("Would you like to create a stock template? (y/N) ");
|
|
465
|
+
if (!shouldCreate) {
|
|
466
|
+
throw new Error("Template creation declined");
|
|
467
|
+
}
|
|
468
|
+
const template = DEFAULT_README_TEMPLATE;
|
|
469
|
+
await scaffoldTemplate(resolvedTemplatePath, template);
|
|
470
|
+
return { created: true, template };
|
|
471
|
+
}
|
|
472
|
+
}
|
|
473
|
+
async function scaffoldTemplate(resolvedTemplatePath, template) {
|
|
474
|
+
const xyDir = PATH2.dirname(resolvedTemplatePath);
|
|
475
|
+
await mkdir(xyDir, { recursive: true });
|
|
476
|
+
await writeFile(resolvedTemplatePath, template);
|
|
477
|
+
console.log(chalk5.green(`Created template: ${resolvedTemplatePath}`));
|
|
478
|
+
const bodyPath = PATH2.join(xyDir, "README.body.md");
|
|
479
|
+
await writeFile(bodyPath, DEFAULT_README_BODY);
|
|
480
|
+
console.log(chalk5.green(`Created body template: ${bodyPath}`));
|
|
481
|
+
}
|
|
482
|
+
async function resolveBody(location, defaultBody) {
|
|
483
|
+
const localBodyPath = PATH2.join(location, "README.body.md");
|
|
484
|
+
try {
|
|
485
|
+
return await readFile(localBodyPath, "utf8");
|
|
486
|
+
} catch {
|
|
487
|
+
return defaultBody;
|
|
488
|
+
}
|
|
489
|
+
}
|
|
490
|
+
async function generateReadmeForWorkspace(location, name, template, defaultBody, typedoc, verbose) {
|
|
491
|
+
try {
|
|
492
|
+
const pkgJsonPath = PATH2.join(location, "package.json");
|
|
493
|
+
const pkgJson = JSON.parse(await readFile(pkgJsonPath, "utf8"));
|
|
494
|
+
const body = await resolveBody(location, defaultBody);
|
|
495
|
+
const typedocContent = typedoc ? generateTypedoc(location, ["src/index*.ts"]) : "";
|
|
496
|
+
const readmeContent = fillTemplate(template, {
|
|
497
|
+
...pkgJson,
|
|
498
|
+
body,
|
|
499
|
+
typedoc: typedocContent
|
|
500
|
+
});
|
|
501
|
+
await writeFile(PATH2.join(location, "README.md"), readmeContent);
|
|
502
|
+
if (verbose) console.log(chalk5.green(` ${name}`));
|
|
503
|
+
return true;
|
|
504
|
+
} catch (ex) {
|
|
505
|
+
const error = ex;
|
|
506
|
+
console.warn(chalk5.yellow(` Skipped ${location}: ${error.message}`));
|
|
507
|
+
return false;
|
|
508
|
+
}
|
|
509
|
+
}
|
|
424
510
|
async function generateReadmeFiles({
|
|
511
|
+
logoLinkUrl,
|
|
512
|
+
logoUrl,
|
|
425
513
|
pkg,
|
|
426
514
|
templatePath,
|
|
427
515
|
typedoc = false,
|
|
428
|
-
verbose
|
|
516
|
+
verbose = false
|
|
429
517
|
}) {
|
|
430
518
|
console.log(chalk5.green("Generate README Files"));
|
|
431
|
-
const
|
|
432
|
-
const resolvedTemplatePath = templatePath ?? PATH2.join(cwd, "scripts", "README.template.md");
|
|
519
|
+
const resolvedTemplatePath = resolveTemplatePath(templatePath);
|
|
433
520
|
let template;
|
|
521
|
+
let templateCreated;
|
|
434
522
|
try {
|
|
435
|
-
template = await
|
|
523
|
+
({ template, created: templateCreated } = await loadOrCreateTemplate(resolvedTemplatePath));
|
|
436
524
|
} catch {
|
|
437
|
-
console.error(chalk5.red(`Template not found: ${resolvedTemplatePath}`));
|
|
438
525
|
return 1;
|
|
439
526
|
}
|
|
440
|
-
|
|
527
|
+
template = applyLogoConfig(template, logoUrl, logoLinkUrl);
|
|
528
|
+
if (templateCreated) {
|
|
529
|
+
console.log(chalk5.green("Generating README files for all packages..."));
|
|
530
|
+
}
|
|
531
|
+
const xyDir = PATH2.dirname(resolvedTemplatePath);
|
|
532
|
+
const xyBodyPath = PATH2.join(xyDir, "README.body.md");
|
|
533
|
+
let defaultBody;
|
|
534
|
+
try {
|
|
535
|
+
defaultBody = await readFile(xyBodyPath, "utf8");
|
|
536
|
+
} catch {
|
|
537
|
+
defaultBody = DEFAULT_README_BODY;
|
|
538
|
+
}
|
|
539
|
+
const workspaces = pkg && !templateCreated ? [yarnWorkspace(pkg)] : yarnWorkspaces();
|
|
441
540
|
let failed = false;
|
|
442
541
|
for (const { location, name } of workspaces) {
|
|
443
|
-
|
|
444
|
-
|
|
445
|
-
const pkgJson = JSON.parse(await readFile(pkgJsonPath, "utf8"));
|
|
446
|
-
const typedocContent = typedoc ? generateTypedoc(location, ["src/index*.ts"]) : "";
|
|
447
|
-
const readmeContent = fillTemplate(template, { ...pkgJson, typedoc: typedocContent });
|
|
448
|
-
await writeFile(PATH2.join(location, "README.md"), readmeContent);
|
|
449
|
-
if (verbose) console.log(chalk5.green(` ${name}`));
|
|
450
|
-
} catch (ex) {
|
|
451
|
-
const error = ex;
|
|
452
|
-
console.warn(chalk5.yellow(` Skipped ${location}: ${error.message}`));
|
|
453
|
-
failed = true;
|
|
454
|
-
}
|
|
542
|
+
const success = await generateReadmeForWorkspace(location, name, template, defaultBody, typedoc, verbose);
|
|
543
|
+
if (!success) failed = true;
|
|
455
544
|
}
|
|
456
545
|
return failed ? 1 : 0;
|
|
457
546
|
}
|
|
@@ -478,10 +567,10 @@ var loadConfig = async (params) => {
|
|
|
478
567
|
};
|
|
479
568
|
|
|
480
569
|
// src/lib/parsedPackageJSON.ts
|
|
481
|
-
import { readFileSync as
|
|
570
|
+
import { readFileSync as readFileSync4 } from "fs";
|
|
482
571
|
var parsedPackageJSON = (path8) => {
|
|
483
572
|
const pathToPackageJSON = path8 ?? process.env.npm_package_json ?? "";
|
|
484
|
-
const packageJSON =
|
|
573
|
+
const packageJSON = readFileSync4(pathToPackageJSON).toString();
|
|
485
574
|
return JSON.parse(packageJSON);
|
|
486
575
|
};
|
|
487
576
|
|
|
@@ -596,7 +685,7 @@ import {
|
|
|
596
685
|
existsSync as existsSync4,
|
|
597
686
|
mkdirSync,
|
|
598
687
|
readdirSync as readdirSync2,
|
|
599
|
-
readFileSync as
|
|
688
|
+
readFileSync as readFileSync5,
|
|
600
689
|
unlinkSync,
|
|
601
690
|
writeFileSync as writeFileSync2
|
|
602
691
|
} from "fs";
|
|
@@ -609,7 +698,7 @@ var syncCommandFiles = (commandsDir) => {
|
|
|
609
698
|
let created = 0;
|
|
610
699
|
for (const [filename3, content] of Object.entries(templates)) {
|
|
611
700
|
const targetPath = PATH3.resolve(commandsDir, filename3);
|
|
612
|
-
const existing = existsSync4(targetPath) ?
|
|
701
|
+
const existing = existsSync4(targetPath) ? readFileSync5(targetPath, "utf8") : void 0;
|
|
613
702
|
if (existing === content) continue;
|
|
614
703
|
writeFileSync2(targetPath, content, "utf8");
|
|
615
704
|
if (existing) {
|
|
@@ -666,7 +755,7 @@ import {
|
|
|
666
755
|
existsSync as existsSync5,
|
|
667
756
|
mkdirSync as mkdirSync2,
|
|
668
757
|
readdirSync as readdirSync3,
|
|
669
|
-
readFileSync as
|
|
758
|
+
readFileSync as readFileSync6,
|
|
670
759
|
unlinkSync as unlinkSync2,
|
|
671
760
|
writeFileSync as writeFileSync3
|
|
672
761
|
} from "fs";
|
|
@@ -679,7 +768,7 @@ var syncRuleFiles = (rulesDir) => {
|
|
|
679
768
|
let created = 0;
|
|
680
769
|
for (const [filename3, content] of Object.entries(templates)) {
|
|
681
770
|
const targetPath = PATH4.resolve(rulesDir, filename3);
|
|
682
|
-
const existing = existsSync5(targetPath) ?
|
|
771
|
+
const existing = existsSync5(targetPath) ? readFileSync6(targetPath, "utf8") : void 0;
|
|
683
772
|
if (existing === content) continue;
|
|
684
773
|
writeFileSync3(targetPath, content, "utf8");
|
|
685
774
|
if (existing) {
|
|
@@ -751,7 +840,7 @@ import {
|
|
|
751
840
|
writeFileSync as writeFileSync4
|
|
752
841
|
} from "fs";
|
|
753
842
|
import PATH5 from "path";
|
|
754
|
-
import { createInterface } from "readline";
|
|
843
|
+
import { createInterface as createInterface2 } from "readline";
|
|
755
844
|
import chalk12 from "chalk";
|
|
756
845
|
var DEFAULT_SETTINGS = {
|
|
757
846
|
permissions: {
|
|
@@ -786,8 +875,8 @@ var DEFAULT_SETTINGS = {
|
|
|
786
875
|
]
|
|
787
876
|
}
|
|
788
877
|
};
|
|
789
|
-
function
|
|
790
|
-
const rl =
|
|
878
|
+
function askConfirmation2(question) {
|
|
879
|
+
const rl = createInterface2({ input: process.stdin, output: process.stdout });
|
|
791
880
|
return new Promise((resolve) => {
|
|
792
881
|
rl.question(question, (answer) => {
|
|
793
882
|
rl.close();
|
|
@@ -801,7 +890,7 @@ async function claudeSettings() {
|
|
|
801
890
|
const settingsPath = PATH5.resolve(claudeDir, "settings.local.json");
|
|
802
891
|
mkdirSync3(claudeDir, { recursive: true });
|
|
803
892
|
if (existsSync6(settingsPath)) {
|
|
804
|
-
const confirmed = await
|
|
893
|
+
const confirmed = await askConfirmation2(
|
|
805
894
|
chalk12.yellow(`${settingsPath} already exists. Replace it? (y/N) `)
|
|
806
895
|
);
|
|
807
896
|
if (!confirmed) {
|
|
@@ -1153,6 +1242,9 @@ function getImportsFromFile(filePath, importPaths, typeImportPaths) {
|
|
|
1153
1242
|
ts.forEachChild(node, visit);
|
|
1154
1243
|
}
|
|
1155
1244
|
visit(sourceFile);
|
|
1245
|
+
for (const ref of sourceFile.typeReferenceDirectives) {
|
|
1246
|
+
typeImports.push(ref.fileName);
|
|
1247
|
+
}
|
|
1156
1248
|
const importsStartsWithExcludes = [".", "#", "node:"];
|
|
1157
1249
|
const isValidImport = (imp) => !importsStartsWithExcludes.some((exc) => imp.startsWith(exc)) && !imp.includes("*") && !imp.includes("!");
|
|
1158
1250
|
const cleanedImports = imports.filter(isValidImport).map(getBasePackageName);
|
|
@@ -1724,11 +1816,11 @@ var deplint = async ({
|
|
|
1724
1816
|
};
|
|
1725
1817
|
|
|
1726
1818
|
// src/actions/deploy.ts
|
|
1727
|
-
import { readFileSync as
|
|
1819
|
+
import { readFileSync as readFileSync7 } from "fs";
|
|
1728
1820
|
var privatePackageExcludeList = () => {
|
|
1729
1821
|
const possibleDeployablePackages = yarnWorkspaces().map((workspace) => [
|
|
1730
1822
|
workspace,
|
|
1731
|
-
JSON.parse(
|
|
1823
|
+
JSON.parse(readFileSync7(`${workspace.location}/package.json`, { encoding: "utf8" }))
|
|
1732
1824
|
]);
|
|
1733
1825
|
const privatePackages = possibleDeployablePackages.filter(([_, pkg]) => pkg.private).map(([workspace]) => workspace);
|
|
1734
1826
|
const excludeList = privatePackages.map((workspace) => `--exclude ${workspace.name}`);
|
|
@@ -1748,11 +1840,11 @@ var deploy = () => {
|
|
|
1748
1840
|
};
|
|
1749
1841
|
|
|
1750
1842
|
// src/actions/deploy-major.ts
|
|
1751
|
-
import { readFileSync as
|
|
1843
|
+
import { readFileSync as readFileSync8 } from "fs";
|
|
1752
1844
|
var privatePackageExcludeList2 = () => {
|
|
1753
1845
|
const possibleDeployablePackages = yarnWorkspaces().map((workspace) => [
|
|
1754
1846
|
workspace,
|
|
1755
|
-
JSON.parse(
|
|
1847
|
+
JSON.parse(readFileSync8(`${workspace.location}/package.json`, { encoding: "utf8" }))
|
|
1756
1848
|
]);
|
|
1757
1849
|
const privatePackages = possibleDeployablePackages.filter(([_, pkg]) => pkg.private).map(([workspace]) => workspace);
|
|
1758
1850
|
const excludeList = privatePackages.map((workspace) => `--exclude ${workspace.name}`);
|
|
@@ -1772,11 +1864,11 @@ var deployMajor = () => {
|
|
|
1772
1864
|
};
|
|
1773
1865
|
|
|
1774
1866
|
// src/actions/deploy-minor.ts
|
|
1775
|
-
import { readFileSync as
|
|
1867
|
+
import { readFileSync as readFileSync9 } from "fs";
|
|
1776
1868
|
var privatePackageExcludeList3 = () => {
|
|
1777
1869
|
const possibleDeployablePackages = yarnWorkspaces().map((workspace) => [
|
|
1778
1870
|
workspace,
|
|
1779
|
-
JSON.parse(
|
|
1871
|
+
JSON.parse(readFileSync9(`${workspace.location}/package.json`, { encoding: "utf8" }))
|
|
1780
1872
|
]);
|
|
1781
1873
|
const privatePackages = possibleDeployablePackages.filter(([_, pkg]) => pkg.private).map(([workspace]) => workspace);
|
|
1782
1874
|
const excludeList = privatePackages.map((workspace) => `--exclude ${workspace.name}`);
|
|
@@ -1796,11 +1888,11 @@ var deployMinor = () => {
|
|
|
1796
1888
|
};
|
|
1797
1889
|
|
|
1798
1890
|
// src/actions/deploy-next.ts
|
|
1799
|
-
import { readFileSync as
|
|
1891
|
+
import { readFileSync as readFileSync10 } from "fs";
|
|
1800
1892
|
var privatePackageExcludeList4 = () => {
|
|
1801
1893
|
const possibleDeployablePackages = yarnWorkspaces().map((workspace) => [
|
|
1802
1894
|
workspace,
|
|
1803
|
-
JSON.parse(
|
|
1895
|
+
JSON.parse(readFileSync10(`${workspace.location}/package.json`, { encoding: "utf8" }))
|
|
1804
1896
|
]);
|
|
1805
1897
|
const privatePackages = possibleDeployablePackages.filter(([_, pkg]) => pkg.private).map(([workspace]) => workspace);
|
|
1806
1898
|
const excludeList = privatePackages.map((workspace) => `--exclude ${workspace.name}`);
|
|
@@ -2067,7 +2159,10 @@ async function readmeGen({
|
|
|
2067
2159
|
typedoc,
|
|
2068
2160
|
verbose
|
|
2069
2161
|
}) {
|
|
2162
|
+
const config2 = await loadConfig();
|
|
2070
2163
|
return await generateReadmeFiles({
|
|
2164
|
+
logoLinkUrl: config2.readme?.logoLinkUrl,
|
|
2165
|
+
logoUrl: config2.readme?.logoUrl,
|
|
2071
2166
|
pkg,
|
|
2072
2167
|
templatePath,
|
|
2073
2168
|
typedoc,
|
|
@@ -2075,6 +2170,15 @@ async function readmeGen({
|
|
|
2075
2170
|
});
|
|
2076
2171
|
}
|
|
2077
2172
|
|
|
2173
|
+
// src/actions/readme-init.ts
|
|
2174
|
+
async function readmeInit({ templatePath }) {
|
|
2175
|
+
const config2 = await loadConfig();
|
|
2176
|
+
const template = applyLogoConfig(DEFAULT_README_TEMPLATE, config2.readme?.logoUrl, config2.readme?.logoLinkUrl);
|
|
2177
|
+
const resolvedTemplatePath = resolveTemplatePath(templatePath);
|
|
2178
|
+
await scaffoldTemplate(resolvedTemplatePath, template);
|
|
2179
|
+
return 0;
|
|
2180
|
+
}
|
|
2181
|
+
|
|
2078
2182
|
// src/actions/rebuild.ts
|
|
2079
2183
|
var rebuild = ({ target }) => {
|
|
2080
2184
|
return runSteps("Rebuild", [
|
|
@@ -2231,8 +2335,8 @@ var relintAllPackages = ({ fix: fix2 = false } = {}) => {
|
|
|
2231
2335
|
// src/actions/retest.ts
|
|
2232
2336
|
var retest = () => {
|
|
2233
2337
|
return runSteps("Test", [
|
|
2234
|
-
["yarn", ["
|
|
2235
|
-
["yarn", ["
|
|
2338
|
+
["yarn", ["vitest", "--clearCache"]],
|
|
2339
|
+
["yarn", ["vitest", "."]]
|
|
2236
2340
|
]);
|
|
2237
2341
|
};
|
|
2238
2342
|
|
|
@@ -2293,102 +2397,200 @@ var yarn3Only = () => {
|
|
|
2293
2397
|
return 0;
|
|
2294
2398
|
};
|
|
2295
2399
|
|
|
2296
|
-
// src/xy/
|
|
2400
|
+
// src/xy/build/buildCommand.ts
|
|
2401
|
+
var buildCommand = {
|
|
2402
|
+
command: "build [package]",
|
|
2403
|
+
describe: "Build - Compile & Lint",
|
|
2404
|
+
builder: (yargs2) => {
|
|
2405
|
+
return yargs2.positional("package", { describe: "Specific package to build" });
|
|
2406
|
+
},
|
|
2407
|
+
handler: async (argv) => {
|
|
2408
|
+
if (argv.verbose) {
|
|
2409
|
+
console.log(`Building: ${argv.package ?? "all"}`);
|
|
2410
|
+
}
|
|
2411
|
+
process.exitCode = await build({
|
|
2412
|
+
incremental: !!argv.incremental,
|
|
2413
|
+
jobs: argv.jobs,
|
|
2414
|
+
pkg: argv.package,
|
|
2415
|
+
target: argv.target,
|
|
2416
|
+
verbose: !!argv.verbose
|
|
2417
|
+
});
|
|
2418
|
+
}
|
|
2419
|
+
};
|
|
2420
|
+
|
|
2421
|
+
// src/xy/build/compileCommand.ts
|
|
2422
|
+
var compileCommand = {
|
|
2423
|
+
command: "compile [package]",
|
|
2424
|
+
describe: "Compile with Typescript & Copy Images",
|
|
2425
|
+
builder: (yargs2) => {
|
|
2426
|
+
return yargs2.positional("package", { describe: "Specific package to compile" });
|
|
2427
|
+
},
|
|
2428
|
+
handler: (argv) => {
|
|
2429
|
+
if (argv.verbose) {
|
|
2430
|
+
console.log(`Compiling: ${argv.package ?? "all"}`);
|
|
2431
|
+
}
|
|
2432
|
+
process.exitCode = compile({
|
|
2433
|
+
incremental: !!argv.incremental,
|
|
2434
|
+
jobs: argv.jobs,
|
|
2435
|
+
pkg: argv.package,
|
|
2436
|
+
target: argv.target,
|
|
2437
|
+
verbose: !!argv.verbose
|
|
2438
|
+
});
|
|
2439
|
+
}
|
|
2440
|
+
};
|
|
2441
|
+
|
|
2442
|
+
// src/xy/build/compileOnlyCommand.ts
|
|
2443
|
+
var compileOnlyCommand = {
|
|
2444
|
+
command: "compile-only [package]",
|
|
2445
|
+
describe: "Compile with Typescript & Copy Images (No Publint)",
|
|
2446
|
+
builder: (yargs2) => {
|
|
2447
|
+
return yargs2.positional("package", { describe: "Specific package to compile" });
|
|
2448
|
+
},
|
|
2449
|
+
handler: (argv) => {
|
|
2450
|
+
if (argv.verbose) {
|
|
2451
|
+
console.log(`Compiling: ${argv.package ?? "all"}`);
|
|
2452
|
+
}
|
|
2453
|
+
process.exitCode = compile({
|
|
2454
|
+
incremental: !!argv.incremental,
|
|
2455
|
+
jobs: argv.jobs,
|
|
2456
|
+
pkg: argv.package,
|
|
2457
|
+
publint: false,
|
|
2458
|
+
target: argv.target,
|
|
2459
|
+
verbose: !!argv.verbose
|
|
2460
|
+
});
|
|
2461
|
+
}
|
|
2462
|
+
};
|
|
2463
|
+
|
|
2464
|
+
// src/xy/build/copyAssetsCommand.ts
|
|
2465
|
+
var copyAssetsCommand = {
|
|
2466
|
+
command: "copy-assets [package]",
|
|
2467
|
+
describe: "Copy Assets - Copy the assets from src to dist",
|
|
2468
|
+
builder: (yargs2) => {
|
|
2469
|
+
return yargs2.positional("package", { describe: "Specific package to copy assets" });
|
|
2470
|
+
},
|
|
2471
|
+
handler: async (argv) => {
|
|
2472
|
+
if (argv.verbose) console.log(`Copying Assets: ${argv.package ?? "all"}`);
|
|
2473
|
+
process.exitCode = await copyAssets({ target: argv.target });
|
|
2474
|
+
}
|
|
2475
|
+
};
|
|
2476
|
+
|
|
2477
|
+
// src/xy/build/rebuildCommand.ts
|
|
2478
|
+
var rebuildCommand = {
|
|
2479
|
+
command: "rebuild [package]",
|
|
2480
|
+
describe: "Rebuild - Clean, Compile & Lint",
|
|
2481
|
+
builder: (yargs2) => {
|
|
2482
|
+
return yargs2.positional("package", { describe: "Specific package to rebuild" });
|
|
2483
|
+
},
|
|
2484
|
+
handler: (argv) => {
|
|
2485
|
+
if (argv.verbose) console.log(`Rebuilding: ${argv.package ?? "all"}`);
|
|
2486
|
+
process.exitCode = rebuild({ target: argv.target });
|
|
2487
|
+
}
|
|
2488
|
+
};
|
|
2489
|
+
|
|
2490
|
+
// src/xy/build/recompileCommand.ts
|
|
2491
|
+
var recompileCommand = {
|
|
2492
|
+
command: "recompile [package]",
|
|
2493
|
+
describe: "Re-compile with Typescript & Copy Images",
|
|
2494
|
+
builder: (yargs2) => {
|
|
2495
|
+
return yargs2.positional("package", { describe: "Specific package to re-compile" });
|
|
2496
|
+
},
|
|
2497
|
+
handler: async (argv) => {
|
|
2498
|
+
if (argv.verbose) {
|
|
2499
|
+
console.log(`Re-compiling: ${argv.package ?? "all"}`);
|
|
2500
|
+
}
|
|
2501
|
+
process.exitCode = await recompile({
|
|
2502
|
+
incremental: !!argv.incremental,
|
|
2503
|
+
jobs: argv.jobs,
|
|
2504
|
+
pkg: argv.package,
|
|
2505
|
+
target: argv.target,
|
|
2506
|
+
verbose: !!argv.verbose
|
|
2507
|
+
});
|
|
2508
|
+
}
|
|
2509
|
+
};
|
|
2510
|
+
|
|
2511
|
+
// src/xy/build/index.ts
|
|
2297
2512
|
var xyBuildCommands = (args) => {
|
|
2298
|
-
return args.command(
|
|
2299
|
-
|
|
2300
|
-
|
|
2301
|
-
|
|
2302
|
-
|
|
2303
|
-
|
|
2304
|
-
|
|
2305
|
-
|
|
2306
|
-
|
|
2307
|
-
|
|
2308
|
-
|
|
2309
|
-
|
|
2310
|
-
|
|
2311
|
-
|
|
2312
|
-
|
|
2313
|
-
|
|
2314
|
-
|
|
2315
|
-
|
|
2316
|
-
|
|
2317
|
-
|
|
2318
|
-
|
|
2319
|
-
|
|
2320
|
-
|
|
2321
|
-
|
|
2322
|
-
|
|
2323
|
-
|
|
2324
|
-
|
|
2325
|
-
|
|
2326
|
-
|
|
2327
|
-
|
|
2328
|
-
|
|
2329
|
-
|
|
2330
|
-
|
|
2331
|
-
|
|
2332
|
-
|
|
2333
|
-
|
|
2334
|
-
)
|
|
2335
|
-
|
|
2336
|
-
|
|
2337
|
-
|
|
2338
|
-
|
|
2339
|
-
|
|
2340
|
-
|
|
2341
|
-
|
|
2342
|
-
|
|
2343
|
-
|
|
2344
|
-
|
|
2345
|
-
|
|
2346
|
-
|
|
2347
|
-
|
|
2348
|
-
|
|
2349
|
-
|
|
2350
|
-
|
|
2351
|
-
|
|
2352
|
-
|
|
2353
|
-
|
|
2354
|
-
|
|
2355
|
-
|
|
2356
|
-
(
|
|
2357
|
-
|
|
2358
|
-
|
|
2359
|
-
|
|
2360
|
-
|
|
2361
|
-
|
|
2362
|
-
|
|
2363
|
-
|
|
2364
|
-
|
|
2365
|
-
|
|
2366
|
-
|
|
2367
|
-
|
|
2368
|
-
|
|
2369
|
-
|
|
2370
|
-
|
|
2371
|
-
|
|
2372
|
-
|
|
2373
|
-
|
|
2374
|
-
|
|
2375
|
-
|
|
2376
|
-
|
|
2377
|
-
(
|
|
2378
|
-
|
|
2379
|
-
process.exitCode = rebuild({ target: argv.target });
|
|
2380
|
-
}
|
|
2381
|
-
).command(
|
|
2382
|
-
"copy-assets [package]",
|
|
2383
|
-
"Copy Assets - Copy the assets from src to dist",
|
|
2384
|
-
(yargs2) => {
|
|
2385
|
-
return yargs2.positional("package", { describe: "Specific package to copy assets" });
|
|
2386
|
-
},
|
|
2387
|
-
async (argv) => {
|
|
2388
|
-
if (argv.verbose) console.log(`Copying Assets: ${argv.package ?? "all"}`);
|
|
2389
|
-
process.exitCode = await copyAssets({ target: argv.target });
|
|
2390
|
-
}
|
|
2391
|
-
);
|
|
2513
|
+
return args.command(buildCommand).command(compileCommand).command(compileOnlyCommand).command(recompileCommand).command(rebuildCommand).command(copyAssetsCommand);
|
|
2514
|
+
};
|
|
2515
|
+
|
|
2516
|
+
// src/xy/common/claude/commandsCommand.ts
|
|
2517
|
+
var commandsCommand = {
|
|
2518
|
+
command: "commands",
|
|
2519
|
+
describe: "Sync XY Labs standard Claude slash commands to .claude/commands/",
|
|
2520
|
+
handler: (argv) => {
|
|
2521
|
+
if (argv.verbose) console.log("Claude Commands");
|
|
2522
|
+
process.exitCode = claudeCommands();
|
|
2523
|
+
}
|
|
2524
|
+
};
|
|
2525
|
+
|
|
2526
|
+
// src/xy/common/claude/initCommand.ts
|
|
2527
|
+
var initCommand = {
|
|
2528
|
+
builder: (yargs2) => {
|
|
2529
|
+
return yargs2.option("force", {
|
|
2530
|
+
alias: "f",
|
|
2531
|
+
default: false,
|
|
2532
|
+
description: "Overwrite existing CLAUDE.md",
|
|
2533
|
+
type: "boolean"
|
|
2534
|
+
});
|
|
2535
|
+
},
|
|
2536
|
+
command: "init",
|
|
2537
|
+
describe: "Initialize all Claude configuration (commands, rules, settings)",
|
|
2538
|
+
handler: async (argv) => {
|
|
2539
|
+
if (argv.verbose) console.log("Claude Init");
|
|
2540
|
+
const commandsResult = claudeCommands();
|
|
2541
|
+
const rulesResult = claudeRules({ force: argv.force });
|
|
2542
|
+
const settingsResult = await claudeSettings();
|
|
2543
|
+
process.exitCode = commandsResult || rulesResult || settingsResult;
|
|
2544
|
+
}
|
|
2545
|
+
};
|
|
2546
|
+
|
|
2547
|
+
// src/xy/common/claude/rulesCommand.ts
|
|
2548
|
+
var rulesCommand = {
|
|
2549
|
+
builder: (yargs2) => {
|
|
2550
|
+
return yargs2.option("force", {
|
|
2551
|
+
alias: "f",
|
|
2552
|
+
default: false,
|
|
2553
|
+
description: "Overwrite existing CLAUDE.md",
|
|
2554
|
+
type: "boolean"
|
|
2555
|
+
});
|
|
2556
|
+
},
|
|
2557
|
+
command: "rules",
|
|
2558
|
+
describe: "Sync XY Labs standard Claude rules to .claude/rules/",
|
|
2559
|
+
handler: (argv) => {
|
|
2560
|
+
if (argv.verbose) console.log("Claude Rules");
|
|
2561
|
+
process.exitCode = claudeRules({ force: argv.force });
|
|
2562
|
+
}
|
|
2563
|
+
};
|
|
2564
|
+
|
|
2565
|
+
// src/xy/common/claude/settingsCommand.ts
|
|
2566
|
+
var settingsCommand = {
|
|
2567
|
+
command: "settings",
|
|
2568
|
+
describe: "Initialize .claude/settings.local.json with XY Labs defaults",
|
|
2569
|
+
handler: async (argv) => {
|
|
2570
|
+
if (argv.verbose) console.log("Claude Settings");
|
|
2571
|
+
process.exitCode = await claudeSettings();
|
|
2572
|
+
}
|
|
2573
|
+
};
|
|
2574
|
+
|
|
2575
|
+
// src/xy/common/claude/index.ts
|
|
2576
|
+
var claudeCommand = {
|
|
2577
|
+
builder: (yargs2) => {
|
|
2578
|
+
return yargs2.command(commandsCommand).command(initCommand).command(rulesCommand).command(settingsCommand).demandCommand(1, "Please specify a claude subcommand");
|
|
2579
|
+
},
|
|
2580
|
+
command: "claude",
|
|
2581
|
+
describe: "Claude - Claude Code configuration utilities",
|
|
2582
|
+
handler: () => {
|
|
2583
|
+
}
|
|
2584
|
+
};
|
|
2585
|
+
|
|
2586
|
+
// src/xy/common/cleanDocsCommand.ts
|
|
2587
|
+
var cleanDocsCommand = {
|
|
2588
|
+
command: "clean-docs",
|
|
2589
|
+
describe: "CleanDocs - Clean TypeDocs",
|
|
2590
|
+
handler: (argv) => {
|
|
2591
|
+
if (argv.verbose) console.log("Cleaning TypeDocs: all");
|
|
2592
|
+
process.exitCode = cleanDocs();
|
|
2593
|
+
}
|
|
2392
2594
|
};
|
|
2393
2595
|
|
|
2394
2596
|
// src/xy/param.ts
|
|
@@ -2396,455 +2598,497 @@ var packagePositionalParam = (yargs2) => {
|
|
|
2396
2598
|
return yargs2.positional("package", { describe: "Specific package to target", type: "string" });
|
|
2397
2599
|
};
|
|
2398
2600
|
|
|
2399
|
-
// src/xy/
|
|
2601
|
+
// src/xy/common/deadCommand.ts
|
|
2602
|
+
var deadCommand = {
|
|
2603
|
+
builder: (yargs2) => {
|
|
2604
|
+
return packagePositionalParam(yargs2);
|
|
2605
|
+
},
|
|
2606
|
+
command: "dead [package]",
|
|
2607
|
+
describe: "Dead - Check for dead code",
|
|
2608
|
+
handler: (argv) => {
|
|
2609
|
+
if (argv.verbose) console.log("Dead");
|
|
2610
|
+
process.exitCode = dead();
|
|
2611
|
+
}
|
|
2612
|
+
};
|
|
2613
|
+
|
|
2614
|
+
// src/xy/common/genDocsCommand.ts
|
|
2615
|
+
var genDocsCommand = {
|
|
2616
|
+
builder: (yargs2) => {
|
|
2617
|
+
return packagePositionalParam(yargs2);
|
|
2618
|
+
},
|
|
2619
|
+
command: "gen-docs [package]",
|
|
2620
|
+
describe: "GenDocs - Generate TypeDocs",
|
|
2621
|
+
handler: (argv) => {
|
|
2622
|
+
if (argv.verbose) console.log(`Generating TypeDocs: ${argv.package ?? "all"}`);
|
|
2623
|
+
process.exitCode = genDocs({ incremental: !!argv.incremental, pkg: argv.package });
|
|
2624
|
+
}
|
|
2625
|
+
};
|
|
2626
|
+
|
|
2627
|
+
// src/xy/common/gitignoreGenCommand.ts
|
|
2628
|
+
var gitignoreGenCommand = {
|
|
2629
|
+
command: "gitignore-gen",
|
|
2630
|
+
describe: "GitIgnore Gen - Generate .gitignore files",
|
|
2631
|
+
handler: (argv) => {
|
|
2632
|
+
if (argv.verbose) console.log("GitIgnore Gen");
|
|
2633
|
+
process.exitCode = gitignoreGen();
|
|
2634
|
+
}
|
|
2635
|
+
};
|
|
2636
|
+
|
|
2637
|
+
// src/xy/common/gitlintCommand.ts
|
|
2638
|
+
var gitlintCommand = {
|
|
2639
|
+
command: "gitlint [package]",
|
|
2640
|
+
describe: "Gitlint - Lint your git config",
|
|
2641
|
+
handler: (argv) => {
|
|
2642
|
+
if (argv.verbose) console.log("Gitlint");
|
|
2643
|
+
process.exitCode = argv.fix ? gitlintFix() : gitlint();
|
|
2644
|
+
}
|
|
2645
|
+
};
|
|
2646
|
+
|
|
2647
|
+
// src/xy/common/licenseCommand.ts
|
|
2648
|
+
var licenseCommand = {
|
|
2649
|
+
builder: (yargs2) => {
|
|
2650
|
+
return packagePositionalParam(yargs2);
|
|
2651
|
+
},
|
|
2652
|
+
command: "license [package]",
|
|
2653
|
+
describe: "License - Check licenses of dependencies",
|
|
2654
|
+
handler: async (argv) => {
|
|
2655
|
+
if (argv.verbose) console.log(`License: ${argv.package ?? "all"}`);
|
|
2656
|
+
process.exitCode = await license();
|
|
2657
|
+
}
|
|
2658
|
+
};
|
|
2659
|
+
|
|
2660
|
+
// src/xy/common/npmignoreGenCommand.ts
|
|
2661
|
+
var npmignoreGenCommand = {
|
|
2662
|
+
command: "npmignore-gen",
|
|
2663
|
+
describe: "NpmIgnore Gen - Generate .npmignore files",
|
|
2664
|
+
handler: (argv) => {
|
|
2665
|
+
if (argv.verbose) console.log("NpmIgnore Gen");
|
|
2666
|
+
process.exitCode = npmignoreGen();
|
|
2667
|
+
}
|
|
2668
|
+
};
|
|
2669
|
+
|
|
2670
|
+
// src/xy/common/readme/genCommand.ts
|
|
2671
|
+
var genCommand = {
|
|
2672
|
+
builder: (yargs2) => {
|
|
2673
|
+
return packagePositionalParam(yargs2).option("template", {
|
|
2674
|
+
alias: "t",
|
|
2675
|
+
description: "Path to README.template.md",
|
|
2676
|
+
type: "string"
|
|
2677
|
+
}).option("typedoc", {
|
|
2678
|
+
default: false,
|
|
2679
|
+
description: "Generate TypeDoc reference sections",
|
|
2680
|
+
type: "boolean"
|
|
2681
|
+
});
|
|
2682
|
+
},
|
|
2683
|
+
aliases: ["$0"],
|
|
2684
|
+
command: "gen [package]",
|
|
2685
|
+
describe: "Generate README.md files from template",
|
|
2686
|
+
handler: async (argv) => {
|
|
2687
|
+
if (argv.verbose) console.log("Readme Gen");
|
|
2688
|
+
process.exitCode = await readmeGen({
|
|
2689
|
+
pkg: argv.package,
|
|
2690
|
+
templatePath: argv.template,
|
|
2691
|
+
typedoc: argv.typedoc,
|
|
2692
|
+
verbose: !!argv.verbose
|
|
2693
|
+
});
|
|
2694
|
+
}
|
|
2695
|
+
};
|
|
2696
|
+
|
|
2697
|
+
// src/xy/common/readme/initCommand.ts
|
|
2698
|
+
var initCommand2 = {
|
|
2699
|
+
builder: (yargs2) => {
|
|
2700
|
+
return yargs2.option("template", {
|
|
2701
|
+
alias: "t",
|
|
2702
|
+
description: "Path to README.template.md",
|
|
2703
|
+
type: "string"
|
|
2704
|
+
});
|
|
2705
|
+
},
|
|
2706
|
+
command: "init",
|
|
2707
|
+
describe: "Initialize README template and logo files",
|
|
2708
|
+
handler: async (argv) => {
|
|
2709
|
+
if (argv.verbose) console.log("Readme Init");
|
|
2710
|
+
process.exitCode = await readmeInit({
|
|
2711
|
+
templatePath: argv.template,
|
|
2712
|
+
verbose: !!argv.verbose
|
|
2713
|
+
});
|
|
2714
|
+
}
|
|
2715
|
+
};
|
|
2716
|
+
|
|
2717
|
+
// src/xy/common/readme/index.ts
|
|
2718
|
+
var readmeCommand = {
|
|
2719
|
+
builder: (yargs2) => {
|
|
2720
|
+
return yargs2.command(genCommand).command(initCommand2);
|
|
2721
|
+
},
|
|
2722
|
+
command: "readme",
|
|
2723
|
+
describe: "Readme - README file utilities",
|
|
2724
|
+
handler: () => {
|
|
2725
|
+
}
|
|
2726
|
+
};
|
|
2727
|
+
|
|
2728
|
+
// src/xy/common/retestCommand.ts
|
|
2729
|
+
var retestCommand = {
|
|
2730
|
+
command: "retest",
|
|
2731
|
+
describe: "Re-Test - Run Jest Tests with cleaned cache",
|
|
2732
|
+
handler: (argv) => {
|
|
2733
|
+
if (argv.verbose) console.log("Re-Testing");
|
|
2734
|
+
process.exitCode = retest();
|
|
2735
|
+
}
|
|
2736
|
+
};
|
|
2737
|
+
|
|
2738
|
+
// src/xy/common/testCommand.ts
|
|
2739
|
+
var testCommand = {
|
|
2740
|
+
command: "test",
|
|
2741
|
+
describe: "Test - Run Jest Tests",
|
|
2742
|
+
handler: (argv) => {
|
|
2743
|
+
if (argv.verbose) console.log("Testing");
|
|
2744
|
+
process.exitCode = test();
|
|
2745
|
+
}
|
|
2746
|
+
};
|
|
2747
|
+
|
|
2748
|
+
// src/xy/common/upplugCommand.ts
|
|
2749
|
+
var upplugCommand = {
|
|
2750
|
+
command: "upplug",
|
|
2751
|
+
describe: "UpPlug - Update Yarn Plugins",
|
|
2752
|
+
handler: (argv) => {
|
|
2753
|
+
if (argv.verbose) console.log("UpPlug");
|
|
2754
|
+
process.exitCode = updateYarnPlugins();
|
|
2755
|
+
}
|
|
2756
|
+
};
|
|
2757
|
+
|
|
2758
|
+
// src/xy/common/upyarnCommand.ts
|
|
2759
|
+
var upyarnCommand = {
|
|
2760
|
+
command: "upyarn",
|
|
2761
|
+
describe: "UpYarn - Update Yarn Version",
|
|
2762
|
+
handler: (argv) => {
|
|
2763
|
+
if (argv.verbose) console.log("UpYarn");
|
|
2764
|
+
process.exitCode = updateYarnVersion();
|
|
2765
|
+
}
|
|
2766
|
+
};
|
|
2767
|
+
|
|
2768
|
+
// src/xy/common/yarn3OnlyCommand.ts
|
|
2769
|
+
var yarn3OnlyCommand = {
|
|
2770
|
+
command: "yarn3only",
|
|
2771
|
+
describe: "Yarn3Only - Check if using Yarn v3",
|
|
2772
|
+
handler: (argv) => {
|
|
2773
|
+
if (argv.verbose) console.log("Yarn 3 Check");
|
|
2774
|
+
process.exitCode = yarn3Only();
|
|
2775
|
+
}
|
|
2776
|
+
};
|
|
2777
|
+
|
|
2778
|
+
// src/xy/common/index.ts
|
|
2400
2779
|
var xyCommonCommands = (args) => {
|
|
2401
|
-
return args.command(
|
|
2402
|
-
|
|
2403
|
-
|
|
2404
|
-
|
|
2405
|
-
|
|
2406
|
-
|
|
2407
|
-
|
|
2408
|
-
|
|
2409
|
-
|
|
2410
|
-
|
|
2411
|
-
|
|
2412
|
-
|
|
2413
|
-
|
|
2414
|
-
|
|
2415
|
-
|
|
2416
|
-
|
|
2417
|
-
|
|
2418
|
-
|
|
2419
|
-
|
|
2420
|
-
(
|
|
2421
|
-
|
|
2422
|
-
|
|
2423
|
-
|
|
2424
|
-
|
|
2425
|
-
|
|
2426
|
-
|
|
2427
|
-
|
|
2428
|
-
|
|
2429
|
-
|
|
2430
|
-
|
|
2431
|
-
|
|
2432
|
-
|
|
2433
|
-
|
|
2434
|
-
|
|
2435
|
-
|
|
2436
|
-
|
|
2437
|
-
|
|
2438
|
-
|
|
2439
|
-
|
|
2440
|
-
|
|
2441
|
-
|
|
2442
|
-
).command(
|
|
2443
|
-
"dead [package]",
|
|
2444
|
-
"Dead - Check for dead code",
|
|
2445
|
-
(yargs2) => {
|
|
2446
|
-
return packagePositionalParam(yargs2);
|
|
2447
|
-
},
|
|
2448
|
-
(argv) => {
|
|
2449
|
-
if (argv.verbose) console.log("Dead");
|
|
2450
|
-
process.exitCode = dead();
|
|
2451
|
-
}
|
|
2452
|
-
).command(
|
|
2453
|
-
"gen-docs [package]",
|
|
2454
|
-
"GenDocs - Generate TypeDocs",
|
|
2455
|
-
(yargs2) => {
|
|
2456
|
-
return packagePositionalParam(yargs2);
|
|
2457
|
-
},
|
|
2458
|
-
(argv) => {
|
|
2459
|
-
if (argv.verbose) console.log(`Generating TypeDocs: ${argv.package ?? "all"}`);
|
|
2460
|
-
process.exitCode = genDocs({ incremental: !!argv.incremental, pkg: argv.package });
|
|
2461
|
-
}
|
|
2462
|
-
).command(
|
|
2463
|
-
"clean-docs",
|
|
2464
|
-
"CleanDocs - Clean TypeDocs",
|
|
2465
|
-
(yargs2) => yargs2,
|
|
2466
|
-
(argv) => {
|
|
2467
|
-
if (argv.verbose) console.log("Cleaning TypeDocs: all");
|
|
2468
|
-
process.exitCode = cleanDocs();
|
|
2469
|
-
}
|
|
2470
|
-
).command(
|
|
2471
|
-
"gitlint [package]",
|
|
2472
|
-
"Gitlint - Lint your git config",
|
|
2473
|
-
(yargs2) => {
|
|
2474
|
-
return yargs2;
|
|
2475
|
-
},
|
|
2476
|
-
(argv) => {
|
|
2477
|
-
if (argv.verbose) console.log("Gitlint");
|
|
2478
|
-
process.exitCode = argv.fix ? gitlintFix() : gitlint();
|
|
2479
|
-
}
|
|
2480
|
-
).command(
|
|
2481
|
-
"gitignore-gen",
|
|
2482
|
-
"GitIgnore Gen - Generate .gitignore files",
|
|
2483
|
-
(yargs2) => {
|
|
2484
|
-
return yargs2;
|
|
2485
|
-
},
|
|
2486
|
-
(argv) => {
|
|
2487
|
-
if (argv.verbose) console.log("GitIgnore Gen");
|
|
2488
|
-
process.exitCode = gitignoreGen();
|
|
2489
|
-
}
|
|
2490
|
-
).command(
|
|
2491
|
-
"npmignore-gen",
|
|
2492
|
-
"NpmIgnore Gen - Generate .npmignore files",
|
|
2493
|
-
(yargs2) => {
|
|
2494
|
-
return yargs2;
|
|
2495
|
-
},
|
|
2496
|
-
(argv) => {
|
|
2497
|
-
if (argv.verbose) console.log("NpmIgnore Gen");
|
|
2498
|
-
process.exitCode = npmignoreGen();
|
|
2499
|
-
}
|
|
2500
|
-
).command(
|
|
2501
|
-
"readme-gen [package]",
|
|
2502
|
-
"Readme Gen - Generate README.md files from template",
|
|
2503
|
-
(yargs2) => {
|
|
2504
|
-
return packagePositionalParam(yargs2).option("template", {
|
|
2505
|
-
alias: "t",
|
|
2506
|
-
description: "Path to README.template.md",
|
|
2507
|
-
type: "string"
|
|
2508
|
-
}).option("typedoc", {
|
|
2509
|
-
default: false,
|
|
2510
|
-
description: "Generate TypeDoc reference sections",
|
|
2511
|
-
type: "boolean"
|
|
2512
|
-
});
|
|
2513
|
-
},
|
|
2514
|
-
async (argv) => {
|
|
2515
|
-
if (argv.verbose) console.log("Readme Gen");
|
|
2516
|
-
process.exitCode = await readmeGen({
|
|
2517
|
-
pkg: argv.package,
|
|
2518
|
-
templatePath: argv.template,
|
|
2519
|
-
typedoc: argv.typedoc,
|
|
2520
|
-
verbose: !!argv.verbose
|
|
2521
|
-
});
|
|
2522
|
-
}
|
|
2523
|
-
).command(
|
|
2524
|
-
"retest",
|
|
2525
|
-
"Re-Test - Run Jest Tests with cleaned cache",
|
|
2526
|
-
(yargs2) => {
|
|
2527
|
-
return yargs2;
|
|
2528
|
-
},
|
|
2529
|
-
(argv) => {
|
|
2530
|
-
if (argv.verbose) console.log("Re-Testing");
|
|
2531
|
-
process.exitCode = retest();
|
|
2532
|
-
}
|
|
2533
|
-
).command(
|
|
2534
|
-
"test",
|
|
2535
|
-
"Test - Run Jest Tests",
|
|
2536
|
-
(yargs2) => {
|
|
2537
|
-
return yargs2;
|
|
2538
|
-
},
|
|
2539
|
-
(argv) => {
|
|
2540
|
-
if (argv.verbose) console.log("Testing");
|
|
2541
|
-
process.exitCode = test();
|
|
2542
|
-
}
|
|
2543
|
-
).command(
|
|
2544
|
-
"upplug",
|
|
2545
|
-
"UpPlug - Update Yarn Plugins",
|
|
2546
|
-
(yargs2) => {
|
|
2547
|
-
return yargs2;
|
|
2548
|
-
},
|
|
2549
|
-
(argv) => {
|
|
2550
|
-
if (argv.verbose) console.log("UpPlug");
|
|
2551
|
-
process.exitCode = updateYarnPlugins();
|
|
2552
|
-
}
|
|
2553
|
-
).command(
|
|
2554
|
-
"upyarn",
|
|
2555
|
-
"UpYarn - Update Yarn Version",
|
|
2556
|
-
(yargs2) => {
|
|
2557
|
-
return yargs2;
|
|
2558
|
-
},
|
|
2559
|
-
(argv) => {
|
|
2560
|
-
if (argv.verbose) console.log("UpYarn");
|
|
2561
|
-
process.exitCode = updateYarnVersion();
|
|
2562
|
-
}
|
|
2563
|
-
).command(
|
|
2564
|
-
"yarn3only",
|
|
2565
|
-
"Yarn3Only - Check if using Yarn v3",
|
|
2566
|
-
(yargs2) => {
|
|
2567
|
-
return yargs2;
|
|
2568
|
-
},
|
|
2569
|
-
(argv) => {
|
|
2570
|
-
if (argv.verbose) console.log("Yarn 3 Check");
|
|
2571
|
-
process.exitCode = yarn3Only();
|
|
2572
|
-
}
|
|
2573
|
-
);
|
|
2780
|
+
return args.command(claudeCommand).command(licenseCommand).command(deadCommand).command(genDocsCommand).command(cleanDocsCommand).command(gitlintCommand).command(gitignoreGenCommand).command(npmignoreGenCommand).command(readmeCommand).command(retestCommand).command(testCommand).command(upplugCommand).command(upyarnCommand).command(yarn3OnlyCommand);
|
|
2781
|
+
};
|
|
2782
|
+
|
|
2783
|
+
// src/xy/deploy/deployCommand.ts
|
|
2784
|
+
var deployCommand = {
|
|
2785
|
+
command: "deploy",
|
|
2786
|
+
describe: "Deploy - Deploy patch",
|
|
2787
|
+
handler: (argv) => {
|
|
2788
|
+
if (argv.verbose) console.log("Deploy patch");
|
|
2789
|
+
process.exitCode = deploy();
|
|
2790
|
+
}
|
|
2791
|
+
};
|
|
2792
|
+
|
|
2793
|
+
// src/xy/deploy/deployMajorCommand.ts
|
|
2794
|
+
var deployMajorCommand = {
|
|
2795
|
+
command: "deploy-major",
|
|
2796
|
+
describe: "Deploy - Deploy major",
|
|
2797
|
+
handler: (argv) => {
|
|
2798
|
+
if (argv.verbose) console.log("Deploy major");
|
|
2799
|
+
process.exitCode = deployMajor();
|
|
2800
|
+
}
|
|
2801
|
+
};
|
|
2802
|
+
|
|
2803
|
+
// src/xy/deploy/deployMinorCommand.ts
|
|
2804
|
+
var deployMinorCommand = {
|
|
2805
|
+
command: "deploy-minor",
|
|
2806
|
+
describe: "Deploy - Deploy minor",
|
|
2807
|
+
handler: (argv) => {
|
|
2808
|
+
if (argv.verbose) console.log("Deploy minor");
|
|
2809
|
+
process.exitCode = deployMinor();
|
|
2810
|
+
}
|
|
2811
|
+
};
|
|
2812
|
+
|
|
2813
|
+
// src/xy/deploy/deployNextCommand.ts
|
|
2814
|
+
var deployNextCommand = {
|
|
2815
|
+
command: "deploy-next",
|
|
2816
|
+
describe: "Deploy - Deploy next",
|
|
2817
|
+
handler: (argv) => {
|
|
2818
|
+
if (argv.verbose) console.log("Deploy next");
|
|
2819
|
+
process.exitCode = deployNext();
|
|
2820
|
+
}
|
|
2574
2821
|
};
|
|
2575
2822
|
|
|
2576
|
-
// src/xy/
|
|
2823
|
+
// src/xy/deploy/publishCommand.ts
|
|
2824
|
+
var publishCommand = {
|
|
2825
|
+
command: "publish",
|
|
2826
|
+
describe: "Publish - Publish packages to npmjs",
|
|
2827
|
+
handler: (argv) => {
|
|
2828
|
+
if (argv.verbose) console.log("Publish packages to npmjs");
|
|
2829
|
+
process.exitCode = publish();
|
|
2830
|
+
}
|
|
2831
|
+
};
|
|
2832
|
+
|
|
2833
|
+
// src/xy/deploy/index.ts
|
|
2577
2834
|
var xyDeployCommands = (args) => {
|
|
2578
|
-
return args.command(
|
|
2579
|
-
|
|
2580
|
-
|
|
2581
|
-
|
|
2582
|
-
|
|
2583
|
-
|
|
2584
|
-
|
|
2585
|
-
|
|
2586
|
-
|
|
2587
|
-
|
|
2588
|
-
)
|
|
2589
|
-
|
|
2590
|
-
|
|
2591
|
-
(yargs2) => {
|
|
2592
|
-
return yargs2;
|
|
2593
|
-
},
|
|
2594
|
-
(argv) => {
|
|
2595
|
-
if (argv.verbose) console.log("Deploy minor");
|
|
2596
|
-
process.exitCode = deployMinor();
|
|
2597
|
-
}
|
|
2598
|
-
).command(
|
|
2599
|
-
"deploy-major",
|
|
2600
|
-
"Deploy - Deploy major",
|
|
2601
|
-
(yargs2) => {
|
|
2602
|
-
return yargs2;
|
|
2603
|
-
},
|
|
2604
|
-
(argv) => {
|
|
2605
|
-
if (argv.verbose) console.log("Deploy major");
|
|
2606
|
-
process.exitCode = deployMajor();
|
|
2607
|
-
}
|
|
2608
|
-
).command(
|
|
2609
|
-
"deploy-next",
|
|
2610
|
-
"Deploy - Deploy next",
|
|
2611
|
-
(yargs2) => {
|
|
2612
|
-
return yargs2;
|
|
2613
|
-
},
|
|
2614
|
-
(argv) => {
|
|
2615
|
-
if (argv.verbose) console.log("Deploy next");
|
|
2616
|
-
process.exitCode = deployNext();
|
|
2617
|
-
}
|
|
2618
|
-
).command(
|
|
2619
|
-
"publish",
|
|
2620
|
-
"Publish - Publish packages to npmjs",
|
|
2621
|
-
(yargs2) => {
|
|
2622
|
-
return yargs2;
|
|
2623
|
-
},
|
|
2624
|
-
(argv) => {
|
|
2625
|
-
if (argv.verbose) console.log("Publish packages to npmjs");
|
|
2626
|
-
process.exitCode = publish();
|
|
2835
|
+
return args.command(deployCommand).command(deployMinorCommand).command(deployMajorCommand).command(deployNextCommand).command(publishCommand);
|
|
2836
|
+
};
|
|
2837
|
+
|
|
2838
|
+
// src/xy/install/cleanCommand.ts
|
|
2839
|
+
var cleanCommand = {
|
|
2840
|
+
command: "clean [package]",
|
|
2841
|
+
describe: "Clean",
|
|
2842
|
+
builder: (yargs2) => {
|
|
2843
|
+
return yargs2.positional("package", { describe: "Specific package to clean" });
|
|
2844
|
+
},
|
|
2845
|
+
handler: async (argv) => {
|
|
2846
|
+
if (argv.verbose) {
|
|
2847
|
+
console.log(`Cleaning: ${argv.package ?? "all"}`);
|
|
2627
2848
|
}
|
|
2628
|
-
|
|
2849
|
+
process.exitCode = await clean({
|
|
2850
|
+
pkg: argv.package,
|
|
2851
|
+
verbose: !!argv.verbose
|
|
2852
|
+
});
|
|
2853
|
+
}
|
|
2854
|
+
};
|
|
2855
|
+
|
|
2856
|
+
// src/xy/install/dupdepsCommand.ts
|
|
2857
|
+
var dupdepsCommand = {
|
|
2858
|
+
command: "dupdeps",
|
|
2859
|
+
describe: "Dupdeps - Duplicate Dependencies in package.json",
|
|
2860
|
+
handler: (argv) => {
|
|
2861
|
+
if (argv.verbose) console.log("Dupdeps");
|
|
2862
|
+
process.exitCode = dupdeps();
|
|
2863
|
+
}
|
|
2629
2864
|
};
|
|
2630
2865
|
|
|
2631
|
-
// src/xy/
|
|
2866
|
+
// src/xy/install/reinstallCommand.ts
|
|
2867
|
+
var reinstallCommand = {
|
|
2868
|
+
command: "reinstall",
|
|
2869
|
+
describe: "Reinstall - Clean & Install",
|
|
2870
|
+
handler: (argv) => {
|
|
2871
|
+
if (argv.verbose) console.log("Reinstalling");
|
|
2872
|
+
process.exitCode = reinstall();
|
|
2873
|
+
}
|
|
2874
|
+
};
|
|
2875
|
+
|
|
2876
|
+
// src/xy/install/staticsCommand.ts
|
|
2877
|
+
var staticsCommand = {
|
|
2878
|
+
command: "statics",
|
|
2879
|
+
describe: "Statics - Confirming Static Packages",
|
|
2880
|
+
handler: (argv) => {
|
|
2881
|
+
if (argv.verbose) console.log("Statics");
|
|
2882
|
+
process.exitCode = statics();
|
|
2883
|
+
}
|
|
2884
|
+
};
|
|
2885
|
+
|
|
2886
|
+
// src/xy/install/upCommand.ts
|
|
2887
|
+
var upCommand = {
|
|
2888
|
+
command: "up",
|
|
2889
|
+
describe: "Up - Update dependencies",
|
|
2890
|
+
handler: (argv) => {
|
|
2891
|
+
if (argv.verbose) console.log("Up");
|
|
2892
|
+
process.exitCode = up();
|
|
2893
|
+
}
|
|
2894
|
+
};
|
|
2895
|
+
|
|
2896
|
+
// src/xy/install/updoCommand.ts
|
|
2897
|
+
var updoCommand = {
|
|
2898
|
+
command: "updo",
|
|
2899
|
+
describe: "Updo - Update dependencies [Interactive]",
|
|
2900
|
+
handler: (argv) => {
|
|
2901
|
+
if (argv.verbose) console.log("Updo");
|
|
2902
|
+
process.exitCode = updo();
|
|
2903
|
+
}
|
|
2904
|
+
};
|
|
2905
|
+
|
|
2906
|
+
// src/xy/install/index.ts
|
|
2632
2907
|
var xyInstallCommands = (args) => {
|
|
2633
|
-
return args.command(
|
|
2634
|
-
"clean [package]",
|
|
2635
|
-
"Clean",
|
|
2636
|
-
(yargs2) => {
|
|
2637
|
-
return yargs2.positional("package", { describe: "Specific package to clean" });
|
|
2638
|
-
},
|
|
2639
|
-
async (argv) => {
|
|
2640
|
-
if (argv.verbose) {
|
|
2641
|
-
console.log(`Cleaning: ${argv.package ?? "all"}`);
|
|
2642
|
-
}
|
|
2643
|
-
process.exitCode = await clean({
|
|
2644
|
-
pkg: argv.package,
|
|
2645
|
-
verbose: !!argv.verbose
|
|
2646
|
-
});
|
|
2647
|
-
}
|
|
2648
|
-
).command(
|
|
2649
|
-
"reinstall",
|
|
2650
|
-
"Reinstall - Clean & Install",
|
|
2651
|
-
(yargs2) => {
|
|
2652
|
-
return yargs2;
|
|
2653
|
-
},
|
|
2654
|
-
(argv) => {
|
|
2655
|
-
if (argv.verbose) console.log("Reinstalling");
|
|
2656
|
-
process.exitCode = reinstall();
|
|
2657
|
-
}
|
|
2658
|
-
).command(
|
|
2659
|
-
"up",
|
|
2660
|
-
"Up - Update dependencies",
|
|
2661
|
-
(yargs2) => {
|
|
2662
|
-
return yargs2;
|
|
2663
|
-
},
|
|
2664
|
-
(argv) => {
|
|
2665
|
-
if (argv.verbose) console.log("Up");
|
|
2666
|
-
process.exitCode = up();
|
|
2667
|
-
}
|
|
2668
|
-
).command(
|
|
2669
|
-
"updo",
|
|
2670
|
-
"Updo - Update dependencies [Interactive]",
|
|
2671
|
-
(yargs2) => {
|
|
2672
|
-
return yargs2;
|
|
2673
|
-
},
|
|
2674
|
-
(argv) => {
|
|
2675
|
-
if (argv.verbose) console.log("Updo");
|
|
2676
|
-
process.exitCode = updo();
|
|
2677
|
-
}
|
|
2678
|
-
).command(
|
|
2679
|
-
"statics",
|
|
2680
|
-
"Statics - Confirming Static Packages",
|
|
2681
|
-
(yargs2) => {
|
|
2682
|
-
return yargs2;
|
|
2683
|
-
},
|
|
2684
|
-
(argv) => {
|
|
2685
|
-
if (argv.verbose) console.log("Statics");
|
|
2686
|
-
process.exitCode = statics();
|
|
2687
|
-
}
|
|
2688
|
-
).command(
|
|
2689
|
-
"dupdeps",
|
|
2690
|
-
"Dupdeps - Duplicate Dependencies in package.json",
|
|
2691
|
-
(yargs2) => {
|
|
2692
|
-
return yargs2;
|
|
2693
|
-
},
|
|
2694
|
-
(argv) => {
|
|
2695
|
-
if (argv.verbose) console.log("Dupdeps");
|
|
2696
|
-
process.exitCode = dupdeps();
|
|
2697
|
-
}
|
|
2698
|
-
);
|
|
2908
|
+
return args.command(cleanCommand).command(reinstallCommand).command(upCommand).command(updoCommand).command(staticsCommand).command(dupdepsCommand);
|
|
2699
2909
|
};
|
|
2700
2910
|
|
|
2701
|
-
// src/xy/
|
|
2911
|
+
// src/xy/lint/cycleCommand.ts
|
|
2702
2912
|
import chalk30 from "chalk";
|
|
2913
|
+
var cycleCommand = {
|
|
2914
|
+
command: "cycle [package]",
|
|
2915
|
+
describe: "Cycle - Check for dependency cycles",
|
|
2916
|
+
builder: (yargs2) => {
|
|
2917
|
+
return packagePositionalParam(yargs2);
|
|
2918
|
+
},
|
|
2919
|
+
handler: async (argv) => {
|
|
2920
|
+
const start = Date.now();
|
|
2921
|
+
if (argv.verbose) console.log("Cycle");
|
|
2922
|
+
process.exitCode = await cycle({ pkg: argv.package });
|
|
2923
|
+
console.log(chalk30.blue(`Finished in ${Date.now() - start}ms`));
|
|
2924
|
+
}
|
|
2925
|
+
};
|
|
2926
|
+
|
|
2927
|
+
// src/xy/lint/deplintCommand.ts
|
|
2928
|
+
import chalk31 from "chalk";
|
|
2929
|
+
var deplintCommand = {
|
|
2930
|
+
command: "deplint [package]",
|
|
2931
|
+
describe: "Deplint - Run Deplint",
|
|
2932
|
+
builder: (yargs2) => {
|
|
2933
|
+
return packagePositionalParam(yargs2).option("deps", {
|
|
2934
|
+
alias: "d",
|
|
2935
|
+
default: false,
|
|
2936
|
+
description: "Check dependencies",
|
|
2937
|
+
type: "boolean"
|
|
2938
|
+
}).option("devDeps", {
|
|
2939
|
+
alias: "v",
|
|
2940
|
+
default: false,
|
|
2941
|
+
description: "Check devDependencies",
|
|
2942
|
+
type: "boolean"
|
|
2943
|
+
}).option("peerDeps", {
|
|
2944
|
+
alias: "p",
|
|
2945
|
+
default: false,
|
|
2946
|
+
description: "Check peerDependencies",
|
|
2947
|
+
type: "boolean"
|
|
2948
|
+
}).option("exclude", {
|
|
2949
|
+
alias: "e",
|
|
2950
|
+
description: "Package names to exclude from unused checks (comma-separated or repeated)",
|
|
2951
|
+
type: "array"
|
|
2952
|
+
});
|
|
2953
|
+
},
|
|
2954
|
+
handler: async (argv) => {
|
|
2955
|
+
if (argv.verbose) console.log("Deplint");
|
|
2956
|
+
const start = Date.now();
|
|
2957
|
+
const cliExclude = argv.exclude?.flatMap((v) => String(v).split(",")).map((v) => v.trim()).filter(Boolean);
|
|
2958
|
+
process.exitCode = await deplint({
|
|
2959
|
+
cliExclude,
|
|
2960
|
+
pkg: argv.package,
|
|
2961
|
+
deps: !!argv.deps,
|
|
2962
|
+
devDeps: !!argv.devDeps,
|
|
2963
|
+
peerDeps: !!argv.peerDeps,
|
|
2964
|
+
verbose: !!argv.verbose
|
|
2965
|
+
});
|
|
2966
|
+
console.log(chalk31.blue(`Finished in ${Date.now() - start}ms`));
|
|
2967
|
+
}
|
|
2968
|
+
};
|
|
2969
|
+
|
|
2970
|
+
// src/xy/lint/fixCommand.ts
|
|
2971
|
+
import chalk32 from "chalk";
|
|
2972
|
+
var fixCommand = {
|
|
2973
|
+
command: "fix [package]",
|
|
2974
|
+
describe: "Fix - Run Eslint w/fix",
|
|
2975
|
+
builder: (yargs2) => {
|
|
2976
|
+
return packagePositionalParam(yargs2);
|
|
2977
|
+
},
|
|
2978
|
+
handler: (argv) => {
|
|
2979
|
+
const start = Date.now();
|
|
2980
|
+
if (argv.verbose) console.log("Fix");
|
|
2981
|
+
process.exitCode = fix();
|
|
2982
|
+
console.log(chalk32.blue(`Finished in ${Date.now() - start}ms`));
|
|
2983
|
+
}
|
|
2984
|
+
};
|
|
2985
|
+
|
|
2986
|
+
// src/xy/lint/knipCommand.ts
|
|
2987
|
+
import chalk33 from "chalk";
|
|
2988
|
+
var knipCommand = {
|
|
2989
|
+
command: "knip",
|
|
2990
|
+
describe: "Knip - Run Knip",
|
|
2991
|
+
builder: (yargs2) => {
|
|
2992
|
+
return packagePositionalParam(yargs2);
|
|
2993
|
+
},
|
|
2994
|
+
handler: (argv) => {
|
|
2995
|
+
if (argv.verbose) console.log("Knip");
|
|
2996
|
+
const start = Date.now();
|
|
2997
|
+
process.exitCode = knip();
|
|
2998
|
+
console.log(chalk33.blue(`Knip finished in ${Date.now() - start}ms`));
|
|
2999
|
+
}
|
|
3000
|
+
};
|
|
3001
|
+
|
|
3002
|
+
// src/xy/lint/lintCommand.ts
|
|
3003
|
+
import chalk34 from "chalk";
|
|
3004
|
+
var lintCommand = {
|
|
3005
|
+
command: "lint [package]",
|
|
3006
|
+
describe: "Lint - Run Eslint",
|
|
3007
|
+
builder: (yargs2) => {
|
|
3008
|
+
return packagePositionalParam(yargs2).option("fix", {
|
|
3009
|
+
alias: "f",
|
|
3010
|
+
default: false,
|
|
3011
|
+
description: "Fix fixable issues",
|
|
3012
|
+
type: "boolean"
|
|
3013
|
+
}).option("cache", {
|
|
3014
|
+
alias: "c",
|
|
3015
|
+
default: false,
|
|
3016
|
+
description: "Use caching for performance",
|
|
3017
|
+
type: "boolean"
|
|
3018
|
+
});
|
|
3019
|
+
},
|
|
3020
|
+
handler: (argv) => {
|
|
3021
|
+
if (argv.verbose) console.log("Lint");
|
|
3022
|
+
const start = Date.now();
|
|
3023
|
+
process.exitCode = argv.fix ? fix({
|
|
3024
|
+
pkg: argv.package,
|
|
3025
|
+
cache: argv.cache,
|
|
3026
|
+
verbose: !!argv.verbose
|
|
3027
|
+
}) : lint({
|
|
3028
|
+
pkg: argv.package,
|
|
3029
|
+
cache: argv.cache,
|
|
3030
|
+
verbose: !!argv.verbose
|
|
3031
|
+
});
|
|
3032
|
+
console.log(chalk34.blue(`Finished in ${Date.now() - start}ms`));
|
|
3033
|
+
}
|
|
3034
|
+
};
|
|
3035
|
+
|
|
3036
|
+
// src/xy/lint/publintCommand.ts
|
|
3037
|
+
import chalk35 from "chalk";
|
|
3038
|
+
var publintCommand = {
|
|
3039
|
+
command: "publint [package]",
|
|
3040
|
+
describe: "Publint - Run Publint",
|
|
3041
|
+
builder: (yargs2) => {
|
|
3042
|
+
return packagePositionalParam(yargs2);
|
|
3043
|
+
},
|
|
3044
|
+
handler: async (argv) => {
|
|
3045
|
+
if (argv.verbose) console.log("Publint");
|
|
3046
|
+
const start = Date.now();
|
|
3047
|
+
process.exitCode = await publint({ pkg: argv.package, verbose: !!argv.verbose });
|
|
3048
|
+
console.log(chalk35.blue(`Finished in ${Date.now() - start}ms`));
|
|
3049
|
+
}
|
|
3050
|
+
};
|
|
3051
|
+
|
|
3052
|
+
// src/xy/lint/relintCommand.ts
|
|
3053
|
+
import chalk36 from "chalk";
|
|
3054
|
+
var relintCommand = {
|
|
3055
|
+
command: "relint [package]",
|
|
3056
|
+
describe: "Relint - Clean & Lint",
|
|
3057
|
+
builder: (yargs2) => {
|
|
3058
|
+
return packagePositionalParam(yargs2);
|
|
3059
|
+
},
|
|
3060
|
+
handler: (argv) => {
|
|
3061
|
+
if (argv.verbose) console.log("Relinting");
|
|
3062
|
+
const start = Date.now();
|
|
3063
|
+
process.exitCode = relint();
|
|
3064
|
+
console.log(chalk36.blue(`Finished in ${Date.now() - start}ms`));
|
|
3065
|
+
}
|
|
3066
|
+
};
|
|
3067
|
+
|
|
3068
|
+
// src/xy/lint/sonarCommand.ts
|
|
3069
|
+
import chalk37 from "chalk";
|
|
3070
|
+
var sonarCommand = {
|
|
3071
|
+
command: "sonar",
|
|
3072
|
+
describe: "Sonar - Run Sonar Check",
|
|
3073
|
+
builder: (yargs2) => {
|
|
3074
|
+
return packagePositionalParam(yargs2);
|
|
3075
|
+
},
|
|
3076
|
+
handler: (argv) => {
|
|
3077
|
+
const start = Date.now();
|
|
3078
|
+
if (argv.verbose) console.log("Sonar Check");
|
|
3079
|
+
process.exitCode = sonar();
|
|
3080
|
+
console.log(chalk37.blue(`Finished in ${Date.now() - start}ms`));
|
|
3081
|
+
}
|
|
3082
|
+
};
|
|
3083
|
+
|
|
3084
|
+
// src/xy/lint/index.ts
|
|
2703
3085
|
var xyLintCommands = (args) => {
|
|
2704
|
-
return args.command(
|
|
2705
|
-
"cycle [package]",
|
|
2706
|
-
"Cycle - Check for dependency cycles",
|
|
2707
|
-
(yargs2) => {
|
|
2708
|
-
return packagePositionalParam(yargs2);
|
|
2709
|
-
},
|
|
2710
|
-
async (argv) => {
|
|
2711
|
-
const start = Date.now();
|
|
2712
|
-
if (argv.verbose) console.log("Cycle");
|
|
2713
|
-
process.exitCode = await cycle({ pkg: argv.package });
|
|
2714
|
-
console.log(chalk30.blue(`Finished in ${Date.now() - start}ms`));
|
|
2715
|
-
}
|
|
2716
|
-
).command(
|
|
2717
|
-
"lint [package]",
|
|
2718
|
-
"Lint - Run Eslint",
|
|
2719
|
-
(yargs2) => {
|
|
2720
|
-
return packagePositionalParam(yargs2).option("fix", {
|
|
2721
|
-
alias: "f",
|
|
2722
|
-
default: false,
|
|
2723
|
-
description: "Fix fixable issues",
|
|
2724
|
-
type: "boolean"
|
|
2725
|
-
}).option("cache", {
|
|
2726
|
-
alias: "c",
|
|
2727
|
-
default: false,
|
|
2728
|
-
description: "Use caching for performance",
|
|
2729
|
-
type: "boolean"
|
|
2730
|
-
});
|
|
2731
|
-
},
|
|
2732
|
-
(argv) => {
|
|
2733
|
-
if (argv.verbose) console.log("Lint");
|
|
2734
|
-
const start = Date.now();
|
|
2735
|
-
process.exitCode = argv.fix ? fix({
|
|
2736
|
-
pkg: argv.package,
|
|
2737
|
-
cache: argv.cache,
|
|
2738
|
-
verbose: !!argv.verbose
|
|
2739
|
-
}) : lint({
|
|
2740
|
-
pkg: argv.package,
|
|
2741
|
-
cache: argv.cache,
|
|
2742
|
-
verbose: !!argv.verbose
|
|
2743
|
-
});
|
|
2744
|
-
console.log(chalk30.blue(`Finished in ${Date.now() - start}ms`));
|
|
2745
|
-
}
|
|
2746
|
-
).command(
|
|
2747
|
-
"deplint [package]",
|
|
2748
|
-
"Deplint - Run Deplint",
|
|
2749
|
-
(yargs2) => {
|
|
2750
|
-
return packagePositionalParam(yargs2).option("deps", {
|
|
2751
|
-
alias: "d",
|
|
2752
|
-
default: false,
|
|
2753
|
-
description: "Check dependencies",
|
|
2754
|
-
type: "boolean"
|
|
2755
|
-
}).option("devDeps", {
|
|
2756
|
-
alias: "v",
|
|
2757
|
-
default: false,
|
|
2758
|
-
description: "Check devDependencies",
|
|
2759
|
-
type: "boolean"
|
|
2760
|
-
}).option("peerDeps", {
|
|
2761
|
-
alias: "p",
|
|
2762
|
-
default: false,
|
|
2763
|
-
description: "Check peerDependencies",
|
|
2764
|
-
type: "boolean"
|
|
2765
|
-
}).option("exclude", {
|
|
2766
|
-
alias: "e",
|
|
2767
|
-
description: "Package names to exclude from unused checks (comma-separated or repeated)",
|
|
2768
|
-
type: "array"
|
|
2769
|
-
});
|
|
2770
|
-
},
|
|
2771
|
-
async (argv) => {
|
|
2772
|
-
if (argv.verbose) console.log("Deplint");
|
|
2773
|
-
const start = Date.now();
|
|
2774
|
-
const cliExclude = argv.exclude?.flatMap((v) => String(v).split(",")).map((v) => v.trim()).filter(Boolean);
|
|
2775
|
-
process.exitCode = await deplint({
|
|
2776
|
-
cliExclude,
|
|
2777
|
-
pkg: argv.package,
|
|
2778
|
-
deps: !!argv.deps,
|
|
2779
|
-
devDeps: !!argv.devDeps,
|
|
2780
|
-
peerDeps: !!argv.peerDeps,
|
|
2781
|
-
verbose: !!argv.verbose
|
|
2782
|
-
});
|
|
2783
|
-
console.log(chalk30.blue(`Finished in ${Date.now() - start}ms`));
|
|
2784
|
-
}
|
|
2785
|
-
).command(
|
|
2786
|
-
"fix [package]",
|
|
2787
|
-
"Fix - Run Eslint w/fix",
|
|
2788
|
-
(yargs2) => {
|
|
2789
|
-
return packagePositionalParam(yargs2);
|
|
2790
|
-
},
|
|
2791
|
-
(argv) => {
|
|
2792
|
-
const start = Date.now();
|
|
2793
|
-
if (argv.verbose) console.log("Fix");
|
|
2794
|
-
process.exitCode = fix();
|
|
2795
|
-
console.log(chalk30.blue(`Finished in ${Date.now() - start}ms`));
|
|
2796
|
-
}
|
|
2797
|
-
).command(
|
|
2798
|
-
"relint [package]",
|
|
2799
|
-
"Relint - Clean & Lint",
|
|
2800
|
-
(yargs2) => {
|
|
2801
|
-
return packagePositionalParam(yargs2);
|
|
2802
|
-
},
|
|
2803
|
-
(argv) => {
|
|
2804
|
-
if (argv.verbose) console.log("Relinting");
|
|
2805
|
-
const start = Date.now();
|
|
2806
|
-
process.exitCode = relint();
|
|
2807
|
-
console.log(chalk30.blue(`Finished in ${Date.now() - start}ms`));
|
|
2808
|
-
}
|
|
2809
|
-
).command(
|
|
2810
|
-
"publint [package]",
|
|
2811
|
-
"Publint - Run Publint",
|
|
2812
|
-
(yargs2) => {
|
|
2813
|
-
return packagePositionalParam(yargs2);
|
|
2814
|
-
},
|
|
2815
|
-
async (argv) => {
|
|
2816
|
-
if (argv.verbose) console.log("Publint");
|
|
2817
|
-
const start = Date.now();
|
|
2818
|
-
process.exitCode = await publint({ pkg: argv.package, verbose: !!argv.verbose });
|
|
2819
|
-
console.log(chalk30.blue(`Finished in ${Date.now() - start}ms`));
|
|
2820
|
-
}
|
|
2821
|
-
).command(
|
|
2822
|
-
"knip",
|
|
2823
|
-
"Knip - Run Knip",
|
|
2824
|
-
(yargs2) => {
|
|
2825
|
-
return packagePositionalParam(yargs2);
|
|
2826
|
-
},
|
|
2827
|
-
(argv) => {
|
|
2828
|
-
if (argv.verbose) console.log("Knip");
|
|
2829
|
-
const start = Date.now();
|
|
2830
|
-
process.exitCode = knip();
|
|
2831
|
-
console.log(chalk30.blue(`Knip finished in ${Date.now() - start}ms`));
|
|
2832
|
-
}
|
|
2833
|
-
).command(
|
|
2834
|
-
"sonar",
|
|
2835
|
-
"Sonar - Run Sonar Check",
|
|
2836
|
-
(yargs2) => {
|
|
2837
|
-
return packagePositionalParam(yargs2);
|
|
2838
|
-
},
|
|
2839
|
-
(argv) => {
|
|
2840
|
-
const start = Date.now();
|
|
2841
|
-
if (argv.verbose) console.log("Sonar Check");
|
|
2842
|
-
process.exitCode = sonar();
|
|
2843
|
-
console.log(chalk30.blue(`Finished in ${Date.now() - start}ms`));
|
|
2844
|
-
}
|
|
2845
|
-
);
|
|
3086
|
+
return args.command(cycleCommand).command(lintCommand).command(deplintCommand).command(fixCommand).command(relintCommand).command(publintCommand).command(knipCommand).command(sonarCommand);
|
|
2846
3087
|
};
|
|
2847
3088
|
|
|
3089
|
+
// src/xy/xy.ts
|
|
3090
|
+
import chalk38 from "chalk";
|
|
3091
|
+
|
|
2848
3092
|
// src/xy/xyParseOptions.ts
|
|
2849
3093
|
import yargs from "yargs";
|
|
2850
3094
|
import { hideBin } from "yargs/helpers";
|
|
@@ -2876,8 +3120,8 @@ var xyParseOptions = () => {
|
|
|
2876
3120
|
var xy = async () => {
|
|
2877
3121
|
const options = xyParseOptions();
|
|
2878
3122
|
return await xyBuildCommands(xyCommonCommands(xyInstallCommands(xyDeployCommands(xyLintCommands(options))))).demandCommand(1).command("*", "", () => {
|
|
2879
|
-
console.error(
|
|
2880
|
-
console.log(
|
|
3123
|
+
console.error(chalk38.yellow(`Command not found [${chalk38.magenta(process.argv[2])}]`));
|
|
3124
|
+
console.log(chalk38.gray("Try 'yarn xy --help' for list of commands"));
|
|
2881
3125
|
}).version().help().argv;
|
|
2882
3126
|
};
|
|
2883
3127
|
|