@xylabs/toolchain 7.10.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 (622) hide show
  1. package/dist/actions/analyze.mjs +140 -0
  2. package/dist/actions/analyze.mjs.map +1 -0
  3. package/dist/actions/build.mjs +173 -0
  4. package/dist/actions/build.mjs.map +1 -0
  5. package/dist/actions/claude-check.mjs +199 -0
  6. package/dist/actions/claude-check.mjs.map +1 -0
  7. package/dist/actions/claude-clean.mjs +70 -0
  8. package/dist/actions/claude-clean.mjs.map +1 -0
  9. package/dist/actions/claude-commands.mjs +126 -0
  10. package/dist/actions/claude-commands.mjs.map +1 -0
  11. package/dist/actions/claude-rules.mjs +151 -0
  12. package/dist/actions/claude-rules.mjs.map +1 -0
  13. package/dist/actions/claude-settings.mjs +99 -0
  14. package/dist/actions/claude-settings.mjs.map +1 -0
  15. package/dist/actions/claude-skills.mjs +131 -0
  16. package/dist/actions/claude-skills.mjs.map +1 -0
  17. package/dist/actions/clean-docs.mjs +66 -0
  18. package/dist/actions/clean-docs.mjs.map +1 -0
  19. package/dist/actions/clean-eslint.mjs +47 -0
  20. package/dist/actions/clean-eslint.mjs.map +1 -0
  21. package/dist/actions/clean.mjs +166 -0
  22. package/dist/actions/clean.mjs.map +1 -0
  23. package/dist/actions/compile.mjs +184 -0
  24. package/dist/actions/compile.mjs.map +1 -0
  25. package/dist/actions/copy-assets.mjs +81 -0
  26. package/dist/actions/copy-assets.mjs.map +1 -0
  27. package/dist/actions/cycle.mjs +275 -0
  28. package/dist/actions/cycle.mjs.map +1 -0
  29. package/dist/actions/dead.mjs +119 -0
  30. package/dist/actions/dead.mjs.map +1 -0
  31. package/dist/actions/deplint/checkPackage/checkPackage.mjs +1556 -0
  32. package/dist/actions/deplint/checkPackage/checkPackage.mjs.map +1 -0
  33. package/dist/actions/deplint/checkPackage/checkPackageTypes.mjs +1 -0
  34. package/dist/actions/deplint/checkPackage/checkPackageTypes.mjs.map +1 -0
  35. package/dist/actions/deplint/checkPackage/getMismatchedPeerDevVersions.mjs +77 -0
  36. package/dist/actions/deplint/checkPackage/getMismatchedPeerDevVersions.mjs.map +1 -0
  37. package/dist/actions/deplint/checkPackage/getUnlistedDependencies.mjs +158 -0
  38. package/dist/actions/deplint/checkPackage/getUnlistedDependencies.mjs.map +1 -0
  39. package/dist/actions/deplint/checkPackage/getUnlistedDevDependencies.mjs +125 -0
  40. package/dist/actions/deplint/checkPackage/getUnlistedDevDependencies.mjs.map +1 -0
  41. package/dist/actions/deplint/checkPackage/getUnnecessaryPeerDependencies.mjs +207 -0
  42. package/dist/actions/deplint/checkPackage/getUnnecessaryPeerDependencies.mjs.map +1 -0
  43. package/dist/actions/deplint/checkPackage/getUnsatisfiedPeerDependencies.mjs +318 -0
  44. package/dist/actions/deplint/checkPackage/getUnsatisfiedPeerDependencies.mjs.map +1 -0
  45. package/dist/actions/deplint/checkPackage/getUnusedDependencies.mjs +163 -0
  46. package/dist/actions/deplint/checkPackage/getUnusedDependencies.mjs.map +1 -0
  47. package/dist/actions/deplint/checkPackage/getUnusedDevDependencies.mjs +408 -0
  48. package/dist/actions/deplint/checkPackage/getUnusedDevDependencies.mjs.map +1 -0
  49. package/dist/actions/deplint/checkPackage/getUnusedPeerDependencies.mjs +75 -0
  50. package/dist/actions/deplint/checkPackage/getUnusedPeerDependencies.mjs.map +1 -0
  51. package/dist/actions/deplint/checkPackage/getWorkspaceVersionProblems.mjs +128 -0
  52. package/dist/actions/deplint/checkPackage/getWorkspaceVersionProblems.mjs.map +1 -0
  53. package/dist/actions/deplint/checkPackage/index.mjs +1609 -0
  54. package/dist/actions/deplint/checkPackage/index.mjs.map +1 -0
  55. package/dist/actions/deplint/deplint.mjs +1840 -0
  56. package/dist/actions/deplint/deplint.mjs.map +1 -0
  57. package/dist/actions/deplint/engine.mjs +1736 -0
  58. package/dist/actions/deplint/engine.mjs.map +1 -0
  59. package/dist/actions/deplint/findFiles.mjs +39 -0
  60. package/dist/actions/deplint/findFiles.mjs.map +1 -0
  61. package/dist/actions/deplint/findFilesByGlob.mjs +14 -0
  62. package/dist/actions/deplint/findFilesByGlob.mjs.map +1 -0
  63. package/dist/actions/deplint/fixer.mjs +103 -0
  64. package/dist/actions/deplint/fixer.mjs.map +1 -0
  65. package/dist/actions/deplint/getBasePackageName.mjs +13 -0
  66. package/dist/actions/deplint/getBasePackageName.mjs.map +1 -0
  67. package/dist/actions/deplint/getCliReferencedPackagesFromFiles.mjs +140 -0
  68. package/dist/actions/deplint/getCliReferencedPackagesFromFiles.mjs.map +1 -0
  69. package/dist/actions/deplint/getDependenciesFromPackageJson.mjs +29 -0
  70. package/dist/actions/deplint/getDependenciesFromPackageJson.mjs.map +1 -0
  71. package/dist/actions/deplint/getExtendsFromTsconfigs.mjs +68 -0
  72. package/dist/actions/deplint/getExtendsFromTsconfigs.mjs.map +1 -0
  73. package/dist/actions/deplint/getExternalImportsFromFiles.mjs +143 -0
  74. package/dist/actions/deplint/getExternalImportsFromFiles.mjs.map +1 -0
  75. package/dist/actions/deplint/getImportsFromFile.mjs +85 -0
  76. package/dist/actions/deplint/getImportsFromFile.mjs.map +1 -0
  77. package/dist/actions/deplint/getRequiredPeerDependencies.mjs +37 -0
  78. package/dist/actions/deplint/getRequiredPeerDependencies.mjs.map +1 -0
  79. package/dist/actions/deplint/getScriptReferencedPackages.mjs +83 -0
  80. package/dist/actions/deplint/getScriptReferencedPackages.mjs.map +1 -0
  81. package/dist/actions/deplint/implicitDevDependencies.mjs +116 -0
  82. package/dist/actions/deplint/implicitDevDependencies.mjs.map +1 -0
  83. package/dist/actions/deplint/index.mjs +1848 -0
  84. package/dist/actions/deplint/index.mjs.map +1 -0
  85. package/dist/actions/deplint/packageEditor.mjs +82 -0
  86. package/dist/actions/deplint/packageEditor.mjs.map +1 -0
  87. package/dist/actions/deplint/packageJsonEditor.mjs +101 -0
  88. package/dist/actions/deplint/packageJsonEditor.mjs.map +1 -0
  89. package/dist/actions/deplint/reporters.mjs +36 -0
  90. package/dist/actions/deplint/reporters.mjs.map +1 -0
  91. package/dist/actions/deplint/rules.mjs +1223 -0
  92. package/dist/actions/deplint/rules.mjs.map +1 -0
  93. package/dist/actions/deplint/snapshot.mjs +372 -0
  94. package/dist/actions/deplint/snapshot.mjs.map +1 -0
  95. package/dist/actions/deplint/tsScriptsAliases.mjs +20 -0
  96. package/dist/actions/deplint/tsScriptsAliases.mjs.map +1 -0
  97. package/dist/actions/deplint/types.mjs +1 -0
  98. package/dist/actions/deplint/types.mjs.map +1 -0
  99. package/dist/actions/deploy.mjs +194 -0
  100. package/dist/actions/deploy.mjs.map +1 -0
  101. package/dist/actions/dupdeps.mjs +226 -0
  102. package/dist/actions/dupdeps.mjs.map +1 -0
  103. package/dist/actions/eject.mjs +142 -0
  104. package/dist/actions/eject.mjs.map +1 -0
  105. package/dist/actions/fix.mjs +359 -0
  106. package/dist/actions/fix.mjs.map +1 -0
  107. package/dist/actions/gen-docs.mjs +155 -0
  108. package/dist/actions/gen-docs.mjs.map +1 -0
  109. package/dist/actions/gitignore.mjs +159 -0
  110. package/dist/actions/gitignore.mjs.map +1 -0
  111. package/dist/actions/gitlint-fix.mjs +27 -0
  112. package/dist/actions/gitlint-fix.mjs.map +1 -0
  113. package/dist/actions/gitlint.mjs +48 -0
  114. package/dist/actions/gitlint.mjs.map +1 -0
  115. package/dist/actions/index.mjs +8259 -0
  116. package/dist/actions/index.mjs.map +1 -0
  117. package/dist/actions/knip.mjs +119 -0
  118. package/dist/actions/knip.mjs.map +1 -0
  119. package/dist/actions/license.mjs +92 -0
  120. package/dist/actions/license.mjs.map +1 -0
  121. package/dist/actions/lint-init.mjs +275 -0
  122. package/dist/actions/lint-init.mjs.map +1 -0
  123. package/dist/actions/lint.mjs +356 -0
  124. package/dist/actions/lint.mjs.map +1 -0
  125. package/dist/actions/lintNext.mjs +209 -0
  126. package/dist/actions/lintNext.mjs.map +1 -0
  127. package/dist/actions/lintlint.mjs +341 -0
  128. package/dist/actions/lintlint.mjs.map +1 -0
  129. package/dist/actions/npmignore-gen.mjs +90 -0
  130. package/dist/actions/npmignore-gen.mjs.map +1 -0
  131. package/dist/actions/orphan.mjs +110 -0
  132. package/dist/actions/orphan.mjs.map +1 -0
  133. package/dist/actions/package/clean-outputs.mjs +50 -0
  134. package/dist/actions/package/clean-outputs.mjs.map +1 -0
  135. package/dist/actions/package/clean-typescript.mjs +50 -0
  136. package/dist/actions/package/clean-typescript.mjs.map +1 -0
  137. package/dist/actions/package/clean.mjs +69 -0
  138. package/dist/actions/package/clean.mjs.map +1 -0
  139. package/dist/actions/package/compile/XyConfig.mjs +32 -0
  140. package/dist/actions/package/compile/XyConfig.mjs.map +1 -0
  141. package/dist/actions/package/compile/buildEntries.mjs +53 -0
  142. package/dist/actions/package/compile/buildEntries.mjs.map +1 -0
  143. package/dist/actions/package/compile/compile.mjs +439 -0
  144. package/dist/actions/package/compile/compile.mjs.map +1 -0
  145. package/dist/actions/package/compile/copyTypeFiles.mjs +34 -0
  146. package/dist/actions/package/compile/copyTypeFiles.mjs.map +1 -0
  147. package/dist/actions/package/compile/deepMerge.mjs +27 -0
  148. package/dist/actions/package/compile/deepMerge.mjs.map +1 -0
  149. package/dist/actions/package/compile/getCompilerOptions.mjs +12 -0
  150. package/dist/actions/package/compile/getCompilerOptions.mjs.map +1 -0
  151. package/dist/actions/package/compile/index.mjs +472 -0
  152. package/dist/actions/package/compile/index.mjs.map +1 -0
  153. package/dist/actions/package/compile/inputs.mjs +22 -0
  154. package/dist/actions/package/compile/inputs.mjs.map +1 -0
  155. package/dist/actions/package/compile/packageCompileTsc.mjs +93 -0
  156. package/dist/actions/package/compile/packageCompileTsc.mjs.map +1 -0
  157. package/dist/actions/package/compile/packageCompileTscTypes.mjs +92 -0
  158. package/dist/actions/package/compile/packageCompileTscTypes.mjs.map +1 -0
  159. package/dist/actions/package/compile/packageCompileTsup.mjs +402 -0
  160. package/dist/actions/package/compile/packageCompileTsup.mjs.map +1 -0
  161. package/dist/actions/package/copy-assets.mjs +69 -0
  162. package/dist/actions/package/copy-assets.mjs.map +1 -0
  163. package/dist/actions/package/cycle.mjs +62 -0
  164. package/dist/actions/package/cycle.mjs.map +1 -0
  165. package/dist/actions/package/gen-docs.mjs +137 -0
  166. package/dist/actions/package/gen-docs.mjs.map +1 -0
  167. package/dist/actions/package/index.mjs +1131 -0
  168. package/dist/actions/package/index.mjs.map +1 -0
  169. package/dist/actions/package/lint.mjs +87 -0
  170. package/dist/actions/package/lint.mjs.map +1 -0
  171. package/dist/actions/package/publint.mjs +336 -0
  172. package/dist/actions/package/publint.mjs.map +1 -0
  173. package/dist/actions/package/recompile.mjs +510 -0
  174. package/dist/actions/package/recompile.mjs.map +1 -0
  175. package/dist/actions/package-lint-deps.mjs +348 -0
  176. package/dist/actions/package-lint-deps.mjs.map +1 -0
  177. package/dist/actions/package-lint.mjs +774 -0
  178. package/dist/actions/package-lint.mjs.map +1 -0
  179. package/dist/actions/packman/clean.mjs +144 -0
  180. package/dist/actions/packman/clean.mjs.map +1 -0
  181. package/dist/actions/packman/convert.mjs +1331 -0
  182. package/dist/actions/packman/convert.mjs.map +1 -0
  183. package/dist/actions/packman/convertToPnpm.mjs +295 -0
  184. package/dist/actions/packman/convertToPnpm.mjs.map +1 -0
  185. package/dist/actions/packman/convertToYarn.mjs +307 -0
  186. package/dist/actions/packman/convertToYarn.mjs.map +1 -0
  187. package/dist/actions/packman/index.mjs +1493 -0
  188. package/dist/actions/packman/index.mjs.map +1 -0
  189. package/dist/actions/packman/lint.mjs +109 -0
  190. package/dist/actions/packman/lint.mjs.map +1 -0
  191. package/dist/actions/packman/rewriteScripts.mjs +52 -0
  192. package/dist/actions/packman/rewriteScripts.mjs.map +1 -0
  193. package/dist/actions/packman/rewriteSourceImports.mjs +60 -0
  194. package/dist/actions/packman/rewriteSourceImports.mjs.map +1 -0
  195. package/dist/actions/packman/swapTsScriptsDependency.mjs +57 -0
  196. package/dist/actions/packman/swapTsScriptsDependency.mjs.map +1 -0
  197. package/dist/actions/publint.mjs +748 -0
  198. package/dist/actions/publint.mjs.map +1 -0
  199. package/dist/actions/publish.mjs +208 -0
  200. package/dist/actions/publish.mjs.map +1 -0
  201. package/dist/actions/reactTest.mjs +142 -0
  202. package/dist/actions/reactTest.mjs.map +1 -0
  203. package/dist/actions/readme-gen.mjs +362 -0
  204. package/dist/actions/readme-gen.mjs.map +1 -0
  205. package/dist/actions/readme-init.mjs +89 -0
  206. package/dist/actions/readme-init.mjs.map +1 -0
  207. package/dist/actions/readme-lint.mjs +147 -0
  208. package/dist/actions/readme-lint.mjs.map +1 -0
  209. package/dist/actions/rebuild.mjs +143 -0
  210. package/dist/actions/rebuild.mjs.map +1 -0
  211. package/dist/actions/recompile.mjs +196 -0
  212. package/dist/actions/recompile.mjs.map +1 -0
  213. package/dist/actions/reinstall.mjs +283 -0
  214. package/dist/actions/reinstall.mjs.map +1 -0
  215. package/dist/actions/relint.mjs +355 -0
  216. package/dist/actions/relint.mjs.map +1 -0
  217. package/dist/actions/repo-init.mjs +217 -0
  218. package/dist/actions/repo-init.mjs.map +1 -0
  219. package/dist/actions/retest.mjs +150 -0
  220. package/dist/actions/retest.mjs.map +1 -0
  221. package/dist/actions/sitemap.mjs +121 -0
  222. package/dist/actions/sitemap.mjs.map +1 -0
  223. package/dist/actions/sonar.mjs +119 -0
  224. package/dist/actions/sonar.mjs.map +1 -0
  225. package/dist/actions/start.mjs +142 -0
  226. package/dist/actions/start.mjs.map +1 -0
  227. package/dist/actions/statics.mjs +225 -0
  228. package/dist/actions/statics.mjs.map +1 -0
  229. package/dist/actions/test.mjs +144 -0
  230. package/dist/actions/test.mjs.map +1 -0
  231. package/dist/actions/up.mjs +140 -0
  232. package/dist/actions/up.mjs.map +1 -0
  233. package/dist/actions/updo.mjs +533 -0
  234. package/dist/actions/updo.mjs.map +1 -0
  235. package/dist/actions/upplug.mjs +124 -0
  236. package/dist/actions/upplug.mjs.map +1 -0
  237. package/dist/actions/upyarn.mjs +119 -0
  238. package/dist/actions/upyarn.mjs.map +1 -0
  239. package/dist/actions/yarn3only.mjs +60 -0
  240. package/dist/actions/yarn3only.mjs.map +1 -0
  241. package/dist/bin/package/build-only.mjs +451 -0
  242. package/dist/bin/package/build-only.mjs.map +1 -0
  243. package/dist/bin/package/build.mjs +451 -0
  244. package/dist/bin/package/build.mjs.map +1 -0
  245. package/dist/bin/package/clean-outputs.mjs +50 -0
  246. package/dist/bin/package/clean-outputs.mjs.map +1 -0
  247. package/dist/bin/package/clean-typescript.mjs +50 -0
  248. package/dist/bin/package/clean-typescript.mjs.map +1 -0
  249. package/dist/bin/package/clean.mjs +75 -0
  250. package/dist/bin/package/clean.mjs.map +1 -0
  251. package/dist/bin/package/compile-only.mjs +447 -0
  252. package/dist/bin/package/compile-only.mjs.map +1 -0
  253. package/dist/bin/package/compile-tsup.mjs +409 -0
  254. package/dist/bin/package/compile-tsup.mjs.map +1 -0
  255. package/dist/bin/package/compile.mjs +451 -0
  256. package/dist/bin/package/compile.mjs.map +1 -0
  257. package/dist/bin/package/copy-assets-cjs.mjs +75 -0
  258. package/dist/bin/package/copy-assets-cjs.mjs.map +1 -0
  259. package/dist/bin/package/copy-assets-esm.mjs +75 -0
  260. package/dist/bin/package/copy-assets-esm.mjs.map +1 -0
  261. package/dist/bin/package/cycle.mjs +72 -0
  262. package/dist/bin/package/cycle.mjs.map +1 -0
  263. package/dist/bin/package/fix.mjs +97 -0
  264. package/dist/bin/package/fix.mjs.map +1 -0
  265. package/dist/bin/package/gen-docs.mjs +142 -0
  266. package/dist/bin/package/gen-docs.mjs.map +1 -0
  267. package/dist/bin/package/lint-verbose.mjs +97 -0
  268. package/dist/bin/package/lint-verbose.mjs.map +1 -0
  269. package/dist/bin/package/lint.mjs +97 -0
  270. package/dist/bin/package/lint.mjs.map +1 -0
  271. package/dist/bin/package/publint.mjs +423 -0
  272. package/dist/bin/package/publint.mjs.map +1 -0
  273. package/dist/bin/package/recompile.mjs +516 -0
  274. package/dist/bin/package/recompile.mjs.map +1 -0
  275. package/dist/bin/package/relint.mjs +97 -0
  276. package/dist/bin/package/relint.mjs.map +1 -0
  277. package/dist/bin/run-or-exec.mjs +20 -0
  278. package/dist/bin/run-or-exec.mjs.map +1 -0
  279. package/dist/bin/xy.mjs +8885 -0
  280. package/dist/bin/xy.mjs.map +1 -0
  281. package/dist/index.d.ts +1102 -0
  282. package/dist/index.mjs +9986 -0
  283. package/dist/index.mjs.map +1 -0
  284. package/dist/lib/checkResult.mjs +16 -0
  285. package/dist/lib/checkResult.mjs.map +1 -0
  286. package/dist/lib/claudeMdTemplate.mjs +69 -0
  287. package/dist/lib/claudeMdTemplate.mjs.map +1 -0
  288. package/dist/lib/concurrency.mjs +38 -0
  289. package/dist/lib/concurrency.mjs.map +1 -0
  290. package/dist/lib/createBuildConfig.mjs +55 -0
  291. package/dist/lib/createBuildConfig.mjs.map +1 -0
  292. package/dist/lib/defaultBuildConfig.mjs +23 -0
  293. package/dist/lib/defaultBuildConfig.mjs.map +1 -0
  294. package/dist/lib/deleteGlob.mjs +13 -0
  295. package/dist/lib/deleteGlob.mjs.map +1 -0
  296. package/dist/lib/dependencies/DuplicateDetector.mjs +99 -0
  297. package/dist/lib/dependencies/DuplicateDetector.mjs.map +1 -0
  298. package/dist/lib/dependencies/detectDuplicateDependencies.mjs +203 -0
  299. package/dist/lib/dependencies/detectDuplicateDependencies.mjs.map +1 -0
  300. package/dist/lib/dependencies/index.mjs +281 -0
  301. package/dist/lib/dependencies/index.mjs.map +1 -0
  302. package/dist/lib/dependencies/workspaceCycles.mjs +79 -0
  303. package/dist/lib/dependencies/workspaceCycles.mjs.map +1 -0
  304. package/dist/lib/file/ReadFileSyncOptions.mjs +6 -0
  305. package/dist/lib/file/ReadFileSyncOptions.mjs.map +1 -0
  306. package/dist/lib/file/constants.mjs +8 -0
  307. package/dist/lib/file/constants.mjs.map +1 -0
  308. package/dist/lib/file/fileLines.mjs +32 -0
  309. package/dist/lib/file/fileLines.mjs.map +1 -0
  310. package/dist/lib/file/index.mjs +42 -0
  311. package/dist/lib/file/index.mjs.map +1 -0
  312. package/dist/lib/file/tryReadFileSync.mjs +14 -0
  313. package/dist/lib/file/tryReadFileSync.mjs.map +1 -0
  314. package/dist/lib/fillTemplate.mjs +8 -0
  315. package/dist/lib/fillTemplate.mjs.map +1 -0
  316. package/dist/lib/generateIgnoreFiles.mjs +86 -0
  317. package/dist/lib/generateIgnoreFiles.mjs.map +1 -0
  318. package/dist/lib/generateReadmeFiles.mjs +323 -0
  319. package/dist/lib/generateReadmeFiles.mjs.map +1 -0
  320. package/dist/lib/gitignoreTemplate.mjs +12 -0
  321. package/dist/lib/gitignoreTemplate.mjs.map +1 -0
  322. package/dist/lib/index.mjs +1627 -0
  323. package/dist/lib/index.mjs.map +1 -0
  324. package/dist/lib/initCwd.mjs +8 -0
  325. package/dist/lib/initCwd.mjs.map +1 -0
  326. package/dist/lib/jsonFormatters.mjs +11 -0
  327. package/dist/lib/jsonFormatters.mjs.map +1 -0
  328. package/dist/lib/latestVersions.mjs +12 -0
  329. package/dist/lib/latestVersions.mjs.map +1 -0
  330. package/dist/lib/loadConfig.mjs +72 -0
  331. package/dist/lib/loadConfig.mjs.map +1 -0
  332. package/dist/lib/packageName.mjs +26 -0
  333. package/dist/lib/packageName.mjs.map +1 -0
  334. package/dist/lib/parsedPackageJSON.mjs +11 -0
  335. package/dist/lib/parsedPackageJSON.mjs.map +1 -0
  336. package/dist/lib/processEx.mjs +36 -0
  337. package/dist/lib/processEx.mjs.map +1 -0
  338. package/dist/lib/repoTemplates.mjs +34 -0
  339. package/dist/lib/repoTemplates.mjs.map +1 -0
  340. package/dist/lib/runInstall.mjs +30 -0
  341. package/dist/lib/runInstall.mjs.map +1 -0
  342. package/dist/lib/runSteps.mjs +118 -0
  343. package/dist/lib/runSteps.mjs.map +1 -0
  344. package/dist/lib/runStepsAsync.mjs +136 -0
  345. package/dist/lib/runStepsAsync.mjs.map +1 -0
  346. package/dist/lib/runXy.mjs +147 -0
  347. package/dist/lib/runXy.mjs.map +1 -0
  348. package/dist/lib/runXyWithWarning.mjs +36 -0
  349. package/dist/lib/runXyWithWarning.mjs.map +1 -0
  350. package/dist/lib/safeExit.mjs +61 -0
  351. package/dist/lib/safeExit.mjs.map +1 -0
  352. package/dist/lib/string/empty.mjs +8 -0
  353. package/dist/lib/string/empty.mjs.map +1 -0
  354. package/dist/lib/string/index.mjs +12 -0
  355. package/dist/lib/string/index.mjs.map +1 -0
  356. package/dist/lib/string/union.mjs +6 -0
  357. package/dist/lib/string/union.mjs.map +1 -0
  358. package/dist/lib/tryRunLocalScript.mjs +57 -0
  359. package/dist/lib/tryRunLocalScript.mjs.map +1 -0
  360. package/dist/lib/updo/applyUpdates.mjs +44 -0
  361. package/dist/lib/updo/applyUpdates.mjs.map +1 -0
  362. package/dist/lib/updo/collectWorkspaceDeps.mjs +48 -0
  363. package/dist/lib/updo/collectWorkspaceDeps.mjs.map +1 -0
  364. package/dist/lib/updo/fetchRegistryInfo.mjs +53 -0
  365. package/dist/lib/updo/fetchRegistryInfo.mjs.map +1 -0
  366. package/dist/lib/updo/index.mjs +594 -0
  367. package/dist/lib/updo/index.mjs.map +1 -0
  368. package/dist/lib/updo/interactiveSelect.mjs +185 -0
  369. package/dist/lib/updo/interactiveSelect.mjs.map +1 -0
  370. package/dist/lib/updo/interfaces.mjs +1 -0
  371. package/dist/lib/updo/interfaces.mjs.map +1 -0
  372. package/dist/lib/updo/renderTable.mjs +79 -0
  373. package/dist/lib/updo/renderTable.mjs.map +1 -0
  374. package/dist/lib/updo/resolveVersions.mjs +49 -0
  375. package/dist/lib/updo/resolveVersions.mjs.map +1 -0
  376. package/dist/lib/updo/runUpdo.mjs +511 -0
  377. package/dist/lib/updo/runUpdo.mjs.map +1 -0
  378. package/dist/lib/withErrnoException.mjs +13 -0
  379. package/dist/lib/withErrnoException.mjs.map +1 -0
  380. package/dist/lib/withError.mjs +8 -0
  381. package/dist/lib/withError.mjs.map +1 -0
  382. package/dist/lib/yarn/index.mjs +39 -0
  383. package/dist/lib/yarn/index.mjs.map +1 -0
  384. package/dist/lib/yarn/isYarnVersionOrGreater.mjs +18 -0
  385. package/dist/lib/yarn/isYarnVersionOrGreater.mjs.map +1 -0
  386. package/dist/lib/yarn/workspace/Workspace.mjs +1 -0
  387. package/dist/lib/yarn/workspace/Workspace.mjs.map +1 -0
  388. package/dist/lib/yarn/workspace/index.mjs +23 -0
  389. package/dist/lib/yarn/workspace/index.mjs.map +1 -0
  390. package/dist/lib/yarn/workspace/yarnWorkspace.mjs +22 -0
  391. package/dist/lib/yarn/workspace/yarnWorkspace.mjs.map +1 -0
  392. package/dist/lib/yarn/workspace/yarnWorkspaces.mjs +15 -0
  393. package/dist/lib/yarn/workspace/yarnWorkspaces.mjs.map +1 -0
  394. package/dist/lib/yarn/yarnInitCwd.mjs +8 -0
  395. package/dist/lib/yarn/yarnInitCwd.mjs.map +1 -0
  396. package/dist/loadPackageConfig.mjs +18 -0
  397. package/dist/loadPackageConfig.mjs.map +1 -0
  398. package/dist/pm/PackageManager.mjs +1 -0
  399. package/dist/pm/PackageManager.mjs.map +1 -0
  400. package/dist/pm/detectPackageManager.mjs +10 -0
  401. package/dist/pm/detectPackageManager.mjs.map +1 -0
  402. package/dist/pm/detectReact.mjs +52 -0
  403. package/dist/pm/detectReact.mjs.map +1 -0
  404. package/dist/pm/index.mjs +263 -0
  405. package/dist/pm/index.mjs.map +1 -0
  406. package/dist/pm/pnpmPackageManager.mjs +97 -0
  407. package/dist/pm/pnpmPackageManager.mjs.map +1 -0
  408. package/dist/pm/registry.mjs +27 -0
  409. package/dist/pm/registry.mjs.map +1 -0
  410. package/dist/pm/yarnPackageManager.mjs +112 -0
  411. package/dist/pm/yarnPackageManager.mjs.map +1 -0
  412. package/dist/types.d.mjs +1 -0
  413. package/dist/types.d.mjs.map +1 -0
  414. package/dist/xy/build/buildCommand.mjs +194 -0
  415. package/dist/xy/build/buildCommand.mjs.map +1 -0
  416. package/dist/xy/build/compileCommand.mjs +203 -0
  417. package/dist/xy/build/compileCommand.mjs.map +1 -0
  418. package/dist/xy/build/compileOnlyCommand.mjs +204 -0
  419. package/dist/xy/build/compileOnlyCommand.mjs.map +1 -0
  420. package/dist/xy/build/copyAssetsCommand.mjs +92 -0
  421. package/dist/xy/build/copyAssetsCommand.mjs.map +1 -0
  422. package/dist/xy/build/index.mjs +487 -0
  423. package/dist/xy/build/index.mjs.map +1 -0
  424. package/dist/xy/build/rebuildCommand.mjs +156 -0
  425. package/dist/xy/build/rebuildCommand.mjs.map +1 -0
  426. package/dist/xy/build/recompileCommand.mjs +215 -0
  427. package/dist/xy/build/recompileCommand.mjs.map +1 -0
  428. package/dist/xy/common/checkCommand.mjs +1909 -0
  429. package/dist/xy/common/checkCommand.mjs.map +1 -0
  430. package/dist/xy/common/claude/checkCommand.mjs +207 -0
  431. package/dist/xy/common/claude/checkCommand.mjs.map +1 -0
  432. package/dist/xy/common/claude/cleanCommand.mjs +78 -0
  433. package/dist/xy/common/claude/cleanCommand.mjs.map +1 -0
  434. package/dist/xy/common/claude/commandsCommand.mjs +134 -0
  435. package/dist/xy/common/claude/commandsCommand.mjs.map +1 -0
  436. package/dist/xy/common/claude/index.mjs +734 -0
  437. package/dist/xy/common/claude/index.mjs.map +1 -0
  438. package/dist/xy/common/claude/initCommand.mjs +458 -0
  439. package/dist/xy/common/claude/initCommand.mjs.map +1 -0
  440. package/dist/xy/common/claude/rulesCommand.mjs +167 -0
  441. package/dist/xy/common/claude/rulesCommand.mjs.map +1 -0
  442. package/dist/xy/common/claude/settingsCommand.mjs +115 -0
  443. package/dist/xy/common/claude/settingsCommand.mjs.map +1 -0
  444. package/dist/xy/common/claude/skillsCommand.mjs +140 -0
  445. package/dist/xy/common/claude/skillsCommand.mjs.map +1 -0
  446. package/dist/xy/common/cleanDocsCommand.mjs +74 -0
  447. package/dist/xy/common/cleanDocsCommand.mjs.map +1 -0
  448. package/dist/xy/common/deadCommand.mjs +137 -0
  449. package/dist/xy/common/deadCommand.mjs.map +1 -0
  450. package/dist/xy/common/genDocsCommand.mjs +175 -0
  451. package/dist/xy/common/genDocsCommand.mjs.map +1 -0
  452. package/dist/xy/common/gitignoreCommand.mjs +165 -0
  453. package/dist/xy/common/gitignoreCommand.mjs.map +1 -0
  454. package/dist/xy/common/gitlintCommand.mjs +89 -0
  455. package/dist/xy/common/gitlintCommand.mjs.map +1 -0
  456. package/dist/xy/common/index.mjs +4654 -0
  457. package/dist/xy/common/index.mjs.map +1 -0
  458. package/dist/xy/common/licenseCommand.mjs +108 -0
  459. package/dist/xy/common/licenseCommand.mjs.map +1 -0
  460. package/dist/xy/common/npmignoreGenCommand.mjs +100 -0
  461. package/dist/xy/common/npmignoreGenCommand.mjs.map +1 -0
  462. package/dist/xy/common/orphan/cleanCommand.mjs +102 -0
  463. package/dist/xy/common/orphan/cleanCommand.mjs.map +1 -0
  464. package/dist/xy/common/orphan/index.mjs +138 -0
  465. package/dist/xy/common/orphan/index.mjs.map +1 -0
  466. package/dist/xy/common/orphan/listCommand.mjs +100 -0
  467. package/dist/xy/common/orphan/listCommand.mjs.map +1 -0
  468. package/dist/xy/common/packmanCommand.mjs +1538 -0
  469. package/dist/xy/common/packmanCommand.mjs.map +1 -0
  470. package/dist/xy/common/readme/genCommand.mjs +395 -0
  471. package/dist/xy/common/readme/genCommand.mjs.map +1 -0
  472. package/dist/xy/common/readme/index.mjs +538 -0
  473. package/dist/xy/common/readme/index.mjs.map +1 -0
  474. package/dist/xy/common/readme/initCommand.mjs +109 -0
  475. package/dist/xy/common/readme/initCommand.mjs.map +1 -0
  476. package/dist/xy/common/readme/lintCommand.mjs +181 -0
  477. package/dist/xy/common/readme/lintCommand.mjs.map +1 -0
  478. package/dist/xy/common/repo/index.mjs +1070 -0
  479. package/dist/xy/common/repo/index.mjs.map +1 -0
  480. package/dist/xy/common/repo/initCommand.mjs +273 -0
  481. package/dist/xy/common/repo/initCommand.mjs.map +1 -0
  482. package/dist/xy/common/repo/lintCommand.mjs +789 -0
  483. package/dist/xy/common/repo/lintCommand.mjs.map +1 -0
  484. package/dist/xy/common/retestCommand.mjs +163 -0
  485. package/dist/xy/common/retestCommand.mjs.map +1 -0
  486. package/dist/xy/common/testCommand.mjs +157 -0
  487. package/dist/xy/common/testCommand.mjs.map +1 -0
  488. package/dist/xy/deploy/deployCommand.mjs +214 -0
  489. package/dist/xy/deploy/deployCommand.mjs.map +1 -0
  490. package/dist/xy/deploy/index.mjs +289 -0
  491. package/dist/xy/deploy/index.mjs.map +1 -0
  492. package/dist/xy/deploy/publishCommand.mjs +218 -0
  493. package/dist/xy/deploy/publishCommand.mjs.map +1 -0
  494. package/dist/xy/index.mjs +8887 -0
  495. package/dist/xy/index.mjs.map +1 -0
  496. package/dist/xy/install/cleanCommand.mjs +182 -0
  497. package/dist/xy/install/cleanCommand.mjs.map +1 -0
  498. package/dist/xy/install/dupdepsCommand.mjs +234 -0
  499. package/dist/xy/install/dupdepsCommand.mjs.map +1 -0
  500. package/dist/xy/install/index.mjs +1006 -0
  501. package/dist/xy/install/index.mjs.map +1 -0
  502. package/dist/xy/install/reinstallCommand.mjs +292 -0
  503. package/dist/xy/install/reinstallCommand.mjs.map +1 -0
  504. package/dist/xy/install/staticsCommand.mjs +233 -0
  505. package/dist/xy/install/staticsCommand.mjs.map +1 -0
  506. package/dist/xy/install/upCommand.mjs +150 -0
  507. package/dist/xy/install/upCommand.mjs.map +1 -0
  508. package/dist/xy/install/updoCommand.mjs +550 -0
  509. package/dist/xy/install/updoCommand.mjs.map +1 -0
  510. package/dist/xy/lint/cycleCommand.mjs +289 -0
  511. package/dist/xy/lint/cycleCommand.mjs.map +1 -0
  512. package/dist/xy/lint/deplintCommand.mjs +1897 -0
  513. package/dist/xy/lint/deplintCommand.mjs.map +1 -0
  514. package/dist/xy/lint/fixCommand.mjs +398 -0
  515. package/dist/xy/lint/fixCommand.mjs.map +1 -0
  516. package/dist/xy/lint/index.mjs +3759 -0
  517. package/dist/xy/lint/index.mjs.map +1 -0
  518. package/dist/xy/lint/knipCommand.mjs +142 -0
  519. package/dist/xy/lint/knipCommand.mjs.map +1 -0
  520. package/dist/xy/lint/lint/index.mjs +695 -0
  521. package/dist/xy/lint/lint/index.mjs.map +1 -0
  522. package/dist/xy/lint/lint/initCommand.mjs +282 -0
  523. package/dist/xy/lint/lint/initCommand.mjs.map +1 -0
  524. package/dist/xy/lint/lint/runCommand.mjs +405 -0
  525. package/dist/xy/lint/lint/runCommand.mjs.map +1 -0
  526. package/dist/xy/lint/lintCommand.mjs +695 -0
  527. package/dist/xy/lint/lintCommand.mjs.map +1 -0
  528. package/dist/xy/lint/lintlintCommand.mjs +359 -0
  529. package/dist/xy/lint/lintlintCommand.mjs.map +1 -0
  530. package/dist/xy/lint/publintCommand.mjs +778 -0
  531. package/dist/xy/lint/publintCommand.mjs.map +1 -0
  532. package/dist/xy/lint/relintCommand.mjs +381 -0
  533. package/dist/xy/lint/relintCommand.mjs.map +1 -0
  534. package/dist/xy/lint/sonarCommand.mjs +137 -0
  535. package/dist/xy/lint/sonarCommand.mjs.map +1 -0
  536. package/dist/xy/param.mjs +8 -0
  537. package/dist/xy/param.mjs.map +1 -0
  538. package/dist/xy/react/analyzeCommand.mjs +150 -0
  539. package/dist/xy/react/analyzeCommand.mjs.map +1 -0
  540. package/dist/xy/react/ejectCommand.mjs +150 -0
  541. package/dist/xy/react/ejectCommand.mjs.map +1 -0
  542. package/dist/xy/react/index.mjs +202 -0
  543. package/dist/xy/react/index.mjs.map +1 -0
  544. package/dist/xy/react/sitemapCommand.mjs +129 -0
  545. package/dist/xy/react/sitemapCommand.mjs.map +1 -0
  546. package/dist/xy/react/startCommand.mjs +150 -0
  547. package/dist/xy/react/startCommand.mjs.map +1 -0
  548. package/dist/xy/xy.mjs +8879 -0
  549. package/dist/xy/xy.mjs.map +1 -0
  550. package/dist/xy/xyParseOptions.mjs +117 -0
  551. package/dist/xy/xyParseOptions.mjs.map +1 -0
  552. package/dist/xy/yarn/index.mjs +188 -0
  553. package/dist/xy/yarn/index.mjs.map +1 -0
  554. package/dist/xy/yarn/upplugCommand.mjs +134 -0
  555. package/dist/xy/yarn/upplugCommand.mjs.map +1 -0
  556. package/dist/xy/yarn/upyarnCommand.mjs +129 -0
  557. package/dist/xy/yarn/upyarnCommand.mjs.map +1 -0
  558. package/dist/xy/yarn/yarn3OnlyCommand.mjs +70 -0
  559. package/dist/xy/yarn/yarn3OnlyCommand.mjs.map +1 -0
  560. package/package.json +119 -0
  561. package/templates/claude/CLAUDE-local.md +4 -0
  562. package/templates/claude/CLAUDE-project.md +4 -0
  563. package/templates/claude/commands/xy-build.md +7 -0
  564. package/templates/claude/commands/xy-clean.md +7 -0
  565. package/templates/claude/commands/xy-compile.md +7 -0
  566. package/templates/claude/commands/xy-cycle.md +7 -0
  567. package/templates/claude/commands/xy-dead.md +7 -0
  568. package/templates/claude/commands/xy-deplint.md +7 -0
  569. package/templates/claude/commands/xy-deps.md +24 -0
  570. package/templates/claude/commands/xy-dupdeps.md +7 -0
  571. package/templates/claude/commands/xy-fix.md +7 -0
  572. package/templates/claude/commands/xy-gen-docs.md +7 -0
  573. package/templates/claude/commands/xy-gitignore.md +7 -0
  574. package/templates/claude/commands/xy-gitlint.md +7 -0
  575. package/templates/claude/commands/xy-knip.md +7 -0
  576. package/templates/claude/commands/xy-license.md +7 -0
  577. package/templates/claude/commands/xy-lint-rules.md +44 -0
  578. package/templates/claude/commands/xy-lint.md +7 -0
  579. package/templates/claude/commands/xy-publint.md +7 -0
  580. package/templates/claude/commands/xy-rebuild.md +7 -0
  581. package/templates/claude/commands/xy-recompile.md +7 -0
  582. package/templates/claude/commands/xy-reinstall.md +7 -0
  583. package/templates/claude/commands/xy-relint.md +7 -0
  584. package/templates/claude/commands/xy-retest.md +7 -0
  585. package/templates/claude/commands/xy-sonar.md +7 -0
  586. package/templates/claude/commands/xy-test.md +7 -0
  587. package/templates/claude/commands/xy-up.md +9 -0
  588. package/templates/claude/rules/xylabs-architecture.md +8 -0
  589. package/templates/claude/rules/xylabs-git-workflow.md +7 -0
  590. package/templates/claude/rules/xylabs-naming.md +7 -0
  591. package/templates/claude/rules/xylabs-style.md +17 -0
  592. package/templates/claude/skills/xylabs-e2e-setup/SKILL.md +223 -0
  593. package/templates/claude/skills/xylabs-xy-cli/SKILL.md +236 -0
  594. package/templates/claude/skills/xylabs-xy-deplint-fix/SKILL.md +122 -0
  595. package/templates/gitignore/gitignore/template.gitignore +51 -0
  596. package/templates/gitignore/template.gitignore +51 -0
  597. package/templates/readme/README.body.md +25 -0
  598. package/templates/readme/README.template.md +22 -0
  599. package/templates/repo/cli/package/package.json.tmpl +63 -0
  600. package/templates/repo/cli/package/src/__packageName__.ts.tmpl +21 -0
  601. package/templates/repo/cli/package/src/actions/index.ts +1 -0
  602. package/templates/repo/cli/package/src/actions/printVersion.ts.tmpl +8 -0
  603. package/templates/repo/cli/package/src/bin/__packageName__.ts.tmpl +12 -0
  604. package/templates/repo/cli/package/src/commands/index.ts +1 -0
  605. package/templates/repo/cli/package/src/commands/versionCommand.ts.tmpl +11 -0
  606. package/templates/repo/cli/package/src/index.ts.tmpl +1 -0
  607. package/templates/repo/cli/package/tsconfig.build.json +25 -0
  608. package/templates/repo/cli/package/tsconfig.json +4 -0
  609. package/templates/repo/cli/package/tsup.config.ts +15 -0
  610. package/templates/repo/cli/package/xy.config.ts +3 -0
  611. package/templates/repo/cli/root/CLAUDE.md.tmpl +38 -0
  612. package/templates/repo/cli/root/cspell.json.tmpl +13 -0
  613. package/templates/repo/cli/root/eslint.config.ts +28 -0
  614. package/templates/repo/cli/root/github/workflows/build-pnpm.yml.tmpl +34 -0
  615. package/templates/repo/cli/root/github/workflows/build-yarn.yml.tmpl +32 -0
  616. package/templates/repo/cli/root/gitignore.tmpl +47 -0
  617. package/templates/repo/cli/root/knip.config.ts +16 -0
  618. package/templates/repo/cli/root/package.json.tmpl +54 -0
  619. package/templates/repo/cli/root/pnpm-workspace.yaml +2 -0
  620. package/templates/repo/cli/root/tsconfig.json +4 -0
  621. package/templates/repo/cli/root/vitest.config.ts +31 -0
  622. package/templates/repo/cli/root/xy.config.ts.tmpl +5 -0
