@stryke/fs 0.33.9 → 0.33.16

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 (310) hide show
  1. package/CHANGELOG.md +1280 -0
  2. package/README.md +18 -9
  3. package/dist/buffer-Ch164vki.cjs +1 -0
  4. package/dist/buffer-DDq-CW4J.mjs +2 -0
  5. package/dist/buffer-DDq-CW4J.mjs.map +1 -0
  6. package/dist/{buffer.d.ts → buffer-DgfUmhrc.d.mts} +8 -4
  7. package/dist/buffer-DgfUmhrc.d.mts.map +1 -0
  8. package/dist/buffer-DvCjrjQH.d.cts +32 -0
  9. package/dist/buffer-DvCjrjQH.d.cts.map +1 -0
  10. package/dist/buffer.cjs +1 -34
  11. package/dist/buffer.d.cts +2 -0
  12. package/dist/buffer.d.mts +2 -0
  13. package/dist/buffer.mjs +1 -1
  14. package/dist/{chmod-x.d.ts → chmod-x-BPr4tt2-.d.cts} +10 -6
  15. package/dist/chmod-x-BPr4tt2-.d.cts.map +1 -0
  16. package/dist/chmod-x-FOy3sak8.cjs +1 -0
  17. package/dist/chmod-x-QCk1GmQJ.d.mts +44 -0
  18. package/dist/chmod-x-QCk1GmQJ.d.mts.map +1 -0
  19. package/dist/chmod-x-q-TWdus7.mjs +2 -0
  20. package/dist/chmod-x-q-TWdus7.mjs.map +1 -0
  21. package/dist/chmod-x.cjs +1 -57
  22. package/dist/chmod-x.d.cts +2 -0
  23. package/dist/chmod-x.d.mts +2 -0
  24. package/dist/chmod-x.mjs +1 -1
  25. package/dist/chunk-Bmb41Sf3.cjs +1 -0
  26. package/dist/{command-exists.d.ts → command-exists-CuieR7rx.d.cts} +6 -2
  27. package/dist/command-exists-CuieR7rx.d.cts.map +1 -0
  28. package/dist/command-exists-D1bV-wSk.cjs +1 -0
  29. package/dist/command-exists-Dzb2kKT4.mjs +2 -0
  30. package/dist/command-exists-Dzb2kKT4.mjs.map +1 -0
  31. package/dist/command-exists-dBdtR0xj.d.mts +22 -0
  32. package/dist/command-exists-dBdtR0xj.d.mts.map +1 -0
  33. package/dist/command-exists.cjs +1 -71
  34. package/dist/command-exists.d.cts +2 -0
  35. package/dist/command-exists.d.mts +2 -0
  36. package/dist/command-exists.mjs +1 -1
  37. package/dist/compress-BiTxso15.mjs +2 -0
  38. package/dist/compress-BiTxso15.mjs.map +1 -0
  39. package/dist/compress-BjGbQqs_.cjs +1 -0
  40. package/dist/compress-CLAaOwH3.d.mts +16 -0
  41. package/dist/compress-CLAaOwH3.d.mts.map +1 -0
  42. package/dist/compress-CQve2a6h.d.cts +16 -0
  43. package/dist/compress-CQve2a6h.d.cts.map +1 -0
  44. package/dist/compress.cjs +1 -26
  45. package/dist/compress.d.cts +2 -0
  46. package/dist/compress.d.mts +2 -0
  47. package/dist/compress.mjs +1 -1
  48. package/dist/constants-D58o2CiO.d.cts +5 -0
  49. package/dist/constants-D58o2CiO.d.cts.map +1 -0
  50. package/dist/constants-DZz9LJgo.d.mts +5 -0
  51. package/dist/constants-DZz9LJgo.d.mts.map +1 -0
  52. package/dist/constants.cjs +0 -1
  53. package/dist/constants.d.cts +2 -0
  54. package/dist/constants.d.mts +2 -0
  55. package/dist/constants.mjs +1 -0
  56. package/dist/{copy-file.d.ts → copy-file-B5FJHiIK.d.mts} +11 -5
  57. package/dist/copy-file-B5FJHiIK.d.mts.map +1 -0
  58. package/dist/copy-file-Bot2YNtT.mjs +2 -0
  59. package/dist/copy-file-Bot2YNtT.mjs.map +1 -0
  60. package/dist/copy-file-DjH2Ho5e.d.cts +39 -0
  61. package/dist/copy-file-DjH2Ho5e.d.cts.map +1 -0
  62. package/dist/copy-file-Y1ilzocZ.cjs +1 -0
  63. package/dist/copy-file.cjs +1 -48
  64. package/dist/copy-file.d.cts +2 -0
  65. package/dist/copy-file.d.mts +2 -0
  66. package/dist/copy-file.mjs +1 -1
  67. package/dist/cwd-YTg9Cx6C.mjs +2 -0
  68. package/dist/cwd-YTg9Cx6C.mjs.map +1 -0
  69. package/dist/cwd-o2vq8Tk9.cjs +1 -0
  70. package/dist/{exists.d.ts → exists-175EN367.d.mts} +6 -2
  71. package/dist/exists-175EN367.d.mts.map +1 -0
  72. package/dist/exists-B31lSRFp.cjs +1 -0
  73. package/dist/exists-CVlDImzc.d.cts +18 -0
  74. package/dist/exists-CVlDImzc.d.cts.map +1 -0
  75. package/dist/exists-Ci-9lYmi.mjs +2 -0
  76. package/dist/exists-Ci-9lYmi.mjs.map +1 -0
  77. package/dist/exists.cjs +1 -15
  78. package/dist/exists.d.cts +2 -0
  79. package/dist/exists.d.mts +2 -0
  80. package/dist/exists.mjs +1 -1
  81. package/dist/file-D1uBqkpP.d.cts +32 -0
  82. package/dist/file-D1uBqkpP.d.cts.map +1 -0
  83. package/dist/file-DauFFmfh.d.mts +32 -0
  84. package/dist/file-DauFFmfh.d.mts.map +1 -0
  85. package/dist/file-path-fns-7aKacdLg.cjs +1 -0
  86. package/dist/file-path-fns-BDzC2SIV.mjs +2 -0
  87. package/dist/file-path-fns-BDzC2SIV.mjs.map +1 -0
  88. package/dist/get-parent-path-COkh6Pvl.d.mts +32 -0
  89. package/dist/get-parent-path-COkh6Pvl.d.mts.map +1 -0
  90. package/dist/get-parent-path-Cbqs2km7.d.cts +32 -0
  91. package/dist/get-parent-path-Cbqs2km7.d.cts.map +1 -0
  92. package/dist/get-parent-path-CfRkaB4R.cjs +1 -0
  93. package/dist/get-parent-path-DLFSyxSW.mjs +2 -0
  94. package/dist/get-parent-path-DLFSyxSW.mjs.map +1 -0
  95. package/dist/get-parent-path.cjs +1 -28
  96. package/dist/get-parent-path.d.cts +2 -0
  97. package/dist/get-parent-path.d.mts +2 -0
  98. package/dist/get-parent-path.mjs +1 -1
  99. package/dist/get-workspace-root-CCNjjZGY.cjs +1 -0
  100. package/dist/{get-workspace-root.d.ts → get-workspace-root-DQBvBd8X.d.mts} +12 -8
  101. package/dist/get-workspace-root-DQBvBd8X.d.mts.map +1 -0
  102. package/dist/get-workspace-root-eTfm1jII.d.cts +48 -0
  103. package/dist/get-workspace-root-eTfm1jII.d.cts.map +1 -0
  104. package/dist/get-workspace-root-k66w-wLW.mjs +2 -0
  105. package/dist/get-workspace-root-k66w-wLW.mjs.map +1 -0
  106. package/dist/get-workspace-root.cjs +1 -49
  107. package/dist/get-workspace-root.d.cts +2 -0
  108. package/dist/get-workspace-root.d.mts +2 -0
  109. package/dist/get-workspace-root.mjs +1 -1
  110. package/dist/helpers-BSEQb1fp.mjs +2 -0
  111. package/dist/helpers-BSEQb1fp.mjs.map +1 -0
  112. package/dist/{helpers.d.ts → helpers-CYWFZ-Uv.d.mts} +10 -6
  113. package/dist/helpers-CYWFZ-Uv.d.mts.map +1 -0
  114. package/dist/helpers-CgMOExPa.d.cts +50 -0
  115. package/dist/helpers-CgMOExPa.d.cts.map +1 -0
  116. package/dist/helpers-_MJ6PR-g.cjs +1 -0
  117. package/dist/helpers.cjs +1 -49
  118. package/dist/helpers.d.cts +2 -0
  119. package/dist/helpers.d.mts +2 -0
  120. package/dist/helpers.mjs +1 -1
  121. package/dist/index.cjs +1 -269
  122. package/dist/index.d.cts +25 -0
  123. package/dist/index.d.mts +25 -0
  124. package/dist/index.mjs +1 -1
  125. package/dist/install-B3bIjHoU.mjs +2 -0
  126. package/dist/install-B3bIjHoU.mjs.map +1 -0
  127. package/dist/install-CZ_S7NHm.cjs +1 -0
  128. package/dist/install-CxPsLO2t.d.cts +28 -0
  129. package/dist/install-CxPsLO2t.d.cts.map +1 -0
  130. package/dist/install-dYt7hlQn.d.mts +29 -0
  131. package/dist/install-dYt7hlQn.d.mts.map +1 -0
  132. package/dist/install.cjs +1 -25
  133. package/dist/install.d.cts +2 -0
  134. package/dist/install.d.mts +2 -0
  135. package/dist/install.mjs +1 -1
  136. package/dist/is-error-CjEyTRps.cjs +1 -0
  137. package/dist/is-error-CjVXmD_8.mjs +2 -0
  138. package/dist/is-error-CjVXmD_8.mjs.map +1 -0
  139. package/dist/is-file-BkFQev3M.cjs +1 -0
  140. package/dist/is-file-CNooe8Wz.mjs +2 -0
  141. package/dist/is-file-CNooe8Wz.mjs.map +1 -0
  142. package/dist/{is-file.d.ts → is-file-DjqOQrqY.d.mts} +8 -4
  143. package/dist/is-file-DjqOQrqY.d.mts.map +1 -0
  144. package/dist/is-file-DoBi2FN9.d.cts +36 -0
  145. package/dist/is-file-DoBi2FN9.d.cts.map +1 -0
  146. package/dist/is-file.cjs +1 -29
  147. package/dist/is-file.d.cts +2 -0
  148. package/dist/is-file.d.mts +2 -0
  149. package/dist/is-file.mjs +1 -1
  150. package/dist/is-object-FBXmvehR.cjs +1 -0
  151. package/dist/is-object-UsKYhyC5.mjs +2 -0
  152. package/dist/is-object-UsKYhyC5.mjs.map +1 -0
  153. package/dist/is-set-string-CLeu8BKX.cjs +1 -0
  154. package/dist/is-set-string-Cj0g4gsG.mjs +2 -0
  155. package/dist/is-set-string-Cj0g4gsG.mjs.map +1 -0
  156. package/dist/is-string-91Z3dOKQ.mjs +2 -0
  157. package/dist/is-string-91Z3dOKQ.mjs.map +1 -0
  158. package/dist/is-string-DKgNS0jA.cjs +1 -0
  159. package/dist/join-paths-BHepkhAj.mjs +2 -0
  160. package/dist/join-paths-BHepkhAj.mjs.map +1 -0
  161. package/dist/join-paths-DUdaieID.cjs +1 -0
  162. package/dist/json-CYenVxvr.d.cts +83 -0
  163. package/dist/json-CYenVxvr.d.cts.map +1 -0
  164. package/dist/json-DH7Q6Ftp.d.mts +83 -0
  165. package/dist/json-DH7Q6Ftp.d.mts.map +1 -0
  166. package/dist/json-DKhqPjHB.cjs +6 -0
  167. package/dist/json-Dp4PSH2i.mjs +7 -0
  168. package/dist/json-Dp4PSH2i.mjs.map +1 -0
  169. package/dist/json.cjs +1 -41
  170. package/dist/json.d.cts +2 -0
  171. package/dist/json.d.mts +2 -0
  172. package/dist/json.mjs +1 -3
  173. package/dist/list-files-Cn_UVruo.cjs +1 -0
  174. package/dist/list-files-D3dQOljX.d.cts +51 -0
  175. package/dist/list-files-D3dQOljX.d.cts.map +1 -0
  176. package/dist/list-files-D3iJzEQw.d.mts +51 -0
  177. package/dist/list-files-D3iJzEQw.d.mts.map +1 -0
  178. package/dist/list-files-D__uh3tQ.mjs +2 -0
  179. package/dist/list-files-D__uh3tQ.mjs.map +1 -0
  180. package/dist/list-files.cjs +1 -55
  181. package/dist/list-files.d.cts +2 -0
  182. package/dist/list-files.d.mts +2 -0
  183. package/dist/list-files.mjs +1 -1
  184. package/dist/package-fns-BNRi_Rpc.d.cts +354 -0
  185. package/dist/package-fns-BNRi_Rpc.d.cts.map +1 -0
  186. package/dist/package-fns-C7-MKgBR.mjs +2 -0
  187. package/dist/package-fns-C7-MKgBR.mjs.map +1 -0
  188. package/dist/package-fns-CxokaGDY.d.mts +354 -0
  189. package/dist/package-fns-CxokaGDY.d.mts.map +1 -0
  190. package/dist/package-fns-YTCdMAXr.cjs +1 -0
  191. package/dist/package-fns.cjs +1 -99
  192. package/dist/package-fns.d.cts +2 -0
  193. package/dist/package-fns.d.mts +2 -0
  194. package/dist/package-fns.mjs +1 -1
  195. package/dist/read-file-B091zB64.mjs +2 -0
  196. package/dist/read-file-B091zB64.mjs.map +1 -0
  197. package/dist/read-file-BB2WzW-N.cjs +1 -0
  198. package/dist/{read-file.d.ts → read-file-Bxn1VHKv.d.cts} +8 -4
  199. package/dist/read-file-Bxn1VHKv.d.cts.map +1 -0
  200. package/dist/read-file-CRVW-wcE.d.mts +30 -0
  201. package/dist/read-file-CRVW-wcE.d.mts.map +1 -0
  202. package/dist/read-file.cjs +1 -31
  203. package/dist/read-file.d.cts +2 -0
  204. package/dist/read-file.d.mts +2 -0
  205. package/dist/read-file.mjs +1 -1
  206. package/dist/registry-B1taIPKm.mjs +2 -0
  207. package/dist/registry-B1taIPKm.mjs.map +1 -0
  208. package/dist/{registry.d.ts → registry-BQ3JXRFA.d.mts} +17 -13
  209. package/dist/registry-BQ3JXRFA.d.mts.map +1 -0
  210. package/dist/registry-BYwvM92u.cjs +1 -0
  211. package/dist/registry-C2A0Kau7.d.cts +53 -0
  212. package/dist/registry-C2A0Kau7.d.cts.map +1 -0
  213. package/dist/registry.cjs +1 -95
  214. package/dist/registry.d.cts +2 -0
  215. package/dist/registry.d.mts +2 -0
  216. package/dist/registry.mjs +1 -1
  217. package/dist/remove-file-BM64Brdf.mjs +2 -0
  218. package/dist/remove-file-BM64Brdf.mjs.map +1 -0
  219. package/dist/remove-file-BqlkL_Df.d.mts +16 -0
  220. package/dist/remove-file-BqlkL_Df.d.mts.map +1 -0
  221. package/dist/remove-file-XHFKELQN.cjs +1 -0
  222. package/dist/remove-file-lQOlxDwr.d.cts +16 -0
  223. package/dist/remove-file-lQOlxDwr.d.cts.map +1 -0
  224. package/dist/remove-file.cjs +1 -16
  225. package/dist/remove-file.d.cts +2 -0
  226. package/dist/remove-file.d.mts +2 -0
  227. package/dist/remove-file.mjs +1 -1
  228. package/dist/resolve-C_YsCFne.mjs +4 -0
  229. package/dist/resolve-C_YsCFne.mjs.map +1 -0
  230. package/dist/{resolve.d.ts → resolve-D66oIwjf.d.mts} +33 -29
  231. package/dist/resolve-D66oIwjf.d.mts.map +1 -0
  232. package/dist/resolve-DTkLQekH.cjs +3 -0
  233. package/dist/resolve-DubH-8qd.d.cts +106 -0
  234. package/dist/resolve-DubH-8qd.d.cts.map +1 -0
  235. package/dist/resolve-parent-path-CR8av8WP.mjs +2 -0
  236. package/dist/resolve-parent-path-CR8av8WP.mjs.map +1 -0
  237. package/dist/resolve-parent-path-D0AaW2PB.cjs +1 -0
  238. package/dist/resolve.cjs +1 -115
  239. package/dist/resolve.d.cts +2 -0
  240. package/dist/resolve.d.mts +2 -0
  241. package/dist/resolve.mjs +1 -5
  242. package/dist/{semver-fns.d.ts → semver-fns-B0e5zB6C.d.mts} +17 -11
  243. package/dist/semver-fns-B0e5zB6C.d.mts.map +1 -0
  244. package/dist/semver-fns-Btrm1dIF.cjs +1 -0
  245. package/dist/semver-fns-DjhZXnUw.d.cts +92 -0
  246. package/dist/semver-fns-DjhZXnUw.d.cts.map +1 -0
  247. package/dist/semver-fns-F_rYnwDq.mjs +2 -0
  248. package/dist/semver-fns-F_rYnwDq.mjs.map +1 -0
  249. package/dist/semver-fns.cjs +1 -40
  250. package/dist/semver-fns.d.cts +2 -0
  251. package/dist/semver-fns.d.mts +2 -0
  252. package/dist/semver-fns.mjs +1 -1
  253. package/dist/toml-CIgLQmP3.mjs +4 -0
  254. package/dist/toml-CIgLQmP3.mjs.map +1 -0
  255. package/dist/toml-D3X2QoaL.d.cts +81 -0
  256. package/dist/toml-D3X2QoaL.d.cts.map +1 -0
  257. package/dist/toml-DgVyNp_y.cjs +3 -0
  258. package/dist/toml-Djau1M6n.d.mts +81 -0
  259. package/dist/toml-Djau1M6n.d.mts.map +1 -0
  260. package/dist/toml.cjs +1 -40
  261. package/dist/toml.d.cts +2 -0
  262. package/dist/toml.d.mts +2 -0
  263. package/dist/toml.mjs +1 -3
  264. package/dist/tsconfig-B13IMV_0.d.mts +812 -0
  265. package/dist/tsconfig-B13IMV_0.d.mts.map +1 -0
  266. package/dist/tsconfig-B6WtgD1c.cjs +1 -0
  267. package/dist/tsconfig-C8ecu1-0.d.cts +812 -0
  268. package/dist/tsconfig-C8ecu1-0.d.cts.map +1 -0
  269. package/dist/tsconfig-CqvvSVuX.mjs +2 -0
  270. package/dist/tsconfig-CqvvSVuX.mjs.map +1 -0
  271. package/dist/tsconfig.cjs +1 -28
  272. package/dist/tsconfig.d.cts +2 -0
  273. package/dist/tsconfig.d.mts +2 -0
  274. package/dist/tsconfig.mjs +1 -1
  275. package/dist/write-file-BmvbsmMj.d.cts +35 -0
  276. package/dist/write-file-BmvbsmMj.d.cts.map +1 -0
  277. package/dist/write-file-CFByoJkN.mjs +2 -0
  278. package/dist/write-file-CFByoJkN.mjs.map +1 -0
  279. package/dist/write-file-CWTzQpb2.d.mts +35 -0
  280. package/dist/write-file-CWTzQpb2.d.mts.map +1 -0
  281. package/dist/write-file-CqokudVp.cjs +1 -0
  282. package/dist/write-file.cjs +1 -26
  283. package/dist/write-file.d.cts +2 -0
  284. package/dist/write-file.d.mts +2 -0
  285. package/dist/write-file.mjs +1 -1
  286. package/dist/yaml-6uuLoSfT.d.cts +23 -0
  287. package/dist/yaml-6uuLoSfT.d.cts.map +1 -0
  288. package/dist/yaml-CLMo56UG.mjs +2 -0
  289. package/dist/yaml-CLMo56UG.mjs.map +1 -0
  290. package/dist/yaml-Ddslc5NK.d.mts +23 -0
  291. package/dist/yaml-Ddslc5NK.d.mts.map +1 -0
  292. package/dist/yaml-q2k-BjIM.cjs +1 -0
  293. package/dist/yaml.cjs +1 -15
  294. package/dist/yaml.d.cts +2 -0
  295. package/dist/yaml.d.mts +2 -0
  296. package/dist/yaml.mjs +1 -1
  297. package/package.json +98 -379
  298. package/dist/compress.d.ts +0 -11
  299. package/dist/constants.d.ts +0 -1
  300. package/dist/get-parent-path.d.ts +0 -28
  301. package/dist/index.d.ts +0 -32
  302. package/dist/install.d.ts +0 -24
  303. package/dist/json.d.ts +0 -49
  304. package/dist/list-files.d.ts +0 -46
  305. package/dist/package-fns.d.ts +0 -89
  306. package/dist/remove-file.d.ts +0 -12
  307. package/dist/toml.d.ts +0 -77
  308. package/dist/tsconfig.d.ts +0 -8
  309. package/dist/write-file.d.ts +0 -30
  310. package/dist/yaml.d.ts +0 -18
