@xylabs/ts-scripts-yarn3 4.0.1 → 4.0.3

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (49) hide show
  1. package/dist/actions/build.mjs +3 -1
  2. package/dist/actions/build.mjs.map +1 -1
  3. package/dist/actions/compile.mjs +9 -7
  4. package/dist/actions/compile.mjs.map +1 -1
  5. package/dist/actions/index.mjs +29 -21
  6. package/dist/actions/index.mjs.map +1 -1
  7. package/dist/actions/package/compile/compile.mjs +17 -13
  8. package/dist/actions/package/compile/compile.mjs.map +1 -1
  9. package/dist/actions/package/compile/index.mjs +17 -13
  10. package/dist/actions/package/compile/index.mjs.map +1 -1
  11. package/dist/actions/package/compile/packageCompileTsup.mjs +15 -11
  12. package/dist/actions/package/compile/packageCompileTsup.mjs.map +1 -1
  13. package/dist/actions/package/index.mjs +17 -13
  14. package/dist/actions/package/index.mjs.map +1 -1
  15. package/dist/actions/package/recompile.mjs +17 -13
  16. package/dist/actions/package/recompile.mjs.map +1 -1
  17. package/dist/bin/package/build.mjs +551 -0
  18. package/dist/bin/package/build.mjs.map +1 -0
  19. package/dist/bin/package/compile-only.mjs +17 -13
  20. package/dist/bin/package/compile-only.mjs.map +1 -1
  21. package/dist/bin/package/compile-tsup.mjs +15 -11
  22. package/dist/bin/package/compile-tsup.mjs.map +1 -1
  23. package/dist/bin/package/compile.mjs +17 -13
  24. package/dist/bin/package/compile.mjs.map +1 -1
  25. package/dist/bin/package/recompile.mjs +17 -13
  26. package/dist/bin/package/recompile.mjs.map +1 -1
  27. package/dist/bin/xy-ts.mjs +26 -12
  28. package/dist/bin/xy-ts.mjs.map +1 -1
  29. package/dist/bin/xy.mjs +26 -12
  30. package/dist/bin/xy.mjs.map +1 -1
  31. package/dist/index.d.ts +7 -5
  32. package/dist/index.mjs +43 -25
  33. package/dist/index.mjs.map +1 -1
  34. package/dist/xy/index.mjs +26 -12
  35. package/dist/xy/index.mjs.map +1 -1
  36. package/dist/xy/xy.mjs +26 -12
  37. package/dist/xy/xy.mjs.map +1 -1
  38. package/dist/xy/xyBuildCommands.mjs +17 -12
  39. package/dist/xy/xyBuildCommands.mjs.map +1 -1
  40. package/dist/xy/xyParseOptions.mjs +9 -0
  41. package/dist/xy/xyParseOptions.mjs.map +1 -1
  42. package/package.json +5 -4
  43. package/src/actions/build.ts +1 -1
  44. package/src/actions/compile.ts +22 -7
  45. package/src/actions/package/compile/compile.ts +2 -2
  46. package/src/actions/package/compile/packageCompileTsup.ts +18 -4
  47. package/src/bin/package/build.ts +16 -0
  48. package/src/xy/xyBuildCommands.ts +5 -4
  49. package/src/xy/xyParseOptions.ts +7 -0
