@xylabs/ts-scripts-yarn3 7.4.9 → 7.4.10

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.
Files changed (35) hide show
  1. package/dist/actions/claude-commands.mjs +99 -0
  2. package/dist/actions/claude-commands.mjs.map +1 -0
  3. package/dist/actions/claude-rules.mjs.map +1 -1
  4. package/dist/actions/index.mjs +222 -141
  5. package/dist/actions/index.mjs.map +1 -1
  6. package/dist/bin/xy.mjs +184 -96
  7. package/dist/bin/xy.mjs.map +1 -1
  8. package/dist/index.d.ts +5 -1
  9. package/dist/index.mjs +244 -153
  10. package/dist/index.mjs.map +1 -1
  11. package/dist/lib/claudeMdTemplate.mjs +12 -0
  12. package/dist/lib/claudeMdTemplate.mjs.map +1 -1
  13. package/dist/lib/index.mjs +12 -0
  14. package/dist/lib/index.mjs.map +1 -1
  15. package/dist/xy/index.mjs +184 -96
  16. package/dist/xy/index.mjs.map +1 -1
  17. package/dist/xy/xy.mjs +184 -96
  18. package/dist/xy/xy.mjs.map +1 -1
  19. package/dist/xy/xyCommonCommands.mjs +122 -34
  20. package/dist/xy/xyCommonCommands.mjs.map +1 -1
  21. package/package.json +2 -2
  22. package/templates/commands/xylabs-build.md +5 -0
  23. package/templates/commands/xylabs-clean.md +5 -0
  24. package/templates/commands/xylabs-compile.md +5 -0
  25. package/templates/commands/xylabs-cycle.md +5 -0
  26. package/templates/commands/xylabs-deplint.md +5 -0
  27. package/templates/commands/xylabs-deploy-major.md +7 -0
  28. package/templates/commands/xylabs-deploy-minor.md +7 -0
  29. package/templates/commands/xylabs-deploy.md +7 -0
  30. package/templates/commands/xylabs-fix.md +5 -0
  31. package/templates/commands/xylabs-knip.md +5 -0
  32. package/templates/commands/xylabs-lint.md +5 -0
  33. package/templates/commands/xylabs-publint.md +5 -0
  34. package/templates/commands/xylabs-rebuild.md +5 -0
  35. package/templates/commands/xylabs-test.md +5 -0
package/dist/index.mjs CHANGED
@@ -22,6 +22,7 @@ var require2 = createRequire(import.meta.url);
22
22
  var packageRoot = PATH.dirname(require2.resolve("@xylabs/ts-scripts-yarn3/package.json"));
23
23
  var templatesDir = PATH.resolve(packageRoot, "templates");
24
24
  var XYLABS_RULES_PREFIX = "xylabs-";
25
+ var XYLABS_COMMANDS_PREFIX = "xylabs-";
25
26
  var claudeMdRuleTemplates = () => {
26
27
  const rulesDir = PATH.resolve(templatesDir, "rules");
27
28
  const files = readdirSync(rulesDir).filter((f) => f.startsWith(XYLABS_RULES_PREFIX) && f.endsWith(".md"));
@@ -31,6 +32,15 @@ var claudeMdRuleTemplates = () => {
31
32
  }
32
33
  return result;
33
34
  };
35
+ var claudeCommandTemplates = () => {
36
+ const commandsDir = PATH.resolve(templatesDir, "commands");
37
+ const files = readdirSync(commandsDir).filter((f) => f.startsWith(XYLABS_COMMANDS_PREFIX) && f.endsWith(".md"));
38
+ const result = {};
39
+ for (const file of files) {
40
+ result[file] = readFileSync(PATH.resolve(commandsDir, file), "utf8");
41
+ }
42
+ return result;
43
+ };
34
44
  var claudeMdProjectTemplate = () => readFileSync(PATH.resolve(templatesDir, "CLAUDE-project.md"), "utf8");
35
45
 
36
46
  // src/lib/createBuildConfig.ts
