@stryke/fs 0.33.8 → 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
@@ -1,46 +0,0 @@
1
- import type { AssetGlob } from "@stryke/types/file";
2
- import type { GlobOptions, Path } from "glob";
3
- export type ListOptions = GlobOptions;
4
- export type InferListReturnType<TOptions extends GlobOptions> = TOptions["withFileTypes"] extends true ? Path[] : string[];
5
- /**
6
- * A files and directories listing helper function
7
- *
8
- * @param filesGlob - A glob pattern to match files
9
- * @returns A list of file paths
10
- */
11
- export declare function list<TOptions extends ListOptions>(filesGlob: string | Omit<AssetGlob, "output">, options?: TOptions): Promise<InferListReturnType<TOptions>>;
12
- /**
13
- * A synchronous files and directories listing helper function
14
- *
15
- * @param filesGlob - A glob pattern to match files
16
- * @returns A list of file paths
17
- */
18
- export declare function listSync<TOptions extends ListOptions>(filesGlob: string | Omit<AssetGlob, "output">, options?: TOptions): InferListReturnType<TOptions>;
19
- /**
20
- * A file listing helper function
21
- *
22
- * @param filesGlob - A glob pattern to match files
23
- * @returns A list of file paths
24
- */
25
- export declare function listFiles<TOptions extends ListOptions>(filesGlob: string | Omit<AssetGlob, "output">, options?: TOptions): Promise<InferListReturnType<TOptions>>;
26
- /**
27
- * A synchronous file listing helper function
28
- *
29
- * @param filesGlob - A glob pattern to match files
30
- * @returns A list of file paths
31
- */
32
- export declare function listFilesSync<TOptions extends ListOptions>(filesGlob: string | Omit<AssetGlob, "output">, options?: TOptions): InferListReturnType<TOptions>;
33
- /**
34
- * A directories listing helper function
35
- *
36
- * @param filesGlob - A glob pattern to match files
37
- * @returns A list of file paths
38
- */
39
- export declare function listDirectories<TOptions extends ListOptions>(filesGlob: string | Omit<AssetGlob, "output">, options?: TOptions): Promise<InferListReturnType<TOptions>>;
40
- /**
41
- * A synchronous directories listing helper function
42
- *
43
- * @param filesGlob - A glob pattern to match files
44
- * @returns A list of file paths
45
- */
46
- export declare function listDirectoriesSync<TOptions extends ListOptions>(filesGlob: string | Omit<AssetGlob, "output">, options?: TOptions): InferListReturnType<TOptions>;
@@ -1,89 +0,0 @@
1
- import type { PackageJson } from "@stryke/types/package-json";
2
- import type { PackageManager } from "@stryke/types/package-manager";
3
- import type { Range } from "semver";
4
- import type { ResolveOptions } from "./resolve";
5
- /**
6
- * Get the package manager used in the project
7
- *
8
- * @param dir - The path to the project
9
- * @returns The package manager used in the project
10
- */
11
- export declare function getPackageManager(dir?: any): PackageManager;
12
- /**
13
- * Get package info
14
- *
15
- * @param name - The name of the package
16
- * @param options - The options to use when resolving the package
17
- * @returns The package info
18
- */
19
- export declare function getPackageInfo(name: string, options?: ResolveOptions): Promise<{
20
- name: string;
21
- version: any;
22
- rootPath: any;
23
- packageJsonPath: any;
24
- packageJson: PackageJson;
25
- } | undefined>;
26
- /**
27
- * Get the package info from the package.json file
28
- *
29
- * @param cwd - The current working directory
30
- * @returns The package info
31
- */
32
- export declare function loadPackageJson(cwd?: any): Promise<PackageJson | null>;
33
- export interface PackageExistsOptions {
34
- /**
35
- * The current working directory
36
- */
37
- cwd?: string;
38
- }
39
- export interface PackageMatchesOptions extends PackageExistsOptions {
40
- /**
41
- * The version range of the package to check
42
- */
43
- version?: string | Range;
44
- }
45
- /**
46
- * Check if a package is listed in the package.json file
47
- *
48
- * @param name - The name of the package
49
- * @param cwd - The current working directory
50
- * @returns An indicator specifying if the package is listed
51
- */
52
- export declare function isPackageListed(name: string, cwd?: string): Promise<boolean>;
53
- /**
54
- * Check if a package is listed in the package.json file
55
- *
56
- * @param name - The name of the package
57
- * @param options - The options to use when checking if the package is listed
58
- * @returns An indicator specifying if the package is listed
59
- */
60
- export declare function isPackageListed(name: string, options?: PackageExistsOptions): Promise<boolean>;
61
- export interface GetPackageListingReturn {
62
- version: string;
63
- type: "dependencies" | "devDependencies";
64
- }
65
- /**
66
- * Return the package version and dependency type listed in the package.json file
67
- *
68
- * @param name - The name of the package
69
- * @param cwdOrOptions - The current working directory or options to use when checking if the package is listed
70
- * @returns The version and type of the package if listed, otherwise undefined
71
- */
72
- export declare function getPackageListing(name: string, cwdOrOptions?: string | PackageExistsOptions): Promise<GetPackageListingReturn | undefined>;
73
- /**
74
- * Check if a package version matches a specific version range
75
- *
76
- * @param name - The name of the package
77
- * @param version - The version to check against
78
- * @param cwd - The current working directory
79
- * @returns An indicator specifying if the package version matches the range
80
- */
81
- export declare function doesPackageMatch(name: string, version: string, cwd?: string): Promise<boolean>;
82
- /**
83
- * Check if a package exists
84
- *
85
- * @param name - The name of the package
86
- * @param options - The options to use when resolving the package
87
- * @returns An indicator specifying if the package exists
88
- */
89
- export declare function isPackageExists(name: string, options?: ResolveOptions): boolean;
@@ -1,12 +0,0 @@
1
- /**
2
- * Remove the given content to the given file path
3
- *
4
- * @param filePath - The file path to remove to
5
- */
6
- export declare const removeFileSync: (filePath: string) => void;
7
- /**
8
- * Remove the given content to the given file path
9
- *
10
- * @param filePath - The file path to read to
11
- */
12
- export declare const removeFile: (filePath: string) => Promise<void>;
package/dist/toml.d.ts DELETED
@@ -1,77 +0,0 @@
1
- export type XOptions = null | {
2
- readonly keys?: null | RegExp;
3
- readonly order?: boolean;
4
- readonly exact?: boolean;
5
- readonly multi?: boolean;
6
- readonly longer?: boolean;
7
- readonly string?: boolean;
8
- readonly comment?: boolean;
9
- readonly literal?: boolean;
10
- readonly null?: boolean;
11
- readonly tag?: null | (<Table extends object & {
12
- [key: string | symbol]: any;
13
- }, Key extends string | symbol, Array extends any[], Index extends number, Tag extends string>(this: void, each: {
14
- table: Table;
15
- key: Key;
16
- tag: Tag;
17
- } | {
18
- array: Array;
19
- index: Index;
20
- tag: Tag;
21
- } | {
22
- table: Table;
23
- key: Key;
24
- array: Array;
25
- index: Index;
26
- tag: Tag;
27
- }) => void);
28
- };
29
- export interface TomlReadOptions {
30
- specificationVersion?: 1.0 | 0.5 | 0.4 | 0.3 | 0.2 | 0.1;
31
- multilineStringJoiner?: string;
32
- useBigInt?: boolean | number;
33
- xOptions?: XOptions;
34
- }
35
- /**
36
- * Reads a TOML file and returns the object the TOML content represents.
37
- *
38
- * @param path - A path to a file.
39
- * @param options - TOML parse options
40
- * @returns Object the TOML content of the file represents
41
- */
42
- export declare function readTomlFileSync<T extends object = any>(path: string, options?: TomlReadOptions): T;
43
- /**
44
- * Reads a TOML file and returns the object the TOML content represents.
45
- *
46
- * @param path - A path to a file.
47
- * @param options - TOML parse options
48
- * @returns Object the TOML content of the file represents
49
- */
50
- export declare function readTomlFile<T extends object = any>(path: string, options?: TomlReadOptions): Promise<T>;
51
- export interface TomlWriteOptions {
52
- integer?: number;
53
- newline?: "\n" | "\r\n";
54
- newlineAround?: "document" | "section" | "header" | "pairs" | "pair";
55
- indent?: string | number;
56
- T?: "T" | "t" | " ";
57
- Z?: "Z" | "z";
58
- xNull?: boolean;
59
- xBeforeNewlineInMultilineTable?: "," | "";
60
- forceInlineArraySpacing?: 0 | 1 | 2 | 3;
61
- }
62
- /**
63
- * Reads a TOML file and returns the object the TOML content represents.
64
- *
65
- * @param path - A path to a file.
66
- * @param data - data which should be serialized/formatted to TOML and written to the file
67
- * @param options - TOML parse options
68
- */
69
- export declare function writeTomlFileSync<T extends object = any>(path: string, data: T, options?: TomlWriteOptions): void;
70
- /**
71
- * Reads a TOML file and returns the object the TOML content represents.
72
- *
73
- * @param path - A path to a file.
74
- * @param data - data which should be serialized/formatted to TOML and written to the file
75
- * @param options - TOML parse options
76
- */
77
- export declare function writeTomlFile<T extends object = any>(path: string, data: T, options?: TomlWriteOptions): Promise<void>;
@@ -1,8 +0,0 @@
1
- import type { TsConfigJson } from "@stryke/types/tsconfig";
2
- /**
3
- * Loads a tsconfig.json file and returns the parsed JSON object.
4
- *
5
- * @param filePath - The directory to start searching for the tsconfig.json file.
6
- * @returns The parsed tsconfig.json object or null if not found.
7
- */
8
- export declare function loadTsConfig(filePath?: string): Promise<TsConfigJson>;
@@ -1,30 +0,0 @@
1
- import type { Abortable } from "node:events";
2
- import type { WriteFileOptions as FSWriteFileOptions, Mode, ObjectEncodingOptions, OpenMode } from "node:fs";
3
- import type { Encoding } from "./constants";
4
- export interface WriteFileOptions {
5
- /**
6
- * Whether to create the directory if it does not exist
7
- *
8
- * @defaultValue true
9
- */
10
- createDirectory?: boolean;
11
- }
12
- /**
13
- * Write the given content to the given file path
14
- *
15
- * @param filePath - The file path to write to
16
- * @param content - The content to write to the file
17
- */
18
- export declare const writeFileSync: (filePath: string, content?: string, options?: WriteFileOptions & FSWriteFileOptions) => void;
19
- /**
20
- * Read the given content to the given file path
21
- *
22
- * @param filePath - The file path to read to
23
- * @param content - The content to write to the file
24
- * @returns The content of the file
25
- */
26
- export declare const writeFile: (filePath: string, content?: string, options?: WriteFileOptions & ((ObjectEncodingOptions & {
27
- mode?: Mode | undefined;
28
- flag?: OpenMode | undefined;
29
- flush?: boolean | undefined;
30
- } & Abortable) | Encoding)) => Promise<void>;
package/dist/yaml.d.ts DELETED
@@ -1,18 +0,0 @@
1
- import type { DocumentOptions, ParseOptions, SchemaOptions, ToJSOptions } from "yaml";
2
- export type YamlReadOptions = ParseOptions & DocumentOptions & SchemaOptions & ToJSOptions;
3
- /**
4
- * Reads a YAML file and returns the object the YAML content represents.
5
- *
6
- * @param path - A path to a file.
7
- * @param options - YAML parse options
8
- * @returns Object the YAML content of the file represents
9
- */
10
- export declare function readYamlFileSync<T extends object = any>(path: string, options?: YamlReadOptions): T;
11
- /**
12
- * Reads a YAML file and returns the object the YAML content represents.
13
- *
14
- * @param path - A path to a file.
15
- * @param options - YAML parse options
16
- * @returns Object the YAML content of the file represents
17
- */
18
- export declare function readYamlFile<T extends object = any>(path: string, options?: YamlReadOptions): Promise<T>;