@xylabs/ts-scripts-yarn3 7.4.11 → 7.4.13

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,37 +1132,44 @@ function getExternalImportsFromFiles({
1002
1132
 
1003
1133
  // src/actions/deplint/checkPackage/getUnlistedDependencies.ts
1004
1134
  import { builtinModules } from "module";
1005
- import chalk14 from "chalk";
1006
- function isListedOrBuiltin(imp, name, dependencies, peerDependencies) {
1007
- return dependencies.includes(imp) || imp === name || dependencies.includes(`@types/${imp}`) || peerDependencies.includes(imp) || peerDependencies.includes(`@types/${imp}`) || builtinModules.includes(imp) || builtinModules.includes(`@types/${imp}`);
1135
+ import chalk15 from "chalk";
1136
+ function isRuntimeImportListed(imp, name, dependencies, peerDependencies) {
1137
+ return dependencies.includes(imp) || imp === name || peerDependencies.includes(imp) || builtinModules.includes(imp);
1138
+ }
1139
+ function isTypeImportListed(imp, name, dependencies, devDependencies, peerDependencies) {
1140
+ return dependencies.includes(imp) || imp === name || dependencies.includes(`@types/${imp}`) || peerDependencies.includes(imp) || peerDependencies.includes(`@types/${imp}`) || devDependencies.includes(`@types/${imp}`) || builtinModules.includes(imp);
1008
1141
  }
1009
1142
  function logMissing(name, imp, importPaths) {
1010
- console.log(`[${chalk14.blue(name)}] Missing dependency in package.json: ${chalk14.red(imp)}`);
1143
+ console.log(`[${chalk15.blue(name)}] Missing dependency in package.json: ${chalk15.red(imp)}`);
1011
1144
  if (importPaths[imp]) {
1012
1145
  console.log(` ${importPaths[imp].join("\n ")}`);
1013
1146
  }
1014
1147
  }
1015
- function getUnlistedDependencies({ name, location }, { dependencies, peerDependencies }, {
1148
+ function getUnlistedDependencies({ name, location }, {
1149
+ dependencies,
1150
+ devDependencies,
1151
+ peerDependencies
1152
+ }, {
1016
1153
  externalDistImports,
1017
1154
  externalDistTypeImports,
1018
1155
  distImportPaths
1019
1156
  }) {
1020
1157
  let unlistedDependencies = 0;
1021
1158
  for (const imp of externalDistImports) {
1022
- if (!isListedOrBuiltin(imp, name, dependencies, peerDependencies)) {
1159
+ if (!isRuntimeImportListed(imp, name, dependencies, peerDependencies)) {
1023
1160
  unlistedDependencies++;
1024
1161
  logMissing(name, imp, distImportPaths);
1025
1162
  }
1026
1163
  }
1027
1164
  for (const imp of externalDistTypeImports) {
1028
- if (!isListedOrBuiltin(imp, name, dependencies, peerDependencies)) {
1165
+ if (!isTypeImportListed(imp, name, dependencies, devDependencies, peerDependencies)) {
1029
1166
  unlistedDependencies++;
1030
1167
  logMissing(name, imp, distImportPaths);
1031
1168
  }
1032
1169
  }
1033
1170
  if (unlistedDependencies > 0) {
1034
1171
  const packageLocation = `${location}/package.json`;
1035
- console.log(` ${chalk14.yellow(packageLocation)}
1172
+ console.log(` ${chalk15.yellow(packageLocation)}
1036
1173
  `);
1037
1174
  }
1038
1175
  return unlistedDependencies;
@@ -1040,7 +1177,7 @@ function getUnlistedDependencies({ name, location }, { dependencies, peerDepende
1040
1177
 
1041
1178
  // src/actions/deplint/checkPackage/getUnlistedDevDependencies.ts
1042
1179
  import { builtinModules as builtinModules2 } from "module";
1043
- import chalk15 from "chalk";
1180
+ import chalk16 from "chalk";
1044
1181
  function getUnlistedDevDependencies({ name, location }, {
1045
1182
  devDependencies,
1046
1183
  dependencies,
@@ -1054,7 +1191,7 @@ function getUnlistedDevDependencies({ name, location }, {
1054
1191
  for (const imp of externalAllImports) {
1055
1192
  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
1193
  unlistedDevDependencies++;
1057
- console.log(`[${chalk15.blue(name)}] Missing devDependency in package.json: ${chalk15.red(imp)}`);
1194
+ console.log(`[${chalk16.blue(name)}] Missing devDependency in package.json: ${chalk16.red(imp)}`);
1058
1195
  if (allImportPaths[imp]) {
1059
1196
  console.log(` ${allImportPaths[imp].join("\n ")}`);
1060
1197
  }
@@ -1062,14 +1199,14 @@ function getUnlistedDevDependencies({ name, location }, {
1062
1199
  }
1063
1200
  if (unlistedDevDependencies > 0) {
1064
1201
  const packageLocation = `${location}/package.json`;
1065
- console.log(` ${chalk15.yellow(packageLocation)}
1202
+ console.log(` ${chalk16.yellow(packageLocation)}
1066
1203
  `);
1067
1204
  }
1068
1205
  return unlistedDevDependencies;
1069
1206
  }
1070
1207
 
1071
1208
  // src/actions/deplint/checkPackage/getUnusedDependencies.ts
1072
- import chalk16 from "chalk";
1209
+ import chalk17 from "chalk";
1073
1210
  function getUnusedDependencies({ name, location }, { dependencies }, {
1074
1211
  externalDistImports,
1075
1212
  externalDistTypeImports,
@@ -1081,22 +1218,22 @@ function getUnusedDependencies({ name, location }, { dependencies }, {
1081
1218
  if (!externalDistImports.includes(dep) && !externalDistImports.includes(dep.replace(/^@types\//, "")) && !externalDistTypeImports.includes(dep) && !externalDistTypeImports.includes(dep.replace(/^@types\//, ""))) {
1082
1219
  unusedDependencies++;
1083
1220
  if (externalAllImports.includes(dep)) {
1084
- console.log(`[${chalk16.blue(name)}] dependency should be devDependency in package.json: ${chalk16.red(dep)}`);
1221
+ console.log(`[${chalk17.blue(name)}] dependency should be devDependency in package.json: ${chalk17.red(dep)}`);
1085
1222
  } else {
1086
- console.log(`[${chalk16.blue(name)}] Unused dependency in package.json: ${chalk16.red(dep)}`);
1223
+ console.log(`[${chalk17.blue(name)}] Unused dependency in package.json: ${chalk17.red(dep)}`);
1087
1224
  }
1088
1225
  }
1089
1226
  }
1090
1227
  if (unusedDependencies > 0) {
1091
1228
  const packageLocation = `${location}/package.json`;
1092
- console.log(` ${chalk16.yellow(packageLocation)}
1229
+ console.log(` ${chalk17.yellow(packageLocation)}
1093
1230
  `);
1094
1231
  }
1095
1232
  return unusedDependencies;
1096
1233
  }
1097
1234
 
1098
1235
  // src/actions/deplint/checkPackage/getUnusedDevDependencies.ts
1099
- import chalk17 from "chalk";
1236
+ import chalk18 from "chalk";
1100
1237
 
1101
1238
  // src/actions/deplint/getCliReferencedPackagesFromFiles.ts
1102
1239
  import fs8 from "fs";
@@ -1380,19 +1517,19 @@ function getUnusedDevDependencies({ name, location }, {
1380
1517
  if (dependencies.includes(dep) || peerDependencies.includes(dep)) continue;
1381
1518
  if (!isDevDepUsed(dep, allImports, implicitDeps, requiredPeers, scriptRefs, cliRefs)) {
1382
1519
  unusedDevDependencies++;
1383
- console.log(`[${chalk17.blue(name)}] Unused devDependency in package.json: ${chalk17.red(dep)}`);
1520
+ console.log(`[${chalk18.blue(name)}] Unused devDependency in package.json: ${chalk18.red(dep)}`);
1384
1521
  }
1385
1522
  }
1386
1523
  if (unusedDevDependencies > 0) {
1387
1524
  const packageLocation = `${location}/package.json`;
1388
- console.log(` ${chalk17.yellow(packageLocation)}
1525
+ console.log(` ${chalk18.yellow(packageLocation)}
1389
1526
  `);
1390
1527
  }
1391
1528
  return unusedDevDependencies;
1392
1529
  }
1393
1530
 
1394
1531
  // src/actions/deplint/checkPackage/getUnusedPeerDependencies.ts
1395
- import chalk18 from "chalk";
1532
+ import chalk19 from "chalk";
1396
1533
  function getUnusedPeerDependencies({ name, location }, { peerDependencies, dependencies }, { externalDistImports, externalDistTypeImports }, exclude) {
1397
1534
  let unusedDependencies = 0;
1398
1535
  for (const dep of peerDependencies) {
@@ -1400,15 +1537,15 @@ function getUnusedPeerDependencies({ name, location }, { peerDependencies, depen
1400
1537
  if (!externalDistImports.includes(dep) && !externalDistImports.includes(dep.replace(/^@types\//, "")) && !externalDistTypeImports.includes(dep) && !externalDistTypeImports.includes(dep.replace(/^@types\//, ""))) {
1401
1538
  unusedDependencies++;
1402
1539
  if (dependencies.includes(dep)) {
1403
- console.log(`[${chalk18.blue(name)}] Unused peerDependency [already a dependency] in package.json: ${chalk18.red(dep)}`);
1540
+ console.log(`[${chalk19.blue(name)}] Unused peerDependency [already a dependency] in package.json: ${chalk19.red(dep)}`);
1404
1541
  } else {
1405
- console.log(`[${chalk18.blue(name)}] Unused peerDependency in package.json: ${chalk18.red(dep)}`);
1542
+ console.log(`[${chalk19.blue(name)}] Unused peerDependency in package.json: ${chalk19.red(dep)}`);
1406
1543
  }
1407
1544
  }
1408
1545
  }
1409
1546
  if (unusedDependencies > 0) {
1410
1547
  const packageLocation = `${location}/package.json`;
1411
- console.log(` ${chalk18.yellow(packageLocation)}
1548
+ console.log(` ${chalk19.yellow(packageLocation)}
1412
1549
  `);
1413
1550
  }
1414
1551
  return unusedDependencies;
@@ -1503,9 +1640,9 @@ var deplint = async ({
1503
1640
  });
1504
1641
  }
1505
1642
  if (totalErrors > 0) {
1506
- console.warn(`Deplint: Found ${chalk19.red(totalErrors)} dependency problems. ${chalk19.red("\u2716")}`);
1643
+ console.warn(`Deplint: Found ${chalk20.red(totalErrors)} dependency problems. ${chalk20.red("\u2716")}`);
1507
1644
  } else {
1508
- console.info(`Deplint: Found no dependency problems. ${chalk19.green("\u2714")}`);
1645
+ console.info(`Deplint: Found no dependency problems. ${chalk20.green("\u2714")}`);
1509
1646
  }
1510
1647
  return 0;
1511
1648
  };
@@ -1607,22 +1744,22 @@ var deployNext = () => {
1607
1744
  };
1608
1745
 
1609
1746
  // src/actions/dupdeps.ts
1610
- import chalk20 from "chalk";
1747
+ import chalk21 from "chalk";
1611
1748
  var dupdeps = () => {
1612
- console.log(chalk20.green("Checking all Dependencies for Duplicates"));
1749
+ console.log(chalk21.green("Checking all Dependencies for Duplicates"));
1613
1750
  const allDependencies = parsedPackageJSON()?.dependencies;
1614
1751
  const dependencies = Object.entries(allDependencies).map(([k]) => k);
1615
1752
  return detectDuplicateDependencies(dependencies);
1616
1753
  };
1617
1754
 
1618
1755
  // src/actions/lint.ts
1619
- import chalk21 from "chalk";
1756
+ import chalk22 from "chalk";
1620
1757
  var lintPackage = ({
1621
1758
  pkg,
1622
1759
  fix: fix2,
1623
1760
  verbose
1624
1761
  }) => {
1625
- console.log(chalk21.gray(`${fix2 ? "Fix" : "Lint"} [${pkg}]`));
1762
+ console.log(chalk22.gray(`${fix2 ? "Fix" : "Lint"} [${pkg}]`));
1626
1763
  const start = Date.now();
1627
1764
  const result = runSteps(`${fix2 ? "Fix" : "Lint"} [${pkg}]`, [
1628
1765
  ["yarn", [
@@ -1632,7 +1769,7 @@ var lintPackage = ({
1632
1769
  fix2 ? "package-fix" : verbose ? "package-lint-verbose" : "package-lint"
1633
1770
  ]]
1634
1771
  ]);
1635
- console.log(chalk21.gray(`${fix2 ? "Fixed in" : "Linted in"} [${chalk21.magenta(((Date.now() - start) / 1e3).toFixed(2))}] ${chalk21.gray("seconds")}`));
1772
+ console.log(chalk22.gray(`${fix2 ? "Fixed in" : "Linted in"} [${chalk22.magenta(((Date.now() - start) / 1e3).toFixed(2))}] ${chalk22.gray("seconds")}`));
1636
1773
  return result;
1637
1774
  };
1638
1775
  var lint = ({
@@ -1652,13 +1789,13 @@ var lint = ({
1652
1789
  });
1653
1790
  };
1654
1791
  var lintAllPackages = ({ fix: fix2 = false } = {}) => {
1655
- console.log(chalk21.gray(`${fix2 ? "Fix" : "Lint"} [All-Packages]`));
1792
+ console.log(chalk22.gray(`${fix2 ? "Fix" : "Lint"} [All-Packages]`));
1656
1793
  const start = Date.now();
1657
1794
  const fixOptions = fix2 ? ["--fix"] : [];
1658
1795
  const result = runSteps(`${fix2 ? "Fix" : "Lint"} [All-Packages]`, [
1659
1796
  ["yarn", ["eslint", "--cache", "--cache-location", ".eslintcache", "--cache-strategy", "content", ...fixOptions]]
1660
1797
  ]);
1661
- console.log(chalk21.gray(`${fix2 ? "Fixed in" : "Linted in"} [${chalk21.magenta(((Date.now() - start) / 1e3).toFixed(2))}] ${chalk21.gray("seconds")}`));
1798
+ console.log(chalk22.gray(`${fix2 ? "Fixed in" : "Linted in"} [${chalk22.magenta(((Date.now() - start) / 1e3).toFixed(2))}] ${chalk22.gray("seconds")}`));
1662
1799
  return result;
1663
1800
  };
1664
1801
 
@@ -1686,7 +1823,7 @@ var filename = ".gitignore";
1686
1823
  var gitignoreGen = (pkg) => generateIgnoreFiles(filename, pkg);
1687
1824
 
1688
1825
  // src/actions/gitlint.ts
1689
- import chalk22 from "chalk";
1826
+ import chalk23 from "chalk";
1690
1827
  import ParseGitConfig from "parse-git-config";
1691
1828
  var gitlint = () => {
1692
1829
  console.log(`
@@ -1697,7 +1834,7 @@ Gitlint Start [${process.cwd()}]
1697
1834
  const errors = 0;
1698
1835
  const gitConfig = ParseGitConfig.sync();
1699
1836
  const warn = (message) => {
1700
- console.warn(chalk22.yellow(`Warning: ${message}`));
1837
+ console.warn(chalk23.yellow(`Warning: ${message}`));
1701
1838
  warnings++;
1702
1839
  };
1703
1840
  if (gitConfig.core.ignorecase) {
@@ -1717,13 +1854,13 @@ Gitlint Start [${process.cwd()}]
1717
1854
  }
1718
1855
  const resultMessages = [];
1719
1856
  if (valid > 0) {
1720
- resultMessages.push(chalk22.green(`Passed: ${valid}`));
1857
+ resultMessages.push(chalk23.green(`Passed: ${valid}`));
1721
1858
  }
1722
1859
  if (warnings > 0) {
1723
- resultMessages.push(chalk22.yellow(`Warnings: ${warnings}`));
1860
+ resultMessages.push(chalk23.yellow(`Warnings: ${warnings}`));
1724
1861
  }
1725
1862
  if (errors > 0) {
1726
- resultMessages.push(chalk22.red(` Errors: ${errors}`));
1863
+ resultMessages.push(chalk23.red(` Errors: ${errors}`));
1727
1864
  }
1728
1865
  console.warn(`Gitlint Finish [ ${resultMessages.join(" | ")} ]
1729
1866
  `);
@@ -1731,8 +1868,8 @@ Gitlint Start [${process.cwd()}]
1731
1868
  };
1732
1869
 
1733
1870
  // src/actions/gitlint-fix.ts
1734
- import { execSync as execSync2 } from "child_process";
1735
- import chalk23 from "chalk";
1871
+ import { execSync as execSync3 } from "child_process";
1872
+ import chalk24 from "chalk";
1736
1873
  import ParseGitConfig2 from "parse-git-config";
1737
1874
  var gitlintFix = () => {
1738
1875
  console.log(`
@@ -1740,16 +1877,16 @@ Gitlint Fix Start [${process.cwd()}]
1740
1877
  `);
1741
1878
  const gitConfig = ParseGitConfig2.sync();
1742
1879
  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"));
1880
+ execSync3("git config core.ignorecase false", { stdio: "inherit" });
1881
+ console.warn(chalk24.yellow("\nGitlint Fix: Updated core.ignorecase to be false\n"));
1745
1882
  }
1746
1883
  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"));
1884
+ execSync3("git config core.autocrlf false", { stdio: "inherit" });
1885
+ console.warn(chalk24.yellow("\nGitlint Fix: Updated core.autocrlf to be false\n"));
1749
1886
  }
1750
1887
  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'));
1888
+ execSync3("git config core.eol lf", { stdio: "inherit" });
1889
+ console.warn(chalk24.yellow('\nGitlint Fix: Updated core.eol to be "lf"\n'));
1753
1890
  }
1754
1891
  return 1;
1755
1892
  };
@@ -1760,7 +1897,7 @@ var knip = () => {
1760
1897
  };
1761
1898
 
1762
1899
  // src/actions/license.ts
1763
- import chalk24 from "chalk";
1900
+ import chalk25 from "chalk";
1764
1901
  import { init } from "license-checker";
1765
1902
  var license = async (pkg) => {
1766
1903
  const workspaces = yarnWorkspaces();
@@ -1785,18 +1922,18 @@ var license = async (pkg) => {
1785
1922
  "LGPL-3.0-or-later",
1786
1923
  "Python-2.0"
1787
1924
  ]);
1788
- console.log(chalk24.green("License Checker"));
1925
+ console.log(chalk25.green("License Checker"));
1789
1926
  return (await Promise.all(
1790
1927
  workspaceList.map(({ location, name }) => {
1791
1928
  return new Promise((resolve) => {
1792
1929
  init({ production: true, start: location }, (error, packages) => {
1793
1930
  if (error) {
1794
- console.error(chalk24.red(`License Checker [${name}] Error`));
1795
- console.error(chalk24.gray(error));
1931
+ console.error(chalk25.red(`License Checker [${name}] Error`));
1932
+ console.error(chalk25.gray(error));
1796
1933
  console.log("\n");
1797
1934
  resolve(1);
1798
1935
  } else {
1799
- console.log(chalk24.green(`License Checker [${name}]`));
1936
+ console.log(chalk25.green(`License Checker [${name}]`));
1800
1937
  let count = 0;
1801
1938
  for (const [name2, info] of Object.entries(packages)) {
1802
1939
  const licenses = Array.isArray(info.licenses) ? info.licenses : [info.licenses];
@@ -1812,7 +1949,7 @@ var license = async (pkg) => {
1812
1949
  }
1813
1950
  if (!orLicenseFound) {
1814
1951
  count++;
1815
- console.warn(chalk24.yellow(`${name2}: Package License not allowed [${license2}]`));
1952
+ console.warn(chalk25.yellow(`${name2}: Package License not allowed [${license2}]`));
1816
1953
  }
1817
1954
  }
1818
1955
  }
@@ -1832,12 +1969,12 @@ var npmignoreGen = (pkg) => generateIgnoreFiles(filename2, pkg);
1832
1969
 
1833
1970
  // src/actions/package/clean-outputs.ts
1834
1971
  import path8 from "path";
1835
- import chalk25 from "chalk";
1972
+ import chalk26 from "chalk";
1836
1973
  var packageCleanOutputs = () => {
1837
1974
  const pkg = process.env.INIT_CWD ?? ".";
1838
1975
  const pkgName = process.env.npm_package_name;
1839
1976
  const folders = [path8.join(pkg, "dist"), path8.join(pkg, "build"), path8.join(pkg, "docs")];
1840
- console.log(chalk25.green(`Cleaning Outputs [${pkgName}]`));
1977
+ console.log(chalk26.green(`Cleaning Outputs [${pkgName}]`));
1841
1978
  for (let folder of folders) {
1842
1979
  deleteGlob(folder);
1843
1980
  }
@@ -1846,11 +1983,11 @@ var packageCleanOutputs = () => {
1846
1983
 
1847
1984
  // src/actions/package/clean-typescript.ts
1848
1985
  import path9 from "path";
1849
- import chalk26 from "chalk";
1986
+ import chalk27 from "chalk";
1850
1987
  var packageCleanTypescript = () => {
1851
1988
  const pkg = process.env.INIT_CWD ?? ".";
1852
1989
  const pkgName = process.env.npm_package_name;
1853
- console.log(chalk26.green(`Cleaning Typescript [${pkgName}]`));
1990
+ console.log(chalk27.green(`Cleaning Typescript [${pkgName}]`));
1854
1991
  const files = [path9.join(pkg, "*.tsbuildinfo"), path9.join(pkg, ".tsconfig.*"), path9.join(pkg, ".eslintcache")];
1855
1992
  for (let file of files) {
1856
1993
  deleteGlob(file);
@@ -1864,26 +2001,26 @@ var packageClean = async () => {
1864
2001
  };
1865
2002
 
1866
2003
  // src/actions/package/compile/compile.ts
1867
- import chalk31 from "chalk";
2004
+ import chalk32 from "chalk";
1868
2005
 
1869
2006
  // src/actions/package/compile/packageCompileTsup.ts
1870
- import chalk30 from "chalk";
2007
+ import chalk31 from "chalk";
1871
2008
  import { build as build2, defineConfig } from "tsup";
1872
2009
 
1873
2010
  // src/actions/package/compile/inputs.ts
1874
- import chalk27 from "chalk";
2011
+ import chalk28 from "chalk";
1875
2012
  import { glob as glob2 } from "glob";
1876
2013
  var getAllInputs = (srcDir, verbose = false) => {
1877
2014
  return [...glob2.sync(`${srcDir}/**/*.ts`, { posix: true }).map((file) => {
1878
2015
  const result = file.slice(Math.max(0, srcDir.length + 1));
1879
2016
  if (verbose) {
1880
- console.log(chalk27.gray(`getAllInputs: ${JSON.stringify(result, null, 2)}`));
2017
+ console.log(chalk28.gray(`getAllInputs: ${JSON.stringify(result, null, 2)}`));
1881
2018
  }
1882
2019
  return result;
1883
2020
  }), ...glob2.sync(`${srcDir}/**/*.tsx`, { posix: true }).map((file) => {
1884
2021
  const result = file.slice(Math.max(0, srcDir.length + 1));
1885
2022
  if (verbose) {
1886
- console.log(chalk27.gray(`getAllInputs: ${JSON.stringify(result, null, 2)}`));
2023
+ console.log(chalk28.gray(`getAllInputs: ${JSON.stringify(result, null, 2)}`));
1887
2024
  }
1888
2025
  return result;
1889
2026
  })];
@@ -1942,7 +2079,7 @@ function deepMergeObjects(objects) {
1942
2079
 
1943
2080
  // src/actions/package/compile/packageCompileTsc.ts
1944
2081
  import { cwd as cwd2 } from "process";
1945
- import chalk28 from "chalk";
2082
+ import chalk29 from "chalk";
1946
2083
  import { createProgramFromConfig } from "tsc-prog";
1947
2084
  import ts3, {
1948
2085
  DiagnosticCategory,
@@ -1964,7 +2101,7 @@ var getCompilerOptions = (options = {}, fileName = "tsconfig.json") => {
1964
2101
  var packageCompileTsc = (platform, entries, srcDir = "src", outDir = "dist", compilerOptionsParam, verbose = false) => {
1965
2102
  const pkg = process.env.INIT_CWD ?? cwd2();
1966
2103
  if (verbose) {
1967
- console.log(chalk28.cyan(`Validating code START: ${entries.length} files to ${outDir} from ${srcDir}`));
2104
+ console.log(chalk29.cyan(`Validating code START: ${entries.length} files to ${outDir} from ${srcDir}`));
1968
2105
  }
1969
2106
  const configFilePath = ts3.findConfigFile(
1970
2107
  "./",
@@ -1987,10 +2124,10 @@ var packageCompileTsc = (platform, entries, srcDir = "src", outDir = "dist", com
1987
2124
  emitDeclarationOnly: true,
1988
2125
  noEmit: false
1989
2126
  };
1990
- console.log(chalk28.cyan(`Validating Files: ${entries.length}`));
2127
+ console.log(chalk29.cyan(`Validating Files: ${entries.length}`));
1991
2128
  if (verbose) {
1992
2129
  for (const entry of entries) {
1993
- console.log(chalk28.grey(`Validating: ${entry}`));
2130
+ console.log(chalk29.grey(`Validating: ${entry}`));
1994
2131
  }
1995
2132
  }
1996
2133
  try {
@@ -2026,7 +2163,7 @@ var packageCompileTsc = (platform, entries, srcDir = "src", outDir = "dist", com
2026
2163
  return 0;
2027
2164
  } finally {
2028
2165
  if (verbose) {
2029
- console.log(chalk28.cyan(`Validating code FINISH: ${entries.length} files to ${outDir} from ${srcDir}`));
2166
+ console.log(chalk29.cyan(`Validating code FINISH: ${entries.length} files to ${outDir} from ${srcDir}`));
2030
2167
  }
2031
2168
  }
2032
2169
  };
@@ -2034,7 +2171,7 @@ var packageCompileTsc = (platform, entries, srcDir = "src", outDir = "dist", com
2034
2171
  // src/actions/package/compile/packageCompileTscTypes.ts
2035
2172
  import path10 from "path";
2036
2173
  import { cwd as cwd3 } from "process";
2037
- import chalk29 from "chalk";
2174
+ import chalk30 from "chalk";
2038
2175
  import { rollup } from "rollup";
2039
2176
  import dts from "rollup-plugin-dts";
2040
2177
  import nodeExternals from "rollup-plugin-node-externals";
@@ -2059,8 +2196,8 @@ async function bundleDts(inputPath, outputPath, platform, options, verbose = fal
2059
2196
  if (ignoredWarningCodes.has(warning.code ?? "")) {
2060
2197
  return;
2061
2198
  }
2062
- console.warn(chalk29.yellow(`[${warning.code}] ${warning.message}`));
2063
- console.warn(chalk29.gray(inputPath));
2199
+ console.warn(chalk30.yellow(`[${warning.code}] ${warning.message}`));
2200
+ console.warn(chalk30.gray(inputPath));
2064
2201
  warn(warning);
2065
2202
  }
2066
2203
  });
@@ -2070,8 +2207,8 @@ async function bundleDts(inputPath, outputPath, platform, options, verbose = fal
2070
2207
  });
2071
2208
  } catch (ex) {
2072
2209
  const error = ex;
2073
- console.warn(chalk29.red(error));
2074
- console.warn(chalk29.gray(inputPath));
2210
+ console.warn(chalk30.red(error));
2211
+ console.warn(chalk30.gray(inputPath));
2075
2212
  }
2076
2213
  if (verbose) {
2077
2214
  console.log(`Bundled declarations written to ${outputPath}`);
@@ -2079,7 +2216,7 @@ async function bundleDts(inputPath, outputPath, platform, options, verbose = fal
2079
2216
  }
2080
2217
  var packageCompileTscTypes = async (entries, outDir, platform, srcDir = "build", verbose = false) => {
2081
2218
  if (verbose) {
2082
- console.log(chalk29.cyan(`Compiling Types START [${platform}]: ${entries.length} files to ${outDir} from ${srcDir}`));
2219
+ console.log(chalk30.cyan(`Compiling Types START [${platform}]: ${entries.length} files to ${outDir} from ${srcDir}`));
2083
2220
  console.log(`Entries: ${entries.join(", ")}`);
2084
2221
  }
2085
2222
  const pkg = process.env.INIT_CWD ?? cwd3();
@@ -2103,7 +2240,7 @@ var packageCompileTscTypes = async (entries, outDir, platform, srcDir = "build",
2103
2240
  await bundleDts(`${srcRoot}/${entryTypeName}`, `${outDir}/${entryTypeName}`, platform, { compilerOptions }, verbose);
2104
2241
  }));
2105
2242
  if (verbose) {
2106
- console.log(chalk29.cyan(`Compiling Types FINISH: ${entries.length} files to ${outDir} from ${srcDir}`));
2243
+ console.log(chalk30.cyan(`Compiling Types FINISH: ${entries.length} files to ${outDir} from ${srcDir}`));
2107
2244
  }
2108
2245
  return 0;
2109
2246
  };
@@ -2115,15 +2252,15 @@ var compileFolder = async (srcDir, entries, buildDir, options, bundleTypes = fal
2115
2252
  console.log(`compileFolder [${srcDir}, ${options?.outDir}]`);
2116
2253
  }
2117
2254
  if (entries.length === 0) {
2118
- console.warn(chalk30.yellow(`No entries found in ${srcDir} to compile`));
2255
+ console.warn(chalk31.yellow(`No entries found in ${srcDir} to compile`));
2119
2256
  return 0;
2120
2257
  }
2121
2258
  if (verbose) {
2122
- console.log(chalk30.gray(`buildDir [${buildDir}]`));
2259
+ console.log(chalk31.gray(`buildDir [${buildDir}]`));
2123
2260
  }
2124
2261
  const validationResult = packageCompileTsc(options?.platform ?? "neutral", entries, srcDir, buildDir, void 0, verbose);
2125
2262
  if (validationResult !== 0) {
2126
- console.error(chalk30.red(`Compile:Validation had ${validationResult} errors`));
2263
+ console.error(chalk31.red(`Compile:Validation had ${validationResult} errors`));
2127
2264
  return validationResult;
2128
2265
  }
2129
2266
  const optionsParams = tsupOptions([{
@@ -2148,12 +2285,12 @@ var compileFolder = async (srcDir, entries, buildDir, options, bundleTypes = fal
2148
2285
  })
2149
2286
  )).flat();
2150
2287
  if (verbose) {
2151
- console.log(chalk30.cyan(`TSUP:build:start [${srcDir}]`));
2152
- console.log(chalk30.gray(`TSUP:build:options [${JSON.stringify(optionsList, null, 2)}]`));
2288
+ console.log(chalk31.cyan(`TSUP:build:start [${srcDir}]`));
2289
+ console.log(chalk31.gray(`TSUP:build:options [${JSON.stringify(optionsList, null, 2)}]`));
2153
2290
  }
2154
2291
  await Promise.all(optionsList.map((options2) => build2(options2)));
2155
2292
  if (verbose) {
2156
- console.log(chalk30.cyan(`TSUP:build:stop [${srcDir}]`));
2293
+ console.log(chalk31.cyan(`TSUP:build:stop [${srcDir}]`));
2157
2294
  }
2158
2295
  if (bundleTypes) {
2159
2296
  await packageCompileTscTypes(entries, outDir, options?.platform ?? "neutral", buildDir, verbose);
@@ -2264,14 +2401,14 @@ var packageCompileTsup = async (config2) => {
2264
2401
  // src/actions/package/compile/compile.ts
2265
2402
  var packageCompile = async (inConfig = {}) => {
2266
2403
  const pkg = process.env.INIT_CWD;
2267
- console.log(chalk31.green(`Compiling ${pkg}`));
2404
+ console.log(chalk32.green(`Compiling ${pkg}`));
2268
2405
  const config2 = await loadConfig(inConfig);
2269
2406
  return await packageCompileTsup(config2);
2270
2407
  };
2271
2408
 
2272
2409
  // src/actions/package/copy-assets.ts
2273
2410
  import path11 from "path/posix";
2274
- import chalk32 from "chalk";
2411
+ import chalk33 from "chalk";
2275
2412
  import cpy2 from "cpy";
2276
2413
  var copyTargetAssets2 = async (target, name, location) => {
2277
2414
  try {
@@ -2284,7 +2421,7 @@ var copyTargetAssets2 = async (target, name, location) => {
2284
2421
  }
2285
2422
  );
2286
2423
  if (values.length > 0) {
2287
- console.log(chalk32.green(`Copying Assets [${target.toUpperCase()}] - ${name} - ${location}`));
2424
+ console.log(chalk33.green(`Copying Assets [${target.toUpperCase()}] - ${name} - ${location}`));
2288
2425
  }
2289
2426
  for (const value of values) {
2290
2427
  console.log(`${value.split("/").pop()} => ./dist/${target}`);
@@ -2351,7 +2488,7 @@ var packageCycle = async () => {
2351
2488
  // src/actions/package/gen-docs.ts
2352
2489
  import { existsSync as existsSync6 } from "fs";
2353
2490
  import path12 from "path";
2354
- import chalk33 from "chalk";
2491
+ import chalk34 from "chalk";
2355
2492
  import {
2356
2493
  Application,
2357
2494
  ArgumentsReader,
@@ -2455,7 +2592,7 @@ var runTypeDoc = async (app) => {
2455
2592
  return ExitCodes.OutputError;
2456
2593
  }
2457
2594
  }
2458
- console.log(chalk33.green(`${pkgName} - Ok`));
2595
+ console.log(chalk34.green(`${pkgName} - Ok`));
2459
2596
  return ExitCodes.Ok;
2460
2597
  };
2461
2598
 
@@ -2464,7 +2601,7 @@ import { readdirSync as readdirSync4 } from "fs";
2464
2601
  import path13 from "path";
2465
2602
  import { cwd as cwd4 } from "process";
2466
2603
  import { pathToFileURL } from "url";
2467
- import chalk34 from "chalk";
2604
+ import chalk35 from "chalk";
2468
2605
  import { ESLint } from "eslint";
2469
2606
  import { findUp } from "find-up";
2470
2607
  import picomatch from "picomatch";
@@ -2473,14 +2610,14 @@ var dumpMessages = (lintResults) => {
2473
2610
  const severity = ["none", "warning", "error"];
2474
2611
  for (const lintResult of lintResults) {
2475
2612
  if (lintResult.messages.length > 0) {
2476
- console.log(chalk34.gray(`
2613
+ console.log(chalk35.gray(`
2477
2614
  ${lintResult.filePath}`));
2478
2615
  for (const message of lintResult.messages) {
2479
2616
  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}`)
2617
+ chalk35.gray(` ${message.line}:${message.column}`),
2618
+ chalk35[colors[message.severity]](` ${severity[message.severity]}`),
2619
+ chalk35.white(` ${message.message}`),
2620
+ chalk35.gray(` ${message.ruleId}`)
2484
2621
  );
2485
2622
  }
2486
2623
  }
@@ -2518,10 +2655,10 @@ var packageLint = async (fix2 = false, verbose = false, cache = true) => {
2518
2655
  cache
2519
2656
  });
2520
2657
  const files = getFiles(cwd4(), ignoreFolders);
2521
- console.log(chalk34.green(`Linting ${pkg} [files = ${files.length}]`));
2658
+ console.log(chalk35.green(`Linting ${pkg} [files = ${files.length}]`));
2522
2659
  if (verbose) {
2523
2660
  for (const file of files) {
2524
- console.log(chalk34.gray(` ${file}`));
2661
+ console.log(chalk35.gray(` ${file}`));
2525
2662
  }
2526
2663
  }
2527
2664
  const lintResults = await engine.lintFiles(files);
@@ -2532,32 +2669,32 @@ var packageLint = async (fix2 = false, verbose = false, cache = true) => {
2532
2669
  const filesCountColor = files.length < 100 ? "green" : files.length < 1e3 ? "yellow" : "red";
2533
2670
  const lintTime = Date.now() - start;
2534
2671
  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`));
2672
+ console.log(chalk35.white(`Linted ${chalk35[filesCountColor](files.length)} files in ${chalk35[lintTimeColor](lintTime)}ms`));
2536
2673
  return lintResults.reduce((prev, lintResult) => prev + lintResult.errorCount, 0);
2537
2674
  };
2538
2675
 
2539
2676
  // src/actions/package/publint.ts
2540
2677
  import { promises as fs10 } from "fs";
2541
- import chalk35 from "chalk";
2678
+ import chalk36 from "chalk";
2542
2679
  import sortPackageJson from "sort-package-json";
2543
2680
  var customPubLint = (pkg) => {
2544
2681
  let errorCount = 0;
2545
2682
  let warningCount = 0;
2546
2683
  if (pkg.files === void 0) {
2547
- console.warn(chalk35.yellow('Publint [custom]: "files" field is missing'));
2684
+ console.warn(chalk36.yellow('Publint [custom]: "files" field is missing'));
2548
2685
  warningCount++;
2549
2686
  }
2550
2687
  if (pkg.main !== void 0) {
2551
- console.warn(chalk35.yellow('Publint [custom]: "main" field is deprecated, use "exports" instead'));
2688
+ console.warn(chalk36.yellow('Publint [custom]: "main" field is deprecated, use "exports" instead'));
2552
2689
  warningCount++;
2553
2690
  }
2554
2691
  if (pkg.sideEffects !== false) {
2555
- console.warn(chalk35.yellow('Publint [custom]: "sideEffects" field should be set to false'));
2692
+ console.warn(chalk36.yellow('Publint [custom]: "sideEffects" field should be set to false'));
2556
2693
  warningCount++;
2557
2694
  }
2558
2695
  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)));
2696
+ console.warn(chalk36.yellow('Publint [custom]: "resolutions" in use'));
2697
+ console.warn(chalk36.gray(JSON.stringify(pkg.resolutions, null, 2)));
2561
2698
  warningCount++;
2562
2699
  }
2563
2700
  return [errorCount, warningCount];
@@ -2567,8 +2704,8 @@ var packagePublint = async ({ strict = true, verbose = false } = {}) => {
2567
2704
  const sortedPkg = sortPackageJson(await fs10.readFile(`${pkgDir}/package.json`, "utf8"));
2568
2705
  await fs10.writeFile(`${pkgDir}/package.json`, sortedPkg);
2569
2706
  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));
2707
+ console.log(chalk36.green(`Publint: ${pkg.name}`));
2708
+ console.log(chalk36.gray(pkgDir));
2572
2709
  const { publint: publint2 } = await import("publint");
2573
2710
  const { messages } = await publint2({
2574
2711
  level: "suggestion",
@@ -2579,22 +2716,22 @@ var packagePublint = async ({ strict = true, verbose = false } = {}) => {
2579
2716
  for (const message of messages) {
2580
2717
  switch (message.type) {
2581
2718
  case "error": {
2582
- console.error(chalk35.red(`[${message.code}] ${formatMessage(message, pkg)}`));
2719
+ console.error(chalk36.red(`[${message.code}] ${formatMessage(message, pkg)}`));
2583
2720
  break;
2584
2721
  }
2585
2722
  case "warning": {
2586
- console.warn(chalk35.yellow(`[${message.code}] ${formatMessage(message, pkg)}`));
2723
+ console.warn(chalk36.yellow(`[${message.code}] ${formatMessage(message, pkg)}`));
2587
2724
  break;
2588
2725
  }
2589
2726
  default: {
2590
- console.log(chalk35.white(`[${message.code}] ${formatMessage(message, pkg)}`));
2727
+ console.log(chalk36.white(`[${message.code}] ${formatMessage(message, pkg)}`));
2591
2728
  break;
2592
2729
  }
2593
2730
  }
2594
2731
  }
2595
2732
  const [errorCount, warningCount] = customPubLint(pkg);
2596
2733
  if (verbose) {
2597
- console.log(chalk35.gray(`Publint [Finish]: ${pkgDir} [${messages.length + errorCount + warningCount} messages]`));
2734
+ console.log(chalk36.gray(`Publint [Finish]: ${pkgDir} [${messages.length + errorCount + warningCount} messages]`));
2598
2735
  }
2599
2736
  return messages.filter((message) => message.type === "error").length + errorCount;
2600
2737
  };
@@ -2621,6 +2758,21 @@ var publish = () => {
2621
2758
  return runSteps("Publish", [["npm", ["publish", "--workspaces"]]]);
2622
2759
  };
2623
2760
 
2761
+ // src/actions/readme-gen.ts
2762
+ async function readmeGen({
2763
+ pkg,
2764
+ templatePath,
2765
+ typedoc,
2766
+ verbose
2767
+ }) {
2768
+ return await generateReadmeFiles({
2769
+ pkg,
2770
+ templatePath,
2771
+ typedoc,
2772
+ verbose
2773
+ });
2774
+ }
2775
+
2624
2776
  // src/actions/rebuild.ts
2625
2777
  var rebuild = ({ target }) => {
2626
2778
  return runSteps("Rebuild", [
@@ -2630,7 +2782,7 @@ var rebuild = ({ target }) => {
2630
2782
  };
2631
2783
 
2632
2784
  // src/actions/recompile.ts
2633
- import chalk36 from "chalk";
2785
+ import chalk37 from "chalk";
2634
2786
  var recompile = async ({
2635
2787
  verbose,
2636
2788
  target,
@@ -2666,7 +2818,7 @@ var recompileAll = async ({
2666
2818
  const incrementalOptions = incremental ? ["--since", "-Apt", "--topological-dev"] : ["--parallel", "-Apt", "--topological-dev"];
2667
2819
  const jobsOptions = jobs ? ["-j", `${jobs}`] : [];
2668
2820
  if (jobs) {
2669
- console.log(chalk36.blue(`Jobs set to [${jobs}]`));
2821
+ console.log(chalk37.blue(`Jobs set to [${jobs}]`));
2670
2822
  }
2671
2823
  const result = await runStepsAsync(`Recompile${incremental ? "-Incremental" : ""} [All]`, [
2672
2824
  [
@@ -2697,7 +2849,7 @@ var recompileAll = async ({
2697
2849
  ]
2698
2850
  ]);
2699
2851
  console.log(
2700
- `${chalk36.gray("Recompiled in")} [${chalk36.magenta(((Date.now() - start) / 1e3).toFixed(2))}] ${chalk36.gray("seconds")}`
2852
+ `${chalk37.gray("Recompiled in")} [${chalk37.magenta(((Date.now() - start) / 1e3).toFixed(2))}] ${chalk37.gray("seconds")}`
2701
2853
  );
2702
2854
  return result;
2703
2855
  };
@@ -2728,13 +2880,13 @@ var reinstall = () => {
2728
2880
  };
2729
2881
 
2730
2882
  // src/actions/relint.ts
2731
- import chalk37 from "chalk";
2883
+ import chalk38 from "chalk";
2732
2884
  var relintPackage = ({
2733
2885
  pkg,
2734
2886
  fix: fix2,
2735
2887
  verbose
2736
2888
  }) => {
2737
- console.log(chalk37.gray(`${fix2 ? "Fix" : "Lint"} [${pkg}]`));
2889
+ console.log(chalk38.gray(`${fix2 ? "Fix" : "Lint"} [${pkg}]`));
2738
2890
  const start = Date.now();
2739
2891
  const result = runSteps(`${fix2 ? "Fix" : "Lint"} [${pkg}]`, [
2740
2892
  ["yarn", [
@@ -2744,7 +2896,7 @@ var relintPackage = ({
2744
2896
  fix2 ? "package-fix" : verbose ? "package-lint-verbose" : "package-lint"
2745
2897
  ]]
2746
2898
  ]);
2747
- console.log(chalk37.gray(`${fix2 ? "Fixed in" : "Linted in"} [${chalk37.magenta(((Date.now() - start) / 1e3).toFixed(2))}] ${chalk37.gray("seconds")}`));
2899
+ console.log(chalk38.gray(`${fix2 ? "Fixed in" : "Linted in"} [${chalk38.magenta(((Date.now() - start) / 1e3).toFixed(2))}] ${chalk38.gray("seconds")}`));
2748
2900
  return result;
2749
2901
  };
2750
2902
  var relint = ({
@@ -2764,13 +2916,13 @@ var relint = ({
2764
2916
  });
2765
2917
  };
2766
2918
  var relintAllPackages = ({ fix: fix2 = false } = {}) => {
2767
- console.log(chalk37.gray(`${fix2 ? "Fix" : "Lint"} [All-Packages]`));
2919
+ console.log(chalk38.gray(`${fix2 ? "Fix" : "Lint"} [All-Packages]`));
2768
2920
  const start = Date.now();
2769
2921
  const fixOptions = fix2 ? ["--fix"] : [];
2770
2922
  const result = runSteps(`${fix2 ? "Fix" : "Lint"} [All-Packages]`, [
2771
2923
  ["yarn", ["eslint", ...fixOptions]]
2772
2924
  ]);
2773
- console.log(chalk37.gray(`${fix2 ? "Fixed in" : "Linted in"} [${chalk37.magenta(((Date.now() - start) / 1e3).toFixed(2))}] ${chalk37.gray("seconds")}`));
2925
+ console.log(chalk38.gray(`${fix2 ? "Fixed in" : "Linted in"} [${chalk38.magenta(((Date.now() - start) / 1e3).toFixed(2))}] ${chalk38.gray("seconds")}`));
2774
2926
  return result;
2775
2927
  };
2776
2928
 
@@ -2788,10 +2940,10 @@ var sonar = () => {
2788
2940
  };
2789
2941
 
2790
2942
  // src/actions/statics.ts
2791
- import chalk38 from "chalk";
2943
+ import chalk39 from "chalk";
2792
2944
  var DefaultDependencies = ["axios", "@xylabs/pixel", "react", "graphql", "react-router", "@mui/material", "@mui/system"];
2793
2945
  var statics = () => {
2794
- console.log(chalk38.green("Check Required Static Dependencies"));
2946
+ console.log(chalk39.green("Check Required Static Dependencies"));
2795
2947
  const statics2 = parsedPackageJSON()?.xy?.deps?.statics;
2796
2948
  return detectDuplicateDependencies(statics2, DefaultDependencies);
2797
2949
  };
@@ -2891,6 +3043,7 @@ export {
2891
3043
  publintAll,
2892
3044
  publintPackage,
2893
3045
  publish,
3046
+ readmeGen,
2894
3047
  rebuild,
2895
3048
  recompile,
2896
3049
  recompileAll,