@stryke/fs 0.33.20 → 0.33.21

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 (494) hide show
  1. package/CHANGELOG.md +12 -0
  2. package/dist/{chunk-Bmb41Sf3.cjs → _virtual/rolldown_runtime.cjs} +1 -1
  3. package/dist/buffer.cjs +1 -1
  4. package/dist/buffer.d.cts +32 -2
  5. package/dist/buffer.d.cts.map +1 -0
  6. package/dist/buffer.d.mts +32 -2
  7. package/dist/buffer.d.mts.map +1 -0
  8. package/dist/buffer.mjs +2 -1
  9. package/dist/buffer.mjs.map +1 -0
  10. package/dist/chmod-x.cjs +1 -1
  11. package/dist/chmod-x.d.cts +44 -2
  12. package/dist/chmod-x.d.cts.map +1 -0
  13. package/dist/chmod-x.d.mts +44 -2
  14. package/dist/chmod-x.d.mts.map +1 -0
  15. package/dist/chmod-x.mjs +2 -1
  16. package/dist/chmod-x.mjs.map +1 -0
  17. package/dist/command-exists.cjs +1 -1
  18. package/dist/command-exists.d.cts +22 -2
  19. package/dist/command-exists.d.cts.map +1 -0
  20. package/dist/command-exists.d.mts +22 -2
  21. package/dist/command-exists.d.mts.map +1 -0
  22. package/dist/command-exists.mjs +2 -1
  23. package/dist/command-exists.mjs.map +1 -0
  24. package/dist/compress.cjs +1 -1
  25. package/dist/compress.d.cts +16 -2
  26. package/dist/compress.d.cts.map +1 -0
  27. package/dist/compress.d.mts +16 -2
  28. package/dist/compress.d.mts.map +1 -0
  29. package/dist/compress.mjs +2 -1
  30. package/dist/compress.mjs.map +1 -0
  31. package/dist/constants.d.cts +5 -2
  32. package/dist/constants.d.cts.map +1 -0
  33. package/dist/constants.d.mts +5 -2
  34. package/dist/constants.d.mts.map +1 -0
  35. package/dist/convert/src/array-buffer-to-string.cjs +1 -0
  36. package/dist/convert/src/array-buffer-to-string.mjs +2 -0
  37. package/dist/convert/src/array-buffer-to-string.mjs.map +1 -0
  38. package/dist/convert/src/to-array.cjs +1 -0
  39. package/dist/convert/src/to-array.mjs +2 -0
  40. package/dist/convert/src/to-array.mjs.map +1 -0
  41. package/dist/convert/src/uint8-array-to-string.cjs +1 -0
  42. package/dist/convert/src/uint8-array-to-string.mjs +2 -0
  43. package/dist/convert/src/uint8-array-to-string.mjs.map +1 -0
  44. package/dist/copy-file.cjs +1 -1
  45. package/dist/copy-file.d.cts +39 -2
  46. package/dist/copy-file.d.cts.map +1 -0
  47. package/dist/copy-file.d.mts +39 -2
  48. package/dist/copy-file.d.mts.map +1 -0
  49. package/dist/copy-file.mjs +2 -1
  50. package/dist/copy-file.mjs.map +1 -0
  51. package/dist/exists.cjs +1 -1
  52. package/dist/exists.d.cts +18 -2
  53. package/dist/exists.d.cts.map +1 -0
  54. package/dist/exists.d.mts +18 -2
  55. package/dist/exists.d.mts.map +1 -0
  56. package/dist/exists.mjs +2 -1
  57. package/dist/exists.mjs.map +1 -0
  58. package/dist/get-parent-path.cjs +1 -1
  59. package/dist/get-parent-path.d.cts +32 -2
  60. package/dist/get-parent-path.d.cts.map +1 -0
  61. package/dist/get-parent-path.d.mts +32 -2
  62. package/dist/get-parent-path.d.mts.map +1 -0
  63. package/dist/get-parent-path.mjs +2 -1
  64. package/dist/get-parent-path.mjs.map +1 -0
  65. package/dist/get-workspace-root.cjs +1 -1
  66. package/dist/get-workspace-root.d.cts +48 -2
  67. package/dist/get-workspace-root.d.cts.map +1 -0
  68. package/dist/get-workspace-root.d.mts +48 -2
  69. package/dist/get-workspace-root.d.mts.map +1 -0
  70. package/dist/get-workspace-root.mjs +2 -1
  71. package/dist/get-workspace-root.mjs.map +1 -0
  72. package/dist/helpers/src/get-unique.cjs +1 -0
  73. package/dist/helpers/src/get-unique.mjs +2 -0
  74. package/dist/helpers/src/get-unique.mjs.map +1 -0
  75. package/dist/helpers.cjs +1 -1
  76. package/dist/helpers.d.cts +50 -2
  77. package/dist/helpers.d.cts.map +1 -0
  78. package/dist/helpers.d.mts +50 -2
  79. package/dist/helpers.d.mts.map +1 -0
  80. package/dist/helpers.mjs +2 -1
  81. package/dist/helpers.mjs.map +1 -0
  82. package/dist/index.cjs +1 -1
  83. package/dist/index.d.cts +24 -24
  84. package/dist/index.d.mts +24 -24
  85. package/dist/index.mjs +1 -1
  86. package/dist/install.cjs +1 -1
  87. package/dist/install.d.cts +28 -2
  88. package/dist/install.d.cts.map +1 -0
  89. package/dist/install.d.mts +29 -2
  90. package/dist/install.d.mts.map +1 -0
  91. package/dist/install.mjs +2 -1
  92. package/dist/install.mjs.map +1 -0
  93. package/dist/is-file.cjs +1 -1
  94. package/dist/is-file.d.cts +36 -2
  95. package/dist/is-file.d.cts.map +1 -0
  96. package/dist/is-file.d.mts +36 -2
  97. package/dist/is-file.d.mts.map +1 -0
  98. package/dist/is-file.mjs +2 -1
  99. package/dist/is-file.mjs.map +1 -0
  100. package/dist/json/src/storm-json.cjs +1 -0
  101. package/dist/json/src/storm-json.mjs +2 -0
  102. package/dist/json/src/storm-json.mjs.map +1 -0
  103. package/dist/json/src/types.d.cts +33 -0
  104. package/dist/json/src/types.d.cts.map +1 -0
  105. package/dist/json/src/types.d.mts +33 -0
  106. package/dist/json/src/types.d.mts.map +1 -0
  107. package/dist/json/src/utils/code-frames.cjs +3 -0
  108. package/dist/json/src/utils/code-frames.mjs +4 -0
  109. package/dist/json/src/utils/code-frames.mjs.map +1 -0
  110. package/dist/json/src/utils/parse-error.cjs +1 -0
  111. package/dist/json/src/utils/parse-error.mjs +2 -0
  112. package/dist/json/src/utils/parse-error.mjs.map +1 -0
  113. package/dist/json/src/utils/parse.cjs +1 -0
  114. package/dist/json/src/utils/parse.mjs +2 -0
  115. package/dist/json/src/utils/parse.mjs.map +1 -0
  116. package/dist/json/src/utils/stringify.cjs +1 -0
  117. package/dist/json/src/utils/stringify.mjs +2 -0
  118. package/dist/json/src/utils/stringify.mjs.map +1 -0
  119. package/dist/json/src/utils/strip-comments.cjs +4 -0
  120. package/dist/json/src/utils/strip-comments.mjs +5 -0
  121. package/dist/json/src/utils/strip-comments.mjs.map +1 -0
  122. package/dist/json.cjs +1 -1
  123. package/dist/json.d.cts +54 -2
  124. package/dist/json.d.cts.map +1 -0
  125. package/dist/json.d.mts +54 -2
  126. package/dist/json.d.mts.map +1 -0
  127. package/dist/json.mjs +2 -1
  128. package/dist/json.mjs.map +1 -0
  129. package/dist/list-files.cjs +1 -1
  130. package/dist/list-files.d.cts +51 -2
  131. package/dist/list-files.d.cts.map +1 -0
  132. package/dist/list-files.d.mts +51 -2
  133. package/dist/list-files.d.mts.map +1 -0
  134. package/dist/list-files.mjs +2 -1
  135. package/dist/list-files.mjs.map +1 -0
  136. package/dist/package-fns.cjs +1 -1
  137. package/dist/package-fns.d.cts +95 -2
  138. package/dist/package-fns.d.cts.map +1 -0
  139. package/dist/package-fns.d.mts +95 -2
  140. package/dist/package-fns.d.mts.map +1 -0
  141. package/dist/package-fns.mjs +2 -1
  142. package/dist/package-fns.mjs.map +1 -0
  143. package/dist/path/src/append.cjs +1 -0
  144. package/dist/path/src/append.mjs +2 -0
  145. package/dist/path/src/append.mjs.map +1 -0
  146. package/dist/path/src/correct-path.cjs +1 -0
  147. package/dist/path/src/correct-path.mjs +2 -0
  148. package/dist/path/src/correct-path.mjs.map +1 -0
  149. package/dist/path/src/cwd.cjs +1 -0
  150. package/dist/path/src/cwd.mjs +2 -0
  151. package/dist/path/src/cwd.mjs.map +1 -0
  152. package/dist/path/src/file-path-fns.cjs +1 -0
  153. package/dist/path/src/file-path-fns.mjs +2 -0
  154. package/dist/path/src/file-path-fns.mjs.map +1 -0
  155. package/dist/path/src/is-parent-path.cjs +1 -0
  156. package/dist/path/src/is-parent-path.mjs +2 -0
  157. package/dist/path/src/is-parent-path.mjs.map +1 -0
  158. package/dist/path/src/is-root-dir.cjs +1 -0
  159. package/dist/path/src/is-root-dir.mjs +2 -0
  160. package/dist/path/src/is-root-dir.mjs.map +1 -0
  161. package/dist/path/src/is-type.cjs +1 -0
  162. package/dist/path/src/is-type.mjs +2 -0
  163. package/dist/path/src/is-type.mjs.map +1 -0
  164. package/dist/path/src/join-paths.cjs +1 -0
  165. package/dist/path/src/join-paths.mjs +2 -0
  166. package/dist/path/src/join-paths.mjs.map +1 -0
  167. package/dist/path/src/regex.cjs +1 -0
  168. package/dist/path/src/regex.mjs +2 -0
  169. package/dist/path/src/regex.mjs.map +1 -0
  170. package/dist/path/src/replace.cjs +1 -0
  171. package/dist/path/src/replace.mjs +2 -0
  172. package/dist/path/src/replace.mjs.map +1 -0
  173. package/dist/path/src/resolve-parent-path.cjs +1 -0
  174. package/dist/path/src/resolve-parent-path.mjs +2 -0
  175. package/dist/path/src/resolve-parent-path.mjs.map +1 -0
  176. package/dist/path/src/slash.cjs +1 -0
  177. package/dist/path/src/slash.mjs +2 -0
  178. package/dist/path/src/slash.mjs.map +1 -0
  179. package/dist/read-file.cjs +1 -1
  180. package/dist/read-file.d.cts +30 -2
  181. package/dist/read-file.d.cts.map +1 -0
  182. package/dist/read-file.d.mts +30 -2
  183. package/dist/read-file.d.mts.map +1 -0
  184. package/dist/read-file.mjs +2 -1
  185. package/dist/read-file.mjs.map +1 -0
  186. package/dist/registry.cjs +1 -1
  187. package/dist/registry.d.cts +53 -2
  188. package/dist/registry.d.cts.map +1 -0
  189. package/dist/registry.d.mts +53 -2
  190. package/dist/registry.d.mts.map +1 -0
  191. package/dist/registry.mjs +2 -1
  192. package/dist/registry.mjs.map +1 -0
  193. package/dist/remove-file.cjs +1 -1
  194. package/dist/remove-file.d.cts +16 -2
  195. package/dist/remove-file.d.cts.map +1 -0
  196. package/dist/remove-file.d.mts +16 -2
  197. package/dist/remove-file.d.mts.map +1 -0
  198. package/dist/remove-file.mjs +2 -1
  199. package/dist/remove-file.mjs.map +1 -0
  200. package/dist/resolve.cjs +3 -1
  201. package/dist/resolve.d.cts +106 -2
  202. package/dist/resolve.d.cts.map +1 -0
  203. package/dist/resolve.d.mts +106 -2
  204. package/dist/resolve.d.mts.map +1 -0
  205. package/dist/resolve.mjs +4 -1
  206. package/dist/resolve.mjs.map +1 -0
  207. package/dist/semver-fns.cjs +1 -1
  208. package/dist/semver-fns.d.cts +92 -2
  209. package/dist/semver-fns.d.cts.map +1 -0
  210. package/dist/semver-fns.d.mts +92 -2
  211. package/dist/semver-fns.d.mts.map +1 -0
  212. package/dist/semver-fns.mjs +2 -1
  213. package/dist/semver-fns.mjs.map +1 -0
  214. package/dist/string-format/src/package.cjs +1 -0
  215. package/dist/string-format/src/package.mjs +2 -0
  216. package/dist/string-format/src/package.mjs.map +1 -0
  217. package/dist/toml.cjs +3 -1
  218. package/dist/toml.d.cts +81 -2
  219. package/dist/toml.d.cts.map +1 -0
  220. package/dist/toml.d.mts +81 -2
  221. package/dist/toml.d.mts.map +1 -0
  222. package/dist/toml.mjs +4 -1
  223. package/dist/toml.mjs.map +1 -0
  224. package/dist/tsconfig.cjs +1 -1
  225. package/dist/tsconfig.d.cts +14 -2
  226. package/dist/tsconfig.d.cts.map +1 -0
  227. package/dist/tsconfig.d.mts +14 -2
  228. package/dist/tsconfig.d.mts.map +1 -0
  229. package/dist/tsconfig.mjs +2 -1
  230. package/dist/tsconfig.mjs.map +1 -0
  231. package/dist/type-checks/src/get-object-tag.cjs +1 -0
  232. package/dist/type-checks/src/get-object-tag.mjs +2 -0
  233. package/dist/type-checks/src/get-object-tag.mjs.map +1 -0
  234. package/dist/type-checks/src/index.cjs +1 -0
  235. package/dist/type-checks/src/index.mjs +1 -0
  236. package/dist/type-checks/src/is-buffer.cjs +1 -0
  237. package/dist/type-checks/src/is-buffer.mjs +2 -0
  238. package/dist/type-checks/src/is-buffer.mjs.map +1 -0
  239. package/dist/type-checks/src/is-collection.cjs +1 -0
  240. package/dist/type-checks/src/is-collection.mjs +1 -0
  241. package/dist/type-checks/src/is-empty.cjs +1 -0
  242. package/dist/type-checks/src/is-empty.mjs +2 -0
  243. package/dist/type-checks/src/is-empty.mjs.map +1 -0
  244. package/dist/type-checks/src/is-error.cjs +1 -0
  245. package/dist/type-checks/src/is-error.mjs +2 -0
  246. package/dist/type-checks/src/is-error.mjs.map +1 -0
  247. package/dist/type-checks/src/is-null.cjs +1 -0
  248. package/dist/type-checks/src/is-null.mjs +2 -0
  249. package/dist/type-checks/src/is-null.mjs.map +1 -0
  250. package/dist/type-checks/src/is-number.cjs +1 -0
  251. package/dist/type-checks/src/is-number.mjs +2 -0
  252. package/dist/type-checks/src/is-number.mjs.map +1 -0
  253. package/dist/type-checks/src/is-object.cjs +1 -0
  254. package/dist/type-checks/src/is-object.mjs +2 -0
  255. package/dist/type-checks/src/is-object.mjs.map +1 -0
  256. package/dist/type-checks/src/is-plain-object.cjs +1 -0
  257. package/dist/type-checks/src/is-plain-object.mjs +2 -0
  258. package/dist/type-checks/src/is-plain-object.mjs.map +1 -0
  259. package/dist/type-checks/src/is-set-string.cjs +1 -0
  260. package/dist/type-checks/src/is-set-string.mjs +2 -0
  261. package/dist/type-checks/src/is-set-string.mjs.map +1 -0
  262. package/dist/type-checks/src/is-set.cjs +1 -0
  263. package/dist/type-checks/src/is-set.mjs +2 -0
  264. package/dist/type-checks/src/is-set.mjs.map +1 -0
  265. package/dist/type-checks/src/is-string.cjs +1 -0
  266. package/dist/type-checks/src/is-string.mjs +2 -0
  267. package/dist/type-checks/src/is-string.mjs.map +1 -0
  268. package/dist/type-checks/src/is-undefined.cjs +1 -0
  269. package/dist/type-checks/src/is-undefined.mjs +2 -0
  270. package/dist/type-checks/src/is-undefined.mjs.map +1 -0
  271. package/dist/type-checks/src/type-detect.cjs +1 -0
  272. package/dist/type-checks/src/type-detect.mjs +2 -0
  273. package/dist/type-checks/src/type-detect.mjs.map +1 -0
  274. package/dist/types/src/base.cjs +1 -0
  275. package/dist/types/src/base.mjs +2 -0
  276. package/dist/types/src/base.mjs.map +1 -0
  277. package/dist/{file-D1uBqkpP.d.cts → types/src/file.d.cts} +2 -2
  278. package/dist/types/src/file.d.cts.map +1 -0
  279. package/dist/{file-DauFFmfh.d.mts → types/src/file.d.mts} +2 -2
  280. package/dist/types/src/file.d.mts.map +1 -0
  281. package/dist/{package-fns-CxokaGDY.d.mts → types/src/package-json.d.cts} +2 -95
  282. package/dist/types/src/package-json.d.cts.map +1 -0
  283. package/dist/{package-fns-BNRi_Rpc.d.cts → types/src/package-json.d.mts} +2 -95
  284. package/dist/types/src/package-json.d.mts.map +1 -0
  285. package/dist/types/src/package-manager.d.cts +5 -0
  286. package/dist/types/src/package-manager.d.cts.map +1 -0
  287. package/dist/types/src/package-manager.d.mts +5 -0
  288. package/dist/types/src/package-manager.d.mts.map +1 -0
  289. package/dist/{tsconfig-B13IMV_0.d.mts → types/src/tsconfig.d.cts} +3 -12
  290. package/dist/types/src/tsconfig.d.cts.map +1 -0
  291. package/dist/{tsconfig-C8ecu1-0.d.cts → types/src/tsconfig.d.mts} +3 -12
  292. package/dist/types/src/tsconfig.d.mts.map +1 -0
  293. package/dist/write-file.cjs +1 -1
  294. package/dist/write-file.d.cts +35 -2
  295. package/dist/write-file.d.cts.map +1 -0
  296. package/dist/write-file.d.mts +35 -2
  297. package/dist/write-file.d.mts.map +1 -0
  298. package/dist/write-file.mjs +2 -1
  299. package/dist/write-file.mjs.map +1 -0
  300. package/dist/yaml.cjs +1 -1
  301. package/dist/yaml.d.cts +23 -2
  302. package/dist/yaml.d.cts.map +1 -0
  303. package/dist/yaml.d.mts +23 -2
  304. package/dist/yaml.d.mts.map +1 -0
  305. package/dist/yaml.mjs +2 -1
  306. package/dist/yaml.mjs.map +1 -0
  307. package/package.json +11 -11
  308. package/dist/buffer-Ch164vki.cjs +0 -1
  309. package/dist/buffer-DDq-CW4J.mjs +0 -2
  310. package/dist/buffer-DDq-CW4J.mjs.map +0 -1
  311. package/dist/buffer-DgfUmhrc.d.mts +0 -32
  312. package/dist/buffer-DgfUmhrc.d.mts.map +0 -1
  313. package/dist/buffer-DvCjrjQH.d.cts +0 -32
  314. package/dist/buffer-DvCjrjQH.d.cts.map +0 -1
  315. package/dist/chmod-x-BPr4tt2-.d.cts +0 -44
  316. package/dist/chmod-x-BPr4tt2-.d.cts.map +0 -1
  317. package/dist/chmod-x-FOy3sak8.cjs +0 -1
  318. package/dist/chmod-x-QCk1GmQJ.d.mts +0 -44
  319. package/dist/chmod-x-QCk1GmQJ.d.mts.map +0 -1
  320. package/dist/chmod-x-q-TWdus7.mjs +0 -2
  321. package/dist/chmod-x-q-TWdus7.mjs.map +0 -1
  322. package/dist/command-exists-CuieR7rx.d.cts +0 -22
  323. package/dist/command-exists-CuieR7rx.d.cts.map +0 -1
  324. package/dist/command-exists-D1bV-wSk.cjs +0 -1
  325. package/dist/command-exists-Dzb2kKT4.mjs +0 -2
  326. package/dist/command-exists-Dzb2kKT4.mjs.map +0 -1
  327. package/dist/command-exists-dBdtR0xj.d.mts +0 -22
  328. package/dist/command-exists-dBdtR0xj.d.mts.map +0 -1
  329. package/dist/compress-BiTxso15.mjs +0 -2
  330. package/dist/compress-BiTxso15.mjs.map +0 -1
  331. package/dist/compress-BjGbQqs_.cjs +0 -1
  332. package/dist/compress-CLAaOwH3.d.mts +0 -16
  333. package/dist/compress-CLAaOwH3.d.mts.map +0 -1
  334. package/dist/compress-CQve2a6h.d.cts +0 -16
  335. package/dist/compress-CQve2a6h.d.cts.map +0 -1
  336. package/dist/constants-D58o2CiO.d.cts +0 -5
  337. package/dist/constants-D58o2CiO.d.cts.map +0 -1
  338. package/dist/constants-DZz9LJgo.d.mts +0 -5
  339. package/dist/constants-DZz9LJgo.d.mts.map +0 -1
  340. package/dist/copy-file-B5FJHiIK.d.mts +0 -39
  341. package/dist/copy-file-B5FJHiIK.d.mts.map +0 -1
  342. package/dist/copy-file-Bot2YNtT.mjs +0 -2
  343. package/dist/copy-file-Bot2YNtT.mjs.map +0 -1
  344. package/dist/copy-file-DjH2Ho5e.d.cts +0 -39
  345. package/dist/copy-file-DjH2Ho5e.d.cts.map +0 -1
  346. package/dist/copy-file-Y1ilzocZ.cjs +0 -1
  347. package/dist/cwd-YTg9Cx6C.mjs +0 -2
  348. package/dist/cwd-YTg9Cx6C.mjs.map +0 -1
  349. package/dist/cwd-o2vq8Tk9.cjs +0 -1
  350. package/dist/exists-175EN367.d.mts +0 -18
  351. package/dist/exists-175EN367.d.mts.map +0 -1
  352. package/dist/exists-B31lSRFp.cjs +0 -1
  353. package/dist/exists-CVlDImzc.d.cts +0 -18
  354. package/dist/exists-CVlDImzc.d.cts.map +0 -1
  355. package/dist/exists-Ci-9lYmi.mjs +0 -2
  356. package/dist/exists-Ci-9lYmi.mjs.map +0 -1
  357. package/dist/file-D1uBqkpP.d.cts.map +0 -1
  358. package/dist/file-DauFFmfh.d.mts.map +0 -1
  359. package/dist/file-path-fns-7aKacdLg.cjs +0 -1
  360. package/dist/file-path-fns-BDzC2SIV.mjs +0 -2
  361. package/dist/file-path-fns-BDzC2SIV.mjs.map +0 -1
  362. package/dist/get-parent-path-COkh6Pvl.d.mts +0 -32
  363. package/dist/get-parent-path-COkh6Pvl.d.mts.map +0 -1
  364. package/dist/get-parent-path-Cbqs2km7.d.cts +0 -32
  365. package/dist/get-parent-path-Cbqs2km7.d.cts.map +0 -1
  366. package/dist/get-parent-path-CfRkaB4R.cjs +0 -1
  367. package/dist/get-parent-path-DLFSyxSW.mjs +0 -2
  368. package/dist/get-parent-path-DLFSyxSW.mjs.map +0 -1
  369. package/dist/get-workspace-root-CCNjjZGY.cjs +0 -1
  370. package/dist/get-workspace-root-DQBvBd8X.d.mts +0 -48
  371. package/dist/get-workspace-root-DQBvBd8X.d.mts.map +0 -1
  372. package/dist/get-workspace-root-eTfm1jII.d.cts +0 -48
  373. package/dist/get-workspace-root-eTfm1jII.d.cts.map +0 -1
  374. package/dist/get-workspace-root-k66w-wLW.mjs +0 -2
  375. package/dist/get-workspace-root-k66w-wLW.mjs.map +0 -1
  376. package/dist/helpers-BSEQb1fp.mjs +0 -2
  377. package/dist/helpers-BSEQb1fp.mjs.map +0 -1
  378. package/dist/helpers-CYWFZ-Uv.d.mts +0 -50
  379. package/dist/helpers-CYWFZ-Uv.d.mts.map +0 -1
  380. package/dist/helpers-CgMOExPa.d.cts +0 -50
  381. package/dist/helpers-CgMOExPa.d.cts.map +0 -1
  382. package/dist/helpers-_MJ6PR-g.cjs +0 -1
  383. package/dist/install-B3bIjHoU.mjs +0 -2
  384. package/dist/install-B3bIjHoU.mjs.map +0 -1
  385. package/dist/install-CZ_S7NHm.cjs +0 -1
  386. package/dist/install-CxPsLO2t.d.cts +0 -28
  387. package/dist/install-CxPsLO2t.d.cts.map +0 -1
  388. package/dist/install-dYt7hlQn.d.mts +0 -29
  389. package/dist/install-dYt7hlQn.d.mts.map +0 -1
  390. package/dist/is-error-CjEyTRps.cjs +0 -1
  391. package/dist/is-error-CjVXmD_8.mjs +0 -2
  392. package/dist/is-error-CjVXmD_8.mjs.map +0 -1
  393. package/dist/is-file-BkFQev3M.cjs +0 -1
  394. package/dist/is-file-CNooe8Wz.mjs +0 -2
  395. package/dist/is-file-CNooe8Wz.mjs.map +0 -1
  396. package/dist/is-file-DjqOQrqY.d.mts +0 -36
  397. package/dist/is-file-DjqOQrqY.d.mts.map +0 -1
  398. package/dist/is-file-DoBi2FN9.d.cts +0 -36
  399. package/dist/is-file-DoBi2FN9.d.cts.map +0 -1
  400. package/dist/is-object-FBXmvehR.cjs +0 -1
  401. package/dist/is-object-UsKYhyC5.mjs +0 -2
  402. package/dist/is-object-UsKYhyC5.mjs.map +0 -1
  403. package/dist/is-set-string-CLeu8BKX.cjs +0 -1
  404. package/dist/is-set-string-Cj0g4gsG.mjs +0 -2
  405. package/dist/is-set-string-Cj0g4gsG.mjs.map +0 -1
  406. package/dist/is-string-91Z3dOKQ.mjs +0 -2
  407. package/dist/is-string-91Z3dOKQ.mjs.map +0 -1
  408. package/dist/is-string-DKgNS0jA.cjs +0 -1
  409. package/dist/join-paths-BHepkhAj.mjs +0 -2
  410. package/dist/join-paths-BHepkhAj.mjs.map +0 -1
  411. package/dist/join-paths-DUdaieID.cjs +0 -1
  412. package/dist/json-CYenVxvr.d.cts +0 -83
  413. package/dist/json-CYenVxvr.d.cts.map +0 -1
  414. package/dist/json-DH7Q6Ftp.d.mts +0 -83
  415. package/dist/json-DH7Q6Ftp.d.mts.map +0 -1
  416. package/dist/json-DKhqPjHB.cjs +0 -6
  417. package/dist/json-Dp4PSH2i.mjs +0 -7
  418. package/dist/json-Dp4PSH2i.mjs.map +0 -1
  419. package/dist/list-files-Cn_UVruo.cjs +0 -1
  420. package/dist/list-files-D3dQOljX.d.cts +0 -51
  421. package/dist/list-files-D3dQOljX.d.cts.map +0 -1
  422. package/dist/list-files-D3iJzEQw.d.mts +0 -51
  423. package/dist/list-files-D3iJzEQw.d.mts.map +0 -1
  424. package/dist/list-files-D__uh3tQ.mjs +0 -2
  425. package/dist/list-files-D__uh3tQ.mjs.map +0 -1
  426. package/dist/package-fns-BNRi_Rpc.d.cts.map +0 -1
  427. package/dist/package-fns-C7-MKgBR.mjs +0 -2
  428. package/dist/package-fns-C7-MKgBR.mjs.map +0 -1
  429. package/dist/package-fns-CxokaGDY.d.mts.map +0 -1
  430. package/dist/package-fns-YTCdMAXr.cjs +0 -1
  431. package/dist/read-file-B091zB64.mjs +0 -2
  432. package/dist/read-file-B091zB64.mjs.map +0 -1
  433. package/dist/read-file-BB2WzW-N.cjs +0 -1
  434. package/dist/read-file-Bxn1VHKv.d.cts +0 -30
  435. package/dist/read-file-Bxn1VHKv.d.cts.map +0 -1
  436. package/dist/read-file-CRVW-wcE.d.mts +0 -30
  437. package/dist/read-file-CRVW-wcE.d.mts.map +0 -1
  438. package/dist/registry-B1taIPKm.mjs +0 -2
  439. package/dist/registry-B1taIPKm.mjs.map +0 -1
  440. package/dist/registry-BQ3JXRFA.d.mts +0 -53
  441. package/dist/registry-BQ3JXRFA.d.mts.map +0 -1
  442. package/dist/registry-BYwvM92u.cjs +0 -1
  443. package/dist/registry-C2A0Kau7.d.cts +0 -53
  444. package/dist/registry-C2A0Kau7.d.cts.map +0 -1
  445. package/dist/remove-file-BM64Brdf.mjs +0 -2
  446. package/dist/remove-file-BM64Brdf.mjs.map +0 -1
  447. package/dist/remove-file-BqlkL_Df.d.mts +0 -16
  448. package/dist/remove-file-BqlkL_Df.d.mts.map +0 -1
  449. package/dist/remove-file-XHFKELQN.cjs +0 -1
  450. package/dist/remove-file-lQOlxDwr.d.cts +0 -16
  451. package/dist/remove-file-lQOlxDwr.d.cts.map +0 -1
  452. package/dist/resolve-C_YsCFne.mjs +0 -4
  453. package/dist/resolve-C_YsCFne.mjs.map +0 -1
  454. package/dist/resolve-D66oIwjf.d.mts +0 -106
  455. package/dist/resolve-D66oIwjf.d.mts.map +0 -1
  456. package/dist/resolve-DTkLQekH.cjs +0 -3
  457. package/dist/resolve-DubH-8qd.d.cts +0 -106
  458. package/dist/resolve-DubH-8qd.d.cts.map +0 -1
  459. package/dist/resolve-parent-path-CR8av8WP.mjs +0 -2
  460. package/dist/resolve-parent-path-CR8av8WP.mjs.map +0 -1
  461. package/dist/resolve-parent-path-D0AaW2PB.cjs +0 -1
  462. package/dist/semver-fns-B0e5zB6C.d.mts +0 -92
  463. package/dist/semver-fns-B0e5zB6C.d.mts.map +0 -1
  464. package/dist/semver-fns-Btrm1dIF.cjs +0 -1
  465. package/dist/semver-fns-DjhZXnUw.d.cts +0 -92
  466. package/dist/semver-fns-DjhZXnUw.d.cts.map +0 -1
  467. package/dist/semver-fns-F_rYnwDq.mjs +0 -2
  468. package/dist/semver-fns-F_rYnwDq.mjs.map +0 -1
  469. package/dist/toml-CIgLQmP3.mjs +0 -4
  470. package/dist/toml-CIgLQmP3.mjs.map +0 -1
  471. package/dist/toml-D3X2QoaL.d.cts +0 -81
  472. package/dist/toml-D3X2QoaL.d.cts.map +0 -1
  473. package/dist/toml-DgVyNp_y.cjs +0 -3
  474. package/dist/toml-Djau1M6n.d.mts +0 -81
  475. package/dist/toml-Djau1M6n.d.mts.map +0 -1
  476. package/dist/tsconfig-B13IMV_0.d.mts.map +0 -1
  477. package/dist/tsconfig-B6WtgD1c.cjs +0 -1
  478. package/dist/tsconfig-C8ecu1-0.d.cts.map +0 -1
  479. package/dist/tsconfig-CqvvSVuX.mjs +0 -2
  480. package/dist/tsconfig-CqvvSVuX.mjs.map +0 -1
  481. package/dist/write-file-BmvbsmMj.d.cts +0 -35
  482. package/dist/write-file-BmvbsmMj.d.cts.map +0 -1
  483. package/dist/write-file-CFByoJkN.mjs +0 -2
  484. package/dist/write-file-CFByoJkN.mjs.map +0 -1
  485. package/dist/write-file-CWTzQpb2.d.mts +0 -35
  486. package/dist/write-file-CWTzQpb2.d.mts.map +0 -1
  487. package/dist/write-file-CqokudVp.cjs +0 -1
  488. package/dist/yaml-6uuLoSfT.d.cts +0 -23
  489. package/dist/yaml-6uuLoSfT.d.cts.map +0 -1
  490. package/dist/yaml-CLMo56UG.mjs +0 -2
  491. package/dist/yaml-CLMo56UG.mjs.map +0 -1
  492. package/dist/yaml-Ddslc5NK.d.mts +0 -23
  493. package/dist/yaml-Ddslc5NK.d.mts.map +0 -1
  494. package/dist/yaml-q2k-BjIM.cjs +0 -1
