@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
package/dist/toml.d.mts CHANGED
@@ -1,2 +1,81 @@
1
- import { a as readTomlFileSync, i as readTomlFile, n as TomlWriteOptions, o as writeTomlFile, r as XOptions, s as writeTomlFileSync, t as TomlReadOptions } from "./toml-Djau1M6n.mjs";
2
- export { TomlReadOptions, TomlWriteOptions, XOptions, readTomlFile, readTomlFileSync, writeTomlFile, writeTomlFileSync };
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 { TomlReadOptions, TomlWriteOptions, XOptions, readTomlFile, readTomlFileSync, writeTomlFile, writeTomlFileSync };
81
+ //# sourceMappingURL=toml.d.mts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"toml.d.mts","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"}
package/dist/toml.mjs CHANGED
@@ -1 +1,4 @@
1
- import"./helpers-BSEQb1fp.mjs";import"./write-file-CFByoJkN.mjs";import{i as e,n as t,r as n,t as r}from"./toml-CIgLQmP3.mjs";export{r as readTomlFile,t as readTomlFileSync,n as writeTomlFile,e as writeTomlFileSync};
1
+ import{readFile as e,readFileSync as t}from"./read-file.mjs";import{writeFile as n,writeFileSync as r}from"./write-file.mjs";import i from"defu";import{parse as a,stringify as o}from"@ltd/j-toml";function s(e,n){let r=t(e);return n?.specificationVersion?a(r,n.specificationVersion,n?.multilineStringJoiner,n?.useBigInt,n?.xOptions):a(r)}async function c(t,n){let r=await e(t);return n?.specificationVersion?a(r,n.specificationVersion,n?.multilineStringJoiner,n?.useBigInt,n?.xOptions):a(r)}function l(e,t,n){return r(e,o(t,i(n??{},{newline:`
2
+ `,newlineAround:`pairs`,indent:4,forceInlineArraySpacing:1})))}async function u(e,t,r){return n(e,o(t,i(r??{},{newline:`
3
+ `,newlineAround:`pairs`,indent:4,forceInlineArraySpacing:1})))}export{c as readTomlFile,s as readTomlFileSync,u as writeTomlFile,l as writeTomlFileSync};
4
+ //# sourceMappingURL=toml.mjs.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"toml.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":"oMAgEA,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"}
package/dist/tsconfig.cjs CHANGED
@@ -1 +1 @@
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;
1
+ const e=require(`./_virtual/rolldown_runtime.cjs`),t=require(`./path/src/cwd.cjs`),n=require(`./path/src/is-type.cjs`),r=require(`./path/src/join-paths.cjs`),i=require(`./path/src/file-path-fns.cjs`),a=require(`./exists.cjs`),o=require(`./convert/src/to-array.cjs`),s=require(`./resolve.cjs`),c=require(`./json.cjs`);let l=require(`defu`);l=e.__toESM(l);async function u(e=t.cwd()){let d=i.findFileExtension(e)===`json`?e:r.joinPaths(e,`tsconfig.json`);if(!a.existsSync(d)&&(d=await s.resolve(e,{extensions:[`json`]}),!a.existsSync(d)))throw Error(`tsconfig.json not found at ${d}. Please ensure the file exists.`);let f=await c.readJsonFile(d);if(f?.compilerOptions?.baseUrl&&(f.compilerOptions.baseUrl=r.joinPaths(i.findFilePath(d),f.compilerOptions.baseUrl)),f?.extends)for(let e of o.toArray(f.extends)){let t=await u(n.isNpmScopedPackage(e)?e:r.joinPaths(i.findFilePath(d),e));t&&(f=(0,l.default)(f,t??{}))}return f.extends=void 0,f}exports.loadTsConfig=u;
@@ -1,2 +1,14 @@
1
- import { t as loadTsConfig } from "./tsconfig-C8ecu1-0.cjs";
2
- export { loadTsConfig };
1
+ import { TsConfigJson } from "./types/src/tsconfig.cjs";
2
+
3
+ //#region src/tsconfig.d.ts
4
+
5
+ /**
6
+ * Loads a tsconfig.json file and returns the parsed JSON object.
7
+ *
8
+ * @param filePath - The directory to start searching for the tsconfig.json file.
9
+ * @returns The parsed tsconfig.json object or null if not found.
10
+ */
11
+ declare function loadTsConfig(filePath?: string): Promise<TsConfigJson>;
12
+ //#endregion
13
+ export { loadTsConfig };
14
+ //# sourceMappingURL=tsconfig.d.cts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"tsconfig.d.cts","names":[],"sources":["../src/tsconfig.ts"],"sourcesContent":[],"mappings":";;;;;;AAmCA;;;;iBAAsB,YAAA,qBAEnB,QAAQ"}
@@ -1,2 +1,14 @@
1
- import { t as loadTsConfig } from "./tsconfig-B13IMV_0.mjs";
2
- export { loadTsConfig };
1
+ import { TsConfigJson } from "./types/src/tsconfig.mjs";
2
+
3
+ //#region src/tsconfig.d.ts
4
+
5
+ /**
6
+ * Loads a tsconfig.json file and returns the parsed JSON object.
7
+ *
8
+ * @param filePath - The directory to start searching for the tsconfig.json file.
9
+ * @returns The parsed tsconfig.json object or null if not found.
10
+ */
11
+ declare function loadTsConfig(filePath?: string): Promise<TsConfigJson>;
12
+ //#endregion
13
+ export { loadTsConfig };
14
+ //# sourceMappingURL=tsconfig.d.mts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"tsconfig.d.mts","names":[],"sources":["../src/tsconfig.ts"],"sourcesContent":[],"mappings":";;;;;;AAmCA;;;;iBAAsB,YAAA,qBAEnB,QAAQ"}
package/dist/tsconfig.mjs CHANGED
@@ -1 +1,2 @@
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};
1
+ import{cwd as e}from"./path/src/cwd.mjs";import{isNpmScopedPackage as t}from"./path/src/is-type.mjs";import{joinPaths as n}from"./path/src/join-paths.mjs";import{findFileExtension as r,findFilePath as i}from"./path/src/file-path-fns.mjs";import{existsSync as a}from"./exists.mjs";import{toArray as o}from"./convert/src/to-array.mjs";import{resolve as s}from"./resolve.mjs";import{readJsonFile as c}from"./json.mjs";import l from"defu";async function u(d=e()){let f=r(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(i(f),p.compilerOptions.baseUrl)),p?.extends)for(let e of o(p.extends)){let r=await u(t(e)?e:n(i(f),e));r&&(p=l(p,r??{}))}return p.extends=void 0,p}export{u as loadTsConfig};
2
+ //# sourceMappingURL=tsconfig.mjs.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"tsconfig.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":"mbAmCA,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"}
@@ -0,0 +1 @@
1
+ const e=e=>e==null?e===void 0?`[object Undefined]`:`[object Null]`:Object.prototype.toString.call(e);exports.getObjectTag=e;
@@ -0,0 +1,2 @@
1
+ const e=e=>e==null?e===void 0?`[object Undefined]`:`[object Null]`:Object.prototype.toString.call(e);export{e as getObjectTag};
2
+ //# sourceMappingURL=get-object-tag.mjs.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"get-object-tag.mjs","names":[],"sources":["../../../../type-checks/src/get-object-tag.ts"],"sourcesContent":["/* -------------------------------------------------------------------\n\n ⚡ Storm Software - Stryke\n\n This code was released as part of the Stryke project. Stryke\n is maintained by Storm Software under the Apache-2.0 license, and is\n free for commercial and private use. For more information, please visit\n our licensing page at https://stormsoftware.com/licenses/projects/stryke.\n\n Website: https://stormsoftware.com\n Repository: https://github.com/storm-software/stryke\n Documentation: https://docs.stormsoftware.com/projects/stryke\n Contact: https://stormsoftware.com/contact\n\n SPDX-License-Identifier: Apache-2.0\n\n ------------------------------------------------------------------- */\n\n/**\n * Gets the `toStringTag` of `obj`.\n *\n * @param value - The obj to query.\n * @returns Returns the `toStringTag`.\n */\nexport const getObjectTag = (value: unknown): string => {\n if (value == null) {\n return value === undefined ? \"[object Undefined]\" : \"[object Null]\";\n }\n return Object.prototype.toString.call(value);\n};\n"],"mappings":"AAwBA,MAAa,EAAgB,GACvB,GAAS,KACJ,IAAU,IAAA,GAAY,qBAAuB,gBAE/C,OAAO,UAAU,SAAS,KAAK,EAAM"}
@@ -0,0 +1 @@
1
+ const e=require(`./get-object-tag.cjs`),t=require(`./is-plain-object.cjs`),n=require(`./is-null.cjs`),r=require(`./is-number.cjs`),i=require(`./is-undefined.cjs`),a=require(`./is-empty.cjs`),o=require(`./is-set.cjs`),s=require(`./is-string.cjs`),c=require(`./is-set-string.cjs`),l=require(`./is-object.cjs`),u=require(`./is-buffer.cjs`);require(`./type-detect.cjs`),require(`./is-collection.cjs`);const d=require(`./is-error.cjs`);
@@ -0,0 +1 @@
1
+ import{getObjectTag as e}from"./get-object-tag.mjs";import{isObjectLike as t,isPlainObject as n}from"./is-plain-object.mjs";import{isNull as r}from"./is-null.mjs";import{isNumber as i}from"./is-number.mjs";import{isUndefined as a}from"./is-undefined.mjs";import{isEmpty as o}from"./is-empty.mjs";import{isSet as s}from"./is-set.mjs";import{isString as c}from"./is-string.mjs";import{isSetString as l}from"./is-set-string.mjs";import{isObject as u}from"./is-object.mjs";import{isBufferExists as d}from"./is-buffer.mjs";import"./type-detect.mjs";import"./is-collection.mjs";import{isError as f}from"./is-error.mjs";export{};
@@ -0,0 +1 @@
1
+ const e=typeof Buffer<`u`,t=e?Buffer.isBuffer.bind(Buffer):function(e){return!1};exports.isBufferExists=e;
@@ -0,0 +1,2 @@
1
+ const e=typeof Buffer<`u`;e&&Buffer.isBuffer.bind(Buffer);export{e as isBufferExists};
2
+ //# sourceMappingURL=is-buffer.mjs.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"is-buffer.mjs","names":["isBuffer: typeof Buffer.isBuffer","isBuffer"],"sources":["../../../../type-checks/src/is-buffer.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\nexport const isBufferExists = typeof Buffer !== \"undefined\";\n\n/**\n * Check if the provided value's type is `Buffer`\n */\nexport const isBuffer: typeof Buffer.isBuffer = isBufferExists\n ? Buffer.isBuffer.bind(Buffer)\n : /**\n * Check if the provided value's type is `Buffer`\n\n * @param value - The value to type check\n * @returns An indicator specifying if the value provided is of type `Buffer`\n */\n function isBuffer(\n value: Parameters<typeof Buffer.isBuffer>[0]\n ): value is Buffer {\n return false;\n };\n"],"mappings":"AAkBA,MAAa,EAAiB,OAAO,OAAW,IAKA,GAC5C,OAAO,SAAS,KAAK,OAAO"}
@@ -0,0 +1 @@
1
+ require(`./type-detect.cjs`);
@@ -0,0 +1 @@
1
+ import"./type-detect.mjs";export{};
@@ -0,0 +1 @@
1
+ const e=require(`./is-null.cjs`),t=require(`./is-undefined.cjs`),n=n=>{try{return t.isUndefined(n)||e.isNull(n)}catch{return!1}};exports.isEmpty=n;
@@ -0,0 +1,2 @@
1
+ import{isNull as e}from"./is-null.mjs";import{isUndefined as t}from"./is-undefined.mjs";const n=n=>{try{return t(n)||e(n)}catch{return!1}};export{n as isEmpty};
2
+ //# sourceMappingURL=is-empty.mjs.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"is-empty.mjs","names":[],"sources":["../../../../type-checks/src/is-empty.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 { isDate } from \"./is-date\";\nimport { isFunction } from \"./is-function\";\nimport { isNull } from \"./is-null\";\nimport { isNumber } from \"./is-number\";\nimport { isSymbol } from \"./is-symbol\";\nimport { isUndefined } from \"./is-undefined\";\n\n/**\n * Check if the provided value's type is `null` or `undefined`\n *\n * @param value - The value to type check\n * @returns An indicator specifying if the value provided is of type `null` or `undefined`\n */\nexport const isEmpty = (value: unknown) => {\n try {\n return isUndefined(value) || isNull(value);\n } catch {\n return false;\n }\n};\n\nexport const isEmptyAnything = (value: any) => {\n if (value === true || value === false) return true;\n if (value === null || value === undefined) return true;\n if (isNumber(value)) return value === 0;\n if (isDate(value)) return Number.isNaN(value.getTime());\n if (isFunction(value)) return false;\n if (isSymbol(value)) return false;\n const { length } = value;\n if (isNumber(length)) return length === 0;\n const { size } = value;\n if (isNumber(size)) return size === 0;\n const keys = Object.keys(value).length;\n\n return keys === 0;\n};\n"],"mappings":"wFA+BA,MAAa,EAAW,GAAmB,CACzC,GAAI,CACF,OAAO,EAAY,EAAM,EAAI,EAAO,EAAM,MACpC,CACN,MAAO"}
@@ -0,0 +1 @@
1
+ const e=require(`./get-object-tag.cjs`),t=require(`./is-plain-object.cjs`),n=require(`./is-object.cjs`),r=r=>{if(!n.isObject(r))return!1;let i=e.getObjectTag(r);return i===`[object Error]`||i===`[object DOMException]`||typeof r?.message==`string`&&typeof r?.name==`string`&&!t.isPlainObject(r)};exports.isError=r;
@@ -0,0 +1,2 @@
1
+ import{getObjectTag as e}from"./get-object-tag.mjs";import{isPlainObject as t}from"./is-plain-object.mjs";import{isObject as n}from"./is-object.mjs";const r=r=>{if(!n(r))return!1;let i=e(r);return i===`[object Error]`||i===`[object DOMException]`||typeof r?.message==`string`&&typeof r?.name==`string`&&!t(r)};export{r as isError};
2
+ //# sourceMappingURL=is-error.mjs.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"is-error.mjs","names":[],"sources":["../../../../type-checks/src/is-error.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 { getObjectTag } from \"./get-object-tag\";\nimport { isObject } from \"./is-object\";\nimport { isPlainObject } from \"./is-plain-object\";\n\n/**\n * Checks if `obj` is an `Error`, `EvalError`, `RangeError`, `ReferenceError`,\n * `SyntaxError`, `TypeError`, or `URIError` object.\n *\n * @example\n * ```typescript\n * isError(new Error)\n * // => true\n *\n * isError(Error)\n * // => false\n * ```\n *\n * @param obj - The obj to check.\n * @returns Returns `true` if `obj` is an error object, else `false`.\n */\nexport const isError = (obj: unknown): obj is Error => {\n if (!isObject(obj)) {\n return false;\n }\n\n const tag = getObjectTag(obj);\n\n return (\n tag === \"[object Error]\" ||\n tag === \"[object DOMException]\" ||\n (typeof (obj as Error)?.message === \"string\" &&\n typeof (obj as Error)?.name === \"string\" &&\n !isPlainObject(obj))\n );\n};\n"],"mappings":"qJAsCA,MAAa,EAAW,GAA+B,CACrD,GAAI,CAAC,EAAS,EAAI,CAChB,MAAO,GAGT,IAAM,EAAM,EAAa,EAAI,CAE7B,OACE,IAAQ,kBACR,IAAQ,yBACP,OAAQ,GAAe,SAAY,UAClC,OAAQ,GAAe,MAAS,UAChC,CAAC,EAAc,EAAI"}
@@ -0,0 +1 @@
1
+ const e=e=>{try{return e===null}catch{return!1}};exports.isNull=e;
@@ -0,0 +1,2 @@
1
+ const e=e=>{try{return e===null}catch{return!1}};export{e as isNull};
2
+ //# sourceMappingURL=is-null.mjs.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"is-null.mjs","names":[],"sources":["../../../../type-checks/src/is-null.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\nexport const isNull = (value: unknown): value is null => {\n try {\n return value === null;\n } catch {\n return false;\n }\n};\n"],"mappings":"AAkBA,MAAa,EAAU,GAAkC,CACvD,GAAI,CACF,OAAO,IAAU,UACX,CACN,MAAO"}
@@ -0,0 +1 @@
1
+ const e=e=>{try{return e instanceof Number||typeof e==`number`||Number(e)===e}catch{return!1}};exports.isNumber=e;
@@ -0,0 +1,2 @@
1
+ const e=e=>{try{return e instanceof Number||typeof e==`number`||Number(e)===e}catch{return!1}};export{e as isNumber};
2
+ //# sourceMappingURL=is-number.mjs.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"is-number.mjs","names":[],"sources":["../../../../type-checks/src/is-number.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 { AnyNumber } from \"@stryke/types/base\";\nimport { getObjectTag } from \"./get-object-tag\";\n\n/**\n * Check if the provided value's type is `number`\n *\n * @param value - The value to type check\n * @returns An indicator specifying if the value provided is of type `number`\n */\nexport const isNumber = (value: unknown): value is number => {\n try {\n return (\n value instanceof Number ||\n typeof value === \"number\" ||\n Number(value) === value\n );\n } catch {\n return false;\n }\n};\n\n/**\n * Check if the provided value's type is `AnyNumber`\n *\n * @param value - The value to type check\n * @returns An indicator specifying if the value provided is of type `AnyNumber`\n */\nexport function isAnyNumber(value?: any): value is AnyNumber {\n return isNumber(value) || getObjectTag(value) === \"[object Number]\";\n}\n"],"mappings":"AA2BA,MAAa,EAAY,GAAoC,CAC3D,GAAI,CACF,OACE,aAAiB,QACjB,OAAO,GAAU,UACjB,OAAO,EAAM,GAAK,OAEd,CACN,MAAO"}
@@ -0,0 +1 @@
1
+ const e=require(`./is-plain-object.cjs`),t=t=>{try{return typeof t==`object`||!!t&&t?.constructor===Object||e.isPlainObject(t)}catch{return!1}};exports.isObject=t;
@@ -0,0 +1,2 @@
1
+ import{isPlainObject as e}from"./is-plain-object.mjs";const t=t=>{try{return typeof t==`object`||!!t&&t?.constructor===Object||e(t)}catch{return!1}};export{t as isObject};
2
+ //# sourceMappingURL=is-object.mjs.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"is-object.mjs","names":[],"sources":["../../../../type-checks/src/is-object.ts"],"sourcesContent":["/* -------------------------------------------------------------------\n\n ⚡ Storm Software - Stryke\n\n This code was released as part of the Stryke project. Stryke\n is maintained by Storm Software under the Apache-2.0 license, and is\n free for commercial and private use. For more information, please visit\n our licensing page at https://stormsoftware.com/licenses/projects/stryke.\n\n Website: https://stormsoftware.com\n Repository: https://github.com/storm-software/stryke\n Documentation: https://docs.stormsoftware.com/projects/stryke\n Contact: https://stormsoftware.com/contact\n\n SPDX-License-Identifier: Apache-2.0\n\n ------------------------------------------------------------------- */\n\n/* eslint-disable ts/no-unsafe-function-type */\n/* eslint-disable ts/no-unsafe-call */\n\nimport type { NativeClass } from \"@stryke/types/base\";\nimport { isPlainObject } from \"./is-plain-object\";\n\n// Prepare\nconst isClassRegex = /^class\\s|^function\\s+[A-Z]/;\nconst isConventionalClassRegex = /^function\\s+[A-Z]/;\nconst isNativeClassRegex = /^class\\s/;\n\n/** Is ES6+ class */\nexport function isNativeClass(value?: any): value is NativeClass {\n // NOTE TO DEVELOPER: If any of this changes, isClass must also be updated\n return (\n typeof value === \"function\" && isNativeClassRegex.test(value.toString())\n );\n}\n\n/**\n * Check if the provided value's type is a conventional class\n *\n * @remarks\n * Is Conventional Class\n * Looks for function with capital first letter MyClass\n * First letter is the 9th character\n * If changed, isClass must also be updated\n *\n * @param value - The value to type check\n * @returns An indicator specifying if the value provided is a conventional class\n */\nexport function isConventionalClass(value?: any): value is Function {\n return (\n typeof value === \"function\" &&\n isConventionalClassRegex.test(value.toString())\n );\n}\n\n/**\n * Check if the provided value's type is `Object`\n *\n * @param value - The value to type check\n * @returns An indicator specifying if the value provided is of type `Object`\n */\nexport function isClass(value?: any): value is Function | NativeClass; // only guarantee of truth type, not of validity\nexport function isClass(value?: any): boolean {\n return typeof value === \"function\" && isClassRegex.test(value.toString());\n}\n\n/**\n * Check if the provided value's type is `Object`\n *\n * @param value - The value to type check\n * @returns An indicator specifying if the value provided is of type `Object`\n */\nexport const isObject = (value: unknown): value is object => {\n try {\n return (\n typeof value === \"object\" ||\n (Boolean(value) && value?.constructor === Object) ||\n isPlainObject(value)\n );\n } catch {\n return false;\n }\n};\n"],"mappings":"sDAyEA,MAAa,EAAY,GAAoC,CAC3D,GAAI,CACF,OACE,OAAO,GAAU,UAChB,EAAQ,GAAU,GAAO,cAAgB,QAC1C,EAAc,EAAM,MAEhB,CACN,MAAO"}
@@ -0,0 +1 @@
1
+ const e=require(`./get-object-tag.cjs`),t=e=>typeof e==`object`&&!!e,n=n=>{if(!t(n)||e.getObjectTag(n)!==`[object Object]`)return!1;if(Object.getPrototypeOf(n)===null)return!0;let r=n;for(;Object.getPrototypeOf(r)!==null;)r=Object.getPrototypeOf(r);return Object.getPrototypeOf(n)===r};exports.isObjectLike=t,exports.isPlainObject=n;
@@ -0,0 +1,2 @@
1
+ import{getObjectTag as e}from"./get-object-tag.mjs";const t=e=>typeof e==`object`&&!!e,n=n=>{if(!t(n)||e(n)!==`[object Object]`)return!1;if(Object.getPrototypeOf(n)===null)return!0;let r=n;for(;Object.getPrototypeOf(r)!==null;)r=Object.getPrototypeOf(r);return Object.getPrototypeOf(n)===r};export{t as isObjectLike,n as isPlainObject};
2
+ //# sourceMappingURL=is-plain-object.mjs.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"is-plain-object.mjs","names":[],"sources":["../../../../type-checks/src/is-plain-object.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 { PlainObject } from \"@stryke/types/base\";\nimport { getObjectTag } from \"./get-object-tag\";\n\n/**\n * Checks if `value` is object-like. A value is object-like if it's not `null`\n * and has a `typeof` result of \"object\".\n *\n * @example\n * ```typescript\n * isObjectLike({})\n * // => true\n *\n * isObjectLike([1, 2, 3])\n * // => true\n *\n * isObjectLike(Function)\n * // => false\n *\n * isObjectLike(null)\n * // => false\n * ```\n *\n * @param value - The value to check.\n * @returns Returns `true` if `value` is object-like, else `false`.\n */\nexport const isObjectLike = (obj: unknown) => {\n return typeof obj === \"object\" && obj !== null;\n};\n\n/**\n * Checks if `obj` is a plain object, that is, an object created by the `Object` constructor or one with a `[[Prototype]]` of `null`.\n *\n * @example\n * ```typescript\n * function Foo() {\n * this.a = 1\n * }\n *\n * isPlainObject(new Foo)\n * // => false\n *\n * isPlainObject([1, 2, 3])\n * // => false\n *\n * isPlainObject({ 'x': 0, 'y': 0 })\n * // => true\n *\n * isPlainObject(Object.create(null))\n * // => true\n * ```\n *\n * @param obj - The value to check.\n * @returns Returns `true` if `obj` is a plain object, else `false`.\n */\nexport const isPlainObject = (obj: unknown): obj is PlainObject => {\n if (!isObjectLike(obj) || getObjectTag(obj) !== \"[object Object]\") {\n return false;\n }\n if (Object.getPrototypeOf(obj) === null) {\n return true;\n }\n let proto = obj;\n while (Object.getPrototypeOf(proto) !== null) {\n proto = Object.getPrototypeOf(proto);\n }\n return Object.getPrototypeOf(obj) === proto;\n};\n"],"mappings":"oDA2CA,MAAa,EAAgB,GACpB,OAAO,GAAQ,YAAY,EA4BvB,EAAiB,GAAqC,CACjE,GAAI,CAAC,EAAa,EAAI,EAAI,EAAa,EAAI,GAAK,kBAC9C,MAAO,GAET,GAAI,OAAO,eAAe,EAAI,GAAK,KACjC,MAAO,GAET,IAAI,EAAQ,EACZ,KAAO,OAAO,eAAe,EAAM,GAAK,MACtC,EAAQ,OAAO,eAAe,EAAM,CAEtC,OAAO,OAAO,eAAe,EAAI,GAAK"}
@@ -0,0 +1 @@
1
+ const e=require(`./is-set.cjs`),t=require(`./is-string.cjs`),n=n=>{try{return e.isSet(n)&&t.isString(n)&&n.length>0}catch{return!1}};exports.isSetString=n;
@@ -0,0 +1,2 @@
1
+ import{isSet as e}from"./is-set.mjs";import{isString as t}from"./is-string.mjs";const n=n=>{try{return e(n)&&t(n)&&n.length>0}catch{return!1}};export{n as isSetString};
2
+ //# sourceMappingURL=is-set-string.mjs.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"is-set-string.mjs","names":[],"sources":["../../../../type-checks/src/is-set-string.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 { isSet } from \"./is-set\";\nimport { isString } from \"./is-string\";\n\n/**\n * Determine if the type is string and is not empty (length greater than zero)\n *\n * @param value - The value to type check\n * @returns An indicator specifying if the value provided is of type `string` and length greater than zero\n */\nexport const isSetString = (value: unknown): value is NonNullable<string> => {\n try {\n return isSet(value) && isString(value) && value.length > 0;\n } catch {\n return false;\n }\n};\n"],"mappings":"gFA2BA,MAAa,EAAe,GAAiD,CAC3E,GAAI,CACF,OAAO,EAAM,EAAM,EAAI,EAAS,EAAM,EAAI,EAAM,OAAS,OACnD,CACN,MAAO"}
@@ -0,0 +1 @@
1
+ const e=require(`./is-empty.cjs`),t=t=>{try{return!e.isEmpty(t)}catch{return!1}};exports.isSet=t;
@@ -0,0 +1,2 @@
1
+ import{isEmpty as e}from"./is-empty.mjs";const t=t=>{try{return!e(t)}catch{return!1}};export{t as isSet};
2
+ //# sourceMappingURL=is-set.mjs.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"is-set.mjs","names":[],"sources":["../../../../type-checks/src/is-set.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 { isEmpty } from \"./is-empty\";\n\n/**\n * The inverse of the `isEmpty` function\n *\n * @param value - The value to type check\n * @returns An indicator specifying if the value provided is **NOT** of type `null` or `undefined`\n */\nexport const isSet = (value: unknown): value is NonNullable<unknown> => {\n try {\n return !isEmpty(value);\n } catch {\n return false;\n }\n};\n"],"mappings":"yCA0BA,MAAa,EAAS,GAAkD,CACtE,GAAI,CACF,MAAO,CAAC,EAAQ,EAAM,MAChB,CACN,MAAO"}
@@ -0,0 +1 @@
1
+ const e=e=>{try{return typeof e==`string`}catch{return!1}};exports.isString=e;
@@ -0,0 +1,2 @@
1
+ const e=e=>{try{return typeof e==`string`}catch{return!1}};export{e as isString};
2
+ //# sourceMappingURL=is-string.mjs.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"is-string.mjs","names":[],"sources":["../../../../type-checks/src/is-string.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\nexport const isString = (value: unknown): value is string => {\n try {\n return typeof value === \"string\";\n } catch {\n return false;\n }\n};\n"],"mappings":"AAkBA,MAAa,EAAY,GAAoC,CAC3D,GAAI,CACF,OAAO,OAAO,GAAU,cAClB,CACN,MAAO"}
@@ -0,0 +1 @@
1
+ const e=e=>e===void 0;exports.isUndefined=e;
@@ -0,0 +1,2 @@
1
+ const e=e=>e===void 0;export{e as isUndefined};
2
+ //# sourceMappingURL=is-undefined.mjs.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"is-undefined.mjs","names":[],"sources":["../../../../type-checks/src/is-undefined.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\nexport const isUndefined = (value: unknown): value is undefined => {\n return value === undefined;\n};\n"],"mappings":"AAkBA,MAAa,EAAe,GACnB,IAAU,IAAA"}
@@ -0,0 +1 @@
1
+ require(`./is-buffer.cjs`);const e=(e=>(typeof globalThis==`object`||Object.defineProperty(e,`typeDetectGlobalObject`,{get(){return this},configurable:!0}),globalThis))(Object.prototype);
@@ -0,0 +1,2 @@
1
+ import"./is-buffer.mjs";(e=>(typeof globalThis==`object`||Object.defineProperty(e,`typeDetectGlobalObject`,{get(){return this},configurable:!0}),globalThis))(Object.prototype);export{};
2
+ //# sourceMappingURL=type-detect.mjs.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"type-detect.mjs","names":[],"sources":["../../../../type-checks/src/type-detect.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 { isBuffer } from \"./is-buffer\";\n\nconst globalObject = (Obj => {\n if (typeof globalThis === \"object\") {\n return globalThis;\n }\n Object.defineProperty(Obj, \"typeDetectGlobalObject\", {\n get() {\n return this;\n },\n configurable: true\n });\n\n // // biome-ignore lint/correctness/noUndeclaredVariables: <explanation>\n // const global = typeDetectGlobalObject;\n\n // // biome-ignore lint/performance/noDelete: <explanation>\n // delete Obj.typeDetectGlobalObject;\n return globalThis;\n})(Object.prototype);\n\nexport function typeDetect(obj: unknown): string {\n // NOTE: isBuffer must execute before type-detect,\n // because type-detect returns 'Uint8Array'.\n if (isBuffer(obj)) {\n return \"Buffer\";\n }\n\n const typeofObj = typeof obj;\n if (typeofObj !== \"object\") {\n return typeofObj;\n }\n\n if (obj === null) {\n return \"null\";\n }\n\n if (obj === globalObject) {\n return \"global\";\n }\n\n if (\n Array.isArray(obj) &&\n (Symbol.toStringTag === undefined || !(Symbol.toStringTag in obj))\n ) {\n return \"Array\";\n }\n\n // https://html.spec.whatwg.org/multipage/browsers.html#location\n if (typeof globalThis === \"object\" && globalThis !== null) {\n if (\n typeof (globalThis as any).location === \"object\" &&\n obj === (globalThis as any).location\n ) {\n return \"Location\";\n }\n\n // https://html.spec.whatwg.org/#document\n if (\n typeof (globalThis as any).document === \"object\" &&\n obj === (globalThis as any).document\n ) {\n return \"Document\";\n }\n\n // https://html.spec.whatwg.org/multipage/webappapis.html#mimetypearray\n if (typeof (globalThis as any).navigator === \"object\") {\n if (\n typeof (globalThis as any).navigator.mimeTypes === \"object\" &&\n obj === (globalThis as any).navigator.mimeTypes\n ) {\n return \"MimeTypeArray\";\n }\n\n // https://html.spec.whatwg.org/multipage/webappapis.html#pluginarray\n if (\n typeof (globalThis as any).navigator.plugins === \"object\" &&\n obj === (globalThis as any).navigator.plugins\n ) {\n return \"PluginArray\";\n }\n }\n\n // https://html.spec.whatwg.org/multipage/webappapis.html#pluginarray\n if (\n (typeof (globalThis as any).HTMLElement === \"function\" ||\n typeof (globalThis as any).HTMLElement === \"object\") &&\n obj instanceof (globalThis as any).HTMLElement\n ) {\n if ((obj as any).tagName === \"BLOCKQUOTE\") {\n return \"HTMLQuoteElement\";\n }\n\n // https://html.spec.whatwg.org/#htmltabledatacellelement\n if ((obj as any).tagName === \"TD\") {\n return \"HTMLTableDataCellElement\";\n }\n\n // https://html.spec.whatwg.org/#htmltableheadercellelement\n if ((obj as any).tagName === \"TH\") {\n return \"HTMLTableHeaderCellElement\";\n }\n }\n }\n\n const stringTag =\n Symbol.toStringTag !== undefined && (obj as any)[Symbol.toStringTag];\n if (typeof stringTag === \"string\") {\n return stringTag;\n }\n\n const objPrototype = Object.getPrototypeOf(obj);\n if (objPrototype === RegExp.prototype) {\n return \"RegExp\";\n }\n\n if (objPrototype === Date.prototype) {\n return \"Date\";\n }\n\n // http://www.ecma-international.org/ecma-262/6.0/index.html#sec-promise.prototype-@@tostringtag\n if (typeof Promise !== \"undefined\" && objPrototype === Promise.prototype) {\n return \"Promise\";\n }\n\n if (typeof Set !== \"undefined\" && objPrototype === Set.prototype) {\n return \"Set\";\n }\n\n if (typeof Map !== \"undefined\" && objPrototype === Map.prototype) {\n return \"Map\";\n }\n\n if (typeof WeakSet !== \"undefined\" && objPrototype === WeakSet.prototype) {\n return \"WeakSet\";\n }\n\n if (typeof WeakMap !== \"undefined\" && objPrototype === WeakMap.prototype) {\n return \"WeakMap\";\n }\n\n // http://www.ecma-international.org/ecma-262/6.0/index.html#sec-dataview.prototype-@@tostringtag\n if (typeof DataView !== \"undefined\" && objPrototype === DataView.prototype) {\n return \"DataView\";\n }\n\n // http://www.ecma-international.org/ecma-262/6.0/index.html#sec-%mapiteratorprototype%-@@tostringtag\n if (\n typeof Map !== \"undefined\" &&\n objPrototype === Object.getPrototypeOf(new Map().entries())\n ) {\n return \"Map Iterator\";\n }\n\n // http://www.ecma-international.org/ecma-262/6.0/index.html#sec-%setiteratorprototype%-@@tostringtag\n if (\n typeof Set !== \"undefined\" &&\n objPrototype === Object.getPrototypeOf(new Set().entries())\n ) {\n return \"Set Iterator\";\n }\n\n // http://www.ecma-international.org/ecma-262/6.0/index.html#sec-%arrayiteratorprototype%-@@tostringtag\n if (\n typeof Array.prototype[Symbol.iterator] === \"function\" &&\n objPrototype === Object.getPrototypeOf([][Symbol.iterator]())\n ) {\n return \"Array Iterator\";\n }\n\n // http://www.ecma-international.org/ecma-262/6.0/index.html#sec-%stringiteratorprototype%-@@tostringtag\n if (\n Symbol.iterator !== undefined &&\n typeof String.prototype[Symbol.iterator] === \"function\" &&\n Object.getPrototypeOf(\"\"[Symbol.iterator]()) &&\n objPrototype === Object.getPrototypeOf(\"\"[Symbol.iterator]())\n ) {\n return \"String Iterator\";\n }\n\n if (objPrototype === null) {\n return \"Object\";\n }\n\n return Object.prototype.toString.call(obj).slice(8, -1);\n}\n"],"mappings":"yBAoBsB,IAChB,OAAO,YAAe,UAG1B,OAAO,eAAe,EAAK,yBAA0B,CACnD,KAAM,CACJ,OAAO,MAET,aAAc,GACf,CAAC,CAPO,aAeR,OAAO,UAAU"}
@@ -0,0 +1 @@
1
+ const e=``;exports.EMPTY_STRING=``;
@@ -0,0 +1,2 @@
1
+ const e=``;export{e as EMPTY_STRING};
2
+ //# sourceMappingURL=base.mjs.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"base.mjs","names":[],"sources":["../../../../types/src/base.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 { TypedArray } from \"./array\";\n\nexport type SerializablePrimitive =\n | null\n | undefined\n | string\n | number\n | boolean\n | bigint;\nexport type Primitive = SerializablePrimitive | symbol;\n\n/**\n * Matches any primitive, `void`, `Date`, or `RegExp` value.\n */\nexport type BuiltIns = Primitive | void | Date | RegExp;\n\n/**\n * Matches any non-primitive object\n */\n// eslint-disable-next-line ts/no-unsafe-function-type\nexport type AtomicObject = Function | Promise<any> | Date | RegExp;\n\n/** Determines if the passed value is of a specific type */\nexport type TypeTester = (value: any) => boolean;\n\n/**\n * The interface for a type mapping (key =\\> function) to use for {@link getType}.\n * export * The key represents the name of the type. The function represents the {@link TypeTester | test method}.\n * The map should be ordered by testing preference, with more specific tests first.\n * If a test returns true, it is selected, and the key is returned as the type.\n */\nexport type TypeMap = Record<string, TypeTester>;\n\ndeclare const emptyObjectSymbol: unique symbol;\n\nexport type FunctionOrValue<Value> = Value extends () => infer X ? X : Value;\n\n/**\n * A [[List]]\n *\n * @example\n * ```ts\n * type list0 = [1, 2, 3]\n * type list1 = number[]\n * ```\n *\n * @param A - its type\n * @returns [[List]]\n */\nexport type List<A = any> = ReadonlyArray<A>;\n\n/**\n * Alias to create a [[Function]]\n *\n * @example\n * ```ts\n * import { FunctionLike } from '@stryke/types'\n *\n * type test0 = FunctionLike<[string, number], boolean>\n * /// (args_0: string, args_1: number) => boolean\n * ```\n *\n * @param P - parameters\n * @param R - return type\n * @returns [[Function]]\n */\nexport type FunctionLike<P extends List = any, R = any> = (...args: P) => R;\n\nexport type AnyFunction = FunctionLike<any, any>;\nexport type Nullish = undefined | null;\nexport type Nullishable<T> = T | Nullish;\nexport type NonNullishObject = object; // not null/undefined which are Object\nexport type NativeClass = abstract new (...args: any) => any;\nexport type AnyNumber = number | number;\nexport type AnyString = string | string;\nexport type AnyBoolean = boolean | boolean;\nexport type AnyArray = any[];\nexport type PlainObject = Record<any, object>; // https://stackoverflow.com/a/75052315/130638\nexport type AnyMap = Map<any, any>;\nexport type AnyWeakMap = WeakMap<WeakKey, any>;\nexport type EmptyArray = [];\nexport interface EmptyObject {\n [emptyObjectSymbol]?: never;\n}\n\nexport type Any =\n | boolean\n | number\n | bigint\n | string\n | null\n | undefined\n | void\n | symbol\n | object\n | PlainObject\n | AnyArray\n | AnyMap\n | AnyWeakMap;\n\n/**\n * The valid types of the index for an `Indexable` type object\n */\nexport type IndexType = string | number | symbol;\n\n/**\n * The declaration of a ***dictionary-type*** object with a specific type\n *\n * @see {@link Indexable}\n * @see {@link IndexType}\n * @see {@link Dictionary}\n */\nexport type TypedIndexable<T> = Record<IndexType, T>;\n\n/**\n * The declaration of a ***dictionary-type*** object\n *\n * @see {@link TypedIndexable}\n * @see {@link IndexType}\n * @see {@link Dictionary}\n */\nexport type Indexable = TypedIndexable<any>;\n\n/**\n * The declaration of a ***dictionary-type*** object with a specific type\n *\n * @see {@link Indexable}\n * @see {@link IndexType}\n * @see {@link TypedIndexable}\n */\nexport type Dictionary<T> = Record<string, T>;\n\nexport const EMPTY_STRING = \"\";\nexport const NEWLINE_STRING = \"\\r\\n\";\nexport const EMPTY_OBJECT = {};\n\nexport type AnyCase<T extends IndexType> = string extends T\n ? string\n : T extends `${infer F1}${infer F2}${infer R}`\n ? `${Uppercase<F1> | Lowercase<F1>}${Uppercase<F2> | Lowercase<F2>}${AnyCase<R>}`\n : T extends `${infer F}${infer R}`\n ? `${Uppercase<F> | Lowercase<F>}${AnyCase<R>}`\n : typeof EMPTY_STRING;\n\nexport type Newable<T> = new (..._args: never[]) => T;\n\nexport interface Abstract<T> {\n prototype: T;\n}\n\nexport interface Clonable<T> {\n clone: () => T;\n}\n\nexport type MaybePromise<T> = T | Promise<T>;\n\nexport type ReducerFunction<TState, TAction> = (\n state: TState,\n action: TAction\n) => TState;\n\n// NOTE: for the file size optimization\nexport const TYPE_ARGUMENTS = \"Arguments\";\nexport const TYPE_ARRAY = \"Array\";\nexport const TYPE_OBJECT = \"Object\";\nexport const TYPE_MAP = \"Map\";\nexport const TYPE_SET = \"Set\";\n\nexport type Collection =\n | IArguments\n | unknown[]\n | Map<unknown, unknown>\n | Record<string | number | symbol, unknown>\n | Set<unknown>;\n\nexport type NonUndefined<T> = T extends undefined ? never : T;\n\nexport type BrowserNativeObject = Date | File;\n\nexport type DeepPartial<T> = T extends BrowserNativeObject | NestedValue\n ? T\n : {\n [K in keyof T]?: DeepPartial<T[K]>;\n };\n\nexport type Rollback = Record<\n string,\n (initialValue: any, currentValue: any) => any\n>;\n\n/**\n * Extract all required keys from the given type.\n *\n * @remarks\n * This is useful when you want to create a new type that contains different type values for the required keys only or use the list of keys for validation purposes, etc...\n */\nexport type RequiredKeysOf<BaseType extends object> = Exclude<\n {\n [Key in keyof BaseType]: BaseType extends Record<Key, BaseType[Key]>\n ? Key\n : never;\n }[keyof BaseType],\n undefined\n>;\n\n/**\n * Returns a boolean for whether the two given types are equal.\n *\n * @remarks\n * Use-cases: If you want to make a conditional branch based on the result of a comparison of two types.\n *\n * @see https://github.com/microsoft/TypeScript/issues/27024#issuecomment-421529650\n * @see https://stackoverflow.com/questions/68961864/how-does-the-equals-work-in-typescript/68963796#68963796\n */\nexport type IsEqual<A, B> =\n (<G>() => G extends A ? 1 : 2) extends <G>() => G extends B ? 1 : 2\n ? true\n : false;\n\nexport type Filter<KeyType, ExcludeType> =\n IsEqual<KeyType, ExcludeType> extends true\n ? never\n : KeyType extends ExcludeType\n ? never\n : KeyType;\n\ninterface ExceptOptions {\n /**\n Disallow assigning non-specified properties.\n\n Note that any omitted properties in the resulting type will be present in autocomplete as `undefined`.\n\n @defaultValue false\n */\n requireExactProps?: boolean;\n}\n\n/**\n * Create a type from an object type without certain keys.\n *\n * @remarks\n * We recommend setting the `requireExactProps` option to `true`.\n *\n * This type is a stricter version of [`Omit`](https://www.typescriptlang.org/docs/handbook/release-notes/typescript-3-5.html#the-omit-helper-type). The `Omit` type does not restrict the omitted keys to be keys present on the given type, while `Except` does. The benefits of a stricter type are avoiding typos and allowing the compiler to pick up on rename refactors automatically.\n *\n * This type was proposed to the TypeScript team, which declined it, saying they prefer that libraries implement stricter versions of the built-in types ([microsoft/TypeScript#30825](https://github.com/microsoft/TypeScript/issues/30825#issuecomment-523668235)).\n */\nexport type Except<\n ObjectType,\n KeysType extends keyof ObjectType,\n Options extends ExceptOptions = { requireExactProps: false }\n> = {\n [KeyType in keyof ObjectType as Filter<\n KeyType,\n KeysType\n >]: ObjectType[KeyType];\n} & (Options[\"requireExactProps\"] extends true\n ? Partial<Record<KeysType, never>>\n : Record<string, never>);\n\n/**\n * Useful to flatten the type output to improve type hints shown in editors. And also to transform an interface into a type to aide with assignability.\n *\n * @remarks\n * Sometimes it is desired to pass a value as a function argument that has a different type. At first inspection it may seem assignable, and then you discover it is not because the `value`'s type definition was defined as an interface. In the following example, `fn` requires an argument of type `Record<string, unknown>`. If the value is defined as a literal, then it is assignable. And if the `value` is defined as type using the `Simplify` utility the value is assignable. But if the `value` is defined as an interface, it is not assignable because the interface is not sealed and elsewhere a non-string property could be added to the interface.\n *\n * If the type definition must be an interface (perhaps it was defined in a third-party npm package), then the `value` can be defined as `const value: Simplify<SomeInterface> = ...`. Then `value` will be assignable to the `fn` argument. Or the `value` can be cast as `Simplify<SomeInterface>` if you can't re-declare the `value`.\n *\n * @see https://github.com/microsoft/TypeScript/issues/15300\n */\nexport type Simplify<T> = { [KeyType in keyof T]: T[KeyType] } & {};\n\n/**\n * Create a type that makes the given keys required. The remaining keys are kept as is. The sister of the `SetOptional` type.\n *\n * @remarks\n * Use-case: You want to define a single model where the only thing that changes is whether or not some of the keys are required.\n */\nexport type SetRequired<\n BaseType,\n Keys extends keyof BaseType\n> = BaseType extends unknown // type](https://www.typescriptlang.org/docs/handbook/release-notes/typescript-2-8.html#distributive-conditional-types). // union into a [distributive conditional // `extends unknown` is always going to be the case and is used to convert any\n ? Simplify<\n // Pick just the keys that are optional from the base type.\n Except<BaseType, Keys> &\n // Pick the keys that should be required from the base type and make them required.\n Required<Pick<BaseType, Keys>>\n >\n : never;\n\nexport const $NestedValue: unique symbol = Symbol(\"NestedValue\");\n\nexport type NestedValue<TValue extends object = object> = {\n [$NestedValue]: never;\n} & TValue;\n\nexport interface RefObject<T> {\n current: T;\n}\n\nexport interface Identity<T = string> {\n id: T;\n}\n\nexport interface Versioned {\n version: number;\n}\n\nexport interface Sequenced {\n /**\n * The sequence number (version, or event counter, etc.) of the record\n */\n sequence: number;\n}\n\nexport interface Typed {\n /**\n * The type of the record\n */\n __type: string;\n}\n\nexport interface ClassTypeCheckable<T> extends Typed {\n /**\n * Run type check on the given value\n * @param value - The value to check\n * @returns True if the value is of the type of the class\n */\n isTypeOf: (value: unknown) => value is T;\n}\n\n/**\n * Matches non-recursive types.\n */\nexport type NonRecursiveType =\n | BuiltIns\n // eslint-disable-next-line ts/no-unsafe-function-type\n | Function\n | (new (...arguments_: any[]) => unknown);\n\nexport type IsPrimitive<T> = [T] extends [Primitive] ? true : false;\nexport type IsNever<T> = [T] extends [never] ? true : false;\nexport type IsAny<T> = 0 extends 1 & T ? true : false;\nexport type IsNull<T> = [T] extends [null] ? true : false;\nexport type IsUndefined<T> = T extends undefined ? true : false;\nexport type IsUnknown<T> = unknown extends T // `T` can be `unknown` or `any`\n ? IsNull<T> extends false // `any` can be `null`, but `unknown` can't be\n ? true\n : false\n : false;\nexport type IsNullish<T> = IsNull<T> & IsUndefined<T>;\nexport type IsFunction<T> = T extends AnyFunction ? true : false;\n\n/**\n * Declare locally scoped properties on `globalThis`.\n *\n * When defining a global variable in a declaration file is inappropriate, it can be helpful to define a `type` or `interface` (say `ExtraGlobals`) with the global variable and then cast `globalThis` via code like `globalThis as unknown as ExtraGlobals`.\n *\n * Instead of casting through `unknown`, you can update your `type` or `interface` to extend `GlobalThis` and then directly cast `globalThis`.\n *\n * @example\n * ```\n * import type { GlobalThis } from '@stryke/types';\n *\n * type ExtraGlobals = GlobalThis & {\n * readonly GLOBAL_TOKEN: string;\n * };\n *\n * (globalThis as ExtraGlobals).GLOBAL_TOKEN;\n * ```\n */\nexport type GlobalThis = typeof globalThis;\n\n/**\n * Matches a [`class`](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Classes).\n */\nexport interface Class<T, Arguments extends unknown[] = any[]> {\n prototype: Pick<T, keyof T>;\n new (...arguments_: Arguments): T;\n}\n\n/**\n * Matches a [`class` constructor](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Classes).\n */\nexport type Constructor<T, Arguments extends unknown[] = any[]> = new (\n ...arguments_: Arguments\n) => T;\n\n/**\n * Matches an [`abstract class`](https://www.typescriptlang.org/docs/handbook/classes.html#abstract-classes).\n *\n * @privateRemarks\n * We cannot use a `type` here because TypeScript throws: 'abstract' modifier cannot appear on a type member. (1070)\n */\n\nexport interface AbstractClass<\n T,\n Arguments extends unknown[] = any[]\n> extends AbstractConstructor<T, Arguments> {\n prototype: Pick<T, keyof T>;\n}\n\n/**\n * Matches an [`abstract class`](https://www.typescriptlang.org/docs/handbook/release-notes/typescript-4-2.html#abstract-construct-signatures) constructor.\n */\nexport type AbstractConstructor<\n T,\n Arguments extends unknown[] = any[]\n> = abstract new (...arguments_: Arguments) => T;\n\n/**\n * Create a tuple type of the given length `<L>` and fill it with the given type `<Fill>`.\n *\n * If `<Fill>` is not provided, it will default to `unknown`.\n *\n * @see https://itnext.io/implementing-arithmetic-within-typescripts-type-system-a1ef140a6f6f\n */\nexport type BuildTuple<\n L extends number,\n Fill = unknown,\n T extends readonly unknown[] = []\n> = T[\"length\"] extends L ? T : BuildTuple<L, Fill, [...T, Fill]>;\n\n/**\n * Test if the given function has multiple call signatures.\n *\n * Needed to handle the case of a single call signature with properties.\n *\n * Multiple call signatures cannot currently be supported due to a TypeScript limitation.\n * @see https://github.com/microsoft/TypeScript/issues/29732\n */\nexport type HasMultipleCallSignatures<\n T extends (...arguments_: any[]) => unknown\n> = T extends {\n (...arguments_: infer A): unknown;\n (...arguments_: infer B): unknown;\n}\n ? B extends A\n ? A extends B\n ? false\n : true\n : true\n : false;\n\ntype StructuredCloneablePrimitive =\n | string\n | number\n | bigint\n | boolean\n | null\n | undefined\n | boolean\n | number\n | string;\n\ntype StructuredCloneableData =\n | ArrayBuffer\n | DataView\n | Date\n | Error\n | RegExp\n | TypedArray\n | Blob\n | File;\n\n// DOM exclusive types\n// | AudioData\n// | CropTarget\n// | CryptoKey\n// | DOMException\n// | DOMMatrix\n// | DOMMatrixReadOnly\n// | DOMPoint\n// | DOMPointReadOnly\n// | DOMQuad\n// | DOMRect\n// | DOMRectReadOnly\n// | FileList\n// | FileSystemDirectoryHandle\n// | FileSystemFileHandle\n// | FileSystemHandle\n// | GPUCompilationInfo\n// | GPUCompilationMessage\n// | ImageBitmap\n// | ImageData\n// | RTCCertificate\n// | VideoFrame\n\ntype StructuredCloneableCollection =\n | readonly StructuredCloneable[]\n | {\n readonly [key: string]: StructuredCloneable;\n readonly [key: number]: StructuredCloneable;\n }\n | ReadonlyMap<StructuredCloneable, StructuredCloneable>\n | ReadonlySet<StructuredCloneable>;\n\n/**\n * Matches a value that can be losslessly cloned using `structuredClone`.\n *\n * Note:\n * - Custom error types will be cloned as the base `Error` type\n * - This type doesn't include types exclusive to the TypeScript DOM library (e.g. `DOMRect` and `VideoFrame`)\n *\n * @see https://developer.mozilla.org/en-US/docs/Web/API/Web_Workers_API/Structured_clone_algorithm\n *\n * @example\n * ```\n * import type { StructuredCloneable } from '@stryke/types';\n *\n * class CustomClass {}\n *\n * // @ts-expect-error\n * const error: StructuredCloneable = {\n * custom: new CustomClass(),\n * };\n *\n * structuredClone(error);\n * //=> {custom: {}}\n *\n * const good: StructuredCloneable = {\n * number: 3,\n * date: new Date(),\n * map: new Map<string, number>(),\n * }\n *\n * good.map.set('key', 1);\n *\n * structuredClone(good);\n * //=> {number: 3, date: Date(2022-10-17 22:22:35.920), map: Map {'key' -> 1}}\n * ```\n */\nexport type StructuredCloneable =\n | StructuredCloneablePrimitive\n | StructuredCloneableData\n | StructuredCloneableCollection;\n"],"mappings":"AAsJA,MAAa,EAAe"}
@@ -28,5 +28,5 @@ type AssetGlob = Required<Omit<FileInputOutput, "input">> & Partial<Pick<FileInp
28
28
  dot?: boolean;