@@ -0,0 +1,1102 @@
1
+ import { SpawnSyncOptionsWithBufferEncoding } from 'node:child_process';
2
+ import { Options } from 'tsup';
3
+ import { CompilerOptions } from 'typescript';
4
+ import { AsyncLocalStorage } from 'node:async_hooks';
5
+ import { PathLike, WriteFileOptions } from 'node:fs';
6
+ import { PackageJson } from 'types-package-json';
7
+ import { Argv } from 'yargs';
8
+
9
+ declare const analyze: () => number;
10
+
11
+ interface BuildParams {
12
+ incremental?: boolean;
13
+ jobs: number;
14
+ pkg?: string;
15
+ target?: 'esm' | 'cjs';
16
+ verbose?: boolean;
17
+ }
18
+ declare const build: ({ incremental, jobs, target, verbose, pkg, }: BuildParams) => Promise<number>;
19
+
20
+ declare function claudeCheck(): number;
21
+
22
+ declare function claudeClean(): number;
23
+
24
+ declare const claudeCommands: () => number;
25
+
26
+ declare const claudeRules: ({ force }?: {
27
+ force?: boolean;
28
+ }) => number;
29
+
30
+ type SettingsLevel = 'restrictive' | 'permissive';
31
+ declare function claudeSettings({ level }?: {
32
+ level?: SettingsLevel;
33
+ }): Promise<number>;
34
+
35
+ declare const claudeSkills: () => number;
36
+
37
+ interface CleanParams {
38
+ pkg?: string;
39
+ verbose?: boolean;
40
+ }
41
+ interface CleanPackageParams {
42
+ pkg: string;
43
+ verbose?: boolean;
44
+ }
45
+ declare const clean: ({ verbose, pkg }: CleanParams) => Promise<number>;
46
+ declare const cleanPackage: ({ pkg }: CleanPackageParams) => Promise<number>;
47
+ declare const cleanAll: ({ verbose }: CleanParams) => Promise<number>;
48
+
49
+ declare const cleanDocs: () => number;
50
+
51
+ declare const cleanESLint: () => number;
52
+
53
+ interface CompileParams {
54
+ incremental?: boolean;
55
+ jobs: number;
56
+ pkg?: string;
57
+ publint?: boolean;
58
+ target?: 'esm' | 'cjs';
59
+ verbose?: boolean;
60
+ }
61
+ interface CompilePackageParams {
62
+ pkg: string;
63
+ publint?: boolean;
64
+ target?: 'esm' | 'cjs';
65
+ verbose?: boolean;
66
+ }
67
+ declare const compile: ({ verbose, target, pkg, incremental, publint, jobs, }: CompileParams) => number;
68
+ declare const compilePackage: ({ target, pkg }: CompilePackageParams) => number;
69
+ declare const compileAll: ({ jobs, verbose, target, incremental, }: CompileParams) => number;
70
+
71
+ interface CopyAssetsParams {
72
+ pkg?: string;
73
+ target?: 'esm' | 'cjs';
74
+ }
75
+ declare const copyAssets: ({ target, pkg }: CopyAssetsParams) => Promise<0 | 1>;
76
+
77
+ interface CycleParams {
78
+ incremental?: boolean;
79
+ jobs: number;
80
+ pkg?: string;
81
+ verbose?: boolean;
82
+ }
83
+ interface CyclePackageParams {
84
+ pkg: string;
85
+ verbose?: boolean;
86
+ }
87
+ declare const cycle: ({ verbose, pkg }: CycleParams) => Promise<number>;
88
+ declare const cyclePackage: ({ pkg, verbose }: CyclePackageParams) => number;
89
+ declare const cycleAll: ({ verbose }: {
90
+ verbose?: boolean;
91
+ }) => Promise<number>;
92
+
93
+ declare const dead: () => number;
94
+
95
+ interface DepLintOptions {
96
+ /** Package names to exclude, passed via --exclude on the command line */
97
+ cliExclude?: string[];
98
+ deps?: boolean;
99
+ devDeps?: boolean;
100
+ fix?: boolean;
101
+ format?: 'human' | 'json';
102
+ peerDeps?: boolean;
103
+ pkg?: string;
104
+ verbose?: boolean;
105
+ }
106
+ declare const deplint: ({ pkg, deps, devDeps, fix, peerDeps, verbose, cliExclude, format, }: DepLintOptions) => Promise<0 | 1>;
107
+
108
+ type PackageManagerName = 'pnpm' | 'yarn';
109
+ declare function detectPackageManager(): PackageManagerName;
110
+
111
+ declare function detectReact(): boolean;
112
+
113
+ interface Workspace {
114
+ location: string;
115
+ name: string;
116
+ }
117
+ type ScriptStep = [/* command */ string, /* arg */ /* arg */ string | string[]] | [/* command */ string, /* arg */ /* arg */ string | string[], /* config */ SpawnSyncOptionsWithBufferEncoding];
118
+ interface WorkspaceForeachOptions {
119
+ incremental?: boolean;
120
+ jobs: number;
121
+ topological?: boolean;
122
+ verbose?: boolean;
123
+ }
124
+ interface PackageManager {
125
+ /** The shell command to invoke this package manager (e.g., 'yarn', 'pnpm') */
126
+ command: string;
127
+ /** The lockfile name (e.g., 'yarn.lock', 'pnpm-lock.yaml') */
128
+ lockfile: string;
129
+ /** Package manager identifier */
130
+ name: 'pnpm' | 'yarn';
131
+ /** Remove duplicate dependencies */
132
+ dedupe(): ScriptStep;
133
+ /** Find a single workspace by name */
134
+ findWorkspace(name: string): Workspace | undefined;
135
+ /** Run a foreach command across all workspaces */
136
+ foreachWorkspace(script: string, args: string[], options: WorkspaceForeachOptions): ScriptStep;
137
+ /** Install dependencies */
138
+ install(): ScriptStep;
139
+ /** Returns a map of package name -> installed version for all dependencies across all workspaces */
140
+ listInstalledVersions(): Map<string, string>;
141
+ /** List all workspaces */
142
+ listWorkspaces(): Workspace[];
143
+ /** Show outdated dependencies */
144
+ outdated(): ScriptStep;
145
+ /** Publish all packages to the registry */
146
+ publish(): ScriptStep;
147
+ /** Run a script in a specific workspace */
148
+ runInWorkspace(pkg: string, script: string, args?: string[]): ScriptStep;
149
+ /** Run the xy CLI command */
150
+ runXy(args: string[]): ScriptStep;
151
+ /** Apply version changes */
152
+ versionApply(): ScriptStep;
153
+ /** Bump versions across workspaces */
154
+ versionBump(type: 'major' | 'minor' | 'patch' | 'prerelease'): ScriptStep[];
155
+ }
156
+
157
+ declare class PnpmPackageManager implements PackageManager {
158
+ readonly command = "pnpm";
159
+ readonly lockfile = "pnpm-lock.yaml";
160
+ readonly name: "pnpm";
161
+ dedupe(): ScriptStep;
162
+ findWorkspace(name: string): Workspace | undefined;
163
+ foreachWorkspace(script: string, args: string[] | undefined, options: WorkspaceForeachOptions): ScriptStep;
164
+ install(): ScriptStep;
165
+ listInstalledVersions(): Map<string, string>;
166
+ listWorkspaces(): Workspace[];
167
+ outdated(): ScriptStep;
168
+ publish(): ScriptStep;
169
+ runInWorkspace(pkg: string, script: string, args?: string[]): ScriptStep;
170
+ runXy(args: string[]): ScriptStep;
171
+ versionApply(): ScriptStep;
172
+ versionBump(type: 'major' | 'minor' | 'patch' | 'prerelease'): ScriptStep[];
173
+ }
174
+
175
+ declare function registerPackageManager(pm: PackageManager): void;
176
+ declare function getPackageManager(name?: PackageManagerName): PackageManager;
177
+
178
+ declare class YarnPackageManager implements PackageManager {
179
+ readonly command = "yarn";
180
+ readonly lockfile = "yarn.lock";
181
+ readonly name: "yarn";
182
+ dedupe(): ScriptStep;
183
+ findWorkspace(name: string): Workspace | undefined;
184
+ foreachWorkspace(script: string, args: string[] | undefined, options: WorkspaceForeachOptions): ScriptStep;
185
+ install(): ScriptStep;
186
+ listInstalledVersions(): Map<string, string>;
187
+ listWorkspaces(): Workspace[];
188
+ outdated(): ScriptStep;
189
+ publish(): ScriptStep;
190
+ runInWorkspace(pkg: string, script: string, args?: string[]): ScriptStep;
191
+ runXy(args: string[]): ScriptStep;
192
+ versionApply(): ScriptStep;
193
+ versionBump(type: 'major' | 'minor' | 'patch' | 'prerelease'): ScriptStep[];
194
+ }
195
+
196
+ interface CheckPackageParams {
197
+ dependencies: string[];
198
+ dependencyVersions: Record<string, string>;
199
+ devDependencies: string[];
200
+ devDependencyVersions: Record<string, string>;
201
+ peerDependencies: string[];
202
+ peerDependencyVersions: Record<string, string>;
203
+ }
204
+ interface CheckSourceParams {
205
+ allImportPaths: Record<string, string[]>;
206
+ allImports: string[];
207
+ distImportPaths: Record<string, string[]>;
208
+ distImports: string[];
209
+ externalAllImports: string[];
210
+ externalDistImports: string[];
211
+ externalDistTypeImports: string[];
212
+ tsconfigExtends: string[];
213
+ }
214
+
215
+ interface FileContext {
216
+ allFiles: string[];
217
+ distFiles: string[];
218
+ }
219
+
220
+ type DeplintSeverity = 'error' | 'warning';
221
+ type DeplintSection = 'dependencies' | 'devDependencies' | 'peerDependencies';
222
+ type DeplintFix = {
223
+ action: 'add';
224
+ dependency: string;
225
+ detail: string;
226
+ section: DeplintSection;
227
+ version: string;
228
+ } | {
229
+ action: 'move';
230
+ dependency: string;
231
+ detail: string;
232
+ fromSection: DeplintSection;
233
+ toSection: DeplintSection;
234
+ version?: string;
235
+ } | {
236
+ action: 'remove';
237
+ dependency: string;
238
+ detail: string;
239
+ section: DeplintSection;
240
+ } | {
241
+ action: 'set-version';
242
+ dependency: string;
243
+ detail: string;
244
+ section: DeplintSection;
245
+ version: string;
246
+ };
247
+ interface DeplintDiagnostic {
248
+ dependency?: string;
249
+ evidence?: string[];
250
+ file: string;
251
+ fixes?: DeplintFix[];
252
+ id: string;
253
+ message: string;
254
+ severity: DeplintSeverity;
255
+ workspace: Workspace;
256
+ }
257
+ interface DeplintWorkspaceContext {
258
+ exclude?: Set<string>;
259
+ fileContext: FileContext;
260
+ /** Packages that must stay in `dependencies` (never promoted to peerDependencies). */
261
+ forceDeps: Set<string>;
262
+ /** Packages that must be in `peerDependencies` (moved from dependencies if needed). */
263
+ forcePeers: Set<string>;
264
+ isTerminalPackage: boolean;
265
+ packageJsonPath: string;
266
+ packageParams: CheckPackageParams;
267
+ sourceParams: CheckSourceParams;
268
+ unusedDependencyExclude: Set<string>;
269
+ workspace: Workspace;
270
+ workspaceNames?: Set<string>;
271
+ }
272
+ interface DeplintRule {
273
+ category: 'dependencies' | 'devDependencies' | 'peerDependencies';
274
+ evaluate: (context: DeplintWorkspaceContext) => DeplintDiagnostic[];
275
+ id: string;
276
+ }
277
+ interface DeplintRunOptions {
278
+ /** Package names passed via --exclude on the CLI (merged with config). */
279
+ cliExclude?: string[];
280
+ deps?: boolean;
281
+ devDeps?: boolean;
282
+ fix?: boolean;
283
+ peerDeps?: boolean;
284
+ pkg?: string;
285
+ reporter?: 'human' | 'json';
286
+ verbose?: boolean;
287
+ }
288
+ interface DeplintAppliedFix {
289
+ dependency: string;
290
+ detail: string;
291
+ workspace: Workspace;
292
+ }
293
+ interface DeplintSummary {
294
+ appliedFixes: number;
295
+ errorCount: number;
296
+ warningCount: number;
297
+ workspacesChecked: number;
298
+ }
299
+ interface DeplintRunResult {
300
+ appliedFixes: DeplintAppliedFix[];
301
+ diagnostics: DeplintDiagnostic[];
302
+ summary: DeplintSummary;
303
+ }
304
+ interface DeplintReporter {
305
+ render: (result: DeplintRunResult) => void;
306
+ }
307
+
308
+ declare function runDeplint(workspaces: Workspace[], options: DeplintRunOptions, workspaceNames?: Set<string>): Promise<DeplintRunResult>;
309
+
310
+ declare function applyDeplintFixes(diagnostics: DeplintDiagnostic[]): DeplintAppliedFix[];
311
+
312
+ declare class DeplintPackageEditor {
313
+ private readonly workspace;
314
+ private readonly pkg;
315
+ constructor(workspace: Workspace);
316
+ applyFix(fix: DeplintFix): DeplintAppliedFix;
317
+ save(): void;
318
+ }
319
+
320
+ declare const humanDeplintReporter: DeplintReporter;
321
+ declare const jsonDeplintReporter: DeplintReporter;
322
+ declare function getDeplintReporter(format: 'human' | 'json'): DeplintReporter;
323
+
324
+ declare const deplintRules: DeplintRule[];
325
+
326
+ declare function buildWorkspaceContext(workspace: Workspace, exclude?: Set<string>, workspaceNames?: Set<string>, forceDeps?: Set<string>, forcePeers?: Set<string>): DeplintWorkspaceContext;
327
+
328
+ type DeployLevel = 'major' | 'minor' | 'patch' | 'prerelease';
329
+ declare function deploy(level?: DeployLevel): number;
330
+
331
+ declare const dupdeps: () => number;
332
+
333
+ declare const eject: () => number;
334
+
335
+ interface LintParams {
336
+ cache?: boolean;
337
+ fix?: boolean;
338
+ incremental?: boolean;
339
+ jobs: number;
340
+ next?: boolean;
341
+ pkg?: string;
342
+ verbose?: boolean;
343
+ }
344
+ interface LintPackageParams {
345
+ pkg: string;
346
+ verbose?: boolean;
347
+ }
348
+ declare const lintPackage: ({ pkg, fix, verbose, }: {
349
+ fix?: boolean;
350
+ pkg: string;
351
+ verbose?: boolean;
352
+ }) => number;
353
+ declare const lint: ({ cache, fix, jobs, next, pkg, verbose, }: LintParams) => number | Promise<number>;
354
+ declare const lintAllPackages: ({ fix }?: {
355
+ fix?: boolean;
356
+ }) => number;
357
+
358
+ declare const fix: (params: LintParams) => number | Promise<number>;
359
+
360
+ interface GenDocsParams {
361
+ incremental?: boolean;
362
+ jobs: number;
363
+ pkg?: string;
364
+ }
365
+ interface GenDocsPackageParams {
366
+ pkg: string;
367
+ }
368
+ declare const genDocs: ({ jobs, pkg, incremental, }: GenDocsParams) => number;
369
+ declare const genDocsPackage: ({ pkg }: GenDocsPackageParams) => number;
370
+ declare const genDocsAll: ({ incremental, jobs }: GenDocsParams) => number;
371
+
372
+ /** @deprecated Use gitignore instead */
373
+ declare const gitignoreGen: typeof gitignore;
374
+ declare function gitignore(): number;
375
+
376
+ declare const gitlint: () => 0 | 1;
377
+
378
+ declare const gitlintFix: () => number;
379
+
380
+ declare const knip: () => number;
381
+
382
+ declare const license: (pkg?: string) => Promise<number>;
383
+
384
+ interface LintInitParams {
385
+ verbose?: boolean;
386
+ }
387
+ declare function detectReactInMonorepo(cwd: string, verbose?: boolean): boolean;
388
+ declare function lintInit({ verbose }?: LintInitParams): Promise<number>;
389
+
390
+ interface LintlintParams {
391
+ fix?: boolean;
392
+ verbose?: boolean;
393
+ }
394
+ declare function lintlint({ fix, verbose }?: LintlintParams): Promise<number>;
395
+
396
+ interface LintNextParams {
397
+ cache?: boolean;
398
+ fix?: boolean;
399
+ jobs: number;
400
+ pkg?: string;
401
+ verbose?: boolean;
402
+ }
403
+ declare function lintNext({ cache, fix, jobs, pkg, verbose, }: LintNextParams): Promise<number>;
404
+
405
+ declare const npmignoreGen: (pkg?: string) => 0 | 1;
406
+
407
+ interface OrphanParams {
408
+ verbose?: boolean;
409
+ }
410
+ declare function orphanList({ verbose }?: OrphanParams): number;
411
+ declare function orphanClean({ verbose }?: OrphanParams): number;
412
+
413
+ declare const packageClean: () => number;
414
+
415
+ declare const packageCleanOutputs: () => number;
416
+
417
+ declare const packageCleanTypescript: () => number;
418
+
419
+ type EntryMode = 'all' | 'single' | 'auto' | 'platform' | 'custom';
420
+ /**
421
+ * Configuration for specifying which paths are targeted.
422
+ */
423
+ interface PathConfig {
424
+ /**
425
+ * Glob patterns to exclude (takes precedence over include).
426
+ */
427
+ exclude?: string[];
428
+ /**
429
+ * Glob patterns to include.
430
+ */
431
+ include?: string[];
432
+ }
433
+ /**
434
+ * Configuration for Dynamic Share.
435
+ */
436
+ interface DynamicShareConfig extends PathConfig {
437
+ }
438
+ /**
439
+ * Configuration for Live Share.
440
+ */
441
+ interface LiveShareConfig extends PathConfig {
442
+ }
443
+ interface CompileConfig {
444
+ bundleTypes?: boolean;
445
+ /** @param entryMode all, single, custom, platform, or auto */
446
+ entryMode?: EntryMode;
447
+ /** @param when building types with tsc, should it use the outDir to write to? */
448
+ outDirAsBuildDir?: boolean;
449
+ }
450
+ type PackageCompileTsupConfig = CompileConfig & {
451
+ browser?: Record<string, Options | boolean>;
452
+ neutral?: Record<string, Options | boolean>;
453
+ node?: Record<string, Options | boolean>;
454
+ tsup?: {
455
+ options?: Options;
456
+ };
457
+ verbose?: boolean;
458
+ };
459
+ type PackageCompileTscConfig = CompileConfig & {
460
+ mode: 'tsc';
461
+ };
462
+ /**
463
+ * How deplint should classify a dependency.
464
+ * - `dep`: must stay in `dependencies` (never promoted to peerDependencies)
465
+ * - `peer`: should be treated as a peerDependency (overrides a parent `dep` setting)
466
+ */
467
+ type DeplintRefType = 'dep' | 'peer';
468
+ /**
469
+ * Per-package configuration within deplint.
470
+ */
471
+ interface DeplintPackageConfig {
472
+ /** How this dependency should be classified. */
473
+ refType: DeplintRefType;
474
+ }
475
+ /**
476
+ * Configuration for deplint (dependency linting).
477
+ */
478
+ interface DeplintConfig {
479
+ /**
480
+ * Package names to exclude from unused-dependency checks.
481
+ * Packages listed here will never be reported as "unused" by deplint,
482
+ * even if no import for them is detected in source or dist files.
483
+ * Useful for packages that are used implicitly (e.g. runtime plugins,
484
+ * CSS-in-JS themes, or polyfills that have side effects on import).
485
+ */
486
+ exclude?: string[];
487
+ /**
488
+ * Per-dependency configuration keyed by package name.
489
+ * Cascades from root to package configs (maps are merged, with
490
+ * package-level entries overriding root-level entries for the same key).
491
+ */
492
+ packages?: Record<string, DeplintPackageConfig>;
493
+ }
494
+ /**
495
+ * Canonical names for individually toggleable publint checks.
496
+ */
497
+ type PublintCheckName = 'files' | 'importToDefault' | 'main' | 'module' | 'peerDeps' | 'publint' | 'resolutions' | 'rootSource' | 'rootTypes' | 'sideEffects' | 'source' | 'types';
498
+ declare const ALL_PUBLINT_CHECKS: PublintCheckName[];
499
+ /** Checks that only apply to published (non-private) packages */
500
+ declare const PUBLISH_ONLY_CHECKS: PublintCheckName[];
501
+ /**
502
+ * Configuration for publint (package publishing linting).
503
+ */
504
+ interface PublintConfig {
505
+ /**
506
+ * Check names to exclude from publint runs.
507
+ * All checks run by default; listed names are skipped.
508
+ * Cannot be used together with `include`.
509
+ */
510
+ exclude?: PublintCheckName[];
511
+ /**
512
+ * Check names to include (whitelist) in publint runs.
513
+ * Only listed checks will run; all others are skipped.
514
+ * Cannot be used together with `exclude`.
515
+ */
516
+ include?: PublintCheckName[];
517
+ /**
518
+ * Whether to run `pack` when invoking the publint library.
519
+ * When true (default), the package manager is used to determine which
520
+ * files would be published. Set to false to skip packing for faster runs.
521
+ */
522
+ pack?: boolean;
523
+ }
524
+ /**
525
+ * Configuration for readme generation.
526
+ */
527
+ interface ReadmeConfig {
528
+ /**
529
+ * URL that the logo links to when clicked.
530
+ * Replaces the placeholder in the template's [![logo][]](url) link.
531
+ */
532
+ logoLinkUrl?: string;
533
+ /**
534
+ * Public URL for the logo image displayed at the top of generated READMEs.
535
+ * Replaces the placeholder in the template's [logo] reference link.
536
+ */
537
+ logoUrl?: string;
538
+ }
539
+ /**
540
+ * Command-specific configuration that cascades from root to package.
541
+ * Settings here override the legacy top-level equivalents.
542
+ */
543
+ interface CommandsConfig {
544
+ deplint?: DeplintConfig;
545
+ publint?: boolean | PublintConfig;
546
+ }
547
+ interface XyConfigBase {
548
+ /**
549
+ * Command-specific settings grouped under `commands`.
550
+ * These cascade from root xy.config down to per-package xy.config files.
551
+ * Takes precedence over the legacy top-level `deplint`/`publint` fields.
552
+ */
553
+ commands?: CommandsConfig;
554
+ compile?: CompileConfig;
555
+ /** @deprecated Use `commands.deplint` instead. */
556
+ deplint?: DeplintConfig;
557
+ dynamicShare?: DynamicShareConfig;
558
+ liveShare?: LiveShareConfig;
559
+ /** @deprecated Use `commands.publint` instead. */
560
+ publint?: boolean | PublintConfig;
561
+ readme?: ReadmeConfig;
562
+ verbose?: boolean;
563
+ }
564
+ interface XyTsupConfig extends XyConfigBase {
565
+ compile?: PackageCompileTsupConfig;
566
+ }
567
+ interface XyTscConfig extends XyConfigBase {
568
+ compile?: PackageCompileTscConfig;
569
+ }
570
+ type XyConfigLegacy = XyTsupConfig | XyTscConfig;
571
+ type XyConfig = XyConfigLegacy & {
572
+ dev?: {
573
+ build?: {
574
+ clean?: boolean;
575
+ compile?: boolean;
576
+ deplint?: boolean;
577
+ gendocs?: boolean;
578
+ gitlint?: boolean;
579
+ knip?: boolean;
580
+ license?: boolean;
581
+ lint?: boolean;
582
+ publint?: boolean;
583
+ statics?: boolean;
584
+ verbose?: boolean;
585
+ };
586
+ compile?: PackageCompileTsupConfig;
587
+ verbose?: boolean;
588
+ };
589
+ verbose?: boolean;
590
+ };
591
+
592
+ declare const packageCompile: (inConfig?: XyConfig) => Promise<number>;
593
+
594
+ declare const packageCompileTsc: (platform: "browser" | "neutral" | "node", entries: string[], srcDir?: string, outDir?: string, compilerOptionsParam?: CompilerOptions, verbose?: boolean) => number;
595
+
596
+ declare const tsupOptions: (options?: Options[]) => Options;
597
+ declare const packageCompileTsup: (config?: XyTsupConfig) => Promise<number>;
598
+
599
+ interface PackageCopyAssetsParams {
600
+ target?: 'esm' | 'cjs';
601
+ }
602
+ declare const packageCopyAssets: ({ target }: PackageCopyAssetsParams) => Promise<0 | 1>;
603
+
604
+ declare const packageCycle: () => Promise<number>;
605
+
606
+ declare const packageGenDocs: () => Promise<number | undefined>;
607
+
608
+ declare const packageLint: (fix?: boolean, verbose?: boolean, cache?: boolean) => Promise<number>;
609
+
610
+ interface PackagePublintParams {
611
+ exclude?: Set<PublintCheckName>;
612
+ fix?: boolean;
613
+ pack?: boolean;
614
+ pkgDir?: string;
615
+ strict?: boolean;
616
+ verbose?: boolean;
617
+ }
618
+ declare const packagePublint: ({ exclude, fix, pack, pkgDir: pkgDirParam, strict, verbose: _verbose, }?: PackagePublintParams) => Promise<number>;
619
+
620
+ declare const packageRecompile: () => Promise<number>;
621
+
622
+ interface LintResult {
623
+ errors: string[];
624
+ fixable: string[];
625
+ warnings: string[];
626
+ }
627
+ declare function packageLintMonorepo(fix?: boolean): number;
628
+
629
+ declare function checkVersionConsistency(cwd: string, rootPkg: Record<string, unknown>, workspaces: {
630
+ location: string;
631
+ name: string;
632
+ }[]): LintResult;
633
+ declare function fixVersionConsistency(cwd: string, rootPkg: Record<string, unknown>, writeRootPackageJson: (cwd: string, pkg: Record<string, unknown>) => void, workspaces: {
634
+ location: string;
635
+ name: string;
636
+ }[]): void;
637
+ declare function checkInternalDepVersions(cwd: string, workspaces: {
638
+ location: string;
639
+ name: string;
640
+ }[]): LintResult;
641
+ declare function fixInternalDepVersions(cwd: string, workspaces: {
642
+ location: string;
643
+ name: string;
644
+ }[]): void;
645
+ declare function checkWorkspaceProtocol(cwd: string, workspaces: {
646
+ location: string;
647
+ name: string;
648
+ }[]): LintResult;
649
+ declare function fixWorkspaceProtocol(cwd: string, workspaces: {
650
+ location: string;
651
+ name: string;
652
+ }[]): void;
653
+ declare function checkInternalPeerVersions(cwd: string, workspaces: {
654
+ location: string;
655
+ name: string;
656
+ }[]): LintResult;
657
+ declare function fixInternalPeerVersions(cwd: string, workspaces: {
658
+ location: string;
659
+ name: string;
660
+ }[]): void;
661
+ /**
662
+ * Syncs all internal peerDependency versions to match current workspace versions.
663
+ * Called by xy publish to ensure peerDeps are correct before publishing.
664
+ */
665
+ declare function syncInternalPeerVersions(): number;
666
+ /**
667
+ * Reads the shared monorepo version from the first non-root workspace
668
+ * and logs it. Call at the end of deploy to report the new version.
669
+ */
670
+ declare function logMonorepoVersion(): void;
671
+
672
+ interface PackmanCleanParams {
673
+ verbose?: boolean;
674
+ }
675
+ declare function packmanClean({ verbose }: PackmanCleanParams): number;
676
+
677
+ interface ConvertParams {
678
+ target: string;
679
+ verbose?: boolean;
680
+ }
681
+ declare function detectCurrentPM(cwd: string): 'pnpm' | 'yarn' | 'unknown';
682
+ declare function findWorkspacePackagePaths(cwd: string): string[];
683
+ declare function convert({ target, verbose }: ConvertParams): number;
684
+
685
+ interface PackmanLintParams {
686
+ fix?: boolean;
687
+ verbose?: boolean;
688
+ }
689
+ declare function packmanLint({ fix, verbose }?: PackmanLintParams): number;
690
+
691
+ type Direction = 'pnpm-to-yarn' | 'yarn-to-pnpm';
692
+ declare function rewriteScript(script: string, direction: Direction): string;
693
+ declare function rewriteScriptsInPackageJson(pkg: Record<string, unknown>, direction: Direction): Record<string, unknown>;
694
+
695
+ interface PublintParams {
696
+ cliExclude?: string[];
697
+ cliInclude?: string[];
698
+ fix?: boolean;
699
+ jobs: number;
700
+ pack?: boolean;
701
+ pkg?: string;
702
+ verbose?: boolean;
703
+ }
704
+ interface PublintPackageParams {
705
+ exclude: Set<PublintCheckName>;
706
+ fix?: boolean;
707
+ pack?: boolean;
708
+ pkg: string;
709
+ verbose?: boolean;
710
+ }
711
+ interface ResolvedPublintOptions {
712
+ exclude: Set<PublintCheckName>;
713
+ pack: boolean;
714
+ }
715
+ declare function loadPublintOptions(): Promise<ResolvedPublintOptions>;
716
+ declare const publint: ({ cliExclude, cliInclude, fix, jobs, pack, verbose, pkg, }: PublintParams) => Promise<number>;
717
+ interface PublintSingleParams {
718
+ cliExclude?: string[];
719
+ cliInclude?: string[];
720
+ fix?: boolean;
721
+ pack?: boolean;
722
+ pkg: string;
723
+ verbose?: boolean;
724
+ }
725
+ declare const publintSingle: ({ cliExclude, cliInclude, fix, pack, pkg, verbose, }: PublintSingleParams) => Promise<number>;
726
+ interface PublintAllParams {
727
+ cliExclude?: string[];
728
+ cliInclude?: string[];
729
+ fix?: boolean;
730
+ jobs: number;
731
+ pack?: boolean;
732
+ verbose?: boolean;
733
+ }
734
+ declare const publintAll: ({ cliExclude, cliInclude, fix, jobs, pack, verbose, }: PublintAllParams) => Promise<number>;
735
+
736
+ declare const publish: () => number;
737
+
738
+ declare const test$1: () => number;
739
+
740
+ interface ReadmeGenParams {
741
+ jobs: number;
742
+ pkg?: string;
743
+ templatePath?: string;
744
+ typedoc?: boolean;
745
+ verbose?: boolean;
746
+ }
747
+ declare function readmeGen({ jobs, pkg, templatePath, typedoc, verbose, }: ReadmeGenParams): Promise<number>;
748
+
749
+ interface ReadmeInitParams {
750
+ templatePath?: string;
751
+ verbose?: boolean;
752
+ }
753
+ declare function readmeInit({ templatePath }: ReadmeInitParams): Promise<number>;
754
+
755
+ interface ReadmeLintParams {
756
+ config: XyConfig;
757
+ verbose?: boolean;
758
+ }
759
+ declare function readmeLint({ config, verbose }: ReadmeLintParams): number;
760
+
761
+ interface RebuildParams {
762
+ pkg?: string;
763
+ target?: 'esm' | 'cjs';
764
+ }
765
+ declare const rebuild: ({ target }: RebuildParams) => number;
766
+
767
+ interface RecompileParams {
768
+ incremental?: boolean;
769
+ jobs: number;
770
+ pkg?: string;
771
+ target?: 'esm' | 'cjs';
772
+ verbose?: boolean;
773
+ }
774
+ interface RecompilePackageParams {
775
+ pkg: string;
776
+ target?: 'esm' | 'cjs';
777
+ verbose?: boolean;
778
+ }
779
+ declare const recompile: ({ incremental, jobs, pkg, target, verbose, }: RecompileParams) => Promise<number>;
780
+ declare const recompilePackage: ({ target, pkg }: RecompilePackageParams) => Promise<number>;
781
+ declare const recompileAll: ({ jobs, verbose, target, incremental, }: RecompileParams) => Promise<number>;
782
+
783
+ declare const reinstall: (verbose?: boolean) => number;
784
+
785
+ interface RelintParams {
786
+ cache?: boolean;
787
+ fix?: boolean;
788
+ incremental?: boolean;
789
+ jobs: number;
790
+ next?: boolean;
791
+ pkg?: string;
792
+ verbose?: boolean;
793
+ }
794
+ interface RelintPackageParams {
795
+ pkg: string;
796
+ verbose?: boolean;
797
+ }
798
+ declare const relintPackage: ({ pkg, fix, verbose, }: {
799
+ fix?: boolean;
800
+ pkg: string;
801
+ verbose?: boolean;
802
+ }) => number;
803
+ declare const relint: ({ fix, jobs, next, pkg, verbose, }: RelintParams) => number | Promise<number>;
804
+ declare const relintAllPackages: ({ fix }?: {
805
+ fix?: boolean;
806
+ }) => number;
807
+
808
+ interface RepoInitParams {
809
+ description: string;
810
+ githubOrg?: string;
811
+ name?: string;
812
+ packageName?: string;
813
+ pm: 'pnpm' | 'yarn';
814
+ scope: string;
815
+ skipGit?: boolean;
816
+ skipInstall?: boolean;
817
+ template: string;
818
+ verbose?: boolean;
819
+ }
820
+ declare function repoInit(params: RepoInitParams): Promise<number>;
821
+
822
+ interface RetestParams {
823
+ target?: string;
824
+ }
825
+ declare const retest: ({ target }?: RetestParams) => number;
826
+
827
+ declare const sitemap: () => number;
828
+
829
+ declare const sonar: () => number;
830
+
831
+ declare const start: () => number;
832
+
833
+ declare const statics: () => number;
834
+
835
+ interface TestParams {
836
+ target?: string;
837
+ }
838
+ declare const test: ({ target }?: TestParams) => number;
839
+
840
+ declare const up: () => number;
841
+
842
+ declare const updo: ({ latest }?: {
843
+ latest?: boolean;
844
+ }) => Promise<number>;
845
+
846
+ declare const updateYarnPlugins: () => number;
847
+
848
+ declare const updateYarnVersion: () => number;
849
+
850
+ declare const yarn3Only: () => number;
851
+
852
+ declare const checkResult: (name: string, result: number, level?: "error" | "warn", exitOnFail?: boolean) => void;
853
+
854
+ declare function applyPackageManager(content: string, pm: PackageManagerName): string;
855
+ declare const XYLABS_RULES_PREFIX = "xylabs-";
856
+ declare const XYLABS_COMMANDS_PREFIX = "xy-";
857
+ declare const LEGACY_COMMANDS_PREFIX = "xylabs-";
858
+ declare const XYLABS_SKILLS_PREFIX = "xylabs-";
859
+ declare const claudeMdRuleTemplates: () => Record<string, string>;
860
+ declare const claudeCommandTemplates: () => Record<string, string>;
861
+ declare const claudeSkillTemplates: () => Record<string, Record<string, string>>;
862
+ declare const claudeMdProjectTemplate: () => string;
863
+ declare const claudeMdLocalTemplate: () => string;
864
+
865
+ declare const outputStorage: AsyncLocalStorage<string[]>;
866
+ declare function installOutputCapture(): void;
867
+ declare function runWithConcurrency<T>(items: T[], concurrency: number, fn: (item: T) => Promise<void>): Promise<void>;
868
+
869
+ declare const createBuildConfig: (location: string, module: "ESNext" | "CommonJS", target: "ESNext" | "ES6", outDirSuffix: string) => Record<string, unknown> | undefined;
870
+
871
+ declare const defaultBuildConfig: {
872
+ compilerOptions: {
873
+ rootDir: string;
874
+ rootDirs: string[];
875
+ };
876
+ exclude: string[];
877
+ include: string[];
878
+ };
879
+
880
+ declare const deleteGlob: (globPath: string) => void;
881
+
882
+ declare const detectDuplicateDependencies: (depsFromPackageJSON?: string[], DefaultDependencies?: string[]) => number;
883
+
884
+ declare class DuplicateDetector {
885
+ private dependency;
886
+ private duplicateVersions;
887
+ constructor(output: string, dependency: string);
888
+ detect(): number;
889
+ private parseVersions;
890
+ }
891
+
892
+ interface CycleEdge {
893
+ from: string;
894
+ to: string;
895
+ type: 'dep' | 'devDep';
896
+ }
897
+ /**
898
+ * Detects cycles in the workspace dependency graph (including devDependencies).
899
+ * This catches cycles that break `yarn workspaces foreach --topological-dev`
900
+ * but are invisible to source-level import analysis.
901
+ * @returns An array of cycle paths, each represented as an array of edges. Empty if no cycles.
902
+ */
903
+ declare function detectWorkspaceCycles(workspaces: Workspace[]): CycleEdge[][];
904
+ declare function printWorkspaceCycles(cycles: CycleEdge[][]): void;
905
+
906
+ declare const WINDOWS_NEWLINE_REGEX: RegExp;
907
+ declare const CROSS_PLATFORM_NEWLINE = "\n";
908
+
909
+ type ReadFileSyncOptions = BufferEncoding | {
910
+ encoding: BufferEncoding;
911
+ flags?: string;
912
+ };
913
+ declare const defaultReadFileSyncOptions: ReadFileSyncOptions;
914
+
915
+ declare const readLines: (uri: PathLike, options?: ReadFileSyncOptions) => string[];
916
+ declare const readNonEmptyLines: (uri: PathLike, options?: ReadFileSyncOptions) => string[];
917
+ declare const writeLines: (uri: PathLike, lines: string[], options?: WriteFileOptions) => void;
918
+
919
+ declare const tryReadFileSync: (uri: PathLike, options?: ReadFileSyncOptions) => string | undefined;
920
+
921
+ declare function fillTemplate(template: string, data: Record<string, string>): string;
922
+
923
+ declare const generateIgnoreFiles: (filename: string, pkg?: string) => 0 | 1;
924
+
925
+ interface GenerateReadmeFilesParams {
926
+ jobs: number;
927
+ logoLinkUrl?: string;
928
+ logoUrl?: string;
929
+ pkg?: string;
930
+ templatePath?: string;
931
+ typedoc?: boolean;
932
+ verbose?: boolean;
933
+ }
934
+ declare const DEFAULT_README_TEMPLATE: string;
935
+ declare const DEFAULT_README_BODY: string;
936
+ declare function applyLogoConfig(template: string, logoUrl?: string, logoLinkUrl?: string): string;
937
+ declare function resolveTemplatePath(templatePath?: string): string;
938
+ declare function scaffoldTemplate(resolvedTemplatePath: string, template: string): Promise<void>;
939
+ declare function generateReadmeFiles({ jobs, logoLinkUrl, logoUrl, pkg, templatePath, typedoc, verbose, }: GenerateReadmeFilesParams): Promise<number>;
940
+
941
+ declare const gitignoreTemplate: () => string;
942
+
943
+ declare function INIT_CWD(): string;
944
+
945
+ declare const multiLineToJSONArray: (output: string) => unknown[];
946
+
947
+ declare const latestVersions: {
948
+ readonly node: "24.14.1";
949
+ readonly nodeLtsCodename: "Krypton";
950
+ readonly npm: "11.11.0";
951
+ readonly pnpm: "10.33.0";
952
+ readonly yarn: "4.13.0";
953
+ };
954
+
955
+ declare const loadConfig: <T extends object>(params?: T) => Promise<T>;
956
+ /**
957
+ * Loads a command-specific config merged from root and workspace levels.
958
+ * The root config provides defaults; the workspace config extends/overrides.
959
+ * Arrays (e.g. `exclude`) are unioned and maps (e.g. `packages`) are merged
960
+ * via deepmerge, with workspace entries overriding root entries for the same key.
961
+ */
962
+ declare function loadWorkspaceCommandConfig<C>(workspaceDir: string, commandName: string): Promise<C>;
963
+
964
+ declare function packageName(): string | undefined;
965
+
966
+ declare const parsedPackageJSON: (path?: string) => Record<string, unknown>;
967
+
968
+ declare const processEx: (ex: unknown) => never;
969
+
970
+ interface TemplateFile {
971
+ content: string;
972
+ relativePath: string;
973
+ }
974
+ declare function loadRepoTemplateFiles(template: string, section: string): TemplateFile[];
975
+ declare function listRepoTemplates(): string[];
976
+
977
+ declare function runInstall(cwd?: string): boolean;
978
+
979
+ declare const runSteps: (name: string, steps: ScriptStep[], exitOnFail?: boolean, messages?: string[]) => number;
980
+
981
+ declare const runStepAsync: (name: string, step: ScriptStep, exitOnFail?: boolean, message?: string) => Promise<number>;
982
+ declare const runStepsAsync: (name: string, steps: ScriptStep[], exitOnFail?: boolean, messages?: string[]) => Promise<number>;
983
+
984
+ declare const runXy: (command: string) => number;
985
+
986
+ declare const runXyWithWarning: (command: string) => number;
987
+
988
+ /** Catch child process a crash and returns the code */
989
+ declare const safeExit: (func: () => number, exitOnFail?: boolean) => number;
990
+ declare const safeExitAsync: (func: () => Promise<number>, exitOnFail?: boolean) => Promise<number>;
991
+
992
+ declare const empty: (value?: string) => boolean;
993
+ declare const notEmpty: (value?: string) => boolean;
994
+
995
+ declare const union: (a: string[], b: string[]) => Set<string>;
996
+
997
+ /**
998
+ * Attempts to run a local root package.json script instead of the built-in
999
+ * xy command. Returns the exit code if the override ran, or undefined if
1000
+ * no override applies (no matching script or recursion guard).
1001
+ */
1002
+ declare function tryRunLocalScript(commandName: string): number | undefined;
1003
+
1004
+ type DepType = 'dependencies' | 'devDependencies' | 'peerDependencies';
1005
+ interface DeclaredDep {
1006
+ depTypes: DepType[];
1007
+ name: string;
1008
+ ranges: string[];
1009
+ workspaces: string[];
1010
+ }
1011
+ interface RegistryInfo {
1012
+ distTags: Record<string, string>;
1013
+ versions: string[];
1014
+ }
1015
+ interface ResolvedDep {
1016
+ current: string | undefined;
1017
+ declaredRange: string;
1018
+ depTypes: DepType[];
1019
+ latest: string | undefined;
1020
+ name: string;
1021
+ next: string | undefined;
1022
+ updateAvailable: boolean;
1023
+ wanted: string | undefined;
1024
+ workspaces: string[];
1025
+ }
1026
+ type VersionChoice = 'latest' | 'next' | 'skip' | 'wanted';
1027
+ interface SelectedUpdate {
1028
+ depTypes: DepType[];
1029
+ name: string;
1030
+ targetVersion: string;
1031
+ workspaces: string[];
1032
+ }
1033
+
1034
+ declare function applyUpdates(cwd: string, workspaces: Workspace[], updates: SelectedUpdate[]): number;
1035
+
1036
+ declare function collectWorkspaceDeps(cwd: string, workspaces: Workspace[], workspaceNames: Set<string>): Map<string, DeclaredDep>;
1037
+
1038
+ declare function fetchRegistryInfo(packageName: string): Promise<RegistryInfo>;
1039
+ declare function fetchAllRegistryInfo(packageNames: string[], concurrency?: number): Promise<Map<string, RegistryInfo>>;
1040
+
1041
+ declare function interactiveSelect(deps: ResolvedDep[]): Promise<SelectedUpdate[]>;
1042
+
1043
+ declare function renderTable(deps: ResolvedDep[]): void;
1044
+
1045
+ declare function resolveVersions(deps: Map<string, DeclaredDep>, registry: Map<string, RegistryInfo>, installedVersions: Map<string, string>): ResolvedDep[];
1046
+
1047
+ interface UpdoOptions {
1048
+ latest?: boolean;
1049
+ }
1050
+ declare function runUpdo(pm: PackageManager, _options?: UpdoOptions): Promise<number>;
1051
+
1052
+ declare const withErrnoException: <T extends NodeJS.ErrnoException = NodeJS.ErrnoException>(ex: unknown, closure: (error: T) => number) => number | undefined;
1053
+
1054
+ declare const withError: <T extends Error = Error>(ex: any, closure: (error: T) => number, predicate?: (ex: T) => boolean) => number | undefined;
1055
+
1056
+ declare const isYarnVersionOrGreater: (major: number, minor?: number, patch?: number) => [boolean, string];
1057
+
1058
+ declare const yarnWorkspace: (pkg: string) => Workspace;
1059
+
1060
+ declare const yarnWorkspaces: () => Workspace[];
1061
+
1062
+ type PackageJsonEx = PackageJson & {
1063
+ type: 'module' | 'commonjs';
1064
+ };
1065
+ declare const loadPackageConfig: () => Promise<PackageJsonEx>;
1066
+
1067
+ declare const xyBuildCommands: (args: Argv) => Argv<{}>;
1068
+
1069
+ declare const xyCommonCommands: (args: Argv) => Argv<{}>;
1070
+
1071
+ declare const xyDeployCommands: (args: Argv) => Argv<{}>;
1072
+
1073
+ declare const xyInstallCommands: (args: Argv) => Argv<{}>;
1074
+
1075
+ declare const xyLintCommands: (args: Argv) => Argv<{}>;
1076
+
1077
+ declare const xyReactCommands: (args: Argv) => Argv<{}>;
1078
+
1079
+ declare const xyBase: (plugins?: (args: Argv) => Argv) => Promise<{
1080
+ [x: string]: unknown;
1081
+ _: (string | number)[];
1082
+ $0: string;
1083
+ } | {
1084
+ [x: string]: unknown;
1085
+ _: (string | number)[];
1086
+ $0: string;
1087
+ }>;
1088
+ declare const xy: () => Promise<{
1089
+ [x: string]: unknown;
1090
+ _: (string | number)[];
1091
+ $0: string;
1092
+ } | {
1093
+ [x: string]: unknown;
1094
+ _: (string | number)[];
1095
+ $0: string;
1096
+ }>;
1097
+
1098
+ declare const xyParseOptions: () => Argv;
1099
+
1100
+ declare const xyYarnCommands: (args: Argv) => Argv<{}>;
1101
+
1102
+ export { ALL_PUBLINT_CHECKS, type BuildParams, CROSS_PLATFORM_NEWLINE, type CleanPackageParams, type CleanParams, type CommandsConfig, type CompileConfig, type CompileParams, type ConvertParams, type CopyAssetsParams, type CycleEdge, type CycleParams, DEFAULT_README_BODY, DEFAULT_README_TEMPLATE, type DeclaredDep, type DepLintOptions, type DepType, type DeplintAppliedFix, type DeplintConfig, type DeplintDiagnostic, type DeplintFix, type DeplintPackageConfig, DeplintPackageEditor, type DeplintRefType, type DeplintReporter, type DeplintRule, type DeplintRunOptions, type DeplintRunResult, type DeplintSection, type DeplintSeverity, type DeplintSummary, type DeplintWorkspaceContext, type DeployLevel, DuplicateDetector, type DynamicShareConfig, type EntryMode, type GenDocsPackageParams, type GenDocsParams, INIT_CWD, LEGACY_COMMANDS_PREFIX, type LintInitParams, type LintNextParams, type LintPackageParams, type LintParams, type LintResult, type LiveShareConfig, type OrphanParams, PUBLISH_ONLY_CHECKS, type PackageCompileTscConfig, type PackageCompileTsupConfig, type PackageCopyAssetsParams, type PackageJsonEx, type PackageManager, type PackageManagerName, type PackagePublintParams, type PackmanCleanParams, type PackmanLintParams, type PathConfig, PnpmPackageManager, type PublintCheckName, type PublintConfig, type PublintPackageParams, type PublintParams, type ReadFileSyncOptions, type ReadmeConfig, type ReadmeGenParams, type ReadmeInitParams, type ReadmeLintParams, type RebuildParams, type RecompilePackageParams, type RecompileParams, type RegistryInfo, type RelintPackageParams, type RelintParams, type RepoInitParams, type ResolvedDep, type ResolvedPublintOptions, type RetestParams, type ScriptStep, type SelectedUpdate, type SettingsLevel, type TemplateFile, type TestParams, type UpdoOptions, type VersionChoice, WINDOWS_NEWLINE_REGEX, type Workspace, type WorkspaceForeachOptions, XYLABS_COMMANDS_PREFIX, XYLABS_RULES_PREFIX, XYLABS_SKILLS_PREFIX, type XyConfig, type XyConfigBase, type XyConfigLegacy, type XyTscConfig, type XyTsupConfig, YarnPackageManager, analyze, applyDeplintFixes, applyLogoConfig, applyPackageManager, applyUpdates, build, buildWorkspaceContext, checkInternalDepVersions, checkInternalPeerVersions, checkResult, checkVersionConsistency, checkWorkspaceProtocol, claudeCheck, claudeClean, claudeCommandTemplates, claudeCommands, claudeMdLocalTemplate, claudeMdProjectTemplate, claudeMdRuleTemplates, claudeRules, claudeSettings, claudeSkillTemplates, claudeSkills, clean, cleanAll, cleanDocs, cleanESLint, cleanPackage, collectWorkspaceDeps, compile, compileAll, compilePackage, convert, copyAssets, createBuildConfig, cycle, cycleAll, cyclePackage, dead, defaultBuildConfig, defaultReadFileSyncOptions, deleteGlob, deplint, deplintRules, deploy, detectCurrentPM, detectDuplicateDependencies, detectPackageManager, detectReact, detectReactInMonorepo, detectWorkspaceCycles, dupdeps, eject, empty, fetchAllRegistryInfo, fetchRegistryInfo, fillTemplate, findWorkspacePackagePaths, fix, fixInternalDepVersions, fixInternalPeerVersions, fixVersionConsistency, fixWorkspaceProtocol, genDocs, genDocsAll, genDocsPackage, generateIgnoreFiles, generateReadmeFiles, getDeplintReporter, getPackageManager, gitignore, gitignoreGen, gitignoreTemplate, gitlint, gitlintFix, humanDeplintReporter, installOutputCapture, interactiveSelect, isYarnVersionOrGreater, jsonDeplintReporter, knip, latestVersions, license, lint, lintAllPackages, lintInit, lintNext, lintPackage, lintlint, listRepoTemplates, loadConfig, loadPackageConfig, loadPublintOptions, loadRepoTemplateFiles, loadWorkspaceCommandConfig, logMonorepoVersion, multiLineToJSONArray, notEmpty, npmignoreGen, orphanClean, orphanList, outputStorage, packageClean, packageCleanOutputs, packageCleanTypescript, packageCompile, packageCompileTsc, packageCompileTsup, packageCopyAssets, packageCycle, packageGenDocs, packageLint, packageLintMonorepo, packageName, packagePublint, packageRecompile, packmanClean, packmanLint, parsedPackageJSON, printWorkspaceCycles, processEx, publint, publintAll, publintSingle, publish, test$1 as reactTest, readLines, readNonEmptyLines, readmeGen, readmeInit, readmeLint, rebuild, recompile, recompileAll, recompilePackage, registerPackageManager, reinstall, relint, relintAllPackages, relintPackage, renderTable, repoInit, resolveTemplatePath, resolveVersions, retest, rewriteScript, rewriteScriptsInPackageJson, runDeplint, runInstall, runStepAsync, runSteps, runStepsAsync, runUpdo, runWithConcurrency, runXy, runXyWithWarning, safeExit, safeExitAsync, scaffoldTemplate, sitemap, sonar, start, statics, syncInternalPeerVersions, test, tryReadFileSync, tryRunLocalScript, tsupOptions, union, up, updateYarnPlugins, updateYarnVersion, updo, withErrnoException, withError, writeLines, xy, xyBase, xyBuildCommands, xyCommonCommands, xyDeployCommands, xyInstallCommands, xyLintCommands, xyParseOptions, xyReactCommands, xyYarnCommands, yarn3Only, yarnWorkspace, yarnWorkspaces };