@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
@@ -1,106 +0,0 @@
1
- //#region src/resolve.d.ts
2
- declare const DEFAULT_EXTENSIONS: string[];
3
- interface ResolveOptions {
4
- /**
5
- * Paths to resolve the package from
6
- */
7
- paths?: string[];
8
- /**
9
- * File extensions to consider when resolving the module
10
- *
11
- * @remarks
12
- * Extensions can be provided with or without the leading dot. The resolver utilities will handle both cases.
13
- *
14
- * @defaultValue ["js", "jsx", "mjs", "cjs", "ts", "tsx", "mts", "cts", "json", "jsonc", "json5", "node", "wasm"]
15
- */
16
- extensions?: string[];
17
- /**
18
- * Conditions to consider when resolving package exports.
19
- */
20
- conditions?: string[];
21
- }
22
- /**
23
- * Get the resolution paths based on the provided paths, current working directory, and workspace root.
24
- *
25
- * @param paths - An array of paths to include in the resolution.
26
- * @returns An array of unique, corrected resolution paths.
27
- */
28
- declare function getResolutionPaths(paths?: string[]): string[];
29
- /**
30
- * Get the node_modules resolution paths based on the provided paths.
31
- *
32
- * @param paths - An array of paths to include in the resolution.
33
- * @returns An array of unique, corrected node_modules resolution paths.
34
- */
35
- declare function getNodeModulesPaths(paths?: string[]): string[];
36
- /**
37
- * Get all combinations of resolution paths for a given path and options.
38
- *
39
- * @param path - The base path to combine with resolution paths.
40
- * @param options - The options containing resolution paths.
41
- * @returns An array of unique, corrected resolution paths.
42
- */
43
- declare function getResolutionCombinations(path: string, options?: ResolveOptions): string[];
44
- /**
45
- * Resolve the path to a specified module
46
- *
47
- * @param path - The path to the module
48
- * @param options - The options to use when resolving the module
49
- * @returns A promise for the path to the module
50
- */
51
- declare function resolve(path: string, options?: ResolveOptions): Promise<string>;
52
- /**
53
- * Resolve the path to a specified module
54
- *
55
- * @param path - The path to the module
56
- * @param options - The options to use when resolving the module
57
- * @returns The path to the module or undefined
58
- */
59
- declare function resolveSync(path: string, options?: ResolveOptions): string;
60
- /**
61
- * Resolve the path to a specified module with error handling
62
- *
63
- * @param name - The name of the module
64
- * @param options - The options to use when resolving the module
65
- * @returns A promise for the path to the module
66
- */
67
- declare function resolveSafe(name: string, options?: ResolveOptions): Promise<string | undefined>;
68
- /**
69
- * Resolve the path to a specified module with error handling
70
- *
71
- * @param name - The name of the module
72
- * @param options - The options to use when resolving the module
73
- * @returns The path to the module or undefined
74
- */
75
- declare function resolveSafeSync(name: string, options?: ResolveOptions): string | undefined;
76
- /**
77
- * Import a module from a specified path
78
- *
79
- * @param path - The path to the module
80
- * @returns The module
81
- */
82
- declare function importModule<T = any>(path: string): Promise<T>;
83
- /**
84
- * Resolve the path to a specified package asynchronously
85
- *
86
- * @remarks
87
- * This path points to the root of the package, which is usually the directory containing the `package.json` file. Please note: this path does not include the `package.json` file itself.
88
- *
89
- * @param name - The name of the module
90
- * @returns A promise for the module or undefined
91
- */
92
- declare function resolvePackage(name: string, options?: ResolveOptions): Promise<string | undefined>;
93
- /**
94
- * Resolve the path to a specified package synchronously
95
- *
96
- * @remarks
97
- * This path points to the root of the package, which is usually the directory containing the `package.json` file. Please note: this path does not include the `package.json` file itself.
98
- *
99
- * @param name - The name of the module
100
- * @param options - The options to use when resolving the module
101
- * @returns The module or undefined
102
- */
103
- declare function resolvePackageSync(name: string, options?: ResolveOptions): string | undefined;
104
- //#endregion
105
- export { getResolutionPaths as a, resolvePackage as c, resolveSafeSync as d, resolveSync as f, getResolutionCombinations as i, resolvePackageSync as l, ResolveOptions as n, importModule as o, getNodeModulesPaths as r, resolve as s, DEFAULT_EXTENSIONS as t, resolveSafe as u };
106
- //# sourceMappingURL=resolve-D66oIwjf.d.mts.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"resolve-D66oIwjf.d.mts","names":[],"sources":["../src/resolve.ts"],"sourcesContent":[],"mappings":";cAkCa;AAAA,UAeI,cAAA,CAFhB;EAEgB;AA4BjB;AAuCA;EAuBgB,KAAA,CAAA,EAAA,MAAA,EAAA;EA4CM;AA2DtB;AAuEA;AAeA;AAcA;AAmBA;AAyBA;;;;;;;;;;;;;;iBArTgB,kBAAA;;;;;;;iBAuCA,mBAAA;;;;;;;;iBAuBA,yBAAA,yBAEL;;;;;;;;iBA0CW,OAAA,yBAEX,iBACR;;;;;;;;iBAwDa,WAAA,yBAAmC;;;;;;;;iBAuE7B,WAAA,yBAAmC,iBAAmB;;;;;;;;iBAe5D,eAAA,yBAAuC;;;;;;;iBAcjC,qCAAqC,QAAQ;;;;;;;;;;iBAmB7C,cAAA,yBAEX,iBAAmB;;;;;;;;;;;iBAuBd,kBAAA,yBAA0C"}
@@ -1,3 +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(`./get-workspace-root-CCNjjZGY.cjs`),a=require(`./exists-B31lSRFp.cjs`);let o=require(`mlly`);const s=e=>[...new Set(e)],c=[`js`,`jsx`,`mjs`,`cjs`,`ts`,`tsx`,`mts`,`cts`,`json`,`jsonc`,`json5`,`node`];function l(e=[]){let a=e;a.includes(t.t())||a.push(t.t());let o=i.i();return a.includes(o)||a.push(o),a=s(a.filter(Boolean).map(e=>r.c(e)).reduce((e,i,a,s)=>(e.push(i),n.i(i)||(e.push(r.u(i,t.t())),e.push(r.u(i,o)),s.forEach(t=>{e.push(r.u(i,t))})),e),[])),a}function u(e=[]){return s(e.reduce((e,t)=>(r.i(t)===`node_modules`&&e.push(r.c(t)),a.n(n.t(t,`node_modules`))&&e.push(r.c(n.t(t,`node_modules`))),e),[]))}function d(e,t={}){let i=l(t.paths);n.a(e)?i=u(i):i.push(...u(i));let a=t.extensions??c,o=i.map(t=>n.t(t,e));return r.n(e,{withExtension:!1})!==`index`&&(o=o.reduce((e,t)=>(e.push(t),e.push(n.t(t,`index`)),e),[])),r.t(e)||(o=o.reduce((e,t)=>(e.push(t),a.forEach(n=>{e.push(r.d(t,n))}),e),[])),s(o.filter(Boolean)).map(e=>r.c(e))}async function f(e,t={}){let i=l(t.paths);n.a(e)?i=u(i):i.push(...u(i));let a,s;try{a=await(0,o.resolvePath)(e,{url:i,extensions:t.extensions??c,conditions:t.conditions})}catch(e){s=e}if(!a)throw Error(`Unable to resolve module "${e}". The following import paths were tried: \n${i.join(`
2
- `)}`,{cause:s});return r.c(a)}function p(e,t={}){let i=l(t.paths);n.a(e)?i=u(i):i.push(...u(i));let a,s;try{a=(0,o.resolvePathSync)(e,{url:i,extensions:t.extensions??c,conditions:t.conditions})}catch(e){s=e}if(!a)throw Error(`Unable to resolve module "${e}". The following import paths were tried: \n${i.join(`
3
- `)}`,{cause:s});return r.c(a)}async function m(e,t={}){try{return await f(e,t)}catch{return}}function h(e,t={}){try{return p(e,t)}catch{return}}async function g(e){let t=await import(e);return t&&(0,o.interopDefault)(t)}async function _(e,t={}){let i=await m(n.t(e,`package.json`),t);return i||(i=await m(n.t(e,`index.js`),t),i||=await m(e,t)),i?r.r(i):void 0}function v(e,t={}){let i=h(n.t(e,`package.json`),t);return i||(i=h(n.t(e,`index.js`),t),i||=h(e,t)),i?r.r(i):void 0}Object.defineProperty(exports,`a`,{enumerable:!0,get:function(){return g}}),Object.defineProperty(exports,`c`,{enumerable:!0,get:function(){return v}}),Object.defineProperty(exports,`d`,{enumerable:!0,get:function(){return p}}),Object.defineProperty(exports,`i`,{enumerable:!0,get:function(){return l}}),Object.defineProperty(exports,`l`,{enumerable:!0,get:function(){return m}}),Object.defineProperty(exports,`n`,{enumerable:!0,get:function(){return u}}),Object.defineProperty(exports,`o`,{enumerable:!0,get:function(){return f}}),Object.defineProperty(exports,`r`,{enumerable:!0,get:function(){return d}}),Object.defineProperty(exports,`s`,{enumerable:!0,get:function(){return _}}),Object.defineProperty(exports,`t`,{enumerable:!0,get:function(){return c}}),Object.defineProperty(exports,`u`,{enumerable:!0,get:function(){return h}});
@@ -1,106 +0,0 @@
1
- //#region src/resolve.d.ts
2
- declare const DEFAULT_EXTENSIONS: string[];
3
- interface ResolveOptions {
4
- /**
5
- * Paths to resolve the package from
6
- */
7
- paths?: string[];
8
- /**
9
- * File extensions to consider when resolving the module
10
- *
11
- * @remarks
12
- * Extensions can be provided with or without the leading dot. The resolver utilities will handle both cases.
13
- *
14
- * @defaultValue ["js", "jsx", "mjs", "cjs", "ts", "tsx", "mts", "cts", "json", "jsonc", "json5", "node", "wasm"]
15
- */
16
- extensions?: string[];
17
- /**
18
- * Conditions to consider when resolving package exports.
19
- */
20
- conditions?: string[];
21
- }
22
- /**
23
- * Get the resolution paths based on the provided paths, current working directory, and workspace root.
24
- *
25
- * @param paths - An array of paths to include in the resolution.
26
- * @returns An array of unique, corrected resolution paths.
27
- */
28
- declare function getResolutionPaths(paths?: string[]): string[];
29
- /**
30
- * Get the node_modules resolution paths based on the provided paths.
31
- *
32
- * @param paths - An array of paths to include in the resolution.
33
- * @returns An array of unique, corrected node_modules resolution paths.
34
- */
35
- declare function getNodeModulesPaths(paths?: string[]): string[];
36
- /**
37
- * Get all combinations of resolution paths for a given path and options.
38
- *
39
- * @param path - The base path to combine with resolution paths.
40
- * @param options - The options containing resolution paths.
41
- * @returns An array of unique, corrected resolution paths.
42
- */
43
- declare function getResolutionCombinations(path: string, options?: ResolveOptions): string[];
44
- /**
45
- * Resolve the path to a specified module
46
- *
47
- * @param path - The path to the module
48
- * @param options - The options to use when resolving the module
49
- * @returns A promise for the path to the module
50
- */
51
- declare function resolve(path: string, options?: ResolveOptions): Promise<string>;
52
- /**
53
- * Resolve the path to a specified module
54
- *
55
- * @param path - The path to the module
56
- * @param options - The options to use when resolving the module
57
- * @returns The path to the module or undefined
58
- */
59
- declare function resolveSync(path: string, options?: ResolveOptions): string;
60
- /**
61
- * Resolve the path to a specified module with error handling
62
- *
63
- * @param name - The name of the module
64
- * @param options - The options to use when resolving the module
65
- * @returns A promise for the path to the module
66
- */
67
- declare function resolveSafe(name: string, options?: ResolveOptions): Promise<string | undefined>;
68
- /**
69
- * Resolve the path to a specified module with error handling
70
- *
71
- * @param name - The name of the module
72
- * @param options - The options to use when resolving the module
73
- * @returns The path to the module or undefined
74
- */
75
- declare function resolveSafeSync(name: string, options?: ResolveOptions): string | undefined;
76
- /**
77
- * Import a module from a specified path
78
- *
79
- * @param path - The path to the module
80
- * @returns The module
81
- */
82
- declare function importModule<T = any>(path: string): Promise<T>;
83
- /**
84
- * Resolve the path to a specified package asynchronously
85
- *
86
- * @remarks
87
- * This path points to the root of the package, which is usually the directory containing the `package.json` file. Please note: this path does not include the `package.json` file itself.
88
- *
89
- * @param name - The name of the module
90
- * @returns A promise for the module or undefined
91
- */
92
- declare function resolvePackage(name: string, options?: ResolveOptions): Promise<string | undefined>;
93
- /**
94
- * Resolve the path to a specified package synchronously
95
- *
96
- * @remarks
97
- * This path points to the root of the package, which is usually the directory containing the `package.json` file. Please note: this path does not include the `package.json` file itself.
98
- *
99
- * @param name - The name of the module
100
- * @param options - The options to use when resolving the module
101
- * @returns The module or undefined
102
- */
103
- declare function resolvePackageSync(name: string, options?: ResolveOptions): string | undefined;
104
- //#endregion
105
- export { getResolutionPaths as a, resolvePackage as c, resolveSafeSync as d, resolveSync as f, getResolutionCombinations as i, resolvePackageSync as l, ResolveOptions as n, importModule as o, getNodeModulesPaths as r, resolve as s, DEFAULT_EXTENSIONS as t, resolveSafe as u };
106
- //# sourceMappingURL=resolve-DubH-8qd.d.cts.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"resolve-DubH-8qd.d.cts","names":[],"sources":["../src/resolve.ts"],"sourcesContent":[],"mappings":";cAkCa;AAAA,UAeI,cAAA,CAFhB;EAEgB;AA4BjB;AAuCA;EAuBgB,KAAA,CAAA,EAAA,MAAA,EAAA;EA4CM;AA2DtB;AAuEA;AAeA;AAcA;AAmBA;AAyBA;;;;;;;;;;;;;;iBArTgB,kBAAA;;;;;;;iBAuCA,mBAAA;;;;;;;;iBAuBA,yBAAA,yBAEL;;;;;;;;iBA0CW,OAAA,yBAEX,iBACR;;;;;;;;iBAwDa,WAAA,yBAAmC;;;;;;;;iBAuE7B,WAAA,yBAAmC,iBAAmB;;;;;;;;iBAe5D,eAAA,yBAAuC;;;;;;;iBAcjC,qCAAqC,QAAQ;;;;;;;;;;iBAmB7C,cAAA,yBAEX,iBAAmB;;;;;;;;;;;iBAuBd,kBAAA,yBAA0C"}
@@ -1,2 +0,0 @@
1
- import{t as e}from"./join-paths-BHepkhAj.mjs";const t=(t,n=1)=>{let r=t.replaceAll(/\/+$/g,``);for(let t=0;t<n;t++)r=e(r,`..`);return r};export{t};
2
- //# sourceMappingURL=resolve-parent-path-CR8av8WP.mjs.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"resolve-parent-path-CR8av8WP.mjs","names":[],"sources":["../../path/src/resolve-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 { joinPaths } from \"./join-paths\";\n\n/**\n * Resolve the parent path of the provided path.\n *\n * @param path - The path to resolve.\n * @param count - The number of parent directories to traverse.\n * @returns The parent path of the provided path.\n */\nexport const resolveParentPath = (path: string, count: number = 1): string => {\n let parentPath = path.replaceAll(/\\/+$/g, \"\");\n for (let i = 0; i < count; i++) {\n parentPath = joinPaths(parentPath, \"..\");\n }\n return parentPath;\n};\n"],"mappings":"8CA2BA,MAAa,GAAqB,EAAc,EAAgB,IAAc,CAC5E,IAAI,EAAa,EAAK,WAAW,QAAS,GAAG,CAC7C,IAAK,IAAI,EAAI,EAAG,EAAI,EAAO,IACzB,EAAa,EAAU,EAAY,KAAK,CAE1C,OAAO"}
@@ -1 +0,0 @@
1
- const e=require(`./join-paths-DUdaieID.cjs`),t=(t,n=1)=>{let r=t.replaceAll(/\/+$/g,``);for(let t=0;t<n;t++)r=e.t(r,`..`);return r};Object.defineProperty(exports,`t`,{enumerable:!0,get:function(){return t}});
@@ -1,92 +0,0 @@
1
- import { CoerceOptions, Range, ReleaseType, SemVer } from "semver";
2
-
3
- //#region src/semver-fns.d.ts
4
-
5
- /**
6
- * Parse a semver string into a SemVer object
7
- *
8
- * @param semver - The semver string to parse
9
- * @param loose - Whether to use loose parsing
10
- * @returns The parsed SemVer object
11
- */
12
- declare const parseVersion: (semver: string, loose?: boolean) => SemVer | null;
13
- /**
14
- * Coerce a version string into a valid SemVer string
15
- *
16
- * @param version - The version string or number or {@link SemVer} to coerce
17
- * @param options - Options to use when coercing the version
18
- * @returns The coerced SemVer string or null if invalid
19
- */
20
- declare const coerceVersion: (version: string | number | SemVer | null | undefined, options?: CoerceOptions) => SemVer | null;
21
- /**
22
- * Type check for {@link SemVer}
23
- *
24
- * @param val - The value to check
25
- * @returns Whether the value is a valid {@link SemVer}
26
- */
27
- declare const isSemver: (val: any) => val is SemVer;
28
- /**
29
- * Type check for {@link Range}
30
- *
31
- * @param val - The value to check
32
- * @returns Whether the value is a valid {@link Range}
33
- */
34
- declare const isRange: (val: any) => val is Range;
35
- /**
36
- * Check if a {@link SemVer} string is valid
37
- *
38
- * @remarks
39
- * If you're looking for type checking, please use the {@link isSemver} function.
40
- *
41
- * @param semver - The semver string to check
42
- * @param loose - Whether to use loose parsing
43
- * @returns Whether the semver string is valid
44
- */
45
- declare const isValidSemver: (semver: any, loose?: boolean) => boolean;
46
- /**
47
- * Check if a {@link Range} string is valid
48
- *
49
- * @remarks
50
- * If you're looking for type checking, please use the {@link isRange} function.
51
- *
52
- * @param range - The range string to check
53
- * @param loose - Whether to use loose parsing
54
- * @returns Whether the range string is valid
55
- */
56
- declare const isValidRange: (range: any, loose?: boolean) => boolean;
57
- /**
58
- * Check if a {@link SemVer} or {@link Range} string is valid
59
- *
60
- * @param version - The semver string to check
61
- * @param loose - Whether to use loose parsing
62
- * @returns Whether the semver string is valid
63
- */
64
- declare const isValidVersion: (version: string | SemVer | Range | null | undefined, loose?: boolean) => boolean;
65
- /**
66
- * Check if a semver string satisfies a range
67
- *
68
- * @param version - The semver string to check
69
- * @param range - The range to check against
70
- * @param loose - Whether to use loose parsing
71
- * @returns Whether the semver string satisfies the range
72
- */
73
- declare const satisfiesVersion: (version: string | SemVer | null | undefined, range: string | Range | null | undefined, loose?: boolean) => boolean;
74
- /**
75
- * Check if a string is a valid relative version keyword
76
- *
77
- * @param val - The string to check
78
- * @returns Whether the string is a valid relative version keyword
79
- */
80
- declare const isRelativeVersionKeyword: (val: string) => val is ReleaseType;
81
- /**
82
- * Derive a new semver version from the current version and a version specifier
83
- *
84
- * @param currentSemverVersion - The current semver version
85
- * @param semverSpecifier - The semver specifier to use
86
- * @param preid - The pre-release identifier to use
87
- * @returns The derived new semver version
88
- */
89
- declare const deriveNewSemverVersion: (currentSemverVersion: string, semverSpecifier: string, preid?: string) => string;
90
- //#endregion
91
- export { isSemver as a, isValidVersion as c, isRelativeVersionKeyword as i, parseVersion as l, deriveNewSemverVersion as n, isValidRange as o, isRange as r, isValidSemver as s, coerceVersion as t, satisfiesVersion as u };
92
- //# sourceMappingURL=semver-fns-B0e5zB6C.d.mts.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"semver-fns-B0e5zB6C.d.mts","names":[],"sources":["../src/semver-fns.ts"],"sourcesContent":[],"mappings":";;;;;;AAsCA;AAUA;;;;AAGS,cAbI,YAaJ,EAAA,CAAA,MAAA,EAAA,MAAA,EAAA,KAAA,CAAA,EAAA,OAAA,EAAA,GAbgD,MAahD,GAAA,IAAA;AAUT;AAUA;AAcA;AAgBA;AAaA;AAeA;AAuBA;AAYa,cApHA,aAmJZ,EAAA,CAAA,OAAA,EAAA,MAAA,GAAA,MAAA,GAlJ4B,MAkJ5B,GAAA,IAAA,GAAA,SAAA,EAAA,OAAA,CAAA,EAjJW,aAiJX,EAAA,GAhJE,MAgJF,GAAA,IAAA;;;;;;;cAtIY,+BAA8B;;;;;;;cAU9B,8BAA6B;;;;;;;;;;;cAc7B;;;;;;;;;;;cAgBA;;;;;;;;cAaA,mCACO,SAAS;;;;;;;;;cAchB,qCACO,2CACF;;;;;;;cAqBL,kDAAiD;;;;;;;;;cAYjD"}
@@ -1 +0,0 @@
1
- const e=require(`./chunk-Bmb41Sf3.cjs`),t=require(`./is-string-DKgNS0jA.cjs`),n=require(`./is-object-FBXmvehR.cjs`);let r=require(`semver`);const i=(e,t=!0)=>(0,r.parse)(e,t),a=(e,t)=>(0,r.coerce)(e,t),o=e=>n.t(e)&&`version`in e,s=e=>n.t(e)&&`range`in e,c=(e,n=!0)=>(t.t(e)||o(e))&&(0,r.valid)(e,n)!==null,l=(e,n=!0)=>(t.t(e)||s(e))&&(0,r.validRange)(e,n)!==null,u=(e,t=!0)=>c(e,t)||l(e,t),d=(e,t,n=!0)=>!e||!t||!c(e,n)||!l(t,n)?!1:(0,r.satisfies)(e,t,{loose:n}),f=e=>r.RELEASE_TYPES.includes(e),p=(e,t,n)=>{if(!(0,r.valid)(e))throw Error(`Invalid semver version "${e}" provided.`);let i=t;if(f(t)){let a=(0,r.inc)(e,t,n);if(!a)throw Error(`Unable to derive new version from current version "${e}" and version specifier "${t}"`);i=a}else if(!(0,r.valid)(t))throw Error(`Invalid semver version specifier "${t}" provided. Please provide either a valid semver version or a valid semver version keyword.`);return i};Object.defineProperty(exports,`a`,{enumerable:!0,get:function(){return o}}),Object.defineProperty(exports,`c`,{enumerable:!0,get:function(){return u}}),Object.defineProperty(exports,`i`,{enumerable:!0,get:function(){return f}}),Object.defineProperty(exports,`l`,{enumerable:!0,get:function(){return i}}),Object.defineProperty(exports,`n`,{enumerable:!0,get:function(){return p}}),Object.defineProperty(exports,`o`,{enumerable:!0,get:function(){return l}}),Object.defineProperty(exports,`r`,{enumerable:!0,get:function(){return s}}),Object.defineProperty(exports,`s`,{enumerable:!0,get:function(){return c}}),Object.defineProperty(exports,`t`,{enumerable:!0,get:function(){return a}}),Object.defineProperty(exports,`u`,{enumerable:!0,get:function(){return d}});
@@ -1,92 +0,0 @@
1
- import { CoerceOptions, Range, ReleaseType, SemVer } from "semver";
2
-
3
- //#region src/semver-fns.d.ts
4
-
5
- /**
6
- * Parse a semver string into a SemVer object
7
- *
8
- * @param semver - The semver string to parse
9
- * @param loose - Whether to use loose parsing
10
- * @returns The parsed SemVer object
11
- */
12
- declare const parseVersion: (semver: string, loose?: boolean) => SemVer | null;
13
- /**
14
- * Coerce a version string into a valid SemVer string
15
- *
16
- * @param version - The version string or number or {@link SemVer} to coerce
17
- * @param options - Options to use when coercing the version
18
- * @returns The coerced SemVer string or null if invalid
19
- */
20
- declare const coerceVersion: (version: string | number | SemVer | null | undefined, options?: CoerceOptions) => SemVer | null;
21
- /**
22
- * Type check for {@link SemVer}
23
- *
24
- * @param val - The value to check
25
- * @returns Whether the value is a valid {@link SemVer}
26
- */
27
- declare const isSemver: (val: any) => val is SemVer;
28
- /**
29
- * Type check for {@link Range}
30
- *
31
- * @param val - The value to check
32
- * @returns Whether the value is a valid {@link Range}
33
- */
34
- declare const isRange: (val: any) => val is Range;
35
- /**
36
- * Check if a {@link SemVer} string is valid
37
- *
38
- * @remarks
39
- * If you're looking for type checking, please use the {@link isSemver} function.
40
- *
41
- * @param semver - The semver string to check
42
- * @param loose - Whether to use loose parsing
43
- * @returns Whether the semver string is valid
44
- */
45
- declare const isValidSemver: (semver: any, loose?: boolean) => boolean;
46
- /**
47
- * Check if a {@link Range} string is valid
48
- *
49
- * @remarks
50
- * If you're looking for type checking, please use the {@link isRange} function.
51
- *
52
- * @param range - The range string to check
53
- * @param loose - Whether to use loose parsing
54
- * @returns Whether the range string is valid
55
- */
56
- declare const isValidRange: (range: any, loose?: boolean) => boolean;
57
- /**
58
- * Check if a {@link SemVer} or {@link Range} string is valid
59
- *
60
- * @param version - The semver string to check
61
- * @param loose - Whether to use loose parsing
62
- * @returns Whether the semver string is valid
63
- */
64
- declare const isValidVersion: (version: string | SemVer | Range | null | undefined, loose?: boolean) => boolean;
65
- /**
66
- * Check if a semver string satisfies a range
67
- *
68
- * @param version - The semver string to check
69
- * @param range - The range to check against
70
- * @param loose - Whether to use loose parsing
71
- * @returns Whether the semver string satisfies the range
72
- */
73
- declare const satisfiesVersion: (version: string | SemVer | null | undefined, range: string | Range | null | undefined, loose?: boolean) => boolean;
74
- /**
75
- * Check if a string is a valid relative version keyword
76
- *
77
- * @param val - The string to check
78
- * @returns Whether the string is a valid relative version keyword
79
- */
80
- declare const isRelativeVersionKeyword: (val: string) => val is ReleaseType;
81
- /**
82
- * Derive a new semver version from the current version and a version specifier
83
- *
84
- * @param currentSemverVersion - The current semver version
85
- * @param semverSpecifier - The semver specifier to use
86
- * @param preid - The pre-release identifier to use
87
- * @returns The derived new semver version
88
- */
89
- declare const deriveNewSemverVersion: (currentSemverVersion: string, semverSpecifier: string, preid?: string) => string;
90
- //#endregion
91
- export { isSemver as a, isValidVersion as c, isRelativeVersionKeyword as i, parseVersion as l, deriveNewSemverVersion as n, isValidRange as o, isRange as r, isValidSemver as s, coerceVersion as t, satisfiesVersion as u };
92
- //# sourceMappingURL=semver-fns-DjhZXnUw.d.cts.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"semver-fns-DjhZXnUw.d.cts","names":[],"sources":["../src/semver-fns.ts"],"sourcesContent":[],"mappings":";;;;;;AAsCA;AAUA;;;;AAGS,cAbI,YAaJ,EAAA,CAAA,MAAA,EAAA,MAAA,EAAA,KAAA,CAAA,EAAA,OAAA,EAAA,GAbgD,MAahD,GAAA,IAAA;AAUT;AAUA;AAcA;AAgBA;AAaA;AAeA;AAuBA;AAYa,cApHA,aAmJZ,EAAA,CAAA,OAAA,EAAA,MAAA,GAAA,MAAA,GAlJ4B,MAkJ5B,GAAA,IAAA,GAAA,SAAA,EAAA,OAAA,CAAA,EAjJW,aAiJX,EAAA,GAhJE,MAgJF,GAAA,IAAA;;;;;;;cAtIY,+BAA8B;;;;;;;cAU9B,8BAA6B;;;;;;;;;;;cAc7B;;;;;;;;;;;cAgBA;;;;;;;;cAaA,mCACO,SAAS;;;;;;;;;cAchB,qCACO,2CACF;;;;;;;cAqBL,kDAAiD;;;;;;;;;cAYjD"}
@@ -1,2 +0,0 @@
1
- import{t as e}from"./is-string-91Z3dOKQ.mjs";import{t}from"./is-object-UsKYhyC5.mjs";import{RELEASE_TYPES as n,coerce as r,inc as i,parse as a,satisfies as o,valid as s,validRange as c}from"semver";const l=(e,t=!0)=>a(e,t),u=(e,t)=>r(e,t),d=e=>t(e)&&`version`in e,f=e=>t(e)&&`range`in e,p=(t,n=!0)=>(e(t)||d(t))&&s(t,n)!==null,m=(t,n=!0)=>(e(t)||f(t))&&c(t,n)!==null,h=(e,t=!0)=>p(e,t)||m(e,t),g=(e,t,n=!0)=>!e||!t||!p(e,n)||!m(t,n)?!1:o(e,t,{loose:n}),_=e=>n.includes(e),v=(e,t,n)=>{if(!s(e))throw Error(`Invalid semver version "${e}" provided.`);let r=t;if(_(t)){let a=i(e,t,n);if(!a)throw Error(`Unable to derive new version from current version "${e}" and version specifier "${t}"`);r=a}else if(!s(t))throw Error(`Invalid semver version specifier "${t}" provided. Please provide either a valid semver version or a valid semver version keyword.`);return r};export{d as a,h as c,_ as i,l,v as n,m as o,f as r,p as s,u as t,g as u};
2
- //# sourceMappingURL=semver-fns-F_rYnwDq.mjs.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"semver-fns-F_rYnwDq.mjs","names":[],"sources":["../src/semver-fns.ts"],"sourcesContent":["/* -------------------------------------------------------------------\n\n ⚡ Storm Software - Stryke\n\n This code was released as part of the Stryke project. Stryke\n is maintained by Storm Software under the Apache-2.0 license, and is\n free for commercial and private use. For more information, please visit\n our licensing page at https://stormsoftware.com/licenses/projects/stryke.\n\n Website: https://stormsoftware.com\n Repository: https://github.com/storm-software/stryke\n Documentation: https://docs.stormsoftware.com/projects/stryke\n Contact: https://stormsoftware.com/contact\n\n SPDX-License-Identifier: Apache-2.0\n\n ------------------------------------------------------------------- */\n\nimport { isObject } from \"@stryke/type-checks/is-object\";\nimport { isString } from \"@stryke/type-checks/is-string\";\nimport type { CoerceOptions, Range, ReleaseType, SemVer } from \"semver\";\nimport {\n RELEASE_TYPES,\n coerce,\n inc,\n parse,\n satisfies,\n valid,\n validRange\n} from \"semver\";\n\n/**\n * Parse a semver string into a SemVer object\n *\n * @param semver - The semver string to parse\n * @param loose - Whether to use loose parsing\n * @returns The parsed SemVer object\n */\nexport const parseVersion = (semver: string, loose = true) =>\n parse(semver, loose);\n\n/**\n * Coerce a version string into a valid SemVer string\n *\n * @param version - The version string or number or {@link SemVer} to coerce\n * @param options - Options to use when coercing the version\n * @returns The coerced SemVer string or null if invalid\n */\nexport const coerceVersion = (\n version: string | number | SemVer | null | undefined,\n options?: CoerceOptions\n): SemVer | null => {\n return coerce(version, options);\n};\n\n/**\n * Type check for {@link SemVer}\n *\n * @param val - The value to check\n * @returns Whether the value is a valid {@link SemVer}\n */\nexport const isSemver = (val: any): val is SemVer => {\n return isObject(val) && \"version\" in val;\n};\n\n/**\n * Type check for {@link Range}\n *\n * @param val - The value to check\n * @returns Whether the value is a valid {@link Range}\n */\nexport const isRange = (val: any): val is Range => {\n return isObject(val) && \"range\" in val;\n};\n\n/**\n * Check if a {@link SemVer} string is valid\n *\n * @remarks\n * If you're looking for type checking, please use the {@link isSemver} function.\n *\n * @param semver - The semver string to check\n * @param loose - Whether to use loose parsing\n * @returns Whether the semver string is valid\n */\nexport const isValidSemver = (semver: any, loose = true): boolean => {\n return (\n (isString(semver) || isSemver(semver)) && valid(semver, loose) !== null\n );\n};\n\n/**\n * Check if a {@link Range} string is valid\n *\n * @remarks\n * If you're looking for type checking, please use the {@link isRange} function.\n *\n * @param range - The range string to check\n * @param loose - Whether to use loose parsing\n * @returns Whether the range string is valid\n */\nexport const isValidRange = (range: any, loose = true): boolean => {\n return (\n (isString(range) || isRange(range)) && validRange(range, loose) !== null\n );\n};\n\n/**\n * Check if a {@link SemVer} or {@link Range} string is valid\n *\n * @param version - The semver string to check\n * @param loose - Whether to use loose parsing\n * @returns Whether the semver string is valid\n */\nexport const isValidVersion = (\n version: string | SemVer | Range | null | undefined,\n loose = true\n) => {\n return isValidSemver(version, loose) || isValidRange(version, loose);\n};\n\n/**\n * Check if a semver string satisfies a range\n *\n * @param version - The semver string to check\n * @param range - The range to check against\n * @param loose - Whether to use loose parsing\n * @returns Whether the semver string satisfies the range\n */\nexport const satisfiesVersion = (\n version: string | SemVer | null | undefined,\n range: string | Range | null | undefined,\n loose = true\n) => {\n if (\n !version ||\n !range ||\n !isValidSemver(version, loose) ||\n !isValidRange(range, loose)\n ) {\n return false;\n }\n\n return satisfies(version, range, { loose });\n};\n\n/**\n * Check if a string is a valid relative version keyword\n *\n * @param val - The string to check\n * @returns Whether the string is a valid relative version keyword\n */\nexport const isRelativeVersionKeyword = (val: string): val is ReleaseType => {\n return RELEASE_TYPES.includes(val as ReleaseType);\n};\n\n/**\n * Derive a new semver version from the current version and a version specifier\n *\n * @param currentSemverVersion - The current semver version\n * @param semverSpecifier - The semver specifier to use\n * @param preid - The pre-release identifier to use\n * @returns The derived new semver version\n */\nexport const deriveNewSemverVersion = (\n currentSemverVersion: string,\n semverSpecifier: string,\n preid?: string\n) => {\n if (!valid(currentSemverVersion)) {\n throw new Error(\n `Invalid semver version \"${currentSemverVersion}\" provided.`\n );\n }\n\n let newVersion = semverSpecifier;\n\n if (isRelativeVersionKeyword(semverSpecifier)) {\n // Derive the new version from the current version combined with the new version specifier.\n const derivedVersion = inc(currentSemverVersion, semverSpecifier, preid!);\n\n if (!derivedVersion) {\n throw new Error(\n `Unable to derive new version from current version \"${currentSemverVersion}\" and version specifier \"${semverSpecifier}\"`\n );\n }\n newVersion = derivedVersion;\n } else if (!valid(semverSpecifier)) {\n // Ensure the new version specifier is a valid semver version, given it is not a valid semver keyword\n throw new Error(\n `Invalid semver version specifier \"${semverSpecifier}\" provided. Please provide either a valid semver version or a valid semver version keyword.`\n );\n }\n\n return newVersion;\n};\n"],"mappings":"sMAsCA,MAAa,GAAgB,EAAgB,EAAQ,KACnD,EAAM,EAAQ,EAAM,CAST,GACX,EACA,IAEO,EAAO,EAAS,EAAQ,CASpB,EAAY,GAChB,EAAS,EAAI,EAAI,YAAa,EAS1B,EAAW,GACf,EAAS,EAAI,EAAI,UAAW,EAaxB,GAAiB,EAAa,EAAQ,MAE9C,EAAS,EAAO,EAAI,EAAS,EAAO,GAAK,EAAM,EAAQ,EAAM,GAAK,KAc1D,GAAgB,EAAY,EAAQ,MAE5C,EAAS,EAAM,EAAI,EAAQ,EAAM,GAAK,EAAW,EAAO,EAAM,GAAK,KAW3D,GACX,EACA,EAAQ,KAED,EAAc,EAAS,EAAM,EAAI,EAAa,EAAS,EAAM,CAWzD,GACX,EACA,EACA,EAAQ,KAGN,CAAC,GACD,CAAC,GACD,CAAC,EAAc,EAAS,EAAM,EAC9B,CAAC,EAAa,EAAO,EAAM,CAEpB,GAGF,EAAU,EAAS,EAAO,CAAE,QAAO,CAAC,CAShC,EAA4B,GAChC,EAAc,SAAS,EAAmB,CAWtC,GACX,EACA,EACA,IACG,CACH,GAAI,CAAC,EAAM,EAAqB,CAC9B,MAAU,MACR,2BAA2B,EAAqB,aACjD,CAGH,IAAI,EAAa,EAEjB,GAAI,EAAyB,EAAgB,CAAE,CAE7C,IAAM,EAAiB,EAAI,EAAsB,EAAiB,EAAO,CAEzE,GAAI,CAAC,EACH,MAAU,MACR,sDAAsD,EAAqB,2BAA2B,EAAgB,GACvH,CAEH,EAAa,UACJ,CAAC,EAAM,EAAgB,CAEhC,MAAU,MACR,qCAAqC,EAAgB,6FACtD,CAGH,OAAO"}
@@ -1,4 +0,0 @@
1
- import{i as e,t}from"./read-file-B091zB64.mjs";import{n,t as r}from"./write-file-CFByoJkN.mjs";import i from"defu";import{parse as a,stringify as o}from"@ltd/j-toml";function s(t,n){let r=e(t);return n?.specificationVersion?a(r,n.specificationVersion,n?.multilineStringJoiner,n?.useBigInt,n?.xOptions):a(r)}async function c(e,n){let r=await t(e);return n?.specificationVersion?a(r,n.specificationVersion,n?.multilineStringJoiner,n?.useBigInt,n?.xOptions):a(r)}function l(e,t,r){return n(e,o(t,i(r??{},{newline:`
2
- `,newlineAround:`pairs`,indent:4,forceInlineArraySpacing:1})))}async function u(e,t,n){return r(e,o(t,i(n??{},{newline:`
3
- `,newlineAround:`pairs`,indent:4,forceInlineArraySpacing:1})))}export{l as i,s as n,u as r,c as t};
4
- //# sourceMappingURL=toml-CIgLQmP3.mjs.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"toml-CIgLQmP3.mjs","names":["parseToml","stringifyToml"],"sources":["../src/toml.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 { parse as parseToml, stringify as stringifyToml } from \"@ltd/j-toml\";\nimport defu from \"defu\";\nimport { readFile, readFileSync } from \"./read-file\";\nimport { writeFile, writeFileSync } from \"./write-file\";\n\nexport type XOptions = null | {\n readonly keys?: null | RegExp;\n readonly order?: boolean;\n readonly exact?: boolean;\n readonly multi?: boolean;\n readonly longer?: boolean;\n readonly string?: boolean;\n readonly comment?: boolean;\n readonly literal?: boolean;\n readonly null?: boolean;\n readonly tag?:\n | null\n | (<\n Table extends object & { [key: string | symbol]: any },\n Key extends string | symbol,\n Array extends any[],\n Index extends number,\n Tag extends string\n >(\n this: void,\n each:\n | { table: Table; key: Key; tag: Tag }\n | { array: Array; index: Index; tag: Tag }\n | { table: Table; key: Key; array: Array; index: Index; tag: Tag }\n ) => void);\n};\n\nexport interface TomlReadOptions {\n specificationVersion?: 1.0 | 0.5 | 0.4 | 0.3 | 0.2 | 0.1;\n multilineStringJoiner?: string;\n useBigInt?: boolean | number;\n xOptions?: XOptions;\n}\n\n/**\n * Reads a TOML file and returns the object the TOML content represents.\n *\n * @param path - A path to a file.\n * @param options - TOML parse options\n * @returns Object the TOML content of the file represents\n */\nexport function readTomlFileSync<T extends object = any>(\n path: string,\n options?: TomlReadOptions\n): T {\n const content = readFileSync(path);\n\n return (\n options?.specificationVersion\n ? parseToml(\n content,\n options.specificationVersion,\n options?.multilineStringJoiner,\n options?.useBigInt,\n options?.xOptions\n )\n : parseToml(content)\n ) as T;\n}\n\n/**\n * Reads a TOML file and returns the object the TOML content represents.\n *\n * @param path - A path to a file.\n * @param options - TOML parse options\n * @returns Object the TOML content of the file represents\n */\nexport async function readTomlFile<T extends object = any>(\n path: string,\n options?: TomlReadOptions\n): Promise<T> {\n const content = await readFile(path);\n\n return (\n options?.specificationVersion\n ? parseToml(\n content,\n options.specificationVersion,\n options?.multilineStringJoiner,\n options?.useBigInt,\n options?.xOptions\n )\n : parseToml(content)\n ) as T;\n}\n\nexport interface TomlWriteOptions {\n integer?: number;\n newline?: \"\\n\" | \"\\r\\n\";\n newlineAround?: \"document\" | \"section\" | \"header\" | \"pairs\" | \"pair\";\n indent?: string | number;\n T?: \"T\" | \"t\" | \" \";\n Z?: \"Z\" | \"z\";\n xNull?: boolean;\n xBeforeNewlineInMultilineTable?: \",\" | \"\";\n forceInlineArraySpacing?: 0 | 1 | 2 | 3;\n}\n\n/**\n * Reads a TOML file and returns the object the TOML content represents.\n *\n * @param path - A path to a file.\n * @param data - data which should be serialized/formatted to TOML and written to the file\n * @param options - TOML parse options\n */\nexport function writeTomlFileSync<T extends object = any>(\n path: string,\n data: T,\n options?: TomlWriteOptions\n): void {\n return writeFileSync(\n path,\n stringifyToml(\n data as any,\n defu(options ?? {}, {\n newline: \"\\n\",\n newlineAround: \"pairs\",\n indent: 4,\n forceInlineArraySpacing: 1\n }) as TomlWriteOptions\n )\n );\n}\n\n/**\n * Reads a TOML file and returns the object the TOML content represents.\n *\n * @param path - A path to a file.\n * @param data - data which should be serialized/formatted to TOML and written to the file\n * @param options - TOML parse options\n */\nexport async function writeTomlFile<T extends object = any>(\n path: string,\n data: T,\n options?: TomlWriteOptions\n): Promise<void> {\n return writeFile(\n path,\n stringifyToml(\n data as any,\n defu(options ?? {}, {\n newline: \"\\n\",\n newlineAround: \"pairs\",\n indent: 4,\n forceInlineArraySpacing: 1\n }) as TomlWriteOptions\n )\n );\n}\n"],"mappings":"sKAgEA,SAAgB,EACd,EACA,EACG,CACH,IAAM,EAAU,EAAa,EAAK,CAElC,OACE,GAAS,qBACLA,EACE,EACA,EAAQ,qBACR,GAAS,sBACT,GAAS,UACT,GAAS,SACV,CACDA,EAAU,EAAQ,CAW1B,eAAsB,EACpB,EACA,EACY,CACZ,IAAM,EAAU,MAAM,EAAS,EAAK,CAEpC,OACE,GAAS,qBACLA,EACE,EACA,EAAQ,qBACR,GAAS,sBACT,GAAS,UACT,GAAS,SACV,CACDA,EAAU,EAAQ,CAuB1B,SAAgB,EACd,EACA,EACA,EACM,CACN,OAAO,EACL,EACAC,EACE,EACA,EAAK,GAAW,EAAE,CAAE,CAClB,QAAS;EACT,cAAe,QACf,OAAQ,EACR,wBAAyB,EAC1B,CAAC,CACH,CACF,CAUH,eAAsB,EACpB,EACA,EACA,EACe,CACf,OAAO,EACL,EACAA,EACE,EACA,EAAK,GAAW,EAAE,CAAE,CAClB,QAAS;EACT,cAAe,QACf,OAAQ,EACR,wBAAyB,EAC1B,CAAC,CACH,CACF"}
@@ -1,81 +0,0 @@
1
- //#region src/toml.d.ts
2
- type XOptions = null | {
3
- readonly keys?: null | RegExp;
4
- readonly order?: boolean;
5
- readonly exact?: boolean;
6
- readonly multi?: boolean;
7
- readonly longer?: boolean;
8
- readonly string?: boolean;
9
- readonly comment?: boolean;
10
- readonly literal?: boolean;
11
- readonly null?: boolean;
12
- readonly tag?: null | (<Table extends object & {
13
- [key: string | symbol]: any;
14
- }, Key extends string | symbol, Array extends any[], Index extends number, Tag extends string>(this: void, each: {
15
- table: Table;
16
- key: Key;
17
- tag: Tag;
18
- } | {
19
- array: Array;
20
- index: Index;
21
- tag: Tag;
22
- } | {
23
- table: Table;
24
- key: Key;
25
- array: Array;
26
- index: Index;
27
- tag: Tag;
28
- }) => void);
29
- };
30
- interface TomlReadOptions {
31
- specificationVersion?: 1.0 | 0.5 | 0.4 | 0.3 | 0.2 | 0.1;
32
- multilineStringJoiner?: string;
33
- useBigInt?: boolean | number;
34
- xOptions?: XOptions;
35
- }
36
- /**
37
- * Reads a TOML file and returns the object the TOML content represents.
38
- *
39
- * @param path - A path to a file.
40
- * @param options - TOML parse options
41
- * @returns Object the TOML content of the file represents
42
- */
43
- declare function readTomlFileSync<T extends object = any>(path: string, options?: TomlReadOptions): T;
44
- /**
45
- * Reads a TOML file and returns the object the TOML content represents.
46
- *
47
- * @param path - A path to a file.
48
- * @param options - TOML parse options
49
- * @returns Object the TOML content of the file represents
50
- */
51
- declare function readTomlFile<T extends object = any>(path: string, options?: TomlReadOptions): Promise<T>;
52
- interface TomlWriteOptions {
53
- integer?: number;
54
- newline?: "\n" | "\r\n";
55
- newlineAround?: "document" | "section" | "header" | "pairs" | "pair";
56
- indent?: string | number;
57
- T?: "T" | "t" | " ";
58
- Z?: "Z" | "z";
59
- xNull?: boolean;
60
- xBeforeNewlineInMultilineTable?: "," | "";
61
- forceInlineArraySpacing?: 0 | 1 | 2 | 3;
62
- }
63
- /**
64
- * Reads a TOML file and returns the object the TOML content represents.
65
- *
66
- * @param path - A path to a file.
67
- * @param data - data which should be serialized/formatted to TOML and written to the file
68
- * @param options - TOML parse options
69
- */
70
- declare function writeTomlFileSync<T extends object = any>(path: string, data: T, options?: TomlWriteOptions): void;
71
- /**
72
- * Reads a TOML file and returns the object the TOML content represents.
73
- *
74
- * @param path - A path to a file.
75
- * @param data - data which should be serialized/formatted to TOML and written to the file
76
- * @param options - TOML parse options
77
- */
78
- declare function writeTomlFile<T extends object = any>(path: string, data: T, options?: TomlWriteOptions): Promise<void>;
79
- //#endregion
80
- export { readTomlFileSync as a, readTomlFile as i, TomlWriteOptions as n, writeTomlFile as o, XOptions as r, writeTomlFileSync as s, TomlReadOptions as t };
81
- //# sourceMappingURL=toml-D3X2QoaL.d.cts.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"toml-D3X2QoaL.d.cts","names":[],"sources":["../src/toml.ts"],"sourcesContent":[],"mappings":";KAuBY,QAAA;EAAA,SAAA,IAAQ,CAAA,EAAA,IAAA,GACK,MADL;EACK,SAAA,KAAA,CAAA,EAAA,OAAA;EAoBJ,SAAA,KAAA,CAAA,EAAA,OAAA;EAAY,SAAA,KAAA,CAAA,EAAA,OAAA;EAAU,SAAA,MAAA,CAAA,EAAA,OAAA;EACtB,SAAA,MAAA,CAAA,EAAA,OAAA;EAAc,SAAA,OAAA,CAAA,EAAA,OAAA;EAAY,SAAA,OAAA,CAAA,EAAA,OAAA;EAC1B,SAAA,IAAA,CAAA,EAAA,OAAA;EAAY,SAAA,GAAA,CAAA,EAAA,IAAA,GAAA,CAAA,CAAA,cAAA,MAAA,GAAA;IAAY,CAAA,GAAA,EAAA,MAAA,GAAA,MAAA,CAAA,EAAA,GAAA;EAAc,CAAA,EAAA,YAAA,MAAA,GAAA,MAAA,EAAA,cAAA,GAAA,EAAA,EAAA,cAAA,MAAA,EAAA,YAAA,MAAA,CAAA,CAAA,IAAA,EAAA,IAAA,EAAA,IAAA,EAAA;IAAY,KAAA,EAFlD,KAEkD;IAAG,GAAA,EAFzC,GAEyC;IAIzD,GAAA,EAN0B,GAM1B;EAcD,CAAA,GAAA;IA0BM,KAAA,EA7CD,KA6Ca;IAEtB,KAAA,EA/CuB,KA+CvB;IACD,GAAA,EAhDoC,GAgDpC;EAAR,CAAA,GAAA;IAAO,KAAA,EA/CW,KA+CX;IAgBO,GAAA,EA/DgB,GA+DhB;IAmBD,KAAA,EAlF6B,KAkF7B;IA0BM,KAAA,EA5GqC,KA4GxB;IAE3B,GAAA,EA9G+D,GA8G/D;EACI,CAAA,EAAA,GAAA,IAAA,CAAA;CACT;AAAO,UA5GO,eAAA,CA4GP;;;;aAxGG;;;;;;;;;iBAUG,iEAEJ,kBACT;;;;;;;;iBAuBmB,6DAEV,kBACT,QAAQ;UAgBM,gBAAA;;;;;;;;;;;;;;;;;;iBAmBD,8DAER,aACI;;;;;;;;iBAuBU,0DAEd,aACI,mBACT"}
@@ -1,3 +0,0 @@
1
- const e=require(`./chunk-Bmb41Sf3.cjs`),t=require(`./read-file-BB2WzW-N.cjs`),n=require(`./write-file-CqokudVp.cjs`);let r=require(`defu`);r=e.t(r);let i=require(`@ltd/j-toml`);function a(e,n){let r=t.i(e);return n?.specificationVersion?(0,i.parse)(r,n.specificationVersion,n?.multilineStringJoiner,n?.useBigInt,n?.xOptions):(0,i.parse)(r)}async function o(e,n){let r=await t.t(e);return n?.specificationVersion?(0,i.parse)(r,n.specificationVersion,n?.multilineStringJoiner,n?.useBigInt,n?.xOptions):(0,i.parse)(r)}function s(e,t,a){return n.n(e,(0,i.stringify)(t,(0,r.default)(a??{},{newline:`
2
- `,newlineAround:`pairs`,indent:4,forceInlineArraySpacing:1})))}async function c(e,t,a){return n.t(e,(0,i.stringify)(t,(0,r.default)(a??{},{newline:`
3
- `,newlineAround:`pairs`,indent:4,forceInlineArraySpacing:1})))}Object.defineProperty(exports,`i`,{enumerable:!0,get:function(){return s}}),Object.defineProperty(exports,`n`,{enumerable:!0,get:function(){return a}}),Object.defineProperty(exports,`r`,{enumerable:!0,get:function(){return c}}),Object.defineProperty(exports,`t`,{enumerable:!0,get:function(){return o}});