@xylabs/ts-scripts-yarn3 3.2.42 → 3.3.0

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 (184) hide show
  1. package/dist/actions/clean-docs.js +2 -2
  2. package/dist/actions/clean-docs.js.map +1 -1
  3. package/dist/actions/clean-docs.mjs +1 -1
  4. package/dist/actions/clean-docs.mjs.map +1 -1
  5. package/dist/actions/clean-eslint.js +2 -2
  6. package/dist/actions/clean-eslint.js.map +1 -1
  7. package/dist/actions/clean-eslint.mjs +1 -1
  8. package/dist/actions/clean-eslint.mjs.map +1 -1
  9. package/dist/actions/compile.js.map +1 -1
  10. package/dist/actions/compile.mjs.map +1 -1
  11. package/dist/actions/copy-assets.js +9 -6
  12. package/dist/actions/copy-assets.js.map +1 -1
  13. package/dist/actions/copy-assets.mjs +9 -6
  14. package/dist/actions/copy-assets.mjs.map +1 -1
  15. package/dist/actions/cycle.js +1 -1
  16. package/dist/actions/cycle.js.map +1 -1
  17. package/dist/actions/cycle.mjs +1 -1
  18. package/dist/actions/cycle.mjs.map +1 -1
  19. package/dist/actions/gitlint-fix.js +4 -4
  20. package/dist/actions/gitlint-fix.js.map +1 -1
  21. package/dist/actions/gitlint-fix.mjs +1 -1
  22. package/dist/actions/gitlint-fix.mjs.map +1 -1
  23. package/dist/actions/gitlint.js +6 -6
  24. package/dist/actions/gitlint.js.map +1 -1
  25. package/dist/actions/gitlint.mjs +6 -6
  26. package/dist/actions/gitlint.mjs.map +1 -1
  27. package/dist/actions/license.js +11 -11
  28. package/dist/actions/license.js.map +1 -1
  29. package/dist/actions/license.mjs +11 -11
  30. package/dist/actions/license.mjs.map +1 -1
  31. package/dist/actions/lint-clean.js +2 -2
  32. package/dist/actions/lint-clean.js.map +1 -1
  33. package/dist/actions/lint-clean.mjs +1 -1
  34. package/dist/actions/lint-clean.mjs.map +1 -1
  35. package/dist/actions/lint.js +4 -4
  36. package/dist/actions/lint.js.map +1 -1
  37. package/dist/actions/lint.mjs +4 -4
  38. package/dist/actions/lint.mjs.map +1 -1
  39. package/dist/actions/package/clean-outputs.js +6 -6
  40. package/dist/actions/package/clean-outputs.js.map +1 -1
  41. package/dist/actions/package/clean-outputs.mjs +2 -2
  42. package/dist/actions/package/clean-outputs.mjs.map +1 -1
  43. package/dist/actions/package/clean-typescript.js +3 -3
  44. package/dist/actions/package/clean-typescript.js.map +1 -1
  45. package/dist/actions/package/clean-typescript.mjs +1 -1
  46. package/dist/actions/package/clean-typescript.mjs.map +1 -1
  47. package/dist/actions/package/compile/buildEntries.js +6 -4
  48. package/dist/actions/package/compile/buildEntries.js.map +1 -1
  49. package/dist/actions/package/compile/buildEntries.mjs +6 -4
  50. package/dist/actions/package/compile/buildEntries.mjs.map +1 -1
  51. package/dist/actions/package/compile/copyTypeFiles.js +1 -1
  52. package/dist/actions/package/compile/copyTypeFiles.js.map +1 -1
  53. package/dist/actions/package/compile/copyTypeFiles.mjs +1 -1
  54. package/dist/actions/package/compile/copyTypeFiles.mjs.map +1 -1
  55. package/dist/actions/package/compile/getCompilerOptions.js +1 -1
  56. package/dist/actions/package/compile/getCompilerOptions.js.map +1 -1
  57. package/dist/actions/package/compile/getCompilerOptions.mjs +1 -1
  58. package/dist/actions/package/compile/getCompilerOptions.mjs.map +1 -1
  59. package/dist/actions/package/compile/inputs.js +2 -2
  60. package/dist/actions/package/compile/inputs.js.map +1 -1
  61. package/dist/actions/package/compile/inputs.mjs +2 -2
  62. package/dist/actions/package/compile/inputs.mjs.map +1 -1
  63. package/dist/actions/package/compile/packageCompileTsc.js +8 -8
  64. package/dist/actions/package/compile/packageCompileTsc.js.map +1 -1
  65. package/dist/actions/package/compile/packageCompileTsc.mjs +6 -6
  66. package/dist/actions/package/compile/packageCompileTsc.mjs.map +1 -1
  67. package/dist/actions/package/compile/packageCompileTscTypes.js +13 -10
  68. package/dist/actions/package/compile/packageCompileTscTypes.js.map +1 -1
  69. package/dist/actions/package/compile/packageCompileTscTypes.mjs +11 -8
  70. package/dist/actions/package/compile/packageCompileTscTypes.mjs.map +1 -1
  71. package/dist/actions/package/compile/packageCompileTsup.js +5 -5
  72. package/dist/actions/package/compile/packageCompileTsup.js.map +1 -1
  73. package/dist/actions/package/compile/packageCompileTsup.mjs +5 -5
  74. package/dist/actions/package/compile/packageCompileTsup.mjs.map +1 -1
  75. package/dist/actions/package/copy-assets.js +9 -6
  76. package/dist/actions/package/copy-assets.js.map +1 -1
  77. package/dist/actions/package/copy-assets.mjs +9 -6
  78. package/dist/actions/package/copy-assets.mjs.map +1 -1
  79. package/dist/actions/package/deps.js +23 -21
  80. package/dist/actions/package/deps.js.map +1 -1
  81. package/dist/actions/package/deps.mjs +19 -17
  82. package/dist/actions/package/deps.mjs.map +1 -1
  83. package/dist/actions/package/gen-docs.js +2 -4
  84. package/dist/actions/package/gen-docs.js.map +1 -1
  85. package/dist/actions/package/gen-docs.mjs +2 -4
  86. package/dist/actions/package/gen-docs.mjs.map +1 -1
  87. package/dist/actions/package/publint.js +10 -7
  88. package/dist/actions/package/publint.js.map +1 -1
  89. package/dist/actions/package/publint.mjs +9 -6
  90. package/dist/actions/package/publint.mjs.map +1 -1
  91. package/dist/actions/reinstall.js +3 -3
  92. package/dist/actions/reinstall.js.map +1 -1
  93. package/dist/actions/reinstall.mjs +1 -1
  94. package/dist/actions/reinstall.mjs.map +1 -1
  95. package/dist/actions/relint.js +2 -2
  96. package/dist/actions/relint.js.map +1 -1
  97. package/dist/actions/relint.mjs +1 -1
  98. package/dist/actions/relint.mjs.map +1 -1
  99. package/dist/index.d.mts +1 -1
  100. package/dist/index.d.ts +1 -1
  101. package/dist/lib/createBuildConfig.js +4 -4
  102. package/dist/lib/createBuildConfig.js.map +1 -1
  103. package/dist/lib/createBuildConfig.mjs +3 -3
  104. package/dist/lib/createBuildConfig.mjs.map +1 -1
  105. package/dist/lib/dependencies/DuplicateDetector.js +6 -6
  106. package/dist/lib/dependencies/DuplicateDetector.js.map +1 -1
  107. package/dist/lib/dependencies/DuplicateDetector.mjs +4 -4
  108. package/dist/lib/dependencies/DuplicateDetector.mjs.map +1 -1
  109. package/dist/lib/dependencies/detectDuplicateDependencies.js +10 -7
  110. package/dist/lib/dependencies/detectDuplicateDependencies.js.map +1 -1
  111. package/dist/lib/dependencies/detectDuplicateDependencies.mjs +9 -6
  112. package/dist/lib/dependencies/detectDuplicateDependencies.mjs.map +1 -1
  113. package/dist/lib/file/ReadFileSyncOptions.js +1 -1
  114. package/dist/lib/file/ReadFileSyncOptions.js.map +1 -1
  115. package/dist/lib/file/ReadFileSyncOptions.mjs +1 -1
  116. package/dist/lib/file/ReadFileSyncOptions.mjs.map +1 -1
  117. package/dist/lib/jsonFormatters.js +2 -2
  118. package/dist/lib/jsonFormatters.js.map +1 -1
  119. package/dist/lib/jsonFormatters.mjs +2 -2
  120. package/dist/lib/jsonFormatters.mjs.map +1 -1
  121. package/dist/lib/parsedPackageJSON.js +2 -2
  122. package/dist/lib/parsedPackageJSON.js.map +1 -1
  123. package/dist/lib/parsedPackageJSON.mjs +1 -1
  124. package/dist/lib/parsedPackageJSON.mjs.map +1 -1
  125. package/dist/lib/runSteps.js +6 -7
  126. package/dist/lib/runSteps.js.map +1 -1
  127. package/dist/lib/runSteps.mjs +4 -5
  128. package/dist/lib/runSteps.mjs.map +1 -1
  129. package/dist/lib/runStepsAsync.js +7 -7
  130. package/dist/lib/runStepsAsync.js.map +1 -1
  131. package/dist/lib/runStepsAsync.mjs +5 -5
  132. package/dist/lib/runStepsAsync.mjs.map +1 -1
  133. package/dist/lib/yarn/isYarnVersionOrGreater.js +3 -3
  134. package/dist/lib/yarn/isYarnVersionOrGreater.js.map +1 -1
  135. package/dist/lib/yarn/isYarnVersionOrGreater.mjs +2 -2
  136. package/dist/lib/yarn/isYarnVersionOrGreater.mjs.map +1 -1
  137. package/dist/lib/yarn/workspace/yarnWorkspaces.js +2 -2
  138. package/dist/lib/yarn/workspace/yarnWorkspaces.js.map +1 -1
  139. package/dist/lib/yarn/workspace/yarnWorkspaces.mjs +1 -1
  140. package/dist/lib/yarn/workspace/yarnWorkspaces.mjs.map +1 -1
  141. package/dist/loadPackageConfig.js +1 -1
  142. package/dist/loadPackageConfig.js.map +1 -1
  143. package/dist/loadPackageConfig.mjs +1 -1
  144. package/dist/loadPackageConfig.mjs.map +1 -1
  145. package/dist/xy/xyLintCommands.js.map +1 -1
  146. package/dist/xy/xyLintCommands.mjs.map +1 -1
  147. package/package.json +13 -13
  148. package/src/actions/clean-docs.ts +2 -1
  149. package/src/actions/clean-eslint.ts +2 -1
  150. package/src/actions/compile.ts +2 -2
  151. package/src/actions/copy-assets.ts +11 -6
  152. package/src/actions/cycle.ts +1 -1
  153. package/src/actions/gitlint-fix.ts +2 -1
  154. package/src/actions/gitlint.ts +6 -6
  155. package/src/actions/license.ts +44 -40
  156. package/src/actions/lint-clean.ts +2 -1
  157. package/src/actions/lint.ts +4 -4
  158. package/src/actions/package/clean-outputs.ts +3 -2
  159. package/src/actions/package/clean-typescript.ts +2 -1
  160. package/src/actions/package/compile/buildEntries.ts +6 -4
  161. package/src/actions/package/compile/copyTypeFiles.ts +2 -1
  162. package/src/actions/package/compile/getCompilerOptions.ts +1 -1
  163. package/src/actions/package/compile/inputs.ts +3 -2
  164. package/src/actions/package/compile/packageCompileTsc.ts +7 -5
  165. package/src/actions/package/compile/packageCompileTscTypes.ts +11 -7
  166. package/src/actions/package/compile/packageCompileTsup.ts +11 -13
  167. package/src/actions/package/copy-assets.ts +10 -6
  168. package/src/actions/package/deps.ts +19 -20
  169. package/src/actions/package/gen-docs.ts +2 -4
  170. package/src/actions/package/publint.ts +10 -6
  171. package/src/actions/reinstall.ts +2 -1
  172. package/src/actions/relint.ts +2 -1
  173. package/src/lib/createBuildConfig.ts +3 -3
  174. package/src/lib/dependencies/DuplicateDetector.ts +6 -4
  175. package/src/lib/dependencies/detectDuplicateDependencies.ts +9 -6
  176. package/src/lib/file/ReadFileSyncOptions.ts +1 -1
  177. package/src/lib/jsonFormatters.ts +2 -2
  178. package/src/lib/parsedPackageJSON.ts +1 -1
  179. package/src/lib/runSteps.ts +5 -5
  180. package/src/lib/runStepsAsync.ts +6 -5
  181. package/src/lib/yarn/isYarnVersionOrGreater.ts +2 -2
  182. package/src/lib/yarn/workspace/yarnWorkspaces.ts +1 -1
  183. package/src/loadPackageConfig.ts +2 -1
  184. package/src/xy/xyLintCommands.ts +4 -1
@@ -1 +1 @@
1
- {"version":3,"sources":["../../src/actions/lint-clean.ts"],"sourcesContent":["import { rmSync } from 'fs'\n\nimport { yarnWorkspaces } from '../lib'\nimport { lint } from './lint'\n\nexport const lintClean = () => {\n console.log('Lint Clean [.eslintcache]')\n const workspaces = yarnWorkspaces()\n const result = workspaces\n .map(({ location, name }) => {\n const dist = `${location}/.eslintcache`\n try {\n rmSync(dist, { force: true, recursive: true })\n return 0\n } catch (ex) {\n const error = ex as Error\n console.error(`Lint Clean [.eslintcache] Failed [${name}, ${error.message}]`)\n return 1\n }\n })\n .reduce((prev, result) => prev || result, 0)\n return result || lint()\n}\n"],"mappings":";;;;;;;;;;;;;;;;;;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA,gBAAuB;AAEvB,iBAA+B;AAC/B,kBAAqB;AAEd,MAAM,YAAY,MAAM;AAC7B,UAAQ,IAAI,2BAA2B;AACvC,QAAM,iBAAa,2BAAe;AAClC,QAAM,SAAS,WACZ,IAAI,CAAC,EAAE,UAAU,KAAK,MAAM;AAC3B,UAAM,OAAO,GAAG,QAAQ;AACxB,QAAI;AACF,4BAAO,MAAM,EAAE,OAAO,MAAM,WAAW,KAAK,CAAC;AAC7C,aAAO;AAAA,IACT,SAAS,IAAI;AACX,YAAM,QAAQ;AACd,cAAQ,MAAM,qCAAqC,IAAI,KAAK,MAAM,OAAO,GAAG;AAC5E,aAAO;AAAA,IACT;AAAA,EACF,CAAC,EACA,OAAO,CAAC,MAAMA,YAAW,QAAQA,SAAQ,CAAC;AAC7C,SAAO,cAAU,kBAAK;AACxB;","names":["result"]}
1
+ {"version":3,"sources":["../../src/actions/lint-clean.ts"],"sourcesContent":["import { rmSync } from 'node:fs'\n\nimport { yarnWorkspaces } from '../lib'\nimport { lint } from './lint'\n\nexport const lintClean = () => {\n console.log('Lint Clean [.eslintcache]')\n const workspaces = yarnWorkspaces()\n const result = workspaces\n .map(({ location, name }) => {\n const dist = `${location}/.eslintcache`\n try {\n rmSync(dist, { force: true, recursive: true })\n return 0\n } catch (ex) {\n const error = ex as Error\n console.error(`Lint Clean [.eslintcache] Failed [${name}, ${error.message}]`)\n return 1\n }\n })\n // eslint-disable-next-line unicorn/no-array-reduce\n .reduce((prev, result) => prev || result, 0)\n return result || lint()\n}\n"],"mappings":";;;;;;;;;;;;;;;;;;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA,qBAAuB;AAEvB,iBAA+B;AAC/B,kBAAqB;AAEd,MAAM,YAAY,MAAM;AAC7B,UAAQ,IAAI,2BAA2B;AACvC,QAAM,iBAAa,2BAAe;AAClC,QAAM,SAAS,WACZ,IAAI,CAAC,EAAE,UAAU,KAAK,MAAM;AAC3B,UAAM,OAAO,GAAG,QAAQ;AACxB,QAAI;AACF,iCAAO,MAAM,EAAE,OAAO,MAAM,WAAW,KAAK,CAAC;AAC7C,aAAO;AAAA,IACT,SAAS,IAAI;AACX,YAAM,QAAQ;AACd,cAAQ,MAAM,qCAAqC,IAAI,KAAK,MAAM,OAAO,GAAG;AAC5E,aAAO;AAAA,IACT;AAAA,EACF,CAAC,EAEA,OAAO,CAAC,MAAMA,YAAW,QAAQA,SAAQ,CAAC;AAC7C,SAAO,cAAU,kBAAK;AACxB;","names":["result"]}
@@ -1,4 +1,4 @@
1
- import { rmSync } from "fs";
1
+ import { rmSync } from "node:fs";
2
2
  import { yarnWorkspaces } from "../lib";
