@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,5 @@
1
+ export { createMatchPath, matchFromAbsolutePaths, MatchPath, } from "./match-path-sync";
2
+ export { createMatchPathAsync, matchFromAbsolutePathsAsync, MatchPathAsync, } from "./match-path-async";
3
+ export { register } from "./register";
4
+ export { loadConfig, ConfigLoaderResult, ConfigLoaderSuccessResult, ConfigLoaderFailResult, } from "./config-loader";
5
+ export { ReadJsonSync, ReadJsonAsync, FileExistsSync, FileExistsAsync, } from "./filesystem";
@@ -0,0 +1,18 @@
1
+ export interface MappingEntry {
2
+ readonly pattern: string;
3
+ readonly paths: ReadonlyArray<string>;
4
+ }
5
+ export interface Paths {
6
+ readonly [key: string]: ReadonlyArray<string>;
7
+ }
8
+ /**
9
+ * Converts an absolute baseUrl and paths to an array of absolute mapping entries.
10
+ * The array is sorted by longest prefix.
11
+ * Having an array with entries allows us to keep a sorting order rather than
12
+ * sort by keys each time we use the mappings.
13
+ *
14
+ * @param absoluteBaseUrl
15
+ * @param paths
16
+ * @param addMatchAll
17
+ */
18
+ export declare function getAbsoluteMappingEntries(absoluteBaseUrl: string, paths: Paths, addMatchAll: boolean): ReadonlyArray<MappingEntry>;
@@ -0,0 +1,21 @@
1
+ import * as MappingEntry from "./mapping-entry";
2
+ import * as Filesystem from "./filesystem";
3
+ /**
4
+ * Function that can match a path async
5
+ */
6
+ export interface MatchPathAsync {
7
+ (requestedModule: string, readJson: Filesystem.ReadJsonAsync | undefined, fileExists: Filesystem.FileExistsAsync | undefined, extensions: ReadonlyArray<string> | undefined, callback: MatchPathAsyncCallback): void;
8
+ }
9
+ export interface MatchPathAsyncCallback {
10
+ (err?: Error, path?: string): void;
11
+ }
12
+ /**
13
+ * See the sync version for docs.
14
+ */
15
+ export declare function createMatchPathAsync(absoluteBaseUrl: string, paths: {
16
+ [key: string]: Array<string>;
17
+ }, mainFields?: (string | string[])[], addMatchAll?: boolean): MatchPathAsync;
18
+ /**
19
+ * See the sync version for docs.
20
+ */
21
+ export declare function matchFromAbsolutePathsAsync(absolutePathMappings: ReadonlyArray<MappingEntry.MappingEntry>, requestedModule: string, readJson: Filesystem.ReadJsonAsync | undefined, fileExists: Filesystem.FileExistsAsync | undefined, extensions: readonly string[] | undefined, callback: MatchPathAsyncCallback, mainFields?: (string | string[])[]): void;
@@ -0,0 +1,32 @@
1
+ import * as Filesystem from "./filesystem";
2
+ import * as MappingEntry from "./mapping-entry";
3
+ /**
4
+ * Function that can match a path
5
+ */
6
+ export interface MatchPath {
7
+ (requestedModule: string, readJson?: Filesystem.ReadJsonSync, fileExists?: (name: string) => boolean, extensions?: ReadonlyArray<string>): string | undefined;
8
+ }
9
+ /**
10
+ * Creates a function that can resolve paths according to tsconfig paths property.
11
+ *
12
+ * @param absoluteBaseUrl Absolute version of baseUrl as specified in tsconfig.
13
+ * @param paths The paths as specified in tsconfig.
14
+ * @param mainFields A list of package.json field names to try when resolving module files. Select a nested field using an array of field names.
15
+ * @param addMatchAll Add a match-all "*" rule if none is present
16
+ * @returns a function that can resolve paths.
17
+ */
18
+ export declare function createMatchPath(absoluteBaseUrl: string, paths: {
19
+ [key: string]: Array<string>;
20
+ }, mainFields?: (string | string[])[], addMatchAll?: boolean): MatchPath;
21
+ /**
22
+ * Finds a path from tsconfig that matches a module load request.
23
+ *
24
+ * @param absolutePathMappings The paths to try as specified in tsconfig but resolved to absolute form.
25
+ * @param requestedModule The required module name.
26
+ * @param readJson Function that can read json from a path (useful for testing).
27
+ * @param fileExists Function that checks for existence of a file at a path (useful for testing).
28
+ * @param extensions File extensions to probe for (useful for testing).
29
+ * @param mainFields A list of package.json field names to try when resolving module files. Select a nested field using an array of field names.
30
+ * @returns the found path, or undefined if no path was found.
31
+ */
32
+ export declare function matchFromAbsolutePaths(absolutePathMappings: ReadonlyArray<MappingEntry.MappingEntry>, requestedModule: string, readJson?: Filesystem.ReadJsonSync, fileExists?: Filesystem.FileExistsSync, extensions?: Array<string>, mainFields?: (string | string[])[]): string | undefined;
@@ -0,0 +1,12 @@
1
+ import { ExplicitParams } from "./config-loader";
2
+ export interface RegisterParams extends ExplicitParams {
3
+ /**
4
+ * Defaults to `--project` CLI flag or `process.cwd()`
5
+ */
6
+ cwd?: string;
7
+ }
8
+ /**
9
+ * Installs a custom module load function that can adhere to paths in tsconfig.
10
+ * Returns a function to undo paths registration.
11
+ */
12
+ export declare function register(params?: RegisterParams): () => void;
@@ -0,0 +1,15 @@
1
+ import { MappingEntry } from "./mapping-entry";
2
+ export interface TryPath {
3
+ readonly type: "file" | "extension" | "index" | "package";
4
+ readonly path: string;
5
+ }
6
+ /**
7
+ * Builds a list of all physical paths to try by:
8
+ * 1. Check for file named exactly as request.
9
+ * 2. Check for files named as request ending in any of the extensions.
10
+ * 3. Check for file specified in package.json's main property.
11
+ * 4. Check for files named as request ending in "index" with any of the extensions.
12
+ */
13
+ export declare function getPathsToTry(extensions: ReadonlyArray<string>, absolutePathMappings: ReadonlyArray<MappingEntry>, requestedModule: string): ReadonlyArray<TryPath> | undefined;
14
+ export declare function getStrippedPath(tryPath: TryPath): string;
15
+ export declare function exhaustiveTypeException(check: never): never;
@@ -0,0 +1,28 @@
1
+ /**
2
+ * Typing for the parts of tsconfig that we care about
3
+ */
4
+ export interface Tsconfig {
5
+ extends?: string;
6
+ compilerOptions?: {
7
+ baseUrl?: string;
8
+ paths?: {
9
+ [key: string]: Array<string>;
10
+ };
11
+ strict?: boolean;
12
+ };
13
+ }
14
+ export interface TsConfigLoaderResult {
15
+ tsConfigPath: string | undefined;
16
+ baseUrl: string | undefined;
17
+ paths: {
18
+ [key: string]: Array<string>;
19
+ } | undefined;
20
+ }
21
+ export interface TsConfigLoaderParams {
22
+ getEnv: (key: string) => string | undefined;
23
+ cwd: string;
24
+ loadSync?(cwd: string, filename?: string, baseUrl?: string): TsConfigLoaderResult;
25
+ }
26
+ export declare function tsConfigLoader({ getEnv, cwd, loadSync, }: TsConfigLoaderParams): TsConfigLoaderResult;
27
+ export declare function walkForTsConfig(directory: string, readdirSync?: (path: string) => string[]): string | undefined;
28
+ export declare function loadTsconfig(configFilePath: string, existsSync?: (path: string) => boolean, readFileSync?: (filename: string) => string): Tsconfig | undefined;
@@ -0,0 +1,21 @@
1
+ The MIT License (MIT)
2
+
3
+ Copyright (c) 2016 Jonas Kello
4
+
5
+ Permission is hereby granted, free of charge, to any person obtaining a copy
6
+ of this software and associated documentation files (the "Software"), to deal
7
+ in the Software without restriction, including without limitation the rights
8
+ to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
9
+ copies of the Software, and to permit persons to whom the Software is
10
+ furnished to do so, subject to the following conditions:
11
+
12
+ The above copyright notice and this permission notice shall be included in all
13
+ copies or substantial portions of the Software.
14
+
15
+ THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
16
+ IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
17
+ FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
18
+ AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
19
+ LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
20
+ OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
21
+ SOFTWARE.
@@ -0,0 +1 @@
1
+ {"name":"tsconfig-paths","author":"Jonas Kello","version":"4.1.1","license":"MIT","types":"lib/index.d.ts"}
@@ -0,0 +1,135 @@
1
+ (()=>{
2
+ var e = {
3
+ 472: (e, t, r)=>{
4
+ var n = "2.0.1";
5
+ var i, u, a, f, l, s, o, c, h, p, _, x = [].slice, d = [].indexOf || function(e) {
6
+ for(var t = 0, r = this.length; t < r; t++)if (t in this && this[t] === e) return t;
7
+ return -1;
8
+ }, m = {}.hasOwnProperty;
9
+ o = r(17);
10
+ a = function(e) {
11
+ return "function" == typeof e;
12
+ };
13
+ f = function(e) {
14
+ return "string" == typeof e || !!e && "object" == typeof e && "[object String]" === Object.prototype.toString.call(e);
15
+ };
16
+ _ = t;
17
+ _.VERSION = null != n ? n : "NO-VERSION";
18
+ p = function(e) {
19
+ e = e.replace(/\\/g, "/");
20
+ e = e.replace(/(?<!^)\/+/g, "/");
21
+ return e;
22
+ };
23
+ for(c in o){
24
+ h = o[c];
25
+ if (a(h)) _[c] = function(e) {
26
+ return function() {
27
+ var t, r;
28
+ t = 1 <= arguments.length ? x.call(arguments, 0) : [];
29
+ t = t.map(function(e) {
30
+ if (f(e)) return p(e);
31
+ return e;
32
+ });
33
+ r = o[e].apply(o, t);
34
+ if (f(r)) return p(r);
35
+ return r;
36
+ };
37
+ }(c);
38
+ else _[c] = h;
39
+ }
40
+ _.sep = "/";
41
+ u = {
42
+ toUnix: p,
43
+ normalizeSafe: function(e) {
44
+ var t;
45
+ e = p(e);
46
+ t = _.normalize(e);
47
+ if (!e.startsWith("./") || t.startsWith("./") || t.startsWith("..")) {
48
+ if (e.startsWith("//") && !t.startsWith("//")) t = e.startsWith("//./") ? "//." + t : "/" + t;
49
+ } else t = "./" + t;
50
+ return t;
51
+ },
52
+ normalizeTrim: function(e) {
53
+ e = _.normalizeSafe(e);
54
+ if (e.endsWith("/")) return e.slice(0, +(e.length - 2) + 1 || 9e9);
55
+ return e;
56
+ },
57
+ joinSafe: function() {
58
+ var e, t, r;
59
+ e = 1 <= arguments.length ? x.call(arguments, 0) : [];
60
+ r = _.join.apply(null, e);
61
+ if (e.length > 0) {
62
+ t = p(e[0]);
63
+ if (!t.startsWith("./") || r.startsWith("./") || r.startsWith("..")) {
64
+ if (t.startsWith("//") && !r.startsWith("//")) r = t.startsWith("//./") ? "//." + r : "/" + r;
65
+ } else r = "./" + r;
66
+ }
67
+ return r;
68
+ },
69
+ addExt: function(e, t) {
70
+ if (!t) return e;
71
+ if ("." !== t[0]) t = "." + t;
72
+ return e + (e.endsWith(t) ? "" : t);
73
+ },
74
+ trimExt: function(e, t, r) {
75
+ var n;
76
+ if (null == r) r = 7;
77
+ n = _.extname(e);
78
+ if (l(n, t, r)) return e.slice(0, +(e.length - n.length - 1) + 1 || 9e9);
79
+ return e;
80
+ },
81
+ removeExt: function(e, t) {
82
+ if (!t) return e;
83
+ t = "." === t[0] ? t : "." + t;
84
+ if (_.extname(e) === t) return _.trimExt(e, [], t.length);
85
+ return e;
86
+ },
87
+ changeExt: function(e, t, r, n) {
88
+ if (null == n) n = 7;
89
+ return _.trimExt(e, r, n) + (t ? "." === t[0] ? t : "." + t : "");
90
+ },
91
+ defaultExt: function(e, t, r, n) {
92
+ var i;
93
+ if (null == n) n = 7;
94
+ i = _.extname(e);
95
+ if (l(i, r, n)) return e;
96
+ return _.addExt(e, t);
97
+ }
98
+ };
99
+ l = function(e, t, r) {
100
+ if (null == t) t = [];
101
+ return e && e.length <= r && d.call(t.map(function(e) {
102
+ return (e && "." !== e[0] ? "." : "") + e;
103
+ }), e) < 0;
104
+ };
105
+ for(s in u)if (m.call(u, s)) {
106
+ i = u[s];
107
+ if (void 0 !== _[s]) throw new Error("path." + s + " already exists.");
108
+ _[s] = i;
109
+ }
110
+ },
111
+ 17: (e)=>{
112
+ "use strict";
113
+ e.exports = require("path");
114
+ }
115
+ };
116
+ var t = {};
117
+ function __nccwpck_require__(r) {
118
+ var n = t[r];
119
+ if (void 0 !== n) return n.exports;
120
+ var i = t[r] = {
121
+ exports: {}
122
+ };
123
+ var u = true;
124
+ try {
125
+ e[r](i, i.exports, __nccwpck_require__);
126
+ u = false;
127
+ } finally{
128
+ if (u) delete t[r];
129
+ }
130
+ return i.exports;
131
+ }
132
+ if (void 0 !== __nccwpck_require__) __nccwpck_require__.ab = __dirname + "/";
133
+ var r = __nccwpck_require__(472);
134
+ module.exports = r;
135
+ })();
@@ -0,0 +1,22 @@
1
+ Copyright(c) 2014-2020 Angelos Pikoulas (agelos.pikoulas@gmail.com)
2
+
3
+ Permission is hereby granted, free of charge, to any person
4
+ obtaining a copy of this software and associated documentation
5
+ files (the "Software"), to deal in the Software without
6
+ restriction, including without limitation the rights to use,
7
+ copy, modify, merge, publish, distribute, sublicense, and/or sell
8
+ copies of the Software, and to permit persons to whom the
9
+ Software is furnished to do so, subject to the following
10
+ conditions:
11
+
12
+ The above copyright notice and this permission notice shall be
13
+ included in all copies or substantial portions of the Software.
14
+
15
+ THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND,
16
+ EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES
17
+ OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND
18
+ NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT
19
+ HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY,
20
+ WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING
21
+ FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR
22
+ OTHER DEALINGS IN THE SOFTWARE.
@@ -0,0 +1 @@
1
+ {"name":"upath","author":{"name":"Angelos Pikoulas","email":"agelos.pikoulas@gmail.com"},"version":"2.0.1","license":"MIT","types":"./upath.d.ts"}
@@ -0,0 +1,241 @@
1
+ declare namespace upath {
2
+
3
+ /**
4
+ * A parsed path object generated by path.parse() or consumed by path.format().
5
+ */
6
+ export interface ParsedPath {
7
+ /**
8
+ * The root of the path such as '/' or 'c:\'
9
+ */
10
+ root: string;
11
+ /**
12
+ * The full directory path such as '/home/user/dir' or 'c:\path\dir'
13
+ */
14
+ dir: string;
15
+ /**
16
+ * The file name including extension (if any) such as 'index.html'
17
+ */
18
+ base: string;
19
+ /**
20
+ * The file extension (if any) such as '.html'
21
+ */
22
+ ext: string;
23
+ /**
24
+ * The file name without extension (if any) such as 'index'
25
+ */
26
+ name: string;
27
+ }
28
+
29
+ /**
30
+ * Version of the library
31
+ */
32
+ export var VERSION: string;
33
+
34
+ /**
35
+ * Just converts all `to/` and consolidates duplicates, without performing any normalization.
36
+ *
37
+ * @param p string path to convert to unix.
38
+ */
39
+ export function toUnix(p: string): string;
40
+
41
+ /**
42
+ * Exactly like path.normalize(path), but it keeps the first meaningful ./.
43
+ *
44
+ * Note that the unix / is returned everywhere, so windows \ is always converted to unix /.
45
+ *
46
+ * @param p string path to normalize.
47
+ */
48
+ export function normalizeSafe(p: string): string;
49
+
50
+ /**
51
+ * Exactly like path.normalizeSafe(path), but it trims any useless ending /.
52
+ *
53
+ * @param p string path to normalize
54
+ */
55
+ export function normalizeTrim(p: string): string;
56
+
57
+ /**
58
+ * Exactly like path.join(), but it keeps the first meaningful ./.
59
+ *
60
+ * Note that the unix / is returned everywhere, so windows \ is always converted to unix /.
61
+ *
62
+ * @param paths string paths to join
63
+ */
64
+ export function joinSafe(...p: any[]): string;
65
+
66
+ /**
67
+ * Adds .ext to filename, but only if it doesn't already have the exact extension.
68
+ *
69
+ * @param file string filename to add extension to
70
+ * @param ext string extension to add
71
+ */
72
+ export function addExt(file: string, ext: string): string;
73
+
74
+ /**
75
+ * Trims a filename's extension.
76
+ *
77
+ * Extensions are considered to be up to maxSize chars long, counting the dot (defaults to 7).
78
+ *
79
+ * An Array of ignoreExts (eg ['.min']) prevents these from being considered as extension, thus are not trimmed.
80
+ *
81
+ * @param filename string filename to trim it's extension
82
+ * @param ignoreExts array extensions to ignore
83
+ * @param maxSize number max length of the extension
84
+ */
85
+ export function trimExt(filename: string, ignoreExts?: string[], maxSize?: number): string;
86
+
87
+ /**
88
+ * Removes the specific ext extension from filename, if it has it. Otherwise it leaves it as is. As in all upath functions, it be .ext or ext.
89
+ *
90
+ * @param file string filename to remove extension to
91
+ * @param ext string extension to remove
92
+ */
93
+ export function removeExt(filename: string, ext: string): string;
94
+
95
+ /**
96
+ * Changes a filename's extension to ext. If it has no (valid) extension, it adds it.
97
+ *
98
+ * Valid extensions are considered to be up to maxSize chars long, counting the dot (defaults to 7).
99
+ *
100
+ * An Array of ignoreExts (eg ['.min']) prevents these from being considered as extension, thus are not changed - the new extension is added instead.
101
+ *
102
+ * @param filename string filename to change it's extension
103
+ * @param ext string extension to change to
104
+ * @param ignoreExts array extensions to ignore
105
+ * @param maxSize number max length of the extension
106
+ */
107
+ export function changeExt(filename: string, ext: string, ignoreExts?: string[], maxSize?: number): string;
108
+
109
+ /**
110
+ * Adds .ext to filename, only if it doesn't already have any old extension.
111
+ *
112
+ * (Old) extensions are considered to be up to maxSize chars long, counting the dot (defaults to 7).
113
+ *
114
+ * An Array of ignoreExts (eg ['.min']) will force adding default .ext even if one of these is present.
115
+ *
116
+ * @param filename string filename to default to it's extension
117
+ * @param ext string extension to default to
118
+ * @param ignoreExts array extensions to ignore
119
+ * @param maxSize number max length of the extension
120
+ */
121
+ export function defaultExt(filename: string, ext: string, ignoreExts?: string[], maxSize?: number): string;
122
+
123
+ /**
124
+ * Normalize a string path, reducing '..' and '.' parts.
125
+ * When multiple slashes are found, they're replaced by a single one; when the path contains a trailing slash, it is preserved. On Windows backslashes are used.
126
+ *
127
+ * @param p string path to normalize.
128
+ */
129
+ export function normalize(p: string): string;
130
+ /**
131
+ * Join all arguments together and normalize the resulting path.
132
+ * Arguments must be strings. In v0.8, non-string arguments were silently ignored. In v0.10 and up, an exception is thrown.
133
+ *
134
+ * @param paths string paths to join.
135
+ */
136
+ export function join(...paths: any[]): string;
137
+ /**
138
+ * Join all arguments together and normalize the resulting path.
139
+ * Arguments must be strings. In v0.8, non-string arguments were silently ignored. In v0.10 and up, an exception is thrown.
140
+ *
141
+ * @param paths string paths to join.
142
+ */
143
+ export function join(...paths: string[]): string;
144
+ /**
145
+ * The right-most parameter is considered {to}. Other parameters are considered an array of {from}.
146
+ *
147
+ * Starting from leftmost {from} parameter, resolves {to} to an absolute path.
148
+ *
149
+ * If {to} isn't already absolute, {from} arguments are prepended in right to left order, until an absolute path is found. If after using all {from} paths still no absolute path is found, the current working directory is used as well. The resulting path is normalized, and trailing slashes are removed unless the path gets resolved to the root directory.
150
+ *
151
+ * @param pathSegments string paths to join. Non-string arguments are ignored.
152
+ */
153
+ export function resolve(...pathSegments: any[]): string;
154
+ /**
155
+ * Determines whether {path} is an absolute path. An absolute path will always resolve to the same location, regardless of the working directory.
156
+ *
157
+ * @param path path to test.
158
+ */
159
+ export function isAbsolute(path: string): boolean;
160
+ /**
161
+ * Solve the relative path from {from} to {to}.
162
+ * At times we have two absolute paths, and we need to derive the relative path from one to the other. This is actually the reverse transform of path.resolve.
163
+ *
164
+ * @param from
165
+ * @param to
166
+ */
167
+ export function relative(from: string, to: string): string;
168
+ /**
169
+ * Return the directory name of a path. Similar to the Unix dirname command.
170
+ *
171
+ * @param p the path to evaluate.
172
+ */
173
+ export function dirname(p: string): string;
174
+ /**
175
+ * Return the last portion of a path. Similar to the Unix basename command.
176
+ * Often used to extract the file name from a fully qualified path.
177
+ *
178
+ * @param p the path to evaluate.
179
+ * @param ext optionally, an extension to remove from the result.
180
+ */
181
+ export function basename(p: string, ext?: string): string;
182
+ /**
183
+ * Return the extension of the path, from the last '.' to end of string in the last portion of the path.
184
+ * If there is no '.' in the last portion of the path or the first character of it is '.', then it returns an empty string
185
+ *
186
+ * @param p the path to evaluate.
187
+ */
188
+ export function extname(p: string): string;
189
+ /**
190
+ * The platform-specific file separator. '\\' or '/'.
191
+ */
192
+ export var sep: string;
193
+ /**
194
+ * The platform-specific file delimiter. ';' or ':'.
195
+ */
196
+ export var delimiter: string;
197
+ /**
198
+ * Returns an object from a path string - the opposite of format().
199
+ *
200
+ * @param pathString path to evaluate.
201
+ */
202
+ export function parse(pathString: string): ParsedPath;
203
+ /**
204
+ * Returns a path string from an object - the opposite of parse().
205
+ *
206
+ * @param pathString path to evaluate.
207
+ */
208
+ export function format(pathObject: ParsedPath): string;
209
+
210
+ export module posix {
211
+ export function normalize(p: string): string;
212
+ export function join(...paths: any[]): string;
213
+ export function resolve(...pathSegments: any[]): string;
214
+ export function isAbsolute(p: string): boolean;
215
+ export function relative(from: string, to: string): string;
216
+ export function dirname(p: string): string;
217
+ export function basename(p: string, ext?: string): string;
218
+ export function extname(p: string): string;
219
+ export var sep: string;
220
+ export var delimiter: string;
221
+ export function parse(p: string): ParsedPath;
222
+ export function format(pP: ParsedPath): string;
223
+ }
224
+
225
+ export module win32 {
226
+ export function normalize(p: string): string;
227
+ export function join(...paths: any[]): string;
228
+ export function resolve(...pathSegments: any[]): string;
229
+ export function isAbsolute(p: string): boolean;
230
+ export function relative(from: string, to: string): string;
231
+ export function dirname(p: string): string;
232
+ export function basename(p: string, ext?: string): string;
233
+ export function extname(p: string): string;
234
+ export var sep: string;
235
+ export var delimiter: string;
236
+ export function parse(p: string): ParsedPath;
237
+ export function format(pP: ParsedPath): string;
238
+ }
239
+ }
240
+
241
+ export = upath;
@@ -0,0 +1,17 @@
1
+ // Type definitions for url-join 4.0
2
+ // Project: https://github.com/jfromaniello/url-join
3
+ // Definitions by: Rogier Schouten <https://github.com/rogierschouten>
4
+ // Mike Deverell <https://github.com/devrelm>
5
+ // BendingBender <https://github.com/BendingBender>
6
+ // Definitions: https://github.com/DefinitelyTyped/DefinitelyTyped
7
+
8
+ /**
9
+ * Join all arguments together and normalize the resulting url.
10
+ * This works similar to `path.join` but you shouldn't use `path.join` for urls since it works
11
+ * differently depending on the operating system and also doesn't work for some cases.
12
+ */
13
+ declare function urljoin(...parts: string[]): string;
14
+ declare function urljoin(parts: string[]): string;
15
+
16
+ export = urljoin;
17
+ export as namespace urljoin;
@@ -0,0 +1,61 @@
1
+ (()=>{
2
+ var e = {
3
+ 670: function(e) {
4
+ (function(r, i, t) {
5
+ if (e.exports) e.exports = t();
6
+ else if ("function" == typeof define && define.amd) define(t);
7
+ else i[r] = t();
8
+ })("urljoin", this, function() {
9
+ function normalize(e) {
10
+ var r = [];
11
+ if (0 === e.length) return "";
12
+ if ("string" != typeof e[0]) throw new TypeError("Url must be a string. Received " + e[0]);
13
+ if (e[0].match(/^[^/:]+:\/*$/) && e.length > 1) {
14
+ var i = e.shift();
15
+ e[0] = i + e[0];
16
+ }
17
+ if (e[0].match(/^file:\/\/\//)) e[0] = e[0].replace(/^([^/:]+):\/*/, "$1:///");
18
+ else e[0] = e[0].replace(/^([^/:]+):\/*/, "$1://");
19
+ for(var t = 0; t < e.length; t++){
20
+ var n = e[t];
21
+ if ("string" != typeof n) throw new TypeError("Url must be a string. Received " + n);
22
+ if ("" !== n) {
23
+ if (t > 0) n = n.replace(/^[\/]+/, "");
24
+ n = t < e.length - 1 ? n.replace(/[\/]+$/, "") : n.replace(/[\/]+$/, "/");
25
+ r.push(n);
26
+ }
27
+ }
28
+ var a = r.join("/");
29
+ a = a.replace(/\/(\?|&|#[^!])/g, "$1");
30
+ var f = a.split("?");
31
+ a = f.shift() + (f.length > 0 ? "?" : "") + f.join("&");
32
+ return a;
33
+ }
34
+ return function() {
35
+ var e;
36
+ e = "object" == typeof arguments[0] ? arguments[0] : [].slice.call(arguments);
37
+ return normalize(e);
38
+ };
39
+ });
40
+ }
41
+ };
42
+ var r = {};
43
+ function __nccwpck_require__(i) {
44
+ var t = r[i];
45
+ if (void 0 !== t) return t.exports;
46
+ var n = r[i] = {
47
+ exports: {}
48
+ };
49
+ var a = true;
50
+ try {
51
+ e[i].call(n.exports, n, n.exports, __nccwpck_require__);
52
+ a = false;
53
+ } finally{
54
+ if (a) delete r[i];
55
+ }
56
+ return n.exports;
57
+ }
58
+ if (void 0 !== __nccwpck_require__) __nccwpck_require__.ab = __dirname + "/";
59
+ var i = __nccwpck_require__(670);
60
+ module.exports = i;
61
+ })();
@@ -0,0 +1,21 @@
1
+ MIT License
2
+
3
+ Copyright (c) 2015 José F. Romaniello
4
+
5
+ Permission is hereby granted, free of charge, to any person obtaining a copy
6
+ of this software and associated documentation files (the "Software"), to deal
7
+ in the Software without restriction, including without limitation the rights
8
+ to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
9
+ copies of the Software, and to permit persons to whom the Software is
10
+ furnished to do so, subject to the following conditions:
11
+
12
+ The above copyright notice and this permission notice shall be included in all
13
+ copies or substantial portions of the Software.
14
+
15
+ THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
16
+ IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
17
+ FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
18
+ AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
19
+ LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
20
+ OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
21
+ SOFTWARE.