spana-test 0.19.0 → 0.20.0

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 (252) hide show
  1. package/README.md +4 -3
  2. package/dist/agent/index.js +15 -15
  3. package/dist/api/app.d.ts +1 -0
  4. package/dist/api/app.d.ts.map +1 -1
  5. package/dist/api/expect.d.ts +25 -11
  6. package/dist/api/expect.d.ts.map +1 -1
  7. package/dist/{app-LGNFQMU7.js → app-ZSRJ3VFR.js} +3 -3
  8. package/dist/{appium-2PJWZXJI.js → appium-LOAWWZXA.js} +9 -9
  9. package/dist/build-info-KFFGVWDQ.js +9 -0
  10. package/dist/build-info.d.ts +5 -0
  11. package/dist/build-info.d.ts.map +1 -0
  12. package/dist/build-info.json +4 -0
  13. package/dist/channels/cdp-client.d.ts +36 -1
  14. package/dist/channels/cdp-client.d.ts.map +1 -1
  15. package/dist/channels/dom-channel.d.ts +14 -2
  16. package/dist/channels/dom-channel.d.ts.map +1 -1
  17. package/dist/{chunk-7K24Q7V3.js → chunk-26XIUSVS.js} +129 -29
  18. package/dist/chunk-26XIUSVS.js.map +1 -0
  19. package/dist/{chunk-E67QUGT3.js → chunk-2SDRH7ST.js} +7 -14
  20. package/dist/chunk-2SDRH7ST.js.map +1 -0
  21. package/dist/{chunk-NR4QAM5W.js → chunk-2TK77LXY.js} +18 -16
  22. package/dist/chunk-2TK77LXY.js.map +1 -0
  23. package/dist/{chunk-AP5SGSO7.js → chunk-42D5LOGH.js} +8 -8
  24. package/dist/{chunk-6X2SK2XO.js → chunk-5NZPLX2Y.js} +4 -5
  25. package/dist/chunk-5NZPLX2Y.js.map +1 -0
  26. package/dist/{chunk-CQ67PB3R.js → chunk-6GLL6SMP.js} +2 -2
  27. package/dist/{chunk-44U3F2RY.js → chunk-7GDO4XAI.js} +214 -6
  28. package/dist/chunk-7GDO4XAI.js.map +1 -0
  29. package/dist/{chunk-IJWAAODK.js → chunk-7QJY2HJO.js} +2 -2
  30. package/dist/{chunk-DNWVDGKS.js → chunk-GBV3XDWM.js} +8 -8
  31. package/dist/{chunk-C7HZJIGQ.js → chunk-HX2PKESI.js} +2 -2
  32. package/dist/{chunk-NC32K762.js → chunk-QNCTEV2P.js} +14 -14
  33. package/dist/{chunk-FLPPA2XY.js → chunk-VWOTHDSE.js} +9 -4
  34. package/dist/chunk-VWOTHDSE.js.map +1 -0
  35. package/dist/chunk-XLHJCJ4O.js +15 -0
  36. package/dist/chunk-XLHJCJ4O.js.map +1 -0
  37. package/dist/{chunk-G4ZUJCEN.js → chunk-XORHAB3R.js} +101 -47
  38. package/dist/chunk-XORHAB3R.js.map +1 -0
  39. package/dist/{chunk-C2YM5GNF.js → chunk-XUKBM64A.js} +3 -3
  40. package/dist/{chunk-FZ7EMXIM.js → chunk-XZQGSUV7.js} +10 -8
  41. package/dist/chunk-XZQGSUV7.js.map +1 -0
  42. package/dist/{chunk-3ONT32BO.js → chunk-ZVUIG6A4.js} +30 -24
  43. package/dist/{chunk-3ONT32BO.js.map → chunk-ZVUIG6A4.js.map} +1 -1
  44. package/dist/cli.js +16 -15
  45. package/dist/cli.js.map +1 -1
  46. package/dist/{config-loader-MX232REU.js → config-loader-IDIKOQ4T.js} +3 -3
  47. package/dist/{console-OHKVJLW3.js → console-Z7F7X3WY.js} +40 -39
  48. package/dist/console-Z7F7X3WY.js.map +1 -0
  49. package/dist/{doctor-command-YTT5SMQW.js → doctor-command-2PSDOREK.js} +7 -7
  50. package/dist/{driver-X4FWTDNU.js → driver-TNQ6HSID.js} +6 -6
  51. package/dist/{driver-AN3I4H6O.js → driver-TTJVCWCD.js} +7 -7
  52. package/dist/drivers/appium/android.d.ts +1 -1
  53. package/dist/drivers/appium/ios.d.ts +1 -1
  54. package/dist/drivers/cdp-browser.d.ts +1 -1
  55. package/dist/drivers/cdp-browser.d.ts.map +1 -1
  56. package/dist/drivers/device-controls.d.ts +1 -1
  57. package/dist/drivers/electrobun.d.ts +1 -1
  58. package/dist/drivers/electron.d.ts +1 -1
  59. package/dist/drivers/playwright.d.ts +2 -1
  60. package/dist/drivers/playwright.d.ts.map +1 -1
  61. package/dist/drivers/raw-driver.d.ts +2 -1
  62. package/dist/drivers/uiautomator2/driver.d.ts +1 -1
  63. package/dist/drivers/wasm.d.ts +1 -1
  64. package/dist/drivers/wda/driver.d.ts +1 -1
  65. package/dist/{electrobun-OUTYOM5G.js → electrobun-6ZJ6QFVQ.js} +5 -5
  66. package/dist/errors.d.ts +12 -12
  67. package/dist/index.d.ts +2 -1
  68. package/dist/index.d.ts.map +1 -1
  69. package/dist/index.js +49 -45
  70. package/dist/index.js.map +1 -1
  71. package/dist/{json-QVHG6I3O.js → json-RNYQ54R7.js} +8 -7
  72. package/dist/json-RNYQ54R7.js.map +1 -0
  73. package/dist/{local-UWIYOREU.js → local-E6FJI3QK.js} +5 -5
  74. package/dist/mcp/server.d.ts.map +1 -1
  75. package/dist/{playwright-KBWUBU5S.js → playwright-LS35WXQ6.js} +6 -6
  76. package/dist/report/console.d.ts +2 -0
  77. package/dist/report/console.d.ts.map +1 -1
  78. package/dist/report/json.d.ts +5 -1
  79. package/dist/report/json.d.ts.map +1 -1
  80. package/dist/runtime/local.d.ts.map +1 -1
  81. package/dist/runtime/web-server.d.ts.map +1 -1
  82. package/dist/schemas/config.d.ts +39 -484
  83. package/dist/schemas/config.d.ts.map +1 -1
  84. package/dist/schemas/device.d.ts +1 -1
  85. package/dist/schemas/element.d.ts +1 -1
  86. package/dist/schemas/selector.d.ts +1 -1
  87. package/dist/{server-CWCMC244.js → server-A6Y6ZMET.js} +2 -2
  88. package/dist/{server-BS3O4WVU.js → server-D3HOIPQE.js} +16 -16
  89. package/dist/{session-YWYRRXXR.js → session-2VIEKA6A.js} +16 -16
  90. package/dist/session-2VIEKA6A.js.map +1 -0
  91. package/dist/smart/auto-wait.d.ts +1 -1
  92. package/dist/smart/channel-resolver.d.ts +1 -1
  93. package/dist/smart/channel-resolver.d.ts.map +1 -1
  94. package/dist/smart/coordinator.d.ts +6 -2
  95. package/dist/smart/coordinator.d.ts.map +1 -1
  96. package/dist/smart/hierarchy-cache.d.ts +1 -1
  97. package/dist/studio/context.d.ts +1 -1
  98. package/dist/studio/effect-handler.d.ts +3 -1
  99. package/dist/{studio-command-XJDGLNAJ.js → studio-command-SPHIXFIW.js} +2 -2
  100. package/dist/{test-command-3IRGNEPB.js → test-command-OYMJNT23.js} +19 -19
  101. package/dist/vendor/effect/Array.d.ts +841 -0
  102. package/dist/vendor/effect/BigDecimal.d.ts +227 -0
  103. package/dist/vendor/effect/Brand.d.ts +71 -0
  104. package/dist/vendor/effect/ByteSize.d.ts +218 -0
  105. package/dist/vendor/effect/Cache.d.ts +104 -0
  106. package/dist/vendor/effect/Cause.d.ts +242 -0
  107. package/dist/vendor/effect/Channel.d.ts +1004 -0
  108. package/dist/vendor/effect/Chunk.d.ts +499 -0
  109. package/dist/vendor/effect/Clock.d.ts +31 -0
  110. package/dist/vendor/effect/Combiner.d.ts +23 -0
  111. package/dist/vendor/effect/Context.d.ts +167 -0
  112. package/dist/vendor/effect/Cron.d.ts +79 -0
  113. package/dist/vendor/effect/Data.d.ts +146 -0
  114. package/dist/vendor/effect/DateTime.d.ts +554 -0
  115. package/dist/vendor/effect/Deferred.d.ts +135 -0
  116. package/dist/vendor/effect/Differ.d.ts +8 -0
  117. package/dist/vendor/effect/Duration.d.ts +270 -0
  118. package/dist/vendor/effect/Effect.d.ts +2606 -0
  119. package/dist/vendor/effect/Equal.d.ts +20 -0
  120. package/dist/vendor/effect/Equivalence.d.ts +55 -0
  121. package/dist/vendor/effect/ExecutionPlan.d.ts +131 -0
  122. package/dist/vendor/effect/Exit.d.ts +114 -0
  123. package/dist/vendor/effect/Fiber.d.ts +90 -0
  124. package/dist/vendor/effect/FileSystem.d.ts +227 -0
  125. package/dist/vendor/effect/Filter.d.ts +133 -0
  126. package/dist/vendor/effect/Formatter.d.ts +13 -0
  127. package/dist/vendor/effect/Function.d.ts +91 -0
  128. package/dist/vendor/effect/Graph.d.ts +638 -0
  129. package/dist/vendor/effect/HKT.d.ts +30 -0
  130. package/dist/vendor/effect/Hash.d.ts +31 -0
  131. package/dist/vendor/effect/HashMap.d.ts +225 -0
  132. package/dist/vendor/effect/HashSet.d.ts +122 -0
  133. package/dist/vendor/effect/Inspectable.d.ts +25 -0
  134. package/dist/vendor/effect/JsonPatch.d.ts +26 -0
  135. package/dist/vendor/effect/JsonSchema.d.ts +43 -0
  136. package/dist/vendor/effect/LICENSE +21 -0
  137. package/dist/vendor/effect/Latch.d.ts +48 -0
  138. package/dist/vendor/effect/Layer.d.ts +273 -0
  139. package/dist/vendor/effect/LogLevel.d.ts +46 -0
  140. package/dist/vendor/effect/Logger.d.ts +106 -0
  141. package/dist/vendor/effect/ManagedRuntime.d.ts +52 -0
  142. package/dist/vendor/effect/Metric.d.ts +266 -0
  143. package/dist/vendor/effect/MutableHashMap.d.ts +80 -0
  144. package/dist/vendor/effect/MutableList.d.ts +52 -0
  145. package/dist/vendor/effect/MutableRef.d.ts +76 -0
  146. package/dist/vendor/effect/NonEmptyIterable.d.ts +9 -0
  147. package/dist/vendor/effect/Optic.d.ts +155 -0
  148. package/dist/vendor/effect/Option.d.ts +380 -0
  149. package/dist/vendor/effect/Order.d.ts +110 -0
  150. package/dist/vendor/effect/Ordering.d.ts +24 -0
  151. package/dist/vendor/effect/Path.d.ts +44 -0
  152. package/dist/vendor/effect/Pipeable.d.ts +38 -0
  153. package/dist/vendor/effect/PlatformError.d.ts +63 -0
  154. package/dist/vendor/effect/Predicate.d.ts +227 -0
  155. package/dist/vendor/effect/PrimaryKey.d.ts +11 -0
  156. package/dist/vendor/effect/PubSub.d.ts +229 -0
  157. package/dist/vendor/effect/Pull.d.ts +54 -0
  158. package/dist/vendor/effect/Queue.d.ts +212 -0
  159. package/dist/vendor/effect/Rational.d.ts +212 -0
  160. package/dist/vendor/effect/Record.d.ts +247 -0
  161. package/dist/vendor/effect/Redactable.d.ts +14 -0
  162. package/dist/vendor/effect/Redacted.d.ts +34 -0
  163. package/dist/vendor/effect/Reducer.d.ts +13 -0
  164. package/dist/vendor/effect/References.d.ts +53 -0
  165. package/dist/vendor/effect/Request.d.ts +106 -0
  166. package/dist/vendor/effect/RequestResolver.d.ts +159 -0
  167. package/dist/vendor/effect/Result.d.ts +285 -0
  168. package/dist/vendor/effect/Schedule.d.ts +172 -0
  169. package/dist/vendor/effect/Scheduler.d.ts +45 -0
  170. package/dist/vendor/effect/Schema.d.ts +3205 -0
  171. package/dist/vendor/effect/SchemaAST.d.ts +356 -0
  172. package/dist/vendor/effect/SchemaGetter.d.ts +181 -0
  173. package/dist/vendor/effect/SchemaIssue.d.ts +147 -0
  174. package/dist/vendor/effect/SchemaParser.d.ts +57 -0
  175. package/dist/vendor/effect/SchemaRepresentation.d.ts +563 -0
  176. package/dist/vendor/effect/SchemaTransformation.d.ts +155 -0
  177. package/dist/vendor/effect/Scope.d.ts +69 -0
  178. package/dist/vendor/effect/SemVer.d.ts +209 -0
  179. package/dist/vendor/effect/SemVerRange.d.ts +74 -0
  180. package/dist/vendor/effect/Semaphore.d.ts +87 -0
  181. package/dist/vendor/effect/Sink.d.ts +337 -0
  182. package/dist/vendor/effect/StandardSchema.d.ts +112 -0
  183. package/dist/vendor/effect/Stream.d.ts +1762 -0
  184. package/dist/vendor/effect/Struct.d.ts +162 -0
  185. package/dist/vendor/effect/Take.d.ts +8 -0
  186. package/dist/vendor/effect/Tracer.d.ts +150 -0
  187. package/dist/vendor/effect/TxRef.d.ts +40 -0
  188. package/dist/vendor/effect/Types.d.ts +139 -0
  189. package/dist/vendor/effect/Unify.d.ts +50 -0
  190. package/dist/vendor/effect/Utils.d.ts +31 -0
  191. package/dist/vendor/effect/crypto/Aead.d.ts +72 -0
  192. package/dist/vendor/effect/crypto/Cipher.d.ts +54 -0
  193. package/dist/vendor/effect/crypto/CryptoError.d.ts +81 -0
  194. package/dist/vendor/effect/crypto/Digest.d.ts +32 -0
  195. package/dist/vendor/effect/crypto/KeyAgreement.d.ts +80 -0
  196. package/dist/vendor/effect/crypto/KeyFormat.d.ts +82 -0
  197. package/dist/vendor/effect/crypto/KeyWrap.d.ts +97 -0
  198. package/dist/vendor/effect/crypto/Mac.d.ts +56 -0
  199. package/dist/vendor/effect/crypto/SecureRandom.d.ts +63 -0
  200. package/dist/vendor/effect/crypto/Signature.d.ts +122 -0
  201. package/dist/vendor/effect/crypto/WebCrypto.d.ts +18 -0
  202. package/dist/vendor/effect/http/Cookies.d.ts +185 -0
  203. package/dist/vendor/effect/http/Headers.d.ts +144 -0
  204. package/dist/vendor/effect/http/UrlParams.d.ts +122 -0
  205. package/dist/vendor/effect/internal/schemaError.d.ts +3 -0
  206. package/dist/vendor/effect/net/Dns.d.ts +166 -0
  207. package/dist/vendor/effect/net/Host.d.ts +80 -0
  208. package/dist/vendor/effect/net/IpInterface.d.ts +65 -0
  209. package/dist/vendor/effect/net/IpNetwork.d.ts +89 -0
  210. package/dist/vendor/effect/net/NetAddress.d.ts +350 -0
  211. package/dist/vendor/effect/persistence/KeyValueStore.d.ts +138 -0
  212. package/dist/vendor/effect/persistence/Persistable.d.ts +56 -0
  213. package/dist/vendor/effect/persistence/Persistence.d.ts +83 -0
  214. package/dist/vendor/effect/persistence/Redis.d.ts +98 -0
  215. package/dist/vendor/effect/reactivity/Reactivity.d.ts +59 -0
  216. package/dist/vendor/effect/sql/SqlClient.d.ts +121 -0
  217. package/dist/vendor/effect/sql/SqlConnection.d.ts +26 -0
  218. package/dist/vendor/effect/sql/SqlError.d.ts +186 -0
  219. package/dist/vendor/effect/sql/Statement.d.ts +225 -0
  220. package/native/win32-x64/spana_native.dll +0 -0
  221. package/package.json +4 -3
  222. package/dist/chunk-44U3F2RY.js.map +0 -1
  223. package/dist/chunk-6X2SK2XO.js.map +0 -1
  224. package/dist/chunk-7K24Q7V3.js.map +0 -1
  225. package/dist/chunk-E67QUGT3.js.map +0 -1
  226. package/dist/chunk-FLPPA2XY.js.map +0 -1
  227. package/dist/chunk-FZ7EMXIM.js.map +0 -1
  228. package/dist/chunk-G4ZUJCEN.js.map +0 -1
  229. package/dist/chunk-NR4QAM5W.js.map +0 -1
  230. package/dist/console-OHKVJLW3.js.map +0 -1
  231. package/dist/json-QVHG6I3O.js.map +0 -1
  232. /package/dist/{app-LGNFQMU7.js.map → app-ZSRJ3VFR.js.map} +0 -0
  233. /package/dist/{appium-2PJWZXJI.js.map → appium-LOAWWZXA.js.map} +0 -0
  234. /package/dist/{config-loader-MX232REU.js.map → build-info-KFFGVWDQ.js.map} +0 -0
  235. /package/dist/{chunk-AP5SGSO7.js.map → chunk-42D5LOGH.js.map} +0 -0
  236. /package/dist/{chunk-CQ67PB3R.js.map → chunk-6GLL6SMP.js.map} +0 -0
  237. /package/dist/{chunk-IJWAAODK.js.map → chunk-7QJY2HJO.js.map} +0 -0
  238. /package/dist/{chunk-DNWVDGKS.js.map → chunk-GBV3XDWM.js.map} +0 -0
  239. /package/dist/{chunk-C7HZJIGQ.js.map → chunk-HX2PKESI.js.map} +0 -0
  240. /package/dist/{chunk-NC32K762.js.map → chunk-QNCTEV2P.js.map} +0 -0
  241. /package/dist/{chunk-C2YM5GNF.js.map → chunk-XUKBM64A.js.map} +0 -0
  242. /package/dist/{driver-AN3I4H6O.js.map → config-loader-IDIKOQ4T.js.map} +0 -0
  243. /package/dist/{doctor-command-YTT5SMQW.js.map → doctor-command-2PSDOREK.js.map} +0 -0
  244. /package/dist/{driver-X4FWTDNU.js.map → driver-TNQ6HSID.js.map} +0 -0
  245. /package/dist/{electrobun-OUTYOM5G.js.map → driver-TTJVCWCD.js.map} +0 -0
  246. /package/dist/{local-UWIYOREU.js.map → electrobun-6ZJ6QFVQ.js.map} +0 -0
  247. /package/dist/{playwright-KBWUBU5S.js.map → local-E6FJI3QK.js.map} +0 -0
  248. /package/dist/{server-CWCMC244.js.map → playwright-LS35WXQ6.js.map} +0 -0
  249. /package/dist/{session-YWYRRXXR.js.map → server-A6Y6ZMET.js.map} +0 -0
  250. /package/dist/{server-BS3O4WVU.js.map → server-D3HOIPQE.js.map} +0 -0
  251. /package/dist/{studio-command-XJDGLNAJ.js.map → studio-command-SPHIXFIW.js.map} +0 -0
  252. /package/dist/{test-command-3IRGNEPB.js.map → test-command-OYMJNT23.js.map} +0 -0
