@ariestools/sdk 7.0.3

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 (409) hide show
  1. package/LICENSE +165 -0
  2. package/README.md +45 -0
  3. package/dist/_pkg/api/neutral/ApiClient.d.ts +10 -0
  4. package/dist/_pkg/api/neutral/ApiConfig.d.ts +9 -0
  5. package/dist/_pkg/api/neutral/ApiEndpoint.d.ts +19 -0
  6. package/dist/_pkg/api/neutral/ApiStage.d.ts +11 -0
  7. package/dist/_pkg/api/neutral/getApiStage.d.ts +8 -0
  8. package/dist/_pkg/api/neutral/index.d.ts +6 -0
  9. package/dist/_pkg/api/neutral/index.mjs +78 -0
  10. package/dist/_pkg/api/neutral/model.d.ts +3 -0
  11. package/dist/_pkg/api/neutral/model.mjs +1 -0
  12. package/dist/_pkg/array/neutral/containsAll.d.ts +8 -0
  13. package/dist/_pkg/array/neutral/distinct.d.ts +6 -0
  14. package/dist/_pkg/array/neutral/filterAs.d.ts +8 -0
  15. package/dist/_pkg/array/neutral/filterAsync.d.ts +9 -0
  16. package/dist/_pkg/array/neutral/findAs.d.ts +15 -0
  17. package/dist/_pkg/array/neutral/flatten.d.ts +8 -0
  18. package/dist/_pkg/array/neutral/index.d.ts +8 -0
  19. package/dist/_pkg/array/neutral/index.mjs +80 -0
  20. package/dist/_pkg/array/neutral/uniq.d.ts +14 -0
  21. package/dist/_pkg/arraybuffer/neutral/equalArrayBuffers.d.ts +8 -0
  22. package/dist/_pkg/arraybuffer/neutral/index.d.ts +5 -0
  23. package/dist/_pkg/arraybuffer/neutral/index.mjs +74 -0
  24. package/dist/_pkg/arraybuffer/neutral/isArrayBuffer.d.ts +7 -0
  25. package/dist/_pkg/arraybuffer/neutral/toArrayBuffer.d.ts +11 -0
  26. package/dist/_pkg/arraybuffer/neutral/toUint8Array.d.ts +11 -0
  27. package/dist/_pkg/assert/neutral/assertDefinedEx.d.ts +41 -0
  28. package/dist/_pkg/assert/neutral/assertEx.d.ts +41 -0
  29. package/dist/_pkg/assert/neutral/index.d.ts +4 -0
  30. package/dist/_pkg/assert/neutral/index.mjs +30 -0
  31. package/dist/_pkg/assert/neutral/model.d.ts +2 -0
  32. package/dist/_pkg/assert/neutral/model.mjs +1 -0
  33. package/dist/_pkg/assert/neutral/types.d.ts +36 -0
  34. package/dist/_pkg/base/neutral/Base.d.ts +53 -0
  35. package/dist/_pkg/base/neutral/UniqueBase.d.ts +10 -0
  36. package/dist/_pkg/base/neutral/globallyUnique.d.ts +21 -0
  37. package/dist/_pkg/base/neutral/index.d.ts +4 -0
  38. package/dist/_pkg/base/neutral/index.mjs +164 -0
  39. package/dist/_pkg/base/neutral/model.d.ts +2 -0
  40. package/dist/_pkg/base/neutral/model.mjs +1 -0
  41. package/dist/_pkg/creatable/neutral/AbstractCreatable.d.ts +123 -0
  42. package/dist/_pkg/creatable/neutral/Creatable.d.ts +49 -0
  43. package/dist/_pkg/creatable/neutral/Factory.d.ts +28 -0
  44. package/dist/_pkg/creatable/neutral/index.d.ts +5 -0
  45. package/dist/_pkg/creatable/neutral/index.mjs +396 -0
  46. package/dist/_pkg/creatable/neutral/lib/getFunctionName.d.ts +7 -0
  47. package/dist/_pkg/creatable/neutral/lib/getRootFunction.d.ts +8 -0
  48. package/dist/_pkg/creatable/neutral/lib/index.d.ts +3 -0
  49. package/dist/_pkg/creatable/neutral/model/CreatableInstance.d.ts +16 -0
  50. package/dist/_pkg/creatable/neutral/model/CreatableParams.d.ts +16 -0
  51. package/dist/_pkg/creatable/neutral/model/CreatableStatusReporter.d.ts +15 -0
  52. package/dist/_pkg/creatable/neutral/model/Labels.d.ts +24 -0
  53. package/dist/_pkg/creatable/neutral/model/index.d.ts +5 -0
  54. package/dist/_pkg/creatable/neutral/model.d.ts +3 -0
  55. package/dist/_pkg/creatable/neutral/model.mjs +1 -0
  56. package/dist/_pkg/decimal-precision/neutral/fromFixedPoint.d.ts +8 -0
  57. package/dist/_pkg/decimal-precision/neutral/index.d.ts +4 -0
  58. package/dist/_pkg/decimal-precision/neutral/index.mjs +39 -0
  59. package/dist/_pkg/decimal-precision/neutral/toDecimalPrecision.d.ts +8 -0
  60. package/dist/_pkg/decimal-precision/neutral/toFixedPoint.d.ts +8 -0
  61. package/dist/_pkg/delay/neutral/delay.d.ts +7 -0
  62. package/dist/_pkg/delay/neutral/index.d.ts +2 -0
  63. package/dist/_pkg/delay/neutral/index.mjs +9 -0
  64. package/dist/_pkg/ellipsize/neutral/index.d.ts +8 -0
  65. package/dist/_pkg/ellipsize/neutral/index.mjs +10 -0
  66. package/dist/_pkg/enum/neutral/Enum.d.ts +88 -0
  67. package/dist/_pkg/enum/neutral/index.d.ts +2 -0
  68. package/dist/_pkg/enum/neutral/index.mjs +8 -0
  69. package/dist/_pkg/enum/neutral/model.d.ts +2 -0
  70. package/dist/_pkg/enum/neutral/model.mjs +1 -0
  71. package/dist/_pkg/error/neutral/assert.d.ts +12 -0
  72. package/dist/_pkg/error/neutral/handleError.d.ts +15 -0
  73. package/dist/_pkg/error/neutral/index.d.ts +3 -0
  74. package/dist/_pkg/error/neutral/index.mjs +32 -0
  75. package/dist/_pkg/error/neutral/model.d.ts +2 -0
  76. package/dist/_pkg/error/neutral/model.mjs +1 -0
  77. package/dist/_pkg/events/neutral/BaseEmitter.d.ts +74 -0
  78. package/dist/_pkg/events/neutral/Events/Events.d.ts +132 -0
  79. package/dist/_pkg/events/neutral/Events/index.d.ts +2 -0
  80. package/dist/_pkg/events/neutral/index.d.ts +4 -0
  81. package/dist/_pkg/events/neutral/index.mjs +415 -0
  82. package/dist/_pkg/events/neutral/model/Event.d.ts +21 -0
  83. package/dist/_pkg/events/neutral/model/EventEmitter.d.ts +25 -0
  84. package/dist/_pkg/events/neutral/model/index.d.ts +3 -0
  85. package/dist/_pkg/events/neutral/model.d.ts +3 -0
  86. package/dist/_pkg/events/neutral/model.mjs +1 -0
  87. package/dist/_pkg/exists/neutral/index.d.ts +10 -0
  88. package/dist/_pkg/exists/neutral/index.mjs +8 -0
  89. package/dist/_pkg/fetch/neutral/FetchClient.d.ts +46 -0
  90. package/dist/_pkg/fetch/neutral/FetchError.d.ts +80 -0
  91. package/dist/_pkg/fetch/neutral/FetchJsonClient.d.ts +19 -0
  92. package/dist/_pkg/fetch/neutral/fetchCompress.d.ts +12 -0
  93. package/dist/_pkg/fetch/neutral/fetchJson.d.ts +7 -0
  94. package/dist/_pkg/fetch/neutral/index.d.ts +11 -0
  95. package/dist/_pkg/fetch/neutral/index.mjs +365 -0
  96. package/dist/_pkg/fetch/neutral/methods.d.ts +12 -0
  97. package/dist/_pkg/fetch/neutral/model.d.ts +5 -0
  98. package/dist/_pkg/fetch/neutral/model.mjs +1 -0
  99. package/dist/_pkg/fetch/neutral/parseJson.d.ts +16 -0
  100. package/dist/_pkg/fetch/neutral/types.d.ts +12 -0
  101. package/dist/_pkg/forget/neutral/ForgetConfig.d.ts +21 -0
  102. package/dist/_pkg/forget/neutral/ForgetNodeConfig.d.ts +13 -0
  103. package/dist/_pkg/forget/neutral/ForgetPromise.d.ts +49 -0
  104. package/dist/_pkg/forget/neutral/ForgetPromiseNode.d.ts +15 -0
  105. package/dist/_pkg/forget/neutral/forget.d.ts +10 -0
  106. package/dist/_pkg/forget/neutral/forgetNode.d.ts +9 -0
  107. package/dist/_pkg/forget/neutral/index.d.ts +2 -0
  108. package/dist/_pkg/forget/neutral/index.mjs +162 -0
  109. package/dist/_pkg/forget/neutral/model.d.ts +3 -0
  110. package/dist/_pkg/forget/neutral/model.mjs +1 -0
  111. package/dist/_pkg/forget/neutral/neutral/index.d.ts +4 -0
  112. package/dist/_pkg/forget/neutral/node/index.d.ts +4 -0
  113. package/dist/_pkg/function-name/neutral/functionName.d.ts +7 -0
  114. package/dist/_pkg/function-name/neutral/index.d.ts +2 -0
  115. package/dist/_pkg/function-name/neutral/index.mjs +27 -0
  116. package/dist/_pkg/hex/neutral/HexRegEx.d.ts +19 -0
  117. package/dist/_pkg/hex/neutral/address/AddressTransformZod.d.ts +10 -0
  118. package/dist/_pkg/hex/neutral/address/AddressValidationZod.d.ts +10 -0
  119. package/dist/_pkg/hex/neutral/address/address.d.ts +18 -0
  120. package/dist/_pkg/hex/neutral/address/as.d.ts +13 -0
  121. package/dist/_pkg/hex/neutral/address/index.d.ts +7 -0
  122. package/dist/_pkg/hex/neutral/address/is.d.ts +12 -0
  123. package/dist/_pkg/hex/neutral/address/to.d.ts +12 -0
  124. package/dist/_pkg/hex/neutral/ethAddress.d.ts +45 -0
  125. package/dist/_pkg/hex/neutral/hash/as.d.ts +11 -0
  126. package/dist/_pkg/hex/neutral/hash/hash.d.ts +28 -0
  127. package/dist/_pkg/hex/neutral/hash/index.d.ts +5 -0
  128. package/dist/_pkg/hex/neutral/hash/is.d.ts +9 -0
  129. package/dist/_pkg/hex/neutral/hash/zod.d.ts +6 -0
  130. package/dist/_pkg/hex/neutral/hex/as.d.ts +11 -0
  131. package/dist/_pkg/hex/neutral/hex/from/from.d.ts +8 -0
  132. package/dist/_pkg/hex/neutral/hex/from/fromArrayBuffer.d.ts +8 -0
  133. package/dist/_pkg/hex/neutral/hex/from/fromBigInt.d.ts +8 -0
  134. package/dist/_pkg/hex/neutral/hex/from/fromHexString.d.ts +9 -0
  135. package/dist/_pkg/hex/neutral/hex/from/fromNumber.d.ts +9 -0
  136. package/dist/_pkg/hex/neutral/hex/from/index.d.ts +6 -0
  137. package/dist/_pkg/hex/neutral/hex/hex.d.ts +17 -0
  138. package/dist/_pkg/hex/neutral/hex/index.d.ts +9 -0
  139. package/dist/_pkg/hex/neutral/hex/is.d.ts +9 -0
  140. package/dist/_pkg/hex/neutral/hex/isHexZero.d.ts +7 -0
  141. package/dist/_pkg/hex/neutral/hex/legacy.d.ts +7 -0
  142. package/dist/_pkg/hex/neutral/hex/nibble.d.ts +13 -0
  143. package/dist/_pkg/hex/neutral/hex/to.d.ts +8 -0
  144. package/dist/_pkg/hex/neutral/hexToBigInt.d.ts +8 -0
  145. package/dist/_pkg/hex/neutral/index.d.ts +8 -0
  146. package/dist/_pkg/hex/neutral/index.mjs +381 -0
  147. package/dist/_pkg/hex/neutral/model.d.ts +3 -0
  148. package/dist/_pkg/hex/neutral/model.mjs +1 -0
  149. package/dist/_pkg/hex/neutral/zod.d.ts +6 -0
  150. package/dist/_pkg/logger/neutral/ConsoleLogger.d.ts +7 -0
  151. package/dist/_pkg/logger/neutral/IdLogger.d.ts +19 -0
  152. package/dist/_pkg/logger/neutral/LevelLogger.d.ts +47 -0
  153. package/dist/_pkg/logger/neutral/NoOpLogFunction.d.ts +3 -0
  154. package/dist/_pkg/logger/neutral/SilentLogger.d.ts +17 -0
  155. package/dist/_pkg/logger/neutral/getFunctionName.d.ts +7 -0
  156. package/dist/_pkg/logger/neutral/index.d.ts +7 -0
  157. package/dist/_pkg/logger/neutral/index.mjs +126 -0
  158. package/dist/_pkg/object/neutral/AsObjectFactory.d.ts +8 -0
  159. package/dist/_pkg/object/neutral/AsTypeFactory.d.ts +11 -0
  160. package/dist/_pkg/object/neutral/EmptyObject.d.ts +2 -0
  161. package/dist/_pkg/object/neutral/IsObjectFactory.d.ts +16 -0
  162. package/dist/_pkg/object/neutral/JsonObject.d.ts +49 -0
  163. package/dist/_pkg/object/neutral/ObjectWrapper.d.ts +9 -0
  164. package/dist/_pkg/object/neutral/OmitStartsWith.d.ts +18 -0
  165. package/dist/_pkg/object/neutral/Optional.d.ts +3 -0
  166. package/dist/_pkg/object/neutral/Override.d.ts +4 -0
  167. package/dist/_pkg/object/neutral/PartialRecord.d.ts +3 -0
  168. package/dist/_pkg/object/neutral/PickStartsWith.d.ts +9 -0
  169. package/dist/_pkg/object/neutral/Simplify.d.ts +5 -0
  170. package/dist/_pkg/object/neutral/StringKeyObject.d.ts +3 -0
  171. package/dist/_pkg/object/neutral/Validator.d.ts +13 -0
  172. package/dist/_pkg/object/neutral/WithAdditional.d.ts +4 -0
  173. package/dist/_pkg/object/neutral/asObject.d.ts +4 -0
  174. package/dist/_pkg/object/neutral/deepMerge.d.ts +49 -0
  175. package/dist/_pkg/object/neutral/index-deprecated.d.ts +2 -0
  176. package/dist/_pkg/object/neutral/index-un-deprecated.d.ts +22 -0
  177. package/dist/_pkg/object/neutral/index-un-deprecated.mjs +320 -0
  178. package/dist/_pkg/object/neutral/index.d.ts +3 -0
  179. package/dist/_pkg/object/neutral/index.mjs +435 -0
  180. package/dist/_pkg/object/neutral/isType.d.ts +4 -0
  181. package/dist/_pkg/object/neutral/model.d.ts +14 -0
  182. package/dist/_pkg/object/neutral/model.mjs +1 -0
  183. package/dist/_pkg/object/neutral/omitBy.d.ts +21 -0
  184. package/dist/_pkg/object/neutral/pickBy.d.ts +21 -0
  185. package/dist/_pkg/object/neutral/removeFields.d.ts +9 -0
  186. package/dist/_pkg/object/neutral/toSafeJson.d.ts +41 -0
  187. package/dist/_pkg/object-model/neutral/AnyObject.d.ts +8 -0
  188. package/dist/_pkg/object-model/neutral/AsTypeFactory.d.ts +12 -0
  189. package/dist/_pkg/object-model/neutral/AsTypeFunction.d.ts +14 -0
  190. package/dist/_pkg/object-model/neutral/Compare.d.ts +3 -0
  191. package/dist/_pkg/object-model/neutral/EmptyObject.d.ts +8 -0
  192. package/dist/_pkg/object-model/neutral/index.d.ts +6 -0
  193. package/dist/_pkg/object-model/neutral/index.mjs +1 -0
  194. package/dist/_pkg/object-model/neutral/model.d.ts +6 -0
  195. package/dist/_pkg/object-model/neutral/model.mjs +1 -0
  196. package/dist/_pkg/object-model/neutral/types.d.ts +25 -0
  197. package/dist/_pkg/platform/browser/browser/index.d.ts +9 -0
  198. package/dist/_pkg/platform/browser/index-browser.d.ts +2 -0
  199. package/dist/_pkg/platform/browser/index-browser.mjs +18 -0
  200. package/dist/_pkg/platform/browser/index-node.d.ts +2 -0
  201. package/dist/_pkg/platform/browser/node/index.d.ts +9 -0
  202. package/dist/_pkg/platform/node/browser/index.d.ts +9 -0
  203. package/dist/_pkg/platform/node/index-browser.d.ts +2 -0
  204. package/dist/_pkg/platform/node/index-node.d.ts +2 -0
  205. package/dist/_pkg/platform/node/index-node.mjs +18 -0
  206. package/dist/_pkg/platform/node/node/index.d.ts +9 -0
  207. package/dist/_pkg/profile/neutral/index.d.ts +2 -0
  208. package/dist/_pkg/profile/neutral/index.mjs +37 -0
  209. package/dist/_pkg/profile/neutral/model.d.ts +2 -0
  210. package/dist/_pkg/profile/neutral/model.mjs +1 -0
  211. package/dist/_pkg/profile/neutral/profiler.d.ts +17 -0
  212. package/dist/_pkg/promise/neutral/PromiseEx.d.ts +24 -0
  213. package/dist/_pkg/promise/neutral/fulfilled.d.ts +7 -0
  214. package/dist/_pkg/promise/neutral/fulfilledValues.d.ts +20 -0
  215. package/dist/_pkg/promise/neutral/index.d.ts +7 -0
  216. package/dist/_pkg/promise/neutral/index.mjs +57 -0
  217. package/dist/_pkg/promise/neutral/model.d.ts +3 -0
  218. package/dist/_pkg/promise/neutral/model.mjs +1 -0
  219. package/dist/_pkg/promise/neutral/rejected.d.ts +7 -0
  220. package/dist/_pkg/promise/neutral/toPromise.d.ts +8 -0
  221. package/dist/_pkg/promise/neutral/types.d.ts +23 -0
  222. package/dist/_pkg/retry/neutral/index.d.ts +2 -0
  223. package/dist/_pkg/retry/neutral/index.mjs +28 -0
  224. package/dist/_pkg/retry/neutral/model.d.ts +2 -0
  225. package/dist/_pkg/retry/neutral/model.mjs +1 -0
  226. package/dist/_pkg/retry/neutral/retry.d.ts +23 -0
  227. package/dist/_pkg/set/neutral/index.d.ts +2 -0
  228. package/dist/_pkg/set/neutral/index.mjs +20 -0
  229. package/dist/_pkg/set/neutral/lib/difference.d.ts +8 -0
  230. package/dist/_pkg/set/neutral/lib/index.d.ts +4 -0
  231. package/dist/_pkg/set/neutral/lib/intersection.d.ts +8 -0
  232. package/dist/_pkg/set/neutral/lib/union.d.ts +8 -0
  233. package/dist/_pkg/static-implements/neutral/index.d.ts +2 -0
  234. package/dist/_pkg/static-implements/neutral/index.mjs +10 -0
  235. package/dist/_pkg/static-implements/neutral/staticImplements.d.ts +7 -0
  236. package/dist/_pkg/storage/neutral/KeyValueStore.d.ts +34 -0
  237. package/dist/_pkg/storage/neutral/index.d.ts +2 -0
  238. package/dist/_pkg/storage/neutral/index.mjs +1 -0
  239. package/dist/_pkg/storage/neutral/model.d.ts +2 -0
  240. package/dist/_pkg/storage/neutral/model.mjs +1 -0
  241. package/dist/_pkg/telemetry/neutral/index.d.ts +3 -0
  242. package/dist/_pkg/telemetry/neutral/index.mjs +152 -0
  243. package/dist/_pkg/telemetry/neutral/model.d.ts +2 -0
  244. package/dist/_pkg/telemetry/neutral/model.mjs +1 -0
  245. package/dist/_pkg/telemetry/neutral/span.d.ts +51 -0
  246. package/dist/_pkg/telemetry/neutral/timeBudget.d.ts +12 -0
  247. package/dist/_pkg/telemetry-exporter/neutral/XyConsoleSpanExporter.d.ts +40 -0
  248. package/dist/_pkg/telemetry-exporter/neutral/index.d.ts +2 -0
  249. package/dist/_pkg/telemetry-exporter/neutral/index.mjs +88 -0
  250. package/dist/_pkg/timer/neutral/index.d.ts +2 -0
  251. package/dist/_pkg/timer/neutral/index.mjs +75 -0
  252. package/dist/_pkg/timer/neutral/setTimeoutEx.d.ts +37 -0
  253. package/dist/_pkg/typeof/neutral/Brand.d.ts +5 -0
  254. package/dist/_pkg/typeof/neutral/IdentityFunction.d.ts +3 -0
  255. package/dist/_pkg/typeof/neutral/ObjectTypeShape.d.ts +5 -0
  256. package/dist/_pkg/typeof/neutral/TypeOfTypes.d.ts +3 -0
  257. package/dist/_pkg/typeof/neutral/Typed.d.ts +41 -0
  258. package/dist/_pkg/typeof/neutral/ifDefined.d.ts +8 -0
  259. package/dist/_pkg/typeof/neutral/ifTypeOf.d.ts +11 -0
  260. package/dist/_pkg/typeof/neutral/index.d.ts +12 -0
  261. package/dist/_pkg/typeof/neutral/index.mjs +255 -0
  262. package/dist/_pkg/typeof/neutral/is.d.ts +116 -0
  263. package/dist/_pkg/typeof/neutral/isType.d.ts +9 -0
  264. package/dist/_pkg/typeof/neutral/model.d.ts +7 -0
  265. package/dist/_pkg/typeof/neutral/model.mjs +1 -0
  266. package/dist/_pkg/typeof/neutral/typeOf.d.ts +8 -0
  267. package/dist/_pkg/typeof/neutral/validateType.d.ts +10 -0
  268. package/dist/_pkg/url/browser/index-browser.d.ts +12 -0
  269. package/dist/_pkg/url/browser/index-browser.mjs +12 -0
  270. package/dist/_pkg/url/browser/index-neutral.d.ts +12 -0
  271. package/dist/_pkg/url/browser/index-node.d.ts +13 -0
  272. package/dist/_pkg/url/browser/lib/index.d.ts +2 -0
  273. package/dist/_pkg/url/browser/lib/isLocalhost.d.ts +7 -0
  274. package/dist/_pkg/url/neutral/index-browser.d.ts +12 -0
  275. package/dist/_pkg/url/neutral/index-neutral.d.ts +12 -0
  276. package/dist/_pkg/url/neutral/index-neutral.mjs +12 -0
  277. package/dist/_pkg/url/neutral/index-node.d.ts +13 -0
  278. package/dist/_pkg/url/neutral/lib/index.d.ts +2 -0
  279. package/dist/_pkg/url/neutral/lib/isLocalhost.d.ts +7 -0
  280. package/dist/_pkg/url/node/index-browser.d.ts +12 -0
  281. package/dist/_pkg/url/node/index-neutral.d.ts +12 -0
  282. package/dist/_pkg/url/node/index-node.d.ts +13 -0
  283. package/dist/_pkg/url/node/index-node.mjs +15 -0
  284. package/dist/_pkg/url/node/lib/index.d.ts +2 -0
  285. package/dist/_pkg/url/node/lib/isLocalhost.d.ts +7 -0
  286. package/dist/_pkg/zod/neutral/Config.d.ts +8 -0
  287. package/dist/_pkg/zod/neutral/index.d.ts +8 -0
  288. package/dist/_pkg/zod/neutral/index.mjs +127 -0
  289. package/dist/_pkg/zod/neutral/model.d.ts +2 -0
  290. package/dist/_pkg/zod/neutral/model.mjs +1 -0
  291. package/dist/_pkg/zod/neutral/zodAllFactory.d.ts +20 -0
  292. package/dist/_pkg/zod/neutral/zodAsAsyncFactory.d.ts +14 -0
  293. package/dist/_pkg/zod/neutral/zodAsFactory.d.ts +14 -0
  294. package/dist/_pkg/zod/neutral/zodIsFactory.d.ts +8 -0
  295. package/dist/_pkg/zod/neutral/zodToAsyncFactory.d.ts +14 -0
  296. package/dist/_pkg/zod/neutral/zodToFactory.d.ts +14 -0
  297. package/dist/browser/index.d.ts +32 -0
  298. package/dist/browser/index.mjs +32 -0
  299. package/dist/browser/platform.d.ts +1 -0
  300. package/dist/browser/platform.mjs +1 -0
  301. package/dist/browser/url.d.ts +1 -0
  302. package/dist/browser/url.mjs +1 -0
  303. package/dist/neutral/api.d.ts +1 -0
  304. package/dist/neutral/api.mjs +1 -0
  305. package/dist/neutral/api.model.d.ts +1 -0
  306. package/dist/neutral/api.model.mjs +1 -0
  307. package/dist/neutral/array.d.ts +1 -0
  308. package/dist/neutral/array.mjs +1 -0
  309. package/dist/neutral/arraybuffer.d.ts +1 -0
  310. package/dist/neutral/arraybuffer.mjs +1 -0
  311. package/dist/neutral/assert.d.ts +1 -0
  312. package/dist/neutral/assert.mjs +1 -0
  313. package/dist/neutral/assert.model.d.ts +1 -0
  314. package/dist/neutral/assert.model.mjs +1 -0
  315. package/dist/neutral/base.d.ts +1 -0
  316. package/dist/neutral/base.mjs +1 -0
  317. package/dist/neutral/base.model.d.ts +1 -0
  318. package/dist/neutral/base.model.mjs +1 -0
  319. package/dist/neutral/creatable.d.ts +1 -0
  320. package/dist/neutral/creatable.mjs +1 -0
  321. package/dist/neutral/creatable.model.d.ts +1 -0
  322. package/dist/neutral/creatable.model.mjs +1 -0
  323. package/dist/neutral/decimal-precision.d.ts +1 -0
  324. package/dist/neutral/decimal-precision.mjs +1 -0
  325. package/dist/neutral/delay.d.ts +1 -0
  326. package/dist/neutral/delay.mjs +1 -0
  327. package/dist/neutral/ellipsize.d.ts +1 -0
  328. package/dist/neutral/ellipsize.mjs +1 -0
  329. package/dist/neutral/enum.d.ts +1 -0
  330. package/dist/neutral/enum.mjs +1 -0
  331. package/dist/neutral/enum.model.d.ts +1 -0
  332. package/dist/neutral/enum.model.mjs +1 -0
  333. package/dist/neutral/error.d.ts +1 -0
  334. package/dist/neutral/error.mjs +1 -0
  335. package/dist/neutral/error.model.d.ts +1 -0
  336. package/dist/neutral/error.model.mjs +1 -0
  337. package/dist/neutral/events.d.ts +1 -0
  338. package/dist/neutral/events.mjs +1 -0
  339. package/dist/neutral/events.model.d.ts +1 -0
  340. package/dist/neutral/events.model.mjs +1 -0
  341. package/dist/neutral/exists.d.ts +1 -0
  342. package/dist/neutral/exists.mjs +1 -0
  343. package/dist/neutral/fetch.d.ts +1 -0
  344. package/dist/neutral/fetch.mjs +1 -0
  345. package/dist/neutral/fetch.model.d.ts +1 -0
  346. package/dist/neutral/fetch.model.mjs +1 -0
  347. package/dist/neutral/forget.d.ts +1 -0
  348. package/dist/neutral/forget.mjs +1 -0
  349. package/dist/neutral/forget.model.d.ts +1 -0
  350. package/dist/neutral/forget.model.mjs +1 -0
  351. package/dist/neutral/function-name.d.ts +1 -0
  352. package/dist/neutral/function-name.mjs +1 -0
  353. package/dist/neutral/hex.d.ts +1 -0
  354. package/dist/neutral/hex.mjs +1 -0
  355. package/dist/neutral/hex.model.d.ts +1 -0
  356. package/dist/neutral/hex.model.mjs +1 -0
  357. package/dist/neutral/logger.d.ts +1 -0
  358. package/dist/neutral/logger.mjs +1 -0
  359. package/dist/neutral/model.d.ts +18 -0
  360. package/dist/neutral/model.mjs +18 -0
  361. package/dist/neutral/object.d.ts +1 -0
  362. package/dist/neutral/object.mjs +1 -0
  363. package/dist/neutral/object.model.d.ts +1 -0
  364. package/dist/neutral/object.model.mjs +1 -0
  365. package/dist/neutral/profile.d.ts +1 -0
  366. package/dist/neutral/profile.mjs +1 -0
  367. package/dist/neutral/profile.model.d.ts +1 -0
  368. package/dist/neutral/profile.model.mjs +1 -0
  369. package/dist/neutral/promise.d.ts +1 -0
  370. package/dist/neutral/promise.mjs +1 -0
  371. package/dist/neutral/promise.model.d.ts +1 -0
  372. package/dist/neutral/promise.model.mjs +1 -0
  373. package/dist/neutral/retry.d.ts +1 -0
  374. package/dist/neutral/retry.mjs +1 -0
  375. package/dist/neutral/retry.model.d.ts +1 -0
  376. package/dist/neutral/retry.model.mjs +1 -0
  377. package/dist/neutral/set.d.ts +1 -0
  378. package/dist/neutral/set.mjs +1 -0
  379. package/dist/neutral/static-implements.d.ts +1 -0
  380. package/dist/neutral/static-implements.mjs +1 -0
  381. package/dist/neutral/storage.d.ts +1 -0
  382. package/dist/neutral/storage.mjs +1 -0
  383. package/dist/neutral/storage.model.d.ts +1 -0
  384. package/dist/neutral/storage.model.mjs +1 -0
  385. package/dist/neutral/telemetry-exporter.d.ts +1 -0
  386. package/dist/neutral/telemetry-exporter.mjs +1 -0
  387. package/dist/neutral/telemetry.d.ts +1 -0
  388. package/dist/neutral/telemetry.mjs +1 -0
  389. package/dist/neutral/telemetry.model.d.ts +1 -0
  390. package/dist/neutral/telemetry.model.mjs +1 -0
  391. package/dist/neutral/timer.d.ts +1 -0
  392. package/dist/neutral/timer.mjs +1 -0
  393. package/dist/neutral/typeof.d.ts +1 -0
  394. package/dist/neutral/typeof.mjs +1 -0
  395. package/dist/neutral/typeof.model.d.ts +1 -0
  396. package/dist/neutral/typeof.model.mjs +1 -0
  397. package/dist/neutral/url.d.ts +1 -0
  398. package/dist/neutral/url.mjs +1 -0
  399. package/dist/neutral/zod.d.ts +1 -0
  400. package/dist/neutral/zod.mjs +1 -0
  401. package/dist/neutral/zod.model.d.ts +1 -0
  402. package/dist/neutral/zod.model.mjs +1 -0
  403. package/dist/node/index.d.ts +32 -0
  404. package/dist/node/index.mjs +32 -0
  405. package/dist/node/platform.d.ts +1 -0
  406. package/dist/node/platform.mjs +1 -0
  407. package/dist/node/url.d.ts +1 -0
  408. package/dist/node/url.mjs +1 -0
  409. package/package.json +339 -0