@@ -450,7 +450,9 @@ var build = /* @__PURE__ */ __name(async ({ incremental, jobs, target, verbose,
450
450
  ...targetOptions,
451
451
  ...verboseOptions,
452
452
  ...jobsOptions,
453
- ...incrementalOptions
453
+ ...incrementalOptions,
454
+ "--types",
455
+ "tsc"
454
456
  ]
455
457
  ],
456
458
  [
@@ -534,21 +536,23 @@ var cleanDocs = /* @__PURE__ */ __name(() => {
534
536
 
535
537
  // src/actions/compile.ts
536
538
  import chalk9 from "chalk";
537
- var compile = /* @__PURE__ */ __name(({ verbose, target, pkg, incremental, publint: publint2, jobs }) => {
539
+ var compile = /* @__PURE__ */ __name(({ verbose, target, pkg, incremental, publint: publint2, jobs, types }) => {
538
540
  return pkg ? compilePackage({
539
541
  pkg,
540
542
  publint: publint2,
541
543
  target,
542
- verbose
544
+ verbose,
545
+ types
543
546
  }) : compileAll({
544
547
  incremental,
545
548
  publint: publint2,
546
549
  target,
547
550
  verbose,
548
- jobs
551
+ jobs,
552
+ types
549
553
  });
550
554
  }, "compile");
551
- var compilePackage = /* @__PURE__ */ __name(({ target, pkg }) => {
555
+ var compilePackage = /* @__PURE__ */ __name(({ target, pkg, types }) => {
552
556
  const targetOptions = target ? [
553
557
  "-t",
554
558
  target
@@ -560,13 +564,13 @@ var compilePackage = /* @__PURE__ */ __name(({ target, pkg }) => {
560
564
  "workspace",
561
565
  pkg,
562
566
  "run",
563
- "package-compile",
567
+ types === "tsup" ? "package-compile" : "package-build",
564
568
  ...targetOptions
565
569
  ]
566
570
  ]
567
571
  ]);
568
572
  }, "compilePackage");
569
- var compileAll = /* @__PURE__ */ __name(({ jobs, verbose, target, incremental }) => {
573
+ var compileAll = /* @__PURE__ */ __name(({ jobs, verbose, target, incremental, types }) => {
570
574
  const start = Date.now();
571
575
  const verboseOptions = verbose ? [
572
576
  "--verbose"
@@ -603,7 +607,7 @@ var compileAll = /* @__PURE__ */ __name(({ jobs, verbose, target, incremental })
603
607
  ...jobsOptions,
604
608
  ...verboseOptions,
605
609
  "run",
606
- "package-compile",
610
+ types === "tsup" ? "package-compile" : "package-build",
607
611
  ...targetOptions
608
612
  ]
609
613
  ]
@@ -1572,26 +1576,27 @@ var xyBuildCommands = /* @__PURE__ */ __name((args) => {
1572
1576
  return yargs2.positional("package", {
1573
1577
  describe: "Specific package to compile"
1574
1578
  });
1575
- }, async (argv) => {
1579
+ }, (argv) => {
1576
1580
  if (argv.verbose) {
1577
1581
  console.log(`Compiling: ${argv.package ?? "all"}`);
1578
1582
  }
1579
- process.exitCode = await compile({
1583
+ process.exitCode = compile({
1580
1584
  incremental: !!argv.incremental,
1581
1585
  jobs: argv.jobs,
1582
1586
  pkg: argv.package,
1583
1587
  target: argv.target,
1588
+ types: argv.types,
1584
1589
  verbose: !!argv.verbose
1585
1590
  });
1586
1591
  }).command("compile-only [package]", "Compile with Typescript & Copy Images (No Publint)", (yargs2) => {
1587
1592
  return yargs2.positional("package", {
1588
1593
  describe: "Specific package to compile"
1589
1594
  });
1590
- }, async (argv) => {
1595
+ }, (argv) => {
1591
1596
  if (argv.verbose) {
1592
1597
  console.log(`Compiling: ${argv.package ?? "all"}`);
1593
1598
  }
1594
- process.exitCode = await compile({
1599
+ process.exitCode = compile({
1595
1600
  incremental: !!argv.incremental,
1596
1601
  jobs: argv.jobs,
1597
1602
  pkg: argv.package,
@@ -1853,6 +1858,7 @@ var xyParseOptions = /* @__PURE__ */ __name(() => {
1853
1858
  type: "boolean"
1854
1859
  }).option("target", {
1855
1860
  alias: "t",
1861
+ default: "esm",
1856
1862
  choices: [
1857
1863
  "esm",
1858
1864
  "cjs"
@@ -1879,6 +1885,14 @@ var xyParseOptions = /* @__PURE__ */ __name(() => {
1879
1885
  default: false,
1880
1886
  description: "Profile action",
1881
1887
  type: "boolean"
1888
+ }).option("types", {
1889
+ default: "tsup",
1890
+ choices: [
1891
+ "tsc",
1892
+ "tsup"
1893
+ ],
1894
+ description: "Tool to generate Typescript types",
1895
+ type: "string"
1882
1896
  });
1883
1897
  }, "xyParseOptions");
1884
1898