@xylabs/ts-scripts-yarn3 7.4.11 → 7.4.12

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.
@@ -1,5 +1,5 @@
1
1
  // src/actions/build.ts
2
- import chalk8 from "chalk";
2
+ import chalk9 from "chalk";
3
3
 
4
4
  // src/lib/checkResult.ts
5
5
  import chalk from "chalk";
@@ -321,8 +321,138 @@ var generateIgnoreFiles = (filename3, pkg) => {
321
321
  return succeeded ? 0 : 1;
322
322
  };
323
323
 
324
- // src/lib/loadConfig.ts
324
+ // src/lib/generateReadmeFiles.ts
325
+ import { execSync as execSync2 } from "child_process";
326
+ import FS from "fs";
327
+ import { readFile, writeFile } from "fs/promises";
328
+ import PATH2 from "path";
325
329
  import chalk5 from "chalk";
330
+ function fillTemplate(template, data) {
331
+ const additionalData = { ...data, safeName: data.name.replaceAll("/", "__").replaceAll("@", "") };
332
+ return template.replaceAll(/\{\{(.*?)\}\}/g, (_, key) => additionalData[key.trim()] ?? "");
333
+ }
334
+ function generateTypedoc(packageLocation, entryPoints) {
335
+ const tempDir = PATH2.join(packageLocation, ".temp-typedoc");
336
+ try {
337
+ if (!FS.existsSync(tempDir)) {
338
+ FS.mkdirSync(tempDir, { recursive: true });
339
+ }
340
+ const typedocConfig = {
341
+ disableSources: true,
342
+ entryPointStrategy: "expand",
343
+ entryPoints: entryPoints.map((ep) => PATH2.resolve(packageLocation, ep)),
344
+ excludeExternals: true,
345
+ excludeInternal: true,
346
+ excludePrivate: true,
347
+ githubPages: false,
348
+ hideBreadcrumbs: true,
349
+ hideGenerator: true,
350
+ hidePageTitle: true,
351
+ out: tempDir,
352
+ plugin: ["typedoc-plugin-markdown"],
353
+ readme: "none",
354
+ skipErrorChecking: true,
355
+ sort: ["source-order"],
356
+ theme: "markdown",
357
+ useCodeBlocks: true
358
+ };
359
+ const typedocJsonPath = PATH2.join(tempDir, "typedoc.json");
360
+ FS.writeFileSync(typedocJsonPath, JSON.stringify(typedocConfig, null, 2));
361
+ try {
362
+ execSync2(`npx typedoc --options ${typedocJsonPath}`, {
363
+ cwd: process.cwd(),
364
+ stdio: ["ignore", "pipe", "pipe"]
365
+ });
366
+ } catch {
367
+ return "";
368
+ }
369
+ return consolidateMarkdown(tempDir);
370
+ } catch {
371
+ return "";
372
+ } finally {
373
+ try {
374
+ FS.rmSync(tempDir, { force: true, recursive: true });
375
+ } catch {
376
+ }
377
+ }
378
+ }
379
+ function consolidateMarkdown(tempDir) {
380
+ let consolidated = "## Reference\n\n";
381
+ const mainReadmePath = PATH2.join(tempDir, "README.md");
382
+ if (FS.existsSync(mainReadmePath)) {
383
+ const mainContent = FS.readFileSync(mainReadmePath, "utf8").replace(/^---(.|\n)*?---\n/, "").replace(/^# .+\n/, "").replaceAll(/\]\((.+?)\.md\)/g, "](#$1)");
384
+ consolidated += mainContent + "\n\n";
385
+ }
386
+ consolidated += processDirectory(tempDir);
387
+ return consolidated.replaceAll(/\n\n\n+/g, "\n\n").replaceAll(/^#### /gm, "### ").replaceAll(/^##### /gm, "#### ").replaceAll(/^###### /gm, "##### ");
388
+ }
389
+ function processDirectory(dir, level = 0) {
390
+ const indent = " ".repeat(level);
391
+ let content = "";
392
+ try {
393
+ const items = FS.readdirSync(dir, { withFileTypes: true });
394
+ for (const item of items) {
395
+ if (item.isDirectory()) continue;
396
+ if (item.name === "README.md" || !item.name.endsWith(".md")) continue;
397
+ const fileContent = FS.readFileSync(PATH2.join(dir, item.name), "utf8").replace(/^---(.|\n)*?---\n/, "");
398
+ const moduleName = item.name.replace(".md", "");
399
+ content += `
400
+
401
+ ${indent}### <a id="${moduleName}"></a>${moduleName}
402
+
403
+ `;
404
+ content += fileContent.replace(/^# .+\n/, "").replaceAll(/\]\((.+?)\.md\)/g, "](#$1)");
405
+ }
406
+ for (const item of items) {
407
+ if (!item.isDirectory()) continue;
408
+ if (item.name === "spec" || item.name.includes(".spec")) continue;
409
+ content += `
410
+
411
+ ${indent}### ${item.name}
412
+ `;
413
+ content += processDirectory(PATH2.join(dir, item.name), level + 1);
414
+ }
415
+ } catch {
416
+ }
417
+ return content;
418
+ }
419
+ async function generateReadmeFiles({
420
+ pkg,
421
+ templatePath,
422
+ typedoc = false,
423
+ verbose
424
+ }) {
425
+ console.log(chalk5.green("Generate README Files"));
426
+ const cwd5 = INIT_CWD() ?? ".";
427
+ const resolvedTemplatePath = templatePath ?? PATH2.join(cwd5, "scripts", "README.template.md");
428
+ let template;
429
+ try {
430
+ template = await readFile(resolvedTemplatePath, "utf8");
431
+ } catch {
432
+ console.error(chalk5.red(`Template not found: ${resolvedTemplatePath}`));
433
+ return 1;
434
+ }
435
+ const workspaces = pkg ? [yarnWorkspace(pkg)] : yarnWorkspaces();
436
+ let failed = false;
437
+ for (const { location, name } of workspaces) {
438
+ try {
439
+ const pkgJsonPath = PATH2.join(location, "package.json");
440
+ const pkgJson = JSON.parse(await readFile(pkgJsonPath, "utf8"));
441
+ const typedocContent = typedoc ? generateTypedoc(location, ["src/index*.ts"]) : "";
442
+ const readmeContent = fillTemplate(template, { ...pkgJson, typedoc: typedocContent });
443
+ await writeFile(PATH2.join(location, "README.md"), readmeContent);
444
+ if (verbose) console.log(chalk5.green(` ${name}`));
445
+ } catch (ex) {
446
+ const error = ex;
447
+ console.warn(chalk5.yellow(` Skipped ${location}: ${error.message}`));
448
+ failed = true;
449
+ }
450
+ }
451
+ return failed ? 1 : 0;
452
+ }
453
+
454
+ // src/lib/loadConfig.ts
455
+ import chalk6 from "chalk";
326
456
  import { cosmiconfig } from "cosmiconfig";
327
457
  import { TypeScriptLoader } from "cosmiconfig-typescript-loader";
328
458
  import deepmerge from "deepmerge";
@@ -333,9 +463,9 @@ var loadConfig = async (params) => {
333
463
  config = cosmicConfigResult?.config;
334
464
  const configFilePath = cosmicConfigResult?.filepath;
335
465
  if (configFilePath !== void 0) {
336
- console.log(chalk5.green(`Loaded config from ${configFilePath}`));
466
+ console.log(chalk6.green(`Loaded config from ${configFilePath}`));
337
467
  if (config.verbose) {
338
- console.log(chalk5.gray(`${JSON.stringify(config, null, 2)}`));
468
+ console.log(chalk6.gray(`${JSON.stringify(config, null, 2)}`));
339
469
  }
340
470
  }
341
471
  }
@@ -353,15 +483,15 @@ var parsedPackageJSON = (path14) => {
353
483
  // src/lib/runSteps.ts
354
484
  import { spawnSync as spawnSync3 } from "child_process";
355
485
  import { existsSync as existsSync2 } from "fs";
356
- import chalk6 from "chalk";
486
+ import chalk7 from "chalk";
357
487
  var runSteps = (name, steps, exitOnFail = true, messages) => {
358
488
  return safeExit(() => {
359
489
  const pkgName = process.env.npm_package_name;
360
- console.log(chalk6.green(`${name} [${pkgName}]`));
490
+ console.log(chalk7.green(`${name} [${pkgName}]`));
361
491
  let totalStatus = 0;
362
492
  for (const [i, [command, args, config2]] of steps.entries()) {
363
493
  if (messages?.[i]) {
364
- console.log(chalk6.gray(messages?.[i]));
494
+ console.log(chalk7.gray(messages?.[i]));
365
495
  }
366
496
  const argList = Array.isArray(args) ? args : args.split(" ");
367
497
  if (command === "node" && !existsSync2(argList[0])) {
@@ -384,12 +514,12 @@ var runSteps = (name, steps, exitOnFail = true, messages) => {
384
514
  // src/lib/runStepsAsync.ts
385
515
  import { spawn } from "child_process";
386
516
  import { existsSync as existsSync3 } from "fs";
387
- import chalk7 from "chalk";
517
+ import chalk8 from "chalk";
388
518
  var runStepAsync = (name, step, exitOnFail = true, message) => {
389
519
  return new Promise((resolve) => {
390
520
  const [command, args, config2] = step;
391
521
  if (message) {
392
- console.log(chalk7.gray(message));
522
+ console.log(chalk8.gray(message));
393
523
  }
394
524
  const argList = Array.isArray(args) ? args : args.split(" ");
395
525
  if (command === "node" && !existsSync3(argList[0])) {
@@ -403,8 +533,8 @@ var runStepAsync = (name, step, exitOnFail = true, message) => {
403
533
  }).on("close", (code) => {
404
534
  if (code) {
405
535
  console.error(
406
- chalk7.red(
407
- `Command Exited With Non-Zero Result [${chalk7.gray(code)}] | ${chalk7.yellow(command)} ${chalk7.white(
536
+ chalk8.red(
537
+ `Command Exited With Non-Zero Result [${chalk8.gray(code)}] | ${chalk8.yellow(command)} ${chalk8.white(
408
538
  Array.isArray(args) ? args.join(" ") : args
409
539
  )}`
410
540
  )
@@ -420,7 +550,7 @@ var runStepAsync = (name, step, exitOnFail = true, message) => {
420
550
  var runStepsAsync = async (name, steps, exitOnFail = true, messages) => {
421
551
  return await safeExitAsync(async () => {
422
552
  const pkgName = process.env.npm_package_name;
423
- console.log(chalk7.green(`${name} [${pkgName}]`));
553
+ console.log(chalk8.green(`${name} [${pkgName}]`));
424
554
  let result = 0;
425
555
  for (const [i, step] of steps.entries()) {
426
556
  result += await runStepAsync(name, step, exitOnFail, messages?.[i]);
@@ -444,7 +574,7 @@ var build = async ({
444
574
  const targetOptions = target === void 0 ? [] : ["-t", target];
445
575
  const jobsOptions = jobs === void 0 ? [] : ["-j", `${jobs}`];
446
576
  if (jobs !== void 0) {
447
- console.log(chalk8.blue(`Jobs set to [${jobs}]`));
577
+ console.log(chalk9.blue(`Jobs set to [${jobs}]`));
448
578
  }
449
579
  const result = await runStepsAsync(`Build${incremental ? "-Incremental" : ""} [${pkg ?? "All"}]`, [
450
580
  ["yarn", ["xy", "compile", ...pkgOptions, ...targetOptions, ...verboseOptions, ...jobsOptions, ...incrementalOptions, "--types", "tsup"]],
@@ -452,7 +582,7 @@ var build = async ({
452
582
  ["yarn", ["xy", "deplint", ...pkgOptions, ...verboseOptions, ...jobsOptions, ...incrementalOptions]],
453
583
  ["yarn", ["xy", "lint", ...pkgOptions, ...verboseOptions, ...incrementalOptions]]
454
584
  ]);
455
- console.log(`${chalk8.gray("Built in")} [${chalk8.magenta(((Date.now() - start) / 1e3).toFixed(2))}] ${chalk8.gray("seconds")}`);
585
+ console.log(`${chalk9.gray("Built in")} [${chalk9.magenta(((Date.now() - start) / 1e3).toFixed(2))}] ${chalk9.gray("seconds")}`);
456
586
  return result;
457
587
  };
458
588
 
@@ -465,15 +595,15 @@ import {
465
595
  unlinkSync,
466
596
  writeFileSync as writeFileSync2
467
597
  } from "fs";
468
- import PATH2 from "path";
469
- import chalk9 from "chalk";
598
+ import PATH3 from "path";
599
+ import chalk10 from "chalk";
470
600
  var syncCommandFiles = (commandsDir) => {
471
601
  const templates = claudeCommandTemplates();
472
602
  const templateNames = new Set(Object.keys(templates));
473
603
  let updated = 0;
474
604
  let created = 0;
475
605
  for (const [filename3, content] of Object.entries(templates)) {
476
- const targetPath = PATH2.resolve(commandsDir, filename3);
606
+ const targetPath = PATH3.resolve(commandsDir, filename3);
477
607
  const existing = existsSync4(targetPath) ? readFileSync4(targetPath, "utf8") : void 0;
478
608
  if (existing === content) continue;
479
609
  writeFileSync2(targetPath, content, "utf8");
@@ -494,7 +624,7 @@ var removeStaleCommands = (commandsDir, templateNames) => {
494
624
  let removed = 0;
495
625
  for (const file of existingCommands) {
496
626
  if (!templateNames.has(file)) {
497
- unlinkSync(PATH2.resolve(commandsDir, file));
627
+ unlinkSync(PATH3.resolve(commandsDir, file));
498
628
  removed++;
499
629
  }
500
630
  }
@@ -507,14 +637,14 @@ var logCommandsResult = (created, updated, removed) => {
507
637
  updated ? `${updated} updated` : "",
508
638
  removed ? `${removed} removed` : ""
509
639
  ].filter(Boolean);
510
- console.log(chalk9.green(`.claude/commands/${XYLABS_COMMANDS_PREFIX}*.md: ${parts.join(", ")}`));
640
+ console.log(chalk10.green(`.claude/commands/${XYLABS_COMMANDS_PREFIX}*.md: ${parts.join(", ")}`));
511
641
  } else {
512
- console.log(chalk9.gray(`.claude/commands/${XYLABS_COMMANDS_PREFIX}*.md: already up to date`));
642
+ console.log(chalk10.gray(`.claude/commands/${XYLABS_COMMANDS_PREFIX}*.md: already up to date`));
513
643
  }
514
644
  };
515
645
  var claudeCommands = () => {
516
646
  const cwd5 = INIT_CWD() ?? process.cwd();
517
- const commandsDir = PATH2.resolve(cwd5, ".claude", "commands");
647
+ const commandsDir = PATH3.resolve(cwd5, ".claude", "commands");
518
648
  mkdirSync(commandsDir, { recursive: true });
519
649
  const {
520
650
  created,
@@ -535,15 +665,15 @@ import {
535
665
  unlinkSync as unlinkSync2,
536
666
  writeFileSync as writeFileSync3
537
667
  } from "fs";
538
- import PATH3 from "path";
539
- import chalk10 from "chalk";
668
+ import PATH4 from "path";
669
+ import chalk11 from "chalk";
540
670
  var syncRuleFiles = (rulesDir) => {
541
671
  const templates = claudeMdRuleTemplates();
542
672
  const templateNames = new Set(Object.keys(templates));
543
673
  let updated = 0;
544
674
  let created = 0;
545
675
  for (const [filename3, content] of Object.entries(templates)) {
546
- const targetPath = PATH3.resolve(rulesDir, filename3);
676
+ const targetPath = PATH4.resolve(rulesDir, filename3);
547
677
  const existing = existsSync5(targetPath) ? readFileSync5(targetPath, "utf8") : void 0;
548
678
  if (existing === content) continue;
549
679
  writeFileSync3(targetPath, content, "utf8");
@@ -564,7 +694,7 @@ var removeStaleRules = (rulesDir, templateNames) => {
564
694
  let removed = 0;
565
695
  for (const file of existingRules) {
566
696
  if (!templateNames.has(file)) {
567
- unlinkSync2(PATH3.resolve(rulesDir, file));
697
+ unlinkSync2(PATH4.resolve(rulesDir, file));
568
698
  removed++;
569
699
  }
570
700
  }
@@ -577,26 +707,26 @@ var logRulesResult = (created, updated, removed) => {
577
707
  updated ? `${updated} updated` : "",
578
708
  removed ? `${removed} removed` : ""
579
709
  ].filter(Boolean);
580
- console.log(chalk10.green(`.claude/rules/${XYLABS_RULES_PREFIX}*.md: ${parts.join(", ")}`));
710
+ console.log(chalk11.green(`.claude/rules/${XYLABS_RULES_PREFIX}*.md: ${parts.join(", ")}`));
581
711
  } else {
582
- console.log(chalk10.gray(`.claude/rules/${XYLABS_RULES_PREFIX}*.md: already up to date`));
712
+ console.log(chalk11.gray(`.claude/rules/${XYLABS_RULES_PREFIX}*.md: already up to date`));
583
713
  }
584
714
  };
585
715
  var ensureProjectClaudeMd = (cwd5, force) => {
586
- const projectPath = PATH3.resolve(cwd5, "CLAUDE.md");
716
+ const projectPath = PATH4.resolve(cwd5, "CLAUDE.md");
587
717
  if (!existsSync5(projectPath) || force) {
588
718
  if (force && existsSync5(projectPath)) {
589
- console.log(chalk10.yellow("Overwriting existing CLAUDE.md"));
719
+ console.log(chalk11.yellow("Overwriting existing CLAUDE.md"));
590
720
  }
591
721
  writeFileSync3(projectPath, claudeMdProjectTemplate(), "utf8");
592
- console.log(chalk10.green("Generated CLAUDE.md"));
722
+ console.log(chalk11.green("Generated CLAUDE.md"));
593
723
  } else {
594
- console.log(chalk10.gray("CLAUDE.md already exists (skipped)"));
724
+ console.log(chalk11.gray("CLAUDE.md already exists (skipped)"));
595
725
  }
596
726
  };
597
727
  var claudeRules = ({ force } = {}) => {
598
728
  const cwd5 = INIT_CWD() ?? process.cwd();
599
- const rulesDir = PATH3.resolve(cwd5, ".claude", "rules");
729
+ const rulesDir = PATH4.resolve(cwd5, ".claude", "rules");
600
730
  mkdirSync2(rulesDir, { recursive: true });
601
731
  const {
602
732
  created,
@@ -623,16 +753,16 @@ var cleanAll = ({ verbose }) => {
623
753
 
624
754
  // src/actions/clean-docs.ts
625
755
  import path from "path";
626
- import chalk11 from "chalk";
756
+ import chalk12 from "chalk";
627
757
  var cleanDocs = () => {
628
758
  const pkgName = process.env.npm_package_name;
629
- console.log(chalk11.green(`Cleaning Docs [${pkgName}]`));
759
+ console.log(chalk12.green(`Cleaning Docs [${pkgName}]`));
630
760
  for (const { location } of yarnWorkspaces()) deleteGlob(path.join(location, "docs"));
631
761
  return 0;
632
762
  };
633
763
 
634
764
  // src/actions/compile.ts
635
- import chalk12 from "chalk";
765
+ import chalk13 from "chalk";
636
766
  var compile = ({
637
767
  verbose,
638
768
  target,
@@ -673,7 +803,7 @@ var compileAll = ({
673
803
  const incrementalOptions = incremental ? ["--since", "-Ap", "--topological-dev"] : ["--parallel", "-Ap", "--topological-dev"];
674
804
  const jobsOptions = jobs ? ["-j", `${jobs}`] : [];
675
805
  if (jobs) {
676
- console.log(chalk12.blue(`Jobs set to [${jobs}]`));
806
+ console.log(chalk13.blue(`Jobs set to [${jobs}]`));
677
807
  }
678
808
  const result = runSteps(`Compile${incremental ? "-Incremental" : ""} [All]`, [
679
809
  ["yarn", [
@@ -687,13 +817,13 @@ var compileAll = ({
687
817
  ...targetOptions
688
818
  ]]
689
819
  ]);
690
- console.log(`${chalk12.gray("Compiled in")} [${chalk12.magenta(((Date.now() - start) / 1e3).toFixed(2))}] ${chalk12.gray("seconds")}`);
820
+ console.log(`${chalk13.gray("Compiled in")} [${chalk13.magenta(((Date.now() - start) / 1e3).toFixed(2))}] ${chalk13.gray("seconds")}`);
691
821
  return result;
692
822
  };
693
823
 
694
824
  // src/actions/copy-assets.ts
695
825
  import path2 from "path/posix";
696
- import chalk13 from "chalk";
826
+ import chalk14 from "chalk";
697
827
  import cpy from "cpy";
698
828
  var copyPackageTargetAssets = async (target, name, location) => {
699
829
  try {
@@ -716,7 +846,7 @@ var copyPackageTargetAssets = async (target, name, location) => {
716
846
  };
717
847
  var copyTargetAssets = async (target, pkg) => {
718
848
  const workspaces = yarnWorkspaces();
719
- console.log(chalk13.green(`Copying Assets [${target.toUpperCase()}]`));
849
+ console.log(chalk14.green(`Copying Assets [${target.toUpperCase()}]`));
720
850
  const workspaceList = workspaces.filter(({ name }) => {
721
851
  return pkg === void 0 || name === pkg;
722
852
  });
@@ -800,7 +930,7 @@ var dead = () => {
800
930
  };
801
931
 
802
932
  // src/actions/deplint/deplint.ts
803
- import chalk19 from "chalk";
933
+ import chalk20 from "chalk";
804
934
 
805
935
  // src/actions/deplint/findFiles.ts
806
936
  import fs2 from "fs";
@@ -1002,12 +1132,12 @@ function getExternalImportsFromFiles({
1002
1132
 
1003
1133
  // src/actions/deplint/checkPackage/getUnlistedDependencies.ts
1004
1134
  import { builtinModules } from "module";
1005
- import chalk14 from "chalk";
1135
+ import chalk15 from "chalk";
1006
1136
  function isListedOrBuiltin(imp, name, dependencies, peerDependencies) {
1007
1137
  return dependencies.includes(imp) || imp === name || dependencies.includes(`@types/${imp}`) || peerDependencies.includes(imp) || peerDependencies.includes(`@types/${imp}`) || builtinModules.includes(imp) || builtinModules.includes(`@types/${imp}`);
1008
1138
  }
1009
1139
  function logMissing(name, imp, importPaths) {
1010
- console.log(`[${chalk14.blue(name)}] Missing dependency in package.json: ${chalk14.red(imp)}`);
1140
+ console.log(`[${chalk15.blue(name)}] Missing dependency in package.json: ${chalk15.red(imp)}`);
1011
1141
  if (importPaths[imp]) {
1012
1142
  console.log(` ${importPaths[imp].join("\n ")}`);
1013
1143
  }
@@ -1032,7 +1162,7 @@ function getUnlistedDependencies({ name, location }, { dependencies, peerDepende
1032
1162
  }
1033
1163
  if (unlistedDependencies > 0) {
1034
1164
  const packageLocation = `${location}/package.json`;
1035
- console.log(` ${chalk14.yellow(packageLocation)}
1165
+ console.log(` ${chalk15.yellow(packageLocation)}
1036
1166
  `);
1037
1167
  }
1038
1168
  return unlistedDependencies;
@@ -1040,7 +1170,7 @@ function getUnlistedDependencies({ name, location }, { dependencies, peerDepende
1040
1170
 
1041
1171
  // src/actions/deplint/checkPackage/getUnlistedDevDependencies.ts
1042
1172
  import { builtinModules as builtinModules2 } from "module";
1043
- import chalk15 from "chalk";
1173
+ import chalk16 from "chalk";
1044
1174
  function getUnlistedDevDependencies({ name, location }, {
1045
1175
  devDependencies,
1046
1176
  dependencies,
@@ -1054,7 +1184,7 @@ function getUnlistedDevDependencies({ name, location }, {
1054
1184
  for (const imp of externalAllImports) {
1055
1185
  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)) {
1056
1186
  unlistedDevDependencies++;
1057
- console.log(`[${chalk15.blue(name)}] Missing devDependency in package.json: ${chalk15.red(imp)}`);
1187
+ console.log(`[${chalk16.blue(name)}] Missing devDependency in package.json: ${chalk16.red(imp)}`);
1058
1188
  if (allImportPaths[imp]) {
1059
1189
  console.log(` ${allImportPaths[imp].join("\n ")}`);
1060
1190
  }
@@ -1062,14 +1192,14 @@ function getUnlistedDevDependencies({ name, location }, {
1062
1192
  }
1063
1193
  if (unlistedDevDependencies > 0) {
1064
1194
  const packageLocation = `${location}/package.json`;
1065
- console.log(` ${chalk15.yellow(packageLocation)}
1195
+ console.log(` ${chalk16.yellow(packageLocation)}
1066
1196
  `);
1067
1197
  }
1068
1198
  return unlistedDevDependencies;
1069
1199
  }
1070
1200
 
1071
1201
  // src/actions/deplint/checkPackage/getUnusedDependencies.ts
1072
- import chalk16 from "chalk";
1202
+ import chalk17 from "chalk";
1073
1203
  function getUnusedDependencies({ name, location }, { dependencies }, {
1074
1204
  externalDistImports,
1075
1205
  externalDistTypeImports,
@@ -1081,22 +1211,22 @@ function getUnusedDependencies({ name, location }, { dependencies }, {
1081
1211
  if (!externalDistImports.includes(dep) && !externalDistImports.includes(dep.replace(/^@types\//, "")) && !externalDistTypeImports.includes(dep) && !externalDistTypeImports.includes(dep.replace(/^@types\//, ""))) {
1082
1212
  unusedDependencies++;
1083
1213
  if (externalAllImports.includes(dep)) {
1084
- console.log(`[${chalk16.blue(name)}] dependency should be devDependency in package.json: ${chalk16.red(dep)}`);
1214
+ console.log(`[${chalk17.blue(name)}] dependency should be devDependency in package.json: ${chalk17.red(dep)}`);
1085
1215
  } else {
1086
- console.log(`[${chalk16.blue(name)}] Unused dependency in package.json: ${chalk16.red(dep)}`);
1216
+ console.log(`[${chalk17.blue(name)}] Unused dependency in package.json: ${chalk17.red(dep)}`);
1087
1217
  }
1088
1218
  }
1089
1219
  }
1090
1220
  if (unusedDependencies > 0) {
1091
1221
  const packageLocation = `${location}/package.json`;
1092
- console.log(` ${chalk16.yellow(packageLocation)}
1222
+ console.log(` ${chalk17.yellow(packageLocation)}
1093
1223
  `);
1094
1224
  }
1095
1225
  return unusedDependencies;
1096
1226
  }
1097
1227
 
1098
1228
  // src/actions/deplint/checkPackage/getUnusedDevDependencies.ts
1099
- import chalk17 from "chalk";
1229
+ import chalk18 from "chalk";
1100
1230
 
1101
1231
  // src/actions/deplint/getCliReferencedPackagesFromFiles.ts
1102
1232
  import fs8 from "fs";
@@ -1380,19 +1510,19 @@ function getUnusedDevDependencies({ name, location }, {
1380
1510
  if (dependencies.includes(dep) || peerDependencies.includes(dep)) continue;
1381
1511
  if (!isDevDepUsed(dep, allImports, implicitDeps, requiredPeers, scriptRefs, cliRefs)) {
1382
1512
  unusedDevDependencies++;
1383
- console.log(`[${chalk17.blue(name)}] Unused devDependency in package.json: ${chalk17.red(dep)}`);
1513
+ console.log(`[${chalk18.blue(name)}] Unused devDependency in package.json: ${chalk18.red(dep)}`);
1384
1514
  }
1385
1515
  }
1386
1516
  if (unusedDevDependencies > 0) {
1387
1517
  const packageLocation = `${location}/package.json`;
1388
- console.log(` ${chalk17.yellow(packageLocation)}
1518
+ console.log(` ${chalk18.yellow(packageLocation)}
1389
1519
  `);
1390
1520
  }
1391
1521
  return unusedDevDependencies;
1392
1522
  }
1393
1523
 
1394
1524
  // src/actions/deplint/checkPackage/getUnusedPeerDependencies.ts
1395
- import chalk18 from "chalk";
1525
+ import chalk19 from "chalk";
1396
1526
  function getUnusedPeerDependencies({ name, location }, { peerDependencies, dependencies }, { externalDistImports, externalDistTypeImports }, exclude) {
1397
1527
  let unusedDependencies = 0;
1398
1528
  for (const dep of peerDependencies) {
@@ -1400,15 +1530,15 @@ function getUnusedPeerDependencies({ name, location }, { peerDependencies, depen
1400
1530
  if (!externalDistImports.includes(dep) && !externalDistImports.includes(dep.replace(/^@types\//, "")) && !externalDistTypeImports.includes(dep) && !externalDistTypeImports.includes(dep.replace(/^@types\//, ""))) {
1401
1531
  unusedDependencies++;
1402
1532
  if (dependencies.includes(dep)) {
1403
- console.log(`[${chalk18.blue(name)}] Unused peerDependency [already a dependency] in package.json: ${chalk18.red(dep)}`);
1533
+ console.log(`[${chalk19.blue(name)}] Unused peerDependency [already a dependency] in package.json: ${chalk19.red(dep)}`);
1404
1534
  } else {
1405
- console.log(`[${chalk18.blue(name)}] Unused peerDependency in package.json: ${chalk18.red(dep)}`);
1535
+ console.log(`[${chalk19.blue(name)}] Unused peerDependency in package.json: ${chalk19.red(dep)}`);
1406
1536
  }
1407
1537
  }
1408
1538
  }
1409
1539
  if (unusedDependencies > 0) {
1410
1540
  const packageLocation = `${location}/package.json`;
1411
- console.log(` ${chalk18.yellow(packageLocation)}
1541
+ console.log(` ${chalk19.yellow(packageLocation)}
1412
1542
  `);
1413
1543
  }
1414
1544
  return unusedDependencies;
@@ -1503,9 +1633,9 @@ var deplint = async ({
1503
1633
  });
1504
1634
  }
1505
1635
  if (totalErrors > 0) {
1506
- console.warn(`Deplint: Found ${chalk19.red(totalErrors)} dependency problems. ${chalk19.red("\u2716")}`);
1636
+ console.warn(`Deplint: Found ${chalk20.red(totalErrors)} dependency problems. ${chalk20.red("\u2716")}`);
1507
1637
  } else {
1508
- console.info(`Deplint: Found no dependency problems. ${chalk19.green("\u2714")}`);
1638
+ console.info(`Deplint: Found no dependency problems. ${chalk20.green("\u2714")}`);
1509
1639
  }
1510
1640
  return 0;
1511
1641
  };
@@ -1607,22 +1737,22 @@ var deployNext = () => {
1607
1737
  };
1608
1738
 
1609
1739
  // src/actions/dupdeps.ts
1610
- import chalk20 from "chalk";
1740
+ import chalk21 from "chalk";
1611
1741
  var dupdeps = () => {
1612
- console.log(chalk20.green("Checking all Dependencies for Duplicates"));
1742
+ console.log(chalk21.green("Checking all Dependencies for Duplicates"));
1613
1743
  const allDependencies = parsedPackageJSON()?.dependencies;
1614
1744
  const dependencies = Object.entries(allDependencies).map(([k]) => k);
1615
1745
  return detectDuplicateDependencies(dependencies);
1616
1746
  };
1617
1747
 
1618
1748
  // src/actions/lint.ts
1619
- import chalk21 from "chalk";
1749
+ import chalk22 from "chalk";
1620
1750
  var lintPackage = ({
1621
1751
  pkg,
1622
1752
  fix: fix2,
1623
1753
  verbose
1624
1754
  }) => {
1625
- console.log(chalk21.gray(`${fix2 ? "Fix" : "Lint"} [${pkg}]`));
1755
+ console.log(chalk22.gray(`${fix2 ? "Fix" : "Lint"} [${pkg}]`));
1626
1756
  const start = Date.now();
1627
1757
  const result = runSteps(`${fix2 ? "Fix" : "Lint"} [${pkg}]`, [
1628
1758
  ["yarn", [
@@ -1632,7 +1762,7 @@ var lintPackage = ({
1632
1762
  fix2 ? "package-fix" : verbose ? "package-lint-verbose" : "package-lint"
1633
1763
  ]]
1634
1764
  ]);
1635
- console.log(chalk21.gray(`${fix2 ? "Fixed in" : "Linted in"} [${chalk21.magenta(((Date.now() - start) / 1e3).toFixed(2))}] ${chalk21.gray("seconds")}`));
1765
+ console.log(chalk22.gray(`${fix2 ? "Fixed in" : "Linted in"} [${chalk22.magenta(((Date.now() - start) / 1e3).toFixed(2))}] ${chalk22.gray("seconds")}`));
1636
1766
  return result;
1637
1767
  };
1638
1768
  var lint = ({
@@ -1652,13 +1782,13 @@ var lint = ({
1652
1782
  });
1653
1783
  };
1654
1784
  var lintAllPackages = ({ fix: fix2 = false } = {}) => {
1655
- console.log(chalk21.gray(`${fix2 ? "Fix" : "Lint"} [All-Packages]`));
1785
+ console.log(chalk22.gray(`${fix2 ? "Fix" : "Lint"} [All-Packages]`));
1656
1786
  const start = Date.now();
1657
1787
  const fixOptions = fix2 ? ["--fix"] : [];
1658
1788
  const result = runSteps(`${fix2 ? "Fix" : "Lint"} [All-Packages]`, [
1659
1789
  ["yarn", ["eslint", "--cache", "--cache-location", ".eslintcache", "--cache-strategy", "content", ...fixOptions]]
1660
1790
  ]);
1661
- console.log(chalk21.gray(`${fix2 ? "Fixed in" : "Linted in"} [${chalk21.magenta(((Date.now() - start) / 1e3).toFixed(2))}] ${chalk21.gray("seconds")}`));
1791
+ console.log(chalk22.gray(`${fix2 ? "Fixed in" : "Linted in"} [${chalk22.magenta(((Date.now() - start) / 1e3).toFixed(2))}] ${chalk22.gray("seconds")}`));
1662
1792
  return result;
1663
1793
  };
1664
1794
 
@@ -1686,7 +1816,7 @@ var filename = ".gitignore";
1686
1816
  var gitignoreGen = (pkg) => generateIgnoreFiles(filename, pkg);
1687
1817
 
1688
1818
  // src/actions/gitlint.ts
1689
- import chalk22 from "chalk";
1819
+ import chalk23 from "chalk";
1690
1820
  import ParseGitConfig from "parse-git-config";
1691
1821
  var gitlint = () => {
1692
1822
  console.log(`
@@ -1697,7 +1827,7 @@ Gitlint Start [${process.cwd()}]
1697
1827
  const errors = 0;
1698
1828
  const gitConfig = ParseGitConfig.sync();
1699
1829
  const warn = (message) => {
1700
- console.warn(chalk22.yellow(`Warning: ${message}`));
1830
+ console.warn(chalk23.yellow(`Warning: ${message}`));
1701
1831
  warnings++;
1702
1832
  };
1703
1833
  if (gitConfig.core.ignorecase) {
@@ -1717,13 +1847,13 @@ Gitlint Start [${process.cwd()}]
1717
1847
  }
1718
1848
  const resultMessages = [];
1719
1849
  if (valid > 0) {
1720
- resultMessages.push(chalk22.green(`Passed: ${valid}`));
1850
+ resultMessages.push(chalk23.green(`Passed: ${valid}`));
1721
1851
  }
1722
1852
  if (warnings > 0) {
1723
- resultMessages.push(chalk22.yellow(`Warnings: ${warnings}`));
1853
+ resultMessages.push(chalk23.yellow(`Warnings: ${warnings}`));
1724
1854
  }
1725
1855
  if (errors > 0) {
1726
- resultMessages.push(chalk22.red(` Errors: ${errors}`));
1856
+ resultMessages.push(chalk23.red(` Errors: ${errors}`));
1727
1857
  }
1728
1858
  console.warn(`Gitlint Finish [ ${resultMessages.join(" | ")} ]
1729
1859
  `);
@@ -1731,8 +1861,8 @@ Gitlint Start [${process.cwd()}]
1731
1861
  };
1732
1862
 
1733
1863
  // src/actions/gitlint-fix.ts
1734
- import { execSync as execSync2 } from "child_process";
1735
- import chalk23 from "chalk";
1864
+ import { execSync as execSync3 } from "child_process";
1865
+ import chalk24 from "chalk";
1736
1866
  import ParseGitConfig2 from "parse-git-config";
1737
1867
  var gitlintFix = () => {
1738
1868
  console.log(`
@@ -1740,16 +1870,16 @@ Gitlint Fix Start [${process.cwd()}]
1740
1870
  `);
1741
1871
  const gitConfig = ParseGitConfig2.sync();
1742
1872
  if (gitConfig.core.ignorecase) {
1743
- execSync2("git config core.ignorecase false", { stdio: "inherit" });
1744
- console.warn(chalk23.yellow("\nGitlint Fix: Updated core.ignorecase to be false\n"));
1873
+ execSync3("git config core.ignorecase false", { stdio: "inherit" });
1874
+ console.warn(chalk24.yellow("\nGitlint Fix: Updated core.ignorecase to be false\n"));
1745
1875
  }
1746
1876
  if (gitConfig.core.autocrlf !== false) {
1747
- execSync2("git config core.autocrlf false", { stdio: "inherit" });
1748
- console.warn(chalk23.yellow("\nGitlint Fix: Updated core.autocrlf to be false\n"));
1877
+ execSync3("git config core.autocrlf false", { stdio: "inherit" });
1878
+ console.warn(chalk24.yellow("\nGitlint Fix: Updated core.autocrlf to be false\n"));
1749
1879
  }
1750
1880
  if (gitConfig.core.eol !== "lf") {
1751
- execSync2("git config core.eol lf", { stdio: "inherit" });
1752
- console.warn(chalk23.yellow('\nGitlint Fix: Updated core.eol to be "lf"\n'));
1881
+ execSync3("git config core.eol lf", { stdio: "inherit" });
1882
+ console.warn(chalk24.yellow('\nGitlint Fix: Updated core.eol to be "lf"\n'));
1753
1883
  }
1754
1884
  return 1;
1755
1885
  };
@@ -1760,7 +1890,7 @@ var knip = () => {
1760
1890
  };
1761
1891
 
1762
1892
  // src/actions/license.ts
1763
- import chalk24 from "chalk";
1893
+ import chalk25 from "chalk";
1764
1894
  import { init } from "license-checker";
1765
1895
  var license = async (pkg) => {
1766
1896
  const workspaces = yarnWorkspaces();
@@ -1785,18 +1915,18 @@ var license = async (pkg) => {
1785
1915
  "LGPL-3.0-or-later",
1786
1916
  "Python-2.0"
1787
1917
  ]);
1788
- console.log(chalk24.green("License Checker"));
1918
+ console.log(chalk25.green("License Checker"));
1789
1919
  return (await Promise.all(
1790
1920
  workspaceList.map(({ location, name }) => {
1791
1921
  return new Promise((resolve) => {
1792
1922
  init({ production: true, start: location }, (error, packages) => {
1793
1923
  if (error) {
1794
- console.error(chalk24.red(`License Checker [${name}] Error`));
1795
- console.error(chalk24.gray(error));
1924
+ console.error(chalk25.red(`License Checker [${name}] Error`));
1925
+ console.error(chalk25.gray(error));
1796
1926
  console.log("\n");
1797
1927
  resolve(1);
1798
1928
  } else {
1799
- console.log(chalk24.green(`License Checker [${name}]`));
1929
+ console.log(chalk25.green(`License Checker [${name}]`));
1800
1930
  let count = 0;
1801
1931
  for (const [name2, info] of Object.entries(packages)) {
1802
1932
  const licenses = Array.isArray(info.licenses) ? info.licenses : [info.licenses];
@@ -1812,7 +1942,7 @@ var license = async (pkg) => {
1812
1942
  }
1813
1943
  if (!orLicenseFound) {
1814
1944
  count++;
1815
- console.warn(chalk24.yellow(`${name2}: Package License not allowed [${license2}]`));
1945
+ console.warn(chalk25.yellow(`${name2}: Package License not allowed [${license2}]`));
1816
1946
  }
1817
1947
  }
1818
1948
  }
@@ -1832,12 +1962,12 @@ var npmignoreGen = (pkg) => generateIgnoreFiles(filename2, pkg);
1832
1962
 
1833
1963
  // src/actions/package/clean-outputs.ts
1834
1964
  import path8 from "path";
1835
- import chalk25 from "chalk";
1965
+ import chalk26 from "chalk";
1836
1966
  var packageCleanOutputs = () => {
1837
1967
  const pkg = process.env.INIT_CWD ?? ".";
1838
1968
  const pkgName = process.env.npm_package_name;
1839
1969
  const folders = [path8.join(pkg, "dist"), path8.join(pkg, "build"), path8.join(pkg, "docs")];
1840
- console.log(chalk25.green(`Cleaning Outputs [${pkgName}]`));
1970
+ console.log(chalk26.green(`Cleaning Outputs [${pkgName}]`));
1841
1971
  for (let folder of folders) {
1842
1972
  deleteGlob(folder);
1843
1973
  }
@@ -1846,11 +1976,11 @@ var packageCleanOutputs = () => {
1846
1976
 
1847
1977
  // src/actions/package/clean-typescript.ts
1848
1978
  import path9 from "path";
1849
- import chalk26 from "chalk";
1979
+ import chalk27 from "chalk";
1850
1980
  var packageCleanTypescript = () => {
1851
1981
  const pkg = process.env.INIT_CWD ?? ".";
1852
1982
  const pkgName = process.env.npm_package_name;
1853
- console.log(chalk26.green(`Cleaning Typescript [${pkgName}]`));
1983
+ console.log(chalk27.green(`Cleaning Typescript [${pkgName}]`));
1854
1984
  const files = [path9.join(pkg, "*.tsbuildinfo"), path9.join(pkg, ".tsconfig.*"), path9.join(pkg, ".eslintcache")];
1855
1985
  for (let file of files) {
1856
1986
  deleteGlob(file);
@@ -1864,26 +1994,26 @@ var packageClean = async () => {
1864
1994
  };
1865
1995
 
1866
1996
  // src/actions/package/compile/compile.ts
1867
- import chalk31 from "chalk";
1997
+ import chalk32 from "chalk";
1868
1998
 
1869
1999
  // src/actions/package/compile/packageCompileTsup.ts
1870
- import chalk30 from "chalk";
2000
+ import chalk31 from "chalk";
1871
2001
  import { build as build2, defineConfig } from "tsup";
1872
2002
 
1873
2003
  // src/actions/package/compile/inputs.ts
1874
- import chalk27 from "chalk";
2004
+ import chalk28 from "chalk";
1875
2005
  import { glob as glob2 } from "glob";
1876
2006
  var getAllInputs = (srcDir, verbose = false) => {
1877
2007
  return [...glob2.sync(`${srcDir}/**/*.ts`, { posix: true }).map((file) => {
1878
2008
  const result = file.slice(Math.max(0, srcDir.length + 1));
1879
2009
  if (verbose) {
1880
- console.log(chalk27.gray(`getAllInputs: ${JSON.stringify(result, null, 2)}`));
2010
+ console.log(chalk28.gray(`getAllInputs: ${JSON.stringify(result, null, 2)}`));
1881
2011
  }
1882
2012
  return result;
1883
2013
  }), ...glob2.sync(`${srcDir}/**/*.tsx`, { posix: true }).map((file) => {
1884
2014
  const result = file.slice(Math.max(0, srcDir.length + 1));
1885
2015
  if (verbose) {
1886
- console.log(chalk27.gray(`getAllInputs: ${JSON.stringify(result, null, 2)}`));
2016
+ console.log(chalk28.gray(`getAllInputs: ${JSON.stringify(result, null, 2)}`));
1887
2017
  }
1888
2018
  return result;
1889
2019
  })];
@@ -1942,7 +2072,7 @@ function deepMergeObjects(objects) {
1942
2072
 
1943
2073
  // src/actions/package/compile/packageCompileTsc.ts
1944
2074
  import { cwd as cwd2 } from "process";
1945
- import chalk28 from "chalk";
2075
+ import chalk29 from "chalk";
1946
2076
  import { createProgramFromConfig } from "tsc-prog";
1947
2077
  import ts3, {
1948
2078
  DiagnosticCategory,
@@ -1964,7 +2094,7 @@ var getCompilerOptions = (options = {}, fileName = "tsconfig.json") => {
1964
2094
  var packageCompileTsc = (platform, entries, srcDir = "src", outDir = "dist", compilerOptionsParam, verbose = false) => {
1965
2095
  const pkg = process.env.INIT_CWD ?? cwd2();
1966
2096
  if (verbose) {
1967
- console.log(chalk28.cyan(`Validating code START: ${entries.length} files to ${outDir} from ${srcDir}`));
2097
+ console.log(chalk29.cyan(`Validating code START: ${entries.length} files to ${outDir} from ${srcDir}`));
1968
2098
  }
1969
2099
  const configFilePath = ts3.findConfigFile(
1970
2100
  "./",
@@ -1987,10 +2117,10 @@ var packageCompileTsc = (platform, entries, srcDir = "src", outDir = "dist", com
1987
2117
  emitDeclarationOnly: true,
1988
2118
  noEmit: false
1989
2119
  };
1990
- console.log(chalk28.cyan(`Validating Files: ${entries.length}`));
2120
+ console.log(chalk29.cyan(`Validating Files: ${entries.length}`));
1991
2121
  if (verbose) {
1992
2122
  for (const entry of entries) {
1993
- console.log(chalk28.grey(`Validating: ${entry}`));
2123
+ console.log(chalk29.grey(`Validating: ${entry}`));
1994
2124
  }
1995
2125
  }
1996
2126
  try {
@@ -2026,7 +2156,7 @@ var packageCompileTsc = (platform, entries, srcDir = "src", outDir = "dist", com
2026
2156
  return 0;
2027
2157
  } finally {
2028
2158
  if (verbose) {
2029
- console.log(chalk28.cyan(`Validating code FINISH: ${entries.length} files to ${outDir} from ${srcDir}`));
2159
+ console.log(chalk29.cyan(`Validating code FINISH: ${entries.length} files to ${outDir} from ${srcDir}`));
2030
2160
  }
2031
2161
  }
2032
2162
  };
@@ -2034,7 +2164,7 @@ var packageCompileTsc = (platform, entries, srcDir = "src", outDir = "dist", com
2034
2164
  // src/actions/package/compile/packageCompileTscTypes.ts
2035
2165
  import path10 from "path";
2036
2166
  import { cwd as cwd3 } from "process";
2037
- import chalk29 from "chalk";
2167
+ import chalk30 from "chalk";
2038
2168
  import { rollup } from "rollup";
2039
2169
  import dts from "rollup-plugin-dts";
2040
2170
  import nodeExternals from "rollup-plugin-node-externals";
@@ -2059,8 +2189,8 @@ async function bundleDts(inputPath, outputPath, platform, options, verbose = fal
2059
2189
  if (ignoredWarningCodes.has(warning.code ?? "")) {
2060
2190
  return;
2061
2191
  }
2062
- console.warn(chalk29.yellow(`[${warning.code}] ${warning.message}`));
2063
- console.warn(chalk29.gray(inputPath));
2192
+ console.warn(chalk30.yellow(`[${warning.code}] ${warning.message}`));
2193
+ console.warn(chalk30.gray(inputPath));
2064
2194
  warn(warning);
2065
2195
  }
2066
2196
  });
@@ -2070,8 +2200,8 @@ async function bundleDts(inputPath, outputPath, platform, options, verbose = fal
2070
2200
  });
2071
2201
  } catch (ex) {
2072
2202
  const error = ex;
2073
- console.warn(chalk29.red(error));
2074
- console.warn(chalk29.gray(inputPath));
2203
+ console.warn(chalk30.red(error));
2204
+ console.warn(chalk30.gray(inputPath));
2075
2205
  }
2076
2206
  if (verbose) {
2077
2207
  console.log(`Bundled declarations written to ${outputPath}`);
@@ -2079,7 +2209,7 @@ async function bundleDts(inputPath, outputPath, platform, options, verbose = fal
2079
2209
  }
2080
2210
  var packageCompileTscTypes = async (entries, outDir, platform, srcDir = "build", verbose = false) => {
2081
2211
  if (verbose) {
2082
- console.log(chalk29.cyan(`Compiling Types START [${platform}]: ${entries.length} files to ${outDir} from ${srcDir}`));
2212
+ console.log(chalk30.cyan(`Compiling Types START [${platform}]: ${entries.length} files to ${outDir} from ${srcDir}`));
2083
2213
  console.log(`Entries: ${entries.join(", ")}`);
2084
2214
  }
2085
2215
  const pkg = process.env.INIT_CWD ?? cwd3();
@@ -2103,7 +2233,7 @@ var packageCompileTscTypes = async (entries, outDir, platform, srcDir = "build",
2103
2233
  await bundleDts(`${srcRoot}/${entryTypeName}`, `${outDir}/${entryTypeName}`, platform, { compilerOptions }, verbose);
2104
2234
  }));
2105
2235
  if (verbose) {
2106
- console.log(chalk29.cyan(`Compiling Types FINISH: ${entries.length} files to ${outDir} from ${srcDir}`));
2236
+ console.log(chalk30.cyan(`Compiling Types FINISH: ${entries.length} files to ${outDir} from ${srcDir}`));
2107
2237
  }
2108
2238
  return 0;
2109
2239
  };
@@ -2115,15 +2245,15 @@ var compileFolder = async (srcDir, entries, buildDir, options, bundleTypes = fal
2115
2245
  console.log(`compileFolder [${srcDir}, ${options?.outDir}]`);
2116
2246
  }
2117
2247
  if (entries.length === 0) {
2118
- console.warn(chalk30.yellow(`No entries found in ${srcDir} to compile`));
2248
+ console.warn(chalk31.yellow(`No entries found in ${srcDir} to compile`));
2119
2249
  return 0;
2120
2250
  }
2121
2251
  if (verbose) {
2122
- console.log(chalk30.gray(`buildDir [${buildDir}]`));
2252
+ console.log(chalk31.gray(`buildDir [${buildDir}]`));
2123
2253
  }
2124
2254
  const validationResult = packageCompileTsc(options?.platform ?? "neutral", entries, srcDir, buildDir, void 0, verbose);
2125
2255
  if (validationResult !== 0) {
2126
- console.error(chalk30.red(`Compile:Validation had ${validationResult} errors`));
2256
+ console.error(chalk31.red(`Compile:Validation had ${validationResult} errors`));
2127
2257
  return validationResult;
2128
2258
  }
2129
2259
  const optionsParams = tsupOptions([{
@@ -2148,12 +2278,12 @@ var compileFolder = async (srcDir, entries, buildDir, options, bundleTypes = fal
2148
2278
  })
2149
2279
  )).flat();
2150
2280
  if (verbose) {
2151
- console.log(chalk30.cyan(`TSUP:build:start [${srcDir}]`));
2152
- console.log(chalk30.gray(`TSUP:build:options [${JSON.stringify(optionsList, null, 2)}]`));
2281
+ console.log(chalk31.cyan(`TSUP:build:start [${srcDir}]`));
2282
+ console.log(chalk31.gray(`TSUP:build:options [${JSON.stringify(optionsList, null, 2)}]`));
2153
2283
  }
2154
2284
  await Promise.all(optionsList.map((options2) => build2(options2)));
2155
2285
  if (verbose) {
2156
- console.log(chalk30.cyan(`TSUP:build:stop [${srcDir}]`));
2286
+ console.log(chalk31.cyan(`TSUP:build:stop [${srcDir}]`));
2157
2287
  }
2158
2288
  if (bundleTypes) {
2159
2289
  await packageCompileTscTypes(entries, outDir, options?.platform ?? "neutral", buildDir, verbose);
@@ -2264,14 +2394,14 @@ var packageCompileTsup = async (config2) => {
2264
2394
  // src/actions/package/compile/compile.ts
2265
2395
  var packageCompile = async (inConfig = {}) => {
2266
2396
  const pkg = process.env.INIT_CWD;
2267
- console.log(chalk31.green(`Compiling ${pkg}`));
2397
+ console.log(chalk32.green(`Compiling ${pkg}`));
2268
2398
  const config2 = await loadConfig(inConfig);
2269
2399
  return await packageCompileTsup(config2);
2270
2400
  };
2271
2401
 
2272
2402
  // src/actions/package/copy-assets.ts
2273
2403
  import path11 from "path/posix";
2274
- import chalk32 from "chalk";
2404
+ import chalk33 from "chalk";
2275
2405
  import cpy2 from "cpy";
2276
2406
  var copyTargetAssets2 = async (target, name, location) => {
2277
2407
  try {
@@ -2284,7 +2414,7 @@ var copyTargetAssets2 = async (target, name, location) => {
2284
2414
  }
2285
2415
  );
2286
2416
  if (values.length > 0) {
2287
- console.log(chalk32.green(`Copying Assets [${target.toUpperCase()}] - ${name} - ${location}`));
2417
+ console.log(chalk33.green(`Copying Assets [${target.toUpperCase()}] - ${name} - ${location}`));
2288
2418
  }
2289
2419
  for (const value of values) {
2290
2420
  console.log(`${value.split("/").pop()} => ./dist/${target}`);
@@ -2351,7 +2481,7 @@ var packageCycle = async () => {
2351
2481
  // src/actions/package/gen-docs.ts
2352
2482
  import { existsSync as existsSync6 } from "fs";
2353
2483
  import path12 from "path";
2354
- import chalk33 from "chalk";
2484
+ import chalk34 from "chalk";
2355
2485
  import {
2356
2486
  Application,
2357
2487
  ArgumentsReader,
@@ -2455,7 +2585,7 @@ var runTypeDoc = async (app) => {
2455
2585
  return ExitCodes.OutputError;
2456
2586
  }
2457
2587
  }
2458
- console.log(chalk33.green(`${pkgName} - Ok`));
2588
+ console.log(chalk34.green(`${pkgName} - Ok`));
2459
2589
  return ExitCodes.Ok;
2460
2590
  };
2461
2591
 
@@ -2464,7 +2594,7 @@ import { readdirSync as readdirSync4 } from "fs";
2464
2594
  import path13 from "path";
2465
2595
  import { cwd as cwd4 } from "process";
2466
2596
  import { pathToFileURL } from "url";
2467
- import chalk34 from "chalk";
2597
+ import chalk35 from "chalk";
2468
2598
  import { ESLint } from "eslint";
2469
2599
  import { findUp } from "find-up";
2470
2600
  import picomatch from "picomatch";
@@ -2473,14 +2603,14 @@ var dumpMessages = (lintResults) => {
2473
2603
  const severity = ["none", "warning", "error"];
2474
2604
  for (const lintResult of lintResults) {
2475
2605
  if (lintResult.messages.length > 0) {
2476
- console.log(chalk34.gray(`
2606
+ console.log(chalk35.gray(`
2477
2607
  ${lintResult.filePath}`));
2478
2608
  for (const message of lintResult.messages) {
2479
2609
  console.log(
2480
- chalk34.gray(` ${message.line}:${message.column}`),
2481
- chalk34[colors[message.severity]](` ${severity[message.severity]}`),
2482
- chalk34.white(` ${message.message}`),
2483
- chalk34.gray(` ${message.ruleId}`)
2610
+ chalk35.gray(` ${message.line}:${message.column}`),
2611
+ chalk35[colors[message.severity]](` ${severity[message.severity]}`),
2612
+ chalk35.white(` ${message.message}`),
2613
+ chalk35.gray(` ${message.ruleId}`)
2484
2614
  );
2485
2615
  }
2486
2616
  }
@@ -2518,10 +2648,10 @@ var packageLint = async (fix2 = false, verbose = false, cache = true) => {
2518
2648
  cache
2519
2649
  });
2520
2650
  const files = getFiles(cwd4(), ignoreFolders);
2521
- console.log(chalk34.green(`Linting ${pkg} [files = ${files.length}]`));
2651
+ console.log(chalk35.green(`Linting ${pkg} [files = ${files.length}]`));
2522
2652
  if (verbose) {
2523
2653
  for (const file of files) {
2524
- console.log(chalk34.gray(` ${file}`));
2654
+ console.log(chalk35.gray(` ${file}`));
2525
2655
  }
2526
2656
  }
2527
2657
  const lintResults = await engine.lintFiles(files);
@@ -2532,32 +2662,32 @@ var packageLint = async (fix2 = false, verbose = false, cache = true) => {
2532
2662
  const filesCountColor = files.length < 100 ? "green" : files.length < 1e3 ? "yellow" : "red";
2533
2663
  const lintTime = Date.now() - start;
2534
2664
  const lintTimeColor = lintTime < 1e3 ? "green" : lintTime < 3e3 ? "yellow" : "red";
2535
- console.log(chalk34.white(`Linted ${chalk34[filesCountColor](files.length)} files in ${chalk34[lintTimeColor](lintTime)}ms`));
2665
+ console.log(chalk35.white(`Linted ${chalk35[filesCountColor](files.length)} files in ${chalk35[lintTimeColor](lintTime)}ms`));
2536
2666
  return lintResults.reduce((prev, lintResult) => prev + lintResult.errorCount, 0);
2537
2667
  };
2538
2668
 
2539
2669
  // src/actions/package/publint.ts
2540
2670
  import { promises as fs10 } from "fs";
2541
- import chalk35 from "chalk";
2671
+ import chalk36 from "chalk";
2542
2672
  import sortPackageJson from "sort-package-json";
2543
2673
  var customPubLint = (pkg) => {
2544
2674
  let errorCount = 0;
2545
2675
  let warningCount = 0;
2546
2676
  if (pkg.files === void 0) {
2547
- console.warn(chalk35.yellow('Publint [custom]: "files" field is missing'));
2677
+ console.warn(chalk36.yellow('Publint [custom]: "files" field is missing'));
2548
2678
  warningCount++;
2549
2679
  }
2550
2680
  if (pkg.main !== void 0) {
2551
- console.warn(chalk35.yellow('Publint [custom]: "main" field is deprecated, use "exports" instead'));
2681
+ console.warn(chalk36.yellow('Publint [custom]: "main" field is deprecated, use "exports" instead'));
2552
2682
  warningCount++;
2553
2683
  }
2554
2684
  if (pkg.sideEffects !== false) {
2555
- console.warn(chalk35.yellow('Publint [custom]: "sideEffects" field should be set to false'));
2685
+ console.warn(chalk36.yellow('Publint [custom]: "sideEffects" field should be set to false'));
2556
2686
  warningCount++;
2557
2687
  }
2558
2688
  if (pkg.resolutions !== void 0) {
2559
- console.warn(chalk35.yellow('Publint [custom]: "resolutions" in use'));
2560
- console.warn(chalk35.gray(JSON.stringify(pkg.resolutions, null, 2)));
2689
+ console.warn(chalk36.yellow('Publint [custom]: "resolutions" in use'));
2690
+ console.warn(chalk36.gray(JSON.stringify(pkg.resolutions, null, 2)));
2561
2691
  warningCount++;
2562
2692
  }
2563
2693
  return [errorCount, warningCount];
@@ -2567,8 +2697,8 @@ var packagePublint = async ({ strict = true, verbose = false } = {}) => {
2567
2697
  const sortedPkg = sortPackageJson(await fs10.readFile(`${pkgDir}/package.json`, "utf8"));
2568
2698
  await fs10.writeFile(`${pkgDir}/package.json`, sortedPkg);
2569
2699
  const pkg = JSON.parse(await fs10.readFile(`${pkgDir}/package.json`, "utf8"));
2570
- console.log(chalk35.green(`Publint: ${pkg.name}`));
2571
- console.log(chalk35.gray(pkgDir));
2700
+ console.log(chalk36.green(`Publint: ${pkg.name}`));
2701
+ console.log(chalk36.gray(pkgDir));
2572
2702
  const { publint: publint2 } = await import("publint");
2573
2703
  const { messages } = await publint2({
2574
2704
  level: "suggestion",
@@ -2579,22 +2709,22 @@ var packagePublint = async ({ strict = true, verbose = false } = {}) => {
2579
2709
  for (const message of messages) {
2580
2710
  switch (message.type) {
2581
2711
  case "error": {
2582
- console.error(chalk35.red(`[${message.code}] ${formatMessage(message, pkg)}`));
2712
+ console.error(chalk36.red(`[${message.code}] ${formatMessage(message, pkg)}`));
2583
2713
  break;
2584
2714
  }
2585
2715
  case "warning": {
2586
- console.warn(chalk35.yellow(`[${message.code}] ${formatMessage(message, pkg)}`));
2716
+ console.warn(chalk36.yellow(`[${message.code}] ${formatMessage(message, pkg)}`));
2587
2717
  break;
2588
2718
  }
2589
2719
  default: {
2590
- console.log(chalk35.white(`[${message.code}] ${formatMessage(message, pkg)}`));
2720
+ console.log(chalk36.white(`[${message.code}] ${formatMessage(message, pkg)}`));
2591
2721
  break;
2592
2722
  }
2593
2723
  }
2594
2724
  }
2595
2725
  const [errorCount, warningCount] = customPubLint(pkg);
2596
2726
  if (verbose) {
2597
- console.log(chalk35.gray(`Publint [Finish]: ${pkgDir} [${messages.length + errorCount + warningCount} messages]`));
2727
+ console.log(chalk36.gray(`Publint [Finish]: ${pkgDir} [${messages.length + errorCount + warningCount} messages]`));
2598
2728
  }
2599
2729
  return messages.filter((message) => message.type === "error").length + errorCount;
2600
2730
  };
@@ -2621,6 +2751,21 @@ var publish = () => {
2621
2751
  return runSteps("Publish", [["npm", ["publish", "--workspaces"]]]);
2622
2752
  };
2623
2753
 
2754
+ // src/actions/readme-gen.ts
2755
+ async function readmeGen({
2756
+ pkg,
2757
+ templatePath,
2758
+ typedoc,
2759
+ verbose
2760
+ }) {
2761
+ return await generateReadmeFiles({
2762
+ pkg,
2763
+ templatePath,
2764
+ typedoc,
2765
+ verbose
2766
+ });
2767
+ }
2768
+
2624
2769
  // src/actions/rebuild.ts
2625
2770
  var rebuild = ({ target }) => {
2626
2771
  return runSteps("Rebuild", [
@@ -2630,7 +2775,7 @@ var rebuild = ({ target }) => {
2630
2775
  };
2631
2776
 
2632
2777
  // src/actions/recompile.ts
2633
- import chalk36 from "chalk";
2778
+ import chalk37 from "chalk";
2634
2779
  var recompile = async ({
2635
2780
  verbose,
2636
2781
  target,
@@ -2666,7 +2811,7 @@ var recompileAll = async ({
2666
2811
  const incrementalOptions = incremental ? ["--since", "-Apt", "--topological-dev"] : ["--parallel", "-Apt", "--topological-dev"];
2667
2812
  const jobsOptions = jobs ? ["-j", `${jobs}`] : [];
2668
2813
  if (jobs) {
2669
- console.log(chalk36.blue(`Jobs set to [${jobs}]`));
2814
+ console.log(chalk37.blue(`Jobs set to [${jobs}]`));
2670
2815
  }
2671
2816
  const result = await runStepsAsync(`Recompile${incremental ? "-Incremental" : ""} [All]`, [
2672
2817
  [
@@ -2697,7 +2842,7 @@ var recompileAll = async ({
2697
2842
  ]
2698
2843
  ]);
2699
2844
  console.log(
2700
- `${chalk36.gray("Recompiled in")} [${chalk36.magenta(((Date.now() - start) / 1e3).toFixed(2))}] ${chalk36.gray("seconds")}`
2845
+ `${chalk37.gray("Recompiled in")} [${chalk37.magenta(((Date.now() - start) / 1e3).toFixed(2))}] ${chalk37.gray("seconds")}`
2701
2846
  );
2702
2847
  return result;
2703
2848
  };
@@ -2728,13 +2873,13 @@ var reinstall = () => {
2728
2873
  };
2729
2874
 
2730
2875
  // src/actions/relint.ts
2731
- import chalk37 from "chalk";
2876
+ import chalk38 from "chalk";
2732
2877
  var relintPackage = ({
2733
2878
  pkg,
2734
2879
  fix: fix2,
2735
2880
  verbose
2736
2881
  }) => {
2737
- console.log(chalk37.gray(`${fix2 ? "Fix" : "Lint"} [${pkg}]`));
2882
+ console.log(chalk38.gray(`${fix2 ? "Fix" : "Lint"} [${pkg}]`));
2738
2883
  const start = Date.now();
2739
2884
  const result = runSteps(`${fix2 ? "Fix" : "Lint"} [${pkg}]`, [
2740
2885
  ["yarn", [
@@ -2744,7 +2889,7 @@ var relintPackage = ({
2744
2889
  fix2 ? "package-fix" : verbose ? "package-lint-verbose" : "package-lint"
2745
2890
  ]]
2746
2891
  ]);
2747
- console.log(chalk37.gray(`${fix2 ? "Fixed in" : "Linted in"} [${chalk37.magenta(((Date.now() - start) / 1e3).toFixed(2))}] ${chalk37.gray("seconds")}`));
2892
+ console.log(chalk38.gray(`${fix2 ? "Fixed in" : "Linted in"} [${chalk38.magenta(((Date.now() - start) / 1e3).toFixed(2))}] ${chalk38.gray("seconds")}`));
2748
2893
  return result;
2749
2894
  };
2750
2895
  var relint = ({
@@ -2764,13 +2909,13 @@ var relint = ({
2764
2909
  });
2765
2910
  };
2766
2911
  var relintAllPackages = ({ fix: fix2 = false } = {}) => {
2767
- console.log(chalk37.gray(`${fix2 ? "Fix" : "Lint"} [All-Packages]`));
2912
+ console.log(chalk38.gray(`${fix2 ? "Fix" : "Lint"} [All-Packages]`));
2768
2913
  const start = Date.now();
2769
2914
  const fixOptions = fix2 ? ["--fix"] : [];
2770
2915
  const result = runSteps(`${fix2 ? "Fix" : "Lint"} [All-Packages]`, [
2771
2916
  ["yarn", ["eslint", ...fixOptions]]
2772
2917
  ]);
2773
- console.log(chalk37.gray(`${fix2 ? "Fixed in" : "Linted in"} [${chalk37.magenta(((Date.now() - start) / 1e3).toFixed(2))}] ${chalk37.gray("seconds")}`));
2918
+ console.log(chalk38.gray(`${fix2 ? "Fixed in" : "Linted in"} [${chalk38.magenta(((Date.now() - start) / 1e3).toFixed(2))}] ${chalk38.gray("seconds")}`));
2774
2919
  return result;
2775
2920
  };
2776
2921
 
@@ -2788,10 +2933,10 @@ var sonar = () => {
2788
2933
  };
2789
2934
 
2790
2935
  // src/actions/statics.ts
2791
- import chalk38 from "chalk";
2936
+ import chalk39 from "chalk";
2792
2937
  var DefaultDependencies = ["axios", "@xylabs/pixel", "react", "graphql", "react-router", "@mui/material", "@mui/system"];
2793
2938
  var statics = () => {
2794
- console.log(chalk38.green("Check Required Static Dependencies"));
2939
+ console.log(chalk39.green("Check Required Static Dependencies"));
2795
2940
  const statics2 = parsedPackageJSON()?.xy?.deps?.statics;
2796
2941
  return detectDuplicateDependencies(statics2, DefaultDependencies);
2797
2942
  };
@@ -2891,6 +3036,7 @@ export {
2891
3036
  publintAll,
2892
3037
  publintPackage,
2893
3038
  publish,
3039
+ readmeGen,
2894
3040
  rebuild,
2895
3041
  recompile,
2896
3042
  recompileAll,