3
3
  import { lint } from "./lint";
4
4
  const lintClean = () => {
@@ -1 +1 @@
1
- {"version":3,"sources":["../../src/actions/lint-clean.ts"],"sourcesContent":["import { rmSync } from 'fs'\n\nimport { yarnWorkspaces } from '../lib'\nimport { lint } from './lint'\n\nexport const lintClean = () => {\n console.log('Lint Clean [.eslintcache]')\n const workspaces = yarnWorkspaces()\n const result = workspaces\n .map(({ location, name }) => {\n const dist = `${location}/.eslintcache`\n try {\n rmSync(dist, { force: true, recursive: true })\n return 0\n } catch (ex) {\n const error = ex as Error\n console.error(`Lint Clean [.eslintcache] Failed [${name}, ${error.message}]`)\n return 1\n }\n })\n .reduce((prev, result) => prev || result, 0)\n return result || lint()\n}\n"],"mappings":"AAAA,SAAS,cAAc;AAEvB,SAAS,sBAAsB;AAC/B,SAAS,YAAY;AAEd,MAAM,YAAY,MAAM;AAC7B,UAAQ,IAAI,2BAA2B;AACvC,QAAM,aAAa,eAAe;AAClC,QAAM,SAAS,WACZ,IAAI,CAAC,EAAE,UAAU,KAAK,MAAM;AAC3B,UAAM,OAAO,GAAG,QAAQ;AACxB,QAAI;AACF,aAAO,MAAM,EAAE,OAAO,MAAM,WAAW,KAAK,CAAC;AAC7C,aAAO;AAAA,IACT,SAAS,IAAI;AACX,YAAM,QAAQ;AACd,cAAQ,MAAM,qCAAqC,IAAI,KAAK,MAAM,OAAO,GAAG;AAC5E,aAAO;AAAA,IACT;AAAA,EACF,CAAC,EACA,OAAO,CAAC,MAAMA,YAAW,QAAQA,SAAQ,CAAC;AAC7C,SAAO,UAAU,KAAK;AACxB;","names":["result"]}
1
+ {"version":3,"sources":["../../src/actions/lint-clean.ts"],"sourcesContent":["import { rmSync } from 'node:fs'\n\nimport { yarnWorkspaces } from '../lib'\nimport { lint } from './lint'\n\nexport const lintClean = () => {\n console.log('Lint Clean [.eslintcache]')\n const workspaces = yarnWorkspaces()\n const result = workspaces\n .map(({ location, name }) => {\n const dist = `${location}/.eslintcache`\n try {\n rmSync(dist, { force: true, recursive: true })\n return 0\n } catch (ex) {\n const error = ex as Error\n console.error(`Lint Clean [.eslintcache] Failed [${name}, ${error.message}]`)\n return 1\n }\n })\n // eslint-disable-next-line unicorn/no-array-reduce\n .reduce((prev, result) => prev || result, 0)\n return result || lint()\n}\n"],"mappings":"AAAA,SAAS,cAAc;AAEvB,SAAS,sBAAsB;AAC/B,SAAS,YAAY;AAEd,MAAM,YAAY,MAAM;AAC7B,UAAQ,IAAI,2BAA2B;AACvC,QAAM,aAAa,eAAe;AAClC,QAAM,SAAS,WACZ,IAAI,CAAC,EAAE,UAAU,KAAK,MAAM;AAC3B,UAAM,OAAO,GAAG,QAAQ;AACxB,QAAI;AACF,aAAO,MAAM,EAAE,OAAO,MAAM,WAAW,KAAK,CAAC;AAC7C,aAAO;AAAA,IACT,SAAS,IAAI;AACX,YAAM,QAAQ;AACd,cAAQ,MAAM,qCAAqC,IAAI,KAAK,MAAM,OAAO,GAAG;AAC5E,aAAO;AAAA,IACT;AAAA,EACF,CAAC,EAEA,OAAO,CAAC,MAAMA,YAAW,QAAQA,SAAQ,CAAC;AAC7C,SAAO,UAAU,KAAK;AACxB;","names":["result"]}
@@ -39,19 +39,19 @@ var import_lib = require("../lib");
39
39
  const dumpMessages = (lintResults) => {
40
40
  const colors = ["white", "yellow", "red"];
41
41
  const severity = ["none", "warning", "error"];
42
- lintResults.forEach((lintResult) => {
42
+ for (const lintResult of lintResults) {
43
43
  if (lintResult.messages.length > 0) {
44
44
  console.log(import_chalk.default.gray(`${lintResult.filePath}`));
45
- lintResult.messages.forEach((message) => {
45
+ for (const message of lintResult.messages) {
46
46
  console.log(
47
47
  import_chalk.default.gray(` ${message.line}:${message.column}`),
48
48
  import_chalk.default[colors[message.severity]](` ${severity[message.severity]}`),
49
49
  import_chalk.default.white(` ${message.message}`),
50
50
  import_chalk.default.gray(` ${message.ruleId}`)
51
51
  );
52
- });
52
+ }
53
53
  }
54
- });
54
+ }
55
55
  };
56
56
  const lintPackage = async ({ pkg }) => {
57
57
  const workspace = (0, import_lib.yarnWorkspaces)().find((workspace2) => workspace2.name === pkg);
@@ -1 +1 @@
1
- {"version":3,"sources":["../../src/actions/lint.ts"],"sourcesContent":["import chalk from 'chalk'\nimport { ESLint } from 'eslint'\n\nimport { runSteps, yarnWorkspaces } from '../lib'\n\nexport interface LintParams {\n pkg?: string\n verbose?: boolean\n}\n\nexport interface LintPackageParams {\n pkg: string\n verbose?: boolean\n}\n\nconst dumpMessages = (lintResults: ESLint.LintResult[]) => {\n const colors: ('white' | 'red' | 'yellow')[] = ['white', 'yellow', 'red']\n const severity: string[] = ['none', 'warning', 'error']\n\n lintResults.forEach((lintResult) => {\n if (lintResult.messages.length > 0) {\n console.log(chalk.gray(`${lintResult.filePath}`))\n lintResult.messages.forEach((message) => {\n console.log(\n chalk.gray(`\\t${message.line}:${message.column}`),\n chalk[colors[message.severity]](`\\t${severity[message.severity]}`),\n chalk.white(`\\t${message.message}`),\n chalk.gray(`\\t${message.ruleId}`),\n )\n })\n }\n })\n}\n\nexport const lintPackage = async ({ pkg }: LintParams) => {\n const workspace = yarnWorkspaces().find((workspace) => workspace.name === pkg)\n if (!workspace) {\n console.error(chalk.red(`Unable to locate package [${chalk.magenta(pkg)}]`))\n process.exit(1)\n }\n\n const engine = new ESLint({ cache: true })\n\n const lintResults = await engine.lintFiles(workspace.location)\n\n dumpMessages(lintResults)\n\n const errorCount = lintResults.reduce((prev, lintResult) => prev + lintResult.errorCount, 0)\n\n return errorCount\n}\n\nexport const lintAll = async () => {\n const engine = new ESLint({ cache: true })\n\n const lintResults = await engine.lintFiles('./**/*.*')\n\n dumpMessages(lintResults)\n\n const errorCount = lintResults.reduce((prev, lintResult) => prev + lintResult.errorCount, 0)\n\n return errorCount\n}\n\nexport const lint = async ({ pkg }: LintParams = {}) => {\n return pkg ? await lintPackage({ pkg }) : runSteps('Lint-Caching [All]', [['yarn', ['eslint', '.', '--cache']]])\n}\n"],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;;;;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA,mBAAkB;AAClB,oBAAuB;AAEvB,iBAAyC;AAYzC,MAAM,eAAe,CAAC,gBAAqC;AACzD,QAAM,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AW;AAExB,QAAM,aAAa,YAAY,OAAO,CAAC,MAAM,eAAe,OAAO,WAAW,YAAY,CAAC;AAE3F,SAAO;AACT;AAEO,MAAM,OAAO,OAAO,EAAE,IAAI,IAAgB,CAAC,MAAM;AACtD,SAAO,MAAM,MAAM,YAAY,EAAE,IAAI,CAAC,QAAI,qBAAS,sBAAsB,CAAC,CAAC,QAAQ,CAAC,UAAU,KAAK,SAAS,CAAC,CAAC,CAAC;AACjH;","names":["chalk","workspace"]}
1
+ {"version":3,"sources":["../../src/actions/lint.ts"],"sourcesContent":["import chalk from 'chalk'\nimport { ESLint } from 'eslint'\n\nimport { runSteps, yarnWorkspaces } from '../lib'\n\nexport interface LintParams {\n pkg?: string\n verbose?: boolean\n}\n\nexport interface LintPackageParams {\n pkg: string\n verbose?: boolean\n}\n\nconst dumpMessages = (lintResults: ESLint.LintResult[]) => {\n const colors: ('white' | 'red' | 'yellow')[] = ['white', 'yellow', 'red']\n const severity: string[] = ['none', 'warning', 'error']\n\n for (const lintResult of lintResults) {\n if (lintResult.messages.length > 0) {\n console.log(chalk.gray(`${lintResult.filePath}`))\n for (const message of lintResult.messages) {\n console.log(\n chalk.gray(`\\t${message.line}:${message.column}`),\n chalk[colors[message.severity]](`\\t${severity[message.severity]}`),\n chalk.white(`\\t${message.message}`),\n chalk.gray(`\\t${message.ruleId}`),\n )\n }\n }\n }\n}\n\nexport const lintPackage = async ({ pkg }: LintParams) => {\n const workspace = yarnWorkspaces().find((workspace) => workspace.name === pkg)\n if (!workspace) {\n console.error(chalk.red(`Unable to locate package [${chalk.magenta(pkg)}]`))\n process.exit(1)\n }\n\n const engine = new ESLint({ cache: true })\n\n const lintResults = await engine.lintFiles(workspace.location)\n\n dumpMessages(lintResults)\n\n const errorCount = lintResults.reduce((prev, lintResult) => prev + lintResult.errorCount, 0)\n\n return errorCount\n}\n\nexport const lintAll = async () => {\n const engine = new ESLint({ cache: true })\n\n const lintResults = await engine.lintFiles('./**/*.*')\n\n dumpMessages(lintResults)\n\n const errorCount = lintResults.reduce((prev, lintResult) => prev + lintResult.errorCount, 0)\n\n return errorCount\n}\n\nexport const lint = async ({ pkg }: LintParams = {}) => {\n return pkg ? await lintPackage({ pkg }) : runSteps('Lint-Caching [All]', [['yarn', ['eslint', '.', '--cache']]])\n}\n"],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;;;;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA,mBAAkB;AAClB,oBAAuB;AAEvB,iBAAyC;AAYzC,MAAM,eAAe,CAAC,gBAAqC;AACzD,QAAM,SAAyC,CAAC,SAAS,UAAU,KAAK;AACxE,QAAM,WAAqB,CAAC,QAAQ,WAAW,OAAO;AAEtD,aAAW,cAAc,aAAa;AACpC,QAAI,WAAW,SAAS,SAAS,GAAG;AAClC,cAAQ,IAAI,aAAAA,QAAM,KAAK,GAAG,WAAW,QAAQ,EAAE,CAAC;AAChD,iBAAW,WAAW,WAAW,UAAU;AACzC,gBAAQ;AAAA,UACN,aAAAA,QAAM,KAAK,IAAK,QAAQ,IAAI,IAAI,QAAQ,MAAM,EAAE;AAAA,UAChD,aAAAA,QAAM,OAAO,QAAQ,QAAQ,CAAC,EAAE,IAAK,SAAS,QAAQ,QAAQ,CAAC,EAAE;AAAA,UACjE,aAAAA,QAAM,MAAM,IAAK,QAAQ,OAAO,EAAE;AAAA,UAClC,aAAAA,QAAM,KAAK,IAAK,QAAQ,MAAM,EAAE;AAAA,QAClC;AAAA,MACF;AAAA,IACF;AAAA,EACF;AACF;AAEO,MAAM,cAAc,OAAO,EAAE,IAAI,MAAkB;AACxD,QAAM,gBAAY,2BAAe,EAAE,KAAK,CAACC,eAAcA,WAAU,SAAS,GAAG;AAC7E,MAAI,CAAC,WAAW;AACd,YAAQ,MAAM,aAAAD,QAAM,IAAI,6BAA6B,aAAAA,QAAM,QAAQ,GAAG,CAAC,GAAG,CAAC;AAC3E,YAAQ,KAAK,CAAC;AAAA,EAChB;AAEA,QAAM,SAAS,IAAI,qBAAO,EAAE,OAAO,KAAK,CAAC;AAEzC,QAAM,cAAc,MAAM,OAAO,UAAU,UAAU,QAAQ;AAE7D,eAAa,WAAW;AAExB,QAAM,aAAa,YAAY,OAAO,CAAC,MAAM,eAAe,OAAO,WAAW,YAAY,CAAC;AAE3F,SAAO;AACT;AAEO,MAAM,UAAU,YAAY;AACjC,QAAM,SAAS,IAAI,qBAAO,EAAE,OAAO,KAAK,CAAC;AAEzC,QAAM,cAAc,MAAM,OAAO,UAAU,UAAU;AAErD,eAAa,WAAW;AAExB,QAAM,aAAa,YAAY,OAAO,CAAC,MAAM,eAAe,OAAO,WAAW,YAAY,CAAC;AAE3F,SAAO;AACT;AAEO,MAAM,OAAO,OAAO,EAAE,IAAI,IAAgB,CAAC,MAAM;AACtD,SAAO,MAAM,MAAM,YAAY,EAAE,IAAI,CAAC,QAAI,qBAAS,sBAAsB,CAAC,CAAC,QAAQ,CAAC,UAAU,KAAK,SAAS,CAAC,CAAC,CAAC;AACjH;","names":["chalk","workspace"]}
@@ -4,19 +4,19 @@ import { runSteps, yarnWorkspaces } from "../lib";
4
4
  const dumpMessages = (lintResults) => {
5
5
  const colors = ["white", "yellow", "red"];
6
6
  const severity = ["none", "warning", "error"];
7
- lintResults.forEach((lintResult) => {
7
+ for (const lintResult of lintResults) {
8
8
  if (lintResult.messages.length > 0) {
9
9
  console.log(chalk.gray(`${lintResult.filePath}`));
10
- lintResult.messages.forEach((message) => {
10
+ for (const message of lintResult.messages) {
11
11
  console.log(
12
12
  chalk.gray(` ${message.line}:${message.column}`),
13
13
  chalk[colors[message.severity]](` ${severity[message.severity]}`),
14
14
  chalk.white(` ${message.message}`),
15
15
  chalk.gray(` ${message.ruleId}`)
16
16
  );
17
- });
17
+ }
18
18
  }
19
- });
19
+ }
20
20
  };
21
21
  const lintPackage = async ({ pkg }) => {
22
22
  const workspace = yarnWorkspaces().find((workspace2) => workspace2.name === pkg);
@@ -1 +1 @@
1
- {"version":3,"sources":["../../src/actions/lint.ts"],"sourcesContent":["import chalk from 'chalk'\nimport { ESLint } from 'eslint'\n\nimport { runSteps, yarnWorkspaces } from '../lib'\n\nexport interface LintParams {\n pkg?: string\n verbose?: boolean\n}\n\nexport interface LintPackageParams {\n pkg: string\n verbose?: boolean\n}\n\nconst dumpMessages = (lintResults: ESLint.LintResult[]) => {\n const colors: ('white' | 'red' | 'yellow')[] = ['white', 'yellow', 'red']\n const severity: string[] = ['none', 'warning', 'error']\n\n lintResults.forEach((lintResult) => {\n if (lintResult.messages.length > 0) {\n console.log(chalk.gray(`${lintResult.filePath}`))\n lintResult.messages.forEach((message) => {\n console.log(\n chalk.gray(`\\t${message.line}:${message.column}`),\n chalk[colors[message.severity]](`\\t${severity[message.severity]}`),\n chalk.white(`\\t${message.message}`),\n chalk.gray(`\\t${message.ruleId}`),\n )\n })\n }\n })\n}\n\nexport const lintPackage = async ({ pkg }: LintParams) => {\n const workspace = yarnWorkspaces().find((workspace) => workspace.name === pkg)\n if (!workspace) {\n console.error(chalk.red(`Unable to locate package [${chalk.magenta(pkg)}]`))\n process.exit(1)\n }\n\n const engine = new ESLint({ cache: true })\n\n const lintResults = await engine.lintFiles(workspace.location)\n\n dumpMessages(lintResults)\n\n const errorCount = lintResults.reduce((prev, lintResult) => prev + lintResult.errorCount, 0)\n\n return errorCount\n}\n\nexport const lintAll = async () => {\n const engine = new ESLint({ cache: true })\n\n const lintResults = await engine.lintFiles('./**/*.*')\n\n dumpMessages(lintResults)\n\n const errorCount = lintResults.reduce((prev, lintResult) => prev + lintResult.errorCount, 0)\n\n return errorCount\n}\n\nexport const lint = async ({ pkg }: LintParams = {}) => {\n return pkg ? await lintPackage({ pkg }) : runSteps('Lint-Caching [All]', [['yarn', ['eslint', '.', '--cache']]])\n}\n"],"mappings":"AAAA,OAAO,WAAW;AAClB,SAAS,cAAc;AAEvB,SAAS,UAAU,sBAAsB;AAYzC,MAAM,eAAe,CAAC,gBAAqC;AACzD,QAAM,SAAyC,CAAC,SAAS,UA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AE3F,SAAO;AACT;AAEO,MAAM,OAAO,OAAO,EAAE,IAAI,IAAgB,CAAC,MAAM;AACtD,SAAO,MAAM,MAAM,YAAY,EAAE,IAAI,CAAC,IAAI,SAAS,sBAAsB,CAAC,CAAC,QAAQ,CAAC,UAAU,KAAK,SAAS,CAAC,CAAC,CAAC;AACjH;","names":["workspace"]}
1
+ {"version":3,"sources":["../../src/actions/lint.ts"],"sourcesContent":["import chalk from 'chalk'\nimport { ESLint } from 'eslint'\n\nimport { runSteps, yarnWorkspaces } from '../lib'\n\nexport interface LintParams {\n pkg?: string\n verbose?: boolean\n}\n\nexport interface LintPackageParams {\n pkg: string\n verbose?: boolean\n}\n\nconst dumpMessages = (lintResults: ESLint.LintResult[]) => {\n const colors: ('white' | 'red' | 'yellow')[] = ['white', 'yellow', 'red']\n const severity: string[] = ['none', 'warning', 'error']\n\n for (const lintResult of lintResults) {\n if (lintResult.messages.length > 0) {\n console.log(chalk.gray(`${lintResult.filePath}`))\n for (const message of lintResult.messages) {\n console.log(\n chalk.gray(`\\t${message.line}:${message.column}`),\n chalk[colors[message.severity]](`\\t${severity[message.severity]}`),\n chalk.white(`\\t${message.message}`),\n chalk.gray(`\\t${message.ruleId}`),\n )\n }\n }\n }\n}\n\nexport const lintPackage = async ({ pkg }: LintParams) => {\n const workspace = yarnWorkspaces().find((workspace) => workspace.name === pkg)\n if (!workspace) {\n console.error(chalk.red(`Unable to locate package [${chalk.magenta(pkg)}]`))\n process.exit(1)\n }\n\n const engine = new ESLint({ cache: true })\n\n const lintResults = await engine.lintFiles(workspace.location)\n\n dumpMessages(lintResults)\n\n const errorCount = lintResults.reduce((prev, lintResult) => prev + lintResult.errorCount, 0)\n\n return errorCount\n}\n\nexport const lintAll = async () => {\n const engine = new ESLint({ cache: true })\n\n const lintResults = await engine.lintFiles('./**/*.*')\n\n dumpMessages(lintResults)\n\n const errorCount = lintResults.reduce((prev, lintResult) => prev + lintResult.errorCount, 0)\n\n return errorCount\n}\n\nexport const lint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ACT;AAEO,MAAM,UAAU,YAAY;AACjC,QAAM,SAAS,IAAI,OAAO,EAAE,OAAO,KAAK,CAAC;AAEzC,QAAM,cAAc,MAAM,OAAO,UAAU,UAAU;AAErD,eAAa,WAAW;AAExB,QAAM,aAAa,YAAY,OAAO,CAAC,MAAM,eAAe,OAAO,WAAW,YAAY,CAAC;AAE3F,SAAO;AACT;AAEO,MAAM,OAAO,OAAO,EAAE,IAAI,IAAgB,CAAC,MAAM;AACtD,SAAO,MAAM,MAAM,YAAY,EAAE,IAAI,CAAC,IAAI,SAAS,sBAAsB,CAAC,CAAC,QAAQ,CAAC,UAAU,KAAK,SAAS,CAAC,CAAC,CAAC;AACjH;","names":["workspace"]}
@@ -31,17 +31,17 @@ __export(clean_outputs_exports, {
31
31
  packageCleanOutputs: () => packageCleanOutputs
32
32
  });
33
33
  module.exports = __toCommonJS(clean_outputs_exports);
34
+ var import_node_fs = require("node:fs");
35
+ var import_node_path = __toESM(require("node:path"));
34
36
  var import_chalk = __toESM(require("chalk"));
35
- var import_fs = require("fs");
36
- var import_path = __toESM(require("path"));
37
37
  const packageCleanOutputs = () => {
38
38
  const pkg = process.env.INIT_CWD ?? ".";
39
39
  const pkgName = process.env.npm_package_name;
40
40
  console.log(import_chalk.default.green(`Cleaning Outputs [${pkgName}]`));
41
- const dist = import_path.default.join(pkg, "dist");
42
- (0, import_fs.rmSync)(dist, { force: true, recursive: true });
43
- const build = import_path.default.join(pkg, "build");
44
- (0, import_fs.rmSync)(build, { force: true, recursive: true });
41
+ const dist = import_node_path.default.join(pkg, "dist");
42
+ (0, import_node_fs.rmSync)(dist, { force: true, recursive: true });
43
+ const build = import_node_path.default.join(pkg, "build");
44
+ (0, import_node_fs.rmSync)(build, { force: true, recursive: true });
45
45
  return 0;
46
46
  };
47
47
  // Annotate the CommonJS export names for ESM import in node:
@@ -1 +1 @@
1
- {"version":3,"sources":["../../../src/actions/package/clean-outputs.ts"],"sourcesContent":["import chalk from 'chalk'\nimport { rmSync } from 'fs'\nimport path from 'path'\n\nexport const packageCleanOutputs = () => {\n const pkg = process.env.INIT_CWD ?? '.'\n const pkgName = process.env.npm_package_name\n console.log(chalk.green(`Cleaning Outputs [${pkgName}]`))\n\n const dist = path.join(pkg, 'dist')\n rmSync(dist, { force: true, recursive: true })\n\n const build = path.join(pkg, 'build')\n rmSync(build, { force: true, recursive: true })\n return 0\n}\n"],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;;;;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA,mBAAkB;AAClB,gBAAuB;AACvB,kBAAiB;AAEV,MAAM,sBAAsB,MAAM;AACvC,QAAM,MAAM,QAAQ,IAAI,YAAY;AACpC,QAAM,UAAU,QAAQ,IAAI;AAC5B,UAAQ,IAAI,aAAAA,QAAM,MAAM,qBAAqB,OAAO,GAAG,CAAC;AAExD,QAAM,OAAO,YAAAC,QAAK,KAAK,KAAK,MAAM;AAClC,wBAAO,MAAM,EAAE,OAAO,MAAM,WAAW,KAAK,CAAC;AAE7C,QAAM,QAAQ,YAAAA,QAAK,KAAK,KAAK,OAAO;AACpC,wBAAO,OAAO,EAAE,OAAO,MAAM,WAAW,KAAK,CAAC;AAC9C,SAAO;AACT;","names":["chalk","path"]}
1
+ {"version":3,"sources":["../../../src/actions/package/clean-outputs.ts"],"sourcesContent":["import { rmSync } from 'node:fs'\nimport path from 'node:path'\n\nimport chalk from 'chalk'\n\nexport const packageCleanOutputs = () => {\n const pkg = process.env.INIT_CWD ?? '.'\n const pkgName = process.env.npm_package_name\n console.log(chalk.green(`Cleaning Outputs [${pkgName}]`))\n\n const dist = path.join(pkg, 'dist')\n rmSync(dist, { force: true, recursive: true })\n\n const build = path.join(pkg, 'build')\n rmSync(build, { force: true, recursive: true })\n return 0\n}\n"],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;;;;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA,qBAAuB;AACvB,uBAAiB;AAEjB,mBAAkB;AAEX,MAAM,sBAAsB,MAAM;AACvC,QAAM,MAAM,QAAQ,IAAI,YAAY;AACpC,QAAM,UAAU,QAAQ,IAAI;AAC5B,UAAQ,IAAI,aAAAA,QAAM,MAAM,qBAAqB,OAAO,GAAG,CAAC;AAExD,QAAM,OAAO,iBAAAC,QAAK,KAAK,KAAK,MAAM;AAClC,6BAAO,MAAM,EAAE,OAAO,MAAM,WAAW,KAAK,CAAC;AAE7C,QAAM,QAAQ,iBAAAA,QAAK,KAAK,KAAK,OAAO;AACpC,6BAAO,OAAO,EAAE,OAAO,MAAM,WAAW,KAAK,CAAC;AAC9C,SAAO;AACT;","names":["chalk","path"]}
@@ -1,6 +1,6 @@
1
+ import { rmSync } from "node:fs";
2
+ import path from "node:path";
1
3
  import chalk from "chalk";
2
- import { rmSync } from "fs";
3
- import path from "path";
4
4
  const packageCleanOutputs = () => {
5
5
  const pkg = process.env.INIT_CWD ?? ".";
6
6
  const pkgName = process.env.npm_package_name;
@@ -1 +1 @@
1
- {"version":3,"sources":["../../../src/actions/package/clean-outputs.ts"],"sourcesContent":["import chalk from 'chalk'\nimport { rmSync } from 'fs'\nimport path from 'path'\n\nexport const packageCleanOutputs = () => {\n const pkg = process.env.INIT_CWD ?? '.'\n const pkgName = process.env.npm_package_name\n console.log(chalk.green(`Cleaning Outputs [${pkgName}]`))\n\n const dist = path.join(pkg, 'dist')\n rmSync(dist, { force: true, recursive: true })\n\n const build = path.join(pkg, 'build')\n rmSync(build, { force: true, recursive: true })\n return 0\n}\n"],"mappings":"AAAA,OAAO,WAAW;AAClB,SAAS,cAAc;AACvB,OAAO,UAAU;AAEV,MAAM,sBAAsB,MAAM;AACvC,QAAM,MAAM,QAAQ,IAAI,YAAY;AACpC,QAAM,UAAU,QAAQ,IAAI;AAC5B,UAAQ,IAAI,MAAM,MAAM,qBAAqB,OAAO,GAAG,CAAC;AAExD,QAAM,OAAO,KAAK,KAAK,KAAK,MAAM;AAClC,SAAO,MAAM,EAAE,OAAO,MAAM,WAAW,KAAK,CAAC;AAE7C,QAAM,QAAQ,KAAK,KAAK,KAAK,OAAO;AACpC,SAAO,OAAO,EAAE,OAAO,MAAM,WAAW,KAAK,CAAC;AAC9C,SAAO;AACT;","names":[]}
1
+ {"version":3,"sources":["../../../src/actions/package/clean-outputs.ts"],"sourcesContent":["import { rmSync } from 'node:fs'\nimport path from 'node:path'\n\nimport chalk from 'chalk'\n\nexport const packageCleanOutputs = () => {\n const pkg = process.env.INIT_CWD ?? '.'\n const pkgName = process.env.npm_package_name\n console.log(chalk.green(`Cleaning Outputs [${pkgName}]`))\n\n const dist = path.join(pkg, 'dist')\n rmSync(dist, { force: true, recursive: true })\n\n const build = path.join(pkg, 'build')\n rmSync(build, { force: true, recursive: true })\n return 0\n}\n"],"mappings":"AAAA,SAAS,cAAc;AACvB,OAAO,UAAU;AAEjB,OAAO,WAAW;AAEX,MAAM,sBAAsB,MAAM;AACvC,QAAM,MAAM,QAAQ,IAAI,YAAY;AACpC,QAAM,UAAU,QAAQ,IAAI;AAC5B,UAAQ,IAAI,MAAM,MAAM,qBAAqB,OAAO,GAAG,CAAC;AAExD,QAAM,OAAO,KAAK,KAAK,KAAK,MAAM;AAClC,SAAO,MAAM,EAAE,OAAO,MAAM,WAAW,KAAK,CAAC;AAE7C,QAAM,QAAQ,KAAK,KAAK,KAAK,OAAO;AACpC,SAAO,OAAO,EAAE,OAAO,MAAM,WAAW,KAAK,CAAC;AAC9C,SAAO;AACT;","names":[]}
@@ -31,16 +31,16 @@ __export(clean_typescript_exports, {
31
31
  packageCleanTypescript: () => packageCleanTypescript
32
32
  });
33
33
  module.exports = __toCommonJS(clean_typescript_exports);
34
+ var import_node_path = __toESM(require("node:path"));
34
35
  var import_chalk = __toESM(require("chalk"));
35
- var import_path = __toESM(require("path"));
36
36
  var import_rimraf = require("rimraf");
37
37
  const packageCleanTypescript = () => {
38
38
  const pkg = process.env.INIT_CWD ?? ".";
39
39
  const pkgName = process.env.npm_package_name;
40
40
  console.log(import_chalk.default.green(`Cleaning Typescript [${pkgName}]`));
41
- const buildInfo = import_path.default.join(pkg, "*.tsbuildinfo");
41
+ const buildInfo = import_node_path.default.join(pkg, "*.tsbuildinfo");
42
42
  (0, import_rimraf.rimrafSync)(buildInfo, { glob: true });
43
- const tsConfig = import_path.default.join(pkg, ".tsconfig.*");
43
+ const tsConfig = import_node_path.default.join(pkg, ".tsconfig.*");
44
44
  (0, import_rimraf.rimrafSync)(tsConfig, { glob: true });
45
45
  return 0;
46
46
  };
@@ -1 +1 @@
1
- {"version":3,"sources":["../../../src/actions/package/clean-typescript.ts"],"sourcesContent":["import chalk from 'chalk'\nimport path from 'path'\nimport { rimrafSync } from 'rimraf'\n\nexport const packageCleanTypescript = () => {\n const pkg = process.env.INIT_CWD ?? '.'\n const pkgName = process.env.npm_package_name\n console.log(chalk.green(`Cleaning Typescript [${pkgName}]`))\n\n const buildInfo = path.join(pkg, '*.tsbuildinfo')\n rimrafSync(buildInfo, { glob: true })\n\n const tsConfig = path.join(pkg, '.tsconfig.*')\n rimrafSync(tsConfig, { glob: true })\n\n return 0\n}\n"],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;;;;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA,mBAAkB;AAClB,kBAAiB;AACjB,oBAA2B;AAEpB,MAAM,yBAAyB,MAAM;AAC1C,QAAM,MAAM,QAAQ,IAAI,YAAY;AACpC,QAAM,UAAU,QAAQ,IAAI;AAC5B,UAAQ,IAAI,aAAAA,QAAM,MAAM,wBAAwB,OAAO,GAAG,CAAC;AAE3D,QAAM,YAAY,YAAAC,QAAK,KAAK,KAAK,eAAe;AAChD,gCAAW,WAAW,EAAE,MAAM,KAAK,CAAC;AAEpC,QAAM,WAAW,YAAAA,QAAK,KAAK,KAAK,aAAa;AAC7C,gCAAW,UAAU,EAAE,MAAM,KAAK,CAAC;AAEnC,SAAO;AACT;","names":["chalk","path"]}
1
+ {"version":3,"sources":["../../../src/actions/package/clean-typescript.ts"],"sourcesContent":["import path from 'node:path'\n\nimport chalk from 'chalk'\nimport { rimrafSync } from 'rimraf'\n\nexport const packageCleanTypescript = () => {\n const pkg = process.env.INIT_CWD ?? '.'\n const pkgName = process.env.npm_package_name\n console.log(chalk.green(`Cleaning Typescript [${pkgName}]`))\n\n const buildInfo = path.join(pkg, '*.tsbuildinfo')\n rimrafSync(buildInfo, { glob: true })\n\n const tsConfig = path.join(pkg, '.tsconfig.*')\n rimrafSync(tsConfig, { glob: true })\n\n return 0\n}\n"],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;;;;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA,uBAAiB;AAEjB,mBAAkB;AAClB,oBAA2B;AAEpB,MAAM,yBAAyB,MAAM;AAC1C,QAAM,MAAM,QAAQ,IAAI,YAAY;AACpC,QAAM,UAAU,QAAQ,IAAI;AAC5B,UAAQ,IAAI,aAAAA,QAAM,MAAM,wBAAwB,OAAO,GAAG,CAAC;AAE3D,QAAM,YAAY,iBAAAC,QAAK,KAAK,KAAK,eAAe;AAChD,gCAAW,WAAW,EAAE,MAAM,KAAK,CAAC;AAEpC,QAAM,WAAW,iBAAAA,QAAK,KAAK,KAAK,aAAa;AAC7C,gCAAW,UAAU,EAAE,MAAM,KAAK,CAAC;AAEnC,SAAO;AACT;","names":["chalk","path"]}
@@ -1,5 +1,5 @@
1
+ import path from "node:path";
1
2
  import chalk from "chalk";
2
- import path from "path";
3
3
  import { rimrafSync } from "rimraf";
4
4
  const packageCleanTypescript = () => {
5
5
  const pkg = process.env.INIT_CWD ?? ".";
@@ -1 +1 @@
1
- {"version":3,"sources":["../../../src/actions/package/clean-typescript.ts"],"sourcesContent":["import chalk from 'chalk'\nimport path from 'path'\nimport { rimrafSync } from 'rimraf'\n\nexport const packageCleanTypescript = () => {\n const pkg = process.env.INIT_CWD ?? '.'\n const pkgName = process.env.npm_package_name\n console.log(chalk.green(`Cleaning Typescript [${pkgName}]`))\n\n const buildInfo = path.join(pkg, '*.tsbuildinfo')\n rimrafSync(buildInfo, { glob: true })\n\n const tsConfig = path.join(pkg, '.tsconfig.*')\n rimrafSync(tsConfig, { glob: true })\n\n return 0\n}\n"],"mappings":"AAAA,OAAO,WAAW;AAClB,OAAO,UAAU;AACjB,SAAS,kBAAkB;AAEpB,MAAM,yBAAyB,MAAM;AAC1C,QAAM,MAAM,QAAQ,IAAI,YAAY;AACpC,QAAM,UAAU,QAAQ,IAAI;AAC5B,UAAQ,IAAI,MAAM,MAAM,wBAAwB,OAAO,GAAG,CAAC;AAE3D,QAAM,YAAY,KAAK,KAAK,KAAK,eAAe;AAChD,aAAW,WAAW,EAAE,MAAM,KAAK,CAAC;AAEpC,QAAM,WAAW,KAAK,KAAK,KAAK,aAAa;AAC7C,aAAW,UAAU,EAAE,MAAM,KAAK,CAAC;AAEnC,SAAO;AACT;","names":[]}
1
+ {"version":3,"sources":["../../../src/actions/package/clean-typescript.ts"],"sourcesContent":["import path from 'node:path'\n\nimport chalk from 'chalk'\nimport { rimrafSync } from 'rimraf'\n\nexport const packageCleanTypescript = () => {\n const pkg = process.env.INIT_CWD ?? '.'\n const pkgName = process.env.npm_package_name\n console.log(chalk.green(`Cleaning Typescript [${pkgName}]`))\n\n const buildInfo = path.join(pkg, '*.tsbuildinfo')\n rimrafSync(buildInfo, { glob: true })\n\n const tsConfig = path.join(pkg, '.tsconfig.*')\n rimrafSync(tsConfig, { glob: true })\n\n return 0\n}\n"],"mappings":"AAAA,OAAO,UAAU;AAEjB,OAAO,WAAW;AAClB,SAAS,kBAAkB;AAEpB,MAAM,yBAAyB,MAAM;AAC1C,QAAM,MAAM,QAAQ,IAAI,YAAY;AACpC,QAAM,UAAU,QAAQ,IAAI;AAC5B,UAAQ,IAAI,MAAM,MAAM,wBAAwB,OAAO,GAAG,CAAC;AAE3D,QAAM,YAAY,KAAK,KAAK,KAAK,eAAe;AAChD,aAAW,WAAW,EAAE,MAAM,KAAK,CAAC;AAEpC,QAAM,WAAW,KAAK,KAAK,KAAK,aAAa;AAC7C,aAAW,UAAU,EAAE,MAAM,KAAK,CAAC;AAEnC,SAAO;AACT;","names":[]}
@@ -24,19 +24,21 @@ module.exports = __toCommonJS(buildEntries_exports);
24
24
  var import_inputs = require("./inputs");
25
25
  const buildEntries = (folder, entryMode, verbose = false) => {
26
26
  switch (entryMode) {
27
- case "platform":
27
+ case "platform": {
28
28
  if (verbose)
29
29
  console.log("buildEntries [platform]");
30
30
  return [`${folder}/index-node.ts`, `${folder}/index-browser.ts`];
31
- case "all":
31
+ }
32
+ case "all": {
32
33
  if (verbose)
33
34
  console.log("buildEntries [all]");
34
35
  return (0, import_inputs.getAllInputs2)(folder).filter((entry) => !entry.includes(".spec.") && !entry.includes(".story."));
35
- case "single":
36
- default:
36
+ }
37
+ default: {
37
38
  if (verbose)
38
39
  console.log("buildEntries [single]");
39
40
  return [`${folder}/index.ts`];
41
+ }
40
42
  }
41
43
  };
42
44
  // Annotate the CommonJS export names for ESM import in node:
@@ -1 +1 @@
1
- {"version":3,"sources":["../../../../src/actions/package/compile/buildEntries.ts"],"sourcesContent":["import { getAllInputs2 } from './inputs'\nimport { EntryMode } from './XyConfig'\n\nexport const buildEntries = (folder: string, entryMode?: EntryMode, verbose = false) => {\n switch (entryMode) {\n case 'platform':\n if (verbose) console.log('buildEntries [platform]')\n return [`${folder}/index-node.ts`, `${folder}/index-browser.ts`]\n case 'all':\n if (verbose) console.log('buildEntries [all]')\n return getAllInputs2(folder).filter((entry) => !entry.includes('.spec.') && !entry.includes('.story.'))\n case 'single':\n default:\n if (verbose) console.log('buildEntries [single]')\n return [`${folder}/index.ts`]\n }\n}\n"],"mappings":";;;;;;;;;;;;;;;;;;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA,oBAA8B;AAGvB,MAAM,eAAe,CAAC,QAAgB,WAAuB,UAAU,UAAU;AACtF,UAAQ,WAAW;AAAA,IACjB,KAAK;AACH,UAAI;AAAS,gBAAQ,IAAI,yBAAyB;AAClD,aAAO,CAAC,GAAG,MAAM,kBAAkB,GAAG,MAAM,mBAAmB;AAAA,IACjE,KAAK;AACH,UAAI;AAAS,gBAAQ,IAAI,oBAAoB;AAC7C,iBAAO,6BAAc,MAAM,EAAE,OAAO,CAAC,UAAU,CAAC,MAAM,SAAS,QAAQ,KAAK,CAAC,MAAM,SAAS,SAAS,CAAC;AAAA,IACxG,KAAK;AAAA,IACL;AACE,UAAI;AAAS,gBAAQ,IAAI,uBAAuB;AAChD,aAAO,CAAC,GAAG,MAAM,WAAW;AAAA,EAChC;AACF;","names":[]}
1
+ {"version":3,"sources":["../../../../src/actions/package/compile/buildEntries.ts"],"sourcesContent":["import { getAllInputs2 } from './inputs'\nimport { EntryMode } from './XyConfig'\n\nexport const buildEntries = (folder: string, entryMode?: EntryMode, verbose = false) => {\n switch (entryMode) {\n case 'platform': {\n if (verbose) console.log('buildEntries [platform]')\n return [`${folder}/index-node.ts`, `${folder}/index-browser.ts`]\n }\n case 'all': {\n if (verbose) console.log('buildEntries [all]')\n return getAllInputs2(folder).filter((entry) => !entry.includes('.spec.') && !entry.includes('.story.'))\n }\n default: {\n if (verbose) console.log('buildEntries [single]')\n return [`${folder}/index.ts`]\n }\n }\n}\n"],"mappings":";;;;;;;;;;;;;;;;;;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA,oBAA8B;AAGvB,MAAM,eAAe,CAAC,QAAgB,WAAuB,UAAU,UAAU;AACtF,UAAQ,WAAW;AAAA,IACjB,KAAK,YAAY;AACf,UAAI;AAAS,gBAAQ,IAAI,yBAAyB;AAClD,aAAO,CAAC,GAAG,MAAM,kBAAkB,GAAG,MAAM,mBAAmB;AAAA,IACjE;AAAA,IACA,KAAK,OAAO;AACV,UAAI;AAAS,gBAAQ,IAAI,oBAAoB;AAC7C,iBAAO,6BAAc,MAAM,EAAE,OAAO,CAAC,UAAU,CAAC,MAAM,SAAS,QAAQ,KAAK,CAAC,MAAM,SAAS,SAAS,CAAC;AAAA,IACxG;AAAA,IACA,SAAS;AACP,UAAI;AAAS,gBAAQ,IAAI,uBAAuB;AAChD,aAAO,CAAC,GAAG,MAAM,WAAW;AAAA,IAC9B;AAAA,EACF;AACF;","names":[]}
@@ -1,19 +1,21 @@
1
1
  import { getAllInputs2 } from "./inputs";
2
2
  const buildEntries = (folder, entryMode, verbose = false) => {
3
3
  switch (entryMode) {
4
- case "platform":
4
+ case "platform": {
5
5
  if (verbose)
6
6
  console.log("buildEntries [platform]");
7
7
  return [`${folder}/index-node.ts`, `${folder}/index-browser.ts`];
8
- case "all":
8
+ }
9
+ case "all": {
9
10
  if (verbose)
10
11
  console.log("buildEntries [all]");
11
12
  return getAllInputs2(folder).filter((entry) => !entry.includes(".spec.") && !entry.includes(".story."));
12
- case "single":
13
- default:
13
+ }
14
+ default: {
14
15
  if (verbose)
15
16
  console.log("buildEntries [single]");
16
17
  return [`${folder}/index.ts`];
18
+ }
17
19
  }
18
20
  };
19
21
  export {
@@ -1 +1 @@
1
- {"version":3,"sources":["../../../../src/actions/package/compile/buildEntries.ts"],"sourcesContent":["import { getAllInputs2 } from './inputs'\nimport { EntryMode } from './XyConfig'\n\nexport const buildEntries = (folder: string, entryMode?: EntryMode, verbose = false) => {\n switch (entryMode) {\n case 'platform':\n if (verbose) console.log('buildEntries [platform]')\n return [`${folder}/index-node.ts`, `${folder}/index-browser.ts`]\n case 'all':\n if (verbose) console.log('buildEntries [all]')\n return getAllInputs2(folder).filter((entry) => !entry.includes('.spec.') && !entry.includes('.story.'))\n case 'single':\n default:\n if (verbose) console.log('buildEntries [single]')\n return [`${folder}/index.ts`]\n }\n}\n"],"mappings":"AAAA,SAAS,qBAAqB;AAGvB,MAAM,eAAe,CAAC,QAAgB,WAAuB,UAAU,UAAU;AACtF,UAAQ,WAAW;AAAA,IACjB,KAAK;AACH,UAAI;AAAS,gBAAQ,IAAI,yBAAyB;AAClD,aAAO,CAAC,GAAG,MAAM,kBAAkB,GAAG,MAAM,mBAAmB;AAAA,IACjE,KAAK;AACH,UAAI;AAAS,gBAAQ,IAAI,oBAAoB;AAC7C,aAAO,cAAc,MAAM,EAAE,OAAO,CAAC,UAAU,CAAC,MAAM,SAAS,QAAQ,KAAK,CAAC,MAAM,SAAS,SAAS,CAAC;AAAA,IACxG,KAAK;AAAA,IACL;AACE,UAAI;AAAS,gBAAQ,IAAI,uBAAuB;AAChD,aAAO,CAAC,GAAG,MAAM,WAAW;AAAA,EAChC;AACF;","names":[]}
1
+ {"version":3,"sources":["../../../../src/actions/package/compile/buildEntries.ts"],"sourcesContent":["import { getAllInputs2 } from './inputs'\nimport { EntryMode } from './XyConfig'\n\nexport const buildEntries = (folder: string, entryMode?: EntryMode, verbose = false) => {\n switch (entryMode) {\n case 'platform': {\n if (verbose) console.log('buildEntries [platform]')\n return [`${folder}/index-node.ts`, `${folder}/index-browser.ts`]\n }\n case 'all': {\n if (verbose) console.log('buildEntries [all]')\n return getAllInputs2(folder).filter((entry) => !entry.includes('.spec.') && !entry.includes('.story.'))\n }\n default: {\n if (verbose) console.log('buildEntries [single]')\n return [`${folder}/index.ts`]\n }\n }\n}\n"],"mappings":"AAAA,SAAS,qBAAqB;AAGvB,MAAM,eAAe,CAAC,QAAgB,WAAuB,UAAU,UAAU;AACtF,UAAQ,WAAW;AAAA,IACjB,KAAK,YAAY;AACf,UAAI;AAAS,gBAAQ,IAAI,yBAAyB;AAClD,aAAO,CAAC,GAAG,MAAM,kBAAkB,GAAG,MAAM,mBAAmB;AAAA,IACjE;AAAA,IACA,KAAK,OAAO;AACV,UAAI;AAAS,gBAAQ,IAAI,oBAAoB;AAC7C,aAAO,cAAc,MAAM,EAAE,OAAO,CAAC,UAAU,CAAC,MAAM,SAAS,QAAQ,KAAK,CAAC,MAAM,SAAS,SAAS,CAAC;AAAA,IACxG;AAAA,IACA,SAAS;AACP,UAAI;AAAS,gBAAQ,IAAI,uBAAuB;AAChD,aAAO,CAAC,GAAG,MAAM,WAAW;AAAA,IAC9B;AAAA,EACF;AACF;","names":[]}
@@ -21,8 +21,8 @@ __export(copyTypeFiles_exports, {
21
21
  copyTypeFiles: () => copyTypeFiles
22
22
  });
23
23
  module.exports = __toCommonJS(copyTypeFiles_exports);
24
+ var import_promises = require("node:fs/promises");
24
25
  var import_async_mutex = require("async-mutex");
25
- var import_promises = require("fs/promises");
26
26
  const copyFileMutex = new import_async_mutex.Mutex();
27
27
  const getDistTypeFiles = async (compilerOptions) => {
28
28
  const outDir = compilerOptions.outDir ?? "dist";
@@ -1 +1 @@
1
- {"version":3,"sources":["../../../../src/actions/package/compile/copyTypeFiles.ts"],"sourcesContent":["import { Mutex } from 'async-mutex'\nimport { copyFile, readdir } from 'fs/promises'\nimport { TsConfigCompilerOptions } from 'tsc-prog'\n\nconst copyFileMutex = new Mutex()\n\nconst getDistTypeFiles = async (compilerOptions: TsConfigCompilerOptions) => {\n const outDir = compilerOptions.outDir ?? 'dist'\n return (await readdir(outDir, { recursive: true })).filter((file) => file.endsWith('d.ts')).map((file) => `${outDir}/${file}`)\n}\n\nconst getDistTypeMapFiles = async (compilerOptions: TsConfigCompilerOptions) => {\n const outDir = compilerOptions.outDir ?? 'dist'\n return (await readdir(outDir, { recursive: true })).filter((file) => file.endsWith('d.ts.map')).map((file) => `${outDir}/${file}`)\n}\n\nexport const copyTypeFiles = async (compilerOptions: TsConfigCompilerOptions) => {\n //using a mutex since sometimes two compiles are running at once and cause a lock on windows\n await copyFileMutex.runExclusive(async () => {\n //hybrid packages want two copies of the types\n const distTypeFiles = await getDistTypeFiles(compilerOptions)\n await Promise.all(\n distTypeFiles.map(async (file) => {\n await copyFile(file, file.replace('d.ts', 'd.mts'))\n await copyFile(file, file.replace('d.ts', 'd.cts'))\n }),\n )\n\n const distTypeMapFiles = await getDistTypeMapFiles(compilerOptions)\n await Promise.all(\n distTypeMapFiles.map(async (file) => {\n await copyFile(file, file.replace('d.ts.map', 'd.mts.map'))\n await copyFile(file, file.replace('d.ts.map', 'd.cts.map'))\n }),\n )\n })\n}\n"],"mappings":";;;;;;;;;;;;;;;;;;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA,yBAAsB;AACtB,sBAAkC;AAGlC,MAAM,gBAAgB,IAAI,yBAAM;AAEhC,MAAM,mBAAmB,OAAO,oBAA6C;AAC3E,QAAM,SAAS,gBAAgB,UAAU;AACzC,UAAQ,UAAM,yBAAQ,QAAQ,EAAE,WAAW,KAAK,CAAC,GAAG,OAAO,CAAC,SAAS,KAAK,SAAS,MAAM,CAAC,EAAE,IAAI,CAAC,SAAS,GAAG,MAAM,IAAI,IAAI,EAAE;AAC/H;AAEA,MAAM,sBAAsB,OAAO,oBAA6C;AAC9E,QAAM,SAAS,gBAAgB,UAAU;AACzC,UAAQ,UAAM,yBAAQ,QAAQ,EAAE,WAAW,KAAK,CAAC,GAAG,OAAO,CAAC,SAAS,KAAK,SAAS,UAAU,CAAC,EAAE,IAAI,CAAC,SAAS,GAAG,MAAM,IAAI,IAAI,EAAE;AACnI;AAEO,MAAM,gBAAgB,OAAO,oBAA6C;AAE/E,QAAM,cAAc,aAAa,YAAY;AAE3C,UAAM,gBAAgB,MAAM,iBAAiB,eAAe;AAC5D,UAAM,QAAQ;AAAA,MACZ,cAAc,IAAI,OAAO,SAAS;AAChC,kBAAM,0BAAS,MAAM,KAAK,QAAQ,QAAQ,OAAO,CAAC;AAClD,kBAAM,0BAAS,MAAM,KAAK,QAAQ,QAAQ,OAAO,CAAC;AAAA,MACpD,CAAC;AAAA,IACH;AAEA,UAAM,mBAAmB,MAAM,oBAAoB,eAAe;AAClE,UAAM,QAAQ;AAAA,MACZ,iBAAiB,IAAI,OAAO,SAAS;AACnC,kBAAM,0BAAS,MAAM,KAAK,QAAQ,YAAY,WAAW,CAAC;AAC1D,kBAAM,0BAAS,MAAM,KAAK,QAAQ,YAAY,WAAW,CAAC;AAAA,MAC5D,CAAC;AAAA,IACH;AAAA,EACF,CAAC;AACH;","names":[]}
1
+ {"version":3,"sources":["../../../../src/actions/package/compile/copyTypeFiles.ts"],"sourcesContent":["import { copyFile, readdir } from 'node:fs/promises'\n\nimport { Mutex } from 'async-mutex'\nimport { TsConfigCompilerOptions } from 'tsc-prog'\n\nconst copyFileMutex = new Mutex()\n\nconst getDistTypeFiles = async (compilerOptions: TsConfigCompilerOptions) => {\n const outDir = compilerOptions.outDir ?? 'dist'\n return (await readdir(outDir, { recursive: true })).filter((file) => file.endsWith('d.ts')).map((file) => `${outDir}/${file}`)\n}\n\nconst getDistTypeMapFiles = async (compilerOptions: TsConfigCompilerOptions) => {\n const outDir = compilerOptions.outDir ?? 'dist'\n return (await readdir(outDir, { recursive: true })).filter((file) => file.endsWith('d.ts.map')).map((file) => `${outDir}/${file}`)\n}\n\nexport const copyTypeFiles = async (compilerOptions: TsConfigCompilerOptions) => {\n //using a mutex since sometimes two compiles are running at once and cause a lock on windows\n await copyFileMutex.runExclusive(async () => {\n //hybrid packages want two copies of the types\n const distTypeFiles = await getDistTypeFiles(compilerOptions)\n await Promise.all(\n distTypeFiles.map(async (file) => {\n await copyFile(file, file.replace('d.ts', 'd.mts'))\n await copyFile(file, file.replace('d.ts', 'd.cts'))\n }),\n )\n\n const distTypeMapFiles = await getDistTypeMapFiles(compilerOptions)\n await Promise.all(\n distTypeMapFiles.map(async (file) => {\n await copyFile(file, file.replace('d.ts.map', 'd.mts.map'))\n await copyFile(file, file.replace('d.ts.map', 'd.cts.map'))\n }),\n )\n })\n}\n"],"mappings":";;;;;;;;;;;;;;;;;;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA,sBAAkC;AAElC,yBAAsB;AAGtB,MAAM,gBAAgB,IAAI,yBAAM;AAEhC,MAAM,mBAAmB,OAAO,oBAA6C;AAC3E,QAAM,SAAS,gBAAgB,UAAU;AACzC,UAAQ,UAAM,yBAAQ,QAAQ,EAAE,WAAW,KAAK,CAAC,GAAG,OAAO,CAAC,SAAS,KAAK,SAAS,MAAM,CAAC,EAAE,IAAI,CAAC,SAAS,GAAG,MAAM,IAAI,IAAI,EAAE;AAC/H;AAEA,MAAM,sBAAsB,OAAO,oBAA6C;AAC9E,QAAM,SAAS,gBAAgB,UAAU;AACzC,UAAQ,UAAM,yBAAQ,QAAQ,EAAE,WAAW,KAAK,CAAC,GAAG,OAAO,CAAC,SAAS,KAAK,SAAS,UAAU,CAAC,EAAE,IAAI,CAAC,SAAS,GAAG,MAAM,IAAI,IAAI,EAAE;AACnI;AAEO,MAAM,gBAAgB,OAAO,oBAA6C;AAE/E,QAAM,cAAc,aAAa,YAAY;AAE3C,UAAM,gBAAgB,MAAM,iBAAiB,eAAe;AAC5D,UAAM,QAAQ;AAAA,MACZ,cAAc,IAAI,OAAO,SAAS;AAChC,kBAAM,0BAAS,MAAM,KAAK,QAAQ,QAAQ,OAAO,CAAC;AAClD,kBAAM,0BAAS,MAAM,KAAK,QAAQ,QAAQ,OAAO,CAAC;AAAA,MACpD,CAAC;AAAA,IACH;AAEA,UAAM,mBAAmB,MAAM,oBAAoB,eAAe;AAClE,UAAM,QAAQ;AAAA,MACZ,iBAAiB,IAAI,OAAO,SAAS;AACnC,kBAAM,0BAAS,MAAM,KAAK,QAAQ,YAAY,WAAW,CAAC;AAC1D,kBAAM,0BAAS,MAAM,KAAK,QAAQ,YAAY,WAAW,CAAC;AAAA,MAC5D,CAAC;AAAA,IACH;AAAA,EACF,CAAC;AACH;","names":[]}
@@ -1,5 +1,5 @@
1
+ import { copyFile, readdir } from "node:fs/promises";
1
2
  import { Mutex } from "async-mutex";
2
- import { copyFile, readdir } from "fs/promises";
3
3
  const copyFileMutex = new Mutex();
4
4
  const getDistTypeFiles = async (compilerOptions) => {
5
5
  const outDir = compilerOptions.outDir ?? "dist";
@@ -1 +1 @@
1
- {"version":3,"sources":["../../../../src/actions/package/compile/copyTypeFiles.ts"],"sourcesContent":["import { Mutex } from 'async-mutex'\nimport { copyFile, readdir } from 'fs/promises'\nimport { TsConfigCompilerOptions } from 'tsc-prog'\n\nconst copyFileMutex = new Mutex()\n\nconst getDistTypeFiles = async (compilerOptions: TsConfigCompilerOptions) => {\n const outDir = compilerOptions.outDir ?? 'dist'\n return (await readdir(outDir, { recursive: true })).filter((file) => file.endsWith('d.ts')).map((file) => `${outDir}/${file}`)\n}\n\nconst getDistTypeMapFiles = async (compilerOptions: TsConfigCompilerOptions) => {\n const outDir = compilerOptions.outDir ?? 'dist'\n return (await readdir(outDir, { recursive: true })).filter((file) => file.endsWith('d.ts.map')).map((file) => `${outDir}/${file}`)\n}\n\nexport const copyTypeFiles = async (compilerOptions: TsConfigCompilerOptions) => {\n //using a mutex since sometimes two compiles are running at once and cause a lock on windows\n await copyFileMutex.runExclusive(async () => {\n //hybrid packages want two copies of the types\n const distTypeFiles = await getDistTypeFiles(compilerOptions)\n await Promise.all(\n distTypeFiles.map(async (file) => {\n await copyFile(file, file.replace('d.ts', 'd.mts'))\n await copyFile(file, file.replace('d.ts', 'd.cts'))\n }),\n )\n\n const distTypeMapFiles = await getDistTypeMapFiles(compilerOptions)\n await Promise.all(\n distTypeMapFiles.map(async (file) => {\n await copyFile(file, file.replace('d.ts.map', 'd.mts.map'))\n await copyFile(file, file.replace('d.ts.map', 'd.cts.map'))\n }),\n )\n })\n}\n"],"mappings":"AAAA,SAAS,aAAa;AACtB,SAAS,UAAU,eAAe;AAGlC,MAAM,gBAAgB,IAAI,MAAM;AAEhC,MAAM,mBAAmB,OAAO,oBAA6C;AAC3E,QAAM,SAAS,gBAAgB,UAAU;AACzC,UAAQ,MAAM,QAAQ,QAAQ,EAAE,WAAW,KAAK,CAAC,GAAG,OAAO,CAAC,SAAS,KAAK,SAAS,MAAM,CAAC,EAAE,IAAI,CAAC,SAAS,GAAG,MAAM,IAAI,IAAI,EAAE;AAC/H;AAEA,MAAM,sBAAsB,OAAO,oBAA6C;AAC9E,QAAM,SAAS,gBAAgB,UAAU;AACzC,UAAQ,MAAM,QAAQ,QAAQ,EAAE,WAAW,KAAK,CAAC,GAAG,OAAO,CAAC,SAAS,KAAK,SAAS,UAAU,CAAC,EAAE,IAAI,CAAC,SAAS,GAAG,MAAM,IAAI,IAAI,EAAE;AACnI;AAEO,MAAM,gBAAgB,OAAO,oBAA6C;AAE/E,QAAM,cAAc,aAAa,YAAY;AAE3C,UAAM,gBAAgB,MAAM,iBAAiB,eAAe;AAC5D,UAAM,QAAQ;AAAA,MACZ,cAAc,IAAI,OAAO,SAAS;AAChC,cAAM,SAAS,MAAM,KAAK,QAAQ,QAAQ,OAAO,CAAC;AAClD,cAAM,SAAS,MAAM,KAAK,QAAQ,QAAQ,OAAO,CAAC;AAAA,MACpD,CAAC;AAAA,IACH;AAEA,UAAM,mBAAmB,MAAM,oBAAoB,eAAe;AAClE,UAAM,QAAQ;AAAA,MACZ,iBAAiB,IAAI,OAAO,SAAS;AACnC,cAAM,SAAS,MAAM,KAAK,QAAQ,YAAY,WAAW,CAAC;AAC1D,cAAM,SAAS,MAAM,KAAK,QAAQ,YAAY,WAAW,CAAC;AAAA,MAC5D,CAAC;AAAA,IACH;AAAA,EACF,CAAC;AACH;","names":[]}
1
+ {"version":3,"sources":["../../../../src/actions/package/compile/copyTypeFiles.ts"],"sourcesContent":["import { copyFile, readdir } from 'node:fs/promises'\n\nimport { Mutex } from 'async-mutex'\nimport { TsConfigCompilerOptions } from 'tsc-prog'\n\nconst copyFileMutex = new Mutex()\n\nconst getDistTypeFiles = async (compilerOptions: TsConfigCompilerOptions) => {\n const outDir = compilerOptions.outDir ?? 'dist'\n return (await readdir(outDir, { recursive: true })).filter((file) => file.endsWith('d.ts')).map((file) => `${outDir}/${file}`)\n}\n\nconst getDistTypeMapFiles = async (compilerOptions: TsConfigCompilerOptions) => {\n const outDir = compilerOptions.outDir ?? 'dist'\n return (await readdir(outDir, { recursive: true })).filter((file) => file.endsWith('d.ts.map')).map((file) => `${outDir}/${file}`)\n}\n\nexport const copyTypeFiles = async (compilerOptions: TsConfigCompilerOptions) => {\n //using a mutex since sometimes two compiles are running at once and cause a lock on windows\n await copyFileMutex.runExclusive(async () => {\n //hybrid packages want two copies of the types\n const distTypeFiles = await getDistTypeFiles(compilerOptions)\n await Promise.all(\n distTypeFiles.map(async (file) => {\n await copyFile(file, file.replace('d.ts', 'd.mts'))\n await copyFile(file, file.replace('d.ts', 'd.cts'))\n }),\n )\n\n const distTypeMapFiles = await getDistTypeMapFiles(compilerOptions)\n await Promise.all(\n distTypeMapFiles.map(async (file) => {\n await copyFile(file, file.replace('d.ts.map', 'd.mts.map'))\n await copyFile(file, file.replace('d.ts.map', 'd.cts.map'))\n }),\n )\n })\n}\n"],"mappings":"AAAA,SAAS,UAAU,eAAe;AAElC,SAAS,aAAa;AAGtB,MAAM,gBAAgB,IAAI,MAAM;AAEhC,MAAM,mBAAmB,OAAO,oBAA6C;AAC3E,QAAM,SAAS,gBAAgB,UAAU;AACzC,UAAQ,MAAM,QAAQ,QAAQ,EAAE,WAAW,KAAK,CAAC,GAAG,OAAO,CAAC,SAAS,KAAK,SAAS,MAAM,CAAC,EAAE,IAAI,CAAC,SAAS,GAAG,MAAM,IAAI,IAAI,EAAE;AAC/H;AAEA,MAAM,sBAAsB,OAAO,oBAA6C;AAC9E,QAAM,SAAS,gBAAgB,UAAU;AACzC,UAAQ,MAAM,QAAQ,QAAQ,EAAE,WAAW,KAAK,CAAC,GAAG,OAAO,CAAC,SAAS,KAAK,SAAS,UAAU,CAAC,EAAE,IAAI,CAAC,SAAS,GAAG,MAAM,IAAI,IAAI,EAAE;AACnI;AAEO,MAAM,gBAAgB,OAAO,oBAA6C;AAE/E,QAAM,cAAc,aAAa,YAAY;AAE3C,UAAM,gBAAgB,MAAM,iBAAiB,eAAe;AAC5D,UAAM,QAAQ;AAAA,MACZ,cAAc,IAAI,OAAO,SAAS;AAChC,cAAM,SAAS,MAAM,KAAK,QAAQ,QAAQ,OAAO,CAAC;AAClD,cAAM,SAAS,MAAM,KAAK,QAAQ,QAAQ,OAAO,CAAC;AAAA,MACpD,CAAC;AAAA,IACH;AAEA,UAAM,mBAAmB,MAAM,oBAAoB,eAAe;AAClE,UAAM,QAAQ;AAAA,MACZ,iBAAiB,IAAI,OAAO,SAAS;AACnC,cAAM,SAAS,MAAM,KAAK,QAAQ,YAAY,WAAW,CAAC;AAC1D,cAAM,SAAS,MAAM,KAAK,QAAQ,YAAY,WAAW,CAAC;AAAA,MAC5D,CAAC;AAAA,IACH;AAAA,EACF,CAAC;AACH;","names":[]}
@@ -43,7 +43,7 @@ const getCompilerOptionsJSONFollowExtends = (filename) => {
43
43
  opts = getCompilerOptionsJSONFollowExtends(requirePath);
44
44
  }
45
45
  if (config == null ? void 0 : config.error) {
46
- throw Error(`getCompilerOptionsJSONFollowExtends failed ${JSON.stringify((_a = config == null ? void 0 : config.error) == null ? void 0 : _a.messageText, null, 2)}`);
46
+ throw new Error(`getCompilerOptionsJSONFollowExtends failed ${JSON.stringify((_a = config == null ? void 0 : config.error) == null ? void 0 : _a.messageText, null, 2)}`);
47
47
  }
48
48
  return { ...opts, ...config.compilerOptions };
49
49
  };
@@ -1 +1 @@
1
- {"version":3,"sources":["../../../../src/actions/package/compile/getCompilerOptions.ts"],"sourcesContent":["// eslint-disable-next-line import/no-internal-modules\nimport merge from 'lodash/merge'\nimport { CompilerOptions, findConfigFile, readConfigFile, sys } from 'typescript'\n\nexport const getCompilerOptionsJSONFollowExtends = (filename: string): CompilerOptions => {\n let opts = {}\n const config = readConfigFile(filename, sys.readFile).config\n if (config.extends) {\n const requirePath = require.resolve(config.extends)\n opts = getCompilerOptionsJSONFollowExtends(requirePath)\n }\n if (config?.error) {\n throw Error(`getCompilerOptionsJSONFollowExtends failed ${JSON.stringify(config?.error?.messageText, null, 2)}`)\n }\n\n return { ...opts, ...config.compilerOptions }\n}\n\nexport const getCompilerOptions = (options?: CompilerOptions, tsconfig: string = 'tsconfig.json'): CompilerOptions => {\n const configFileName = findConfigFile('./', sys.fileExists, tsconfig)\n const configFileCompilerOptions = configFileName ? getCompilerOptionsJSONFollowExtends(configFileName) : undefined\n\n return merge({}, configFileCompilerOptions, options)\n}\n"],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;;;;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AACA,mBAAkB;AAClB,wBAAqE;AAE9D,MAAM,sCAAsC,CAAC,aAAsC;AAJ1F;AAKE,MAAI,OAAO,CAAC;AACZ,QAAM,aAAS,kCAAe,UAAU,sBAAI,QAAQ,EAAE;AACtD,MAAI,OAAO,SAAS;AAClB,UAAM,cAAc,QAAQ,QAAQ,OAAO,OAAO;AAClD,WAAO,oCAAoC,WAAW;AAAA,EACxD;AACA,MAAI,iCAAQ,OAAO;AACjB,UAAM,MAAM,8CAA8C,KAAK,WAAU,sCAAQ,UAAR,mBAAe,aAAa,MAAM,CAAC,CAAC,EAAE;AAAA,EACjH;AAEA,SAAO,EAAE,GAAG,MAAM,GAAG,OAAO,gBAAgB;AAC9C;AAEO,MAAM,qBAAqB,CAAC,SAA2B,WAAmB,oBAAqC;AACpH,QAAM,qBAAiB,kCAAe,MAAM,sBAAI,YAAY,QAAQ;AACpE,QAAM,4BAA4B,iBAAiB,oCAAoC,cAAc,IAAI;AAEzG,aAAO,aAAAA,SAAM,CAAC,GAAG,2BAA2B,OAAO;AACrD;","names":["merge"]}
1
+ {"version":3,"sources":["../../../../src/actions/package/compile/getCompilerOptions.ts"],"sourcesContent":["// eslint-disable-next-line import/no-internal-modules\nimport merge from 'lodash/merge'\nimport { CompilerOptions, findConfigFile, readConfigFile, sys } from 'typescript'\n\nexport const getCompilerOptionsJSONFollowExtends = (filename: string): CompilerOptions => {\n let opts = {}\n const config = readConfigFile(filename, sys.readFile).config\n if (config.extends) {\n const requirePath = require.resolve(config.extends)\n opts = getCompilerOptionsJSONFollowExtends(requirePath)\n }\n if (config?.error) {\n throw new Error(`getCompilerOptionsJSONFollowExtends failed ${JSON.stringify(config?.error?.messageText, null, 2)}`)\n }\n\n return { ...opts, ...config.compilerOptions }\n}\n\nexport const getCompilerOptions = (options?: CompilerOptions, tsconfig: string = 'tsconfig.json'): CompilerOptions => {\n const configFileName = findConfigFile('./', sys.fileExists, tsconfig)\n const configFileCompilerOptions = configFileName ? getCompilerOptionsJSONFollowExtends(configFileName) : undefined\n\n return merge({}, configFileCompilerOptions, options)\n}\n"],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;;;;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AACA,mBAAkB;AAClB,wBAAqE;AAE9D,MAAM,sCAAsC,CAAC,aAAsC;AAJ1F;AAKE,MAAI,OAAO,CAAC;AACZ,QAAM,aAAS,kCAAe,UAAU,sBAAI,QAAQ,EAAE;AACtD,MAAI,OAAO,SAAS;AAClB,UAAM,cAAc,QAAQ,QAAQ,OAAO,OAAO;AAClD,WAAO,oCAAoC,WAAW;AAAA,EACxD;AACA,MAAI,iCAAQ,OAAO;AACjB,UAAM,IAAI,MAAM,8CAA8C,KAAK,WAAU,sCAAQ,UAAR,mBAAe,aAAa,MAAM,CAAC,CAAC,EAAE;AAAA,EACrH;AAEA,SAAO,EAAE,GAAG,MAAM,GAAG,OAAO,gBAAgB;AAC9C;AAEO,MAAM,qBAAqB,CAAC,SAA2B,WAAmB,oBAAqC;AACpH,QAAM,qBAAiB,kCAAe,MAAM,sBAAI,YAAY,QAAQ;AACpE,QAAM,4BAA4B,iBAAiB,oCAAoC,cAAc,IAAI;AAEzG,aAAO,aAAAA,SAAM,CAAC,GAAG,2BAA2B,OAAO;AACrD;","names":["merge"]}
@@ -9,7 +9,7 @@ const getCompilerOptionsJSONFollowExtends = (filename) => {
9
9
  opts = getCompilerOptionsJSONFollowExtends(requirePath);
10
10
  }
11
11
  if (config == null ? void 0 : config.error) {
12
- throw Error(`getCompilerOptionsJSONFollowExtends failed ${JSON.stringify((_a = config == null ? void 0 : config.error) == null ? void 0 : _a.messageText, null, 2)}`);
12
+ throw new Error(`getCompilerOptionsJSONFollowExtends failed ${JSON.stringify((_a = config == null ? void 0 : config.error) == null ? void 0 : _a.messageText, null, 2)}`);
13
13
  }
14
14
  return { ...opts, ...config.compilerOptions };
15
15
  };
@@ -1 +1 @@
1
- {"version":3,"sources":["../../../../src/actions/package/compile/getCompilerOptions.ts"],"sourcesContent":["// eslint-disable-next-line import/no-internal-modules\nimport merge from 'lodash/merge'\nimport { CompilerOptions, findConfigFile, readConfigFile, sys } from 'typescript'\n\nexport const getCompilerOptionsJSONFollowExtends = (filename: string): CompilerOptions => {\n let opts = {}\n const config = readConfigFile(filename, sys.readFile).config\n if (config.extends) {\n const requirePath = require.resolve(config.extends)\n opts = getCompilerOptionsJSONFollowExtends(requirePath)\n }\n if (config?.error) {\n throw Error(`getCompilerOptionsJSONFollowExtends failed ${JSON.stringify(config?.error?.messageText, null, 2)}`)\n }\n\n return { ...opts, ...config.compilerOptions }\n}\n\nexport const getCompilerOptions = (options?: CompilerOptions, tsconfig: string = 'tsconfig.json'): CompilerOptions => {\n const configFileName = findConfigFile('./', sys.fileExists, tsconfig)\n const configFileCompilerOptions = configFileName ? getCompilerOptionsJSONFollowExtends(configFileName) : undefined\n\n return merge({}, configFileCompilerOptions, options)\n}\n"],"mappings":"AACA,OAAO,WAAW;AAClB,SAA0B,gBAAgB,gBAAgB,WAAW;AAE9D,MAAM,sCAAsC,CAAC,aAAsC;AAJ1F;AAKE,MAAI,OAAO,CAAC;AACZ,QAAM,SAAS,eAAe,UAAU,IAAI,QAAQ,EAAE;AACtD,MAAI,OAAO,SAAS;AAClB,UAAM,cAAc,QAAQ,QAAQ,OAAO,OAAO;AAClD,WAAO,oCAAoC,WAAW;AAAA,EACxD;AACA,MAAI,iCAAQ,OAAO;AACjB,UAAM,MAAM,8CAA8C,KAAK,WAAU,sCAAQ,UAAR,mBAAe,aAAa,MAAM,CAAC,CAAC,EAAE;AAAA,EACjH;AAEA,SAAO,EAAE,GAAG,MAAM,GAAG,OAAO,gBAAgB;AAC9C;AAEO,MAAM,qBAAqB,CAAC,SAA2B,WAAmB,oBAAqC;AACpH,QAAM,iBAAiB,eAAe,MAAM,IAAI,YAAY,QAAQ;AACpE,QAAM,4BAA4B,iBAAiB,oCAAoC,cAAc,IAAI;AAEzG,SAAO,MAAM,CAAC,GAAG,2BAA2B,OAAO;AACrD;","names":[]}
1
+ {"version":3,"sources":["../../../../src/actions/package/compile/getCompilerOptions.ts"],"sourcesContent":["// eslint-disable-next-line import/no-internal-modules\nimport merge from 'lodash/merge'\nimport { CompilerOptions, findConfigFile, readConfigFile, sys } from 'typescript'\n\nexport const getCompilerOptionsJSONFollowExtends = (filename: string): CompilerOptions => {\n let opts = {}\n const config = readConfigFile(filename, sys.readFile).config\n if (config.extends) {\n const requirePath = require.resolve(config.extends)\n opts = getCompilerOptionsJSONFollowExtends(requirePath)\n }\n if (config?.error) {\n throw new Error(`getCompilerOptionsJSONFollowExtends failed ${JSON.stringify(config?.error?.messageText, null, 2)}`)\n }\n\n return { ...opts, ...config.compilerOptions }\n}\n\nexport const getCompilerOptions = (options?: CompilerOptions, tsconfig: string = 'tsconfig.json'): CompilerOptions => {\n const configFileName = findConfigFile('./', sys.fileExists, tsconfig)\n const configFileCompilerOptions = configFileName ? getCompilerOptionsJSONFollowExtends(configFileName) : undefined\n\n return merge({}, configFileCompilerOptions, options)\n}\n"],"mappings":"AACA,OAAO,WAAW;AAClB,SAA0B,gBAAgB,gBAAgB,WAAW;AAE9D,MAAM,sCAAsC,CAAC,aAAsC;AAJ1F;AAKE,MAAI,OAAO,CAAC;AACZ,QAAM,SAAS,eAAe,UAAU,IAAI,QAAQ,EAAE;AACtD,MAAI,OAAO,SAAS;AAClB,UAAM,cAAc,QAAQ,QAAQ,OAAO,OAAO;AAClD,WAAO,oCAAoC,WAAW;AAAA,EACxD;AACA,MAAI,iCAAQ,OAAO;AACjB,UAAM,IAAI,MAAM,8CAA8C,KAAK,WAAU,sCAAQ,UAAR,mBAAe,aAAa,MAAM,CAAC,CAAC,EAAE;AAAA,EACrH;AAEA,SAAO,EAAE,GAAG,MAAM,GAAG,OAAO,gBAAgB;AAC9C;AAEO,MAAM,qBAAqB,CAAC,SAA2B,WAAmB,oBAAqC;AACpH,QAAM,iBAAiB,eAAe,MAAM,IAAI,YAAY,QAAQ;AACpE,QAAM,4BAA4B,iBAAiB,oCAAoC,cAAc,IAAI;AAEzG,SAAO,MAAM,CAAC,GAAG,2BAA2B,OAAO;AACrD;","names":[]}
@@ -24,7 +24,7 @@ __export(inputs_exports, {
24
24
  getInputs: () => getInputs
25
25
  });
26
26
  module.exports = __toCommonJS(inputs_exports);
27
- var import_promises = require("fs/promises");
27
+ var import_promises = require("node:fs/promises");
28
28
  var import_glob = require("glob");
29
29
  const getInputs = async (subDir) => {
30
30
  return (await (0, import_promises.readdir)(subDir ? `src/${subDir}` : "src", { recursive: false })).filter(
@@ -41,7 +41,7 @@ const getInputDirs = async (depth = 0) => {
41
41
  var _a;
42
42
  const pathParts = ((_a = file.path) == null ? void 0 : _a.split("/")) ?? [];
43
43
  pathParts.shift();
44
- if (pathParts.length) {
44
+ if (pathParts.length > 0) {
45
45
  const root = pathParts.join("/");
46
46
  return `${root}/${file.name}`;
47
47
  } else {
@@ -1 +1 @@
1
- {"version":3,"sources":["../../../../src/actions/package/compile/inputs.ts"],"sourcesContent":["import { readdir } from 'fs/promises'\nimport { glob } from 'glob'\n\nexport const getInputs = async (subDir?: string) => {\n return (await readdir(subDir ? `src/${subDir}` : 'src', { recursive: false }))\n .filter(\n (file) => (file.endsWith('.ts') || file.endsWith('.tsx')) && !file.endsWith('d.ts') && !file.includes('.spec.') && !file.includes('.stories.'),\n )\n .map((file) => (subDir ? `${subDir}/${file}` : file))\n}\n\nexport const getInputDirs = async (depth: number = 0) => {\n if (depth === 0) {\n return []\n }\n return [\n '.',\n ...(await readdir('src', { recursive: true, withFileTypes: true }))\n .filter((file) => file.isDirectory())\n .map((file) => {\n const pathParts = file.path?.split('/') ?? []\n pathParts.shift()\n if (pathParts.length) {\n const root = pathParts.join('/')\n return `${root}/${file.name}`\n } else {\n return file.name\n }\n }),\n ]\n}\n\nexport const getAllInputs = async (depth = 100) => {\n const dirs = await getInputDirs(depth)\n return (await Promise.all(dirs.map(async (dir) => await getInputs(dir)))).flat()\n}\n\nexport const getAllInputs2 = (folder: string) => {\n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GAAG,CAAC,CAAC,GAAG,KAAK;AACjF;AAEO,MAAM,gBAAgB,CAAC,WAAmB;AAE/C,SAAO,iBAAK,KAAK,GAAG,MAAM,WAAW,EAAE,QAAQ,CAAC,eAAe,kBAAkB,cAAc,GAAG,OAAO,KAAK,CAAC;AACjH;","names":[]}
1
+ {"version":3,"sources":["../../../../src/actions/package/compile/inputs.ts"],"sourcesContent":["import { readdir } from 'node:fs/promises'\n\nimport { glob } from 'glob'\n\nexport const getInputs = async (subDir?: string) => {\n return (await readdir(subDir ? `src/${subDir}` : 'src', { recursive: false }))\n .filter(\n (file) => (file.endsWith('.ts') || file.endsWith('.tsx')) && !file.endsWith('d.ts') && !file.includes('.spec.') && !file.includes('.stories.'),\n )\n .map((file) => (subDir ? `${subDir}/${file}` : file))\n}\n\nexport const getInputDirs = async (depth: number = 0) => {\n if (depth === 0) {\n return []\n }\n return [\n '.',\n ...(await readdir('src', { recursive: true, withFileTypes: true }))\n .filter((file) => file.isDirectory())\n .map((file) => {\n const pathParts = file.path?.split('/') ?? []\n pathParts.shift()\n if (pathParts.length > 0) {\n const root = pathParts.join('/')\n return `${root}/${file.name}`\n } else {\n return file.name\n }\n }),\n ]\n}\n\nexport const getAllInputs = async (depth = 100) => {\n const dirs = await getInputDirs(depth)\n return (await Promise.all(dirs.map(async (dir) => await getInputs(dir)))).flat()\n}\n\nexport const getAllInputs2 = (folder: string) => {\n /* tsup wants posix paths */\n return glob.sync(`${folder}/**/*.*`, { ignore: ['**/*.spec.*', '**/*.stories.*', '**/spec/**/*'], posix: true })\n}\n"],"mappings":";;;;;;;;;;;;;;;;;;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA,sBAAwB;AAExB,kBAAqB;AAEd,MAAM,YAAY,OAAO,WAAoB;AAClD,UAAQ,UAAM,yBAAQ,SAAS,OAAO,MAAM,KAAK,OAAO,EAAE,WAAW,MAAM,CAAC,GACzE;AAAA,IACC,CAAC,UAAU,KAAK,SAAS,KAAK,KAAK,KAAK,SAAS,MAAM,MAAM,CAAC,KAAK,SAAS,MAAM,KAAK,CAAC,KAAK,SAAS,QAAQ,KAAK,CAAC,KAAK,SAAS,WAAW;AAAA,EAC/I,EACC,IAAI,CAAC,SAAU,SAAS,GAAG,MAAM,IAAI,IAAI,KAAK,IAAK;AACxD;AAEO,MAAM,eAAe,OAAO,QAAgB,MAAM;AACvD,MAAI,UAAU,GAAG;AACf,WAAO,CAAC;AAAA,EACV;AACA,SAAO;AAAA,IACL;AAAA,IACA,IAAI,UAAM,yBAAQ,OAAO,EAAE,WAAW,MAAM,eAAe,KAAK,CAAC,GAC9D,OAAO,CAAC,SAAS,KAAK,YAAY,CAAC,EACnC,IAAI,CAAC,SAAS;AApBrB;AAqBQ,YAAM,cAAY,UAAK,SAAL,mBAAW,MAAM,SAAQ,CAAC;AAC5C,gBAAU,MAAM;AAChB,UAAI,UAAU,SAAS,GAAG;AACxB,cAAM,OAAO,UAAU,KAAK,GAAG;AAC/B,eAAO,GAAG,IAAI,IAAI,KAAK,IAAI;AAAA,MAC7B,OAAO;AACL,eAAO,KAAK;AAAA,MACd;AAAA,IACF,CAAC;AAAA,EACL;AACF;AAEO,MAAM,eAAe,OAAO,QAAQ,QAAQ;AACjD,QAAM,OAAO,MAAM,aAAa,KAAK;AACrC,UAAQ,MAAM,QAAQ,IAAI,KAAK,IAAI,OAAO,QAAQ,MAAM,UAAU,GAAG,CAAC,CAAC,GAAG,KAAK;AACjF;AAEO,MAAM,gBAAgB,CAAC,WAAmB;AAE/C,SAAO,iBAAK,KAAK,GAAG,MAAM,WAAW,EAAE,QAAQ,CAAC,eAAe,kBAAkB,cAAc,GAAG,OAAO,KAAK,CAAC;AACjH;","names":[]}
@@ -1,4 +1,4 @@
1
- import { readdir } from "fs/promises";
1
+ import { readdir } from "node:fs/promises";
2
2
  import { glob } from "glob";
3
3
  const getInputs = async (subDir) => {
4
4
  return (await readdir(subDir ? `src/${subDir}` : "src", { recursive: false })).filter(
@@ -15,7 +15,7 @@ const getInputDirs = async (depth = 0) => {
15
15
  var _a;
16
16
  const pathParts = ((_a = file.path) == null ? void 0 : _a.split("/")) ?? [];
17
17
  pathParts.shift();
18
- if (pathParts.length) {
18
+ if (pathParts.length > 0) {
19
19
  const root = pathParts.join("/");
20
20
  return `${root}/${file.name}`;
21
21
  } else {
@@ -1 +1 @@
1
- {"version":3,"sources":["../../../../src/actions/package/compile/inputs.ts"],"sourcesContent":["import { readdir } from 'fs/promises'\nimport { glob } from 'glob'\n\nexport const getInputs = async (subDir?: string) => {\n return (await readdir(subDir ? `src/${subDir}` : 'src', { recursive: false }))\n .filter(\n (file) => (file.endsWith('.ts') || file.endsWith('.tsx')) && !file.endsWith('d.ts') && !file.includes('.spec.') && !file.includes('.stories.'),\n )\n .map((file) => (subDir ? `${subDir}/${file}` : file))\n}\n\nexport const getInputDirs = async (depth: number = 0) => {\n if (depth === 0) {\n return []\n }\n return [\n '.',\n ...(await readdir('src', { recursive: true, withFileTypes: true }))\n .filter((file) => file.isDirectory())\n .map((file) => {\n const pathParts = file.path?.split('/') ?? []\n pathParts.shift()\n if (pathParts.length) {\n const root = pathParts.join('/')\n return `${root}/${file.name}`\n } else {\n return file.name\n }\n }),\n ]\n}\n\nexport const getAllInputs = async (depth = 100) => {\n const dirs = await getInputDirs(depth)\n return (await Promise.all(dirs.map(async (dir) => await getInputs(dir)))).flat()\n}\n\nexport const getAllInputs2 = (folder: string) => {\n /* tsup wants posix paths */\n return glob.sync(`${folder}/**/*.*`, { ignore: ['**/*.spec.*', '**/*.stories.*', '**/spec/**/*'], posix: true })\n}\n"],"mappings":"AAAA,SAAS,eAAe;AACxB,SAAS,YAAY;AAEd,MAAM,YAAY,OAAO,WAAoB;AAClD,UAAQ,MAAM,QAAQ,SAAS,OAAO,MAAM,KAAK,OAAO,EAAE,WAAW,MAAM,CAAC,GACzE;AAAA,IACC,CAAC,UAAU,KAAK,SAAS,KAAK,KAAK,KAAK,SAAS,MAAM,MAAM,CAAC,KAAK,SAAS,MAAM,KAAK,CAAC,KAAK,SAAS,QAAQ,KAAK,CAAC,KAAK,SAAS,WAAW;AAAA,EAC/I,EACC,IAAI,CAAC,SAAU,SAAS,GAAG,MAAM,IAAI,IAAI,KAAK,IAAK;AACxD;AAEO,MAAM,eAAe,OAAO,QAAgB,MAAM;AACvD,MAAI,UAAU,GAAG;AACf,WAAO,CAAC;AAAA,EACV;AACA,SAAO;AAAA,IACL;AAAA,IACA,IAAI,MAAM,QAAQ,OAAO,EAAE,WAAW,MAAM,eAAe,KAAK,CAAC,GAC9D,OAAO,CAAC,SAAS,KAAK,YAAY,CAAC,EACnC,IAAI,CAAC,SAAS;AAnBrB;AAoBQ,YAAM,cAAY,UAAK,SAAL,mBAAW,MAAM,SAAQ,CAAC;AAC5C,gBAAU,MAAM;AAChB,UAAI,UAAU,QAAQ;AACpB,cAAM,OAAO,UAAU,KAAK,GAAG;AAC/B,eAAO,GAAG,IAAI,IAAI,KAAK,IAAI;AAAA,MAC7B,OAAO;AACL,eAAO,KAAK;AAAA,MACd;AAAA,IACF,CAAC;AAAA,EACL;AACF;AAEO,MAAM,eAAe,OAAO,QAAQ,QAAQ;AACjD,QAAM,OAAO,MAAM,aAAa,KAAK;AACrC,UAAQ,MAAM,QAAQ,IAAI,KAAK,IAAI,OAAO,QAAQ,MAAM,UAAU,GAAG,CAAC,CAAC,GAAG,KAAK;AACjF;AAEO,MAAM,gBAAgB,CAAC,WAAmB;AAE/C,SAAO,KAAK,KAAK,GAAG,MAAM,WAAW,EAAE,QAAQ,CAAC,eAAe,kBAAkB,cAAc,GAAG,OAAO,KAAK,CAAC;AACjH;","names":[]}
1
+ {"version":3,"sources":["../../../../src/actions/package/compile/inputs.ts"],"sourcesContent":["import { readdir } from 'node:fs/promises'\n\nimport { glob } from 'glob'\n\nexport const getInputs = async (subDir?: string) => {\n return (await readdir(subDir ? `src/${subDir}` : 'src', { recursive: false }))\n .filter(\n (file) => (file.endsWith('.ts') || file.endsWith('.tsx')) && !file.endsWith('d.ts') && !file.includes('.spec.') && !file.includes('.stories.'),\n )\n .map((file) => (subDir ? `${subDir}/${file}` : file))\n}\n\nexport const getInputDirs = async (depth: number = 0) => {\n if (depth === 0) {\n return []\n }\n return [\n '.',\n ...(await readdir('src', { recursive: true, withFileTypes: true }))\n .filter((file) => file.isDirectory())\n .map((file) => {\n const pathParts = file.path?.split('/') ?? []\n pathParts.shift()\n if (pathParts.length > 0) {\n const root = pathParts.join('/')\n return `${root}/${file.name}`\n } else {\n return file.name\n }\n }),\n ]\n}\n\nexport const getAllInputs = async (depth = 100) => {\n const dirs = await getInputDirs(depth)\n return (await Promise.all(dirs.map(async (dir) => await getInputs(dir)))).flat()\n}\n\nexport const getAllInputs2 = (folder: string) => {\n /* tsup wants posix paths */\n return glob.sync(`${folder}/**/*.*`, { ignore: ['**/*.spec.*', '**/*.stories.*', '**/spec/**/*'], posix: true })\n}\n"],"mappings":"AAAA,SAAS,eAAe;AAExB,SAAS,YAAY;AAEd,MAAM,YAAY,OAAO,WAAoB;AAClD,UAAQ,MAAM,QAAQ,SAAS,OAAO,MAAM,KAAK,OAAO,EAAE,WAAW,MAAM,CAAC,GACzE;AAAA,IACC,CAAC,UAAU,KAAK,SAAS,KAAK,KAAK,KAAK,SAAS,MAAM,MAAM,CAAC,KAAK,SAAS,MAAM,KAAK,CAAC,KAAK,SAAS,QAAQ,KAAK,CAAC,KAAK,SAAS,WAAW;AAAA,EAC/I,EACC,IAAI,CAAC,SAAU,SAAS,GAAG,MAAM,IAAI,IAAI,KAAK,IAAK;AACxD;AAEO,MAAM,eAAe,OAAO,QAAgB,MAAM;AACvD,MAAI,UAAU,GAAG;AACf,WAAO,CAAC;AAAA,EACV;AACA,SAAO;AAAA,IACL;AAAA,IACA,IAAI,MAAM,QAAQ,OAAO,EAAE,WAAW,MAAM,eAAe,KAAK,CAAC,GAC9D,OAAO,CAAC,SAAS,KAAK,YAAY,CAAC,EACnC,IAAI,CAAC,SAAS;AApBrB;AAqBQ,YAAM,cAAY,UAAK,SAAL,mBAAW,MAAM,SAAQ,CAAC;AAC5C,gBAAU,MAAM;AAChB,UAAI,UAAU,SAAS,GAAG;AACxB,cAAM,OAAO,UAAU,KAAK,GAAG;AAC/B,eAAO,GAAG,IAAI,IAAI,KAAK,IAAI;AAAA,MAC7B,OAAO;AACL,eAAO,KAAK;AAAA,MACd;AAAA,IACF,CAAC;AAAA,EACL;AACF;AAEO,MAAM,eAAe,OAAO,QAAQ,QAAQ;AACjD,QAAM,OAAO,MAAM,aAAa,KAAK;AACrC,UAAQ,MAAM,QAAQ,IAAI,KAAK,IAAI,OAAO,QAAQ,MAAM,UAAU,GAAG,CAAC,CAAC,GAAG,KAAK;AACjF;AAEO,MAAM,gBAAgB,CAAC,WAAmB;AAE/C,SAAO,KAAK,KAAK,GAAG,MAAM,WAAW,EAAE,QAAQ,CAAC,eAAe,kBAAkB,cAAc,GAAG,OAAO,KAAK,CAAC;AACjH;","names":[]}
@@ -31,14 +31,15 @@ __export(packageCompileTsc_exports, {
31
31
  packageCompileTsc: () => packageCompileTsc
32
32
  });
33
33
  module.exports = __toCommonJS(packageCompileTsc_exports);
34
+ var import_node_process = require("node:process");
34
35
  var import_chalk = __toESM(require("chalk"));
35
- var import_process = require("process");
36
36
  var import_tsc_prog = require("tsc-prog");
37
37
  var import_typescript = require("typescript");
38
38
  var import_publint = require("../publint");
39
39
  var import_getCompilerOptions = require("./getCompilerOptions");
40
40
  const packageCompileTsc = async (noEmit, config, compilerOptionsParam) => {
41
- const pkg = process.env.INIT_CWD ?? (0, import_process.cwd)();
41
+ var _a;
42
+ const pkg = process.env.INIT_CWD ?? (0, import_node_process.cwd)();
42
43
  const publint = (config == null ? void 0 : config.publint) ?? true;
43
44
  const verbose = (config == null ? void 0 : config.verbose) ?? false;
44
45
  const formatHost = {
@@ -54,22 +55,21 @@ const packageCompileTsc = async (noEmit, config, compilerOptionsParam) => {
54
55
  outDir: "dist",
55
56
  rootDir: "src"
56
57
  }),
57
- ...compilerOptionsParam ?? {},
58
- ...noEmit !== void 0 ? { noEmit } : {}
58
+ ...compilerOptionsParam,
59
+ ...noEmit === void 0 ? {} : { noEmit }
59
60
  };
60
61
  const program = (0, import_tsc_prog.createProgramFromConfig)({
61
- basePath: pkg ?? (0, import_process.cwd)(),
62
+ basePath: pkg ?? (0, import_node_process.cwd)(),
62
63
  compilerOptions,
63
64
  exclude: ["dist", "docs", "**/*.spec.*", "**/*.stories.*", "src/**/spec/**/*"],
64
65
  include: ["src"]
65
66
  });
66
67
  const results = (0, import_typescript.getPreEmitDiagnostics)(program);
67
- results.forEach((diag) => {
68
- var _a;
68
+ for (const diag of results) {
69
69
  const lineAndChar = diag.file ? (0, import_typescript.getLineAndCharacterOfPosition)(diag.file, diag.start ?? 0) : { character: 0, line: 0 };
70
70
  console.log(import_chalk.default.cyan(`${(_a = diag.file) == null ? void 0 : _a.fileName}:${lineAndChar.line + 1}:${lineAndChar.character + 1}`));
71
71
  console.log((0, import_typescript.formatDiagnosticsWithColorAndContext)([diag], formatHost));
72
- });
72
+ }
73
73
  return results.reduce((prev, diag) => prev + diag.category === import_typescript.DiagnosticCategory.Error ? 1 : 0, 0) || (publint ? await (0, import_publint.packagePublint)() : 0);
74
74
  };
75
75
  // Annotate the CommonJS export names for ESM import in node:
@@ -1 +1 @@
1
- {"version":3,"sources":["../../../../src/actions/package/compile/packageCompileTsc.ts"],"sourcesContent":["import chalk from 'chalk'\nimport { cwd } from 'process'\nimport { createProgramFromConfig, TsConfigCompilerOptions } from 'tsc-prog'\nimport {\n CompilerOptions,\n DiagnosticCategory,\n FormatDiagnosticsHost,\n formatDiagnosticsWithColorAndContext,\n getLineAndCharacterOfPosition,\n getPreEmitDiagnostics,\n LineAndCharacter,\n} from 'typescript'\n\nimport { packagePublint } from '../publint'\nimport { getCompilerOptions } from './getCompilerOptions'\nimport { XyTscConfig } from './XyConfig'\n\nexport const packageCompileTsc = async (noEmit?: boolean, config?: XyTscConfig, compilerOptionsParam?: CompilerOptions): Promise<number> => {\n const pkg = process.env.INIT_CWD ?? cwd()\n\n const publint = config?.publint ?? true\n const verbose = config?.verbose ?? false\n\n const formatHost: FormatDiagnosticsHost = {\n getCanonicalFileName: (fileName) => fileName,\n getCurrentDirectory: () => pkg,\n getNewLine: () => '\\n',\n }\n\n if (verbose) {\n console.log(`Compiling with NoEmit TSC [${pkg}]`)\n }\n\n const compilerOptions = {\n ...getCompilerOptions({\n outDir: 'dist',\n rootDir: 'src',\n }),\n ...(compilerOptionsParam ?? {}),\n ...(noEmit !== undefined ? { noEmit } : {}),\n } as TsConfigCompilerOptions\n\n const program = createProgramFromConfig({\n basePath: pkg ?? cwd(),\n compilerOptions,\n exclude: ['dist', 'docs', '**/*.spec.*', '**/*.stories.*', 'src/**/spec/**/*'],\n include: ['src'],\n })\n\n const results = getPreEmitDiagnostics(program)\n\n results.forEach((diag) => {\n const lineAndChar: LineAndCharacter = diag.file ? getLineAndCharacterOfPosition(diag.file, diag.start ?? 0) : { character: 0, line: 0 }\n console.log(chalk.cyan(`${diag.file?.fileName}:${lineAndChar.line + 1}:${lineAndChar.character + 1}`))\n console.log(formatDiagnosticsWithColorAndContext([diag], formatHost))\n })\n\n return results.reduce((prev, diag) => (prev + diag.category === DiagnosticCategory.Error ? 1 : 0), 0) || (publint ? await packagePublint() : 0)\n}\n"],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;;;;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA,mBAAkB;AAClB,qBAAoB;AACpB,sBAAiE;AACjE,wBAQO;AAEP,qBAA+B;AAC/B,gCAAmC;AAG5B,MAAM,oBAAoB,OAAO,QAAkB,QAAsB,yBAA4D;AAC1I,QAAM,MAAM,QAAQ,IAAI,gBAAY,oBAAI;AAExC,QAAM,WAAU,iCAAQ,YAAW;AACnC,QAAM,WAAU,iCAAQ,YAAW;AAEnC,QAAM,aAAoC;AAAA,IACxC,sBAAsB,CAAC,aAAa;AAAA,IACpC,qBAAqB,MAAM;AAAA,IAC3B,YAAY,MAAM;AAAA,EACpB;AAEA,MAAI,SAAS;AACX,YAAQ,IAAI,8BAA8B,GAAG,GAAG;AAAA,EAClD;AAEA,QAAM,kBAAkB;AAAA,IACtB,OAAG,8CAAmB;AAAA,MACpB,QAAQ;AAAA,MACR,SAAS;AAAA,IACX,CAAC;AAAA,IACD,GAAI,wBAAwB,CAAC;AAAA,IAC7B,GAAI,WAAW,SAAY,EAAE,OAAO,IAAI,CAAC;AAAA,EAC3C;AAEA,QAAM,cAAU,yCAAwB;AAAA,IACtC,UAAU,WAAO,oBAAI;AAAA,IACrB;AAAA,IACA,SAAS,CAAC,QAAQ,QAAQ,eAAe,kBAAkB,kBAAkB;AAAA,IAC7E,SAAS,CAAC,KAAK;AAAA,EACjB,CAAC;AAED,QAAM,cAAU,yCAAsB,OAAO;AAE7C,UAAQ,QAAQ,CAAC,SAAS;AAnD5B;AAoDI,UAAM,cAAgC,KAAK,WAAO,iDAA8B,KAAK,MAAM,KAAK,SAAS,CAAC,IAAI,EAAE,WAAW,GAAG,MAAM,EAAE;AACtI,YAAQ,IAAI,aAAAA,QAAM,KAAK,IAAG,UAAK,SAAL,mBAAW,QAAQ,IAAI,YAAY,OAAO,CAAC,IAAI,YAAY,YAAY,CAAC,EAAE,CAAC;AACrG,YAAQ,QAAI,wDAAqC,CAAC,IAAI,GAAG,UAAU,CAAC;AAAA,EACtE,CAAC;AAED,SAAO,QAAQ,OAAO,CAAC,MAAM,SAAU,OAAO,KAAK,aAAa,qCAAmB,QAAQ,IAAI,GAAI,CAAC,MAAM,UAAU,UAAM,+BAAe,IAAI;AAC/I;","names":["chalk"]}
1
+ {"version":3,"sources":["../../../../src/actions/package/compile/packageCompileTsc.ts"],"sourcesContent":["import { cwd } from 'node:process'\n\nimport chalk from 'chalk'\nimport { createProgramFromConfig, TsConfigCompilerOptions } from 'tsc-prog'\nimport {\n CompilerOptions,\n DiagnosticCategory,\n FormatDiagnosticsHost,\n formatDiagnosticsWithColorAndContext,\n getLineAndCharacterOfPosition,\n getPreEmitDiagnostics,\n LineAndCharacter,\n} from 'typescript'\n\nimport { packagePublint } from '../publint'\nimport { getCompilerOptions } from './getCompilerOptions'\nimport { XyTscConfig } from './XyConfig'\n\nexport const packageCompileTsc = async (noEmit?: boolean, config?: XyTscConfig, compilerOptionsParam?: CompilerOptions): Promise<number> => {\n const pkg = process.env.INIT_CWD ?? cwd()\n\n const publint = config?.publint ?? true\n const verbose = config?.verbose ?? false\n\n const formatHost: FormatDiagnosticsHost = {\n getCanonicalFileName: (fileName) => fileName,\n getCurrentDirectory: () => pkg,\n getNewLine: () => '\\n',\n }\n\n if (verbose) {\n console.log(`Compiling with NoEmit TSC [${pkg}]`)\n }\n\n const compilerOptions = {\n ...getCompilerOptions({\n outDir: 'dist',\n rootDir: 'src',\n }),\n ...compilerOptionsParam,\n ...(noEmit === undefined ? {} : { noEmit }),\n } as TsConfigCompilerOptions\n\n const program = createProgramFromConfig({\n basePath: pkg ?? cwd(),\n compilerOptions,\n exclude: ['dist', 'docs', '**/*.spec.*', '**/*.stories.*', 'src/**/spec/**/*'],\n include: ['src'],\n })\n\n const results = getPreEmitDiagnostics(program)\n\n for (const diag of results) {\n const lineAndChar: LineAndCharacter = diag.file ? getLineAndCharacterOfPosition(diag.file, diag.start ?? 0) : { character: 0, line: 0 }\n console.log(chalk.cyan(`${diag.file?.fileName}:${lineAndChar.line + 1}:${lineAndChar.character + 1}`))\n console.log(formatDiagnosticsWithColorAndContext([diag], formatHost))\n }\n\n // eslint-disable-next-line unicorn/no-array-reduce\n return results.reduce((prev, diag) => (prev + diag.category === DiagnosticCategory.Error ? 1 : 0), 0) || (publint ? await packagePublint() : 0)\n}\n"],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;;;;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA,0BAAoB;AAEpB,mBAAkB;AAClB,sBAAiE;AACjE,wBAQO;AAEP,qBAA+B;AAC/B,gCAAmC;AAG5B,MAAM,oBAAoB,OAA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cwd } from "node:process";
1
2
  import chalk from "chalk";
2
- import { cwd } from "process";
3
3
  import { createProgramFromConfig } from "tsc-prog";
4
4
  import {
5
5
  DiagnosticCategory,
@@ -10,6 +10,7 @@ import {
10
10
  import { packagePublint } from "../publint";
11
11
  import { getCompilerOptions } from "./getCompilerOptions";
12
12
  const packageCompileTsc = async (noEmit, config, compilerOptionsParam) => {
13
+ var _a;
13
14
  const pkg = process.env.INIT_CWD ?? cwd();
14
15
  const publint = (config == null ? void 0 : config.publint) ?? true;
15
16
  const verbose = (config == null ? void 0 : config.verbose) ?? false;
@@ -26,8 +27,8 @@ const packageCompileTsc = async (noEmit, config, compilerOptionsParam) => {
26
27
  outDir: "dist",
27
28
  rootDir: "src"
28
29
  }),
29
- ...compilerOptionsParam ?? {},
30
- ...noEmit !== void 0 ? { noEmit } : {}
30
+ ...compilerOptionsParam,
31
+ ...noEmit === void 0 ? {} : { noEmit }
31
32
  };
32
33
  const program = createProgramFromConfig({
33
34
  basePath: pkg ?? cwd(),
@@ -36,12 +37,11 @@ const packageCompileTsc = async (noEmit, config, compilerOptionsParam) => {
36
37
  include: ["src"]
37
38
  });
38
39
  const results = getPreEmitDiagnostics(program);
39
- results.forEach((diag) => {
40
- var _a;
40
+ for (const diag of results) {
41
41
  const lineAndChar = diag.file ? getLineAndCharacterOfPosition(diag.file, diag.start ?? 0) : { character: 0, line: 0 };
42
42
  console.log(chalk.cyan(`${(_a = diag.file) == null ? void 0 : _a.fileName}:${lineAndChar.line + 1}:${lineAndChar.character + 1}`));
43
43
  console.log(formatDiagnosticsWithColorAndContext([diag], formatHost));
44
- });
44
+ }
45
45
  return results.reduce((prev, diag) => prev + diag.category === DiagnosticCategory.Error ? 1 : 0, 0) || (publint ? await packagePublint() : 0);
46
46
  };
47
47
  export {
@@ -1 +1 @@
1
- {"version":3,"sources":["../../../../src/actions/package/compile/packageCompileTsc.ts"],"sourcesContent":["import chalk from 'chalk'\nimport { cwd } from 'process'\nimport { createProgramFromConfig, TsConfigCompilerOptions } from 'tsc-prog'\nimport {\n CompilerOptions,\n DiagnosticCategory,\n FormatDiagnosticsHost,\n formatDiagnosticsWithColorAndContext,\n getLineAndCharacterOfPosition,\n getPreEmitDiagnostics,\n LineAndCharacter,\n} from 'typescript'\n\nimport { packagePublint } from '../publint'\nimport { getCompilerOptions } from './getCompilerOptions'\nimport { XyTscConfig } from './XyConfig'\n\nexport const packageCompileTsc = async (noEmit?: boolean, config?: XyTscConfig, compilerOptionsParam?: CompilerOptions): Promise<number> => {\n const pkg = process.env.INIT_CWD ?? cwd()\n\n const publint = config?.publint ?? true\n const verbose = config?.verbose ?? false\n\n const formatHost: FormatDiagnosticsHost = {\n getCanonicalFileName: (fileName) => fileName,\n getCurrentDirectory: () => pkg,\n getNewLine: () => '\\n',\n }\n\n if (verbose) {\n console.log(`Compiling with NoEmit TSC [${pkg}]`)\n }\n\n const compilerOptions = {\n ...getCompilerOptions({\n outDir: 'dist',\n rootDir: 'src',\n }),\n ...(compilerOptionsParam ?? {}),\n ...(noEmit !== undefined ? { noEmit } : {}),\n } as TsConfigCompilerOptions\n\n const program = createProgramFromConfig({\n basePath: pkg ?? cwd(),\n compilerOptions,\n exclude: ['dist', 'docs', '**/*.spec.*', '**/*.stories.*', 'src/**/spec/**/*'],\n include: ['src'],\n })\n\n const results = getPreEmitDiagnostics(program)\n\n results.forEach((diag) => {\n const lineAndChar: LineAndCharacter = diag.file ? getLineAndCharacterOfPosition(diag.file, diag.start ?? 0) : { character: 0, line: 0 }\n console.log(chalk.cyan(`${diag.file?.fileName}:${lineAndChar.line + 1}:${lineAndChar.character + 1}`))\n console.log(formatDiagnosticsWithColorAndContext([diag], formatHost))\n })\n\n return results.reduce((prev, diag) => (prev + diag.category === DiagnosticCategory.Error ? 1 : 0), 0) || (publint ? await packagePublint() : 0)\n}\n"],"mappings":"AAAA,OAAO,WAAW;AAClB,SAAS,WAAW;AACpB,SAAS,+BAAwD;AACjE;AAAA,EAEE;AAAA,EAEA;AAAA,E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mBAAmB,QAAQ,IAAI,GAAI,CAAC,MAAM,UAAU,MAAM,eAAe,IAAI;AAC/I;","names":[]}
1
+ {"version":3,"sources":["../../../../src/actions/package/compile/packageCompileTsc.ts"],"sourcesContent":["import { cwd } from 'node:process'\n\nimport chalk from 'chalk'\nimport { createProgramFromConfig, TsConfigCompilerOptions } from 'tsc-prog'\nimport {\n CompilerOptions,\n DiagnosticCategory,\n FormatDiagnosticsHost,\n formatDiagnosticsWithColorAndContext,\n getLineAndCharacterOfPosition,\n getPreEmitDiagnostics,\n LineAndCharacter,\n} from 'typescript'\n\nimport { packagePublint } from '../publint'\nimport { getCompilerOptions } from './getCompilerOptions'\nimport { XyTscConfig } from './XyConfig'\n\nexport const packageCompileTsc = async (noEmit?: boolean, config?: XyTscConfig, compilerOptionsParam?: CompilerOptions): Promise<number> => {\n const pkg = process.env.INIT_CWD ?? cwd()\n\n const publint = config?.publint ?? true\n const verbose = config?.verbose ?? false\n\n const formatHost: FormatDiagnosticsHost = {\n getCanonicalFileName: (fileName) => fileName,\n getCurrentDirectory: () => pkg,\n getNewLine: () => '\\n',\n }\n\n if (verbose) {\n console.log(`Compiling with NoEmit TSC [${pkg}]`)\n }\n\n const compilerOptions = {\n ...getCompilerOptions({\n outDir: 'dist',\n rootDir: 'src',\n }),\n ...compilerOptionsParam,\n ...(noEmit === undefined ? {} : { noEmit }),\n } as TsConfigCompilerOptions\n\n const program = createProgramFromConfig({\n basePath: pkg ?? cwd(),\n compilerOptions,\n exclude: ['dist', 'docs', '**/*.spec.*', '**/*.stories.*', 'src/**/spec/**/*'],\n include: ['src'],\n })\n\n const results = getPreEmitDiagnostics(program)\n\n for (const diag of results) {\n const lineAndChar: LineAndCharacter = diag.file ? getLineAndCharacterOfPosition(diag.file, diag.start ?? 0) : { character: 0, line: 0 }\n console.log(chalk.cyan(`${diag.file?.fileName}:${lineAndChar.line + 1}:${lineAndChar.character + 1}`))\n console.log(formatDiagnosticsWithColorAndContext([diag], formatHost))\n }\n\n // eslint-disable-next-line unicorn/no-array-reduce\n return results.reduce((prev, diag) => (prev + diag.category === DiagnosticCategory.Error ? 1 : 0), 0) || (publint ? await packagePublint() : 0)\n}\n"],"mappings":"AAAA,SAAS,WAAW;AAEpB,OAAO,WAAW;AAClB,SAAS,+BAAwD;AACjE;AAAA,EAEE;AAAA,EAEA;AAAA,EACA;AAAA,EACA;AAAA,OAEK;AAEP,SAAS,sBAAsB;AAC/B,SAAS,0BAA0B;AAG5B,MAAM,oBAAoB,OAAO,QAAkB,QAAsB,yBAA4D;AAlB5I;AAmBE,QAAM,MAAM,QAAQ,IAAI,YAAY,IAAI;AAExC,QAAM,WAAU,iCAAQ,YAAW;AACnC,QAAM,WAAU,iCAAQ,YAAW;AAEnC,QAAM,aAAoC;AAAA,IACxC,sBAAsB,CAAC,aAAa;AAAA,IACpC,qBAAqB,MAAM;AAAA,IAC3B,YAAY,MAAM;AAAA,EACpB;AAEA,MAAI,SAAS;AACX,YAAQ,IAAI,8BAA8B,GAAG,GAAG;AAAA,EAClD;AAEA,QAAM,kBAAkB;AAAA,IACtB,GAAG,mBAAmB;AAAA,MACpB,QAAQ;AAAA,MACR,SAAS;AAAA,IACX,CAAC;AAAA,IACD,GAAG;AAAA,IACH,GAAI,WAAW,SAAY,CAAC,IAAI,EAAE,OAAO;AAAA,EAC3C;AAEA,QAAM,UAAU,wBAAwB;AAAA,IACtC,UAAU,OAAO,IAAI;AAAA,IACrB;AAAA,IACA,SAAS,CAAC,QAAQ,QAAQ,eAAe,kBAAkB,kBAAkB;AAAA,IAC7E,SAAS,CAAC,KAAK;AAAA,EACjB,CAAC;AAED,QAAM,UAAU,sBAAsB,OAAO;AAE7C,aAAW,QAAQ,SAAS;AAC1B,UAAM,cAAgC,KAAK,OAAO,8BAA8B,KAAK,MAAM,KAAK,SAAS,CAAC,IAAI,EAAE,WAAW,GAAG,MAAM,EAAE;AACtI,YAAQ,IAAI,MAAM,KAAK,IAAG,UAAK,SAAL,mBAAW,QAAQ,IA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