29
29
  };
30
30
  //#endregion
31
- export { FilterPattern as n, AssetGlob as t };
32
- //# sourceMappingURL=file-D1uBqkpP.d.cts.map
31
+ export { AssetGlob, FilterPattern };
32
+ //# sourceMappingURL=file.d.cts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"file.d.cts","names":[],"sources":["../../../../types/src/file.ts"],"sourcesContent":[],"mappings":";;;;;KA8CY,aAAA,GACR,uBAAuB,mBAEvB;UAGa,eAAA;;;;;;;KAQL,SAAA,GAAY,SAAS,KAAK,6BACpC,QAAQ,KAAK"}
@@ -28,5 +28,5 @@ type AssetGlob = Required<Omit<FileInputOutput, "input">> & Partial<Pick<FileInp
28
28
  dot?: boolean;
29
29
  };
30
30
  //#endregion
31
- export { FilterPattern as n, AssetGlob as t };
32
- //# sourceMappingURL=file-DauFFmfh.d.mts.map
31
+ export { AssetGlob, FilterPattern };
32
+ //# sourceMappingURL=file.d.mts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"file.d.mts","names":[],"sources":["../../../../types/src/file.ts"],"sourcesContent":[],"mappings":";;;;;KA8CY,aAAA,GACR,uBAAuB,mBAEvB;UAGa,eAAA;;;;;;;KAQL,SAAA,GAAY,SAAS,KAAK,6BACpC,QAAQ,KAAK"}
@@ -1,6 +1,3 @@
1
- import { n as ResolveOptions } from "./resolve-D66oIwjf.mjs";
2
- import { Range } from "semver";
3
-
4
1
  //#region ../types/src/package-json.d.ts
