@stryke/fs 0.33.19 → 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 +24 -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
@@ -1,44 +0,0 @@
1
- //#region src/chmod-x.d.ts
2
- /**
3
- * Adds execute permissions to a file
4
- *
5
- * @param file - The file to add execute permissions to
6
- */
7
- declare function chmodXSync(file: string): void;
8
- /**
9
- * Adds execute permissions to a file
10
- *
11
- * @param file - The file to add execute permissions to
12
- */
13
- declare function chmodX(file: string): Promise<void>;
14
- /**
15
- * Checks the write permission of a file
16
- *
17
- * @param filename - The file to check the permission of
18
- * @returns A promise that resolves to true if the file is writable, false otherwise
19
- */
20
- declare function isWritable(filename: string): Promise<boolean>;
21
- /**
22
- * Checks the write permission of a file
23
- *
24
- * @param filename - The file to check the permission of
25
- * @returns True if the file is writable, false otherwise
26
- */
27
- declare function isWritableSync(filename: string): boolean;
28
- /**
29
- * Checks the execute permission of a file
30
- *
31
- * @param filename - The file to check the permission of
32
- * @returns A promise that resolves to true if the file is executable, false otherwise
33
- */
34
- declare function isExecutable(filename: string): Promise<boolean>;
35
- /**
36
- * Checks the execute permission of a file
37
- *
38
- * @param filename - The file to check the permission of
39
- * @returns True if the file is executable, false otherwise
40
- */
41
- declare function isExecutableSync(filename: string): boolean;
42
- //#endregion
43
- export { isWritable as a, isExecutableSync as i, chmodXSync as n, isWritableSync as o, isExecutable as r, chmodX as t };
44
- //# sourceMappingURL=chmod-x-QCk1GmQJ.d.mts.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"chmod-x-QCk1GmQJ.d.mts","names":[],"sources":["../src/chmod-x.ts"],"sourcesContent":[],"mappings":";;AA0BA;AAuBA;AAwBA;AAeA;AAesB,iBA7EN,UAAA,CA6EsC,IAAO,EAAA,MAAA,CAAA,EAAA,IAAA;AAe7D;;;;;iBArEsB,MAAA,gBAAmB;;;;;;;iBAwBnB,UAAA,oBAA8B;;;;;;;iBAepC,cAAA;;;;;;;iBAeM,YAAA,oBAAgC;;;;;;;iBAetC,gBAAA"}
@@ -1,2 +0,0 @@
1
- import{accessSync as e,chmodSync as t,constants as n,statSync as r}from"node:fs";import{access as i,chmod as a}from"node:fs/promises";function o(e){if(process.platform===`win32`)return;let n=r(e),i=n.mode|73;n.mode!==i&&t(e,i.toString(8).slice(-3))}async function s(e){if(process.platform===`win32`)return;let t=r(e),n=t.mode|73;if(t.mode!==n)return a(e,n.toString(8).slice(-3))}async function c(e){try{return await i(e,n.W_OK),!0}catch{return!1}}function l(t){try{return e(t,n.W_OK),!0}catch{return!1}}async function u(e){try{return await i(e,n.X_OK),!0}catch{return!1}}function d(t){try{return e(t,n.X_OK),!0}catch{return!1}}export{c as a,d as i,o as n,l as o,u as r,s as t};
2
- //# sourceMappingURL=chmod-x-q-TWdus7.mjs.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"chmod-x-q-TWdus7.mjs","names":[],"sources":["../src/chmod-x.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 { accessSync, chmodSync, constants, statSync } from \"node:fs\";\nimport { access, chmod } from \"node:fs/promises\";\n\n/**\n * Adds execute permissions to a file\n *\n * @param file - The file to add execute permissions to\n */\nexport function chmodXSync(file: string) {\n // Note: skip for windows as chmod does on exist there\n // and will error with `EACCES: permission denied`\n if (process.platform === \"win32\") {\n return;\n }\n\n const s = statSync(file);\n const newMode = s.mode | 64 | 8 | 1;\n\n if (s.mode === newMode) {\n return;\n }\n const base8 = newMode.toString(8).slice(-3);\n\n chmodSync(file, base8);\n}\n\n/**\n * Adds execute permissions to a file\n *\n * @param file - The file to add execute permissions to\n */\nexport async function chmodX(file: string) {\n // Note: skip for windows as chmod does on exist there\n // and will error with `EACCES: permission denied`\n if (process.platform === \"win32\") {\n return;\n }\n\n const s = statSync(file);\n const newMode = s.mode | 64 | 8 | 1;\n\n if (s.mode === newMode) {\n return;\n }\n const base8 = newMode.toString(8).slice(-3);\n\n return chmod(file, base8);\n}\n\n/**\n * Checks the write permission of a file\n *\n * @param filename - The file to check the permission of\n * @returns A promise that resolves to true if the file is writable, false otherwise\n */\nexport async function isWritable(filename: string): Promise<boolean> {\n try {\n await access(filename, constants.W_OK);\n return true;\n } catch {\n return false;\n }\n}\n\n/**\n * Checks the write permission of a file\n *\n * @param filename - The file to check the permission of\n * @returns True if the file is writable, false otherwise\n */\nexport function isWritableSync(filename: string): boolean {\n try {\n accessSync(filename, constants.W_OK);\n return true;\n } catch {\n return false;\n }\n}\n\n/**\n * Checks the execute permission of a file\n *\n * @param filename - The file to check the permission of\n * @returns A promise that resolves to true if the file is executable, false otherwise\n */\nexport async function isExecutable(filename: string): Promise<boolean> {\n try {\n await access(filename, constants.X_OK);\n return true;\n } catch {\n return false;\n }\n}\n\n/**\n * Checks the execute permission of a file\n *\n * @param filename - The file to check the permission of\n * @returns True if the file is executable, false otherwise\n */\nexport function isExecutableSync(filename: string): boolean {\n try {\n accessSync(filename, constants.X_OK);\n return true;\n } catch {\n return false;\n }\n}\n"],"mappings":"sIA0BA,SAAgB,EAAW,EAAc,CAGvC,GAAI,QAAQ,WAAa,QACvB,OAGF,IAAM,EAAI,EAAS,EAAK,CAClB,EAAU,EAAE,KAAO,GAErB,EAAE,OAAS,GAKf,EAAU,EAFI,EAAQ,SAAS,EAAE,CAAC,MAAM,GAAG,CAErB,CAQxB,eAAsB,EAAO,EAAc,CAGzC,GAAI,QAAQ,WAAa,QACvB,OAGF,IAAM,EAAI,EAAS,EAAK,CAClB,EAAU,EAAE,KAAO,GAErB,KAAE,OAAS,EAKf,OAAO,EAAM,EAFC,EAAQ,SAAS,EAAE,CAAC,MAAM,GAAG,CAElB,CAS3B,eAAsB,EAAW,EAAoC,CACnE,GAAI,CAEF,OADA,MAAM,EAAO,EAAU,EAAU,KAAK,CAC/B,QACD,CACN,MAAO,IAUX,SAAgB,EAAe,EAA2B,CACxD,GAAI,CAEF,OADA,EAAW,EAAU,EAAU,KAAK,CAC7B,QACD,CACN,MAAO,IAUX,eAAsB,EAAa,EAAoC,CACrE,GAAI,CAEF,OADA,MAAM,EAAO,EAAU,EAAU,KAAK,CAC/B,QACD,CACN,MAAO,IAUX,SAAgB,EAAiB,EAA2B,CAC1D,GAAI,CAEF,OADA,EAAW,EAAU,EAAU,KAAK,CAC7B,QACD,CACN,MAAO"}
@@ -1,22 +0,0 @@
1
- //#region src/command-exists.d.ts
2
- /**
3
- * Asynchronously checks if a command exists in the system.
4
- *
5
- * @remarks
6
- * This function will check if the command is available in the system's PATH and if it is executable.
7
- * @param commandName - The name of the command to check for existence
8
- * @returns A promise that resolves to `true` if the command exists and is executable, `false` otherwise
9
- */
10
- declare function commandExists(commandName: string): Promise<void>;
11
- /**
12
- * Synchronously checks if a command exists in the system.
13
- *
14
- * @remarks
15
- * This function will check if the command is available in the system's PATH and if it is executable.
16
- * @param commandName - The name of the command to check for existence
17
- * @returns `true` if the command exists and is executable, `false` otherwise
18
- */
19
- declare function commandExistsSync(commandName: string): boolean;
20
- //#endregion
21
- export { commandExistsSync as n, commandExists as t };
22
- //# sourceMappingURL=command-exists-CuieR7rx.d.cts.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"command-exists-CuieR7rx.d.cts","names":[],"sources":["../src/command-exists.ts"],"sourcesContent":[],"mappings":";;AAuJA;AAqBA;;;;;;iBArBsB,aAAA,uBAAiC;;;;;;;;;iBAqBvC,iBAAA"}
@@ -1 +0,0 @@
1
- const e=require(`./chunk-Bmb41Sf3.cjs`);let t=require(`node:fs`),n=require(`node:fs/promises`),r=require(`node:child_process`),i=require(`node:path`);const a=process.platform==`win32`;async function o(e){try{return await(0,n.access)(e,n.constants.F_OK),!1}catch{return!0}}function s(e){try{return(0,t.accessSync)(e,n.constants.F_OK),!1}catch{return!0}}async function c(e){return(0,n.access)(e,n.constants.F_OK|n.constants.X_OK)}function l(e){try{return(0,t.accessSync)(e,n.constants.F_OK|n.constants.X_OK),!0}catch{return!1}}async function u(e,t){await o(e)||((0,r.exec)(`command -v ${t} 2>/dev/null && { echo >&1 ${t}; exit 0; }`),await c(e))}async function d(e,t){/^(?!(?:.*\s|.*\.|\W+)$)(?:[a-z]:)?[^<>:"|?*\n]+$/im.test(e)&&(0,r.exec)(`where ${t}`)}function f(e,t){if(s(e))try{return!!(0,r.execSync)(`command -v ${t} 2>/dev/null && { echo >&1 ${t}; exit 0; }`)}catch{return!1}return l(e)}function p(e,t){if(!/^(?!(?:.*\s|.*\.|\W+)$)(?:[a-z]:)?[^<>:"|?*\n]+$/im.test(e))return!1;try{return!!(0,r.execSync)(`where ${t}`,{stdio:[]})}catch{return!1}}function m(e){return/[^\w/:=-]/.test(e)&&(e=`'${e.replace(/'/g,`'\\''`)}'`,e=e.replace(/^(?:'')+/g,``).replace(/\\'''/g,`\\'`)),e}const h=e=>/\\/.test(e)?`"${(0,i.dirname)(e)}:${(0,i.basename)(e)}"`:`"${e}"`;async function g(e){let t=m(e);return typeof Promise<`u`?g(e):a?d(e,t):u(e,t)}function _(e){return a?p(e,h(e)):f(e,m(e))}Object.defineProperty(exports,`n`,{enumerable:!0,get:function(){return _}}),Object.defineProperty(exports,`t`,{enumerable:!0,get:function(){return g}});
@@ -1,2 +0,0 @@
1
- import{accessSync as e}from"node:fs";import{access as t,constants as n}from"node:fs/promises";import{exec as r,execSync as i}from"node:child_process";import{basename as a,dirname as o}from"node:path";const s=process.platform==`win32`;async function c(e){try{return await t(e,n.F_OK),!1}catch{return!0}}function l(t){try{return e(t,n.F_OK),!1}catch{return!0}}async function u(e){return t(e,n.F_OK|n.X_OK)}function d(t){try{return e(t,n.F_OK|n.X_OK),!0}catch{return!1}}async function f(e,t){await c(e)||(r(`command -v ${t} 2>/dev/null && { echo >&1 ${t}; exit 0; }`),await u(e))}async function p(e,t){/^(?!(?:.*\s|.*\.|\W+)$)(?:[a-z]:)?[^<>:"|?*\n]+$/im.test(e)&&r(`where ${t}`)}function m(e,t){if(l(e))try{return!!i(`command -v ${t} 2>/dev/null && { echo >&1 ${t}; exit 0; }`)}catch{return!1}return d(e)}function h(e,t){if(!/^(?!(?:.*\s|.*\.|\W+)$)(?:[a-z]:)?[^<>:"|?*\n]+$/im.test(e))return!1;try{return!!i(`where ${t}`,{stdio:[]})}catch{return!1}}function g(e){return/[^\w/:=-]/.test(e)&&(e=`'${e.replace(/'/g,`'\\''`)}'`,e=e.replace(/^(?:'')+/g,``).replace(/\\'''/g,`\\'`)),e}const _=e=>/\\/.test(e)?`"${o(e)}:${a(e)}"`:`"${e}"`;async function v(e){let t=g(e);return typeof Promise<`u`?v(e):s?p(e,t):f(e,t)}function y(e){return s?h(e,_(e)):m(e,g(e))}export{y as n,v as t};
2
- //# sourceMappingURL=command-exists-Dzb2kKT4.mjs.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"command-exists-Dzb2kKT4.mjs","names":["constants"],"sources":["../src/command-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 { exec, execSync } from \"node:child_process\";\nimport { accessSync } from \"node:fs\";\nimport { access, constants } from \"node:fs/promises\";\nimport { basename, dirname } from \"node:path\";\n\nconst isUsingWindows = process.platform == \"win32\";\n\nasync function fileNotExists(commandName: string) {\n try {\n await access(commandName, constants.F_OK);\n return false;\n // eslint-disable-next-line unused-imports/no-unused-vars, ts/no-unused-vars\n } catch (_) {\n return true;\n }\n}\n\nfunction fileNotExistsSync(commandName: string) {\n try {\n accessSync(commandName, constants.F_OK);\n return false;\n // eslint-disable-next-line unused-imports/no-unused-vars, ts/no-unused-vars\n } catch (_) {\n return true;\n }\n}\n\nasync function localExecutable(commandName: string) {\n return access(commandName, constants.F_OK | constants.X_OK);\n}\n\nfunction localExecutableSync(commandName: string) {\n try {\n accessSync(commandName, constants.F_OK | constants.X_OK);\n return true;\n // eslint-disable-next-line unused-imports/no-unused-vars, ts/no-unused-vars\n } catch (_) {\n return false;\n }\n}\n\nasync function commandExistsUnix(\n commandName: string,\n cleanedCommandName: string\n) {\n const isFile = await fileNotExists(commandName);\n\n if (!isFile) {\n exec(\n `command -v ${cleanedCommandName} 2>/dev/null` +\n ` && { echo >&1 ${cleanedCommandName}; exit 0; }`\n );\n\n await localExecutable(commandName);\n }\n}\n\nasync function commandExistsWindows(\n commandName: string,\n cleanedCommandName: string\n) {\n // Regex from Julio from: https://stackoverflow.com/questions/51494579/regex-windows-path-validator\n if (!/^(?!(?:.*\\s|.*\\.|\\W+)$)(?:[a-z]:)?[^<>:\"|?*\\n]+$/im.test(commandName)) {\n return;\n }\n\n exec(`where ${cleanedCommandName}`);\n}\n\nfunction commandExistsUnixSync(\n commandName: string,\n cleanedCommandName: string\n): boolean {\n if (fileNotExistsSync(commandName)) {\n try {\n const stdout = execSync(\n `command -v ${cleanedCommandName} 2>/dev/null` +\n ` && { echo >&1 ${cleanedCommandName}; exit 0; }`\n );\n\n return !!stdout;\n // eslint-disable-next-line unused-imports/no-unused-vars, ts/no-unused-vars\n } catch (_) {\n return false;\n }\n }\n return localExecutableSync(commandName);\n}\n\nfunction commandExistsWindowsSync(\n commandName: string,\n cleanedCommandName: string\n) {\n // Regex from Julio from: https://stackoverflow.com/questions/51494579/regex-windows-path-validator\n if (!/^(?!(?:.*\\s|.*\\.|\\W+)$)(?:[a-z]:)?[^<>:\"|?*\\n]+$/im.test(commandName)) {\n return false;\n }\n try {\n const stdout = execSync(`where ${cleanedCommandName}`, { stdio: [] });\n\n return !!stdout;\n // eslint-disable-next-line unused-imports/no-unused-vars, ts/no-unused-vars\n } catch (_) {\n return false;\n }\n}\n\nfunction cleanInput(s: string) {\n if (/[^\\w/:=-]/.test(s)) {\n s = `'${s.replace(/'/g, \"'\\\\''\")}'`;\n s = s\n .replace(/^(?:'')+/g, \"\") // un-duplicate single-quote at the beginning\n .replace(/\\\\'''/g, \"\\\\'\"); // remove non-escaped single-quote if there are enclosed between 2 escaped\n }\n return s;\n}\n\nconst cleanWindowsInput = (s: string) => {\n const isPathName = /\\\\/.test(s);\n if (isPathName) {\n return `\"${dirname(s)}:${basename(s)}\"`;\n }\n return `\"${s}\"`;\n};\n\n/**\n * Asynchronously checks if a command exists in the system.\n *\n * @remarks\n * This function will check if the command is available in the system's PATH and if it is executable.\n * @param commandName - The name of the command to check for existence\n * @returns A promise that resolves to `true` if the command exists and is executable, `false` otherwise\n */\nexport async function commandExists(commandName: string) {\n const cleanedCommandName = cleanInput(commandName);\n\n if (typeof Promise !== \"undefined\") {\n return commandExists(commandName);\n }\n if (isUsingWindows) {\n return commandExistsWindows(commandName, cleanedCommandName);\n } else {\n return commandExistsUnix(commandName, cleanedCommandName);\n }\n}\n\n/**\n * Synchronously checks if a command exists in the system.\n *\n * @remarks\n * This function will check if the command is available in the system's PATH and if it is executable.\n * @param commandName - The name of the command to check for existence\n * @returns `true` if the command exists and is executable, `false` otherwise\n */\nexport function commandExistsSync(commandName: string): boolean {\n if (isUsingWindows) {\n return commandExistsWindowsSync(\n commandName,\n cleanWindowsInput(commandName)\n );\n } else {\n return commandExistsUnixSync(commandName, cleanInput(commandName));\n }\n}\n"],"mappings":"wMAuBA,MAAM,EAAiB,QAAQ,UAAY,QAE3C,eAAe,EAAc,EAAqB,CAChD,GAAI,CAEF,OADA,MAAM,EAAO,EAAaA,EAAU,KAAK,CAClC,QAEG,CACV,MAAO,IAIX,SAAS,EAAkB,EAAqB,CAC9C,GAAI,CAEF,OADA,EAAW,EAAaA,EAAU,KAAK,CAChC,QAEG,CACV,MAAO,IAIX,eAAe,EAAgB,EAAqB,CAClD,OAAO,EAAO,EAAaA,EAAU,KAAOA,EAAU,KAAK,CAG7D,SAAS,EAAoB,EAAqB,CAChD,GAAI,CAEF,OADA,EAAW,EAAaA,EAAU,KAAOA,EAAU,KAAK,CACjD,QAEG,CACV,MAAO,IAIX,eAAe,EACb,EACA,EACA,CACe,MAAM,EAAc,EAAY,GAG7C,EACE,cAAc,EAAmB,6BACb,EAAmB,aACxC,CAED,MAAM,EAAgB,EAAY,EAItC,eAAe,EACb,EACA,EACA,CAEK,qDAAqD,KAAK,EAAY,EAI3E,EAAK,SAAS,IAAqB,CAGrC,SAAS,EACP,EACA,EACS,CACT,GAAI,EAAkB,EAAY,CAChC,GAAI,CAMF,MAAO,CAAC,CALO,EACb,cAAc,EAAmB,6BACb,EAAmB,aACxC,MAIS,CACV,MAAO,GAGX,OAAO,EAAoB,EAAY,CAGzC,SAAS,EACP,EACA,EACA,CAEA,GAAI,CAAC,qDAAqD,KAAK,EAAY,CACzE,MAAO,GAET,GAAI,CAGF,MAAO,CAAC,CAFO,EAAS,SAAS,IAAsB,CAAE,MAAO,EAAE,CAAE,CAAC,MAI3D,CACV,MAAO,IAIX,SAAS,EAAW,EAAW,CAO7B,MANI,YAAY,KAAK,EAAE,GACrB,EAAI,IAAI,EAAE,QAAQ,KAAM,QAAQ,CAAC,GACjC,EAAI,EACD,QAAQ,YAAa,GAAG,CACxB,QAAQ,SAAU,MAAM,EAEtB,EAGT,MAAM,EAAqB,GACN,KAAK,KAAK,EAAE,CAEtB,IAAI,EAAQ,EAAE,CAAC,GAAG,EAAS,EAAE,CAAC,GAEhC,IAAI,EAAE,GAWf,eAAsB,EAAc,EAAqB,CACvD,IAAM,EAAqB,EAAW,EAAY,CAQhD,OANE,OAAO,QAAY,IACd,EAAc,EAAY,CAE/B,EACK,EAAqB,EAAa,EAAmB,CAErD,EAAkB,EAAa,EAAmB,CAY7D,SAAgB,EAAkB,EAA8B,CAO5D,OANE,EACK,EACL,EACA,EAAkB,EAAY,CAC/B,CAEM,EAAsB,EAAa,EAAW,EAAY,CAAC"}
@@ -1,22 +0,0 @@
1
- //#region src/command-exists.d.ts
2
- /**
3
- * Asynchronously checks if a command exists in the system.
4
- *
5
- * @remarks
6
- * This function will check if the command is available in the system's PATH and if it is executable.
7
- * @param commandName - The name of the command to check for existence
8
- * @returns A promise that resolves to `true` if the command exists and is executable, `false` otherwise
9
- */
10
- declare function commandExists(commandName: string): Promise<void>;
11
- /**
12
- * Synchronously checks if a command exists in the system.
13
- *
14
- * @remarks
15
- * This function will check if the command is available in the system's PATH and if it is executable.
16
- * @param commandName - The name of the command to check for existence
17
- * @returns `true` if the command exists and is executable, `false` otherwise
18
- */
19
- declare function commandExistsSync(commandName: string): boolean;
20
- //#endregion
21
- export { commandExistsSync as n, commandExists as t };
22
- //# sourceMappingURL=command-exists-dBdtR0xj.d.mts.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"command-exists-dBdtR0xj.d.mts","names":[],"sources":["../src/command-exists.ts"],"sourcesContent":[],"mappings":";;AAuJA;AAqBA;;;;;;iBArBsB,aAAA,uBAAiC;;;;;;;;;iBAqBvC,iBAAA"}
@@ -1,2 +0,0 @@
1
- import{t as e}from"./join-paths-BHepkhAj.mjs";import{i as t}from"./file-path-fns-BDzC2SIV.mjs";import{t as n}from"./resolve-parent-path-CR8av8WP.mjs";import{t as r}from"./is-file-CNooe8Wz.mjs";import{i}from"./list-files-D__uh3tQ.mjs";import{n as a}from"./read-file-B091zB64.mjs";import{t as o}from"./write-file-CFByoJkN.mjs";import{createTarGzip as s}from"nanotar";function c(e){let t=e instanceof Uint8Array?e:new Uint8Array(e),n=t.byteLength;if(n<65535)return String.fromCharCode.apply(null,t);let r=``;for(let e=0;e<n;e++)r+=String.fromCharCode(t[e]);return r}function l(e){return btoa(c(e))}async function u(c,u){let d=await i(r(c)?e(c,`**/*`):c,u),f=await s(await Promise.all(d.map(async e=>({name:e,data:await a(e)}))),{attrs:{group:`storm-software`}});return o(u?.destination?r(u.destination)?e(u.destination,`${new Date().getTime()}.tar.gz`):u.destination:r(c)?`${e(n(c),t(c))}.tar.gz`:c,l(f))}export{u as t};
2
- //# sourceMappingURL=compress-BiTxso15.mjs.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"compress-BiTxso15.mjs","names":[],"sources":["../../convert/src/array-buffer-to-string.ts","../../convert/src/uint8-array-to-string.ts","../src/compress.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 * Convert an ArrayBuffer or Uint8Array to a string\n *\n * @param buffer - The ArrayBuffer or Uint8Array to convert\n * @returns The converted string\n */\nexport function arrayBufferToString(\n buffer: ArrayBuffer | ArrayBufferLike | Uint8Array\n): string {\n const bytes =\n buffer instanceof Uint8Array\n ? buffer\n : new Uint8Array(buffer as ArrayBufferLike);\n const len = bytes.byteLength;\n if (len < 65535) {\n return String.fromCharCode.apply(null, bytes as unknown as number[]);\n }\n let binary = \"\";\n for (let i = 0; i < len; i++) {\n binary += String.fromCharCode(bytes[i]!);\n }\n return binary;\n}\n","/* -------------------------------------------------------------------\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 { arrayBufferToString } from \"./array-buffer-to-string\";\n\n/**\n * Convert a Uint8Array to a base64 string\n *\n * @param buffer - The Uint8Array to convert\n * @returns The converted base64 string\n */\nexport function uint8ArrayToString(buffer: Uint8Array): string {\n return btoa(arrayBufferToString(buffer));\n}\n","/* -------------------------------------------------------------------\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 { uint8ArrayToString } from \"@stryke/convert/uint8-array-to-string\";\nimport { findFolderName, resolveParentPath } from \"@stryke/path\";\nimport { joinPaths } from \"@stryke/path/join-paths\";\nimport type { GlobOptions } from \"glob\";\nimport { createTarGzip } from \"nanotar\";\nimport { isDirectory } from \"./is-file\";\nimport { listFiles } from \"./list-files\";\nimport { readFileIfExisting } from \"./read-file\";\nimport { writeFile } from \"./write-file\";\n\nexport interface CompressDirectoryOptions extends GlobOptions {\n destination?: string;\n}\n\n/**\n * Compress a directory or file into a tar.gz archive.\n *\n * @param directory - The source directory or file/glob to compress.\n * @param options - Options for the compression.\n */\nexport async function compressDirectory(\n directory: string,\n options?: CompressDirectoryOptions\n): Promise<void> {\n const files = await listFiles(\n isDirectory(directory) ? joinPaths(directory, \"**/*\") : directory,\n options\n );\n const data = await createTarGzip(\n await Promise.all(\n files.map(async file => ({\n name: file,\n data: await readFileIfExisting(file)\n }))\n ),\n {\n attrs: { group: \"storm-software\" }\n }\n );\n\n return writeFile(\n options?.destination\n ? isDirectory(options.destination)\n ? joinPaths(options.destination, `${new Date().getTime()}.tar.gz`)\n : options.destination\n : isDirectory(directory)\n ? `${joinPaths(resolveParentPath(directory), findFolderName(directory))}.tar.gz`\n : directory,\n uint8ArrayToString(data)\n );\n}\n"],"mappings":"6WAwBA,SAAgB,EACd,EACQ,CACR,IAAM,EACJ,aAAkB,WACd,EACA,IAAI,WAAW,EAA0B,CACzC,EAAM,EAAM,WAClB,GAAI,EAAM,MACR,OAAO,OAAO,aAAa,MAAM,KAAM,EAA6B,CAEtE,IAAI,EAAS,GACb,IAAK,IAAI,EAAI,EAAG,EAAI,EAAK,IACvB,GAAU,OAAO,aAAa,EAAM,GAAI,CAE1C,OAAO,ECbT,SAAgB,EAAmB,EAA4B,CAC7D,OAAO,KAAK,EAAoB,EAAO,CAAC,CCW1C,eAAsB,EACpB,EACA,EACe,CACf,IAAM,EAAQ,MAAM,EAClB,EAAY,EAAU,CAAG,EAAU,EAAW,OAAO,CAAG,EACxD,EACD,CACK,EAAO,MAAM,EACjB,MAAM,QAAQ,IACZ,EAAM,IAAI,KAAM,KAAS,CACvB,KAAM,EACN,KAAM,MAAM,EAAmB,EAAK,CACrC,EAAE,CACJ,CACD,CACE,MAAO,CAAE,MAAO,iBAAkB,CACnC,CACF,CAED,OAAO,EACL,GAAS,YACL,EAAY,EAAQ,YAAY,CAC9B,EAAU,EAAQ,YAAa,GAAG,IAAI,MAAM,CAAC,SAAS,CAAC,SAAS,CAChE,EAAQ,YACV,EAAY,EAAU,CACpB,GAAG,EAAU,EAAkB,EAAU,CAAE,EAAe,EAAU,CAAC,CAAC,SACtE,EACN,EAAmB,EAAK,CACzB"}
@@ -1 +0,0 @@
1
- const e=require(`./chunk-Bmb41Sf3.cjs`),t=require(`./join-paths-DUdaieID.cjs`),n=require(`./file-path-fns-7aKacdLg.cjs`),r=require(`./resolve-parent-path-D0AaW2PB.cjs`),i=require(`./is-file-BkFQev3M.cjs`),a=require(`./list-files-Cn_UVruo.cjs`),o=require(`./read-file-BB2WzW-N.cjs`),s=require(`./write-file-CqokudVp.cjs`);let c=require(`nanotar`);function l(e){let t=e instanceof Uint8Array?e:new Uint8Array(e),n=t.byteLength;if(n<65535)return String.fromCharCode.apply(null,t);let r=``;for(let e=0;e<n;e++)r+=String.fromCharCode(t[e]);return r}function u(e){return btoa(l(e))}async function d(e,l){let d=await a.i(i.t(e)?t.t(e,`**/*`):e,l),f=await(0,c.createTarGzip)(await Promise.all(d.map(async e=>({name:e,data:await o.n(e)}))),{attrs:{group:`storm-software`}});return s.t(l?.destination?i.t(l.destination)?t.t(l.destination,`${new Date().getTime()}.tar.gz`):l.destination:i.t(e)?`${t.t(r.t(e),n.i(e))}.tar.gz`:e,u(f))}Object.defineProperty(exports,`t`,{enumerable:!0,get:function(){return d}});
@@ -1,16 +0,0 @@
1
- import { GlobOptions } from "glob";
2
-
3
- //#region src/compress.d.ts
4
- interface CompressDirectoryOptions extends GlobOptions {
5
- destination?: string;
6
- }
7
- /**
8
- * Compress a directory or file into a tar.gz archive.
9
- *
10
- * @param directory - The source directory or file/glob to compress.
11
- * @param options - Options for the compression.
12
- */
13
- declare function compressDirectory(directory: string, options?: CompressDirectoryOptions): Promise<void>;
14
- //#endregion
15
- export { compressDirectory as n, CompressDirectoryOptions as t };
16
- //# sourceMappingURL=compress-CLAaOwH3.d.mts.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"compress-CLAaOwH3.d.mts","names":[],"sources":["../src/compress.ts"],"sourcesContent":[],"mappings":";;;UA4BiB,wBAAA,SAAiC;;AAAlD;AAUA;;;;;;iBAAsB,iBAAA,8BAEV,2BACT"}
@@ -1,16 +0,0 @@
1
- import { GlobOptions } from "glob";
2
-
3
- //#region src/compress.d.ts
4
- interface CompressDirectoryOptions extends GlobOptions {
5
- destination?: string;
6
- }
7
- /**
8
- * Compress a directory or file into a tar.gz archive.
9
- *
10
- * @param directory - The source directory or file/glob to compress.
11
- * @param options - Options for the compression.
12
- */
13
- declare function compressDirectory(directory: string, options?: CompressDirectoryOptions): Promise<void>;
14
- //#endregion
15
- export { compressDirectory as n, CompressDirectoryOptions as t };
16
- //# sourceMappingURL=compress-CQve2a6h.d.cts.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"compress-CQve2a6h.d.cts","names":[],"sources":["../src/compress.ts"],"sourcesContent":[],"mappings":";;;UA4BiB,wBAAA,SAAiC;;AAAlD;AAUA;;;;;;iBAAsB,iBAAA,8BAEV,2BACT"}
@@ -1,5 +0,0 @@
1
- //#region src/constants.d.ts
2
- type Encoding = "ascii" | "utf8" | "utf-8" | "utf16le" | "utf-16le" | "ucs2" | "ucs-2" | "base64" | "base64url" | "latin1" | "binary" | "hex";
3
- //#endregion
4
- export { Encoding as t };
5
- //# sourceMappingURL=constants-D58o2CiO.d.cts.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"constants-D58o2CiO.d.cts","names":[],"sources":["../src/constants.ts"],"sourcesContent":[],"mappings":";KAkBY,QAAA"}
@@ -1,5 +0,0 @@
1
- //#region src/constants.d.ts
2
- type Encoding = "ascii" | "utf8" | "utf-8" | "utf16le" | "utf-16le" | "ucs2" | "ucs-2" | "base64" | "base64url" | "latin1" | "binary" | "hex";
3
- //#endregion
4
- export { Encoding as t };
5
- //# sourceMappingURL=constants-DZz9LJgo.d.mts.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"constants-DZz9LJgo.d.mts","names":[],"sources":["../src/constants.ts"],"sourcesContent":[],"mappings":";KAkBY,QAAA"}
@@ -1,39 +0,0 @@
1
- import { t as AssetGlob } from "./file-DauFFmfh.mjs";
2
-
3
- //#region src/copy-file.d.ts
4
-
5
- /**
6
- * Copy a file from one location to another
7
- *
8
- * @param source - The file to copy, this can be a file, directory, URL, or glob pattern
9
- * @param destination - The destination location
10
- * @returns An indicator specifying if the copy was successful
11
- */
12
- declare function copyFile(source: string | URL, destination: string | URL): Promise<void>;
13
- /**
14
- * Synchronously copy a file from one location to another
15
- *
16
- * @param source - The file to copy, this can be a file, directory, URL, or glob pattern
17
- * @param destination - The destination location
18
- * @returns An indicator specifying if the copy was successful
19
- */
20
- declare function copyFileSync(source: string | URL, destination: string | URL): void;
21
- /**
22
- * Copy files from one location to another
23
- *
24
- * @param source - The source location, this can be a file, directory, URL, or glob pattern
25
- * @param destination - The destination location
26
- * @returns An indicator specifying if the copy was successful
27
- */
28
- declare function copyFiles(source: string | URL | Omit<AssetGlob, "output">, destination: string | URL): Promise<void | void[]>;
29
- /**
30
- * Synchronously copy files from one location to another
31
- *
32
- * @param source - The source location, this can be a file, directory, URL, or glob pattern
33
- * @param destination - The destination location
34
- * @returns An indicator specifying if the copy was successful
35
- */
36
- declare function copyFilesSync(source: string | URL | Omit<AssetGlob, "output">, destination: string | URL): void | void[];
37
- //#endregion
38
- export { copyFilesSync as i, copyFileSync as n, copyFiles as r, copyFile as t };
39
- //# sourceMappingURL=copy-file-B5FJHiIK.d.mts.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"copy-file-B5FJHiIK.d.mts","names":[],"sources":["../src/copy-file.ts"],"sourcesContent":[],"mappings":";;;;;;AAwCA;;;;;AA4BgB,iBA5BM,QAAA,CA4BwB,MAA2B,EAAG,MAAA,GA3BzD,GA2ByD,EAAA,WAAA,EAAA,MAAA,GA1BpD,GA0BoD,CAAA,EA1BjD,OA0BiD,CAAA,IAAA,CAAA;AAyB5E;;;;;;;AAmCgB,iBA5DA,YAAA,CA4Da,MAAA,EAAA,MAAA,GA5DiB,GA4DjB,EAAA,WAAA,EAAA,MAAA,GA5D4C,GA4D5C,CAAA,EAAA,IAAA;;;;;;;;iBAnCP,SAAA,kBACH,MAAM,KAAK,4CACN,MAAG;;;;;;;;iBAiCX,aAAA,kBACG,MAAM,KAAK,4CACN"}
@@ -1,2 +0,0 @@
1
- import{t as e}from"./cwd-YTg9Cx6C.mjs";import{n as t,t as n}from"./join-paths-BHepkhAj.mjs";import{a as r,f as i,l as a,r as o}from"./file-path-fns-BDzC2SIV.mjs";import{t as s}from"./is-string-91Z3dOKQ.mjs";import{t as c}from"./resolve-parent-path-CR8av8WP.mjs";import{n as l}from"./exists-Ci-9lYmi.mjs";import{n as u,t as d}from"./helpers-BSEQb1fp.mjs";import{r as f,t as p}from"./is-file-CNooe8Wz.mjs";import{a as m,i as h}from"./list-files-D__uh3tQ.mjs";import{copyFileSync as g}from"node:fs";import{copyFile as _}from"node:fs/promises";import{fileURLToPath as v}from"mlly";function y(n,r=e()){return i(n,r)?t(n).replace(t(r),``).replace(/^\//,``):n}async function b(e,t){let n=e instanceof URL?v(e):e,i=t instanceof URL?v(t):t;if(r(i)?l(o(i))||await d(o(i)):l(c(i))||await d(c(i)),s(n)&&l(n))return _(n,i)}function x(e,t){let n=e instanceof URL?v(e):e,i=t instanceof URL?v(t):t;if(r(i)?l(o(i))||u(o(i)):l(c(i))||u(c(i)),s(n)&&l(n))return g(n,i)}async function S(e,t){let r=e instanceof URL?v(e):e,i=t instanceof URL?v(t):t;return s(r)&&f(r)?b(r,i):Promise.all((await h(r)).map(async e=>{let t=n(i,y(e,s(r)?a(r):r.input));p(e)?await S(e,t):await b(e,t)}))}function C(e,t){let r=e instanceof URL?v(e):e,i=t instanceof URL?v(t):t;return s(r)&&f(r)?x(r,i):m(r).map(e=>{let t=n(i,y(e,s(r)?a(r):r.input));p(e)?C(e,t):x(e,t)})}export{C as i,x as n,S as r,b as t};
2
- //# sourceMappingURL=copy-file-Bot2YNtT.mjs.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"copy-file-Bot2YNtT.mjs","names":["copyFile","existsSync","cpf","copyFileSync","cpfSync"],"sources":["../../path/src/replace.ts","../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 { cwd } from \"./cwd\";\nimport {\n findFileDotExtensionSafe,\n findFileExtensionSafe\n} from \"./file-path-fns\";\nimport { isParentPath } from \"./is-parent-path\";\nimport { slash } from \"./slash\";\n\n/**\n * Replace the base path from the beginning of the given path.\n *\n * @example\n * ```ts\n * replacePath(\"/home/user/project/src/index.ts\", \"/home/user/project\");\n * // returns \"src/index.ts\"\n * ```\n *\n * @param childPath - The child path to replace the {@link parentPath} substring from\n * @param parentPath - The parent path to remove from the {@link childPath} parameter\n * @returns The {@link childPath} with the {@link parentPath} path removed\n */\nexport function replacePath(\n childPath: string,\n parentPath: string = cwd()\n): string {\n return isParentPath(childPath, parentPath)\n ? slash(childPath).replace(slash(parentPath), \"\").replace(/^\\//, \"\")\n : childPath;\n}\n\n/**\n * Replace the extension of a given path with the provided value.\n *\n * @example\n * ```ts\n * replaceExtension(\"/home/user/project/src/index.ts\", \".js\");\n * // returns \"/home/user/project/src/index.js\"\n * replaceExtension(\"/home/user/project/src/index.ts\");\n * // returns \"/home/user/project/src/index\"\n * ```\n *\n * @param path - The path that will have its current extension replaced\n * @param replacement - The value (or an empty string) to replace the current extension with\n * @returns The path with the replaced extension\n */\nexport function replaceExtension(path: string, replacement = \"\"): string {\n return path.replace(\n !replacement || replacement.includes(\".\")\n ? findFileDotExtensionSafe(path)\n : findFileExtensionSafe(path),\n replacement\n );\n}\n","/* -------------------------------------------------------------------\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":"ikBAuCA,SAAgB,EACd,EACA,EAAqB,GAAK,CAClB,CACR,OAAO,EAAa,EAAW,EAAW,CACtC,EAAM,EAAU,CAAC,QAAQ,EAAM,EAAW,CAAE,GAAG,CAAC,QAAQ,MAAO,GAAG,CAClE,ECLN,eAAsBA,EACpB,EACA,EACA,CACA,IAAM,EAAM,aAAkB,IAAM,EAAc,EAAO,CAAG,EACtD,EACJ,aAAuB,IAAM,EAAc,EAAY,CAAG,EAU5D,GARK,EAAiB,EAAK,CAIfC,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,SAAgBC,EAAa,EAAsB,EAA2B,CAC5E,IAAM,EAAM,aAAkB,IAAM,EAAc,EAAO,CAAG,EACtD,EACJ,aAAuB,IAAM,EAAc,EAAY,CAAG,EAU5D,GARK,EAAiB,EAAK,CAIfF,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,OAAOG,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,CACvBJ,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,MAAMA,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,CACvBG,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"}
@@ -1,39 +0,0 @@
1
- import { t as AssetGlob } from "./file-D1uBqkpP.cjs";
2
-
3
- //#region src/copy-file.d.ts
4
-
5
- /**
6
- * Copy a file from one location to another
7
- *
8
- * @param source - The file to copy, this can be a file, directory, URL, or glob pattern
9
- * @param destination - The destination location
10
- * @returns An indicator specifying if the copy was successful
11
- */
12
- declare function copyFile(source: string | URL, destination: string | URL): Promise<void>;
13
- /**
14
- * Synchronously copy a file from one location to another
15
- *
16
- * @param source - The file to copy, this can be a file, directory, URL, or glob pattern
17
- * @param destination - The destination location
18
- * @returns An indicator specifying if the copy was successful
19
- */
20
- declare function copyFileSync(source: string | URL, destination: string | URL): void;
21
- /**
22
- * Copy files from one location to another
23
- *
24
- * @param source - The source location, this can be a file, directory, URL, or glob pattern
25
- * @param destination - The destination location
26
- * @returns An indicator specifying if the copy was successful
27
- */
28
- declare function copyFiles(source: string | URL | Omit<AssetGlob, "output">, destination: string | URL): Promise<void | void[]>;
29
- /**
30
- * Synchronously copy files from one location to another
31
- *
32
- * @param source - The source location, this can be a file, directory, URL, or glob pattern
33
- * @param destination - The destination location
34
- * @returns An indicator specifying if the copy was successful
35
- */
36
- declare function copyFilesSync(source: string | URL | Omit<AssetGlob, "output">, destination: string | URL): void | void[];
37
- //#endregion
38
- export { copyFilesSync as i, copyFileSync as n, copyFiles as r, copyFile as t };
39
- //# sourceMappingURL=copy-file-DjH2Ho5e.d.cts.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"copy-file-DjH2Ho5e.d.cts","names":[],"sources":["../src/copy-file.ts"],"sourcesContent":[],"mappings":";;;;;;AAwCA;;;;;AA4BgB,iBA5BM,QAAA,CA4BwB,MAA2B,EAAG,MAAA,GA3BzD,GA2ByD,EAAA,WAAA,EAAA,MAAA,GA1BpD,GA0BoD,CAAA,EA1BjD,OA0BiD,CAAA,IAAA,CAAA;AAyB5E;;;;;;;AAmCgB,iBA5DA,YAAA,CA4Da,MAAA,EAAA,MAAA,GA5DiB,GA4DjB,EAAA,WAAA,EAAA,MAAA,GA5D4C,GA4D5C,CAAA,EAAA,IAAA;;;;;;;;iBAnCP,SAAA,kBACH,MAAM,KAAK,4CACN,MAAG;;;;;;;;iBAiCX,aAAA,kBACG,MAAM,KAAK,4CACN"}
@@ -1 +0,0 @@
1
- const e=require(`./chunk-Bmb41Sf3.cjs`),t=require(`./cwd-o2vq8Tk9.cjs`),n=require(`./join-paths-DUdaieID.cjs`),r=require(`./file-path-fns-7aKacdLg.cjs`),i=require(`./is-string-DKgNS0jA.cjs`),a=require(`./resolve-parent-path-D0AaW2PB.cjs`),o=require(`./exists-B31lSRFp.cjs`),s=require(`./helpers-_MJ6PR-g.cjs`),c=require(`./is-file-BkFQev3M.cjs`),l=require(`./list-files-Cn_UVruo.cjs`);let u=require(`node:fs`),d=require(`node:fs/promises`),f=require(`mlly`);function p(e,i=t.t()){return r.f(e,i)?n.n(e).replace(n.n(i),``).replace(/^\//,``):e}async function m(e,t){let n=e instanceof URL?(0,f.fileURLToPath)(e):e,c=t instanceof URL?(0,f.fileURLToPath)(t):t;if(r.a(c)?o.n(r.r(c))||await s.t(r.r(c)):o.n(a.t(c))||await s.t(a.t(c)),i.t(n)&&o.n(n))return(0,d.copyFile)(n,c)}function h(e,t){let n=e instanceof URL?(0,f.fileURLToPath)(e):e,c=t instanceof URL?(0,f.fileURLToPath)(t):t;if(r.a(c)?o.n(r.r(c))||s.n(r.r(c)):o.n(a.t(c))||s.n(a.t(c)),i.t(n)&&o.n(n))return(0,u.copyFileSync)(n,c)}async function g(e,t){let a=e instanceof URL?(0,f.fileURLToPath)(e):e,o=t instanceof URL?(0,f.fileURLToPath)(t):t;return i.t(a)&&c.r(a)?m(a,o):Promise.all((await l.i(a)).map(async e=>{let t=n.t(o,p(e,i.t(a)?r.l(a):a.input));c.t(e)?await g(e,t):await m(e,t)}))}function _(e,t){let a=e instanceof URL?(0,f.fileURLToPath)(e):e,o=t instanceof URL?(0,f.fileURLToPath)(t):t;return i.t(a)&&c.r(a)?h(a,o):l.a(a).map(e=>{let t=n.t(o,p(e,i.t(a)?r.l(a):a.input));c.t(e)?_(e,t):h(e,t)})}Object.defineProperty(exports,`i`,{enumerable:!0,get:function(){return _}}),Object.defineProperty(exports,`n`,{enumerable:!0,get:function(){return h}}),Object.defineProperty(exports,`r`,{enumerable:!0,get:function(){return g}}),Object.defineProperty(exports,`t`,{enumerable:!0,get:function(){return m}});
@@ -1,2 +0,0 @@
1
- function e(){return typeof process<`u`&&typeof process.cwd==`function`?process.cwd().replace(/\\/g,`/`):`/`}export{e as t};
2
- //# sourceMappingURL=cwd-YTg9Cx6C.mjs.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"cwd-YTg9Cx6C.mjs","names":[],"sources":["../../path/src/cwd.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 * Get the current working directory.\n *\n * @remarks\n * This function attempts to retrieve the current working directory using `process.cwd()`.\n *\n * @returns The current working directory or '/' if it cannot be determined\n */\nexport function cwd() {\n if (typeof process !== \"undefined\" && typeof process.cwd === \"function\") {\n return process.cwd().replace(/\\\\/g, \"/\");\n }\n return \"/\";\n}\n"],"mappings":"AA0BA,SAAgB,GAAM,CAIpB,OAHI,OAAO,QAAY,KAAe,OAAO,QAAQ,KAAQ,WACpD,QAAQ,KAAK,CAAC,QAAQ,MAAO,IAAI,CAEnC"}
@@ -1 +0,0 @@
1
- function e(){return typeof process<`u`&&typeof process.cwd==`function`?process.cwd().replace(/\\/g,`/`):`/`}Object.defineProperty(exports,`t`,{enumerable:!0,get:function(){return e}});
@@ -1,18 +0,0 @@
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 { existsSync as n, exists as t };
18
- //# sourceMappingURL=exists-175EN367.d.mts.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"exists-175EN367.d.mts","names":[],"sources":["../src/exists.ts"],"sourcesContent":[],"mappings":";;AA2BA;AAUA;;;;iBAVgB,UAAA;;;;;;;iBAUM,MAAA,oBAA0B"}
@@ -1 +0,0 @@
1
- const e=require(`./chunk-Bmb41Sf3.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)}Object.defineProperty(exports,`n`,{enumerable:!0,get:function(){return r}}),Object.defineProperty(exports,`t`,{enumerable:!0,get:function(){return i}});
@@ -1,18 +0,0 @@
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 { existsSync as n, exists as t };
18
- //# sourceMappingURL=exists-CVlDImzc.d.cts.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"exists-CVlDImzc.d.cts","names":[],"sources":["../src/exists.ts"],"sourcesContent":[],"mappings":";;AA2BA;AAUA;;;;iBAVgB,UAAA;;;;;;;iBAUM,MAAA,oBAA0B"}
@@ -1,2 +0,0 @@
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{r as n,i as t};
2
- //# sourceMappingURL=exists-Ci-9lYmi.mjs.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"exists-Ci-9lYmi.mjs","names":["existsSync","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,SAAgBA,EAAW,EAA2B,CACpD,OAAOC,EAAa,EAAS,CAS/B,eAAsB,EAAO,EAAoC,CAC/D,OAAO,EAAO,EAAUC,EAAU,KAAK,CACpC,SAAW,GAAK,CAChB,UAAY,GAAM"}
@@ -1 +0,0 @@
1
- {"version":3,"file":"file-D1uBqkpP.d.cts","names":[],"sources":["../../types/src/file.ts"],"sourcesContent":[],"mappings":";;;;;KA8CY,aAAA,GACR,uBAAuB,mBAEvB;UAGa,eAAA;;;;;;;KAQL,SAAA,GAAY,SAAS,KAAK,6BACpC,QAAQ,KAAK"}
@@ -1 +0,0 @@
1
- {"version":3,"file":"file-DauFFmfh.d.mts","names":[],"sources":["../../types/src/file.ts"],"sourcesContent":[],"mappings":";;;;;KA8CY,aAAA,GACR,uBAAuB,mBAEvB;UAGa,eAAA;;;;;;;KAQL,SAAA,GAAY,SAAS,KAAK,6BACpC,QAAQ,KAAK"}
@@ -1 +0,0 @@
1
- const e=require(`./cwd-o2vq8Tk9.cjs`),t=require(`./join-paths-DUdaieID.cjs`),n=require(`./is-set-string-CLeu8BKX.cjs`);function r(e,n){let r=t.n(e.replace(/\\/g,`/`).replace(/\/$/,``)),i=t.n(n.replace(/\\/g,`/`).replace(/\/$/,``));return r!==i&&r.startsWith(`${i}/`)}function i(n,i=e.t()){return t.n(r(n,i)?n:t.t(i,n))}function a(e,t){return`${e}.${t.replace(/^\./,``)}`}function o(e=``){return e&&t.n(e).replace(t.s,e=>e.toUpperCase())}function s(e){if(!e||e.length===0)return`.`;e=o(e);let n=e.match(t.u),r=t.i(e),i=e.endsWith(`/`);return e=l(e,!r),e.length===0?r?`/`:i?`./`:`.`:(i&&(e+=`/`),t.o.test(e)&&(e+=`/`),n?r?`//${e}`:`//./${e}`:!e.startsWith(`/`)&&r&&!t.o.test(e)?`/${e}`:e)}function c(e){if(!e||e.length===0)return`.`;e=s(e);let t=!1;return e.split(`/`).reduce((e,n)=>n?.trim()?t||n.includes(`*`)?(t=!0,e):e+(e?`/${n}`:n):e,``)}function l(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 u(n,r=e.t()){return t.i(n)?n:t.n(l(i(n,r),!0))}const d=``;function f(e,t={}){let{requireExtension:n=!1,withExtension:r=!0}=t,i=o(e)?.split(e?.includes(`\\`)?`\\`:`/`)?.pop()??``;return n===!0&&!i.includes(`.`)?``:r===!1&&i.includes(`.`)?i.replace(`.${h(i)??``}`,``)||``:i}function p(e,t={}){let n=o(e),r=n.replace(f(n,{requireExtension:!1,...t}),``);return r===`/`?r:r.replace(/\/$/,``)}function m(e,t){let n=p(e,t).split(`/`),r=``;for(let e=n.length-1;e>=0;e--){let t=n[e];if(t){r=t;break}}return r??``}function h(e){if(e.endsWith(`.`)||e.endsWith(`/`))return;let r=t.c.exec(o(e));return r&&r.length>0&&n.t(r[0])?r[0].replace(`.`,``):void 0}function g(e){return!!h(e)}function _(...n){n=n.map(e=>o(e));let r=``,i=!1;for(let a=n.length-1;a>=-1&&!i;a--){let o=a>=0?n[a]:e.t();!o||o.length===0||(r=`${o}/${r}`,i=t.r(o))}return r=l(r,!i),i&&!t.r(r)?`/${r}`:r.length>0?r:`.`}function v(e,n){let r=_(e).replace(t.l,`$1`).split(`/`),i=_(n).replace(t.l,`$1`).split(`/`);if(i[0][1]===`:`&&r[0][1]===`:`&&r[0]!==i[0])return i.join(`/`);let a=[...r];for(let e of a){if(i[0]!==e)break;r.shift(),i.shift()}return[...r.map(()=>`..`),...i].join(`/`)}function y(e,t,n=!1){return v(n===!0?e:e.replace(/\/$/,``),n===!0?t:t.replace(/\/$/,``))}Object.defineProperty(exports,`a`,{enumerable:!0,get:function(){return g}}),Object.defineProperty(exports,`c`,{enumerable:!0,get:function(){return s}}),Object.defineProperty(exports,`d`,{enumerable:!0,get:function(){return a}}),Object.defineProperty(exports,`f`,{enumerable:!0,get:function(){return r}}),Object.defineProperty(exports,`i`,{enumerable:!0,get:function(){return m}}),Object.defineProperty(exports,`l`,{enumerable:!0,get:function(){return c}}),Object.defineProperty(exports,`n`,{enumerable:!0,get:function(){return f}}),Object.defineProperty(exports,`o`,{enumerable:!0,get:function(){return y}}),Object.defineProperty(exports,`r`,{enumerable:!0,get:function(){return p}}),Object.defineProperty(exports,`s`,{enumerable:!0,get:function(){return``}}),Object.defineProperty(exports,`t`,{enumerable:!0,get:function(){return h}}),Object.defineProperty(exports,`u`,{enumerable:!0,get:function(){return u}});
@@ -1,2 +0,0 @@
1
- import{t as e}from"./cwd-YTg9Cx6C.mjs";import{c as t,i as n,l as r,n as i,o as a,r as o,s,t as c,u as l}from"./join-paths-BHepkhAj.mjs";import{t as u}from"./is-set-string-Cj0g4gsG.mjs";function d(e,t){let n=i(e.replace(/\\/g,`/`).replace(/\/$/,``)),r=i(t.replace(/\\/g,`/`).replace(/\/$/,``));return n!==r&&n.startsWith(`${r}/`)}function f(t,n=e()){return i(d(t,n)?t:c(n,t))}function p(e,t){return`${e}.${t.replace(/^\./,``)}`}function m(e=``){return e&&i(e).replace(s,e=>e.toUpperCase())}function h(e){if(!e||e.length===0)return`.`;e=m(e);let t=e.match(l),r=n(e),i=e.endsWith(`/`);return e=_(e,!r),e.length===0?r?`/`:i?`./`:`.`:(i&&(e+=`/`),a.test(e)&&(e+=`/`),t?r?`//${e}`:`//./${e}`:!e.startsWith(`/`)&&r&&!a.test(e)?`/${e}`:e)}function g(e){if(!e||e.length===0)return`.`;e=h(e);let t=!1;return e.split(`/`).reduce((e,n)=>n?.trim()?t||n.includes(`*`)?(t=!0,e):e+(e?`/${n}`:n):e,``)}function _(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 v(t,r=e()){return n(t)?t:i(_(f(t,r),!0))}const y=``;function b(e,t={}){let{requireExtension:n=!1,withExtension:r=!0}=t,i=m(e)?.split(e?.includes(`\\`)?`\\`:`/`)?.pop()??``;return n===!0&&!i.includes(`.`)?``:r===!1&&i.includes(`.`)?i.replace(`.${C(i)??``}`,``)||``:i}function x(e,t={}){let n=m(e),r=n.replace(b(n,{requireExtension:!1,...t}),``);return r===`/`?r:r.replace(/\/$/,``)}function S(e,t){let n=x(e,t).split(`/`),r=``;for(let e=n.length-1;e>=0;e--){let t=n[e];if(t){r=t;break}}return r??``}function C(e){if(e.endsWith(`.`)||e.endsWith(`/`))return;let n=t.exec(m(e));return n&&n.length>0&&u(n[0])?n[0].replace(`.`,``):void 0}function w(e){return!!C(e)}function T(...t){t=t.map(e=>m(e));let n=``,r=!1;for(let i=t.length-1;i>=-1&&!r;i--){let a=i>=0?t[i]:e();!a||a.length===0||(n=`${a}/${n}`,r=o(a))}return n=_(n,!r),r&&!o(n)?`/${n}`:n.length>0?n:`.`}function E(e,t){let n=T(e).replace(r,`$1`).split(`/`),i=T(t).replace(r,`$1`).split(`/`);if(i[0][1]===`:`&&n[0][1]===`:`&&n[0]!==i[0])return i.join(`/`);let a=[...n];for(let e of a){if(i[0]!==e)break;n.shift(),i.shift()}return[...n.map(()=>`..`),...i].join(`/`)}function D(e,t,n=!1){return E(n===!0?e:e.replace(/\/$/,``),n===!0?t:t.replace(/\/$/,``))}export{w as a,h as c,p as d,d as f,S as i,g as l,b as n,D as o,x as r,y as s,C as t,v as u};
2
- //# sourceMappingURL=file-path-fns-BDzC2SIV.mjs.map