@bleedingdev/modern-js-utils 3.2.0-ultramodern.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 (387) hide show
  1. package/LICENSE +21 -0
  2. package/README.md +26 -0
  3. package/dist/cjs/cli/alias.js +82 -0
  4. package/dist/cjs/cli/applyOptionsChain.js +50 -0
  5. package/dist/cjs/cli/commands.js +69 -0
  6. package/dist/cjs/cli/common.js +59 -0
  7. package/dist/cjs/cli/config.js +39 -0
  8. package/dist/cjs/cli/constants.js +136 -0
  9. package/dist/cjs/cli/ensure.js +56 -0
  10. package/dist/cjs/cli/fs.js +46 -0
  11. package/dist/cjs/cli/get/config.js +48 -0
  12. package/dist/cjs/cli/get/data.js +106 -0
  13. package/dist/cjs/cli/get/index.js +112 -0
  14. package/dist/cjs/cli/index.js +212 -0
  15. package/dist/cjs/cli/is/config.js +86 -0
  16. package/dist/cjs/cli/is/env.js +52 -0
  17. package/dist/cjs/cli/is/index.js +79 -0
  18. package/dist/cjs/cli/is/project.js +147 -0
  19. package/dist/cjs/cli/is/type.js +84 -0
  20. package/dist/cjs/cli/logger.js +39 -0
  21. package/dist/cjs/cli/modulePath.js +87 -0
  22. package/dist/cjs/cli/monorepo.js +110 -0
  23. package/dist/cjs/cli/package.js +97 -0
  24. package/dist/cjs/cli/path.js +111 -0
  25. package/dist/cjs/cli/port.js +79 -0
  26. package/dist/cjs/cli/prettyInstructions.js +117 -0
  27. package/dist/cjs/cli/require.js +127 -0
  28. package/dist/cjs/cli/route.js +76 -0
  29. package/dist/cjs/cli/runtimeExports.js +86 -0
  30. package/dist/cjs/cli/tsconfig.js +51 -0
  31. package/dist/cjs/cli/version.js +67 -0
  32. package/dist/cjs/cli/watch.js +87 -0
  33. package/dist/cjs/compiled.js +209 -0
  34. package/dist/cjs/import.js +56 -0
  35. package/dist/cjs/index.js +72 -0
  36. package/dist/cjs/universal/constants.js +84 -0
  37. package/dist/cjs/universal/index.js +36 -0
  38. package/dist/cjs/universal/path.js +36 -0
  39. package/dist/cjs/universal/pluginDagSort.js +75 -0
  40. package/dist/compiled/address/index.js +171 -0
  41. package/dist/compiled/address/lib/address.d.ts +28 -0
  42. package/dist/compiled/address/package.json +1 -0
  43. package/dist/compiled/browserslist/index.d.ts +178 -0
  44. package/dist/compiled/browserslist/index.js +1329 -0
  45. package/dist/compiled/browserslist/license +20 -0
  46. package/dist/compiled/browserslist/package.json +1 -0
  47. package/dist/compiled/chalk/index.d.ts +415 -0
  48. package/dist/compiled/chalk/index.js +2368 -0
  49. package/dist/compiled/chalk/license +9 -0
  50. package/dist/compiled/chalk/package.json +1 -0
  51. package/dist/compiled/chokidar/anymatch/index.d.ts +19 -0
  52. package/dist/compiled/chokidar/fsevents.node +0 -0
  53. package/dist/compiled/chokidar/index.js +4162 -0
  54. package/dist/compiled/chokidar/index.js.LICENSE.txt +41 -0
  55. package/dist/compiled/chokidar/license +21 -0
  56. package/dist/compiled/chokidar/package.json +1 -0
  57. package/dist/compiled/chokidar/types/index.d.ts +188 -0
  58. package/dist/compiled/commander/index.js +1540 -0
  59. package/dist/compiled/commander/index.mjs +2 -0
  60. package/dist/compiled/commander/license +22 -0
  61. package/dist/compiled/commander/package.json +1 -0
  62. package/dist/compiled/commander/typings/index.d.ts +890 -0
  63. package/dist/compiled/debug/index.d.ts +54 -0
  64. package/dist/compiled/debug/index.js +621 -0
  65. package/dist/compiled/debug/license +20 -0
  66. package/dist/compiled/debug/ms/index.d.ts +25 -0
  67. package/dist/compiled/debug/package.json +1 -0
  68. package/dist/compiled/dotenv/index.js +101 -0
  69. package/dist/compiled/dotenv/license +23 -0
  70. package/dist/compiled/dotenv/package.json +1 -0
  71. package/dist/compiled/dotenv/types/index.d.ts +59 -0
  72. package/dist/compiled/dotenv-expand/index.d.ts +15 -0
  73. package/dist/compiled/dotenv-expand/index.js +54 -0
  74. package/dist/compiled/dotenv-expand/license +24 -0
  75. package/dist/compiled/dotenv-expand/package.json +1 -0
  76. package/dist/compiled/execa/index.d.ts +564 -0
  77. package/dist/compiled/execa/index.js +1738 -0
  78. package/dist/compiled/execa/license +9 -0
  79. package/dist/compiled/execa/package.json +1 -0
  80. package/dist/compiled/fast-glob/@nodelib/fs.scandir/out/adapters/fs.d.ts +20 -0
  81. package/dist/compiled/fast-glob/@nodelib/fs.scandir/out/index.d.ts +12 -0
  82. package/dist/compiled/fast-glob/@nodelib/fs.scandir/out/providers/async.d.ts +7 -0
  83. package/dist/compiled/fast-glob/@nodelib/fs.scandir/out/settings.d.ts +20 -0
  84. package/dist/compiled/fast-glob/@nodelib/fs.scandir/out/types/index.d.ts +20 -0
  85. package/dist/compiled/fast-glob/@nodelib/fs.stat/out/adapters/fs.d.ts +13 -0
  86. package/dist/compiled/fast-glob/@nodelib/fs.stat/out/index.d.ts +12 -0
  87. package/dist/compiled/fast-glob/@nodelib/fs.stat/out/providers/async.d.ts +4 -0
  88. package/dist/compiled/fast-glob/@nodelib/fs.stat/out/settings.d.ts +16 -0
  89. package/dist/compiled/fast-glob/@nodelib/fs.stat/out/types/index.d.ts +4 -0
  90. package/dist/compiled/fast-glob/@nodelib/fs.walk/out/index.d.ts +14 -0
  91. package/dist/compiled/fast-glob/@nodelib/fs.walk/out/providers/async.d.ts +12 -0
  92. package/dist/compiled/fast-glob/@nodelib/fs.walk/out/readers/async.d.ts +30 -0
  93. package/dist/compiled/fast-glob/@nodelib/fs.walk/out/readers/reader.d.ts +6 -0
  94. package/dist/compiled/fast-glob/@nodelib/fs.walk/out/settings.d.ts +30 -0
  95. package/dist/compiled/fast-glob/@nodelib/fs.walk/out/types/index.d.ts +8 -0
  96. package/dist/compiled/fast-glob/index.js +4665 -0
  97. package/dist/compiled/fast-glob/index.js.LICENSE.txt +38 -0
  98. package/dist/compiled/fast-glob/license +21 -0
  99. package/dist/compiled/fast-glob/out/index.d.ts +27 -0
  100. package/dist/compiled/fast-glob/out/managers/tasks.d.ts +22 -0
  101. package/dist/compiled/fast-glob/out/settings.d.ts +164 -0
  102. package/dist/compiled/fast-glob/out/types/index.d.ts +31 -0
  103. package/dist/compiled/fast-glob/package.json +1 -0
  104. package/dist/compiled/filesize/filesize.d.ts +131 -0
  105. package/dist/compiled/filesize/index.js +198 -0
  106. package/dist/compiled/filesize/index.js.LICENSE.txt +7 -0
  107. package/dist/compiled/filesize/license +28 -0
  108. package/dist/compiled/filesize/package.json +1 -0
  109. package/dist/compiled/fs-extra/index.d.ts +563 -0
  110. package/dist/compiled/fs-extra/index.js +2222 -0
  111. package/dist/compiled/fs-extra/license +15 -0
  112. package/dist/compiled/fs-extra/package.json +1 -0
  113. package/dist/compiled/glob/index.d.ts +91 -0
  114. package/dist/compiled/glob/index.js +2011 -0
  115. package/dist/compiled/glob/license +21 -0
  116. package/dist/compiled/glob/minimatch/index.d.ts +204 -0
  117. package/dist/compiled/glob/package.json +1 -0
  118. package/dist/compiled/globby/index.d.ts +186 -0
  119. package/dist/compiled/globby/index.js +690 -0
  120. package/dist/compiled/globby/license +9 -0
  121. package/dist/compiled/globby/package.json +1 -0
  122. package/dist/compiled/gzip-size/index.d.ts +96 -0
  123. package/dist/compiled/gzip-size/index.js +157 -0
  124. package/dist/compiled/gzip-size/license +9 -0
  125. package/dist/compiled/gzip-size/package.json +1 -0
  126. package/dist/compiled/import-lazy/index.d.ts +26 -0
  127. package/dist/compiled/import-lazy/index.js +45 -0
  128. package/dist/compiled/import-lazy/license +9 -0
  129. package/dist/compiled/import-lazy/package.json +1 -0
  130. package/dist/compiled/inquirer/index.d.ts +997 -0
  131. package/dist/compiled/inquirer/index.js +20167 -0
  132. package/dist/compiled/inquirer/index.js.LICENSE.txt +7 -0
  133. package/dist/compiled/inquirer/lib/objects/choice.d.ts +65 -0
  134. package/dist/compiled/inquirer/lib/objects/choices.d.ts +206 -0
  135. package/dist/compiled/inquirer/lib/objects/separator.d.ts +37 -0
  136. package/dist/compiled/inquirer/lib/ui/baseUI.d.ts +37 -0
  137. package/dist/compiled/inquirer/lib/ui/bottom-bar.d.ts +65 -0
  138. package/dist/compiled/inquirer/lib/ui/prompt.d.ts +104 -0
  139. package/dist/compiled/inquirer/license +22 -0
  140. package/dist/compiled/inquirer/package.json +1 -0
  141. package/dist/compiled/inquirer/through/index.d.ts +25 -0
  142. package/dist/compiled/js-yaml/index.d.ts +154 -0
  143. package/dist/compiled/js-yaml/index.js +2191 -0
  144. package/dist/compiled/js-yaml/index.mjs +2167 -0
  145. package/dist/compiled/js-yaml/index.mjs.LICENSE.txt +1 -0
  146. package/dist/compiled/js-yaml/license +21 -0
  147. package/dist/compiled/js-yaml/package.json +1 -0
  148. package/dist/compiled/json5/index.js +983 -0
  149. package/dist/compiled/json5/lib/index.d.ts +4 -0
  150. package/dist/compiled/json5/lib/parse.d.ts +15 -0
  151. package/dist/compiled/json5/lib/stringify.d.ts +89 -0
  152. package/dist/compiled/json5/package.json +1 -0
  153. package/dist/compiled/lodash/common/array.d.ts +2126 -0
  154. package/dist/compiled/lodash/common/collection.d.ts +1930 -0
  155. package/dist/compiled/lodash/common/common.d.ts +280 -0
  156. package/dist/compiled/lodash/common/date.d.ts +23 -0
  157. package/dist/compiled/lodash/common/function.d.ts +1446 -0
  158. package/dist/compiled/lodash/common/lang.d.ts +1693 -0
  159. package/dist/compiled/lodash/common/math.d.ts +405 -0
  160. package/dist/compiled/lodash/common/number.d.ts +131 -0
  161. package/dist/compiled/lodash/common/object.d.ts +2519 -0
  162. package/dist/compiled/lodash/common/seq.d.ts +210 -0
  163. package/dist/compiled/lodash/common/string.d.ts +788 -0
  164. package/dist/compiled/lodash/common/util.d.ts +1220 -0
  165. package/dist/compiled/lodash/index.d.ts +46 -0
  166. package/dist/compiled/lodash/index.js +1 -0
  167. package/dist/compiled/lodash/index.mjs +1 -0
  168. package/dist/compiled/lodash/license +47 -0
  169. package/dist/compiled/lodash/package.json +1 -0
  170. package/dist/compiled/mime-types/index.d.ts +14 -0
  171. package/dist/compiled/mime-types/index.js +116 -0
  172. package/dist/compiled/mime-types/index.js.LICENSE.txt +13 -0
  173. package/dist/compiled/mime-types/license +23 -0
  174. package/dist/compiled/mime-types/package.json +1 -0
  175. package/dist/compiled/minimist/index.d.ts +95 -0
  176. package/dist/compiled/minimist/index.js +202 -0
  177. package/dist/compiled/minimist/license +18 -0
  178. package/dist/compiled/minimist/package.json +1 -0
  179. package/dist/compiled/nanoid/index.d.ts +91 -0
  180. package/dist/compiled/nanoid/index.js +83 -0
  181. package/dist/compiled/nanoid/index.mjs +69 -0
  182. package/dist/compiled/nanoid/license +20 -0
  183. package/dist/compiled/nanoid/package.json +1 -0
  184. package/dist/compiled/ora/cli-spinners/index.d.ts +125 -0
  185. package/dist/compiled/ora/index.d.ts +277 -0
  186. package/dist/compiled/ora/index.js +3936 -0
  187. package/dist/compiled/ora/index.js.LICENSE.txt +1 -0
  188. package/dist/compiled/ora/license +9 -0
  189. package/dist/compiled/ora/package.json +1 -0
  190. package/dist/compiled/pkg-up/index.d.ts +48 -0
  191. package/dist/compiled/pkg-up/index.js +15 -0
  192. package/dist/compiled/pkg-up/license +9 -0
  193. package/dist/compiled/pkg-up/package.json +1 -0
  194. package/dist/compiled/semver/classes/comparator.d.ts +17 -0
  195. package/dist/compiled/semver/classes/range.d.ts +21 -0
  196. package/dist/compiled/semver/classes/semver.d.ts +62 -0
  197. package/dist/compiled/semver/functions/clean.d.ts +8 -0
  198. package/dist/compiled/semver/functions/cmp.d.ts +16 -0
  199. package/dist/compiled/semver/functions/coerce.d.ts +12 -0
  200. package/dist/compiled/semver/functions/compare-build.d.ts +16 -0
  201. package/dist/compiled/semver/functions/compare-loose.d.ts +5 -0
  202. package/dist/compiled/semver/functions/compare.d.ts +20 -0
  203. package/dist/compiled/semver/functions/diff.d.ts +13 -0
  204. package/dist/compiled/semver/functions/eq.d.ts +9 -0
  205. package/dist/compiled/semver/functions/gt.d.ts +9 -0
  206. package/dist/compiled/semver/functions/gte.d.ts +9 -0
  207. package/dist/compiled/semver/functions/inc.d.ts +15 -0
  208. package/dist/compiled/semver/functions/lt.d.ts +9 -0
  209. package/dist/compiled/semver/functions/lte.d.ts +8 -0
  210. package/dist/compiled/semver/functions/major.d.ts +9 -0
  211. package/dist/compiled/semver/functions/minor.d.ts +9 -0
  212. package/dist/compiled/semver/functions/neq.d.ts +9 -0
  213. package/dist/compiled/semver/functions/parse.d.ts +12 -0
  214. package/dist/compiled/semver/functions/patch.d.ts +9 -0
  215. package/dist/compiled/semver/functions/prerelease.d.ts +12 -0
  216. package/dist/compiled/semver/functions/rcompare.d.ts +15 -0
  217. package/dist/compiled/semver/functions/rsort.d.ts +9 -0
  218. package/dist/compiled/semver/functions/satisfies.d.ts +14 -0
  219. package/dist/compiled/semver/functions/sort.d.ts +9 -0
  220. package/dist/compiled/semver/functions/valid.d.ts +11 -0
  221. package/dist/compiled/semver/index.d.ts +133 -0
  222. package/dist/compiled/semver/index.js +1779 -0
  223. package/dist/compiled/semver/internals/identifiers.d.ts +13 -0
  224. package/dist/compiled/semver/license +15 -0
  225. package/dist/compiled/semver/package.json +1 -0
  226. package/dist/compiled/semver/ranges/gtr.d.ts +14 -0
  227. package/dist/compiled/semver/ranges/intersects.d.ts +13 -0
  228. package/dist/compiled/semver/ranges/ltr.d.ts +14 -0
  229. package/dist/compiled/semver/ranges/max-satisfying.d.ts +14 -0
  230. package/dist/compiled/semver/ranges/min-satisfying.d.ts +14 -0
  231. package/dist/compiled/semver/ranges/min-version.d.ts +10 -0
  232. package/dist/compiled/semver/ranges/outside.d.ts +15 -0
  233. package/dist/compiled/semver/ranges/simplify.d.ts +14 -0
  234. package/dist/compiled/semver/ranges/subset.d.ts +13 -0
  235. package/dist/compiled/semver/ranges/to-comparators.d.ts +9 -0
  236. package/dist/compiled/semver/ranges/valid.d.ts +12 -0
  237. package/dist/compiled/signale/index.d.ts +162 -0
  238. package/dist/compiled/signale/index.js +1704 -0
  239. package/dist/compiled/signale/package.json +1 -0
  240. package/dist/compiled/slash/index.d.ts +25 -0
  241. package/dist/compiled/slash/index.js +32 -0
  242. package/dist/compiled/slash/license +9 -0
  243. package/dist/compiled/slash/package.json +1 -0
  244. package/dist/compiled/strip-ansi/index.d.ts +17 -0
  245. package/dist/compiled/strip-ansi/index.js +34 -0
  246. package/dist/compiled/strip-ansi/license +9 -0
  247. package/dist/compiled/strip-ansi/package.json +1 -0
  248. package/dist/compiled/tsconfig-paths/index.js +629 -0
  249. package/dist/compiled/tsconfig-paths/index.mjs +2 -0
  250. package/dist/compiled/tsconfig-paths/lib/config-loader.d.ts +33 -0
  251. package/dist/compiled/tsconfig-paths/lib/filesystem.d.ts +34 -0
  252. package/dist/compiled/tsconfig-paths/lib/index.d.ts +5 -0
  253. package/dist/compiled/tsconfig-paths/lib/mapping-entry.d.ts +18 -0
  254. package/dist/compiled/tsconfig-paths/lib/match-path-async.d.ts +21 -0
  255. package/dist/compiled/tsconfig-paths/lib/match-path-sync.d.ts +32 -0
  256. package/dist/compiled/tsconfig-paths/lib/register.d.ts +12 -0
  257. package/dist/compiled/tsconfig-paths/lib/try-path.d.ts +15 -0
  258. package/dist/compiled/tsconfig-paths/lib/tsconfig-loader.d.ts +28 -0
  259. package/dist/compiled/tsconfig-paths/license +21 -0
  260. package/dist/compiled/tsconfig-paths/package.json +1 -0
  261. package/dist/compiled/upath/index.js +135 -0
  262. package/dist/compiled/upath/license +22 -0
  263. package/dist/compiled/upath/package.json +1 -0
  264. package/dist/compiled/upath/upath.d.ts +241 -0
  265. package/dist/compiled/url-join/index.d.ts +17 -0
  266. package/dist/compiled/url-join/index.js +61 -0
  267. package/dist/compiled/url-join/license +21 -0
  268. package/dist/compiled/url-join/package.json +1 -0
  269. package/dist/compiled/webpack-chain/index.js +1475 -0
  270. package/dist/compiled/webpack-chain/license +373 -0
  271. package/dist/compiled/webpack-chain/package.json +1 -0
  272. package/dist/compiled/webpack-chain/types/index.d.ts +599 -0
  273. package/dist/esm/cli/alias.mjs +31 -0
  274. package/dist/esm/cli/applyOptionsChain.mjs +16 -0
  275. package/dist/esm/cli/commands.mjs +23 -0
  276. package/dist/esm/cli/common.mjs +9 -0
  277. package/dist/esm/cli/config.mjs +5 -0
  278. package/dist/esm/cli/constants.mjs +30 -0
  279. package/dist/esm/cli/ensure.mjs +9 -0
  280. package/dist/esm/cli/fs.mjs +9 -0
  281. package/dist/esm/cli/get/config.mjs +14 -0
  282. package/dist/esm/cli/get/data.mjs +49 -0
  283. package/dist/esm/cli/get/index.mjs +18 -0
  284. package/dist/esm/cli/index.mjs +23 -0
  285. package/dist/esm/cli/is/config.mjs +37 -0
  286. package/dist/esm/cli/is/env.mjs +6 -0
  287. package/dist/esm/cli/is/index.mjs +4 -0
  288. package/dist/esm/cli/is/project.mjs +75 -0
  289. package/dist/esm/cli/is/type.mjs +26 -0
  290. package/dist/esm/cli/logger.mjs +1 -0
  291. package/dist/esm/cli/modulePath.mjs +33 -0
  292. package/dist/esm/cli/monorepo.mjs +50 -0
  293. package/dist/esm/cli/package.mjs +51 -0
  294. package/dist/esm/cli/path.mjs +35 -0
  295. package/dist/esm/cli/port.mjs +35 -0
  296. package/dist/esm/cli/prettyInstructions.mjs +70 -0
  297. package/dist/esm/cli/require.mjs +79 -0
  298. package/dist/esm/cli/route.mjs +36 -0
  299. package/dist/esm/cli/runtimeExports.mjs +42 -0
  300. package/dist/esm/cli/tsconfig.mjs +7 -0
  301. package/dist/esm/cli/version.mjs +24 -0
  302. package/dist/esm/cli/watch.mjs +40 -0
  303. package/dist/esm/compiled.mjs +45 -0
  304. package/dist/esm/import.mjs +9 -0
  305. package/dist/esm/index.mjs +3 -0
  306. package/dist/esm/rslib-runtime.mjs +12 -0
  307. package/dist/esm/universal/constants.mjs +14 -0
  308. package/dist/esm/universal/index.mjs +1 -0
  309. package/dist/esm/universal/path.mjs +2 -0
  310. package/dist/esm/universal/pluginDagSort.mjs +41 -0
  311. package/dist/esm-node/cli/alias.mjs +32 -0
  312. package/dist/esm-node/cli/applyOptionsChain.mjs +17 -0
  313. package/dist/esm-node/cli/commands.mjs +24 -0
  314. package/dist/esm-node/cli/common.mjs +10 -0
  315. package/dist/esm-node/cli/config.mjs +6 -0
  316. package/dist/esm-node/cli/constants.mjs +31 -0
  317. package/dist/esm-node/cli/ensure.mjs +10 -0
  318. package/dist/esm-node/cli/fs.mjs +10 -0
  319. package/dist/esm-node/cli/get/config.mjs +15 -0
  320. package/dist/esm-node/cli/get/data.mjs +50 -0
  321. package/dist/esm-node/cli/get/index.mjs +19 -0
  322. package/dist/esm-node/cli/index.mjs +24 -0
  323. package/dist/esm-node/cli/is/config.mjs +38 -0
  324. package/dist/esm-node/cli/is/env.mjs +7 -0
  325. package/dist/esm-node/cli/is/index.mjs +5 -0
  326. package/dist/esm-node/cli/is/project.mjs +76 -0
  327. package/dist/esm-node/cli/is/type.mjs +27 -0
  328. package/dist/esm-node/cli/logger.mjs +2 -0
  329. package/dist/esm-node/cli/modulePath.mjs +34 -0
  330. package/dist/esm-node/cli/monorepo.mjs +51 -0
  331. package/dist/esm-node/cli/package.mjs +52 -0
  332. package/dist/esm-node/cli/path.mjs +36 -0
  333. package/dist/esm-node/cli/port.mjs +36 -0
  334. package/dist/esm-node/cli/prettyInstructions.mjs +71 -0
  335. package/dist/esm-node/cli/require.mjs +80 -0
  336. package/dist/esm-node/cli/route.mjs +37 -0
  337. package/dist/esm-node/cli/runtimeExports.mjs +43 -0
  338. package/dist/esm-node/cli/tsconfig.mjs +8 -0
  339. package/dist/esm-node/cli/version.mjs +25 -0
  340. package/dist/esm-node/cli/watch.mjs +41 -0
  341. package/dist/esm-node/compiled.mjs +45 -0
  342. package/dist/esm-node/import.mjs +10 -0
  343. package/dist/esm-node/index.mjs +4 -0
  344. package/dist/esm-node/universal/constants.mjs +15 -0
  345. package/dist/esm-node/universal/index.mjs +2 -0
  346. package/dist/esm-node/universal/path.mjs +3 -0
  347. package/dist/esm-node/universal/pluginDagSort.mjs +42 -0
  348. package/dist/types/cli/alias.d.ts +20 -0
  349. package/dist/types/cli/applyOptionsChain.d.ts +3 -0
  350. package/dist/types/cli/commands.d.ts +8 -0
  351. package/dist/types/cli/common.d.ts +9 -0
  352. package/dist/types/cli/config.d.ts +4 -0
  353. package/dist/types/cli/constants.d.ts +55 -0
  354. package/dist/types/cli/ensure.d.ts +8 -0
  355. package/dist/types/cli/fs.d.ts +7 -0
  356. package/dist/types/cli/get/config.d.ts +1 -0
  357. package/dist/types/cli/get/data.d.ts +6 -0
  358. package/dist/types/cli/get/index.d.ts +11 -0
  359. package/dist/types/cli/index.d.ts +23 -0
  360. package/dist/types/cli/is/config.d.ts +22 -0
  361. package/dist/types/cli/is/env.d.ts +8 -0
  362. package/dist/types/cli/is/index.d.ts +4 -0
  363. package/dist/types/cli/is/project.d.ts +39 -0
  364. package/dist/types/cli/is/type.d.ts +15 -0
  365. package/dist/types/cli/logger.d.ts +1 -0
  366. package/dist/types/cli/modulePath.d.ts +5 -0
  367. package/dist/types/cli/monorepo.d.ts +9 -0
  368. package/dist/types/cli/package.d.ts +5 -0
  369. package/dist/types/cli/path.d.ts +11 -0
  370. package/dist/types/cli/port.d.ts +12 -0
  371. package/dist/types/cli/prettyInstructions.d.ts +9 -0
  372. package/dist/types/cli/require.d.ts +9 -0
  373. package/dist/types/cli/route.d.ts +4 -0
  374. package/dist/types/cli/runtimeExports.d.ts +5 -0
  375. package/dist/types/cli/tsconfig.d.ts +1 -0
  376. package/dist/types/cli/version.d.ts +4 -0
  377. package/dist/types/cli/watch.d.ts +8 -0
  378. package/dist/types/compiled.d.ts +37 -0
  379. package/dist/types/import.d.ts +5 -0
  380. package/dist/types/index.d.ts +3 -0
  381. package/dist/types/universal/constants.d.ts +47 -0
  382. package/dist/types/universal/index.d.ts +1 -0
  383. package/dist/types/universal/path.d.ts +1 -0
  384. package/dist/types/universal/pluginDagSort.d.ts +1 -0
  385. package/package.json +174 -0
  386. package/rslib.config.mts +162 -0
  387. package/rstest.config.mts +8 -0