@@ -522,7 +532,7 @@ var build = async ({
522
532
  return result;
523
533
  };
524
534
 
525
- // src/actions/claude-rules.ts
535
+ // src/actions/claude-commands.ts
526
536
  import {
527
537
  existsSync as existsSync5,
528
538
  mkdirSync,
@@ -533,13 +543,13 @@ import {
533
543
  } from "fs";
534
544
  import PATH2 from "path";
535
545
  import chalk10 from "chalk";
536
- var syncRuleFiles = (rulesDir) => {
537
- const templates = claudeMdRuleTemplates();
546
+ var syncCommandFiles = (commandsDir) => {
547
+ const templates = claudeCommandTemplates();
538
548
  const templateNames = new Set(Object.keys(templates));
539
549
  let updated = 0;
540
550
  let created = 0;
541
551
  for (const [filename3, content] of Object.entries(templates)) {
542
- const targetPath = PATH2.resolve(rulesDir, filename3);
552
+ const targetPath = PATH2.resolve(commandsDir, filename3);
543
553
  const existing = existsSync5(targetPath) ? readFileSync6(targetPath, "utf8") : void 0;
544
554
  if (existing === content) continue;
545
555
  writeFileSync2(targetPath, content, "utf8");
@@ -555,12 +565,82 @@ var syncRuleFiles = (rulesDir) => {
555
565
  updated
556
566
  };
557
567
  };
568
+ var removeStaleCommands = (commandsDir, templateNames) => {
569
+ const existingCommands = readdirSync2(commandsDir).filter((f) => f.startsWith(XYLABS_COMMANDS_PREFIX) && f.endsWith(".md"));
570
+ let removed = 0;
571
+ for (const file of existingCommands) {
572
+ if (!templateNames.has(file)) {
573
+ unlinkSync(PATH2.resolve(commandsDir, file));
574
+ removed++;
575
+ }
576
+ }
577
+ return removed;
578
+ };
579
+ var logCommandsResult = (created, updated, removed) => {
580
+ if (created || updated || removed) {
581
+ const parts = [
582
+ created ? `${created} created` : "",
583
+ updated ? `${updated} updated` : "",
584
+ removed ? `${removed} removed` : ""
585
+ ].filter(Boolean);
586
+ console.log(chalk10.green(`.claude/commands/${XYLABS_COMMANDS_PREFIX}*.md: ${parts.join(", ")}`));
587
+ } else {
588
+ console.log(chalk10.gray(`.claude/commands/${XYLABS_COMMANDS_PREFIX}*.md: already up to date`));
589
+ }
590
+ };
591
+ var claudeCommands = () => {
592
+ const cwd5 = INIT_CWD() ?? process.cwd();
593
+ const commandsDir = PATH2.resolve(cwd5, ".claude", "commands");
594
+ mkdirSync(commandsDir, { recursive: true });
595
+ const {
596
+ created,
597
+ templateNames,
598
+ updated
599
+ } = syncCommandFiles(commandsDir);
600
+ const removed = removeStaleCommands(commandsDir, templateNames);
601
+ logCommandsResult(created, updated, removed);
602
+ return 0;
603
+ };
604
+
605
+ // src/actions/claude-rules.ts
606
+ import {
607
+ existsSync as existsSync6,
608
+ mkdirSync as mkdirSync2,
609
+ readdirSync as readdirSync3,
610
+ readFileSync as readFileSync7,
611
+ unlinkSync as unlinkSync2,
612
+ writeFileSync as writeFileSync3
613
+ } from "fs";
614
+ import PATH3 from "path";
615
+ import chalk11 from "chalk";
616
+ var syncRuleFiles = (rulesDir) => {
617
+ const templates = claudeMdRuleTemplates();
618
+ const templateNames = new Set(Object.keys(templates));
619
+ let updated = 0;
620
+ let created = 0;
621
+ for (const [filename3, content] of Object.entries(templates)) {
622
+ const targetPath = PATH3.resolve(rulesDir, filename3);
623
+ const existing = existsSync6(targetPath) ? readFileSync7(targetPath, "utf8") : void 0;
624
+ if (existing === content) continue;
625
+ writeFileSync3(targetPath, content, "utf8");
626
+ if (existing) {
627
+ updated++;
628
+ } else {
629
+ created++;
630
+ }
631
+ }
632
+ return {
633
+ created,
634
+ templateNames,
635
+ updated
636
+ };
637
+ };
558
638
  var removeStaleRules = (rulesDir, templateNames) => {
559
- const existingRules = readdirSync2(rulesDir).filter((f) => f.startsWith(XYLABS_RULES_PREFIX) && f.endsWith(".md"));
639
+ const existingRules = readdirSync3(rulesDir).filter((f) => f.startsWith(XYLABS_RULES_PREFIX) && f.endsWith(".md"));
560
640
  let removed = 0;
561
641
  for (const file of existingRules) {
562
642
  if (!templateNames.has(file)) {
563
- unlinkSync(PATH2.resolve(rulesDir, file));
643
+ unlinkSync2(PATH3.resolve(rulesDir, file));
564
644
  removed++;
565
645
  }
566
646
  }
@@ -573,27 +653,27 @@ var logRulesResult = (created, updated, removed) => {
573
653
  updated ? `${updated} updated` : "",
574
654
  removed ? `${removed} removed` : ""
575
655
  ].filter(Boolean);
576
- console.log(chalk10.green(`.claude/rules/${XYLABS_RULES_PREFIX}*.md: ${parts.join(", ")}`));
656
+ console.log(chalk11.green(`.claude/rules/${XYLABS_RULES_PREFIX}*.md: ${parts.join(", ")}`));
577
657
  } else {
578
- console.log(chalk10.gray(`.claude/rules/${XYLABS_RULES_PREFIX}*.md: already up to date`));
658
+ console.log(chalk11.gray(`.claude/rules/${XYLABS_RULES_PREFIX}*.md: already up to date`));
579
659
  }
580
660
  };
581
661
  var ensureProjectClaudeMd = (cwd5, force) => {
582
- const projectPath = PATH2.resolve(cwd5, "CLAUDE.md");
583
- if (!existsSync5(projectPath) || force) {
584
- if (force && existsSync5(projectPath)) {
585
- console.log(chalk10.yellow("Overwriting existing CLAUDE.md"));
662
+ const projectPath = PATH3.resolve(cwd5, "CLAUDE.md");
663
+ if (!existsSync6(projectPath) || force) {
664
+ if (force && existsSync6(projectPath)) {
665
+ console.log(chalk11.yellow("Overwriting existing CLAUDE.md"));
586
666
  }
587
- writeFileSync2(projectPath, claudeMdProjectTemplate(), "utf8");
588
- console.log(chalk10.green("Generated CLAUDE.md"));
667
+ writeFileSync3(projectPath, claudeMdProjectTemplate(), "utf8");
668
+ console.log(chalk11.green("Generated CLAUDE.md"));
589
669
  } else {
590
- console.log(chalk10.gray("CLAUDE.md already exists (skipped)"));
670
+ console.log(chalk11.gray("CLAUDE.md already exists (skipped)"));
591
671
  }
592
672
  };
593
673
  var claudeRules = ({ force } = {}) => {
594
674
  const cwd5 = INIT_CWD() ?? process.cwd();
595
- const rulesDir = PATH2.resolve(cwd5, ".claude", "rules");
596
- mkdirSync(rulesDir, { recursive: true });
675
+ const rulesDir = PATH3.resolve(cwd5, ".claude", "rules");
676
+ mkdirSync2(rulesDir, { recursive: true });
597
677
  const {
598
678
  created,
599
679
  templateNames,
@@ -619,16 +699,16 @@ var cleanAll = ({ verbose }) => {
619
699
 
620
700
  // src/actions/clean-docs.ts
621
701
  import path from "path";
622
- import chalk11 from "chalk";
702
+ import chalk12 from "chalk";
623
703
  var cleanDocs = () => {
624
704
  const pkgName = process.env.npm_package_name;
625
- console.log(chalk11.green(`Cleaning Docs [${pkgName}]`));
705
+ console.log(chalk12.green(`Cleaning Docs [${pkgName}]`));
626
706
  for (const { location } of yarnWorkspaces()) deleteGlob(path.join(location, "docs"));
627
707
  return 0;
628
708
  };
629
709
 
630
710
  // src/actions/compile.ts
631
- import chalk12 from "chalk";
711
+ import chalk13 from "chalk";
632
712
  var compile = ({
633
713
  verbose,
634
714
  target,
@@ -669,7 +749,7 @@ var compileAll = ({
669
749
  const incrementalOptions = incremental ? ["--since", "-Ap", "--topological-dev"] : ["--parallel", "-Ap", "--topological-dev"];
670
750
  const jobsOptions = jobs ? ["-j", `${jobs}`] : [];
671
751
  if (jobs) {
672
- console.log(chalk12.blue(`Jobs set to [${jobs}]`));
752
+ console.log(chalk13.blue(`Jobs set to [${jobs}]`));
673
753
  }
674
754
  const result = runSteps(`Compile${incremental ? "-Incremental" : ""} [All]`, [
675
755
  ["yarn", [
@@ -683,13 +763,13 @@ var compileAll = ({
683
763
  ...targetOptions
684
764
  ]]
685
765
  ]);
686
- console.log(`${chalk12.gray("Compiled in")} [${chalk12.magenta(((Date.now() - start) / 1e3).toFixed(2))}] ${chalk12.gray("seconds")}`);
766
+ console.log(`${chalk13.gray("Compiled in")} [${chalk13.magenta(((Date.now() - start) / 1e3).toFixed(2))}] ${chalk13.gray("seconds")}`);
687
767
  return result;
688
768
  };
689
769
 
690
770
  // src/actions/copy-assets.ts
691
771
  import path2 from "path/posix";
692
- import chalk13 from "chalk";
772
+ import chalk14 from "chalk";
693
773
  import cpy from "cpy";
694
774
  var copyPackageTargetAssets = async (target, name, location) => {
695
775
  try {
@@ -712,7 +792,7 @@ var copyPackageTargetAssets = async (target, name, location) => {
712
792
  };
713
793
  var copyTargetAssets = async (target, pkg) => {
714
794
  const workspaces = yarnWorkspaces();
715
- console.log(chalk13.green(`Copying Assets [${target.toUpperCase()}]`));
795
+ console.log(chalk14.green(`Copying Assets [${target.toUpperCase()}]`));
716
796
  const workspaceList = workspaces.filter(({ name }) => {
717
797
  return pkg === void 0 || name === pkg;
718
798
  });
@@ -796,7 +876,7 @@ var dead = () => {
796
876
  };
797
877
 
798
878
  // src/actions/deplint/deplint.ts
799
- import chalk19 from "chalk";
879
+ import chalk20 from "chalk";
800
880
 
801
881
  // src/actions/deplint/findFiles.ts
802
882
  import fs2 from "fs";
@@ -998,12 +1078,12 @@ function getExternalImportsFromFiles({
998
1078
 
999
1079
  // src/actions/deplint/checkPackage/getUnlistedDependencies.ts
1000
1080
  import { builtinModules } from "module";
1001
- import chalk14 from "chalk";
1081
+ import chalk15 from "chalk";
1002
1082
  function isListedOrBuiltin(imp, name, dependencies, peerDependencies) {
1003
1083
  return dependencies.includes(imp) || imp === name || dependencies.includes(`@types/${imp}`) || peerDependencies.includes(imp) || peerDependencies.includes(`@types/${imp}`) || builtinModules.includes(imp) || builtinModules.includes(`@types/${imp}`);
1004
1084
  }
1005
1085
  function logMissing(name, imp, importPaths) {
1006
- console.log(`[${chalk14.blue(name)}] Missing dependency in package.json: ${chalk14.red(imp)}`);
1086
+ console.log(`[${chalk15.blue(name)}] Missing dependency in package.json: ${chalk15.red(imp)}`);
1007
1087
  if (importPaths[imp]) {
1008
1088
  console.log(` ${importPaths[imp].join("\n ")}`);
1009
1089
  }
@@ -1028,7 +1108,7 @@ function getUnlistedDependencies({ name, location }, { dependencies, peerDepende
1028
1108
  }
1029
1109
  if (unlistedDependencies > 0) {
1030
1110
  const packageLocation = `${location}/package.json`;
1031
- console.log(` ${chalk14.yellow(packageLocation)}
1111
+ console.log(` ${chalk15.yellow(packageLocation)}
1032
1112
  `);
1033
1113
  }
1034
1114
  return unlistedDependencies;
@@ -1036,7 +1116,7 @@ function getUnlistedDependencies({ name, location }, { dependencies, peerDepende
1036
1116
 
1037
1117
  // src/actions/deplint/checkPackage/getUnlistedDevDependencies.ts
1038
1118
  import { builtinModules as builtinModules2 } from "module";
1039
- import chalk15 from "chalk";
1119
+ import chalk16 from "chalk";
1040
1120
  function getUnlistedDevDependencies({ name, location }, {
1041
1121
  devDependencies,
1042
1122
  dependencies,
@@ -1050,7 +1130,7 @@ function getUnlistedDevDependencies({ name, location }, {
1050
1130
  for (const imp of externalAllImports) {
1051
1131
  if (!distImports.includes(imp) && imp !== name && !dependencies.includes(imp) && !dependencies.includes(`@types/${imp}`) && !peerDependencies.includes(imp) && !peerDependencies.includes(`@types/${imp}`) && !devDependencies.includes(imp) && !devDependencies.includes(`@types/${imp}`) && !builtinModules2.includes(imp)) {
1052
1132
  unlistedDevDependencies++;
1053
- console.log(`[${chalk15.blue(name)}] Missing devDependency in package.json: ${chalk15.red(imp)}`);
1133
+ console.log(`[${chalk16.blue(name)}] Missing devDependency in package.json: ${chalk16.red(imp)}`);
1054
1134
  if (allImportPaths[imp]) {
1055
1135
  console.log(` ${allImportPaths[imp].join("\n ")}`);
1056
1136
  }
@@ -1058,14 +1138,14 @@ function getUnlistedDevDependencies({ name, location }, {
1058
1138
  }
1059
1139
  if (unlistedDevDependencies > 0) {
1060
1140
  const packageLocation = `${location}/package.json`;
1061
- console.log(` ${chalk15.yellow(packageLocation)}
1141
+ console.log(` ${chalk16.yellow(packageLocation)}
1062
1142
  `);
1063
1143
  }
1064
1144
  return unlistedDevDependencies;
1065
1145
  }
1066
1146
 
1067
1147
  // src/actions/deplint/checkPackage/getUnusedDependencies.ts
1068
- import chalk16 from "chalk";
1148
+ import chalk17 from "chalk";
1069
1149
  function getUnusedDependencies({ name, location }, { dependencies }, {
1070
1150
  externalDistImports,
1071
1151
  externalDistTypeImports,
@@ -1076,22 +1156,22 @@ function getUnusedDependencies({ name, location }, { dependencies }, {
1076
1156
  if (!externalDistImports.includes(dep) && !externalDistImports.includes(dep.replace(/^@types\//, "")) && !externalDistTypeImports.includes(dep) && !externalDistTypeImports.includes(dep.replace(/^@types\//, ""))) {
1077
1157
  unusedDependencies++;
1078
1158
  if (externalAllImports.includes(dep)) {
1079
- console.log(`[${chalk16.blue(name)}] dependency should be devDependency in package.json: ${chalk16.red(dep)}`);
1159
+ console.log(`[${chalk17.blue(name)}] dependency should be devDependency in package.json: ${chalk17.red(dep)}`);
1080
1160
  } else {
1081
- console.log(`[${chalk16.blue(name)}] Unused dependency in package.json: ${chalk16.red(dep)}`);
1161
+ console.log(`[${chalk17.blue(name)}] Unused dependency in package.json: ${chalk17.red(dep)}`);
1082
1162
  }
1083
1163
  }
1084
1164
  }
1085
1165
  if (unusedDependencies > 0) {
1086
1166
  const packageLocation = `${location}/package.json`;
1087
- console.log(` ${chalk16.yellow(packageLocation)}
1167
+ console.log(` ${chalk17.yellow(packageLocation)}
1088
1168
  `);
1089
1169
  }
1090
1170
  return unusedDependencies;
1091
1171
  }
1092
1172
 
1093
1173
  // src/actions/deplint/checkPackage/getUnusedDevDependencies.ts
1094
- import chalk17 from "chalk";
1174
+ import chalk18 from "chalk";
1095
1175
 
1096
1176
  // src/actions/deplint/getRequiredPeerDependencies.ts
1097
1177
  import fs6 from "fs";
@@ -1279,34 +1359,34 @@ function getUnusedDevDependencies({ name, location }, {
1279
1359
  if (dependencies.includes(dep) || peerDependencies.includes(dep)) continue;
1280
1360
  if (!isDevDepUsed(dep, allImports, implicitDeps, requiredPeers, scriptRefs)) {
1281
1361
  unusedDevDependencies++;
1282
- console.log(`[${chalk17.blue(name)}] Unused devDependency in package.json: ${chalk17.red(dep)}`);
1362
+ console.log(`[${chalk18.blue(name)}] Unused devDependency in package.json: ${chalk18.red(dep)}`);
1283
1363
  }
1284
1364
  }
1285
1365
  if (unusedDevDependencies > 0) {
1286
1366
  const packageLocation = `${location}/package.json`;
1287
- console.log(` ${chalk17.yellow(packageLocation)}
1367
+ console.log(` ${chalk18.yellow(packageLocation)}
1288
1368
  `);
1289
1369
  }
1290
1370
  return unusedDevDependencies;
1291
1371
  }
1292
1372
 
1293
1373
  // src/actions/deplint/checkPackage/getUnusedPeerDependencies.ts
1294
- import chalk18 from "chalk";
1374
+ import chalk19 from "chalk";
1295
1375
  function getUnusedPeerDependencies({ name, location }, { peerDependencies, dependencies }, { externalDistImports, externalDistTypeImports }) {
1296
1376
  let unusedDependencies = 0;
1297
1377
  for (const dep of peerDependencies) {
1298
1378
  if (!externalDistImports.includes(dep) && !externalDistImports.includes(dep.replace(/^@types\//, "")) && !externalDistTypeImports.includes(dep) && !externalDistTypeImports.includes(dep.replace(/^@types\//, ""))) {
1299
1379
  unusedDependencies++;
1300
1380
  if (dependencies.includes(dep)) {
1301
- console.log(`[${chalk18.blue(name)}] Unused peerDependency [already a dependency] in package.json: ${chalk18.red(dep)}`);
1381
+ console.log(`[${chalk19.blue(name)}] Unused peerDependency [already a dependency] in package.json: ${chalk19.red(dep)}`);
1302
1382
  } else {
1303
- console.log(`[${chalk18.blue(name)}] Unused peerDependency in package.json: ${chalk18.red(dep)}`);
1383
+ console.log(`[${chalk19.blue(name)}] Unused peerDependency in package.json: ${chalk19.red(dep)}`);
1304
1384
  }
1305
1385
  }
1306
1386
  }
1307
1387
  if (unusedDependencies > 0) {
1308
1388
  const packageLocation = `${location}/package.json`;
1309
- console.log(` ${chalk18.yellow(packageLocation)}
1389
+ console.log(` ${chalk19.yellow(packageLocation)}
1310
1390
  `);
1311
1391
  }
1312
1392
  return unusedDependencies;
@@ -1392,19 +1472,19 @@ var deplint = ({
1392
1472
  });
1393
1473
  }
1394
1474
  if (totalErrors > 0) {
1395
- console.warn(`Deplint: Found ${chalk19.red(totalErrors)} dependency problems. ${chalk19.red("\u2716")}`);
1475
+ console.warn(`Deplint: Found ${chalk20.red(totalErrors)} dependency problems. ${chalk20.red("\u2716")}`);
1396
1476
  } else {
1397
- console.info(`Deplint: Found no dependency problems. ${chalk19.green("\u2714")}`);
1477
+ console.info(`Deplint: Found no dependency problems. ${chalk20.green("\u2714")}`);
1398
1478
  }
1399
1479
  return 0;
1400
1480
  };
1401
1481
 
1402
1482
  // src/actions/deploy.ts
1403
- import { readFileSync as readFileSync7 } from "fs";
1483
+ import { readFileSync as readFileSync8 } from "fs";
1404
1484
  var privatePackageExcludeList = () => {
1405
1485
  const possibleDeployablePackages = yarnWorkspaces().map((workspace) => [
1406
1486
  workspace,
1407
- JSON.parse(readFileSync7(`${workspace.location}/package.json`, { encoding: "utf8" }))
1487
+ JSON.parse(readFileSync8(`${workspace.location}/package.json`, { encoding: "utf8" }))
1408
1488
  ]);
1409
1489
  const privatePackages = possibleDeployablePackages.filter(([_, pkg]) => pkg.private).map(([workspace]) => workspace);
1410
1490
  const excludeList = privatePackages.map((workspace) => `--exclude ${workspace.name}`);
@@ -1424,11 +1504,11 @@ var deploy = () => {
1424
1504
  };
1425
1505
 
1426
1506
  // src/actions/deploy-major.ts
1427
- import { readFileSync as readFileSync8 } from "fs";
1507
+ import { readFileSync as readFileSync9 } from "fs";
1428
1508
  var privatePackageExcludeList2 = () => {
1429
1509
  const possibleDeployablePackages = yarnWorkspaces().map((workspace) => [
1430
1510
  workspace,
1431
- JSON.parse(readFileSync8(`${workspace.location}/package.json`, { encoding: "utf8" }))
1511
+ JSON.parse(readFileSync9(`${workspace.location}/package.json`, { encoding: "utf8" }))
1432
1512
  ]);
1433
1513
  const privatePackages = possibleDeployablePackages.filter(([_, pkg]) => pkg.private).map(([workspace]) => workspace);
1434
1514
  const excludeList = privatePackages.map((workspace) => `--exclude ${workspace.name}`);
@@ -1448,11 +1528,11 @@ var deployMajor = () => {
1448
1528
  };
1449
1529
 
1450
1530
  // src/actions/deploy-minor.ts
1451
- import { readFileSync as readFileSync9 } from "fs";
1531
+ import { readFileSync as readFileSync10 } from "fs";
1452
1532
  var privatePackageExcludeList3 = () => {
1453
1533
  const possibleDeployablePackages = yarnWorkspaces().map((workspace) => [
1454
1534
  workspace,
1455
- JSON.parse(readFileSync9(`${workspace.location}/package.json`, { encoding: "utf8" }))
1535
+ JSON.parse(readFileSync10(`${workspace.location}/package.json`, { encoding: "utf8" }))
1456
1536
  ]);
1457
1537
  const privatePackages = possibleDeployablePackages.filter(([_, pkg]) => pkg.private).map(([workspace]) => workspace);
1458
1538
  const excludeList = privatePackages.map((workspace) => `--exclude ${workspace.name}`);
@@ -1472,11 +1552,11 @@ var deployMinor = () => {
1472
1552
  };
1473
1553
 
1474
1554
  // src/actions/deploy-next.ts
1475
- import { readFileSync as readFileSync10 } from "fs";
1555
+ import { readFileSync as readFileSync11 } from "fs";
1476
1556
  var privatePackageExcludeList4 = () => {
1477
1557
  const possibleDeployablePackages = yarnWorkspaces().map((workspace) => [
1478
1558
  workspace,
1479
- JSON.parse(readFileSync10(`${workspace.location}/package.json`, { encoding: "utf8" }))
1559
+ JSON.parse(readFileSync11(`${workspace.location}/package.json`, { encoding: "utf8" }))
1480
1560
  ]);
1481
1561
  const privatePackages = possibleDeployablePackages.filter(([_, pkg]) => pkg.private).map(([workspace]) => workspace);
1482
1562
  const excludeList = privatePackages.map((workspace) => `--exclude ${workspace.name}`);
@@ -1496,22 +1576,22 @@ var deployNext = () => {
1496
1576
  };
1497
1577
 
1498
1578
  // src/actions/dupdeps.ts
1499
- import chalk20 from "chalk";
1579
+ import chalk21 from "chalk";
1500
1580
  var dupdeps = () => {
1501
- console.log(chalk20.green("Checking all Dependencies for Duplicates"));
1581
+ console.log(chalk21.green("Checking all Dependencies for Duplicates"));
1502
1582
  const allDependencies = parsedPackageJSON()?.dependencies;
1503
1583
  const dependencies = Object.entries(allDependencies).map(([k]) => k);
1504
1584
  return detectDuplicateDependencies(dependencies);
1505
1585
  };
1506
1586
 
1507
1587
  // src/actions/lint.ts
1508
- import chalk21 from "chalk";
1588
+ import chalk22 from "chalk";
1509
1589
  var lintPackage = ({
1510
1590
  pkg,
1511
1591
  fix: fix2,
1512
1592
  verbose
1513
1593
  }) => {
1514
- console.log(chalk21.gray(`${fix2 ? "Fix" : "Lint"} [${pkg}]`));
1594
+ console.log(chalk22.gray(`${fix2 ? "Fix" : "Lint"} [${pkg}]`));
1515
1595
  const start = Date.now();
1516
1596
  const result = runSteps(`${fix2 ? "Fix" : "Lint"} [${pkg}]`, [
1517
1597
  ["yarn", [
@@ -1521,7 +1601,7 @@ var lintPackage = ({
1521
1601
  fix2 ? "package-fix" : verbose ? "package-lint-verbose" : "package-lint"
1522
1602
  ]]
1523
1603
  ]);
1524
- console.log(chalk21.gray(`${fix2 ? "Fixed in" : "Linted in"} [${chalk21.magenta(((Date.now() - start) / 1e3).toFixed(2))}] ${chalk21.gray("seconds")}`));
1604
+ console.log(chalk22.gray(`${fix2 ? "Fixed in" : "Linted in"} [${chalk22.magenta(((Date.now() - start) / 1e3).toFixed(2))}] ${chalk22.gray("seconds")}`));
1525
1605
  return result;
1526
1606
  };
1527
1607
  var lint = ({
@@ -1541,13 +1621,13 @@ var lint = ({
1541
1621
  });
1542
1622
  };
1543
1623
  var lintAllPackages = ({ fix: fix2 = false } = {}) => {
1544
- console.log(chalk21.gray(`${fix2 ? "Fix" : "Lint"} [All-Packages]`));
1624
+ console.log(chalk22.gray(`${fix2 ? "Fix" : "Lint"} [All-Packages]`));
1545
1625
  const start = Date.now();
1546
1626
  const fixOptions = fix2 ? ["--fix"] : [];
1547
1627
  const result = runSteps(`${fix2 ? "Fix" : "Lint"} [All-Packages]`, [
1548
1628
  ["yarn", ["eslint", "--cache", "--cache-location", ".eslintcache", "--cache-strategy", "content", ...fixOptions]]
1549
1629
  ]);
1550
- console.log(chalk21.gray(`${fix2 ? "Fixed in" : "Linted in"} [${chalk21.magenta(((Date.now() - start) / 1e3).toFixed(2))}] ${chalk21.gray("seconds")}`));
1630
+ console.log(chalk22.gray(`${fix2 ? "Fixed in" : "Linted in"} [${chalk22.magenta(((Date.now() - start) / 1e3).toFixed(2))}] ${chalk22.gray("seconds")}`));
1551
1631
  return result;
1552
1632
  };
1553
1633
 
@@ -1575,7 +1655,7 @@ var filename = ".gitignore";
1575
1655
  var gitignoreGen = (pkg) => generateIgnoreFiles(filename, pkg);
1576
1656
 
1577
1657
  // src/actions/gitlint.ts
1578
- import chalk22 from "chalk";
1658
+ import chalk23 from "chalk";
1579
1659
  import ParseGitConfig from "parse-git-config";
1580
1660
  var gitlint = () => {
1581
1661
  console.log(`
@@ -1586,7 +1666,7 @@ Gitlint Start [${process.cwd()}]
1586
1666
  const errors = 0;
1587
1667
  const gitConfig = ParseGitConfig.sync();
1588
1668
  const warn = (message) => {
1589
- console.warn(chalk22.yellow(`Warning: ${message}`));
1669
+ console.warn(chalk23.yellow(`Warning: ${message}`));
1590
1670
  warnings++;
1591
1671
  };
1592
1672
  if (gitConfig.core.ignorecase) {
@@ -1606,13 +1686,13 @@ Gitlint Start [${process.cwd()}]
1606
1686
  }
1607
1687
  const resultMessages = [];
1608
1688
  if (valid > 0) {
1609
- resultMessages.push(chalk22.green(`Passed: ${valid}`));
1689
+ resultMessages.push(chalk23.green(`Passed: ${valid}`));
1610
1690
  }
1611
1691
  if (warnings > 0) {
1612
- resultMessages.push(chalk22.yellow(`Warnings: ${warnings}`));
1692
+ resultMessages.push(chalk23.yellow(`Warnings: ${warnings}`));
1613
1693
  }
1614
1694
  if (errors > 0) {
1615
- resultMessages.push(chalk22.red(` Errors: ${errors}`));
1695
+ resultMessages.push(chalk23.red(` Errors: ${errors}`));
1616
1696
  }
1617
1697
  console.warn(`Gitlint Finish [ ${resultMessages.join(" | ")} ]
1618
1698
  `);
@@ -1621,7 +1701,7 @@ Gitlint Start [${process.cwd()}]
1621
1701
 
1622
1702
  // src/actions/gitlint-fix.ts
1623
1703
  import { execSync as execSync2 } from "child_process";
1624
- import chalk23 from "chalk";
1704
+ import chalk24 from "chalk";
1625
1705
  import ParseGitConfig2 from "parse-git-config";
1626
1706
  var gitlintFix = () => {
1627
1707
  console.log(`
@@ -1630,15 +1710,15 @@ Gitlint Fix Start [${process.cwd()}]
1630
1710
  const gitConfig = ParseGitConfig2.sync();
1631
1711
  if (gitConfig.core.ignorecase) {
1632
1712
  execSync2("git config core.ignorecase false", { stdio: "inherit" });
1633
- console.warn(chalk23.yellow("\nGitlint Fix: Updated core.ignorecase to be false\n"));
1713
+ console.warn(chalk24.yellow("\nGitlint Fix: Updated core.ignorecase to be false\n"));
1634
1714
  }
1635
1715
  if (gitConfig.core.autocrlf !== false) {
1636
1716
  execSync2("git config core.autocrlf false", { stdio: "inherit" });
1637
- console.warn(chalk23.yellow("\nGitlint Fix: Updated core.autocrlf to be false\n"));
1717
+ console.warn(chalk24.yellow("\nGitlint Fix: Updated core.autocrlf to be false\n"));
1638
1718
  }
1639
1719
  if (gitConfig.core.eol !== "lf") {
1640
1720
  execSync2("git config core.eol lf", { stdio: "inherit" });
1641
- console.warn(chalk23.yellow('\nGitlint Fix: Updated core.eol to be "lf"\n'));
1721
+ console.warn(chalk24.yellow('\nGitlint Fix: Updated core.eol to be "lf"\n'));
1642
1722
  }
1643
1723
  return 1;
1644
1724
  };
@@ -1649,7 +1729,7 @@ var knip = () => {
1649
1729
  };
1650
1730
 
1651
1731
  // src/actions/license.ts
1652
- import chalk24 from "chalk";
1732
+ import chalk25 from "chalk";
1653
1733
  import { init } from "license-checker";
1654
1734
  var license = async (pkg) => {
1655
1735
  const workspaces = yarnWorkspaces();
@@ -1674,18 +1754,18 @@ var license = async (pkg) => {
1674
1754
  "LGPL-3.0-or-later",
1675
1755
  "Python-2.0"
1676
1756
  ]);
1677
- console.log(chalk24.green("License Checker"));
1757
+ console.log(chalk25.green("License Checker"));
1678
1758
  return (await Promise.all(
1679
1759
  workspaceList.map(({ location, name }) => {
1680
1760
  return new Promise((resolve) => {
1681
1761
  init({ production: true, start: location }, (error, packages) => {
1682
1762
  if (error) {
1683
- console.error(chalk24.red(`License Checker [${name}] Error`));
1684
- console.error(chalk24.gray(error));
1763
+ console.error(chalk25.red(`License Checker [${name}] Error`));
1764
+ console.error(chalk25.gray(error));
1685
1765
  console.log("\n");
1686
1766
  resolve(1);
1687
1767
  } else {
1688
- console.log(chalk24.green(`License Checker [${name}]`));
1768
+ console.log(chalk25.green(`License Checker [${name}]`));
1689
1769
  let count = 0;
1690
1770
  for (const [name2, info] of Object.entries(packages)) {
1691
1771
  const licenses = Array.isArray(info.licenses) ? info.licenses : [info.licenses];
@@ -1701,7 +1781,7 @@ var license = async (pkg) => {
1701
1781
  }
1702
1782
  if (!orLicenseFound) {
1703
1783
  count++;
1704
- console.warn(chalk24.yellow(`${name2}: Package License not allowed [${license2}]`));
1784
+ console.warn(chalk25.yellow(`${name2}: Package License not allowed [${license2}]`));
1705
1785
  }
1706
1786
  }
1707
1787
  }
@@ -1721,12 +1801,12 @@ var npmignoreGen = (pkg) => generateIgnoreFiles(filename2, pkg);
1721
1801
 
1722
1802
  // src/actions/package/clean-outputs.ts
1723
1803
  import path7 from "path";
1724
- import chalk25 from "chalk";
1804
+ import chalk26 from "chalk";
1725
1805
  var packageCleanOutputs = () => {
1726
1806
  const pkg = process.env.INIT_CWD ?? ".";
1727
1807
  const pkgName = process.env.npm_package_name;
1728
1808
  const folders = [path7.join(pkg, "dist"), path7.join(pkg, "build"), path7.join(pkg, "docs")];
1729
- console.log(chalk25.green(`Cleaning Outputs [${pkgName}]`));
1809
+ console.log(chalk26.green(`Cleaning Outputs [${pkgName}]`));
1730
1810
  for (let folder of folders) {
1731
1811
  deleteGlob(folder);
1732
1812
  }
@@ -1735,11 +1815,11 @@ var packageCleanOutputs = () => {
1735
1815
 
1736
1816
  // src/actions/package/clean-typescript.ts
1737
1817
  import path8 from "path";
1738
- import chalk26 from "chalk";
1818
+ import chalk27 from "chalk";
1739
1819
  var packageCleanTypescript = () => {
1740
1820
  const pkg = process.env.INIT_CWD ?? ".";
1741
1821
  const pkgName = process.env.npm_package_name;
1742
- console.log(chalk26.green(`Cleaning Typescript [${pkgName}]`));
1822
+ console.log(chalk27.green(`Cleaning Typescript [${pkgName}]`));
1743
1823
  const files = [path8.join(pkg, "*.tsbuildinfo"), path8.join(pkg, ".tsconfig.*"), path8.join(pkg, ".eslintcache")];
1744
1824
  for (let file of files) {
1745
1825
  deleteGlob(file);
@@ -1753,26 +1833,26 @@ var packageClean = async () => {
1753
1833
  };
1754
1834
 
1755
1835
  // src/actions/package/compile/compile.ts
1756
- import chalk31 from "chalk";
1836
+ import chalk32 from "chalk";
1757
1837
 
1758
1838
  // src/actions/package/compile/packageCompileTsup.ts
1759
- import chalk30 from "chalk";
1839
+ import chalk31 from "chalk";
1760
1840
  import { build as build2, defineConfig } from "tsup";
1761
1841
 
1762
1842
  // src/actions/package/compile/inputs.ts
1763
- import chalk27 from "chalk";
1843
+ import chalk28 from "chalk";
1764
1844
  import { glob as glob2 } from "glob";
1765
1845
  var getAllInputs = (srcDir, verbose = false) => {
1766
1846
  return [...glob2.sync(`${srcDir}/**/*.ts`, { posix: true }).map((file) => {
1767
1847
  const result = file.slice(Math.max(0, srcDir.length + 1));
1768
1848
  if (verbose) {
1769
- console.log(chalk27.gray(`getAllInputs: ${JSON.stringify(result, null, 2)}`));
1849
+ console.log(chalk28.gray(`getAllInputs: ${JSON.stringify(result, null, 2)}`));
1770
1850
  }
1771
1851
  return result;
1772
1852
  }), ...glob2.sync(`${srcDir}/**/*.tsx`, { posix: true }).map((file) => {
1773
1853
  const result = file.slice(Math.max(0, srcDir.length + 1));
1774
1854
  if (verbose) {
1775
- console.log(chalk27.gray(`getAllInputs: ${JSON.stringify(result, null, 2)}`));
1855
+ console.log(chalk28.gray(`getAllInputs: ${JSON.stringify(result, null, 2)}`));
1776
1856
  }
1777
1857
  return result;
1778
1858
  })];
@@ -1831,7 +1911,7 @@ function deepMergeObjects(objects) {
1831
1911
 
1832
1912
  // src/actions/package/compile/packageCompileTsc.ts
1833
1913
  import { cwd as cwd2 } from "process";
1834
- import chalk28 from "chalk";
1914
+ import chalk29 from "chalk";
1835
1915
  import { createProgramFromConfig } from "tsc-prog";
1836
1916
  import ts2, {
1837
1917
  DiagnosticCategory,
@@ -1853,7 +1933,7 @@ var getCompilerOptions = (options = {}, fileName = "tsconfig.json") => {
1853
1933
  var packageCompileTsc = (platform, entries, srcDir = "src", outDir = "dist", compilerOptionsParam, verbose = false) => {
1854
1934
  const pkg = process.env.INIT_CWD ?? cwd2();
1855
1935
  if (verbose) {
1856
- console.log(chalk28.cyan(`Validating code START: ${entries.length} files to ${outDir} from ${srcDir}`));
1936
+ console.log(chalk29.cyan(`Validating code START: ${entries.length} files to ${outDir} from ${srcDir}`));
1857
1937
  }
1858
1938
  const configFilePath = ts2.findConfigFile(
1859
1939
  "./",
@@ -1876,10 +1956,10 @@ var packageCompileTsc = (platform, entries, srcDir = "src", outDir = "dist", com
1876
1956
  emitDeclarationOnly: true,
1877
1957
  noEmit: false
1878
1958
  };
1879
- console.log(chalk28.cyan(`Validating Files: ${entries.length}`));
1959
+ console.log(chalk29.cyan(`Validating Files: ${entries.length}`));
1880
1960
  if (verbose) {
1881
1961
  for (const entry of entries) {
1882
- console.log(chalk28.grey(`Validating: ${entry}`));
1962
+ console.log(chalk29.grey(`Validating: ${entry}`));
1883
1963
  }
1884
1964
  }
1885
1965
  try {
@@ -1915,7 +1995,7 @@ var packageCompileTsc = (platform, entries, srcDir = "src", outDir = "dist", com
1915
1995
  return 0;
1916
1996
  } finally {
1917
1997
  if (verbose) {
1918
- console.log(chalk28.cyan(`Validating code FINISH: ${entries.length} files to ${outDir} from ${srcDir}`));
1998
+ console.log(chalk29.cyan(`Validating code FINISH: ${entries.length} files to ${outDir} from ${srcDir}`));
1919
1999
  }
1920
2000
  }
1921
2001
  };
@@ -1923,7 +2003,7 @@ var packageCompileTsc = (platform, entries, srcDir = "src", outDir = "dist", com
1923
2003
  // src/actions/package/compile/packageCompileTscTypes.ts
1924
2004
  import path9 from "path";
1925
2005
  import { cwd as cwd3 } from "process";
1926
- import chalk29 from "chalk";
2006
+ import chalk30 from "chalk";
1927
2007
  import { rollup } from "rollup";
1928
2008
  import dts from "rollup-plugin-dts";
1929
2009
  import nodeExternals from "rollup-plugin-node-externals";
@@ -1948,8 +2028,8 @@ async function bundleDts(inputPath, outputPath, platform, options, verbose = fal
1948
2028
  if (ignoredWarningCodes.has(warning.code ?? "")) {
1949
2029
  return;
1950
2030
  }
1951
- console.warn(chalk29.yellow(`[${warning.code}] ${warning.message}`));
1952
- console.warn(chalk29.gray(inputPath));
2031
+ console.warn(chalk30.yellow(`[${warning.code}] ${warning.message}`));
2032
+ console.warn(chalk30.gray(inputPath));
1953
2033
  warn(warning);
1954
2034
  }
1955
2035
  });
@@ -1959,8 +2039,8 @@ async function bundleDts(inputPath, outputPath, platform, options, verbose = fal
1959
2039
  });
1960
2040
  } catch (ex) {
1961
2041
  const error = ex;
1962
- console.warn(chalk29.red(error));
1963
- console.warn(chalk29.gray(inputPath));
2042
+ console.warn(chalk30.red(error));
2043
+ console.warn(chalk30.gray(inputPath));
1964
2044
  }
1965
2045
  if (verbose) {
1966
2046
  console.log(`Bundled declarations written to ${outputPath}`);
@@ -1968,7 +2048,7 @@ async function bundleDts(inputPath, outputPath, platform, options, verbose = fal
1968
2048
  }
1969
2049
  var packageCompileTscTypes = async (entries, outDir, platform, srcDir = "build", verbose = false) => {
1970
2050
  if (verbose) {
1971
- console.log(chalk29.cyan(`Compiling Types START [${platform}]: ${entries.length} files to ${outDir} from ${srcDir}`));
2051
+ console.log(chalk30.cyan(`Compiling Types START [${platform}]: ${entries.length} files to ${outDir} from ${srcDir}`));
1972
2052
  console.log(`Entries: ${entries.join(", ")}`);
1973
2053
  }
1974
2054
  const pkg = process.env.INIT_CWD ?? cwd3();
@@ -1992,7 +2072,7 @@ var packageCompileTscTypes = async (entries, outDir, platform, srcDir = "build",
1992
2072
  await bundleDts(`${srcRoot}/${entryTypeName}`, `${outDir}/${entryTypeName}`, platform, { compilerOptions }, verbose);
1993
2073
  }));
1994
2074
  if (verbose) {
1995
- console.log(chalk29.cyan(`Compiling Types FINISH: ${entries.length} files to ${outDir} from ${srcDir}`));
2075
+ console.log(chalk30.cyan(`Compiling Types FINISH: ${entries.length} files to ${outDir} from ${srcDir}`));
1996
2076
  }
1997
2077
  return 0;
1998
2078
  };
@@ -2004,15 +2084,15 @@ var compileFolder = async (srcDir, entries, buildDir, options, bundleTypes = fal
2004
2084
  console.log(`compileFolder [${srcDir}, ${options?.outDir}]`);
2005
2085
  }
2006
2086
  if (entries.length === 0) {
2007
- console.warn(chalk30.yellow(`No entries found in ${srcDir} to compile`));
2087
+ console.warn(chalk31.yellow(`No entries found in ${srcDir} to compile`));
2008
2088
  return 0;
2009
2089
  }
2010
2090
  if (verbose) {
2011
- console.log(chalk30.gray(`buildDir [${buildDir}]`));
2091
+ console.log(chalk31.gray(`buildDir [${buildDir}]`));
2012
2092
  }
2013
2093
  const validationResult = packageCompileTsc(options?.platform ?? "neutral", entries, srcDir, buildDir, void 0, verbose);
2014
2094
  if (validationResult !== 0) {
2015
- console.error(chalk30.red(`Compile:Validation had ${validationResult} errors`));
2095
+ console.error(chalk31.red(`Compile:Validation had ${validationResult} errors`));
2016
2096
  return validationResult;
2017
2097
  }
2018
2098
  const optionsParams = tsupOptions([{
@@ -2037,12 +2117,12 @@ var compileFolder = async (srcDir, entries, buildDir, options, bundleTypes = fal
2037
2117
  })
2038
2118
  )).flat();
2039
2119
  if (verbose) {
2040
- console.log(chalk30.cyan(`TSUP:build:start [${srcDir}]`));
2041
- console.log(chalk30.gray(`TSUP:build:options [${JSON.stringify(optionsList, null, 2)}]`));
2120
+ console.log(chalk31.cyan(`TSUP:build:start [${srcDir}]`));
2121
+ console.log(chalk31.gray(`TSUP:build:options [${JSON.stringify(optionsList, null, 2)}]`));
2042
2122
  }
2043
2123
  await Promise.all(optionsList.map((options2) => build2(options2)));
2044
2124
  if (verbose) {
2045
- console.log(chalk30.cyan(`TSUP:build:stop [${srcDir}]`));
2125
+ console.log(chalk31.cyan(`TSUP:build:stop [${srcDir}]`));
2046
2126
  }
2047
2127
  if (bundleTypes) {
2048
2128
  await packageCompileTscTypes(entries, outDir, options?.platform ?? "neutral", buildDir, verbose);
@@ -2153,14 +2233,14 @@ var packageCompileTsup = async (config2) => {
2153
2233
  // src/actions/package/compile/compile.ts
2154
2234
  var packageCompile = async (inConfig = {}) => {
2155
2235
  const pkg = process.env.INIT_CWD;
2156
- console.log(chalk31.green(`Compiling ${pkg}`));
2236
+ console.log(chalk32.green(`Compiling ${pkg}`));
2157
2237
  const config2 = await loadConfig(inConfig);
2158
2238
  return await packageCompileTsup(config2);
2159
2239
  };
2160
2240
 
2161
2241
  // src/actions/package/copy-assets.ts
2162
2242
  import path10 from "path/posix";
2163
- import chalk32 from "chalk";
2243
+ import chalk33 from "chalk";
2164
2244
  import cpy2 from "cpy";
2165
2245
  var copyTargetAssets2 = async (target, name, location) => {
2166
2246
  try {
@@ -2173,7 +2253,7 @@ var copyTargetAssets2 = async (target, name, location) => {
2173
2253
  }
2174
2254
  );
2175
2255
  if (values.length > 0) {
2176
- console.log(chalk32.green(`Copying Assets [${target.toUpperCase()}] - ${name} - ${location}`));
2256
+ console.log(chalk33.green(`Copying Assets [${target.toUpperCase()}] - ${name} - ${location}`));
2177
2257
  }
2178
2258
  for (const value of values) {
2179
2259
  console.log(`${value.split("/").pop()} => ./dist/${target}`);
@@ -2238,9 +2318,9 @@ var packageCycle = async () => {
2238
2318
  };
2239
2319
 
2240
2320
  // src/actions/package/gen-docs.ts
2241
- import { existsSync as existsSync6 } from "fs";
2321
+ import { existsSync as existsSync7 } from "fs";
2242
2322
  import path11 from "path";
2243
- import chalk33 from "chalk";
2323
+ import chalk34 from "chalk";
2244
2324
  import {
2245
2325
  Application,
2246
2326
  ArgumentsReader,
@@ -2258,7 +2338,7 @@ var ExitCodes = {
2258
2338
  };
2259
2339
  var packageGenDocs = async () => {
2260
2340
  const pkg = process.env.INIT_CWD;
2261
- if (pkg !== void 0 && !existsSync6(path11.join(pkg, "typedoc.json"))) {
2341
+ if (pkg !== void 0 && !existsSync7(path11.join(pkg, "typedoc.json"))) {
2262
2342
  return;
2263
2343
  }
2264
2344
  const app = await Application.bootstrap({
@@ -2344,16 +2424,16 @@ var runTypeDoc = async (app) => {
2344
2424
  return ExitCodes.OutputError;
2345
2425
  }
2346
2426
  }
2347
- console.log(chalk33.green(`${pkgName} - Ok`));
2427
+ console.log(chalk34.green(`${pkgName} - Ok`));
2348
2428
  return ExitCodes.Ok;
2349
2429
  };
2350
2430
 
2351
2431
  // src/actions/package/lint.ts
2352
- import { readdirSync as readdirSync3 } from "fs";
2432
+ import { readdirSync as readdirSync4 } from "fs";
2353
2433
  import path12 from "path";
2354
2434
  import { cwd as cwd4 } from "process";
2355
2435
  import { pathToFileURL } from "url";
2356
- import chalk34 from "chalk";
2436
+ import chalk35 from "chalk";
2357
2437
  import { ESLint } from "eslint";
2358
2438
  import { findUp } from "find-up";
2359
2439
  import picomatch from "picomatch";
@@ -2362,14 +2442,14 @@ var dumpMessages = (lintResults) => {
2362
2442
  const severity = ["none", "warning", "error"];
2363
2443
  for (const lintResult of lintResults) {
2364
2444
  if (lintResult.messages.length > 0) {
2365
- console.log(chalk34.gray(`
2445
+ console.log(chalk35.gray(`
2366
2446
  ${lintResult.filePath}`));
2367
2447
  for (const message of lintResult.messages) {
2368
2448
  console.log(
2369
- chalk34.gray(` ${message.line}:${message.column}`),
2370
- chalk34[colors[message.severity]](` ${severity[message.severity]}`),
2371
- chalk34.white(` ${message.message}`),
2372
- chalk34.gray(` ${message.ruleId}`)
2449
+ chalk35.gray(` ${message.line}:${message.column}`),
2450
+ chalk35[colors[message.severity]](` ${severity[message.severity]}`),
2451
+ chalk35.white(` ${message.message}`),
2452
+ chalk35.gray(` ${message.ruleId}`)
2373
2453
  );
2374
2454
  }
2375
2455
  }
@@ -2386,7 +2466,7 @@ function getFiles(dir, ignoreFolders) {
2386
2466
  const currentDirectory = cwd4();
2387
2467
  const subDirectory = dir.split(currentDirectory)[1]?.split("/")[1];
2388
2468
  if (ignoreFolders.includes(subDirectory)) return [];
2389
- return readdirSync3(dir, { withFileTypes: true }).flatMap((dirent) => {
2469
+ return readdirSync4(dir, { withFileTypes: true }).flatMap((dirent) => {
2390
2470
  const res = path12.resolve(dir, dirent.name);
2391
2471
  const relativePath = subDirectory === void 0 ? dirent.name : `${subDirectory}/${dirent.name}`;
2392
2472
  const ignoreMatchers = ignoreFolders.map((pattern) => picomatch(pattern));
@@ -2407,10 +2487,10 @@ var packageLint = async (fix2 = false, verbose = false, cache = true) => {
2407
2487
  cache
2408
2488
  });
2409
2489
  const files = getFiles(cwd4(), ignoreFolders);
2410
- console.log(chalk34.green(`Linting ${pkg} [files = ${files.length}]`));
2490
+ console.log(chalk35.green(`Linting ${pkg} [files = ${files.length}]`));
2411
2491
  if (verbose) {
2412
2492
  for (const file of files) {
2413
- console.log(chalk34.gray(` ${file}`));
2493
+ console.log(chalk35.gray(` ${file}`));
2414
2494
  }
2415
2495
  }
2416
2496
  const lintResults = await engine.lintFiles(files);
@@ -2421,32 +2501,32 @@ var packageLint = async (fix2 = false, verbose = false, cache = true) => {
2421
2501
  const filesCountColor = files.length < 100 ? "green" : files.length < 1e3 ? "yellow" : "red";
2422
2502
  const lintTime = Date.now() - start;
2423
2503
  const lintTimeColor = lintTime < 1e3 ? "green" : lintTime < 3e3 ? "yellow" : "red";
2424
- console.log(chalk34.white(`Linted ${chalk34[filesCountColor](files.length)} files in ${chalk34[lintTimeColor](lintTime)}ms`));
2504
+ console.log(chalk35.white(`Linted ${chalk35[filesCountColor](files.length)} files in ${chalk35[lintTimeColor](lintTime)}ms`));
2425
2505
  return lintResults.reduce((prev, lintResult) => prev + lintResult.errorCount, 0);
2426
2506
  };
2427
2507
 
2428
2508
  // src/actions/package/publint.ts
2429
2509
  import { promises as fs9 } from "fs";
2430
- import chalk35 from "chalk";
2510
+ import chalk36 from "chalk";
2431
2511
  import sortPackageJson from "sort-package-json";
2432
2512
  var customPubLint = (pkg) => {
2433
2513
  let errorCount = 0;
2434
2514
  let warningCount = 0;
2435
2515
  if (pkg.files === void 0) {
2436
- console.warn(chalk35.yellow('Publint [custom]: "files" field is missing'));
2516
+ console.warn(chalk36.yellow('Publint [custom]: "files" field is missing'));
2437
2517
  warningCount++;
2438
2518
  }
2439
2519
  if (pkg.main !== void 0) {
2440
- console.warn(chalk35.yellow('Publint [custom]: "main" field is deprecated, use "exports" instead'));
2520
+ console.warn(chalk36.yellow('Publint [custom]: "main" field is deprecated, use "exports" instead'));
2441
2521
  warningCount++;
2442
2522
  }
2443
2523
  if (pkg.sideEffects !== false) {
2444
- console.warn(chalk35.yellow('Publint [custom]: "sideEffects" field should be set to false'));
2524
+ console.warn(chalk36.yellow('Publint [custom]: "sideEffects" field should be set to false'));
2445
2525
  warningCount++;
2446
2526
  }
2447
2527
  if (pkg.resolutions !== void 0) {
2448
- console.warn(chalk35.yellow('Publint [custom]: "resolutions" in use'));
2449
- console.warn(chalk35.gray(JSON.stringify(pkg.resolutions, null, 2)));
2528
+ console.warn(chalk36.yellow('Publint [custom]: "resolutions" in use'));
2529
+ console.warn(chalk36.gray(JSON.stringify(pkg.resolutions, null, 2)));
2450
2530
  warningCount++;
2451
2531
  }
2452
2532
  return [errorCount, warningCount];
@@ -2456,8 +2536,8 @@ var packagePublint = async ({ strict = true, verbose = false } = {}) => {
2456
2536
  const sortedPkg = sortPackageJson(await fs9.readFile(`${pkgDir}/package.json`, "utf8"));
2457
2537
  await fs9.writeFile(`${pkgDir}/package.json`, sortedPkg);
2458
2538
  const pkg = JSON.parse(await fs9.readFile(`${pkgDir}/package.json`, "utf8"));
2459
- console.log(chalk35.green(`Publint: ${pkg.name}`));
2460
- console.log(chalk35.gray(pkgDir));
2539
+ console.log(chalk36.green(`Publint: ${pkg.name}`));
2540
+ console.log(chalk36.gray(pkgDir));
2461
2541
  const { publint: publint2 } = await import("publint");
2462
2542
  const { messages } = await publint2({
2463
2543
  level: "suggestion",
@@ -2468,22 +2548,22 @@ var packagePublint = async ({ strict = true, verbose = false } = {}) => {
2468
2548
  for (const message of messages) {
2469
2549
  switch (message.type) {
2470
2550
  case "error": {
2471
- console.error(chalk35.red(`[${message.code}] ${formatMessage(message, pkg)}`));
2551
+ console.error(chalk36.red(`[${message.code}] ${formatMessage(message, pkg)}`));
2472
2552
  break;
2473
2553
  }
2474
2554
  case "warning": {
2475
- console.warn(chalk35.yellow(`[${message.code}] ${formatMessage(message, pkg)}`));
2555
+ console.warn(chalk36.yellow(`[${message.code}] ${formatMessage(message, pkg)}`));
2476
2556
  break;
2477
2557
  }
2478
2558
  default: {
2479
- console.log(chalk35.white(`[${message.code}] ${formatMessage(message, pkg)}`));
2559
+ console.log(chalk36.white(`[${message.code}] ${formatMessage(message, pkg)}`));
2480
2560
  break;
2481
2561
  }
2482
2562
  }
2483
2563
  }
2484
2564
  const [errorCount, warningCount] = customPubLint(pkg);
2485
2565
  if (verbose) {
2486
- console.log(chalk35.gray(`Publint [Finish]: ${pkgDir} [${messages.length + errorCount + warningCount} messages]`));
2566
+ console.log(chalk36.gray(`Publint [Finish]: ${pkgDir} [${messages.length + errorCount + warningCount} messages]`));
2487
2567
  }
2488
2568
  return messages.filter((message) => message.type === "error").length + errorCount;
2489
2569
  };
@@ -2519,7 +2599,7 @@ var rebuild = ({ target }) => {
2519
2599
  };
2520
2600
 
2521
2601
  // src/actions/recompile.ts
2522
- import chalk36 from "chalk";
2602
+ import chalk37 from "chalk";
2523
2603
  var recompile = async ({
2524
2604
  verbose,
2525
2605
  target,
@@ -2555,7 +2635,7 @@ var recompileAll = async ({
2555
2635
  const incrementalOptions = incremental ? ["--since", "-Apt", "--topological-dev"] : ["--parallel", "-Apt", "--topological-dev"];
2556
2636
  const jobsOptions = jobs ? ["-j", `${jobs}`] : [];
2557
2637
  if (jobs) {
2558
- console.log(chalk36.blue(`Jobs set to [${jobs}]`));
2638
+ console.log(chalk37.blue(`Jobs set to [${jobs}]`));
2559
2639
  }
2560
2640
  const result = await runStepsAsync(`Recompile${incremental ? "-Incremental" : ""} [All]`, [
2561
2641
  [
@@ -2586,7 +2666,7 @@ var recompileAll = async ({
2586
2666
  ]
2587
2667
  ]);
2588
2668
  console.log(
2589
- `${chalk36.gray("Recompiled in")} [${chalk36.magenta(((Date.now() - start) / 1e3).toFixed(2))}] ${chalk36.gray("seconds")}`
2669
+ `${chalk37.gray("Recompiled in")} [${chalk37.magenta(((Date.now() - start) / 1e3).toFixed(2))}] ${chalk37.gray("seconds")}`
2590
2670
  );
2591
2671
  return result;
2592
2672
  };
@@ -2617,13 +2697,13 @@ var reinstall = () => {
2617
2697
  };
2618
2698
 
2619
2699
  // src/actions/relint.ts
2620
- import chalk37 from "chalk";
2700
+ import chalk38 from "chalk";
2621
2701
  var relintPackage = ({
2622
2702
  pkg,
2623
2703
  fix: fix2,
2624
2704
  verbose
2625
2705
  }) => {
2626
- console.log(chalk37.gray(`${fix2 ? "Fix" : "Lint"} [${pkg}]`));
2706
+ console.log(chalk38.gray(`${fix2 ? "Fix" : "Lint"} [${pkg}]`));
2627
2707
  const start = Date.now();
2628
2708
  const result = runSteps(`${fix2 ? "Fix" : "Lint"} [${pkg}]`, [
2629
2709
  ["yarn", [
@@ -2633,7 +2713,7 @@ var relintPackage = ({
2633
2713
  fix2 ? "package-fix" : verbose ? "package-lint-verbose" : "package-lint"
2634
2714
  ]]
2635
2715
  ]);
2636
- console.log(chalk37.gray(`${fix2 ? "Fixed in" : "Linted in"} [${chalk37.magenta(((Date.now() - start) / 1e3).toFixed(2))}] ${chalk37.gray("seconds")}`));
2716
+ console.log(chalk38.gray(`${fix2 ? "Fixed in" : "Linted in"} [${chalk38.magenta(((Date.now() - start) / 1e3).toFixed(2))}] ${chalk38.gray("seconds")}`));
2637
2717
  return result;
2638
2718
  };
2639
2719
  var relint = ({
@@ -2653,13 +2733,13 @@ var relint = ({
2653
2733
  });
2654
2734
  };
2655
2735
  var relintAllPackages = ({ fix: fix2 = false } = {}) => {
2656
- console.log(chalk37.gray(`${fix2 ? "Fix" : "Lint"} [All-Packages]`));
2736
+ console.log(chalk38.gray(`${fix2 ? "Fix" : "Lint"} [All-Packages]`));
2657
2737
  const start = Date.now();
2658
2738
  const fixOptions = fix2 ? ["--fix"] : [];
2659
2739
  const result = runSteps(`${fix2 ? "Fix" : "Lint"} [All-Packages]`, [
2660
2740
  ["yarn", ["eslint", ...fixOptions]]
2661
2741
  ]);
2662
- console.log(chalk37.gray(`${fix2 ? "Fixed in" : "Linted in"} [${chalk37.magenta(((Date.now() - start) / 1e3).toFixed(2))}] ${chalk37.gray("seconds")}`));
2742
+ console.log(chalk38.gray(`${fix2 ? "Fixed in" : "Linted in"} [${chalk38.magenta(((Date.now() - start) / 1e3).toFixed(2))}] ${chalk38.gray("seconds")}`));
2663
2743
  return result;
2664
2744
  };
2665
2745
 
@@ -2677,10 +2757,10 @@ var sonar = () => {
2677
2757
  };
2678
2758
 
2679
2759
  // src/actions/statics.ts
2680
- import chalk38 from "chalk";
2760
+ import chalk39 from "chalk";
2681
2761
  var DefaultDependencies = ["axios", "@xylabs/pixel", "react", "graphql", "react-router", "@mui/material", "@mui/system"];
2682
2762
  var statics = () => {
2683
- console.log(chalk38.green("Check Required Static Dependencies"));
2763
+ console.log(chalk39.green("Check Required Static Dependencies"));
2684
2764
  const statics2 = parsedPackageJSON()?.xy?.deps?.statics;
2685
2765
  return detectDuplicateDependencies(statics2, DefaultDependencies);
2686
2766
  };
@@ -2737,7 +2817,7 @@ var loadPackageConfig = async () => {
2737
2817
  };
2738
2818
 
2739
2819
  // src/xy/xy.ts
2740
- import chalk40 from "chalk";
2820
+ import chalk41 from "chalk";
2741
2821
 
2742
2822
  // src/xy/xyBuildCommands.ts
2743
2823
  var xyBuildCommands = (args) => {
@@ -2845,6 +2925,14 @@ var packagePositionalParam = (yargs2) => {
2845
2925
  // src/xy/xyCommonCommands.ts
2846
2926
  var xyCommonCommands = (args) => {
2847
2927
  return args.command(
2928
+ "claude-commands",
2929
+ "Claude Commands - Sync XY Labs standard Claude slash commands to .claude/commands/",
2930
+ (yargs2) => yargs2,
2931
+ (argv) => {
2932
+ if (argv.verbose) console.log("Claude Commands");
2933
+ process.exitCode = claudeCommands();
2934
+ }
2935
+ ).command(
2848
2936
  "claude-rules",
2849
2937
  "Claude Rules - Sync XY Labs standard Claude rules to .claude/rules/",
2850
2938
  (yargs2) => {
@@ -3106,7 +3194,7 @@ var xyInstallCommands = (args) => {
3106
3194
  };
3107
3195
 
3108
3196
  // src/xy/xyLintCommands.ts
3109
- import chalk39 from "chalk";
3197
+ import chalk40 from "chalk";
3110
3198
  var xyLintCommands = (args) => {
3111
3199
  return args.command(
3112
3200
  "cycle [package]",
@@ -3118,7 +3206,7 @@ var xyLintCommands = (args) => {
3118
3206
  const start = Date.now();
3119
3207
  if (argv.verbose) console.log("Cycle");
3120
3208
  process.exitCode = await cycle({ pkg: argv.package });
3121
- console.log(chalk39.blue(`Finished in ${Date.now() - start}ms`));
3209
+ console.log(chalk40.blue(`Finished in ${Date.now() - start}ms`));
3122
3210
  }
3123
3211
  ).command(
3124
3212
  "lint [package]",
@@ -3148,7 +3236,7 @@ var xyLintCommands = (args) => {
3148
3236
  cache: argv.cache,
3149
3237
  verbose: !!argv.verbose
3150
3238
  });
3151
- console.log(chalk39.blue(`Finished in ${Date.now() - start}ms`));
3239
+ console.log(chalk40.blue(`Finished in ${Date.now() - start}ms`));
3152
3240
  }
3153
3241
  ).command(
3154
3242
  "deplint [package]",
@@ -3181,7 +3269,7 @@ var xyLintCommands = (args) => {
3181
3269
  peerDeps: !!argv.peerDeps,
3182
3270
  verbose: !!argv.verbose
3183
3271
  });
3184
- console.log(chalk39.blue(`Finished in ${Date.now() - start}ms`));
3272
+ console.log(chalk40.blue(`Finished in ${Date.now() - start}ms`));
3185
3273
  }
3186
3274
  ).command(
3187
3275
  "fix [package]",
@@ -3193,7 +3281,7 @@ var xyLintCommands = (args) => {
3193
3281
  const start = Date.now();
3194
3282
  if (argv.verbose) console.log("Fix");
3195
3283
  process.exitCode = fix();
3196
- console.log(chalk39.blue(`Finished in ${Date.now() - start}ms`));
3284
+ console.log(chalk40.blue(`Finished in ${Date.now() - start}ms`));
3197
3285
  }
3198
3286
  ).command(
3199
3287
  "relint [package]",
@@ -3205,7 +3293,7 @@ var xyLintCommands = (args) => {
3205
3293
  if (argv.verbose) console.log("Relinting");
3206
3294
  const start = Date.now();
3207
3295
  process.exitCode = relint();
3208
- console.log(chalk39.blue(`Finished in ${Date.now() - start}ms`));
3296
+ console.log(chalk40.blue(`Finished in ${Date.now() - start}ms`));
3209
3297
  }
3210
3298
  ).command(
3211
3299
  "publint [package]",
@@ -3217,7 +3305,7 @@ var xyLintCommands = (args) => {
3217
3305
  if (argv.verbose) console.log("Publint");
3218
3306
  const start = Date.now();
3219
3307
  process.exitCode = await publint({ pkg: argv.package, verbose: !!argv.verbose });
3220
- console.log(chalk39.blue(`Finished in ${Date.now() - start}ms`));
3308
+ console.log(chalk40.blue(`Finished in ${Date.now() - start}ms`));
3221
3309
  }
3222
3310
  ).command(
3223
3311
  "knip",
@@ -3229,7 +3317,7 @@ var xyLintCommands = (args) => {
3229
3317
  if (argv.verbose) console.log("Knip");
3230
3318
  const start = Date.now();
3231
3319
  process.exitCode = knip();
3232
- console.log(chalk39.blue(`Knip finished in ${Date.now() - start}ms`));
3320
+ console.log(chalk40.blue(`Knip finished in ${Date.now() - start}ms`));
3233
3321
  }
3234
3322
  ).command(
3235
3323
  "sonar",
@@ -3241,7 +3329,7 @@ var xyLintCommands = (args) => {
3241
3329
  const start = Date.now();
3242
3330
  if (argv.verbose) console.log("Sonar Check");
3243
3331
  process.exitCode = sonar();
3244
- console.log(chalk39.blue(`Finished in ${Date.now() - start}ms`));
3332
+ console.log(chalk40.blue(`Finished in ${Date.now() - start}ms`));
3245
3333
  }
3246
3334
  );
3247
3335
  };
@@ -3277,8 +3365,8 @@ var xyParseOptions = () => {
3277
3365
  var xy = async () => {
3278
3366
  const options = xyParseOptions();
3279
3367
  return await xyBuildCommands(xyCommonCommands(xyInstallCommands(xyDeployCommands(xyLintCommands(options))))).demandCommand(1).command("*", "", () => {
3280
- console.error(chalk40.yellow(`Command not found [${chalk40.magenta(process.argv[2])}]`));
3281
- console.log(chalk40.gray("Try 'yarn xy --help' for list of commands"));
3368
+ console.error(chalk41.yellow(`Command not found [${chalk41.magenta(process.argv[2])}]`));
3369
+ console.log(chalk41.gray("Try 'yarn xy --help' for list of commands"));
3282
3370
  }).version().help().argv;
3283
3371
  };
3284
3372
  export {
@@ -3286,10 +3374,13 @@ export {
3286
3374
  DuplicateDetector,
3287
3375
  INIT_CWD,
3288
3376
  WINDOWS_NEWLINE_REGEX,
3377
+ XYLABS_COMMANDS_PREFIX,
3289
3378
  XYLABS_RULES_PREFIX,
3290
3379
  build,
3291
3380
  bundleDts,
3292
3381
  checkResult,
3382
+ claudeCommandTemplates,
3383
+ claudeCommands,
3293
3384
  claudeMdProjectTemplate,
3294
3385
  claudeMdRuleTemplates,
3295
3386
  claudeRules,