@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
@@ -0,0 +1 @@
1
+ {"version":3,"file":"copy-file.mjs","names":["existsSync","cpf","cpfSync"],"sources":["../src/copy-file.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 { stripStars } from \"@stryke/path/correct-path\";\nimport { findFilePath, hasFileExtension } from \"@stryke/path/file-path-fns\";\nimport { joinPaths } from \"@stryke/path/join\";\nimport { replacePath } from \"@stryke/path/replace\";\nimport { resolveParentPath } from \"@stryke/path/resolve-parent-path\";\nimport { isString } from \"@stryke/type-checks\";\nimport type { AssetGlob } from \"@stryke/types/file\";\nimport { fileURLToPath } from \"mlly\";\nimport { copyFileSync as cpfSync } from \"node:fs\";\nimport { copyFile as cpf } from \"node:fs/promises\";\nimport { existsSync } from \"./exists\";\nimport { createDirectory, createDirectorySync } from \"./helpers\";\nimport { isDirectory, isFile } from \"./is-file\";\nimport { listFiles, listFilesSync } from \"./list-files\";\n\n/**\n * Copy a file from one location to another\n *\n * @param source - The file to copy, this can be a file, directory, URL, or glob pattern\n * @param destination - The destination location\n * @returns An indicator specifying if the copy was successful\n */\nexport async function copyFile(\n source: string | URL,\n destination: string | URL\n) {\n const src = source instanceof URL ? fileURLToPath(source) : source;\n const dest =\n destination instanceof URL ? fileURLToPath(destination) : destination;\n\n if (!hasFileExtension(dest)) {\n if (!existsSync(resolveParentPath(dest))) {\n await createDirectory(resolveParentPath(dest));\n }\n } else if (!existsSync(findFilePath(dest))) {\n await createDirectory(findFilePath(dest));\n }\n\n if (isString(src) && existsSync(src)) {\n return cpf(src, dest);\n }\n}\n\n/**\n * Synchronously copy a file from one location to another\n *\n * @param source - The file to copy, this can be a file, directory, URL, or glob pattern\n * @param destination - The destination location\n * @returns An indicator specifying if the copy was successful\n */\nexport function copyFileSync(source: string | URL, destination: string | URL) {\n const src = source instanceof URL ? fileURLToPath(source) : source;\n const dest =\n destination instanceof URL ? fileURLToPath(destination) : destination;\n\n if (!hasFileExtension(dest)) {\n if (!existsSync(resolveParentPath(dest))) {\n createDirectorySync(resolveParentPath(dest));\n }\n } else if (!existsSync(findFilePath(dest))) {\n createDirectorySync(findFilePath(dest));\n }\n\n if (isString(src) && existsSync(src)) {\n return cpfSync(src, dest);\n }\n}\n\n/**\n * Copy files from one location to another\n *\n * @param source - The source location, this can be a file, directory, URL, or glob pattern\n * @param destination - The destination location\n * @returns An indicator specifying if the copy was successful\n */\nexport async function copyFiles(\n source: string | URL | Omit<AssetGlob, \"output\">,\n destination: string | URL\n) {\n const src = source instanceof URL ? fileURLToPath(source) : source;\n const dest =\n destination instanceof URL ? fileURLToPath(destination) : destination;\n\n if (isString(src) && isFile(src)) {\n return copyFile(src, dest);\n }\n\n return Promise.all(\n (await listFiles(src)).map(async entryPath => {\n const destFile = joinPaths(\n dest,\n replacePath(entryPath, isString(src) ? stripStars(src) : src.input)\n );\n\n if (isDirectory(entryPath)) {\n await copyFiles(entryPath, destFile);\n } else {\n await copyFile(entryPath, destFile);\n }\n })\n );\n}\n\n/**\n * Synchronously copy files from one location to another\n *\n * @param source - The source location, this can be a file, directory, URL, or glob pattern\n * @param destination - The destination location\n * @returns An indicator specifying if the copy was successful\n */\nexport function copyFilesSync(\n source: string | URL | Omit<AssetGlob, \"output\">,\n destination: string | URL\n) {\n const src = source instanceof URL ? fileURLToPath(source) : source;\n const dest =\n destination instanceof URL ? fileURLToPath(destination) : destination;\n\n if (isString(src) && isFile(src)) {\n return copyFileSync(src, dest);\n }\n\n return listFilesSync(src).map(entryPath => {\n const destFile = joinPaths(\n dest,\n replacePath(entryPath, isString(src) ? stripStars(src) : src.input)\n );\n\n if (isDirectory(entryPath)) {\n copyFilesSync(entryPath, destFile);\n } else {\n copyFileSync(entryPath, destFile);\n }\n });\n}\n"],"mappings":"+vBAwCA,eAAsB,EACpB,EACA,EACA,CACA,IAAM,EAAM,aAAkB,IAAM,EAAc,EAAO,CAAG,EACtD,EACJ,aAAuB,IAAM,EAAc,EAAY,CAAG,EAU5D,GARK,EAAiB,EAAK,CAIfA,EAAW,EAAa,EAAK,CAAC,EACxC,MAAM,EAAgB,EAAa,EAAK,CAAC,CAJpCA,EAAW,EAAkB,EAAK,CAAC,EACtC,MAAM,EAAgB,EAAkB,EAAK,CAAC,CAM9C,EAAS,EAAI,EAAIA,EAAW,EAAI,CAClC,OAAOC,EAAI,EAAK,EAAK,CAWzB,SAAgB,EAAa,EAAsB,EAA2B,CAC5E,IAAM,EAAM,aAAkB,IAAM,EAAc,EAAO,CAAG,EACtD,EACJ,aAAuB,IAAM,EAAc,EAAY,CAAG,EAU5D,GARK,EAAiB,EAAK,CAIfD,EAAW,EAAa,EAAK,CAAC,EACxC,EAAoB,EAAa,EAAK,CAAC,CAJlCA,EAAW,EAAkB,EAAK,CAAC,EACtC,EAAoB,EAAkB,EAAK,CAAC,CAM5C,EAAS,EAAI,EAAIA,EAAW,EAAI,CAClC,OAAOE,EAAQ,EAAK,EAAK,CAW7B,eAAsB,EACpB,EACA,EACA,CACA,IAAM,EAAM,aAAkB,IAAM,EAAc,EAAO,CAAG,EACtD,EACJ,aAAuB,IAAM,EAAc,EAAY,CAAG,EAM5D,OAJI,EAAS,EAAI,EAAI,EAAO,EAAI,CACvB,EAAS,EAAK,EAAK,CAGrB,QAAQ,KACZ,MAAM,EAAU,EAAI,EAAE,IAAI,KAAM,IAAa,CAC5C,IAAM,EAAW,EACf,EACA,EAAY,EAAW,EAAS,EAAI,CAAG,EAAW,EAAI,CAAG,EAAI,MAAM,CACpE,CAEG,EAAY,EAAU,CACxB,MAAM,EAAU,EAAW,EAAS,CAEpC,MAAM,EAAS,EAAW,EAAS,EAErC,CACH,CAUH,SAAgB,EACd,EACA,EACA,CACA,IAAM,EAAM,aAAkB,IAAM,EAAc,EAAO,CAAG,EACtD,EACJ,aAAuB,IAAM,EAAc,EAAY,CAAG,EAM5D,OAJI,EAAS,EAAI,EAAI,EAAO,EAAI,CACvB,EAAa,EAAK,EAAK,CAGzB,EAAc,EAAI,CAAC,IAAI,GAAa,CACzC,IAAM,EAAW,EACf,EACA,EAAY,EAAW,EAAS,EAAI,CAAG,EAAW,EAAI,CAAG,EAAI,MAAM,CACpE,CAEG,EAAY,EAAU,CACxB,EAAc,EAAW,EAAS,CAElC,EAAa,EAAW,EAAS,EAEnC"}
package/dist/exists.cjs CHANGED
@@ -1 +1 @@
1
- const e=require(`./exists-B31lSRFp.cjs`);exports.exists=e.t,exports.existsSync=e.n;
1
+ const e=require(`./_virtual/rolldown_runtime.cjs`);let t=require(`node:fs`),n=require(`node:fs/promises`);function r(e){return(0,t.existsSync)(e)}async function i(e){return(0,n.access)(e,n.constants.F_OK).then(()=>!0).catch(()=>!1)}exports.exists=i,exports.existsSync=r;
package/dist/exists.d.cts CHANGED
@@ -1,2 +1,18 @@
1
- import { n as existsSync, t as exists } from "./exists-CVlDImzc.cjs";
2
- export { exists, existsSync };
1
+ //#region src/exists.d.ts
2
+ /**
3
+ * Check if a file exists
4
+ *
5
+ * @param filePath - The file path to check
6
+ * @returns An indicator specifying if the file exists
7
+ */
8
+ declare function existsSync(filePath: string): boolean;
9
+ /**
10
+ * Check if a file exists
11
+ *
12
+ * @param filePath - The file path to check
13
+ * @returns An indicator specifying if the file exists
14
+ */
15
+ declare function exists(filePath: string): Promise<boolean>;
16
+ //#endregion
17
+ export { exists, existsSync };
18
+ //# sourceMappingURL=exists.d.cts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"exists.d.cts","names":[],"sources":["../src/exists.ts"],"sourcesContent":[],"mappings":";;AA2BA;AAUA;;;;iBAVgB,UAAA;;;;;;;iBAUM,MAAA,oBAA0B"}
package/dist/exists.d.mts CHANGED
@@ -1,2 +1,18 @@
1
- import { n as existsSync, t as exists } from "./exists-175EN367.mjs";
2
- export { exists, existsSync };
1
+ //#region src/exists.d.ts
2
+ /**
3
+ * Check if a file exists
4
+ *
5
+ * @param filePath - The file path to check
6
+ * @returns An indicator specifying if the file exists
7
+ */
8
+ declare function existsSync(filePath: string): boolean;
9
+ /**
10
+ * Check if a file exists
11
+ *
12
+ * @param filePath - The file path to check
13
+ * @returns An indicator specifying if the file exists
14
+ */
15
+ declare function exists(filePath: string): Promise<boolean>;
16
+ //#endregion
17
+ export { exists, existsSync };
18
+ //# sourceMappingURL=exists.d.mts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"exists.d.mts","names":[],"sources":["../src/exists.ts"],"sourcesContent":[],"mappings":";;AA2BA;AAUA;;;;iBAVgB,UAAA;;;;;;;iBAUM,MAAA,oBAA0B"}
package/dist/exists.mjs CHANGED
@@ -1 +1,2 @@
1
- import{n as e,t}from"./exists-Ci-9lYmi.mjs";export{t as exists,e as existsSync};
1
+ import{existsSync as e}from"node:fs";import{access as t,constants as n}from"node:fs/promises";function r(t){return e(t)}async function i(e){return t(e,n.F_OK).then(()=>!0).catch(()=>!1)}export{i as exists,r as existsSync};
2
+ //# sourceMappingURL=exists.mjs.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"exists.mjs","names":["existsSyncFs","constants"],"sources":["../src/exists.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 { existsSync as existsSyncFs } from \"node:fs\";\nimport { access, constants } from \"node:fs/promises\";\n\n/**\n * Check if a file exists\n *\n * @param filePath - The file path to check\n * @returns An indicator specifying if the file exists\n */\nexport function existsSync(filePath: string): boolean {\n return existsSyncFs(filePath);\n}\n\n/**\n * Check if a file exists\n *\n * @param filePath - The file path to check\n * @returns An indicator specifying if the file exists\n */\nexport async function exists(filePath: string): Promise<boolean> {\n return access(filePath, constants.F_OK)\n .then(() => true)\n .catch(() => false);\n}\n"],"mappings":"8FA2BA,SAAgB,EAAW,EAA2B,CACpD,OAAOA,EAAa,EAAS,CAS/B,eAAsB,EAAO,EAAoC,CAC/D,OAAO,EAAO,EAAUC,EAAU,KAAK,CACpC,SAAW,GAAK,CAChB,UAAY,GAAM"}
@@ -1 +1 @@
1
- const e=require(`./get-parent-path-CfRkaB4R.cjs`);exports.getParentPath=e.t;
1
+ const e=require(`./_virtual/rolldown_runtime.cjs`),t=require(`./path/src/cwd.cjs`),n=require(`./path/src/join-paths.cjs`),r=require(`./path/src/resolve-parent-path.cjs`),i=require(`./is-file.cjs`),a=require(`./convert/src/to-array.cjs`);let o=require(`node:fs`);const s=(e,s=t.cwd(),c={})=>{let l=c?.ignoreCase??!0,u=c?.skipCwd??!1,d=c?.includeNameInResults??!1,f=s;u&&(f=r.resolveParentPath(s));let p=a.toArray(e);for(l&&(p=p.map(e=>e.toLowerCase()));;){let e=p.find(e=>(0,o.existsSync)(n.joinPaths(f,e)));if(e)return d||i.isDirectory(n.joinPaths(f,e))?n.joinPaths(f,e):f;let t=r.resolveParentPath(f);if(t===f)return;f=t}};exports.getParentPath=s;
@@ -1,2 +1,32 @@
1
- import { n as getParentPath, t as GetParentPathOptions } from "./get-parent-path-Cbqs2km7.cjs";
2
- export { GetParentPathOptions, getParentPath };
1
+ //#region src/get-parent-path.d.ts
2
+ interface GetParentPathOptions {
3
+ /**
4
+ * Whether to ignore the case of the file names when checking for existence.
5
+ *
6
+ * @defaultValue true
7
+ */
8
+ ignoreCase: boolean;
9
+ /**
10
+ * Whether to skip the current working directory when checking for the file.
11
+ *
12
+ * @defaultValue false
13
+ */
14
+ skipCwd: boolean;
15
+ /**
16
+ * Should we include the found file/directory name in the results.
17
+ *
18
+ * @defaultValue false
19
+ */
20
+ includeNameInResults?: boolean;
21
+ }
22
+ /**
23
+ * Get the first parent path that has a file or directory with the provided name.
24
+ *
25
+ * @param name - The name (or names) of the file to look for in the parent paths.
26
+ * @param cwd - The current working directory.
27
+ * @returns The first parent path that exists.
28
+ */
29
+ declare const getParentPath: (name: string | string[], cwd?: string, options?: Partial<GetParentPathOptions>) => string | undefined;
30
+ //#endregion
31
+ export { GetParentPathOptions, getParentPath };
32
+ //# sourceMappingURL=get-parent-path.d.cts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"get-parent-path.d.cts","names":[],"sources":["../src/get-parent-path.ts"],"sourcesContent":[],"mappings":";UAyBiB,oBAAA;EAAA;AA8BjB;;;;;;;;;;;;;;;;;;;;;;;;;cAAa,iEAGF,QAAQ"}
@@ -1,2 +1,32 @@
1
- import { n as getParentPath, t as GetParentPathOptions } from "./get-parent-path-COkh6Pvl.mjs";
2
- export { GetParentPathOptions, getParentPath };
1
+ //#region src/get-parent-path.d.ts
2
+ interface GetParentPathOptions {
3
+ /**
4
+ * Whether to ignore the case of the file names when checking for existence.
5
+ *
6
+ * @defaultValue true
7
+ */
8
+ ignoreCase: boolean;
9
+ /**
10
+ * Whether to skip the current working directory when checking for the file.
11
+ *
12
+ * @defaultValue false
13
+ */
14
+ skipCwd: boolean;
15
+ /**
16
+ * Should we include the found file/directory name in the results.
17
+ *
18
+ * @defaultValue false
19
+ */
20
+ includeNameInResults?: boolean;
21
+ }
22
+ /**
23
+ * Get the first parent path that has a file or directory with the provided name.
24
+ *
25
+ * @param name - The name (or names) of the file to look for in the parent paths.
26
+ * @param cwd - The current working directory.
27
+ * @returns The first parent path that exists.
28
+ */
29
+ declare const getParentPath: (name: string | string[], cwd?: string, options?: Partial<GetParentPathOptions>) => string | undefined;
30
+ //#endregion
31
+ export { GetParentPathOptions, getParentPath };
32
+ //# sourceMappingURL=get-parent-path.d.mts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"get-parent-path.d.mts","names":[],"sources":["../src/get-parent-path.ts"],"sourcesContent":[],"mappings":";UAyBiB,oBAAA;EAAA;AA8BjB;;;;;;;;;;;;;;;;;;;;;;;;;cAAa,iEAGF,QAAQ"}
@@ -1 +1,2 @@
1
- import{t as e}from"./get-parent-path-DLFSyxSW.mjs";export{e as getParentPath};
1
+ import{cwd as e}from"./path/src/cwd.mjs";import{joinPaths as t}from"./path/src/join-paths.mjs";import{resolveParentPath as n}from"./path/src/resolve-parent-path.mjs";import{isDirectory as r}from"./is-file.mjs";import{toArray as i}from"./convert/src/to-array.mjs";import{existsSync as a}from"node:fs";const o=(o,s=e(),c={})=>{let l=c?.ignoreCase??!0,u=c?.skipCwd??!1,d=c?.includeNameInResults??!1,f=s;u&&(f=n(s));let p=i(o);for(l&&(p=p.map(e=>e.toLowerCase()));;){let e=p.find(e=>a(t(f,e)));if(e)return d||r(t(f,e))?t(f,e):f;let i=n(f);if(i===f)return;f=i}};export{o as getParentPath};
2
+ //# sourceMappingURL=get-parent-path.mjs.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"get-parent-path.mjs","names":["currentDir","cwd","name"],"sources":["../src/get-parent-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 { toArray } from \"@stryke/convert/to-array\";\nimport { cwd as currentDir } from \"@stryke/path/cwd\";\nimport { joinPaths } from \"@stryke/path/join-paths\";\nimport { resolveParentPath } from \"@stryke/path/resolve-parent-path\";\nimport { existsSync } from \"node:fs\";\nimport { isDirectory } from \"./is-file\";\n\nexport interface GetParentPathOptions {\n /**\n * Whether to ignore the case of the file names when checking for existence.\n *\n * @defaultValue true\n */\n ignoreCase: boolean;\n\n /**\n * Whether to skip the current working directory when checking for the file.\n *\n * @defaultValue false\n */\n skipCwd: boolean;\n\n /**\n * Should we include the found file/directory name in the results.\n *\n * @defaultValue false\n */\n includeNameInResults?: boolean;\n}\n\n/**\n * Get the first parent path that has a file or directory with the provided name.\n *\n * @param name - The name (or names) of the file to look for in the parent paths.\n * @param cwd - The current working directory.\n * @returns The first parent path that exists.\n */\nexport const getParentPath = (\n name: string | string[],\n cwd = currentDir(),\n options: Partial<GetParentPathOptions> = {}\n): string | undefined => {\n const ignoreCase = options?.ignoreCase ?? true;\n const skipCwd = options?.skipCwd ?? false;\n const includeNameInResults = options?.includeNameInResults ?? false;\n\n let dir = cwd;\n if (skipCwd) {\n dir = resolveParentPath(cwd);\n }\n\n let names = toArray(name);\n if (ignoreCase) {\n names = names.map(name => name.toLowerCase());\n }\n\n while (true) {\n const target = names.find(name => existsSync(joinPaths(dir, name)));\n if (target) {\n return includeNameInResults || isDirectory(joinPaths(dir, target))\n ? joinPaths(dir, target)\n : dir;\n }\n\n const parentDir = resolveParentPath(dir);\n if (parentDir === dir) {\n // It'll fail anyway\n return undefined;\n }\n\n dir = parentDir;\n }\n};\n"],"mappings":"4SAuDA,MAAa,GACX,EACA,EAAMA,GAAY,CAClB,EAAyC,EAAE,GACpB,CACvB,IAAM,EAAa,GAAS,YAAc,GACpC,EAAU,GAAS,SAAW,GAC9B,EAAuB,GAAS,sBAAwB,GAE1D,EAAMC,EACN,IACF,EAAM,EAAkBA,EAAI,EAG9B,IAAI,EAAQ,EAAQ,EAAK,CAKzB,IAJI,IACF,EAAQ,EAAM,IAAI,GAAQC,EAAK,aAAa,CAAC,IAGlC,CACX,IAAM,EAAS,EAAM,KAAK,GAAQ,EAAW,EAAU,EAAKA,EAAK,CAAC,CAAC,CACnE,GAAI,EACF,OAAO,GAAwB,EAAY,EAAU,EAAK,EAAO,CAAC,CAC9D,EAAU,EAAK,EAAO,CACtB,EAGN,IAAM,EAAY,EAAkB,EAAI,CACxC,GAAI,IAAc,EAEhB,OAGF,EAAM"}
@@ -1 +1 @@
1
- const e=require(`./get-workspace-root-CCNjjZGY.cjs`);exports.PROJECT_ROOT_CONTENT=e.t,exports.WORKSPACE_ROOT_CONTENT=e.n,exports.getProjectRoot=e.r,exports.getWorkspaceRoot=e.i,exports.isProjectRoot=e.a,exports.isWorkspaceRoot=e.o,exports.relativeToProjectRoot=e.s,exports.relativeToWorkspaceRoot=e.c;
1
+ const e=require(`./_virtual/rolldown_runtime.cjs`),t=require(`./path/src/cwd.cjs`),n=require(`./path/src/file-path-fns.cjs`),r=require(`./path/src/is-root-dir.cjs`),i=require(`./get-parent-path.cjs`);let a=require(`@storm-software/config-tools`);const o=`.all-contributorsrc,.commitlintrc,.github,.git,.husky,.huskyrc,.lintstagedrc,.log4brains.yml,.npmrc,.nx,.storm-workspace.js,.storm-workspace.json,.storm-workspace.ts,.storm-workspace.yaml,.storm-workspace.yml,.vscode,.whitesource,bun.lock,bun.lockb,lefthook.yaml,lefthook.yml,lerna.json,npm-lock.json,npm-lock.yaml,npm-lock.yml,npm-workspace.json,npm-workspace.yaml,npm-workspace.yml,nx.json,package-lock.json,patches,pnpm-lock.json,pnpm-lock.yaml,pnpm-lock.yml,pnpm-workspace.json,pnpm-workspace.yaml,pnpm-workspace.yml,socket.yaml,storm-workspace.js,storm-workspace.json,storm-workspace.ts,storm-workspace.yaml,storm-workspace.yml,syncpack.config.js,syncpack.json,turbo.json,yarn-lock.json,yarn-lock.yaml,yarn-lock.yml,yarn-workspace.json,yarn-workspace.yaml,yarn-workspace.yml,yarn.lock`.split(`,`),s=[`.powerlines`,`.storm`,`package.json`,`powerlines.json`,`powerlines.yaml`,`powerlines.yml`,`powerlines.toml`,`powerlines.config.js`,`powerlines.config.ts`,`project.json`];function c(e=t.cwd()){if(process.env.STORM_WORKSPACE_ROOT||process.env.NX_WORKSPACE_ROOT_PATH)return process.env.STORM_WORKSPACE_ROOT||process.env.NX_WORKSPACE_ROOT_PATH;let n=(0,a.findWorkspaceRootSafe)(e);if(n)return n;let s=i.getParentPath(o,e);if(s)return s;for(s=e;s&&!r.isSystemRoot(s);)if(s=i.getParentPath(`storm-workspace.json`,s,{skipCwd:!0,includeNameInResults:!1}),s)return s;return e}function l(e=t.cwd()){let n=c(e);return n?n===e:!1}function u(e=t.cwd()){return i.getParentPath(s,e)||e}function d(e=t.cwd()){let n=u(e);return n?n===e:!1}function f(e){return n.relativePath(e,c())}function p(e){return n.relativePath(e,u())}exports.PROJECT_ROOT_CONTENT=s,exports.WORKSPACE_ROOT_CONTENT=o,exports.getProjectRoot=u,exports.getWorkspaceRoot=c,exports.isProjectRoot=d,exports.isWorkspaceRoot=l,exports.relativeToProjectRoot=p,exports.relativeToWorkspaceRoot=f;
@@ -1,2 +1,48 @@
1
- import { a as isProjectRoot, c as relativeToWorkspaceRoot, i as getWorkspaceRoot, n as WORKSPACE_ROOT_CONTENT, o as isWorkspaceRoot, r as getProjectRoot, s as relativeToProjectRoot, t as PROJECT_ROOT_CONTENT } from "./get-workspace-root-eTfm1jII.cjs";
2
- export { PROJECT_ROOT_CONTENT, WORKSPACE_ROOT_CONTENT, getProjectRoot, getWorkspaceRoot, isProjectRoot, isWorkspaceRoot, relativeToProjectRoot, relativeToWorkspaceRoot };
1
+ //#region src/get-workspace-root.d.ts
2
+ declare const WORKSPACE_ROOT_CONTENT: string[];
3
+ declare const PROJECT_ROOT_CONTENT: string[];
4
+ /**
5
+ * Get the workspace root path
6
+ *
7
+ * @param dir - A directory to start the search from
8
+ * @returns The workspace root path
9
+ */
10
+ declare function getWorkspaceRoot(dir?: string): string;
11
+ /**
12
+ * Check if the given directory is the workspace root
13
+ *
14
+ * @param dir - A directory to check
15
+ * @returns True if the directory is the workspace root, false otherwise
16
+ */
17
+ declare function isWorkspaceRoot(dir?: string): boolean;
18
+ /**
19
+ * Get the project root path
20
+ *
21
+ * @param dir - A directory to start the search from
22
+ * @returns The project root path
23
+ */
24
+ declare function getProjectRoot(dir?: string): string;
25
+ /**
26
+ * Check if the given directory is the project root
27
+ *
28
+ * @param dir - A directory to check
29
+ * @returns True if the directory is the project root, false otherwise
30
+ */
31
+ declare function isProjectRoot(dir?: string): boolean;
32
+ /**
33
+ * Find the file path relative to the workspace root path.
34
+ *
35
+ * @param filePath - The file path to process
36
+ * @returns The file path relative to the workspace root
37
+ */
38
+ declare function relativeToWorkspaceRoot(filePath: string): string;
39
+ /**
40
+ * Find the file path relative to the project root path.
41
+ *
42
+ * @param filePath - The file path to process
43
+ * @returns The file path relative to the project root
44
+ */
45
+ declare function relativeToProjectRoot(filePath: string): string;
46
+ //#endregion
47
+ export { PROJECT_ROOT_CONTENT, WORKSPACE_ROOT_CONTENT, getProjectRoot, getWorkspaceRoot, isProjectRoot, isWorkspaceRoot, relativeToProjectRoot, relativeToWorkspaceRoot };
48
+ //# sourceMappingURL=get-workspace-root.d.cts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"get-workspace-root.d.cts","names":[],"sources":["../src/get-workspace-root.ts"],"sourcesContent":[],"mappings":";cAwBa;AAAA,cAwDA,oBAFH,EAAA,MAAA,EAAA;AAEV;AAmBA;AAoCA;AAeA;AAgBA;AAeA;AAUgB,iBA5FA,gBAAA,CA4FqB,GAAA,CAAA,EAAA,MAAA,CAAA,EAAA,MAAA;;;;;;;iBAxDrB,eAAA;;;;;;;iBAeA,cAAA;;;;;;;iBAgBA,aAAA;;;;;;;iBAeA,uBAAA;;;;;;;iBAUA,qBAAA"}
@@ -1,2 +1,48 @@
1
- import { a as isProjectRoot, c as relativeToWorkspaceRoot, i as getWorkspaceRoot, n as WORKSPACE_ROOT_CONTENT, o as isWorkspaceRoot, r as getProjectRoot, s as relativeToProjectRoot, t as PROJECT_ROOT_CONTENT } from "./get-workspace-root-DQBvBd8X.mjs";
2
- export { PROJECT_ROOT_CONTENT, WORKSPACE_ROOT_CONTENT, getProjectRoot, getWorkspaceRoot, isProjectRoot, isWorkspaceRoot, relativeToProjectRoot, relativeToWorkspaceRoot };
1
+ //#region src/get-workspace-root.d.ts
2
+ declare const WORKSPACE_ROOT_CONTENT: string[];
3
+ declare const PROJECT_ROOT_CONTENT: string[];
4
+ /**
5
+ * Get the workspace root path
6
+ *
7
+ * @param dir - A directory to start the search from
8
+ * @returns The workspace root path
9
+ */
10
+ declare function getWorkspaceRoot(dir?: string): string;
11
+ /**
12
+ * Check if the given directory is the workspace root
13
+ *
14
+ * @param dir - A directory to check
15
+ * @returns True if the directory is the workspace root, false otherwise
16
+ */
17
+ declare function isWorkspaceRoot(dir?: string): boolean;
18
+ /**
19
+ * Get the project root path
20
+ *
21
+ * @param dir - A directory to start the search from
22
+ * @returns The project root path
23
+ */
24
+ declare function getProjectRoot(dir?: string): string;
25
+ /**
26
+ * Check if the given directory is the project root
27
+ *
28
+ * @param dir - A directory to check
29
+ * @returns True if the directory is the project root, false otherwise
30
+ */
31
+ declare function isProjectRoot(dir?: string): boolean;
32
+ /**
33
+ * Find the file path relative to the workspace root path.
34
+ *
35
+ * @param filePath - The file path to process
36
+ * @returns The file path relative to the workspace root
37
+ */
38
+ declare function relativeToWorkspaceRoot(filePath: string): string;
39
+ /**
40
+ * Find the file path relative to the project root path.
41
+ *
42
+ * @param filePath - The file path to process
43
+ * @returns The file path relative to the project root
44
+ */
45
+ declare function relativeToProjectRoot(filePath: string): string;
46
+ //#endregion
47
+ export { PROJECT_ROOT_CONTENT, WORKSPACE_ROOT_CONTENT, getProjectRoot, getWorkspaceRoot, isProjectRoot, isWorkspaceRoot, relativeToProjectRoot, relativeToWorkspaceRoot };
48
+ //# sourceMappingURL=get-workspace-root.d.mts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"get-workspace-root.d.mts","names":[],"sources":["../src/get-workspace-root.ts"],"sourcesContent":[],"mappings":";cAwBa;AAAA,cAwDA,oBAFH,EAAA,MAAA,EAAA;AAEV;AAmBA;AAoCA;AAeA;AAgBA;AAeA;AAUgB,iBA5FA,gBAAA,CA4FqB,GAAA,CAAA,EAAA,MAAA,CAAA,EAAA,MAAA;;;;;;;iBAxDrB,eAAA;;;;;;;iBAeA,cAAA;;;;;;;iBAgBA,aAAA;;;;;;;iBAeA,uBAAA;;;;;;;iBAUA,qBAAA"}
@@ -1 +1,2 @@
1
- import{a as e,c as t,i as n,n as r,o as i,r as a,s as o,t as s}from"./get-workspace-root-k66w-wLW.mjs";export{s as PROJECT_ROOT_CONTENT,r as WORKSPACE_ROOT_CONTENT,a as getProjectRoot,n as getWorkspaceRoot,e as isProjectRoot,i as isWorkspaceRoot,o as relativeToProjectRoot,t as relativeToWorkspaceRoot};
1
+ import{cwd as e}from"./path/src/cwd.mjs";import{relativePath as t}from"./path/src/file-path-fns.mjs";import{isSystemRoot as n}from"./path/src/is-root-dir.mjs";import{getParentPath as r}from"./get-parent-path.mjs";import{findWorkspaceRootSafe as i}from"@storm-software/config-tools";const a=`.all-contributorsrc,.commitlintrc,.github,.git,.husky,.huskyrc,.lintstagedrc,.log4brains.yml,.npmrc,.nx,.storm-workspace.js,.storm-workspace.json,.storm-workspace.ts,.storm-workspace.yaml,.storm-workspace.yml,.vscode,.whitesource,bun.lock,bun.lockb,lefthook.yaml,lefthook.yml,lerna.json,npm-lock.json,npm-lock.yaml,npm-lock.yml,npm-workspace.json,npm-workspace.yaml,npm-workspace.yml,nx.json,package-lock.json,patches,pnpm-lock.json,pnpm-lock.yaml,pnpm-lock.yml,pnpm-workspace.json,pnpm-workspace.yaml,pnpm-workspace.yml,socket.yaml,storm-workspace.js,storm-workspace.json,storm-workspace.ts,storm-workspace.yaml,storm-workspace.yml,syncpack.config.js,syncpack.json,turbo.json,yarn-lock.json,yarn-lock.yaml,yarn-lock.yml,yarn-workspace.json,yarn-workspace.yaml,yarn-workspace.yml,yarn.lock`.split(`,`),o=[`.powerlines`,`.storm`,`package.json`,`powerlines.json`,`powerlines.yaml`,`powerlines.yml`,`powerlines.toml`,`powerlines.config.js`,`powerlines.config.ts`,`project.json`];function s(t=e()){if(process.env.STORM_WORKSPACE_ROOT||process.env.NX_WORKSPACE_ROOT_PATH)return process.env.STORM_WORKSPACE_ROOT||process.env.NX_WORKSPACE_ROOT_PATH;let o=i(t);if(o)return o;let s=r(a,t);if(s)return s;for(s=t;s&&!n(s);)if(s=r(`storm-workspace.json`,s,{skipCwd:!0,includeNameInResults:!1}),s)return s;return t}function c(t=e()){let n=s(t);return n?n===t:!1}function l(t=e()){return r(o,t)||t}function u(t=e()){let n=l(t);return n?n===t:!1}function d(e){return t(e,s())}function f(e){return t(e,l())}export{o as PROJECT_ROOT_CONTENT,a as WORKSPACE_ROOT_CONTENT,l as getProjectRoot,s as getWorkspaceRoot,u as isProjectRoot,c as isWorkspaceRoot,f as relativeToProjectRoot,d as relativeToWorkspaceRoot};
2
+ //# sourceMappingURL=get-workspace-root.mjs.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"get-workspace-root.mjs","names":["WORKSPACE_ROOT_CONTENT: string[]","PROJECT_ROOT_CONTENT: string[]"],"sources":["../src/get-workspace-root.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 { findWorkspaceRootSafe } from \"@storm-software/config-tools\";\nimport { cwd } from \"@stryke/path/cwd\";\nimport { relativePath } from \"@stryke/path/file-path-fns\";\nimport { isSystemRoot } from \"@stryke/path/is-root-dir\";\nimport { getParentPath } from \"./get-parent-path\";\n\nexport const WORKSPACE_ROOT_CONTENT: string[] = [\n \".all-contributorsrc\",\n \".commitlintrc\",\n \".github\",\n \".git\",\n \".husky\",\n \".huskyrc\",\n \".lintstagedrc\",\n \".log4brains.yml\",\n \".npmrc\",\n \".nx\",\n \".storm-workspace.js\",\n \".storm-workspace.json\",\n \".storm-workspace.ts\",\n \".storm-workspace.yaml\",\n \".storm-workspace.yml\",\n \".vscode\",\n \".whitesource\",\n \"bun.lock\",\n \"bun.lockb\",\n \"lefthook.yaml\",\n \"lefthook.yml\",\n \"lerna.json\",\n \"npm-lock.json\",\n \"npm-lock.yaml\",\n \"npm-lock.yml\",\n \"npm-workspace.json\",\n \"npm-workspace.yaml\",\n \"npm-workspace.yml\",\n \"nx.json\",\n \"package-lock.json\",\n \"patches\",\n \"pnpm-lock.json\",\n \"pnpm-lock.yaml\",\n \"pnpm-lock.yml\",\n \"pnpm-workspace.json\",\n \"pnpm-workspace.yaml\",\n \"pnpm-workspace.yml\",\n \"socket.yaml\",\n \"storm-workspace.js\",\n \"storm-workspace.json\",\n \"storm-workspace.ts\",\n \"storm-workspace.yaml\",\n \"storm-workspace.yml\",\n \"syncpack.config.js\",\n \"syncpack.json\",\n \"turbo.json\",\n \"yarn-lock.json\",\n \"yarn-lock.yaml\",\n \"yarn-lock.yml\",\n \"yarn-workspace.json\",\n \"yarn-workspace.yaml\",\n \"yarn-workspace.yml\",\n \"yarn.lock\"\n] as const;\n\nexport const PROJECT_ROOT_CONTENT: string[] = [\n \".powerlines\",\n \".storm\",\n \"package.json\",\n \"powerlines.json\",\n \"powerlines.yaml\",\n \"powerlines.yml\",\n \"powerlines.toml\",\n \"powerlines.config.js\",\n \"powerlines.config.ts\",\n \"project.json\"\n] as const;\n\n/**\n * Get the workspace root path\n *\n * @param dir - A directory to start the search from\n * @returns The workspace root path\n */\nexport function getWorkspaceRoot(dir = cwd()) {\n if (process.env.STORM_WORKSPACE_ROOT || process.env.NX_WORKSPACE_ROOT_PATH) {\n return (process.env.STORM_WORKSPACE_ROOT ||\n process.env.NX_WORKSPACE_ROOT_PATH)!;\n }\n\n const root = findWorkspaceRootSafe(dir);\n if (root) {\n return root;\n }\n\n let result = getParentPath(WORKSPACE_ROOT_CONTENT, dir);\n if (result) {\n return result;\n }\n\n result = dir;\n while (result && !isSystemRoot(result)) {\n result = getParentPath(\"storm-workspace.json\", result, {\n skipCwd: true,\n includeNameInResults: false\n });\n if (result) {\n return result;\n }\n }\n\n return dir;\n}\n\n/**\n * Check if the given directory is the workspace root\n *\n * @param dir - A directory to check\n * @returns True if the directory is the workspace root, false otherwise\n */\nexport function isWorkspaceRoot(dir = cwd()): boolean {\n const workspaceRoot = getWorkspaceRoot(dir);\n if (workspaceRoot) {\n return workspaceRoot === dir;\n }\n\n return false;\n}\n\n/**\n * Get the project root path\n *\n * @param dir - A directory to start the search from\n * @returns The project root path\n */\nexport function getProjectRoot(dir = cwd()) {\n const result = getParentPath(PROJECT_ROOT_CONTENT, dir);\n\n if (result) {\n return result;\n }\n\n return dir;\n}\n\n/**\n * Check if the given directory is the project root\n *\n * @param dir - A directory to check\n * @returns True if the directory is the project root, false otherwise\n */\nexport function isProjectRoot(dir = cwd()): boolean {\n const projectRoot = getProjectRoot(dir);\n if (projectRoot) {\n return projectRoot === dir;\n }\n\n return false;\n}\n\n/**\n * Find the file path relative to the workspace root path.\n *\n * @param filePath - The file path to process\n * @returns The file path relative to the workspace root\n */\nexport function relativeToWorkspaceRoot(filePath: string) {\n return relativePath(filePath, getWorkspaceRoot());\n}\n\n/**\n * Find the file path relative to the project root path.\n *\n * @param filePath - The file path to process\n * @returns The file path relative to the project root\n */\nexport function relativeToProjectRoot(filePath: string) {\n return relativePath(filePath, getProjectRoot());\n}\n"],"mappings":"0RAwBA,MAAaA,EAAmC,kyBAsD/C,CAEYC,EAAiC,CAC5C,cACA,SACA,eACA,kBACA,kBACA,iBACA,kBACA,uBACA,uBACA,eACD,CAQD,SAAgB,EAAiB,EAAM,GAAK,CAAE,CAC5C,GAAI,QAAQ,IAAI,sBAAwB,QAAQ,IAAI,uBAClD,OAAQ,QAAQ,IAAI,sBAClB,QAAQ,IAAI,uBAGhB,IAAM,EAAO,EAAsB,EAAI,CACvC,GAAI,EACF,OAAO,EAGT,IAAI,EAAS,EAAc,EAAwB,EAAI,CACvD,GAAI,EACF,OAAO,EAIT,IADA,EAAS,EACF,GAAU,CAAC,EAAa,EAAO,EAKpC,GAJA,EAAS,EAAc,uBAAwB,EAAQ,CACrD,QAAS,GACT,qBAAsB,GACvB,CAAC,CACE,EACF,OAAO,EAIX,OAAO,EAST,SAAgB,EAAgB,EAAM,GAAK,CAAW,CACpD,IAAM,EAAgB,EAAiB,EAAI,CAK3C,OAJI,EACK,IAAkB,EAGpB,GAST,SAAgB,EAAe,EAAM,GAAK,CAAE,CAO1C,OANe,EAAc,EAAsB,EAAI,EAMhD,EAST,SAAgB,EAAc,EAAM,GAAK,CAAW,CAClD,IAAM,EAAc,EAAe,EAAI,CAKvC,OAJI,EACK,IAAgB,EAGlB,GAST,SAAgB,EAAwB,EAAkB,CACxD,OAAO,EAAa,EAAU,GAAkB,CAAC,CASnD,SAAgB,EAAsB,EAAkB,CACtD,OAAO,EAAa,EAAU,GAAgB,CAAC"}
@@ -0,0 +1 @@
1
+ const e=e=>[...new Set(e)];exports.getUnique=e;
@@ -0,0 +1,2 @@
1
+ const e=e=>[...new Set(e)];export{e as getUnique};
2
+ //# sourceMappingURL=get-unique.mjs.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"get-unique.mjs","names":[],"sources":["../../../../helpers/src/get-unique.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\n/**\n * Returns an array of unique values from the given array.\n *\n * @param arr - The array to get unique values from.\n * @returns An array of unique values.\n */\nexport const getUnique = <T = any>(arr: T[]): T[] => {\n return [...new Set(arr)];\n};\n\n/**\n * Returns a new array containing only the unique elements from the original array,\n * based on the values returned by the mapper function.\n *\n * @example\n * ```ts\n * uniqBy([1.2, 1.5, 2.1, 3.2, 5.7, 5.3, 7.19], Math.floor);\n * // [1.2, 2.1, 3.2, 5.7, 7.19]\n * ```\n *\n * @param arr - The array to process.\n * @param mapper - The function used to convert the array elements.\n * @returns A new array containing only the unique elements from the original array, based on the values returned by the mapper function.\n */\nexport function getUniqueBy<T, U>(\n arr: readonly T[],\n mapper: (item: T) => U = item => item as unknown as U\n): T[] {\n const map = new Map<U, T>();\n\n for (const item of arr) {\n const key = mapper(item);\n\n if (!map.has(key)) {\n map.set(key, item);\n }\n }\n\n return [...map.values()];\n}\n"],"mappings":"AAwBA,MAAa,EAAsB,GAC1B,CAAC,GAAG,IAAI,IAAI,EAAI,CAAC"}
package/dist/helpers.cjs CHANGED
@@ -1 +1 @@
1
- const e=require(`./helpers-_MJ6PR-g.cjs`);exports.createDirectory=e.t,exports.createDirectorySync=e.n,exports.extractFileFromTar=e.r,exports.extractFileFromTarGzip=e.i,exports.removeDirectory=e.a,exports.removeDirectorySync=e.o;
1
+ const e=require(`./_virtual/rolldown_runtime.cjs`),t=require(`./exists.cjs`);let n=require(`node:fs`),r=require(`node:fs/promises`),i=require(`nanotar`);function a(e){if(!t.existsSync(e))return(0,n.mkdirSync)(e,{recursive:!0})}async function o(e){if(!await t.exists(e))return(0,r.mkdir)(e,{recursive:!0})}function s(e){if(t.existsSync(e))return(0,n.rmSync)(e,{recursive:!0})}async function c(e){if(t.existsSync(e))return(0,r.rm)(e,{recursive:!0})}async function l(e,a,o){let s=(0,i.parseTar)(await(0,r.readFile)(e)).find(e=>e.name===a);s?.data&&(await t.exists(o)||await(0,r.mkdir)(o,{recursive:!0}),(0,n.createWriteStream)(o).write(s.data))}async function u(e,a,o){let s=(await(0,i.parseTarGzip)(await(0,r.readFile)(e))).find(e=>e.name===a);s?.data&&(await t.exists(o)||await(0,r.mkdir)(o,{recursive:!0}),(0,n.createWriteStream)(o).write(s.data))}exports.createDirectory=o,exports.createDirectorySync=a,exports.extractFileFromTar=l,exports.extractFileFromTarGzip=u,exports.removeDirectory=c,exports.removeDirectorySync=s;
@@ -1,2 +1,50 @@
1
- import { a as removeDirectory, i as extractFileFromTarGzip, n as createDirectorySync, o as removeDirectorySync, r as extractFileFromTar, t as createDirectory } from "./helpers-CgMOExPa.cjs";
2
- export { createDirectory, createDirectorySync, extractFileFromTar, extractFileFromTarGzip, removeDirectory, removeDirectorySync };
1
+ //#region src/helpers.d.ts
2
+ /**
3
+ * Create a directory if it does not exist.
4
+ *
5
+ * @param path - The directory path to check
6
+ * @returns An indicator specifying if the directory exists
7
+ */
8
+ declare function createDirectorySync(path: string): string | undefined;
9
+ /**
10
+ * Create a directory if it does not exist.
11
+ *
12
+ * @param path - The directory path to check
13
+ * @returns An indicator specifying if the directory exists
14
+ */
15
+ declare function createDirectory(path: string): Promise<string | undefined>;
16
+ /**
17
+ * Remove a directory if it exists.
18
+ *
19
+ * @param path - The directory path to check
20
+ * @returns An indicator specifying if the directory exists
21
+ */
22
+ declare function removeDirectorySync(path: string): void;
23
+ /**
24
+ * Remove a directory if it exists.
25
+ *
26
+ * @param path - The directory path to check
27
+ * @returns An indicator specifying if the directory exists
28
+ */
29
+ declare function removeDirectory(path: string): Promise<void>;
30
+ /**
31
+ * Extracts a file from a given tarball to the specified destination.
32
+ *
33
+ * @param tarballPath - The path to the tarball from where the file should be extracted.
34
+ * @param file - The path to the file inside the tarball.
35
+ * @param destinationFilePath - The destination file path.
36
+ * @returns True if the file was extracted successfully, false otherwise.
37
+ */
38
+ declare function extractFileFromTar(tarballPath: string, file: string, destinationFilePath: string): Promise<void>;
39
+ /**
40
+ * Extracts a file from a given TarGzip to the specified destination.
41
+ *
42
+ * @param tarballPath - The path to the tarball from where the file should be extracted.
43
+ * @param file - The path to the file inside the tarball.
44
+ * @param destinationFilePath - The destination file path.
45
+ * @returns True if the file was extracted successfully, false otherwise.
46
+ */
47
+ declare function extractFileFromTarGzip(tarballPath: string, file: string, destinationFilePath: string): Promise<void>;
48
+ //#endregion
49
+ export { createDirectory, createDirectorySync, extractFileFromTar, extractFileFromTarGzip, removeDirectory, removeDirectorySync };
50
+ //# sourceMappingURL=helpers.d.cts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"helpers.d.cts","names":[],"sources":["../src/helpers.ts"],"sourcesContent":[],"mappings":";;AA6BA;AAcA;AAcA;AAcA;AAgBA;AA4BsB,iBAtFN,mBAAA,CAyFa,IAAA,EAAA,MAAA,CAAA,EAAA,MAAA,GAAA,SAAA;;;;;;;iBA3EP,eAAA,gBAA4B;;;;;;;iBAclC,mBAAA;;;;;;;iBAcM,eAAA,gBAA4B;;;;;;;;;iBAgB5B,kBAAA,kEAGO;;;;;;;;;iBAyBP,sBAAA,kEAGO"}
@@ -1,2 +1,50 @@
1
- import { a as removeDirectory, i as extractFileFromTarGzip, n as createDirectorySync, o as removeDirectorySync, r as extractFileFromTar, t as createDirectory } from "./helpers-CYWFZ-Uv.mjs";
2
- export { createDirectory, createDirectorySync, extractFileFromTar, extractFileFromTarGzip, removeDirectory, removeDirectorySync };
1
+ //#region src/helpers.d.ts
2
+ /**
3
+ * Create a directory if it does not exist.
4
+ *
5
+ * @param path - The directory path to check
6
+ * @returns An indicator specifying if the directory exists
7
+ */
8
+ declare function createDirectorySync(path: string): string | undefined;
9
+ /**
10
+ * Create a directory if it does not exist.
11
+ *
12
+ * @param path - The directory path to check
13
+ * @returns An indicator specifying if the directory exists
14
+ */
15
+ declare function createDirectory(path: string): Promise<string | undefined>;
16
+ /**
17
+ * Remove a directory if it exists.
18
+ *
19
+ * @param path - The directory path to check
20
+ * @returns An indicator specifying if the directory exists
21
+ */
22
+ declare function removeDirectorySync(path: string): void;
23
+ /**
24
+ * Remove a directory if it exists.
25
+ *
26
+ * @param path - The directory path to check
27
+ * @returns An indicator specifying if the directory exists
28
+ */
29
+ declare function removeDirectory(path: string): Promise<void>;
30
+ /**
31
+ * Extracts a file from a given tarball to the specified destination.
32
+ *
33
+ * @param tarballPath - The path to the tarball from where the file should be extracted.
34
+ * @param file - The path to the file inside the tarball.
35
+ * @param destinationFilePath - The destination file path.
36
+ * @returns True if the file was extracted successfully, false otherwise.
37
+ */
38
+ declare function extractFileFromTar(tarballPath: string, file: string, destinationFilePath: string): Promise<void>;
39
+ /**
40
+ * Extracts a file from a given TarGzip to the specified destination.
41
+ *
42
+ * @param tarballPath - The path to the tarball from where the file should be extracted.
43
+ * @param file - The path to the file inside the tarball.
44
+ * @param destinationFilePath - The destination file path.
45
+ * @returns True if the file was extracted successfully, false otherwise.
46
+ */
47
+ declare function extractFileFromTarGzip(tarballPath: string, file: string, destinationFilePath: string): Promise<void>;
48
+ //#endregion
49
+ export { createDirectory, createDirectorySync, extractFileFromTar, extractFileFromTarGzip, removeDirectory, removeDirectorySync };
50
+ //# sourceMappingURL=helpers.d.mts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"helpers.d.mts","names":[],"sources":["../src/helpers.ts"],"sourcesContent":[],"mappings":";;AA6BA;AAcA;AAcA;AAcA;AAgBA;AA4BsB,iBAtFN,mBAAA,CAyFa,IAAA,EAAA,MAAA,CAAA,EAAA,MAAA,GAAA,SAAA;;;;;;;iBA3EP,eAAA,gBAA4B;;;;;;;iBAclC,mBAAA;;;;;;;iBAcM,eAAA,gBAA4B;;;;;;;;;iBAgB5B,kBAAA,kEAGO;;;;;;;;;iBAyBP,sBAAA,kEAGO"}
package/dist/helpers.mjs CHANGED
@@ -1 +1,2 @@
1
- import{a as e,i as t,n,o as r,r as i,t as a}from"./helpers-BSEQb1fp.mjs";export{a as createDirectory,n as createDirectorySync,i as extractFileFromTar,t as extractFileFromTarGzip,e as removeDirectory,r as removeDirectorySync};
1
+ import{exists as e,existsSync as t}from"./exists.mjs";import{createWriteStream as n,mkdirSync as r,rmSync as i}from"node:fs";import{mkdir as a,readFile as o,rm as s}from"node:fs/promises";import{parseTar as c,parseTarGzip as l}from"nanotar";function u(e){if(!t(e))return r(e,{recursive:!0})}async function d(t){if(!await e(t))return a(t,{recursive:!0})}function f(e){if(t(e))return i(e,{recursive:!0})}async function p(e){if(t(e))return s(e,{recursive:!0})}async function m(t,r,i){let s=c(await o(t)).find(e=>e.name===r);s?.data&&(await e(i)||await a(i,{recursive:!0}),n(i).write(s.data))}async function h(t,r,i){let s=(await l(await o(t))).find(e=>e.name===r);s?.data&&(await e(i)||await a(i,{recursive:!0}),n(i).write(s.data))}export{d as createDirectory,u as createDirectorySync,m as extractFileFromTar,h as extractFileFromTarGzip,p as removeDirectory,f as removeDirectorySync};
2
+ //# sourceMappingURL=helpers.mjs.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"helpers.mjs","names":["existsSync"],"sources":["../src/helpers.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 { parseTar, parseTarGzip } from \"nanotar\";\nimport { createWriteStream, mkdirSync, rmSync } from \"node:fs\";\nimport { mkdir, readFile, rm } from \"node:fs/promises\";\nimport { exists, existsSync } from \"./exists\";\n\n/**\n * Create a directory if it does not exist.\n *\n * @param path - The directory path to check\n * @returns An indicator specifying if the directory exists\n */\nexport function createDirectorySync(path: string) {\n if (existsSync(path)) {\n return;\n }\n\n return mkdirSync(path, { recursive: true });\n}\n\n/**\n * Create a directory if it does not exist.\n *\n * @param path - The directory path to check\n * @returns An indicator specifying if the directory exists\n */\nexport async function createDirectory(path: string) {\n if (await exists(path)) {\n return;\n }\n\n return mkdir(path, { recursive: true });\n}\n\n/**\n * Remove a directory if it exists.\n *\n * @param path - The directory path to check\n * @returns An indicator specifying if the directory exists\n */\nexport function removeDirectorySync(path: string) {\n if (!existsSync(path)) {\n return;\n }\n\n return rmSync(path, { recursive: true });\n}\n\n/**\n * Remove a directory if it exists.\n *\n * @param path - The directory path to check\n * @returns An indicator specifying if the directory exists\n */\nexport async function removeDirectory(path: string) {\n if (!existsSync(path)) {\n return;\n }\n\n return rm(path, { recursive: true });\n}\n\n/**\n * Extracts a file from a given tarball to the specified destination.\n *\n * @param tarballPath - The path to the tarball from where the file should be extracted.\n * @param file - The path to the file inside the tarball.\n * @param destinationFilePath - The destination file path.\n * @returns True if the file was extracted successfully, false otherwise.\n */\nexport async function extractFileFromTar(\n tarballPath: string,\n file: string,\n destinationFilePath: string\n) {\n const result = parseTar(await readFile(tarballPath));\n\n const entry = result.find(e => e.name === file);\n if (!entry?.data) {\n return;\n }\n\n if (!(await exists(destinationFilePath))) {\n await mkdir(destinationFilePath, { recursive: true });\n }\n\n const stream = createWriteStream(destinationFilePath);\n stream.write(entry.data);\n}\n\n/**\n * Extracts a file from a given TarGzip to the specified destination.\n *\n * @param tarballPath - The path to the tarball from where the file should be extracted.\n * @param file - The path to the file inside the tarball.\n * @param destinationFilePath - The destination file path.\n * @returns True if the file was extracted successfully, false otherwise.\n */\nexport async function extractFileFromTarGzip(\n tarballPath: string,\n file: string,\n destinationFilePath: string\n) {\n const result = await parseTarGzip(await readFile(tarballPath));\n\n const entry = result.find(e => e.name === file);\n if (!entry?.data) {\n return;\n }\n\n if (!(await exists(destinationFilePath))) {\n await mkdir(destinationFilePath, { recursive: true });\n }\n\n const stream = createWriteStream(destinationFilePath);\n stream.write(entry.data);\n}\n"],"mappings":"iPA6BA,SAAgB,EAAoB,EAAc,CAC5CA,MAAW,EAAK,CAIpB,OAAO,EAAU,EAAM,CAAE,UAAW,GAAM,CAAC,CAS7C,eAAsB,EAAgB,EAAc,CAC9C,UAAM,EAAO,EAAK,CAItB,OAAO,EAAM,EAAM,CAAE,UAAW,GAAM,CAAC,CASzC,SAAgB,EAAoB,EAAc,CAC3CA,KAAW,EAAK,CAIrB,OAAO,EAAO,EAAM,CAAE,UAAW,GAAM,CAAC,CAS1C,eAAsB,EAAgB,EAAc,CAC7CA,KAAW,EAAK,CAIrB,OAAO,EAAG,EAAM,CAAE,UAAW,GAAM,CAAC,CAWtC,eAAsB,EACpB,EACA,EACA,EACA,CAGA,IAAM,EAFS,EAAS,MAAM,EAAS,EAAY,CAAC,CAE/B,KAAK,GAAK,EAAE,OAAS,EAAK,CAC1C,GAAO,OAIN,MAAM,EAAO,EAAoB,EACrC,MAAM,EAAM,EAAqB,CAAE,UAAW,GAAM,CAAC,CAGxC,EAAkB,EAAoB,CAC9C,MAAM,EAAM,KAAK,EAW1B,eAAsB,EACpB,EACA,EACA,EACA,CAGA,IAAM,GAFS,MAAM,EAAa,MAAM,EAAS,EAAY,CAAC,EAEzC,KAAK,GAAK,EAAE,OAAS,EAAK,CAC1C,GAAO,OAIN,MAAM,EAAO,EAAoB,EACrC,MAAM,EAAM,EAAqB,CAAE,UAAW,GAAM,CAAC,CAGxC,EAAkB,EAAoB,CAC9C,MAAM,EAAM,KAAK"}
package/dist/index.cjs CHANGED
@@ -1 +1 @@
1
- const e=require(`./get-workspace-root-CCNjjZGY.cjs`),t=require(`./copy-file-Y1ilzocZ.cjs`),n=require(`./exists-B31lSRFp.cjs`),r=require(`./helpers-_MJ6PR-g.cjs`),i=require(`./buffer-Ch164vki.cjs`),a=require(`./chmod-x-FOy3sak8.cjs`),o=require(`./command-exists-D1bV-wSk.cjs`),s=require(`./compress-BjGbQqs_.cjs`),c=require(`./is-file-BkFQev3M.cjs`),l=require(`./list-files-Cn_UVruo.cjs`),u=require(`./read-file-BB2WzW-N.cjs`),d=require(`./write-file-CqokudVp.cjs`);require(`./constants.cjs`);const f=require(`./get-parent-path-CfRkaB4R.cjs`),p=require(`./resolve-DTkLQekH.cjs`),m=require(`./install-CZ_S7NHm.cjs`),h=require(`./json-DKhqPjHB.cjs`),g=require(`./package-fns-YTCdMAXr.cjs`),_=require(`./registry-BYwvM92u.cjs`),v=require(`./remove-file-XHFKELQN.cjs`),y=require(`./semver-fns-Btrm1dIF.cjs`),b=require(`./toml-DgVyNp_y.cjs`),x=require(`./tsconfig-B6WtgD1c.cjs`),S=require(`./yaml-q2k-BjIM.cjs`);exports.DEFAULT_EXTENSIONS=p.t,exports.PROJECT_ROOT_CONTENT=e.t,exports.WORKSPACE_ROOT_CONTENT=e.n,exports.chmodX=a.t,exports.chmodXSync=a.n,exports.coerceVersion=y.t,exports.commandExists=o.t,exports.commandExistsSync=o.n,exports.compressDirectory=s.t,exports.copyFile=t.t,exports.copyFileSync=t.n,exports.copyFiles=t.r,exports.copyFilesSync=t.i,exports.createDirectory=r.t,exports.createDirectorySync=r.n,exports.deriveNewSemverVersion=y.n,exports.doesPackageMatch=g.t,exports.exists=n.t,exports.existsSync=n.n,exports.extractFileFromTar=r.r,exports.extractFileFromTarGzip=r.i,exports.formatNodeOptions=_.t,exports.getFormattedNodeOptionsWithoutInspect=_.n,exports.getNodeModulesPaths=p.n,exports.getPackageInfo=g.n,exports.getPackageListing=g.r,exports.getPackageManager=g.i,exports.getParentPath=f.t,exports.getParsedNodeOptionsWithoutInspect=_.r,exports.getProjectRoot=e.r,exports.getRegistry=_.i,exports.getResolutionCombinations=p.r,exports.getResolutionPaths=p.i,exports.getWorkspaceRoot=e.i,exports.importModule=p.a,exports.install=m.t,exports.isDirectory=c.t,exports.isDirectorySymlink=c.n,exports.isExecutable=a.r,exports.isExecutableSync=a.i,exports.isFile=c.r,exports.isFileSymlink=c.i,exports.isPackageExists=g.a,exports.isPackageListed=g.o,exports.isProjectRoot=e.a,exports.isRange=y.r,exports.isRelativeVersionKeyword=y.i,exports.isSemver=y.a,exports.isValidRange=y.o,exports.isValidSemver=y.s,exports.isValidVersion=y.c,exports.isWorkspaceRoot=e.o,exports.isWritable=a.a,exports.isWritableSync=a.o,exports.list=l.t,exports.listDirectories=l.n,exports.listDirectoriesSync=l.r,exports.listFiles=l.i,exports.listFilesSync=l.a,exports.listSync=l.o,exports.loadPackageJson=g.s,exports.loadTsConfig=x.t,exports.packageExists=m.n,exports.parseVersion=y.l,exports.readFile=u.t,exports.readFileBuffer=i.t,exports.readFileBufferSync=i.n,exports.readFileIfExisting=u.n,exports.readFileIfExistingSync=u.r,exports.readFileSync=u.i,exports.readJsonFile=h.t,exports.readJsonFileSync=h.n,exports.readTomlFile=b.t,exports.readTomlFileSync=b.n,exports.readYamlFile=S.t,exports.readYamlFileSync=S.n,exports.relativeToProjectRoot=e.s,exports.relativeToWorkspaceRoot=e.c,exports.removeDirectory=r.a,exports.removeDirectorySync=r.o,exports.removeFile=v.t,exports.removeFileSync=v.n,exports.resolve=p.o,exports.resolvePackage=p.s,exports.resolvePackageSync=p.c,exports.resolveSafe=p.l,exports.resolveSafeSync=p.u,exports.resolveSync=p.d,exports.satisfiesVersion=y.u,exports.tokenizeArgs=_.a,exports.writeFile=d.t,exports.writeFileBuffer=i.r,exports.writeFileBufferSync=i.i,exports.writeFileSync=d.n,exports.writeJsonFile=h.r,exports.writeJsonFileSync=h.i,exports.writeTomlFile=b.r,exports.writeTomlFileSync=b.i;
1
+ const e=require(`./exists.cjs`),t=require(`./helpers.cjs`),n=require(`./buffer.cjs`),r=require(`./chmod-x.cjs`),i=require(`./command-exists.cjs`),a=require(`./is-file.cjs`),o=require(`./list-files.cjs`),s=require(`./read-file.cjs`),c=require(`./write-file.cjs`),l=require(`./compress.cjs`),u=require(`./copy-file.cjs`),d=require(`./get-parent-path.cjs`),f=require(`./get-workspace-root.cjs`),p=require(`./resolve.cjs`),m=require(`./install.cjs`),h=require(`./json.cjs`),g=require(`./package-fns.cjs`),_=require(`./registry.cjs`),v=require(`./remove-file.cjs`),y=require(`./semver-fns.cjs`),b=require(`./toml.cjs`),x=require(`./tsconfig.cjs`),S=require(`./yaml.cjs`);exports.DEFAULT_EXTENSIONS=p.DEFAULT_EXTENSIONS,exports.PROJECT_ROOT_CONTENT=f.PROJECT_ROOT_CONTENT,exports.WORKSPACE_ROOT_CONTENT=f.WORKSPACE_ROOT_CONTENT,exports.chmodX=r.chmodX,exports.chmodXSync=r.chmodXSync,exports.coerceVersion=y.coerceVersion,exports.commandExists=i.commandExists,exports.commandExistsSync=i.commandExistsSync,exports.compressDirectory=l.compressDirectory,exports.copyFile=u.copyFile,exports.copyFileSync=u.copyFileSync,exports.copyFiles=u.copyFiles,exports.copyFilesSync=u.copyFilesSync,exports.createDirectory=t.createDirectory,exports.createDirectorySync=t.createDirectorySync,exports.deriveNewSemverVersion=y.deriveNewSemverVersion,exports.doesPackageMatch=g.doesPackageMatch,exports.exists=e.exists,exports.existsSync=e.existsSync,exports.extractFileFromTar=t.extractFileFromTar,exports.extractFileFromTarGzip=t.extractFileFromTarGzip,exports.formatNodeOptions=_.formatNodeOptions,exports.getFormattedNodeOptionsWithoutInspect=_.getFormattedNodeOptionsWithoutInspect,exports.getNodeModulesPaths=p.getNodeModulesPaths,exports.getPackageInfo=g.getPackageInfo,exports.getPackageListing=g.getPackageListing,exports.getPackageManager=g.getPackageManager,exports.getParentPath=d.getParentPath,exports.getParsedNodeOptionsWithoutInspect=_.getParsedNodeOptionsWithoutInspect,exports.getProjectRoot=f.getProjectRoot,exports.getRegistry=_.getRegistry,exports.getResolutionCombinations=p.getResolutionCombinations,exports.getResolutionPaths=p.getResolutionPaths,exports.getWorkspaceRoot=f.getWorkspaceRoot,exports.importModule=p.importModule,exports.install=m.install,exports.isDirectory=a.isDirectory,exports.isDirectorySymlink=a.isDirectorySymlink,exports.isExecutable=r.isExecutable,exports.isExecutableSync=r.isExecutableSync,exports.isFile=a.isFile,exports.isFileSymlink=a.isFileSymlink,exports.isPackageExists=g.isPackageExists,exports.isPackageListed=g.isPackageListed,exports.isProjectRoot=f.isProjectRoot,exports.isRange=y.isRange,exports.isRelativeVersionKeyword=y.isRelativeVersionKeyword,exports.isSemver=y.isSemver,exports.isValidRange=y.isValidRange,exports.isValidSemver=y.isValidSemver,exports.isValidVersion=y.isValidVersion,exports.isWorkspaceRoot=f.isWorkspaceRoot,exports.isWritable=r.isWritable,exports.isWritableSync=r.isWritableSync,exports.list=o.list,exports.listDirectories=o.listDirectories,exports.listDirectoriesSync=o.listDirectoriesSync,exports.listFiles=o.listFiles,exports.listFilesSync=o.listFilesSync,exports.listSync=o.listSync,exports.loadPackageJson=g.loadPackageJson,exports.loadTsConfig=x.loadTsConfig,exports.packageExists=m.packageExists,exports.parseVersion=y.parseVersion,exports.readFile=s.readFile,exports.readFileBuffer=n.readFileBuffer,exports.readFileBufferSync=n.readFileBufferSync,exports.readFileIfExisting=s.readFileIfExisting,exports.readFileIfExistingSync=s.readFileIfExistingSync,exports.readFileSync=s.readFileSync,exports.readJsonFile=h.readJsonFile,exports.readJsonFileSync=h.readJsonFileSync,exports.readTomlFile=b.readTomlFile,exports.readTomlFileSync=b.readTomlFileSync,exports.readYamlFile=S.readYamlFile,exports.readYamlFileSync=S.readYamlFileSync,exports.relativeToProjectRoot=f.relativeToProjectRoot,exports.relativeToWorkspaceRoot=f.relativeToWorkspaceRoot,exports.removeDirectory=t.removeDirectory,exports.removeDirectorySync=t.removeDirectorySync,exports.removeFile=v.removeFile,exports.removeFileSync=v.removeFileSync,exports.resolve=p.resolve,exports.resolvePackage=p.resolvePackage,exports.resolvePackageSync=p.resolvePackageSync,exports.resolveSafe=p.resolveSafe,exports.resolveSafeSync=p.resolveSafeSync,exports.resolveSync=p.resolveSync,exports.satisfiesVersion=y.satisfiesVersion,exports.tokenizeArgs=_.tokenizeArgs,exports.writeFile=c.writeFile,exports.writeFileBuffer=n.writeFileBuffer,exports.writeFileBufferSync=n.writeFileBufferSync,exports.writeFileSync=c.writeFileSync,exports.writeJsonFile=h.writeJsonFile,exports.writeJsonFileSync=h.writeJsonFileSync,exports.writeTomlFile=b.writeTomlFile,exports.writeTomlFileSync=b.writeTomlFileSync;
package/dist/index.d.cts CHANGED
@@ -1,25 +1,25 @@
1
- import { i as writeFileBufferSync, n as readFileBufferSync, r as writeFileBuffer, t as readFileBuffer } from "./buffer-DvCjrjQH.cjs";
2
- import { a as isWritable, i as isExecutableSync, n as chmodXSync, o as isWritableSync, r as isExecutable, t as chmodX } from "./chmod-x-BPr4tt2-.cjs";
3
- import { n as commandExistsSync, t as commandExists } from "./command-exists-CuieR7rx.cjs";
4
- import { n as compressDirectory, t as CompressDirectoryOptions } from "./compress-CQve2a6h.cjs";
5
- import { t as Encoding } from "./constants-D58o2CiO.cjs";
6
- import { i as copyFilesSync, n as copyFileSync, r as copyFiles, t as copyFile } from "./copy-file-DjH2Ho5e.cjs";
7
- import { n as existsSync, t as exists } from "./exists-CVlDImzc.cjs";
8
- import { n as getParentPath, t as GetParentPathOptions } from "./get-parent-path-Cbqs2km7.cjs";
9
- import { a as isProjectRoot, c as relativeToWorkspaceRoot, i as getWorkspaceRoot, n as WORKSPACE_ROOT_CONTENT, o as isWorkspaceRoot, r as getProjectRoot, s as relativeToProjectRoot, t as PROJECT_ROOT_CONTENT } from "./get-workspace-root-eTfm1jII.cjs";
10
- import { a as removeDirectory, i as extractFileFromTarGzip, n as createDirectorySync, o as removeDirectorySync, r as extractFileFromTar, t as createDirectory } from "./helpers-CgMOExPa.cjs";
11
- import { n as packageExists, t as install } from "./install-CxPsLO2t.cjs";
12
- import { i as isFileSymlink, n as isDirectorySymlink, r as isFile, t as isDirectory } from "./is-file-DoBi2FN9.cjs";
13
- import { a as writeJsonFile, i as readJsonFileSync, n as JsonWriteOptions, o as writeJsonFileSync, r as readJsonFile, t as JsonReadOptions } from "./json-CYenVxvr.cjs";
14
- 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";
15
- 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";
16
- import { a as getResolutionPaths, c as resolvePackage, d as resolveSafeSync, f as resolveSync, i as getResolutionCombinations, l as resolvePackageSync, n as ResolveOptions, o as importModule, r as getNodeModulesPaths, s as resolve, t as DEFAULT_EXTENSIONS, u as resolveSafe } from "./resolve-DubH-8qd.cjs";
17
- import { i as readFileSync, n as readFileIfExisting, r as readFileIfExistingSync, t as readFile } from "./read-file-Bxn1VHKv.cjs";
18
- import { a as getRegistry, i as getParsedNodeOptionsWithoutInspect, n as formatNodeOptions, o as tokenizeArgs, r as getFormattedNodeOptionsWithoutInspect, t as NodeOptionsToken } from "./registry-C2A0Kau7.cjs";
19
- import { n as removeFileSync, t as removeFile } from "./remove-file-lQOlxDwr.cjs";
20
- import { a as isSemver, c as isValidVersion, i as isRelativeVersionKeyword, l as parseVersion, n as deriveNewSemverVersion, o as isValidRange, r as isRange, s as isValidSemver, t as coerceVersion, u as satisfiesVersion } from "./semver-fns-DjhZXnUw.cjs";
21
- import { a as readTomlFileSync, i as readTomlFile, n as TomlWriteOptions, o as writeTomlFile, r as XOptions, s as writeTomlFileSync, t as TomlReadOptions } from "./toml-D3X2QoaL.cjs";
22
- import { t as loadTsConfig } from "./tsconfig-C8ecu1-0.cjs";
23
- import { n as writeFile, r as writeFileSync, t as WriteFileOptions } from "./write-file-BmvbsmMj.cjs";
24
- import { n as readYamlFile, r as readYamlFileSync, t as YamlReadOptions } from "./yaml-6uuLoSfT.cjs";
1
+ import { readFileBuffer, readFileBufferSync, writeFileBuffer, writeFileBufferSync } from "./buffer.cjs";
2
+ import { chmodX, chmodXSync, isExecutable, isExecutableSync, isWritable, isWritableSync } from "./chmod-x.cjs";
3
+ import { commandExists, commandExistsSync } from "./command-exists.cjs";
4
+ import { CompressDirectoryOptions, compressDirectory } from "./compress.cjs";
5
+ import { Encoding } from "./constants.cjs";
6
+ import { copyFile, copyFileSync, copyFiles, copyFilesSync } from "./copy-file.cjs";
7
+ import { exists, existsSync } from "./exists.cjs";
8
+ import { GetParentPathOptions, getParentPath } from "./get-parent-path.cjs";
9
+ import { PROJECT_ROOT_CONTENT, WORKSPACE_ROOT_CONTENT, getProjectRoot, getWorkspaceRoot, isProjectRoot, isWorkspaceRoot, relativeToProjectRoot, relativeToWorkspaceRoot } from "./get-workspace-root.cjs";
10
+ import { createDirectory, createDirectorySync, extractFileFromTar, extractFileFromTarGzip, removeDirectory, removeDirectorySync } from "./helpers.cjs";
11
+ import { install, packageExists } from "./install.cjs";
12
+ import { isDirectory, isDirectorySymlink, isFile, isFileSymlink } from "./is-file.cjs";
13
+ import { JsonReadOptions, JsonWriteOptions, readJsonFile, readJsonFileSync, writeJsonFile, writeJsonFileSync } from "./json.cjs";
14
+ import { InferListReturnType, ListOptions, list, listDirectories, listDirectoriesSync, listFiles, listFilesSync, listSync } from "./list-files.cjs";
15
+ import { DEFAULT_EXTENSIONS, ResolveOptions, getNodeModulesPaths, getResolutionCombinations, getResolutionPaths, importModule, resolve, resolvePackage, resolvePackageSync, resolveSafe, resolveSafeSync, resolveSync } from "./resolve.cjs";
16
+ import { GetPackageListingReturn, PackageExistsOptions, PackageMatchesOptions, doesPackageMatch, getPackageInfo, getPackageListing, getPackageManager, isPackageExists, isPackageListed, loadPackageJson } from "./package-fns.cjs";
17
+ import { readFile, readFileIfExisting, readFileIfExistingSync, readFileSync } from "./read-file.cjs";
18
+ import { NodeOptionsToken, formatNodeOptions, getFormattedNodeOptionsWithoutInspect, getParsedNodeOptionsWithoutInspect, getRegistry, tokenizeArgs } from "./registry.cjs";
19
+ import { removeFile, removeFileSync } from "./remove-file.cjs";
20
+ import { coerceVersion, deriveNewSemverVersion, isRange, isRelativeVersionKeyword, isSemver, isValidRange, isValidSemver, isValidVersion, parseVersion, satisfiesVersion } from "./semver-fns.cjs";
21
+ import { TomlReadOptions, TomlWriteOptions, XOptions, readTomlFile, readTomlFileSync, writeTomlFile, writeTomlFileSync } from "./toml.cjs";
22
+ import { loadTsConfig } from "./tsconfig.cjs";
23
+ import { WriteFileOptions, writeFile, writeFileSync } from "./write-file.cjs";
24
+ import { YamlReadOptions, readYamlFile, readYamlFileSync } from "./yaml.cjs";
25
25
  export { CompressDirectoryOptions, DEFAULT_EXTENSIONS, Encoding, GetPackageListingReturn, GetParentPathOptions, InferListReturnType, JsonReadOptions, JsonWriteOptions, ListOptions, NodeOptionsToken, PROJECT_ROOT_CONTENT, PackageExistsOptions, PackageMatchesOptions, ResolveOptions, TomlReadOptions, TomlWriteOptions, WORKSPACE_ROOT_CONTENT, WriteFileOptions, XOptions, YamlReadOptions, chmodX, chmodXSync, coerceVersion, commandExists, commandExistsSync, compressDirectory, copyFile, copyFileSync, copyFiles, copyFilesSync, createDirectory, createDirectorySync, deriveNewSemverVersion, doesPackageMatch, exists, existsSync, extractFileFromTar, extractFileFromTarGzip, formatNodeOptions, getFormattedNodeOptionsWithoutInspect, getNodeModulesPaths, getPackageInfo, getPackageListing, getPackageManager, getParentPath, getParsedNodeOptionsWithoutInspect, getProjectRoot, getRegistry, getResolutionCombinations, getResolutionPaths, getWorkspaceRoot, importModule, install, isDirectory, isDirectorySymlink, isExecutable, isExecutableSync, isFile, isFileSymlink, isPackageExists, isPackageListed, isProjectRoot, isRange, isRelativeVersionKeyword, isSemver, isValidRange, isValidSemver, isValidVersion, isWorkspaceRoot, isWritable, isWritableSync, list, listDirectories, listDirectoriesSync, listFiles, listFilesSync, listSync, loadPackageJson, loadTsConfig, packageExists, parseVersion, readFile, readFileBuffer, readFileBufferSync, readFileIfExisting, readFileIfExistingSync, readFileSync, readJsonFile, readJsonFileSync, readTomlFile, readTomlFileSync, readYamlFile, readYamlFileSync, relativeToProjectRoot, relativeToWorkspaceRoot, removeDirectory, removeDirectorySync, removeFile, removeFileSync, resolve, resolvePackage, resolvePackageSync, resolveSafe, resolveSafeSync, resolveSync, satisfiesVersion, tokenizeArgs, writeFile, writeFileBuffer, writeFileBufferSync, writeFileSync, writeJsonFile, writeJsonFileSync, writeTomlFile, writeTomlFileSync };