5
2
  /**
6
3
  * The `package.json` file is the only required file in a package. It must be located at the root of a package, and can contain the following fields.
@@ -260,95 +257,5 @@ type PackageJsonExportKey = "." | "import" | "require" | "types" | "node" | "bro
260
257
  type PackageJsonExportsObject = { [P in PackageJsonExportKey]?: string | PackageJsonExportsObject | Array<string | PackageJsonExportsObject> };
261
258
  type PackageJsonExports = string | PackageJsonExportsObject | Array<string | PackageJsonExportsObject>;
262
259
  //#endregion
263
- //#region ../types/src/package-manager.d.ts
264
- type PackageManager = "npm" | "yarn" | "pnpm" | "bun";
265
- //#endregion
266
- //#region src/package-fns.d.ts
267
- /**
268
- * Get the package manager used in the project
269
- *
270
- * @param dir - The path to the project
271
- * @returns The package manager used in the project
272
- */
273
- declare function getPackageManager(dir?: string): PackageManager;
274
- /**
275
- * Get package info
276
- *
277
- * @param name - The name of the package
278
- * @param options - The options to use when resolving the package
279
- * @returns The package info
280
- */
281
- declare function getPackageInfo(name: string, options?: ResolveOptions): Promise<{
282
- name: string;
283
- version: string | undefined;
284
- rootPath: string;
285
- packageJsonPath: string;
286
- packageJson: PackageJson;
287
- } | undefined>;
288
- /**
289
- * Get the package info from the package.json file
290
- *
291
- * @param cwd - The current working directory
292
- * @returns The package info
293
- */
294
- declare function loadPackageJson(cwd?: string): Promise<PackageJson | null>;
295
- interface PackageExistsOptions {
296
- /**
297
- * The current working directory
298
- */
299
- cwd?: string;
300
- }
301
- interface PackageMatchesOptions extends PackageExistsOptions {
302
- /**
303
- * The version range of the package to check
304
- */
305
- version?: string | Range;
306
- }
307
- /**
308
- * Check if a package is listed in the package.json file
309
- *
310
- * @param name - The name of the package
311
- * @param cwd - The current working directory
312
- * @returns An indicator specifying if the package is listed
313
- */
314
- declare function isPackageListed(name: string, cwd?: string): Promise<boolean>;
315
- /**
316
- * Check if a package is listed in the package.json file
317
- *
318
- * @param name - The name of the package
319
- * @param options - The options to use when checking if the package is listed
320
- * @returns An indicator specifying if the package is listed
321
- */
322
- declare function isPackageListed(name: string, options?: PackageExistsOptions): Promise<boolean>;
323
- interface GetPackageListingReturn {
324
- version: string;
325
- type: "dependencies" | "devDependencies";
326
- }
327
- /**
328
- * Return the package version and dependency type listed in the package.json file
329
- *
330
- * @param name - The name of the package
331
- * @param cwdOrOptions - The current working directory or options to use when checking if the package is listed
332
- * @returns The version and type of the package if listed, otherwise undefined
333
- */
334
- declare function getPackageListing(name: string, cwdOrOptions?: string | PackageExistsOptions): Promise<GetPackageListingReturn | undefined>;
335
- /**
336
- * Check if a package version matches a specific version range
337
- *
338
- * @param name - The name of the package
339
- * @param version - The version to check against
340
- * @param cwd - The current working directory
341
- * @returns An indicator specifying if the package version matches the range
342
- */
343
- declare function doesPackageMatch(name: string, version: string, cwd?: string): Promise<boolean>;
344
- /**
345
- * Check if a package exists
346
- *
347
- * @param name - The name of the package
348
- * @param options - The options to use when resolving the package
349
- * @returns An indicator specifying if the package exists
350
- */
351
- declare function isPackageExists(name: string, options?: ResolveOptions): boolean;
352
- //#endregion
353
- export { getPackageInfo as a, isPackageExists as c, doesPackageMatch as i, isPackageListed as l, PackageExistsOptions as n, getPackageListing as o, PackageMatchesOptions as r, getPackageManager as s, GetPackageListingReturn as t, loadPackageJson as u };
354
- //# sourceMappingURL=package-fns-CxokaGDY.d.mts.map
260
+ export { PackageJson };
261
+ //# sourceMappingURL=package-json.d.cts.map