package/dist/json.d.cts CHANGED
@@ -1,2 +1,54 @@
1
- import { a as writeJsonFile, i as readJsonFileSync, n as JsonWriteOptions, o as writeJsonFileSync, r as readJsonFile, t as JsonReadOptions } from "./json-CYenVxvr.cjs";
2
- export { JsonReadOptions, JsonWriteOptions, readJsonFile, readJsonFileSync, writeJsonFile, writeJsonFileSync };
1
+ import { JsonParseOptions, JsonSerializeOptions } from "./json/src/types.cjs";
2
+
3
+ //#region src/json.d.ts
4
+ interface JsonReadOptions extends JsonParseOptions {
5
+ /**
6
+ * mutable field recording whether JSON ends with new line
7
+ *
8
+ * @defaultValue false
9
+ */
10
+ endsWithNewline?: boolean;
11
+ }
12
+ /**
13
+ * Reads a JSON file and returns the object the JSON content represents.
14
+ *
15
+ * @param path - A path to a file.
16
+ * @param options - JSON parse options
17
+ * @returns Object the JSON content of the file represents
18
+ */
19
+ declare function readJsonFileSync<T extends object = any>(path: string, options?: JsonReadOptions): T;
20
+ /**
21
+ * Reads a JSON file and returns the object the JSON content represents.
22
+ *
23
+ * @param path - A path to a file.
24
+ * @param options - JSON parse options
25
+ * @returns Object the JSON content of the file represents
26
+ */
27
+ declare function readJsonFile<T extends object = any>(path: string, options?: JsonReadOptions): Promise<T>;
28
+ interface JsonWriteOptions extends JsonSerializeOptions {
29
+ /**
30
+ * whether to append new line at the end of JSON file
31
+ *
32
+ * @defaultValue false
33
+ */
34
+ appendNewLine?: boolean;
35
+ }
36
+ /**
37
+ * Serializes the given data to JSON and writes it to a file.
38
+ *
39
+ * @param path - A path to a file.
40
+ * @param data - data which should be serialized to JSON and written to the file
41
+ * @param options - JSON serialize options
42
+ */
43
+ declare function writeJsonFileSync<T extends object = object>(path: string, data: T, options?: JsonWriteOptions): void;
44
+ /**
45
+ * Serializes the given data to JSON and writes it to a file asynchronously.
46
+ *
47
+ * @param path - A path to a file.
48
+ * @param data - data which should be serialized to JSON and written to the file
49
+ * @param options - JSON serialize options
50
+ */
51
+ declare function writeJsonFile<T extends object = object>(path: string, data: T, options?: JsonWriteOptions): Promise<void>;
52
+ //#endregion
53
+ export { JsonReadOptions, JsonWriteOptions, readJsonFile, readJsonFileSync, writeJsonFile, writeJsonFileSync };
54
+ //# sourceMappingURL=json.d.cts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"json.d.cts","names":[],"sources":["../src/json.ts"],"sourcesContent":[],"mappings":";;;UA2BiB,eAAA,SAAwB;;AAAzC;AAgBA;AA4BA;;EAGW,eAAA,CAAA,EAAA,OAAA;;;AAkBX;AAgBA;AAoBA;;;;AAIU,iBAzFM,gBAyFN,CAAA,UAAA,MAAA,GAAA,GAAA,CAAA,CAAA,IAAA,EAAA,MAAA,EAAA,OAAA,CAAA,EAvFE,eAuFF,CAAA,EAtFP,CAsFO;;;;;;;;iBA7DY,6DAEV,kBACT,QAAQ;UAkBM,gBAAA,SAAyB;;;;;;;;;;;;;;;iBAgB1B,iEAER,aACI;;;;;;;;iBAiBU,6DAEd,aACI,mBACT"}
package/dist/json.d.mts CHANGED
@@ -1,2 +1,54 @@
1
- import { a as writeJsonFile, i as readJsonFileSync, n as JsonWriteOptions, o as writeJsonFileSync, r as readJsonFile, t as JsonReadOptions } from "./json-DH7Q6Ftp.mjs";
2
- export { JsonReadOptions, JsonWriteOptions, readJsonFile, readJsonFileSync, writeJsonFile, writeJsonFileSync };
1
+ import { JsonParseOptions, JsonSerializeOptions } from "./json/src/types.mjs";
2
+
3
+ //#region src/json.d.ts
4
+ interface JsonReadOptions extends JsonParseOptions {
5
+ /**
6
+ * mutable field recording whether JSON ends with new line
7
+ *
8
+ * @defaultValue false
9
+ */
10
+ endsWithNewline?: boolean;
11
+ }
12
+ /**
13
+ * Reads a JSON file and returns the object the JSON content represents.
14
+ *
15
+ * @param path - A path to a file.
16
+ * @param options - JSON parse options
17
+ * @returns Object the JSON content of the file represents
18
+ */
19
+ declare function readJsonFileSync<T extends object = any>(path: string, options?: JsonReadOptions): T;
20
+ /**
21
+ * Reads a JSON file and returns the object the JSON content represents.
22
+ *
23
+ * @param path - A path to a file.
24
+ * @param options - JSON parse options
25
+ * @returns Object the JSON content of the file represents
26
+ */
27
+ declare function readJsonFile<T extends object = any>(path: string, options?: JsonReadOptions): Promise<T>;
28
+ interface JsonWriteOptions extends JsonSerializeOptions {
29
+ /**
30
+ * whether to append new line at the end of JSON file
31
+ *
32
+ * @defaultValue false
33
+ */
34
+ appendNewLine?: boolean;
35
+ }
36
+ /**
37
+ * Serializes the given data to JSON and writes it to a file.
38
+ *
39
+ * @param path - A path to a file.
40
+ * @param data - data which should be serialized to JSON and written to the file
41
+ * @param options - JSON serialize options
42
+ */
43
+ declare function writeJsonFileSync<T extends object = object>(path: string, data: T, options?: JsonWriteOptions): void;
44
+ /**
45
+ * Serializes the given data to JSON and writes it to a file asynchronously.
46
+ *
47
+ * @param path - A path to a file.
48
+ * @param data - data which should be serialized to JSON and written to the file
49
+ * @param options - JSON serialize options
50
+ */
51
+ declare function writeJsonFile<T extends object = object>(path: string, data: T, options?: JsonWriteOptions): Promise<void>;
52
+ //#endregion
53
+ export { JsonReadOptions, JsonWriteOptions, readJsonFile, readJsonFileSync, writeJsonFile, writeJsonFileSync };
54
+ //# sourceMappingURL=json.d.mts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"json.d.mts","names":[],"sources":["../src/json.ts"],"sourcesContent":[],"mappings":";;;UA2BiB,eAAA,SAAwB;;AAAzC;AAgBA;AA4BA;;EAGW,eAAA,CAAA,EAAA,OAAA;;;AAkBX;AAgBA;AAoBA;;;;AAIU,iBAzFM,gBAyFN,CAAA,UAAA,MAAA,GAAA,GAAA,CAAA,CAAA,IAAA,EAAA,MAAA,EAAA,OAAA,CAAA,EAvFE,eAuFF,CAAA,EAtFP,CAsFO;;;;;;;;iBA7DY,6DAEV,kBACT,QAAQ;UAkBM,gBAAA,SAAyB;;;;;;;;;;;;;;;iBAgB1B,iEAER,aACI;;;;;;;;iBAiBU,6DAEd,aACI,mBACT"}
package/dist/json.mjs CHANGED
@@ -1 +1,2 @@
1
- import"./helpers-BSEQb1fp.mjs";import"./write-file-CFByoJkN.mjs";import{i as e,n as t,r as n,t as r}from"./json-Dp4PSH2i.mjs";export{r as readJsonFile,t as readJsonFileSync,n as writeJsonFile,e as writeJsonFileSync};
1
+ import{isError as e}from"./type-checks/src/is-error.mjs";import{readFile as t,readFileSync as n}from"./read-file.mjs";import{writeFile as r,writeFileSync as i}from"./write-file.mjs";import{StormJSON as a}from"./json/src/storm-json.mjs";function o(t,r){let i=n(t);r&&(r.endsWithNewline=i.codePointAt(i.length-1)===10);try{return a.parseJson(i,r)}catch(n){throw e(n)?(n.message=n.message.replace(`JSON`,t),n):Error(`Failed to parse JSON: ${t}`)}}async function s(n,r){let i=await t(n);r&&(r.endsWithNewline=i.codePointAt(i.length-1)===10);try{return a.parseJson(i,r)}catch(t){throw e(t)?(t.message=t.message.replace(`JSON`,n),t):Error(`Failed to parse JSON: ${n}`)}}function c(e,t,n){let r=a.stringify(t,n);return i(e,n?.appendNewLine?`${r}\n`:r)}async function l(e,t,n){let i=a.stringify(t);return r(e,n?.appendNewLine?`${i}\n`:i)}export{s as readJsonFile,o as readJsonFileSync,l as writeJsonFile,c as writeJsonFileSync};
2
+ //# sourceMappingURL=json.mjs.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"json.mjs","names":[],"sources":["../src/json.ts"],"sourcesContent":["/* -------------------------------------------------------------------\n\n ⚡ Storm Software - Stryke\n\n This code was released as part of the Stryke project. Stryke\n is maintained by Storm Software under the Apache-2.0 license, and is\n free for commercial and private use. For more information, please visit\n our licensing page at https://stormsoftware.com/licenses/projects/stryke.\n\n Website: https://stormsoftware.com\n Repository: https://github.com/storm-software/stryke\n Documentation: https://docs.stormsoftware.com/projects/stryke\n Contact: https://stormsoftware.com/contact\n\n SPDX-License-Identifier: Apache-2.0\n\n ------------------------------------------------------------------- */\n\nimport { StormJSON } from \"@stryke/json/storm-json\";\nimport type {\n JsonParseOptions,\n JsonSerializeOptions\n} from \"@stryke/json/types\";\nimport { isError } from \"@stryke/type-checks/is-error\";\nimport { readFile, readFileSync } from \"./read-file\";\nimport { writeFile, writeFileSync } from \"./write-file\";\n\nexport interface JsonReadOptions extends JsonParseOptions {\n /**\n * mutable field recording whether JSON ends with new line\n *\n * @defaultValue false\n */\n endsWithNewline?: boolean;\n}\n\n/**\n * Reads a JSON file and returns the object the JSON content represents.\n *\n * @param path - A path to a file.\n * @param options - JSON parse options\n * @returns Object the JSON content of the file represents\n */\nexport function readJsonFileSync<T extends object = any>(\n path: string,\n options?: JsonReadOptions\n): T {\n const content = readFileSync(path);\n if (options) {\n options.endsWithNewline = content.codePointAt(content.length - 1) === 10;\n }\n\n try {\n return StormJSON.parseJson<T>(content, options);\n } catch (error) {\n if (isError(error)) {\n error.message = error.message.replace(\"JSON\", path);\n throw error;\n }\n\n throw new Error(`Failed to parse JSON: ${path}`);\n }\n}\n\n/**\n * Reads a JSON file and returns the object the JSON content represents.\n *\n * @param path - A path to a file.\n * @param options - JSON parse options\n * @returns Object the JSON content of the file represents\n */\nexport async function readJsonFile<T extends object = any>(\n path: string,\n options?: JsonReadOptions\n): Promise<T> {\n const content = await readFile(path);\n if (options) {\n options.endsWithNewline = content.codePointAt(content.length - 1) === 10;\n }\n\n try {\n return StormJSON.parseJson<T>(content, options);\n } catch (error) {\n if (isError(error)) {\n error.message = error.message.replace(\"JSON\", path);\n throw error;\n }\n\n throw new Error(`Failed to parse JSON: ${path}`);\n }\n}\n\nexport interface JsonWriteOptions extends JsonSerializeOptions {\n /**\n * whether to append new line at the end of JSON file\n *\n * @defaultValue false\n */\n appendNewLine?: boolean;\n}\n\n/**\n * Serializes the given data to JSON and writes it to a file.\n *\n * @param path - A path to a file.\n * @param data - data which should be serialized to JSON and written to the file\n * @param options - JSON serialize options\n */\nexport function writeJsonFileSync<T extends object = object>(\n path: string,\n data: T,\n options?: JsonWriteOptions\n): void {\n const serializedJson = StormJSON.stringify(data, options);\n\n return writeFileSync(\n path,\n options?.appendNewLine ? `${serializedJson}\\n` : serializedJson\n );\n}\n\n/**\n * Serializes the given data to JSON and writes it to a file asynchronously.\n *\n * @param path - A path to a file.\n * @param data - data which should be serialized to JSON and written to the file\n * @param options - JSON serialize options\n */\nexport async function writeJsonFile<T extends object = object>(\n path: string,\n data: T,\n options?: JsonWriteOptions\n): Promise<void> {\n const serializedJson = StormJSON.stringify(data);\n\n return writeFile(\n path,\n options?.appendNewLine ? `${serializedJson}\\n` : serializedJson\n );\n}\n"],"mappings":"4OA2CA,SAAgB,EACd,EACA,EACG,CACH,IAAM,EAAU,EAAa,EAAK,CAC9B,IACF,EAAQ,gBAAkB,EAAQ,YAAY,EAAQ,OAAS,EAAE,GAAK,IAGxE,GAAI,CACF,OAAO,EAAU,UAAa,EAAS,EAAQ,OACxC,EAAO,CAMd,MALI,EAAQ,EAAM,EAChB,EAAM,QAAU,EAAM,QAAQ,QAAQ,OAAQ,EAAK,CAC7C,GAGE,MAAM,yBAAyB,IAAO,EAWpD,eAAsB,EACpB,EACA,EACY,CACZ,IAAM,EAAU,MAAM,EAAS,EAAK,CAChC,IACF,EAAQ,gBAAkB,EAAQ,YAAY,EAAQ,OAAS,EAAE,GAAK,IAGxE,GAAI,CACF,OAAO,EAAU,UAAa,EAAS,EAAQ,OACxC,EAAO,CAMd,MALI,EAAQ,EAAM,EAChB,EAAM,QAAU,EAAM,QAAQ,QAAQ,OAAQ,EAAK,CAC7C,GAGE,MAAM,yBAAyB,IAAO,EAoBpD,SAAgB,EACd,EACA,EACA,EACM,CACN,IAAM,EAAiB,EAAU,UAAU,EAAM,EAAQ,CAEzD,OAAO,EACL,EACA,GAAS,cAAgB,GAAG,EAAe,IAAM,EAClD,CAUH,eAAsB,EACpB,EACA,EACA,EACe,CACf,IAAM,EAAiB,EAAU,UAAU,EAAK,CAEhD,OAAO,EACL,EACA,GAAS,cAAgB,GAAG,EAAe,IAAM,EAClD"}
@@ -1 +1 @@
1
- const e=require(`./list-files-Cn_UVruo.cjs`);exports.list=e.t,exports.listDirectories=e.n,exports.listDirectoriesSync=e.r,exports.listFiles=e.i,exports.listFilesSync=e.a,exports.listSync=e.o;
1
+ const e=require(`./_virtual/rolldown_runtime.cjs`),t=require(`./path/src/join-paths.cjs`),n=require(`./type-checks/src/is-string.cjs`);require(`./type-checks/src/index.cjs`);let r=require(`defu`);r=e.__toESM(r);let i=require(`glob`);const a={dot:!0};async function o(e,o){return(0,i.glob)(n.isString(e)?e.includes(`*`)?e:t.joinPaths(e,`**/*`):e.input?t.joinPaths(e.input,e.glob):e.glob,(0,r.default)(n.isString(e)?{}:{dot:e.dot,ignore:e.ignore},o??{},a))}function s(e,o){return i.glob.sync(n.isString(e)?e.includes(`*`)?e:t.joinPaths(e,`**/*`):e.input?t.joinPaths(e.input,e.glob):e.glob,(0,r.default)(n.isString(e)?{}:{dot:e.dot,ignore:e.ignore},o??{},a))}async function c(e,t){let n=(await o(e,(0,r.default)({withFileTypes:!0},t??{}))).filter(e=>e.isFile());return t?.withFileTypes?n:n.map(e=>e.fullpath())}function l(e,t){let n=s(e,(0,r.default)({withFileTypes:!0},t??{})).filter(e=>e.isFile());return t?.withFileTypes?n:n.map(e=>e.fullpath())}async function u(e,t){let n=(await o(e,(0,r.default)({withFileTypes:!0},t??{}))).filter(e=>e.isDirectory());return t?.withFileTypes?n:n.map(e=>e.fullpath())}function d(e,t){let n=s(e,(0,r.default)({withFileTypes:!0},t??{})).filter(e=>e.isDirectory());return t?.withFileTypes?n:n.map(e=>e.fullpath())}exports.list=o,exports.listDirectories=u,exports.listDirectoriesSync=d,exports.listFiles=c,exports.listFilesSync=l,exports.listSync=s;
@@ -1,2 +1,51 @@
1
- import { a as listDirectoriesSync, c as listSync, i as listDirectories, n as ListOptions, o as listFiles, r as list, s as listFilesSync, t as InferListReturnType } from "./list-files-D3dQOljX.cjs";
2
- export { InferListReturnType, ListOptions, list, listDirectories, listDirectoriesSync, listFiles, listFilesSync, listSync };
1
+ import { AssetGlob } from "./types/src/file.cjs";
2
+ import { GlobOptions, Path } from "glob";
3
+
4
+ //#region src/list-files.d.ts
5
+ type ListOptions = GlobOptions;
6
+ type InferListReturnType<TOptions extends GlobOptions> = TOptions["withFileTypes"] extends true ? Path[] : string[];
7
+ /**
8
+ * A files and directories listing helper function
9
+ *
10
+ * @param filesGlob - A glob pattern to match files
11
+ * @returns A list of file paths
12
+ */
13
+ declare function list<TOptions extends ListOptions>(filesGlob: string | Omit<AssetGlob, "output">, options?: TOptions): Promise<InferListReturnType<TOptions>>;
14
+ /**
15
+ * A synchronous files and directories listing helper function
16
+ *
17
+ * @param filesGlob - A glob pattern to match files
18
+ * @returns A list of file paths
19
+ */
20
+ declare function listSync<TOptions extends ListOptions>(filesGlob: string | Omit<AssetGlob, "output">, options?: TOptions): InferListReturnType<TOptions>;
21
+ /**
22
+ * A file listing helper function
23
+ *
24
+ * @param filesGlob - A glob pattern to match files
25
+ * @returns A list of file paths
26
+ */
27
+ declare function listFiles<TOptions extends ListOptions>(filesGlob: string | Omit<AssetGlob, "output">, options?: TOptions): Promise<InferListReturnType<TOptions>>;
28
+ /**
29
+ * A synchronous file listing helper function
30
+ *
31
+ * @param filesGlob - A glob pattern to match files
32
+ * @returns A list of file paths
33
+ */
34
+ declare function listFilesSync<TOptions extends ListOptions>(filesGlob: string | Omit<AssetGlob, "output">, options?: TOptions): InferListReturnType<TOptions>;
35
+ /**
36
+ * A directories listing helper function
37
+ *
38
+ * @param filesGlob - A glob pattern to match files
39
+ * @returns A list of file paths
40
+ */
41
+ declare function listDirectories<TOptions extends ListOptions>(filesGlob: string | Omit<AssetGlob, "output">, options?: TOptions): Promise<InferListReturnType<TOptions>>;
42
+ /**
43
+ * A synchronous directories listing helper function
44
+ *
45
+ * @param filesGlob - A glob pattern to match files
46
+ * @returns A list of file paths
47
+ */
48
+ declare function listDirectoriesSync<TOptions extends ListOptions>(filesGlob: string | Omit<AssetGlob, "output">, options?: TOptions): InferListReturnType<TOptions>;
49
+ //#endregion
50
+ export { InferListReturnType, ListOptions, list, listDirectories, listDirectoriesSync, listFiles, listFilesSync, listSync };
51
+ //# sourceMappingURL=list-files.d.cts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"list-files.d.cts","names":[],"sources":["../src/list-files.ts"],"sourcesContent":[],"mappings":";;;;KAyBY,WAAA,GAAc;KACd,qCAAqC,eAC/C,yCAAyC;AAF3C;AACA;;;;;AAasB,iBAAA,IAAI,CAAA,iBAAkB,WAAlB,CAAA,CAAA,SAAA,EAAA,MAAA,GACJ,IADI,CACC,SADD,EAAA,QAAA,CAAA,EAAA,OAAA,CAAA,EAEd,QAFc,CAAA,EAGvB,OAHuB,CAGf,mBAHe,CAGK,QAHL,CAAA,CAAA;;;;;;;AAGvB,iBAyBa,QAzBb,CAAA,iBAyBuC,WAzBvC,CAAA,CAAA,SAAA,EAAA,MAAA,GA0BmB,IA1BnB,CA0BwB,SA1BxB,EAAA,QAAA,CAAA,EAAA,OAAA,CAAA,EA2BS,QA3BT,CAAA,EA4BA,mBA5BA,CA4BoB,QA5BpB,CAAA;;AAyBH;;;;;AAGuB,iBAyBD,SAzBC,CAAA,iBAyB0B,WAzB1B,CAAA,CAAA,SAAA,EAAA,MAAA,GA0BD,IA1BC,CA0BI,SA1BJ,EAAA,QAAA,CAAA,EAAA,OAAA,CAAA,EA2BX,QA3BW,CAAA,EA2BH,OA3BG,CA2BH,mBA3BG,CA2BH,QA3BG,CAAA,CAAA;;;AAyBvB;;;;AAEY,iBAwBI,aAxBJ,CAAA,iBAwBmC,WAxBnC,CAAA,CAAA,SAAA,EAAA,MAAA,GAyBU,IAzBV,CAyBe,SAzBf,EAAA,QAAA,CAAA,EAAA,OAAA,CAAA,EA0BA,QA1BA,CAAA,EA0BQ,mBA1BR,CA0BQ,QA1BR,CAAA;;;;;AAwBZ;;AAC2B,iBAoBL,eApBK,CAAA,iBAoB4B,WApB5B,CAAA,CAAA,SAAA,EAAA,MAAA,GAqBL,IArBK,CAqBA,SArBA,EAAA,QAAA,CAAA,EAAA,OAAA,CAAA,EAsBf,QAtBe,CAAA,EAsBP,OAtBO,CAsBP,mBAtBO,CAsBP,QAtBO,CAAA,CAAA;;;;;;AAoB3B;AAAuD,iBA0BvC,mBA1BuC,CAAA,iBA0BF,WA1BE,CAAA,CAAA,SAAA,EAAA,MAAA,GA2BjC,IA3BiC,CA2B5B,SA3B4B,EAAA,QAAA,CAAA,EAAA,OAAA,CAAA,EA4B3C,QA5B2C,CAAA,EA4BnC,mBA5BmC,CA4BnC,QA5BmC,CAAA"}
@@ -1,2 +1,51 @@
1
- import { a as listDirectoriesSync, c as listSync, i as listDirectories, n as ListOptions, o as listFiles, r as list, s as listFilesSync, t as InferListReturnType } from "./list-files-D3iJzEQw.mjs";
2
- export { InferListReturnType, ListOptions, list, listDirectories, listDirectoriesSync, listFiles, listFilesSync, listSync };
1
+ import { AssetGlob } from "./types/src/file.mjs";
2
+ import { GlobOptions, Path } from "glob";
3
+
4
+ //#region src/list-files.d.ts
5
+ type ListOptions = GlobOptions;
6
+ type InferListReturnType<TOptions extends GlobOptions> = TOptions["withFileTypes"] extends true ? Path[] : string[];
7
+ /**
8
+ * A files and directories listing helper function
9
+ *
10
+ * @param filesGlob - A glob pattern to match files
11
+ * @returns A list of file paths
12
+ */
13
+ declare function list<TOptions extends ListOptions>(filesGlob: string | Omit<AssetGlob, "output">, options?: TOptions): Promise<InferListReturnType<TOptions>>;
14
+ /**
15
+ * A synchronous files and directories listing helper function
16
+ *
17
+ * @param filesGlob - A glob pattern to match files
18
+ * @returns A list of file paths
19
+ */
20
+ declare function listSync<TOptions extends ListOptions>(filesGlob: string | Omit<AssetGlob, "output">, options?: TOptions): InferListReturnType<TOptions>;
21
+ /**
22
+ * A file listing helper function
23
+ *
24
+ * @param filesGlob - A glob pattern to match files
25
+ * @returns A list of file paths
26
+ */
27
+ declare function listFiles<TOptions extends ListOptions>(filesGlob: string | Omit<AssetGlob, "output">, options?: TOptions): Promise<InferListReturnType<TOptions>>;
28
+ /**
29
+ * A synchronous file listing helper function
30
+ *
31
+ * @param filesGlob - A glob pattern to match files
32
+ * @returns A list of file paths
33
+ */
34
+ declare function listFilesSync<TOptions extends ListOptions>(filesGlob: string | Omit<AssetGlob, "output">, options?: TOptions): InferListReturnType<TOptions>;
35
+ /**
36
+ * A directories listing helper function
37
+ *
38
+ * @param filesGlob - A glob pattern to match files
39
+ * @returns A list of file paths
40
+ */
41
+ declare function listDirectories<TOptions extends ListOptions>(filesGlob: string | Omit<AssetGlob, "output">, options?: TOptions): Promise<InferListReturnType<TOptions>>;
42
+ /**
43
+ * A synchronous directories listing helper function
44
+ *
45
+ * @param filesGlob - A glob pattern to match files
46
+ * @returns A list of file paths
47
+ */
48
+ declare function listDirectoriesSync<TOptions extends ListOptions>(filesGlob: string | Omit<AssetGlob, "output">, options?: TOptions): InferListReturnType<TOptions>;
49
+ //#endregion
50
+ export { InferListReturnType, ListOptions, list, listDirectories, listDirectoriesSync, listFiles, listFilesSync, listSync };
51
+ //# sourceMappingURL=list-files.d.mts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"list-files.d.mts","names":[],"sources":["../src/list-files.ts"],"sourcesContent":[],"mappings":";;;;KAyBY,WAAA,GAAc;KACd,qCAAqC,eAC/C,yCAAyC;AAF3C;AACA;;;;;AAasB,iBAAA,IAAI,CAAA,iBAAkB,WAAlB,CAAA,CAAA,SAAA,EAAA,MAAA,GACJ,IADI,CACC,SADD,EAAA,QAAA,CAAA,EAAA,OAAA,CAAA,EAEd,QAFc,CAAA,EAGvB,OAHuB,CAGf,mBAHe,CAGK,QAHL,CAAA,CAAA;;;;;;;AAGvB,iBAyBa,QAzBb,CAAA,iBAyBuC,WAzBvC,CAAA,CAAA,SAAA,EAAA,MAAA,GA0BmB,IA1BnB,CA0BwB,SA1BxB,EAAA,QAAA,CAAA,EAAA,OAAA,CAAA,EA2BS,QA3BT,CAAA,EA4BA,mBA5BA,CA4BoB,QA5BpB,CAAA;;AAyBH;;;;;AAGuB,iBAyBD,SAzBC,CAAA,iBAyB0B,WAzB1B,CAAA,CAAA,SAAA,EAAA,MAAA,GA0BD,IA1BC,CA0BI,SA1BJ,EAAA,QAAA,CAAA,EAAA,OAAA,CAAA,EA2BX,QA3BW,CAAA,EA2BH,OA3BG,CA2BH,mBA3BG,CA2BH,QA3BG,CAAA,CAAA;;;AAyBvB;;;;AAEY,iBAwBI,aAxBJ,CAAA,iBAwBmC,WAxBnC,CAAA,CAAA,SAAA,EAAA,MAAA,GAyBU,IAzBV,CAyBe,SAzBf,EAAA,QAAA,CAAA,EAAA,OAAA,CAAA,EA0BA,QA1BA,CAAA,EA0BQ,mBA1BR,CA0BQ,QA1BR,CAAA;;;;;AAwBZ;;AAC2B,iBAoBL,eApBK,CAAA,iBAoB4B,WApB5B,CAAA,CAAA,SAAA,EAAA,MAAA,GAqBL,IArBK,CAqBA,SArBA,EAAA,QAAA,CAAA,EAAA,OAAA,CAAA,EAsBf,QAtBe,CAAA,EAsBP,OAtBO,CAsBP,mBAtBO,CAsBP,QAtBO,CAAA,CAAA;;;;;;AAoB3B;AAAuD,iBA0BvC,mBA1BuC,CAAA,iBA0BF,WA1BE,CAAA,CAAA,SAAA,EAAA,MAAA,GA2BjC,IA3BiC,CA2B5B,SA3B4B,EAAA,QAAA,CAAA,EAAA,OAAA,CAAA,EA4B3C,QA5B2C,CAAA,EA4BnC,mBA5BmC,CA4BnC,QA5BmC,CAAA"}
@@ -1 +1,2 @@
1
- import{a as e,i as t,n,o as r,r as i,t as a}from"./list-files-D__uh3tQ.mjs";export{a as list,n as listDirectories,i as listDirectoriesSync,t as listFiles,e as listFilesSync,r as listSync};
1
+ import{joinPaths as e}from"./path/src/join-paths.mjs";import{isString as t}from"./type-checks/src/is-string.mjs";import"./type-checks/src/index.mjs";import n from"defu";import{glob as r}from"glob";const i={dot:!0};async function a(a,o){return r(t(a)?a.includes(`*`)?a:e(a,`**/*`):a.input?e(a.input,a.glob):a.glob,n(t(a)?{}:{dot:a.dot,ignore:a.ignore},o??{},i))}function o(a,o){return r.sync(t(a)?a.includes(`*`)?a:e(a,`**/*`):a.input?e(a.input,a.glob):a.glob,n(t(a)?{}:{dot:a.dot,ignore:a.ignore},o??{},i))}async function s(e,t){let r=(await a(e,n({withFileTypes:!0},t??{}))).filter(e=>e.isFile());return t?.withFileTypes?r:r.map(e=>e.fullpath())}function c(e,t){let r=o(e,n({withFileTypes:!0},t??{})).filter(e=>e.isFile());return t?.withFileTypes?r:r.map(e=>e.fullpath())}async function l(e,t){let r=(await a(e,n({withFileTypes:!0},t??{}))).filter(e=>e.isDirectory());return t?.withFileTypes?r:r.map(e=>e.fullpath())}function u(e,t){let r=o(e,n({withFileTypes:!0},t??{})).filter(e=>e.isDirectory());return t?.withFileTypes?r:r.map(e=>e.fullpath())}export{a as list,l as listDirectories,u as listDirectoriesSync,s as listFiles,c as listFilesSync,o as listSync};
2
+ //# sourceMappingURL=list-files.mjs.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"list-files.mjs","names":["DEFAULT_OPTIONS: ListOptions"],"sources":["../src/list-files.ts"],"sourcesContent":["/* -------------------------------------------------------------------\n\n ⚡ Storm Software - Stryke\n\n This code was released as part of the Stryke project. Stryke\n is maintained by Storm Software under the Apache-2.0 license, and is\n free for commercial and private use. For more information, please visit\n our licensing page at https://stormsoftware.com/licenses/projects/stryke.\n\n Website: https://stormsoftware.com\n Repository: https://github.com/storm-software/stryke\n Documentation: https://docs.stormsoftware.com/projects/stryke\n Contact: https://stormsoftware.com/contact\n\n SPDX-License-Identifier: Apache-2.0\n\n ------------------------------------------------------------------- */\n\nimport { joinPaths } from \"@stryke/path\";\nimport { isString } from \"@stryke/type-checks\";\nimport type { AssetGlob } from \"@stryke/types/file\";\nimport defu from \"defu\";\nimport type { GlobOptions, GlobOptionsWithFileTypesTrue, Path } from \"glob\";\nimport { glob } from \"glob\";\n\nexport type ListOptions = GlobOptions;\nexport type InferListReturnType<TOptions extends GlobOptions> =\n TOptions[\"withFileTypes\"] extends true ? Path[] : string[];\n\nconst DEFAULT_OPTIONS: ListOptions = {\n dot: true\n};\n\n/**\n * A files and directories listing helper function\n *\n * @param filesGlob - A glob pattern to match files\n * @returns A list of file paths\n */\nexport async function list<TOptions extends ListOptions>(\n filesGlob: string | Omit<AssetGlob, \"output\">,\n options?: TOptions\n): Promise<InferListReturnType<TOptions>> {\n return glob(\n isString(filesGlob)\n ? filesGlob.includes(\"*\")\n ? filesGlob\n : joinPaths(filesGlob, \"**/*\")\n : filesGlob.input\n ? joinPaths(filesGlob.input, filesGlob.glob)\n : filesGlob.glob,\n defu(\n isString(filesGlob)\n ? {}\n : { dot: filesGlob.dot, ignore: filesGlob.ignore },\n options ?? {},\n DEFAULT_OPTIONS\n )\n ) as Promise<InferListReturnType<TOptions>>;\n}\n\n/**\n * A synchronous files and directories listing helper function\n *\n * @param filesGlob - A glob pattern to match files\n * @returns A list of file paths\n */\nexport function listSync<TOptions extends ListOptions>(\n filesGlob: string | Omit<AssetGlob, \"output\">,\n options?: TOptions\n): InferListReturnType<TOptions> {\n return glob.sync(\n isString(filesGlob)\n ? filesGlob.includes(\"*\")\n ? filesGlob\n : joinPaths(filesGlob, \"**/*\")\n : filesGlob.input\n ? joinPaths(filesGlob.input, filesGlob.glob)\n : filesGlob.glob,\n defu(\n isString(filesGlob)\n ? {}\n : { dot: filesGlob.dot, ignore: filesGlob.ignore },\n options ?? {},\n DEFAULT_OPTIONS\n )\n ) as InferListReturnType<TOptions>;\n}\n\n/**\n * A file listing helper function\n *\n * @param filesGlob - A glob pattern to match files\n * @returns A list of file paths\n */\nexport async function listFiles<TOptions extends ListOptions>(\n filesGlob: string | Omit<AssetGlob, \"output\">,\n options?: TOptions\n) {\n const result = (\n await list(\n filesGlob,\n defu(\n { withFileTypes: true },\n options ?? {}\n ) as GlobOptionsWithFileTypesTrue\n )\n ).filter(ret => ret.isFile());\n if (!options?.withFileTypes) {\n return result.map(file => file.fullpath()) as InferListReturnType<TOptions>;\n }\n\n return result as InferListReturnType<TOptions>;\n}\n\n/**\n * A synchronous file listing helper function\n *\n * @param filesGlob - A glob pattern to match files\n * @returns A list of file paths\n */\nexport function listFilesSync<TOptions extends ListOptions>(\n filesGlob: string | Omit<AssetGlob, \"output\">,\n options?: TOptions\n) {\n const result = listSync(\n filesGlob,\n defu({ withFileTypes: true }, options ?? {}) as GlobOptionsWithFileTypesTrue\n ).filter(ret => ret.isFile());\n if (!options?.withFileTypes) {\n return result.map(file => file.fullpath()) as InferListReturnType<TOptions>;\n }\n\n return result as InferListReturnType<TOptions>;\n}\n\n/**\n * A directories listing helper function\n *\n * @param filesGlob - A glob pattern to match files\n * @returns A list of file paths\n */\nexport async function listDirectories<TOptions extends ListOptions>(\n filesGlob: string | Omit<AssetGlob, \"output\">,\n options?: TOptions\n) {\n const result = (\n await list(\n filesGlob,\n defu(\n { withFileTypes: true },\n options ?? {}\n ) as GlobOptionsWithFileTypesTrue\n )\n ).filter(ret => ret.isDirectory());\n if (!options?.withFileTypes) {\n return result.map(file => file.fullpath()) as InferListReturnType<TOptions>;\n }\n\n return result as InferListReturnType<TOptions>;\n}\n\n/**\n * A synchronous directories listing helper function\n *\n * @param filesGlob - A glob pattern to match files\n * @returns A list of file paths\n */\nexport function listDirectoriesSync<TOptions extends ListOptions>(\n filesGlob: string | Omit<AssetGlob, \"output\">,\n options?: TOptions\n) {\n const result = listSync(\n filesGlob,\n defu({ withFileTypes: true }, options ?? {}) as GlobOptionsWithFileTypesTrue\n ).filter(ret => ret.isDirectory());\n if (!options?.withFileTypes) {\n return result.map(file => file.fullpath()) as InferListReturnType<TOptions>;\n }\n\n return result as InferListReturnType<TOptions>;\n}\n"],"mappings":"qMA6BA,MAAMA,EAA+B,CACnC,IAAK,GACN,CAQD,eAAsB,EACpB,EACA,EACwC,CACxC,OAAO,EACL,EAAS,EAAU,CACf,EAAU,SAAS,IAAI,CACrB,EACA,EAAU,EAAW,OAAO,CAC9B,EAAU,MACR,EAAU,EAAU,MAAO,EAAU,KAAK,CAC1C,EAAU,KAChB,EACE,EAAS,EAAU,CACf,EAAE,CACF,CAAE,IAAK,EAAU,IAAK,OAAQ,EAAU,OAAQ,CACpD,GAAW,EAAE,CACb,EACD,CACF,CASH,SAAgB,EACd,EACA,EAC+B,CAC/B,OAAO,EAAK,KACV,EAAS,EAAU,CACf,EAAU,SAAS,IAAI,CACrB,EACA,EAAU,EAAW,OAAO,CAC9B,EAAU,MACR,EAAU,EAAU,MAAO,EAAU,KAAK,CAC1C,EAAU,KAChB,EACE,EAAS,EAAU,CACf,EAAE,CACF,CAAE,IAAK,EAAU,IAAK,OAAQ,EAAU,OAAQ,CACpD,GAAW,EAAE,CACb,EACD,CACF,CASH,eAAsB,EACpB,EACA,EACA,CACA,IAAM,GACJ,MAAM,EACJ,EACA,EACE,CAAE,cAAe,GAAM,CACvB,GAAW,EAAE,CACd,CACF,EACD,OAAO,GAAO,EAAI,QAAQ,CAAC,CAK7B,OAJK,GAAS,cAIP,EAHE,EAAO,IAAI,GAAQ,EAAK,UAAU,CAAC,CAY9C,SAAgB,EACd,EACA,EACA,CACA,IAAM,EAAS,EACb,EACA,EAAK,CAAE,cAAe,GAAM,CAAE,GAAW,EAAE,CAAC,CAC7C,CAAC,OAAO,GAAO,EAAI,QAAQ,CAAC,CAK7B,OAJK,GAAS,cAIP,EAHE,EAAO,IAAI,GAAQ,EAAK,UAAU,CAAC,CAY9C,eAAsB,EACpB,EACA,EACA,CACA,IAAM,GACJ,MAAM,EACJ,EACA,EACE,CAAE,cAAe,GAAM,CACvB,GAAW,EAAE,CACd,CACF,EACD,OAAO,GAAO,EAAI,aAAa,CAAC,CAKlC,OAJK,GAAS,cAIP,EAHE,EAAO,IAAI,GAAQ,EAAK,UAAU,CAAC,CAY9C,SAAgB,EACd,EACA,EACA,CACA,IAAM,EAAS,EACb,EACA,EAAK,CAAE,cAAe,GAAM,CAAE,GAAW,EAAE,CAAC,CAC7C,CAAC,OAAO,GAAO,EAAI,aAAa,CAAC,CAKlC,OAJK,GAAS,cAIP,EAHE,EAAO,IAAI,GAAQ,EAAK,UAAU,CAAC"}
@@ -1 +1 @@
1
- require(`./get-workspace-root-CCNjjZGY.cjs`),require(`./helpers-_MJ6PR-g.cjs`),require(`./write-file-CqokudVp.cjs`),require(`./resolve-DTkLQekH.cjs`),require(`./json-DKhqPjHB.cjs`);const e=require(`./package-fns-YTCdMAXr.cjs`);exports.doesPackageMatch=e.t,exports.getPackageInfo=e.n,exports.getPackageListing=e.r,exports.getPackageManager=e.i,exports.isPackageExists=e.a,exports.isPackageListed=e.o,exports.loadPackageJson=e.s;
1
+ const e=require(`./_virtual/rolldown_runtime.cjs`),t=require(`./path/src/join-paths.cjs`),n=require(`./type-checks/src/is-string.cjs`),r=require(`./path/src/file-path-fns.cjs`),i=require(`./exists.cjs`),a=require(`./get-parent-path.cjs`),o=require(`./get-workspace-root.cjs`),s=require(`./resolve.cjs`),c=require(`./json.cjs`),l=require(`./string-format/src/package.cjs`);let u=require(`node:fs`),d=require(`semver`);function f(e=o.getWorkspaceRoot()){let t=a.getParentPath([`package-lock.json`,`yarn.lock`,`pnpm-lock.yaml`,`bun.lock`],e,{includeNameInResults:!0});if(!t)return`pnpm`;switch(r.findFileName(t)){case`yarn.lock`:return`yarn`;case`pnpm-lock.yaml`:return`pnpm`;case`bun.lock`:return`bun`;default:return`npm`}}async function p(e){let n;for(;;){if(!e)return;let a=r.findFilePath(e);if(a===e)return;if(e=a,n=t.joinPaths(e,`package.json`),await i.exists(n))break}return n}async function m(e,t={}){let n=await s.resolvePackage(e,t);if(n)return p(n)}async function h(e,t={}){let n=await m(e,t);if(!n)return;let i=await c.readJsonFile(n);return{name:e,version:i.version,rootPath:r.findFilePath(n),packageJsonPath:n,packageJson:i}}async function g(e=o.getWorkspaceRoot()){let t=a.getParentPath(`package.json`,e,{skipCwd:!1,includeNameInResults:!0});return!t||!(0,u.existsSync)(t)?null:c.readJsonFile(t)}async function _(e,t){let r=l.getPackageName(e),i=await g(n.isString(t)?t:t?.cwd);return i?!!(i.dependencies&&r in i.dependencies&&i.dependencies[r]||i.devDependencies&&r in i.devDependencies&&i.devDependencies[r]):!1}async function v(e,t){let r=l.getPackageName(e),i=await g(n.isString(t)?t:t?.cwd);if(!i)return;let a=i.dependencies&&r in i.dependencies?i.dependencies[r]:i.devDependencies&&r in i.devDependencies?i.devDependencies[r]:void 0,o=(i.dependencies&&r in i.dependencies?`dependencies`:i.devDependencies&&r in i.devDependencies?`devDependencies`:void 0)||void 0;return a&&o?{version:a,type:o}:void 0}async function y(e,t,n){let r=await v(e,{cwd:n});return r?r.version.startsWith(`catalog:`)||r.version.startsWith(`workspace:`)||(0,d.subset)(r.version,t):!1}function b(e,t={}){return!!s.resolvePackage(e,t)}exports.doesPackageMatch=y,exports.getPackageInfo=h,exports.getPackageListing=v,exports.getPackageManager=f,exports.isPackageExists=b,exports.isPackageListed=_,exports.loadPackageJson=g;
@@ -1,2 +1,95 @@
1
- import { a as getPackageInfo, c as isPackageExists, i as doesPackageMatch, l as isPackageListed, n as PackageExistsOptions, o as getPackageListing, r as PackageMatchesOptions, s as getPackageManager, t as GetPackageListingReturn, u as loadPackageJson } from "./package-fns-BNRi_Rpc.cjs";
2
- export { GetPackageListingReturn, PackageExistsOptions, PackageMatchesOptions, doesPackageMatch, getPackageInfo, getPackageListing, getPackageManager, isPackageExists, isPackageListed, loadPackageJson };
1
+ import { PackageJson } from "./types/src/package-json.cjs";
2
+ import { PackageManager } from "./types/src/package-manager.cjs";
3
+ import { ResolveOptions } from "./resolve.cjs";
4
+ import { Range } from "semver";
5
+
6
+ //#region src/package-fns.d.ts
7
+
8
+ /**
9
+ * Get the package manager used in the project
10
+ *
11
+ * @param dir - The path to the project
12
+ * @returns The package manager used in the project
13
+ */
14
+ declare function getPackageManager(dir?: string): PackageManager;
15
+ /**
16
+ * Get package info
17
+ *
18
+ * @param name - The name of the package
19
+ * @param options - The options to use when resolving the package
20
+ * @returns The package info
21
+ */
22
+ declare function getPackageInfo(name: string, options?: ResolveOptions): Promise<{
23
+ name: string;
24
+ version: string | undefined;
25
+ rootPath: string;
26
+ packageJsonPath: string;
27
+ packageJson: PackageJson;
28
+ } | undefined>;
29
+ /**
30
+ * Get the package info from the package.json file
31
+ *
32
+ * @param cwd - The current working directory
33
+ * @returns The package info
34
+ */
35
+ declare function loadPackageJson(cwd?: string): Promise<PackageJson | null>;
36
+ interface PackageExistsOptions {
37
+ /**
38
+ * The current working directory
39
+ */
40
+ cwd?: string;
41
+ }
42
+ interface PackageMatchesOptions extends PackageExistsOptions {
43
+ /**
44
+ * The version range of the package to check
45
+ */
46
+ version?: string | Range;
47
+ }
48
+ /**
49
+ * Check if a package is listed in the package.json file
50
+ *
51
+ * @param name - The name of the package
52
+ * @param cwd - The current working directory
53
+ * @returns An indicator specifying if the package is listed
54
+ */
55
+ declare function isPackageListed(name: string, cwd?: string): Promise<boolean>;
56
+ /**
57
+ * Check if a package is listed in the package.json file
58
+ *
59
+ * @param name - The name of the package
60
+ * @param options - The options to use when checking if the package is listed
61
+ * @returns An indicator specifying if the package is listed
62
+ */
63
+ declare function isPackageListed(name: string, options?: PackageExistsOptions): Promise<boolean>;
64
+ interface GetPackageListingReturn {
65
+ version: string;
66
+ type: "dependencies" | "devDependencies";
67
+ }
68
+ /**
69
+ * Return the package version and dependency type listed in the package.json file
70
+ *
71
+ * @param name - The name of the package
72
+ * @param cwdOrOptions - The current working directory or options to use when checking if the package is listed
73
+ * @returns The version and type of the package if listed, otherwise undefined
74
+ */
75
+ declare function getPackageListing(name: string, cwdOrOptions?: string | PackageExistsOptions): Promise<GetPackageListingReturn | undefined>;
76
+ /**
77
+ * Check if a package version matches a specific version range
78
+ *
79
+ * @param name - The name of the package
80
+ * @param version - The version to check against
81
+ * @param cwd - The current working directory
82
+ * @returns An indicator specifying if the package version matches the range
83
+ */
84
+ declare function doesPackageMatch(name: string, version: string, cwd?: string): Promise<boolean>;
85
+ /**
86
+ * Check if a package exists
87
+ *
88
+ * @param name - The name of the package
89
+ * @param options - The options to use when resolving the package
90
+ * @returns An indicator specifying if the package exists
91
+ */
92
+ declare function isPackageExists(name: string, options?: ResolveOptions): boolean;
93
+ //#endregion
94
+ export { GetPackageListingReturn, PackageExistsOptions, PackageMatchesOptions, doesPackageMatch, getPackageInfo, getPackageListing, getPackageManager, isPackageExists, isPackageListed, loadPackageJson };
95
+ //# sourceMappingURL=package-fns.d.cts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"package-fns.d.cts","names":[],"sources":["../src/package-fns.ts"],"sourcesContent":[],"mappings":";;;;;;;;;AAwCA;AAwEA;;;AAE8B,iBA1Ed,iBAAA,CA0Ec,GAAA,CAAA,EAAA,MAAA,CAAA,EA1E+B,cA0E/B;;AAwB9B;AAcA;AAOA;AAcA;AAYA;AAkCA;AAYsB,iBAvHA,cAAA,CAuHiB,IAAA,EAAA,MAAA,EAAA,OAAA,CAAA,EArH5B,cAqH4B,CAAA,EArHT,OAqHS,CAAA;EAEb,IAAA,EAAA,MAAA;EACf,OAAA,EAAA,MAAA,GAAA,SAAA;EAAR,QAAA,EAAA,MAAA;EAAO,eAAA,EAAA,MAAA;EAwCY,WAAA,aAAgB;AAwBtC,CAAA,GAAgB,SAAA,CAAA;;;;;;;iBAhKM,eAAA,gBAEnB,QAAQ;UAYM,oBAAA;;;;;;UAOA,qBAAA,SAA8B;;;;qBAI1B;;;;;;;;;iBAUC,eAAA,8BAGnB;;;;;;;;iBASmB,eAAA,yBAEV,uBACT;UA+Bc,uBAAA;;;;;;;;;;;iBAYK,iBAAA,uCAEI,uBACvB,QAAQ;;;;;;;;;iBAwCW,gBAAA,+CAInB;;;;;;;;iBAoBa,eAAA,yBAAuC"}
@@ -1,2 +1,95 @@
1
- import { a as getPackageInfo, c as isPackageExists, i as doesPackageMatch, l as isPackageListed, n as PackageExistsOptions, o as getPackageListing, r as PackageMatchesOptions, s as getPackageManager, t as GetPackageListingReturn, u as loadPackageJson } from "./package-fns-CxokaGDY.mjs";
2
- export { GetPackageListingReturn, PackageExistsOptions, PackageMatchesOptions, doesPackageMatch, getPackageInfo, getPackageListing, getPackageManager, isPackageExists, isPackageListed, loadPackageJson };
1
+ import { PackageJson } from "./types/src/package-json.mjs";
2
+ import { PackageManager } from "./types/src/package-manager.mjs";
3
+ import { ResolveOptions } from "./resolve.mjs";
4
+ import { Range } from "semver";
5
+
6
+ //#region src/package-fns.d.ts
7
+
8
+ /**
9
+ * Get the package manager used in the project
10
+ *
11
+ * @param dir - The path to the project
12
+ * @returns The package manager used in the project
13
+ */
14
+ declare function getPackageManager(dir?: string): PackageManager;
15
+ /**
16
+ * Get package info
17
+ *
18
+ * @param name - The name of the package
19
+ * @param options - The options to use when resolving the package
20
+ * @returns The package info
21
+ */
22
+ declare function getPackageInfo(name: string, options?: ResolveOptions): Promise<{
23
+ name: string;
24
+ version: string | undefined;
25
+ rootPath: string;
26
+ packageJsonPath: string;
27
+ packageJson: PackageJson;
28
+ } | undefined>;
29
+ /**
30
+ * Get the package info from the package.json file
31
+ *
32
+ * @param cwd - The current working directory
33
+ * @returns The package info
34
+ */
35
+ declare function loadPackageJson(cwd?: string): Promise<PackageJson | null>;
36
+ interface PackageExistsOptions {
37
+ /**
38
+ * The current working directory
39
+ */
40
+ cwd?: string;
41
+ }
42
+ interface PackageMatchesOptions extends PackageExistsOptions {
43
+ /**
44
+ * The version range of the package to check
45
+ */
46
+ version?: string | Range;
47
+ }
48
+ /**
49
+ * Check if a package is listed in the package.json file
50
+ *
51
+ * @param name - The name of the package
52
+ * @param cwd - The current working directory
53
+ * @returns An indicator specifying if the package is listed
54
+ */
55
+ declare function isPackageListed(name: string, cwd?: string): Promise<boolean>;
56
+ /**
57
+ * Check if a package is listed in the package.json file
58
+ *
59
+ * @param name - The name of the package
60
+ * @param options - The options to use when checking if the package is listed
61
+ * @returns An indicator specifying if the package is listed
62
+ */
63
+ declare function isPackageListed(name: string, options?: PackageExistsOptions): Promise<boolean>;
64
+ interface GetPackageListingReturn {
65
+ version: string;
66
+ type: "dependencies" | "devDependencies";
67
+ }
68
+ /**
69
+ * Return the package version and dependency type listed in the package.json file
70
+ *
71
+ * @param name - The name of the package
72
+ * @param cwdOrOptions - The current working directory or options to use when checking if the package is listed
73
+ * @returns The version and type of the package if listed, otherwise undefined
74
+ */
75
+ declare function getPackageListing(name: string, cwdOrOptions?: string | PackageExistsOptions): Promise<GetPackageListingReturn | undefined>;
76
+ /**
77
+ * Check if a package version matches a specific version range
78
+ *
79
+ * @param name - The name of the package
80
+ * @param version - The version to check against
81
+ * @param cwd - The current working directory
82
+ * @returns An indicator specifying if the package version matches the range
83
+ */
84
+ declare function doesPackageMatch(name: string, version: string, cwd?: string): Promise<boolean>;
85
+ /**
86
+ * Check if a package exists
87
+ *
88
+ * @param name - The name of the package
89
+ * @param options - The options to use when resolving the package
90
+ * @returns An indicator specifying if the package exists
91
+ */
92
+ declare function isPackageExists(name: string, options?: ResolveOptions): boolean;
93
+ //#endregion
94
+ export { GetPackageListingReturn, PackageExistsOptions, PackageMatchesOptions, doesPackageMatch, getPackageInfo, getPackageListing, getPackageManager, isPackageExists, isPackageListed, loadPackageJson };
95
+ //# sourceMappingURL=package-fns.d.mts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"package-fns.d.mts","names":[],"sources":["../src/package-fns.ts"],"sourcesContent":[],"mappings":";;;;;;;;;AAwCA;AAwEA;;;AAE8B,iBA1Ed,iBAAA,CA0Ec,GAAA,CAAA,EAAA,MAAA,CAAA,EA1E+B,cA0E/B;;AAwB9B;AAcA;AAOA;AAcA;AAYA;AAkCA;AAYsB,iBAvHA,cAAA,CAuHiB,IAAA,EAAA,MAAA,EAAA,OAAA,CAAA,EArH5B,cAqH4B,CAAA,EArHT,OAqHS,CAAA;EAEb,IAAA,EAAA,MAAA;EACf,OAAA,EAAA,MAAA,GAAA,SAAA;EAAR,QAAA,EAAA,MAAA;EAAO,eAAA,EAAA,MAAA;EAwCY,WAAA,aAAgB;AAwBtC,CAAA,GAAgB,SAAA,CAAA;;;;;;;iBAhKM,eAAA,gBAEnB,QAAQ;UAYM,oBAAA;;;;;;UAOA,qBAAA,SAA8B;;;;qBAI1B;;;;;;;;;iBAUC,eAAA,8BAGnB;;;;;;;;iBASmB,eAAA,yBAEV,uBACT;UA+Bc,uBAAA;;;;;;;;;;;iBAYK,iBAAA,uCAEI,uBACvB,QAAQ;;;;;;;;;iBAwCW,gBAAA,+CAInB;;;;;;;;iBAoBa,eAAA,yBAAuC"}
@@ -1 +1,2 @@
1
- import"./get-workspace-root-k66w-wLW.mjs";import"./helpers-BSEQb1fp.mjs";import"./write-file-CFByoJkN.mjs";import"./resolve-C_YsCFne.mjs";import"./json-Dp4PSH2i.mjs";import{a as e,i as t,n,o as r,r as i,s as a,t as o}from"./package-fns-C7-MKgBR.mjs";export{o as doesPackageMatch,n as getPackageInfo,i as getPackageListing,t as getPackageManager,e as isPackageExists,r as isPackageListed,a as loadPackageJson};
1
+ import{joinPaths as e}from"./path/src/join-paths.mjs";import{isString as t}from"./type-checks/src/is-string.mjs";import{findFileName as n,findFilePath as r}from"./path/src/file-path-fns.mjs";import{exists as i}from"./exists.mjs";import{getParentPath as a}from"./get-parent-path.mjs";import{getWorkspaceRoot as o}from"./get-workspace-root.mjs";import{resolvePackage as s}from"./resolve.mjs";import{readJsonFile as c}from"./json.mjs";import{getPackageName as l}from"./string-format/src/package.mjs";import{existsSync as u}from"node:fs";import{subset as d}from"semver";function f(e=o()){let t=a([`package-lock.json`,`yarn.lock`,`pnpm-lock.yaml`,`bun.lock`],e,{includeNameInResults:!0});if(!t)return`pnpm`;switch(n(t)){case`yarn.lock`:return`yarn`;case`pnpm-lock.yaml`:return`pnpm`;case`bun.lock`:return`bun`;default:return`npm`}}async function p(t){let n;for(;;){if(!t)return;let a=r(t);if(a===t)return;if(t=a,n=e(t,`package.json`),await i(n))break}return n}async function m(e,t={}){let n=await s(e,t);if(n)return p(n)}async function h(e,t={}){let n=await m(e,t);if(!n)return;let i=await c(n);return{name:e,version:i.version,rootPath:r(n),packageJsonPath:n,packageJson:i}}async function g(e=o()){let t=a(`package.json`,e,{skipCwd:!1,includeNameInResults:!0});return!t||!u(t)?null:c(t)}async function _(e,n){let r=l(e),i=await g(t(n)?n:n?.cwd);return i?!!(i.dependencies&&r in i.dependencies&&i.dependencies[r]||i.devDependencies&&r in i.devDependencies&&i.devDependencies[r]):!1}async function v(e,n){let r=l(e),i=await g(t(n)?n:n?.cwd);if(!i)return;let a=i.dependencies&&r in i.dependencies?i.dependencies[r]:i.devDependencies&&r in i.devDependencies?i.devDependencies[r]:void 0,o=(i.dependencies&&r in i.dependencies?`dependencies`:i.devDependencies&&r in i.devDependencies?`devDependencies`:void 0)||void 0;return a&&o?{version:a,type:o}:void 0}async function y(e,t,n){let r=await v(e,{cwd:n});return r?r.version.startsWith(`catalog:`)||r.version.startsWith(`workspace:`)||d(r.version,t):!1}function b(e,t={}){return!!s(e,t)}export{y as doesPackageMatch,h as getPackageInfo,v as getPackageListing,f as getPackageManager,b as isPackageExists,_ as isPackageListed,g as loadPackageJson};
2
+ //# sourceMappingURL=package-fns.mjs.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"package-fns.mjs","names":[],"sources":["../src/package-fns.ts"],"sourcesContent":["/* -------------------------------------------------------------------\n\n ⚡ Storm Software - Stryke\n\n This code was released as part of the Stryke project. Stryke\n is maintained by Storm Software under the Apache-2.0 license, and is\n free for commercial and private use. For more information, please visit\n our licensing page at https://stormsoftware.com/licenses/projects/stryke.\n\n Website: https://stormsoftware.com\n Repository: https://github.com/storm-software/stryke\n Documentation: https://docs.stormsoftware.com/projects/stryke\n Contact: https://stormsoftware.com/contact\n\n SPDX-License-Identifier: Apache-2.0\n\n ------------------------------------------------------------------- */\n\nimport { findFileName, findFilePath } from \"@stryke/path/file-path-fns\";\nimport { joinPaths } from \"@stryke/path/join-paths\";\nimport { getPackageName } from \"@stryke/string-format/package\";\nimport { isString } from \"@stryke/type-checks/is-string\";\nimport type { PackageJson } from \"@stryke/types/package-json\";\nimport type { PackageManager } from \"@stryke/types/package-manager\";\nimport { existsSync } from \"node:fs\";\nimport type { Range } from \"semver\";\nimport { subset } from \"semver\";\nimport { exists } from \"./exists\";\nimport { getParentPath } from \"./get-parent-path\";\nimport { getWorkspaceRoot } from \"./get-workspace-root\";\nimport { readJsonFile } from \"./json\";\nimport type { ResolveOptions } from \"./resolve\";\nimport { resolvePackage } from \"./resolve\";\n\n/**\n * Get the package manager used in the project\n *\n * @param dir - The path to the project\n * @returns The package manager used in the project\n */\nexport function getPackageManager(dir = getWorkspaceRoot()): PackageManager {\n const lockFile = getParentPath(\n [\"package-lock.json\", \"yarn.lock\", \"pnpm-lock.yaml\", \"bun.lock\"],\n dir,\n {\n includeNameInResults: true\n }\n );\n\n if (!lockFile) {\n // default use pnpm\n return \"pnpm\";\n }\n\n switch (findFileName(lockFile)) {\n case \"yarn.lock\": {\n return \"yarn\";\n }\n case \"pnpm-lock.yaml\": {\n return \"pnpm\";\n }\n case \"bun.lock\": {\n return \"bun\";\n }\n default: {\n return \"npm\";\n }\n }\n}\n\n// Much of the below code comes from https://github.com/antfu-collective/local-pkg with some modifications\n\nasync function searchPackageJson(dir: string) {\n let packageJsonPath;\n\n while (true) {\n if (!dir) {\n return;\n }\n const newDir = findFilePath(dir);\n\n if (newDir === dir) {\n return;\n }\n\n dir = newDir;\n packageJsonPath = joinPaths(dir, \"package.json\");\n\n if (await exists(packageJsonPath)) {\n break;\n }\n }\n\n return packageJsonPath;\n}\n\nasync function getPackageJsonPath(name: string, options: ResolveOptions = {}) {\n const entry = await resolvePackage(name, options);\n if (!entry) {\n return;\n }\n\n return searchPackageJson(entry);\n}\n\n/**\n * Get package info\n *\n * @param name - The name of the package\n * @param options - The options to use when resolving the package\n * @returns The package info\n */\nexport async function getPackageInfo(\n name: string,\n options: ResolveOptions = {}\n) {\n const packageJsonPath = await getPackageJsonPath(name, options);\n if (!packageJsonPath) {\n return;\n }\n\n const packageJson = await readJsonFile<PackageJson>(packageJsonPath);\n\n return {\n name,\n version: packageJson.version,\n rootPath: findFilePath(packageJsonPath),\n packageJsonPath,\n packageJson\n };\n}\n\n/**\n * Get the package info from the package.json file\n *\n * @param cwd - The current working directory\n * @returns The package info\n */\nexport async function loadPackageJson(\n cwd = getWorkspaceRoot()\n): Promise<PackageJson | null> {\n const path = getParentPath(\"package.json\", cwd, {\n skipCwd: false,\n includeNameInResults: true\n });\n if (!path || !existsSync(path)) {\n return null;\n }\n\n return readJsonFile<PackageJson>(path);\n}\n\nexport interface PackageExistsOptions {\n /**\n * The current working directory\n */\n cwd?: string;\n}\n\nexport interface PackageMatchesOptions extends PackageExistsOptions {\n /**\n * The version range of the package to check\n */\n version?: string | Range;\n}\n\n/**\n * Check if a package is listed in the package.json file\n *\n * @param name - The name of the package\n * @param cwd - The current working directory\n * @returns An indicator specifying if the package is listed\n */\nexport async function isPackageListed(\n name: string,\n cwd?: string\n): Promise<boolean>;\n\n/**\n * Check if a package is listed in the package.json file\n *\n * @param name - The name of the package\n * @param options - The options to use when checking if the package is listed\n * @returns An indicator specifying if the package is listed\n */\nexport async function isPackageListed(\n name: string,\n options?: PackageExistsOptions\n): Promise<boolean>;\n\n/**\n * Check if a package is listed in the package.json file\n *\n * @param name - The name of the package\n * @param cwdOrOptions - The current working directory or options to use when checking if the package is listed\n * @returns An indicator specifying if the package is listed\n */\nexport async function isPackageListed(\n name: string,\n cwdOrOptions?: string | PackageExistsOptions\n): Promise<boolean> {\n const packageName = getPackageName(name);\n const cwd = isString(cwdOrOptions) ? cwdOrOptions : cwdOrOptions?.cwd;\n\n const packageJson = await loadPackageJson(cwd);\n if (!packageJson) {\n return false;\n }\n\n return Boolean(\n (packageJson.dependencies &&\n packageName in packageJson.dependencies &&\n packageJson.dependencies[packageName]) ||\n (packageJson.devDependencies &&\n packageName in packageJson.devDependencies &&\n packageJson.devDependencies[packageName])\n );\n}\n\nexport interface GetPackageListingReturn {\n version: string;\n type: \"dependencies\" | \"devDependencies\";\n}\n\n/**\n * Return the package version and dependency type listed in the package.json file\n *\n * @param name - The name of the package\n * @param cwdOrOptions - The current working directory or options to use when checking if the package is listed\n * @returns The version and type of the package if listed, otherwise undefined\n */\nexport async function getPackageListing(\n name: string,\n cwdOrOptions?: string | PackageExistsOptions\n): Promise<GetPackageListingReturn | undefined> {\n const packageName = getPackageName(name);\n const cwd = isString(cwdOrOptions) ? cwdOrOptions : cwdOrOptions?.cwd;\n\n const packageJson = await loadPackageJson(cwd);\n if (!packageJson) {\n return undefined;\n }\n\n const version =\n packageJson.dependencies && packageName in packageJson.dependencies\n ? packageJson.dependencies[packageName]\n : packageJson.devDependencies &&\n packageName in packageJson.devDependencies\n ? packageJson.devDependencies[packageName]\n : undefined;\n const type =\n (packageJson.dependencies && packageName in packageJson.dependencies\n ? \"dependencies\"\n : packageJson.devDependencies &&\n packageName in packageJson.devDependencies\n ? \"devDependencies\"\n : undefined) || undefined;\n\n return version && type\n ? {\n version,\n type\n }\n : undefined;\n}\n\n/**\n * Check if a package version matches a specific version range\n *\n * @param name - The name of the package\n * @param version - The version to check against\n * @param cwd - The current working directory\n * @returns An indicator specifying if the package version matches the range\n */\nexport async function doesPackageMatch(\n name: string,\n version: string,\n cwd?: string\n): Promise<boolean> {\n const pkg = await getPackageListing(name, { cwd });\n if (!pkg) {\n return false;\n }\n\n return (\n pkg.version.startsWith(\"catalog:\") ||\n pkg.version.startsWith(\"workspace:\") ||\n subset(pkg.version, version)\n );\n}\n\n/**\n * Check if a package exists\n *\n * @param name - The name of the package\n * @param options - The options to use when resolving the package\n * @returns An indicator specifying if the package exists\n */\nexport function isPackageExists(name: string, options: ResolveOptions = {}) {\n return Boolean(resolvePackage(name, options));\n}\n"],"mappings":"sjBAwCA,SAAgB,EAAkB,EAAM,GAAkB,CAAkB,CAC1E,IAAM,EAAW,EACf,CAAC,oBAAqB,YAAa,iBAAkB,WAAW,CAChE,EACA,CACE,qBAAsB,GACvB,CACF,CAED,GAAI,CAAC,EAEH,MAAO,OAGT,OAAQ,EAAa,EAAS,CAA9B,CACE,IAAK,YACH,MAAO,OAET,IAAK,iBACH,MAAO,OAET,IAAK,WACH,MAAO,MAET,QACE,MAAO,OAOb,eAAe,EAAkB,EAAa,CAC5C,IAAI,EAEJ,OAAa,CACX,GAAI,CAAC,EACH,OAEF,IAAM,EAAS,EAAa,EAAI,CAEhC,GAAI,IAAW,EACb,OAMF,GAHA,EAAM,EACN,EAAkB,EAAU,EAAK,eAAe,CAE5C,MAAM,EAAO,EAAgB,CAC/B,MAIJ,OAAO,EAGT,eAAe,EAAmB,EAAc,EAA0B,EAAE,CAAE,CAC5E,IAAM,EAAQ,MAAM,EAAe,EAAM,EAAQ,CAC5C,KAIL,OAAO,EAAkB,EAAM,CAUjC,eAAsB,EACpB,EACA,EAA0B,EAAE,CAC5B,CACA,IAAM,EAAkB,MAAM,EAAmB,EAAM,EAAQ,CAC/D,GAAI,CAAC,EACH,OAGF,IAAM,EAAc,MAAM,EAA0B,EAAgB,CAEpE,MAAO,CACL,OACA,QAAS,EAAY,QACrB,SAAU,EAAa,EAAgB,CACvC,kBACA,cACD,CASH,eAAsB,EACpB,EAAM,GAAkB,CACK,CAC7B,IAAM,EAAO,EAAc,eAAgB,EAAK,CAC9C,QAAS,GACT,qBAAsB,GACvB,CAAC,CAKF,MAJI,CAAC,GAAQ,CAAC,EAAW,EAAK,CACrB,KAGF,EAA0B,EAAK,CAgDxC,eAAsB,EACpB,EACA,EACkB,CAClB,IAAM,EAAc,EAAe,EAAK,CAGlC,EAAc,MAAM,EAFd,EAAS,EAAa,CAAG,EAAe,GAAc,IAEpB,CAK9C,OAJK,EAIE,GACJ,EAAY,cACX,KAAe,EAAY,cAC3B,EAAY,aAAa,IAC1B,EAAY,iBACX,KAAe,EAAY,iBAC3B,EAAY,gBAAgB,IATvB,GAyBX,eAAsB,EACpB,EACA,EAC8C,CAC9C,IAAM,EAAc,EAAe,EAAK,CAGlC,EAAc,MAAM,EAFd,EAAS,EAAa,CAAG,EAAe,GAAc,IAEpB,CAC9C,GAAI,CAAC,EACH,OAGF,IAAM,EACJ,EAAY,cAAgB,KAAe,EAAY,aACnD,EAAY,aAAa,GACzB,EAAY,iBACV,KAAe,EAAY,gBAC3B,EAAY,gBAAgB,GAC5B,IAAA,GACF,GACH,EAAY,cAAgB,KAAe,EAAY,aACpD,eACA,EAAY,iBACV,KAAe,EAAY,gBAC3B,kBACA,IAAA,KAAc,IAAA,GAEtB,OAAO,GAAW,EACd,CACE,UACA,OACD,CACD,IAAA,GAWN,eAAsB,EACpB,EACA,EACA,EACkB,CAClB,IAAM,EAAM,MAAM,EAAkB,EAAM,CAAE,MAAK,CAAC,CAKlD,OAJK,EAKH,EAAI,QAAQ,WAAW,WAAW,EAClC,EAAI,QAAQ,WAAW,aAAa,EACpC,EAAO,EAAI,QAAS,EAAQ,CANrB,GAiBX,SAAgB,EAAgB,EAAc,EAA0B,EAAE,CAAE,CAC1E,MAAO,EAAQ,EAAe,EAAM,EAAQ"}
@@ -0,0 +1 @@
1
+ const e=require(`./cwd.cjs`),t=require(`./slash.cjs`),n=require(`./is-parent-path.cjs`),r=require(`./join-paths.cjs`);function i(i,a=e.cwd()){return t.slash(n.isParentPath(i,a)?i:r.joinPaths(a,i))}function a(e,t){return`${e}.${t.replace(/^\./,``)}`}exports.appendExtension=a,exports.appendPath=i;
@@ -0,0 +1,2 @@
1
+ import{cwd as e}from"./cwd.mjs";import{slash as t}from"./slash.mjs";import{isParentPath as n}from"./is-parent-path.mjs";import{joinPaths as r}from"./join-paths.mjs";function i(i,a=e()){return t(n(i,a)?i:r(a,i))}function a(e,t){return`${e}.${t.replace(/^\./,``)}`}export{a as appendExtension,i as appendPath};
2
+ //# sourceMappingURL=append.mjs.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"append.mjs","names":[],"sources":["../../../../path/src/append.ts"],"sourcesContent":["/* -------------------------------------------------------------------\n\n ⚡ Storm Software - Stryke\n\n This code was released as part of the Stryke project. Stryke\n is maintained by Storm Software under the Apache-2.0 license, and is\n free for commercial and private use. For more information, please visit\n our licensing page at https://stormsoftware.com/licenses/projects/stryke.\n\n Website: https://stormsoftware.com\n Repository: https://github.com/storm-software/stryke\n Documentation: https://docs.stormsoftware.com/projects/stryke\n Contact: https://stormsoftware.com/contact\n\n SPDX-License-Identifier: Apache-2.0\n\n ------------------------------------------------------------------- */\n\nimport { cwd } from \"./cwd\";\nimport { isParentPath } from \"./is-parent-path\";\nimport { joinPaths } from \"./join-paths\";\nimport { slash } from \"./slash\";\n\n/**\n * If not already a parent path, append the base path from the beginning of the given child path.\n *\n * @example\n * ```ts\n * appendPath(\"src/index.ts\", \"/home/user/project\");\n * // returns \"/home/user/project/src/index.ts\"\n *\n * appendPath(\"/user/dev/app.ts\", \"/user/dev\");\n * // returns \"/user/dev/app.ts\"\n * ```\n *\n * @param childPath - The child path to append to the {@link parentPath}\n * @param parentPath - The parent path to add the {@link childPath} to\n * @returns The {@link parentPath} with the {@link childPath} appended\n */\nexport function appendPath(\n childPath: string,\n parentPath: string = cwd()\n): string {\n return slash(\n !isParentPath(childPath, parentPath)\n ? joinPaths(parentPath, childPath)\n : childPath\n );\n}\n\nexport const append = appendPath;\n\n/**\n * Append the extension to the given path.\n *\n * @example\n * ```ts\n * appendExtension(\"/home/user/project/src/index\", \".ts\");\n * // returns \"/home/user/project/src/index.ts\"\n * appendExtension(\"/home/user/project/src/index.ts\", \".js\");\n * // returns \"/home/user/project/src/index.ts.js\"\n * ```\n *\n * @param path - The path to append the extension to.\n * @param extension - The extension to append.\n * @returns The path with the appended extension.\n */\nexport function appendExtension(path: string, extension: string): string {\n return `${path}.${extension.replace(/^\\./, \"\")}`;\n}\n"],"mappings":"qKAuCA,SAAgB,EACd,EACA,EAAqB,GAAK,CAClB,CACR,OAAO,EACJ,EAAa,EAAW,EAAW,CAEhC,EADA,EAAU,EAAY,EAAU,CAErC,CAoBH,SAAgB,EAAgB,EAAc,EAA2B,CACvE,MAAO,GAAG,EAAK,GAAG,EAAU,QAAQ,MAAO,GAAG"}
@@ -0,0 +1 @@
1
+ const e=require(`./cwd.cjs`),t=require(`./regex.cjs`),n=require(`./is-type.cjs`),r=require(`./slash.cjs`),i=require(`./append.cjs`);function a(e=``){return e&&r.slash(e).replace(t.DRIVE_LETTER_START_REGEX,e=>e.toUpperCase())}function o(e){if(!e||e.length===0)return`.`;e=a(e);let r=e.match(t.UNC_REGEX),i=n.isAbsolutePath(e),o=e.endsWith(`/`);return e=c(e,!i),e.length===0?i?`/`:o?`./`:`.`:(o&&(e+=`/`),t.DRIVE_LETTER_REGEX.test(e)&&(e+=`/`),r?i?`//${e}`:`//./${e}`:!e.startsWith(`/`)&&i&&!t.DRIVE_LETTER_REGEX.test(e)?`/${e}`:e)}function s(e){if(!e||e.length===0)return`.`;e=o(e);let t=!1;return e.split(`/`).reduce((e,n)=>n?.trim()?t||n.includes(`*`)?(t=!0,e):e+(e?`/${n}`:n):e,``)}function c(e,t){let n=``,r=0,i=-1,a=0,o=null;for(let s=0;s<=e.length;++s){if(s<e.length)o=e[s];else if(o===`/`)break;else o=`/`;if(o===`/`){if(!(i===s-1||a===1))if(a===2){if(n.length<2||r!==2||n[n.length-1]!==`.`||n[n.length-2]!==`.`){if(n.length>2){let e=n.lastIndexOf(`/`);e===-1?(n=``,r=0):(n=n.slice(0,e),r=n.length-1-n.lastIndexOf(`/`)),i=s,a=0;continue}else if(n.length>0){n=``,r=0,i=s,a=0;continue}}t&&(n+=n.length>0?`/..`:`..`,r=2)}else n.length>0?n+=`/${e.slice(i+1,s)}`:n=e.slice(i+1,s),r=s-i-1;i=s,a=0}else o===`.`&&a!==-1?++a:a=-1}return n}function l(t,a=e.cwd()){return n.isAbsolutePath(t)?t:r.slash(c(i.appendPath(t,a),!0))}exports.correctPath=o,exports.normalizeString=c,exports.normalizeWindowsPath=a,exports.stripStars=s,exports.toAbsolutePath=l;
@@ -0,0 +1,2 @@
1
+ import{cwd as e}from"./cwd.mjs";import{DRIVE_LETTER_REGEX as t,DRIVE_LETTER_START_REGEX as n,UNC_REGEX as r}from"./regex.mjs";import{isAbsolutePath as i}from"./is-type.mjs";import{slash as a}from"./slash.mjs";import{appendPath as o}from"./append.mjs";function s(e=``){return e&&a(e).replace(n,e=>e.toUpperCase())}function c(e){if(!e||e.length===0)return`.`;e=s(e);let n=e.match(r),a=i(e),o=e.endsWith(`/`);return e=u(e,!a),e.length===0?a?`/`:o?`./`:`.`:(o&&(e+=`/`),t.test(e)&&(e+=`/`),n?a?`//${e}`:`//./${e}`:!e.startsWith(`/`)&&a&&!t.test(e)?`/${e}`:e)}function l(e){if(!e||e.length===0)return`.`;e=c(e);let t=!1;return e.split(`/`).reduce((e,n)=>n?.trim()?t||n.includes(`*`)?(t=!0,e):e+(e?`/${n}`:n):e,``)}function u(e,t){let n=``,r=0,i=-1,a=0,o=null;for(let s=0;s<=e.length;++s){if(s<e.length)o=e[s];else if(o===`/`)break;else o=`/`;if(o===`/`){if(!(i===s-1||a===1))if(a===2){if(n.length<2||r!==2||n[n.length-1]!==`.`||n[n.length-2]!==`.`){if(n.length>2){let e=n.lastIndexOf(`/`);e===-1?(n=``,r=0):(n=n.slice(0,e),r=n.length-1-n.lastIndexOf(`/`)),i=s,a=0;continue}else if(n.length>0){n=``,r=0,i=s,a=0;continue}}t&&(n+=n.length>0?`/..`:`..`,r=2)}else n.length>0?n+=`/${e.slice(i+1,s)}`:n=e.slice(i+1,s),r=s-i-1;i=s,a=0}else o===`.`&&a!==-1?++a:a=-1}return n}function d(t,n=e()){return i(t)?t:a(u(o(t,n),!0))}export{c as correctPath,u as normalizeString,s as normalizeWindowsPath,l as stripStars,d as toAbsolutePath};
2
+ //# sourceMappingURL=correct-path.mjs.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"correct-path.mjs","names":["char: string | null","currentDir","cwd"],"sources":["../../../../path/src/correct-path.ts"],"sourcesContent":["/* -------------------------------------------------------------------\n\n ⚡ Storm Software - Stryke\n\n This code was released as part of the Stryke project. Stryke\n is maintained by Storm Software under the Apache-2.0 license, and is\n free for commercial and private use. For more information, please visit\n our licensing page at https://stormsoftware.com/licenses/projects/stryke.\n\n Website: https://stormsoftware.com\n Repository: https://github.com/storm-software/stryke\n Documentation: https://docs.stormsoftware.com/projects/stryke\n Contact: https://stormsoftware.com/contact\n\n SPDX-License-Identifier: Apache-2.0\n\n ------------------------------------------------------------------- */\n\nimport { appendPath } from \"./append\";\nimport { cwd as currentDir } from \"./cwd\";\nimport { isAbsolutePath } from \"./is-type\";\nimport { joinPaths } from \"./join-paths\";\nimport {\n DRIVE_LETTER_REGEX,\n DRIVE_LETTER_START_REGEX,\n UNC_REGEX\n} from \"./regex\";\nimport { slash } from \"./slash\";\n\n// Util to normalize windows paths to posix\nexport function normalizeWindowsPath(input = \"\") {\n if (!input) {\n return input;\n }\n\n return slash(input).replace(DRIVE_LETTER_START_REGEX, r => r.toUpperCase());\n}\n\n/**\n * Corrects/normalized a file path.\n *\n * @param path - The path to correct.\n * @returns The corrected path.\n */\nexport function correctPath(path?: string) {\n if (!path || path.length === 0) {\n return \".\";\n }\n\n // Normalize windows argument\n path = normalizeWindowsPath(path);\n\n const isUNCPath = path.match(UNC_REGEX);\n const isPathAbsolute = isAbsolutePath(path);\n const trailingSeparator = path.endsWith(\"/\");\n\n // Normalize the path\n path = normalizeString(path, !isPathAbsolute);\n\n if (path.length === 0) {\n if (isPathAbsolute) {\n return \"/\";\n }\n return trailingSeparator ? \"./\" : \".\";\n }\n\n if (trailingSeparator) {\n path += \"/\";\n }\n if (DRIVE_LETTER_REGEX.test(path)) {\n path += \"/\";\n }\n\n if (isUNCPath) {\n if (!isPathAbsolute) {\n return `//./${path}`;\n }\n return `//${path}`;\n }\n\n return !path.startsWith(\"/\") &&\n isPathAbsolute &&\n !DRIVE_LETTER_REGEX.test(path)\n ? `/${path}`\n : path;\n}\n\n/**\n * Remove any star tokens (*) from the end of the file path\n *\n * @example\n * stripStars(\"src/**\") // returns \"src\"\n * stripStars(\"src/*\") // returns \"src\"\n * stripStars(\"src/**\\/*\") // returns \"src\"\n * stripStars(\"src/**\\/*.txt\") // returns \"src\"\n * stripStars(\"src/**\\/file.txt\") // returns \"src\"\n * stripStars(\"src/file.txt\") // returns \"src/file.txt\"\n * stripStars(\"\") // returns \".\"\n *\n * @param path - The path to correct.\n * @returns The corrected path.\n */\nexport function stripStars(path?: string) {\n if (!path || path.length === 0) {\n return \".\";\n }\n\n path = correctPath(path);\n\n let found = false;\n\n return path.split(\"/\").reduce((ret, segment) => {\n if (!segment?.trim()) {\n return ret;\n }\n\n if (found || segment.includes(\"*\")) {\n found = true;\n return ret;\n }\n\n return ret + (ret ? `/${segment}` : segment);\n }, \"\");\n}\n\n/**\n * Resolves a string path, resolving '.' and '.' segments and allowing paths above the root.\n *\n * @param path - The path to normalize.\n * @param allowAboveRoot - Whether to allow the resulting path to be above the root directory.\n * @returns the normalize path string.\n */\nexport function normalizeString(path: string, allowAboveRoot: boolean) {\n let res = \"\";\n let lastSegmentLength = 0;\n let lastSlash = -1;\n let dots = 0;\n let char: string | null = null;\n for (let index = 0; index <= path.length; ++index) {\n if (index < path.length) {\n // casted because we know it exists thanks to the length check\n char = path[index] as string;\n } else if (char === \"/\") {\n break;\n } else {\n char = \"/\";\n }\n if (char === \"/\") {\n if (lastSlash === index - 1 || dots === 1) {\n // NOOP\n } else if (dots === 2) {\n if (\n res.length < 2 ||\n lastSegmentLength !== 2 ||\n res[res.length - 1] !== \".\" ||\n res[res.length - 2] !== \".\"\n ) {\n if (res.length > 2) {\n const lastSlashIndex = res.lastIndexOf(\"/\");\n if (lastSlashIndex === -1) {\n res = \"\";\n lastSegmentLength = 0;\n } else {\n res = res.slice(0, lastSlashIndex);\n lastSegmentLength = res.length - 1 - res.lastIndexOf(\"/\");\n }\n lastSlash = index;\n dots = 0;\n continue;\n } else if (res.length > 0) {\n res = \"\";\n lastSegmentLength = 0;\n lastSlash = index;\n dots = 0;\n continue;\n }\n }\n if (allowAboveRoot) {\n res += res.length > 0 ? \"/..\" : \"..\";\n lastSegmentLength = 2;\n }\n } else {\n if (res.length > 0) {\n res += `/${path.slice(lastSlash + 1, index)}`;\n } else {\n res = path.slice(lastSlash + 1, index);\n }\n lastSegmentLength = index - lastSlash - 1;\n }\n lastSlash = index;\n dots = 0;\n } else if (char === \".\" && dots !== -1) {\n ++dots;\n } else {\n dots = -1;\n }\n }\n return res;\n}\n\n/**\n * Converts a given path to an absolute path based on the current working directory.\n *\n * @param path - The path to convert to an absolute path.\n * @param cwd - The current working directory to use as the base path if the path is not absolute.\n * @returns The absolute path.\n */\nexport function toAbsolutePath(path: string, cwd = currentDir()): string {\n if (isAbsolutePath(path)) {\n return path;\n }\n\n return slash(normalizeString(appendPath(path, cwd), true));\n}\n\n/**\n * Converts a given path to a relative path based on the current working directory.\n *\n * @param path - The path to convert to a relative path.\n * @param cwd - The current working directory to use as the base path if the path is not absolute.\n * @returns The relative path.\n */\nexport function toRelativePath(path: string, cwd = currentDir()): string {\n if (!path || path.length === 0) {\n return \".\";\n }\n\n if (isAbsolutePath(path)) {\n path = slash(normalizeString(path, true));\n } else {\n path = slash(normalizeString(joinPaths(cwd, path), true));\n }\n\n if (path.startsWith(\"./\")) {\n return path.slice(2);\n }\n\n return path;\n}\n\n/**\n * Adds a trailing slash to a path if it doesn't already have one.\n *\n * @param path - The path to modify.\n * @returns The modified path with a trailing slash.\n */\nexport function withTrailingSlash(path: string): string {\n const result = correctPath(path);\n\n return result.endsWith(\"/\") ? result : `${result}/`;\n}\n"],"mappings":"2PA8BA,SAAgB,EAAqB,EAAQ,GAAI,CAK/C,OAJK,GAIE,EAAM,EAAM,CAAC,QAAQ,EAA0B,GAAK,EAAE,aAAa,CAAC,CAS7E,SAAgB,EAAY,EAAe,CACzC,GAAI,CAAC,GAAQ,EAAK,SAAW,EAC3B,MAAO,IAIT,EAAO,EAAqB,EAAK,CAEjC,IAAM,EAAY,EAAK,MAAM,EAAU,CACjC,EAAiB,EAAe,EAAK,CACrC,EAAoB,EAAK,SAAS,IAAI,CA0B5C,MAvBA,GAAO,EAAgB,EAAM,CAAC,EAAe,CAEzC,EAAK,SAAW,EACd,EACK,IAEF,EAAoB,KAAO,KAGhC,IACF,GAAQ,KAEN,EAAmB,KAAK,EAAK,GAC/B,GAAQ,KAGN,EACG,EAGE,KAAK,IAFH,OAAO,IAKX,CAAC,EAAK,WAAW,IAAI,EAC1B,GACA,CAAC,EAAmB,KAAK,EAAK,CAC5B,IAAI,IACJ,GAkBN,SAAgB,EAAW,EAAe,CACxC,GAAI,CAAC,GAAQ,EAAK,SAAW,EAC3B,MAAO,IAGT,EAAO,EAAY,EAAK,CAExB,IAAI,EAAQ,GAEZ,OAAO,EAAK,MAAM,IAAI,CAAC,QAAQ,EAAK,IAC7B,GAAS,MAAM,CAIhB,GAAS,EAAQ,SAAS,IAAI,EAChC,EAAQ,GACD,GAGF,GAAO,EAAM,IAAI,IAAY,GAR3B,EASR,GAAG,CAUR,SAAgB,EAAgB,EAAc,EAAyB,CACrE,IAAI,EAAM,GACN,EAAoB,EACpB,EAAY,GACZ,EAAO,EACPA,EAAsB,KAC1B,IAAK,IAAI,EAAQ,EAAG,GAAS,EAAK,OAAQ,EAAE,EAAO,CACjD,GAAI,EAAQ,EAAK,OAEf,EAAO,EAAK,WACH,IAAS,IAClB,WAEA,EAAO,IAET,GAAI,IAAS,IAAK,CAChB,GAAI,MAAc,EAAQ,GAAK,IAAS,GAAG,GAEhC,IAAS,EAAG,CACrB,GACE,EAAI,OAAS,GACb,IAAsB,GACtB,EAAI,EAAI,OAAS,KAAO,KACxB,EAAI,EAAI,OAAS,KAAO,QAEpB,EAAI,OAAS,EAAG,CAClB,IAAM,EAAiB,EAAI,YAAY,IAAI,CACvC,IAAmB,IACrB,EAAM,GACN,EAAoB,IAEpB,EAAM,EAAI,MAAM,EAAG,EAAe,CAClC,EAAoB,EAAI,OAAS,EAAI,EAAI,YAAY,IAAI,EAE3D,EAAY,EACZ,EAAO,EACP,iBACS,EAAI,OAAS,EAAG,CACzB,EAAM,GACN,EAAoB,EACpB,EAAY,EACZ,EAAO,EACP,UAGA,IACF,GAAO,EAAI,OAAS,EAAI,MAAQ,KAChC,EAAoB,QAGlB,EAAI,OAAS,EACf,GAAO,IAAI,EAAK,MAAM,EAAY,EAAG,EAAM,GAE3C,EAAM,EAAK,MAAM,EAAY,EAAG,EAAM,CAExC,EAAoB,EAAQ,EAAY,EAE1C,EAAY,EACZ,EAAO,OACE,IAAS,KAAO,IAAS,GAClC,EAAE,EAEF,EAAO,GAGX,OAAO,EAUT,SAAgB,EAAe,EAAc,EAAMC,GAAY,CAAU,CAKvE,OAJI,EAAe,EAAK,CACf,EAGF,EAAM,EAAgB,EAAW,EAAMC,EAAI,CAAE,GAAK,CAAC"}
@@ -0,0 +1 @@
1
+ function e(){return typeof process<`u`&&typeof process.cwd==`function`?process.cwd().replace(/\\/g,`/`):`/`}exports.cwd=e;
@@ -0,0 +1,2 @@
1
+ function e(){return typeof process<`u`&&typeof process.cwd==`function`?process.cwd().replace(/\\/g,`/`):`/`}export{e as cwd};
2
+ //# sourceMappingURL=cwd.mjs.map