@@ -0,0 +1,227 @@
1
+
2
+ import * as Equal from "./Equal.ts";
3
+ import * as Equ from "./Equivalence.ts";
4
+ import { type Inspectable } from "./Inspectable.ts";
5
+ import * as Option from "./Option.ts";
6
+ import * as order from "./Order.ts";
7
+ import type { Ordering } from "./Ordering.ts";
8
+ import { type Pipeable } from "./Pipeable.ts";
9
+ declare const TypeId = "~effect/BigDecimal";
10
+
11
+ export interface BigDecimal extends Equal.Equal, Pipeable, Inspectable {
12
+ readonly [TypeId]: typeof TypeId;
13
+ readonly value: bigint;
14
+ readonly scale: number;
15
+ }
16
+
17
+ export declare const isBigDecimal: (u: unknown) => u is BigDecimal;
18
+
19
+ export declare const make: (value: bigint, scale: number) => BigDecimal;
20
+
21
+ export declare const normalize: (self: BigDecimal) => BigDecimal;
22
+
23
+ export declare const scale: {
24
+
25
+ (scale: number): (self: BigDecimal) => BigDecimal;
26
+
27
+ (self: BigDecimal, scale: number): BigDecimal;
28
+ };
29
+
30
+ export declare const sum: {
31
+
32
+ (that: BigDecimal): (self: BigDecimal) => BigDecimal;
33
+
34
+ (self: BigDecimal, that: BigDecimal): BigDecimal;
35
+ };
36
+
37
+ export declare const sumAll: (collection: Iterable<BigDecimal>) => BigDecimal;
38
+
39
+ export declare const multiply: {
40
+
41
+ (that: BigDecimal): (self: BigDecimal) => BigDecimal;
42
+
43
+ (self: BigDecimal, that: BigDecimal): BigDecimal;
44
+ };
45
+
46
+ export declare const multiplyAll: (collection: Iterable<BigDecimal>) => BigDecimal;
47
+
48
+ export declare const subtract: {
49
+
50
+ (that: BigDecimal): (self: BigDecimal) => BigDecimal;
51
+
52
+ (self: BigDecimal, that: BigDecimal): BigDecimal;
53
+ };
54
+
55
+ export declare const divide: {
56
+
57
+ (that: BigDecimal): (self: BigDecimal) => Option.Option<BigDecimal>;
58
+
59
+ (self: BigDecimal, that: BigDecimal): Option.Option<BigDecimal>;
60
+ };
61
+
62
+ export declare const divideUnsafe: {
63
+
64
+ (that: BigDecimal): (self: BigDecimal) => BigDecimal;
65
+
66
+ (self: BigDecimal, that: BigDecimal): BigDecimal;
67
+ };
68
+
69
+ export declare const Order: order.Order<BigDecimal>;
70
+
71
+ export declare const isLessThan: {
72
+
73
+ (that: BigDecimal): (self: BigDecimal) => boolean;
74
+
75
+ (self: BigDecimal, that: BigDecimal): boolean;
76
+ };
77
+
78
+ export declare const isLessThanOrEqualTo: {
79
+
80
+ (that: BigDecimal): (self: BigDecimal) => boolean;
81
+
82
+ (self: BigDecimal, that: BigDecimal): boolean;
83
+ };
84
+
85
+ export declare const isGreaterThan: {
86
+
87
+ (that: BigDecimal): (self: BigDecimal) => boolean;
88
+
89
+ (self: BigDecimal, that: BigDecimal): boolean;
90
+ };
91
+
92
+ export declare const isGreaterThanOrEqualTo: {
93
+
94
+ (that: BigDecimal): (self: BigDecimal) => boolean;
95
+
96
+ (self: BigDecimal, that: BigDecimal): boolean;
97
+ };
98
+
99
+ export declare const between: {
100
+
101
+ (options: {
102
+ minimum: BigDecimal;
103
+ maximum: BigDecimal;
104
+ }): (self: BigDecimal) => boolean;
105
+
106
+ (self: BigDecimal, options: {
107
+ minimum: BigDecimal;
108
+ maximum: BigDecimal;
109
+ }): boolean;
110
+ };
111
+
112
+ export declare const clamp: {
113
+
114
+ (options: {
115
+ minimum: BigDecimal;
116
+ maximum: BigDecimal;
117
+ }): (self: BigDecimal) => BigDecimal;
118
+
119
+ (self: BigDecimal, options: {
120
+ minimum: BigDecimal;
121
+ maximum: BigDecimal;
122
+ }): BigDecimal;
123
+ };
124
+
125
+ export declare const min: {
126
+
127
+ (that: BigDecimal): (self: BigDecimal) => BigDecimal;
128
+
129
+ (self: BigDecimal, that: BigDecimal): BigDecimal;
130
+ };
131
+
132
+ export declare const max: {
133
+
134
+ (that: BigDecimal): (self: BigDecimal) => BigDecimal;
135
+
136
+ (self: BigDecimal, that: BigDecimal): BigDecimal;
137
+ };
138
+
139
+ export declare const sign: (n: BigDecimal) => Ordering;
140
+
141
+ export declare const abs: (n: BigDecimal) => BigDecimal;
142
+
143
+ export declare const negate: (n: BigDecimal) => BigDecimal;
144
+
145
+ export declare const remainder: {
146
+
147
+ (divisor: BigDecimal): (self: BigDecimal) => Option.Option<BigDecimal>;
148
+
149
+ (self: BigDecimal, divisor: BigDecimal): Option.Option<BigDecimal>;
150
+ };
151
+
152
+ export declare const remainderUnsafe: {
153
+
154
+ (divisor: BigDecimal): (self: BigDecimal) => BigDecimal;
155
+
156
+ (self: BigDecimal, divisor: BigDecimal): BigDecimal;
157
+ };
158
+
159
+ export declare const Equivalence: Equ.Equivalence<BigDecimal>;
160
+
161
+ export declare const equals: {
162
+
163
+ (that: BigDecimal): (self: BigDecimal) => boolean;
164
+
165
+ (self: BigDecimal, that: BigDecimal): boolean;
166
+ };
167
+
168
+ export declare const fromBigInt: (n: bigint) => BigDecimal;
169
+
170
+ export declare const fromNumberUnsafe: (n: number) => BigDecimal;
171
+
172
+ export declare const fromNumber: (n: number) => Option.Option<BigDecimal>;
173
+
174
+ export declare const fromString: (s: string) => Option.Option<BigDecimal>;
175
+
176
+ export declare const fromStringUnsafe: (s: string) => BigDecimal;
177
+
178
+ export declare const format: (n: BigDecimal) => string;
179
+
180
+ export declare const toExponential: (n: BigDecimal) => string;
181
+
182
+ export declare const toNumberUnsafe: (n: BigDecimal) => number;
183
+
184
+ export declare const isInteger: (n: BigDecimal) => boolean;
185
+
186
+ export declare const isZero: (n: BigDecimal) => boolean;
187
+
188
+ export declare const isNegative: (n: BigDecimal) => boolean;
189
+
190
+ export declare const isPositive: (n: BigDecimal) => boolean;
191
+
192
+ export type RoundingMode = "ceil" | "floor" | "to-zero" | "from-zero" | "half-ceil" | "half-floor" | "half-to-zero" | "half-from-zero" | "half-even" | "half-odd";
193
+
194
+ export declare const round: {
195
+
196
+ (options: {
197
+ scale?: number;
198
+ mode?: RoundingMode;
199
+ }): (self: BigDecimal) => BigDecimal;
200
+
201
+ (n: BigDecimal, options?: {
202
+ scale?: number;
203
+ mode?: RoundingMode;
204
+ }): BigDecimal;
205
+ };
206
+
207
+ export declare const truncate: {
208
+
209
+ (scale: number): (self: BigDecimal) => BigDecimal;
210
+
211
+ (self: BigDecimal, scale?: number): BigDecimal;
212
+ };
213
+
214
+ export declare const ceil: {
215
+
216
+ (scale: number): (self: BigDecimal) => BigDecimal;
217
+
218
+ (self: BigDecimal, scale?: number): BigDecimal;
219
+ };
220
+
221
+ export declare const floor: {
222
+
223
+ (scale: number): (self: BigDecimal) => BigDecimal;
224
+
225
+ (self: BigDecimal, scale?: number): BigDecimal;
226
+ };
227
+ export {};
@@ -0,0 +1,71 @@
1
+ import * as Option from "./Option.ts";
2
+ import * as Result from "./Result.ts";
3
+ import type * as Schema from "./Schema.ts";
4
+ import * as SchemaAST from "./SchemaAST.ts";
5
+ import * as SchemaIssue from "./SchemaIssue.ts";
6
+ import type * as Types from "./Types.ts";
7
+ declare const TypeId = "~effect/Brand";
8
+
9
+ export interface Brand<in out Keys extends string> {
10
+ readonly [TypeId]: {
11
+ readonly [K in Keys]: Keys;
12
+ };
13
+ }
14
+
15
+ export interface Constructor<in out B extends Brand<any>> {
16
+
17
+ (unbranded: Brand.Unbranded<B>): B;
18
+
19
+ option(unbranded: Brand.Unbranded<B>): Option.Option<B>;
20
+
21
+ result(unbranded: Brand.Unbranded<B>): Result.Result<B, BrandError>;
22
+
23
+ is(unbranded: Brand.Unbranded<B>): unbranded is Brand.Unbranded<B> & B;
24
+ }
25
+
26
+ export declare class BrandError {
27
+ constructor(issue: SchemaIssue.Issue);
28
+
29
+ readonly _tag = "BrandError";
30
+
31
+ readonly name: string;
32
+
33
+ readonly issue: SchemaIssue.Issue;
34
+
35
+ get message(): string;
36
+
37
+ toString(): string;
38
+ }
39
+
40
+ export declare namespace Brand {
41
+
42
+ type FromConstructor<C> = C extends Constructor<infer B> ? B : never;
43
+
44
+ type Unbranded<B extends Brand<any>> = B extends infer U & Brands<B> ? U : B;
45
+
46
+ type Keys<B extends Brand<any>> = keyof B[typeof TypeId];
47
+
48
+ type Brands<B extends Brand<any>> = Types.UnionToIntersection<{
49
+ [K in Keys<B>]: K extends string ? Brand<K> : never;
50
+ }[Keys<B>]>;
51
+
52
+ type EnsureCommonBase<Brands extends readonly [Constructor<any>, ...Array<Constructor<any>>]> = {
53
+ [B in keyof Brands]: Brand.Unbranded<Brand.FromConstructor<Brands[0]>> extends Brand.Unbranded<Brand.FromConstructor<Brands[B]>> ? Brand.Unbranded<Brand.FromConstructor<Brands[B]>> extends Brand.Unbranded<Brand.FromConstructor<Brands[0]>> ? Brands[B] : Brands[B] : "ERROR: All brands should have the same base type";
54
+ };
55
+ }
56
+
57
+ export type Branded<A, Key extends string> = A & Brand<Key>;
58
+
59
+ export declare function nominal<A extends Brand<any>>(): Constructor<A>;
60
+
61
+ export declare function make<A extends Brand<any>>(filter: (unbranded: Brand.Unbranded<A>) => Schema.FilterOutput): Constructor<A>;
62
+
63
+ export declare function check<A extends Brand<any>>(...checks: readonly [
64
+ SchemaAST.Check<Brand.Unbranded<A>>,
65
+ ...Array<SchemaAST.Check<Brand.Unbranded<A>>>
66
+ ]): Constructor<A>;
67
+
68
+ export declare function all<Brands extends readonly [Constructor<any>, ...Array<Constructor<any>>]>(...brands: Brand.EnsureCommonBase<Brands>): Constructor<Types.UnionToIntersection<{
69
+ [B in keyof Brands]: Brand.FromConstructor<Brands[B]>;
70
+ }[number]> extends infer X extends Brand<any> ? X : Brand<any>>;
71
+ export {};
@@ -0,0 +1,218 @@
1
+ import type * as Brand from "./Brand.ts";
2
+ import type * as Combiner from "./Combiner.ts";
3
+ import type * as Equ from "./Equivalence.ts";
4
+ import * as Option from "./Option.ts";
5
+ import type * as order from "./Order.ts";
6
+ import type * as Reducer from "./Reducer.ts";
7
+ declare const TypeId = "~effect/ByteSize";
8
+
9
+ export type ByteSize = Brand.Branded<bigint, typeof TypeId>;
10
+
11
+ export type Input = ByteSize | bigint | number | `${IntegerQuantity}${"" | " "}${InputUnit}`;
12
+ type IntegerQuantity = "0" | (`${bigint}` & `${"1" | "2" | "3" | "4" | "5" | "6" | "7" | "8" | "9"}${string}`);
13
+ type InputUnit = Unit | `${"" | "kilo" | "mega" | "giga" | "tera" | "peta" | "exa" | "zetta" | "yotta" | "ronna" | "quetta" | "kibi" | "mebi" | "gibi" | "tebi" | "pebi" | "exbi" | "zebi" | "yobi"}byte${"" | "s"}`;
14
+
15
+ export type DecimalUnit = "B" | "kB" | "MB" | "GB" | "TB" | "PB" | "EB" | "ZB" | "YB" | "RB" | "QB";
16
+
17
+ export type BinaryUnit = "B" | "KiB" | "MiB" | "GiB" | "TiB" | "PiB" | "EiB" | "ZiB" | "YiB";
18
+
19
+ export type Unit = DecimalUnit | BinaryUnit;
20
+
21
+ export type FormatOptions = {
22
+ readonly precision?: number | undefined;
23
+ readonly trailingZeros?: boolean | undefined;
24
+ } & ({
25
+ readonly system?: "decimal" | undefined;
26
+ readonly unit?: DecimalUnit | undefined;
27
+ } | {
28
+ readonly system?: "binary" | undefined;
29
+ readonly unit?: BinaryUnit | undefined;
30
+ });
31
+
32
+ export declare const zero: ByteSize;
33
+
34
+ export declare const fromStringUnsafe: (input: string) => ByteSize;
35
+
36
+ export declare const fromString: (input: string) => Option.Option<ByteSize>;
37
+
38
+ export declare const fromInputUnsafe: (input: Input) => ByteSize;
39
+
40
+ export declare const fromInput: (input: Input) => Option.Option<ByteSize>;
41
+
42
+ export declare const bytes: (value: number | bigint) => ByteSize;
43
+
44
+ export declare const kilobytes: (value: number | bigint) => ByteSize;
45
+
46
+ export declare const megabytes: (value: number | bigint) => ByteSize;
47
+
48
+ export declare const gigabytes: (value: number | bigint) => ByteSize;
49
+
50
+ export declare const terabytes: (value: number | bigint) => ByteSize;
51
+
52
+ export declare const petabytes: (value: number | bigint) => ByteSize;
53
+
54
+ export declare const exabytes: (value: number | bigint) => ByteSize;
55
+
56
+ export declare const zettabytes: (value: number | bigint) => ByteSize;
57
+
58
+ export declare const yottabytes: (value: number | bigint) => ByteSize;
59
+
60
+ export declare const ronnabytes: (value: number | bigint) => ByteSize;
61
+
62
+ export declare const quettabytes: (value: number | bigint) => ByteSize;
63
+
64
+ export declare const kibibytes: (value: number | bigint) => ByteSize;
65
+
66
+ export declare const mebibytes: (value: number | bigint) => ByteSize;
67
+
68
+ export declare const gibibytes: (value: number | bigint) => ByteSize;
69
+
70
+ export declare const tebibytes: (value: number | bigint) => ByteSize;
71
+
72
+ export declare const pebibytes: (value: number | bigint) => ByteSize;
73
+
74
+ export declare const exbibytes: (value: number | bigint) => ByteSize;
75
+
76
+ export declare const zebibytes: (value: number | bigint) => ByteSize;
77
+
78
+ export declare const yobibytes: (value: number | bigint) => ByteSize;
79
+
80
+ export declare const isByteSize: (input: unknown) => input is ByteSize;
81
+
82
+ export declare const isZero: (self: ByteSize) => boolean;
83
+
84
+ export declare const toBigInt: (self: ByteSize) => bigint;
85
+
86
+ export declare const toNumber: (self: ByteSize) => Option.Option<number>;
87
+
88
+ export declare const toNumberUnsafe: (self: ByteSize) => number;
89
+
90
+ export declare const toUnit: {
91
+
92
+ (unit: Unit): (self: ByteSize) => number;
93
+
94
+ (self: ByteSize, unit: Unit): number;
95
+ };
96
+
97
+ export declare const Order: order.Order<ByteSize>;
98
+
99
+ export declare const Equivalence: Equ.Equivalence<ByteSize>;
100
+
101
+ export declare const between: {
102
+
103
+ (options: {
104
+ minimum: ByteSize;
105
+ maximum: ByteSize;
106
+ }): (self: ByteSize) => boolean;
107
+
108
+ (self: ByteSize, options: {
109
+ minimum: ByteSize;
110
+ maximum: ByteSize;
111
+ }): boolean;
112
+ };
113
+
114
+ export declare const min: {
115
+
116
+ (that: ByteSize): (self: ByteSize) => ByteSize;
117
+
118
+ (self: ByteSize, that: ByteSize): ByteSize;
119
+ };
120
+
121
+ export declare const max: {
122
+
123
+ (that: ByteSize): (self: ByteSize) => ByteSize;
124
+
125
+ (self: ByteSize, that: ByteSize): ByteSize;
126
+ };
127
+
128
+ export declare const clamp: {
129
+
130
+ (options: {
131
+ minimum: ByteSize;
132
+ maximum: ByteSize;
133
+ }): (self: ByteSize) => ByteSize;
134
+
135
+ (self: ByteSize, options: {
136
+ minimum: ByteSize;
137
+ maximum: ByteSize;
138
+ }): ByteSize;
139
+ };
140
+
141
+ export declare const isLessThan: {
142
+
143
+ (that: ByteSize): (self: ByteSize) => boolean;
144
+
145
+ (self: ByteSize, that: ByteSize): boolean;
146
+ };
147
+
148
+ export declare const isLessThanOrEqualTo: {
149
+
150
+ (that: ByteSize): (self: ByteSize) => boolean;
151
+
152
+ (self: ByteSize, that: ByteSize): boolean;
153
+ };
154
+
155
+ export declare const isGreaterThan: {
156
+
157
+ (that: ByteSize): (self: ByteSize) => boolean;
158
+
159
+ (self: ByteSize, that: ByteSize): boolean;
160
+ };
161
+
162
+ export declare const isGreaterThanOrEqualTo: {
163
+
164
+ (that: ByteSize): (self: ByteSize) => boolean;
165
+
166
+ (self: ByteSize, that: ByteSize): boolean;
167
+ };
168
+
169
+ export declare const equals: {
170
+
171
+ (that: ByteSize): (self: ByteSize) => boolean;
172
+
173
+ (self: ByteSize, that: ByteSize): boolean;
174
+ };
175
+
176
+ export declare const sum: {
177
+
178
+ (that: ByteSize): (self: ByteSize) => ByteSize;
179
+
180
+ (self: ByteSize, that: ByteSize): ByteSize;
181
+ };
182
+
183
+ export declare const subtract: {
184
+
185
+ (that: ByteSize): (self: ByteSize) => Option.Option<ByteSize>;
186
+
187
+ (self: ByteSize, that: ByteSize): Option.Option<ByteSize>;
188
+ };
189
+
190
+ export declare const subtractUnsafe: {
191
+
192
+ (that: ByteSize): (self: ByteSize) => ByteSize;
193
+
194
+ (self: ByteSize, that: ByteSize): ByteSize;
195
+ };
196
+
197
+ export declare const times: {
198
+
199
+ (multiplier: number | bigint): (self: ByteSize) => Option.Option<ByteSize>;
200
+
201
+ (self: ByteSize, multiplier: number | bigint): Option.Option<ByteSize>;
202
+ };
203
+
204
+ export declare const divide: {
205
+
206
+ (divisor: number | bigint): (self: ByteSize) => Option.Option<ByteSize>;
207
+
208
+ (self: ByteSize, divisor: number | bigint): Option.Option<ByteSize>;
209
+ };
210
+
211
+ export declare const format: (self: ByteSize, options?: FormatOptions) => string;
212
+
213
+ export declare const ReducerSum: Reducer.Reducer<ByteSize>;
214
+
215
+ export declare const CombinerMax: Combiner.Combiner<ByteSize>;
216
+
217
+ export declare const CombinerMin: Combiner.Combiner<ByteSize>;
218
+ export {};
@@ -0,0 +1,104 @@
1
+ import * as Duration from "./Duration.ts";
2
+ import type * as Effect from "./Effect.ts";
3
+ import type * as Exit from "./Exit.ts";
4
+ import type * as Fiber from "./Fiber.ts";
5
+ import * as MutableHashMap from "./MutableHashMap.ts";
6
+ import * as Option from "./Option.ts";
7
+ import type { Pipeable } from "./Pipeable.ts";
8
+ import type { Predicate } from "./Predicate.ts";
9
+ declare const TypeId = "~effect/Cache";
10
+
11
+ export interface Cache<in out Key, in out A, in out E = never, out R = never> extends Pipeable {
12
+ readonly [TypeId]: typeof TypeId;
13
+ readonly map: MutableHashMap.MutableHashMap<Key, Entry<A, E>>;
14
+ readonly capacity: number;
15
+ readonly lookup: (key: Key) => Effect.Effect<A, E, R>;
16
+ readonly timeToLive: (exit: Exit.Exit<A, E>, key: Key) => Duration.Duration;
17
+ }
18
+
19
+ export interface Entry<A, E> {
20
+ expiresAt: number | undefined;
21
+ awaiters: number;
22
+ readonly fiber: Fiber.Fiber<A, E>;
23
+ await(this: Entry<A, E>, fiber?: Fiber.Fiber<unknown, unknown>): Effect.Effect<A, E>;
24
+ }
25
+
26
+ export declare const makeWith: <Key, A, E = never, R = never, ServiceMode extends "lookup" | "construction" = never>(lookup: (key: Key) => Effect.Effect<A, E, R>, options: {
27
+ readonly capacity: number;
28
+ readonly timeToLive?: ((exit: Exit.Exit<A, E>, key: Key) => Duration.Input) | undefined;
29
+ readonly requireServicesAt?: ServiceMode | undefined;
30
+ }) => Effect.Effect<Cache<Key, A, E, "lookup" extends ServiceMode ? R : never>, never, "lookup" extends ServiceMode ? never : R>;
31
+
32
+ export declare const make: <Key, A, E = never, R = never, ServiceMode extends "lookup" | "construction" = never>(options: {
33
+ readonly lookup: (key: Key) => Effect.Effect<A, E, R>;
34
+ readonly capacity: number;
35
+ readonly timeToLive?: Duration.Input | undefined;
36
+ readonly requireServicesAt?: ServiceMode | undefined;
37
+ }) => Effect.Effect<Cache<Key, A, E, "lookup" extends ServiceMode ? R : never>, never, "lookup" extends ServiceMode ? never : R>;
38
+
39
+ export declare const get: {
40
+
41
+ <Key, A>(key: Key): <E, R>(self: Cache<Key, A, E, R>) => Effect.Effect<A, E, R>;
42
+
43
+ <Key, A, E, R>(self: Cache<Key, A, E, R>, key: Key): Effect.Effect<A, E, R>;
44
+ };
45
+
46
+ export declare const getOption: {
47
+
48
+ <Key, A>(key: Key): <E, R>(self: Cache<Key, A, E, R>) => Effect.Effect<Option.Option<A>, E>;
49
+
50
+ <Key, A, E, R>(self: Cache<Key, A, E, R>, key: Key): Effect.Effect<Option.Option<A>, E>;
51
+ };
52
+
53
+ export declare const getSuccess: {
54
+
55
+ <Key, A, R>(key: Key): <E>(self: Cache<Key, A, E, R>) => Effect.Effect<Option.Option<A>>;
56
+
57
+ <Key, A, E, R>(self: Cache<Key, A, E, R>, key: Key): Effect.Effect<Option.Option<A>>;
58
+ };
59
+
60
+ export declare const set: {
61
+
62
+ <Key, A>(key: Key, value: A): <E, R>(self: Cache<Key, A, E, R>) => Effect.Effect<void>;
63
+
64
+ <Key, A, E, R>(self: Cache<Key, A, E, R>, key: Key, value: A): Effect.Effect<void>;
65
+ };
66
+
67
+ export declare const has: {
68
+
69
+ <Key, A>(key: Key): <E, R>(self: Cache<Key, A, E, R>) => Effect.Effect<boolean>;
70
+
71
+ <Key, A, E, R>(self: Cache<Key, A, E, R>, key: Key): Effect.Effect<boolean>;
72
+ };
73
+
74
+ export declare const invalidate: {
75
+
76
+ <Key, A>(key: Key): <E, R>(self: Cache<Key, A, E, R>) => Effect.Effect<void>;
77
+
78
+ <Key, A, E, R>(self: Cache<Key, A, E, R>, key: Key): Effect.Effect<void>;
79
+ };
80
+
81
+ export declare const invalidateWhen: {
82
+
83
+ <Key, A>(key: Key, f: Predicate<A>): <E, R>(self: Cache<Key, A, E, R>) => Effect.Effect<boolean>;
84
+
85
+ <Key, A, E, R>(self: Cache<Key, A, E, R>, key: Key, f: Predicate<A>): Effect.Effect<boolean>;
86
+ };
87
+
88
+ export declare const refresh: {
89
+
90
+ <Key, A>(key: Key): <E, R>(self: Cache<Key, A, E, R>) => Effect.Effect<A, E, R>;
91
+
92
+ <Key, A, E, R>(self: Cache<Key, A, E, R>, key: Key): Effect.Effect<A, E, R>;
93
+ };
94
+
95
+ export declare const invalidateAll: <Key, A, E, R>(self: Cache<Key, A, E, R>) => Effect.Effect<void>;
96
+
97
+ export declare const size: <Key, A, E, R>(self: Cache<Key, A, E, R>) => Effect.Effect<number>;
98
+
99
+ export declare const keys: <Key, A, E, R>(self: Cache<Key, A, E, R>) => Effect.Effect<Iterable<Key>>;
100
+
101
+ export declare const values: <Key, A, E, R>(self: Cache<Key, A, E, R>) => Effect.Effect<Iterable<A>>;
102
+
103
+ export declare const entries: <Key, A, E, R>(self: Cache<Key, A, E, R>) => Effect.Effect<Iterable<[Key, A]>>;
104
+ export {};