@xylabs/ts-scripts-yarn3 7.4.16 → 7.4.17

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 (42) hide show
  1. package/dist/actions/claude-settings.mjs +82 -0
  2. package/dist/actions/claude-settings.mjs.map +1 -0
  3. package/dist/actions/index.mjs +191 -116
  4. package/dist/actions/index.mjs.map +1 -1
  5. package/dist/actions/package/compile/buildEntries.mjs +4 -1
  6. package/dist/actions/package/compile/buildEntries.mjs.map +1 -1
  7. package/dist/actions/package/compile/compile.mjs +5 -2
  8. package/dist/actions/package/compile/compile.mjs.map +1 -1
  9. package/dist/actions/package/compile/index.mjs +5 -2
  10. package/dist/actions/package/compile/index.mjs.map +1 -1
  11. package/dist/actions/package/compile/packageCompileTsc.mjs +1 -1
  12. package/dist/actions/package/compile/packageCompileTsc.mjs.map +1 -1
  13. package/dist/actions/package/compile/packageCompileTsup.mjs +5 -2
  14. package/dist/actions/package/compile/packageCompileTsup.mjs.map +1 -1
  15. package/dist/actions/package/index.mjs +5 -2
  16. package/dist/actions/package/index.mjs.map +1 -1
  17. package/dist/actions/package/recompile.mjs +5 -2
  18. package/dist/actions/package/recompile.mjs.map +1 -1
  19. package/dist/bin/package/build-only.mjs +5 -2
  20. package/dist/bin/package/build-only.mjs.map +1 -1
  21. package/dist/bin/package/build.mjs +5 -2
  22. package/dist/bin/package/build.mjs.map +1 -1
  23. package/dist/bin/package/compile-only.mjs +5 -2
  24. package/dist/bin/package/compile-only.mjs.map +1 -1
  25. package/dist/bin/package/compile-tsup.mjs +5 -2
  26. package/dist/bin/package/compile-tsup.mjs.map +1 -1
  27. package/dist/bin/package/compile.mjs +5 -2
  28. package/dist/bin/package/compile.mjs.map +1 -1
  29. package/dist/bin/package/recompile.mjs +5 -2
  30. package/dist/bin/package/recompile.mjs.map +1 -1
  31. package/dist/bin/xy.mjs +150 -71
  32. package/dist/bin/xy.mjs.map +1 -1
  33. package/dist/index.d.ts +3 -1
  34. package/dist/index.mjs +211 -128
  35. package/dist/index.mjs.map +1 -1
  36. package/dist/xy/index.mjs +150 -71
  37. package/dist/xy/index.mjs.map +1 -1
  38. package/dist/xy/xy.mjs +150 -71
  39. package/dist/xy/xy.mjs.map +1 -1
  40. package/dist/xy/xyCommonCommands.mjs +96 -17
  41. package/dist/xy/xyCommonCommands.mjs.map +1 -1
  42. package/package.json +2 -2
package/dist/bin/xy.mjs CHANGED
@@ -1,7 +1,7 @@
1
1
  #!/usr/bin/env node
2
2
 
3
3
  // src/xy/xy.ts
4
- import chalk30 from "chalk";
4
+ import chalk31 from "chalk";
5
5
 
6
6
  // src/actions/build.ts
7
7
  import chalk9 from "chalk";
@@ -744,6 +744,77 @@ var claudeRules = ({ force } = {}) => {
744
744
  return 0;
745
745
  };
746
746
 
747
+ // src/actions/claude-settings.ts
748
+ import {
749
+ existsSync as existsSync6,
750
+ mkdirSync as mkdirSync3,
751
+ writeFileSync as writeFileSync4
752
+ } from "fs";
753
+ import PATH5 from "path";
754
+ import { createInterface } from "readline";
755
+ import chalk12 from "chalk";
756
+ var DEFAULT_SETTINGS = {
757
+ permissions: {
758
+ allow: [
759
+ "Bash(git *)",
760
+ "Bash(yarn *)",
761
+ "Bash(npx *)",
762
+ "Bash(node *)",
763
+ "Bash(ls *)",
764
+ "Bash(mkdir *)",
765
+ "Bash(cp *)",
766
+ "Bash(mv *)",
767
+ "Bash(rm *)",
768
+ "Bash(cat *)",
769
+ "Bash(head *)",
770
+ "Bash(tail *)",
771
+ "Bash(echo *)",
772
+ "Bash(pwd)",
773
+ "Bash(which *)",
774
+ "Bash(gh *)",
775
+ "Read",
776
+ "Edit",
777
+ "Write",
778
+ "Glob",
779
+ "Grep",
780
+ "Skill"
781
+ ],
782
+ deny: [
783
+ "Bash(git push --force*)",
784
+ "Bash(git reset --hard*)",
785
+ "Bash(rm -rf /*)"
786
+ ]
787
+ }
788
+ };
789
+ function askConfirmation(question) {
790
+ const rl = createInterface({ input: process.stdin, output: process.stdout });
791
+ return new Promise((resolve) => {
792
+ rl.question(question, (answer) => {
793
+ rl.close();
794
+ resolve(answer.toLowerCase() === "y" || answer.toLowerCase() === "yes");
795
+ });
796
+ });
797
+ }
798
+ async function claudeSettings() {
799
+ const cwd = INIT_CWD() ?? process.cwd();
800
+ const claudeDir = PATH5.resolve(cwd, ".claude");
801
+ const settingsPath = PATH5.resolve(claudeDir, "settings.local.json");
802
+ mkdirSync3(claudeDir, { recursive: true });
803
+ if (existsSync6(settingsPath)) {
804
+ const confirmed = await askConfirmation(
805
+ chalk12.yellow(`${settingsPath} already exists. Replace it? (y/N) `)
806
+ );
807
+ if (!confirmed) {
808
+ console.log(chalk12.gray("Skipped \u2014 existing settings.local.json preserved"));
809
+ return 0;
810
+ }
811
+ }
812
+ writeFileSync4(settingsPath, `${JSON.stringify(DEFAULT_SETTINGS, null, 2)}
813
+ `, "utf8");
814
+ console.log(chalk12.green("Generated .claude/settings.local.json"));
815
+ return 0;
816
+ }
817
+
747
818
  // src/actions/clean.ts