@@ -0,0 +1,381 @@
1
+ // src/address/address.ts
2
+ import * as z from "zod/mini";
3
+
4
+ // src/HexRegEx.ts
5
+ var HexRegExMinMax = (minBytes = 0, maxBytes = Number.MAX_SAFE_INTEGER / 2) => {
6
+ return new RegExp(`^[a-f0-9]{${minBytes * 2},${maxBytes * 2}}$`);
7
+ };
8
+ var HexRegExMinMaxMixedCaseWithPrefix = (minBytes = 0, maxBytes = Number.MAX_SAFE_INTEGER / 2) => {
9
+ return new RegExp(`^0x[a-fA-F0-9]{${minBytes * 2},${maxBytes * 2}}$`);
10
+ };
11
+ var HexRegEx = /^[0-9a-f]+$/;
12
+ var HexRegExWithPrefix = /^0x[0-9a-f]+$/;
13
+
14
+ // src/address/address.ts
15
+ var ZERO_ADDRESS = "0000000000000000000000000000000000000000";
16
+ var ADDRESS_LENGTH = 40;
17
+ var AddressRegEx = HexRegExMinMax(ADDRESS_LENGTH / 2, ADDRESS_LENGTH / 2);
18
+ var AddressZod = z.pipe(
19
+ z.string().check(z.regex(AddressRegEx)),
20
+ z.transform((v) => v)
21
+ );
22
+
23
+ // src/address/AddressTransformZod.ts
24
+ import * as z4 from "zod/mini";
25
+
26
+ // src/address/AddressValidationZod.ts
27
+ import * as z3 from "zod/mini";
28
+
29
+ // src/hex/as.ts
30
+ import { assertError } from "../../error/neutral/index.mjs";
31
+
32
+ // src/hex/from/fromHexString.ts
33
+ import { isNumber } from "../../typeof/neutral/index.mjs";
34
+
35
+ // src/hex/nibble.ts
36
+ var bitsToNibbles = (value) => {
37
+ const nibbles = value >> 2;
38
+ if (value !== nibbles << 2) throw new Error("Bits for nibbles must multiple of 4");
39
+ return nibbles;
40
+ };
41
+ var nibblesToBits = (value) => {
42
+ return value << 2;
43
+ };
44
+
45
+ // src/hex/is.ts
46
+ var isHex = (value, config) => {
47
+ if (typeof value !== "string") return false;
48
+ const valueCharLength = value.length - (config?.prefix === true ? 2 : 0);
49
+ if (config?.bitLength !== void 0 && valueCharLength !== bitsToNibbles(config?.bitLength)) return false;
50
+ const regex5 = config?.prefix === true ? HexRegExWithPrefix : HexRegEx;
51
+ return regex5.test(value);
52
+ };
53
+
54
+ // src/hex/from/fromHexString.ts
55
+ var hexFromHexString = (value, config = {}) => {
56
+ const {
57
+ prefix: isPrefix = false,
58
+ byteSize = 8,
59
+ bitLength
60
+ } = config;
61
+ const nibbleBoundary = bitsToNibbles(byteSize);
62
+ const unEvened = (value.startsWith("0x") ? value.slice(2) : value).toLowerCase();
63
+ if (isHex(unEvened)) {
64
+ const evenCharacters = unEvened.padStart(Math.ceil(unEvened.length / nibbleBoundary) * nibbleBoundary, "0");
65
+ const padded = isNumber(bitLength) ? evenCharacters.padStart(bitLength / 4, "0") : evenCharacters;
66
+ return (isPrefix ? `0x${padded}` : padded).toLowerCase();
67
+ }
68
+ throw new Error("Received string is not a value hex");
69
+ };
70
+
71
+ // src/hex/from/fromArrayBuffer.ts
72
+ var hexFromArrayBuffer = (buffer, config) => {
73
+ const unPadded = [...new Uint8Array(buffer)].map((x) => x.toString(16).padStart(2, "0")).join("");
74
+ return hexFromHexString(unPadded, config);
75
+ };
76
+
77
+ // src/hex/from/fromBigInt.ts
78
+ var hexFromBigInt = (value, config = {}) => {
79
+ const unPadded = value.toString(16);
80
+ return hexFromHexString(unPadded, config);
81
+ };
82
+
83
+ // src/hex/from/fromNumber.ts
84
+ var hexFromNumber = (value, config) => {
85
+ return hexFromBigInt(BigInt(value), config);
86
+ };
87
+
88
+ // src/hex/from/from.ts
89
+ var hexFrom = (value, config) => {
90
+ switch (typeof value) {
91
+ case "string": {
92
+ return hexFromHexString(value, config);
93
+ }
94
+ case "bigint": {
95
+ return hexFromBigInt(value, config);
96
+ }
97
+ case "number": {
98
+ return hexFromNumber(value, config);
99
+ }
100
+ case "object": {
101
+ return hexFromArrayBuffer(value, config);
102
+ }
103
+ default: {
104
+ throw new Error(`Invalid type: ${typeof value}`);
105
+ }
106
+ }
107
+ };
108
+
109
+ // src/hex/as.ts
110
+ function asHex(value, assert) {
111
+ switch (typeof value) {
112
+ case "string": {
113
+ const stringValue = hexFromHexString(value);
114
+ return isHex(stringValue) ? stringValue : assertError(value, assert, `Value is not Hex [${value}]`);
115
+ }
116
+ default: {
117
+ return assertError(value, assert, `Unsupported type [${typeof value}]`);
118
+ }
119
+ }
120
+ }
121
+
122
+ // src/hex/hex.ts
123
+ import * as z2 from "zod/mini";
124
+ var HexZod = z2.pipe(
125
+ z2.string().check(z2.regex(HexRegEx, { error: "Invalid hex format" })),
126
+ z2.transform((val) => val)
127
+ );
128
+
129
+ // src/hex/isHexZero.ts
130
+ import { isString } from "../../typeof/neutral/index.mjs";
131
+ var isHexZero = (value) => {
132
+ return isString(value) ? BigInt(hexFromHexString(value, { prefix: true })) === 0n : void 0;
133
+ };
134
+
135
+ // src/hex/legacy.ts
136
+ var toHexLegacy = (buffer) => {
137
+ return [...new Uint8Array(buffer)].map((x) => x.toString(16).padStart(2, "0")).join("");
138
+ };
139
+
140
+ // src/hex/to.ts
141
+ var toHex = (value, config = {}) => {
142
+ const { prefix: isPrefix = false } = config;
143
+ return hexFrom(value, { prefix: isPrefix, ...config });
144
+ };
145
+
146
+ // src/address/AddressValidationZod.ts
147
+ var AddressValidationZod = z3.pipe(
148
+ z3.string().check(
149
+ z3.refine((x) => HexZod.safeParse(x).success),
150
+ z3.refine((x) => x.length === ADDRESS_LENGTH, { error: (e) => new Error(`Address must have 40 characters [${String(e.input)}]`) })
151
+ ),
152
+ z3.transform((v) => v)
153
+ );
154
+
155
+ // src/address/AddressTransformZod.ts
156
+ var AddressTransformZod = z4.pipe(
157
+ z4.pipe(
158
+ z4.union([z4.string(), z4.bigint(), z4.number()]),
159
+ z4.transform((value) => {
160
+ if (typeof value === "bigint") {
161
+ return value.toString(16).padStart(ADDRESS_LENGTH, "0");
162
+ }
163
+ if (typeof value === "string") {
164
+ return value.startsWith("0x") ? value.slice(2) : value;
165
+ }
166
+ return BigInt(value).toString(16).padStart(ADDRESS_LENGTH, "0");
167
+ })
168
+ ).check(z4.refine((x) => AddressValidationZod.safeParse(x).success)),
169
+ z4.transform((x) => x)
170
+ );
171
+
172
+ // src/address/as.ts
173
+ import { assertError as assertError2 } from "../../error/neutral/index.mjs";
174
+ import { isObject } from "../../typeof/neutral/index.mjs";
175
+
176
+ // src/address/is.ts
177
+ var isAddress = (value, config = {}) => {
178
+ const { bitLength = 160, prefix: isPrefix = false } = config;
179
+ return isHex(value, { bitLength, prefix: isPrefix });
180
+ };
181
+ function isAddressV2(value) {
182
+ return AddressValidationZod.safeParse(value).success;
183
+ }
184
+
185
+ // src/address/as.ts
186
+ function asAddress(value, assert) {
187
+ try {
188
+ let stringValue;
189
+ switch (typeof value) {
190
+ case "string": {
191
+ stringValue = hexFromHexString(value, { prefix: false, byteSize: 4 });
192
+ break;
193
+ }
194
+ default: {
195
+ return isObject(assert) ? assertError2(value, assert, `Unsupported type [${typeof value}]`) : void 0;
196
+ }
197
+ }
198
+ return isAddress(stringValue) ? stringValue : assertError2(value, assert, `Value is not an Address [${value}]`);
199
+ } catch (ex) {
200
+ const error = ex;
201
+ return assertError2(void 0, assert, error.message);
202
+ }
203
+ }
204
+ function asAddressV2(value, assert = false) {
205
+ return assert ? AddressValidationZod.parse(value) : AddressValidationZod.safeParse(value).data;
206
+ }
207
+
208
+ // src/address/to.ts
209
+ var toAddress = (value, config = {}) => {
210
+ const { bitLength = 160, prefix: isPrefix = false } = config;
211
+ return hexFrom(value, {
212
+ bitLength,
213
+ prefix: isPrefix,
214
+ ...config
215
+ });
216
+ };
217
+ function toAddressV2(value, assert = false) {
218
+ return assert ? AddressTransformZod.parse(value) : AddressTransformZod.safeParse(value).data;
219
+ }
220
+
221
+ // src/ethAddress.ts
222
+ import { assertError as assertError3 } from "../../error/neutral/index.mjs";
223
+ import * as z5 from "zod/mini";
224
+ var EthAddressRegEx = HexRegExMinMaxMixedCaseWithPrefix(20, 20);
225
+ var EthAddressToStringZod = z5.string().check(z5.regex(EthAddressRegEx));
226
+ var EthAddressToStringSchema = EthAddressToStringZod;
227
+ var EthAddressFromStringZod = z5.pipe(
228
+ z5.string().check(z5.regex(EthAddressRegEx)),
229
+ z5.transform((v) => toEthAddress(v))
230
+ );
231
+ var EthAddressFromStringSchema = EthAddressFromStringZod;
232
+ var ETH_ZERO_ADDRESS = "0x0000000000000000000000000000000000000000";
233
+ var toEthAddress = (value, config = {}) => {
234
+ const { bitLength = 160, prefix: isPrefix = false } = config;
235
+ return `0x${hexFrom(value, {
236
+ bitLength,
237
+ prefix: isPrefix,
238
+ ...config
239
+ })}`;
240
+ };
241
+ var isEthAddress = (value, config = {}) => {
242
+ const { bitLength = 160, prefix: isPrefix = true } = config;
243
+ const loweredValue = typeof value === "string" ? value.toLowerCase() : value;
244
+ return isHex(loweredValue, { bitLength, prefix: isPrefix });
245
+ };
246
+ var EthAddressZod = z5.string().check(
247
+ z5.regex(EthAddressRegEx, { error: "Invalid address format" }),
248
+ z5.refine(isEthAddress)
249
+ );
250
+ function asEthAddress(value, assert) {
251
+ try {
252
+ let stringValue;
253
+ switch (typeof value) {
254
+ case "string": {
255
+ stringValue = hexFromHexString(value, { prefix: true, byteSize: 4 });
256
+ break;
257
+ }
258
+ default: {
259
+ if (value !== void 0) {
260
+ return assertError3(value, assert, `Unsupported type [${typeof value}]`);
261
+ }
262
+ }
263
+ }
264
+ return isEthAddress(stringValue) ? stringValue : assertError3(value, assert, `Value is not an EthAddress [${value}]`);
265
+ } catch (ex) {
266
+ const error = ex;
267
+ return assertError3(void 0, assert, error.message);
268
+ }
269
+ }
270
+
271
+ // src/hash/as.ts
272
+ import { assertError as assertError4 } from "../../error/neutral/index.mjs";
273
+ import { isUndefined } from "../../typeof/neutral/index.mjs";
274
+
275
+ // src/hash/is.ts
276
+ var isHash = (value, bitLength = 256) => {
277
+ return isHex(value, { bitLength });
278
+ };
279
+
280
+ // src/hash/as.ts
281
+ function asHash(value, assert) {
282
+ switch (typeof value) {
283
+ case "string": {
284
+ const stringValue = hexFromHexString(value);
285
+ return isHash(stringValue) ? stringValue : assertError4(value, assert, `Value is not a Hash [${value}]`);
286
+ }
287
+ default: {
288
+ return isUndefined(assert) ? void 0 : assertError4(value, assert, `Unsupported type [${typeof value}]`);
289
+ }
290
+ }
291
+ }
292
+
293
+ // src/hash/hash.ts
294
+ import * as z6 from "zod/mini";
295
+ var HASH_LENGTH = 32;
296
+ var HashRegEx = HexRegExMinMax(HASH_LENGTH, HASH_LENGTH);
297
+ var ZERO_HASH = "0000000000000000000000000000000000000000000000000000000000000000";
298
+ var HashBitLength = [32, 64, 128, 256, 512, 1024, 2048, 4096];
299
+ var isHashBitLength = (value) => {
300
+ return typeof value === "number" && HashBitLength.includes(value);
301
+ };
302
+ var HashZod = z6.pipe(
303
+ z6.string().check(z6.regex(HashRegEx, { error: "Invalid hex format" })),
304
+ z6.transform((val) => val)
305
+ );
306
+
307
+ // src/hash/zod.ts
308
+ import * as z7 from "zod/mini";
309
+ var HashToJsonZod = z7.pipe(HashZod, z7.transform((v) => v));
310
+ var JsonToHashZod = z7.pipe(z7.string(), z7.transform((v) => asHash(v, true)));
311
+
312
+ // src/hexToBigInt.ts
313
+ function hexToBigInt(hex) {
314
+ return BigInt(hexFromHexString(hex, { prefix: true }));
315
+ }
316
+
317
+ // src/zod.ts
318
+ import * as z8 from "zod/mini";
319
+ var BigIntToJsonZod = z8.pipe(
320
+ z8.bigint().check(z8.nonnegative()),
321
+ z8.transform((x) => toHex(x))
322
+ );
323
+ var JsonToBigIntZod = z8.pipe(
324
+ z8.string(),
325
+ z8.transform((x) => hexToBigInt(toHex(x)))
326
+ );
327
+ export {
328
+ ADDRESS_LENGTH,
329
+ AddressRegEx,
330
+ AddressTransformZod,
331
+ AddressValidationZod,
332
+ AddressZod,
333
+ BigIntToJsonZod,
334
+ ETH_ZERO_ADDRESS,
335
+ EthAddressFromStringSchema,
336
+ EthAddressFromStringZod,
337
+ EthAddressRegEx,
338
+ EthAddressToStringSchema,
339
+ EthAddressToStringZod,
340
+ EthAddressZod,
341
+ HASH_LENGTH,
342
+ HashBitLength,
343
+ HashRegEx,
344
+ HashToJsonZod,
345
+ HashZod,
346
+ HexRegEx,
347
+ HexRegExMinMax,
348
+ HexRegExMinMaxMixedCaseWithPrefix,
349
+ HexRegExWithPrefix,
350
+ HexZod,
351
+ JsonToBigIntZod,
352
+ JsonToHashZod,
353
+ ZERO_ADDRESS,
354
+ ZERO_HASH,
355
+ asAddress,
356
+ asAddressV2,
357
+ asEthAddress,
358
+ asHash,
359
+ asHex,
360
+ bitsToNibbles,
361
+ hexFrom,
362
+ hexFromArrayBuffer,
363
+ hexFromBigInt,
364
+ hexFromHexString,
365
+ hexFromNumber,
366
+ hexToBigInt,
367
+ isAddress,
368
+ isAddressV2,
369
+ isEthAddress,
370
+ isHash,
371
+ isHashBitLength,
372
+ isHex,
373
+ isHexZero,
374
+ nibblesToBits,
375
+ toAddress,
376
+ toAddressV2,
377
+ toEthAddress,
378
+ toHex,
379
+ toHexLegacy
380
+ };
381
+ //# sourceMappingURL=index.mjs.map
@@ -0,0 +1,3 @@
1
+ export type { EthAddress } from './ethAddress.ts';
2
+ export type { BrandedHex, Hex, HexConfig, } from './hex/index.ts';
3
+ //# sourceMappingURL=model.d.ts.map
@@ -0,0 +1 @@
1
+ //# sourceMappingURL=model.mjs.map
@@ -0,0 +1,6 @@
1
+ import * as z from 'zod/mini';
2
+ /** Zod schema that transforms a non-negative BigInt into a hex string for JSON serialization. */
3
+ export declare const BigIntToJsonZod: z.ZodMiniPipe<z.ZodMiniBigInt<bigint>, z.ZodMiniTransform<import("./hex/hex.ts").BrandedHex, bigint>>;
4
+ /** Zod schema that parses a JSON hex string into a BigInt. */
5
+ export declare const JsonToBigIntZod: z.ZodMiniPipe<z.ZodMiniString<string>, z.ZodMiniTransform<bigint, string>>;
6
+ //# sourceMappingURL=zod.d.ts.map
@@ -0,0 +1,7 @@
1
+ import type { LogLevelValue } from './LevelLogger.ts';
2
+ import { LevelLogger } from './LevelLogger.ts';
3
+ /** A LevelLogger that delegates to the global `console` object. */
4
+ export declare class ConsoleLogger extends LevelLogger {
5
+ constructor(level?: LogLevelValue);
6
+ }
7
+ //# sourceMappingURL=ConsoleLogger.d.ts.map
@@ -0,0 +1,19 @@
1
+ import type { Logger } from './LevelLogger.ts';
2
+ /**
3
+ * A logger wrapper that prefixes every log message with a bracketed identifier.
4
+ * Useful for distinguishing log output from different components or instances.
5
+ */
6
+ export declare class IdLogger implements Logger {
7
+ private _id?;
8
+ private _logger;
9
+ constructor(logger: Logger, id?: () => string);
10
+ set id(id: string);
11
+ debug(...data: unknown[]): void;
12
+ error(...data: unknown[]): void;
13
+ info(...data: unknown[]): void;
14
+ log(...data: unknown[]): void;
15
+ trace(...data: unknown[]): void;
16
+ warn(...data: unknown[]): void;
17
+ private prefix;
18
+ }
19
+ //# sourceMappingURL=IdLogger.d.ts.map
@@ -0,0 +1,47 @@
1
+ import type { EnumKey, EnumValue } from '../../enum/neutral/index.ts';
2
+ import { Enum } from '../../enum/neutral/index.ts';
3
+ /** A generic logging function that accepts any number of arguments. */
4
+ export type LogFunction = (...data: unknown[]) => void;
5
+ /**
6
+ * Interface to handle overlap between Winston &
7
+ * `console` with as much congruency as possible.
8
+ */
9
+ export interface Logger {
10
+ debug: LogFunction;
11
+ error: LogFunction;
12
+ info: LogFunction;
13
+ log: LogFunction;
14
+ trace: LogFunction;
15
+ warn: LogFunction;
16
+ }
17
+ /** Numeric log level values, from least verbose (error=1) to most verbose (trace=6). */
18
+ export declare const LogLevel: Enum<{
19
+ error: 1;
20
+ warn: 2;
21
+ info: 3;
22
+ log: 4;
23
+ debug: 5;
24
+ trace: 6;
25
+ }>;
26
+ /** String key for a log level (e.g. 'error', 'warn', 'info'). */
27
+ export type LogLevelKey = EnumKey<typeof LogLevel>;
28
+ /** Alias for LogLevelKey, representing the verbosity setting as a string. */
29
+ export type LogVerbosity = LogLevelKey;
30
+ /** Numeric value of a log level (1 through 6). */
31
+ export type LogLevelValue = EnumValue<typeof LogLevel>;
32
+ /**
33
+ * A logger that filters messages based on a configured log level.
34
+ * Methods for levels above the configured threshold return a no-op function.
35
+ */
36
+ export declare class LevelLogger implements Logger {
37
+ readonly level: LogLevelValue;
38
+ readonly logger: Logger;
39
+ constructor(logger: Logger, level?: LogLevelValue);
40
+ get debug(): LogFunction;
41
+ get error(): LogFunction;
42
+ get info(): LogFunction;
43
+ get log(): LogFunction;
44
+ get trace(): LogFunction;
45
+ get warn(): LogFunction;
46
+ }
47
+ //# sourceMappingURL=LevelLogger.d.ts.map
@@ -0,0 +1,3 @@
1
+ /** A log function that silently discards all arguments. */
2
+ export declare const NoOpLogFunction: (..._data: unknown[]) => undefined;
3
+ //# sourceMappingURL=NoOpLogFunction.d.ts.map
@@ -0,0 +1,17 @@
1
+ import type { Logger } from './LevelLogger.ts';
2
+ /**
3
+ * A logger that does not log anything.
4
+ * This is useful when you want to disable logging
5
+ * like when running unit tests or in silent mode.
6
+ * It implements the `Logger` interface but all methods
7
+ * are no-op functions.
8
+ */
9
+ export declare class SilentLogger implements Logger {
10
+ readonly debug: (..._data: unknown[]) => undefined;
11
+ readonly error: (..._data: unknown[]) => undefined;
12
+ readonly info: (..._data: unknown[]) => undefined;
13
+ readonly log: (..._data: unknown[]) => undefined;
14
+ readonly trace: (..._data: unknown[]) => undefined;
15
+ readonly warn: (..._data: unknown[]) => undefined;
16
+ }
17
+ //# sourceMappingURL=SilentLogger.d.ts.map
@@ -0,0 +1,7 @@
1
+ /**
2
+ * Retrieves the name of the calling function by inspecting the stack trace.
3
+ * @param depth - The stack frame depth to inspect (default: 2, the caller's caller).
4
+ * @returns The function name, or '<unknown>' if it cannot be determined.
5
+ */
6
+ export declare const getFunctionName: (depth?: number) => string;
7
+ //# sourceMappingURL=getFunctionName.d.ts.map
@@ -0,0 +1,7 @@
1
+ export * from './ConsoleLogger.ts';
2
+ export * from './getFunctionName.ts';
3
+ export * from './IdLogger.ts';
4
+ export * from './LevelLogger.ts';
5
+ export * from './NoOpLogFunction.ts';
6
+ export * from './SilentLogger.ts';
7
+ //# sourceMappingURL=index.d.ts.map
@@ -0,0 +1,126 @@
1
+ // src/LevelLogger.ts
2
+ import { Enum } from "../../enum/neutral/index.mjs";
3
+
4
+ // src/NoOpLogFunction.ts
5
+ var NoOpLogFunction = (..._data) => void {};
6
+
7
+ // src/LevelLogger.ts
8
+ var LogLevel = Enum({
9
+ error: 1,
10
+ warn: 2,
11
+ info: 3,
12
+ log: 4,
13
+ debug: 5,
14
+ trace: 6
15
+ });
16
+ var LevelLogger = class {
17
+ level;
18
+ logger;
19
+ constructor(logger, level = LogLevel.warn) {
20
+ this.level = level;
21
+ this.logger = logger;
22
+ }
23
+ get debug() {
24
+ return this.level >= LogLevel.debug ? this.logger.debug : NoOpLogFunction;
25
+ }
26
+ get error() {
27
+ return this.level >= LogLevel.error ? this.logger.error : NoOpLogFunction;
28
+ }
29
+ get info() {
30
+ return this.level >= LogLevel.info ? this.logger.info : NoOpLogFunction;
31
+ }
32
+ get log() {
33
+ return this.level >= LogLevel.log ? this.logger.log : NoOpLogFunction;
34
+ }
35
+ get trace() {
36
+ return this.level >= LogLevel.trace ? this.logger.trace : NoOpLogFunction;
37
+ }
38
+ get warn() {
39
+ return this.level >= LogLevel.warn ? this.logger.warn : NoOpLogFunction;
40
+ }
41
+ };
42
+
43
+ // src/ConsoleLogger.ts
44
+ var ConsoleLogger = class extends LevelLogger {
45
+ constructor(level = LogLevel.warn) {
46
+ super(console, level);
47
+ }
48
+ };
49
+
50
+ // src/getFunctionName.ts
51
+ import { handleError } from "../../error/neutral/index.mjs";
52
+ import { isNumber } from "../../typeof/neutral/index.mjs";
53
+ var getFunctionName = (depth = 2) => {
54
+ try {
55
+ throw new Error("Getting function name");
56
+ } catch (ex) {
57
+ return handleError(ex, (error) => {
58
+ let newIndex;
59
+ const stackParts = error.stack?.split("\n")[depth]?.split(" ");
60
+ const funcName = stackParts?.find((item, index) => {
61
+ if (!(item.length > 0 && item !== "at")) {
62
+ return;
63
+ }
64
+ if (item === "new") {
65
+ newIndex = index;
66
+ }
67
+ return true;
68
+ }) ?? "<unknown>";
69
+ return isNumber(newIndex) ? `${funcName} ${stackParts?.[newIndex + 1]}` : funcName;
70
+ });
71
+ }
72
+ };
73
+
74
+ // src/IdLogger.ts
75
+ var IdLogger = class {
76
+ _id;
77
+ _logger;
78
+ constructor(logger, id) {
79
+ this._logger = logger;
80
+ this._id = id;
81
+ }
82
+ set id(id) {
83
+ this._id = () => id;
84
+ }
85
+ debug(...data) {
86
+ this._logger?.debug(this.prefix(), ...data);
87
+ }
88
+ error(...data) {
89
+ this._logger?.error(this.prefix(), ...data);
90
+ }
91
+ info(...data) {
92
+ this._logger?.info(this.prefix(), ...data);
93
+ }
94
+ log(...data) {
95
+ this._logger?.log(this.prefix(), ...data);
96
+ }
97
+ trace(...data) {
98
+ this._logger?.trace(this.prefix(), ...data);
99
+ }
100
+ warn(...data) {
101
+ this._logger?.warn(this.prefix(), ...data);
102
+ }
103
+ prefix() {
104
+ return `[${this._id?.()}]`;
105
+ }
106
+ };
107
+
108
+ // src/SilentLogger.ts
109
+ var SilentLogger = class {
110
+ debug = NoOpLogFunction;
111
+ error = NoOpLogFunction;
112
+ info = NoOpLogFunction;
113
+ log = NoOpLogFunction;
114
+ trace = NoOpLogFunction;
115
+ warn = NoOpLogFunction;
116
+ };
117
+ export {
118
+ ConsoleLogger,
119
+ IdLogger,
120
+ LevelLogger,
121
+ LogLevel,
122
+ NoOpLogFunction,
123
+ SilentLogger,
124
+ getFunctionName
125
+ };
126
+ //# sourceMappingURL=index.mjs.map
@@ -0,0 +1,8 @@
1
+ import type { TypeCheck } from '../../object-model/neutral/index.ts';
2
+ import type { TypedObject } from '../../typeof/neutral/index.ts';
3
+ /** Factory for creating type-narrowing functions for TypedObject types. */
4
+ export declare const AsObjectFactory: {
5
+ create: <T extends TypedObject>(typeCheck: TypeCheck<T>) => import("../../object-model/neutral/index.ts").AsTypeFunction<T>;
6
+ createOptional: <T extends TypedObject>(typeCheck: TypeCheck<T>) => (value: import("../../promise/neutral/index.ts").AnyNonPromise) => T | undefined;
7
+ };
8
+ //# sourceMappingURL=AsObjectFactory.d.ts.map
@@ -0,0 +1,11 @@
1
+ import type { AsTypeFunction, TypeCheck } from '../../object-model/neutral/index.ts';
2
+ import type { AnyNonPromise } from '../../promise/neutral/index.ts';
3
+ /**
4
+ * Factory for creating type-narrowing 'as' functions that cast a value to T or return undefined.
5
+ * Supports optional assertion messages and configuration for required/optional behavior.
6
+ */
7
+ export declare const AsTypeFactory: {
8
+ create: <T extends AnyNonPromise>(typeCheck: TypeCheck<T>) => AsTypeFunction<T>;
9
+ createOptional: <T extends AnyNonPromise>(typeCheck: TypeCheck<T>) => (value: AnyNonPromise) => T | undefined;
10
+ };
11
+ //# sourceMappingURL=AsTypeFactory.d.ts.map
@@ -0,0 +1,2 @@
1
+ export type { EmptyObject } from '../../object-model/neutral/index.ts';
2
+ //# sourceMappingURL=EmptyObject.d.ts.map
@@ -0,0 +1,16 @@
1
+ import type { TypeCheck, TypeCheckConfig } from '../../object-model/neutral/index.ts';
2
+ import { type ObjectTypeShape, type TypedObject } from '../../typeof/neutral/index.ts';
3
+ /** Configuration options for object type checking. */
4
+ export interface ObjectTypeConfig extends TypeCheckConfig {
5
+ }
6
+ /** Factory class for creating type-guard functions that validate objects against a given shape and optional additional checks. */
7
+ export declare class IsObjectFactory<T extends TypedObject> {
8
+ /**
9
+ * Creates a type-guard function that validates an object matches the given shape and passes additional checks.
10
+ * @param shape - An optional map of property names to expected types.
11
+ * @param additionalChecks - Optional extra type-check functions to run after shape validation.
12
+ * @returns A type-guard function for type T.
13
+ */
14
+ create(shape?: ObjectTypeShape, additionalChecks?: TypeCheck<TypedObject>[]): TypeCheck<T>;
15
+ }
16
+ //# sourceMappingURL=IsObjectFactory.d.ts.map