@@ -0,0 +1 @@
1
+ {"version":3,"file":"tsconfig-C8ecu1-0.d.cts","names":[],"sources":["../../types/src/tsconfig.ts","../src/tsconfig.ts"],"sourcesContent":[],"mappings":";;;KAoBY,GAAA;KAOA,MAAA;AAPA,KAoCA,OAAA,GApCG,MAAA,GAAA,IAAA,GAAA,MAAA,GAAA,IAAA;AAOH,KAoCA,MAAA,GApCM,KAAA,GAAA,KAAA,GAAA,KAAA,GAAA,QAAA,GAAA,QAAA,GAAA,QAAA,GAAA,QAAA,GAAA,QAAA,GAAA,QAAA,GAAA,QAAA,GAAA,QAAA,GAAA,QAAA,GAAA,KAAA,GAAA,KAAA,GAAA,KAAA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;;;;mBAOrB,qBAAqB,UAAU;;;;oBAK9B,mBAAmB,UAAU;;;;;;;;;;;;;;;;;UAqBhC,eAAA;;;;;;;;;;;;;;UAiBA,UAAA;;;;;;;;;;;;;;;;;;;;;;;;UA4BA,YAAA;;;;oBAIG;;;;iBAKH;;;;oBAKG;;;;;;;;;;;;;;;;;;;;;;YA2BR;;;;;;YAOA;;;;eAKG;;;;;;AAjqCf;AAOA;AA6BA;AAOA;AA2BY,iBCvDU,YAAA,CDuDP,QAAA,CAAA,EAAA,MAAA,CAAA,ECrDZ,ODqDY,CCrDJ,YDqDI,CAAA"}
@@ -0,0 +1,2 @@
1
+ import{t as e}from"./cwd-YTg9Cx6C.mjs";import{a as t,t as n}from"./join-paths-BHepkhAj.mjs";import{r,t as i}from"./file-path-fns-BDzC2SIV.mjs";import{n as a}from"./exists-Ci-9lYmi.mjs";import{n as o}from"./get-parent-path-DLFSyxSW.mjs";import{o as s}from"./resolve-C_YsCFne.mjs";import{t as c}from"./json-Dp4PSH2i.mjs";import l from"defu";async function u(d=e()){let f=i(d)===`json`?d:n(d,`tsconfig.json`);if(!a(f)&&(f=await s(d,{extensions:[`json`]}),!a(f)))throw Error(`tsconfig.json not found at ${f}. Please ensure the file exists.`);let p=await c(f);if(p?.compilerOptions?.baseUrl&&(p.compilerOptions.baseUrl=n(r(f),p.compilerOptions.baseUrl)),p?.extends)for(let e of o(p.extends)){let i=await u(t(e)?e:n(r(f),e));i&&(p=l(p,i??{}))}return p.extends=void 0,p}export{u as t};
2
+ //# sourceMappingURL=tsconfig-CqvvSVuX.mjs.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"tsconfig-CqvvSVuX.mjs","names":[],"sources":["../src/tsconfig.ts"],"sourcesContent":["/* -------------------------------------------------------------------\n\n ⚡ Storm Software - Stryke\n\n This code was released as part of the Stryke project. Stryke\n is maintained by Storm Software under the Apache-2.0 license, and is\n free for commercial and private use. For more information, please visit\n our licensing page at https://stormsoftware.com/licenses/projects/stryke.\n\n Website: https://stormsoftware.com\n Repository: https://github.com/storm-software/stryke\n Documentation: https://docs.stormsoftware.com/projects/stryke\n Contact: https://stormsoftware.com/contact\n\n SPDX-License-Identifier: Apache-2.0\n\n ------------------------------------------------------------------- */\n\nimport { toArray } from \"@stryke/convert/to-array\";\nimport { cwd } from \"@stryke/path/cwd\";\nimport { findFileExtension, findFilePath } from \"@stryke/path/file-path-fns\";\nimport { isNpmScopedPackage } from \"@stryke/path/is-type\";\nimport { joinPaths } from \"@stryke/path/join-paths\";\nimport type { TsConfigJson } from \"@stryke/types/tsconfig\";\nimport defu from \"defu\";\nimport { existsSync } from \"./exists\";\nimport { readJsonFile } from \"./json\";\nimport { resolve } from \"./resolve\";\n\n/**\n * Loads a tsconfig.json file and returns the parsed JSON object.\n *\n * @param filePath - The directory to start searching for the tsconfig.json file.\n * @returns The parsed tsconfig.json object or null if not found.\n */\nexport async function loadTsConfig(\n filePath: string = cwd()\n): Promise<TsConfigJson> {\n let tsconfigFilePath =\n findFileExtension(filePath) === \"json\"\n ? filePath\n : joinPaths(filePath, \"tsconfig.json\");\n if (!existsSync(tsconfigFilePath)) {\n tsconfigFilePath = await resolve(filePath, { extensions: [\"json\"] });\n if (!existsSync(tsconfigFilePath)) {\n throw new Error(\n `tsconfig.json not found at ${tsconfigFilePath}. Please ensure the file exists.`\n );\n }\n }\n\n let config = await readJsonFile<TsConfigJson>(tsconfigFilePath);\n if (config?.compilerOptions?.baseUrl) {\n config.compilerOptions.baseUrl = joinPaths(\n findFilePath(tsconfigFilePath),\n config.compilerOptions.baseUrl\n );\n }\n\n if (config?.extends) {\n for (const extendsName of toArray(config.extends)) {\n const parentConfig = await loadTsConfig(\n isNpmScopedPackage(extendsName)\n ? extendsName\n : joinPaths(findFilePath(tsconfigFilePath), extendsName)\n );\n if (parentConfig) {\n config = defu(config, parentConfig ?? {});\n }\n }\n }\n\n config.extends = undefined;\n return config;\n}\n"],"mappings":"mVAmCA,eAAsB,EACpB,EAAmB,GAAK,CACD,CACvB,IAAI,EACF,EAAkB,EAAS,GAAK,OAC5B,EACA,EAAU,EAAU,gBAAgB,CAC1C,GAAI,CAAC,EAAW,EAAiB,GAC/B,EAAmB,MAAM,EAAQ,EAAU,CAAE,WAAY,CAAC,OAAO,CAAE,CAAC,CAChE,CAAC,EAAW,EAAiB,EAC/B,MAAU,MACR,8BAA8B,EAAiB,kCAChD,CAIL,IAAI,EAAS,MAAM,EAA2B,EAAiB,CAQ/D,GAPI,GAAQ,iBAAiB,UAC3B,EAAO,gBAAgB,QAAU,EAC/B,EAAa,EAAiB,CAC9B,EAAO,gBAAgB,QACxB,EAGC,GAAQ,QACV,IAAK,IAAM,KAAe,EAAQ,EAAO,QAAQ,CAAE,CACjD,IAAM,EAAe,MAAM,EACzB,EAAmB,EAAY,CAC3B,EACA,EAAU,EAAa,EAAiB,CAAE,EAAY,CAC3D,CACG,IACF,EAAS,EAAK,EAAQ,GAAgB,EAAE,CAAC,EAM/C,MADA,GAAO,QAAU,IAAA,GACV"}
package/dist/tsconfig.cjs CHANGED
@@ -1,28 +1 @@
1
- "use strict";
2
-
3
- Object.defineProperty(exports, "__esModule", {
4
- value: true
5
- });
6
- exports.loadTsConfig = loadTsConfig;
7
- var _toArray = require("@stryke/convert/to-array");
8
- var _cwd = require("@stryke/path/cwd");
9
- var _filePathFns = require("@stryke/path/file-path-fns");
10
- var _isType = require("@stryke/path/is-type");
11
- var _joinPaths = require("@stryke/path/join-paths");
12
- var _defu = _interopRequireDefault(require("defu"));
13
- var _exists = require("./exists.cjs");
14
- var _json = require("./json.cjs");
15
- var _resolve = require("./resolve.cjs");
16
- function _interopRequireDefault(e) { return e && e.__esModule ? e : { default: e }; }
17
- async function loadTsConfig(n = (0, _cwd.cwd)()) {
18
- let i = (0, _filePathFns.findFileExtension)(n) === "json" ? n : (0, _joinPaths.joinPaths)(n, "tsconfig.json");
19
- if (!(0, _exists.existsSync)(i) && (i = await (0, _resolve.resolve)(n, {
20
- extensions: ["json"]
21
- }), !(0, _exists.existsSync)(i))) throw new Error(`tsconfig.json not found at ${i}. Please ensure the file exists.`);
22
- let o = await (0, _json.readJsonFile)(i);
23
- if (o?.compilerOptions?.baseUrl && (o.compilerOptions.baseUrl = (0, _joinPaths.joinPaths)((0, _filePathFns.findFilePath)(i), o.compilerOptions.baseUrl)), o?.extends) for (const e of (0, _toArray.toArray)(o.extends)) {
24
- const t = await loadTsConfig((0, _isType.isNpmScopedPackage)(e) ? e : (0, _joinPaths.joinPaths)((0, _filePathFns.findFilePath)(i), e));
25
- t && (o = (0, _defu.default)(o, t ?? {}));
26
- }
27
- return o.extends = void 0, o;
28
- }
1
+ require(`./get-workspace-root-CCNjjZGY.cjs`),require(`./helpers-_MJ6PR-g.cjs`),require(`./write-file-CqokudVp.cjs`),require(`./resolve-DTkLQekH.cjs`),require(`./json-DKhqPjHB.cjs`);const e=require(`./tsconfig-B6WtgD1c.cjs`);exports.loadTsConfig=e.t;
@@ -0,0 +1,2 @@
1
+ import { t as loadTsConfig } from "./tsconfig-C8ecu1-0.cjs";
2
+ export { loadTsConfig };
@@ -0,0 +1,2 @@
1
+ import { t as loadTsConfig } from "./tsconfig-B13IMV_0.mjs";
2
+ export { loadTsConfig };
package/dist/tsconfig.mjs CHANGED
@@ -1 +1 @@
1
- import{toArray as m}from"@stryke/convert/to-array";import{cwd as p}from"@stryke/path/cwd";import{findFileExtension as a,findFilePath as r}from"@stryke/path/file-path-fns";import{isNpmScopedPackage as c}from"@stryke/path/is-type";import{joinPaths as s}from"@stryke/path/join-paths";import d from"defu";import{existsSync as f}from"./exists";import{readJsonFile as l}from"./json";import{resolve as g}from"./resolve";export async function loadTsConfig(n=p()){let i=a(n)==="json"?n:s(n,"tsconfig.json");if(!f(i)&&(i=await g(n,{extensions:["json"]}),!f(i)))throw new Error(`tsconfig.json not found at ${i}. Please ensure the file exists.`);let o=await l(i);if(o?.compilerOptions?.baseUrl&&(o.compilerOptions.baseUrl=s(r(i),o.compilerOptions.baseUrl)),o?.extends)for(const e of m(o.extends)){const t=await loadTsConfig(c(e)?e:s(r(i),e));t&&(o=d(o,t??{}))}return o.extends=void 0,o}
1
+ import"./get-workspace-root-k66w-wLW.mjs";import"./helpers-BSEQb1fp.mjs";import"./write-file-CFByoJkN.mjs";import"./resolve-C_YsCFne.mjs";import"./json-Dp4PSH2i.mjs";import{t as e}from"./tsconfig-CqvvSVuX.mjs";export{e as loadTsConfig};
@@ -0,0 +1,35 @@
1
+ import { t as Encoding } from "./constants-D58o2CiO.cjs";
2
+ import { Abortable } from "node:events";
3
+ import { Mode, ObjectEncodingOptions, OpenMode, WriteFileOptions } from "node:fs";
4
+
5
+ //#region src/write-file.d.ts
6
+ interface WriteFileOptions$1 {
7
+ /**
8
+ * Whether to create the directory if it does not exist
9
+ *
10
+ * @defaultValue true
11
+ */
12
+ createDirectory?: boolean;
13
+ }
14
+ /**
15
+ * Write the given content to the given file path
16
+ *
17
+ * @param filePath - The file path to write to
18
+ * @param content - The content to write to the file
19
+ */
20
+ declare const writeFileSync: (filePath: string, content?: string, options?: WriteFileOptions$1 & WriteFileOptions) => void;
21
+ /**
22
+ * Read the given content to the given file path
23
+ *
24
+ * @param filePath - The file path to read to
25
+ * @param content - The content to write to the file
26
+ * @returns The content of the file
27
+ */
28
+ declare const writeFile: (filePath: string, content?: string, options?: WriteFileOptions$1 & ((ObjectEncodingOptions & {
29
+ mode?: Mode | undefined;
30
+ flag?: OpenMode | undefined;
31
+ flush?: boolean | undefined;
32
+ } & Abortable) | Encoding)) => Promise<void>;
33
+ //#endregion
34
+ export { writeFile as n, writeFileSync as r, WriteFileOptions$1 as t };
35
+ //# sourceMappingURL=write-file-BmvbsmMj.d.cts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"write-file-BmvbsmMj.d.cts","names":[],"sources":["../src/write-file.ts"],"sourcesContent":[],"mappings":";;;;;UAiCiB,kBAAA;;AAAjB;AAeA;AA4BA;;EAKS,eAAA,CAAA,EAAA,OAAA;;;;;;;;cAjCI,8DAGF,qBAAmB;;;;;;;;cAyBjB,0DAGF,uBAEF;SACQ;SACA;;IAEL,aACJ,cAEL"}
@@ -0,0 +1,2 @@
1
+ import{c as e,r as t}from"./file-path-fns-BDzC2SIV.mjs";import{n}from"./exists-Ci-9lYmi.mjs";import{n as r,t as i}from"./helpers-BSEQb1fp.mjs";import{writeFileSync as a}from"node:fs";import{writeFile as o}from"node:fs/promises";const s=(i,o=``,s={})=>{if(!i)throw Error(`No file path provided to write data`);let c=t(e(i));if(!n(c))if(s.createDirectory!==!1)r(c);else throw Error(`Directory ${c} does not exist`);a(i,o||``,s)},c=async(r,a=``,s={})=>{if(!r)throw Error(`No file path provided to read data`);let c=t(e(r));if(!n(c))if(s.createDirectory!==!1)await i(c);else throw Error(`Directory ${c} does not exist`);return o(r,a||``,s)};export{s as n,c as t};
2
+ //# sourceMappingURL=write-file-CFByoJkN.mjs.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"write-file-CFByoJkN.mjs","names":["writeFileSync","existsSync","writeFile","writeFileFs"],"sources":["../src/write-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 { correctPath } from \"@stryke/path/correct-path\";\nimport { findFilePath } from \"@stryke/path/file-path-fns\";\nimport type { Abortable } from \"node:events\";\nimport type {\n WriteFileOptions as FSWriteFileOptions,\n Mode,\n ObjectEncodingOptions,\n OpenMode\n} from \"node:fs\";\nimport { writeFileSync as writeFileSyncFs } from \"node:fs\";\nimport { writeFile as writeFileFs } from \"node:fs/promises\";\nimport type { Encoding } from \"./constants\";\nimport { existsSync } from \"./exists\";\nimport { createDirectory, createDirectorySync } from \"./helpers\";\n\nexport interface WriteFileOptions {\n /**\n * Whether to create the directory if it does not exist\n *\n * @defaultValue true\n */\n createDirectory?: boolean;\n}\n\n/**\n * Write the given content to the given file path\n *\n * @param filePath - The file path to write to\n * @param content - The content to write to the file\n */\nexport const writeFileSync = (\n filePath: string,\n content = \"\",\n options: WriteFileOptions & FSWriteFileOptions = {}\n): void => {\n if (!filePath) {\n throw new Error(\"No file path provided to write data\");\n }\n\n const directory = findFilePath(correctPath(filePath));\n if (!existsSync(directory)) {\n if (options.createDirectory !== false) {\n createDirectorySync(directory);\n } else {\n throw new Error(`Directory ${directory} does not exist`);\n }\n }\n\n writeFileSyncFs(filePath, content || \"\", options);\n};\n\n/**\n * Read the given content to the given file path\n *\n * @param filePath - The file path to read to\n * @param content - The content to write to the file\n * @returns The content of the file\n */\nexport const writeFile = async (\n filePath: string,\n content = \"\",\n options: WriteFileOptions &\n (\n | (ObjectEncodingOptions & {\n mode?: Mode | undefined;\n flag?: OpenMode | undefined;\n flush?: boolean | undefined;\n } & Abortable)\n | Encoding\n ) = {}\n): Promise<void> => {\n if (!filePath) {\n throw new Error(\"No file path provided to read data\");\n }\n\n const directory = findFilePath(correctPath(filePath));\n if (!existsSync(directory)) {\n if (options.createDirectory !== false) {\n await createDirectory(directory);\n } else {\n throw new Error(`Directory ${directory} does not exist`);\n }\n }\n\n return writeFileFs(filePath, content || \"\", options);\n};\n"],"mappings":"oOAgDA,MAAaA,GACX,EACA,EAAU,GACV,EAAiD,EAAE,GAC1C,CACT,GAAI,CAAC,EACH,MAAU,MAAM,sCAAsC,CAGxD,IAAM,EAAY,EAAa,EAAY,EAAS,CAAC,CACrD,GAAI,CAACC,EAAW,EAAU,CACxB,GAAI,EAAQ,kBAAoB,GAC9B,EAAoB,EAAU,MAE9B,MAAU,MAAM,aAAa,EAAU,iBAAiB,CAI5D,EAAgB,EAAU,GAAW,GAAI,EAAQ,EAUtCC,EAAY,MACvB,EACA,EAAU,GACV,EAQM,EAAE,GACU,CAClB,GAAI,CAAC,EACH,MAAU,MAAM,qCAAqC,CAGvD,IAAM,EAAY,EAAa,EAAY,EAAS,CAAC,CACrD,GAAI,CAACD,EAAW,EAAU,CACxB,GAAI,EAAQ,kBAAoB,GAC9B,MAAM,EAAgB,EAAU,MAEhC,MAAU,MAAM,aAAa,EAAU,iBAAiB,CAI5D,OAAOE,EAAY,EAAU,GAAW,GAAI,EAAQ"}
@@ -0,0 +1,35 @@
1
+ import { t as Encoding } from "./constants-DZz9LJgo.mjs";
2
+ import { Mode, ObjectEncodingOptions, OpenMode, WriteFileOptions } from "node:fs";
3
+ import { Abortable } from "node:events";
4
+
5
+ //#region src/write-file.d.ts
6
+ interface WriteFileOptions$1 {
7
+ /**
8
+ * Whether to create the directory if it does not exist
9
+ *
10
+ * @defaultValue true
11
+ */
12
+ createDirectory?: boolean;
13
+ }
14
+ /**
15
+ * Write the given content to the given file path
16
+ *
17
+ * @param filePath - The file path to write to
18
+ * @param content - The content to write to the file
19
+ */
20
+ declare const writeFileSync$1: (filePath: string, content?: string, options?: WriteFileOptions$1 & WriteFileOptions) => void;
21
+ /**
22
+ * Read the given content to the given file path
23
+ *
24
+ * @param filePath - The file path to read to
25
+ * @param content - The content to write to the file
26
+ * @returns The content of the file
27
+ */
28
+ declare const writeFile: (filePath: string, content?: string, options?: WriteFileOptions$1 & ((ObjectEncodingOptions & {
29
+ mode?: Mode | undefined;
30
+ flag?: OpenMode | undefined;
31
+ flush?: boolean | undefined;
32
+ } & Abortable) | Encoding)) => Promise<void>;
33
+ //#endregion
34
+ export { writeFile as n, writeFileSync$1 as r, WriteFileOptions$1 as t };
35
+ //# sourceMappingURL=write-file-CWTzQpb2.d.mts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"write-file-CWTzQpb2.d.mts","names":[],"sources":["../src/write-file.ts"],"sourcesContent":[],"mappings":";;;;;UAiCiB,kBAAA;;AAAjB;AAeA;AA4BA;;EAKS,eAAA,CAAA,EAAA,OAAA;;;;;;;;cAjCI,gEAGF,qBAAmB;;;;;;;;cAyBjB,0DAGF,uBAEF;SACQ;SACA;;IAEL,aACJ,cAEL"}
@@ -0,0 +1 @@
1
+ const e=require(`./chunk-Bmb41Sf3.cjs`),t=require(`./file-path-fns-7aKacdLg.cjs`),n=require(`./exists-B31lSRFp.cjs`),r=require(`./helpers-_MJ6PR-g.cjs`);let i=require(`node:fs`),a=require(`node:fs/promises`);const o=(e,a=``,o={})=>{if(!e)throw Error(`No file path provided to write data`);let s=t.r(t.c(e));if(!n.n(s))if(o.createDirectory!==!1)r.n(s);else throw Error(`Directory ${s} does not exist`);(0,i.writeFileSync)(e,a||``,o)},s=async(e,i=``,o={})=>{if(!e)throw Error(`No file path provided to read data`);let s=t.r(t.c(e));if(!n.n(s))if(o.createDirectory!==!1)await r.t(s);else throw Error(`Directory ${s} does not exist`);return(0,a.writeFile)(e,i||``,o)};Object.defineProperty(exports,`n`,{enumerable:!0,get:function(){return o}}),Object.defineProperty(exports,`t`,{enumerable:!0,get:function(){return s}});
@@ -1,26 +1 @@
1
- "use strict";
2
-
3
- Object.defineProperty(exports, "__esModule", {
4
- value: true
5
- });
6
- exports.writeFileSync = exports.writeFile = void 0;
7
- var _correctPath = require("@stryke/path/correct-path");
8
- var _filePathFns = require("@stryke/path/file-path-fns");
9
- var _nodeFs = require("node:fs");
10
- var _promises = require("node:fs/promises");
11
- var _exists = require("./exists.cjs");
12
- var _helpers = require("./helpers.cjs");
13
- const writeFileSync = (e, t = "", o = {}) => {
14
- if (!e) throw new Error("No file path provided to write data");
15
- const r = (0, _filePathFns.findFilePath)((0, _correctPath.correctPath)(e));
16
- if (!(0, _exists.existsSync)(r)) if (o.createDirectory !== !1) (0, _helpers.createDirectorySync)(r);else throw new Error(`Directory ${r} does not exist`);
17
- (0, _nodeFs.writeFileSync)(e, t || "", o);
18
- },
19
- writeFile = async (e, t = "", o = {}) => {
20
- if (!e) throw new Error("No file path provided to read data");
21
- const r = (0, _filePathFns.findFilePath)((0, _correctPath.correctPath)(e));
22
- if (!(0, _exists.existsSync)(r)) if (o.createDirectory !== !1) await (0, _helpers.createDirectory)(r);else throw new Error(`Directory ${r} does not exist`);
23
- return (0, _promises.writeFile)(e, t || "", o);
24
- };
25
- exports.writeFile = writeFile;
26
- exports.writeFileSync = writeFileSync;
1
+ require(`./helpers-_MJ6PR-g.cjs`);const e=require(`./write-file-CqokudVp.cjs`);exports.writeFile=e.t,exports.writeFileSync=e.n;
@@ -0,0 +1,2 @@
1
+ import { n as writeFile, r as writeFileSync, t as WriteFileOptions } from "./write-file-BmvbsmMj.cjs";
2
+ export { WriteFileOptions, writeFile, writeFileSync };
@@ -0,0 +1,2 @@
1
+ import { n as writeFile, r as writeFileSync, t as WriteFileOptions } from "./write-file-CWTzQpb2.mjs";
2
+ export { WriteFileOptions, writeFile, writeFileSync };
@@ -1 +1 @@
1
- import{correctPath as i}from"@stryke/path/correct-path";import{findFilePath as n}from"@stryke/path/file-path-fns";import{writeFileSync as s}from"node:fs";import{writeFile as d}from"node:fs/promises";import{existsSync as c}from"./exists";import{createDirectory as p,createDirectorySync as a}from"./helpers";export const writeFileSync=(e,t="",o={})=>{if(!e)throw new Error("No file path provided to write data");const r=n(i(e));if(!c(r))if(o.createDirectory!==!1)a(r);else throw new Error(`Directory ${r} does not exist`);s(e,t||"",o)},writeFile=async(e,t="",o={})=>{if(!e)throw new Error("No file path provided to read data");const r=n(i(e));if(!c(r))if(o.createDirectory!==!1)await p(r);else throw new Error(`Directory ${r} does not exist`);return d(e,t||"",o)};
1
+ import"./helpers-BSEQb1fp.mjs";import{n as e,t}from"./write-file-CFByoJkN.mjs";export{t as writeFile,e as writeFileSync};
@@ -0,0 +1,23 @@
1
+ import { DocumentOptions, ParseOptions, SchemaOptions, ToJSOptions } from "yaml";
2
+
3
+ //#region src/yaml.d.ts
4
+ type YamlReadOptions = ParseOptions & DocumentOptions & SchemaOptions & ToJSOptions;
5
+ /**
6
+ * Reads a YAML file and returns the object the YAML content represents.
7
+ *
8
+ * @param path - A path to a file.
9
+ * @param options - YAML parse options
10
+ * @returns Object the YAML content of the file represents
11
+ */
12
+ declare function readYamlFileSync<T extends object = any>(path: string, options?: YamlReadOptions): T;
13
+ /**
14
+ * Reads a YAML file and returns the object the YAML content represents.
15
+ *
16
+ * @param path - A path to a file.
17
+ * @param options - YAML parse options
18
+ * @returns Object the YAML content of the file represents
19
+ */
20
+ declare function readYamlFile<T extends object = any>(path: string, options?: YamlReadOptions): Promise<T>;
21
+ //#endregion
22
+ export { readYamlFile as n, readYamlFileSync as r, YamlReadOptions as t };
23
+ //# sourceMappingURL=yaml-6uuLoSfT.d.cts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"yaml-6uuLoSfT.d.cts","names":[],"sources":["../src/yaml.ts"],"sourcesContent":[],"mappings":";;;KA2BY,eAAA,GAAkB,eAC5B,kBACA,gBACA;;AAHF;;;;;;AAYgB,iBAAA,gBAEJ,CAAA,UAAA,MACR,GAAA,GAAA,CAAA,CAAA,IAAA,EAAA,MAAA,EAAA,OAAA,CAAA,EADQ,eACR,CAAA,EAAD,CAAC;AAWJ;;;;;;;iBAAsB,6DAEX,kBACR,QAAQ"}
@@ -0,0 +1,2 @@
1
+ import{i as e,t}from"./read-file-B091zB64.mjs";import{parse as n}from"yaml";function r(t,r){return n(e(t),r)}async function i(e,r={}){return n(await t(e),r)}export{r as n,i as t};
2
+ //# sourceMappingURL=yaml-CLMo56UG.mjs.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"yaml-CLMo56UG.mjs","names":[],"sources":["../src/yaml.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 type {\n DocumentOptions,\n ParseOptions,\n SchemaOptions,\n ToJSOptions\n} from \"yaml\";\nimport { parse } from \"yaml\";\nimport { readFile, readFileSync } from \"./read-file\";\n\nexport type YamlReadOptions = ParseOptions &\n DocumentOptions &\n SchemaOptions &\n ToJSOptions;\n\n/**\n * Reads a YAML file and returns the object the YAML content represents.\n *\n * @param path - A path to a file.\n * @param options - YAML parse options\n * @returns Object the YAML content of the file represents\n */\nexport function readYamlFileSync<T extends object = any>(\n path: string,\n options?: YamlReadOptions\n): T {\n return parse(readFileSync(path), options) as T;\n}\n\n/**\n * Reads a YAML file and returns the object the YAML content represents.\n *\n * @param path - A path to a file.\n * @param options - YAML parse options\n * @returns Object the YAML content of the file represents\n */\nexport async function readYamlFile<T extends object = any>(\n path: string,\n options: YamlReadOptions = {}\n): Promise<T> {\n return parse(await readFile(path), options) as T;\n}\n"],"mappings":"4EAuCA,SAAgB,EACd,EACA,EACG,CACH,OAAO,EAAM,EAAa,EAAK,CAAE,EAAQ,CAU3C,eAAsB,EACpB,EACA,EAA2B,EAAE,CACjB,CACZ,OAAO,EAAM,MAAM,EAAS,EAAK,CAAE,EAAQ"}
@@ -0,0 +1,23 @@
1
+ import { DocumentOptions, ParseOptions, SchemaOptions, ToJSOptions } from "yaml";
2
+
3
+ //#region src/yaml.d.ts
4
+ type YamlReadOptions = ParseOptions & DocumentOptions & SchemaOptions & ToJSOptions;
5
+ /**
6
+ * Reads a YAML file and returns the object the YAML content represents.
7
+ *
8
+ * @param path - A path to a file.
9
+ * @param options - YAML parse options
10
+ * @returns Object the YAML content of the file represents
11
+ */
12
+ declare function readYamlFileSync<T extends object = any>(path: string, options?: YamlReadOptions): T;
13
+ /**
14
+ * Reads a YAML file and returns the object the YAML content represents.
15
+ *
16
+ * @param path - A path to a file.
17
+ * @param options - YAML parse options
18
+ * @returns Object the YAML content of the file represents
19
+ */
20
+ declare function readYamlFile<T extends object = any>(path: string, options?: YamlReadOptions): Promise<T>;
21
+ //#endregion
22
+ export { readYamlFile as n, readYamlFileSync as r, YamlReadOptions as t };
23
+ //# sourceMappingURL=yaml-Ddslc5NK.d.mts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"yaml-Ddslc5NK.d.mts","names":[],"sources":["../src/yaml.ts"],"sourcesContent":[],"mappings":";;;KA2BY,eAAA,GAAkB,eAC5B,kBACA,gBACA;;AAHF;;;;;;AAYgB,iBAAA,gBAEJ,CAAA,UAAA,MACR,GAAA,GAAA,CAAA,CAAA,IAAA,EAAA,MAAA,EAAA,OAAA,CAAA,EADQ,eACR,CAAA,EAAD,CAAC;AAWJ;;;;;;;iBAAsB,6DAEX,kBACR,QAAQ"}
@@ -0,0 +1 @@
1
+ const e=require(`./chunk-Bmb41Sf3.cjs`),t=require(`./read-file-BB2WzW-N.cjs`);let n=require(`yaml`);function r(e,r){return(0,n.parse)(t.i(e),r)}async function i(e,r={}){return(0,n.parse)(await t.t(e),r)}Object.defineProperty(exports,`n`,{enumerable:!0,get:function(){return r}}),Object.defineProperty(exports,`t`,{enumerable:!0,get:function(){return i}});
package/dist/yaml.cjs CHANGED
@@ -1,15 +1 @@
1
- "use strict";
2
-
3
- Object.defineProperty(exports, "__esModule", {
4
- value: true
5
- });
6
- exports.readYamlFile = readYamlFile;
7
- exports.readYamlFileSync = readYamlFileSync;
8
- var _yaml = require("yaml");
9
- var _readFile = require("./read-file.cjs");
10
- function readYamlFileSync(e, t) {
11
- return (0, _yaml.parse)((0, _readFile.readFileSync)(e), t);
12
- }
13
- async function readYamlFile(e, t = {}) {
14
- return (0, _yaml.parse)(await (0, _readFile.readFile)(e), t);
15
- }
1
+ const e=require(`./yaml-q2k-BjIM.cjs`);exports.readYamlFile=e.t,exports.readYamlFileSync=e.n;
@@ -0,0 +1,2 @@
1
+ import { n as readYamlFile, r as readYamlFileSync, t as YamlReadOptions } from "./yaml-6uuLoSfT.cjs";
2
+ export { YamlReadOptions, readYamlFile, readYamlFileSync };
@@ -0,0 +1,2 @@
1
+ import { n as readYamlFile, r as readYamlFileSync, t as YamlReadOptions } from "./yaml-Ddslc5NK.mjs";
2
+ export { YamlReadOptions, readYamlFile, readYamlFileSync };
package/dist/yaml.mjs CHANGED
@@ -1 +1 @@
1
- import{parse as o}from"yaml";import{readFile as n,readFileSync as a}from"./read-file";export function readYamlFileSync(e,t){return o(a(e),t)}export async function readYamlFile(e,t={}){return o(await n(e),t)}
1
+ import{n as e,t}from"./yaml-CLMo56UG.mjs";export{t as readYamlFile,e as readYamlFileSync};