748
819
  var clean = async ({ verbose, pkg }) => {
749
820
  return pkg ? await cleanPackage({ pkg, verbose }) : cleanAll({ verbose });
@@ -758,16 +829,16 @@ var cleanAll = ({ verbose }) => {
758
829
 
759
830
  // src/actions/clean-docs.ts
760
831
  import path from "path";
761
- import chalk12 from "chalk";
832
+ import chalk13 from "chalk";
762
833
  var cleanDocs = () => {
763
834
  const pkgName = process.env.npm_package_name;
764
- console.log(chalk12.green(`Cleaning Docs [${pkgName}]`));
835
+ console.log(chalk13.green(`Cleaning Docs [${pkgName}]`));
765
836
  for (const { location } of yarnWorkspaces()) deleteGlob(path.join(location, "docs"));
766
837
  return 0;
767
838
  };
768
839
 
769
840
  // src/actions/compile.ts
770
- import chalk13 from "chalk";
841
+ import chalk14 from "chalk";
771
842
  var compile = ({
772
843
  verbose,
773
844
  target,
@@ -808,7 +879,7 @@ var compileAll = ({
808
879
  const incrementalOptions = incremental ? ["--since", "-Ap", "--topological-dev"] : ["--parallel", "-Ap", "--topological-dev"];
809
880
  const jobsOptions = jobs ? ["-j", `${jobs}`] : [];
810
881
  if (jobs) {
811
- console.log(chalk13.blue(`Jobs set to [${jobs}]`));
882
+ console.log(chalk14.blue(`Jobs set to [${jobs}]`));
812
883
  }
813
884
  const result = runSteps(`Compile${incremental ? "-Incremental" : ""} [All]`, [
814
885
  ["yarn", [
@@ -822,13 +893,13 @@ var compileAll = ({
822
893
  ...targetOptions
823
894
  ]]
824
895
  ]);
825
- console.log(`${chalk13.gray("Compiled in")} [${chalk13.magenta(((Date.now() - start) / 1e3).toFixed(2))}] ${chalk13.gray("seconds")}`);
896
+ console.log(`${chalk14.gray("Compiled in")} [${chalk14.magenta(((Date.now() - start) / 1e3).toFixed(2))}] ${chalk14.gray("seconds")}`);
826
897
  return result;
827
898
  };
828
899
 
829
900
  // src/actions/copy-assets.ts
830
901
  import path2 from "path/posix";
831
- import chalk14 from "chalk";
902
+ import chalk15 from "chalk";
832
903
  import cpy from "cpy";
833
904
  var copyPackageTargetAssets = async (target, name, location) => {
834
905
  try {
@@ -851,7 +922,7 @@ var copyPackageTargetAssets = async (target, name, location) => {
851
922
  };
852
923
  var copyTargetAssets = async (target, pkg) => {
853
924
  const workspaces = yarnWorkspaces();
854
- console.log(chalk14.green(`Copying Assets [${target.toUpperCase()}]`));
925
+ console.log(chalk15.green(`Copying Assets [${target.toUpperCase()}]`));
855
926
  const workspaceList = workspaces.filter(({ name }) => {
856
927
  return pkg === void 0 || name === pkg;
857
928
  });
@@ -935,7 +1006,7 @@ var dead = () => {
935
1006
  };
936
1007
 
937
1008
  // src/actions/deplint/deplint.ts
938
- import chalk20 from "chalk";
1009
+ import chalk21 from "chalk";
939
1010
 
940
1011
  // src/actions/deplint/findFiles.ts
941
1012
  import fs2 from "fs";
@@ -1137,7 +1208,7 @@ function getExternalImportsFromFiles({
1137
1208
 
1138
1209
  // src/actions/deplint/checkPackage/getUnlistedDependencies.ts
1139
1210
  import { builtinModules } from "module";
1140
- import chalk15 from "chalk";
1211
+ import chalk16 from "chalk";
1141
1212
  function isRuntimeImportListed(imp, name, dependencies, peerDependencies) {
1142
1213
  return dependencies.includes(imp) || imp === name || peerDependencies.includes(imp) || builtinModules.includes(imp);
1143
1214
  }
@@ -1145,7 +1216,7 @@ function isTypeImportListed(imp, name, dependencies, devDependencies, peerDepend
1145
1216
  return dependencies.includes(imp) || imp === name || dependencies.includes(`@types/${imp}`) || peerDependencies.includes(imp) || peerDependencies.includes(`@types/${imp}`) || devDependencies.includes(`@types/${imp}`) || builtinModules.includes(imp);
1146
1217
  }
1147
1218
  function logMissing(name, imp, importPaths) {
1148
- console.log(`[${chalk15.blue(name)}] Missing dependency in package.json: ${chalk15.red(imp)}`);
1219
+ console.log(`[${chalk16.blue(name)}] Missing dependency in package.json: ${chalk16.red(imp)}`);
1149
1220
  if (importPaths[imp]) {
1150
1221
  console.log(` ${importPaths[imp].join("\n ")}`);
1151
1222
  }
@@ -1174,7 +1245,7 @@ function getUnlistedDependencies({ name, location }, {
1174
1245
  }
1175
1246
  if (unlistedDependencies > 0) {
1176
1247
  const packageLocation = `${location}/package.json`;
1177
- console.log(` ${chalk15.yellow(packageLocation)}
1248
+ console.log(` ${chalk16.yellow(packageLocation)}
1178
1249
  `);
1179
1250
  }
1180
1251
  return unlistedDependencies;
@@ -1182,7 +1253,7 @@ function getUnlistedDependencies({ name, location }, {
1182
1253
 
1183
1254
  // src/actions/deplint/checkPackage/getUnlistedDevDependencies.ts
1184
1255
  import { builtinModules as builtinModules2 } from "module";
1185
- import chalk16 from "chalk";
1256
+ import chalk17 from "chalk";
1186
1257
  function getUnlistedDevDependencies({ name, location }, {
1187
1258
  devDependencies,
1188
1259
  dependencies,
@@ -1196,7 +1267,7 @@ function getUnlistedDevDependencies({ name, location }, {
1196
1267
  for (const imp of externalAllImports) {
1197
1268
  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)) {
1198
1269
  unlistedDevDependencies++;
1199
- console.log(`[${chalk16.blue(name)}] Missing devDependency in package.json: ${chalk16.red(imp)}`);
1270
+ console.log(`[${chalk17.blue(name)}] Missing devDependency in package.json: ${chalk17.red(imp)}`);
1200
1271
  if (allImportPaths[imp]) {
1201
1272
  console.log(` ${allImportPaths[imp].join("\n ")}`);
1202
1273
  }
@@ -1204,14 +1275,14 @@ function getUnlistedDevDependencies({ name, location }, {
1204
1275
  }
1205
1276
  if (unlistedDevDependencies > 0) {
1206
1277
  const packageLocation = `${location}/package.json`;
1207
- console.log(` ${chalk16.yellow(packageLocation)}
1278
+ console.log(` ${chalk17.yellow(packageLocation)}
1208
1279
  `);
1209
1280
  }
1210
1281
  return unlistedDevDependencies;
1211
1282
  }
1212
1283
 
1213
1284
  // src/actions/deplint/checkPackage/getUnusedDependencies.ts
1214
- import chalk17 from "chalk";
1285
+ import chalk18 from "chalk";
1215
1286
  function getUnusedDependencies({ name, location }, { dependencies }, {
1216
1287
  externalDistImports,
1217
1288
  externalDistTypeImports,
@@ -1223,22 +1294,22 @@ function getUnusedDependencies({ name, location }, { dependencies }, {
1223
1294
  if (!externalDistImports.includes(dep) && !externalDistImports.includes(dep.replace(/^@types\//, "")) && !externalDistTypeImports.includes(dep) && !externalDistTypeImports.includes(dep.replace(/^@types\//, ""))) {
1224
1295
  unusedDependencies++;
1225
1296
  if (externalAllImports.includes(dep)) {
1226
- console.log(`[${chalk17.blue(name)}] dependency should be devDependency in package.json: ${chalk17.red(dep)}`);
1297
+ console.log(`[${chalk18.blue(name)}] dependency should be devDependency in package.json: ${chalk18.red(dep)}`);
1227
1298
  } else {
1228
- console.log(`[${chalk17.blue(name)}] Unused dependency in package.json: ${chalk17.red(dep)}`);
1299
+ console.log(`[${chalk18.blue(name)}] Unused dependency in package.json: ${chalk18.red(dep)}`);
1229
1300
  }
1230
1301
  }
1231
1302
  }
1232
1303
  if (unusedDependencies > 0) {
1233
1304
  const packageLocation = `${location}/package.json`;
1234
- console.log(` ${chalk17.yellow(packageLocation)}
1305
+ console.log(` ${chalk18.yellow(packageLocation)}
1235
1306
  `);
1236
1307
  }
1237
1308
  return unusedDependencies;
1238
1309
  }
1239
1310
 
1240
1311
  // src/actions/deplint/checkPackage/getUnusedDevDependencies.ts
1241
- import chalk18 from "chalk";
1312
+ import chalk19 from "chalk";
1242
1313
 
1243
1314
  // src/actions/deplint/getCliReferencedPackagesFromFiles.ts
1244
1315
  import fs8 from "fs";
@@ -1522,19 +1593,19 @@ function getUnusedDevDependencies({ name, location }, {
1522
1593
  if (dependencies.includes(dep) || peerDependencies.includes(dep)) continue;
1523
1594
  if (!isDevDepUsed(dep, allImports, implicitDeps, requiredPeers, scriptRefs, cliRefs)) {
1524
1595
  unusedDevDependencies++;
1525
- console.log(`[${chalk18.blue(name)}] Unused devDependency in package.json: ${chalk18.red(dep)}`);
1596
+ console.log(`[${chalk19.blue(name)}] Unused devDependency in package.json: ${chalk19.red(dep)}`);
1526
1597
  }
1527
1598
  }
1528
1599
  if (unusedDevDependencies > 0) {
1529
1600
  const packageLocation = `${location}/package.json`;
1530
- console.log(` ${chalk18.yellow(packageLocation)}
1601
+ console.log(` ${chalk19.yellow(packageLocation)}
1531
1602
  `);
1532
1603
  }
1533
1604
  return unusedDevDependencies;
1534
1605
  }
1535
1606
 
1536
1607
  // src/actions/deplint/checkPackage/getUnusedPeerDependencies.ts
1537
- import chalk19 from "chalk";
1608
+ import chalk20 from "chalk";
1538
1609
  function getUnusedPeerDependencies({ name, location }, { peerDependencies, dependencies }, { externalDistImports, externalDistTypeImports }, exclude) {
1539
1610
  let unusedDependencies = 0;
1540
1611
  for (const dep of peerDependencies) {
@@ -1542,15 +1613,15 @@ function getUnusedPeerDependencies({ name, location }, { peerDependencies, depen
1542
1613
  if (!externalDistImports.includes(dep) && !externalDistImports.includes(dep.replace(/^@types\//, "")) && !externalDistTypeImports.includes(dep) && !externalDistTypeImports.includes(dep.replace(/^@types\//, ""))) {
1543
1614
  unusedDependencies++;
1544
1615
  if (dependencies.includes(dep)) {
1545
- console.log(`[${chalk19.blue(name)}] Unused peerDependency [already a dependency] in package.json: ${chalk19.red(dep)}`);
1616
+ console.log(`[${chalk20.blue(name)}] Unused peerDependency [already a dependency] in package.json: ${chalk20.red(dep)}`);
1546
1617
  } else {
1547
- console.log(`[${chalk19.blue(name)}] Unused peerDependency in package.json: ${chalk19.red(dep)}`);
1618
+ console.log(`[${chalk20.blue(name)}] Unused peerDependency in package.json: ${chalk20.red(dep)}`);
1548
1619
  }
1549
1620
  }
1550
1621
  }
1551
1622
  if (unusedDependencies > 0) {
1552
1623
  const packageLocation = `${location}/package.json`;
1553
- console.log(` ${chalk19.yellow(packageLocation)}
1624
+ console.log(` ${chalk20.yellow(packageLocation)}
1554
1625
  `);
1555
1626
  }
1556
1627
  return unusedDependencies;
@@ -1645,9 +1716,9 @@ var deplint = async ({
1645
1716
  });
1646
1717
  }
1647
1718
  if (totalErrors > 0) {
1648
- console.warn(`Deplint: Found ${chalk20.red(totalErrors)} dependency problems. ${chalk20.red("\u2716")}`);
1719
+ console.warn(`Deplint: Found ${chalk21.red(totalErrors)} dependency problems. ${chalk21.red("\u2716")}`);
1649
1720
  } else {
1650
- console.info(`Deplint: Found no dependency problems. ${chalk20.green("\u2714")}`);
1721
+ console.info(`Deplint: Found no dependency problems. ${chalk21.green("\u2714")}`);
1651
1722
  }
1652
1723
  return 0;
1653
1724
  };
@@ -1749,22 +1820,22 @@ var deployNext = () => {
1749
1820
  };
1750
1821
 
1751
1822
  // src/actions/dupdeps.ts
1752
- import chalk21 from "chalk";
1823
+ import chalk22 from "chalk";
1753
1824
  var dupdeps = () => {
1754
- console.log(chalk21.green("Checking all Dependencies for Duplicates"));
1825
+ console.log(chalk22.green("Checking all Dependencies for Duplicates"));
1755
1826
  const allDependencies = parsedPackageJSON()?.dependencies;
1756
1827
  const dependencies = Object.entries(allDependencies).map(([k]) => k);
1757
1828
  return detectDuplicateDependencies(dependencies);
1758
1829
  };
1759
1830
 
1760
1831
  // src/actions/lint.ts
1761
- import chalk22 from "chalk";
1832
+ import chalk23 from "chalk";
1762
1833
  var lintPackage = ({
1763
1834
  pkg,
1764
1835
  fix: fix2,
1765
1836
  verbose
1766
1837
  }) => {
1767
- console.log(chalk22.gray(`${fix2 ? "Fix" : "Lint"} [${pkg}]`));
1838
+ console.log(chalk23.gray(`${fix2 ? "Fix" : "Lint"} [${pkg}]`));
1768
1839
  const start = Date.now();
1769
1840
  const result = runSteps(`${fix2 ? "Fix" : "Lint"} [${pkg}]`, [
1770
1841
  ["yarn", [
@@ -1774,7 +1845,7 @@ var lintPackage = ({
1774
1845
  fix2 ? "package-fix" : verbose ? "package-lint-verbose" : "package-lint"
1775
1846
  ]]
1776
1847
  ]);
1777
- console.log(chalk22.gray(`${fix2 ? "Fixed in" : "Linted in"} [${chalk22.magenta(((Date.now() - start) / 1e3).toFixed(2))}] ${chalk22.gray("seconds")}`));
1848
+ console.log(chalk23.gray(`${fix2 ? "Fixed in" : "Linted in"} [${chalk23.magenta(((Date.now() - start) / 1e3).toFixed(2))}] ${chalk23.gray("seconds")}`));
1778
1849
  return result;
1779
1850
  };
1780
1851
  var lint = ({
@@ -1794,13 +1865,13 @@ var lint = ({
1794
1865
  });
1795
1866
  };
1796
1867
  var lintAllPackages = ({ fix: fix2 = false } = {}) => {
1797
- console.log(chalk22.gray(`${fix2 ? "Fix" : "Lint"} [All-Packages]`));
1868
+ console.log(chalk23.gray(`${fix2 ? "Fix" : "Lint"} [All-Packages]`));
1798
1869
  const start = Date.now();
1799
1870
  const fixOptions = fix2 ? ["--fix"] : [];
1800
1871
  const result = runSteps(`${fix2 ? "Fix" : "Lint"} [All-Packages]`, [
1801
1872
  ["yarn", ["eslint", "--cache", "--cache-location", ".eslintcache", "--cache-strategy", "content", ...fixOptions]]
1802
1873
  ]);
1803
- console.log(chalk22.gray(`${fix2 ? "Fixed in" : "Linted in"} [${chalk22.magenta(((Date.now() - start) / 1e3).toFixed(2))}] ${chalk22.gray("seconds")}`));
1874
+ console.log(chalk23.gray(`${fix2 ? "Fixed in" : "Linted in"} [${chalk23.magenta(((Date.now() - start) / 1e3).toFixed(2))}] ${chalk23.gray("seconds")}`));
1804
1875
  return result;
1805
1876
  };
1806
1877
 
@@ -1828,7 +1899,7 @@ var filename = ".gitignore";
1828
1899
  var gitignoreGen = (pkg) => generateIgnoreFiles(filename, pkg);
1829
1900
 
1830
1901
  // src/actions/gitlint.ts
1831
- import chalk23 from "chalk";
1902
+ import chalk24 from "chalk";
1832
1903
  import ParseGitConfig from "parse-git-config";
1833
1904
  var gitlint = () => {
1834
1905
  console.log(`
@@ -1839,7 +1910,7 @@ Gitlint Start [${process.cwd()}]
1839
1910
  const errors = 0;
1840
1911
  const gitConfig = ParseGitConfig.sync();
1841
1912
  const warn = (message) => {
1842
- console.warn(chalk23.yellow(`Warning: ${message}`));
1913
+ console.warn(chalk24.yellow(`Warning: ${message}`));
1843
1914
  warnings++;
1844
1915
  };
1845
1916
  if (gitConfig.core.ignorecase) {
@@ -1859,13 +1930,13 @@ Gitlint Start [${process.cwd()}]
1859
1930
  }
1860
1931
  const resultMessages = [];
1861
1932
  if (valid > 0) {
1862
- resultMessages.push(chalk23.green(`Passed: ${valid}`));
1933
+ resultMessages.push(chalk24.green(`Passed: ${valid}`));
1863
1934
  }
1864
1935
  if (warnings > 0) {
1865
- resultMessages.push(chalk23.yellow(`Warnings: ${warnings}`));
1936
+ resultMessages.push(chalk24.yellow(`Warnings: ${warnings}`));
1866
1937
  }
1867
1938
  if (errors > 0) {
1868
- resultMessages.push(chalk23.red(` Errors: ${errors}`));
1939
+ resultMessages.push(chalk24.red(` Errors: ${errors}`));
1869
1940
  }
1870
1941
  console.warn(`Gitlint Finish [ ${resultMessages.join(" | ")} ]
1871
1942
  `);
@@ -1874,7 +1945,7 @@ Gitlint Start [${process.cwd()}]
1874
1945
 
1875
1946
  // src/actions/gitlint-fix.ts
1876
1947
  import { execSync as execSync3 } from "child_process";
1877
- import chalk24 from "chalk";
1948
+ import chalk25 from "chalk";
1878
1949
  import ParseGitConfig2 from "parse-git-config";
1879
1950
  var gitlintFix = () => {
1880
1951
  console.log(`
@@ -1883,15 +1954,15 @@ Gitlint Fix Start [${process.cwd()}]
1883
1954
  const gitConfig = ParseGitConfig2.sync();
1884
1955
  if (gitConfig.core.ignorecase) {
1885
1956
  execSync3("git config core.ignorecase false", { stdio: "inherit" });
1886
- console.warn(chalk24.yellow("\nGitlint Fix: Updated core.ignorecase to be false\n"));
1957
+ console.warn(chalk25.yellow("\nGitlint Fix: Updated core.ignorecase to be false\n"));
1887
1958
  }
1888
1959
  if (gitConfig.core.autocrlf !== false) {
1889
1960
  execSync3("git config core.autocrlf false", { stdio: "inherit" });
1890
- console.warn(chalk24.yellow("\nGitlint Fix: Updated core.autocrlf to be false\n"));
1961
+ console.warn(chalk25.yellow("\nGitlint Fix: Updated core.autocrlf to be false\n"));
1891
1962
  }
1892
1963
  if (gitConfig.core.eol !== "lf") {
1893
1964
  execSync3("git config core.eol lf", { stdio: "inherit" });
1894
- console.warn(chalk24.yellow('\nGitlint Fix: Updated core.eol to be "lf"\n'));
1965
+ console.warn(chalk25.yellow('\nGitlint Fix: Updated core.eol to be "lf"\n'));
1895
1966
  }
1896
1967
  return 1;
1897
1968
  };
@@ -1902,7 +1973,7 @@ var knip = () => {
1902
1973
  };
1903
1974
 
1904
1975
  // src/actions/license.ts
1905
- import chalk25 from "chalk";
1976
+ import chalk26 from "chalk";
1906
1977
  import { init } from "license-checker";
1907
1978
  var license = async (pkg) => {
1908
1979
  const workspaces = yarnWorkspaces();
@@ -1927,18 +1998,18 @@ var license = async (pkg) => {
1927
1998
  "LGPL-3.0-or-later",
1928
1999
  "Python-2.0"
1929
2000
  ]);
1930
- console.log(chalk25.green("License Checker"));
2001
+ console.log(chalk26.green("License Checker"));
1931
2002
  return (await Promise.all(
1932
2003
  workspaceList.map(({ location, name }) => {
1933
2004
  return new Promise((resolve) => {
1934
2005
  init({ production: true, start: location }, (error, packages) => {
1935
2006
  if (error) {
1936
- console.error(chalk25.red(`License Checker [${name}] Error`));
1937
- console.error(chalk25.gray(error));
2007
+ console.error(chalk26.red(`License Checker [${name}] Error`));
2008
+ console.error(chalk26.gray(error));
1938
2009
  console.log("\n");
1939
2010
  resolve(1);
1940
2011
  } else {
1941
- console.log(chalk25.green(`License Checker [${name}]`));
2012
+ console.log(chalk26.green(`License Checker [${name}]`));
1942
2013
  let count = 0;
1943
2014
  for (const [name2, info] of Object.entries(packages)) {
1944
2015
  const licenses = Array.isArray(info.licenses) ? info.licenses : [info.licenses];
@@ -1954,7 +2025,7 @@ var license = async (pkg) => {
1954
2025
  }
1955
2026
  if (!orLicenseFound) {
1956
2027
  count++;
1957
- console.warn(chalk25.yellow(`${name2}: Package License not allowed [${license2}]`));
2028
+ console.warn(chalk26.yellow(`${name2}: Package License not allowed [${license2}]`));
1958
2029
  }
1959
2030
  }
1960
2031
  }
@@ -2013,7 +2084,7 @@ var rebuild = ({ target }) => {
2013
2084
  };
2014
2085
 
2015
2086
  // src/actions/recompile.ts
2016
- import chalk26 from "chalk";
2087
+ import chalk27 from "chalk";
2017
2088
  var recompile = async ({
2018
2089
  verbose,
2019
2090
  target,
@@ -2049,7 +2120,7 @@ var recompileAll = async ({
2049
2120
  const incrementalOptions = incremental ? ["--since", "-Apt", "--topological-dev"] : ["--parallel", "-Apt", "--topological-dev"];
2050
2121
  const jobsOptions = jobs ? ["-j", `${jobs}`] : [];
2051
2122
  if (jobs) {
2052
- console.log(chalk26.blue(`Jobs set to [${jobs}]`));
2123
+ console.log(chalk27.blue(`Jobs set to [${jobs}]`));
2053
2124
  }
2054
2125
  const result = await runStepsAsync(`Recompile${incremental ? "-Incremental" : ""} [All]`, [
2055
2126
  [
@@ -2080,7 +2151,7 @@ var recompileAll = async ({
2080
2151
  ]
2081
2152
  ]);
2082
2153
  console.log(
2083
- `${chalk26.gray("Recompiled in")} [${chalk26.magenta(((Date.now() - start) / 1e3).toFixed(2))}] ${chalk26.gray("seconds")}`
2154
+ `${chalk27.gray("Recompiled in")} [${chalk27.magenta(((Date.now() - start) / 1e3).toFixed(2))}] ${chalk27.gray("seconds")}`
2084
2155
  );
2085
2156
  return result;
2086
2157
  };
@@ -2111,13 +2182,13 @@ var reinstall = () => {
2111
2182
  };
2112
2183
 
2113
2184
  // src/actions/relint.ts
2114
- import chalk27 from "chalk";
2185
+ import chalk28 from "chalk";
2115
2186
  var relintPackage = ({
2116
2187
  pkg,
2117
2188
  fix: fix2,
2118
2189
  verbose
2119
2190
  }) => {
2120
- console.log(chalk27.gray(`${fix2 ? "Fix" : "Lint"} [${pkg}]`));
2191
+ console.log(chalk28.gray(`${fix2 ? "Fix" : "Lint"} [${pkg}]`));
2121
2192
  const start = Date.now();
2122
2193
  const result = runSteps(`${fix2 ? "Fix" : "Lint"} [${pkg}]`, [
2123
2194
  ["yarn", [
@@ -2127,7 +2198,7 @@ var relintPackage = ({
2127
2198
  fix2 ? "package-fix" : verbose ? "package-lint-verbose" : "package-lint"
2128
2199
  ]]
2129
2200
  ]);
2130
- console.log(chalk27.gray(`${fix2 ? "Fixed in" : "Linted in"} [${chalk27.magenta(((Date.now() - start) / 1e3).toFixed(2))}] ${chalk27.gray("seconds")}`));
2201
+ console.log(chalk28.gray(`${fix2 ? "Fixed in" : "Linted in"} [${chalk28.magenta(((Date.now() - start) / 1e3).toFixed(2))}] ${chalk28.gray("seconds")}`));
2131
2202
  return result;
2132
2203
  };
2133
2204
  var relint = ({
@@ -2147,13 +2218,13 @@ var relint = ({
2147
2218
  });
2148
2219
  };
2149
2220
  var relintAllPackages = ({ fix: fix2 = false } = {}) => {
2150
- console.log(chalk27.gray(`${fix2 ? "Fix" : "Lint"} [All-Packages]`));
2221
+ console.log(chalk28.gray(`${fix2 ? "Fix" : "Lint"} [All-Packages]`));
2151
2222
  const start = Date.now();
2152
2223
  const fixOptions = fix2 ? ["--fix"] : [];
2153
2224
  const result = runSteps(`${fix2 ? "Fix" : "Lint"} [All-Packages]`, [
2154
2225
  ["yarn", ["eslint", ...fixOptions]]
2155
2226
  ]);
2156
- console.log(chalk27.gray(`${fix2 ? "Fixed in" : "Linted in"} [${chalk27.magenta(((Date.now() - start) / 1e3).toFixed(2))}] ${chalk27.gray("seconds")}`));
2227
+ console.log(chalk28.gray(`${fix2 ? "Fixed in" : "Linted in"} [${chalk28.magenta(((Date.now() - start) / 1e3).toFixed(2))}] ${chalk28.gray("seconds")}`));
2157
2228
  return result;
2158
2229
  };
2159
2230
 
@@ -2171,10 +2242,10 @@ var sonar = () => {
2171
2242
  };
2172
2243
 
2173
2244
  // src/actions/statics.ts
2174
- import chalk28 from "chalk";
2245
+ import chalk29 from "chalk";
2175
2246
  var DefaultDependencies = ["axios", "@xylabs/pixel", "react", "graphql", "react-router", "@mui/material", "@mui/system"];
2176
2247
  var statics = () => {
2177
- console.log(chalk28.green("Check Required Static Dependencies"));
2248
+ console.log(chalk29.green("Check Required Static Dependencies"));
2178
2249
  const statics2 = parsedPackageJSON()?.xy?.deps?.statics;
2179
2250
  return detectDuplicateDependencies(statics2, DefaultDependencies);
2180
2251
  };
@@ -2335,6 +2406,14 @@ var xyCommonCommands = (args) => {
2335
2406
  if (argv.verbose) console.log("Claude Commands");
2336
2407
  process.exitCode = claudeCommands();
2337
2408
  }
2409
+ ).command(
2410
+ "claude-settings",
2411
+ "Claude Settings - Initialize .claude/settings.local.json with XY Labs defaults",
2412
+ (yargs2) => yargs2,
2413
+ async (argv) => {
2414
+ if (argv.verbose) console.log("Claude Settings");
2415
+ process.exitCode = await claudeSettings();
2416
+ }
2338
2417
  ).command(
2339
2418
  "claude-rules",
2340
2419
  "Claude Rules - Sync XY Labs standard Claude rules to .claude/rules/",
@@ -2620,7 +2699,7 @@ var xyInstallCommands = (args) => {
2620
2699
  };
2621
2700
 
2622
2701
  // src/xy/xyLintCommands.ts
2623
- import chalk29 from "chalk";
2702
+ import chalk30 from "chalk";
2624
2703
  var xyLintCommands = (args) => {
2625
2704
  return args.command(
2626
2705
  "cycle [package]",
@@ -2632,7 +2711,7 @@ var xyLintCommands = (args) => {
2632
2711
  const start = Date.now();
2633
2712
  if (argv.verbose) console.log("Cycle");
2634
2713
  process.exitCode = await cycle({ pkg: argv.package });
2635
- console.log(chalk29.blue(`Finished in ${Date.now() - start}ms`));
2714
+ console.log(chalk30.blue(`Finished in ${Date.now() - start}ms`));
2636
2715
  }
2637
2716
  ).command(
2638
2717
  "lint [package]",
@@ -2662,7 +2741,7 @@ var xyLintCommands = (args) => {
2662
2741
  cache: argv.cache,
2663
2742
  verbose: !!argv.verbose
2664
2743
  });
2665
- console.log(chalk29.blue(`Finished in ${Date.now() - start}ms`));
2744
+ console.log(chalk30.blue(`Finished in ${Date.now() - start}ms`));
2666
2745
  }
2667
2746
  ).command(
2668
2747
  "deplint [package]",
@@ -2701,7 +2780,7 @@ var xyLintCommands = (args) => {
2701
2780
  peerDeps: !!argv.peerDeps,
2702
2781
  verbose: !!argv.verbose
2703
2782
  });
2704
- console.log(chalk29.blue(`Finished in ${Date.now() - start}ms`));
2783
+ console.log(chalk30.blue(`Finished in ${Date.now() - start}ms`));
2705
2784
  }
2706
2785
  ).command(
2707
2786
  "fix [package]",
@@ -2713,7 +2792,7 @@ var xyLintCommands = (args) => {
2713
2792
  const start = Date.now();
2714
2793
  if (argv.verbose) console.log("Fix");
2715
2794
  process.exitCode = fix();
2716
- console.log(chalk29.blue(`Finished in ${Date.now() - start}ms`));
2795
+ console.log(chalk30.blue(`Finished in ${Date.now() - start}ms`));
2717
2796
  }
2718
2797
  ).command(
2719
2798
  "relint [package]",
@@ -2725,7 +2804,7 @@ var xyLintCommands = (args) => {
2725
2804
  if (argv.verbose) console.log("Relinting");
2726
2805
  const start = Date.now();
2727
2806
  process.exitCode = relint();
2728
- console.log(chalk29.blue(`Finished in ${Date.now() - start}ms`));
2807
+ console.log(chalk30.blue(`Finished in ${Date.now() - start}ms`));
2729
2808
  }
2730
2809
  ).command(
2731
2810
  "publint [package]",
@@ -2737,7 +2816,7 @@ var xyLintCommands = (args) => {
2737
2816
  if (argv.verbose) console.log("Publint");
2738
2817
  const start = Date.now();
2739
2818
  process.exitCode = await publint({ pkg: argv.package, verbose: !!argv.verbose });
2740
- console.log(chalk29.blue(`Finished in ${Date.now() - start}ms`));
2819
+ console.log(chalk30.blue(`Finished in ${Date.now() - start}ms`));
2741
2820
  }
2742
2821
  ).command(
2743
2822
  "knip",
@@ -2749,7 +2828,7 @@ var xyLintCommands = (args) => {
2749
2828
  if (argv.verbose) console.log("Knip");
2750
2829
  const start = Date.now();
2751
2830
  process.exitCode = knip();
2752
- console.log(chalk29.blue(`Knip finished in ${Date.now() - start}ms`));
2831
+ console.log(chalk30.blue(`Knip finished in ${Date.now() - start}ms`));
2753
2832
  }
2754
2833
  ).command(
2755
2834
  "sonar",
@@ -2761,7 +2840,7 @@ var xyLintCommands = (args) => {
2761
2840
  const start = Date.now();
2762
2841
  if (argv.verbose) console.log("Sonar Check");
2763
2842
  process.exitCode = sonar();
2764
- console.log(chalk29.blue(`Finished in ${Date.now() - start}ms`));
2843
+ console.log(chalk30.blue(`Finished in ${Date.now() - start}ms`));
2765
2844
  }
2766
2845
  );
2767
2846
  };
@@ -2797,8 +2876,8 @@ var xyParseOptions = () => {
2797
2876
  var xy = async () => {
2798
2877
  const options = xyParseOptions();
2799
2878
  return await xyBuildCommands(xyCommonCommands(xyInstallCommands(xyDeployCommands(xyLintCommands(options))))).demandCommand(1).command("*", "", () => {
2800
- console.error(chalk30.yellow(`Command not found [${chalk30.magenta(process.argv[2])}]`));
2801
- console.log(chalk30.gray("Try 'yarn xy --help' for list of commands"));
2879
+ console.error(chalk31.yellow(`Command not found [${chalk31.magenta(process.argv[2])}]`));
2880
+ console.log(chalk31.gray("Try 'yarn xy --help' for list of commands"));
2802
2881
  }).version().help().argv;
2803
2882
  };
2804
2883