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