@@ -0,0 +1,629 @@
1
+ (()=>{
2
+ "use strict";
3
+ var e = {
4
+ 308: (e)=>{
5
+ e.exports = (e)=>{
6
+ if ("string" != typeof e) throw new TypeError("Expected a string, got " + typeof e);
7
+ if (65279 === e.charCodeAt(0)) return e.slice(1);
8
+ return e;
9
+ };
10
+ },
11
+ 154: (e, t, r)=>{
12
+ Object.defineProperty(t, "__esModule", {
13
+ value: true
14
+ });
15
+ t.configLoader = t.loadConfig = void 0;
16
+ var n = r(131);
17
+ var i = r(17);
18
+ function loadConfig(e) {
19
+ if (void 0 === e) e = process.cwd();
20
+ return configLoader({
21
+ cwd: e
22
+ });
23
+ }
24
+ t.loadConfig = loadConfig;
25
+ function configLoader(e) {
26
+ var t = e.cwd, r = e.explicitParams, a = e.tsConfigLoader, o = void 0 === a ? n.tsConfigLoader : a;
27
+ if (r) {
28
+ var s = i.isAbsolute(r.baseUrl) ? r.baseUrl : i.join(t, r.baseUrl);
29
+ return {
30
+ resultType: "success",
31
+ configFileAbsolutePath: "",
32
+ baseUrl: r.baseUrl,
33
+ absoluteBaseUrl: s,
34
+ paths: r.paths,
35
+ mainFields: r.mainFields,
36
+ addMatchAll: r.addMatchAll
37
+ };
38
+ }
39
+ var u = o({
40
+ cwd: t,
41
+ getEnv: function(e) {
42
+ return process.env[e];
43
+ }
44
+ });
45
+ if (!u.tsConfigPath) return {
46
+ resultType: "failed",
47
+ message: "Couldn't find tsconfig.json"
48
+ };
49
+ return {
50
+ resultType: "success",
51
+ configFileAbsolutePath: u.tsConfigPath,
52
+ baseUrl: u.baseUrl,
53
+ absoluteBaseUrl: i.resolve(i.dirname(u.tsConfigPath), u.baseUrl || ""),
54
+ paths: u.paths || {},
55
+ addMatchAll: void 0 !== u.baseUrl
56
+ };
57
+ }
58
+ t.configLoader = configLoader;
59
+ },
60
+ 133: (e, t, r)=>{
61
+ Object.defineProperty(t, "__esModule", {
62
+ value: true
63
+ });
64
+ t.removeExtension = t.fileExistsAsync = t.readJsonFromDiskAsync = t.readJsonFromDiskSync = t.fileExistsSync = void 0;
65
+ var n = r(147);
66
+ function fileExistsSync(e) {
67
+ if (!n.existsSync(e)) return false;
68
+ try {
69
+ var t = n.statSync(e);
70
+ return t.isFile();
71
+ } catch (e) {
72
+ return false;
73
+ }
74
+ }
75
+ t.fileExistsSync = fileExistsSync;
76
+ function readJsonFromDiskSync(e) {
77
+ if (!n.existsSync(e)) return;
78
+ return require(e);
79
+ }
80
+ t.readJsonFromDiskSync = readJsonFromDiskSync;
81
+ function readJsonFromDiskAsync(e, t) {
82
+ n.readFile(e, "utf8", function(e, r) {
83
+ if (e || !r) return t();
84
+ var n = JSON.parse(r);
85
+ return t(void 0, n);
86
+ });
87
+ }
88
+ t.readJsonFromDiskAsync = readJsonFromDiskAsync;
89
+ function fileExistsAsync(e, t) {
90
+ n.stat(e, function(e, r) {
91
+ if (e) return t(void 0, false);
92
+ t(void 0, r ? r.isFile() : false);
93
+ });
94
+ }
95
+ t.fileExistsAsync = fileExistsAsync;
96
+ function removeExtension(e) {
97
+ return e.substring(0, e.lastIndexOf(".")) || e;
98
+ }
99
+ t.removeExtension = removeExtension;
100
+ },
101
+ 188: (e, t, r)=>{
102
+ Object.defineProperty(t, "__esModule", {
103
+ value: true
104
+ });
105
+ t.getAbsoluteMappingEntries = void 0;
106
+ var n = r(17);
107
+ function getAbsoluteMappingEntries(e, t, r) {
108
+ var i = sortByLongestPrefix(Object.keys(t));
109
+ var a = [];
110
+ for(var o = 0, s = i; o < s.length; o++){
111
+ var u = s[o];
112
+ a.push({
113
+ pattern: u,
114
+ paths: t[u].map(function(t) {
115
+ return n.resolve(e, t);
116
+ })
117
+ });
118
+ }
119
+ if (!t["*"] && r) a.push({
120
+ pattern: "*",
121
+ paths: [
122
+ "".concat(e.replace(/\/$/, ""), "/*")
123
+ ]
124
+ });
125
+ return a;
126
+ }
127
+ t.getAbsoluteMappingEntries = getAbsoluteMappingEntries;
128
+ function sortByLongestPrefix(e) {
129
+ return e.concat().sort(function(e, t) {
130
+ return getPrefixLength(t) - getPrefixLength(e);
131
+ });
132
+ }
133
+ function getPrefixLength(e) {
134
+ var t = e.indexOf("*");
135
+ return e.substr(0, t).length;
136
+ }
137
+ },
138
+ 947: (e, t, r)=>{
139
+ Object.defineProperty(t, "__esModule", {
140
+ value: true
141
+ });
142
+ t.matchFromAbsolutePathsAsync = t.createMatchPathAsync = void 0;
143
+ var n = r(17);
144
+ var i = r(813);
145
+ var a = r(188);
146
+ var o = r(133);
147
+ function createMatchPathAsync(e, t, r, n) {
148
+ if (void 0 === r) r = [
149
+ "main"
150
+ ];
151
+ if (void 0 === n) n = true;
152
+ var i = a.getAbsoluteMappingEntries(e, t, n);
153
+ return function(e, t, n, a, o) {
154
+ return matchFromAbsolutePathsAsync(i, e, t, n, a, o, r);
155
+ };
156
+ }
157
+ t.createMatchPathAsync = createMatchPathAsync;
158
+ function matchFromAbsolutePathsAsync(e, t, r, n, a, s, u) {
159
+ if (void 0 === r) r = o.readJsonFromDiskAsync;
160
+ if (void 0 === n) n = o.fileExistsAsync;
161
+ if (void 0 === a) a = Object.keys(require.extensions);
162
+ if (void 0 === u) u = [
163
+ "main"
164
+ ];
165
+ var f = i.getPathsToTry(a, e, t);
166
+ if (!f) return s();
167
+ findFirstExistingPath(f, r, n, s, 0, u);
168
+ }
169
+ t.matchFromAbsolutePathsAsync = matchFromAbsolutePathsAsync;
170
+ function findFirstExistingMainFieldMappedFile(e, t, r, i, a, o) {
171
+ if (void 0 === o) o = 0;
172
+ if (o >= t.length) return a(void 0, void 0);
173
+ var tryNext = function() {
174
+ return findFirstExistingMainFieldMappedFile(e, t, r, i, a, o + 1);
175
+ };
176
+ var s = t[o];
177
+ var u = "string" == typeof s ? e[s] : s.reduce(function(e, t) {
178
+ return e[t];
179
+ }, e);
180
+ if ("string" != typeof u) return tryNext();
181
+ var f = n.join(n.dirname(r), u);
182
+ i(f, function(e, t) {
183
+ if (e) return a(e);
184
+ if (t) return a(void 0, f);
185
+ return tryNext();
186
+ });
187
+ }
188
+ function findFirstExistingPath(e, t, r, n, a, o) {
189
+ if (void 0 === a) a = 0;
190
+ if (void 0 === o) o = [
191
+ "main"
192
+ ];
193
+ var s = e[a];
194
+ if ("file" === s.type || "extension" === s.type || "index" === s.type) r(s.path, function(u, f) {
195
+ if (u) return n(u);
196
+ if (f) return n(void 0, i.getStrippedPath(s));
197
+ if (a === e.length - 1) return n();
198
+ return findFirstExistingPath(e, t, r, n, a + 1, o);
199
+ });
200
+ else if ("package" === s.type) t(s.path, function(i, u) {
201
+ if (i) return n(i);
202
+ if (u) return findFirstExistingMainFieldMappedFile(u, o, s.path, r, function(i, s) {
203
+ if (i) return n(i);
204
+ if (s) return n(void 0, s);
205
+ return findFirstExistingPath(e, t, r, n, a + 1, o);
206
+ });
207
+ return findFirstExistingPath(e, t, r, n, a + 1, o);
208
+ });
209
+ else i.exhaustiveTypeException(s.type);
210
+ }
211
+ },
212
+ 31: (e, t, r)=>{
213
+ Object.defineProperty(t, "__esModule", {
214
+ value: true
215
+ });
216
+ t.matchFromAbsolutePaths = t.createMatchPath = void 0;
217
+ var n = r(17);
218
+ var i = r(133);
219
+ var a = r(188);
220
+ var o = r(813);
221
+ function createMatchPath(e, t, r, n) {
222
+ if (void 0 === r) r = [
223
+ "main"
224
+ ];
225
+ if (void 0 === n) n = true;
226
+ var i = a.getAbsoluteMappingEntries(e, t, n);
227
+ return function(e, t, n, a) {
228
+ return matchFromAbsolutePaths(i, e, t, n, a, r);
229
+ };
230
+ }
231
+ t.createMatchPath = createMatchPath;
232
+ function matchFromAbsolutePaths(e, t, r, n, a, s) {
233
+ if (void 0 === r) r = i.readJsonFromDiskSync;
234
+ if (void 0 === n) n = i.fileExistsSync;
235
+ if (void 0 === a) a = Object.keys(require.extensions);
236
+ if (void 0 === s) s = [
237
+ "main"
238
+ ];
239
+ var u = o.getPathsToTry(a, e, t);
240
+ if (!u) return;
241
+ return findFirstExistingPath(u, r, n, s);
242
+ }
243
+ t.matchFromAbsolutePaths = matchFromAbsolutePaths;
244
+ function findFirstExistingMainFieldMappedFile(e, t, r, i) {
245
+ for(var a = 0; a < t.length; a++){
246
+ var o = t[a];
247
+ var s = "string" == typeof o ? e[o] : o.reduce(function(e, t) {
248
+ return e[t];
249
+ }, e);
250
+ if (s && "string" == typeof s) {
251
+ var u = n.join(n.dirname(r), s);
252
+ if (i(u)) return u;
253
+ }
254
+ }
255
+ }
256
+ function findFirstExistingPath(e, t, r, n) {
257
+ if (void 0 === t) t = i.readJsonFromDiskSync;
258
+ if (void 0 === n) n = [
259
+ "main"
260
+ ];
261
+ for(var a = 0, s = e; a < s.length; a++){
262
+ var u = s[a];
263
+ if ("file" === u.type || "extension" === u.type || "index" === u.type) {
264
+ if (r(u.path)) return o.getStrippedPath(u);
265
+ } else if ("package" === u.type) {
266
+ var f = t(u.path);
267
+ if (f) {
268
+ var c = findFirstExistingMainFieldMappedFile(f, n, u.path, r);
269
+ if (c) return c;
270
+ }
271
+ } else o.exhaustiveTypeException(u.type);
272
+ }
273
+ }
274
+ },
275
+ 704: function(e, t, r) {
276
+ var n = this && this.__spreadArray || function(e, t, r) {
277
+ if (r || 2 === arguments.length) {
278
+ for(var n = 0, i = t.length, a; n < i; n++)if (a || !(n in t)) {
279
+ if (!a) a = Array.prototype.slice.call(t, 0, n);
280
+ a[n] = t[n];
281
+ }
282
+ }
283
+ return e.concat(a || Array.prototype.slice.call(t));
284
+ };
285
+ Object.defineProperty(t, "__esModule", {
286
+ value: true
287
+ });
288
+ t.register = void 0;
289
+ var i = r(31);
290
+ var a = r(154);
291
+ var noOp = function() {};
292
+ function getCoreModules(e) {
293
+ e = e || [
294
+ "assert",
295
+ "buffer",
296
+ "child_process",
297
+ "cluster",
298
+ "crypto",
299
+ "dgram",
300
+ "dns",
301
+ "domain",
302
+ "events",
303
+ "fs",
304
+ "http",
305
+ "https",
306
+ "net",
307
+ "os",
308
+ "path",
309
+ "punycode",
310
+ "querystring",
311
+ "readline",
312
+ "stream",
313
+ "string_decoder",
314
+ "tls",
315
+ "tty",
316
+ "url",
317
+ "util",
318
+ "v8",
319
+ "vm",
320
+ "zlib"
321
+ ];
322
+ var t = {};
323
+ for(var r = 0, n = e; r < n.length; r++){
324
+ var i = n[r];
325
+ t[i] = true;
326
+ }
327
+ return t;
328
+ }
329
+ function register(e) {
330
+ var t;
331
+ var o;
332
+ if (e) {
333
+ t = e.cwd;
334
+ if (e.baseUrl || e.paths) o = e;
335
+ } else {
336
+ var s = r(227);
337
+ var u = s(process.argv.slice(2), {
338
+ string: [
339
+ "project"
340
+ ],
341
+ alias: {
342
+ project: [
343
+ "P"
344
+ ]
345
+ }
346
+ });
347
+ t = u.project;
348
+ }
349
+ var f = (0, a.configLoader)({
350
+ cwd: null != t ? t : process.cwd(),
351
+ explicitParams: o
352
+ });
353
+ if ("failed" === f.resultType) {
354
+ console.warn("".concat(f.message, ". tsconfig-paths will be skipped"));
355
+ return noOp;
356
+ }
357
+ var c = (0, i.createMatchPath)(f.absoluteBaseUrl, f.paths, f.mainFields, f.addMatchAll);
358
+ var d = r(503);
359
+ var l = d._resolveFilename;
360
+ var p = getCoreModules(d.builtinModules);
361
+ d._resolveFilename = function(e, t) {
362
+ var r = p.hasOwnProperty(e);
363
+ if (!r) {
364
+ var i = c(e);
365
+ if (i) {
366
+ var a = n([
367
+ i
368
+ ], [].slice.call(arguments, 1), true);
369
+ return l.apply(this, a);
370
+ }
371
+ }
372
+ return l.apply(this, arguments);
373
+ };
374
+ return function() {
375
+ d._resolveFilename = l;
376
+ };
377
+ }
378
+ t.register = register;
379
+ },
380
+ 813: (e, t, r)=>{
381
+ Object.defineProperty(t, "__esModule", {
382
+ value: true
383
+ });
384
+ t.exhaustiveTypeException = t.getStrippedPath = t.getPathsToTry = void 0;
385
+ var n = r(17);
386
+ var i = r(17);
387
+ var a = r(133);
388
+ function getPathsToTry(e, t, r) {
389
+ if (!t || !r || "." === r[0]) return;
390
+ var i = [];
391
+ for(var a = 0, o = t; a < o.length; a++){
392
+ var s = o[a];
393
+ var u = s.pattern === r ? "" : matchStar(s.pattern, r);
394
+ if (void 0 !== u) {
395
+ var _loop_1 = function(t) {
396
+ var r = t.replace("*", u);
397
+ i.push({
398
+ type: "file",
399
+ path: r
400
+ });
401
+ i.push.apply(i, e.map(function(e) {
402
+ return {
403
+ type: "extension",
404
+ path: r + e
405
+ };
406
+ }));
407
+ i.push({
408
+ type: "package",
409
+ path: n.join(r, "/package.json")
410
+ });
411
+ var a = n.join(r, "/index");
412
+ i.push.apply(i, e.map(function(e) {
413
+ return {
414
+ type: "index",
415
+ path: a + e
416
+ };
417
+ }));
418
+ };
419
+ for(var f = 0, c = s.paths; f < c.length; f++){
420
+ var d = c[f];
421
+ _loop_1(d);
422
+ }
423
+ }
424
+ }
425
+ return 0 === i.length ? void 0 : i;
426
+ }
427
+ t.getPathsToTry = getPathsToTry;
428
+ function getStrippedPath(e) {
429
+ return "index" === e.type ? (0, i.dirname)(e.path) : "file" === e.type ? e.path : "extension" === e.type ? (0, a.removeExtension)(e.path) : "package" === e.type ? e.path : exhaustiveTypeException(e.type);
430
+ }
431
+ t.getStrippedPath = getStrippedPath;
432
+ function exhaustiveTypeException(e) {
433
+ throw new Error("Unknown type ".concat(e));
434
+ }
435
+ t.exhaustiveTypeException = exhaustiveTypeException;
436
+ function matchStar(e, t) {
437
+ if (t.length < e.length) return;
438
+ if ("*" === e) return t;
439
+ var r = e.indexOf("*");
440
+ if (-1 === r) return;
441
+ var n = e.substring(0, r);
442
+ var i = e.substring(r + 1);
443
+ if (t.substr(0, r) !== n) return;
444
+ if (t.substr(t.length - i.length) !== i) return;
445
+ return t.substr(r, t.length - i.length);
446
+ }
447
+ },
448
+ 131: function(e, t, r) {
449
+ var n = this && this.__assign || function() {
450
+ n = Object.assign || function(e) {
451
+ for(var t, r = 1, n = arguments.length; r < n; r++){
452
+ t = arguments[r];
453
+ for(var i in t)if (Object.prototype.hasOwnProperty.call(t, i)) e[i] = t[i];
454
+ }
455
+ return e;
456
+ };
457
+ return n.apply(this, arguments);
458
+ };
459
+ Object.defineProperty(t, "__esModule", {
460
+ value: true
461
+ });
462
+ t.loadTsconfig = t.walkForTsConfig = t.tsConfigLoader = void 0;
463
+ var i = r(17);
464
+ var a = r(147);
465
+ var o = r(278);
466
+ var s = r(308);
467
+ function tsConfigLoader(e) {
468
+ var t = e.getEnv, r = e.cwd, n = e.loadSync, i = void 0 === n ? loadSyncDefault : n;
469
+ var a = t("TS_NODE_PROJECT");
470
+ var o = t("TS_NODE_BASEURL");
471
+ var s = i(r, a, o);
472
+ return s;
473
+ }
474
+ t.tsConfigLoader = tsConfigLoader;
475
+ function loadSyncDefault(e, t, r) {
476
+ var n = resolveConfigPath(e, t);
477
+ if (!n) return {
478
+ tsConfigPath: void 0,
479
+ baseUrl: void 0,
480
+ paths: void 0
481
+ };
482
+ var i = loadTsconfig(n);
483
+ return {
484
+ tsConfigPath: n,
485
+ baseUrl: r || i && i.compilerOptions && i.compilerOptions.baseUrl,
486
+ paths: i && i.compilerOptions && i.compilerOptions.paths
487
+ };
488
+ }
489
+ function resolveConfigPath(e, t) {
490
+ if (t) {
491
+ var r = a.lstatSync(t).isDirectory() ? i.resolve(t, "./tsconfig.json") : i.resolve(e, t);
492
+ return r;
493
+ }
494
+ if (a.statSync(e).isFile()) return i.resolve(e);
495
+ var n = walkForTsConfig(e);
496
+ return n ? i.resolve(n) : void 0;
497
+ }
498
+ function walkForTsConfig(e, t) {
499
+ if (void 0 === t) t = a.readdirSync;
500
+ var r = t(e);
501
+ var n = [
502
+ "tsconfig.json",
503
+ "jsconfig.json"
504
+ ];
505
+ for(var o = 0, s = n; o < s.length; o++){
506
+ var u = s[o];
507
+ if (-1 !== r.indexOf(u)) return i.join(e, u);
508
+ }
509
+ var f = i.dirname(e);
510
+ if (e === f) return;
511
+ return walkForTsConfig(f, t);
512
+ }
513
+ t.walkForTsConfig = walkForTsConfig;
514
+ function loadTsconfig(e, t, r) {
515
+ if (void 0 === t) t = a.existsSync;
516
+ if (void 0 === r) r = function(e) {
517
+ return a.readFileSync(e, "utf8");
518
+ };
519
+ if (!t(e)) return;
520
+ var u = r(e);
521
+ var f = s(u);
522
+ var c;
523
+ try {
524
+ c = o.parse(f);
525
+ } catch (t) {
526
+ throw new Error("".concat(e, " is malformed ").concat(t.message));
527
+ }
528
+ var d = c.extends;
529
+ if (d) {
530
+ if ("string" == typeof d && -1 === d.indexOf(".json")) d += ".json";
531
+ var l = i.dirname(e);
532
+ var p = i.join(l, d);
533
+ if (-1 !== d.indexOf("/") && -1 !== d.indexOf(".") && !t(p)) p = i.join(l, "node_modules", d);
534
+ var v = loadTsconfig(p, t, r) || {};
535
+ if (v.compilerOptions && v.compilerOptions.baseUrl) {
536
+ var h = i.dirname(d);
537
+ v.compilerOptions.baseUrl = i.join(h, v.compilerOptions.baseUrl);
538
+ }
539
+ return n(n(n({}, v), c), {
540
+ compilerOptions: n(n({}, v.compilerOptions), c.compilerOptions)
541
+ });
542
+ }
543
+ return c;
544
+ }
545
+ t.loadTsconfig = loadTsconfig;
546
+ },
547
+ 278: (e)=>{
548
+ e.exports = require("../json5");
549
+ },
550
+ 227: (e)=>{
551
+ e.exports = require("../minimist");
552
+ },
553
+ 147: (e)=>{
554
+ e.exports = require("fs");
555
+ },
556
+ 503: (e)=>{
557
+ e.exports = require("module");
558
+ },
559
+ 17: (e)=>{
560
+ e.exports = require("path");
561
+ }
562
+ };
563
+ var t = {};
564
+ function __nccwpck_require__(r) {
565
+ var n = t[r];
566
+ if (void 0 !== n) return n.exports;
567
+ var i = t[r] = {
568
+ exports: {}
569
+ };
570
+ var a = true;
571
+ try {
572
+ e[r].call(i.exports, i, i.exports, __nccwpck_require__);
573
+ a = false;
574
+ } finally{
575
+ if (a) delete t[r];
576
+ }
577
+ return i.exports;
578
+ }
579
+ if (void 0 !== __nccwpck_require__) __nccwpck_require__.ab = __dirname + "/";
580
+ var r = {};
581
+ (()=>{
582
+ var e = r;
583
+ Object.defineProperty(e, "__esModule", {
584
+ value: true
585
+ });
586
+ e.loadConfig = e.register = e.matchFromAbsolutePathsAsync = e.createMatchPathAsync = e.matchFromAbsolutePaths = e.createMatchPath = void 0;
587
+ var t = __nccwpck_require__(31);
588
+ Object.defineProperty(e, "createMatchPath", {
589
+ enumerable: true,
590
+ get: function() {
591
+ return t.createMatchPath;
592
+ }
593
+ });
594
+ Object.defineProperty(e, "matchFromAbsolutePaths", {
595
+ enumerable: true,
596
+ get: function() {
597
+ return t.matchFromAbsolutePaths;
598
+ }
599
+ });
600
+ var n = __nccwpck_require__(947);
601
+ Object.defineProperty(e, "createMatchPathAsync", {
602
+ enumerable: true,
603
+ get: function() {
604
+ return n.createMatchPathAsync;
605
+ }
606
+ });
607
+ Object.defineProperty(e, "matchFromAbsolutePathsAsync", {
608
+ enumerable: true,
609
+ get: function() {
610
+ return n.matchFromAbsolutePathsAsync;
611
+ }
612
+ });
613
+ var i = __nccwpck_require__(704);
614
+ Object.defineProperty(e, "register", {
615
+ enumerable: true,
616
+ get: function() {
617
+ return i.register;
618
+ }
619
+ });
620
+ var a = __nccwpck_require__(154);
621
+ Object.defineProperty(e, "loadConfig", {
622
+ enumerable: true,
623
+ get: function() {
624
+ return a.loadConfig;
625
+ }
626
+ });
627
+ })();
628
+ module.exports = r;
629
+ })();
@@ -0,0 +1,2 @@
1
+ import tsConfigPaths from './index.js';
2
+ export const { register, createMatchPath, matchFromAbsolutePaths, createMatchPathAsync, matchFromAbsolutePathsAsync } = tsConfigPaths;
@@ -0,0 +1,33 @@
1
+ import * as TsConfigLoader2 from "./tsconfig-loader";
2
+ export interface ExplicitParams {
3
+ baseUrl: string;
4
+ paths: {
5
+ [key: string]: Array<string>;
6
+ };
7
+ mainFields?: (string | string[])[];
8
+ addMatchAll?: boolean;
9
+ }
10
+ export declare type TsConfigLoader = (params: TsConfigLoader2.TsConfigLoaderParams) => TsConfigLoader2.TsConfigLoaderResult;
11
+ export interface ConfigLoaderParams {
12
+ cwd: string;
13
+ explicitParams?: ExplicitParams;
14
+ tsConfigLoader?: TsConfigLoader;
15
+ }
16
+ export interface ConfigLoaderSuccessResult {
17
+ resultType: "success";
18
+ configFileAbsolutePath: string;
19
+ baseUrl?: string;
20
+ absoluteBaseUrl: string;
21
+ paths: {
22
+ [key: string]: Array<string>;
23
+ };
24
+ mainFields?: (string | string[])[];
25
+ addMatchAll?: boolean;
26
+ }
27
+ export interface ConfigLoaderFailResult {
28
+ resultType: "failed";
29
+ message: string;
30
+ }
31
+ export declare type ConfigLoaderResult = ConfigLoaderSuccessResult | ConfigLoaderFailResult;
32
+ export declare function loadConfig(cwd?: string): ConfigLoaderResult;
33
+ export declare function configLoader({ cwd, explicitParams, tsConfigLoader, }: ConfigLoaderParams): ConfigLoaderResult;
@@ -0,0 +1,34 @@
1
+ /**
2
+ * Typing for the fields of package.json we care about
3
+ */
4
+ export interface PackageJson {
5
+ [key: string]: string | PackageJson;
6
+ }
7
+ /**
8
+ * A function that json from a file
9
+ */
10
+ export interface ReadJsonSync {
11
+ (packageJsonPath: string): any | undefined;
12
+ }
13
+ export interface FileExistsSync {
14
+ (name: string): boolean;
15
+ }
16
+ export interface FileExistsAsync {
17
+ (path: string, callback: (err?: Error, exists?: boolean) => void): void;
18
+ }
19
+ export interface ReadJsonAsyncCallback {
20
+ (err?: Error, content?: any): void;
21
+ }
22
+ export interface ReadJsonAsync {
23
+ (path: string, callback: ReadJsonAsyncCallback): void;
24
+ }
25
+ export declare function fileExistsSync(path: string): boolean;
26
+ /**
27
+ * Reads package.json from disk
28
+ *
29
+ * @param file Path to package.json
30
+ */
31
+ export declare function readJsonFromDiskSync(packageJsonPath: string): any | undefined;
32
+ export declare function readJsonFromDiskAsync(path: string, callback: (err?: Error, content?: any) => void): void;
33
+ export declare function fileExistsAsync(path2: string, callback2: (err?: Error, exists?: boolean) => void): void;
34
+ export declare function removeExtension(path: string): string;