effect 4.0.0-beta.83 → 4.0.0-beta.84
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.
- package/dist/Array.d.ts +64 -64
- package/dist/Array.js +26 -26
- package/dist/Cache.d.ts +1 -1
- package/dist/Cache.js +1 -1
- package/dist/Cause.d.ts +68 -68
- package/dist/Cause.js +47 -47
- package/dist/Channel.d.ts +5 -5
- package/dist/Channel.js +3 -3
- package/dist/Clock.d.ts +1 -1
- package/dist/Clock.js +1 -1
- package/dist/Combiner.d.ts +9 -9
- package/dist/Combiner.js +8 -8
- package/dist/Config.d.ts +15 -94
- package/dist/Config.d.ts.map +1 -1
- package/dist/Config.js +22 -70
- package/dist/Config.js.map +1 -1
- package/dist/ConfigProvider.d.ts +58 -74
- package/dist/ConfigProvider.d.ts.map +1 -1
- package/dist/ConfigProvider.js +66 -41
- package/dist/ConfigProvider.js.map +1 -1
- package/dist/Console.d.ts +1 -1
- package/dist/Console.js +1 -1
- package/dist/Data.d.ts +15 -15
- package/dist/Data.js +3 -3
- package/dist/DateTime.d.ts +6 -6
- package/dist/DateTime.js +2 -2
- package/dist/Duration.d.ts +3 -3
- package/dist/Duration.js +3 -3
- package/dist/Effect.d.ts +84 -45
- package/dist/Effect.d.ts.map +1 -1
- package/dist/Effect.js +72 -33
- package/dist/Effect.js.map +1 -1
- package/dist/Equal.d.ts +7 -7
- package/dist/Equal.js +5 -5
- package/dist/Equivalence.d.ts +17 -17
- package/dist/Equivalence.js +13 -13
- package/dist/Exit.d.ts +3 -3
- package/dist/Exit.js +3 -3
- package/dist/Formatter.d.ts +5 -5
- package/dist/Formatter.js +4 -4
- package/dist/Function.d.ts +10 -10
- package/dist/Function.js +3 -3
- package/dist/HashMap.d.ts +3 -3
- package/dist/HashMap.js +1 -1
- package/dist/Iterable.d.ts +6 -6
- package/dist/Iterable.js +2 -2
- package/dist/JsonPatch.d.ts +2 -2
- package/dist/Layer.d.ts +1 -1
- package/dist/Layer.js +1 -1
- package/dist/Logger.d.ts +1 -1
- package/dist/Logger.js +1 -1
- package/dist/Match.d.ts +8 -8
- package/dist/Match.js +8 -8
- package/dist/Metric.d.ts +3 -3
- package/dist/Metric.js +3 -3
- package/dist/Optic.d.ts +30 -30
- package/dist/Optic.js +12 -12
- package/dist/Option.d.ts +7 -7
- package/dist/Option.js +7 -7
- package/dist/Order.d.ts +23 -23
- package/dist/Order.js +20 -20
- package/dist/Pool.d.ts +1 -1
- package/dist/Pool.js +1 -1
- package/dist/Predicate.d.ts +88 -88
- package/dist/Predicate.js +47 -47
- package/dist/PubSub.d.ts +3 -3
- package/dist/PubSub.js +3 -3
- package/dist/Reducer.d.ts +1 -1
- package/dist/Reducer.js +1 -1
- package/dist/Result.d.ts +18 -18
- package/dist/Result.js +8 -8
- package/dist/Runtime.d.ts +1 -1
- package/dist/Runtime.js +1 -1
- package/dist/Schema.d.ts +265 -120
- package/dist/Schema.d.ts.map +1 -1
- package/dist/Schema.js +285 -116
- package/dist/Schema.js.map +1 -1
- package/dist/SchemaAST.d.ts +1 -1
- package/dist/SchemaAST.d.ts.map +1 -1
- package/dist/SchemaAST.js +13 -9
- package/dist/SchemaAST.js.map +1 -1
- package/dist/SchemaGetter.d.ts +48 -48
- package/dist/SchemaGetter.js +44 -44
- package/dist/SchemaIssue.d.ts +3 -3
- package/dist/SchemaIssue.js +3 -3
- package/dist/SchemaParser.d.ts +122 -22
- package/dist/SchemaParser.d.ts.map +1 -1
- package/dist/SchemaParser.js +186 -50
- package/dist/SchemaParser.js.map +1 -1
- package/dist/SchemaRepresentation.d.ts +1 -1
- package/dist/SchemaRepresentation.d.ts.map +1 -1
- package/dist/SchemaRepresentation.js +96 -2
- package/dist/SchemaRepresentation.js.map +1 -1
- package/dist/SchemaTransformation.d.ts +20 -20
- package/dist/SchemaTransformation.js +18 -18
- package/dist/Stream.d.ts +3 -3
- package/dist/Stream.js +2 -2
- package/dist/Stream.js.map +1 -1
- package/dist/String.d.ts +1 -1
- package/dist/String.js +1 -1
- package/dist/Struct.d.ts +1 -1
- package/dist/Struct.js +1 -1
- package/dist/Types.d.ts +13 -13
- package/dist/internal/effect.js +23 -10
- package/dist/internal/effect.js.map +1 -1
- package/dist/internal/schema/cause.d.ts +2 -0
- package/dist/internal/schema/cause.d.ts.map +1 -0
- package/dist/internal/schema/cause.js +24 -0
- package/dist/internal/schema/cause.js.map +1 -0
- package/dist/internal/schema/schema.d.ts +8 -4
- package/dist/internal/schema/schema.d.ts.map +1 -1
- package/dist/internal/schema/schema.js +21 -8
- package/dist/internal/schema/schema.js.map +1 -1
- package/dist/testing/TestSchema.d.ts +3 -3
- package/dist/testing/TestSchema.js +1 -1
- package/dist/unstable/ai/AiError.d.ts +1 -1
- package/dist/unstable/ai/AiError.js +1 -1
- package/dist/unstable/ai/Chat.d.ts +1 -1
- package/dist/unstable/ai/Chat.js +1 -1
- package/dist/unstable/cli/Prompt.js +2 -2
- package/dist/unstable/cli/Prompt.js.map +1 -1
- package/dist/unstable/httpapi/HttpApiScalar.d.ts +2 -2
- package/dist/unstable/rpc/Rpc.d.ts +1 -1
- package/dist/unstable/rpc/Rpc.js +1 -1
- package/dist/unstable/rpc/RpcGroup.d.ts.map +1 -1
- package/dist/unstable/rpc/RpcGroup.js +3 -4
- package/dist/unstable/rpc/RpcGroup.js.map +1 -1
- package/dist/unstable/sql/SqlResolver.d.ts.map +1 -1
- package/dist/unstable/sql/SqlResolver.js +15 -2
- package/dist/unstable/sql/SqlResolver.js.map +1 -1
- package/dist/unstable/workflow/Activity.d.ts +1 -0
- package/dist/unstable/workflow/Activity.d.ts.map +1 -1
- package/dist/unstable/workflow/Activity.js +1 -0
- package/dist/unstable/workflow/Activity.js.map +1 -1
- package/dist/unstable/workflow/WorkflowEngine.js +1 -1
- package/dist/unstable/workflow/WorkflowEngine.js.map +1 -1
- package/package.json +1 -1
- package/src/Array.ts +65 -65
- package/src/Cache.ts +1 -1
- package/src/Cause.ts +68 -68
- package/src/Channel.ts +5 -5
- package/src/Clock.ts +1 -1
- package/src/Combiner.ts +9 -9
- package/src/Config.ts +40 -108
- package/src/ConfigProvider.ts +139 -100
- package/src/Console.ts +1 -1
- package/src/Data.ts +15 -15
- package/src/DateTime.ts +6 -6
- package/src/Duration.ts +3 -3
- package/src/Effect.ts +89 -45
- package/src/Equal.ts +7 -7
- package/src/Equivalence.ts +17 -17
- package/src/Exit.ts +3 -3
- package/src/Formatter.ts +5 -5
- package/src/Function.ts +10 -10
- package/src/HashMap.ts +3 -3
- package/src/Iterable.ts +6 -6
- package/src/JsonPatch.ts +2 -2
- package/src/Layer.ts +1 -1
- package/src/Logger.ts +1 -1
- package/src/Match.ts +8 -8
- package/src/Metric.ts +3 -3
- package/src/Optic.ts +30 -30
- package/src/Option.ts +7 -7
- package/src/Order.ts +23 -23
- package/src/Pool.ts +1 -1
- package/src/Predicate.ts +88 -88
- package/src/PubSub.ts +3 -3
- package/src/Reducer.ts +1 -1
- package/src/Result.ts +20 -20
- package/src/Runtime.ts +1 -1
- package/src/Schema.ts +314 -131
- package/src/SchemaAST.ts +20 -11
- package/src/SchemaGetter.ts +48 -48
- package/src/SchemaIssue.ts +3 -3
- package/src/SchemaParser.ts +197 -58
- package/src/SchemaRepresentation.ts +73 -3
- package/src/SchemaTransformation.ts +20 -20
- package/src/Stream.ts +4 -4
- package/src/String.ts +1 -1
- package/src/Struct.ts +1 -1
- package/src/Types.ts +13 -13
- package/src/internal/effect.ts +29 -10
- package/src/internal/schema/cause.ts +26 -0
- package/src/internal/schema/schema.ts +36 -10
- package/src/testing/TestSchema.ts +3 -3
- package/src/unstable/ai/AiError.ts +1 -1
- package/src/unstable/ai/Chat.ts +1 -1
- package/src/unstable/cli/Prompt.ts +1 -1
- package/src/unstable/httpapi/HttpApiScalar.ts +2 -2
- package/src/unstable/rpc/Rpc.ts +1 -1
- package/src/unstable/rpc/RpcGroup.ts +3 -4
- package/src/unstable/sql/SqlResolver.ts +15 -2
- package/src/unstable/workflow/Activity.ts +2 -0
- package/src/unstable/workflow/WorkflowEngine.ts +1 -1
package/dist/Result.js
CHANGED
|
@@ -86,7 +86,7 @@ export {
|
|
|
86
86
|
* This is equivalent to `Result.succeed(undefined)`, but reuses a shared
|
|
87
87
|
* `Success` wrapper instead of allocating one each time.
|
|
88
88
|
*
|
|
89
|
-
* **Example** (
|
|
89
|
+
* **Example** (Referencing void results)
|
|
90
90
|
*
|
|
91
91
|
* ```ts
|
|
92
92
|
* import { Result } from "effect"
|
|
@@ -117,7 +117,7 @@ void_ as void };
|
|
|
117
117
|
* `Result<never, void>`, but reuses a shared `Failure` wrapper instead of
|
|
118
118
|
* allocating one each time.
|
|
119
119
|
*
|
|
120
|
-
* **Example** (
|
|
120
|
+
* **Example** (Failing without a payload)
|
|
121
121
|
*
|
|
122
122
|
* ```ts
|
|
123
123
|
* import { Result } from "effect"
|
|
@@ -296,7 +296,7 @@ export const isResult = result.isResult;
|
|
|
296
296
|
* - Acts as a TypeScript type guard, narrowing to `Failure<A, E>`
|
|
297
297
|
* - After narrowing, you can access `.failure` to read the error value
|
|
298
298
|
*
|
|
299
|
-
* **Example** (Narrowing to
|
|
299
|
+
* **Example** (Narrowing to failure)
|
|
300
300
|
*
|
|
301
301
|
* ```ts
|
|
302
302
|
* import { Result } from "effect"
|
|
@@ -328,7 +328,7 @@ export const isFailure = result.isFailure;
|
|
|
328
328
|
* - Acts as a TypeScript type guard, narrowing to `Success<A, E>`
|
|
329
329
|
* - After narrowing, you can access `.success` to read the value
|
|
330
330
|
*
|
|
331
|
-
* **Example** (Narrowing to
|
|
331
|
+
* **Example** (Narrowing to success)
|
|
332
332
|
*
|
|
333
333
|
* ```ts
|
|
334
334
|
* import { Result } from "effect"
|
|
@@ -922,7 +922,7 @@ export const orElse = /*#__PURE__*/dual(2, (self, that) => isFailure(self) ? tha
|
|
|
922
922
|
* - The error types are merged into a union (`E | E2`)
|
|
923
923
|
* - This is the monadic `bind` / `>>=` for `Result`
|
|
924
924
|
*
|
|
925
|
-
* **Example** (
|
|
925
|
+
* **Example** (Validating sequentially)
|
|
926
926
|
*
|
|
927
927
|
* ```ts
|
|
928
928
|
* import { pipe, Result } from "effect"
|
|
@@ -962,7 +962,7 @@ export const flatMap = /*#__PURE__*/dual(2, (self, f) => isFailure(self) ? fail(
|
|
|
962
962
|
*
|
|
963
963
|
* If `self` is a `Failure`, the second argument is never evaluated.
|
|
964
964
|
*
|
|
965
|
-
* **Example** (
|
|
965
|
+
* **Example** (Chaining Result values with different argument types)
|
|
966
966
|
*
|
|
967
967
|
* ```ts
|
|
968
968
|
* import { pipe, Result } from "effect"
|
|
@@ -1341,7 +1341,7 @@ export const transposeOption = self => {
|
|
|
1341
1341
|
* - `Some(a)` where `f(a)` is `Success(b)` becomes `Success(Some(b))`
|
|
1342
1342
|
* - `Some(a)` where `f(a)` is `Failure(e)` becomes `Failure(e)`
|
|
1343
1343
|
*
|
|
1344
|
-
* **Example** (
|
|
1344
|
+
* **Example** (Mapping and transposing in one step)
|
|
1345
1345
|
*
|
|
1346
1346
|
* ```ts
|
|
1347
1347
|
* import { Option, Result } from "effect"
|
|
@@ -1377,7 +1377,7 @@ export const transposeMapOption = /*#__PURE__*/dual(2, (self, f) => option_.isNo
|
|
|
1377
1377
|
* This is equivalent to `Result.succeed(Option.none())`, but reuses a shared
|
|
1378
1378
|
* `Success` wrapper instead of allocating one each time.
|
|
1379
1379
|
*
|
|
1380
|
-
* **Example** (
|
|
1380
|
+
* **Example** (Succeeding with None)
|
|
1381
1381
|
*
|
|
1382
1382
|
* ```ts
|
|
1383
1383
|
* import { Result } from "effect"
|
package/dist/Runtime.d.ts
CHANGED
|
@@ -73,7 +73,7 @@ export interface Teardown {
|
|
|
73
73
|
* The `130` code is used only when the Cause contains interruptions and no
|
|
74
74
|
* other failure reasons. Mixed causes use the squashed error path instead.
|
|
75
75
|
*
|
|
76
|
-
* **Example** (
|
|
76
|
+
* **Example** (Referencing default teardown)
|
|
77
77
|
*
|
|
78
78
|
* ```ts
|
|
79
79
|
* import { Exit, Runtime } from "effect"
|
package/dist/Runtime.js
CHANGED
|
@@ -36,7 +36,7 @@ import { constVoid, dual } from "effect/Function";
|
|
|
36
36
|
* The `130` code is used only when the Cause contains interruptions and no
|
|
37
37
|
* other failure reasons. Mixed causes use the squashed error path instead.
|
|
38
38
|
*
|
|
39
|
-
* **Example** (
|
|
39
|
+
* **Example** (Referencing default teardown)
|
|
40
40
|
*
|
|
41
41
|
* ```ts
|
|
42
42
|
* import { Exit, Runtime } from "effect"
|